gemwarrior 0.4.1 → 0.5
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 +4 -4
- data/bin/gemwarrior +0 -0
- data/lib/gemwarrior/entities/creature.rb +13 -18
- data/lib/gemwarrior/entities/entity.rb +3 -9
- data/lib/gemwarrior/entities/item.rb +6 -13
- data/lib/gemwarrior/entities/items/bed.rb +19 -0
- data/lib/gemwarrior/entities/items/feather.rb +19 -0
- data/lib/gemwarrior/entities/items/gun.rb +19 -0
- data/lib/gemwarrior/entities/items/stalactite.rb +19 -0
- data/lib/gemwarrior/entities/items/stone.rb +19 -0
- data/lib/gemwarrior/entities/items/tree.rb +19 -0
- data/lib/gemwarrior/entities/location.rb +38 -74
- data/lib/gemwarrior/entities/monster.rb +12 -35
- data/lib/gemwarrior/entities/monsters/alexandrat.rb +30 -0
- data/lib/gemwarrior/entities/monsters/amberoo.rb +30 -0
- data/lib/gemwarrior/entities/monsters/amethystle.rb +30 -0
- data/lib/gemwarrior/entities/monsters/apatiger.rb +30 -0
- data/lib/gemwarrior/entities/monsters/aquamarine.rb +30 -0
- data/lib/gemwarrior/entities/monsters/bloodstorm.rb +30 -0
- data/lib/gemwarrior/entities/monsters/citrinaga.rb +30 -0
- data/lib/gemwarrior/entities/monsters/coraliz.rb +30 -0
- data/lib/gemwarrior/entities/monsters/cubicat.rb +30 -0
- data/lib/gemwarrior/entities/monsters/diaman.rb +30 -0
- data/lib/gemwarrior/entities/player.rb +117 -154
- data/lib/gemwarrior/evaluator.rb +31 -16
- data/lib/gemwarrior/game.rb +28 -26
- data/lib/gemwarrior/inventory.rb +14 -16
- data/lib/gemwarrior/misc/version.rb +1 -1
- data/lib/gemwarrior/misc/wordlist.rb +7 -1
- data/lib/gemwarrior/repl.rb +2 -2
- data/lib/gemwarrior/world.rb +130 -298
- metadata +20 -7
- data/lib/gemwarrior/defaults.rb +0 -137
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.
|
4
|
+
version: '0.5'
|
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-06-
|
11
|
+
date: 2015-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: os
|
@@ -158,12 +158,27 @@ files:
|
|
158
158
|
- Rakefile
|
159
159
|
- bin/gemwarrior
|
160
160
|
- gemwarrior.gemspec
|
161
|
-
- lib/gemwarrior/defaults.rb
|
162
161
|
- lib/gemwarrior/entities/creature.rb
|
163
162
|
- lib/gemwarrior/entities/entity.rb
|
164
163
|
- lib/gemwarrior/entities/item.rb
|
164
|
+
- lib/gemwarrior/entities/items/bed.rb
|
165
|
+
- lib/gemwarrior/entities/items/feather.rb
|
166
|
+
- lib/gemwarrior/entities/items/gun.rb
|
167
|
+
- lib/gemwarrior/entities/items/stalactite.rb
|
168
|
+
- lib/gemwarrior/entities/items/stone.rb
|
169
|
+
- lib/gemwarrior/entities/items/tree.rb
|
165
170
|
- lib/gemwarrior/entities/location.rb
|
166
171
|
- lib/gemwarrior/entities/monster.rb
|
172
|
+
- lib/gemwarrior/entities/monsters/alexandrat.rb
|
173
|
+
- lib/gemwarrior/entities/monsters/amberoo.rb
|
174
|
+
- lib/gemwarrior/entities/monsters/amethystle.rb
|
175
|
+
- lib/gemwarrior/entities/monsters/apatiger.rb
|
176
|
+
- lib/gemwarrior/entities/monsters/aquamarine.rb
|
177
|
+
- lib/gemwarrior/entities/monsters/bloodstorm.rb
|
178
|
+
- lib/gemwarrior/entities/monsters/citrinaga.rb
|
179
|
+
- lib/gemwarrior/entities/monsters/coraliz.rb
|
180
|
+
- lib/gemwarrior/entities/monsters/cubicat.rb
|
181
|
+
- lib/gemwarrior/entities/monsters/diaman.rb
|
167
182
|
- lib/gemwarrior/entities/player.rb
|
168
183
|
- lib/gemwarrior/evaluator.rb
|
169
184
|
- lib/gemwarrior/game.rb
|
@@ -195,10 +210,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
210
|
version: '0'
|
196
211
|
requirements: []
|
197
212
|
rubyforge_project:
|
198
|
-
rubygems_version: 2.4.
|
213
|
+
rubygems_version: 2.4.6
|
199
214
|
signing_key:
|
200
215
|
specification_version: 4
|
201
216
|
summary: RPG as RubyGem
|
202
|
-
test_files:
|
203
|
-
- spec/rubywarrior_spec.rb
|
204
|
-
- spec/spec_helper.rb
|
217
|
+
test_files: []
|
data/lib/gemwarrior/defaults.rb
DELETED
@@ -1,137 +0,0 @@
|
|
1
|
-
# lib/gemwarrior/defaults.rb
|
2
|
-
# List of default values for world entities
|
3
|
-
|
4
|
-
module Gemwarrior
|
5
|
-
module Entities
|
6
|
-
module Monsters
|
7
|
-
MOB_ID_ALEXANDRAT = 0
|
8
|
-
MOB_NAME_ALEXANDRAT = 'alexandrat'
|
9
|
-
MOB_DESC_ALEXANDRAT = 'Tiny, but fierce, color-changing rodent.'
|
10
|
-
MOB_LEVEL_ALEXANDRAT = 1
|
11
|
-
MOB_DEXTERITY_ALEXANDRAT = 4
|
12
|
-
MOB_BATTLECRY_ALEXANDRAT = 'Bitey, bitey!'
|
13
|
-
|
14
|
-
MOB_ID_AMBEROO = 1
|
15
|
-
MOB_NAME_AMBEROO = 'amberoo'
|
16
|
-
MOB_DESC_AMBEROO = 'Fossilized and jumping around like an adorably dangerous threat from the past.'
|
17
|
-
MOB_LEVEL_AMBEROO = 1
|
18
|
-
MOB_DEXTERITY_AMBEROO = 5
|
19
|
-
MOB_BATTLECRY_AMBEROO = 'I\'m hoppin\' mad!'
|
20
|
-
|
21
|
-
MOB_ID_AMETHYSTLE = 2
|
22
|
-
MOB_NAME_AMETHYSTLE = 'amethystle'
|
23
|
-
MOB_DESC_AMETHYSTLE = 'Sober and contemplative, it moves with purplish tentacles swaying in the breeze.'
|
24
|
-
MOB_LEVEL_AMETHYSTLE = 2
|
25
|
-
MOB_DEXTERITY_AMETHYSTLE = 1
|
26
|
-
MOB_BATTLECRY_AMETHYSTLE = 'You\'ve found yourself in quite the thorny issue!'
|
27
|
-
|
28
|
-
MOB_ID_AQUAMARINE = 3
|
29
|
-
MOB_NAME_AQUAMARINE = 'aquamarine'
|
30
|
-
MOB_DESC_AQUAMARINE = 'It is but one of the few, the proud, the underwater.'
|
31
|
-
MOB_LEVEL_AQUAMARINE = 3
|
32
|
-
MOB_DEXTERITY_AQUAMARINE = 6
|
33
|
-
MOB_BATTLECRY_AQUAMARINE = 'Attention! You are about to get smashed!'
|
34
|
-
|
35
|
-
MOB_ID_APATIGER = 4
|
36
|
-
MOB_NAME_APATIGER = 'apatiger'
|
37
|
-
MOB_DESC_APATIGER = 'Apathetic about most everything as it lazes around, save for eating you.'
|
38
|
-
MOB_LEVEL_APATIGER = 4
|
39
|
-
MOB_DEXTERITY_APATIGER = 5
|
40
|
-
MOB_BATTLECRY_APATIGER = 'Gggggggggrrrrrrrrrrrrrrrrooooooooooowwwwwwwwwwwwlllllllll!'
|
41
|
-
|
42
|
-
MOB_ID_BLOODSTORM = 5
|
43
|
-
MOB_NAME_BLOODSTORM = 'bloodstorm'
|
44
|
-
MOB_DESC_BLOODSTORM = 'A literal swirling, maniacal vortex of human hemoglobin.'
|
45
|
-
MOB_LEVEL_BLOODSTORM = 5
|
46
|
-
MOB_DEXTERITY_BLOODSTORM = 7
|
47
|
-
MOB_BATTLECRY_BLOODSTORM = '/swirls'
|
48
|
-
|
49
|
-
MOB_ID_CITRINAGA = 6
|
50
|
-
MOB_NAME_CITRINAGA = 'citrinaga'
|
51
|
-
MOB_DESC_CITRINAGA = 'Refreshing in its shiny, gleaming effectiveness at ending your life.'
|
52
|
-
MOB_LEVEL_CITRINAGA = 4
|
53
|
-
MOB_DEXTERITY_CITRINAGA = 3
|
54
|
-
MOB_BATTLECRY_CITRINAGA = 'Slice and dice so nice!'
|
55
|
-
|
56
|
-
MOB_ID_CORALIZ = 7
|
57
|
-
MOB_NAME_CORALIZ = 'coraliz'
|
58
|
-
MOB_DESC_CORALIZ = 'Small blue lizard that slithers around, nipping at your ankles.'
|
59
|
-
MOB_LEVEL_CORALIZ = 3
|
60
|
-
MOB_DEXTERITY_CORALIZ = 6
|
61
|
-
MOB_BATTLECRY_CORALIZ = 'Where am I? You\'ll never guess!'
|
62
|
-
|
63
|
-
MOB_ID_CUBICAT = 8
|
64
|
-
MOB_NAME_CUBICAT = 'cubicat'
|
65
|
-
MOB_DESC_CUBICAT = 'Perfectly geometrically cubed feline, fresh from its woven enclosure, claws at the ready.'
|
66
|
-
MOB_LEVEL_CUBICAT = 4
|
67
|
-
MOB_DEXTERITY_CUBICAT = 6
|
68
|
-
MOB_BATTLECRY_CUBICAT = 'I don\'t really care, as long as you die!'
|
69
|
-
|
70
|
-
MOB_ID_DIAMAN = 9
|
71
|
-
MOB_NAME_DIAMAN = 'diaman'
|
72
|
-
MOB_DESC_DIAMAN = 'Crystalline structure in the form of a man, lumbering toward you, with outstretched, edged pincers.'
|
73
|
-
MOB_LEVEL_DIAMAN = 6
|
74
|
-
MOB_DEXTERITY_DIAMAN = 10
|
75
|
-
MOB_BATTLECRY_DIAMAN = 'Precious human, prepare to be lost to the annals of time!'
|
76
|
-
end
|
77
|
-
|
78
|
-
module Items
|
79
|
-
ITEM_ID_STONE = 0
|
80
|
-
ITEM_NAME_STONE = 'stone'
|
81
|
-
ITEM_DESC_STONE = 'A small, sharp mega pebble, suitable for tossing in amusement, and perhaps combat.'
|
82
|
-
ITEM_ATK_LO_STONE = 1
|
83
|
-
ITEM_ATK_HI_STONE = 3
|
84
|
-
|
85
|
-
ITEM_ID_BED = 1
|
86
|
-
ITEM_NAME_BED = 'bed'
|
87
|
-
ITEM_DESC_BED = 'The place where you sleep when you\'re not adventuring.'
|
88
|
-
ITEM_ATK_LO_BED = nil
|
89
|
-
ITEM_ATK_HI_BED = nil
|
90
|
-
|
91
|
-
ITEM_ID_STALACTITE = 2
|
92
|
-
ITEM_NAME_STALACTITE = 'stalactite'
|
93
|
-
ITEM_DESC_STALACTITE = 'Long protrusion of cave adornment, broken off and fallen to the ground, where the stalagmites sneer at it from.'
|
94
|
-
ITEM_ATK_LO_STALACTITE = 1
|
95
|
-
ITEM_ATK_HI_STALACTITE = 3
|
96
|
-
|
97
|
-
ITEM_ID_FEATHER = 3
|
98
|
-
ITEM_NAME_FEATHER = 'feather'
|
99
|
-
ITEM_DESC_FEATHER = 'Soft and tender, unlike the craven bird that probably shed it.'
|
100
|
-
ITEM_ATK_LO_FEATHER = nil
|
101
|
-
ITEM_ATK_HI_FEATHER = nil
|
102
|
-
|
103
|
-
ITEM_ID_GUN = 4
|
104
|
-
ITEM_NAME_GUN = 'gun'
|
105
|
-
ITEM_DESC_GUN = 'Pew pew goes this firearm, you suspect.'
|
106
|
-
ITEM_ATK_LO_GUN = 3
|
107
|
-
ITEM_ATK_HI_GUN = 5
|
108
|
-
end
|
109
|
-
|
110
|
-
module Locations
|
111
|
-
LOC_ID_HOME = 0
|
112
|
-
LOC_NAME_HOME = 'Home'
|
113
|
-
LOC_DESC_HOME = 'The little, unimportant, decrepit hut that you live in.'
|
114
|
-
LOC_CONNECTIONS_HOME = {:north => 4, :east => 1, :south => nil, :west => 3}
|
115
|
-
|
116
|
-
LOC_ID_CAVE_ENTRANCE = 1
|
117
|
-
LOC_NAME_CAVE_ENTRANCE = 'Cave (Entrance)'
|
118
|
-
LOC_DESC_CAVE_ENTRANCE = 'A nearby, dank cavern\'s entrance, surely filled with stacktites, stonemites, and rocksites.'
|
119
|
-
LOC_CONNECTIONS_CAVE_ENTRANCE = {:north => nil, :east => 2, :south => nil, :west => 0}
|
120
|
-
|
121
|
-
LOC_ID_CAVE_ROOM1 = 2
|
122
|
-
LOC_NAME_CAVE_ROOM1 = 'Cave (Room1)'
|
123
|
-
LOC_DESC_CAVE_ROOM1 = 'Now inside the first cavernous room, you confirm that there are stacktites, stonemites, rocksites, and even one or two pebblejites.'
|
124
|
-
LOC_CONNECTIONS_CAVE_ROOM1 = {:north => nil, :east => nil, :south => nil, :west => 1}
|
125
|
-
|
126
|
-
LOC_ID_FOREST = 3
|
127
|
-
LOC_NAME_FOREST = 'Forest'
|
128
|
-
LOC_DESC_FOREST = 'Trees exist here, in droves.'
|
129
|
-
LOC_CONNECTIONS_FOREST = {:north => nil, :east => 0, :south => nil, :west => nil}
|
130
|
-
|
131
|
-
LOC_ID_SKYTOWER = 4
|
132
|
-
LOC_NAME_SKYTOWER = 'Emerald\'s Sky Tower'
|
133
|
-
LOC_DESC_SKYTOWER = 'The craziest guy that ever existed is around here somewhere amongst the cloud floors, snow walls, and ethereal vibe.'
|
134
|
-
LOC_CONNECTIONS_SKYTOWER = {:north => nil, :east => nil, :south => 0, :west => nil}
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|