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
Changes from 4 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
24 changes: 24 additions & 0 deletions src/module/actor/constants.js
Original file line number Diff line number Diff line change
@@ -219,6 +219,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
@@ -894,6 +897,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
@@ -902,6 +908,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
@@ -910,6 +919,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
@@ -1001,6 +1013,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
@@ -1009,6 +1024,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
@@ -1247,6 +1265,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
@@ -1255,6 +1276,9 @@ export const INITIAL_ACTOR_DATA = {
base: {
value: 0
},
special: {
value: 0
},
final: {
value: 0
}
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
@@ -4,8 +4,10 @@ import { calculateFatigue } from './calculations/calculateFatigue';
* @param { import('../../../../../../types/Actor').ABFActorDataSourceData} data
*/
export const mutateAllActionsModifier = data => {
const { pain, allActions } = data.general.modifiers;

pain.fatigue.value = calculateFatigue(data);
if (pain.fatigue.value + pain.physical.value === 0) { pain.withstandPain.value = 0 };
allActions.final.value = allActions.base.value + allActions.special.value + pain.incapacitation.value + Math.min(0, pain.fatigue.value + pain.physical.value + pain.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
@@ -5,7 +5,6 @@ import { WeaponDataSource } from '../../../../../types/Items';
export const mutateInitiative = (data: ABFActorDataSourceData) => {
const combat = data.combat as { weapons: WeaponDataSource[] };
const { general } = data;
const initiativeMod = data.general.modifiers.initiativeMod.value;

const allActionMod = general.modifiers.allActions.final.value;
const penalty =
@@ -14,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 + initiativeMod;
initiative.final.value = initiative.base.value + initiative.special.value + penalty;

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

Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ import { calculateInnateMagic } from './calculations/calculateInnateMagic';
*/
export const mutateMysticData = data => {
const allActionsPenalty = data.general.modifiers.allActions.final.value;
const magicProjectionMod = data.general.modifiers.magicProjectionMod.value;

const { mystic } = data;

@@ -37,20 +36,20 @@ export const mutateMysticData = data => {
}
}
mystic.magicProjection.final.value = Math.max(
mystic.magicProjection.base.value + allActionsPenalty + magicProjectionMod,
mystic.magicProjection.base.value + allActionsPenalty,
0
);
mystic.magicProjection.imbalance.offensive.final.value = Math.max(
mystic.magicProjection.imbalance.offensive.base.value +
allActionsPenalty +
magicProjectionMod,
mystic.magicProjection.imbalance.offensive.special.value +
allActionsPenalty,
0
);

mystic.magicProjection.imbalance.defensive.final.value = Math.max(
mystic.magicProjection.imbalance.defensive.base.value +
allActionsPenalty +
magicProjectionMod,
mystic.magicProjection.imbalance.defensive.special.value +
allActionsPenalty,
0
);

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* @param {import('../../../../../../types/Actor').ABFActorDataSourceData} data
*/
export const mutatePsychicData = data => {
const allActionsPenalty = data.general.modifiers.allActions.final.value;

const { psychicProjection, psychicPotential } = data.psychic;

psychicProjection.final.value = Math.max(
psychicProjection.base.value + allActionsPenalty,
0
);
Comment on lines +9 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

Esto no lo quitamos con la PR anterior? Pensaba que ahora sólo hay proyección ofensiva y proyección defensiva.

Si eso es así, deberíamos crear un issue para eliminar las proyecciones base y final, quedarnos sólo con la ofensiva y la defensiva y quitar el "imbalance" de la ruta, porque ya no tendría sentido.

psychicProjection.imbalance.offensive.final.value = Math.max(
psychicProjection.imbalance.offensive.base.value +
psychicProjection.imbalance.offensive.special.value +
allActionsPenalty,
0
);
psychicProjection.imbalance.defensive.final.value = Math.max(
psychicProjection.imbalance.defensive.base.value +
psychicProjection.imbalance.defensive.special.value +
allActionsPenalty,
0
);

psychicPotential.final.value = Math.max(
psychicPotential.base.value + Math.min(allActionsPenalty, 0),
0
);
};

This file was deleted.

16 changes: 8 additions & 8 deletions src/template.json
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@
},
"secondaries": {
"lifePoints": { "value": 0, "max": 0 },
"initiative": { "base": { "value": 0 }, "final": { "value": 0 } },
"initiative": { "base": { "value": 0 }, "special": { "value": 0 }, "final": { "value": 0 } },
"fatigue": { "value": 0, "max": 0 },
"regenerationType": { "mod": { "value": 0 }, "final": { "value": 0 } },
"regeneration": {
@@ -159,9 +159,9 @@
"secondarySpecialSkills": []
},
"combat": {
"attack": { "base": { "value": 0 }, "final": { "value": 0 } },
"block": { "base": { "value": 0 }, "final": { "value": 0 } },
"dodge": { "base": { "value": 0 }, "final": { "value": 0 } },
"attack": { "base": { "value": 0 }, "special": { "value": 0 }, "final": { "value": 0 } },
"block": { "base": { "value": 0 }, "special": { "value": 0 }, "final": { "value": 0 } },
"dodge": { "base": { "value": 0 }, "special": { "value": 0 }, "final": { "value": 0 } },
"wearArmor": { "value": 0 },
"totalArmor": {
"at": {
@@ -197,8 +197,8 @@
"base": { "value": 0 },
"final": { "value": 0 },
"imbalance": {
"offensive": { "base": { "value": 0 }, "final": { "value": 0 } },
"defensive": { "base": { "value": 0 }, "final": { "value": 0 } }
"offensive": { "base": { "value": 0 }, "special": { "value": 0 }, "final": { "value": 0 } },
"defensive": { "base": { "value": 0 }, "special": { "value": 0 }, "final": { "value": 0 } }
}
},
"magicLevel": {
@@ -272,8 +272,8 @@
"base": { "value": 0 },
"final": { "value": 0 },
"imbalance": {
"offensive": { "base": { "value": 0 }, "final": { "value": 0 } },
"defensive": { "base": { "value": 0 }, "final": { "value": 0 } }
"offensive": { "base": { "value": 0 }, "special": { "value": 0 }, "final": { "value": 0 } },
"defensive": { "base": { "value": 0 }, "special": { "value": 0 }, "final": { "value": 0 } }
}
},
"psychicPoints": { "value": 0, "max": 0 },