Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combat automation specific attacks #196

Closed
wants to merge 118 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
98b2614
specificAttacks-and-resistance-overhauled
paiva92 Oct 17, 2023
c5125d2
specific-attacks-macro-execution
paiva92 Oct 17, 2023
f41a974
fix-psychicImbalanceCheck-and-check-result
paiva92 Oct 19, 2023
a388b41
code-aesthetic-mystic
paiva92 Oct 21, 2023
aabe156
critic-automation
paiva92 Oct 21, 2023
cb31fdc
fix-localization-criticIfBeAble
paiva92 Oct 21, 2023
71bef2b
fix-executeMacro-resistanceRoll
paiva92 Oct 21, 2023
afaf929
fix-critic-location-side
paiva92 Oct 21, 2023
16f1cbd
fix-psychic-projection
paiva92 Oct 22, 2023
f3747d5
techniques-sheet-active-effects
paiva92 Oct 22, 2023
d6eb742
hotfix-all-attacks-ignores-armor
paiva92 Oct 23, 2023
22d1716
actor-active-effects
paiva92 Oct 24, 2023
7e5bdf1
specific-attacks-combat-damage-fix
paiva92 Oct 25, 2023
e0c6179
new-critic-penalty-flag-hook
paiva92 Oct 25, 2023
955c728
new-domineTechniqueEvaluate-actor
paiva92 Oct 25, 2023
6fd2e58
rebase-fixes
paiva92 Jan 31, 2024
ffb5b59
update-3 equals to
paiva92 Jan 31, 2024
492c163
update-PP
paiva92 Feb 1, 2024
58a7a78
fix-accumulateDefenses
paiva92 Feb 1, 2024
9c34db9
fix-rebase
paiva92 Feb 1, 2024
26cff91
remove-domine technique active effects
paiva92 Feb 1, 2024
c0ef608
revamp-criticPenalty + pain modifiers
paiva92 Feb 2, 2024
474c284
visual - painModifiers
paiva92 Feb 2, 2024
04733d7
replace visuals-effects for status
paiva92 Feb 2, 2024
a1eaaba
Merge branch 'feature/new-combat-automation' into combat-automation-s…
paiva92 Feb 2, 2024
1743d69
Merge branch 'feature/new-combat-automation' into combat-automation-s…
paiva92 Feb 2, 2024
0c49037
fix - specificAttack
paiva92 Feb 3, 2024
a95ecc4
fix-mutate ACT interger
paiva92 Feb 3, 2024
66ab55a
fix-localization combat Modifiers
paiva92 Feb 3, 2024
82cc682
added - endCombat physicalPainDisappearing
paiva92 Feb 3, 2024
49f90c9
new - Combat Surprised automated
paiva92 Feb 3, 2024
9acf7d1
update - modifiers allActrions secondaryInput
paiva92 Feb 3, 2024
e4467cf
fix - surprised without combat
paiva92 Feb 4, 2024
664e990
new - psychicFatigue Combat Dialog Attacker
paiva92 Feb 4, 2024
f422f05
fix-resistanceRoll
paiva92 Feb 5, 2024
d14eb65
new-resistanceRoll socket
paiva92 Feb 6, 2024
e48cac5
rename - psychicPotencialEffect > difficultyAchieved
paiva92 Feb 7, 2024
7f87c6c
revamp - oppousedCheckRoll, CriticRoll, ResistanceRoll - with sockets
paiva92 Feb 7, 2024
0b540af
fix - macro specificAttack
paiva92 Feb 7, 2024
3a128ba
Merge branch 'feature/new-combat-automation' into combat-automation-s…
paiva92 Feb 7, 2024
d776e86
Merge branch 'feature/new-combat-automation' into combat-automation-s…
paiva92 Feb 7, 2024
839f26a
Merge branch 'feature/new-combat-automation' into combat-automation-s…
paiva92 Feb 7, 2024
ee46826
new - Macro mystic-act
paiva92 Feb 9, 2024
108bd86
update - macro-mystic-act
paiva92 Feb 15, 2024
1227728
update - background img
paiva92 Feb 15, 2024
9b48a4b
fix - localization
paiva92 Feb 15, 2024
a0a29fe
update - macro hotbar for users with maxZeon
paiva92 Feb 15, 2024
0a448df
update - release-act & withstand-pain
paiva92 Feb 15, 2024
dff2a3f
fix - mutateMysticData
paiva92 Feb 15, 2024
d1d81f2
Merge branch 'feature/new-combat-automation' into combat-automation-s…
paiva92 Feb 16, 2024
f093771
Merge branch 'combat-automation-specific-attacks' into feature/macro-…
paiva92 Feb 16, 2024
54b5d37
update - mutateData added special for Active Effects
paiva92 Feb 16, 2024
6f4b799
fix - mutate AllActions + pain modifier
paiva92 Feb 16, 2024
4180c95
Merge branch 'feature/new-combat-automation' into combat-automation-s…
paiva92 Feb 16, 2024
7b18e1d
Merge branch 'combat-automation-specific-attacks' into feature/macro-…
paiva92 Feb 16, 2024
16778b1
fix - weapon template hasOwnStr
paiva92 Feb 16, 2024
fdecbba
Merge branch 'fix/weapon-template-hasOwnStr' into combat-automation-s…
paiva92 Feb 16, 2024
7639975
new - actor criticLevel attribute
paiva92 Feb 18, 2024
7318c84
fix - rollResistance rollCritic
paiva92 Feb 20, 2024
4faa356
fix - Active Effects name/label
paiva92 Feb 20, 2024
a38c264
update - executeCombatMacro args hasCritic criticImpact
paiva92 Feb 20, 2024
fa4a220
new - GMCombat applyDamage
paiva92 Feb 20, 2024
4814f83
delete console.log()
paiva92 Feb 20, 2024
c7cddce
Merge branch 'main' into combat-automation-specific-attacks
paiva92 Feb 25, 2024
9fcae48
new - metaMagic template and constant
paiva92 Mar 3, 2024
71bd976
fix - critic roll
paiva92 Mar 3, 2024
9f00995
update - bodyparts on Actor
paiva92 Mar 3, 2024
309bfe6
Merge branch 'develop/new-combat-automation' into combat-automation-s…
paiva92 Mar 3, 2024
83cfd5b
fix - weaponSpecialCheck
paiva92 Mar 3, 2024
65de616
new - applyCritic option GMCombatDialog
paiva92 Mar 4, 2024
40dbcca
update - critic resistance roll display gm-combat-dialog
paiva92 Mar 4, 2024
213c488
update - GMCombat attacker applyCritic
paiva92 Mar 4, 2024
566beed
Merge branch 'develop/new-combat-automation' into combat-automation-s…
paiva92 Mar 4, 2024
6a39947
new - openArmor targeted attack
paiva92 Mar 4, 2024
ab3cba3
Merge branch 'develop/new-combat-automation' into combat-automation-s…
paiva92 Mar 5, 2024
c5702d8
fix - act via = 0
paiva92 Mar 6, 2024
41bc4de
Merge branch 'combat-automation-specific-attacks' into feature/macro-…
paiva92 Mar 6, 2024
9dedaed
Merge branch 'combat-automation-specific-attacks' into feature/metaMagic
paiva92 Mar 6, 2024
59237f6
update - repleace old metamagics with newer version
paiva92 Mar 6, 2024
ee6767f
update - localization
paiva92 Mar 6, 2024
56f7b82
new - spellDamage actor method
paiva92 Mar 6, 2024
fe8da8c
update - spellCasting addedZeonCost
paiva92 Mar 7, 2024
8999f41
fix - mystic actor methods
paiva92 Mar 7, 2024
43e1201
new - metamagics in combat
paiva92 Mar 7, 2024
072c631
fix - combat when not mystic
paiva92 Mar 7, 2024
51302e6
fix - combat hbs
paiva92 Mar 7, 2024
b5fbfe8
fix - combat spellDamage
paiva92 Mar 7, 2024
42222ec
fix - specificAttack knockOut
paiva92 Mar 7, 2024
0b8d278
Merge branch 'develop/new-combat-automation' into combat-automation-s…
paiva92 Mar 7, 2024
c885b4c
Merge branch 'combat-automation-specific-attacks' into feature/macro-…
paiva92 Mar 7, 2024
ea3bc32
fix - zeon accumulated
paiva92 Mar 7, 2024
c54470e
fix - lang knockOut
paiva92 Mar 7, 2024
dcd3611
Merge branch 'combat-automation-specific-attacks' into feature/macro-…
paiva92 Mar 7, 2024
dd34b13
Merge branch 'combat-automation-specific-attacks' into feature/metaMagic
paiva92 Mar 7, 2024
2f6e15d
fix - zeon accumulated actor method
paiva92 Mar 7, 2024
d218f27
Merge branch 'feature/macro-mystic-act' into feature/metaMagic-in-combat
paiva92 Mar 8, 2024
f75d900
update - metamagic exploitationOfNaturalEnergy
paiva92 Mar 8, 2024
05f6b04
update - metamagic definedMagicProjection
paiva92 Mar 8, 2024
724be63
update - metamagic advancedZeonRegeneration
paiva92 Mar 8, 2024
cdf766e
update - flag lastDefinedMagicProjection
paiva92 Mar 8, 2024
43e8bbc
fix - flag lastDefinedMagicProjection
paiva92 Mar 8, 2024
f998766
update - metamagics supernaturalShield
paiva92 Mar 8, 2024
1cffd03
update - metamagic preparedSpell and supernatural shield
paiva92 Mar 8, 2024
9160816
Merge branch 'develop/new-combat-automation' into combat-automation-s…
paiva92 Mar 13, 2024
cebd160
update - spellDamage actor method
paiva92 Mar 13, 2024
9253e84
Merge branch 'feature/metaMagic-in-combat' into combat-automation-spe…
paiva92 Mar 13, 2024
e9072c9
update - rename wrong english properties
paiva92 Mar 13, 2024
b44b255
fix - fatigueUsedBonus
paiva92 Mar 14, 2024
8b2fdfb
Merge branch 'feature/macro-mystic-act' into feature/metaMagic-in-combat
paiva92 Mar 14, 2024
e7e80aa
Merge branch 'develop/new-combat-automation' into combat-automation-s…
paiva92 Mar 18, 2024
0a664de
fix - metamagic increasedDestruction when baseDamage is 0
paiva92 Mar 21, 2024
d2b736b
fix - spellCasting async get Data CombatDefense
paiva92 Mar 27, 2024
cf238b5
fix - async mysticCanCastEvaluate
paiva92 Mar 27, 2024
f799d94
Merge branch 'develop/new-combat-automation' into combat-automation-s…
paiva92 Mar 27, 2024
bd70bdc
update - painModifieres for penalties
paiva92 Apr 12, 2024
d9332ac
new - immuneToCritic
paiva92 Apr 12, 2024
d5a11c9
update - criticRoll display
paiva92 Apr 12, 2024
2774a6b
Merge branch 'develop/new-combat-automation' into combat-automation-s…
paiva92 Apr 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 167 additions & 3 deletions src/lang/en.json

Large diffs are not rendered by default.

176 changes: 170 additions & 6 deletions src/lang/es.json

Large diffs are not rendered by default.

348 changes: 303 additions & 45 deletions src/module/actor/ABFActor.ts

Large diffs are not rendered by default.

52 changes: 51 additions & 1 deletion src/module/actor/ABFActorSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class ABFActorSheet extends ActorSheet {

getWidthDependingFromContent() {
if (this.actor.items.filter(i => i.type === ABFItems.SPELL).length > 0) {
return 1300;
return 1000;
}

return 1000;
Expand All @@ -83,6 +83,8 @@ export default class ABFActorSheet extends ActorSheet {

sheet.config = CONFIG.config;

sheet.effects = sheet.actor.getEmbeddedCollection('ActiveEffect').contents;

return sheet;
}

Expand Down Expand Up @@ -116,6 +118,28 @@ export default class ABFActorSheet extends ActorSheet {
}
});

html.find('.effect-control').click(this._onEffectControl.bind(this));

html.find('.toggle-effects-button').click(async e => {
const { effectsItemId } = e.currentTarget.dataset;
const item = this.actor.items.get(effectsItemId);
const effects = this.actor.getEmbeddedCollection('ActiveEffect').contents;
const relevantEffects = effects.filter(effect =>
effect.origin.endsWith(effectsItemId)
);

if (relevantEffects.length === 0) {
return;
}

const newStatus = !item.system.activeEffect.enabled;

for (const effect of relevantEffects) {
await effect.update({ disabled: !newStatus });
}
return item.update({ 'system.activeEffect.enabled': newStatus });
});

Comment on lines +123 to +142
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es posible que este código sea viejo y se haya quedado ahí residual? Creo que no hay ningún elemento del html con la clase .toggle-effects-button.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Está en el groups.hbs... Se llega a usar en algún sitio?

for (const item of Object.values(ALL_ITEM_CONFIGURATIONS)) {
this.buildCommonContextualMenu(item);

Expand All @@ -131,6 +155,32 @@ export default class ABFActorSheet extends ActorSheet {
}
}

_onEffectControl(event) {
event.preventDefault();
const owner = this.actor;
const a = event.currentTarget;
const tr = a.closest('tr');
const effect = tr.dataset.effectId ? owner.effects.get(tr.dataset.effectId) : null;
const status = effect?.disabled
switch (a.dataset.action) {
case 'create':
return owner.createEmbeddedDocuments('ActiveEffect', [
{
name: 'New Effect',
icon: 'icons/svg/aura.svg',
origin: owner.uuid,
disable: true
}
]);
case 'toggle':
return effect.update({ disabled: !status });
case 'edit':
return effect.sheet.render(true);
case 'delete':
return effect.delete();
}
}

async _onRoll(event) {
event.preventDefault();
const element = event.currentTarget;
Expand Down
110 changes: 108 additions & 2 deletions src/module/actor/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const INITIAL_ACTOR_DATA = {
inhuman: { value: false },
zen: { value: false },
perceivePsychic: { value: false },
defenseType: { value: '' }
defenseType: { value: '' },
immuneToCritic: false
},
modifiers: {
physicalActions: {
Expand Down Expand Up @@ -80,8 +81,25 @@ export const INITIAL_ACTOR_DATA = {
value: 0
}
},
penalties: {
fatigue: {
value: 0
},
pain: {
value: 0
},
physicalDeficiency: {
value: 0
},
withstandPain: {
value: 0
}
},
extraDamage: {
value: 0
},
criticLevel: {
value: 0
}
},
destinyPoints: {
Expand Down Expand Up @@ -127,6 +145,24 @@ export const INITIAL_ACTOR_DATA = {
value: 0
}
},
body: {
neck: { modifier: -80, weakspot: true, openArmor: false },
head: { modifier: -60, weakspot: true, openArmor: false },
elbow: { modifier: -60, weakspot: false, openArmor: false },
heart: { modifier: -60, weakspot: true, openArmor: false },
groin: { modifier: -60, weakspot: false, openArmor: false },
foot: { modifier: -50, weakspot: false, openArmor: false },
hand: { modifier: -40, weakspot: false, openArmor: false },
knee: { modifier: -40, weakspot: false, openArmor: false },
abdomen: { modifier: -20, weakspot: false, openArmor: false },
arm: { modifier: -20, weakspot: false, openArmor: false },
thigh: { modifier: -20, weakspot: false, openArmor: false },
calf: { modifier: -10, weakspot: false, openArmor: false },
torso: { modifier: -10, weakspot: false, openArmor: false },
eye: { modifier: -100, weakspot: false, openArmor: false },
wrist: { modifier: -40, weakspot: false, openArmor: false },
shoulder: { modifier: -30, weakspot: false, openArmor: false }
},
Comment on lines +148 to +165
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Entiendo que esto está en la ficha porque es posible que para ciertas criaturas los modificadores sean distintos, no?

advantages: [],
contacts: [],
inventory: [],
Expand Down Expand Up @@ -205,6 +241,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
Expand Down Expand Up @@ -880,6 +919,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
Expand All @@ -888,6 +930,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
Expand All @@ -896,6 +941,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
Expand Down Expand Up @@ -987,6 +1035,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
Expand All @@ -995,6 +1046,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
Expand Down Expand Up @@ -1037,6 +1091,53 @@ export const INITIAL_ACTOR_DATA = {
value: 0
}
},
metamagics: {
arcaneWarfare: {
empoweredShields: { sphere: 0, cost: 5, max: 2 },
mysticAccuracy: { sphere: 0, cost: [5, 10], max: 2 },
increasedDestruction: { sphere: 0, cost: 10, max: 2 },
expandedArea: { sphere: 0, cost: 10, max: 2 },
removeProtection: { sphere: 0, cost: 5, max: 3 },
defensiveExpertise: { sphere: 0, cost: 10, max: 3 },
offensiveExpertise: { sphere: 0, cost: 10, max: 3 },
doubleDamage: { sphere: 0, cost: 20, max: 1 }
},
arcanePower: {
combinedMagic: { sphere: 0, cost: 5, max: 1 },
persistentEffects: { sphere: 0, cost: 5, max: 1 },
definedMagicProjection: { sphere: 0, cost: 5, max: 7 },
exploitationOfNaturalEnergy: { sphere: 0, cost: 5, max: 2 },
advancedZeonRegeneration: { sphere: 0, cost: 5, max: 3 },
elevation: { sphere: 0, cost: 5, max: 1 },
avatar: { sphere: 0, cost: 20, max: 1 },
unlimitedZeon: { sphere: 0, cost: 20, max: 1 }
},
arcaneEsoterica: {
secureDefense: { sphere: 0, cost: 5, max: 1 },
lifeMagic: { sphere: 0, cost: 5, max: 2 },
feelMagic: { sphere: 0, cost: 5, max: 1 },
hiddenMagic: { sphere: 0, cost: 5, max: 1 },
spiritualLoop: { sphere: 0, cost: [15, 25], max: 2 },
controlSpace: { sphere: 0, cost: 10, max: 1 },
energyControl: { sphere: 0, cost: 10, max: 1 },
endureSupernaturalDamage: { sphere: 0, cost: 10, max: 1 },
transferMagic: { sphere: 0, cost: 10, max: 1 },
forceSpeed: { sphere: 0, cost: 5, max: 3 },
doubleInnateSpells: { sphere: 0, cost: 20, max: 1 },
naturalMaintenance: { sphere: 0, cost: 20, max: 1 }
},
arcaneKnowledge: {
mysticConcentration: { sphere: 0, cost: 5, max: 1 },
spellSpecialist: { sphere: 0, cost: 5, max: 7 },
pierceResistances: { sphere: 0, cost: 5, max: 2 },
increasedRange: { sphere: 0, cost: 5, max: 2 },
bindSpells: { sphere: 0, cost: 25, max: 1 },
maximizeSpells: { sphere: 0, cost: 10, max: 1 },
doubleSpell: { sphere: 0, cost: 20, max: 1 },
superiorInnateSpell: { sphere: 0, cost: 20, max: 1 },
highMagic: { sphere: 0, cost: 20, max: 1 }
}
},
Comment on lines +1094 to +1140
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guardar estos datos aquí, en el objeto del personaje, hace que se repitan un montón (todos los personajes tendrán todos estos datos incluso si no son magos. Esto no tiene sentido y además no está pensado para modificarlos dentro de la ficha.

Es mejor idea crear un nuevo tipo de objeto, la esfera metamágica, y crear un compendio de ellas con estos datos (quizá también deberían incluir los efectos que añaden a los jugadores cuando las tienen?). Luego, podría arrastrarse desde el compendio hasta el personaje y el personaje indicaría "cuántas" esferas de ese tipo tiene.

Probablemente esto suponga cambiar todo el código que tiene que ver con las metamagias (habría que extraerlo de esta pr a otra rama para trabajar en ello independientemente).

total: {
value: 0
},
Expand Down Expand Up @@ -1083,7 +1184,6 @@ export const INITIAL_ACTOR_DATA = {
spellMaintenances: [],
selectedSpells: [],
summons: [],
metamagics: [],
preparedSpells: []
},

Expand Down Expand Up @@ -1234,6 +1334,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
Expand All @@ -1242,6 +1345,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
/**
* @param {import('../../../../../../types/Actor').ABFActorDataSourceData} data
*/
export const mutateCombatData = data => {
data.combat.attack.final.value =
data.combat.attack.base.value +
data.general.modifiers.allActions.final.value +
data.general.modifiers.physicalActions.final.value;
const { combat: { attack, block, dodge }, general: { modifiers } } = data;

data.combat.block.final.value =
data.combat.block.base.value +
data.general.modifiers.allActions.final.value +
data.general.modifiers.physicalActions.final.value;
attack.final.value =
attack.base.value +
attack.special.value +
modifiers.allActions.final.value +
modifiers.physicalActions.final.value;

data.combat.dodge.final.value =
data.combat.dodge.base.value +
data.general.modifiers.allActions.final.value +
data.general.modifiers.physicalActions.final.value;
block.final.value =
block.base.value +
block.special.value +
modifiers.allActions.final.value +
modifiers.physicalActions.final.value;

dodge.final.value =
dodge.base.value +
dodge.special.value +
modifiers.allActions.final.value +
modifiers.physicalActions.final.value;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { calculateFatigue } from './calculations/calculateFatigue';
* @param { import('../../../../../../types/Actor').ABFActorDataSourceData} data
*/
export const mutateAllActionsModifier = data => {
const { penalties, allActions } = data.general.modifiers;

penalties.fatigue.value = calculateFatigue(data);
if (penalties.fatigue.value + penalties.pain.value === 0) { penalties.withstandPain.value = 0 };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No estoy seguro de si es mejor que esto te borre automáticamente la casilla de soportar el dolor o que deje el dato en la casilla pero no lo aplique si no puede aplicarlo (que ya estaría implementado en las líneas que siguen.

Deberíamos discutir qué queremos, que se borre sola la casilla o que no. Para mí es confuso que lo introduzcas a mano pero se borre solo. Pero igual es sólo para mi 🤷🏼‍♂️

Suggested change
if (penalties.fatigue.value + penalties.pain.value === 0) { penalties.withstandPain.value = 0 };

allActions.final.value = allActions.base.value + allActions.special.value + penalties.physicalDeficiency.value + Math.min(0, penalties.fatigue.value + penalties.pain.value + penalties.withstandPain.value);

data.general.modifiers.allActions.final.value =
data.general.modifiers.allActions.base.value +
data.general.modifiers.allActions.special.value + calculateFatigue(data);
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const mutateInitiative = (data: ABFActorDataSourceData) => {
) + general.modifiers.naturalPenalty.final.value;
const { initiative } = data.characteristics.secondaries;

initiative.final.value = initiative.base.value + penalty;
initiative.final.value = initiative.base.value + initiative.special.value + penalty;

const equippedWeapons = combat.weapons.filter(weapon => weapon.system.equipped.value);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const mutateMysticData = data => {
calculateInnateMagic(mystic.act.main.final.value);
if (mystic.innateMagic.via.length !== 0) {
for (const innateMagicVia of mystic.innateMagic.via) {
const actVia = mystic.act.via.find(i => i.name == innateMagicVia.name);
const actVia = mystic.act.via.find(i => i.name === innateMagicVia.name);
const actViaValue =
mystic.act.via.length !== 0 && actVia
? actVia.system.final.value
Expand All @@ -41,12 +41,14 @@ export const mutateMysticData = data => {
);
mystic.magicProjection.imbalance.offensive.final.value = Math.max(
mystic.magicProjection.imbalance.offensive.base.value +
mystic.magicProjection.imbalance.offensive.special.value +
allActionsPenalty,
0
);

mystic.magicProjection.imbalance.defensive.final.value = Math.max(
mystic.magicProjection.imbalance.defensive.base.value +
mystic.magicProjection.imbalance.defensive.special.value +
allActionsPenalty,
0
);
Expand All @@ -57,7 +59,9 @@ export const mutateMysticData = data => {
0
);
mystic.zeonRegeneration.final.value = Math.max(
mystic.zeonRegeneration.base.value - dailyZeon,
mystic.zeonRegeneration.base.value +
mystic.magicLevel.metamagics.arcanePower.advancedZeonRegeneration.sphere * 10 -
dailyZeon,
0
);

Expand Down
Loading