pfrpg_utility 0.1.0 → 0.1.1

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: 49f2a54caed217925fbbdc1da8aa2e034a75d15c
4
- data.tar.gz: 21a2f8ba64a06101272dff66e045f03983bf3480
3
+ metadata.gz: 92b320e2b683f526e24cc6de80b9cbb3d7e8f40f
4
+ data.tar.gz: 55aa60507d42a21cbf0ab9c7ea7b7f184bed2958
5
5
  SHA512:
6
- metadata.gz: b8317083daa87df08f73aa4f3bf7f6c93c851a2f7dbca405f3e1ea45cebb405447bf581046a0a2260b5f743e9eed8b3cb1174268c7a2c45fc1f099a9fb834275
7
- data.tar.gz: e0599d118521f48938a352425ee8731214d4ad4858da681d6eda90f88328456b153b7f962dadd864167d7434f303098fffa683f14ce5fadf3096d5bd5aa6cfae
6
+ metadata.gz: f8f887daead6e47bf6178f5d7eb0931c00c0ccc482c641d3f29a61598fb11c77501068f8e2ef0b8a89804df19b5d32d0d45b152c0afecd84d0016a1b6cefa9ec
7
+ data.tar.gz: 6ad3fcc1ed98dfab90291a86aff93c67c990a969105bad7ceb6bd99a5b7848faf0ed196b7568a3b099c32e0f508c7e974d4b6a8fc4da3eeea46681fc7d84905b
@@ -1,4 +1,4 @@
1
- module PfrpgCore
1
+ module PfrpgUtility
2
2
  module Affectable
3
3
  def get_effects
4
4
  Effect.load(effects)
@@ -1,9 +1,9 @@
1
- module PfrpgCore
1
+ module PfrpgUtility
2
2
  class Alignment
3
3
 
4
4
  attr_reader :alignment
5
5
  def initialize(alignment)
6
- @alignment = PfrpgCore::Alignment.parse(alignment)
6
+ @alignment = PfrpgUtility::Alignment.parse(alignment)
7
7
  end
8
8
 
9
9
  def self.filter_by_character(character)
@@ -34,7 +34,7 @@
34
34
  # # => Dice.new(4, 6, 2)
35
35
  # 4.d6 * 10 # => Dice.new(4, 6) * 10
36
36
  # # => Dice.new(4, 6, 0, 10)
37
- class PfrpgCore::Dice
37
+ class PfrpgUtility::Dice
38
38
  attr_reader :sides, :count, :increment, :multiplier
39
39
 
40
40
  def initialize(count, sides, increment=0, multiplier=1)
@@ -45,13 +45,13 @@ class PfrpgCore::Dice
45
45
  # Return a new Dice object, with the given multiplier. If the dice already
46
46
  # have a multipler, it accumulates.
47
47
  def *(n)
48
- PfrpgCore::Dice.new(count, sides, increment, multiplier * n)
48
+ PfrpgUtility::Dice.new(count, sides, increment, multiplier * n)
49
49
  end
50
50
 
51
51
  # Return a new Dice object, with the given increment. If the dice already
52
52
  # have an increment, it accumulates.
53
53
  def +(n)
54
- PfrpgCore::Dice.new(count, sides, increment+n, multiplier)
54
+ PfrpgUtility::Dice.new(count, sides, increment+n, multiplier)
55
55
  end
56
56
 
57
57
  # Same as adding a negative increment.
@@ -129,6 +129,6 @@ class Integer
129
129
  # I'm aware of). Also, the optimist in me likes to think this is more
130
130
  # efficient than method_missing, though I haven't done any benchmarks. :)
131
131
  [4,6,8,10,12,20].each do |sides|
132
- define_method("d#{sides}") { PfrpgCore::Dice.new(self, sides) }
132
+ define_method("d#{sides}") { PfrpgUtility::Dice.new(self, sides) }
133
133
  end
134
134
  end
@@ -1,4 +1,4 @@
1
- class PfrpgCore::Effect
1
+ class PfrpgUtility::Effect
2
2
  attr_accessor :type, :key, :value, :affect
3
3
  def initialize(type, key, value, affect=nil)
4
4
  # standard effect proc; add a value
@@ -14,7 +14,7 @@ class PfrpgCore::Effect
14
14
 
15
15
  def self.load(effects_string)
16
16
  return effects_string if effects_string.instance_of? Array
17
- return [ effects_string ] if effects_string.instance_of? PfrpgCore::Effect
17
+ return [ effects_string ] if effects_string.instance_of? PfrpgUtility::Effect
18
18
  return [] if effects_string.nil? || effects_string.empty?
19
19
  unless effects_string.instance_of? String
20
20
  ap "Error effect: "
@@ -29,7 +29,7 @@ class PfrpgCore::Effect
29
29
  type = p[0]
30
30
  key = p[1]
31
31
  value = p[2]
32
- PfrpgCore::Effect.new(type, key, value)
32
+ PfrpgUtility::Effect.new(type, key, value)
33
33
  end
34
34
 
35
35
  def apply(character)
@@ -1,4 +1,4 @@
1
- module PfrpgCore
1
+ module PfrpgUtility
2
2
  class Prerequisite
3
3
 
4
4
  def initialize(attribute, value, matcher=nil)
@@ -1,3 +1,3 @@
1
1
  module PfrpgUtility
2
- VERSION = "0.1.0"
3
- end
2
+ VERSION = "0.1.1"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pfrpg_utility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan OMara