Compare commits
No commits in common. "9ce299a202578e0706dedb6eed99032da6cd8826" and "db4428938b33252831185427caca90afcf3fc3a4" have entirely different histories.
9ce299a202
...
db4428938b
|
|
@ -9,10 +9,8 @@ export default {
|
|||
context.name = context.derived.name ?? actorData.name
|
||||
context.effects = actorData.effects ?? []
|
||||
context.advantages = []
|
||||
context.flaws = []
|
||||
|
||||
actorData.itemTypes.Advantage.forEach((item) => {
|
||||
if (!item.system.schlechteEigenschaft) {
|
||||
context.advantages.push({
|
||||
id: item._id,
|
||||
name: item.name,
|
||||
|
|
@ -23,18 +21,6 @@ export default {
|
|||
isDisadvantage: item.system.nachteil,
|
||||
isBadAttribute: item.system.schlechteEigenschaft
|
||||
})
|
||||
} else {
|
||||
context.flaws.push({
|
||||
id: item._id,
|
||||
name: item.name,
|
||||
value: item.system.value,
|
||||
options: item.system.auswahl,
|
||||
description: item.system.description,
|
||||
isAdvantage: !item.system.nachteil,
|
||||
isDisadvantage: item.system.nachteil,
|
||||
isBadAttribute: item.system.schlechteEigenschaft
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
actions: {
|
||||
rollCombatSkill: CharacterSheet.#rollCombatSkill,
|
||||
rollSkill: CharacterSheet.#rollSkill,
|
||||
rollFlaw: CharacterSheet.#rollFlaw,
|
||||
roll: CharacterSheet.#dieRoll,
|
||||
editImage: DocumentSheetV2.DEFAULT_OPTIONS.actions.editImage,
|
||||
openEmbeddedDocument: CharacterSheet.#openEmbeddedDocument,
|
||||
|
|
@ -46,7 +45,6 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
cancelCooldown: CharacterSheet.#cancelCooldown,
|
||||
activateCooldown: CharacterSheet.#activateCooldown,
|
||||
rest: CharacterSheet.#startResting,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -117,10 +115,10 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
}
|
||||
}
|
||||
|
||||
static #dieRoll(event, target) {
|
||||
static #dieRoll(event) {
|
||||
event.preventDefault()
|
||||
const {roll} = target.dataset
|
||||
if (roll) {
|
||||
const dataset = event.currentTarget.dataset
|
||||
if (dataset.roll) {
|
||||
let label = dataset.label ? `[Attribut] ${dataset.label}` : ''
|
||||
let roll = new Roll(dataset.roll, this.actor.getRollData())
|
||||
roll.toMessage({
|
||||
|
|
@ -132,24 +130,6 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
}
|
||||
}
|
||||
|
||||
static async #rollFlaw(event, target) {
|
||||
event.preventDefault()
|
||||
const {itemId} = target.dataset
|
||||
if (itemId) {
|
||||
const flaw = this.document.items.get(itemId)
|
||||
if (flaw) {
|
||||
const target = flaw.system.value
|
||||
let roll = await new Roll(`1d20`).evaluate()
|
||||
let diff = target - roll.terms[0].results[0].result
|
||||
roll.toMessage({
|
||||
speaker: ChatMessage.getSpeaker({actor: this.actor}),
|
||||
flavor: `Schlechte Eigenschaft: ${flaw.name}<br/>Ergebnis: ${Math.abs(diff)}${diff > 0 ? " übrig" : " daneben"}`,
|
||||
rollMode: game.settings.get('core', 'rollMode'),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static async #progressCooldown(event, target) {
|
||||
const {cooldownId} = target.dataset
|
||||
const cooldowns = this.document.system.cooldowns
|
||||
|
|
|
|||
|
|
@ -18,10 +18,9 @@ export class LiturgySheet extends HandlebarsApplicationMixin(DocumentSheetV2) {
|
|||
static TABS = {
|
||||
sheet: {
|
||||
tabs: [
|
||||
{id: 'meta', group: 'sheet', label: 'Meta'},
|
||||
{id: 'commonality', group: 'sheet', label: 'Verbreitung'},
|
||||
{id: 'json', group: 'sheet', label: 'JSON'},
|
||||
],
|
||||
initial: 'meta'
|
||||
initial: 'json'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -30,12 +29,9 @@ export class LiturgySheet extends HandlebarsApplicationMixin(DocumentSheetV2) {
|
|||
form: {
|
||||
template: `systems/DSA_4-1/templates/item/liturgy/main-sheet.hbs`
|
||||
},
|
||||
meta: {
|
||||
template: `systems/DSA_4-1/templates/item/liturgy/tab-meta.hbs`
|
||||
json: {
|
||||
template: `systems/DSA_4-1/templates/item/liturgy/tab-json.hbs`
|
||||
},
|
||||
commonality: {
|
||||
template: `systems/DSA_4-1/templates/item/liturgy/tab-commonality.hbs`
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -54,12 +50,12 @@ export class LiturgySheet extends HandlebarsApplicationMixin(DocumentSheetV2) {
|
|||
/** @override */
|
||||
async _prepareContext(options) {
|
||||
const context = await super._prepareContext(options);
|
||||
|
||||
const liturgyData = context.document;
|
||||
|
||||
context.system = liturgyData.system
|
||||
context.flags = liturgyData.flags
|
||||
context.name = liturgyData.name
|
||||
context.json = JSON.stringify(liturgyData)
|
||||
context.system = liturgyData.system;
|
||||
context.flags = liturgyData.flags;
|
||||
context.json = JSON.stringify(liturgyData);
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
content: '';
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -1px;
|
||||
bottom: 0;
|
||||
height: 3px;
|
||||
background: assets.$tab-background;
|
||||
z-index: 5;
|
||||
|
|
|
|||
|
|
@ -1,136 +0,0 @@
|
|||
.dsa41.item.liturgy {
|
||||
|
||||
|
||||
.tab.meta.active {
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
div.head {
|
||||
flex: 0;
|
||||
height: unset;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: unset;
|
||||
margin: 8px;
|
||||
|
||||
label {
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: 120px 1fr;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
|
||||
span {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
input {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fieldset {
|
||||
flex: 1;
|
||||
margin: 8px;
|
||||
|
||||
.auswirkungen {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.auswirkung {
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.rank {
|
||||
padding-right: 8px;
|
||||
text-align: center;
|
||||
display: block;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tab.commonality.active > section {
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 8px;
|
||||
gap: 8px;
|
||||
|
||||
.commonalities {
|
||||
flex: 1;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
height: unset;
|
||||
display: unset;
|
||||
padding: unset;
|
||||
|
||||
.commonality {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 16px;
|
||||
height: 16px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
button {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
min-height: unset;
|
||||
|
||||
&:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fieldset {
|
||||
flex: 0;
|
||||
|
||||
div.content {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 0.5fr;
|
||||
grid-template-rows: 54px 32px;
|
||||
gap: 8px;
|
||||
|
||||
label {
|
||||
|
||||
span {
|
||||
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
gap: 8px;
|
||||
}
|
||||
|
||||
.advantages, .special-abilities, .flaws {
|
||||
.advantages, .special-abilities {
|
||||
margin-bottom: 16px;
|
||||
|
||||
ul {
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.advantage, .special-ability, .flaw {
|
||||
.advantage, .special-ability {
|
||||
position: relative;
|
||||
border: 1px solid gold;
|
||||
box-shadow: 2px 2px 4px #000;
|
||||
|
|
@ -63,29 +63,6 @@
|
|||
margin-left: 8px;
|
||||
}
|
||||
|
||||
&.flaw {
|
||||
position: relative;
|
||||
margin-left: 24px;
|
||||
|
||||
.die {
|
||||
|
||||
path {
|
||||
fill: #6a24d8ff;
|
||||
}
|
||||
|
||||
position: absolute;
|
||||
left: -24px;
|
||||
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
background: rgba(106, 36, 216, 0.5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&.disadvantage {
|
||||
font-style: italic;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,4 +33,3 @@
|
|||
@use "organisms/merchant-sheet";
|
||||
@use "organisms/resting-dialog";
|
||||
@use "organisms/battle-dialog";
|
||||
@use "organisms/liturgy-sheet";
|
||||
|
|
@ -2,14 +2,6 @@
|
|||
data-tab="{{tabs.advsf.id}}"
|
||||
data-group="{{tabs.advsf.group}}">
|
||||
<div class="advantages-and-specialabilities">
|
||||
<div class="flaws">
|
||||
<h3>Schlechte Eigenschaften</h3>
|
||||
<ul>
|
||||
{{#each this.flaws}}
|
||||
<li>{{> "systems/DSA_4-1/templates/ui/partial-advantage-button.hbs" this}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="advantages">
|
||||
<h3>Vor- und Nachteile</h3>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
|
||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}" data-action="openEmbeddedDocument">
|
||||
<td class="clickable" data-id="{{this.id}}" data-action="openActorSheet">
|
||||
{{this.name}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
|
||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}" data-action="openEmbeddedDocument">
|
||||
<td class="clickable" data-id="{{this.id}}" data-action="openActorSheet">
|
||||
{{this.name}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}"
|
||||
data-action="openEmbeddedDocument">{{this.name}}</td>
|
||||
data-action="openActorSheet">{{this.name}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}"
|
||||
data-action="openEmbeddedDocument">{{this.name}}</td>
|
||||
data-action="openActorSheet">{{this.name}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}"
|
||||
data-action="openEmbeddedDocument">{{this.name}}</td>
|
||||
data-action="openActorSheet">{{this.name}}</td>
|
||||
</tr>
|
||||
{{/each}}{{/if}}
|
||||
{{#if this.countV}}
|
||||
|
|
@ -133,7 +133,7 @@
|
|||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}"
|
||||
data-action="openEmbeddedDocument">{{this.name}}</td>
|
||||
data-action="openActorSheet">{{this.name}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}"
|
||||
data-action="openEmbeddedDocument">{{this.name}}</td>
|
||||
data-action="openActorSheet">{{this.name}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{/if}}{{#if this.countVII}}
|
||||
|
|
@ -170,7 +170,7 @@
|
|||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}"
|
||||
data-action="openEmbeddedDocument">{{this.name}}</td>
|
||||
data-action="openActorSheet">{{this.name}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{/if}}{{#if this.countVIII}}
|
||||
|
|
@ -188,7 +188,7 @@
|
|||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</td>
|
||||
<td class="clickable" data-id="{{this.id}}"
|
||||
data-action="openEmbeddedDocument">{{this.name}}</td>
|
||||
data-action="openActorSheet">{{this.name}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,4 @@
|
|||
<div>
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs{{#if verticalTabs}} vertical{{/if}}"
|
||||
aria-roledescription="{{localize "SHEETS.FormNavLabel"}}">
|
||||
{{#each tabs as |tab|}}
|
||||
<a data-action="tab" data-group="{{tab.group}}" data-tab="{{tab.id}}"
|
||||
{{#if tab.cssClass}}class="{{tab.cssClass}}"{{/if}}
|
||||
{{#if tab.tooltip}}data-tooltip="{{tab.tooltip}}"{{/if}}>
|
||||
{{#if tab.icon}}<i class="{{tab.icon}}" inert></i>{{/if}}
|
||||
{{#if tab.label}}<span>{{localize tab.label}}</span>{{/if}}
|
||||
</a>
|
||||
{{/each}}
|
||||
</nav>
|
||||
<!-- TODO Add this sheet with meaningful options -->
|
||||
Alveranische Baustelle, bitte gehen Sie weiter, hier gibt es nichts zu sehen.
|
||||
</div>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<section class="tab {{tabs.commonality.id}} {{tabs.commonality.cssClass}}"
|
||||
data-tab="{{tabs.commonality.id}}"
|
||||
data-group="{{tabs.commonality.group}}">
|
||||
|
||||
<section>
|
||||
|
||||
{{#if editable}}
|
||||
<fieldset>
|
||||
<legend>Neue Verbreitung</legend>
|
||||
<div class="content">
|
||||
<label><span>Gottheit</span>
|
||||
<input name="deity" type="text"/>
|
||||
</label>
|
||||
<label><span>Grad</span>
|
||||
<input name="grad" type="number" min="0" max="7" step="1"/>
|
||||
</label>
|
||||
<div class="actions">
|
||||
<button data-action="addCommonality"><i class="fa-solid fa-plus"></i> Hinzugefügen</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
|
||||
<div class="commonalities">
|
||||
{{#each system.herkunft}}
|
||||
<div class="commonality">
|
||||
<span class="deity">{{this.name}}</span>
|
||||
<span class="rank">Grad {{grad}}</span>
|
||||
{{#if ../editable}}
|
||||
<button class="action" data-action="removeCommonality" data-id="{{@key}}"><i
|
||||
class="fa-solid fa-xmark"></i></button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
<section class="tab {{tabs.meta.id}} {{tabs.meta.cssClass}}"
|
||||
data-tab="{{tabs.meta.id}}"
|
||||
data-group="{{tabs.meta.group}}">
|
||||
|
||||
<div class="head">
|
||||
<label><span>Name:</span>
|
||||
<input type="text" name="name" value="{{name}}">
|
||||
</label>
|
||||
<label><span>Reichweite:</span>
|
||||
<input type="text" name="system.reichweite" value="{{system.reichweite}}">
|
||||
</label>
|
||||
<label><span>Ziel:</span>
|
||||
<input type="text" name="system.ziel" value="{{system.ziel}}">
|
||||
</label>
|
||||
<label><span>Wirkungsdauer:</span>
|
||||
<input type="text" name="system.wirkungsdauer" value="{{system.wirkungsdauer}}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Grade der Liturgie</legend>
|
||||
<div class="auswirkungen">
|
||||
{{#if system.auswirkung.I}}
|
||||
<div class="auswirkung">
|
||||
<span class="rank">I</span>
|
||||
<div class="text">{{system.auswirkung.I}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if system.auswirkung.II}}
|
||||
<div class="auswirkung">
|
||||
<span class="rank">II</span>
|
||||
<div class="text">{{system.auswirkung.II}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if system.auswirkung.III}}
|
||||
<div class="auswirkung">
|
||||
<span class="rank">III</span>
|
||||
<div class="text">{{system.auswirkung.III}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if system.auswirkung.IV}}
|
||||
<div class="auswirkung">
|
||||
<span class="rank">IV</span>
|
||||
<div class="text">{{system.auswirkung.IV}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if system.auswirkung.V}}
|
||||
<div class="auswirkung">
|
||||
<span class="rank">V</span>
|
||||
<div class="text">{{system.auswirkung.V}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if system.auswirkung.VI}}
|
||||
<div class="auswirkung">
|
||||
<span class="rank">VI</span>
|
||||
<div class="text">{{system.auswirkung.VI}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if system.auswirkung.VII}}
|
||||
<div class="auswirkung">
|
||||
<span class="rank">VII</span>
|
||||
<div class="text">{{system.auswirkung.VII}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if system.auswirkung.VIII}}
|
||||
<div class="auswirkung">
|
||||
<span class="rank">VIII</span>
|
||||
<div class="text">{{system.auswirkung.VIII}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</section>
|
||||
|
||||
|
|
@ -1,15 +1,4 @@
|
|||
{{#if this.isBadAttribute}}
|
||||
<div class="flaw">
|
||||
<div class="die" data-action="rollFlaw" data-item-id="{{this.id}}">
|
||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||
</div>
|
||||
<span class="name" data-action="openEmbeddedDocument" data-item-id="{{this.id}}">{{this.name}} {{#if
|
||||
this.value}}
|
||||
: {{this.value}}{{/if}}</span>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="advantage {{#if isDisadvantage}}disadvantage{{/if}}">
|
||||
<span class="name" data-action="openEmbeddedDocument" data-item-id="{{this.id}}">{{this.name}} {{#if this.value}}
|
||||
: {{this.value}}{{/if}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue