Make boss encounter more dynamic

This commit is contained in:
Loïc Wisniewski 2026-09-03 22:31:32 +02:00
commit cb6b0b69c6
6 changed files with 60 additions and 9 deletions

View file

@ -71,6 +71,8 @@ func _process(delta: float) -> bool:
if composed_background.get_shader_parameter("field_texture") \
!= profile.background_field_texture:
return _fail("boss backdrop did not bind its ready-made field texture")
if float(composed_background.get_shader_parameter("cell_size")) >= 120.0:
return _fail("boss backdrop still magnifies too small a part of its authored field")
if profile.editor_visible or "boss" in surface_profiles.editor_profile_ids():
return _fail("boss surface is configurable in the map editor")
state.dev_mode = true
@ -143,6 +145,10 @@ func _process(delta: float) -> bool:
if not encounter.encounter_active or not boss.combat_active \
or state.encounter_locks_movement:
return _fail("the reveal did not start combat and return fleet control")
var boss_position_before_move: Vector2 = boss.global_position
boss._process(0.5)
if boss.global_position.distance_to(boss_position_before_move) < 10.0:
return _fail("the active boss remained stationary")
print("off-screen signal led into a roar, shake, health reveal and player control")
boss.wave_timer = 999.0
boss.laser_timer = 999.0
@ -156,6 +162,9 @@ func _process(delta: float) -> bool:
for eye in boss.eyes:
if eye.opened or eye.is_in_group(COMBAT_TARGET.GROUP):
return _fail("a tentacle eye starts open and attackable")
if boss.ARMOURED_IRIS_COLOR.is_equal_approx(boss.eyes[0].IRIS_COLOR) \
or boss.ARMOURED_PUPIL_COLOR.is_equal_approx(boss.eyes[0].PUPIL_COLOR):
return _fail("the central eye still shares the tentacle-eye palette")
# --- D. larger, varied, one-in-three waves --------------------
boss.spawn_wave()
@ -280,8 +289,8 @@ func _process(delta: float) -> bool:
var beams: Array = get_nodes_in_group("boss_lasers")
if beams.size() != 3:
return _fail("laser phase launched %d beams, expected three lanes" % beams.size())
if boss.laser_interval >= 5.5 or boss.laser_charge_time >= 1.6:
return _fail("boss lasers retained their old slow cadence")
if boss.laser_interval > 2.5 or boss.laser_charge_time > 0.75:
return _fail("boss lasers are not using the faster cadence")
if beams[0].aim_direction.is_equal_approx(beams[1].aim_direction) \
or beams[1].aim_direction.is_equal_approx(beams[2].aim_direction):
return _fail("laser volley lanes all aim in the same direction")