Verify spell punctuation
This commit is contained in:
parent
fd9e5bad3d
commit
7754799e86
@ -1,4 +1,5 @@
|
|||||||
class String
|
class String
|
||||||
|
PUNCTUATION_MARKS = [".", "!", "?"]
|
||||||
def titleize
|
def titleize
|
||||||
gsub(/\w+/i) do |match|
|
gsub(/\w+/i) do |match|
|
||||||
ret = match.downcase
|
ret = match.downcase
|
||||||
@ -10,6 +11,14 @@ class String
|
|||||||
def titleize!
|
def titleize!
|
||||||
replace titleize
|
replace titleize
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def punctuated?
|
||||||
|
PUNCTUATION_MARKS.include?(self[-1])
|
||||||
|
end
|
||||||
|
|
||||||
|
def unpunctuated?
|
||||||
|
!punctuated?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Integer
|
class Integer
|
||||||
@ -20,6 +29,7 @@ end
|
|||||||
|
|
||||||
class Array
|
class Array
|
||||||
def to_list(separator: nil)
|
def to_list(separator: nil)
|
||||||
|
separator = "and" if separator.nil?
|
||||||
if self.length == 0
|
if self.length == 0
|
||||||
nil
|
nil
|
||||||
elsif self.length == 1
|
elsif self.length == 1
|
||||||
@ -28,7 +38,7 @@ class Array
|
|||||||
"#{self.first} #{separator} #{self.last}"
|
"#{self.first} #{separator} #{self.last}"
|
||||||
else
|
else
|
||||||
ret = clone
|
ret = clone
|
||||||
ret[ret.length - 1] = "#{separator ? separator : "and"} #{ret[ret.length - 1]}"
|
ret[ret.length - 1] = "#{separator} #{ret[ret.length - 1]}"
|
||||||
ret.join(", ")
|
ret.join(", ")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
65
spells.rb
65
spells.rb
@ -37,7 +37,7 @@ class Spell
|
|||||||
:authors => ["Altasaire"],
|
:authors => ["Altasaire"],
|
||||||
:rules_text => "The Mage brings forth a melee weapon of pure telekinetic force. The spell creates a simple weapon with no moving parts made of pure expression of crushing or shearing force, shining softly, sketched out in the air by the Mage’s will. Its equipment bonus is equal to Potency (exceeding 5 takes a point of Mana) and it deals bashing damage, because it is too sharp to actually sever – flesh cut just largely recoheres, leaving hair-thin red lines.",
|
:rules_text => "The Mage brings forth a melee weapon of pure telekinetic force. The spell creates a simple weapon with no moving parts made of pure expression of crushing or shearing force, shining softly, sketched out in the air by the Mage’s will. Its equipment bonus is equal to Potency (exceeding 5 takes a point of Mana) and it deals bashing damage, because it is too sharp to actually sever – flesh cut just largely recoheres, leaving hair-thin red lines.",
|
||||||
:reaches => [
|
:reaches => [
|
||||||
[1, "The weapon may contain simple moving parts (e.g. flail or three section staff.)"],
|
[1, "The weapon may contain simple moving parts (e.g. flail or three section staff)."],
|
||||||
[1, "If the weapon deals damage to a living target, it applies an instance of the Bleeding Tilt upon the target."],
|
[1, "If the weapon deals damage to a living target, it applies an instance of the Bleeding Tilt upon the target."],
|
||||||
[1, "The weapon ignores the Durability of mundane objects."],
|
[1, "The weapon ignores the Durability of mundane objects."],
|
||||||
[1, "The weapon is transparent and quiet. Mundane means of seeing or hearing it automatically fail, but supernatural ones do not provoke a Clash of Wills."]
|
[1, "The weapon is transparent and quiet. Mundane means of seeing or hearing it automatically fail, but supernatural ones do not provoke a Clash of Wills."]
|
||||||
@ -55,26 +55,8 @@ class Spell
|
|||||||
:authors => ["Altasaire"],
|
:authors => ["Altasaire"],
|
||||||
:rules_text => "Older and more traumatic ghosts often warp with time, making the corpus-based implements of their death and weapons they possess more prominent and terrifying. Fingers become claws, teeth become fangs, and threflection of a murdered serial killer’s blade becomes vicious and sharp.\n\nThis spell mimics and bolsters this facet of the ghost-existence, granting it up to Potency extra points of damage rating for its natural attacks for the Duration of the spell.",
|
:rules_text => "Older and more traumatic ghosts often warp with time, making the corpus-based implements of their death and weapons they possess more prominent and terrifying. Fingers become claws, teeth become fangs, and threflection of a murdered serial killer’s blade becomes vicious and sharp.\n\nThis spell mimics and bolsters this facet of the ghost-existence, granting it up to Potency extra points of damage rating for its natural attacks for the Duration of the spell.",
|
||||||
:reaches => [
|
:reaches => [
|
||||||
[1, "The Mage adds an additional tag to the ghost's weapon that is fitting to the character of the ghost; a dead bouncer might gain the Stun tag, while a pedophile shade might gain Grapple"],
|
[1, "The Mage adds an additional tag to the ghost's weapon that is fitting to the character of the ghost; a dead bouncer might gain the Stun tag, while a pedophile shade might gain Grapple."],
|
||||||
[1, "The ghost enjoys 9-again on natural attacks"]
|
[1, "The ghost enjoys 9-again on natural attacks."]
|
||||||
]
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
spells << Spell.new(
|
|
||||||
:name => "Witch Razor",
|
|
||||||
:forces => 3,
|
|
||||||
:practice => "Weaving",
|
|
||||||
:primary_factor => "Potency",
|
|
||||||
:suggested_rote_skills => ["Weaponry", "Crafts", "Occult"],
|
|
||||||
:authors => ["Altasaire"],
|
|
||||||
:rules_text => "The Mage brings forth a melee weapon of pure telekinetic force. The spell creates a simple weapon with no moving parts made of pure expression of crushing or shearing force, shining softly, sketched out in the air by the Mage’s will. Its equipment bonus is equal to Potency (exceeding 5 takes a point of Mana) and it deals bashing damage, because it is too sharp to actually sever – flesh cut just largely recoheres, leaving hair-thin red lines.",
|
|
||||||
:reaches => [
|
|
||||||
[1, "The weapon may contain simple moving parts (e.g. flail or three section staff.)"],
|
|
||||||
[1, "If the weapon deals damage to a living target, it applies an instance of the Bleeding Tilt upon the target."],
|
|
||||||
[1, "The weapon ignores the Durability of mundane objects."],
|
|
||||||
[1, "The weapon is transparent and quiet. Mundane means of seeing or hearing it automatically fail, but supernatural ones do not provoke a Clash of Wills."]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
)
|
)
|
||||||
@ -536,23 +518,6 @@ class Spell
|
|||||||
)
|
)
|
||||||
|
|
||||||
spells << Spell.new(
|
spells << Spell.new(
|
||||||
:name => "Reassert Mortality",
|
|
||||||
:death => 3,
|
|
||||||
:practice => "Fraying",
|
|
||||||
:primary_factor => "Potency",
|
|
||||||
:withstand => "Stamina",
|
|
||||||
:suggested_rote_skills => ["Intimidation", "Medicine", "Weaponry"],
|
|
||||||
:authors => ["Dark Archon", "Five Eyes"],
|
|
||||||
:rules_text => "There are plenty of things in the Fallen who have cheated death and mortality in various ways - vampires live forever, werewolves regenerate their wounds, and so on. But Death can’t be cheated, and neither are Disciples of Death, who are more than able to return things to their natural state. This spell reasserts Death's claim on a subject, overcoming supernatural resilience. For the Duration of the spell, the subject suffers lethal damage from any source that would cause lethal damage to a normal human; a manifested spirit or ambulatory corpse finds that blades and guns are just as fearsome to them as to a flesh-and-blood mortal. This affects a number of injuries equal to the spell's Potency during the course of its Duration.",
|
|
||||||
:reaches => [
|
|
||||||
[2, "All injuries during the spell's Duration, including aggravated ones, are affected."],
|
|
||||||
[1, "For 1 Mana, the subject will suffer aggravated damage from sources that deal aggravated damage to normal humans."],
|
|
||||||
[1, "Attacks against the subject gain the armor-piercing quality, rated at the spell's Potency."],
|
|
||||||
[1, "Any reflexive or instant action taken to heal the subject by supernatural means provokes a Clash of Wills."]
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
spells << Spell.new(
|
|
||||||
:name => "Fate Scan",
|
:name => "Fate Scan",
|
||||||
:fate => 1,
|
:fate => 1,
|
||||||
:practice => "Knowing",
|
:practice => "Knowing",
|
||||||
@ -838,21 +803,6 @@ class Spell
|
|||||||
)
|
)
|
||||||
|
|
||||||
spells << Spell.new(
|
spells << Spell.new(
|
||||||
:name => "Phasing",
|
|
||||||
:space => 4,
|
|
||||||
:practice => "Patterning",
|
|
||||||
:primary_factor => "Duration",
|
|
||||||
:suggested_rote_skills => ["Science", "Brawl", "Stealth"],
|
|
||||||
:authors => ["Dark Archon"],
|
|
||||||
:rules_text => "You are here; but at the same time, you aren't. By carefully manipulating the space your body occupies, you are protected against all physical attacks - they just pass through your body. People are still able to see, hear and smell you; mental and magical attacks work as normal. Liquids and gases don't affect you, but you are still able to be blinded, deafened and so on.",
|
|
||||||
:reaches => [
|
|
||||||
[1, "By passing the light through the body to the other side, you are invisible as well."],
|
|
||||||
[1, "You can manipulate objects, carry items and physically attack your enemies."],
|
|
||||||
[1, "Aimed spells won't work on you - enemy needs to attack your Pattern directly to harm you."]
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
spells << Spell.new(
|
|
||||||
:name => "Spirit Invitation",
|
:name => "Spirit Invitation",
|
||||||
:spirit => 3,
|
:spirit => 3,
|
||||||
:practice => "Weaving",
|
:practice => "Weaving",
|
||||||
@ -930,7 +880,7 @@ class Spell
|
|||||||
:authors => ["NEETzsche"],
|
:authors => ["NEETzsche"],
|
||||||
:rules_text => "The mage says something with a double meaning in the First Tongue. To her intended audience, it means one thing, and to every other entity, it means something entirely different. The audience needs to be a specific entity. Attempts by spirits and other entities to pierce the deception is Withstood by the spell's Potency.",
|
:rules_text => "The mage says something with a double meaning in the First Tongue. To her intended audience, it means one thing, and to every other entity, it means something entirely different. The audience needs to be a specific entity. Attempts by spirits and other entities to pierce the deception is Withstood by the spell's Potency.",
|
||||||
:reaches => [
|
:reaches => [
|
||||||
[1, "The caster can specify an entire category of entities as his target audience, like a spirit choir or werewolf Auspice"]
|
[1, "The caster can specify an entire category of entities as his target audience, like a spirit choir or werewolf Auspice."]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1030,7 +980,7 @@ class Spell
|
|||||||
:authors => ["noire"],
|
:authors => ["noire"],
|
||||||
:rules_text => "The mage taps into the deepest reserves of personal resolve and unleashes a tidal wave of conviction toward a single minded goal. When the target spends Willpower to go above and beyond what should be possible to achieve her goals, substitute her Resolve rating for the usual Willpower bonus. The spell cannot increase the subject’s Willpower bonus above her resolve.",
|
:rules_text => "The mage taps into the deepest reserves of personal resolve and unleashes a tidal wave of conviction toward a single minded goal. When the target spends Willpower to go above and beyond what should be possible to achieve her goals, substitute her Resolve rating for the usual Willpower bonus. The spell cannot increase the subject’s Willpower bonus above her resolve.",
|
||||||
:reaches => [
|
:reaches => [
|
||||||
[1, "If the roll gaining this benefit is contested, roll with 8-again"],
|
[1, "If the roll gaining this benefit is contested, roll with 8-again."],
|
||||||
[1, "The spell may temporarily increase Resolve by one dot per level of Potency of the spell. The spell cannot increase the subject’s Resolve above their normal maximum. Sleepers compelled to above their natural Resolve gain the broken condition after the spell ends."],
|
[1, "The spell may temporarily increase Resolve by one dot per level of Potency of the spell. The spell cannot increase the subject’s Resolve above their normal maximum. Sleepers compelled to above their natural Resolve gain the broken condition after the spell ends."],
|
||||||
[1, "For a point of Mana, the benefit of the spell may affect spellcasting."]
|
[1, "For a point of Mana, the benefit of the spell may affect spellcasting."]
|
||||||
|
|
||||||
@ -1046,11 +996,14 @@ class Spell
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "The spell authors, of this fine grimoire are: #{authors.sort_by { |author, count| -count }.collect{ |author, count| "#{author}, with #{count} spells" }.to_list }"
|
# TESTS
|
||||||
|
|
||||||
duplicate_spells = spells.group_by(&:name).select {| k, v| v.length > 1 }
|
duplicate_spells = spells.group_by(&:name).select {| k, v| v.length > 1 }
|
||||||
raise "Duplicate spells (on name) detected: #{duplicate_spells.collect{ |k,v| k}.to_list}" if duplicate_spells.length > 0
|
raise "Duplicate spells (on name) detected: #{duplicate_spells.collect{ |k,v| k}.to_list}" if duplicate_spells.length > 0
|
||||||
|
|
||||||
|
unpunctuated_spells = spells.select { |spell| spell.rules_text.unpunctuated? || spell.reaches.collect{|reach| reach[1]}.any?(&:unpunctuated?) || spell.adds.any? { |add| add[:effect].unpunctuated? } }
|
||||||
|
|
||||||
|
raise "The following spells lack punctuation: #{unpunctuated_spells.collect(&:name).to_list}" if unpunctuated_spells.length > 0
|
||||||
|
|
||||||
spells
|
spells
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user