Add artillery enemy with telegraphed AOE (#46)

EnemyArtilleryComponent is a stationary siege piece (slow drift toward
the fleet, deliberately no pursuit component) that fires at the fleet
centroid on a long cooldown via a standalone ArtilleryShell -
telegraph ring (~1.8s, growing radius plus a filling countdown arc) ->
slow visible travel -> AOE explosion via Ship.take_damage() on every
player_ships node inside, same all-or-nothing shield absorption as
every other damage source. The shell is independent of the enemy that
fired it (added to the tree root, like EnemyProjectile/Projectile) so
the shooter dying mid-flight doesn't cancel an already-telegraphed
shot, and the impact point is fixed at fire time - never re-aimed at
where the fleet moves to afterward.

Part of the #40 conquest-mechanic breakdown.
This commit is contained in:
Loïc Wisniewski 2026-08-15 21:23:43 +02:00
commit def224667d
16 changed files with 455 additions and 1 deletions

View file

@ -2,10 +2,11 @@ class_name EnemyDefinitions
extends RefCounted
const DEFAULT_ID: String = "chaser"
const ORDER: PackedStringArray = ["chaser", "sniper"]
const ORDER: PackedStringArray = ["chaser", "sniper", "artillery"]
const DEFINITIONS: Dictionary = {
"chaser": preload("res://ChaserEnemyDefinition.tres"),
"sniper": preload("res://SniperEnemyDefinition.tres"),
"artillery": preload("res://ArtilleryEnemyDefinition.tres"),
}