summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-11-04 12:22:43 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-11-04 12:22:43 -0300
commit5d2f66f1e7f8a9f35456e0f6acc478d1b2ecb294 (patch)
treea147f1e5af9fdb4ccfa2dbe00430d89827314ccc
parent3ff30a242d36c894ebea2540893ad77d265c5593 (diff)
escadarias
-rw-r--r--scenes/Game.tscn2
-rw-r--r--scripts/Map/DungeonGenerator.cs11
2 files changed, 2 insertions, 11 deletions
diff --git a/scenes/Game.tscn b/scenes/Game.tscn
index d215312..4c5e53b 100644
--- a/scenes/Game.tscn
+++ b/scenes/Game.tscn
@@ -24,8 +24,6 @@ script = ExtResource("3_cpr0p")
[node name="Generator" type="Node" parent="Map"]
script = ExtResource("4_78awf")
-width = 30
-height = 20
iterations = 6
[node name="FieldOfView" type="Node" parent="Map"]
diff --git a/scripts/Map/DungeonGenerator.cs b/scripts/Map/DungeonGenerator.cs
index f7a3f4d..779675f 100644
--- a/scripts/Map/DungeonGenerator.cs
+++ b/scripts/Map/DungeonGenerator.cs
@@ -92,8 +92,6 @@ public partial class DungeonGenerator : Node
Vector2I lastRoom = new(0, 0);
- bool placedStair = false;
-
// Cria as salas com base nas divisões geradas.
foreach (MapDivision division in root.GetLeaves())
{
@@ -115,13 +113,8 @@ public partial class DungeonGenerator : Node
first = false;
player.GridPosition = room.GetCenter();
}
- else if (!placedStair && rng.RandiRange(0, 100) > 25)
- {
- lastRoom = room.GetCenter();
- placedStair = true;
- } else if (!placedStair) {
- lastRoom = room.GetCenter();
- }
+
+ lastRoom = room.GetCenter();
// Colocamos os inimigos na sala.
PlaceEntities(data, room);