mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Adding Conditional to CounterMagic
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user