Compare commits
No commits in common. "013967e0666aec12db56e085228a2bcc8f0d57af" and "b459c96961f8070c164704830efd49570e887e68" have entirely different histories.
013967e066
...
b459c96961
|
|
@ -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
|
||||||
|
|
@ -74,8 +73,7 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
openStandaloneLiturgies: CharacterSheet.#openStandaloneLiturgies,
|
openStandaloneLiturgies: CharacterSheet.#openStandaloneLiturgies,
|
||||||
openStandaloneHealth: CharacterSheet.#openStandaloneHealth,
|
openStandaloneHealth: CharacterSheet.#openStandaloneHealth,
|
||||||
setWounds: CharacterSheet.#setWounds,
|
setWounds: CharacterSheet.#setWounds,
|
||||||
switchSet: CharacterSheet.#switchSet,
|
switchSet: CharacterSheet.#switchSet
|
||||||
openInitiative: CharacterSheet.#openInitiative,
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -159,18 +157,6 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
new AttributeDialog(this.document, target.dataset.itemId).render(true)
|
new AttributeDialog(this.document, target.dataset.itemId).render(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add combat statistics and dialog
|
|
||||||
static async #openInitiative(event, target) {
|
|
||||||
const {formula} = target.dataset
|
|
||||||
const evaluated = await new Roll(formula.replace("w", "d")).evaluate()
|
|
||||||
const context = {
|
|
||||||
formula,
|
|
||||||
initiativeRolled: evaluated.terms[0].results[0].result,
|
|
||||||
total: evaluated.total
|
|
||||||
}
|
|
||||||
await displayRoll(evaluated, game.user, this.document, false, false, 'systems/DSA_4-1/templates/chat/initiative-message.hbs', context)
|
|
||||||
}
|
|
||||||
|
|
||||||
static async #progressCooldown(event, target) {
|
static async #progressCooldown(event, target) {
|
||||||
const {cooldownId} = target.dataset
|
const {cooldownId} = target.dataset
|
||||||
const cooldowns = this.document.system.cooldowns
|
const cooldowns = this.document.system.cooldowns
|
||||||
|
|
@ -370,7 +356,6 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
await this.document.update(formData.object)
|
await this.document.update(formData.object)
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -734,8 +719,6 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
Liturgies._onRender(context, options, this.element)
|
Liturgies._onRender(context, options, this.element)
|
||||||
Skills._onRender(context, options, this.element)
|
Skills._onRender(context, options, this.element)
|
||||||
Spells._onRender(context, options, this.element)
|
Spells._onRender(context, options, this.element)
|
||||||
|
|
||||||
this._onPosition(this.position)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async _canDragDrop() {
|
async _canDragDrop() {
|
||||||
|
|
|
||||||
|
|
@ -97,17 +97,10 @@ $rollable_colours_font: (
|
||||||
top: 0;
|
top: 0;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
padding-left: 24px;
|
padding-left: 24px;
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
|
|
||||||
span.name {
|
span.name {
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
text-wrap: nowrap;
|
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
word-break: break-all;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,13 +45,13 @@
|
||||||
|
|
||||||
{{#if this.hasLiturgies}}
|
{{#if this.hasLiturgies}}
|
||||||
<div class="sidebar-element resource-bar">
|
<div class="sidebar-element resource-bar">
|
||||||
<label>KaP: {{this.kapcurrent}}</label><span class="resource-fill kap" style="width: {{this.keper}}%"></span>
|
<label>KaP: {{this.ke}}</label><span class="resource-fill kap" style="width: {{this.keper}}%"></span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if this.hasSpells}}
|
{{#if this.hasSpells}}
|
||||||
<div class="sidebar-element resource-bar">
|
<div class="sidebar-element resource-bar">
|
||||||
<label>AsP: {{this.aspcurrent}}</label><span class="resource-fill asp" style="width: {{this.aspper}}%"></span>
|
<label>AsP: {{this.asp}}</label><span class="resource-fill asp" style="width: {{this.aspper}}%"></span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
@ -91,8 +91,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if this.ini}}
|
{{#if this.ini}}
|
||||||
<div data-tooltip="{{localize "WEAPON.initiative" weapon=this.name}}"
|
<div data-tooltip="{{localize "WEAPON.initiative" weapon=this.name}}"
|
||||||
class="ini sidebar-element rollable" data-action="openInitiative" data-formula="{{this.ini}}">
|
class="ini sidebar-element rollable" data-action="openInitiative"><label>INI</label>
|
||||||
<label>INI</label>
|
|
||||||
<div class="formula">{{this.ini}}</div>
|
<div class="formula">{{this.ini}}</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<div>
|
|
||||||
<div>Formel: {{formula}}</div>
|
|
||||||
<div>Gewürfelt: {{initiativeRolled}}</div>
|
|
||||||
<hr/>
|
|
||||||
<div>Initiative: {{total}}</div>
|
|
||||||
</div>
|
|
||||||
Loading…
Reference in New Issue