removed old comments

pull/633/head
Sbug98 2024-05-13 18:22:46 +02:00
parent 812b8ee71f
commit def8528a42
1 changed files with 0 additions and 4 deletions

View File

@ -2120,18 +2120,14 @@ export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr {
*/ */
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise<boolean> { applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise<boolean> {
let hadEffect: boolean = false; let hadEffect: boolean = false;
//cycle on each opponent
for(let opp of pokemon.getOpponents()) { for(let opp of pokemon.getOpponents()) {
//check if anyone of them is sleeping
if(opp.status !== undefined && opp.status.effect === StatusEffect.SLEEP) { if(opp.status !== undefined && opp.status.effect === StatusEffect.SLEEP) {
//if so, deal a min of 1 damage and queue a message
opp.damageAndUpdate(Math.floor(Math.max(1, opp.getMaxHp() / 8)), HitResult.OTHER); opp.damageAndUpdate(Math.floor(Math.max(1, opp.getMaxHp() / 8)), HitResult.OTHER);
pokemon.scene.queueMessage(getPokemonMessage(opp, ' is tormented!')); pokemon.scene.queueMessage(getPokemonMessage(opp, ' is tormented!'));
hadEffect = true; hadEffect = true;
} }
} }
//returns true only if one of the opponents were sleeping
return hadEffect; return hadEffect;
} }