ReplaceDamage: fixed "Prevent$ True" count for Prevention$ Effects too.

make AI use it in damageIfUnblocked
This commit is contained in:
Hanmac
2017-05-27 13:52:23 +00:00
parent 4ef6d1c5c0
commit bbaf9078bd
2 changed files with 14 additions and 18 deletions

View File

@@ -196,12 +196,8 @@ public class ComputerUtilCombat {
}
if (!attacked.getGame().getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noPrevention)) {
// ask ReplacementDamage directly -- FIXME: this actually doesn't work right now, so it's temporarily reverted to the old form (see below).
//if (ComputerUtilCombat.isCombatDamagePrevented(attacker, attacked, damage)) {
if (attacker.hasKeyword("Prevent all damage that would be dealt by CARDNAME.")
|| attacker.hasKeyword("Prevent all damage that would be dealt to and by CARDNAME.")
|| attacker.hasKeyword("Prevent all combat damage that would be dealt by CARDNAME.")
|| attacker.hasKeyword("Prevent all combat damage that would be dealt to and dealt by CARDNAME.")) {
// ask ReplacementDamage directly
if (ComputerUtilCombat.isCombatDamagePrevented(attacker, attacked, damage)) {
return 0;
}
}