mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
ReplaceDamage: fixed "Prevent$ True" count for Prevention$ Effects too.
make AI use it in damageIfUnblocked
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user