fools 0.0.4

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.
Files changed (66) hide show
  1. data/COPYING +674 -0
  2. data/History.txt +4 -0
  3. data/Manifest.txt +65 -0
  4. data/PostInstall.txt +31 -0
  5. data/README.rdoc +73 -0
  6. data/Rakefile +24 -0
  7. data/bin/carps_fools +27 -0
  8. data/bin/register_carps_fools +35 -0
  9. data/features/character_sheet.feature +35 -0
  10. data/features/dice.feature +28 -0
  11. data/features/dm_interface.feature +19 -0
  12. data/features/launch_dm.feature +10 -0
  13. data/features/launch_player.feature +9 -0
  14. data/features/player_interface.feature +19 -0
  15. data/features/rules.feature +66 -0
  16. data/features/step_definitions/common_steps.rb +168 -0
  17. data/features/steps/character_sheet.rb +152 -0
  18. data/features/steps/dice.rb +19 -0
  19. data/features/steps/dm_interface.rb +21 -0
  20. data/features/steps/dm_mod.rb +6 -0
  21. data/features/steps/dm_test_mailer.rb +23 -0
  22. data/features/steps/general.rb +7 -0
  23. data/features/steps/interface.rb +10 -0
  24. data/features/steps/launch_dm.rb +12 -0
  25. data/features/steps/launch_player.rb +6 -0
  26. data/features/steps/player_interface.rb +45 -0
  27. data/features/steps/player_mod.rb +6 -0
  28. data/features/steps/player_test_mailer.rb +27 -0
  29. data/features/steps/resource.rb +5 -0
  30. data/features/steps/rules.rb +144 -0
  31. data/features/support/common.rb +29 -0
  32. data/features/support/env.rb +4 -0
  33. data/features/support/matchers.rb +11 -0
  34. data/lib/fools/dm/interface.rb +97 -0
  35. data/lib/fools/dm/launch.rb +40 -0
  36. data/lib/fools/dm/mod.rb +120 -0
  37. data/lib/fools/dm.rb +20 -0
  38. data/lib/fools/interface.rb +32 -0
  39. data/lib/fools/mod.rb +74 -0
  40. data/lib/fools/player/interface.rb +66 -0
  41. data/lib/fools/player/launch.rb +37 -0
  42. data/lib/fools/player/mod.rb +105 -0
  43. data/lib/fools/player.rb +20 -0
  44. data/lib/fools/rules/combat/dice.rb +41 -0
  45. data/lib/fools/rules/combat/rule.rb +130 -0
  46. data/lib/fools/rules/drink/dice.rb +43 -0
  47. data/lib/fools/rules/drink/rule.rb +130 -0
  48. data/lib/fools/rules/romance/dice.rb +62 -0
  49. data/lib/fools/rules/romance/rule.rb +143 -0
  50. data/lib/fools/rules.rb +23 -0
  51. data/lib/fools/sheet/alter.rb +35 -0
  52. data/lib/fools/sheet/schema.rb +59 -0
  53. data/lib/fools/sheet/semantics.rb +129 -0
  54. data/lib/fools/sheet.rb +20 -0
  55. data/lib/fools/util/error.rb +28 -0
  56. data/lib/fools/util.rb +18 -0
  57. data/lib/fools.rb +33 -0
  58. data/permission +16 -0
  59. data/script/console +10 -0
  60. data/script/destroy +14 -0
  61. data/script/generate +14 -0
  62. data/tasks/readme_site.rake +28 -0
  63. data/test/test_fools.rb +11 -0
  64. data/test/test_helper.rb +3 -0
  65. data/website/index.html +103 -0
  66. metadata +213 -0
data/permission ADDED
@@ -0,0 +1,16 @@
1
+ # Copyright 2010 John Morrice
2
+
3
+ # This file is part of The Fools.
4
+
5
+ # The Fools is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+
10
+ # The Fools is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with The Fools. If not, see <http://www.gnu.org/licenses/>.
data/script/console ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # File: script/console
3
+ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
4
+
5
+ libs = " -r irb/completion"
6
+ # Perhaps use a console_lib to store any extra methods I may want available in the cosole
7
+ # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8
+ libs << " -r #{File.dirname(__FILE__) + '/../lib/fools.rb'}"
9
+ puts "Loading fools gem"
10
+ exec "#{irb} #{libs} --simple-prompt"
data/script/destroy ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/destroy'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Destroy.new.run(ARGV)
data/script/generate ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/generate'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Generate.new.run(ARGV)
@@ -0,0 +1,28 @@
1
+ require "rdoc/markup/to_html"
2
+
3
+ task :readme_site do
4
+ h = RDoc::Markup::ToHtml.new
5
+ body = h.convert(File.read("README.rdoc"))
6
+ # Just hack out the beginning and end...
7
+ doc = <<-END
8
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
9
+ <html xmlns="http://www.w3.org/1999/xhtml">
10
+ <head>
11
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
12
+ <title>Fools #{Fools::VERSION}</title>
13
+ <style type="text/css">
14
+ body
15
+ {
16
+ font-family:"DejaVu Sans", "Arial";
17
+ }
18
+ </style>
19
+ </head>
20
+ <body>
21
+ #{body}
22
+ </body>
23
+ </html>
24
+ END
25
+ web = File.open "website/index.html", "w"
26
+ web.write doc
27
+ web.close
28
+ end
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestFools < Test::Unit::TestCase
4
+
5
+ def setup
6
+ end
7
+
8
+ def test_truth
9
+ assert true
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ require 'stringio'
2
+ require 'test/unit'
3
+ require File.dirname(__FILE__) + '/../lib/fools'
@@ -0,0 +1,103 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
5
+ <title>Fools 0.0.4</title>
6
+ <style type="text/css">
7
+ body
8
+ {
9
+ font-family:"DejaVu Sans", "Arial";
10
+ }
11
+ </style>
12
+ </head>
13
+ <body>
14
+ <h1>The Fools, an example CARPS mod </h1>
15
+ <h2>The Fools is hosted on github:</h2>
16
+ <ul>
17
+ <li><p>
18
+ <a href="http://github.com/elginer/fools">github.com/elginer/fools</a>
19
+ </p>
20
+ </li>
21
+ </ul>
22
+ <h2>Description:</h2>
23
+ <p>
24
+ The Fools. Copyright John Morrice 2010.
25
+ </p>
26
+ <p>
27
+ The Fools is distributed for educational purposes: it is intended to be
28
+ used by programmers, as an aid in learning how to write mods for CARPS.
29
+ </p>
30
+ <p>
31
+ The Fools is loosely based on the rules of the Drones RPG: <a
32
+ href="http://www.granta.demon.co.uk/drones">www.granta.demon.co.uk/drones</a>/
33
+ </p>
34
+ <p>
35
+ The Drones is Copyright Ian Crowther, Sheila Thomas, Victoria Uren
36
+ 1995-1996
37
+ </p>
38
+ <p>
39
+ You should familiarise yourself with the rules before play, though note the
40
+ following differences present in Fools:
41
+ </p>
42
+ <ul>
43
+ <li><p>
44
+ Your character points are present on the character sheet. These are your
45
+ total character points, rather than the points you have not yet spent
46
+ available. Hence you should NOT reduce this value when you spend a
47
+ point. As in the Fools rules, you should expect the Game Master to tell
48
+ you how many points you have available before the game begins.
49
+ </p>
50
+ </li>
51
+ <li><p>
52
+ Two additional character attributes are added: Intoxication and
53
+ Discomfiture. These attributes are to keep track of the transitory nature
54
+ of drunkenness and being the subject of A Sound Drubbing, respectively.
55
+ These values range from 0 to -10. 0 indicates sobreity or perfect health,
56
+ while -10 represents a highly debilated state.
57
+ </p>
58
+ </li>
59
+ </ul>
60
+ <h2>Requirements:</h2>
61
+ <p>
62
+ CARPS
63
+ </p>
64
+ <h2>To Install:</h2>
65
+ <p>
66
+ <tt># This installs the gem</tt>
67
+ </p>
68
+ <p>
69
+ <tt>sudo gem install fools</tt>
70
+ </p>
71
+ <p>
72
+ <tt># This registers the mod with CARPS</tt>
73
+ </p>
74
+ <p>
75
+ <tt>register_carps_fools</tt>
76
+ </p>
77
+ <h2>License:</h2>
78
+ <p>
79
+ Copyright 2010 John Morrice
80
+ </p>
81
+ <pre>
82
+
83
+ </pre>
84
+ <p>
85
+ Fools is free software: you can redistribute it and/or modify it under the
86
+ terms of the GNU General Public License as published by the Free Software
87
+ Foundation, either version 3 of the License, or (at your option) any later
88
+ version.
89
+ </p>
90
+ <p>
91
+ Fools is distributed in the hope that it will be useful, but WITHOUT ANY
92
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
93
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
94
+ details.
95
+ </p>
96
+ <p>
97
+ You should have received a copy of the GNU General Public License along
98
+ with Fools. If not, see <<a
99
+ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/>.
100
+ </p>
101
+
102
+ </body>
103
+ </html>
metadata ADDED
@@ -0,0 +1,213 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fools
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 4
9
+ version: 0.0.4
10
+ platform: ruby
11
+ authors:
12
+ - John Morrice
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-11-10 00:00:00 +00:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: carps
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 2
31
+ - 0
32
+ version: 0.2.0
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rubyforge
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 2
45
+ - 0
46
+ - 4
47
+ version: 2.0.4
48
+ type: :development
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: hoe
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ segments:
59
+ - 2
60
+ - 6
61
+ - 2
62
+ version: 2.6.2
63
+ type: :development
64
+ version_requirements: *id003
65
+ description: |-
66
+ The Fools, copyright Ian Crowther, Sheila Thomas, Victoria Uren 1995-1996.
67
+ see http://www.granta.demon.co.uk/fools/
68
+ This is an implementation of The Fools for CARPS.
69
+ email:
70
+ - spoon@killersmurf.com
71
+ executables:
72
+ - carps_fools
73
+ - register_carps_fools
74
+ extensions: []
75
+
76
+ extra_rdoc_files:
77
+ - History.txt
78
+ - Manifest.txt
79
+ - PostInstall.txt
80
+ files:
81
+ - COPYING
82
+ - History.txt
83
+ - Manifest.txt
84
+ - PostInstall.txt
85
+ - README.rdoc
86
+ - Rakefile
87
+ - bin/carps_fools
88
+ - bin/register_carps_fools
89
+ - features/character_sheet.feature
90
+ - features/dice.feature
91
+ - features/dm_interface.feature
92
+ - features/launch_dm.feature
93
+ - features/launch_player.feature
94
+ - features/player_interface.feature
95
+ - features/rules.feature
96
+ - features/step_definitions/common_steps.rb
97
+ - features/steps/character_sheet.rb
98
+ - features/steps/dice.rb
99
+ - features/steps/dm_interface.rb
100
+ - features/steps/dm_mod.rb
101
+ - features/steps/dm_test_mailer.rb
102
+ - features/steps/general.rb
103
+ - features/steps/interface.rb
104
+ - features/steps/launch_dm.rb
105
+ - features/steps/launch_player.rb
106
+ - features/steps/player_interface.rb
107
+ - features/steps/player_mod.rb
108
+ - features/steps/player_test_mailer.rb
109
+ - features/steps/resource.rb
110
+ - features/steps/rules.rb
111
+ - features/support/common.rb
112
+ - features/support/env.rb
113
+ - features/support/matchers.rb
114
+ - lib/fools.rb
115
+ - lib/fools/dm.rb
116
+ - lib/fools/dm/interface.rb
117
+ - lib/fools/dm/launch.rb
118
+ - lib/fools/dm/mod.rb
119
+ - lib/fools/interface.rb
120
+ - lib/fools/mod.rb
121
+ - lib/fools/player.rb
122
+ - lib/fools/player/interface.rb
123
+ - lib/fools/player/launch.rb
124
+ - lib/fools/player/mod.rb
125
+ - lib/fools/rules.rb
126
+ - lib/fools/rules/combat/dice.rb
127
+ - lib/fools/rules/combat/rule.rb
128
+ - lib/fools/rules/drink/dice.rb
129
+ - lib/fools/rules/drink/rule.rb
130
+ - lib/fools/rules/romance/dice.rb
131
+ - lib/fools/rules/romance/rule.rb
132
+ - lib/fools/sheet.rb
133
+ - lib/fools/sheet/alter.rb
134
+ - lib/fools/sheet/schema.rb
135
+ - lib/fools/sheet/semantics.rb
136
+ - lib/fools/util.rb
137
+ - lib/fools/util/error.rb
138
+ - permission
139
+ - script/console
140
+ - script/destroy
141
+ - script/generate
142
+ - tasks/readme_site.rake
143
+ - test/test_fools.rb
144
+ - test/test_helper.rb
145
+ - website/index.html
146
+ has_rdoc: true
147
+ homepage:
148
+ licenses: []
149
+
150
+ post_install_message: |
151
+ The Fools. Copyright John Morrice 2010.
152
+
153
+ The Fools is distributed for educational purposes: it is
154
+ intended to be used by programmers, as an aid in
155
+ learning how to write mods for CARPS.
156
+
157
+ The Fools is loosely based on the rules of the Drones RPG:
158
+ http://www.granta.demon.co.uk/drones/
159
+ Copyright Ian Crowther, Sheila Thomas, Victoria Uren 1995-1996
160
+
161
+ You should familiarise yourself with the rules before
162
+ play, though note the following differences and quriks
163
+ present in this CARPS mod:
164
+
165
+ * Your character points are present on the character
166
+ sheet. These are your total character points, rather
167
+ than the points you have not yet spent available.
168
+ Hence you should NOT reduce this value when you spend
169
+ a point.
170
+ As in the Fools rules, you should expect
171
+ the Game Master to tell you how many points you have
172
+ available before the game begins.
173
+
174
+ * Two additional character attributes are added:
175
+ Intoxication and Discomfiture.
176
+ These attributes are to keep track of the transitory
177
+ nature of drunkenness and being the subject of A Sound
178
+ Drubbing, respectively.
179
+ These values range from 0 to -10. 0 indicates
180
+ sobreity or perfect health, while -10 represents a
181
+ highly debilated state.
182
+
183
+ rdoc_options:
184
+ - --main
185
+ - README.rdoc
186
+ require_paths:
187
+ - lib
188
+ required_ruby_version: !ruby/object:Gem::Requirement
189
+ none: false
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ segments:
194
+ - 0
195
+ version: "0"
196
+ required_rubygems_version: !ruby/object:Gem::Requirement
197
+ none: false
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ segments:
202
+ - 0
203
+ version: "0"
204
+ requirements: []
205
+
206
+ rubyforge_project: fools
207
+ rubygems_version: 1.3.7
208
+ signing_key:
209
+ specification_version: 3
210
+ summary: The Fools for CARPS
211
+ test_files:
212
+ - test/test_fools.rb
213
+ - test/test_helper.rb