Add tentacled boss planet encounter
This commit is contained in:
parent
0f7edff15a
commit
40f284dcdd
38 changed files with 1051 additions and 19 deletions
49
tests/_boss_planet_preview.gd
Normal file
49
tests/_boss_planet_preview.gd
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
extends Node2D
|
||||
|
||||
# Stable portrait composition for visually checking #188. The real surface,
|
||||
# encounter, fleet, UI, minions, open eyes and laser telegraph are all used;
|
||||
# only their timers are frozen once the representative second phase is laid
|
||||
# out so a screenshot does not depend on capture timing.
|
||||
|
||||
var surface: Node
|
||||
var laid_out: bool = false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
GameState.reset_new_game()
|
||||
GameState.intro_active = false
|
||||
GameState.reset_quests(false)
|
||||
GameState.planet_name = "Many-Eyed Deep"
|
||||
GameState.planet_id = "preview:boss"
|
||||
GameState.planet_definition_id = "boss"
|
||||
GameState.surviving_ship_count = 3
|
||||
GameState.surviving_vessel_types = PackedStringArray([
|
||||
GameState.VESSEL_INTERCEPTOR,
|
||||
GameState.VESSEL_GAS_BOMBER,
|
||||
GameState.VESSEL_LASER,
|
||||
])
|
||||
surface = load("res://surface/PlanetSurface.tscn").instantiate()
|
||||
add_child(surface)
|
||||
surface.get_node("FadeOverlay/FadeRect").visible = false
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if laid_out:
|
||||
return
|
||||
laid_out = true
|
||||
var encounter: Node = surface.get_node("SurfaceFeatures/BossEncounter")
|
||||
var boss: Node2D = encounter.get_node("Boss")
|
||||
boss.wave_timer = 999.0
|
||||
boss.laser_timer = 999.0
|
||||
boss.phase = boss.Phase.LASER_STORM
|
||||
for i in range(3):
|
||||
boss.eyes[i].open_eye()
|
||||
boss.eyes_opened += 1
|
||||
boss.spawn_wave()
|
||||
for minion in get_tree().get_nodes_in_group("boss_minions"):
|
||||
minion.speed = 0.0
|
||||
minion.acceleration = 0.0
|
||||
boss.laser_charge_time = 999.0
|
||||
boss.fire_laser_volley()
|
||||
encounter._process(0.0)
|
||||
get_tree().paused = true
|
||||
Loading…
Reference in a new issue