gemwarrior 0.10.6 → 0.10.7

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: 4a63dbf4d7fa1730e5bb7504020b668e54cb0a95
4
- data.tar.gz: 4ed06ecc25c511622ef4730e7bbc5d9b2c2d1dcb
3
+ metadata.gz: c311f05d4c6938a47b6d445678c5d097c569b3c3
4
+ data.tar.gz: 46052a56af92e3ad73e0e964756d75dcafad5ad8
5
5
  SHA512:
6
- metadata.gz: fa9c14bded730f4ae0f9693094e8893bb7f5f133be99422e90baabe10da96c92f04461d47a4f94e21e2af4557b08261db405c5f064c6c89f5ecd9654b42d53fe
7
- data.tar.gz: d75e3ab4f36c04a6946ee6104858f91a7f6d303e92380f193d39741230fe26d02e0a226a9dfd25735db19b85b4fbadd723d0e025f0aab206197471cd1cc86977
6
+ metadata.gz: 5dffa3a34da0a0ad1b871169b8d89b9a35070db0d70625f1221eaa0b3ef31334e9609a6e500b1a8590342c0d10250b20314f3c324200383a7322af8840435c90
7
+ data.tar.gz: 9723c86b4a47b72c76a2517451ffee3ba2fd88effc09e452547eb06546976009d390d1e21903c53d79f6b0da8826d58c5aec53b0cf62b4afe547433ec38e1b36
data/bin/gemwarrior CHANGED
@@ -27,7 +27,7 @@ def parse_options_cli
27
27
  new_skip: false,
28
28
  resume_skip: false,
29
29
  sound_enabled: false,
30
- sound_system: nil,
30
+ sound_system: 'feep',
31
31
  sound_volume: 0.3,
32
32
  use_wordnik: false,
33
33
  extra_command: nil
@@ -1777,7 +1777,7 @@ locations:
1777
1777
  checked_for_monsters: false
1778
1778
  - !ruby/object:Gemwarrior::Location
1779
1779
  name: Spinelia (Southeast)
1780
- description: The southeast of Spinelia contains a bunch of people, just kind of
1780
+ description: The southeast of Spinelia contains a few people, just kind of
1781
1781
  hanging out.
1782
1782
  coords:
1783
1783
  :x: 8
@@ -1790,7 +1790,38 @@ locations:
1790
1790
  :west: true
1791
1791
  danger_level: :none
1792
1792
  monster_level_range:
1793
- items: []
1793
+ items:
1794
+ - !ruby/object:Gemwarrior::ThinMan
1795
+ equipped: false
1796
+ consumable: false
1797
+ used: false
1798
+ number_of_uses:
1799
+ talkable: true
1800
+ name: thin_man
1801
+ description: An almost shockingly gaunt man is sitting on the ground, resting against a wall. He
1802
+ wears a patchwork quilt of a hat, and his slender frame is covered by a simple brown tunic. His feet
1803
+ point comically toward the sky in brown boots while his head dips down slightly, eyes watching
1804
+ something in the distance you can't see.
1805
+ atk_lo:
1806
+ atk_hi:
1807
+ takeable: false
1808
+ useable: true
1809
+ equippable: false
1810
+ - !ruby/object:Gemwarrior::DrunkMan
1811
+ equipped: false
1812
+ consumable: false
1813
+ used: false
1814
+ number_of_uses:
1815
+ talkable: true
1816
+ name: drunk_man
1817
+ description: Some supernatural force is surely keeping this obviously smashed individual from
1818
+ toppling over to the ground. The inebriated fellow somehow continues to stumble about in a small
1819
+ circle near a smattering of shipping crates, looking simultaneously dazed and cheerful.
1820
+ atk_lo:
1821
+ atk_hi:
1822
+ takeable: false
1823
+ useable: true
1824
+ equippable: false
1794
1825
  monsters_abounding: []
1795
1826
  bosses_abounding: []
1796
1827
  checked_for_monsters: false
@@ -1809,13 +1840,52 @@ locations:
1809
1840
  :west: true
1810
1841
  danger_level: :none
1811
1842
  monster_level_range:
1812
- items: []
1843
+ items:
1844
+ - !ruby/object:Gemwarrior::Pig
1845
+ equipped: false
1846
+ consumable: false
1847
+ used: false
1848
+ number_of_uses:
1849
+ talkable: true
1850
+ name: pig
1851
+ description: Dirty, eating slop, but still kind of cute. Yep, this is a pig.
1852
+ atk_lo:
1853
+ atk_hi:
1854
+ takeable: false
1855
+ useable: true
1856
+ equippable: false
1857
+ - !ruby/object:Gemwarrior::Cow
1858
+ equipped: false
1859
+ consumable: false
1860
+ used: false
1861
+ number_of_uses:
1862
+ talkable: true
1863
+ name: cow
1864
+ description: Grazing on some fake grass, unperturbed, this black and white herd animal looks bored.
1865
+ atk_lo:
1866
+ atk_hi:
1867
+ takeable: false
1868
+ useable: true
1869
+ equippable: false
1870
+ - !ruby/object:Gemwarrior::Goat
1871
+ equipped: false
1872
+ consumable: false
1873
+ used: false
1874
+ number_of_uses:
1875
+ talkable: true
1876
+ name: goat
1877
+ description: The scruff is strong with this one as it chews through what appears to be a recent mystery novel most likely thrown into the pen by a passerby.
1878
+ atk_lo:
1879
+ atk_hi:
1880
+ takeable: false
1881
+ useable: true
1882
+ equippable: false
1813
1883
  monsters_abounding: []
1814
1884
  bosses_abounding: []
1815
1885
  checked_for_monsters: false
1816
1886
  - !ruby/object:Gemwarrior::Location
1817
1887
  name: Spinelia (Northwest)
1818
- description: Residences line the northwest corner of Spinela, each one similar to
1888
+ description: Residences line the northwest corner of Spinelia, each one similar to
1819
1889
  each other, made of granite and stone, featuring a single window and a single
1820
1890
  door. One particular house's hallmark appears to be a rather fanciful woman leaning
1821
1891
  on its facade, looking shifty.
@@ -1830,7 +1900,22 @@ locations:
1830
1900
  :west: false
1831
1901
  danger_level: :none
1832
1902
  monster_level_range:
1833
- items: []
1903
+ items:
1904
+ - !ruby/object:Gemwarrior::ShiftyWoman
1905
+ equipped: false
1906
+ consumable: false
1907
+ used: false
1908
+ number_of_uses:
1909
+ talkable: true
1910
+ name: shifty_woman
1911
+ description: Sharply dressed with impeccable style, you still can't shake the feeling that this
1912
+ otherwise ordinary woman is up to something. It might be the way she almost impulsively looks
1913
+ back and forth along the town street while rubbing her hands together menacingly.
1914
+ atk_lo:
1915
+ atk_hi:
1916
+ takeable: false
1917
+ useable: true
1918
+ equippable: false
1834
1919
  monsters_abounding: []
1835
1920
  bosses_abounding: []
1836
1921
  checked_for_monsters: false
@@ -26,6 +26,7 @@ module Gemwarrior
26
26
  status_text << "ATTACK: #{atk_lo}-#{atk_hi} \n".colorize(:white) unless atk_lo.nil?
27
27
  status_text << "TAKEABLE? #{takeable}\n".colorize(:white)
28
28
  status_text << "USEABLE? #{useable}\n".colorize(:white)
29
+ status_text << "USED? #{used}\n".colorize(:white)
29
30
  status_text << "EQUIPPABLE? #{equippable}\n".colorize(:white)
30
31
  status_text << "CONSUMABLE? #{consumable}\n".colorize(:white)
31
32
  status_text << "NUMBER OF USES? #{number_of_uses}\n".colorize(:white) unless number_of_uses.nil?
@@ -0,0 +1,26 @@
1
+ # lib/gemwarrior/entities/items/cow.rb
2
+ # Item::Cow
3
+
4
+ require_relative '../item'
5
+
6
+ module Gemwarrior
7
+ class Cow < Item
8
+ def initialize
9
+ super
10
+
11
+ self.name = 'cow'
12
+ self.description = 'Grazing on some fake grass, unperturbed, this black and white herd animal looks bored.'
13
+ self.atk_lo = nil
14
+ self.atk_hi = nil
15
+ self.takeable = true
16
+ self.useable = true
17
+ self.equippable = false
18
+ self.talkable = true
19
+ end
20
+
21
+ def use(player = nil)
22
+ puts '>> "Moo."'
23
+ { type: nil, data: nil }
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,71 @@
1
+ # lib/gemwarrior/entities/items/drunk_man.rb
2
+ # Item::DrunkMan
3
+
4
+ require_relative '../item'
5
+ require_relative '../../misc/formatting'
6
+
7
+ module Gemwarrior
8
+ class DrunkMan < Item
9
+ include Formatting
10
+
11
+ def initialize
12
+ super
13
+
14
+ self.name = 'drunk_man'
15
+ self.description = 'Some supernatural force is surely keeping this obviously smashed individual from toppling over to the ground. The inebriated fellow somehow continues to stumble about in a small circle near a smattering of shipping crates, looking simultaneously dazed and cheerful.'
16
+ self.atk_lo = nil
17
+ self.atk_hi = nil
18
+ self.takeable = false
19
+ self.useable = true
20
+ self.equippable = false
21
+ self.talkable = true
22
+ end
23
+
24
+ def use(player = nil)
25
+ choose_blurting
26
+
27
+ self.used = [true, false].sample
28
+
29
+ { type: nil, data: nil }
30
+ end
31
+
32
+ def choose_blurting
33
+ choice = [1, 2, 3, 4].sample
34
+
35
+ case choice
36
+ when 1
37
+ print '>> "'
38
+ print to_hooch('I still can\'t believe I lost at the Arena! I was doing so well, and then a slippery citrinaga got a cheap shot on me.')
39
+ print '"'
40
+ print "\n"
41
+ print '>> "'
42
+ print to_hooch('Ehhh. Someday I\'ll be back and I\'ll be victorious. That smarmy Arena Master ain\'t gettin\' the last word!')
43
+ print '"'
44
+ print "\n"
45
+ when 2
46
+ print '>> "'
47
+ print to_hooch('Maybe I just needed a better weapon that last fight in the arena. Yeah! That must be it.')
48
+ print '"'
49
+ print "\n"
50
+ when 3
51
+ print '>> "'
52
+ print to_hooch('Man, my head really hurts. I\'m not sure if it\'s because of the fighting or the booze.')
53
+ print '"'
54
+ print "\n"
55
+ print '>> "'
56
+ print to_hooch('I should probably get something else to drink.')
57
+ print '"'
58
+ print "\n\n"
59
+ puts 'The man looks like he has thought of something genius for a moment, but then scratches his head while stumbling around in his well-worn circle again.'
60
+ when 4
61
+ print '>> "'
62
+ print to_hooch('Ahhhhhhhhhhhhhhhhhhhh!')
63
+ print '"'
64
+ print "\n\n"
65
+ puts 'He begins to quickly become frantic as he notices you approaching, and then falls over, crumpled to the floor.'
66
+ puts
67
+ puts 'You approach to check if he\'s still breathing. As you get closer, he gets back up, hardly noticing you, and begins his spiral once again.'
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,26 @@
1
+ # lib/gemwarrior/entities/items/goat.rb
2
+ # Item::Goat
3
+
4
+ require_relative '../item'
5
+
6
+ module Gemwarrior
7
+ class Goat < Item
8
+ def initialize
9
+ super
10
+
11
+ self.name = 'goat'
12
+ self.description = 'The scruff is strong with this one as it chews through what appears to be a recent mystery novel most likely thrown into the pen by a passerby.'
13
+ self.atk_lo = nil
14
+ self.atk_hi = nil
15
+ self.takeable = true
16
+ self.useable = true
17
+ self.equippable = false
18
+ self.talkable = true
19
+ end
20
+
21
+ def use(player = nil)
22
+ puts '>> "Baa."'
23
+ { type: nil, data: nil }
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # lib/gemwarrior/entities/items/pig.rb
2
+ # Item::Pig
3
+
4
+ require_relative '../item'
5
+
6
+ module Gemwarrior
7
+ class Pig < Item
8
+ def initialize
9
+ super
10
+
11
+ self.name = 'pig'
12
+ self.description = 'Dirty, eating slop, but still kind of cute. Yep, this is a pig.'
13
+ self.atk_lo = nil
14
+ self.atk_hi = nil
15
+ self.takeable = true
16
+ self.useable = true
17
+ self.equippable = false
18
+ self.talkable = true
19
+ end
20
+
21
+ def use(player = nil)
22
+ puts '>> "Oink."'
23
+ { type: nil, data: nil }
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,35 @@
1
+ # lib/gemwarrior/entities/items/shifty_woman.rb
2
+ # Item::ShiftyWoman
3
+
4
+ require_relative '../item'
5
+
6
+ module Gemwarrior
7
+ class ShiftyWoman < Item
8
+ def initialize
9
+ super
10
+
11
+ self.name = 'shifty_woman'
12
+ self.description = 'Sharply dressed with impeccable style, you still can\'t shake the feeling that this otherwise ordinary woman is up to something. It might be the way she almost impulsively looks back and forth along the town street while rubbing her hands together menacingly.'
13
+ self.atk_lo = nil
14
+ self.atk_hi = nil
15
+ self.takeable = true
16
+ self.useable = true
17
+ self.equippable = false
18
+ self.talkable = true
19
+ end
20
+
21
+ def use(player = nil)
22
+ if self.used
23
+ puts 'Attempting a friendly overture again, the woman turns and looks directly at you. Her brown eyes glint in the sun, almost turning an ochre hue. Her look burns you to the core, causing you to physically recoil a little.'
24
+ puts
25
+ puts 'You step back a few paces and quickly look elsewhere.'
26
+ else
27
+ puts 'The woman averts her eyes from you as you commence with a greeting, giving a little scowl while she is at it.'
28
+
29
+ self.used = true
30
+ end
31
+
32
+ { type: nil, data: nil }
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,35 @@
1
+ # lib/gemwarrior/entities/items/thin_man.rb
2
+ # Item::ThinMan
3
+
4
+ require_relative '../item'
5
+
6
+ module Gemwarrior
7
+ class ThinMan < Item
8
+ def initialize
9
+ super
10
+
11
+ self.name = 'thin_man'
12
+ self.description = 'An almost shockingly gaunt man is sitting on the ground, resting against a wall. He wears a patchwork quilt of a hat, and his slender frame is covered by a simple brown tunic. His feet point comically toward the sky in brown boots while his head dips down slightly, eyes watching something in the distance you can\'t see.'
13
+ self.atk_lo = nil
14
+ self.atk_hi = nil
15
+ self.takeable = false
16
+ self.useable = true
17
+ self.equippable = false
18
+ self.talkable = true
19
+ end
20
+
21
+ def use(player = nil)
22
+ if self.used
23
+ puts 'The thin man barely moves his head as he puts up a single grim hand, motioning you to back off.'
24
+ else
25
+ puts 'The thin man lifts his head up slightly, meets your gaze, and responds to your greeting:'
26
+ puts '>> "I may be incredibly spare right now, but I was once a strapping young person, such as yourself. Just in case you ever fall during your journey, be sure to approach unlikely sources, as you may find those who will help you."'
27
+ puts '>> "Now, please, allow me my peace."'
28
+
29
+ self.used = true
30
+ end
31
+
32
+ { type: nil, data: nil }
33
+ end
34
+ end
35
+ end
@@ -2,8 +2,8 @@
2
2
  # Item::WareHawker
3
3
 
4
4
  require_relative '../item'
5
- require_relative 'herb'
6
- require_relative 'dagger'
5
+ require_relative 'mace'
6
+ require_relative 'spear'
7
7
 
8
8
  module Gemwarrior
9
9
  class WareHawker < Item
@@ -6,25 +6,41 @@ module Gemwarrior
6
6
  def self.upstyle(str_arr)
7
7
  if str_arr.is_a? Array
8
8
  str_arr_upstyled = []
9
-
9
+
10
10
  str_arr.each do |str_arr_item|
11
11
  str_arr_item_upstyled = []
12
12
 
13
13
  str_arr_item.split(' ').each do |s|
14
14
  str_arr_item_upstyled << upstyle_string(s)
15
15
  end
16
-
16
+
17
17
  str_arr_upstyled << str_arr_item_upstyled.join(' ')
18
18
  end
19
-
19
+
20
20
  return str_arr_upstyled
21
21
  else
22
22
  return upstyle_string(str_arr)
23
23
  end
24
24
  end
25
-
25
+
26
+ def to_hooch(s)
27
+ words = s.split(' ')
28
+ words_hooched = []
29
+
30
+ words.each do |w|
31
+ if rand(0..100) > 60 and w.length > 1
32
+ w = w.split('')
33
+ w = w.insert(rand(0..w.length-1), '*HIC*')
34
+ w = w.join('')
35
+ end
36
+ words_hooched << w
37
+ end
38
+
39
+ return words_hooched.join(' ')
40
+ end
41
+
26
42
  private
27
-
43
+
28
44
  def self.upstyle_string(s)
29
45
  s_upstyle = ''
30
46
  s_upstyle << s[0].upcase
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.10.6'
5
+ VERSION = '0.10.7'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemwarrior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 0.10.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-17 00:00:00.000000000 Z
11
+ date: 2015-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: os
@@ -283,12 +283,15 @@ files:
283
283
  - lib/gemwarrior/entities/items/arena_master.rb
284
284
  - lib/gemwarrior/entities/items/bed.rb
285
285
  - lib/gemwarrior/entities/items/couch.rb
286
+ - lib/gemwarrior/entities/items/cow.rb
286
287
  - lib/gemwarrior/entities/items/cup.rb
287
288
  - lib/gemwarrior/entities/items/dagger.rb
288
289
  - lib/gemwarrior/entities/items/dehumidifier.rb
290
+ - lib/gemwarrior/entities/items/drunk_man.rb
289
291
  - lib/gemwarrior/entities/items/feather.rb
290
292
  - lib/gemwarrior/entities/items/floor_tile.rb
291
293
  - lib/gemwarrior/entities/items/flower.rb
294
+ - lib/gemwarrior/entities/items/goat.rb
292
295
  - lib/gemwarrior/entities/items/gun.rb
293
296
  - lib/gemwarrior/entities/items/herb.rb
294
297
  - lib/gemwarrior/entities/items/keystone.rb
@@ -299,8 +302,10 @@ files:
299
302
  - lib/gemwarrior/entities/items/massive_door.rb
300
303
  - lib/gemwarrior/entities/items/opalaser.rb
301
304
  - lib/gemwarrior/entities/items/pedestal.rb
305
+ - lib/gemwarrior/entities/items/pig.rb
302
306
  - lib/gemwarrior/entities/items/pond.rb
303
307
  - lib/gemwarrior/entities/items/rope.rb
308
+ - lib/gemwarrior/entities/items/shifty_woman.rb
304
309
  - lib/gemwarrior/entities/items/small_hole.rb
305
310
  - lib/gemwarrior/entities/items/snowman.rb
306
311
  - lib/gemwarrior/entities/items/sparklything.rb
@@ -309,6 +314,7 @@ files:
309
314
  - lib/gemwarrior/entities/items/stone.rb
310
315
  - lib/gemwarrior/entities/items/stonemite.rb
311
316
  - lib/gemwarrior/entities/items/tent.rb
317
+ - lib/gemwarrior/entities/items/thin_man.rb
312
318
  - lib/gemwarrior/entities/items/throne.rb
313
319
  - lib/gemwarrior/entities/items/tree.rb
314
320
  - lib/gemwarrior/entities/items/ware_hawker.rb
@@ -369,4 +375,6 @@ rubygems_version: 2.4.8
369
375
  signing_key:
370
376
  specification_version: 4
371
377
  summary: RubyGem text adventure
372
- test_files: []
378
+ test_files:
379
+ - spec/gemwarrior_spec.rb
380
+ - spec/spec_helper.rb