fixe des hexa

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