From 40e67265f50bb57c3ae1b63b3a4172f1a24e1a21 Mon Sep 17 00:00:00 2001 From: The Stranjer <791672+TheStranjer@users.noreply.github.com> Date: Mon, 27 May 2019 15:59:58 -0400 Subject: [PATCH] Various small fixes --- book_of_faces.rb | 7 +++++-- spell.rb | 2 +- spells.rb | 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/book_of_faces.rb b/book_of_faces.rb index 0043d6b..e30f1f9 100644 --- a/book_of_faces.rb +++ b/book_of_faces.rb @@ -176,12 +176,15 @@ class BookOfFaces spell_ary = [{:text => "#{spell.name} (", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}] pdf.font_size FONT_SIZE_BODY + previous = false spell.arcana.each do |arcanum| + 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 => spell.send(arcanum).to_dots, :font => "Goudy", :color => "004E6D", :size => FONT_SIZE_SUBSECTION} + spell_ary << {:text => spell.send(arcanum).to_dots, :color => "004E6D", :size => FONT_SIZE_SUBSECTION, :character_spacing => -5} + previous = true end - spell_ary << {:text => ")", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION} + spell_ary << {:text => " )", :font => "Lilith", :styles => [], :color => "004E6D", :size => FONT_SIZE_SUBSECTION, :character_spacing => -3} pdf.formatted_text spell_ary diff --git a/spell.rb b/spell.rb index df948d4..220e372 100644 --- a/spell.rb +++ b/spell.rb @@ -56,7 +56,7 @@ class Spell end def primary_arcanum - ARCANA.max { |arcanum| self.send(arcanum) } + ARCANA.max { |arcanum1, arcanum2| self.send(arcanum1) <=> self.send(arcanum2) } end def full_title diff --git a/spells.rb b/spells.rb index b5f05ad..4833e15 100644 --- a/spells.rb +++ b/spells.rb @@ -28,8 +28,7 @@ class Spell :reaches => [[1, "The caster can distinguish between those who witnessed death and those who have caused it directly. She can also accurately guess how many people have been killed by the target."]] ) - - spells + end end \ No newline at end of file