reroll OK

This commit is contained in:
rwanoux
2024-04-28 16:35:48 +02:00
parent 74e11d439c
commit 0fada335f4
85 changed files with 1273 additions and 435 deletions
+5 -6
View File
@@ -91,17 +91,16 @@ export class VermineActorSheet extends ActorSheet {
}
//click on wound radio
html.find('[type="radio"][data-wound]').click(ev => {
this._onWoundClick(ev)
html.find('.hexa [type="radio"]').click(ev => {
this._onClickRadioHexa(ev)
})
}
_onWoundClick(ev) {
_onClickRadioHexa(ev) {
if (!ev.currentTarget.checked) { return }
let woundType = ev.currentTarget.dataset.wound;
let targetProp = "system." + woundType + ".value";
let prop = ev.currentTarget.name;
let update = {};
update[targetProp] = ev.currentTarget.value - 1
update[prop] = ev.currentTarget.value - 1
this.actor.update(update)