Fill bomber hull during cooldown

This commit is contained in:
Loïc Wisniewski 2026-08-15 10:41:24 +02:00
commit 7da4531f25
3 changed files with 47 additions and 12 deletions

View file

@ -21,8 +21,10 @@ func _ready() -> void:
var skill: GasBombController = main.get_node("GasBombController")
skill._process(0.0)
# Show both per-ship states in one frame: the first bomber is rearming,
# while the second has the bright complete ready halo and supplies the aim.
fleet.ships[2].get_component("gas_bomber").consume_shot(GasBombController.COOLDOWN)
# while the second has a fully lit hull and supplies the aim.
var rearming: Node = fleet.ships[2].get_component("gas_bomber")
rearming.consume_shot(GasBombController.COOLDOWN)
rearming.tick(GasBombController.COOLDOWN * 0.5)
main.get_node("Camera2D").zoom = Vector2(1.8, 1.8)
var button: Control = main.get_node("UI/GasBombButton")
var press := InputEventScreenTouch.new()

View file

@ -37,6 +37,9 @@ func _process(delta: float) -> bool:
skill._process(0.0)
if first.is_ready() or not second.is_ready() or not skill.button.enabled:
return _fail("the first shot disabled more than its firing bomber")
if not first._filled_hull(fleet.ships[0].definition.hull_points, 0.0).is_empty() \
or first._filled_hull(fleet.ships[0].definition.hull_points, 0.5).size() < 3:
return _fail("bomber cooldown did not produce an empty-to-filling hull")
if skill.projectiles.size() != 1:
return _fail("the first bomber did not launch exactly one projectile")