displays costs that are too complex to calculate as text and also puts spell descriptions into details.
parent
fd003075da
commit
eebf7f3fd7
|
|
@ -211,7 +211,7 @@ export class SpellDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
})
|
||||
}
|
||||
|
||||
let message = this._spell.system.wirkung
|
||||
let message = `<details><summary>${this._spell.name}</summary>${this._spell.system.wirkung}</details>`
|
||||
if (this._activeVariants?.length > 0 ?? false) {
|
||||
message += "<hr/>"
|
||||
message += this._activeVariants.map(v => v.name).join(", ")
|
||||
|
|
@ -232,12 +232,19 @@ export class SpellDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
})
|
||||
}
|
||||
|
||||
if (this.cost) {
|
||||
message += `Kosten: [[/roll ${this.cost}]]{${this.cost}}`
|
||||
//TODO: get complex key from cost
|
||||
|
||||
|
||||
} else {
|
||||
if (this._costModel.complex) {
|
||||
message += `Kosten: ${this._costModel.complex}`
|
||||
}
|
||||
}
|
||||
message += "<hr/>" + this.zfp + " ZfP*<br/>" + this._spell.system.zfw + " ZfW"
|
||||
|
||||
if (Number.isNaN(this.castingTime)) {
|
||||
this.castingTime = 0
|
||||
}
|
||||
|
||||
let currentCooldown = 0
|
||||
if (game.combats.size === 0) { // no combat started
|
||||
currentCooldown = this.castingTime
|
||||
|
|
@ -635,6 +642,7 @@ export class SpellDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
context.notReadyReasons += `<li>${game.i18n.format("SPELL_DIALOG.notReadyReason.tooManySpoMods")}</li>`
|
||||
}
|
||||
if (!this._selectedRepresentation) {
|
||||
context.noSelectedRepresentation = true
|
||||
context.notReadyReasons += `<li>${game.i18n.format("SPELL_DIALOG.notReadyReason.noRepresentation")}</li>`
|
||||
}
|
||||
context.notReadyReasons += "</ul>"
|
||||
|
|
|
|||
|
|
@ -63,13 +63,13 @@
|
|||
</fieldset>
|
||||
{{/if}}
|
||||
|
||||
<button class="actions" data-action="diceRoll"><i class="fa-solid fa-dice"></i> Zauber würfeln {{#if
|
||||
<button class="actions" {{#unless noSelectedRepresentation}}data-action="diceRoll"{{else}} disabled="disabled"{{/unless}}><i class="fa-solid fa-dice"></i> Zauber würfeln {{#if
|
||||
displayModResult}}
|
||||
[{{displayModResult}}]{{/if}}</button>
|
||||
|
||||
{{else}}
|
||||
|
||||
<fieldset>
|
||||
<fieldset class="scroll-y">
|
||||
<legend>{{spellName}}</legend>
|
||||
{{{this.text}}}
|
||||
{{#if variant}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue