Bosses prefer not to use sacrificial moves

pull/40/head
Flashfyre 2024-04-05 12:36:09 -04:00
parent a3fcf3f3d2
commit d88871a86b
1 changed files with 2 additions and 0 deletions

View File

@ -664,6 +664,8 @@ export class SacrificialAttr extends MoveEffectAttr {
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
if (user.isBoss())
return -20;
return Math.ceil(((1 - user.getHpRatio()) * 10 - 10) * (target.getAttackTypeEffectiveness(move.type) - 0.5));
}
}