fixes inability to roll attack or parry.
parent
e79dad89a0
commit
b59be2e977
|
|
@ -35,6 +35,7 @@ export class CombatActionDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||||
selectTarget: CombatActionDialog.#onSelectTarget,
|
selectTarget: CombatActionDialog.#onSelectTarget,
|
||||||
selectWeaponAndSkill: CombatActionDialog.#onSelectWeaponAndSkill,
|
selectWeaponAndSkill: CombatActionDialog.#onSelectWeaponAndSkill,
|
||||||
selectManeuver: CombatActionDialog.#onSelectManeuver,
|
selectManeuver: CombatActionDialog.#onSelectManeuver,
|
||||||
|
attack: CombatActionDialog.#onAttack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -167,6 +168,10 @@ export class CombatActionDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||||
CombatActionDialog._instance.#processOnSubmitForm(event, form, formData)
|
CombatActionDialog._instance.#processOnSubmitForm(event, form, formData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async #onAttack(event, target) {
|
||||||
|
CombatActionDialog._instance.#processOnSubmitForm(event, this.element, new FormData(this.element))
|
||||||
|
}
|
||||||
|
|
||||||
_configureRenderOptions(options) {
|
_configureRenderOptions(options) {
|
||||||
super._configureRenderOptions(options)
|
super._configureRenderOptions(options)
|
||||||
if (options.window) {
|
if (options.window) {
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ export class DefenseActionDialog extends HandlebarsApplicationMixin(ApplicationV
|
||||||
actions: {
|
actions: {
|
||||||
selectWeaponAndSkill: DefenseActionDialog.#onSelectWeaponAndSkill,
|
selectWeaponAndSkill: DefenseActionDialog.#onSelectWeaponAndSkill,
|
||||||
selectManeuver: DefenseActionDialog.#onSelectManeuver,
|
selectManeuver: DefenseActionDialog.#onSelectManeuver,
|
||||||
|
defend: DefenseActionDialog.#onDefend,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,6 +105,10 @@ export class DefenseActionDialog extends HandlebarsApplicationMixin(ApplicationV
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async #onDefend(event, target) {
|
||||||
|
this.element.submit()
|
||||||
|
}
|
||||||
|
|
||||||
_configureRenderOptions(options) {
|
_configureRenderOptions(options) {
|
||||||
super._configureRenderOptions(options)
|
super._configureRenderOptions(options)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button type="button" {{#if ready}}class="ready" {{else}}data-tooltip="{{notReadyReason}}"{{/if}} type="submit"><i
|
<button type="button" data-action="attack" {{#if ready}}class="ready" {{else}}data-tooltip="{{notReadyReason}}"{{/if}}><i
|
||||||
class="fa-solid fa-swords"></i>Angreifen <span
|
class="fa-solid fa-swords"></i>Angreifen <span
|
||||||
class="value"></span></button>
|
class="value"></span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button type="button" {{#if ready}}class="ready" {{else}}data-tooltip="{{notReadyReason}}"{{/if}} type="submit"><i
|
<button type="button" data-action="defend" {{#if ready}}class="ready" {{else}}data-tooltip="{{notReadyReason}}"{{/if}}><i
|
||||||
class="fa-solid fa-shield"></i>Verteidigen <span
|
class="fa-solid fa-shield"></i>Verteidigen <span
|
||||||
class="value"></span></button>
|
class="value"></span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue