fixe des hexa
This commit is contained in:
@@ -94,18 +94,18 @@ export class VermineActorSheet extends ActorSheet {
|
|||||||
//click on wound radio
|
//click on wound radio
|
||||||
html.find('.hexa [type="radio"]').change(ev => {
|
html.find('.hexa [type="radio"]').change(ev => {
|
||||||
ev.preventDefault()
|
ev.preventDefault()
|
||||||
console.log(ev.target.checked , "CHECK______________________")
|
console.log(ev.target.checked, "CHECK______________________")
|
||||||
return this._onClickRadioHexa(ev)
|
return this._onClickRadioHexa(ev)
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
_onClickRadioHexa(ev) {
|
_onClickRadioHexa(ev) {
|
||||||
console.log("________________iiiiiii")
|
console.log("________________iiiiiii")
|
||||||
if (!ev.currentTarget.checked) { return false};
|
if (!ev.currentTarget.checked) { return false };
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
let prop = ev.currentTarget.name;
|
let prop = ev.currentTarget.name;
|
||||||
let update = {};
|
let update = {};
|
||||||
update[prop] = ev.currentTarget.value-1
|
update[prop] = ev.currentTarget.value - 1
|
||||||
|
|
||||||
return this.actor.update(update)
|
return this.actor.update(update)
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export class VermineCharacterSheet extends VermineActorSheet {
|
|||||||
async _onClickTotemDice(ev) {
|
async _onClickTotemDice(ev) {
|
||||||
let el = ev.currentTarget;
|
let el = ev.currentTarget;
|
||||||
let totem = el.dataset.totemName;
|
let totem = el.dataset.totemName;
|
||||||
let value = parseInt(el.dataset.totemValue)||0;
|
let value = parseInt(el.dataset.totemValue) || 0;
|
||||||
|
|
||||||
let oldValue = this.actor.system.adaptation.totems[totem].value;
|
let oldValue = this.actor.system.adaptation.totems[totem].value;
|
||||||
if (value === oldValue) { value-- };
|
if (value === oldValue) { value-- };
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
2024/05/13-06:46:44.023 2f70 Recovering log #218
|
2024/05/14-08:36:37.222 21b8 Recovering log #220
|
||||||
2024/05/13-06:46:44.027 2f70 Delete type=0 #218
|
2024/05/14-08:36:37.226 21b8 Delete type=0 #220
|
||||||
2024/05/13-06:46:44.028 2f70 Delete type=3 #217
|
2024/05/14-08:36:37.226 21b8 Delete type=3 #219
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
2024/05/13-06:46:44.093 2f70 Recovering log #218
|
2024/05/14-08:36:37.280 21b8 Recovering log #220
|
||||||
2024/05/13-06:46:44.098 2f70 Delete type=0 #218
|
2024/05/14-08:36:37.285 21b8 Delete type=0 #220
|
||||||
2024/05/13-06:46:44.098 2f70 Delete type=3 #217
|
2024/05/14-08:36:37.285 21b8 Delete type=3 #219
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
2024/05/13-06:46:44.046 2f70 Recovering log #202
|
2024/05/14-08:36:37.241 21b8 Recovering log #204
|
||||||
2024/05/13-06:46:44.050 2f70 Delete type=0 #202
|
2024/05/14-08:36:37.245 21b8 Delete type=0 #204
|
||||||
2024/05/13-06:46:44.051 2f70 Delete type=3 #201
|
2024/05/14-08:36:37.245 21b8 Delete type=3 #203
|
||||||
|
|||||||
+3
-3
@@ -1,3 +1,3 @@
|
|||||||
2024/05/13-06:46:44.082 3304 Recovering log #216
|
2024/05/14-08:36:37.271 43b8 Recovering log #218
|
||||||
2024/05/13-06:46:44.087 3304 Delete type=0 #216
|
2024/05/14-08:36:37.275 43b8 Delete type=0 #218
|
||||||
2024/05/13-06:46:44.087 3304 Delete type=3 #215
|
2024/05/14-08:36:37.275 43b8 Delete type=3 #217
|
||||||
|
|||||||
+3
-3
@@ -1,3 +1,3 @@
|
|||||||
2024/05/13-06:46:44.056 3304 Recovering log #112
|
2024/05/14-08:36:37.251 43b8 Recovering log #114
|
||||||
2024/05/13-06:46:44.062 3304 Delete type=0 #112
|
2024/05/14-08:36:37.256 43b8 Delete type=0 #114
|
||||||
2024/05/13-06:46:44.062 3304 Delete type=3 #111
|
2024/05/14-08:36:37.256 43b8 Delete type=3 #113
|
||||||
|
|||||||
+3
-3
@@ -1,3 +1,3 @@
|
|||||||
2024/05/13-06:46:44.069 2f70 Recovering log #109
|
2024/05/14-08:36:37.261 21b8 Recovering log #111
|
||||||
2024/05/13-06:46:44.074 2f70 Delete type=0 #109
|
2024/05/14-08:36:37.266 21b8 Delete type=0 #111
|
||||||
2024/05/13-06:46:44.075 2f70 Delete type=3 #108
|
2024/05/14-08:36:37.266 21b8 Delete type=3 #110
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
2024/05/13-06:46:44.034 3304 Recovering log #216
|
2024/05/14-08:36:37.231 43b8 Recovering log #218
|
||||||
2024/05/13-06:46:44.038 3304 Delete type=0 #216
|
2024/05/14-08:36:37.236 43b8 Delete type=0 #218
|
||||||
2024/05/13-06:46:44.039 3304 Delete type=3 #215
|
2024/05/14-08:36:37.236 43b8 Delete type=3 #217
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{#repeat @row @root.SCIndex "case"}}
|
{{#repeat @row @root.SCIndex "case"}}
|
||||||
{{log @root.SCIndex}}
|
|
||||||
<div class="hexa
|
<div class="hexa
|
||||||
{{#iflteq @case @root.system.attributes.self_control.value }}
|
{{#iflteq @case @root.system.attributes.self_control.value }}
|
||||||
checked
|
checked
|
||||||
@@ -26,10 +25,7 @@
|
|||||||
{{#iflteq @row @root.system.attributes.self_control.max }}
|
{{#iflteq @row @root.system.attributes.self_control.max }}
|
||||||
<input type="radio" data-dtype="Number"
|
<input type="radio" data-dtype="Number"
|
||||||
name="system.attributes.self_control.value"
|
name="system.attributes.self_control.value"
|
||||||
value="{{@case}}" {{#ife
|
value="{{@case}}"
|
||||||
@root.system.attributes.self_control.value
|
|
||||||
@root.selfControlIndex
|
|
||||||
}}checked="checked"{{/ife}}
|
|
||||||
class="
|
class="
|
||||||
{{#iflteq @case @root.system.attributes.self_control.max }}
|
{{#iflteq @case @root.system.attributes.self_control.max }}
|
||||||
checked
|
checked
|
||||||
@@ -61,7 +57,6 @@
|
|||||||
|
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{#repeat @row @root.EffIndex "case"}}
|
{{#repeat @row @root.EffIndex "case"}}
|
||||||
{{log @root.EffIndex}}
|
|
||||||
<div class="hexa
|
<div class="hexa
|
||||||
{{#iflteq @case @root.system.attributes.effort.value }}
|
{{#iflteq @case @root.system.attributes.effort.value }}
|
||||||
checked
|
checked
|
||||||
@@ -72,10 +67,7 @@
|
|||||||
{{#iflteq @row @root.system.attributes.effort.max }}
|
{{#iflteq @row @root.system.attributes.effort.max }}
|
||||||
<input type="radio" data-dtype="Number"
|
<input type="radio" data-dtype="Number"
|
||||||
name="system.attributes.effort.value"
|
name="system.attributes.effort.value"
|
||||||
value="{{@case}}" {{#ife
|
value="{{@case}}"
|
||||||
@root.system.attributes.effort.value
|
|
||||||
@root.selfControlIndex
|
|
||||||
}}checked="checked"{{/ife}}
|
|
||||||
class="
|
class="
|
||||||
{{#iflteq @case @root.system.attributes.effort.max }}
|
{{#iflteq @case @root.system.attributes.effort.max }}
|
||||||
checked
|
checked
|
||||||
@@ -100,14 +92,14 @@
|
|||||||
system.minorWound.threshold }})</span>
|
system.minorWound.threshold }})</span>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{#repeat system.minorWound.max 1 "minorwoundmax"}}
|
{{#repeat system.minorWound.max 1 "minorwoundmax"}}
|
||||||
<div class="hexa ability{{#iflteq @index @root.system.minorWound.value }}
|
<div
|
||||||
|
class="hexa ability{{#iflteq @minorwoundmax @root.system.minorWound.value }}
|
||||||
checked
|
checked
|
||||||
{{/iflteq}}">
|
{{/iflteq}}">
|
||||||
<input type="radio" data-dtype="Number" name="system.minorWound.value"
|
<input type="radio" data-dtype="Number" name="system.minorWound.value"
|
||||||
value="{{@index}}" {{#ife @root.system.minorWound.value @index
|
value="{{@minorwoundmax}}" data-wound="minorWound"
|
||||||
}}checked="checked"{{/ife}} data-wound="minorWound"
|
|
||||||
class="
|
class="
|
||||||
{{#iflteq @index @root.system.minorWound.value }}
|
{{#iflteq @minorwoundmax @root.system.minorWound.value }}
|
||||||
checked
|
checked
|
||||||
{{/iflteq}}
|
{{/iflteq}}
|
||||||
|
|
||||||
@@ -120,15 +112,15 @@
|
|||||||
<span>({{
|
<span>({{
|
||||||
system.majorWound.threshold }})</span>
|
system.majorWound.threshold }})</span>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{#repeat system.majorWound.max 1 majourwoundmax}}
|
{{#repeat system.majorWound.max 1 "majourwoundmax"}}
|
||||||
<div class="hexa ability{{#iflteq @index @root.system.majorWound.value }}
|
<div
|
||||||
|
class="hexa ability{{#iflteq @majourwoundmax @root.system.majorWound.value }}
|
||||||
checked
|
checked
|
||||||
{{/iflteq}}">
|
{{/iflteq}}">
|
||||||
<input type="radio" data-dtype="Number" name="system.majorWound.value"
|
<input type="radio" data-dtype="Number" name="system.majorWound.value"
|
||||||
value="{{@index}}" {{#ife @root.system.majorWound.value @index
|
value="{{@majourwoundmax}}" data-wound="majorWound"
|
||||||
}}checked="checked"{{/ife}} data-wound="majorWound"
|
|
||||||
class="
|
class="
|
||||||
{{#iflteq @index @root.system.majorWound.value }}
|
{{#iflteq @majourwoundmax @root.system.majorWound.value }}
|
||||||
checked
|
checked
|
||||||
{{/iflteq}}
|
{{/iflteq}}
|
||||||
|
|
||||||
@@ -139,23 +131,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="row mdb">{{ localize 'VERMINE.wounds.deadly'}}
|
<li class="row mdb">{{ localize 'VERMINE.wounds.deadly'}}
|
||||||
<span>({{system.deadlyWound.threshold }})</span>
|
<span>({{
|
||||||
|
system.deadlyWound.threshold }})</span>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{#repeat system.deadlyWound.max 1 "deadlywoundmax"}}
|
{{#repeat system.deadlyWound.max 1 "deadlywoundmax"}}
|
||||||
<div class="hexa ability{{#iflteq @index @root.system.deadlyWound.value }}
|
<div
|
||||||
|
class="hexa ability{{#iflteq @deadlywoundmax @root.system.deadlyWound.value }}
|
||||||
checked
|
checked
|
||||||
{{/iflteq}}">
|
{{/iflteq}}">
|
||||||
<input type="radio" data-dtype="Number" name="system.deadlyWound.value"
|
<input type="radio" data-dtype="Number" name="system.deadlyWound.value"
|
||||||
value="{{@index}}" {{#ife @root.system.deadlyWound.value @index
|
value="{{@deadlywoundmax}}" data-wound="deadlyWound"
|
||||||
}}checked="checked"{{/ife}} data-wound="deadlyWound"
|
|
||||||
class="
|
class="
|
||||||
{{#iflteq @index @root.system.deadlyWound.value }}
|
{{#iflteq @deadlywoundmax @root.system.deadlyWound.value }}
|
||||||
checked
|
checked
|
||||||
{{/iflteq}}
|
{{/iflteq}}
|
||||||
|
|
||||||
" />
|
" />
|
||||||
</div>
|
</div>
|
||||||
{{/repeat}}
|
{{/repeat}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -25,8 +25,9 @@
|
|||||||
<div class="totem-dice flexrow flex-group-center">
|
<div class="totem-dice flexrow flex-group-center">
|
||||||
<div class="human-dice flexrow">
|
<div class="human-dice flexrow">
|
||||||
{{#repeat system.adaptation.totems.human.max 1 "humantotem"}}
|
{{#repeat system.adaptation.totems.human.max 1 "humantotem"}}
|
||||||
<div class="hexa" data-totem-name="human" data-totem-value="{{@index}}">
|
<div class="hexa" data-totem-name="human"
|
||||||
{{#ifgteq system.adaptation.totems.human.value @index}}
|
data-totem-value="{{@humantotem}}">
|
||||||
|
{{#ifgteq system.adaptation.totems.human.value @humantotem}}
|
||||||
<div class="human-die"><i class="fas fa-dice-d10"></i></div>
|
<div class="human-die"><i class="fas fa-dice-d10"></i></div>
|
||||||
{{/ifgteq}}
|
{{/ifgteq}}
|
||||||
</div>
|
</div>
|
||||||
@@ -35,8 +36,9 @@
|
|||||||
|
|
||||||
<div class="adapted-dice flexrow">
|
<div class="adapted-dice flexrow">
|
||||||
{{#repeat system.adaptation.totems.adapted.max 1 "adaptedtotem"}}
|
{{#repeat system.adaptation.totems.adapted.max 1 "adaptedtotem"}}
|
||||||
<div class="hexa" data-totem-name="adapted" data-totem-value="{{@index}}">
|
<div class="hexa" data-totem-name="adapted"
|
||||||
{{#ifgteq system.adaptation.totems.adapted.value @index}}
|
data-totem-value="{{@adaptedtotem}}">
|
||||||
|
{{#ifgteq system.adaptation.totems.adapted.value @adaptedtotem}}
|
||||||
<div class="adapted-die"><i class="fas fa-dice-d10"></i></div>
|
<div class="adapted-die"><i class="fas fa-dice-d10"></i></div>
|
||||||
{{/ifgteq}}</div>
|
{{/ifgteq}}</div>
|
||||||
{{/repeat}}
|
{{/repeat}}
|
||||||
|
|||||||
Reference in New Issue
Block a user