gemwarrior 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gemwarrior/battle.rb +14 -2
- data/lib/gemwarrior/entities/location.rb +21 -13
- data/lib/gemwarrior/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e09f2cc3d7ed944459541f17544b4c7c64b2ec9a
|
4
|
+
data.tar.gz: 4e427d4e05555bd40be5843f5df7912cffcc4e1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ad699b34f26384773a8609b97a889854b70af93ce8b5bf3f623f542cbbe28ff736c20b4282e924dcd857c7e0742772a12ab66b3f21ac90d88ece433aaa2c49d
|
7
|
+
data.tar.gz: 13dbc66199d1acdf633939cf60d2c9adc9e23ebd31a634b8d95f6f041ed13f942e9143c67c2e616d64c944d71304ee240ca428d55fb0beda315671b46ff325d2
|
data/lib/gemwarrior/battle.rb
CHANGED
@@ -59,7 +59,7 @@ module Gemwarrior
|
|
59
59
|
puts ' The Shifty Woman\'s perplexing speech now over, she disappears.'
|
60
60
|
world.shifty_has_jeweled = true
|
61
61
|
end
|
62
|
-
elsif monster_strikes_first?(
|
62
|
+
elsif monster_strikes_first?(is_arena, is_event)
|
63
63
|
puts " #{monster.name} strikes first!".colorize(:yellow)
|
64
64
|
monster_attacks_player
|
65
65
|
end
|
@@ -374,7 +374,6 @@ module Gemwarrior
|
|
374
374
|
puts
|
375
375
|
puts ' Monster Roll for Attack:'.colorize(:red)
|
376
376
|
puts " ATTEMPT_RANGE: #{attempt_success_lo}..#{attempt_success_hi}"
|
377
|
-
puts " ATTEMPT_ROLL : #{attempt}"
|
378
377
|
puts " MUST_BEAT : #{success_min}"
|
379
378
|
if attempt > success_min
|
380
379
|
puts " ATTEMPT_ROLL : #{attempt.to_s.colorize(:green)}"
|
@@ -447,10 +446,23 @@ module Gemwarrior
|
|
447
446
|
elsif player.special_abilities.include?(:stone_face)
|
448
447
|
return false
|
449
448
|
elsif (monster.dexterity > player.dexterity)
|
449
|
+
if GameOptions.data['debug_mode']
|
450
|
+
puts
|
451
|
+
puts " MONSTER_DEX: #{monster.dexterity}, PLAYER_DEX: #{player.dexterity}"
|
452
|
+
end
|
453
|
+
|
450
454
|
return true
|
451
455
|
else
|
452
456
|
dex_diff = player.dexterity - monster.dexterity
|
453
457
|
rand_dex = rand(0..dex_diff)
|
458
|
+
|
459
|
+
if GameOptions.data['debug_mode']
|
460
|
+
puts
|
461
|
+
puts " DEX_DIFF : #{dex_diff}"
|
462
|
+
puts " RAND_DEX : #{rand_dex}"
|
463
|
+
puts " RAND_DEX % 2: #{rand_dex % 2}"
|
464
|
+
end
|
465
|
+
|
454
466
|
if rand_dex % 2 > 0
|
455
467
|
return true
|
456
468
|
else
|
@@ -195,26 +195,19 @@ module Gemwarrior
|
|
195
195
|
end
|
196
196
|
|
197
197
|
def populate_monsters(monsters_available = nil, spawn = false, monster_type = nil)
|
198
|
-
|
199
|
-
|
200
|
-
self.monsters_abounding = [] unless spawn
|
198
|
+
# debug spawn
|
199
|
+
if spawn
|
201
200
|
random_monster = nil
|
202
201
|
|
202
|
+
# debug spawn random monster
|
203
203
|
if monster_type.nil?
|
204
|
-
# get random non-boss monster
|
205
204
|
loop do
|
206
205
|
random_monster = monsters_available[rand(0..monsters_available.length-1)].clone
|
207
206
|
|
208
|
-
|
209
|
-
|
210
|
-
else
|
211
|
-
unless random_monster.is_boss || !self.monster_level_range.include?(random_monster.level)
|
212
|
-
break
|
213
|
-
end
|
214
|
-
end
|
207
|
+
monsters_abounding.push(random_monster)
|
208
|
+
break
|
215
209
|
end
|
216
|
-
|
217
|
-
monsters_abounding.push(random_monster)
|
210
|
+
# debug spawn w/ monster_type
|
218
211
|
else
|
219
212
|
monster_type_to_spawn = monsters_available.find { |m| m.name.downcase == monster_type.downcase }
|
220
213
|
if monster_type_to_spawn.nil?
|
@@ -224,6 +217,21 @@ module Gemwarrior
|
|
224
217
|
monsters_abounding.push(monster_type_to_spawn)
|
225
218
|
end
|
226
219
|
end
|
220
|
+
# normal location spawn
|
221
|
+
elsif should_spawn_monster?
|
222
|
+
self.checked_for_monsters = true
|
223
|
+
self.monsters_abounding = []
|
224
|
+
random_monster = nil
|
225
|
+
|
226
|
+
# get random non-boss monster
|
227
|
+
loop do
|
228
|
+
random_monster = monsters_available[rand(0..monsters_available.length-1)].clone
|
229
|
+
|
230
|
+
if !random_monster.is_boss && self.monster_level_range.include?(random_monster.level)
|
231
|
+
monsters_abounding.push(random_monster)
|
232
|
+
break
|
233
|
+
end
|
234
|
+
end
|
227
235
|
else
|
228
236
|
return nil
|
229
237
|
end
|
data/lib/gemwarrior/version.rb
CHANGED