fix frost spike a bit more

This commit is contained in:
2026-01-25 21:48:09 +01:00
parent def35dd64b
commit 913e5c4418
3 changed files with 14 additions and 6 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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