20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/character_card.rb', line 20
def assembled_card
{
"count" => 1,
"color": "blue",
"title": "#{@character_path["name"]}",
"icon": nil,
"contents": [
"subtitle | Character Info",
"property | Base HP | #{@character_path["health"]["hitpoints"]}",
"property | Race | #{@character_path["race"]["name"].capitalize}",
"property | Ethnicity | #{@character_path["race"]["ethnicity"].capitalize}",
"section | Combat",
"property | AC | #{@ac_path["ac"]}",
"property | Touch AC | #{@character_path["armorclass"]["touch"]}",
"property | Flat-Footed AC | #{@character_path["armorclass"]["flatfooted"]}",
"property | Attack Bonus | #{@attack_path["attackbonus"]}",
"property | Initiative | #{@character_path["initiative"]["total"]}",
"property | Movement | #{@character_path["movement"]["basespeed"]["text"]}",
"fill",
"rule",
"dndstats | #{@attribute_path[0]["attrvalue"]["base"]} | #{@attribute_path[1]["attrvalue"]["base"]} | #{@attribute_path[2]["attrvalue"]["base"]} | #{@attribute_path[3]["attrvalue"]["base"]} | #{@attribute_path[4]["attrvalue"]["base"]} | #{@attribute_path[5]["attrvalue"]["base"]}"
]
}
end
|