#68 clicking on a Spellname will open the Spell Dialog with a reduced but fixed display of inputs. Hides Complex inputs for now. This applies to Skillnames with Skill Dialogs as well.

main
macniel 2026-03-13 20:19:36 +01:00
parent 013967e066
commit 6470018c90
9 changed files with 97 additions and 26 deletions

View File

@ -24,7 +24,6 @@ import {StandaloneLiturgies} from "./character-standalone/liturgies.mjs";
import {StandaloneHealth} from "./character-standalone/health.mjs"; import {StandaloneHealth} from "./character-standalone/health.mjs";
import {SpellDialog} from "../dialog/spellDialog.mjs"; import {SpellDialog} from "../dialog/spellDialog.mjs";
import {displayRoll} from "../globals/displayRoll.js"; import {displayRoll} from "../globals/displayRoll.js";
import {evaluateRoll} from "../globals/DSARoll.mjs";
const {HandlebarsApplicationMixin, DocumentSheetV2} = foundry.applications.api const {HandlebarsApplicationMixin, DocumentSheetV2} = foundry.applications.api
const {ActorSheetV2} = foundry.applications.sheets const {ActorSheetV2} = foundry.applications.sheets
@ -57,6 +56,7 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
openCombatAction: CharacterSheet.#openCombatAction, openCombatAction: CharacterSheet.#openCombatAction,
openLiturgyDialog: CharacterSheet.openLiturgyDialog, openLiturgyDialog: CharacterSheet.openLiturgyDialog,
openSpellDialog: CharacterSheet.openSpellDialog, openSpellDialog: CharacterSheet.openSpellDialog,
openSkillDialog: CharacterSheet.openSkillDialog,
castSpell: CharacterSheet.castSpell, castSpell: CharacterSheet.castSpell,
progressCooldown: CharacterSheet.#progressCooldown, progressCooldown: CharacterSheet.#progressCooldown,
cancelCooldown: CharacterSheet.#cancelCooldown, cancelCooldown: CharacterSheet.#cancelCooldown,
@ -262,6 +262,11 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
this.document.itemTypes["Spell"]?.find(p => p.id === itemId)?.sheet.render(true) 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) { static castSpell(event, target) {
const {itemId} = target.dataset const {itemId} = target.dataset
new SpellDialog(this.document, itemId).render(true) new SpellDialog(this.document, itemId).render(true)

View File

@ -72,6 +72,7 @@ export class SpellSheet extends HandlebarsApplicationMixin(DocumentSheetV2) {
context.system = spellData.system; context.system = spellData.system;
context.flags = spellData.flags; context.flags = spellData.flags;
context.name = spellData.name;
return context; return context;
} }

View File

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

View File

@ -22,6 +22,7 @@
@use "organisms/equipment-sheet"; @use "organisms/equipment-sheet";
@use "organisms/creature-sheet"; @use "organisms/creature-sheet";
@use "organisms/modify-liturgy"; @use "organisms/modify-liturgy";
@use "organisms/spell-sheet";
@use "organisms/skill-sheet"; @use "organisms/skill-sheet";
@use "organisms/active-effect-sheet"; @use "organisms/active-effect-sheet";
@use "organisms/advantage-sheet"; @use "organisms/advantage-sheet";

View File

@ -12,7 +12,7 @@
</label> </label>
</div> </div>
<div class="taw"> <div class="taw">
<label>TAW: <label>TaW:
<input type="text" name="system.taw" <input type="text" name="system.taw"
value="{{system.taw}}"/> value="{{system.taw}}"/>
</label> </label>

View File

@ -1,24 +1,40 @@
<section class="tab {{tabs.meta.id}} {{tabs.meta.cssClass}}" <section class="tab {{tabs.meta.id}} {{tabs.meta.cssClass}}"
data-tab="{{tabs.meta.id}}" data-tab="{{tabs.meta.id}}"
data-group="{{tabs.meta.group}}"> data-group="{{tabs.meta.group}}">
<div> <div class="meta-details">
<div> <div class="name">
<label>Name <label>Name
<input type="text" name="name" <input type="text" name="name"
value="{{name}}"/> value="{{name}}"/>
</label> </label>
</div> </div>
<div> <div class="zfw">
<label>Probe <label>ZfW:
<input type="text" name="system.probe.0" <input type="text" name="system.zfw"
value="{{system.probe.[0]}}"/> value="{{system.zfw}}"/>
<input type="text" name="system.probe.1"
value="{{system.probe.[1]}}"/>
<input type="text" name="system.probe.2"
value="{{system.probe.[2]}}"/>
</label> </label>
</div> </div>
<div><label>Proben Modifikation <div class="statistics">
<label class="throw">Probe</label>
<div><label><input type="text" name="system.probe.0"
value="{{system.probe.[0]}}"/></label></div>
<div><label><input type="text" name="system.probe.1"
value="{{system.probe.[1]}}"/></label></div>
<div><label><input type="text" name="system.probe.2"
value="{{system.probe.[2]}}"/></label></div>
</div>
<div class="probenmod">
<label>Proben-Mod
<input type="text" name="system.probeMod"
value="{{system.probeMod}}"/>
</label>
</div>
<div class="effect">
<label for="wirkung">Wirkung</label>
<textarea id="wirkung" name="system.wirkung">{{system.wirkung}}</textarea>
</div>
<!--
<div><label>Proben Modifikation
<input type="text" name="system.probeMod" <input type="text" name="system.probeMod"
value="{{system.probeMod}}"/> value="{{system.probeMod}}"/>
</label></div> </label></div>
@ -33,16 +49,11 @@
<input type="text" name="system.kosten" value="{{system.kosten}}"/> <input type="text" name="system.kosten" value="{{system.kosten}}"/>
</label> </label>
</div> </div>
<div>
<label>Wirkung
<input type="text" name="system.wirkung" value="{{system.wirkung}}"/>
</label>
</div>
<div> <div>
<label>Wirkungsdauer <label>Wirkungsdauer
<input type="text" name="system.wirkungsdauer" value="{{system.wirkungsdauer}}"/> <input type="text" name="system.wirkungsdauer" value="{{system.wirkungsdauer}}"/>
</label> </label>
</div> </div>
-->
</div> </div>
</section> </section>

View File

@ -13,7 +13,7 @@
</span> </span>
</div> </div>
<div class="container"> <div class="container">
<span class="name" data-id="{{this.id}}">{{this.name}}</span> <span class="name" data-item-id="{{this.id}}" data-action="openSkillDialog">{{this.name}}</span>
<div class="werte"> <div class="werte">
{{#each this.werte}} {{#each this.werte}}
<div class="eigenschaft"><span class="name">{{this.name}}</span><span <div class="eigenschaft"><span class="name">{{this.name}}</span><span

View File

@ -13,7 +13,7 @@
</span> </span>
</div> </div>
<div class="container"> <div class="container">
<span class="name" data-id="{{this.id}}">{{this.name}}</span> <span class="name" data-item-id="{{this.id}}" data-action="openSkillDialog">{{this.name}}</span>
<div class="werte"> <div class="werte">
<div class="eigenschaft"><span class="name">Komp</span><span <div class="eigenschaft"><span class="name">Komp</span><span
class="value">{{this.komplexität}}</span></div> class="value">{{this.komplexität}}</span></div>

View File

@ -1,8 +1,7 @@
<div class="block rollable {{this.type}} {{this.gruppe}}" data-id="{{this.id}}" <div class="block rollable {{this.type}} {{this.gruppe}}" data-id="{{this.id}}">
data-action="rollCombatSkill" data-tooltip="{{this.name}}<br/>{{#if this.at}}AT: {{this.at}} {{/if}}{{#if
this.pa}}PA: {{this.pa}}{{/if}}<hr/><i class='fa-solid fa-computer-mouse'></i>: Attacke<br/><kbd>Shift</kbd>+<i class='fa-solid fa-computer-mouse'></i>: Parrieren">
<div class="die"> <div class="die" data-action="rollCombatSkill" data-tooltip="{{this.name}}<br/>{{#if this.at}}AT: {{this.at}} {{/if}}{{#if
this.pa}}PA: {{this.pa}}{{/if}}<hr/><i class='fa-solid fa-computer-mouse'></i>: Attacke<br/><kbd>Shift</kbd>+<i class='fa-solid fa-computer-mouse'></i>: Parrieren">
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
<span class="value" <span class="value"
data-id="{{this.id}}">{{#if this.taw}} data-id="{{this.id}}">{{#if this.taw}}
@ -15,7 +14,7 @@
</span> </span>
</div> </div>
<div class="container"> <div class="container">
<span class="name" data-id="{{this.id}}">{{this.name}}</span> <span class="name" data-item-id="{{this.id}}" data-action="openSkillDialog">{{this.name}}</span>
<div class="werte"> <div class="werte">
<div class="eigenschaft"><span class="name">AT</span><span class="value">{{this.at}}</span></div> <div class="eigenschaft"><span class="name">AT</span><span class="value">{{this.at}}</span></div>