gemwarrior 0.14.7 → 0.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 355463631c092fa850eb8cb355aec722181cc0e6
         | 
| 4 | 
            +
              data.tar.gz: 9a9b11452f91d22161501042856539e54401a71e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 69e8b6df32dd804eaf914cb564ff241dc07fa0a5106891f5c12678f95fac190ad9b3be64932a808e9dc614a9008606b0231c78eecf4b78d502f6915607e52af1
         | 
| 7 | 
            +
              data.tar.gz: 7b3f8272981305f36b9762050f5fc6ca742d8e7cff122c4e041d7b3e4ba214851a029e4aff3beb129ec8a9b56139374a5f71480088e9e2bc16d9cf71b9b585d3
         | 
    
        data/lib/gemwarrior/battle.rb
    CHANGED
    
    | @@ -29,7 +29,7 @@ module Gemwarrior | |
| 29 29 | 
             
                  self.player_is_defending  = false
         | 
| 30 30 | 
             
                end
         | 
| 31 31 |  | 
| 32 | 
            -
                def start(is_arena = 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  | 
| 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,  | 
| 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 && ! | 
| 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  | 
| 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')
         | 
    
        data/lib/gemwarrior/evaluator.rb
    CHANGED
    
    | @@ -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)
         | 
    
        data/lib/gemwarrior/version.rb
    CHANGED