From 31300a1141bdbe7684349219efcb4bccd23bcc84 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 14:11:30 +0000 Subject: [PATCH] *UnlessCost$ now handles X costs. *Added Circular Logic Condescend Disruptive Pitmage Evasive Action Ixidor's Will Oppressive Will Override Overrule Spell Contortion Spell Syphon Syncopate --- .gitattributes | 11 +++++++++++ res/cardsfolder/circular_logic.txt | 10 ++++++++++ res/cardsfolder/condescend.txt | 9 +++++++++ res/cardsfolder/disruptive_pitmage.txt | 10 ++++++++++ res/cardsfolder/evasive_action.txt | 9 +++++++++ res/cardsfolder/ixidors_will.txt | 9 +++++++++ res/cardsfolder/oppressive_will.txt | 9 +++++++++ res/cardsfolder/override.txt | 9 +++++++++ res/cardsfolder/overrule.txt | 10 ++++++++++ res/cardsfolder/spell_contortion.txt | 11 +++++++++++ res/cardsfolder/spell_syphon.txt | 9 +++++++++ res/cardsfolder/syncopate.txt | 9 +++++++++ src/forge/AbilityFactory_CounterMagic.java | 10 ++++++++-- 13 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 res/cardsfolder/circular_logic.txt create mode 100644 res/cardsfolder/condescend.txt create mode 100644 res/cardsfolder/disruptive_pitmage.txt create mode 100644 res/cardsfolder/evasive_action.txt create mode 100644 res/cardsfolder/ixidors_will.txt create mode 100644 res/cardsfolder/oppressive_will.txt create mode 100644 res/cardsfolder/override.txt create mode 100644 res/cardsfolder/overrule.txt create mode 100644 res/cardsfolder/spell_contortion.txt create mode 100644 res/cardsfolder/spell_syphon.txt create mode 100644 res/cardsfolder/syncopate.txt diff --git a/.gitattributes b/.gitattributes index 4f165fbbc4d..f9e9bcd5b66 100644 --- a/.gitattributes +++ b/.gitattributes @@ -862,6 +862,7 @@ res/cardsfolder/cinder_pyromancer.txt -text svneol=native#text/plain res/cardsfolder/cinder_shade.txt -text svneol=native#text/plain res/cardsfolder/cinder_storm.txt -text svneol=native#text/plain res/cardsfolder/cinderbones.txt -text svneol=native#text/plain +res/cardsfolder/circular_logic.txt -text svneol=native#text/plain res/cardsfolder/citanul_centaurs.txt -text svneol=native#text/plain res/cardsfolder/citanul_druid.txt -text svneol=native#text/plain res/cardsfolder/citanul_flute.txt -text svneol=native#text/plain @@ -935,6 +936,7 @@ res/cardsfolder/compulsive_research.txt -text svneol=native#text/plain res/cardsfolder/concentrate.txt -text svneol=native#text/plain res/cardsfolder/concordant_crossroads.txt -text svneol=native#text/plain res/cardsfolder/condemn.txt -text svneol=native#text/plain +res/cardsfolder/condescend.txt -text svneol=native#text/plain res/cardsfolder/conflux.txt -text svneol=native#text/plain res/cardsfolder/confound.txt -text svneol=native#text/plain res/cardsfolder/congregate.txt -text svneol=native#text/plain @@ -1277,6 +1279,7 @@ res/cardsfolder/dispellers_capsule.txt -text svneol=native#text/plain res/cardsfolder/disperse.txt -text svneol=native#text/plain res/cardsfolder/disrupt.txt -text svneol=native#text/plain res/cardsfolder/disrupting_scepter.txt -text svneol=native#text/plain +res/cardsfolder/disruptive_pitmage.txt -text svneol=native#text/plain res/cardsfolder/disruptive_student.txt -text svneol=native#text/plain res/cardsfolder/dissipate.txt -text svneol=native#text/plain res/cardsfolder/dissipation_field.txt -text svneol=native#text/plain @@ -1579,6 +1582,7 @@ res/cardsfolder/etherium_sculptor.txt -text svneol=native#text/plain res/cardsfolder/ethersworn_adjudicator.txt -text svneol=native#text/plain res/cardsfolder/evacuation.txt -text svneol=native#text/plain res/cardsfolder/evaporate.txt -text svneol=native#text/plain +res/cardsfolder/evasive_action.txt -text svneol=native#text/plain res/cardsfolder/everflowing_chalice.txt -text svneol=native#text/plain res/cardsfolder/evil_eye_of_orms_by_gore.txt -text svneol=native#text/plain res/cardsfolder/evil_eye_of_urborg.txt -text svneol=native#text/plain @@ -2515,6 +2519,7 @@ res/cardsfolder/ivory_guardians.txt -text svneol=native#text/plain res/cardsfolder/ivory_tower.txt -text svneol=native#text/plain res/cardsfolder/ivy_dancer.txt -text svneol=native#text/plain res/cardsfolder/ivy_elemental.txt -text svneol=native#text/plain +res/cardsfolder/ixidors_will.txt -text svneol=native#text/plain res/cardsfolder/izzet_boilerworks.txt -text svneol=native#text/plain res/cardsfolder/izzet_chronarch.txt -text svneol=native#text/plain res/cardsfolder/izzet_signet.txt -text svneol=native#text/plain @@ -3472,6 +3477,7 @@ res/cardsfolder/opportunist.txt -text svneol=native#text/plain res/cardsfolder/opportunity.txt -text svneol=native#text/plain res/cardsfolder/opposition.txt -text svneol=native#text/plain res/cardsfolder/oppression.txt -text svneol=native#text/plain +res/cardsfolder/oppressive_will.txt -text svneol=native#text/plain res/cardsfolder/opt.txt -text svneol=native#text/plain res/cardsfolder/oracle_of_mul_daya.txt -text svneol=native#text/plain res/cardsfolder/oran_rief_survivalist.txt -text svneol=native#text/plain @@ -3515,6 +3521,8 @@ res/cardsfolder/overbeing_of_myth.txt -text svneol=native#text/plain res/cardsfolder/overgrown_battlement.txt -text svneol=native#text/plain res/cardsfolder/overgrown_tomb.txt -text svneol=native#text/plain res/cardsfolder/overgrowth.txt -text svneol=native#text/plain +res/cardsfolder/override.txt -text svneol=native#text/plain +res/cardsfolder/overrule.txt -text svneol=native#text/plain res/cardsfolder/overrun.txt -text svneol=native#text/plain res/cardsfolder/oversold_cemetery.txt -text svneol=native#text/plain res/cardsfolder/oversoul_of_dusk.txt -text svneol=native#text/plain @@ -4583,9 +4591,11 @@ res/cardsfolder/spectral_guardian.txt -text svneol=native#text/plain res/cardsfolder/spectral_lynx.txt -text svneol=native#text/plain res/cardsfolder/spectral_procession.txt -text svneol=native#text/plain res/cardsfolder/spectral_searchlight.txt -text svneol=native#text/plain +res/cardsfolder/spell_contortion.txt -text svneol=native#text/plain res/cardsfolder/spell_pierce.txt -text svneol=native#text/plain res/cardsfolder/spell_snare.txt -text svneol=native#text/plain res/cardsfolder/spell_snip.txt -text svneol=native#text/plain +res/cardsfolder/spell_syphon.txt -text svneol=native#text/plain res/cardsfolder/spellbane_centaur.txt -text svneol=native#text/plain res/cardsfolder/spellbook.txt -text svneol=native#text/plain res/cardsfolder/sphere_of_duty.txt -text svneol=native#text/plain @@ -4887,6 +4897,7 @@ res/cardsfolder/symbiotic_elf.txt -text svneol=native#text/plain res/cardsfolder/symbiotic_wurm.txt -text svneol=native#text/plain res/cardsfolder/symbol_of_unsummoning.txt -text svneol=native#text/plain res/cardsfolder/synchronous_sliver.txt -text svneol=native#text/plain +res/cardsfolder/syncopate.txt -text svneol=native#text/plain res/cardsfolder/syphon_life.txt -text svneol=native#text/plain res/cardsfolder/tablet_of_epityr.txt -text svneol=native#text/plain res/cardsfolder/tahngarths_rage.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/circular_logic.txt b/res/cardsfolder/circular_logic.txt new file mode 100644 index 00000000000..400ba33dc6a --- /dev/null +++ b/res/cardsfolder/circular_logic.txt @@ -0,0 +1,10 @@ +Name:Circular Logic +ManaCost:2 U +Types:Instant +Text:no text +A:SP$Counter | Cost$ 2 U | Type$ Spell | UnlessCost$ X | SpellDescription$ Counter target spell unless its controller pays 1 for each card in your graveyard. +K:Madness:U +SVar:X:Count$InYourYard +SVar:Rarity:Uncommon +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/circular_logic.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/condescend.txt b/res/cardsfolder/condescend.txt new file mode 100644 index 00000000000..21de641fdbc --- /dev/null +++ b/res/cardsfolder/condescend.txt @@ -0,0 +1,9 @@ +Name:Condescend +ManaCost:X U +Types:Instant +Text:no text +A:SP$Counter | Cost$ X U | Type$ Spell | UnlessCost$ X | SpellDescription$ Counter target spell unless its controller pays X. +SVar:X:Count$xPaid +SVar:Rarity:Common +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/condescend.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/disruptive_pitmage.txt b/res/cardsfolder/disruptive_pitmage.txt new file mode 100644 index 00000000000..4af66d2510d --- /dev/null +++ b/res/cardsfolder/disruptive_pitmage.txt @@ -0,0 +1,10 @@ +Name:Disruptive Pitmage +ManaCost:2 U +Types:Creature Human Wizard +Text:no text +PT:1/1 +A:AB$Counter | Cost$ T | Type$ Spell | UnlessCost$ 1 | SpellDescription$ Counter target spell unless its controller pays 1. +K:Morph:U +SVar:Rarity:Common +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/disruptive_pitmage.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/evasive_action.txt b/res/cardsfolder/evasive_action.txt new file mode 100644 index 00000000000..625631ac8a0 --- /dev/null +++ b/res/cardsfolder/evasive_action.txt @@ -0,0 +1,9 @@ +Name:Evasive Action +ManaCost:1 U +Types:Instant +Text:no text +A:SP$Counter | Cost$ 1 U | Type$ Spell | UnlessCost$ X | SpellDescription$ Domain — Counter target spell unless its controller pays 1 for each basic land type among lands you control. +SVar:X:Count$Domain +SVar:Rarity:Uncommon +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/evassive_action.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/ixidors_will.txt b/res/cardsfolder/ixidors_will.txt new file mode 100644 index 00000000000..1ed2a616b57 --- /dev/null +++ b/res/cardsfolder/ixidors_will.txt @@ -0,0 +1,9 @@ +Name:Ixidor's Will +ManaCost:2 U +Types:Instant +Text:no text +A:SP$Counter | Cost$ 2 U | Type$ Spell | UnlessCost$ X | SpellDescription$ Counter target spell unless its controller pays 2 for each Wizard on the battlefield. +SVar:X:Count$TypeYouCtrl.Wizard/Twice +SVar:Rarity:Common +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/ixidors_will.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/oppressive_will.txt b/res/cardsfolder/oppressive_will.txt new file mode 100644 index 00000000000..1b1018af3aa --- /dev/null +++ b/res/cardsfolder/oppressive_will.txt @@ -0,0 +1,9 @@ +Name:Oppressive Will +ManaCost:2 U +Types:Instant +Text:no text +A:SP$Counter | Cost$ 2 U | Type $ Spell | UnlessCost$ X | SpellDescription$ Counter target spell unless its controller pays 1 for each card in your hand. +SVar:X:Count$InYourHand +SVar:Rarity:Common +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/oppressive_will.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/override.txt b/res/cardsfolder/override.txt new file mode 100644 index 00000000000..5d77f486fa5 --- /dev/null +++ b/res/cardsfolder/override.txt @@ -0,0 +1,9 @@ +Name:Override +ManaCost:2 U +Types:Instant +Text:no text +A:SP$Counter | Cost$ 2 U | Type$ Spell | UnlessCost$ X | SpellDescription$ Counter target spell unless its controller pays 1 for each artifact you control. +SVar:X:Count$Valid Artifact.YouCtrl +SVar:Rarity:Common +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/override.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/overrule.txt b/res/cardsfolder/overrule.txt new file mode 100644 index 00000000000..aca8265b1be --- /dev/null +++ b/res/cardsfolder/overrule.txt @@ -0,0 +1,10 @@ +Name:Overrule +ManaCost:X W U +Types:Instant +Text:no text +A:SP$Counter | Cost$ X W U | Type$ Spell | UnlessCost$ X | SubAbility$SVar=DBGainLife | SpellDescription$ Counter target spell unless its controller pays X. You gain X life. +SVar:DBGainLife:DB$GainLife | LifeAmount$ X +SVar:X:Count$xPaid +SVar:Rarity: +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/overrule.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/spell_contortion.txt b/res/cardsfolder/spell_contortion.txt new file mode 100644 index 00000000000..b48ebbc5852 --- /dev/null +++ b/res/cardsfolder/spell_contortion.txt @@ -0,0 +1,11 @@ +Name:Spell Contortion +ManaCost:2 U +Types:Instant +Text:no text +A:SP$Counter | Cost$ 2 U | Type$ Spell | UnlessCost$ 2 | SubAbility$SVar=DBDraw | SpellDescription$ Counter target spell unless its controller pays 2. Draw a card for each time CARDNAME was kicked. +K:Multikicker 1 U +SVar:DBDraw:DB$Draw | NumCards$ X +SVar:X:Count$TimesKicked +SVar:Rarity:Uncommon +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/spell_contortion.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/spell_syphon.txt b/res/cardsfolder/spell_syphon.txt new file mode 100644 index 00000000000..90d8bb25cd5 --- /dev/null +++ b/res/cardsfolder/spell_syphon.txt @@ -0,0 +1,9 @@ +Name:Spell Syphon +ManaCost:1 U +Types:Instant +Text:no text +A:SP$Counter | Cost$ 1 U | Type$ Spell | UnlessCost$ X | SpellDescription$ Counter target spell unless its controller pays 1 for each blue permanent you control. +SVar:X:Count$BlueYouCtrl +SVar:Rarity:Common +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/spell_syphon.jpg +End \ No newline at end of file diff --git a/res/cardsfolder/syncopate.txt b/res/cardsfolder/syncopate.txt new file mode 100644 index 00000000000..8993ea40027 --- /dev/null +++ b/res/cardsfolder/syncopate.txt @@ -0,0 +1,9 @@ +Name:Syncopate +ManaCost:X U +Types:Instant +Text:no text +A:SP$Counter | Cost$ X U | Type$ Spell | Destination$ Exile | UnlessCost$ X | SpellDescription$ Counter target spell unless its controller pays X. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. +SVar:X:Count$xPaid +SVar:Rarity:Common +SVar:Picture:SVar:Picture:http://www.wizards.com/global/images/magic/general/syncopate.jpg +End \ No newline at end of file diff --git a/src/forge/AbilityFactory_CounterMagic.java b/src/forge/AbilityFactory_CounterMagic.java index ae16af31af3..935531f4d5c 100644 --- a/src/forge/AbilityFactory_CounterMagic.java +++ b/src/forge/AbilityFactory_CounterMagic.java @@ -48,7 +48,7 @@ public class AbilityFactory_CounterMagic { else splitExtraActions = new String[] {"None"}; if(params.containsKey("UnlessCost")) - unlessCost = params.get("UnlessCost"); + unlessCost = params.get("UnlessCost").trim(); tgt[0] = null; } @@ -125,7 +125,13 @@ public class AbilityFactory_CounterMagic { System.out.println("Send countered spell to " + destination); if(unlessCost != null) { - Ability ability = new Ability(af.getHostCard(), unlessCost) { + String unlessCostFinal = unlessCost; + if(unlessCost.equals("X")) + { + unlessCostFinal = Integer.toString(CardFactoryUtil.xCount(af.getHostCard(), af.getHostCard().getSVar("X"))); + } + + Ability ability = new Ability(af.getHostCard(), unlessCostFinal) { @Override public void resolve() { ;