Two spaces, not tabs
This commit is contained in:
parent
e0832a294b
commit
04e7c8bc77
20
condition.rb
20
condition.rb
@ -1,13 +1,13 @@
|
|||||||
class Condition
|
class Condition
|
||||||
attr_accessor :name, :rules_text, :beat, :resolution, :persistent, :authors, :possible_sources
|
attr_accessor :name, :rules_text, :beat, :resolution, :persistent, :authors, :possible_sources
|
||||||
|
|
||||||
def initialize(name:, rules_text:, beat: "n/a", resolution:, persistent: false, authors:, possible_sources: nil)
|
def initialize(name:, rules_text:, beat: "n/a", resolution:, persistent: false, authors:, possible_sources: nil)
|
||||||
@name = name
|
@name = name
|
||||||
@rules_text = rules_text
|
@rules_text = rules_text
|
||||||
@beat = beat
|
@beat = beat
|
||||||
@resolution = resolution
|
@resolution = resolution
|
||||||
@persistent = persistent
|
@persistent = persistent
|
||||||
@authors = authors
|
@authors = authors
|
||||||
@possible_sources = possible_sources
|
@possible_sources = possible_sources
|
||||||
end
|
end
|
||||||
end
|
end
|
@ -1,33 +1,33 @@
|
|||||||
class Condition
|
class Condition
|
||||||
|
|
||||||
def self.conditions
|
def self.conditions
|
||||||
conditions = []
|
conditions = []
|
||||||
|
|
||||||
conditions << Condition.new(
|
conditions << Condition.new(
|
||||||
:name => "Vicarious Story",
|
:name => "Vicarious Story",
|
||||||
:rules_text => "Your character shares experiences with another character on an ongoing basis. This Condition is usually inflicted on someone for whom another person wants to watch a life event unfold, such as a marriage/divorce, a First Change, a pregnancy, or an Awakening.\n\nExperiences that are directly pertinent to the life event deliver sensory visions to the viewer. These visions might be shared dreams with the person being monitored, but might also be feeling a baby's first kick against the womb's walls or looking in a mirror and seeing a Wolf-Blood's teeth growing sharper. The exact nature of these details is up to Storyteller discretion, but pertinent details should not be withheld. Experiences that are not pertinent are completely omitted. Vicariously watching a person's Awakening skips scenes where the target spills coffee on their TPS reports.\n\nThese visions impose the Stunned Tilt on the one vicariously watching for a turn, but since these visions are so transient, it is not enough to interrupt a supernatural ritual or an extended action, but can be extremely inconvenient in time-sensitive circumstances such as combat. Since the effects of this Condition are partially detrimental, it does not count as \"beneficial\" for the purposes of spells that cause it; effectively, a spell that makes this Condition will get a Beat at its resolution.",
|
:rules_text => "Your character shares experiences with another character on an ongoing basis. This Condition is usually inflicted on someone for whom another person wants to watch a life event unfold, such as a marriage/divorce, a First Change, a pregnancy, or an Awakening.\n\nExperiences that are directly pertinent to the life event deliver sensory visions to the viewer. These visions might be shared dreams with the person being monitored, but might also be feeling a baby's first kick against the womb's walls or looking in a mirror and seeing a Wolf-Blood's teeth growing sharper. The exact nature of these details is up to Storyteller discretion, but pertinent details should not be withheld. Experiences that are not pertinent are completely omitted. Vicariously watching a person's Awakening skips scenes where the target spills coffee on their TPS reports.\n\nThese visions impose the Stunned Tilt on the one vicariously watching for a turn, but since these visions are so transient, it is not enough to interrupt a supernatural ritual or an extended action, but can be extremely inconvenient in time-sensitive circumstances such as combat. Since the effects of this Condition are partially detrimental, it does not count as \"beneficial\" for the purposes of spells that cause it; effectively, a spell that makes this Condition will get a Beat at its resolution.",
|
||||||
:resolution => "The life experience ends. The Awakening or First Change terminates. The child is born. The marital vows are complete or the divorce finalized.",
|
:resolution => "The life experience ends. The Awakening or First Change terminates. The child is born. The marital vows are complete or the divorce finalized.",
|
||||||
:beat => "The one vicariously viewing loses an action during combat or some similarly fast-paced situation.",
|
:beat => "The one vicariously viewing loses an action during combat or some similarly fast-paced situation.",
|
||||||
:authors => ["NEETzsche"]
|
:authors => ["NEETzsche"]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
conditions << Condition.new(
|
conditions << Condition.new(
|
||||||
:name => "Arcane Trouble",
|
:name => "Arcane Trouble",
|
||||||
:rules_text => "When assigning this Condition, roll the spellcasting dicepool again. The number of successes + 1 will be referred to as SS. The Immediate Nimbus of the Mage becomes active for the entire duration of the Arcane Trouble Condition. The mage becomes a bright beacon for any mage with an Active Mage Sight, and Peripheral Mage Sight can sense the mage's presence by rolling Perception + SS.\n\nIf Death was used to cast the spell causing this Condition, the dead and Twilight reject the caster, making his every step very heavy, as if he was bound in a dense fog. The mage and everyone in the same scene subtracts SS from the dice pools of all action that have an impact on the Underworld and on ghosts or Twilight. In addition, any ghost can temporarily use the Mage as his Anchor.\n\nIf Fate was used to cast the spell causing this Condition, then once per scene, the Storyteller can give give SS as a penalty to any action near the mage. Also, once for the Condition duration, the Storyteller can turn any mage action into a dramatic failure. This dramatic failure cannot be used to cause another Arcane Trouble.\n\nIf Forces was used to cast the spell causing this Condition, then electronics go crazy around the mage. Subtract SS from the equipment bonuses of any equipment near the Mage, which includes most modern machines. If the equipment bonus is reduced to zero or less, the equipment refuses to work in the presence of the mage. In addition, if the Mage uses an electronic device, the Storyteller may roll Forces + Gnosis - Durability, where each success deals a point of damage to the object's Structure.\n\nIf Life was used to cast the spell causing this Condition, then the mage radiates an aura of weakness and vulnerability. The mage and everyone in the scene subtracts SS from all Strength, Dexterity, and Stamina rolls. Any attempts to poison or infect the mage receive a bonus equal to SS instead of the penalty listed.\n\nIf Matter was used to cast the spell causing this Condition, then objects become brittle and unreliable around the mage. The mage and everyone in the scene subtracts SS from the equipment bonuses of anything containing mechanical parts, including most modern machines and weapons like guns. If the equipment bonus is reduced to zero or less, the equipment refuses to work in the presence of the mage. In addition, the Storyteller may at any time roll Matter + Gnosis - Durability, where each success deals a point of damage to the object's Structure.\n\nIf Mind was used to cast the spell causing this Condition, then the mage radiates an aura of mental noise that interferes with concentration around him. The magician and everyone in the scene subtracts SS from all rolls that use Intelligence, Wits, or Resolve. Any attempt to confuse the mind of the mage or prevent his concentration will receive a bonus equal to SS instead of the penalty listed.\n\nIf Prime was used to cast the spell causing this Condition, then the Mage Sight of the mage is disrupted: instead of seeing Supernal Truths, it gives a meaningless stream of symbols. The mage and everyone in the same scene subtracts SS from attempts to use Mage Sight. They also receive the same penalty for any attempts to use the Practice of Knowing or Unveiling of any Arcana.\n\nIf Spirit was used to cast the spell causing this Condition, then the Gauntlet between the Shadow and the mortal world becomes especially thin around the magician, and this attracts the attention of the spirits. Any attempts by spirits to break through the Gauntlet or use Numina through the Gauntlet will receive a bonus equal to SS. Also, any place in which the mage is located receives an Open Condition for all spirits to use.\n\nIf Space was used to cast the spell causing this Condition, then strangely distort the space around the mage. The mage and everyone in the same scene deducts SS from any attempts to find something or get somewhere. Also, Storyteller can once per Condition duration strengthen or weaken any sympathetic mage connection Withstand by SS.\n\nIf Time was used to cast the spell causing this Condition, then make the sense of time jump strangely around the mage, making it difficult to coordinate any effort and not allowing people to concentrate. The mage and everyone in the same scene receive a penalty equal to SS for all extended actions, including ritual casting. Also, the mage subtracts SS from any successes gained in teamwork rolls.\n\nIf the spell that caused this Condition was conjunctional or combined, use the effects of all Arcana used for the spell. For example, if a spell used both Life and Spirit, then he would both attract the negative attention of spirits as described above <i>and</i> have the mentioned sense of illness and tiredness.",
|
:rules_text => "When assigning this Condition, roll the spellcasting dicepool again. The number of successes + 1 will be referred to as SS. The Immediate Nimbus of the Mage becomes active for the entire duration of the Arcane Trouble Condition. The mage becomes a bright beacon for any mage with an Active Mage Sight, and Peripheral Mage Sight can sense the mage's presence by rolling Perception + SS.\n\nIf Death was used to cast the spell causing this Condition, the dead and Twilight reject the caster, making his every step very heavy, as if he was bound in a dense fog. The mage and everyone in the same scene subtracts SS from the dice pools of all action that have an impact on the Underworld and on ghosts or Twilight. In addition, any ghost can temporarily use the Mage as his Anchor.\n\nIf Fate was used to cast the spell causing this Condition, then once per scene, the Storyteller can give give SS as a penalty to any action near the mage. Also, once for the Condition duration, the Storyteller can turn any mage action into a dramatic failure. This dramatic failure cannot be used to cause another Arcane Trouble.\n\nIf Forces was used to cast the spell causing this Condition, then electronics go crazy around the mage. Subtract SS from the equipment bonuses of any equipment near the Mage, which includes most modern machines. If the equipment bonus is reduced to zero or less, the equipment refuses to work in the presence of the mage. In addition, if the Mage uses an electronic device, the Storyteller may roll Forces + Gnosis - Durability, where each success deals a point of damage to the object's Structure.\n\nIf Life was used to cast the spell causing this Condition, then the mage radiates an aura of weakness and vulnerability. The mage and everyone in the scene subtracts SS from all Strength, Dexterity, and Stamina rolls. Any attempts to poison or infect the mage receive a bonus equal to SS instead of the penalty listed.\n\nIf Matter was used to cast the spell causing this Condition, then objects become brittle and unreliable around the mage. The mage and everyone in the scene subtracts SS from the equipment bonuses of anything containing mechanical parts, including most modern machines and weapons like guns. If the equipment bonus is reduced to zero or less, the equipment refuses to work in the presence of the mage. In addition, the Storyteller may at any time roll Matter + Gnosis - Durability, where each success deals a point of damage to the object's Structure.\n\nIf Mind was used to cast the spell causing this Condition, then the mage radiates an aura of mental noise that interferes with concentration around him. The magician and everyone in the scene subtracts SS from all rolls that use Intelligence, Wits, or Resolve. Any attempt to confuse the mind of the mage or prevent his concentration will receive a bonus equal to SS instead of the penalty listed.\n\nIf Prime was used to cast the spell causing this Condition, then the Mage Sight of the mage is disrupted: instead of seeing Supernal Truths, it gives a meaningless stream of symbols. The mage and everyone in the same scene subtracts SS from attempts to use Mage Sight. They also receive the same penalty for any attempts to use the Practice of Knowing or Unveiling of any Arcana.\n\nIf Spirit was used to cast the spell causing this Condition, then the Gauntlet between the Shadow and the mortal world becomes especially thin around the magician, and this attracts the attention of the spirits. Any attempts by spirits to break through the Gauntlet or use Numina through the Gauntlet will receive a bonus equal to SS. Also, any place in which the mage is located receives an Open Condition for all spirits to use.\n\nIf Space was used to cast the spell causing this Condition, then strangely distort the space around the mage. The mage and everyone in the same scene deducts SS from any attempts to find something or get somewhere. Also, Storyteller can once per Condition duration strengthen or weaken any sympathetic mage connection Withstand by SS.\n\nIf Time was used to cast the spell causing this Condition, then make the sense of time jump strangely around the mage, making it difficult to coordinate any effort and not allowing people to concentrate. The mage and everyone in the same scene receive a penalty equal to SS for all extended actions, including ritual casting. Also, the mage subtracts SS from any successes gained in teamwork rolls.\n\nIf the spell that caused this Condition was conjunctional or combined, use the effects of all Arcana used for the spell. For example, if a spell used both Life and Spirit, then he would both attract the negative attention of spirits as described above <i>and</i> have the mentioned sense of illness and tiredness.",
|
||||||
:possible_sources => "Dramatic failure on a spellcasting roll.",
|
:possible_sources => "Dramatic failure on a spellcasting roll.",
|
||||||
:resolution => "Successfully cast a spell that uses all Arcana creating this Condition, after waiting one day or one chapter, whichever is longer.",
|
:resolution => "Successfully cast a spell that uses all Arcana creating this Condition, after waiting one day or one chapter, whichever is longer.",
|
||||||
:authors => ["Dark Archon", "NEETzsche"]
|
:authors => ["Dark Archon", "NEETzsche"]
|
||||||
)
|
)
|
||||||
|
|
||||||
conditions << Condition.new(
|
conditions << Condition.new(
|
||||||
:name => "Abyssal Burn",
|
:name => "Abyssal Burn",
|
||||||
:rules_text => "The Abyss burns Mana from the character every time he invokes the energies of the Supernal. Any attempt to cast a spell burns an amount of Mana equal to the number of successes on the Paradox roll in excess of the successes the Wisdom roll to absorb it.",
|
:rules_text => "The Abyss burns Mana from the character every time he invokes the energies of the Supernal. Any attempt to cast a spell burns an amount of Mana equal to the number of successes on the Paradox roll in excess of the successes the Wisdom roll to absorb it.",
|
||||||
:possible_sources => "Successes on contained Paradox roll.",
|
:possible_sources => "Successes on contained Paradox roll.",
|
||||||
:resolution => "Reduce one's Mana pool to zero.",
|
:resolution => "Reduce one's Mana pool to zero.",
|
||||||
:authors => ["Dark Archon"]
|
:authors => ["Dark Archon"]
|
||||||
)
|
)
|
||||||
|
|
||||||
conditions
|
conditions
|
||||||
end
|
end
|
||||||
end
|
end
|
@ -1,16 +1,16 @@
|
|||||||
class String
|
class String
|
||||||
PUNCTUATION_MARKS = [".", "!", "?"]
|
PUNCTUATION_MARKS = [".", "!", "?"]
|
||||||
def titleize
|
def titleize
|
||||||
gsub(/\w+/i) do |match|
|
gsub(/\w+/i) do |match|
|
||||||
ret = match.downcase
|
ret = match.downcase
|
||||||
ret[0] = ret[0].upcase
|
ret[0] = ret[0].upcase
|
||||||
ret
|
ret
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def titleize!
|
def titleize!
|
||||||
replace titleize
|
replace titleize
|
||||||
end
|
end
|
||||||
|
|
||||||
def punctuated?
|
def punctuated?
|
||||||
PUNCTUATION_MARKS.include?(self[-1])
|
PUNCTUATION_MARKS.include?(self[-1])
|
||||||
@ -22,26 +22,26 @@ class String
|
|||||||
end
|
end
|
||||||
|
|
||||||
class Integer
|
class Integer
|
||||||
def to_dots
|
def to_dots
|
||||||
"•" * self
|
"•" * self
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Array
|
class Array
|
||||||
def to_list(separator: nil)
|
def to_list(separator: nil)
|
||||||
separator = "and" if 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
|
||||||
self.first
|
self.first
|
||||||
elsif self.length == 2
|
elsif self.length == 2
|
||||||
"#{self.first} #{separator} #{self.last}"
|
"#{self.first} #{separator} #{self.last}"
|
||||||
else
|
else
|
||||||
ret = clone
|
ret = clone
|
||||||
ret[ret.length - 1] = "#{separator} #{ret[ret.length - 1]}"
|
ret[ret.length - 1] = "#{separator} #{ret[ret.length - 1]}"
|
||||||
ret.join(", ")
|
ret.join(", ")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_arcanum_with_dots
|
def to_arcanum_with_dots
|
||||||
"#{self[0].to_s.titleize} #{self[1].to_dots}"
|
"#{self[0].to_s.titleize} #{self[1].to_dots}"
|
||||||
|
@ -16,346 +16,346 @@ require_relative "primitive_adds"
|
|||||||
|
|
||||||
puts "Shards of Power PDF generator"
|
puts "Shards of Power PDF generator"
|
||||||
class ShardsOfPower
|
class ShardsOfPower
|
||||||
FONT_SIZE_CHAPTER = 48
|
FONT_SIZE_CHAPTER = 48
|
||||||
FONT_SIZE_SECTION = 24
|
FONT_SIZE_SECTION = 24
|
||||||
FONT_SIZE_SUBSECTION = 18
|
FONT_SIZE_SUBSECTION = 18
|
||||||
FONT_SIZE_BODY = 10
|
FONT_SIZE_BODY = 10
|
||||||
|
|
||||||
attr_accessor :pdf, :number_name, :chapter_name, :chapter_title, :section_name, :spells, :conditions, :tilts
|
attr_accessor :pdf, :number_name, :chapter_name, :chapter_title, :section_name, :spells, :conditions, :tilts
|
||||||
|
|
||||||
def start_chapter(num, name)
|
def start_chapter(num, name)
|
||||||
@number_name = num
|
@number_name = num
|
||||||
@chapter_name = name
|
@chapter_name = name
|
||||||
|
|
||||||
@chapter_title = "Chapter #{number_name}: #{chapter_name}"
|
@chapter_title = "Chapter #{number_name}: #{chapter_name}"
|
||||||
puts "Starting #{chapter_title}"
|
puts "Starting #{chapter_title}"
|
||||||
|
|
||||||
pdf.start_new_page
|
pdf.start_new_page
|
||||||
|
|
||||||
pdf.outline.update do
|
pdf.outline.update do
|
||||||
puts "\tAdding #{@shards_of_power.chapter_title} on page #{page_number}"
|
puts "\tAdding #{@shards_of_power.chapter_title} on page #{page_number}"
|
||||||
section(@shards_of_power.chapter_title, :destination => page_number)
|
section(@shards_of_power.chapter_title, :destination => page_number)
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "\tSetting font size"
|
puts "\tSetting font size"
|
||||||
pdf.font_size FONT_SIZE_CHAPTER
|
pdf.font_size FONT_SIZE_CHAPTER
|
||||||
pdf.font "Abess"
|
pdf.font "Abess"
|
||||||
puts "\tPrinting chapter to document"
|
puts "\tPrinting chapter to document"
|
||||||
pdf.text "Chapter #{number_name}: #{chapter_name}", :align => :center
|
pdf.text "Chapter #{number_name}: #{chapter_name}", :align => :center
|
||||||
|
|
||||||
puts "\tRestoring body text"
|
puts "\tRestoring body text"
|
||||||
pdf.font "Goudy"
|
pdf.font "Goudy"
|
||||||
pdf.font_size FONT_SIZE_BODY
|
pdf.font_size FONT_SIZE_BODY
|
||||||
end
|
end
|
||||||
|
|
||||||
def start_section(section_name)
|
def start_section(section_name)
|
||||||
puts "Beginning section #{section_name}: "
|
puts "Beginning section #{section_name}: "
|
||||||
|
|
||||||
@section_name = section_name
|
@section_name = section_name
|
||||||
|
|
||||||
pdf.outline.add_subsection_to(chapter_title) do
|
pdf.outline.add_subsection_to(chapter_title) do
|
||||||
@pdf.outline.section section_name, :destination => @pdf.page_number
|
@pdf.outline.section section_name, :destination => @pdf.page_number
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "\tSetting font size"
|
puts "\tSetting font size"
|
||||||
pdf.font_size FONT_SIZE_SECTION
|
pdf.font_size FONT_SIZE_SECTION
|
||||||
pdf.text section_name, :align => :center
|
pdf.text section_name, :align => :center
|
||||||
|
|
||||||
puts "\tRestoring body text"
|
puts "\tRestoring body text"
|
||||||
pdf.font_size FONT_SIZE_BODY
|
pdf.font_size FONT_SIZE_BODY
|
||||||
pdf.font "Goudy"
|
pdf.font "Goudy"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def roll_results(dramatic_failure:, failure:, success:, exceptional_success:)
|
def roll_results(dramatic_failure:, failure:, success:, exceptional_success:)
|
||||||
pdf.font_size FONT_SIZE_BODY
|
pdf.font_size FONT_SIZE_BODY
|
||||||
pdf.font "Goudy"
|
pdf.font "Goudy"
|
||||||
|
|
||||||
pdf.text "Roll Results", :style => :bold
|
pdf.text "Roll Results", :style => :bold
|
||||||
|
|
||||||
pdf.formatted_text [
|
pdf.formatted_text [
|
||||||
{ :text => "Dramatic Failure: ", :styles => [:bold] },
|
{ :text => "Dramatic Failure: ", :styles => [:bold] },
|
||||||
{ :text => dramatic_failure }
|
{ :text => dramatic_failure }
|
||||||
]
|
]
|
||||||
|
|
||||||
pdf.formatted_text [
|
pdf.formatted_text [
|
||||||
{ :text => "Failure: ", :styles => [:bold] },
|
{ :text => "Failure: ", :styles => [:bold] },
|
||||||
{ :text => failure }
|
{ :text => failure }
|
||||||
]
|
]
|
||||||
|
|
||||||
pdf.formatted_text [
|
pdf.formatted_text [
|
||||||
{ :text => "Success: ", :styles => [:bold] },
|
{ :text => "Success: ", :styles => [:bold] },
|
||||||
{ :text => success }
|
{ :text => success }
|
||||||
]
|
]
|
||||||
|
|
||||||
pdf.formatted_text [
|
pdf.formatted_text [
|
||||||
{ :text => "Exceptional Success: ", :styles => [:bold] },
|
{ :text => "Exceptional Success: ", :styles => [:bold] },
|
||||||
{ :text => exceptional_success }
|
{ :text => exceptional_success }
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate
|
def generate
|
||||||
puts "Parsing spells..."
|
puts "Parsing spells..."
|
||||||
@spells = Spell.spells
|
@spells = Spell.spells
|
||||||
@conditions = Condition.conditions
|
@conditions = Condition.conditions
|
||||||
@conditions.sort_by!(&:name)
|
@conditions.sort_by!(&:name)
|
||||||
@tilts = Tilt.tilts
|
@tilts = Tilt.tilts
|
||||||
@tilts.sort_by!(&:name)
|
@tilts.sort_by!(&:name)
|
||||||
|
|
||||||
puts "Creating PDF object..."
|
puts "Creating PDF object..."
|
||||||
@pdf = Prawn::Document.new(:margin => 0)
|
@pdf = Prawn::Document.new(:margin => 0)
|
||||||
pdf.default_leading 5
|
pdf.default_leading 5
|
||||||
|
|
||||||
pdf.font_families.update(
|
pdf.font_families.update(
|
||||||
"Goudy" => {
|
"Goudy" => {
|
||||||
:normal => "goudy.ttf",
|
:normal => "goudy.ttf",
|
||||||
:bold => "goudy-bold.ttf",
|
:bold => "goudy-bold.ttf",
|
||||||
:italic => "goudy-italic.ttf"
|
:italic => "goudy-italic.ttf"
|
||||||
},
|
},
|
||||||
"Abess" => {
|
"Abess" => {
|
||||||
:normal => "abess.ttf"
|
:normal => "abess.ttf"
|
||||||
},
|
},
|
||||||
"Lilith" => {
|
"Lilith" => {
|
||||||
:normal => "lilith.ttf"
|
:normal => "lilith.ttf"
|
||||||
},
|
},
|
||||||
"Goblin Hand" => {
|
"Goblin Hand" => {
|
||||||
:normal => "VTCGoblinHand.ttf",
|
:normal => "VTCGoblinHand.ttf",
|
||||||
:bold => "VTCGoblinHandBold.ttf",
|
:bold => "VTCGoblinHandBold.ttf",
|
||||||
:italic => "VTCGoblinHandItalic.ttf"
|
:italic => "VTCGoblinHandItalic.ttf"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
pdf.outline.instance_variable_set(:@shards_of_power, self)
|
pdf.outline.instance_variable_set(:@shards_of_power, self)
|
||||||
|
|
||||||
puts "Importing cover..."
|
puts "Importing cover..."
|
||||||
pdf.image("cover.png", :width => 612, :height => 792)
|
pdf.image("cover.png", :width => 612, :height => 792)
|
||||||
|
|
||||||
puts "Printing inner cover..."
|
puts "Printing inner cover..."
|
||||||
pdf.start_new_page(:margin => 50)
|
pdf.start_new_page(:margin => 50)
|
||||||
|
|
||||||
pdf.font "Abess"
|
pdf.font "Abess"
|
||||||
pdf.font_size 72
|
pdf.font_size 72
|
||||||
pdf.text "Shards of Power", :align => :center
|
pdf.text "Shards of Power", :align => :center
|
||||||
puts "\tShards of Power big text..."
|
puts "\tShards of Power big text..."
|
||||||
|
|
||||||
pdf.font "Goudy"
|
pdf.font "Goudy"
|
||||||
pdf.font_size 36
|
pdf.font_size 36
|
||||||
pdf.text "\nA compendium of spells, Conditions, Artifacts, and other interesting tidbits for Mage: the Awakening\n\n", :align => :center
|
pdf.text "\nA compendium of spells, Conditions, Artifacts, and other interesting tidbits for Mage: the Awakening\n\n", :align => :center
|
||||||
puts "\tDescription..."
|
puts "\tDescription..."
|
||||||
|
|
||||||
pdf.font_size 24
|
pdf.font_size 24
|
||||||
pdf.text "Written by members of the /cofd/ Discord, edited by NEETzsche", :align => :center
|
pdf.text "Written by members of the /cofd/ Discord, edited by NEETzsche", :align => :center
|
||||||
puts "\tMain credit..."
|
puts "\tMain credit..."
|
||||||
|
|
||||||
pdf.outline.define do
|
pdf.outline.define do
|
||||||
end
|
end
|
||||||
|
|
||||||
start_chapter "One", "Introduction"
|
start_chapter "One", "Introduction"
|
||||||
|
|
||||||
pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
|
pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
|
||||||
pdf.text "Like every supernatural entity in the Chronicles of Darkness, there is a boundless breadth and depth of topics to discuss within them. The Awakened are by no stretch of the imagination an exception to this rule. This book does not dare claim that this will cover all of them, but it does dare to cover the broad strokes on a certain subtopic of the lives of those touched by the Supernal who still reside in the Fallen World: their toolkit.\n\n<b>Mage: the Awakening</b> covered the broadest strokes on Awakened life in general, but there is so much more to the means by which Mages conduct their affairs and pursue their Obsessions that simply is not covered in that volume. There will be yet more that this one fails to consider. However, it is designed to touch on the high level ideas, and dig into some of the specifics for them, leaving you, the reader compelled, and hopefully, inspired as to where to explore next.", :inline_format => true
|
pdf.text "Like every supernatural entity in the Chronicles of Darkness, there is a boundless breadth and depth of topics to discuss within them. The Awakened are by no stretch of the imagination an exception to this rule. This book does not dare claim that this will cover all of them, but it does dare to cover the broad strokes on a certain subtopic of the lives of those touched by the Supernal who still reside in the Fallen World: their toolkit.\n\n<b>Mage: the Awakening</b> covered the broadest strokes on Awakened life in general, but there is so much more to the means by which Mages conduct their affairs and pursue their Obsessions that simply is not covered in that volume. There will be yet more that this one fails to consider. However, it is designed to touch on the high level ideas, and dig into some of the specifics for them, leaving you, the reader compelled, and hopefully, inspired as to where to explore next.", :inline_format => true
|
||||||
|
|
||||||
start_section "Tools Of Awakened Life"
|
start_section "Tools Of Awakened Life"
|
||||||
|
|
||||||
pdf.text "This book is meant to be used as a toolkit. Each of the spells are modular, and for the most part do not operate off of each other. You, as the Storyteller or player, are meant to take the things you find fun, interesting and compelling while leaving the things you find silly, improper, or frustrating behind. This line of thought naturally extends to all of the Conditions, optional Arcana principles, alternative Relinquishment methods, and so on.\n\nThis book was written on a rolling basis by a number of people. It is a compilation, that accumulated over time. It did not get created overnight. As such, by the time you receive this file, there is a good likelihood that it's still in development, which means there might be more up-to-date versions of it, and additionally it may be open to input for your spells, your Artifacts, and your optional rules. The invite code at the time of publication is <b>Cx3JBpB</b>.", :inline_format => true
|
pdf.text "This book is meant to be used as a toolkit. Each of the spells are modular, and for the most part do not operate off of each other. You, as the Storyteller or player, are meant to take the things you find fun, interesting and compelling while leaving the things you find silly, improper, or frustrating behind. This line of thought naturally extends to all of the Conditions, optional Arcana principles, alternative Relinquishment methods, and so on.\n\nThis book was written on a rolling basis by a number of people. It is a compilation, that accumulated over time. It did not get created overnight. As such, by the time you receive this file, there is a good likelihood that it's still in development, which means there might be more up-to-date versions of it, and additionally it may be open to input for your spells, your Artifacts, and your optional rules. The invite code at the time of publication is <b>Cx3JBpB</b>.", :inline_format => true
|
||||||
|
|
||||||
start_section "Chapters"
|
start_section "Chapters"
|
||||||
|
|
||||||
pdf.text "There are multiple chapters in this book. Each of them covers a specific set of topics.\n\n<b>Chapter One</b> is ithe Introduction. It is what you are reading now. It gives the mission statement, the credits, and a few other key details before you get into the spells and the Conditions.\n\n<b>Chapter Two</b> is the megagrimoire. It is a grimoire of grimoires, much like the book that White Wolf released when they still called themselves that, and is a combined set of spells that the players of this community have mutually agreed are at least somewhat reasonable. Many of us helped each other write these spells. All of their names will be listed in them, alphabetically.\n\n<b>Chapter Three: Conditions & Tilts</b> discusses new Conditions and Tilts that can be imposed by spells, or by other means, such as dramatic failures.", :inline_format => true
|
pdf.text "There are multiple chapters in this book. Each of them covers a specific set of topics.\n\n<b>Chapter One</b> is ithe Introduction. It is what you are reading now. It gives the mission statement, the credits, and a few other key details before you get into the spells and the Conditions.\n\n<b>Chapter Two</b> is the megagrimoire. It is a grimoire of grimoires, much like the book that White Wolf released when they still called themselves that, and is a combined set of spells that the players of this community have mutually agreed are at least somewhat reasonable. Many of us helped each other write these spells. All of their names will be listed in them, alphabetically.\n\n<b>Chapter Three: Conditions & Tilts</b> discusses new Conditions and Tilts that can be imposed by spells, or by other means, such as dramatic failures.", :inline_format => true
|
||||||
|
|
||||||
start_section "Credits"
|
start_section "Credits"
|
||||||
|
|
||||||
spell_authors = spells.collect { |spell| spell.authors }.flatten.uniq.sort { |a, b| b.downcase <=> a.downcase }
|
spell_authors = spells.collect { |spell| spell.authors }.flatten.uniq.sort { |a, b| b.downcase <=> a.downcase }
|
||||||
|
|
||||||
pdf.text "The following users have contributed to Shards of Power, in alphabetical order: #{spell_authors.to_list}"
|
pdf.text "The following users have contributed to Shards of Power, in alphabetical order: #{spell_authors.to_list}"
|
||||||
end
|
end
|
||||||
|
|
||||||
start_chapter("Two", "Spells")
|
start_chapter("Two", "Spells")
|
||||||
|
|
||||||
spells.group_by(&:primary_arcanum).sort_by { |arcanum, spells| arcanum }.to_h.each do |arcanum, arcanum_spells|
|
spells.group_by(&:primary_arcanum).sort_by { |arcanum, spells| arcanum }.to_h.each do |arcanum, arcanum_spells|
|
||||||
arcanum_name = arcanum.to_s.titleize
|
arcanum_name = arcanum.to_s.titleize
|
||||||
|
|
||||||
puts "Compiling spells for #{arcanum_name}..."
|
puts "Compiling spells for #{arcanum_name}..."
|
||||||
|
|
||||||
start_section("#{arcanum_name} Spells")
|
start_section("#{arcanum_name} Spells")
|
||||||
|
|
||||||
pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
|
pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
|
||||||
arcanum_spells.group_by(&arcanum).sort_by { |rating, spells| rating }.to_h.each do |rating, rating_spells|
|
arcanum_spells.group_by(&arcanum).sort_by { |rating, spells| rating }.to_h.each do |rating, rating_spells|
|
||||||
rating_title = "#{rating.to_dots} #{Spell::RANKS[rating - 1]} of #{arcanum_name}"
|
rating_title = "#{rating.to_dots} #{Spell::RANKS[rating - 1]} of #{arcanum_name}"
|
||||||
puts "\tCompiling #{rating_title} spells..."
|
puts "\tCompiling #{rating_title} spells..."
|
||||||
pdf.outline.add_subsection_to("#{arcanum_name} Spells") do
|
pdf.outline.add_subsection_to("#{arcanum_name} Spells") do
|
||||||
@pdf.outline.section rating_title, :destination => @pdf.page_number
|
@pdf.outline.section rating_title, :destination => @pdf.page_number
|
||||||
end
|
end
|
||||||
|
|
||||||
rating_spells.sort_by! { |spell| spell.name }
|
rating_spells.sort_by! { |spell| spell.name }
|
||||||
|
|
||||||
rating_spells.each do |spell|
|
rating_spells.each do |spell|
|
||||||
puts "\t\tCompiling #{spell.full_title} by #{spell.authors.join(', ')}"
|
puts "\t\tCompiling #{spell.full_title} by #{spell.authors.join(', ')}"
|
||||||
pdf.outline.add_subsection_to(rating_title) do
|
pdf.outline.add_subsection_to(rating_title) do
|
||||||
@pdf.outline.section spell.full_title, :destination => @pdf.page_number
|
@pdf.outline.section spell.full_title, :destination => @pdf.page_number
|
||||||
end
|
end
|
||||||
pdf.group do |g|
|
pdf.group do |g|
|
||||||
if spell == rating_spells.first
|
if spell == rating_spells.first
|
||||||
g.font_size FONT_SIZE_SECTION
|
g.font_size FONT_SIZE_SECTION
|
||||||
g.text rating_title
|
g.text rating_title
|
||||||
end
|
end
|
||||||
|
|
||||||
spell_ary = [{:text => "#{spell.name} (", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}]
|
spell_ary = [{:text => "#{spell.name} (", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}]
|
||||||
|
|
||||||
g.font_size FONT_SIZE_BODY
|
g.font_size FONT_SIZE_BODY
|
||||||
previous = false
|
previous = false
|
||||||
spell.arcana.each do |arcanum|
|
spell.arcana.each do |arcanum|
|
||||||
spell_ary << {:text => ", ", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION} if previous
|
spell_ary << {:text => ", ", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION} if previous
|
||||||
spell_ary << {:text => arcanum.to_s.titleize, :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}
|
spell_ary << {:text => arcanum.to_s.titleize, :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}
|
||||||
spell_ary << {:text => spell.send(arcanum).to_dots, :color => "004E6D", :size => FONT_SIZE_SUBSECTION, :character_spacing => -5}
|
spell_ary << {:text => spell.send(arcanum).to_dots, :color => "004E6D", :size => FONT_SIZE_SUBSECTION, :character_spacing => -5}
|
||||||
|
|
||||||
previous = true
|
previous = true
|
||||||
end
|
end
|
||||||
|
|
||||||
spell_ary << {:text => " )", :font => "Lilith", :styles => [], :color => "004E6D", :size => FONT_SIZE_SUBSECTION, :character_spacing => -3}
|
spell_ary << {:text => " )", :font => "Lilith", :styles => [], :color => "004E6D", :size => FONT_SIZE_SUBSECTION, :character_spacing => -3}
|
||||||
|
|
||||||
g.formatted_text spell_ary
|
g.formatted_text spell_ary
|
||||||
|
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => "Practice: ", :styles => [:bold], :font => "Goudy"},
|
{:text => "Practice: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => spell.practice, :font => "Goudy"},
|
{:text => spell.practice, :font => "Goudy"},
|
||||||
]
|
]
|
||||||
|
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => "Primary Factor: ", :styles => [:bold], :font => "Goudy"},
|
{:text => "Primary Factor: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => spell.primary_factor, :font => "Goudy"},
|
{:text => spell.primary_factor, :font => "Goudy"},
|
||||||
]
|
]
|
||||||
|
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => "Withstand: ", :styles => [:bold], :font => "Goudy"},
|
{:text => "Withstand: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => spell.withstand, :font => "Goudy"},
|
{:text => spell.withstand, :font => "Goudy"},
|
||||||
] if !spell.withstand.nil?
|
] if !spell.withstand.nil?
|
||||||
|
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => "Cost: ", :styles => [:bold], :font => "Goudy"},
|
{:text => "Cost: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => spell.cost, :font => "Goudy"},
|
{:text => spell.cost, :font => "Goudy"},
|
||||||
] if !spell.cost.nil?
|
] if !spell.cost.nil?
|
||||||
|
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => "Suggested Rote Skills: ", :styles => [:bold], :font => "Goudy"},
|
{:text => "Suggested Rote Skills: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => spell.suggested_rote_skills.join(', '), :font => "Goudy"},
|
{:text => spell.suggested_rote_skills.join(', '), :font => "Goudy"},
|
||||||
]
|
]
|
||||||
|
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => spell.authors.length == 1 ? "Author: " : "Authors: ", :styles => [:bold], :font => "Goudy"},
|
{:text => spell.authors.length == 1 ? "Author: " : "Authors: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => spell.authors.join(', '), :font => "Goudy"},
|
{:text => spell.authors.join(', '), :font => "Goudy"},
|
||||||
]
|
]
|
||||||
|
|
||||||
g.text spell.rules_text, :inline_format => true
|
g.text spell.rules_text, :inline_format => true
|
||||||
|
|
||||||
spell.reaches.each do |reach|
|
spell.reaches.each do |reach|
|
||||||
reach_cost = mana_cost = reach_rules = nil
|
reach_cost = mana_cost = reach_rules = nil
|
||||||
if reach.size == 3
|
if reach.size == 3
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => "+#{reach[0]} Reach, #{reach[1]} Mana: ", :styles => [:bold], :font => "Goudy"},
|
{:text => "+#{reach[0]} Reach, #{reach[1]} Mana: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => reach[2], :font => "Goudy"},
|
{:text => reach[2], :font => "Goudy"},
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => "+#{reach[0]} Reach: ", :styles => [:bold], :font => "Goudy"},
|
{:text => "+#{reach[0]} Reach: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => reach[1], :font => "Goudy"},
|
{:text => reach[1], :font => "Goudy"},
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
spell.adds.each do |add|
|
spell.adds.each do |add|
|
||||||
g.formatted_text [
|
g.formatted_text [
|
||||||
{:text => "#{add[:verb] ? add[:verb] : "Add"} #{add[:arcana].collect { |arcanum, rating| [arcanum, rating].to_arcanum_with_dots }.to_list(:separator => add[:separator])}: ", :styles => [:bold], :font => "Goudy"},
|
{:text => "#{add[:verb] ? add[:verb] : "Add"} #{add[:arcana].collect { |arcanum, rating| [arcanum, rating].to_arcanum_with_dots }.to_list(:separator => add[:separator])}: ", :styles => [:bold], :font => "Goudy"},
|
||||||
{:text => add[:effect], :font => "Goudy"},
|
{:text => add[:effect], :font => "Goudy"},
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
pdf.start_new_page
|
pdf.start_new_page
|
||||||
end
|
end
|
||||||
|
|
||||||
start_chapter "Three", "Conditions & Tilts"
|
start_chapter "Three", "Conditions & Tilts"
|
||||||
|
|
||||||
start_section "Conditions"
|
start_section "Conditions"
|
||||||
|
|
||||||
puts "Compiling Conditions..."
|
puts "Compiling Conditions..."
|
||||||
|
|
||||||
pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
|
pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
|
||||||
conditions.each do |condition|
|
conditions.each do |condition|
|
||||||
puts "\tCompiling #{condition.name}..."
|
puts "\tCompiling #{condition.name}..."
|
||||||
pdf.outline.add_subsection_to("Conditions") do
|
pdf.outline.add_subsection_to("Conditions") do
|
||||||
@pdf.outline.section condition.name, :destination => @pdf.page_number
|
@pdf.outline.section condition.name, :destination => @pdf.page_number
|
||||||
end
|
end
|
||||||
|
|
||||||
pdf.image "conditionbox.png", :position => :center
|
pdf.image "conditionbox.png", :position => :center
|
||||||
pdf.move_up 30
|
pdf.move_up 30
|
||||||
|
|
||||||
pdf.font "Goblin Hand"
|
pdf.font "Goblin Hand"
|
||||||
pdf.font_size FONT_SIZE_SUBSECTION
|
pdf.font_size FONT_SIZE_SUBSECTION
|
||||||
pdf.fill_color "FFFFFF"
|
pdf.fill_color "FFFFFF"
|
||||||
pdf.text condition.name, :align => :center
|
pdf.text condition.name, :align => :center
|
||||||
|
|
||||||
pdf.move_down 10
|
pdf.move_down 10
|
||||||
pdf.font "Goudy"
|
pdf.font "Goudy"
|
||||||
pdf.fill_color "000000"
|
pdf.fill_color "000000"
|
||||||
pdf.font_size FONT_SIZE_BODY
|
pdf.font_size FONT_SIZE_BODY
|
||||||
|
|
||||||
pdf.text condition.rules_text, :inline_format => true
|
pdf.text condition.rules_text, :inline_format => true
|
||||||
pdf.text "<b>Possible Sources:</b> #{condition.possible_sources}", :inline_format => true if condition.possible_sources
|
pdf.text "<b>Possible Sources:</b> #{condition.possible_sources}", :inline_format => true if condition.possible_sources
|
||||||
pdf.text "<b>Resolution:</b> #{condition.resolution}", :inline_format => true
|
pdf.text "<b>Resolution:</b> #{condition.resolution}", :inline_format => true
|
||||||
pdf.text "<b>Beat:</b> #{condition.beat}", :inline_format => true
|
pdf.text "<b>Beat:</b> #{condition.beat}", :inline_format => true
|
||||||
pdf.text "<b>#{condition.authors.size > 1 ? "Authors" : "Author"}:</b> #{condition.authors.to_list}", :inline_format => true
|
pdf.text "<b>#{condition.authors.size > 1 ? "Authors" : "Author"}:</b> #{condition.authors.to_list}", :inline_format => true
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
start_section "Tilts"
|
start_section "Tilts"
|
||||||
|
|
||||||
puts "Compiling Tilts..."
|
puts "Compiling Tilts..."
|
||||||
|
|
||||||
pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
|
pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
|
||||||
tilts.each do |tilt|
|
tilts.each do |tilt|
|
||||||
puts "\tCompiling #{tilt.full_title}..."
|
puts "\tCompiling #{tilt.full_title}..."
|
||||||
pdf.outline.add_subsection_to("Tilts") do
|
pdf.outline.add_subsection_to("Tilts") do
|
||||||
@pdf.outline.section tilt.full_title, :destination => @pdf.page_number
|
@pdf.outline.section tilt.full_title, :destination => @pdf.page_number
|
||||||
end
|
end
|
||||||
|
|
||||||
pdf.image "conditionbox.png", :position => :center
|
pdf.image "conditionbox.png", :position => :center
|
||||||
|
|
||||||
pdf.font "Goblin Hand"
|
pdf.font "Goblin Hand"
|
||||||
pdf.fill_color "FFFFFF"
|
pdf.fill_color "FFFFFF"
|
||||||
pdf.font_size FONT_SIZE_SUBSECTION
|
pdf.font_size FONT_SIZE_SUBSECTION
|
||||||
if tilt.environmental?
|
if tilt.environmental?
|
||||||
pdf.move_up 35
|
pdf.move_up 35
|
||||||
pdf.text tilt.name, :align => :center
|
pdf.text tilt.name, :align => :center
|
||||||
pdf.font_size FONT_SIZE_BODY
|
pdf.font_size FONT_SIZE_BODY
|
||||||
pdf.text "(Environmental)", :align => :center
|
pdf.text "(Environmental)", :align => :center
|
||||||
else
|
else
|
||||||
pdf.move_up 30
|
pdf.move_up 30
|
||||||
pdf.text tilt.name, :align => :center
|
pdf.text tilt.name, :align => :center
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pdf.move_down 10
|
pdf.move_down 10
|
||||||
pdf.font "Goudy"
|
pdf.font "Goudy"
|
||||||
pdf.fill_color "000000"
|
pdf.fill_color "000000"
|
||||||
pdf.font_size FONT_SIZE_BODY
|
pdf.font_size FONT_SIZE_BODY
|
||||||
|
|
||||||
pdf.text tilt.rules_text, :inline_format => true
|
pdf.text tilt.rules_text, :inline_format => true
|
||||||
pdf.text "<b>Effect:</b> #{tilt.effect}", :inline_format => true
|
pdf.text "<b>Effect:</b> #{tilt.effect}", :inline_format => true
|
||||||
pdf.text "<b>Causing the Tilt:</b> #{tilt.causing}", :inline_format => true
|
pdf.text "<b>Causing the Tilt:</b> #{tilt.causing}", :inline_format => true
|
||||||
pdf.text "<b>Ending the Tilt:</b> #{tilt.ending}", :inline_format => true
|
pdf.text "<b>Ending the Tilt:</b> #{tilt.ending}", :inline_format => true
|
||||||
pdf.text "<b>#{tilt.authors.size > 1 ? "Authors" : "Author"}:</b> #{tilt.authors.to_list}", :inline_format => true
|
pdf.text "<b>#{tilt.authors.size > 1 ? "Authors" : "Author"}:</b> #{tilt.authors.to_list}", :inline_format => true
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
pdf.render_file("shards_of_power.pdf")
|
pdf.render_file("shards_of_power.pdf")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
shards_of_power = ShardsOfPower.new
|
shards_of_power = ShardsOfPower.new
|
||||||
|
144
spell.rb
144
spell.rb
@ -1,83 +1,83 @@
|
|||||||
class Spell
|
class Spell
|
||||||
ARCANA = [:death, :fate, :forces, :life, :matter, :mind, :prime, :space, :spirit, :time]
|
ARCANA = [:death, :fate, :forces, :life, :matter, :mind, :prime, :space, :spirit, :time]
|
||||||
RANKS = ["Initiate", "Apprentice", "Disciple", "Adept", "Master"]
|
RANKS = ["Initiate", "Apprentice", "Disciple", "Adept", "Master"]
|
||||||
ARCANA.each do |arcanum|
|
ARCANA.each do |arcanum|
|
||||||
attr_accessor arcanum
|
attr_accessor arcanum
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_accessor :name,
|
attr_accessor :name,
|
||||||
:practice,
|
:practice,
|
||||||
:primary_factor,
|
:primary_factor,
|
||||||
:withstand,
|
:withstand,
|
||||||
:suggested_rote_skills,
|
:suggested_rote_skills,
|
||||||
:reaches,
|
:reaches,
|
||||||
:adds,
|
:adds,
|
||||||
:rules_text,
|
:rules_text,
|
||||||
:cost
|
:cost
|
||||||
|
|
||||||
attr_accessor :authors
|
attr_accessor :authors
|
||||||
|
|
||||||
def initialize(
|
def initialize(
|
||||||
death: 0,
|
death: 0,
|
||||||
fate: 0,
|
fate: 0,
|
||||||
forces: 0,
|
forces: 0,
|
||||||
life: 0,
|
life: 0,
|
||||||
matter: 0,
|
matter: 0,
|
||||||
mind: 0,
|
mind: 0,
|
||||||
prime: 0,
|
prime: 0,
|
||||||
space: 0,
|
space: 0,
|
||||||
spirit: 0,
|
spirit: 0,
|
||||||
time: 0,
|
time: 0,
|
||||||
name:,
|
name:,
|
||||||
practice:,
|
practice:,
|
||||||
primary_factor:,
|
primary_factor:,
|
||||||
withstand: nil,
|
withstand: nil,
|
||||||
suggested_rote_skills:,
|
suggested_rote_skills:,
|
||||||
reaches: [],
|
reaches: [],
|
||||||
rules_text:,
|
rules_text:,
|
||||||
authors:,
|
authors:,
|
||||||
adds: [],
|
adds: [],
|
||||||
cost: nil)
|
cost: nil)
|
||||||
|
|
||||||
@death = death
|
@death = death
|
||||||
@fate = fate
|
@fate = fate
|
||||||
@forces = forces
|
@forces = forces
|
||||||
@life = life
|
@life = life
|
||||||
@matter = matter
|
@matter = matter
|
||||||
@mind = mind
|
@mind = mind
|
||||||
@prime = prime
|
@prime = prime
|
||||||
@space = space
|
@space = space
|
||||||
@spirit = spirit
|
@spirit = spirit
|
||||||
@time = time
|
@time = time
|
||||||
@name = name
|
@name = name
|
||||||
@practice = practice
|
@practice = practice
|
||||||
@primary_factor = primary_factor
|
@primary_factor = primary_factor
|
||||||
@withstand = withstand
|
@withstand = withstand
|
||||||
@suggested_rote_skills = suggested_rote_skills
|
@suggested_rote_skills = suggested_rote_skills
|
||||||
@reaches = reaches
|
@reaches = reaches
|
||||||
@rules_text = rules_text
|
@rules_text = rules_text
|
||||||
@authors = authors
|
@authors = authors
|
||||||
@adds = adds
|
@adds = adds
|
||||||
@cost = cost
|
@cost = cost
|
||||||
end
|
end
|
||||||
|
|
||||||
def primary_arcanum
|
def primary_arcanum
|
||||||
ARCANA.max { |arcanum1, arcanum2| self.send(arcanum1) <=> self.send(arcanum2) }
|
ARCANA.max { |arcanum1, arcanum2| self.send(arcanum1) <=> self.send(arcanum2) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def full_title
|
def full_title
|
||||||
"#{name} (#{arcana_with_dots.join(', ')})"
|
"#{name} (#{arcana_with_dots.join(', ')})"
|
||||||
end
|
end
|
||||||
|
|
||||||
def arcana
|
def arcana
|
||||||
ARCANA.select { |arcanum| self.send(arcanum) > 0}
|
ARCANA.select { |arcanum| self.send(arcanum) > 0}
|
||||||
end
|
end
|
||||||
|
|
||||||
def arcana_with_dots
|
def arcana_with_dots
|
||||||
arcana.collect { |arcanum| arcanum_with_dots(arcanum) }
|
arcana.collect { |arcanum| arcanum_with_dots(arcanum) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def arcanum_with_dots(arcanum)
|
def arcanum_with_dots(arcanum)
|
||||||
[arcanum, self.send(arcanum)].to_arcanum_with_dots
|
[arcanum, self.send(arcanum)].to_arcanum_with_dots
|
||||||
end
|
end
|
||||||
end
|
end
|
40
tilt.rb
40
tilt.rb
@ -1,25 +1,25 @@
|
|||||||
class Tilt
|
class Tilt
|
||||||
attr_accessor :name, :rules_text, :effect, :causing, :ending, :environmental, :authors
|
attr_accessor :name, :rules_text, :effect, :causing, :ending, :environmental, :authors
|
||||||
|
|
||||||
def initialize(name:, rules_text:, effect:, causing:, ending:, environmental: false , authors:)
|
def initialize(name:, rules_text:, effect:, causing:, ending:, environmental: false , authors:)
|
||||||
@name = name
|
@name = name
|
||||||
@rules_text = rules_text
|
@rules_text = rules_text
|
||||||
@effect = effect
|
@effect = effect
|
||||||
@causing = causing
|
@causing = causing
|
||||||
@ending = ending
|
@ending = ending
|
||||||
@environmental = environmental
|
@environmental = environmental
|
||||||
@authors = authors
|
@authors = authors
|
||||||
end
|
end
|
||||||
|
|
||||||
def full_title
|
def full_title
|
||||||
if environmental
|
if environmental
|
||||||
"#{name} (Environmental)"
|
"#{name} (Environmental)"
|
||||||
else
|
else
|
||||||
name
|
name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def environmental?
|
def environmental?
|
||||||
environmental
|
environmental
|
||||||
end
|
end
|
||||||
end
|
end
|
44
tilts.rb
44
tilts.rb
@ -1,28 +1,28 @@
|
|||||||
class Tilt
|
class Tilt
|
||||||
|
|
||||||
def self.tilts
|
def self.tilts
|
||||||
tilts = []
|
tilts = []
|
||||||
|
|
||||||
tilts << Tilt.new(
|
tilts << Tilt.new(
|
||||||
:name => "Sticky Ground",
|
:name => "Sticky Ground",
|
||||||
:rules_text => "The ground is covered in a sticky substance that precludes people, animals, and vehicles from treading on it. The substance could be a thin layer on top, or a thick quick sand that will eventually suck them in.",
|
:rules_text => "The ground is covered in a sticky substance that precludes people, animals, and vehicles from treading on it. The substance could be a thin layer on top, or a thick quick sand that will eventually suck them in.",
|
||||||
:effect => "Divide the Speed of all who might tread on this ground in half, rounding up, and all rolls that require her to move her feet suffer a -2 penalty. Any dramatic failure on a Physical roll inflicts the Immobilized Tilt.",
|
:effect => "Divide the Speed of all who might tread on this ground in half, rounding up, and all rolls that require her to move her feet suffer a -2 penalty. Any dramatic failure on a Physical roll inflicts the Immobilized Tilt.",
|
||||||
:causing => "This Tilt can be caused by anything ranging from a spell, to a natural feature of the terrain. A character might choose to pour hot pine tar on the ground, making it difficult to move.",
|
:causing => "This Tilt can be caused by anything ranging from a spell, to a natural feature of the terrain. A character might choose to pour hot pine tar on the ground, making it difficult to move.",
|
||||||
:ending => "\"Get out of the quicksand!\" might be a good idea, but that is easier said than done. Characters can pour sand on the ground to give it traction. They can lower the temperature of the area, making the substance they're walking on solidify.",
|
:ending => "\"Get out of the quicksand!\" might be a good idea, but that is easier said than done. Characters can pour sand on the ground to give it traction. They can lower the temperature of the area, making the substance they're walking on solidify.",
|
||||||
:environmental => true,
|
:environmental => true,
|
||||||
:authors => ["NEETzsche", "Dark Archon"]
|
:authors => ["NEETzsche", "Dark Archon"]
|
||||||
)
|
)
|
||||||
|
|
||||||
tilts << Tilt.new(
|
tilts << Tilt.new(
|
||||||
:name => "Labyrinth",
|
:name => "Labyrinth",
|
||||||
:rules_text => "The landscape you are in does not have a consistent physical form. This could be a particularly mercurial part of the spirit world, a booby trapped Mage's Sanctum, or any other place where making a map on paper simply won't cut it.",
|
:rules_text => "The landscape you are in does not have a consistent physical form. This could be a particularly mercurial part of the spirit world, a booby trapped Mage's Sanctum, or any other place where making a map on paper simply won't cut it.",
|
||||||
:effect => "It is impossible to leave the labyrinth by mundane means. Either the effect causing this environmental Tilt must expire, or some other supernatural ability allowing one to leave must take effect, and win a Clash of Wills. All mundane attempts to leave the labyrinth automatically fail. The same applies to attempts to use the environment to any kind of tactical advantage, such as finding cover or hiding in closets; the labyrinth's form is too capricious to entertain such static or simple methods of environmental manipulation.",
|
:effect => "It is impossible to leave the labyrinth by mundane means. Either the effect causing this environmental Tilt must expire, or some other supernatural ability allowing one to leave must take effect, and win a Clash of Wills. All mundane attempts to leave the labyrinth automatically fail. The same applies to attempts to use the environment to any kind of tactical advantage, such as finding cover or hiding in closets; the labyrinth's form is too capricious to entertain such static or simple methods of environmental manipulation.",
|
||||||
:causing => "Some supernatural abilities can cause this Tilt. Other places have this Tilt persistently, such as in Pandemonium.",
|
:causing => "Some supernatural abilities can cause this Tilt. Other places have this Tilt persistently, such as in Pandemonium.",
|
||||||
:ending => "The Gift, spell, Discipline, or ability expires. The labyrinthine place is destroyed. A supernatural ability that allows one command over the environment can partially end the Tilt by vetoing that element of it with a Clash of Wills.",
|
:ending => "The Gift, spell, Discipline, or ability expires. The labyrinthine place is destroyed. A supernatural ability that allows one command over the environment can partially end the Tilt by vetoing that element of it with a Clash of Wills.",
|
||||||
:environmental => true,
|
:environmental => true,
|
||||||
:authors => ["NEETzsche"]
|
:authors => ["NEETzsche"]
|
||||||
)
|
)
|
||||||
|
|
||||||
return tilts
|
return tilts
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user