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.
36 lines
991 B
36 lines
991 B
require 'json'
|
|
|
|
module Charred
|
|
module DarkElf
|
|
def load_dark_elf(data)
|
|
file = File.read('data/dark_elf/skills.json')
|
|
skills = JSON.parse(file)
|
|
verbose_merge data[:skills], skills
|
|
|
|
file = File.read('data/dark_elf/traits.json')
|
|
traits = JSON.parse(file)
|
|
verbose_merge data[:traits], traits
|
|
|
|
file = File.read('data/dark_elf/lifepaths.json')
|
|
contents = JSON.parse(file)
|
|
lifepaths = contents["settings"]
|
|
|
|
file = File.read("data/dark_elf/resources.json")
|
|
resources = JSON.parse(file)
|
|
data[:resources]['elf'] += resources
|
|
|
|
elf = data[:lifepaths]['elf']
|
|
|
|
elf.keys.each do |elf_set|
|
|
elf[elf_set].keys.each do |elf_lp|
|
|
elf[elf_set][elf_lp]['key_leads'] |= ['Path Of Spite Subsetting']
|
|
elf[elf_set][elf_lp]['leads'] |= ['Spite']
|
|
end
|
|
end
|
|
|
|
elf['Path Of Spite Subsetting'] = lifepaths['Path Of Spite Subsetting']
|
|
|
|
data[:lifepaths]['elf'] = elf
|
|
end
|
|
end
|
|
end
|
|
|