Apply Kev's Suggestions

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Amani H. 2025-01-06 13:30:15 -05:00 committed by GitHub
parent fbace5f9d6
commit 0219fc5116
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1766,7 +1766,7 @@ const modifierPool: ModifierPool = {
const hasStatusMoves = [ Moves.FACADE, Moves.PSYCHO_SHIFT ] const hasStatusMoves = [ Moves.FACADE, Moves.PSYCHO_SHIFT ]
.some(m => moveset.includes(m)); .some(m => moveset.includes(m));
// Moves that take advantage of being able to give the target a status orb // Moves that take advantage of being able to give the target a status orb
// TODO: Take moves (Trick, Fling, Switcheroo) from comment they are implemented // TODO: Take moves (Trick, Fling, Switcheroo) from comment when they are implemented
const hasItemMoves = [ /* Moves.TRICK, Moves.FLING, Moves.SWITCHEROO */ ] const hasItemMoves = [ /* Moves.TRICK, Moves.FLING, Moves.SWITCHEROO */ ]
.some(m => moveset.includes(m)); .some(m => moveset.includes(m));
@ -1779,10 +1779,7 @@ const modifierPool: ModifierPool = {
const hasOppositeAbility = [ Abilities.FLARE_BOOST ] const hasOppositeAbility = [ Abilities.FLARE_BOOST ]
.some(a => p.hasAbility(a, false, true)); .some(a => p.hasAbility(a, false, true));
if (hasGeneralAbility) { return hasSpecificAbility || (hasGeneralAbility && !hasOppositeAbility) || hasStatusMoves;
return (hasSpecificAbility || !hasOppositeAbility) || hasStatusMoves;
}
return hasSpecificAbility || hasStatusMoves;
} else { } else {
return hasItemMoves; return hasItemMoves;
} }
@ -1803,7 +1800,7 @@ const modifierPool: ModifierPool = {
const hasStatusMoves = [ Moves.FACADE, Moves.PSYCHO_SHIFT ] const hasStatusMoves = [ Moves.FACADE, Moves.PSYCHO_SHIFT ]
.some(m => moveset.includes(m)); .some(m => moveset.includes(m));
// Moves that take advantage of being able to give the target a status orb // Moves that take advantage of being able to give the target a status orb
// TODO: Take moves (Trick, Fling, Switcheroo) from comment they are implemented // TODO: Take moves (Trick, Fling, Switcheroo) from comment when they are implemented
const hasItemMoves = [ /* Moves.TRICK, Moves.FLING, Moves.SWITCHEROO */ ] const hasItemMoves = [ /* Moves.TRICK, Moves.FLING, Moves.SWITCHEROO */ ]
.some(m => moveset.includes(m)); .some(m => moveset.includes(m));
@ -1816,10 +1813,7 @@ const modifierPool: ModifierPool = {
const hasOppositeAbility = [ Abilities.TOXIC_BOOST, Abilities.POISON_HEAL ] const hasOppositeAbility = [ Abilities.TOXIC_BOOST, Abilities.POISON_HEAL ]
.some(a => p.hasAbility(a, false, true)); .some(a => p.hasAbility(a, false, true));
if (hasGeneralAbility) { return hasSpecificAbility || (hasGeneralAbility && !hasOppositeAbility) || hasStatusMoves;
return (hasSpecificAbility || !hasOppositeAbility) || hasStatusMoves;
}
return hasSpecificAbility || hasStatusMoves;
} else { } else {
return hasItemMoves; return hasItemMoves;
} }