Fertigkeitenboni
+ Added bonus on Aussehen depending on fw: athletik gem. KOD S. 104 + Added bonus on Bewegungsweite depending on fw: laufen gem. KOD S. 116 + Added Skill increase/decrease buttons like on quantity
This commit is contained in:
parent
9ff50fbd7d
commit
60cd8675aa
|
|
@ -531,6 +531,16 @@ export class M5Character extends Actor {
|
|||
pp: item.system.pp,
|
||||
calc: item.system.calc,
|
||||
} as M5SkillCalculated;
|
||||
|
||||
// Adjust attribute Aussehen based on Athletik skill
|
||||
if (item.name === "Athletik") {
|
||||
ret.attributes.au.value += Math.floor(item.system.fw / 3);
|
||||
};
|
||||
|
||||
// Adjust stat Bewegungsweite based on Laufen skill
|
||||
if (item.name === "Laufen") {
|
||||
ret.stats.movement.value += Math.floor(item.system.fw / 3);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,6 +219,54 @@ export default class M5CharacterSheet extends ActorSheet {
|
|||
});
|
||||
});
|
||||
|
||||
html.find(".fw-increase").on("click", async (event) => {
|
||||
let row = event.target.parentElement;
|
||||
let itemId = row.dataset["item"];
|
||||
while (!itemId) {
|
||||
row = row.parentElement;
|
||||
if (!row) return;
|
||||
itemId = row.dataset["item"];
|
||||
}
|
||||
|
||||
const context = this.actor as any;
|
||||
const item = context.items.get(itemId);
|
||||
if (!item.system.fw) {
|
||||
item.system.fw = 0;
|
||||
}
|
||||
if (item.system.fw < 18) {
|
||||
item.update({
|
||||
data: {
|
||||
fw: Math.min(item.system.fw + 1, 18),
|
||||
},
|
||||
});
|
||||
}
|
||||
this.render();
|
||||
});
|
||||
|
||||
html.find(".fw-decrease").on("click", async (event) => {
|
||||
let row = event.target.parentElement;
|
||||
let itemId = row.dataset["item"];
|
||||
while (!itemId) {
|
||||
row = row.parentElement;
|
||||
if (!row) return;
|
||||
itemId = row.dataset["item"];
|
||||
}
|
||||
|
||||
const context = this.actor as any;
|
||||
const item = context.items.get(itemId);
|
||||
if (!item.system.fw) {
|
||||
item.system.fw = 0;
|
||||
}
|
||||
if (item.system.fw > 8) {
|
||||
item.update({
|
||||
data: {
|
||||
fw: Math.max(item.system.fw - 1, 8),
|
||||
},
|
||||
});
|
||||
}
|
||||
this.render();
|
||||
});
|
||||
|
||||
html.find(".roll-weapon-button").on("click", async (event) => {
|
||||
const row = event.target.parentElement.parentElement;
|
||||
let itemId = row.dataset["item"];
|
||||
|
|
|
|||
|
|
@ -63,7 +63,11 @@
|
|||
{{#each data.calc.skills.general as |skill skillId|}}
|
||||
<tr data-item="{{skillId}}">
|
||||
<td class="padding edit-item">{{skill.label}}</td>
|
||||
<td class="fixed-value">{{skill.fw}}</td>
|
||||
<td>
|
||||
<i class="fa fa-minus-circle fw-decrease" style="cursor: pointer"></i>
|
||||
<span>{{skill.fw}}</span>
|
||||
<i class="fa fa-plus-circle fw-increase" style="cursor: pointer"></i>
|
||||
{{!-- {{</td><td class="fixed-value">{{skill.fw}}</td>}} --}}
|
||||
<td class="fixed-value">{{skill.calc.bonus}}</td>
|
||||
<td class="fixed-value">{{skill.calc.ew}}</td>
|
||||
<td class="fixed-value">{{skill.pp}}</td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue