mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Apply Biome
This commit is contained in:
parent
a8da3f8e51
commit
156cf5cd61
@ -287,7 +287,7 @@ export class ReceivedMoveDamageMultiplierAbAttr extends PreDefendAbAttr {
|
|||||||
protected condition: PokemonDefendCondition;
|
protected condition: PokemonDefendCondition;
|
||||||
private damageMultiplier: number;
|
private damageMultiplier: number;
|
||||||
|
|
||||||
constructor(condition: PokemonDefendCondition, damageMultiplier: number, showAbility: boolean = false) {
|
constructor(condition: PokemonDefendCondition, damageMultiplier: number, showAbility = false) {
|
||||||
super(showAbility);
|
super(showAbility);
|
||||||
|
|
||||||
this.condition = condition;
|
this.condition = condition;
|
||||||
@ -1093,7 +1093,7 @@ export class PostStatStageChangeStatStageChangeAbAttr extends PostStatStageChang
|
|||||||
this.stages = stages;
|
this.stages = stages;
|
||||||
}
|
}
|
||||||
|
|
||||||
override canApplyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statStagesChanged: BattleStat[], stagesChanged: integer, selfTarget: boolean, args: any[]): boolean {
|
override canApplyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statStagesChanged: BattleStat[], stagesChanged: number, selfTarget: boolean, args: any[]): boolean {
|
||||||
return this.condition(pokemon, statStagesChanged, stagesChanged) && !selfTarget;
|
return this.condition(pokemon, statStagesChanged, stagesChanged) && !selfTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1159,7 +1159,7 @@ export class MoveEffectChanceMultiplierAbAttr extends AbAttr {
|
|||||||
* @see {@linkcode applyPreDefend}
|
* @see {@linkcode applyPreDefend}
|
||||||
*/
|
*/
|
||||||
export class IgnoreMoveEffectsAbAttr extends PreDefendAbAttr {
|
export class IgnoreMoveEffectsAbAttr extends PreDefendAbAttr {
|
||||||
constructor(showAbility: boolean = false) {
|
constructor(showAbility = false) {
|
||||||
super(showAbility);
|
super(showAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1412,7 +1412,7 @@ export class MovePowerBoostAbAttr extends VariableMovePowerAbAttr {
|
|||||||
private condition: PokemonAttackCondition;
|
private condition: PokemonAttackCondition;
|
||||||
private powerMultiplier: number;
|
private powerMultiplier: number;
|
||||||
|
|
||||||
constructor(condition: PokemonAttackCondition, powerMultiplier: number, showAbility: boolean = false) {
|
constructor(condition: PokemonAttackCondition, powerMultiplier: number, showAbility = false) {
|
||||||
super(showAbility);
|
super(showAbility);
|
||||||
this.condition = condition;
|
this.condition = condition;
|
||||||
this.powerMultiplier = powerMultiplier;
|
this.powerMultiplier = powerMultiplier;
|
||||||
@ -1628,7 +1628,7 @@ export class AllyStatMultiplierAbAttr extends AbAttr {
|
|||||||
* @param multipler - The multiplier to apply to the stat
|
* @param multipler - The multiplier to apply to the stat
|
||||||
* @param ignorable - Whether the multiplier can be ignored by mold breaker-like moves and abilities
|
* @param ignorable - Whether the multiplier can be ignored by mold breaker-like moves and abilities
|
||||||
*/
|
*/
|
||||||
constructor(stat: BattleStat, multiplier: number, ignorable: boolean = true) {
|
constructor(stat: BattleStat, multiplier: number, ignorable = true) {
|
||||||
super(false);
|
super(false);
|
||||||
|
|
||||||
this.stat = stat;
|
this.stat = stat;
|
||||||
@ -2826,7 +2826,7 @@ export class CommanderAbAttr extends AbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class PreSwitchOutAbAttr extends AbAttr {
|
export class PreSwitchOutAbAttr extends AbAttr {
|
||||||
constructor(showAbility: boolean = true) {
|
constructor(showAbility = true) {
|
||||||
super(showAbility);
|
super(showAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3590,7 +3590,7 @@ export class IgnoreContactAbAttr extends AbAttr { }
|
|||||||
export class PreWeatherEffectAbAttr extends AbAttr {
|
export class PreWeatherEffectAbAttr extends AbAttr {
|
||||||
canApplyPreWeatherEffect(
|
canApplyPreWeatherEffect(
|
||||||
pokemon: Pokemon,
|
pokemon: Pokemon,
|
||||||
passive: Boolean,
|
passive: boolean,
|
||||||
simulated: boolean,
|
simulated: boolean,
|
||||||
weather: Weather | null,
|
weather: Weather | null,
|
||||||
cancelled: BooleanHolder,
|
cancelled: BooleanHolder,
|
||||||
@ -3619,7 +3619,7 @@ export class BlockWeatherDamageAttr extends PreWeatherDamageAbAttr {
|
|||||||
this.weatherTypes = weatherTypes;
|
this.weatherTypes = weatherTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
override canApplyPreWeatherEffect(pokemon: Pokemon, passive: Boolean, simulated: boolean, weather: Weather, cancelled: BooleanHolder, args: any[]): boolean {
|
override canApplyPreWeatherEffect(pokemon: Pokemon, passive: boolean, simulated: boolean, weather: Weather, cancelled: BooleanHolder, args: any[]): boolean {
|
||||||
return !this.weatherTypes.length || this.weatherTypes.indexOf(weather?.weatherType) > -1;
|
return !this.weatherTypes.length || this.weatherTypes.indexOf(weather?.weatherType) > -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3637,7 +3637,7 @@ export class SuppressWeatherEffectAbAttr extends PreWeatherEffectAbAttr {
|
|||||||
this.affectsImmutable = !!affectsImmutable;
|
this.affectsImmutable = !!affectsImmutable;
|
||||||
}
|
}
|
||||||
|
|
||||||
override canApplyPreWeatherEffect(pokemon: Pokemon, passive: Boolean, simulated: boolean, weather: Weather, cancelled: BooleanHolder, args: any[]): boolean {
|
override canApplyPreWeatherEffect(pokemon: Pokemon, passive: boolean, simulated: boolean, weather: Weather, cancelled: BooleanHolder, args: any[]): boolean {
|
||||||
return this.affectsImmutable || weather.isImmutable();
|
return this.affectsImmutable || weather.isImmutable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4705,7 +4705,7 @@ export class MaxMultiHitAbAttr extends AbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class PostBattleAbAttr extends AbAttr {
|
export class PostBattleAbAttr extends AbAttr {
|
||||||
constructor(showAbility: boolean = true) {
|
constructor(showAbility = true) {
|
||||||
super(showAbility);
|
super(showAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5475,8 +5475,8 @@ function applySingleAbAttrs<TAttr extends AbAttr>(
|
|||||||
applyFunc: AbAttrApplyFunc<TAttr>,
|
applyFunc: AbAttrApplyFunc<TAttr>,
|
||||||
successFunc: AbAttrSuccessFunc<TAttr>,
|
successFunc: AbAttrSuccessFunc<TAttr>,
|
||||||
args: any[],
|
args: any[],
|
||||||
gainedMidTurn: boolean = false,
|
gainedMidTurn = false,
|
||||||
simulated: boolean = false,
|
simulated = false,
|
||||||
messages: string[] = []
|
messages: string[] = []
|
||||||
) {
|
) {
|
||||||
if (!pokemon?.canApplyAbility(passive) || (passive && (pokemon.getPassiveAbility().id === pokemon.getAbility().id))) {
|
if (!pokemon?.canApplyAbility(passive) || (passive && (pokemon.getPassiveAbility().id === pokemon.getAbility().id))) {
|
||||||
@ -5785,7 +5785,7 @@ function applyAbAttrsInternal<TAttr extends AbAttr>(
|
|||||||
applyFunc: AbAttrApplyFunc<TAttr>,
|
applyFunc: AbAttrApplyFunc<TAttr>,
|
||||||
successFunc: AbAttrSuccessFunc<TAttr>,
|
successFunc: AbAttrSuccessFunc<TAttr>,
|
||||||
args: any[],
|
args: any[],
|
||||||
simulated: boolean = false,
|
simulated = false,
|
||||||
messages: string[] = [],
|
messages: string[] = [],
|
||||||
gainedMidTurn = false
|
gainedMidTurn = false
|
||||||
) {
|
) {
|
||||||
@ -5914,7 +5914,7 @@ export function applyStatMultiplierAbAttrs(
|
|||||||
* @param args - unused
|
* @param args - unused
|
||||||
*/
|
*/
|
||||||
export function applyAllyStatMultiplierAbAttrs(attrType: Constructor<AllyStatMultiplierAbAttr>,
|
export function applyAllyStatMultiplierAbAttrs(attrType: Constructor<AllyStatMultiplierAbAttr>,
|
||||||
pokemon: Pokemon, stat: BattleStat, statValue: NumberHolder, simulated: boolean = false, checkedPokemon: Pokemon, ignoreAbility: boolean, ...args: any[]
|
pokemon: Pokemon, stat: BattleStat, statValue: NumberHolder, simulated = false, checkedPokemon: Pokemon, ignoreAbility: boolean, ...args: any[]
|
||||||
): void {
|
): void {
|
||||||
return applyAbAttrsInternal<AllyStatMultiplierAbAttr>(
|
return applyAbAttrsInternal<AllyStatMultiplierAbAttr>(
|
||||||
attrType,
|
attrType,
|
||||||
@ -6144,7 +6144,7 @@ export function applyPostStatStageChangeAbAttrs(
|
|||||||
attrType: Constructor<PostStatStageChangeAbAttr>,
|
attrType: Constructor<PostStatStageChangeAbAttr>,
|
||||||
pokemon: Pokemon,
|
pokemon: Pokemon,
|
||||||
stats: BattleStat[],
|
stats: BattleStat[],
|
||||||
stages: integer,
|
stages: number,
|
||||||
selfTarget: boolean,
|
selfTarget: boolean,
|
||||||
simulated = false,
|
simulated = false,
|
||||||
...args: any[]
|
...args: any[]
|
||||||
@ -6355,8 +6355,8 @@ export function applyPostItemLostAbAttrs(
|
|||||||
*/
|
*/
|
||||||
export function applyOnGainAbAttrs(
|
export function applyOnGainAbAttrs(
|
||||||
pokemon: Pokemon,
|
pokemon: Pokemon,
|
||||||
passive: boolean = false,
|
passive = false,
|
||||||
simulated: boolean = false,
|
simulated = false,
|
||||||
...args: any[]): void {
|
...args: any[]): void {
|
||||||
applySingleAbAttrs<PostSummonAbAttr>(
|
applySingleAbAttrs<PostSummonAbAttr>(
|
||||||
pokemon,
|
pokemon,
|
||||||
|
Loading…
Reference in New Issue
Block a user