|
|
@ -12,17 +12,19 @@ module Charred |
|
|
|
@key = h["key"] |
|
|
|
@key = h["key"] |
|
|
|
@name = h["name"] || @key |
|
|
|
@name = h["name"] || @key |
|
|
|
@stride = h["stride"] || @@default_stride |
|
|
|
@stride = h["stride"] || @@default_stride |
|
|
|
|
|
|
|
@adjective = h["adjective"] || @key+"ish" |
|
|
|
@common_traits = h["common_traits"] |
|
|
|
@common_traits = h["common_traits"] |
|
|
|
@starting_stats = h["starting_stats"] |
|
|
|
@starting_stats = h["starting_stats"] |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def as_json(options = {}) |
|
|
|
def as_json(options = {}) |
|
|
|
{ |
|
|
|
{ |
|
|
|
"key" => key, |
|
|
|
"key" => @key, |
|
|
|
"name" => name, |
|
|
|
"name" => @name, |
|
|
|
"stride" => stride, |
|
|
|
"stride" => @stride, |
|
|
|
"common_traits" => common_traits, |
|
|
|
"adjective" => @adjective, |
|
|
|
"starting_stats" => starting_stats |
|
|
|
"common_traits" => @common_traits, |
|
|
|
|
|
|
|
"starting_stats" => @starting_stats |
|
|
|
} |
|
|
|
} |
|
|
|
end |
|
|
|
end |
|
|
|
def to_json(*a) |
|
|
|
def to_json(*a) |
|
|
|