Compare commits
2 Commits
dcbb9f6c9c
...
d7779f3c48
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7779f3c48 | ||
|
|
b83213fc0b |
@ -118,6 +118,15 @@
|
|||||||
<span>{{actor.system.computed.astralenergie.max}}</span>
|
<span>{{actor.system.computed.astralenergie.max}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="list-item">
|
||||||
|
<span>{{localize "DSA41.basiswerte.karmalenergie"}}</span>
|
||||||
|
<span>{{>editable-input type="number" name="system.karmalenergie" value=actor.system.karmalenergie}}</span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span>{{actor.system.karmalenergie}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="list-item">
|
<div class="list-item">
|
||||||
<span>{{localize "DSA41.basiswerte.magieresistenz"}}</span>
|
<span>{{localize "DSA41.basiswerte.magieresistenz"}}</span>
|
||||||
<span>{{actor.system.computed.magieresistenz.basiswert}}</span>
|
<span>{{actor.system.computed.magieresistenz.basiswert}}</span>
|
||||||
@ -170,6 +179,10 @@
|
|||||||
<div>{{localize (concat "DSA41.vornachteil.label_vorteile")}}</div>
|
<div>{{localize (concat "DSA41.vornachteil.label_vorteile")}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#unless (ne actor.system.computed.num_vorteile 0)}}
|
||||||
|
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{#each actor.itemTypes.VorNachteil}}
|
{{#each actor.itemTypes.VorNachteil}}
|
||||||
{{#if (eq system.kategorie "vorteil")}}
|
{{#if (eq system.kategorie "vorteil")}}
|
||||||
<div class="list-item" data-item-id="{{_id}}">
|
<div class="list-item" data-item-id="{{_id}}">
|
||||||
@ -188,6 +201,10 @@
|
|||||||
<div>{{localize (concat "DSA41.vornachteil.label_nachteile")}}</div>
|
<div>{{localize (concat "DSA41.vornachteil.label_nachteile")}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#unless (ne actor.system.computed.num_nachteile 0)}}
|
||||||
|
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{#each actor.itemTypes.VorNachteil}}
|
{{#each actor.itemTypes.VorNachteil}}
|
||||||
{{#if (eq system.kategorie "nachteil")}}
|
{{#if (eq system.kategorie "nachteil")}}
|
||||||
<div class="list-item" data-item-id="{{_id}}">
|
<div class="list-item" data-item-id="{{_id}}">
|
||||||
@ -207,6 +224,10 @@
|
|||||||
<div>{{localize (concat "DSA41.sonderfertigkeiten.label_allgemein")}}</div>
|
<div>{{localize (concat "DSA41.sonderfertigkeiten.label_allgemein")}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#unless (ne actor.system.computed.num_allgemeine_sonderfertigkeiten 0)}}
|
||||||
|
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{#each actor.itemTypes.Sonderfertigkeit}}
|
{{#each actor.itemTypes.Sonderfertigkeit}}
|
||||||
{{#if (eq this.system.kategorie "allgemein")}}
|
{{#if (eq this.system.kategorie "allgemein")}}
|
||||||
<div class="list-item" data-item-id="{{_id}}">
|
<div class="list-item" data-item-id="{{_id}}">
|
||||||
@ -276,6 +297,11 @@
|
|||||||
<div class="center">{{localize "DSA41.weight"}}</div>
|
<div class="center">{{localize "DSA41.weight"}}</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#unless (ne actor.itemTypes.Bewaffnung.length 0)}}
|
||||||
|
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{#each actor.itemTypes.Bewaffnung}}
|
{{#each actor.itemTypes.Bewaffnung}}
|
||||||
<div class="list-item" data-item-id="{{this._id}}">
|
<div class="list-item" data-item-id="{{this._id}}">
|
||||||
<div class="row" data-action="item-open">
|
<div class="row" data-action="item-open">
|
||||||
@ -303,6 +329,11 @@
|
|||||||
<div></div>
|
<div></div>
|
||||||
<div class="center">{{localize "DSA41.weight"}}</div>
|
<div class="center">{{localize "DSA41.weight"}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#unless (ne actor.itemTypes.Ruestung.length 0)}}
|
||||||
|
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{#each actor.itemTypes.Ruestung}}
|
{{#each actor.itemTypes.Ruestung}}
|
||||||
<div class="list-item" data-item-id="{{this._id}}">
|
<div class="list-item" data-item-id="{{this._id}}">
|
||||||
<div class="row" data-action="item-open">
|
<div class="row" data-action="item-open">
|
||||||
@ -322,6 +353,11 @@
|
|||||||
<div></div>
|
<div></div>
|
||||||
<div class="center">{{localize "DSA41.weight"}}</div>
|
<div class="center">{{localize "DSA41.weight"}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#unless (ne actor.itemTypes.Gegenstand.length 0)}}
|
||||||
|
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{#each actor.itemTypes.Gegenstand}}
|
{{#each actor.itemTypes.Gegenstand}}
|
||||||
<div class="list-item" data-item-id="{{this._id}}">
|
<div class="list-item" data-item-id="{{this._id}}">
|
||||||
<div class="row" data-action="item-open">
|
<div class="row" data-action="item-open">
|
||||||
@ -345,6 +381,10 @@
|
|||||||
<div class="center">{{localize "DSA41.kampf.trefferpunkte"}}</div>
|
<div class="center">{{localize "DSA41.kampf.trefferpunkte"}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#unless (or (ne actor.system.computed.num_waffen 0) (ne actor.system.computed.num_fernkampf_waffen 0))}}
|
||||||
|
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{#each actor.system.computed.kampf.waffen}}
|
{{#each actor.system.computed.kampf.waffen}}
|
||||||
<div class="list-item" data-item-id="{{item._id}}">
|
<div class="list-item" data-item-id="{{item._id}}">
|
||||||
<div class="row" data-action="item-open">
|
<div class="row" data-action="item-open">
|
||||||
@ -436,6 +476,10 @@
|
|||||||
<div>{{localize (concat "DSA41.sonderfertigkeiten.label_kampf")}}</div>
|
<div>{{localize (concat "DSA41.sonderfertigkeiten.label_kampf")}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#unless (ne actor.system.computed.num_kampf_sonderfertigkeiten 0)}}
|
||||||
|
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
{{#each actor.itemTypes.Sonderfertigkeit}}
|
{{#each actor.itemTypes.Sonderfertigkeit}}
|
||||||
{{#if (eq this.system.kategorie "kampf")}}
|
{{#if (eq this.system.kategorie "kampf")}}
|
||||||
<div class="list-item" data-item-id="{{_id}}">
|
<div class="list-item" data-item-id="{{_id}}">
|
||||||
|
|||||||
@ -24,6 +24,8 @@
|
|||||||
"weight": "Gewicht",
|
"weight": "Gewicht",
|
||||||
"price": "Preis",
|
"price": "Preis",
|
||||||
|
|
||||||
|
"list_empty": "Keine",
|
||||||
|
|
||||||
"chat": {
|
"chat": {
|
||||||
"result": "Ergebnis",
|
"result": "Ergebnis",
|
||||||
"success": "Geschafft",
|
"success": "Geschafft",
|
||||||
@ -46,6 +48,7 @@
|
|||||||
"lebenspunkte": "Lebenspunkte",
|
"lebenspunkte": "Lebenspunkte",
|
||||||
"ausdauer": "Ausdauer",
|
"ausdauer": "Ausdauer",
|
||||||
"astralenergie": "Astralenergie",
|
"astralenergie": "Astralenergie",
|
||||||
|
"karmalenergie": "Karmalenergie",
|
||||||
"magieresistenz": "Magieresistenz",
|
"magieresistenz": "Magieresistenz",
|
||||||
"initiative": "Initiative",
|
"initiative": "Initiative",
|
||||||
"attacke": "Attacke",
|
"attacke": "Attacke",
|
||||||
|
|||||||
16
src/main.mjs
16
src/main.mjs
@ -233,6 +233,8 @@ class DSA41_CharacterData extends TypeDataModel {
|
|||||||
aktuell: new NumberField({integer: true, initial: 0}),
|
aktuell: new NumberField({integer: true, initial: 0}),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
karmalenergie: new NumberField({integer: true, inital: 0}),
|
||||||
|
|
||||||
magieresistenz: new SchemaField({
|
magieresistenz: new SchemaField({
|
||||||
modifikator: new NumberField({integer: true, initial: 0}),
|
modifikator: new NumberField({integer: true, initial: 0}),
|
||||||
zukauf: new NumberField({integer: true, initial: 0}),
|
zukauf: new NumberField({integer: true, initial: 0}),
|
||||||
@ -253,6 +255,13 @@ class DSA41_CharacterData extends TypeDataModel {
|
|||||||
attributes: {},
|
attributes: {},
|
||||||
attributes_without_modifiers: {},
|
attributes_without_modifiers: {},
|
||||||
|
|
||||||
|
num_vorteile: 0,
|
||||||
|
num_nachteile: 0,
|
||||||
|
num_allgemeine_sonderfertigkeiten: 0,
|
||||||
|
num_kampf_sonderfertigkeiten: 0,
|
||||||
|
num_waffen: 0,
|
||||||
|
num_fernkampf_waffen: 0,
|
||||||
|
|
||||||
kampf: {
|
kampf: {
|
||||||
talente: {},
|
talente: {},
|
||||||
waffen: {},
|
waffen: {},
|
||||||
@ -352,6 +361,7 @@ class DSA41_CharacterData extends TypeDataModel {
|
|||||||
|
|
||||||
for(const item of equipped_nahkampfwaffen) {
|
for(const item of equipped_nahkampfwaffen) {
|
||||||
if (item.system.nahkampfwaffe.aktiv) {
|
if (item.system.nahkampfwaffe.aktiv) {
|
||||||
|
this.computed.num_waffen += 1;
|
||||||
let computed = this.computed.kampf.waffen[item._id] = {
|
let computed = this.computed.kampf.waffen[item._id] = {
|
||||||
item: item,
|
item: item,
|
||||||
attacke: 0,
|
attacke: 0,
|
||||||
@ -415,6 +425,7 @@ class DSA41_CharacterData extends TypeDataModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const item of equipped_fernkampfwaffen) {
|
for (const item of equipped_fernkampfwaffen) {
|
||||||
|
this.computed.num_fernkampf_waffen += 1;
|
||||||
let computed = this.computed.kampf.fernkampf_waffen[item._id] = {
|
let computed = this.computed.kampf.fernkampf_waffen[item._id] = {
|
||||||
item: item,
|
item: item,
|
||||||
attacke: 0,
|
attacke: 0,
|
||||||
@ -444,6 +455,11 @@ class DSA41_CharacterData extends TypeDataModel {
|
|||||||
wissens: talente.filter((x) => x.system.kategorie === "wissens"),
|
wissens: talente.filter((x) => x.system.kategorie === "wissens"),
|
||||||
handwerks: talente.filter((x) => x.system.kategorie === "handwerks"),
|
handwerks: talente.filter((x) => x.system.kategorie === "handwerks"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.computed.num_allgemeine_sonderfertigkeiten = this.parent.items.filter((x) => x.type === "Sonderfertigkeit" && x.system.kategorie === "allgemein").length;
|
||||||
|
this.computed.num_kampf_sonderfertigkeiten = this.parent.items.filter((x) => x.type === "Sonderfertigkeit" && x.system.kategorie === "kampf").length;
|
||||||
|
this.computed.num_vorteile = this.parent.items.filter((x) => x.type === "VorNachteil" && x.system.kategorie === "vorteil").length;
|
||||||
|
this.computed.num_nachteile = this.parent.items.filter((x) => x.type === "VorNachteil" && x.system.kategorie === "nachteil").length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user