Movement stat (#10)

Changes:
 + make movement stat work and be moddable by effects
This commit is contained in:
2023-11-29 10:14:49 +01:00
committed by GitHub
parent e141839055
commit 8095785fc2
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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))
);
+1 -1
View File
@@ -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);