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