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/stock.rb

35 lines
683 B

module Charred
class Stock
@@default_stride = 6
attr :key
attr :name
attr :stride
attr :common_traits
attr :settings
attr :starting_stats
def initialize(key, name = key, stride = @@default_stride)
@key = key
@name = name
@stride = stride
@common_traits = []
@settings = []
@starting_stats = []
end
def as_json(options = {})
{
"key" => key,
"name" => name,
"stride" => stride,
"common_traits" => common_traits,
"settings" => settings,
"starting_stats" => starting_stats
}
end
def to_json(*a)
as_json.to_json(*a)
end
end
end