Refine boss reveal and dash motion
This commit is contained in:
parent
8fbcc340ce
commit
e5439f7183
4 changed files with 48 additions and 11 deletions
|
|
@ -124,12 +124,16 @@ func _process(delta: float) -> bool:
|
|||
return _fail("the off-screen boss has no directional border indicator")
|
||||
if state.encounter_locks_movement or boss.combat_active:
|
||||
return _fail("the off-screen approach locked player movement or already started combat")
|
||||
# Put the camera where the player can carry the fleet; the encounter
|
||||
# itself must detect the boss crossing into view.
|
||||
# Seeing a tentacle is not enough to trigger the cinematic or its roar.
|
||||
surface.get_node("Camera2D").global_position = boss.global_position + Vector2(0.0, 1000.0)
|
||||
encounter._process(0.0)
|
||||
if encounter.reveal_started:
|
||||
return _fail("a partially visible boss triggered its reveal and scream")
|
||||
# Carry the fleet close enough to frame the complete central body.
|
||||
surface.get_node("Camera2D").global_position = boss.global_position + Vector2(0.0, 250.0)
|
||||
encounter._process(0.0)
|
||||
if not encounter.reveal_started:
|
||||
return _fail("bringing the boss into view did not trigger its reveal")
|
||||
return _fail("fully framing the boss did not trigger its reveal")
|
||||
if not state.encounter_locks_movement:
|
||||
return _fail("the reveal did not briefly lock movement for the cinematic")
|
||||
if not encounter.health_bar.visible or encounter.indicator.visible:
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue