You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ZORK/World.cpp
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,8 @@ World::World() {
23
23
Room* mazeE = newRoom("Maze Entrance", "You enter a dark and narrow corridor excavated in the underground that splits into three. \n"
24
24
"As you get to the crossroad, the doorway from where you came collapses. You are trapped!");
25
25
rooms.push_back(mazeE);
26
-
Room* bones = newRoom("Bone Room", "You follow the corridor to a room with an extinguished firecamp in a corner,\nand human bones scattered all around the floor.");
26
+
Room* bones = newRoom("Bone Room", "You follow the corridor to a room with an extinguished firecamp in a corner,\nand human bones scattered all around the floor.\n"
27
+
"There is a rotting corpse in a corner");
27
28
rooms.push_back(bones);
28
29
Room* maze1 = newRoom("Maze1", "You are in a small room that splits the corridor in two directions.");
29
30
rooms.push_back(maze1);
@@ -68,17 +69,21 @@ World::World() {
68
69
exits.push_back(exME);
69
70
70
71
// PLAYER
71
-
player = newPlayer("Hero", "You are an awesome adventurer!", maze1);
72
+
player = newPlayer("Hero", "You are an awesome adventurer!", forest);
72
73
73
74
// CREATURES
74
75
Creature* butler = newCreature("Butler", "It's James, the house Butler.", house);
75
76
butler->SetStats(15, 0, 3, 0);
76
77
creatures.push_back(butler);
77
78
78
79
Creature* troll = newCreature("Troll", "It's an enormous Troll! You see he is wearing a shiny amulet on his neck.", maze1);
79
-
butler->SetStats(5, 0, 3, 0);
80
+
troll->SetStats(40, 0, 7, 3);
80
81
creatures.push_back(troll);
81
82
83
+
Creature* corpse = newCreature("Soldier", "It's the rotting body of someone, possibly a soldier or an adventurer like you.\nOne leg has been... bitten? by something big.", bones);
84
+
corpse->SetStats(0, 0, 3, 0);
85
+
creatures.push_back(corpse);
86
+
82
87
// ITEMS
83
88
Item* mailbox = newItem("Mailbox", "Looks like it might contain something.", house);
84
89
mailbox->isContainer = true;
@@ -102,6 +107,10 @@ World::World() {
102
107
//exME->key = amulet;
103
108
items.push_back(amulet);
104
109
110
+
Item* potion = newItem("Potion", "A magical beverage to recover vitality.", corpse, HP_POTION);
0 commit comments