[Bug] Prevent Mystical Rock after Max Stack

This commit is contained in:
xsn34kzx 2025-04-01 12:31:14 -04:00
parent 6477be99f5
commit 7f406b22d7

View File

@ -2823,6 +2823,15 @@ const modifierPool: ModifierPool = {
modifierTypes.MYSTICAL_ROCK, modifierTypes.MYSTICAL_ROCK,
(party: Pokemon[]) => { (party: Pokemon[]) => {
return party.some(p => { return party.some(p => {
let isHoldingMax = false;
for (const i of p.getHeldItems()) {
if (i.type.id === "MYSTICAL_ROCK") {
isHoldingMax = i.getStackCount() === i.getMaxStackCount();
break;
}
}
if (!isHoldingMax) {
const moveset = p.getMoveset(true).map(m => m.moveId); const moveset = p.getMoveset(true).map(m => m.moveId);
const hasAbility = [ const hasAbility = [
@ -2854,6 +2863,8 @@ const modifierPool: ModifierPool = {
].some(m => moveset.includes(m)); ].some(m => moveset.includes(m));
return hasAbility || hasMoves; return hasAbility || hasMoves;
}
return false;
}) })
? 10 ? 10
: 0; : 0;