Add adjectives to stock files

Daniel Asher Resnick 2 years ago
parent 8557200e36
commit 88d0de4345
  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",
"name": "Dwarf",
"stride": 6,
"adjective": "dwarven",
"common_traits": [
"Accustomed To The Dark",
"Bearded",

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

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

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

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

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

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

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

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

Loading…
Cancel
Save