Fertigkeitenboni #77
|
|
@ -531,6 +531,16 @@ export class M5Character extends Actor {
|
||||||
pp: item.system.pp,
|
pp: item.system.pp,
|
||||||
calc: item.system.calc,
|
calc: item.system.calc,
|
||||||
} as M5SkillCalculated;
|
} 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) => {
|
html.find(".roll-weapon-button").on("click", async (event) => {
|
||||||
const row = event.target.parentElement.parentElement;
|
const row = event.target.parentElement.parentElement;
|
||||||
let itemId = row.dataset["item"];
|
let itemId = row.dataset["item"];
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,11 @@
|
||||||
{{#each data.calc.skills.general as |skill skillId|}}
|
{{#each data.calc.skills.general as |skill skillId|}}
|
||||||
<tr data-item="{{skillId}}">
|
<tr data-item="{{skillId}}">
|
||||||
<td class="padding edit-item">{{skill.label}}</td>
|
<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.bonus}}</td>
|
||||||
<td class="fixed-value">{{skill.calc.ew}}</td>
|
<td class="fixed-value">{{skill.calc.ew}}</td>
|
||||||
<td class="fixed-value">{{skill.pp}}</td>
|
<td class="fixed-value">{{skill.pp}}</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue