forked from AlpenYeti/sys_d10
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Todo and utils.txt
93 lines (81 loc) · 5.06 KB
/
Todo and utils.txt
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
//Variables a initialiser par parse
/*
var nb_dices=0;
Action a a e d
var all_dices d*
var nb_2add=0; //+
var nb_2sub=0; //-
var relances=0; //r
Perfection P
Defense
Défense_impénétrable I 1
Défense_impénétrable I 2 - Rappel
Défense_impénétrable I 4
Rempart_parfait R
Offense
Technique_martiale M 1
Technique_martiale M 2
Coup_déchirant D
Fauchage F
Exploiter_les_points_faibles E 1
Exploiter_les_points_faibles E 2 - Rappel
Exploiter_les_points_faibles E 4
Spécial
Tir_précis T 1
Tir_précis T 2
Tir_implacable i
Charge C
Charge_indomptable N - (Sur la feuille de perso)
Seuil s
On Hit crit H
Attribute values A
Encaissement S
*/
// SKILLNAME
on("change:skill_SKILLNAME_activation change:general_skilllevel_SKILLNAME", function() {
getAttrs(["skill_SKILLNAME_activation", "general_skilllevel_SKILLNAME"], function(values) {
setAttrs({"general_effective_SKILLNAME":values.skill_SKILLNAME_activation*values.general_skilllevel_SKILLNAME});
});
});
<!--SKILLNAME -->
<input class="sheet-skill_name" style="margin-right: 4px;" type="text" name="attr_general_skill_SKILLNAME" disabled="true" value="SKILLNAME" title="Nom de la compétence" />
<input type="number" min="0" value= "0" name="attr_skillcost_SKILLNAME" title="Coût de la compétence"/>
<input class="sheet-skill_name" value= "0" style="margin-right: 4px;" type="number" min="0" max="10" name="attr_general_skilllevel_SKILLNAME" title="Niveau dans la compétence" />
<select class="sheet-skill_select" style="margin-right:4px" name="attr_Skill_general_attribute_select_SKILLNAME"><option value="@{base-Force} + @{exal-Force}">For</option><option value="@{base-Agilite} + @{exal-Agilite}">Agi</option><option value="@{base-Perception} + @{exal-Perception}">Per</option><option value="@{base-Charisme} + @{exal-Charisme}">Cha</option><option value="@{base-Intelligence} + @{exal-Intelligence}">Int</option><option value="@{base-Perception} + @{exal-Perception}">Per</option><option value="@{base-Volonte} + @{exal-Volonte}">Vol</option><option value="@{base-Psyche} + @{exal-Psyche}">Psy</option><option value="@{base-Chance} + @{exal-Chance}">Chn</option></select>
<button type='roll' class="sheet-skillbutton" value="/e fait un jet de @{general_skill_SKILLNAME} [[(@{general_skilllevel_SKILLNAME}+(@{Skill_general_attribute_select_SKILLNAME}) - d@{dice})]] "></button>
<input type="checkbox" class="sheet-skill_activation" style="margin-right: 4px;" value="1" name="attr_skill_SKILLNAME_activation" />
<input class="sheet-skill_hidden" value= "0" type="number" name="attr_general_effective_SKILLNAME"/>
<!--FIELD_TYPE -->
<fieldset class="repeating_FIELD_TYPE-skills">
<input class="sheet-skill_name" type="text" name="attr_FIELD_TYPE_skillname" title="Nom de la compétence" />
<input type="number" name="attr_FIELD_TYPE_skillcost" title="Coût de la compétence" />
<input type="number" min="-10" max="10" name="attr_FIELD_TYPE_skilllevel" title="Niveau dans la compétence" />
<select class="sheet-skill_select" name="attr_FIELD_TYPE_attribute_select">
<option value="@{base-Force} + @{exal-Force}">For</option>
<option value="@{base-Agilite} + @{exal-Agilite}">Agi</option>
<option value="@{base-Perception} + @{exal-Perception}">Per</option>
<option value="@{base-Charisme} + @{exal-Charisme}">Cha</option>
<option value="@{base-Intelligence} + @{exal-Intelligence}">Int</option>
<option value="@{base-Perception} + @{exal-Perception}">Per</option>
<option value="@{base-Volonte} + @{exal-Volonte}">Vol</option>
<option value="@{base-Psyche} + @{exal-Psyche}">Psy</option>
<option value="@{base-Chance} + @{exal-Chance}">Chn</option>
</select>
<button type='roll' class="sheet-skillbutton" value="/e fait un jet de @{FIELD_TYPE_skillname} au d@{dice} [[@{FIELD_TYPE_skilllevel}+(@{FIELD_TYPE_attribute_select}) - d@{dice}]]"></button>
</fieldset>
<!--shield3 -->
<input class="sheet-skill_name" style="margin-right: 0px;" type="text" name="attr_general_item_shield3_name" value="shield3" />
<input class="sheet-skill_name" value="0" style="margin-right: 0px;" type="number" name="attr_general_item_shield3" title="Valeur de l'équipemet" />
<input type="checkbox" class="sheet-skill_activation" value="1" name="attr_item_shield3_activation" />
<input class="sheet-skill_hidden" value="0" type="number" name="attr_general_effective_shield3" />
// shield3
on("change:item_shield3_activation change:general_item_shield3", function() {
getAttrs(["item_shield3_activation", "general_item_shield3"], function(values) {
setAttrs({"general_effective_shield3":values.item_shield3_activation*values.general_item_shield3});
});
});
name roll_name dice_name result threshold
/e - Test d.+(\w*).*\[\[(.*)-.*\]\]
&{template:d10skillcheck}{{name=@{character_name}} {{roll_name=$1}} {{dice_name=@{dice}}} {{result=$2}} {{threshold=[[]]}}
/e .* @{(\w*)}.*\[(.*) -.*\)?\]\]
&{template:d10skillcheck}{{name=@{character_name}}} {{roll_name=@{$1}}} {{dice_name=@{dice}}} {{result=[[$2-d@{dice}cs1cf@{dice}]]}} {{threshold=[[$2]]}}