mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-23 00:32:28 +02:00
Add back applyPreLeaveFieldAttrs
Attribute was removed due to absence in a cherry-pick
This commit is contained in:
parent
7a4f4cfb15
commit
64025954d6
@ -2841,7 +2841,7 @@ export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr {
|
||||
}
|
||||
|
||||
export class PreLeaveFieldAbAttr extends AbAttr {
|
||||
applyPreLeaveField(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise<boolean> {
|
||||
applyPreLeaveField(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2856,7 +2856,7 @@ export class PreLeaveFieldClearWeatherAbAttr extends PreLeaveFieldAbAttr {
|
||||
* @param args N/A
|
||||
* @returns Returns `true` if the weather clears, otherwise `false`.
|
||||
*/
|
||||
applyPreLeaveField(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise<boolean> {
|
||||
applyPreLeaveField(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
|
||||
const weatherType = globalScene.arena.weather?.weatherType;
|
||||
let turnOffWeather = false;
|
||||
|
||||
@ -5646,6 +5646,23 @@ export function applyPreSwitchOutAbAttrs(
|
||||
);
|
||||
}
|
||||
|
||||
export function applyPreLeaveFieldAbAttrs(
|
||||
attrType: Constructor<PreLeaveFieldAbAttr>,
|
||||
pokemon: Pokemon,
|
||||
simulated: boolean = false,
|
||||
...args: any[]
|
||||
): void {
|
||||
return applyAbAttrsInternal<PreLeaveFieldAbAttr>(
|
||||
attrType,
|
||||
pokemon,
|
||||
(attr, passive) =>
|
||||
attr.applyPreLeaveField(pokemon, passive, simulated, args),
|
||||
args,
|
||||
true,
|
||||
simulated
|
||||
);
|
||||
}
|
||||
|
||||
export function applyPreStatStageChangeAbAttrs(
|
||||
attrType: Constructor<PreStatStageChangeAbAttr>,
|
||||
pokemon: Pokemon | null,
|
||||
|
Loading…
Reference in New Issue
Block a user