v2.0.0 (#8)
* Squashed commit of the following: commit0bfa224daeAuthor: Byroks <byroks@gmail.com> Date: Mon Nov 27 19:56:05 2023 +0100 V1.3.1 (#6) * v1.3.1 * v1.3.1 * update .gitingore commit35a6b0fae9Author: Byroks <byroks@gmail.com> Date: Mon Nov 27 19:48:56 2023 +0100 v1.3.1 commitdb21ca93b0Author: Byroks <byroks@gmail.com> Date: Sun Nov 26 13:13:13 2023 +0100 subtract ap when casting spell Changes: + subtract AP when casting a spell * Dev Kampfkünste Items & Integration (#7) Changes: + add kampfkuenste template + add kampfkuenste tab + make kampfkuenste rollable + update localization * v2.0.0
This commit is contained in:
@@ -31,7 +31,7 @@ export class M5Item extends Item {
|
||||
];
|
||||
|
||||
if (character) {
|
||||
const actorCalc = character.derivedData({ skills: true, weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
||||
const actorCalc = character.derivedData({ skills: true, weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||
if (actorCalc?.skillMods && Object.keys(actorCalc.skillMods).indexOf(itemId) !== -1) {
|
||||
pairs = pairs.concat(actorCalc.skillMods[itemId]);
|
||||
}
|
||||
@@ -65,7 +65,7 @@ export class M5Item extends Item {
|
||||
calc.combatSkills = null;
|
||||
|
||||
if (actor) {
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||
if (actorCalc) {
|
||||
calc.ew += actorCalc.stats.attackBonus.value;
|
||||
calc.combatSkills = actorCalc.skills.combat;
|
||||
@@ -89,7 +89,7 @@ export class M5Item extends Item {
|
||||
calc.combatSkills = null;
|
||||
|
||||
if (actor) {
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||
if (actorCalc) {
|
||||
calc.ew += actorCalc.stats.defense.value + actorCalc.stats.defenseBonus.value;
|
||||
calc.combatSkills = actorCalc.skills.combat;
|
||||
@@ -108,11 +108,32 @@ export class M5Item extends Item {
|
||||
} else if (itemType === "spell") {
|
||||
calc.fw = 0;
|
||||
if (actor) {
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||
if (actorCalc) {
|
||||
calc.ew = actorCalc.stats.spellCasting.value;
|
||||
}
|
||||
}
|
||||
} else if (itemType === "kampfkunst") {
|
||||
calc.fw = 0;
|
||||
calc.bonus = 0;
|
||||
calc.ew = 0;
|
||||
calc.generalSkills = null;
|
||||
|
||||
if (actor) {
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||
if (actorCalc) {
|
||||
calc.generalSkills = actorCalc.skills.general;
|
||||
}
|
||||
|
||||
const skill = character.getItem(itemData.skillId);
|
||||
if (skill) {
|
||||
skill.prepareDerivedData();
|
||||
const skillData = skill.system;
|
||||
calc.ew = skillData.calc.ew;
|
||||
calc.fw = skillData.fw + calc.bonus;
|
||||
itemData.rolls.formulas[0].label = skill.name;
|
||||
}
|
||||
}
|
||||
} else if (itemType === "item" || itemType === "effect") {
|
||||
calc.mods = {};
|
||||
Object.keys(itemData?.mods).forEach((key) => {
|
||||
@@ -135,7 +156,7 @@ export class M5Item extends Item {
|
||||
}
|
||||
case M5ModType.SKILL: {
|
||||
if (character) {
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true });
|
||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
|
||||
if (actorCalc) {
|
||||
let category = (game as Game).i18n.localize("midgard5.skill");
|
||||
Object.keys(actorCalc.skills.general).forEach((skillId) => {
|
||||
|
||||
Reference in New Issue
Block a user