gemwarrior 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,92 +1,95 @@
1
- # lib/gemwarrior/repl.rb
2
- # My own, simple, Read Evaluate Print Loop module
3
-
4
- require 'readline'
5
- require 'os'
6
-
7
- require_relative 'constants'
8
- require_relative 'version'
9
- require_relative 'evaluator'
10
-
11
- module Gemwarrior
12
- class Repl
13
- private
14
-
15
- def clear_screen
16
- if OS.windows?
17
- system('cls')
18
- else
19
- system('clear')
20
- end
21
- end
22
-
23
- def print_splash_message
24
- 0.upto(SPLASH_MESSAGE.length-1) do print "=" end
25
- print "\n"
26
- puts SPLASH_MESSAGE
27
- 0.upto(SPLASH_MESSAGE.length-1) do print "=" end
28
- print "\n"
29
- end
30
-
31
- def print_fortune
32
- noun1_vals = ["abutments", "bains", "crocuses", "chapes", "civility", "fingering", "gabardines", "nooks", "scalawags", "squiggles"]
33
- noun2_vals = ["asterisms", "deniers", "diastoles", "extremities", "payments", "specters", "splats", "thalamuses", "wallets", "xylophones"]
34
- noun3_vals = ["blebs", "blowholes", "dancers", "dinges", "dualism", "ebullitions", "gullets", "knops", "phaetons", "snickers"]
35
-
36
- puts "* Remember: #{noun1_vals[rand(0..9)]} and #{noun2_vals[rand(0..9)]} are the key to #{noun3_vals[rand(0..9)]} *\n\n"
37
- end
38
-
39
- def setup_screen(initialCommand = nil)
40
- # welcome player to game
41
- clear_screen
42
- print_splash_message
43
- print_fortune
44
-
45
- # hook to do something right off the bat
46
- puts @eval.evaluate(initialCommand) unless initialCommand.nil?
47
- end
48
-
49
- def prompt
50
- prompt_template = "\n[LV:%3s][XP:%3s][HP:%3s|%-3s][STM:%2s|%-2s] -- [%s @ %s]"
51
- prompt_vars_arr = [
52
- @world.player.level,
53
- @world.player.xp,
54
- @world.player.hp_cur,
55
- @world.player.hp_max,
56
- @world.player.stam_cur,
57
- @world.player.stam_max,
58
- @world.player.name,
59
- @world.player.cur_loc.name
60
- ]
61
- puts (prompt_template % prompt_vars_arr)
62
- end
63
-
64
- def read_line
65
- Readline.readline(' GW> ', true).to_s
66
- end
67
-
68
- public
69
-
70
- def initialize(world, evaluator)
71
- @world = world
72
- @eval = evaluator
73
- end
74
-
75
- def start(initialCommand = nil)
76
- setup_screen(initialCommand)
77
-
78
- # main loop
79
- loop do
80
- prompt
81
- begin
82
- input = read_line
83
- puts @eval.evaluate(input)
84
- rescue Interrupt
85
- puts
86
- puts QUIT_MESSAGE
87
- exit(0)
88
- end
89
- end
90
- end
91
- end
92
- end
1
+ # lib/gemwarrior/repl.rb
2
+ # My own, simple, Read Evaluate Print Loop module
3
+
4
+ require 'readline'
5
+ require 'os'
6
+
7
+ require_relative 'version'
8
+ require_relative 'evaluator'
9
+
10
+ module Gemwarrior
11
+ class Repl
12
+ # CONSTANTS
13
+ ## MESSAGES
14
+ SPLASH_MESSAGE = 'Welcome to Gem Warrior, where randomized fortune is just as likely as mayhem.'
15
+
16
+ attr_accessor :world, :eval
17
+
18
+ def initialize(world, evaluator)
19
+ self.world = world
20
+ self.eval = evaluator
21
+ end
22
+
23
+ def start(initialCommand = nil)
24
+ setup_screen(initialCommand)
25
+
26
+ # main loop
27
+ loop do
28
+ prompt
29
+ begin
30
+ input = read_line
31
+ puts eval.evaluate(input)
32
+ rescue Interrupt
33
+ puts
34
+ puts QUIT_MESSAGE
35
+ exit(0)
36
+ end
37
+ end
38
+ end
39
+
40
+ private
41
+
42
+ def clear_screen
43
+ if OS.windows?
44
+ system('cls')
45
+ else
46
+ system('clear')
47
+ end
48
+ end
49
+
50
+ def print_splash_message
51
+ 0.upto(SPLASH_MESSAGE.length-1) do print "=" end
52
+ print "\n"
53
+ puts SPLASH_MESSAGE
54
+ 0.upto(SPLASH_MESSAGE.length-1) do print "=" end
55
+ print "\n"
56
+ end
57
+
58
+ def print_fortune
59
+ noun1_vals = ["abutments", "bains", "crocuses", "chapes", "civility", "fingering", "gabardines", "nooks", "scalawags", "squiggles"]
60
+ noun2_vals = ["asterisms", "deniers", "diastoles", "extremities", "payments", "specters", "splats", "thalamuses", "wallets", "xylophones"]
61
+ noun3_vals = ["blebs", "blowholes", "dancers", "dinges", "dualism", "ebullitions", "gullets", "knops", "phaetons", "snickers"]
62
+
63
+ puts "* Remember: #{noun1_vals[rand(0..9)]} and #{noun2_vals[rand(0..9)]} are the key to #{noun3_vals[rand(0..9)]} *\n\n"
64
+ end
65
+
66
+ def setup_screen(initialCommand = nil)
67
+ # welcome player to game
68
+ clear_screen
69
+ print_splash_message
70
+ print_fortune
71
+
72
+ # hook to do something right off the bat
73
+ puts eval.evaluate(initialCommand) unless initialCommand.nil?
74
+ end
75
+
76
+ def prompt
77
+ prompt_template = "\n[LV:%3s][XP:%3s][HP:%3s|%-3s][STM:%2s|%-2s] -- [%s @ %s]"
78
+ prompt_vars_arr = [
79
+ world.player.level,
80
+ world.player.xp,
81
+ world.player.hp_cur,
82
+ world.player.hp_max,
83
+ world.player.stam_cur,
84
+ world.player.stam_max,
85
+ world.player.name,
86
+ world.player.cur_loc.name
87
+ ]
88
+ puts (prompt_template % prompt_vars_arr)
89
+ end
90
+
91
+ def read_line
92
+ Readline.readline(' GW> ', true).to_s
93
+ end
94
+ end
95
+ end
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = "0.3.1"
5
+ VERSION = "0.3.2"
6
6
  end
@@ -1,269 +1,328 @@
1
- # lib/gemwarrior/world.rb
2
- # World where the locations, monsters, items, etc. exist
3
-
4
- require_relative 'constants'
5
- require_relative 'monster'
6
- require_relative 'item'
7
- require_relative 'location'
8
-
9
- module Gemwarrior
10
- class World
11
- private
12
-
13
- include Entities::Monsters
14
- include Entities::Items
15
- include Entities::Locations
16
-
17
- def init_monsters
18
- @monsters = []
19
- @monsters.push(Monster.new(
20
- MOB_ID_ALEXANDRAT,
21
- MOB_NAME_ALEXANDRAT,
22
- MOB_DESC_ALEXANDRAT,
23
- 'ugly',
24
- 'gnarled',
25
- 'unsurprisingly unchipper',
26
- MOB_LEVEL_ALEXANDRAT
27
- )
28
- )
29
- @monsters.push(Monster.new(
30
- MOB_ID_AMBEROO,
31
- MOB_NAME_AMBEROO,
32
- MOB_DESC_AMBEROO,
33
- 'punchy',
34
- 'balled',
35
- 'jumpy',
36
- MOB_LEVEL_AMBEROO
37
- )
38
- )
39
- @monsters.push(Monster.new(
40
- MOB_ID_AMETHYSTLE,
41
- MOB_NAME_AMETHYSTLE,
42
- MOB_DESC_AMETHYSTLE,
43
- 'sharp',
44
- 'loose',
45
- 'mesmerizing',
46
- MOB_LEVEL_AMETHYSTLE
47
- )
48
- )
49
- @monsters.push(Monster.new(
50
- MOB_ID_AQUAMARINE,
51
- MOB_NAME_AQUAMARINE,
52
- MOB_DESC_AQUAMARINE,
53
- 'strained',
54
- 'hairy',
55
- 'tempered',
56
- MOB_LEVEL_AQUAMARINE
57
- )
58
- )
59
- @monsters.push(Monster.new(
60
- MOB_ID_APATIGER,
61
- MOB_NAME_APATIGER,
62
- MOB_DESC_APATIGER,
63
- 'calloused',
64
- 'soft',
65
- 'apathetic',
66
- MOB_LEVEL_APATIGER
67
- )
68
- )
69
- @monsters.push(Monster.new(
70
- MOB_ID_BLOODSTORM,
71
- MOB_NAME_BLOODSTORM,
72
- MOB_DESC_BLOODSTORM,
73
- 'bloody',
74
- 'bloody',
75
- 'boiling',
76
- MOB_LEVEL_BLOODSTORM
77
- )
78
- )
79
- @monsters.push(Monster.new(
80
- MOB_ID_CITRINAGA,
81
- MOB_NAME_CITRINAGA,
82
- MOB_DESC_CITRINAGA,
83
- 'shiny',
84
- 'glistening',
85
- 'staid',
86
- MOB_LEVEL_CITRINAGA
87
- )
88
- )
89
- @monsters.push(Monster.new(
90
- MOB_ID_CORALIZ,
91
- MOB_NAME_CORALIZ,
92
- MOB_DESC_CORALIZ,
93
- 'spotted',
94
- 'slippery',
95
- 'emotionless',
96
- MOB_LEVEL_CORALIZ
97
- )
98
- )
99
- @monsters.push(Monster.new(
100
- MOB_ID_CUBICAT,
101
- MOB_NAME_CUBICAT,
102
- MOB_DESC_CUBICAT,
103
- 'striking',
104
- 'grippy',
105
- 'salacious',
106
- MOB_LEVEL_CUBICAT
107
- )
108
- )
109
- @monsters.push(Monster.new(
110
- MOB_ID_DIAMAN,
111
- MOB_NAME_DIAMAN,
112
- MOB_DESC_DIAMAN,
113
- 'bright',
114
- 'jagged',
115
- 'adamant',
116
- MOB_LEVEL_DIAMAN
117
- )
118
- )
119
- end
120
-
121
- def init_items
122
- @items = []
123
- @items.push(Item.new(
124
- ITEM_ID_STONE,
125
- ITEM_NAME_STONE,
126
- ITEM_DESC_STONE,
127
- true
128
- )
129
- )
130
- @items.push(Item.new(
131
- ITEM_ID_BED,
132
- ITEM_NAME_BED,
133
- ITEM_DESC_BED,
134
- false
135
- )
136
- )
137
- @items.push(Item.new(
138
- ITEM_ID_STALACTITE,
139
- ITEM_NAME_STALACTITE,
140
- ITEM_DESC_STALACTITE,
141
- true
142
- )
143
- )
144
- @items.push(Item.new(
145
- ITEM_ID_FEATHER,
146
- ITEM_NAME_FEATHER,
147
- ITEM_DESC_FEATHER,
148
- true
149
- )
150
- )
151
- @items.push(Item.new(
152
- ITEM_ID_GUN,
153
- ITEM_NAME_GUN,
154
- ITEM_DESC_GUN,
155
- true
156
- )
157
- )
158
- end
159
-
160
- def init_locations
161
- @locations = []
162
- @locations.push(Location.new(
163
- LOC_ID_HOME,
164
- LOC_NAME_HOME,
165
- LOC_DESC_HOME,
166
- LOC_CONNECTIONS_HOME,
167
- :none,
168
- [item_by_id(0), item_by_id(1)],
169
- @monsters
170
- )
171
- )
172
- @locations.push(Location.new(
173
- LOC_ID_CAVE_ENTRANCE,
174
- LOC_NAME_CAVE_ENTRANCE,
175
- LOC_DESC_CAVE_ENTRANCE,
176
- LOC_CONNECTIONS_CAVE_ENTRANCE,
177
- :low,
178
- [],
179
- @monsters
180
- )
181
- )
182
- @locations.push(Location.new(
183
- LOC_ID_CAVE_ROOM1,
184
- LOC_NAME_CAVE_ROOM1,
185
- LOC_DESC_CAVE_ROOM1,
186
- LOC_CONNECTIONS_CAVE_ROOM1,
187
- :moderate,
188
- [item_by_id(2)],
189
- @monsters
190
- )
191
- )
192
- @locations.push(Location.new(
193
- LOC_ID_FOREST,
194
- LOC_NAME_FOREST,
195
- LOC_DESC_FOREST,
196
- LOC_CONNECTIONS_FOREST,
197
- :low,
198
- [item_by_id(3)],
199
- @monsters
200
- )
201
- )
202
- @locations.push(Location.new(
203
- LOC_ID_SKYTOWER,
204
- LOC_NAME_SKYTOWER,
205
- LOC_DESC_SKYTOWER,
206
- LOC_CONNECTIONS_SKYTOWER,
207
- :high,
208
- [item_by_id(4)],
209
- @monsters
210
- )
211
- )
212
- end
213
-
214
- public
215
-
216
- attr_reader :locations
217
- attr_accessor :player
218
-
219
- def initialize
220
- @monsters = init_monsters
221
- @items = init_items
222
- @locations = init_locations
223
- @player = nil
224
- end
225
-
226
- def item_by_id(id)
227
- @items.each do |item|
228
- if item.id.to_i.equal? id
229
- return item
230
- end
231
- end
232
- return nil
233
- end
234
-
235
- def list_locations
236
- world_locations = []
237
- @locations.each do |loc|
238
- world_locations.push(loc.name)
239
- end
240
- return"The world consists of #{world_locations.join(', ')}"
241
- end
242
-
243
- def loc_by_id(id)
244
- @locations.each do |loc|
245
- if loc.id.to_i.equal? id
246
- return loc
247
- end
248
- end
249
- return nil
250
- end
251
-
252
- def list_monsters
253
- world_monsters = []
254
- @monsters.each do |mob|
255
- world_monsters.push(mob.name)
256
- end
257
- return "The world's monsters consist of #{world_monsters.join(', ')}"
258
- end
259
-
260
- def mob_by_id(id)
261
- @monsters.each do |mob|
262
- if mob.id.to_i.equal? id
263
- return mob
264
- end
265
- end
266
- return nil
267
- end
268
- end
269
- end
1
+ # lib/gemwarrior/world.rb
2
+ # World where the locations, monsters, items, etc. exist
3
+
4
+ require_relative 'defaults'
5
+ require_relative 'monster'
6
+ require_relative 'item'
7
+ require_relative 'location'
8
+
9
+ module Gemwarrior
10
+ class World
11
+ # CONSTANTS
12
+ ## DEFAULTS
13
+ include Entities::Monsters
14
+ include Entities::Items
15
+ include Entities::Locations
16
+
17
+ ## ERRORS
18
+ ERROR_LIST_PARAM_INVALID = 'That isn\'t something that can be listed.'
19
+
20
+ attr_accessor :monsters, :items, :locations, :player
21
+
22
+ def initialize
23
+ self.monsters = init_monsters
24
+ self.items = init_items
25
+ self.locations = init_locations
26
+ self.player = nil
27
+ end
28
+
29
+ def list(param)
30
+ case param
31
+ when "monsters"
32
+ return "The world's monsters consist of #{@monsters.map(&:name).join(', ')}"
33
+ when "items"
34
+ return "The world's items consist of #{@items.map(&:name).join(', ')}"
35
+ when "locations"
36
+ return "The world consists of #{@locations.map(&:name).join(', ')}"
37
+ else
38
+ ERROR_LIST_PARAM_INVALID
39
+ end
40
+ end
41
+
42
+ def mob_by_id(id)
43
+ monsters.each do |mob|
44
+ if mob.id.to_i.equal? id
45
+ return mob
46
+ end
47
+ end
48
+ return nil
49
+ end
50
+
51
+ def item_by_id(id)
52
+ items.each do |item|
53
+ if item.id.to_i.equal? id
54
+ return item
55
+ end
56
+ end
57
+ return nil
58
+ end
59
+
60
+ def loc_by_id(id)
61
+ locations.each do |loc|
62
+ if loc.id.to_i.equal? id
63
+ return loc
64
+ end
65
+ end
66
+ return nil
67
+ end
68
+
69
+ private
70
+
71
+ def init_monsters
72
+ monsters = []
73
+ monsters.push(Monster.new(
74
+ MOB_ID_ALEXANDRAT,
75
+ MOB_NAME_ALEXANDRAT,
76
+ MOB_DESC_ALEXANDRAT,
77
+ 'ugly',
78
+ 'gnarled',
79
+ 'unsurprisingly unchipper',
80
+ MOB_LEVEL_ALEXANDRAT,
81
+ MOB_LEVEL_ALEXANDRAT * 5,
82
+ MOB_LEVEL_ALEXANDRAT * 5,
83
+ MOB_LEVEL_ALEXANDRAT * 2,
84
+ MOB_LEVEL_ALEXANDRAT * 2,
85
+ Inventory.new,
86
+ rand(0..10)
87
+ )
88
+ )
89
+ monsters.push(Monster.new(
90
+ MOB_ID_AMBEROO,
91
+ MOB_NAME_AMBEROO,
92
+ MOB_DESC_AMBEROO,
93
+ 'punchy',
94
+ 'balled',
95
+ 'jumpy',
96
+ MOB_LEVEL_AMBEROO,
97
+ MOB_LEVEL_AMBEROO * 5,
98
+ MOB_LEVEL_AMBEROO * 5,
99
+ MOB_LEVEL_AMBEROO * 2,
100
+ MOB_LEVEL_AMBEROO * 2,
101
+ Inventory.new,
102
+ rand(0..10)
103
+ )
104
+ )
105
+ monsters.push(Monster.new(
106
+ MOB_ID_AMETHYSTLE,
107
+ MOB_NAME_AMETHYSTLE,
108
+ MOB_DESC_AMETHYSTLE,
109
+ 'sharp',
110
+ 'loose',
111
+ 'mesmerizing',
112
+ MOB_LEVEL_AMETHYSTLE,
113
+ MOB_LEVEL_AMETHYSTLE * 5,
114
+ MOB_LEVEL_AMETHYSTLE * 5,
115
+ MOB_LEVEL_AMETHYSTLE * 2,
116
+ MOB_LEVEL_AMETHYSTLE * 2,
117
+ Inventory.new,
118
+ rand(0..10)
119
+ )
120
+ )
121
+ monsters.push(Monster.new(
122
+ MOB_ID_AQUAMARINE,
123
+ MOB_NAME_AQUAMARINE,
124
+ MOB_DESC_AQUAMARINE,
125
+ 'strained',
126
+ 'hairy',
127
+ 'tempered',
128
+ MOB_LEVEL_AQUAMARINE,
129
+ MOB_LEVEL_AQUAMARINE * 5,
130
+ MOB_LEVEL_AQUAMARINE * 5,
131
+ MOB_LEVEL_AQUAMARINE * 2,
132
+ MOB_LEVEL_AQUAMARINE * 2,
133
+ Inventory.new,
134
+ rand(0..10)
135
+ )
136
+ )
137
+ monsters.push(Monster.new(
138
+ MOB_ID_APATIGER,
139
+ MOB_NAME_APATIGER,
140
+ MOB_DESC_APATIGER,
141
+ 'calloused',
142
+ 'soft',
143
+ 'apathetic',
144
+ MOB_LEVEL_APATIGER,
145
+ MOB_LEVEL_APATIGER * 5,
146
+ MOB_LEVEL_APATIGER * 5,
147
+ MOB_LEVEL_APATIGER * 2,
148
+ MOB_LEVEL_APATIGER * 2,
149
+ Inventory.new,
150
+ rand(0..10)
151
+ )
152
+ )
153
+ monsters.push(Monster.new(
154
+ MOB_ID_BLOODSTORM,
155
+ MOB_NAME_BLOODSTORM,
156
+ MOB_DESC_BLOODSTORM,
157
+ 'bloody',
158
+ 'bloody',
159
+ 'boiling',
160
+ MOB_LEVEL_BLOODSTORM,
161
+ MOB_LEVEL_BLOODSTORM * 5,
162
+ MOB_LEVEL_BLOODSTORM * 5,
163
+ MOB_LEVEL_BLOODSTORM * 2,
164
+ MOB_LEVEL_BLOODSTORM * 2,
165
+ Inventory.new,
166
+ rand(0..10)
167
+ )
168
+ )
169
+ monsters.push(Monster.new(
170
+ MOB_ID_CITRINAGA,
171
+ MOB_NAME_CITRINAGA,
172
+ MOB_DESC_CITRINAGA,
173
+ 'shiny',
174
+ 'glistening',
175
+ 'staid',
176
+ MOB_LEVEL_CITRINAGA,
177
+ MOB_LEVEL_CITRINAGA * 5,
178
+ MOB_LEVEL_CITRINAGA * 5,
179
+ MOB_LEVEL_CITRINAGA * 2,
180
+ MOB_LEVEL_CITRINAGA * 2,
181
+ Inventory.new,
182
+ rand(0..10)
183
+ )
184
+ )
185
+ monsters.push(Monster.new(
186
+ MOB_ID_CORALIZ,
187
+ MOB_NAME_CORALIZ,
188
+ MOB_DESC_CORALIZ,
189
+ 'spotted',
190
+ 'slippery',
191
+ 'emotionless',
192
+ MOB_LEVEL_CORALIZ,
193
+ MOB_LEVEL_CORALIZ * 5,
194
+ MOB_LEVEL_CORALIZ * 5,
195
+ MOB_LEVEL_CORALIZ * 2,
196
+ MOB_LEVEL_CORALIZ * 2,
197
+ Inventory.new,
198
+ rand(0..10)
199
+ )
200
+ )
201
+ monsters.push(Monster.new(
202
+ MOB_ID_CUBICAT,
203
+ MOB_NAME_CUBICAT,
204
+ MOB_DESC_CUBICAT,
205
+ 'striking',
206
+ 'grippy',
207
+ 'salacious',
208
+ MOB_LEVEL_CUBICAT,
209
+ MOB_LEVEL_CUBICAT * 5,
210
+ MOB_LEVEL_CUBICAT * 5,
211
+ MOB_LEVEL_CUBICAT * 2,
212
+ MOB_LEVEL_CUBICAT * 2,
213
+ Inventory.new,
214
+ rand(0..10)
215
+ )
216
+ )
217
+ monsters.push(Monster.new(
218
+ MOB_ID_DIAMAN,
219
+ MOB_NAME_DIAMAN,
220
+ MOB_DESC_DIAMAN,
221
+ 'bright',
222
+ 'jagged',
223
+ 'adamant',
224
+ MOB_LEVEL_DIAMAN,
225
+ MOB_LEVEL_DIAMAN * 5,
226
+ MOB_LEVEL_DIAMAN * 5,
227
+ MOB_LEVEL_DIAMAN * 2,
228
+ MOB_LEVEL_DIAMAN * 2,
229
+ Inventory.new,
230
+ rand(0..10)
231
+ )
232
+ )
233
+ end
234
+
235
+ def init_items
236
+ items = []
237
+ items.push(Item.new(
238
+ ITEM_ID_STONE,
239
+ ITEM_NAME_STONE,
240
+ ITEM_DESC_STONE,
241
+ true
242
+ )
243
+ )
244
+ items.push(Item.new(
245
+ ITEM_ID_BED,
246
+ ITEM_NAME_BED,
247
+ ITEM_DESC_BED,
248
+ false
249
+ )
250
+ )
251
+ items.push(Item.new(
252
+ ITEM_ID_STALACTITE,
253
+ ITEM_NAME_STALACTITE,
254
+ ITEM_DESC_STALACTITE,
255
+ true
256
+ )
257
+ )
258
+ items.push(Item.new(
259
+ ITEM_ID_FEATHER,
260
+ ITEM_NAME_FEATHER,
261
+ ITEM_DESC_FEATHER,
262
+ true
263
+ )
264
+ )
265
+ items.push(Item.new(
266
+ ITEM_ID_GUN,
267
+ ITEM_NAME_GUN,
268
+ ITEM_DESC_GUN,
269
+ true
270
+ )
271
+ )
272
+ end
273
+
274
+ def init_locations
275
+ locations = []
276
+ locations.push(Location.new(
277
+ LOC_ID_HOME,
278
+ LOC_NAME_HOME,
279
+ LOC_DESC_HOME,
280
+ LOC_CONNECTIONS_HOME,
281
+ :none,
282
+ [item_by_id(0), item_by_id(1)],
283
+ monsters
284
+ )
285
+ )
286
+ locations.push(Location.new(
287
+ LOC_ID_CAVE_ENTRANCE,
288
+ LOC_NAME_CAVE_ENTRANCE,
289
+ LOC_DESC_CAVE_ENTRANCE,
290
+ LOC_CONNECTIONS_CAVE_ENTRANCE,
291
+ :low,
292
+ [],
293
+ monsters
294
+ )
295
+ )
296
+ locations.push(Location.new(
297
+ LOC_ID_CAVE_ROOM1,
298
+ LOC_NAME_CAVE_ROOM1,
299
+ LOC_DESC_CAVE_ROOM1,
300
+ LOC_CONNECTIONS_CAVE_ROOM1,
301
+ :moderate,
302
+ [item_by_id(2)],
303
+ monsters
304
+ )
305
+ )
306
+ locations.push(Location.new(
307
+ LOC_ID_FOREST,
308
+ LOC_NAME_FOREST,
309
+ LOC_DESC_FOREST,
310
+ LOC_CONNECTIONS_FOREST,
311
+ :low,
312
+ [item_by_id(3)],
313
+ monsters
314
+ )
315
+ )
316
+ locations.push(Location.new(
317
+ LOC_ID_SKYTOWER,
318
+ LOC_NAME_SKYTOWER,
319
+ LOC_DESC_SKYTOWER,
320
+ LOC_CONNECTIONS_SKYTOWER,
321
+ :assured,
322
+ [item_by_id(4)],
323
+ monsters
324
+ )
325
+ )
326
+ end
327
+ end
328
+ end