forked from Roll20/roll20-character-sheets
-
Notifications
You must be signed in to change notification settings - Fork 1
/
arask.html
338 lines (302 loc) · 11.6 KB
/
arask.html
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<h1> Arask Character Sheet </h1>
<h3> * For Handbook 2.0 * </h3>
<text> Character Name: </text>
<input type="text" name="attr_character_name" />
<!-- Level Stuff
TODO: Style lines to make them grid-aligned. Add box width min/max -->
<strong> Level: </strong>
<input type="number" value="1" name="attr_level"/>
Race: <input type="text" name="attr_race" value=""/>
<br>
<!-- Player Character's Gameplay Stats
TODO: Style Width -->
<strong> Health: </strong>
<input type="number" value="0" name="attr_hp"/>
<text> / </text>
<input type="number" value="10" name="attr_hp_max"/>
<strong> Mana: </strong>
<input type="number" value="0" name="attr_mp"/>
<text> / </text>
<input type="number" value="10" name="attr_mp_max"/>
<strong> Power: </strong>
<input type="number" value="0" name="attr_pp"/>
<text> / </text>
10
<hr>
<h2>Character Stats</h2>
Move Speed: <input type="text" name="attr_speed" value="30 ft."/>
Stat Points: <input type="number" value="3" name="attr_statPoints"/>
<br>
Favor: <input type="number" name=attr_favor value="0"/>
Focus: <input type="number" name=attr_focus value="1"/> / <input type="number" name=attr_focus_max value="1"/>
<!-- Update Button, updates stats! -->
<br>
<h3> Strength </h3>
<text>Score</text>
<input type="number" name="attr_strength" value="3" />
<button type='roll' value="/em @{character_name} is rolling Strength...
/roll 1d10 + @{strength_mod} + ?{Other Mod|0}" name="roll_strength"></button>
<text>Stat Mod</text>
<input type="text" name="attr_strength_mod" value="0" readonly/>
<text>Preferred?</text>
<input type="checkbox" name="attr_strength_pref" value="1d4" />
<br>
<h3> Intelligence </h3>
<text>Score</text>
<input type="number" name="attr_intelligence" value="3" />
<button type='roll' value="/em @{character_name} is rolling Intelligence...
/roll 1d10 + @{intelligence_mod} + ?{Other Mod|0}" name="roll_intelligence"></button>
<text>Stat Mod</text>
<input type="text" name="attr_intelligence_mod" value="0" readonly />
<text>Preferred?</text>
<input type="checkbox" name="attr_intelligence_pref" value="1d4" />
<br>
<h3> Dexterity </h3>
<text>Score</text>
<input type="number" name="attr_dexterity" value="3" />
<button type='roll' value="/em @{character_name} is rolling Dexterity...
/roll 1d10 + @{dexterity_mod} + ?{Other Mod|0}" name="roll_dexterity"></button>
<text>Stat Mod</text>
<input type="text" name="attr_dexterity_mod" value=0 readonly />
<text>Preferred?</text>
<input type="checkbox" name="attr_dexterity_pref" value="1d4" />
<br>
<h3> Charisma </h3>
<text>Score</text>
<input type="number" name="attr_charisma" value="3" />
<button type='roll' value="/em @{character_name} is rolling Charisma...
/roll 1d10 + @{charisma_mod} + ?{Other Mod|0}" name="roll_charisma"></button>
<text>Stat Mod</text>
<input type="text" name="attr_charisma_mod" value=0 readonly />
<text>Preferred?</text>
<input type="checkbox" name="attr_charisma_pref" value="1d4" />
<br>
<h3> Awareness </h3>
<text>Score</text>
<input type="number" name="attr_awareness" value="3" />
<button type='roll' value="/em @{character_name} is rolling Awareness...
/roll 1d10 + @{awareness_mod} + ?{Other Mod|0}" name="roll_awareness"></button>
<text>Stat Mod</text>
<input type="text" name="attr_awareness_mod" value=0 readonly />
<text>Preferred?</text>
<input type="checkbox" name="attr_awareness_pref" value="1d4" />
<br>
<h3> Resilience </h3>
<text>Score</text>
<input type="number" name="attr_resilience" value="3" />
<button type='roll' value="/em @{character_name} is rolling Resilience...
/roll 1d10 + @{resilience_mod} + ?{Other Mod|0}" name="roll_resilience"></button>
<text>Stat Mod</text>
<input type="text" name="attr_resilience_mod" value=0 readonly />
<text>Preferred?</text>
<input type="checkbox" name="attr_resilience_pref" value="1d4" />
<br>
<h3> Luck </h3>
<text>Score</text>
<input type="number" name="attr_luck" value="3" />
<button type='roll' value="/em @{character_name} is rolling Luck...
/roll 1d10 + @{luck_mod} + ?{Other Mod|0}" name="roll_luck"></button>
<text>Stat Mod</text>
<input type="text" name="attr_luck_mod" value=0 readonly />
<text>Preferred?</text>
<input type="checkbox" name="attr_luck_pref" value="1d4" />
<hr>
<h2>Skill Bonuses</h2>
<fieldset class="repeating_skills">
<Strong>Name:</Strong>
<input type="text" name="attr_skillname" />
Rank:
<input type="number" name="attr_skillRank" />
Rerolls:
<input type="number" name="attr_rerolls"/>
/
<input type="number" name="attr_rerolls_max"/>
Is Master?
<input type="checkbox" name="attr_skillMaster" />
</fieldset>
<hr>
<h2>Magical Affinities</h2>
<text>Affinity Points:</text>
<input type="number" name="attr_afpt" value="3"/>
<text>Mana Spent</text>
<input type="number" name="attr_manaSpent" value="0"/>
<text>==> Dice Mod</text>
<input type="text" name="attr_manaSpentMod" value="" readonly/>
<button type='roll' value="/em @{character_name} casts a @{manaSpent}-Mana magic spell!
/roll 1d10 + @{manaSpentMod} + ?{Other Mod|0}" name="roll_wizardPower"> Cast Spell</button>
<hr>
<!-- Affinity sections -->
<fieldset class="repeating_affinity">
<input type="text" value="default" style="display: none"/>
<strong>Class:</strong>
<select name="attr_class" class="class">
<option selected>None</option>
<option>D-Class (Cantrip)</option>
<option>C-Class</option>
<option>B-Class</option>
<option>A-Class</option>
<option>S-Class (Wizard Power)</option>
</select>
<strong>School:</strong>
<input type="text" name="attr_school" class="school"/>
<text>Rank:</text>
<select name="attr_rank" class="rank">
<option selected>Select A Rank</option>
<option value="0">1). Benign Affinity</option>
<option value="1">2). Lesser Affinity</option>
<option value="2">3). Moderate Affinity</option>
<option value="3">4). Greater Affinity</option>
<option value="4">5). Spectacular Affinity</option>
</select>
<br>
<text>Free Cast:</text>
<input type="text" name="attr_free" class="free"/>
<text>Range:</text>
<input type="text" name="attr_range" class="range"/>
<text>Mana Limit:</text>
<input type="text" name="attr_limit" class="limit"/>
<br>
Parent Affinity 1:
<input type="text" name="attr_par1" class="par1"/>
Parent Affinity 2:
<input type="text" name="attr_par2" class="par2"/>
<br>
<strong>Affinity Spellbook</strong>
<textarea name="attr_descr" rows="1" cols="1" class="descr" ></textarea>
<hr>
</fieldset>
<h2>Weapons and Armour</h2>
<fieldset class="repeating_weapons">
<Strong>Name:</Strong>
<input type="text" name="attr_weaponName" />
Stat:
<select name="attr_weaponStat">
<option selected disabled>None</option>
<option>Strength</option>
<option>Intelligence</option>
<option>Dexterity</option>
<option>Charisma</option>
<option>Awareness</option>
<option>Resilience</option>
<option>Luck</option>
</select>
<!-- <input type="text" name="attr_weaponStat" /> -->
Roll Bonus:
<input type="text" name="attr_weaponDiceBonus" value="+0"/>
<br>
<Strong>Description</Strong>
<textarea name="attr_weaponDescription" rows="10" cols="10">Enter a description for this item.</textarea>
</fieldset>
<hr>
<h2>Possessions</h2>
Copper: <input type="number" name="attr_copper" value="0"/>
Silver: <input type="number" name="attr_silver" value="0"/>
Gold: <input type="number" name="attr_gold" value="0"/>
<br>
<strong>Inventory</strong>
<br>
<textarea name="attr_inventory" rows="10" cols="10">Describe your belongings.</textarea>
<!-- Start on other Section -->
<hr>
<h2>Character Description</h2>
Age: <input type="text" name="attr_age" value="" />
Weight: <input type="text" name="attr_weight" value="" />
Gender: <input type="text" name="attr_gender" value="" />
<br>
Height: <input type="text" name="attr_height" value="" />
Hair: <input type="text" name="attr_hair" value="" />
Eyes: <input type="text" name="attr_eyes" value="" />
<br>
<strong>Power Burst</strong>
<textarea name="attr_powerBurst" rows="8" cols="10">Describe your power burst.</textarea>
<br>
<strong>Racial Traits</strong>
<br>
<textarea name="attr_raceTraits" rows="8" cols="10">Describe your racial abilities.</textarea>
<br>
<strong>Notes and Backstory</strong> <br>
<textarea name="attr_backstory" rows="10" cols="10">Enter a description about your character.</textarea>
<br>
<!-- TODO: Make the power point max modifiable?
<input type="text" value="10" name="attr_ppMax"/> -->
<br>
<hr>
<br><br>
© 2019 Toxic Sasquatch Games
<br>
Arask System by Westley Hindley & Taliyah Larson
<script type="text/worker">
// .. Update button for STAT MODS
/*
on("change:repeating_affinity", function() {
getAttrs(["repeating_affinity_type","repeating_affinity_effect"], function(values) {
setAttrs({
repeating_affinity_effect: values.repeating_affinity_type
})
});
});
*/
on("sheet:opened change:strength change:intelligence change:dexterity change:charisma change:luck change:resilience change:awareness change:manaSpent change:manaSpentMod", function() {
getAttrs(["strength","intelligence","dexterity","charisma","awareness","resilience","luck","manaSpent","focus","level"], function(values) {
//Do something with values.Strength
function getManaMod(mana)
{ // .. Return the modifier for how much mana this costs.
let returnVal = 0;
if(mana <= 0)
{
returnVal = -3;
}else{
let dTens = Math.floor(mana/5);
let secondDice = (mana %5 * 2);
if(mana%5 != 0)
{ // .. There's a second dice type
if(mana > 5)
{
returnVal = dTens.toString() + "d10 + 1d" + secondDice.toString();
}else{
returnVal = "1d" + secondDice.toString();
}
}else{
// .. No second dice type
returnVal = dTens.toString() + "d10";
}
}
return returnVal;
}
function getModifier(stat)
{
let statMod = 0;
let statFlat = stat;
if(statFlat <= 0){
// .. Lowest Mod Possible
statMod = "-1d4 -3";
}else if(statFlat < 11 ){
// .. No additives here
statMod = (statFlat - 3).toString();
}else{
// .. Apply the function for all further values
statMod = "7 + " + getManaMod(statFlat-10);
}
return statMod;
}
let strengthMod = getModifier(values.strength);
let intelligenceMod = getModifier(values.intelligence);
let dexterityMod = getModifier(values.dexterity);
let awarenessMod = getModifier(values.awareness);
let luckMod = getModifier(values.luck);
let resilienceMod = getModifier(values.resilience);
let charismaMod = getModifier(values.charisma);
let manaMod = getManaMod(values.manaSpent);
setAttrs({
strength_mod: strengthMod,
intelligence_mod: intelligenceMod,
dexterity_mod: dexterityMod,
awareness_mod: awarenessMod,
luck_mod: luckMod,
resilience_mod: resilienceMod,
charisma_mod: charismaMod,
manaSpentMod: manaMod,
});
});
});
</script>