adds styling to charactersheet, adds rudimentary activeffects management and handles armor value and handicaps based on equipped set and its equipped items
parent
91e225809a
commit
bd9e20d962
Binary file not shown.
|
After Width: | Height: | Size: 500 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
22
src/main.mjs
22
src/main.mjs
|
|
@ -16,6 +16,10 @@ import {CreatureSheet} from "./module/sheets/creatureSheet.mjs";
|
||||||
import {LiturgySheet} from "./module/sheets/liturgySheet.mjs";
|
import {LiturgySheet} from "./module/sheets/liturgySheet.mjs";
|
||||||
import {LiturgyDataModel} from "./module/data/liturgy.mjs";
|
import {LiturgyDataModel} from "./module/data/liturgy.mjs";
|
||||||
import {BlessingDataModel} from "./module/data/blessing.mjs";
|
import {BlessingDataModel} from "./module/data/blessing.mjs";
|
||||||
|
import {SpecialAbilityDataModel} from "./module/data/specialAbility.mjs";
|
||||||
|
import {SpecialAbilitySheet} from "./module/sheets/specialAbilitySheet.mjs";
|
||||||
|
import {ActiveEffectSheet} from "./module/sheets/ActiveEffectSheet.mjs";
|
||||||
|
import {ActiveEffectDataModel} from "./module/data/activeeffect.mjs";
|
||||||
|
|
||||||
async function preloadHandlebarsTemplates() {
|
async function preloadHandlebarsTemplates() {
|
||||||
return loadTemplates([
|
return loadTemplates([
|
||||||
|
|
@ -26,6 +30,7 @@ async function preloadHandlebarsTemplates() {
|
||||||
'systems/DSA_4-1/templates/ui/partial-talent-editable.hbs',
|
'systems/DSA_4-1/templates/ui/partial-talent-editable.hbs',
|
||||||
'systems/DSA_4-1/templates/ui/partial-die.hbs',
|
'systems/DSA_4-1/templates/ui/partial-die.hbs',
|
||||||
'systems/DSA_4-1/templates/ui/partial-advantage-button.hbs',
|
'systems/DSA_4-1/templates/ui/partial-advantage-button.hbs',
|
||||||
|
'systems/DSA_4-1/templates/ui/partial-sf-button.hbs',
|
||||||
'systems/DSA_4-1/templates/ui/partial-action-button.hbs',
|
'systems/DSA_4-1/templates/ui/partial-action-button.hbs',
|
||||||
'systems/DSA_4-1/templates/ui/partial-equipment-button.hbs',
|
'systems/DSA_4-1/templates/ui/partial-equipment-button.hbs',
|
||||||
'systems/DSA_4-1/templates/ui/partial-equipment-group-button.hbs',
|
'systems/DSA_4-1/templates/ui/partial-equipment-group-button.hbs',
|
||||||
|
|
@ -56,7 +61,9 @@ Hooks.once("init", () => {
|
||||||
Advantage: VornachteileDataModel,
|
Advantage: VornachteileDataModel,
|
||||||
Equipment: EquipmentDataModel,
|
Equipment: EquipmentDataModel,
|
||||||
Liturgy: LiturgyDataModel,
|
Liturgy: LiturgyDataModel,
|
||||||
Blessing: BlessingDataModel
|
Blessing: BlessingDataModel,
|
||||||
|
SpecialAbility: SpecialAbilityDataModel,
|
||||||
|
ActiveEffect: ActiveEffectDataModel,
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG.Combat.initiative = {
|
CONFIG.Combat.initiative = {
|
||||||
|
|
@ -100,15 +107,26 @@ Hooks.once("init", () => {
|
||||||
})
|
})
|
||||||
Items.registerSheet('dsa41.equipment', AusruestungSheet, {
|
Items.registerSheet('dsa41.equipment', AusruestungSheet, {
|
||||||
types: ["Equipment"],
|
types: ["Equipment"],
|
||||||
makeDefault: true,
|
makeDefault: false,
|
||||||
label: 'DSA41.AusruestungLabels.Item'
|
label: 'DSA41.AusruestungLabels.Item'
|
||||||
})
|
})
|
||||||
Items.registerSheet('dsa41.liturgy', LiturgySheet, {
|
Items.registerSheet('dsa41.liturgy', LiturgySheet, {
|
||||||
|
types: ["SpecialAbility"],
|
||||||
|
makeDefault: true,
|
||||||
|
label: 'DSA41.SpecialAbilityLabels.Item'
|
||||||
|
})
|
||||||
|
Items.registerSheet('dsa41.specialAbility', SpecialAbilitySheet, {
|
||||||
types: ["Liturgy"],
|
types: ["Liturgy"],
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
label: 'DSA41.LiturgyLabels.Item'
|
label: 'DSA41.LiturgyLabels.Item'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Items.registerSheet('dsa41.activeEffect', ActiveEffectSheet, {
|
||||||
|
types: ['ActiveEffect'],
|
||||||
|
makeDefault: true,
|
||||||
|
label: 'DSA41.ActiveEffectLabels.ActiveFfect'
|
||||||
|
})
|
||||||
|
|
||||||
return preloadHandlebarsTemplates();
|
return preloadHandlebarsTemplates();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
|
const {ArrayField, NumberField, StringField, HTMLField} = foundry.data.fields;
|
||||||
|
|
||||||
|
export class ActiveEffectDataModel extends BaseItem {
|
||||||
|
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
name: new StringField({required: true}),
|
||||||
|
notes: new HTMLField(),
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
|
||||||
|
name: String, // Name of Vornachteil will be used for rendering and referencing by other Items
|
||||||
|
description: HTMLString, // only used for rendering
|
||||||
|
variant: [String]?, // variant name of Vornachteil e.g. "Mut" in the case of "Herausragende Eigenschaft"
|
||||||
|
levels: [Number]?, // available levels e.g. 1, 2 in the case of "Flink"
|
||||||
|
mods: [
|
||||||
|
{
|
||||||
|
level: Number?, // in reference to level of the Vornachteil, is null when it does not have any levels or is the only modification
|
||||||
|
field: String, // Reference to Actor Data e.g. "FF" maps to "FF.mod"
|
||||||
|
value: Number, // value of the Modification e.g. "+2" maps to 2
|
||||||
|
requirement: {
|
||||||
|
field: String // Reference to Actor Data e.g. "BE" maps "be.aktuell"
|
||||||
|
operation: String // Supported: "<=", ">"
|
||||||
|
value: Number // Target Value the referenced field has to compare against
|
||||||
|
}? // optional when the mod does not have an active requirement
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
_onCreate(data, options, userId) {
|
||||||
|
super._onCreate(data, options, userId);
|
||||||
|
if (this.parent.getEmbeddedCollection("ActiveEffect").contents.length === 0) {
|
||||||
|
|
||||||
|
|
||||||
|
this.parent.createEmbeddedDocuments("ActiveEffect", [{
|
||||||
|
name: data.name,
|
||||||
|
changes: [],
|
||||||
|
duration: {},
|
||||||
|
icon: this.img,
|
||||||
|
}]);
|
||||||
|
console.log("added default activeffect");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -20,16 +20,17 @@ export class PlayerCharacterDataModel extends foundry.abstract.TypeDataModel {
|
||||||
professions: new ArrayField(new StringField()),
|
professions: new ArrayField(new StringField()),
|
||||||
geschlecht: new StringField(),
|
geschlecht: new StringField(),
|
||||||
haarfarbe: new StringField(),
|
haarfarbe: new StringField(),
|
||||||
groesse: new NumberField({required: true, integer: false}),
|
groesse: new StringField(),
|
||||||
augenfarbe: new StringField(),
|
augenfarbe: new StringField(),
|
||||||
geburtstag: new StringField(),
|
geburtstag: new StringField(),
|
||||||
alter: new NumberField({required: true, integer: true}),
|
alter: new StringField(),
|
||||||
gewicht: new NumberField({required: true, integer: true}),
|
gewicht: new StringField(),
|
||||||
aussehen: new HTMLField(),
|
aussehen: new HTMLField(),
|
||||||
familie: new HTMLField(),
|
familie: new HTMLField(),
|
||||||
titel: new StringField(),
|
titel: new StringField(),
|
||||||
stand: new StringField(),
|
stand: new StringField(),
|
||||||
}),
|
}),
|
||||||
|
setEquipped: new NumberField({required: true, initial: 0, max: 3, integer: true}),
|
||||||
ini: new SchemaField({
|
ini: new SchemaField({
|
||||||
aktuell: new NumberField({required: true, integer: true, initial: 0}),
|
aktuell: new NumberField({required: true, integer: true, initial: 0}),
|
||||||
mod: new NumberField({required: true, integer: true, initial: 0}),
|
mod: new NumberField({required: true, integer: true, initial: 0}),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
|
const {BooleanField, NumberField, SchemaField, ArrayField, StringField, HTMLField} = foundry.data.fields;
|
||||||
|
|
||||||
|
export class SpecialAbilityDataModel extends BaseItem {
|
||||||
|
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
name: new StringField()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -50,14 +50,50 @@ export class Character extends Actor {
|
||||||
|
|
||||||
systemData.ini.aktuell = Math.round((mu + mu + _in + ge) / 5) + systemData.ini.mod;
|
systemData.ini.aktuell = Math.round((mu + mu + _in + ge) / 5) + systemData.ini.mod;
|
||||||
systemData.mr.aktuell = Math.round((mu + kl + ko) / 5) + systemData.mr.mod;
|
systemData.mr.aktuell = Math.round((mu + kl + ko) / 5) + systemData.mr.mod;
|
||||||
// evaluate deities for KaP
|
|
||||||
|
|
||||||
systemData.rs = 0;
|
systemData.rs = 0;
|
||||||
|
systemData.be = 0;
|
||||||
|
|
||||||
|
// map current set to RS and BE
|
||||||
|
|
||||||
|
const ausruestung = systemData.heldenausruestung[systemData.setEquipped];
|
||||||
|
if (ausruestung) {
|
||||||
|
if (ausruestung.brust) {
|
||||||
|
systemData.rs += systemData.parent.items.get(ausruestung.brust).system.armorValue ?? 0
|
||||||
|
systemData.be += systemData.parent.items.get(ausruestung.brust).system.armorHandicap ?? 0
|
||||||
|
}
|
||||||
|
if (ausruestung.bauch) {
|
||||||
|
systemData.rs += systemData.parent.items.get(ausruestung.bauch).system.armorValue ?? 0
|
||||||
|
systemData.be += systemData.parent.items.get(ausruestung.bauch).system.armorHandicap ?? 0
|
||||||
|
}
|
||||||
|
if (ausruestung.ruecken) {
|
||||||
|
systemData.rs += systemData.parent.items.get(ausruestung.ruecken).system.armorValue ?? 0
|
||||||
|
systemData.be += systemData.parent.items.get(ausruestung.ruecken).system.armorHandicap ?? 0
|
||||||
|
}
|
||||||
|
if (ausruestung.armlinks) {
|
||||||
|
systemData.rs += systemData.parent.items.get(ausruestung.armlinks).system.armorValue ?? 0
|
||||||
|
systemData.be += systemData.parent.items.get(ausruestung.armlinks).system.armorHandicap ?? 0
|
||||||
|
}
|
||||||
|
if (ausruestung.armrechts) {
|
||||||
|
systemData.rs += systemData.parent.items.get(ausruestung.armrechts).system.armorValue ?? 0
|
||||||
|
systemData.be += systemData.parent.items.get(ausruestung.armrechts).system.armorHandicap ?? 0
|
||||||
|
}
|
||||||
|
if (ausruestung.beinlinks) {
|
||||||
|
systemData.rs += systemData.parent.items.get(ausruestung.beinlinks).system.armorValue ?? 0
|
||||||
|
systemData.be += systemData.parent.items.get(ausruestung.beinlinks).system.armorHandicap ?? 0
|
||||||
|
}
|
||||||
|
if (ausruestung.beinrechts) {
|
||||||
|
systemData.rs += systemData.parent.items.get(ausruestung.beinrechts).system.armorValue ?? 0
|
||||||
|
systemData.be += systemData.parent.items.get(ausruestung.beinrechts).system.armorHandicap ?? 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
systemData.kap.max = 0;
|
systemData.kap.max = 0;
|
||||||
const deities = systemData.parent.items.filter(p => p.type === "Blessing")
|
|
||||||
|
|
||||||
|
// evaluate deities for KaP
|
||||||
|
|
||||||
|
const deities = systemData.parent.items.filter(p => p.type === "Blessing")
|
||||||
deities?.forEach((deity) => {
|
deities?.forEach((deity) => {
|
||||||
if (LiturgyData.alverans.includes(deity.system.gottheit)) {
|
if (LiturgyData.alverans.includes(deity.system.gottheit)) {
|
||||||
systemData.kap.max = 24;
|
systemData.kap.max = 24;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
export class SpecialAbility extends Item {
|
||||||
|
/**
|
||||||
|
* Augment the basic Item data model with additional dynamic data.
|
||||||
|
*/
|
||||||
|
prepareData() {
|
||||||
|
super.prepareData();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
export class ActiveEffectSheet extends ItemSheet {
|
||||||
|
/**@override */
|
||||||
|
static get defaultOptions() {
|
||||||
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
|
classes: ['dsa41', 'sheet', 'activeeffect'],
|
||||||
|
width: 520,
|
||||||
|
height: 480
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
get template() {
|
||||||
|
return `systems/DSA_4-1/templates/item/item-activeeffect-sheet.hbs`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
getData() {
|
||||||
|
// Retrieve the data structure from the base sheet. You can inspect or log
|
||||||
|
// the context variable to see the structure, but some key properties for
|
||||||
|
// sheets are the actor object, the data object, whether or not it's
|
||||||
|
// editable, the items array, and the effects array.
|
||||||
|
const context = super.getData();
|
||||||
|
const effects = context.document.getEmbeddedCollection("ActiveEffect").contents;
|
||||||
|
if (effects.length > 0) {
|
||||||
|
context.effectId = effects[0]._id;
|
||||||
|
}
|
||||||
|
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
|
||||||
|
// Everything below here is only needed if the sheet is editable
|
||||||
|
if (!this.isEditable) return;
|
||||||
|
|
||||||
|
html.on('click', '.editEffects', (evt) => {
|
||||||
|
const {id} = evt.currentTarget.dataset;
|
||||||
|
const effect = this.object.effects.get(id);
|
||||||
|
effect.sheet.render(true);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -39,10 +39,14 @@ export class CharacterSheet extends ActorSheet {
|
||||||
return characterSheet.#handleDroppedSkill(actor, document); // on false cancel this whole operation
|
return characterSheet.#handleDroppedSkill(actor, document); // on false cancel this whole operation
|
||||||
case "Advantage":
|
case "Advantage":
|
||||||
return characterSheet.#handleDroppedAdvantage(actor, document);
|
return characterSheet.#handleDroppedAdvantage(actor, document);
|
||||||
|
case "ActiveEffect":
|
||||||
|
return characterSheet.#handleDroppedActiveEffect(actor, document);
|
||||||
case "Equipment":
|
case "Equipment":
|
||||||
return characterSheet.#handleDroppedEquipment(actor, document);
|
return characterSheet.#handleDroppedEquipment(actor, document);
|
||||||
case "Liturgy":
|
case "Liturgy":
|
||||||
return characterSheet.#handleDroppedLiturgy(actor, document);
|
return characterSheet.#handleDroppedLiturgy(actor, document);
|
||||||
|
case "SpecialAbility":
|
||||||
|
return characterSheet.#handleDroppedSpecialAbility(actor, document);
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -117,10 +121,14 @@ export class CharacterSheet extends ActorSheet {
|
||||||
context.system = actorData.system;
|
context.system = actorData.system;
|
||||||
context.flags = actorData.flags;
|
context.flags = actorData.flags;
|
||||||
context.derived = context.document.system;
|
context.derived = context.document.system;
|
||||||
|
context.originalName = actorData.name;
|
||||||
|
context.name = context.derived.name ?? actorData.name;
|
||||||
|
context.effects = actorData.effects ?? [];
|
||||||
|
|
||||||
this.#addSkillsToContext(context)
|
this.#addSkillsToContext(context)
|
||||||
this.#addAdvantagesToContext(context)
|
this.#addAdvantagesToContext(context)
|
||||||
this.#addAttributesToContext(context)
|
this.#addSpecialAbilitiesToContext(context)
|
||||||
|
await this.#addAttributesToContext(context)
|
||||||
this.#addEquipmentsToContext(context)
|
this.#addEquipmentsToContext(context)
|
||||||
await this.#addCombatStatistics(context)
|
await this.#addCombatStatistics(context)
|
||||||
this.#addActionsToContext(context)
|
this.#addActionsToContext(context)
|
||||||
|
|
@ -158,56 +166,79 @@ export class CharacterSheet extends ActorSheet {
|
||||||
context.hasSpells = context.spells.length > 0;
|
context.hasSpells = context.spells.length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#addAttributesToContext(context) {
|
async #getModsOfAttribute(keyPath) {
|
||||||
const actorData = context.data;
|
let returnValue = [];
|
||||||
|
Array.from(this.object.appliedEffects).forEach(
|
||||||
|
(e) =>
|
||||||
|
e.changes.filter(c => c.key === keyPath).forEach(change => {
|
||||||
|
returnValue.push({
|
||||||
|
name: e.name,
|
||||||
|
value: change.value > 0 ? "+" + change.value : "" + change.value,
|
||||||
|
icon: e.icon,
|
||||||
|
})
|
||||||
|
}))
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
async #addAttributesToContext(context) {
|
||||||
|
context.mods = {
|
||||||
|
"mu": await this.#getModsOfAttribute('system.attribute.mu.mod'),
|
||||||
|
"kl": await this.#getModsOfAttribute('system.attribute.kl.mod'),
|
||||||
|
"in": await this.#getModsOfAttribute('system.attribute.in.mod'),
|
||||||
|
"ch": await this.#getModsOfAttribute('system.attribute.ch.mod'),
|
||||||
|
"ff": await this.#getModsOfAttribute('system.attribute.ff.mod'),
|
||||||
|
"ge": await this.#getModsOfAttribute('system.attribute.ge.mod'),
|
||||||
|
"ko": await this.#getModsOfAttribute('system.attribute.ko.mod'),
|
||||||
|
"kk": await this.#getModsOfAttribute('system.attribute.kk.mod')
|
||||||
|
}
|
||||||
context.attributes = [
|
context.attributes = [
|
||||||
{
|
{
|
||||||
eigenschaft: "mu",
|
eigenschaft: "mu",
|
||||||
name: "MU",
|
name: "MU",
|
||||||
tooltip: "Mut",
|
tooltip: "Mut",
|
||||||
wert: actorData.system.attribute.mu.aktuell ?? 0,
|
wert: (context.derived.attribute.mu.aktuell + context.derived.attribute.mu.mod) ?? 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
eigenschaft: "kl",
|
eigenschaft: "kl",
|
||||||
name: "KL",
|
name: "KL",
|
||||||
tooltip: "Klugheit",
|
tooltip: "Klugheit",
|
||||||
wert: actorData.system.attribute.kl.aktuell ?? 0,
|
wert: (context.derived.attribute.kl.aktuell + context.derived.attribute.kl.mod) ?? 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
eigenschaft: "in",
|
eigenschaft: "in",
|
||||||
name: "IN",
|
name: "IN",
|
||||||
tooltip: "Intuition",
|
tooltip: "Intuition",
|
||||||
wert: actorData.system.attribute.in.aktuell ?? 0,
|
wert: (context.derived.attribute.in.aktuell + context.derived.attribute.in.mod) ?? 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
eigenschaft: "ch",
|
eigenschaft: "ch",
|
||||||
name: "CH",
|
name: "CH",
|
||||||
tooltip: "Charisma",
|
tooltip: "Charisma",
|
||||||
wert: actorData.system.attribute.ch.aktuell ?? 0,
|
wert: (context.derived.attribute.ch.aktuell + context.derived.attribute.ch.mod) ?? 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
eigenschaft: "ff",
|
eigenschaft: "ff",
|
||||||
name: "FF",
|
name: "FF",
|
||||||
tooltip: "Fingerfertigkeit",
|
tooltip: "Fingerfertigkeit",
|
||||||
wert: actorData.system.attribute.ff.aktuell ?? 0,
|
wert: (context.derived.attribute.ff.aktuell + context.derived.attribute.ff.mod) ?? 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
eigenschaft: "ge",
|
eigenschaft: "ge",
|
||||||
name: "GE",
|
name: "GE",
|
||||||
tooltip: "Geschicklichkeit",
|
tooltip: "Geschicklichkeit",
|
||||||
wert: actorData.system.attribute.ge.aktuell ?? 0,
|
wert: (context.derived.attribute.ge.aktuell + context.derived.attribute.ge.mod) ?? 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
eigenschaft: "ko",
|
eigenschaft: "ko",
|
||||||
name: "KO",
|
name: "KO",
|
||||||
tooltip: "Konstitution",
|
tooltip: "Konstitution",
|
||||||
wert: actorData.system.attribute.ko.aktuell ?? 0,
|
wert: (context.derived.attribute.ko.aktuell + context.derived.attribute.ko.mod) ?? 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
eigenschaft: "kk",
|
eigenschaft: "kk",
|
||||||
name: "KK",
|
name: "KK",
|
||||||
tooltip: "Körperkraft",
|
tooltip: "Körperkraft",
|
||||||
wert: actorData.system.attribute.kk.aktuell ?? 0,
|
wert: (context.derived.attribute.kk.aktuell + context.derived.attribute.kk.mod) ?? 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
@ -231,12 +262,22 @@ export class CharacterSheet extends ActorSheet {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#findEquipmentOnSlot(slot, setNumber) {
|
#addSpecialAbilitiesToContext(context) {
|
||||||
return this.object.items.get(this.object.system.heldenausruestung[setNumber][slot])
|
context.specialAbilities = [];
|
||||||
|
const actorData = context.data;
|
||||||
|
Object.values(actorData.items).forEach((item) => {
|
||||||
|
if (item.type === "SpecialAbility") {
|
||||||
|
context.specialAbilities.push({
|
||||||
|
id: item._id,
|
||||||
|
name: item.name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#findTalentsOfEquipment(equipment) {
|
#findEquipmentOnSlot(slot, setNumber) {
|
||||||
|
return this.object.items.get(this.object.system.heldenausruestung[setNumber]?.[slot])
|
||||||
}
|
}
|
||||||
|
|
||||||
#addActionsToContext(context) {
|
#addActionsToContext(context) {
|
||||||
|
|
@ -244,14 +285,16 @@ export class CharacterSheet extends ActorSheet {
|
||||||
context.actions = am.evaluate()
|
context.actions = am.evaluate()
|
||||||
}
|
}
|
||||||
|
|
||||||
#isWorn(itemId, setId) {
|
#isWorn(itemId) {
|
||||||
|
|
||||||
const slots = PlayerCharacterDataModel.getSlots()
|
const slots = PlayerCharacterDataModel.getSlots()
|
||||||
const set = this.object.system.heldenausruestung[setId]
|
const set = this.object.system.heldenausruestung[this.object.system.setEquipped]
|
||||||
for (const slot of slots) {
|
if (set) {
|
||||||
const equipmentSlotId = set[slot]
|
for (const slot of slots) {
|
||||||
if (equipmentSlotId === itemId) {
|
const equipmentSlotId = set[slot]
|
||||||
return slot
|
if (equipmentSlotId === itemId) {
|
||||||
|
return slot
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -273,9 +316,9 @@ export class CharacterSheet extends ActorSheet {
|
||||||
|
|
||||||
context.aupcurrent = context.actor.system.aup.aktuell ?? 0
|
context.aupcurrent = context.actor.system.aup.aktuell ?? 0
|
||||||
|
|
||||||
const fernkampf = this.#findEquipmentOnSlot("fernkampf", 0)
|
const fernkampf = this.#findEquipmentOnSlot("fernkampf", context.actor.system.setEquipped)
|
||||||
const links = this.#findEquipmentOnSlot("links", 0)
|
const links = this.#findEquipmentOnSlot("links", context.actor.system.setEquipped)
|
||||||
const rechts = this.#findEquipmentOnSlot("rechts", 0)
|
const rechts = this.#findEquipmentOnSlot("rechts", context.actor.system.setEquipped)
|
||||||
context.attacks = [];
|
context.attacks = [];
|
||||||
|
|
||||||
if (fernkampf) {
|
if (fernkampf) {
|
||||||
|
|
@ -344,16 +387,24 @@ export class CharacterSheet extends ActorSheet {
|
||||||
context.carryingweight = 0;
|
context.carryingweight = 0;
|
||||||
Object.values(actorData.items).forEach((item, index) => {
|
Object.values(actorData.items).forEach((item, index) => {
|
||||||
if (item.type === "Equipment") {
|
if (item.type === "Equipment") {
|
||||||
|
|
||||||
|
// worn items are halved weight
|
||||||
|
|
||||||
|
let effectiveWeight = item.system.weight ?? 0
|
||||||
|
if (this.#isWorn(item._id)) {
|
||||||
|
effectiveWeight = item.system.weight ? item.system.weight / 2 : 0
|
||||||
|
}
|
||||||
|
|
||||||
context.equipments.push({
|
context.equipments.push({
|
||||||
index: index,
|
index: index,
|
||||||
id: item._id,
|
id: item._id,
|
||||||
quantity: item.system.quantity,
|
quantity: item.system.quantity,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
icon: item.img ?? "",
|
icon: item.img ?? "",
|
||||||
weight: item.system.weight ?? 0,
|
weight: item.system.weight,
|
||||||
worn: this.#isWorn(item._id, 0)
|
worn: this.#isWorn(item._id)
|
||||||
})
|
})
|
||||||
context.carryingweight += item.system.quantity * item.system.weight;
|
context.carryingweight += item.system.quantity * effectiveWeight;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
context.maxcarryingcapacity = actorData.system.attribute.kk.aktuell
|
context.maxcarryingcapacity = actorData.system.attribute.kk.aktuell
|
||||||
|
|
@ -698,6 +749,20 @@ export class CharacterSheet extends ActorSheet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async #handleDroppedActiveEffect(actor, activeEffect) {
|
||||||
|
const array = Array.from(actor.items);
|
||||||
|
for (let i = 0; i < array.length; i++) {
|
||||||
|
if (array[i].name === activeEffect.name) {
|
||||||
|
// replace active effect
|
||||||
|
actor.deleteEmbeddedDocuments('Item', [array[i].id]).then(() => {
|
||||||
|
console.log("await")
|
||||||
|
})
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#handleDroppedAdvantage(actor, advantage) {
|
#handleDroppedAdvantage(actor, advantage) {
|
||||||
const array = Array.from(actor.items);
|
const array = Array.from(actor.items);
|
||||||
for (let i = 0; i < array.length; i++) {
|
for (let i = 0; i < array.length; i++) {
|
||||||
|
|
@ -713,7 +778,7 @@ export class CharacterSheet extends ActorSheet {
|
||||||
const tabs = new Tabs({
|
const tabs = new Tabs({
|
||||||
navSelector: ".paperdoll-tabs.tabs",
|
navSelector: ".paperdoll-tabs.tabs",
|
||||||
contentSelector: ".sheet-body.paperdoll-sets",
|
contentSelector: ".sheet-body.paperdoll-sets",
|
||||||
initial: "set1"
|
initial: "set" + (this.object.system.setEquipped + 1)
|
||||||
});
|
});
|
||||||
tabs.bind(html[0]);
|
tabs.bind(html[0]);
|
||||||
|
|
||||||
|
|
@ -721,6 +786,12 @@ export class CharacterSheet extends ActorSheet {
|
||||||
this._onAttributeRoll(evt);
|
this._onAttributeRoll(evt);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
html.on('click', '[data-operation="switchSet"]', (evt) => {
|
||||||
|
const {id} = evt.currentTarget.dataset;
|
||||||
|
console.log(id);
|
||||||
|
this.object.update({"system.setEquipped": id})
|
||||||
|
})
|
||||||
|
|
||||||
html.on('click', '.talent.rollable', (evt) => {
|
html.on('click', '.talent.rollable', (evt) => {
|
||||||
this._onTalentRoll(evt);
|
this._onTalentRoll(evt);
|
||||||
});
|
});
|
||||||
|
|
@ -912,4 +983,13 @@ export class CharacterSheet extends ActorSheet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#handleDroppedSpecialAbility(actor, specialAbility) {
|
||||||
|
const array = Array.from(actor.items);
|
||||||
|
for (let i = 0; i < array.length; i++) {
|
||||||
|
if (array[i].name === specialAbility.name) { // TODO: allow multiple miracles with the same name
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
export class SpecialAbilitySheet extends ItemSheet {
|
||||||
|
/**@override */
|
||||||
|
static get defaultOptions() {
|
||||||
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
|
classes: ['dsa41', 'sheet', 'item', 'specialability'],
|
||||||
|
width: 520,
|
||||||
|
height: 480,
|
||||||
|
tabs: [
|
||||||
|
{
|
||||||
|
navSelector: '.sheet-tabs',
|
||||||
|
contentSelector: '.sheet-body',
|
||||||
|
initial: 'description',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
get template() {
|
||||||
|
return `systems/DSA_4-1/templates/item/item-special-ability-sheet.hbs`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
getData() {
|
||||||
|
// Retrieve the data structure from the base sheet. You can inspect or log
|
||||||
|
// the context variable to see the structure, but some key properties for
|
||||||
|
// sheets are the actor object, the data object, whether or not it's
|
||||||
|
// editable, the items array, and the effects array.
|
||||||
|
const context = super.getData();
|
||||||
|
|
||||||
|
// Use a safe clone of the actor data for further operations.
|
||||||
|
const advantageData = context.data;
|
||||||
|
|
||||||
|
// Add the actor's data to context.data for easier access, as well as flags.
|
||||||
|
context.system = advantageData.system;
|
||||||
|
context.flags = advantageData.flags;
|
||||||
|
context.json = JSON.stringify(advantageData.system, null, 4);
|
||||||
|
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
|
||||||
|
// Everything below here is only needed if the sheet is editable
|
||||||
|
if (!this.isEditable)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
.active-effect {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
flex: 0;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 48px 1fr 48px;
|
||||||
|
grid-template-rows: 48px;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
input {
|
||||||
|
height: 48px;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 8px;
|
||||||
|
|
||||||
|
label {
|
||||||
|
flex: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.editor {
|
||||||
|
flex: 1;
|
||||||
|
border: 1px inset #ccc;
|
||||||
|
background-color: rgba(0, 0, 0, 0.2)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -79,6 +79,7 @@
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-template-areas: 'label label' 'left right';
|
grid-template-areas: 'label label' 'left right';
|
||||||
|
gap: 0 8px;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
grid-area: label;
|
grid-area: label;
|
||||||
|
|
@ -114,6 +115,130 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab.attributes.active {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.attribute {
|
||||||
|
padding: 8px 0;
|
||||||
|
display: flex;
|
||||||
|
gap: 0 8px;
|
||||||
|
|
||||||
|
label {
|
||||||
|
width: 120px;
|
||||||
|
text-align: right;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
max-width: 80px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod {
|
||||||
|
color: grey;
|
||||||
|
text-shadow: 0 -1px 0 #ccc;
|
||||||
|
box-Shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: 4px;
|
||||||
|
height: 24px;
|
||||||
|
width: 24px;
|
||||||
|
background: linear-gradient(0deg, rgba(24, 24, 24, 1) 0%, rgba(80, 80, 80, 1) 100%);;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 24px;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.attributes-overview {
|
||||||
|
|
||||||
|
columns: 2;
|
||||||
|
gap: 0 16px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.resource-overview {
|
||||||
|
|
||||||
|
.attribute {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.advantages, .special-abilities {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
text-indent: 0;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.advantage, .special-ability {
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid gold;
|
||||||
|
box-shadow: 2px 2px 4px #000;
|
||||||
|
border-radius: 8px;
|
||||||
|
height: 24px;
|
||||||
|
color: gold;
|
||||||
|
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 8px;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
background-image: url("../assets/velvet_button.png");
|
||||||
|
background-repeat: repeat-y;
|
||||||
|
background-size: cover;
|
||||||
|
|
||||||
|
span {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
line-height: 24px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.special-ability {
|
||||||
|
&::after {
|
||||||
|
background: rgba(128, 0, 96, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgba(0, 128, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
& + .advantage, & + .special-ability {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.nachteil {
|
||||||
|
font-style: italic;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
background: rgba(128, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.backpack.active {
|
.backpack.active {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
|
||||||
|
|
@ -11,3 +11,4 @@
|
||||||
@use "_player-action";
|
@use "_player-action";
|
||||||
@use "_modify-liturgy";
|
@use "_modify-liturgy";
|
||||||
@use "_liturgy-banner";
|
@use "_liturgy-banner";
|
||||||
|
@use "_active-effect-sheet";
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,14 @@
|
||||||
"maxLEP",
|
"maxLEP",
|
||||||
"maxMR"
|
"maxMR"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"SpecialAbility": {
|
||||||
|
"stringFields": [
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ActiveEffect": {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Skill": {
|
"Skill": {
|
||||||
"stringFields": [
|
"stringFields": [
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,9 @@
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="head-data">
|
<div class="head-data">
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
|
<h1 class="charname {{#if owner}}secret-identity{{/if}}" {{#if owner}}title="{{originalName}}"{{/if}} ><input
|
||||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}"/>
|
name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
|
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{name}}"/>
|
||||||
<h2 class="sidebar-element header">Kampf Daten</h2>
|
<h2 class="sidebar-element header">Kampf Daten</h2>
|
||||||
|
|
||||||
<div class="sidebar-element resource-bar">
|
<div class="sidebar-element resource-bar">
|
||||||
|
|
@ -127,11 +128,128 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tab attributes" data-group="primary" data-tab="attributes">
|
<div class="tab attributes" data-group="primary" data-tab="attributes">
|
||||||
|
<div class="attributes-overview">
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Mut</label>
|
||||||
|
<input value="{{this.system.attribute.mu.aktuell}}">
|
||||||
|
<div class="mods">
|
||||||
|
{{#each this.mods.mu}}
|
||||||
|
<span class="mod" title="{{this.name}}">{{this.value}}</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Klugheit</label>
|
||||||
|
<input value="{{this.system.attribute.kl.aktuell}}">
|
||||||
|
<div class="mods">
|
||||||
|
{{#each this.mods.kl}}
|
||||||
|
<span class="mod" title="{{this.name}}">{{this.value}}</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Intuition</label>
|
||||||
|
<input value="{{this.system.attribute.in.aktuell}}">
|
||||||
|
<div class="mods">
|
||||||
|
{{#each this.mods.in}}
|
||||||
|
<span class="mod" title="{{this.name}}">{{this.value}}</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Charisma</label>
|
||||||
|
<input value="{{this.system.attribute.ch.aktuell}}">
|
||||||
|
<div class="mods">
|
||||||
|
{{#each this.mods.ch}}
|
||||||
|
<span class="mod" title="{{this.name}}">{{this.value}}</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Fingerfertigkeit</label>
|
||||||
|
<input value="{{this.system.attribute.ff.aktuell}}">
|
||||||
|
<div class="mods">
|
||||||
|
{{#each this.mods.ff}}
|
||||||
|
<span class="mod" title="{{this.name}}">{{this.value}}</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Geschicklichkeit</label>
|
||||||
|
<input value="{{this.system.attribute.ge.aktuell}}">
|
||||||
|
<div class="mods">
|
||||||
|
{{#each this.mods.ge}}
|
||||||
|
<span class="mod" title="{{this.name}}">{{this.value}}</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Konstitution</label>
|
||||||
|
<input value="{{this.system.attribute.ko.aktuell}}">
|
||||||
|
<div class="mods">
|
||||||
|
{{#each this.mods.ko}}
|
||||||
|
<span class="mod" title="{{this.name}}">{{this.value}}</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Körperkraft</label>
|
||||||
|
<input value="{{this.system.attribute.kk.aktuell}}">
|
||||||
|
<div class="mods">
|
||||||
|
{{#each this.mods.kk}}
|
||||||
|
<span class="mod" title="{{this.name}}">{{this.value}}</span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Sozialstatus</label>
|
||||||
|
<input value="{{this.system.attribute.so.aktuell}}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="resources-overview">
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Lebensenergie</label>
|
||||||
|
<input value="{{actor.system.lep.aktuell}}">
|
||||||
|
<input value="{{actor.system.lep.max}}">
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Ausdauer</label>
|
||||||
|
<input value="{{actor.system.aup.aktuell}}">
|
||||||
|
<input value="{{actor.system.aup.max}}">
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Astralenergie</label>
|
||||||
|
<input value="{{actor.system.asp.aktuell}}">
|
||||||
|
<input value="{{actor.system.asp.max}}">
|
||||||
|
</div>
|
||||||
|
<div class="attribute">
|
||||||
|
<label>Karmaenergie</label>
|
||||||
|
<input value="{{actor.system.kap.aktuell}}">
|
||||||
|
<input value="{{actor.system.kap.max}}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="advantages">
|
||||||
|
<h3>Vor- und Nachteile</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{{#each this.advantages}}
|
{{#each this.advantages}}
|
||||||
<li>{{> "systems/DSA_4-1/templates/ui/partial-advantage-button.hbs" this}}</li>
|
<li>{{> "systems/DSA_4-1/templates/ui/partial-advantage-button.hbs" this}}</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="special-abilities">
|
||||||
|
<h3>Sonderfertigkeiten</h3>
|
||||||
|
<ul>
|
||||||
|
{{#each this.specialAbilities}}
|
||||||
|
<li>{{> "systems/DSA_4-1/templates/ui/partial-sf-button.hbs" this}}</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab combat" data-group="primary" data-tab="combat">
|
<div class="tab combat" data-group="primary" data-tab="combat">
|
||||||
|
|
@ -160,6 +278,12 @@
|
||||||
<label>RS:</label>
|
<label>RS:</label>
|
||||||
{{derived.rs}}
|
{{derived.rs}}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="handicap">
|
||||||
|
<label>BE:</label>
|
||||||
|
{{derived.be}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
|
|
@ -298,7 +422,11 @@
|
||||||
data-target="{{this.target}}" data-actor="{{../../actor.id}}"><img
|
data-target="{{this.target}}" data-actor="{{../../actor.id}}"><img
|
||||||
src="{{this.icon}}"/></div>
|
src="{{this.icon}}"/></div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{#if (eq ../actor.system.setEquipped @index)}}
|
||||||
|
<button disabled="disabled">Ausgerüstet</button>
|
||||||
|
{{else}}
|
||||||
|
<button data-operation="switchSet" data-id="{{@index}}">Wechseln</button>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -559,8 +687,10 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#if this.hasPets}}
|
||||||
<div class="tab pets" data-group="primary" data-tab="pets">
|
<div class="tab pets" data-group="primary" data-tab="pets">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<form class="{{cssClass}} {{item.type}} flexcol" autocomplete="off">
|
||||||
|
<div class="active-effect">
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<img src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||||
|
<input type="text" name="actor.name" value="{{item.name}}"/>
|
||||||
|
|
||||||
|
<button class="editEffects" data-id="{{this.effectId}}" data-operation="editActiveEffect">
|
||||||
|
<i class="fas fa-pencil-alt"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="meta">
|
||||||
|
<label>Spielleiter Hinweise</label>
|
||||||
|
{{editor item.system.notes target="system.notes" button=true owner=owner editable=editable}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<td class="icon"><img alt="" src="{{this.icon}}" width="16" height="16"></td>
|
<td class="icon"><img alt="" src="{{this.icon}}" width="16" height="16"></td>
|
||||||
<td class="name">{{this.name}}</td>
|
<td class="name">{{this.name}}</td>
|
||||||
<td class="quantity">{{this.quantity}}</td>
|
<td class="quantity">{{this.quantity}}</td>
|
||||||
<td class="weight">{{this.weight}}</td>
|
<td class="weight">{{#if this.worn}}({{/if}}{{this.weight}}{{#if this.worn}}){{/if}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="special-ability">
|
||||||
|
<span class="name" data-id="{{this.id}}">{{this.name}}</span>
|
||||||
|
</div>
|
||||||
Loading…
Reference in New Issue