diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-04 09:58:12 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-04 09:58:12 +0800 |
| commit | e96ad330d4069b524bd987cc8631141af17af70e (patch) | |
| tree | 9ec314a65e6d7fd38f94f32fd2cc51fa10d88de7 /data/roomData.lua | |
| parent | fa5bdeede08024cf57e763d030eb46611a56c965 (diff) | |
fix: enemy misplaced in same type of room encountered before
The same type of rooms used to share the same enemy list. When enemies move, their location changed and that changes all location of that enemy object in that room's enemy list.
Diffstat (limited to 'data/roomData.lua')
| -rw-r--r-- | data/roomData.lua | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/data/roomData.lua b/data/roomData.lua index e0749e7..d644edf 100644 --- a/data/roomData.lua +++ b/data/roomData.lua @@ -19,13 +19,13 @@ roomData = { width = config.defaultRoomW, height = config.defaultRoomH, enemies = { - Enemy:new("lancer", "topRight"), - Enemy:new("lancer", "topLeft"), - Enemy:new("lancer", "bottomRight"), - Enemy:new("lancer", "bottomLeft"), + {"lancer", "topRight"}, + {"lancer", "topLeft"}, + {"lancer", "bottomRight"}, + {"lancer", "bottomLeft"}, }, obstacles = { - Obstacle:new("pillar", "center") + {"pillar", "center"} }, }, combatRoom2 = { @@ -33,17 +33,17 @@ roomData = { width = config.defaultRoomW, height = config.defaultRoomH, enemies = { - Enemy:new("lancer", "leftCenter"), - Enemy:new("lancer", "rightCenter"), - Enemy:new("fairy", "center"), - Enemy:new("fairy", "center"), - Enemy:new("fairy", "center"), + {"lancer", "leftCenter"}, + {"lancer", "rightCenter"}, + {"fairy", "center"}, + {"fairy", "center"}, + {"fairy", "center"}, }, obstacles = { - Obstacle:new("pillar", "topRight"), - Obstacle:new("pillar", "bottomLeft"), - Obstacle:new("pillar", "topLeft"), - Obstacle:new("pillar", "bottomRight"), + {"pillar", "topRight"}, + {"pillar", "bottomLeft"}, + {"pillar", "topLeft"}, + {"pillar", "bottomRight"}, }, }, combatRoom3 = { @@ -51,13 +51,13 @@ roomData = { width = config.defaultRoomW, height = config.defaultRoomH, enemies = { - Enemy:new("spiger", "leftCenter"), - Enemy:new("spiger", "rightCenter"), - Enemy:new("spiger", "center"), + {"spiger", "leftCenter"}, + {"spiger", "rightCenter"}, + {"spiger", "center"}, }, obstacles = { - Obstacle:new("pillar", "topCenter"), - Obstacle:new("pillar", "bottomCenter"), + {"pillar", "topCenter"}, + {"pillar", "bottomCenter"}, }, }, library = { @@ -65,15 +65,15 @@ roomData = { width = config.defaultRoomW, height = config.defaultRoomH, enemies = { - Enemy:new("librarian", "topCenter"), - Enemy:new("librarian", "bottomCenter"), - Enemy:new("lancer", "center") + {"librarian", "topCenter"}, + {"librarian", "bottomCenter"}, + {"lancer", "center"}, }, obstacles = { - Obstacle:new("pillar", "topRight"), - Obstacle:new("pillar", "bottomLeft"), - Obstacle:new("pillar", "topLeft"), - Obstacle:new("pillar", "bottomRight"), + {"pillar", "topRight"}, + {"pillar", "bottomLeft"}, + {"pillar", "topLeft"}, + {"pillar", "bottomRight"}, }, }, bookstore = { @@ -81,13 +81,13 @@ roomData = { width = config.defaultRoomW, height = config.defaultRoomH, enemies = { - Enemy:new("librarian", "topRight"), - Enemy:new("librarian", "bottomRight"), - Enemy:new("librarian", "topLeft"), - Enemy:new("librarian", "bottomLeft"), + {"librarian", "topRight"}, + {"librarian", "bottomRight"}, + {"librarian", "topLeft"}, + {"librarian", "bottomLeft"}, }, obstacles = { - Obstacle:new("pillar", "center"), + {"pillar", "center"}, }, }, } |
