Fix PP anzeige von Zaubern #115
|
|
@ -90,6 +90,7 @@ export class M5Roll {
|
||||||
this.data.res.label = this.label;
|
this.data.res.label = this.label;
|
||||||
if ((game as Game).settings.get("midgard5", "automatedPP") && this.data.iType !== null) {
|
if ((game as Game).settings.get("midgard5", "automatedPP") && this.data.iType !== null) {
|
||||||
if ((this.data.i.type === "language" || this.data.i.type === "general") && this.data.rolls[0].dice[0] >= 16) {
|
if ((this.data.i.type === "language" || this.data.i.type === "general") && this.data.rolls[0].dice[0] >= 16) {
|
||||||
|
ui.notifications.notify(`Praxispunkt eingetragen für ${this.actor.items.get(this.id).name}`);
|
||||||
this.actor.items.get(this.id).update({
|
this.actor.items.get(this.id).update({
|
||||||
system: {
|
system: {
|
||||||
pp: this.data.i.pp + 1,
|
pp: this.data.i.pp + 1,
|
||||||
|
|
@ -97,6 +98,7 @@ export class M5Roll {
|
||||||
});
|
});
|
||||||
} else if (this.data.rolls[0].dice[0] === 20) {
|
} else if (this.data.rolls[0].dice[0] === 20) {
|
||||||
if (this.data.i.type === "combat") {
|
if (this.data.i.type === "combat") {
|
||||||
|
ui.notifications.notify(`Praxispunkt eingetragen für ${this.actor.items.get(this.id).name}`);
|
||||||
// Rolling through skill
|
// Rolling through skill
|
||||||
this.actor.items.get(this.id).update({
|
this.actor.items.get(this.id).update({
|
||||||
system: {
|
system: {
|
||||||
|
|
@ -104,6 +106,7 @@ export class M5Roll {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (this.data.iType === "weapon") {
|
} else if (this.data.iType === "weapon") {
|
||||||
|
ui.notifications.notify(`Praxispunkt eingetragen für ${this.actor.items.get(this.id).name}`);
|
||||||
// Rolling through Weapon Item
|
// Rolling through Weapon Item
|
||||||
const skill = this.actor.items.get(this.data.i.skillId);
|
const skill = this.actor.items.get(this.data.i.skillId);
|
||||||
skill.update({
|
skill.update({
|
||||||
|
|
@ -112,6 +115,7 @@ export class M5Roll {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (this.data.iType === "defensiveWeapon") {
|
} else if (this.data.iType === "defensiveWeapon") {
|
||||||
|
ui.notifications.notify(`Praxispunkt eingetragen für ${this.actor.items.get(this.id).name}`);
|
||||||
// Rolling through defensiveWeapon Item
|
// Rolling through defensiveWeapon Item
|
||||||
const skill = this.actor.items.get(this.data.i.skillId);
|
const skill = this.actor.items.get(this.data.i.skillId);
|
||||||
skill.update({
|
skill.update({
|
||||||
|
|
@ -120,6 +124,7 @@ export class M5Roll {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (this.data.iType === "spell") {
|
} else if (this.data.iType === "spell") {
|
||||||
|
ui.notifications.notify(`Praxispunkt eingetragen für ${this.data.i.process}`);
|
||||||
// Rolling through Spell Item
|
// Rolling through Spell Item
|
||||||
const klasse = this.actor.items.find((x) => x.type === "class" && x.system.equipped);
|
const klasse = this.actor.items.find((x) => x.type === "class" && x.system.equipped);
|
||||||
klasse.update({
|
klasse.update({
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if (eq data.types.actor)}}
|
|
||||||
<div class="flexcolumn-1">
|
<div class="flexcolumn-1">
|
||||||
<div class="flexpart">
|
<div class="flexpart">
|
||||||
<div class="flexpart-header">{{localize "midgard5.pp"}} {{localize "midgard5.spells"}}</div>
|
<div class="flexpart-header">{{localize "midgard5.pp"}} {{localize "midgard5.spells"}}</div>
|
||||||
|
|
@ -88,6 +87,7 @@
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
|
|
||||||
{{#each data.lernKostenZauber as |group name|}}
|
{{#each data.lernKostenZauber as |group name|}}
|
||||||
|
{{#unless (eq group.kosten 0)}}
|
||||||
<span data-pp-name="{{name}}" class="pp-listing">
|
<span data-pp-name="{{name}}" class="pp-listing">
|
||||||
<label for="data.lernKostenZauber.{{name}}">{{localize (m5concat "midgard5.spell-process-" name)}}</label>
|
<label for="data.lernKostenZauber.{{name}}">{{localize (m5concat "midgard5.spell-process-" name)}}</label>
|
||||||
<span >
|
<span >
|
||||||
|
|
@ -96,6 +96,7 @@
|
||||||
<i class="fa fa-plus-circle pp-increase" style="cursor: pointer"></i>
|
<i class="fa fa-plus-circle pp-increase" style="cursor: pointer"></i>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -104,5 +105,4 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue