Revival Blessing condition and tests

This commit is contained in:
innerthunder 2024-12-07 14:07:32 -08:00 committed by Sirz Benjie
parent 7384cc47b9
commit f1b5f4ba89
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -6038,10 +6038,16 @@ export class RevivalBlessingAttr extends MoveEffectAttr {
}
}
return true;
} else {
globalScene.queueMessage(i18next.t("battle:attackFailed"));
}
return false;
}
getCondition(): MoveConditionFunc {
return (user, target, move) =>
(user instanceof PlayerPokemon && globalScene.getPlayerParty().findIndex((p) => p.isFainted()) > -1) ||
(user instanceof EnemyPokemon &&
user.hasTrainer() &&
globalScene.getEnemyParty().findIndex((p) => p.isFainted()) > -1);
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {