Fertigkeitenboni (#77)

+ 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

Reviewed-on: #77
Reviewed-by: oskaloq <os_ka_loq@gmx.de>
Co-authored-by: LeFrique <lefrique@live.de>
Co-committed-by: LeFrique <lefrique@live.de>
This commit is contained in:
LeFrique 2024-03-03 18:43:43 +01:00 committed by Byroks
parent 9ff50fbd7d
commit bb9d20f586
7 changed files with 110 additions and 2 deletions

View File

@ -278,13 +278,17 @@
"midgard5.spell-process-none": "Ohne",
"midgard5.spell-process-beherrschen": "Beherrschen",
"midgard5.spell-process-bewegen": "Bewegen",
"midgard5.spell-process-blutzauber": "Blutmagie",
"midgard5.spell-process-chaoswunder": "Chaoswunder",
"midgard5.spell-process-erkennen": "Erkennen",
"midgard5.spell-process-erschaffen": "Erschaffen",
"midgard5.spell-process-formen": "Formen",
"midgard5.spell-process-finstere_magie": "Finstere Magie",
"midgard5.spell-process-veraendern": "Verändern",
"midgard5.spell-process-zerstoeren": "Zerstören",
"midgard5.spell-process-wundertat": "Wundertat",
"midgard5.spell-process-dweomer": "Dweomer",
"midgard5.spell-process-wilder_Dweomer": "Wilder Dweomer",
"midgard5.spell-process-zauberlied": "Zauberlied",
"midgard5.spell-process-salz": "Salz",
"midgard5.spell-process-thaumagraphie": "Thaumagraphie",
@ -293,6 +297,8 @@
"midgard5.spell-process-thaumatherapie": "Thaumatherapie",
"midgard5.spell-process-zaubermittel": "Zaubermittel",
"midgard5.spell-process-zauberschutz": "Zauberschutz",
"midgard5.spell-process-zauberrunen": "Zauberrunen",
"midgard5.spell-process-zaubersiegel": "Zaubersiegel",
"midgard5.spell-type-gedanke": "Gedanke",
"midgard5.spell-type-geste": "Geste",
@ -310,6 +316,9 @@
"midgard5.spell-effectArea": "Wirkungsbereich",
"midgard5.spell-effectDuration": "Wirkungsdauer",
"midgard5.spell-origin": "Ursprung",
"midgard5.spell-agens": "Agens",
"midgard5.spell-reagens": "Reagens",
"midgard5.spell-material": "Zaubermaterial",
"midgard5.kampfkunst-type": "Kampfkunst Art",
"midgard5.kampfkunst-variante": "Kampfkunst Variante",

View File

@ -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);
}
});
}

View File

@ -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"];

View File

@ -233,13 +233,17 @@
"none": "midgard5.spell-process-none",
"beherrschen": "midgard5.spell-process-beherrschen",
"bewegen": "midgard5.spell-process-bewegen",
"blutzauber": "midgard5.spell-process-blutzauber",
"chaoswunder": "midgard5.spell-process-chaoswunder",
"erkennen": "midgard5.spell-process-erkennen",
"erschaffen": "midgard5.spell-process-erschaffen",
"formen": "midgard5.spell-process-formen",
"finstere_magie": "midgard5.spell-process-finstere_magie",
"veraendern": "midgard5.spell-process-veraendern",
"zerstoeren": "midgard5.spell-process-zerstoeren",
"wundertat": "midgard5.spell-process-wundertat",
"dweomer": "midgard5.spell-process-dweomer",
"wilder_dweomer": "midgard5.spell-process-wilder_dweomer",
"zauberlied": "midgard5.spell-process-zauberlied",
"salz": "midgard5.spell-process-salz",
"thaumagraphie": "midgard5.spell-process-thaumagraphie",
@ -247,7 +251,9 @@
"nekromantie": "midgard5.spell-process-nekromantie",
"thaumatherapie": "midgard5.spell-process-thaumatherapie",
"zaubermittel": "midgard5.spell-process-zaubermittel",
"zauberschutz": "midgard5.spell-process-zauberschutz"
"zauberschutz": "midgard5.spell-process-zauberschutz",
"zauberrunen": "midgard5.spell-process-zauberrunen",
"zaubersiegel": "midgard5.spell-process-siegel"
},
"spellTypeSelection": {
"gedanke": "midgard5.spell-type-gedanke",
@ -401,12 +407,16 @@
"type": "",
"process": "",
"ap": "",
"lp": "",
"castDuration": "",
"range": "",
"effectTarget": "",
"effectArea": "",
"effectDuration": "",
"origin": "",
"agens": "",
"reagens": "",
"material": "",
"rolls": {
"formulas": {
"0": {

View File

@ -9,6 +9,10 @@
<td>{{localize "midgard5.actor-ap"}}</td>
<td class="roll-spell-details">{{i.ap}}</td>
</tr>
<tr>
<td>{{localize "midgard5.actor-lp"}}</td>
<td class="roll-spell-details">{{i.lp}}</td>
</tr>
<tr>
<td>{{localize "midgard5.spell-castDuration"}}</td>
<td class="roll-spell-details">{{i.castDuration}}</td>
@ -41,6 +45,17 @@
<td>{{localize "midgard5.spell-process"}}</td>
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-process-" i.process)}}</td>
</tr>
<tr>
<td>{{localize "midgard5.spell-agens"}}</td>
<td class="roll-spell-details">{{i.agens}}</td>
<tr/>
<td>{{localize "midgard5.spell-reagens"}}</td>
<td class="roll-spell-details">{{i.reagens}}</td>
</tr>
<tr>
<td>{{localize "midgard5.spell-material"}}</td>
<td class="roll-spell-details">{{i.material}}</td>
<tr/>
{{/if}}
{{#if (eq iType "kampfkunst")}}

View File

@ -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>

View File

@ -9,8 +9,14 @@
<tr>
<td>{{localize "midgard5.bonus"}}</td>
<td><input name="data.bonus" type="text" value="{{data.bonus}}" data-dtype="Number" /></td>
<td>{{localize "midgard5.spell-material"}}</td>
<td><input name="data.material" type="text" value="{{data.material}}" data-dtype="String" /></td>
</tr>
<tr>
<td>{{localize "midgard5.actor-ap"}}</td>
<td><input name="data.ap" type="text" value="{{data.ap}}" data-dtype="String" /></td>
<td>{{localize "midgard5.actor-lp"}}</td>
<td><input name="data.lp" type="text" value="{{data.lp}}" data-dtype="String" /></td>
</tr>
<tr>
<td>{{localize "midgard5.spell-castDuration"}}</td>
@ -60,6 +66,12 @@
</select>
</td>
</tr>
<tr>
<td>{{localize "midgard5.spell-agens"}}</td>
<td><input name="data.agens" type="text" value="{{data.agens}}" data-dtype="String" /></td>
<td>{{localize "midgard5.spell-reagens"}}</td>
<td><input name="data.reagens" type="text" value="{{data.reagens}}" data-dtype="String" /></td>
</tr>
</tbody>
</table>