- Adding Conditional to CounterMagic

This commit is contained in:
jendave
2011-08-07 00:24:25 +00:00
parent bb33448cd1
commit 6baf6d5ee4

View File

@@ -256,8 +256,12 @@ public class AbilityFactory_CounterMagic {
} }
private void counterResolve(final AbilityFactory af, final SpellAbility sa) { private void counterResolve(final AbilityFactory af, final SpellAbility sa) {
if (!AbilityFactory.checkConditional(params, sa)){
AbilityFactory.resolveSubAbility(sa);
return;
}
// TODO: Before this resolves we should see if any of our targets are still on the stack // TODO: Before this resolves we should see if any of our targets are still on the stack
Card source = sa.getSourceCard();
Target tgt = sa.getTarget(); Target tgt = sa.getTarget();
ArrayList<SpellAbility> sas = tgt.getTargetSAs(); ArrayList<SpellAbility> sas = tgt.getTargetSAs();
@@ -332,17 +336,7 @@ public class AbilityFactory_CounterMagic {
} }
} }
if (af.hasSubAbility()){ AbilityFactory.resolveSubAbility(sa);
Ability_Sub abSub = sa.getSubAbility();
if (abSub != null){
abSub.resolve();
}
else{
//I think UntapUpTo is the main thing holding this back
String DrawBack = params.get("SubAbility");
CardFactoryUtil.doDrawBack(DrawBack, 0, source.getController(), source.getController().getOpponent(), source.getController(), source, null, sa);
}
}
}//end counterResolve }//end counterResolve
private void doPowerSink(Player p) { private void doPowerSink(Player p) {