diff --git a/src/module/sheets/characterSheet.mjs b/src/module/sheets/characterSheet.mjs index d6b36946..a4319caf 100644 --- a/src/module/sheets/characterSheet.mjs +++ b/src/module/sheets/characterSheet.mjs @@ -24,7 +24,6 @@ import {StandaloneLiturgies} from "./character-standalone/liturgies.mjs"; import {StandaloneHealth} from "./character-standalone/health.mjs"; import {SpellDialog} from "../dialog/spellDialog.mjs"; import {displayRoll} from "../globals/displayRoll.js"; -import {evaluateRoll} from "../globals/DSARoll.mjs"; const {HandlebarsApplicationMixin, DocumentSheetV2} = foundry.applications.api const {ActorSheetV2} = foundry.applications.sheets @@ -57,6 +56,7 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) { openCombatAction: CharacterSheet.#openCombatAction, openLiturgyDialog: CharacterSheet.openLiturgyDialog, openSpellDialog: CharacterSheet.openSpellDialog, + openSkillDialog: CharacterSheet.openSkillDialog, castSpell: CharacterSheet.castSpell, progressCooldown: CharacterSheet.#progressCooldown, cancelCooldown: CharacterSheet.#cancelCooldown, @@ -262,6 +262,11 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) { this.document.itemTypes["Spell"]?.find(p => p.id === itemId)?.sheet.render(true) } + static openSkillDialog(event, target) { + const {itemId} = target.dataset + this.document.itemTypes["Skill"]?.find(p => p.id === itemId)?.sheet.render(true) + } + static castSpell(event, target) { const {itemId} = target.dataset new SpellDialog(this.document, itemId).render(true) diff --git a/src/module/sheets/spellSheet.mjs b/src/module/sheets/spellSheet.mjs index 66fecbf5..7073f9bd 100644 --- a/src/module/sheets/spellSheet.mjs +++ b/src/module/sheets/spellSheet.mjs @@ -72,6 +72,7 @@ export class SpellSheet extends HandlebarsApplicationMixin(DocumentSheetV2) { context.system = spellData.system; context.flags = spellData.flags; + context.name = spellData.name; return context; } diff --git a/src/style/organisms/_spell-sheet.scss b/src/style/organisms/_spell-sheet.scss new file mode 100644 index 00000000..8ea0b4d7 --- /dev/null +++ b/src/style/organisms/_spell-sheet.scss @@ -0,0 +1,54 @@ +.dsa41.sheet.item.spell { + + .meta-details { + + display: grid; + grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: 52px 52px 1fr; + + .name { + grid-row: 1; + grid-column: 1/span 3; + } + + .zfw { + grid-row: 2; + grid-column: 2; + } + + .probenmod { + grid-row: 2; + grid-column: 3; + } + + .statistics { + grid-row: 2; + grid-column: 1; + display: grid; + grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: auto 1fr; + + & > label { + grid-column: 1/4; + text-align: center; + } + } + + .effect { + grid-row: 3; + grid-column: 1/span 3; + display: flex; + flex-flow: column; + + label { + display: block; + } + + textarea { + display: block; + height: 100%; + resize: none; + } + } + } +} diff --git a/src/style/styles.scss b/src/style/styles.scss index 4e7a99fa..ea49c6b0 100644 --- a/src/style/styles.scss +++ b/src/style/styles.scss @@ -22,6 +22,7 @@ @use "organisms/equipment-sheet"; @use "organisms/creature-sheet"; @use "organisms/modify-liturgy"; +@use "organisms/spell-sheet"; @use "organisms/skill-sheet"; @use "organisms/active-effect-sheet"; @use "organisms/advantage-sheet"; diff --git a/src/templates/item/skill/tab-meta.hbs b/src/templates/item/skill/tab-meta.hbs index ebc0cf24..d78b1a1d 100644 --- a/src/templates/item/skill/tab-meta.hbs +++ b/src/templates/item/skill/tab-meta.hbs @@ -12,7 +12,7 @@