Refine boss reveal and dash motion

This commit is contained in:
Loïc Wisniewski 2026-09-04 18:40:58 +02:00
commit e5439f7183
4 changed files with 48 additions and 11 deletions

View file

@ -65,6 +65,16 @@ func _process(delta: float) -> bool:
return _fail("first dash did not consume %d energy" % DASH_COST)
if first_component.is_ready():
return _fail("the Propulser that dashed did not enter cooldown")
# The burst should cover substantially more than a linear quarter of
# its distance at a quarter of its duration, then ease into its stop.
fleet.set_process(false)
fleet._advance_dash(fleet.dash_duration * 0.25)
var early_distance: float = fleet.get_centroid().distance_to(first_origin)
if early_distance <= DASH_DISTANCE * 0.45 \
or early_distance >= DASH_DISTANCE * 0.7:
return _fail("dash has no useful ease-out curve (quarter-time distance %.1f)" \
% early_distance)
fleet.set_process(true)
dash._process(0.0)
if not main.get_node("UI/DashButton").enabled:
return _fail("one cooling Propulser disabled a second ready one")