Fork of https://github.com/modality/charred-black. Short term, has some fixes. Long term, may include a tool to create and edit stock/lifepath/skill/trait data. http://charred.obscuritus.ca:8080/#/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
charred-gold/src/lib/data.rb

37 lines
676 B

require_relative 'data/gold'
require_relative 'data/wizard'
require_relative 'data/dark_elf'
module Charred
class Data
include Charred::Gold
include Charred::Wizard
include Charred::DarkElf
attr :data
def initialize
@data = {}
load_gold(@data)
load_wizard(@data)
load_dark_elf(@data)
end
def lifepath_requirements(expr)
if expr.is_a? Numeric
[]
elsif expr.is_a? String
if expr.start_with? "+"
[]
else
expr
end
elsif expr.is_a? Array
(expr.map { |e| self.lifepath_requirements(e) }).flatten
else
[]
end
end
end
end