gemwarrior 0.14.1 → 0.14.2

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: 026011f50b16aeb1f2b14d5913ec550b60262b86
4
- data.tar.gz: 8dcab9d44b89645167dbb6498c42b11eeb8c1c9d
3
+ metadata.gz: 394227cb2d554cdfb1b8a9fed4b0e79c5092c64a
4
+ data.tar.gz: 117d01d2e13f1c828a25b8c7aa6b72369ca40ee7
5
5
  SHA512:
6
- metadata.gz: d9577d1d1588d9d105ada320bef891023f133686a184fc5fb8a6cbb99bcdd9612d0e82271bfcba20d1f03da31ef5702792ecf78c42a97cd85604e77358f6c2a3
7
- data.tar.gz: 4940d07abbef3a8b26ae6ec6bfb75f71694ddd1bbf05e79dde831d2460a32dabcccbbd018761afa756c87b5320169149f01cbb4df80579815be9eb82fdd18145
6
+ metadata.gz: 7d801c21baf8498d3d4e3584486c9bc2be719f0fef7f2664a74f91437527fcb3c679ccf56b2418febcffb13d646945a93f2c890675ddc001a39006c20c17514c
7
+ data.tar.gz: 7d0d04ff3d32f19ad0aa00d175e86f16e9182a6d7e57c67e54e34ca23f7d275d67f7abb59abc5b3b95a1a93837402192416d7a5dc8c8d4fc460280d1baf28bfc
@@ -27,6 +27,9 @@ module Gemwarrior
27
27
  ERROR_DIRECTION_PARAM_INVALID = 'You cannot go to that place.'
28
28
  ERROR_ATTACK_PARAM_MISSING = 'You cannot just "attack". You gotta choose something to attack.'
29
29
  ERROR_ATTACK_PARAM_INVALID = 'That monster does not exist here or can\'t be attacked.'
30
+ ERROR_BREAKTHRU_PARAM_MISSING = 'You cannot just "breakthru". You gotta specify a location name.'
31
+ ERROR_BREAKTHRU_PARAM_INVALID = 'You cannot breakthru to that place.'
32
+ ERROR_BREAKTHRU_INEXPERIENCED = 'You are not experienced enough to perform that feat.'
30
33
  ERROR_TAKE_PARAM_MISSING = 'You cannot just "take". You gotta choose something to take.'
31
34
  ERROR_USE_PARAM_MISSING = 'You cannot just "use". You gotta choose something to use.'
32
35
  ERROR_USE_PARAM_INVALID = 'You cannot use that, as it does not exist here or in your inventory.'
@@ -77,8 +80,8 @@ module Gemwarrior
77
80
  'Rest, but ensure battle for testing'
78
81
  ]
79
82
 
80
- self.commands = %w(character look rest take talk inventory use drop equip unequip go north east south west attack change version checkupdate help quit quit!)
81
- self.aliases = %w(c l r t tk i u d eq ue g n e s w a ch v cu h q qq)
83
+ self.commands = %w(character look rest take talk inventory use drop equip unequip go north east south west attack breakthru change version checkupdate help quit quit!)
84
+ self.aliases = %w(c l r t tk i u d eq ue g n e s w a br ch v cu h q qq)
82
85
  self.extras = %w(exit exit! x xx fight f ? ?? ???)
83
86
  self.cmd_descriptions = [
84
87
  'Display character information',
@@ -97,6 +100,7 @@ module Gemwarrior
97
100
  'Go south (shortcut)',
98
101
  'Go west (shortcut)',
99
102
  'Attack a monster (also fight)',
103
+ 'Teleport to a location (if you are experienced enough)',
100
104
  'Change attribute',
101
105
  'Display game version',
102
106
  'Check for newer game releases',
@@ -665,6 +669,32 @@ module Gemwarrior
665
669
  ERROR_ATTACK_PARAM_INVALID
666
670
  end
667
671
  end
672
+ when 'breakthru', 'br'
673
+ if world.player.special_abilities.include?(:breakthru)
674
+ if param1.nil?
675
+ return ERROR_BREAKTHRU_PARAM_MISSING
676
+ else
677
+ place_to_match = tokens[1..tokens.length].join(' ').downcase
678
+ locations = []
679
+ world.locations.each do |l|
680
+ locations << l.name.downcase
681
+ end
682
+ if locations.include?(place_to_match)
683
+ world.player.cur_coords = world.location_coords_by_name(place_to_match)
684
+ else
685
+ return ERROR_BREAKTHRU_PARAM_INVALID
686
+ end
687
+ end
688
+
689
+ # stats
690
+ world.player.movements_made += 1
691
+
692
+ Animation.run(phrase: '** BREAK THROUGH! **')
693
+ player_cur_location = world.location_by_coords(world.player.cur_coords)
694
+ return world.describe(player_cur_location)
695
+ else
696
+ ERROR_BREAKTHRU_INEXPERIENCED
697
+ end
668
698
  when 'change', 'ch'
669
699
  if param1.nil?
670
700
  puts ERROR_CHANGE_PARAM_MISSING
@@ -59,7 +59,7 @@ module Gemwarrior
59
59
  hp_max: 100, stam_max: 80,
60
60
  atk_lo: 10, atk_hi: 12,
61
61
  defense: 13, dexterity: 14,
62
- special_abilities: :break_through
62
+ special_abilities: :breakthru
63
63
  }
64
64
  else
65
65
  {
@@ -104,7 +104,8 @@ module Gemwarrior
104
104
  'Chance to be much more accurate in your attacks.'
105
105
  when :stone_face # LV6
106
106
  'Chance to auto-win in battle against any non-boss monster (does not work in arena or if ambushed).'
107
- #when :break_through
107
+ when :breakthru
108
+ 'Teleport to any location, given that you can remember its name.'
108
109
  else
109
110
  'Unsure, but it\'s probably cool!'
110
111
  end
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.14.1'
5
+ VERSION = '0.14.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.14.1
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick