From 913e5c4418c7dd13ed02db079677c0b43e4426ea Mon Sep 17 00:00:00 2001 From: Elrinth Date: Sun, 25 Jan 2026 21:48:09 +0100 Subject: [PATCH] fix frost spike a bit more --- src/scenes/game_world.tscn | 4 ++++ src/scripts/attack_spell_frostspike.gd | 6 +++++- src/scripts/game_world.gd | 10 +++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/scenes/game_world.tscn b/src/scenes/game_world.tscn index 3d37b10..80eb2dc 100644 --- a/src/scenes/game_world.tscn +++ b/src/scenes/game_world.tscn @@ -92,6 +92,9 @@ z_index = -2 material = SubResource("ShaderMaterial_pdbwf") tile_set = ExtResource("9") +[node name="TileMapLayerMiddle" type="TileMapLayer" parent="Environment" unique_id=1063124770] +tile_set = ExtResource("9") + [node name="TileMapLayerAbove" type="TileMapLayer" parent="Environment" unique_id=1234567892] modulate = Color(1, 1, 1, 0.46666667) z_index = 1 @@ -105,6 +108,7 @@ y_sort_enabled = true script = ExtResource("5") [node name="CanvasModulate" type="CanvasModulate" parent="." unique_id=948490815] +visible = false light_mask = 1048575 visibility_layer = 1048575 color = Color(0.69140625, 0.69140625, 0.69140625, 1) diff --git a/src/scripts/attack_spell_frostspike.gd b/src/scripts/attack_spell_frostspike.gd index 2c22f30..608d6cb 100644 --- a/src/scripts/attack_spell_frostspike.gd +++ b/src/scripts/attack_spell_frostspike.gd @@ -58,7 +58,11 @@ func _spawn_adjacent_after_delay() -> void: var sp = scene.instantiate() sp.setup(pos, player_owner, damage, false, 1.0, 1.0, true) par.add_child(sp) - # Third wave: center again, 2x scale, 2x damage (most damage) + # Wait for the 4 adjacent spikes to finish (0.25s), then spawn third-wave center + await get_tree().create_timer(0.25).timeout + if not is_instance_valid(self): + return + # Third wave: center again, 2x scale, 2x damage (most damage) — only after 4 finish var third = scene.instantiate() third.setup(global_position, player_owner, damage, false, 2.0, 2.0, true) par.add_child(third) diff --git a/src/scripts/game_world.gd b/src/scripts/game_world.gd index a8d5f1b..4f3bda5 100644 --- a/src/scripts/game_world.gd +++ b/src/scripts/game_world.gd @@ -2382,12 +2382,12 @@ func _update_fog_of_war(delta: float) -> void: var s = dungeon_data.stairs if s.has("x") and s.has("y") and s.has("w") and s.has("h"): exit_tile = Vector2i(s.x + s.w / 2, s.y + s.h / 2) - for dx in range(s.w): - for dy in range(s.h): - var tx := s.x + dx - var ty := s.y + dy + for dx in range(int(s.w)): + for dy in range(int(s.h)): + var tx: int = int(s.x) + dx + var ty: int = int(s.y) + dy if tx >= 0 and ty >= 0 and tx < map_size.x and ty < map_size.y: - var idx := tx + ty * map_size.x + var idx: int = tx + ty * map_size.x if idx >= 0 and idx < explored_map.size() and explored_map[idx] != 0: exit_discovered = true break