From cfe57af3b3d880219de37a6f757362581ada5993 Mon Sep 17 00:00:00 2001
From: The Stranjer <791672+TheStranjer@users.noreply.github.com>
Date: Tue, 11 Jun 2019 21:36:45 -0400
Subject: [PATCH] Starter Condition code, Vicarious Story Condition, and
Nuzusul Monitor example spell.
---
condition.rb | 13 +++++++++++++
conditions.rb | 16 ++++++++++++++++
shards_of_power.rb | 36 ++++++++++++++++++++++++++++++++++--
spells.rb | 11 +++++++++++
4 files changed, 74 insertions(+), 2 deletions(-)
create mode 100644 condition.rb
create mode 100644 conditions.rb
diff --git a/condition.rb b/condition.rb
new file mode 100644
index 0000000..50d83be
--- /dev/null
+++ b/condition.rb
@@ -0,0 +1,13 @@
+class Condition
+ 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)
+ @name = name
+ @rules_text = rules_text
+ @beat = beat
+ @resolution = resolution
+ @persistent = persistent
+ @authors = authors
+ @possible_sources = possible_sources
+ end
+end
\ No newline at end of file
diff --git a/conditions.rb b/conditions.rb
new file mode 100644
index 0000000..c7a4ed1
--- /dev/null
+++ b/conditions.rb
@@ -0,0 +1,16 @@
+class Condition
+
+ def self.conditions
+ conditions = []
+
+ conditions << Condition.new(
+ :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. Both the person who is being monitored and the person doing the vicarious viewing have this Condition, and if it is resolved on one party, it resolves on both.\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.",
+ :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.",
+ :authors => ["NEETzsche"]
+ )
+
+ conditions
+ end
+end
\ No newline at end of file
diff --git a/shards_of_power.rb b/shards_of_power.rb
index 8129a08..acc2593 100644
--- a/shards_of_power.rb
+++ b/shards_of_power.rb
@@ -3,6 +3,10 @@ require "pry"
require_relative "spell"
require_relative "spells"
+
+require_relative "condition"
+require_relative "conditions"
+
require_relative "primitive_adds"
puts "Shards of Power PDF generator"
@@ -12,7 +16,7 @@ class ShardsOfPower
FONT_SIZE_SUBSECTION = 18
FONT_SIZE_BODY = 10
- attr_accessor :pdf, :number_name, :chapter_name, :chapter_title, :section_name, :spells
+ attr_accessor :pdf, :number_name, :chapter_name, :chapter_title, :section_name, :spells, :conditions
def start_chapter(num, name)
@number_name = num
@@ -88,6 +92,9 @@ class ShardsOfPower
def generate
puts "Parsing spells..."
@spells = Spell.spells
+ @conditions = Condition.conditions
+
+ @conditions.sort_by(&:name)
puts "Creating PDF object..."
@pdf = Prawn::Document.new(:margin => 0)
@@ -143,7 +150,7 @@ class ShardsOfPower
start_section "Chapters"
- pdf.text "There are multiple chapters in this book. Each of them covers a specific set of topics.\n\nChapter One 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\nChapter Two 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.", :inline_format => true
+ pdf.text "There are multiple chapters in this book. Each of them covers a specific set of topics.\n\nChapter One 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\nChapter Two 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\nChapter Three: Conditions & Tilts 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"
@@ -241,6 +248,31 @@ class ShardsOfPower
pdf.start_new_page
end
+ start_chapter "Three", "Conditions & Tilts"
+
+ start_section "Conditions"
+
+ puts "Compiling Conditions..."
+
+ pdf.column_box([0, pdf.cursor], :columns => 2, :width => pdf.bounds.width) do
+ conditions.each do |condition|
+ puts "\tCompiling #{condition.name}..."
+ pdf.outline.add_subsection_to("Conditions") do
+ @pdf.outline.section condition.name, :destination => @pdf.page_number
+ end
+
+ condition_ary = [{:text => condition.name, :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}]
+ pdf.formatted_text condition_ary
+
+ pdf.text condition.rules_text
+ pdf.text "Possible Sources: #{condition.possible_sources}", :inline_format => true if condition.possible_sources
+ pdf.text "Resolution: #{condition.resolution}", :inline_format => true
+ pdf.text "Beat: #{condition.beat}", :inline_format => true
+ pdf.text "#{condition.authors.size > 1 ? "Authors" : "Author"}: #{condition.authors.to_list}", :inline_format => true
+
+ end
+ end
+
pdf.render_file("shards_of_power.pdf")
end
end
diff --git a/spells.rb b/spells.rb
index d0d8571..737833b 100644
--- a/spells.rb
+++ b/spells.rb
@@ -1057,6 +1057,17 @@ class Spell
:rules_text => "Sometimes a willworker needs just to make sure that a certain object meets no obstacles on it’s way to its destination. Even an Apprentice of Fate may bless the chosen object in this way, with a little knowledge of Space added. This spell requires a sympathetic connection and \"links\" the target of spell with it. If the target is sent to a person, it will automatically bypass all mundane options for the Duration of the spell. Supernatural attempts to prevent the meeting provoke a Clash of Wills. If Unerring Delivery is cast on a person, then that person gains Potency to all attempts to find the \"linked\" object/person."
)
+ spells << Spell.new(
+ :name => "Nuzusul Monitor",
+ :life => 1,
+ :spirit => 1,
+ :practice => "Unveiling",
+ :primary_factor => "Duration",
+ :withstand => "Composure",
+ :suggested_rote_skills => ["Occult", "Empathy", "Survival"],
+ :authors => ["NEETzsche"],
+ :rules_text => "The willworker applies the Vicarious Story Condition on a nuzusul. He watches their First Change."
+ )
# TESTS