-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengine.js
More file actions
133 lines (130 loc) · 4.28 KB
/
engine.js
File metadata and controls
133 lines (130 loc) · 4.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
let swornForgeAssetCreator = function() {
let app = {
name: "SwornForge Asset Creator",
staticOptions: {
maxTrackSize: 6,
builtinTypes: [
"Companion",
"Path",
"Combat Talent",
"Ritual",
"Custom"
]
},
options: {
assetName: "Cave Lion",
fillIns: [],
description: "Your cat takes down its prey.",
track: true,
trackMax: 5,
type: "Companion",
customType: "Custom Guy",
},
powers: [
{
title: "Eager:",
unlocked: false,
description: "When your cat chases down big game, you may Resupply with +edge (instead of +wits). If you do, take +1 supply or +1 momentum on a strong hit.",
fillin: false,
fillinTitle: "Fill-in:",
powers: [
{
title: "Eager:",
unlocked: false,
description: "When your cat chases down big game, you may Resupply with +edge (instead of +wits). If you do, take +1 supply or +1 momentum on a strong hit."
}
]
},
{
title: "Inescapable:",
unlocked: false,
description: "When you Enter the Fray or Strike by sending your cat to attack, roll +edge. On a hit, take +2 momentum.",
fillin: false,
fillinTitle: "Fill-in:",
powers: []
},
{
title: "Protective:",
unlocked: false,
description: "When you Make Camp, your cat is alert to trouble. If you or an ally choose to relax, take +1 spirit. If you focus, take +1 momentum.",
fillin: false,
fillinTitle: "Fill-in:",
powers: []
}
],
moves: [
"Face Danger",
"Secure an Advantage",
"Gather Information",
"Heal",
"Resupply",
"Make Camp",
"Undertake a Journey",
"Reach Your Destination",
"Compel",
"Sojourn",
"Draw the Circle",
"Forge a Bond",
"Test Your Bond",
"Aid Your Ally",
"Write Your Epilogue",
"Enter the Fray",
"Strike",
"Clash",
"Turn the Tide",
"End the Fight",
"Battle",
"Endure Harm",
"Face Death",
"Companion Endure Harm",
"Endure Stress",
"Face Desolation",
"Out of Supply",
"Face a Setback",
"Swear an Iron Vow",
"Reach a Milestone",
"Fulfill Your Vow",
"Forsake Your Vow",
"Advance",
"Pay the Price",
"Ask the Oracle",
"Discover a Site",
"Delve the Depths",
"Find an Opportunity",
"Reveal a Danger",
"Check Your Gear",
"Locate Your Objective",
"Escape the Depths",
"Reveal a Danger",
"Mark Your Failure",
"Learn From Your Failures",
"Advance a Threat",
"Take a Hiatus",
"Wield a Rarity"
],
transformers: {
italicizeMoveNames: function( string, moves ) {
moves.forEach( move => {
const regex = new RegExp(`\\b${move}\\b`, 'g');
string = string.replace(regex, `<i>${move}</i>`);
} );
return string;
}
},
methods: {
download: function( node ) {
let link = document.getElementById('download-link');
let output = document.getElementById('output');
html2canvas(node).then(canvas => {
output.innerHTML = '';
output.appendChild(canvas);
});
},
save: function( options, powers ) {
console.dir( options );
console.dir( powers );
}
}
}
return app;
}