Compare commits

..

3 Commits

Author SHA1 Message Date
macniel 85403fbc0a Merge remote-tracking branch 'origin/main' 2026-03-14 14:46:03 +01:00
macniel f4b4233dcb fixes close on submit 2026-03-14 14:45:50 +01:00
macniel b59be2e977 fixes inability to roll attack or parry. 2026-03-14 14:43:07 +01:00
4 changed files with 15 additions and 2 deletions

View File

@ -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
} }
} }
@ -165,6 +166,12 @@ export class CombatActionDialog extends HandlebarsApplicationMixin(ApplicationV2
event.preventDefault() event.preventDefault()
CombatActionDialog._instance.#processOnSubmitForm(event, form, formData) CombatActionDialog._instance.#processOnSubmitForm(event, form, formData)
this.close()
}
static async #onAttack(event, target) {
CombatActionDialog._instance.#processOnSubmitForm(event, this.element, new FormData(this.element))
this.close()
} }
_configureRenderOptions(options) { _configureRenderOptions(options) {

View File

@ -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,
} }
} }
@ -102,6 +103,11 @@ export class DefenseActionDialog extends HandlebarsApplicationMixin(ApplicationV
targetNumber: this._targetNumber, targetNumber: this._targetNumber,
modDescription: maneuver?.modDescription?.replace("{}", "" + this._mod) ?? "" modDescription: maneuver?.modDescription?.replace("{}", "" + this._mod) ?? ""
}) })
this.close()
}
static async #onDefend(event, target) {
this.element.submit()
} }
_configureRenderOptions(options) { _configureRenderOptions(options) {

View File

@ -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>

View File

@ -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>