gemwarrior 0.14.7 → 0.14.8

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: 08d2a9ec1dc8918cdae9406a4f763ba1d5ec2061
4
- data.tar.gz: 29756295507196dc1b0b2df0f36a8c04eec65230
3
+ metadata.gz: 355463631c092fa850eb8cb355aec722181cc0e6
4
+ data.tar.gz: 9a9b11452f91d22161501042856539e54401a71e
5
5
  SHA512:
6
- metadata.gz: 38454c0717ce69f971ebbea780444b0c56dede944f085d911d2ffbe353afc46052cee5b54267b538eb1e912e202a5f7473e7a65e3d695bcd2e87315b5dee627d
7
- data.tar.gz: 49c8ea652e0f8676663a693741aee7056fa0b5b01cc4dd08527101050ad97d996abedf97e31203e3cdf81a7d497ad9e6e9f2d34a0bbb8a6f3dda04e9a34f8f8e
6
+ metadata.gz: 69e8b6df32dd804eaf914cb564ff241dc07fa0a5106891f5c12678f95fac190ad9b3be64932a808e9dc614a9008606b0231c78eecf4b78d502f6915607e52af1
7
+ data.tar.gz: 7b3f8272981305f36b9762050f5fc6ca742d8e7cff122c4e041d7b3e4ba214851a029e4aff3beb129ec8a9b56139374a5f71480088e9e2bc16d9cf71b9b585d3
@@ -29,7 +29,7 @@ module Gemwarrior
29
29
  self.player_is_defending = false
30
30
  end
31
31
 
32
- def start(is_arena = false, is_event = false)
32
+ def start(is_arena = false, is_ambush = false)
33
33
  # begin battle!
34
34
  Audio.play_synth(:battle_start)
35
35
  print_battle_header unless is_arena
@@ -39,7 +39,7 @@ module Gemwarrior
39
39
  print ' Your opponent is now...'
40
40
  Animation.run(phrase: "#{monster.name.upcase}", speed: :slow, oneline: true)
41
41
  print "!\n"
42
- elsif is_event
42
+ elsif is_ambush
43
43
  puts " You are ambushed by #{monster.name}!".colorize(:yellow)
44
44
  else
45
45
  puts " You decide to attack #{monster.name}!"
@@ -105,14 +105,14 @@ module Gemwarrior
105
105
  puts ' Emerald has been wounded, but he is not done with this world yet. You approach him, wits about you, ready for battle.'
106
106
  world.shifty_has_jeweled = true
107
107
  end
108
- elsif monster_strikes_first?(is_arena, is_event)
108
+ elsif monster_strikes_first?(is_arena, is_ambush)
109
109
  puts " #{monster.name} strikes first!".colorize(:yellow)
110
110
  monster_attacks_player
111
111
  end
112
112
 
113
113
  # LV6:STONE_FACE modifier (chance to auto-win)
114
114
  # Doesn't work against bosses, nor if battle is an event or in the arena
115
- if player.special_abilities.include?(:stone_face) && !monster.is_boss && !is_event && !is_arena
115
+ if player.special_abilities.include?(:stone_face) && !monster.is_boss && !is_ambush && !is_arena
116
116
  level_diff = (player.level - monster.level) * 4
117
117
  chance_range = 0..(30 + level_diff)
118
118
  roll = rand(0..100)
@@ -29,6 +29,7 @@ module Gemwarrior
29
29
  STDIN.getc
30
30
  puts 'Opening the book, you see a question on the inside cover:'
31
31
  puts '>> "What do you get when an underground excavator is named after a famous "weird" guy?"'
32
+ print '? '
32
33
  answer = gets.chomp.downcase
33
34
 
34
35
  case answer
@@ -41,7 +42,7 @@ module Gemwarrior
41
42
  puts 'After you shout out your answer to the book\'s question to no one in particular, you manage to see a clearing in the forest to the west that was presumably not there before. Huh.'
42
43
  STDIN.getc
43
44
 
44
- puts 'Before getting back to your travels, however, you notice the book\'s back cover warns: "The path westward is a difficult one and has fallen many an adventurer. Take care before venturing thataway."'
45
+ puts 'Before getting back to your travels, however, you notice the book\'s back cover warns: "The path westward is a difficult one and has "ended" many an adventurer. Take care before venturing forth."'
45
46
  else
46
47
  puts 'For some reason, you blurt out an answer to the unhearing trees, feel embarrassed, and put the book back in the bookcase.'
47
48
  end
@@ -250,12 +250,12 @@ module Gemwarrior
250
250
  self.movements_made += 1
251
251
  end
252
252
 
253
- def attack(world, monster)
253
+ def attack(world, monster, is_ambush = false)
254
254
  if monster.is_dead
255
255
  { type: 'message', data: 'That monster is now dead forever and cannot be attacked. You must have done them a good one.' }
256
256
  else
257
257
  battle = Battle.new(world: world, player: self, monster: monster)
258
- result = battle.start
258
+ result = battle.start(false, is_ambush)
259
259
  if result.eql?('death')
260
260
  return 'death'
261
261
  elsif result.eql?('exit')
@@ -656,7 +656,7 @@ module Gemwarrior
656
656
  monster_name = param1
657
657
  if world.has_monster_to_attack?(monster_name)
658
658
  monster = player_cur_location.monster_by_name(monster_name)
659
- result = world.player.attack(world, monster)
659
+ result = world.player.attack(world, monster, param2)
660
660
 
661
661
  if result.eql?('death')
662
662
  return player_death_resurrection
@@ -748,6 +748,20 @@ module Gemwarrior
748
748
  world.player.go(world, direction)
749
749
  player_cur_location = world.location_by_coords(world.player.cur_coords)
750
750
  player_cur_location.checked_for_monsters = false
751
+
752
+ if player_cur_location.name.include?('pain_quarry')
753
+ if player_cur_location.has_boss?('garynetty')
754
+ roll = rand(0..100) + world.player.dexterity
755
+ roll_display = roll < 25 ? "#{roll}".colorize(:red) : "#{roll}".colorize(:green)
756
+ puts "[Pain Quarry Garynetty Roll: #{roll_display}]" if GameOptions.data['debug_mode']
757
+ if roll < 25
758
+ self.parse("attack garynetty is_ambush")
759
+ else
760
+ puts 'You nearly got attacked by a vicious Garynetty! Be careful, your next move might not be as lucky.'.colorize(:yellow)
761
+ end
762
+ end
763
+ end
764
+
751
765
  world.describe(player_cur_location)
752
766
  else
753
767
  return ERROR_GO_PARAM_INVALID.colorize(:red)
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.14.7'
5
+ VERSION = '0.14.8'
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.14.7
4
+ version: 0.14.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick