- Added AI support for Frenetic Efreet.

This commit is contained in:
Sloth
2014-10-18 20:17:12 +00:00
parent ab9fc96f3e
commit 0948cdb133
2 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
package forge.ai.ability;
import forge.ai.ComputerUtil;
import forge.ai.SpellAbilityAi;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
@@ -15,6 +16,10 @@ public class FlipACoinAi extends SpellAbilityAi {
if (sa.hasParam("AILogic")) {
if (sa.getParam("AILogic").equals("Never")) {
return false;
} else if (sa.getParam("AILogic").equals("PhaseOut")) {
if (!ComputerUtil.predictThreatenedObjects(sa.getActivatingPlayer(), sa).contains(sa.getHostCard())) {
return false;
}
}
}
return true;

View File

@@ -3,9 +3,8 @@ ManaCost:1 U R
Types:Creature Efreet
PT:2/1
K:Flying
A:AB$ FlipACoin | Cost$ 0 | WinSubAbility$ DBPhase | LoseSubAbility$ DBSacrifice | SpellDescription$ Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.)
A:AB$ FlipACoin | Cost$ 0 | WinSubAbility$ DBPhase | LoseSubAbility$ DBSacrifice | AILogic$ PhaseOut | SpellDescription$ Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.)
SVar:DBPhase:DB$ Phases | Defined$ Self
SVar:DBSacrifice:DB$ Sacrifice | Defined$ Self
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/frenetic_efreet.jpg
Oracle:Flying\n{0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.)