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.
20 lines
700 B
GDScript
20 lines
700 B
GDScript
extends Node2D
|
|
|
|
|
|
func _ready() -> void:
|
|
GameState.planet_name = "Violet Tempest"
|
|
GameState.planet_id = "artillery_preview_gas"
|
|
GameState.planet_definition_id = "gas_giant"
|
|
GameState.surviving_ship_count = 3
|
|
var surface: Node = load("res://PlanetSurface.tscn").instantiate()
|
|
surface.get_node("SurfaceController").fade_duration = 0.0
|
|
add_child(surface)
|
|
|
|
var shell: Node = load("res://ArtilleryShell.tscn").instantiate()
|
|
shell.telegraph_time = 10.0 # frozen mid-countdown for the screenshot
|
|
shell.aoe_radius = 220.0
|
|
surface.add_child(shell)
|
|
shell.launch(Vector2(-600, -600), Vector2.ZERO)
|
|
shell.telegraph_left = shell.telegraph_time * 0.45
|
|
shell.set_process(false)
|
|
shell.queue_redraw()
|