Skip to content

Commit

Permalink
fix(actor-sheet): fixed the reflexes calc, the skills mod is undefine…
Browse files Browse the repository at this point in the history
…d and resulting in NaN var
  • Loading branch information
SouOWendel committed Jan 28, 2024
1 parent 0dd6fc5 commit 4c5639a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion module/sheets/actor-sheet.mjs
Expand Up @@ -102,7 +102,11 @@ export class OrdemActorSheet extends ActorSheet {

// DEFESA E ESQUIVA
context.data.defense.value += AGI;
context.data.defense.dodge = context.data.defense.value + REFLEXES.value + REFLEXES.mod;
console.log(typeof context.data.defense.dodge, context.data.defense.dodge);
console.log(typeof context.data.defense.value, context.data.defense.value);
console.log(typeof REFLEXES.value, REFLEXES.value);
console.log(typeof REFLEXES.mod, REFLEXES.mod);
context.data.defense.dodge = context.data.defense.value + REFLEXES.value + (REFLEXES.mod || 0);

// NEX
const calcNEX = (NEX < 99) ? Math.floor(NEX / 5) : 20;
Expand Down
3 changes: 2 additions & 1 deletion template.json
Expand Up @@ -24,7 +24,8 @@
},
"defense": {
"value": 10,
"bonus": 0
"bonus": 0,
"dodge": 0
},
"desloc": {
"value": 9,
Expand Down

0 comments on commit 4c5639a

Please sign in to comment.