diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index f39df21a4..2925f7945 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -1067,7 +1067,7 @@ export class ShinyRateBoosterModifier extends PersistentModifier { } getMaxStackCount(): integer { - return 5; + return 4; } } diff --git a/src/system/modifier-data.ts b/src/system/modifier-data.ts index 84badd15e..772c61026 100644 --- a/src/system/modifier-data.ts +++ b/src/system/modifier-data.ts @@ -39,7 +39,10 @@ export default class ModifierData { if (type instanceof ModifierTypeGenerator) type = (type as ModifierTypeGenerator).generateType(this.player ? scene.getParty() : scene.getEnemyField(), this.typePregenArgs); - const ret = Reflect.construct(constructor, ([ type ] as any[]).concat(this.args).concat(this.stackCount)) as PersistentModifier + const ret = Reflect.construct(constructor, ([ type ] as any[]).concat(this.args).concat(this.stackCount)) as PersistentModifier; + + if (ret.stackCount > ret.getMaxStackCount()) + ret.stackCount = ret.getMaxStackCount(); return ret; }