mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +02:00
[Bug] Prevent Mystical Rock
after Max Stack
This commit is contained in:
parent
6477be99f5
commit
7f406b22d7
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user