- Added Nix

This commit is contained in:
swordshine
2014-05-31 08:48:35 +00:00
parent 76c6812355
commit d4f9badca0
7 changed files with 21 additions and 4 deletions

View File

@@ -39,7 +39,8 @@ public class CounterAi extends SpellAbilityAi {
if (tgt != null) {
final SpellAbility topSA = game.getStack().peekAbility();
if (!CardFactoryUtil.isCounterableBy(topSA.getHostCard(), sa) || topSA.getActivatingPlayer() == ai) {
if (!CardFactoryUtil.isCounterableBy(topSA.getHostCard(), sa) || topSA.getActivatingPlayer() == ai
|| ai.getAllies().contains(topSA.getActivatingPlayer())) {
// might as well check for player's friendliness
return false;
}
@@ -48,6 +49,10 @@ public class CounterAi extends SpellAbilityAi {
return false;
}
if (sa.hasParam("CounterNoManaSpell") && topSA.getTotalManaSpent() == 0) {
return false;
}
sa.resetTargets();
if (sa.canTargetSpellAbility(topSA)) {
sa.getTargets().add(topSA);