Fix issues with targeting

This commit is contained in:
Flashfyre committed 2023-05-31 15:04:03 -04:00
1 parent 47fd9985c8
commit ac9814e665
3 files changed
+9 -9

No files matched your search

+4 -4
View File
@@ -1012,13 +1012,13 @@ export class HealAttr extends MoveEffectAttr {
}
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
this.addHealPhase(user, this.healRatio);
this.addHealPhase(this.selfTarget ? user : target, this.healRatio);
return true;
}
addHealPhase(user: Pokemon, healRatio: number) {
user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(),
Math.max(Math.floor(user.getMaxHp() * healRatio), 1), getPokemonMessage(user, ' regained\nhealth!'), true, !this.showAnim));
addHealPhase(target: Pokemon, healRatio: number) {
target.scene.unshiftPhase(new PokemonHealPhase(target.scene, target.getBattlerIndex(),
Math.max(Math.floor(target.getMaxHp() * healRatio), 1), getPokemonMessage(target, ' regained\nhealth!'), true, !this.showAnim));
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {