fixed beahviour if 2+ opponents are on field, also added message
parent
372635227a
commit
d64f25d7cf
|
@ -2107,15 +2107,19 @@ export class PostTurnFormChangeAbAttr extends PostTurnAbAttr {
|
|||
}
|
||||
|
||||
export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr {
|
||||
|
||||
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise<boolean> {
|
||||
let hadEffect: boolean = false;
|
||||
for(let oppo of pokemon.getOpponents()) {
|
||||
if(oppo.status.effect == StatusEffect.SLEEP) {
|
||||
oppo.damageAndUpdate(Math.ceil(oppo.getMaxHp() * (1 / 8)), HitResult.OTHER);
|
||||
return true;
|
||||
pokemon.scene.queueMessage(getPokemonMessage(oppo, ' is tormeted!'));
|
||||
hadEffect = true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return hadEffect;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class PostBiomeChangeAbAttr extends AbAttr { }
|
||||
|
|
|
@ -16,8 +16,8 @@ export const DOUBLE_BATTLE_OVERRIDE = false;
|
|||
|
||||
export const ABILITY_OVERRIDE = Abilities.BAD_DREAMS;
|
||||
export const PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
||||
export const MOVE_OVERRIDE = Moves.SLEEP_POWDER;
|
||||
export const MOVE_OVERRIDE_2 = Moves.HYDRO_CANNON;
|
||||
export const MOVE_OVERRIDE = Moves.DARK_VOID;
|
||||
export const MOVE_OVERRIDE_2 = Moves.HYPER_BEAM;
|
||||
export const OPP_SPECIES_OVERRIDE = 0;
|
||||
export const OPP_ABILITY_OVERRIDE = Abilities.NONE;
|
||||
export const OPP_PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
||||
|
|
Loading…
Reference in New Issue