Movement stat (#10)

Changes:
 + make movement stat work and be moddable by effects
This commit is contained in:
Byroks 2023-11-29 10:14:49 +01:00 committed by GitHub
parent e141839055
commit 8095785fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -145,7 +145,7 @@ export interface M5CharacterCalculatedData {
damageBonus: M5ModResult;
attackBonus: M5ModResult;
defenseBonus: M5ModResult;
movementBonus: M5ModResult;
movement: M5ModResult;
resistanceMind: M5ModResult;
resistanceBody: M5ModResult;
spellCasting: M5ModResult;

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

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

View File

@ -56,7 +56,7 @@
<td>{{localize "midgard5.luckPoints"}}</td>
<td><input name="data.gp" type="text" value="{{data.gp}}" data-dtype="Number" /></td>
<td>{{localize "Bewegungsweite"}}</td>
<td><input name="data.movement" type="text" value="{{data.movement}}" data-dtype="Number" /></td>
<td><input name="data.movement" type="text" value="{{data.calc.stats.movement.value}}" data-dtype="Number" /></td>
</tr>
</tbody>
</table>