stattr 0.0.6 → 0.0.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.
Files changed (2) hide show
  1. data/lib/stattr.rb +26 -26
  2. metadata +42 -21
@@ -22,32 +22,6 @@ module Stattr
22
22
  end
23
23
  end
24
24
 
25
- def modstat(r)
26
- modlist = []
27
- case r
28
- when 3
29
- modlist = [r, -4]
30
- when (4..5)
31
- modlist = [r, -3]
32
- when (6..7)
33
- modlist = [r, -2]
34
- when (8..9)
35
- modlist = [r, -1]
36
- when (10..11)
37
- modlist = [r, 0]
38
- when (12..13)
39
- modlist = [r, 1]
40
- when (14..15)
41
- modlist = [r, 2]
42
- when (16..17)
43
- modlist = [r, 3]
44
- when 18
45
- modlist = [r, 4]
46
- else
47
- puts "nothing"
48
- end
49
- modlist
50
- end
51
25
 
52
26
 
53
27
 
@@ -77,6 +51,32 @@ attr_accessor :str, :dex, :cha, :con, :wis, :int
77
51
  @wis = modstat(Stattr::Dice.roll(@@sides, @@dicenum))
78
52
  @int = modstat(Stattr::Dice.roll(@@sides, @@dicenum))
79
53
  end
54
+ def modstat(r)
55
+ modlist = []
56
+ case r
57
+ when 3
58
+ modlist = [r, -4]
59
+ when (4..5)
60
+ modlist = [r, -3]
61
+ when (6..7)
62
+ modlist = [r, -2]
63
+ when (8..9)
64
+ modlist = [r, -1]
65
+ when (10..11)
66
+ modlist = [r, 0]
67
+ when (12..13)
68
+ modlist = [r, 1]
69
+ when (14..15)
70
+ modlist = [r, 2]
71
+ when (16..17)
72
+ modlist = [r, 3]
73
+ when 18
74
+ modlist = [r, 4]
75
+ else
76
+ puts "nothing"
77
+ end
78
+ modlist
79
+ end
80
80
  end
81
81
 
82
82
  class Playerchar
metadata CHANGED
@@ -1,46 +1,67 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: stattr
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ hash: 17
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 7
10
+ version: 0.0.7
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Alex Jarvis
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-05-07 00:00:00.000000000 Z
17
+
18
+ date: 2012-05-07 00:00:00 -04:00
19
+ default_executable:
13
20
  dependencies: []
14
- description: Stattr is a Gem that includes a number of useful functions for rolling
15
- dice in a game like Dungeons and Dragons.
21
+
22
+ description: Stattr is a Gem that includes a number of useful functions for rolling dice in a game like Dungeons and Dragons.
16
23
  email: alxjrvs@gmail.com
17
24
  executables: []
25
+
18
26
  extensions: []
27
+
19
28
  extra_rdoc_files: []
20
- files:
29
+
30
+ files:
21
31
  - lib/stattr.rb
32
+ has_rdoc: true
22
33
  homepage: https://github.com/alxjrvs/Stattr
23
34
  licenses: []
35
+
24
36
  post_install_message:
25
37
  rdoc_options: []
26
- require_paths:
38
+
39
+ require_paths:
27
40
  - lib
28
- required_ruby_version: !ruby/object:Gem::Requirement
41
+ required_ruby_version: !ruby/object:Gem::Requirement
29
42
  none: false
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ hash: 3
47
+ segments:
48
+ - 0
49
+ version: "0"
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
51
  none: false
36
- requirements:
37
- - - ! '>='
38
- - !ruby/object:Gem::Version
39
- version: '0'
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ hash: 3
56
+ segments:
57
+ - 0
58
+ version: "0"
40
59
  requirements: []
60
+
41
61
  rubyforge_project:
42
- rubygems_version: 1.8.24
62
+ rubygems_version: 1.3.7
43
63
  signing_key:
44
64
  specification_version: 3
45
65
  summary: Stattr; Because rolling dice is hard.
46
66
  test_files: []
67
+