beginning operation:health.
parent
bbf181eb8c
commit
47280f7216
|
|
@ -1,5 +1,3 @@
|
|||
import {ActionManager} from "../actions/action-manager.mjs";
|
||||
|
||||
export default {
|
||||
_prepareContext: async (context, object) => {
|
||||
|
||||
|
|
@ -15,9 +13,6 @@ export default {
|
|||
return object.items.get(object.system.heldenausruestung[setNumber]?.[slot])
|
||||
}
|
||||
|
||||
const am = new ActionManager(actorData)
|
||||
context.actions = am.evaluate().filter(action => action.type !== ActionManager.ATTACK)
|
||||
|
||||
context.inidice = actorData.system.ini.wuerfel
|
||||
context.inivalue = actorData.system.ini.aktuell
|
||||
context.inimod = actorData.system.ini.mod
|
||||
|
|
@ -32,6 +27,12 @@ export default {
|
|||
context.aspcurrent = actorData.system.asp.aktuell ?? 0
|
||||
context.kapcurrent = actorData.system.kap.aktuell ?? 0
|
||||
|
||||
context.effects = []
|
||||
for (let i = 0; i < actorData.appliedEffects.length; i++) {
|
||||
const item = actorData.appliedEffects[i]
|
||||
context.effects.push(item.name)
|
||||
}
|
||||
|
||||
return context
|
||||
|
||||
},
|
||||
|
|
@ -39,7 +40,7 @@ export default {
|
|||
|
||||
},
|
||||
_getTabConfig: (group) => {
|
||||
group.tabs.push({id: "combat", group: "sheet", label: "Kampf"})
|
||||
group.tabs.push({id: "health", group: "sheet", label: "Gesundheit"})
|
||||
},
|
||||
template: `systems/DSA_4-1/templates/actor/character/tab-combat.hbs`
|
||||
template: `systems/DSA_4-1/templates/actor/character/tab-health.hbs`
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import Advsf from "./character/advsf.mjs"
|
||||
import Combat from "./character/combat.mjs"
|
||||
import Health from "./character/health.mjs"
|
||||
import Effects from "./character/effects.mjs"
|
||||
import Equipment from "./character/equipment.mjs"
|
||||
import Liturgies from "./character/liturgies.mjs"
|
||||
|
|
@ -80,8 +80,8 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
advsf: {
|
||||
template: Advsf.template
|
||||
},
|
||||
combat: {
|
||||
template: Combat.template
|
||||
health: {
|
||||
template: Health.template
|
||||
},
|
||||
equipment: {
|
||||
template: Equipment.template,
|
||||
|
|
@ -329,7 +329,7 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
Meta._getTabConfig(tabs, this)
|
||||
Social._getTabConfig(tabs, this)
|
||||
Advsf._getTabConfig(tabs, this)
|
||||
Combat._getTabConfig(tabs, this)
|
||||
Health._getTabConfig(tabs, this)
|
||||
Equipment._getTabConfig(tabs, this)
|
||||
Skills._getTabConfig(tabs, this)
|
||||
Spells._getTabConfig(tabs, this)
|
||||
|
|
@ -572,8 +572,8 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
case "advsf":
|
||||
await Advsf._prepareContext(context, this.document)
|
||||
break
|
||||
case "combat":
|
||||
await Combat._prepareContext(context, this.document)
|
||||
case "health":
|
||||
await Health._prepareContext(context, this.document)
|
||||
break
|
||||
case "equipment":
|
||||
await Equipment._prepareContext(context, this.document, this)
|
||||
|
|
@ -598,7 +598,7 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
|||
Meta._onRender(context, options, this.element)
|
||||
Social._onRender(context, options, this.element)
|
||||
Advsf._onRender(context, options, this)
|
||||
Combat._onRender(context, options, this.element)
|
||||
Health._onRender(context, options, this.element)
|
||||
Effects._onRender(context, options, this.element)
|
||||
Equipment._onRender(context, options, this)
|
||||
Liturgies._onRender(context, options, this.element)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
@use "./character-tabs/social";
|
||||
@use "./character-tabs/advsf";
|
||||
@use "./character-tabs/inventory";
|
||||
@use "./character-tabs/combat";
|
||||
@use "./character-tabs/health";
|
||||
@use "./character-tabs/spells";
|
||||
@use "./character-tabs/liturgies";
|
||||
@use "./character-tabs/skills";
|
||||
|
|
@ -95,8 +95,8 @@
|
|||
@include inventory.tab;
|
||||
}
|
||||
|
||||
.tab.combat.active {
|
||||
@include combat.tab;
|
||||
.tab.health.active {
|
||||
@include health.tab;
|
||||
}
|
||||
|
||||
.tab.skills.active {
|
||||
|
|
@ -135,8 +135,8 @@
|
|||
@include inventory.tab(true);
|
||||
}
|
||||
|
||||
.tab.combat.active {
|
||||
@include combat.tab(true);
|
||||
.tab.health.active {
|
||||
@include health.tab(true);
|
||||
}
|
||||
|
||||
.tab.skills.active {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<section class="tab {{#if (or trefferzonen zonenruestung)}}zones{{/if}} {{tabs.combat.id}} {{tabs.combat.cssClass}}"
|
||||
data-tab="{{tabs.combat.id}}"
|
||||
data-group="{{tabs.combat.group}}">
|
||||
|
||||
<section class="tab {{#if (or trefferzonen zonenruestung)}}zones{{/if}} {{tabs.health.id}} {{tabs.health.cssClass}}"
|
||||
data-tab="{{tabs.health.id}}"
|
||||
data-group="{{tabs.health.group}}">
|
||||
<div class="combatline">
|
||||
|
||||
<div class="initiaitve" data-tooltip="{{fieldTooltip "ini" actorId}}">
|
||||
|
|
@ -55,23 +54,25 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
<div class="actions">
|
||||
<h3>Aktionen im Kampf</h3>
|
||||
<div class="grid-of-actions">
|
||||
<div class="player-action attack-action" data-mode="attack" data-action="openCombatAction">
|
||||
<span class="name">Angriff</span>
|
||||
<span class="time">variabel</span>
|
||||
</div>
|
||||
<div class="player-action defense-action" data-mode="defense" data-action="openCombatAction">
|
||||
<span class="name">Verteidigen</span>
|
||||
<span class="time">variabel</span>
|
||||
<div>
|
||||
<label>Überanstrengung
|
||||
<input type="number"/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{{#each this.actions}}
|
||||
{{> "systems/DSA_4-1/templates/ui/partial-action-button.hbs" this}}
|
||||
<div>
|
||||
<label>Erschöpfung
|
||||
<input type="number"/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>Einflüsse</label>
|
||||
<ul>
|
||||
{{#each effects}}
|
||||
<li>{{this}}</li>
|
||||
{{/each}}
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{#if (or trefferzonen zonenruestung)}}
|
||||
|
|
@ -111,5 +112,4 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
</section>
|
||||
Loading…
Reference in New Issue