- Attempt to fix the AI never playing Fight with Fire, kicked or unkicked.

This commit is contained in:
Agetian
2018-11-03 11:01:15 +03:00
parent faa49ccf70
commit 0f72f0db8a
2 changed files with 5 additions and 3 deletions

View File

@@ -494,7 +494,9 @@ public class DamageDealAi extends DamageAiBase {
return true; return true;
} }
if (tgt.getMaxTargets(source, sa) <= 0) { // AssumeAtLeastOneTarget is used for cards with funky targeting implementation like Fight with Fire which would
// otherwise confuse the AI by returning 0 unexpectedly during SA "AI can play" tests.
if (tgt.getMaxTargets(source, sa) <= 0 && !logic.equals("AssumeAtLeastOneTarget")) {
return false; return false;
} }

View File

@@ -2,8 +2,8 @@ Name:Fight with Fire
ManaCost:2 R ManaCost:2 R
Types:Sorcery Types:Sorcery
K:Kicker:5 R K:Kicker:5 R
A:SP$ DealDamage | Cost$ 2 R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 5 | TargetMin$ X | TargetMax$ X | References$ X | SubAbility$ DBDealDamage | SpellDescription$ CARDNAME deals 5 damage to target creature. If this spell was kicked, it deals 10 damage divided as you choose among any number of targets instead. A:SP$ DealDamage | Cost$ 2 R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 5 | TargetMin$ X | TargetMax$ X | References$ X | SubAbility$ DBDealDamage | AILogic$ AssumeAtLeastOneTarget | SpellDescription$ CARDNAME deals 5 damage to target creature. If this spell was kicked, it deals 10 damage divided as you choose among any number of targets instead.
SVar:DBDealDamage:DB$ DealDamage | Condition$ Kicked | ValidTgts$ Creature,Player,Planeswalker | NumDmg$ 10 | TargetMin$ Y | TargetMax$ Z | DividedAsYouChoose$ Z | References$ Y,Z SVar:DBDealDamage:DB$ DealDamage | Condition$ Kicked | ValidTgts$ Creature,Player,Planeswalker | NumDmg$ 10 | TargetMin$ Y | TargetMax$ Z | DividedAsYouChoose$ Z | References$ Y,Z | AILogic$ AssumeAtLeastOneTarget
SVar:X:Count$Kicked.0.1 SVar:X:Count$Kicked.0.1
SVar:Y:Count$Kicked.1.0 SVar:Y:Count$Kicked.1.0
SVar:Z:Count$Kicked.10.0 SVar:Z:Count$Kicked.10.0