Skip to content

Commit

Permalink
fix(actor sheet): a bug has been fixed in the relationship between pv…
Browse files Browse the repository at this point in the history
…, pe, san max and effects

the variable itself was not included in the calculations, so modifications to it did not take effect
  • Loading branch information
SouOWendel committed Jan 3, 2024
1 parent 366be10 commit 4729d73
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions module/sheets/actor-sheet.mjs
Expand Up @@ -114,21 +114,21 @@ export class OrdemActorSheet extends ActorSheet {
// DEFININDO STATUS CONFORME A CLASSE
// TODO: Converter as classes para o inglês
if (context.data.class == 'Combatente') {
context.data.PV.max = (20 + VIG) + ((nexIf) && nexAdjust * (4 + VIG));
context.data.PE.max = (2 + PRE) + ((nexIf) && nexAdjust * (2 + PRE));
context.data.SAN.max = (12) + ((nexIf) && nexAdjust * 3);
context.data.PV.max += (20 + VIG) + ((nexIf) && nexAdjust * (4 + VIG));
context.data.PE.max += (2 + PRE) + ((nexIf) && nexAdjust * (2 + PRE));
context.data.SAN.max += (12) + ((nexIf) && nexAdjust * 3);
} else if (context.data.class == 'Especialista') {
context.data.PV.max = (16 + VIG) + ((nexIf) && nexAdjust * (3 + VIG));
context.data.PE.max = (3 + PRE) + ((nexIf) && nexAdjust * (3 + PRE));
context.data.SAN.max = (16) + ((nexIf) && nexAdjust * 4);
context.data.PV.max += (16 + VIG) + ((nexIf) && nexAdjust * (3 + VIG));
context.data.PE.max += (3 + PRE) + ((nexIf) && nexAdjust * (3 + PRE));
context.data.SAN.max += (16) + ((nexIf) && nexAdjust * 4);
} else if (context.data.class == 'Ocultista') {
context.data.PV.max = (12 + VIG) + ((nexIf) && nexAdjust * (2 + VIG));
context.data.PE.max = (4 + PRE) + ((nexIf) && nexAdjust * (4 + PRE));
context.data.SAN.max = (20) + ((nexIf) && nexAdjust * 5);
context.data.PV.max += (12 + VIG) + ((nexIf) && nexAdjust * (2 + VIG));
context.data.PE.max += (4 + PRE) + ((nexIf) && nexAdjust * (4 + PRE));
context.data.SAN.max += (20) + ((nexIf) && nexAdjust * 5);
} else {
context.data.PV.max = (10);
context.data.PE.max = (10);
context.data.SAN.max = (10);
context.data.PV.max = context.data.PV.max || 0;
context.data.PE.max = context.data.PE.max || 0;
context.data.SAN.max = context.data.SAN.max || 0;
}

/**
Expand Down

0 comments on commit 4729d73

Please sign in to comment.