#97c: waves attack buildings #101
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Subticket of #97, depends on #97a and #97b.
"Waves tries to attack built buildings."
Today every enemy component hunts
player_shipsand nothing else, so astructure is scenery to them. Wave enemies need to pick a target that can be a
BUILDING, close on it, and damage it - while still fighting the fleet when the
fleet is what is in front of them.
Done in
3debcd7.EnemyTargetsanswers "who am I coming for" once, for pursuit, standoff, thelancer's lunge and the ranged weapon together. One thumb on the scale: a vessel
inside 520px always wins even against a nearer building, or the fleet could not
defend anything by interposing itself.
Buildings got a hitbox - an Area2D in a group, the same shape as a Ship or an
asteroid, so the projectile needed one extra branch rather than a new concept.
Damage lands on a tick rather than on entry: entry fires once, which is right
for a rammer that dies on the first strike, but would let a sniper that drifted
inside sit there scratch-free for ever.
What one strike costs is data on the enemy definition, for the same reason
dies_on_contactis - a lancer arriving at 950px/s is not a sniper driftinginto a wall.