Add adjectives to stock files

pull/8/head
Daniel Asher Resnick 2 years ago
parent 117365ed8e
commit bb908d9bfd
  1. 1
      src/data/gold/stocks/dwarf.json
  2. 1
      src/data/gold/stocks/elf.json
  3. 1
      src/data/gold/stocks/man.json
  4. 1
      src/data/gold/stocks/orc.json
  5. 1
      src/data/gold/stocks/roden.json
  6. 1
      src/data/gold/stocks/wolf.json
  7. 1
      src/data/troll/stock.json
  8. 2
      src/lib/data/gold.rb
  9. 12
      src/lib/stock.rb

@ -2,6 +2,7 @@
"key": "dwarf", "key": "dwarf",
"name": "Dwarf", "name": "Dwarf",
"stride": 6, "stride": 6,
"adjective": "dwarven",
"common_traits": [ "common_traits": [
"Accustomed To The Dark", "Accustomed To The Dark",
"Bearded", "Bearded",

@ -2,6 +2,7 @@
"key": "elf", "key": "elf",
"name": "Elf", "name": "Elf",
"stride": 8, "stride": 8,
"adjective": "elven",
"common_traits": [ "common_traits": [
"Born Under The Silver Stars", "Born Under The Silver Stars",
"Essence Of The Earth", "Essence Of The Earth",

@ -2,6 +2,7 @@
"key": "man", "key": "man",
"name": "Man", "name": "Man",
"stride": 7, "stride": 7,
"adjective": "mannish",
"common_traits": [ "common_traits": [
], ],
"starting_stats": "starting_stats":

@ -2,6 +2,7 @@
"key": "orc", "key": "orc",
"name": "Orc", "name": "Orc",
"stride": 7, "stride": 7,
"adjective": "orcish",
"common_traits": [ "common_traits": [
"Cannibal", "Cannibal",
"Cold Black Blood", "Cold Black Blood",

@ -2,6 +2,7 @@
"key": "roden", "key": "roden",
"name": "Roden", "name": "Roden",
"stride": 8, "stride": 8,
"adjective": "roden",
"common_traits": [ "common_traits": [
"Aecer's Likeness", "Aecer's Likeness",
"Coat Of Fur", "Coat Of Fur",

@ -2,6 +2,7 @@
"key": "wolf", "key": "wolf",
"name": "Wolf", "name": "Wolf",
"stride": 11, "stride": 11,
"adjective": "wolfish",
"common_traits": [ "common_traits": [
"Crushing Jaws", "Crushing Jaws",
"Deep Fur", "Deep Fur",

@ -2,6 +2,7 @@
"key": "troll", "key": "troll",
"name": "Troll", "name": "Troll",
"stride": 7, "stride": 7,
"adjective": "trollish",
"common_traits": [ "common_traits": [
"Black Nails", "Black Nails",
"Fangs", "Fangs",

@ -12,7 +12,6 @@ module Charred
lifepaths = {} lifepaths = {}
resources = {} resources = {}
stat_pts = {}
stocks = {} stocks = {}
gold_stocks = ['dwarf', 'elf', 'man', 'orc', 'roden', 'wolf'] gold_stocks = ['dwarf', 'elf', 'man', 'orc', 'roden', 'wolf']
@ -33,7 +32,6 @@ module Charred
:traits => traits, :traits => traits,
:lifepaths => lifepaths, :lifepaths => lifepaths,
:resources => resources, :resources => resources,
:stat_pts => stat_pts,
:stocks => stocks :stocks => stocks
}) })
end end

@ -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)

Loading…
Cancel
Save