mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-04-30 05:24:22 +01:00
[Bug] Prevent Mystical Rock
after Max Stack (#5606)
* [Bug] Prevent `Mystical Rock` after Max Stack * Update modifier-type.ts * fixed ordering, testing locally --------- Co-authored-by: damocleas <damocleas25@gmail.com>
This commit is contained in:
parent
5217703d2b
commit
4a4e766135
@ -2823,12 +2823,21 @@ 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 = [
|
||||||
Abilities.DRIZZLE,
|
|
||||||
Abilities.ORICHALCUM_PULSE,
|
|
||||||
Abilities.DROUGHT,
|
Abilities.DROUGHT,
|
||||||
|
Abilities.ORICHALCUM_PULSE,
|
||||||
|
Abilities.DRIZZLE,
|
||||||
Abilities.SAND_STREAM,
|
Abilities.SAND_STREAM,
|
||||||
Abilities.SAND_SPIT,
|
Abilities.SAND_SPIT,
|
||||||
Abilities.SNOW_WARNING,
|
Abilities.SNOW_WARNING,
|
||||||
@ -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…
x
Reference in New Issue
Block a user