Squashed commit of the following:
commit250fc499aeAuthor: Byroks <byroks@gmail.com> Date: Thu Nov 30 16:17:04 2023 +0100 v2.1.0 commit28595e7dd0Author: Byroks <byroks@gmail.com> Date: Thu Nov 30 15:50:59 2023 +0100 Make Items with mods equippable (#11) Changes: + Items that can influence you stats are equippable + only equipped items influence your stats + Armor now influences your stats + move mods into a partial for easier changes commit8095785fc2Author: Byroks <byroks@gmail.com> Date: Wed Nov 29 10:14:49 2023 +0100 Movement stat (#10) Changes: + make movement stat work and be moddable by effects commite141839055Merge:14e005c0bfa224Author: Byroks <byroks@gmail.com> Date: Tue Nov 28 19:50:38 2023 +0100 Merge branch 'main' into develop commit14e005cb0aAuthor: Byroks <byroks@gmail.com> Date: Tue Nov 28 19:48:14 2023 +0100 v2.0.0 commitc635c54f24Author: Byroks <byroks@gmail.com> Date: Tue Nov 28 19:42:38 2023 +0100 Dev Kampfkünste Items & Integration (#7) Changes: + add kampfkuenste template + add kampfkuenste tab + make kampfkuenste rollable + update localization commite27f4209e5Author: Byroks <byroks@gmail.com> Date: Mon Nov 27 20:05:20 2023 +0100 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
This commit is contained in:
@@ -145,7 +145,7 @@ export interface M5CharacterCalculatedData {
|
||||
damageBonus: M5ModResult;
|
||||
attackBonus: M5ModResult;
|
||||
defenseBonus: M5ModResult;
|
||||
movementBonus: M5ModResult;
|
||||
movement: M5ModResult;
|
||||
resistanceMind: M5ModResult;
|
||||
resistanceBody: M5ModResult;
|
||||
spellCasting: M5ModResult;
|
||||
|
||||
@@ -58,7 +58,7 @@ export class M5Character extends Actor {
|
||||
damageBonus: { value: 0, mods: [] },
|
||||
attackBonus: { value: 0, mods: [] },
|
||||
defenseBonus: { value: 0, mods: [] },
|
||||
movementBonus: { value: 0, mods: [] },
|
||||
movement: { value: 0, mods: [] },
|
||||
resistanceMind: { value: 0, mods: [] },
|
||||
resistanceBody: { value: 0, mods: [] },
|
||||
spellCasting: { value: 0, mods: [] },
|
||||
@@ -121,7 +121,7 @@ export class M5Character extends Actor {
|
||||
ret.stats.damageBonus = this.modResult(Math.floor(ret.attributes.st.value / 20) + Math.floor(ret.attributes.gs.value / 30) - 3);
|
||||
ret.stats.attackBonus = this.modResult(ret.attributes.gs.bonus);
|
||||
ret.stats.defenseBonus = this.modResult(ret.attributes.gw.bonus);
|
||||
ret.stats.movementBonus = this.modResult(0);
|
||||
ret.stats.movement = this.modResult(data.movement);
|
||||
ret.stats.resistanceMind = this.modResult(
|
||||
(data.info.magicUsing ? 2 : 0) + ret.stats.defense.value + (data.info.race === "Mensch" ? ret.attributes.in.bonus : this.raceBonus(data.info.race))
|
||||
);
|
||||
@@ -138,7 +138,7 @@ export class M5Character extends Actor {
|
||||
const aggregate = new M5ModAggregate(data, ret);
|
||||
|
||||
context.items
|
||||
?.filter((item) => item.type === "item" || item.type === "effect")
|
||||
?.filter((item) => (item.type === "item" || item.type === "effect" || item.type === "armor") && item.system.equipped)
|
||||
.forEach((item) => {
|
||||
const mods = item.system.mods;
|
||||
//console.log("Actor item mods", mods)
|
||||
@@ -166,6 +166,7 @@ export class M5Character extends Actor {
|
||||
label: label,
|
||||
magic: item.system.magic,
|
||||
calc: item.system.calc,
|
||||
equipped: item.system?.equipped,
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -185,6 +186,7 @@ export class M5Character extends Actor {
|
||||
label: label,
|
||||
magic: item.system.magic,
|
||||
calc: item.system.calc,
|
||||
equipped: item.system?.equipped,
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -267,6 +269,7 @@ export class M5Character extends Actor {
|
||||
label: label,
|
||||
magic: item.system.magic,
|
||||
calc: item.system.calc,
|
||||
equipped: item.system?.equipped,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export default class M5ModAggregate {
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DEFENSE, operation: M5ModOperation.SET, value: calc.stats.defenseBonus.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.ATTACK, operation: M5ModOperation.SET, value: calc.stats.attackBonus.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DAMAGE, operation: M5ModOperation.SET, value: calc.stats.damageBonus.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.MOVEMENT, operation: M5ModOperation.SET, value: calc.stats.movementBonus.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.MOVEMENT, operation: M5ModOperation.SET, value: calc.stats.movement.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.RESISTANCE_MIND, operation: M5ModOperation.SET, value: calc.stats.resistanceMind.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.RESISTANCE_BODY, operation: M5ModOperation.SET, value: calc.stats.resistanceBody.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.SPELL_CASTING, operation: M5ModOperation.SET, value: calc.stats.spellCasting.value }, characterString);
|
||||
|
||||
@@ -105,6 +105,11 @@ export class M5Item extends Item {
|
||||
calc.fw += skillData.fw;
|
||||
}
|
||||
}
|
||||
} else if (itemType === "armor") {
|
||||
itemData.mods[0] = { type: "stat", id: "defenseBonus", operation: "add", value: itemData.stats.defenseBonus };
|
||||
itemData.mods[1] = { type: "stat", id: "attackBonus", operation: "add", value: itemData.stats.attackBonus };
|
||||
itemData.mods[2] = { type: "stat", id: "movement", operation: "add", value: itemData.stats.movementBonus };
|
||||
itemData.mods[3] = { type: "attribute", id: "gw", operation: "add100", value: itemData.attributeMod.gw };
|
||||
} else if (itemType === "spell") {
|
||||
calc.fw = 0;
|
||||
if (actor) {
|
||||
@@ -134,8 +139,10 @@ export class M5Item extends Item {
|
||||
itemData.rolls.formulas[0].label = skill.name;
|
||||
}
|
||||
}
|
||||
} else if (itemType === "item" || itemType === "effect") {
|
||||
}
|
||||
if (itemData?.mods) {
|
||||
calc.mods = {};
|
||||
|
||||
Object.keys(itemData?.mods).forEach((key) => {
|
||||
const mod = itemData.mods[key];
|
||||
const modCalc = {};
|
||||
@@ -243,6 +250,7 @@ export class M5Item extends Item {
|
||||
}
|
||||
|
||||
const roll = new M5Roll(rollData, this.actor, item.name);
|
||||
console.log(roll);
|
||||
return roll.toMessage();
|
||||
} else {
|
||||
ChatMessage.create({
|
||||
|
||||
Reference in New Issue
Block a user