Browse Source

Prettier condition box

master
The Stranjer 4 years ago
parent
commit
7d25c3709c
7 changed files with 43 additions and 4 deletions
  1. BIN
      VTCGoblinHand.ttf
  2. BIN
      VTCGoblinHandBold.ttf
  3. BIN
      VTCGoblinHandItalic.ttf
  4. BIN
      VTCGoblinHandSC.ttf
  5. BIN
      conditionbox.png
  6. +39
    -4
      shards_of_power.rb
  7. +4
    -0
      tilt.rb

BIN
VTCGoblinHand.ttf View File


BIN
VTCGoblinHandBold.ttf View File


BIN
VTCGoblinHandItalic.ttf View File


BIN
VTCGoblinHandSC.ttf View File


BIN
conditionbox.png View File

Before After
Width: 263  |  Height: 41  |  Size: 13KB

+ 39
- 4
shards_of_power.rb View File

@@ -1,5 +1,6 @@
require "prawn"
require "prawn/grouping"
require "prawn/table"
require "pry"

require_relative "spell"
@@ -116,6 +117,11 @@ class ShardsOfPower
},
"Lilith" => {
:normal => "lilith.ttf"
},
"Goblin Hand" => {
:normal => "VTCGoblinHand.ttf",
:bold => "VTCGoblinHandBold.ttf",
:italic => "VTCGoblinHandItalic.ttf"
}
)

@@ -276,8 +282,18 @@ class ShardsOfPower
@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.image "conditionbox.png", :position => :center
pdf.move_up 30

pdf.font "Goblin Hand"
pdf.font_size FONT_SIZE_SUBSECTION
pdf.fill_color "FFFFFF"
pdf.text condition.name, :align => :center

pdf.move_down 10
pdf.font "Goudy"
pdf.fill_color "000000"
pdf.font_size FONT_SIZE_BODY

pdf.text condition.rules_text, :inline_format => true
pdf.text "<b>Possible Sources:</b> #{condition.possible_sources}", :inline_format => true if condition.possible_sources
@@ -301,8 +317,27 @@ class ShardsOfPower
@pdf.outline.section tilt.full_title, :destination => @pdf.page_number
end

tilt_ary = [{:text => tilt.full_title, :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}]
pdf.formatted_text tilt_ary
pdf.image "conditionbox.png", :position => :center

pdf.font "Goblin Hand"
pdf.fill_color "FFFFFF"
pdf.font_size FONT_SIZE_SUBSECTION
if tilt.environmental?
pdf.move_up 35
pdf.text tilt.name, :align => :center
pdf.font_size FONT_SIZE_BODY
pdf.text "(Environmental)", :align => :center
else
pdf.move_up 30
pdf.text tilt.name, :align => :center
end

pdf.move_down 10
pdf.font "Goudy"
pdf.fill_color "000000"
pdf.font_size FONT_SIZE_BODY

pdf.text tilt.rules_text, :inline_format => true
pdf.text "<b>Effect:</b> #{tilt.effect}", :inline_format => true


+ 4
- 0
tilt.rb View File

@@ -18,4 +18,8 @@ class Tilt
name
end
end

def environmental?
environmental
end
end

Loading…
Cancel
Save