CR-002/CR-003: Gauntlet als vertikaler Kletter-Parcours mit 5 Ascents, ohne Wind
- Gauntlet komplett neu: fuenf Ascent-Sub-Scenes an der Felswand (Fuss bis Box-Canyon ~38 m), verbunden ueber schulterbreite Kies-Pfade (Training: Checkpoint/Rast, Ernstlauf: Durchgang); Nebel, KillZone, Treppen-Visual, 4 Drachen-Silhouetten am Box-Canyon-Eingang - 10 wiederverwendbare Hindernis-Scenes: spinning_log, granite_pillar, spinning_wheel (Ausstiegs-Timing), buoy_ball (momentum_swing: laden + im Scheitel loslassen), iron_rail (A/D- bzw. LB/RB-Wechsel-Hangeln), shaking_pillar, rolling_log (Tempo-Pflicht, Quetsch-Tod, No-Rope), leaning_chimney (X-Spreiz-Modus, kein Seil-Behelf), vertical_ramp (Sprint-Momentum), cliff_ledge (bestehendes Kanten-Klettersystem) - Sicherungsseile alle ~6 Fuss: Sturz oeffnet Greif-Fenster (Leertaste/A), Fang = letzter Absatz + 30 s Strafe, sonst Death-State; No-Rope-Zone an den Rolling Logs; Ernstlauf sperrt Absteigen - run_timer (Zeitlauf nur im exam), rival_climbers (5 Kadetten, Sturz-Zeitplan + Kanon-Tod an den Rolling Logs), nerve_system (Rival-Tode/Ablenkung/Blick nach unten verschlechtern Griff; Steady = Strg/L2 senkt Nerven, blockt Klettern), climb_controller (Griff-HUD), gauntlet_mode (training/exam + manipulated-Preset) - CR-003: Wind aus dem Gauntlet entfernt - Drachen-Ablenkung ohne Seitenruck und ohne Gegensteuer-QTE (reines Nerven-Ereignis), balance_qte auf CR-001-Stand zurueck (Wind nur am Viadukt) - Story Phase 4c unangetastet auf neuer Geometrie: Auftakt, Intervention am Sammel-Absatz vor Ascent 5, Marens Tod, Wahrheiten, Trauer-Wahl; erster Besuch = manipulierter Ernstlauf, danach freies Training; story_hook_reached(ascent_index) als Anker fuer den Story-CR - neue Input-Actions steady/swing_charge/grab_rope/hangel_left/ hangel_right/look_down; Tuning daten-getrieben unter data/gauntlet/ (gauntlet_tuning.tres + ascent_1..5.tres) - Verifikation: Headless-Sonde 91/97 gruen (Rest: Buoy-Folgefehler, Fix umgesetzt, Bestaetigungslauf auf Wunsch uebersprungen); Boot-Check aller 6 Szenen fehlerfrei Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
1d8d3bc342
commit
6f92fc0ae0
66 changed files with 2661 additions and 304 deletions
|
|
@ -1,54 +1,151 @@
|
|||
extends Node3D
|
||||
## Ablauf-Steuerung des Gauntlet-Klimax (Phase 4c, STORY.md Abschnitte 3
|
||||
## und 5 — Wendepunkt).
|
||||
## Ablauf-Steuerung des Gauntlet (CR-002: vertikaler Kletter-Parcours,
|
||||
## Phase 4c: Wendepunkt, STORY.md Abschnitte 3 und 5).
|
||||
##
|
||||
## Der Lauf der Gezeichneten ist absichtlich tödlicher angelegt
|
||||
## (Auszahlung von Wahrheit 1): die Nordroute mit ungeprüften Halterungen,
|
||||
## benannt im Start-Dialog, sichtbar im verkanteten Abschnitt am Ende.
|
||||
## Marens Tod ist FIX und tritt unabhängig vom Permadeath-Toggle ein —
|
||||
## das ist Story, kein Fail-State. Permadeath betrifft ausschließlich
|
||||
## Tyrveils eigene Stürze (KillZone + Checkpoints wie am Viadukt).
|
||||
## Sequenz beim Erreichen des manipulierten Abschnitts: Intervention
|
||||
## (Maren geht dazwischen, nicht abbrechbar) -> Einsturz, Wren gerettet,
|
||||
## Maren getroffen -> Sterbeszene mit Wahrheit 1 und 2 -> Trauer-Wahl
|
||||
## Klinge/Herz (±15 Ton, Standing +2/+5) -> Beat gauntlet_completed.
|
||||
## Beat-Kette und Persistenz: StorySystem. Nach dem Wendepunkt (erneutes
|
||||
## Betreten) ist der Lauf frei begehbar, Maren und Wren sind fort.
|
||||
## Der Parcours besteht aus fünf Ascent-Sub-Scenes an der Felswand,
|
||||
## verbunden über schulterbreite Kies-Pfade; unten kaschiert Nebel den
|
||||
## tausende Fuß tiefen Abgrund, oben warten die Drachen am Eingang der
|
||||
## Box-Canyon. Komponenten am Root: gauntlet_mode (training/exam +
|
||||
## manipulated), climb_controller (Griff + Descent-Sperre),
|
||||
## safety_rope_system (Seilfang-QTE, +30 s), run_timer (Zeitlauf),
|
||||
## rival_climbers (Live-Tode im Ernstlauf), nerve_system und
|
||||
## dragon_distraction (baseline aus; per CR-003 ohne Wind-Ruck und ohne
|
||||
## Gegensteuer-QTE — Wind gehört zum Viadukt, nicht zum Gauntlet). Die
|
||||
## Treppe neben dem Lauf ist rein visuell (im Ernstlauf tabu, Zugang erst
|
||||
## nach der Präsentation).
|
||||
##
|
||||
## Story (Phase 4c, unverändert): Der erste Lauf ist der manipulierte
|
||||
## Ernstlauf — Marens Tod ist FIX und unabhängig vom Permadeath-Toggle.
|
||||
## Sequenz am Sammel-Absatz vor Ascent 5: Intervention -> Einsturz, Wren
|
||||
## gerettet, Maren getroffen -> Sterbeszene mit Wahrheit 1 und 2 ->
|
||||
## Trauer-Wahl. Nach dem Wendepunkt ist der Lauf freies Training ohne
|
||||
## Rivalen. story_hook_reached feuert an jedem Ascent-Übergang (Anker für
|
||||
## den separaten Phase-4-Story-CR).
|
||||
|
||||
signal ascent_completed(index: int)
|
||||
signal obstacle_cleared(obstacle_id: String)
|
||||
signal story_hook_reached(ascent_index: int)
|
||||
|
||||
const MAIN_MENU_SCENE := "res://scenes/ui/main_menu.tscn"
|
||||
const START_PATH := "res://data/dialogue/gauntlet_start.json"
|
||||
const INTERVENTION_PATH := "res://data/dialogue/gauntlet_intervention.json"
|
||||
const DEATH_PATH := "res://data/dialogue/gauntlet_death.json"
|
||||
const GRIEF_PATH := "res://data/dialogue/gauntlet_grief.json"
|
||||
const MAREN_ARRIVAL_POSITION := Vector3(1, 0.1, -80)
|
||||
const MAREN_FALL_POSITION := Vector3(0.8, 0.1, -81.5)
|
||||
const WREN_SAFE_POSITION := Vector3(-1, 0.1, -80)
|
||||
const TUNING_PATH := "res://data/gauntlet/gauntlet_tuning.tres"
|
||||
const ASCENT_CONFIG_PATHS: Array[String] = [
|
||||
"res://data/gauntlet/ascent_1.tres",
|
||||
"res://data/gauntlet/ascent_2.tres",
|
||||
"res://data/gauntlet/ascent_3.tres",
|
||||
"res://data/gauntlet/ascent_4.tres",
|
||||
"res://data/gauntlet/ascent_5.tres",
|
||||
]
|
||||
const BEHAVIOR_TUNABLES: Array[String] = [
|
||||
"log_spin_speed", "wheel_speed", "wheel_exit_window", "buoy_swing_period",
|
||||
"launch_window", "momentum_charge_time", "hangel_rhythm_window",
|
||||
"shake_amplitude", "shake_frequency", "roll_speed", "min_ascend_speed",
|
||||
"crush_grace", "chimney_brace_tolerance", "chimney_drift_speed",
|
||||
"ramp_min_momentum",
|
||||
]
|
||||
const MAREN_ARRIVAL_POSITION := Vector3(1, 26.45, -88.5)
|
||||
const MAREN_FALL_POSITION := Vector3(0.8, 26.45, -89.8)
|
||||
const WREN_SAFE_POSITION := Vector3(-1, 26.45, -88.5)
|
||||
const BASE_SPAWN := Vector3(0, 0.1, 2)
|
||||
const COURSE_START_Z := -4.0
|
||||
const GRAVEL_CENTERS: Array[Vector3] = [
|
||||
Vector3(0, 7.85, -26.5),
|
||||
Vector3(0, 13.85, -45),
|
||||
Vector3(0, 19.25, -73),
|
||||
Vector3(0, 26.15, -90),
|
||||
]
|
||||
const GRAVEL_SIZES: Array[Vector3] = [
|
||||
Vector3(0.9, 0.3, 4),
|
||||
Vector3(0.9, 0.3, 4),
|
||||
Vector3(0.9, 0.3, 4),
|
||||
Vector3(3, 0.3, 5),
|
||||
]
|
||||
const SPINE: Array[Vector3] = [
|
||||
Vector3(0, 0, -2), Vector3(0, 0.55, -6), Vector3(0, 5.3, -18),
|
||||
Vector3(0, 8, -24.5), Vector3(0, 8, -28.5), Vector3(0, 14, -43),
|
||||
Vector3(0, 14, -47), Vector3(0, 15.4, -61.8), Vector3(0, 19.4, -71),
|
||||
Vector3(0, 19.4, -75), Vector3(0, 26.3, -87.5), Vector3(0, 26.3, -92.5),
|
||||
Vector3(0, 32.6, -97.5), Vector3(0, 35.6, -103), Vector3(0, 37.6, -106),
|
||||
]
|
||||
const ASCENT_BREAKS := [-28.5, -47.0, -71.0, -87.5]
|
||||
const NO_ROPE_RANGE := Vector2(-87.5, -75.0)
|
||||
const RIVAL_CRUSH_ZONE := Vector2(-86.0, -76.0)
|
||||
|
||||
var _checkpoint_position := Vector3.ZERO
|
||||
var _checkpoint_position := BASE_SPAWN
|
||||
var _has_intervention_run := false
|
||||
var _has_run_started := false
|
||||
var _reached_ascents: Dictionary = {}
|
||||
var _player: CharacterBody3D
|
||||
var _dragons: Array[Node3D] = []
|
||||
|
||||
@onready var _maren: Node3D = $Maren
|
||||
@onready var _wren: Node3D = $Wren
|
||||
@onready var _mode: Node = $GauntletMode
|
||||
@onready var _climb: Node = $ClimbController
|
||||
@onready var _nerve: Node = $NerveSystem
|
||||
@onready var _ropes: Node3D = $SafetyRopeSystem
|
||||
@onready var _timer: Node = $RunTimer
|
||||
@onready var _rivals: Node3D = $RivalClimbers
|
||||
@onready var _distraction: Node = $DragonDistraction
|
||||
|
||||
|
||||
## Verbindet Checkpoints, KillZone und Interventions-Trigger; beim ersten
|
||||
## Betreten startet der Auftakt-Dialog, nach dem Wendepunkt ist der Lauf
|
||||
## leer und frei begehbar.
|
||||
## Baut Kurs-Umgebung, lädt das Tuning, verdrahtet Komponenten und
|
||||
## Hindernisse und initialisiert Modus und Story-Zustand.
|
||||
func _ready() -> void:
|
||||
_player = get_tree().get_first_node_in_group("player")
|
||||
_build_course()
|
||||
_apply_tuning()
|
||||
if _player != null:
|
||||
_checkpoint_position = _player.global_position
|
||||
for checkpoint in $Checkpoints.get_children():
|
||||
checkpoint.body_entered.connect(_on_checkpoint_entered.bind(checkpoint))
|
||||
_nerve.setup(_player, COURSE_START_Z)
|
||||
_climb.setup(_player, _nerve, _mode, COURSE_START_Z)
|
||||
var anchors: Array[Vector3] = [Vector3(0, 0, 0)]
|
||||
for center in GRAVEL_CENTERS:
|
||||
anchors.append(Vector3(center.x, center.y + 0.15, center.z))
|
||||
anchors.append(Vector3(0, 37.6, -106))
|
||||
var no_rope_ranges: Array[Vector2] = [NO_ROPE_RANGE]
|
||||
_ropes.setup(_player, _mode, SPINE, anchors, no_rope_ranges, COURSE_START_Z)
|
||||
_distraction.setup(_player, _nerve, _mode, _dragons, COURSE_START_Z)
|
||||
_wire_obstacles()
|
||||
$KillZone.body_entered.connect(_on_kill_zone_entered)
|
||||
_climb.climber_fell.connect(_on_climber_fell)
|
||||
_ropes.rope_caught.connect(_on_rope_caught)
|
||||
_ropes.catch_failed.connect(_on_catch_failed)
|
||||
_rivals.rival_fell.connect(_on_rival_fell)
|
||||
_init_mode_and_story()
|
||||
|
||||
|
||||
## Startet den Zeitlauf, sobald Tyrveil den Parcours im Ernstlauf betritt.
|
||||
func _physics_process(_delta: float) -> void:
|
||||
if _has_run_started or _player == null:
|
||||
return
|
||||
if not _mode.is_exam() or DialogueSystem.is_dialogue_active:
|
||||
return
|
||||
if _player.global_position.z < -5.0:
|
||||
_has_run_started = true
|
||||
_timer.start_run()
|
||||
_rivals.start()
|
||||
|
||||
|
||||
## Initialisiert Modus und Story: Der erste Besuch ist der manipulierte
|
||||
## Ernstlauf (Presentation Day), nach dem Wendepunkt freies Training.
|
||||
func _init_mode_and_story() -> void:
|
||||
if StorySystem.has_reached_beat("maren_death"):
|
||||
_has_intervention_run = true
|
||||
_mode.set_mode(_mode.Mode.TRAINING)
|
||||
_mode.manipulated = false
|
||||
_maren.queue_free()
|
||||
_wren.queue_free()
|
||||
$CollapsingSection.queue_free()
|
||||
$InterventionTrigger.queue_free()
|
||||
return
|
||||
_mode.set_mode(_mode.Mode.EXAM)
|
||||
_mode.manipulated = true
|
||||
_apply_manipulated_preset()
|
||||
var haste: float = _mode.rival_haste_scale()
|
||||
_rivals.setup(SPINE, PackedFloat32Array(ASCENT_BREAKS), RIVAL_CRUSH_ZONE, haste)
|
||||
$InterventionTrigger.body_entered.connect(_on_intervention_entered)
|
||||
_play_opening()
|
||||
|
||||
|
|
@ -66,29 +163,247 @@ func _play_opening() -> void:
|
|||
})
|
||||
|
||||
|
||||
## Setzt den Respawn-Punkt auf den erreichten Abschnitts-Checkpoint.
|
||||
func _on_checkpoint_entered(body: Node3D, checkpoint: Area3D) -> void:
|
||||
## Lädt gauntlet_tuning.tres und die Ascent-Configs und verteilt die
|
||||
## Werte an Komponenten und Hindernisse (Verhaltens-Tunables; Geometrie-
|
||||
## Werte stehen als Overrides direkt in den Ascent-Szenen).
|
||||
func _apply_tuning() -> void:
|
||||
var tuning: GauntletTuning = load(TUNING_PATH)
|
||||
_ropes.rope_spacing = tuning.rope_spacing
|
||||
_ropes.rope_catch_radius = tuning.rope_catch_radius
|
||||
_ropes.rope_catch_window = tuning.rope_catch_window
|
||||
_ropes.rope_time_penalty = tuning.rope_time_penalty
|
||||
_climb.grip_max = tuning.grip_max
|
||||
_climb.grip_drain_rate = tuning.grip_drain_rate
|
||||
_climb.grip_regen_rate = tuning.grip_regen_rate
|
||||
_nerve.nerve_max = tuning.nerve_max
|
||||
_nerve.nerve_on_rival_fall = tuning.nerve_on_rival_fall
|
||||
_nerve.nerve_on_distraction = tuning.nerve_on_distraction
|
||||
_nerve.nerve_look_down_rate = tuning.nerve_look_down_rate
|
||||
_nerve.nerve_calm_rate = tuning.nerve_calm_rate
|
||||
_nerve.nerve_decay_rate = tuning.nerve_decay_rate
|
||||
_nerve.nerve_grip_penalty = tuning.nerve_grip_penalty
|
||||
_nerve.nerve_panic_threshold = tuning.nerve_panic_threshold
|
||||
_nerve.panic_lockout = tuning.panic_lockout
|
||||
_rivals.rival_count = tuning.rival_count
|
||||
_rivals.rival_climb_speed = tuning.rival_climb_speed
|
||||
_rivals.rival_fall_schedule = tuning.rival_fall_schedule
|
||||
_rivals.rival_line_offsets = tuning.rival_line_offsets
|
||||
_distraction.distraction_enabled_baseline = tuning.distraction_enabled_baseline
|
||||
_distraction.distraction_interval_min = tuning.distraction_interval_min
|
||||
_distraction.distraction_interval_max = tuning.distraction_interval_max
|
||||
for i in ASCENT_CONFIG_PATHS.size():
|
||||
var config: AscentConfig = load(ASCENT_CONFIG_PATHS[i])
|
||||
var ascent := get_node("Ascent%d" % (i + 1))
|
||||
for obstacle in ascent.get_children():
|
||||
if obstacle is GauntletObstacle:
|
||||
_apply_config_to_obstacle(config, obstacle)
|
||||
|
||||
|
||||
## Überträgt die Verhaltens-Tunables einer Ascent-Config auf ein Hindernis.
|
||||
func _apply_config_to_obstacle(config: AscentConfig, obstacle: GauntletObstacle) -> void:
|
||||
for property in BEHAVIOR_TUNABLES:
|
||||
if property in obstacle:
|
||||
obstacle.set(property, config.get(property))
|
||||
|
||||
|
||||
## Verschärft die Hindernisse gemäß manipulated-Preset (Zeitfenster,
|
||||
## Rollgeschwindigkeit); Rival- und Ablenkungs-Raffung übernehmen die
|
||||
## Komponenten selbst über die Modus-Skalen.
|
||||
func _apply_manipulated_preset() -> void:
|
||||
for obstacle in get_tree().get_nodes_in_group("gauntlet_obstacle"):
|
||||
if "wheel_exit_window" in obstacle:
|
||||
obstacle.wheel_exit_window *= _mode.window_scale()
|
||||
if "launch_window" in obstacle:
|
||||
obstacle.launch_window *= _mode.window_scale()
|
||||
if "roll_speed" in obstacle:
|
||||
obstacle.roll_speed *= _mode.roll_speed_scale()
|
||||
|
||||
|
||||
## Verbindet Kontext und Signale aller Hindernisse.
|
||||
func _wire_obstacles() -> void:
|
||||
for obstacle in get_tree().get_nodes_in_group("gauntlet_obstacle"):
|
||||
obstacle.setup_context(_nerve, _mode)
|
||||
obstacle.cleared.connect(_on_obstacle_cleared)
|
||||
obstacle.player_fell.connect(_on_obstacle_fall)
|
||||
if obstacle.has_signal("crushed"):
|
||||
obstacle.crushed.connect(_on_crushed)
|
||||
|
||||
|
||||
## Baut die Kurs-Umgebung: Fuß-Plattform, Kies-Pfade mit Rast-/Checkpoint-
|
||||
## Zonen, Box-Canyon-Plattform mit Drachen, Treppen-Visual und Felswand.
|
||||
func _build_course() -> void:
|
||||
_build_platform(Vector3(0, -0.5, 0), Vector3(8, 1, 8))
|
||||
_build_rest_zone(Vector3(0, 1.5, 0), Vector3(8, 3, 8), 0)
|
||||
for i in GRAVEL_CENTERS.size():
|
||||
_build_platform(GRAVEL_CENTERS[i], GRAVEL_SIZES[i])
|
||||
var zone_size := GRAVEL_SIZES[i] + Vector3(0.4, 2.0, 0.4)
|
||||
var zone_center := GRAVEL_CENTERS[i] + Vector3(0, 1.0, 0)
|
||||
_build_rest_zone(zone_center, zone_size, i + 1)
|
||||
_build_platform(Vector3(0, 37.1, -109), Vector3(10, 1, 10))
|
||||
_build_rest_zone(Vector3(0, 38.6, -109), Vector3(10, 2, 10), 5)
|
||||
for x in [-3.2, 3.2]:
|
||||
add_child(_make_mesh(Vector3(2.5, 5, 4), Vector3(x, 40.1, -111), Color(0.4, 0.38, 0.36)))
|
||||
var dragon_spots := [Vector3(-3, 37.6, -112), Vector3(-1, 37.6, -112.6), Vector3(1.5, 37.6, -112.2), Vector3(3.5, 37.6, -111.6)]
|
||||
for spot in dragon_spots:
|
||||
var dragon := _make_dragon(spot)
|
||||
add_child(dragon)
|
||||
_dragons.append(dragon)
|
||||
var stairs := _make_mesh(Vector3(1.2, 0.5, 116), Vector3(5, 18.8, -54), Color(0.5, 0.48, 0.46))
|
||||
stairs.rotation.x = -atan2(37.6, 108.0)
|
||||
add_child(stairs)
|
||||
var cliff := _make_mesh(Vector3(1, 52, 124), Vector3(3.9, 20, -55), Color(0.36, 0.34, 0.33))
|
||||
add_child(cliff)
|
||||
|
||||
|
||||
## Baut eine begehbare Plattform (Kies-Pfad, Fuß, Box-Canyon).
|
||||
func _build_platform(center: Vector3, size: Vector3) -> void:
|
||||
var body := StaticBody3D.new()
|
||||
body.position = center
|
||||
var shape := CollisionShape3D.new()
|
||||
var box := BoxShape3D.new()
|
||||
box.size = size
|
||||
shape.shape = box
|
||||
body.add_child(shape)
|
||||
body.add_child(_make_mesh(size, Vector3.ZERO, Color(0.58, 0.55, 0.5)))
|
||||
add_child(body)
|
||||
|
||||
|
||||
## Baut eine Rast-Zone (Gruppe gauntlet_rest); index 1..4 sind zugleich
|
||||
## Ascent-Übergänge/Checkpoints, 0 ist der Fuß, 5 die Box-Canyon.
|
||||
func _build_rest_zone(center: Vector3, size: Vector3, index: int) -> void:
|
||||
var area := Area3D.new()
|
||||
area.collision_layer = 0
|
||||
area.collision_mask = 2
|
||||
area.position = center
|
||||
area.add_to_group("gauntlet_rest")
|
||||
var shape := CollisionShape3D.new()
|
||||
var box := BoxShape3D.new()
|
||||
box.size = size
|
||||
shape.shape = box
|
||||
area.add_child(shape)
|
||||
area.body_entered.connect(_on_rest_zone_entered.bind(index, center.y))
|
||||
add_child(area)
|
||||
|
||||
|
||||
## Baut ein reines Greybox-Mesh.
|
||||
func _make_mesh(size: Vector3, position_offset: Vector3, color: Color) -> MeshInstance3D:
|
||||
var mesh_instance := MeshInstance3D.new()
|
||||
var mesh := BoxMesh.new()
|
||||
mesh.size = size
|
||||
var material := StandardMaterial3D.new()
|
||||
material.albedo_color = color
|
||||
mesh.material = material
|
||||
mesh_instance.mesh = mesh
|
||||
mesh_instance.position = position_offset
|
||||
return mesh_instance
|
||||
|
||||
|
||||
## Baut eine Drachen-Silhouette am Box-Canyon-Eingang.
|
||||
func _make_dragon(spot: Vector3) -> Node3D:
|
||||
var dragon := Node3D.new()
|
||||
dragon.position = spot
|
||||
var body := _make_mesh(Vector3(1.6, 1.4, 2.8), Vector3(0, 0.7, 0), Color(0.18, 0.14, 0.16))
|
||||
dragon.add_child(body)
|
||||
var neck := _make_mesh(Vector3(0.5, 1.6, 0.5), Vector3(0, 1.8, 1.2), Color(0.18, 0.14, 0.16))
|
||||
dragon.add_child(neck)
|
||||
return dragon
|
||||
|
||||
|
||||
## Ascent-Übergang betreten: Checkpoint (Training), Fortschritts-Höhe für
|
||||
## die Descent-Sperre, ascent_completed + story_hook_reached einmalig.
|
||||
func _on_rest_zone_entered(body: Node3D, index: int, top_y: float) -> void:
|
||||
if not body.is_in_group("player"):
|
||||
return
|
||||
_checkpoint_position = Vector3(checkpoint.global_position.x, 0.1, checkpoint.global_position.z)
|
||||
_climb.set_progress_height(top_y)
|
||||
if _mode.is_training():
|
||||
_checkpoint_position = _rest_checkpoint(index)
|
||||
if index == 0 or _reached_ascents.has(index):
|
||||
return
|
||||
_reached_ascents[index] = true
|
||||
ascent_completed.emit(index)
|
||||
story_hook_reached.emit(index)
|
||||
if index == 5:
|
||||
_timer.stop_run()
|
||||
|
||||
|
||||
## Sturz in den Abgrund: Game Over bei Permadeath AN, sonst Respawn —
|
||||
## betrifft nur Tyrveil, nie den Story-Beat.
|
||||
## Liefert den Respawn-Punkt einer Rast-Zone (Fuß, Kies-Pfad 1..4,
|
||||
## Box-Canyon).
|
||||
func _rest_checkpoint(index: int) -> Vector3:
|
||||
if index == 0:
|
||||
return BASE_SPAWN
|
||||
if index <= 4:
|
||||
var center := GRAVEL_CENTERS[index - 1]
|
||||
return Vector3(center.x, center.y + 0.35, center.z)
|
||||
return Vector3(0, 37.7, -109)
|
||||
|
||||
|
||||
## Hindernis geschafft: Signal durchreichen; die Cliff Ledge beendet den
|
||||
## Kurs zusätzlich über die Box-Canyon-Rast-Zone.
|
||||
func _on_obstacle_cleared(obstacle_id: String) -> void:
|
||||
obstacle_cleared.emit(obstacle_id)
|
||||
|
||||
|
||||
## Fehlgriff an einem Hindernis: Seilfang-Versuch.
|
||||
func _on_obstacle_fall(_source_id: String) -> void:
|
||||
_ropes.attempt_catch()
|
||||
|
||||
|
||||
## Griff leer, Descent-Sperre oder Gegensteuer-QTE verloren: Seilfang.
|
||||
func _on_climber_fell() -> void:
|
||||
_ropes.attempt_catch()
|
||||
|
||||
|
||||
## Seilfang geglückt: Zeitstrafe auf den Lauf.
|
||||
func _on_rope_caught(time_penalty: float) -> void:
|
||||
if _timer.is_running:
|
||||
_timer.add_penalty(time_penalty)
|
||||
|
||||
|
||||
## Seilfang gescheitert oder unmöglich (No-Rope-Zone, kein Seil in
|
||||
## Reichweite): Death-State.
|
||||
func _on_catch_failed() -> void:
|
||||
_handle_death()
|
||||
|
||||
|
||||
## Rival-Sturz in Sicht: Nerven-Anstieg.
|
||||
func _on_rival_fell(_rival_id: int, _ascent_index: int) -> void:
|
||||
_nerve.add_nerve(_nerve.nerve_on_rival_fall)
|
||||
|
||||
|
||||
## Quetschung an den Rolling Logs: sicherer Tod, kein Seilfang.
|
||||
func _on_crushed() -> void:
|
||||
_handle_death()
|
||||
|
||||
|
||||
## Sturz in den Abgrund (KillZone).
|
||||
func _on_kill_zone_entered(body: Node3D) -> void:
|
||||
if not body.is_in_group("player"):
|
||||
return
|
||||
_handle_death()
|
||||
|
||||
|
||||
## Death-State: Game Over bei Permadeath AN; sonst Respawn am Checkpoint
|
||||
## (Training) bzw. am Fuß mit neuem Zeitlauf (Ernstlauf) — betrifft nur
|
||||
## Tyrveil, nie den Story-Beat.
|
||||
func _handle_death() -> void:
|
||||
if GameState.is_permadeath_enabled:
|
||||
print("Game Over — der Gauntlet vergibt keine Fehler.")
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
get_tree().change_scene_to_file.call_deferred(MAIN_MENU_SCENE)
|
||||
return
|
||||
body.velocity = Vector3.ZERO
|
||||
body.global_position = _checkpoint_position
|
||||
_player.external_push = Vector3.ZERO
|
||||
_player.velocity = Vector3.ZERO
|
||||
_climb.reset_grip()
|
||||
if _mode.is_exam():
|
||||
_player.global_position = BASE_SPAWN
|
||||
_timer.reset()
|
||||
_has_run_started = false
|
||||
else:
|
||||
_player.global_position = _checkpoint_position
|
||||
|
||||
|
||||
## Startet den Wendepunkt einmalig, sobald Tyrveil den manipulierten
|
||||
## Abschnitt erreicht.
|
||||
## Startet den Wendepunkt einmalig, sobald Tyrveil den Sammel-Absatz vor
|
||||
## Ascent 5 erreicht.
|
||||
func _on_intervention_entered(body: Node3D) -> void:
|
||||
if not body.is_in_group("player"):
|
||||
return
|
||||
|
|
@ -99,7 +414,8 @@ func _on_intervention_entered(body: Node3D) -> void:
|
|||
|
||||
|
||||
## Spielt den kompletten Wendepunkt als Coroutine: Intervention, Einsturz,
|
||||
## Sterbeszene mit den Wahrheiten, Trauer-Entscheidung.
|
||||
## Sterbeszene mit den Wahrheiten, Trauer-Entscheidung; danach ist der
|
||||
## Lauf freies Training.
|
||||
func _run_climax(player: CharacterBody3D) -> void:
|
||||
StorySystem.advance_gauntlet_beat("maren_intervention")
|
||||
_maren.global_position = MAREN_ARRIVAL_POSITION
|
||||
|
|
@ -128,6 +444,11 @@ func _run_climax(player: CharacterBody3D) -> void:
|
|||
})
|
||||
await DialogueSystem.dialogue_finished
|
||||
StorySystem.advance_gauntlet_beat("gauntlet_completed")
|
||||
_timer.stop_run()
|
||||
_mode.manipulated = false
|
||||
_mode.set_mode(_mode.Mode.TRAINING)
|
||||
_rivals.stop()
|
||||
_checkpoint_position = Vector3(GRAVEL_CENTERS[3].x, GRAVEL_CENTERS[3].y + 0.35, GRAVEL_CENTERS[3].z)
|
||||
|
||||
|
||||
## Legt Marens Mesh in Liegeposition; der Root bleibt aufrecht, damit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue