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-- };