aboutsummaryrefslogtreecommitdiff
path: root/src/esieequest/model/Game.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/esieequest/model/Game.java')
-rw-r--r--src/esieequest/model/Game.java46
1 files changed, 39 insertions, 7 deletions
diff --git a/src/esieequest/model/Game.java b/src/esieequest/model/Game.java
index 6e6b191..0ff4b92 100644
--- a/src/esieequest/model/Game.java
+++ b/src/esieequest/model/Game.java
@@ -5,7 +5,9 @@ import java.util.HashMap;
5import esieequest.model.entities.Player; 5import esieequest.model.entities.Player;
6import esieequest.model.items.Beamer; 6import esieequest.model.items.Beamer;
7import esieequest.model.items.Item; 7import esieequest.model.items.Item;
8import esieequest.model.items.KeyCard;
8import esieequest.model.map.Door; 9import esieequest.model.map.Door;
10import esieequest.model.map.LockedDoor;
9import esieequest.model.map.Room; 11import esieequest.model.map.Room;
10import esieequest.model.map.TrapDoor; 12import esieequest.model.map.TrapDoor;
11 13
@@ -88,12 +90,22 @@ public class Game {
88 this.createRoom("WingCorridorTwoOffice", "in front of the office #3254"); 90 this.createRoom("WingCorridorTwoOffice", "in front of the office #3254");
89 this.createRoom("WingOffice", "in the office #3254"); 91 this.createRoom("WingOffice", "in the office #3254");
90 92
93 // off-script rooms
91 this.createRoom("OffscriptItems", "somewhere implementing weight"); 94 this.createRoom("OffscriptItems", "somewhere implementing weight");
92 this.createRoom("OffscriptItemsStorageroom", "in a storage room"); 95 this.createRoom("OffscriptItemsStorageroom", "in a storage room");
96
93 this.createRoom("OffscriptTeleportation", "somewhere implementing teleportation"); 97 this.createRoom("OffscriptTeleportation", "somewhere implementing teleportation");
94 this.createRoom("OffscriptTeleportationBeamerroom", "on a checkpoint"); 98 this.createRoom("OffscriptTeleportationBeamerroom", "on a checkpoint");
99
100 this.createRoom("OffscriptTrap", "somewhere implementing a trap");
101 this.createRoom("OffscriptTrapDeadend", "in a dead end");
102
103 this.createRoom("OffscriptLock", "somewhere implementing a lock");
104 this.createRoom("OffscriptLockLockedroom", "in a locked room");
105
95 this.createRoom("OffscriptAlea", "somewhere implementing alea"); 106 this.createRoom("OffscriptAlea", "somewhere implementing alea");
96 this.createRoom("OffscriptAleaRandomizingroom", "in a weird room that will transport you somewhere else"); 107 this.createRoom("OffscriptAleaRandomizingroom", "in a weird room that will transport you somewhere else");
108
97 this.createRoom("OffscriptMovingcharacter", "somewhere implementing a moving character"); 109 this.createRoom("OffscriptMovingcharacter", "somewhere implementing a moving character");
98 this.createRoom("OffscriptMovingcharacterSumobotroom", "in the Chirac-101's room"); 110 this.createRoom("OffscriptMovingcharacterSumobotroom", "in the Chirac-101's room");
99 } 111 }
@@ -167,15 +179,28 @@ public class Game {
167 this.setRoomExit("WingCorridorTwoOffice", "east", "WingOffice"); 179 this.setRoomExit("WingCorridorTwoOffice", "east", "WingOffice");
168 this.setRoomExit("WingOffice", "west", "WingCorridorTwoOffice"); 180 this.setRoomExit("WingOffice", "west", "WingCorridorTwoOffice");
169 181
170 this.rooms.get("WingCorridorOne").addExit("east", new TrapDoor(this.rooms.get("OffscriptItems"))); 182 this.rooms.get("WingCorridorOne").addExit("east", new Door(this.rooms.get("OffscriptItems")));
183 // this.rooms.get("WingCorridorOne").addExit("east", new
184 // TrapDoor(this.rooms.get("OffscriptItems")));
171 185
172 this.setRoomExit("OffscriptItems", "north", "OffscriptItemsStorageroom"); 186 this.setRoomExit("OffscriptItems", "north", "OffscriptItemsStorageroom");
173 this.setRoomExit("OffscriptItems", "east", "OffscriptTeleportation"); 187 this.setRoomExit("OffscriptItems", "east", "OffscriptTeleportation");
174 this.setRoomExit("OffscriptItemsStorageroom", "south", "OffscriptItems"); 188 this.setRoomExit("OffscriptItemsStorageroom", "south", "OffscriptItems");
175 this.setRoomExit("OffscriptTeleportation", "north", "OffscriptTeleportationBeamerroom"); 189 this.setRoomExit("OffscriptTeleportation", "north", "OffscriptTeleportationBeamerroom");
176 this.setRoomExit("OffscriptTeleportation", "west", "OffscriptItems"); 190 this.setRoomExit("OffscriptTeleportation", "west", "OffscriptItems");
177 this.setRoomExit("OffscriptTeleportation", "east", "OffscriptAlea"); 191 this.setRoomExit("OffscriptTeleportation", "east", "OffscriptTrap");
178 this.setRoomExit("OffscriptTeleportationBeamerroom", "south", "OffscriptTeleportation"); 192 this.setRoomExit("OffscriptTeleportationBeamerroom", "south", "OffscriptTeleportation");
193 // this.setRoomExit("OffscriptTrap", "north", "OffscriptTrapDeadend");
194 this.rooms.get("OffscriptTrap").addExit("north", new TrapDoor(this.rooms.get("OffscriptTrapDeadend")));
195 this.setRoomExit("OffscriptTrap", "west", "OffscriptTeleportation");
196 this.setRoomExit("OffscriptTrap", "east", "OffscriptLock");
197 // this.setRoomExit("OffscriptTrapDeadend", "south", "OffscriptTrap");
198 // this.setRoomExit("OffscriptLock", "north", "OffscriptLockedroom");
199 this.rooms.get("OffscriptLock").addExit("north", new LockedDoor(this.rooms.get("OffscriptLockLockedroom")));
200 this.setRoomExit("OffscriptLock", "west", "OffscriptTrap");
201 this.setRoomExit("OffscriptLock", "east", "OffscriptAlea");
202 // this.setRoomExit("OffscriptLockedroom", "south", "OffscriptLock");
203 this.rooms.get("OffscriptLockLockedroom").addExit("south", new LockedDoor(this.rooms.get("OffscriptLock")));
179 this.setRoomExit("OffscriptAlea", "north", "OffscriptAleaRandomizingroom"); 204 this.setRoomExit("OffscriptAlea", "north", "OffscriptAleaRandomizingroom");
180 this.setRoomExit("OffscriptAlea", "west", "OffscriptTeleportation"); 205 this.setRoomExit("OffscriptAlea", "west", "OffscriptTeleportation");
181 this.setRoomExit("OffscriptAlea", "east", "OffscriptMovingcharacter"); 206 this.setRoomExit("OffscriptAlea", "east", "OffscriptMovingcharacter");
@@ -189,11 +214,18 @@ public class Game {
189 * Creates and adds items into rooms. 214 * Creates and adds items into rooms.
190 */ 215 */
191 private void createItems() { 216 private void createItems() {
192 this.rooms.get("OffscriptItemsStorageroom").getItems().putItem("Weighted Storage Cube", new Item("A Weighted Storage Cube.", 5)); 217 this.rooms.get("OffscriptItemsStorageroom").getItems().putItem("Weighted Storage Cube", new Item("A Weighted Storage Cube.", 5, true));
193 this.rooms.get("OffscriptItemsStorageroom").getItems().putItem("Edgeless Safety Cube", new Item("An Edgeless Safety Cube.", 5)); 218 this.rooms.get("OffscriptItemsStorageroom").getItems().putItem("Edgeless Safety Cube", new Item("An Edgeless Safety Cube.", 5, true));
194 this.rooms.get("OffscriptItemsStorageroom").getItems().putItem("Portable Black-hole", new Item("A portable black-hole that has a negative mass.", -10)); 219 this.rooms.get("OffscriptItemsStorageroom").getItems().putItem("Portable Black-hole", new Item("A portable black-hole that has a negative mass.", -10, true));
195 220
196 this.rooms.get("OffscriptTeleportationBeamerroom").getItems().putItem("Portable Quantum Tunelling Device", new Beamer("Basically a teleporter.", 2)); 221 this.rooms.get("OffscriptTeleportationBeamerroom").getItems().putItem("Portable Quantum Tunelling Device", new Beamer("Basically a teleporter."));
222
223 final KeyCard keyCard = new KeyCard("A KeyCard that opens a locked door.");
224 final LockedDoor lockedDoorLock = (LockedDoor) this.rooms.get("OffscriptLock").getExit("north");
225 lockedDoorLock.setKey(keyCard);
226 final LockedDoor lockedDoorLockedRoom = (LockedDoor) this.rooms.get("OffscriptLockLockedroom").getExit("south");
227 lockedDoorLockedRoom.setKey(keyCard);
228 this.rooms.get("OffscriptLock").getItems().putItem("KeyCard", keyCard);
197 } 229 }
198 230
199 /** 231 /**