diff --git a/shards_of_power.rb b/shards_of_power.rb index 858baf5..290984f 100644 --- a/shards_of_power.rb +++ b/shards_of_power.rb @@ -249,10 +249,18 @@ class ShardsOfPower g.text spell.rules_text, :inline_format => true spell.reaches.each do |reach| - g.formatted_text [ - {:text => "+#{reach[0]} Reach: ", :styles => [:bold], :font => "Goudy"}, - {:text => reach[1], :font => "Goudy"}, - ] + reach_cost = mana_cost = reach_rules = nil + if reach.size == 3 + g.formatted_text [ + {:text => "+#{reach[0]} Reach, #{reach[1]} Mana: ", :styles => [:bold], :font => "Goudy"}, + {:text => reach[2], :font => "Goudy"}, + ] + else + g.formatted_text [ + {:text => "+#{reach[0]} Reach: ", :styles => [:bold], :font => "Goudy"}, + {:text => reach[1], :font => "Goudy"}, + ] + end end spell.adds.each do |add| diff --git a/spells.rb b/spells.rb index e15edf2..e892426 100644 --- a/spells.rb +++ b/spells.rb @@ -1285,7 +1285,7 @@ class Spell 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 - unpunctuated_spells = spells.select { |spell| spell.rules_text.unpunctuated? || spell.reaches.collect{|reach| reach[1]}.any?(&:unpunctuated?) || spell.adds.any? { |add| add[:effect].unpunctuated? } } + unpunctuated_spells = spells.select { |spell| spell.rules_text.unpunctuated? || spell.reaches.collect{|reach| reach.size == 2 ? reach[1] : reach[2] }.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