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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e27fcf7b974b83714555dab00d87663d44c56a0
4
- data.tar.gz: 2a42f4c114c78a126b4e2138ea2bbccc3e5d819f
3
+ metadata.gz: e09f2cc3d7ed944459541f17544b4c7c64b2ec9a
4
+ data.tar.gz: 4e427d4e05555bd40be5843f5df7912cffcc4e1a
5
5
  SHA512:
6
- metadata.gz: efe909d2639c0e2ad138cf51e919e5e83d6d617fec84c0db190f087780a4308ffe3716fec41c05d5d71f8a11f6ecb2c1351a1f4fecb11b61cb72c09dd3e4e3c7
7
- data.tar.gz: d7d042bdfba9e1d6ec1ac99940e13ada832df2fb4ff5de3af3291c33cbf880a1d64855a86a079cec8a5b63b4f60604691e6eb3c7bf592df1cf776360ba2ba708
6
+ metadata.gz: 0ad699b34f26384773a8609b97a889854b70af93ce8b5bf3f623f542cbbe28ff736c20b4282e924dcd857c7e0742772a12ab66b3f21ac90d88ece433aaa2c49d
7
+ data.tar.gz: 13dbc66199d1acdf633939cf60d2c9adc9e23ebd31a634b8d95f6f041ed13f942e9143c67c2e616d64c944d71304ee240ca428d55fb0beda315671b46ff325d2
@@ -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?(arena_battle: is_arena, event_battle: is_event)
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
- if should_spawn_monster? || spawn
199
- self.checked_for_monsters = true unless spawn
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
- if spawn
209
- break
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
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.13.1'
5
+ VERSION = '0.13.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemwarrior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick