diff --git a/forge-game/src/main/java/forge/game/ability/AbilityFactory.java b/forge-game/src/main/java/forge/game/ability/AbilityFactory.java index 74e1849ccd0..6f3a23bcb10 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityFactory.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityFactory.java @@ -244,9 +244,6 @@ public final class AbilityFactory { if (mapParams.containsKey("TargetsFromSingleZone")) { abTgt.setSingleZone(true); } - if (mapParams.containsKey("TargetsFromDifferentZone")) { - abTgt.setDifferentZone(true); - } if (mapParams.containsKey("TargetsWithoutSameCreatureType")) { abTgt.setWithoutSameCreatureType(true); } diff --git a/forge-game/src/main/java/forge/game/spellability/SpellAbilityCondition.java b/forge-game/src/main/java/forge/game/spellability/SpellAbilityCondition.java index 4a5e22b18dc..ebb241d9158 100644 --- a/forge-game/src/main/java/forge/game/spellability/SpellAbilityCondition.java +++ b/forge-game/src/main/java/forge/game/spellability/SpellAbilityCondition.java @@ -323,8 +323,8 @@ public class SpellAbilityCondition extends SpellAbilityVariables { if (this.getLifeTotal().equals("You")) { life = activator.getLife(); } - if (this.getLifeTotal().equals("Opponent")) { - life = activator.getOpponent().getLife(); + if (this.getLifeTotal().equals("OpponentSmallest")) { + life = activator.getOpponentsSmallestLifeTotal(); } int right = 1; diff --git a/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java b/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java index 90a2304268f..07eb0da5ebd 100644 --- a/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java +++ b/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java @@ -354,8 +354,8 @@ public class SpellAbilityRestriction extends SpellAbilityVariables { if (this.getLifeTotal().equals("You")) { life = activator.getLife(); } - if (this.getLifeTotal().equals("Opponent")) { - life = activator.getOpponent().getLife(); + if (this.getLifeTotal().equals("OpponentSmallest")) { + life = activator.getOpponentsSmallestLifeTotal(); } int right = 1; diff --git a/forge-game/src/main/java/forge/game/spellability/TargetRestrictions.java b/forge-game/src/main/java/forge/game/spellability/TargetRestrictions.java index 05c2ada35f6..2f9994ed48a 100644 --- a/forge-game/src/main/java/forge/game/spellability/TargetRestrictions.java +++ b/forge-game/src/main/java/forge/game/spellability/TargetRestrictions.java @@ -57,7 +57,6 @@ public class TargetRestrictions { // Additional restrictions that may not fit into Valid private boolean uniqueTargets = false; private boolean singleZone = false; - private boolean differentZone = false; private boolean differentControllers = false; private boolean sameController = false; private boolean withoutSameCreatureType = false; @@ -96,7 +95,6 @@ public class TargetRestrictions { this.uniqueTargets = target.isUniqueTargets(); this.singleZone = target.isSingleZone(); this.differentControllers = target.isDifferentControllers(); - this.differentZone = target.isDifferentZone(); this.sameController = target.isSameController(); this.withoutSameCreatureType = target.isWithoutSameCreatureType(); this.singleTarget = target.isSingleTarget(); @@ -569,20 +567,6 @@ public class TargetRestrictions { return clone; } - /** - * @return the differentZone - */ - public boolean isDifferentZone() { - return differentZone; - } - - /** - * @param different the differentZone to set - */ - public void setDifferentZone(boolean different) { - this.differentZone = different; - } - /** * @return the randomTarget */ diff --git a/forge-gui/res/cardsfolder/c/chromeshell_crab.txt b/forge-gui/res/cardsfolder/c/chromeshell_crab.txt index 9458c728c44..a2b308a1532 100644 --- a/forge-gui/res/cardsfolder/c/chromeshell_crab.txt +++ b/forge-gui/res/cardsfolder/c/chromeshell_crab.txt @@ -3,8 +3,9 @@ ManaCost:4 U Types:Creature Crab Beast PT:3/3 K:Morph:4 U -T:Mode$ TurnFaceUp | ValidCard$ Card.Self | Execute$ CrabExchange | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ When CARDNAME is turned face up, you may exchange control of target creature you control and target creature an opponent controls. -SVar:CrabExchange:DB$ ExchangeControl | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | TargetsFromDifferentZone$ True | TargetMin$ 2 | TargetMax$ 2 | SpellDescription$ Exchange control of target creature you control and target creature an opponent controls. +T:Mode$ TurnFaceUp | ValidCard$ Card.Self | Execute$ TrigFaceUp | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ When CARDNAME is turned face up, you may exchange control of target creature you control and target creature an opponent controls. +SVar:TrigFaceUp:AB$ Pump | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Choose target creature you control | SubAbility$ CrabExchange +SVar:CrabExchange:DB$ ExchangeControl | Defined$ ParentTarget | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Choose target creature an opponent controls | SpellDescription$ Exchange control of target creature you control and target creature an opponent controls. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/chromeshell_crab.jpg Oracle:Morph {4}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)\nWhen Chromeshell Crab is turned face up, you may exchange control of target creature you control and target creature an opponent controls. diff --git a/forge-gui/res/cardsfolder/p/political_trickery.txt b/forge-gui/res/cardsfolder/p/political_trickery.txt index c733c7bb112..1ab12730817 100644 --- a/forge-gui/res/cardsfolder/p/political_trickery.txt +++ b/forge-gui/res/cardsfolder/p/political_trickery.txt @@ -1,7 +1,8 @@ Name:Political Trickery ManaCost:2 U Types:Sorcery -A:SP$ ExchangeControl | Cost$ 2 U | ValidTgts$ Land | TgtPrompt$ Select target land | TargetsFromDifferentZone$ True | TargetMin$ 2 | TargetMax$ 2 | SpellDescription$ Exchange control of target land you control and target land an opponent controls. (This effect lasts indefinitely.) +A:SP$ Pump | Cost$ 2 U | ValidTgts$ Land.YouCtrl | TgtPrompt$ Choose target land you control | SubAbility$ DBExchange | SpellDescription$ Exchange control of target land you control and target land an opponent controls. (This effect lasts indefinitely.) +SVar:DBExchange:DB$ ExchangeControl | Defined$ ParentTarget | ValidTgts$ Land.OppCtrl | TgtPrompt$ Choose target land an opponent controls SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/political_trickery.jpg Oracle:Exchange control of target land you control and target land an opponent controls. (This effect lasts indefinitely.) diff --git a/forge-gui/res/cardsfolder/p/prey_upon.txt b/forge-gui/res/cardsfolder/p/prey_upon.txt index 7437e0952e9..720ae11008b 100644 --- a/forge-gui/res/cardsfolder/p/prey_upon.txt +++ b/forge-gui/res/cardsfolder/p/prey_upon.txt @@ -1,6 +1,7 @@ Name:Prey Upon ManaCost:G Types:Sorcery -A:SP$ Fight | Cost$ G | ValidTgts$ Creature | TgtPrompt$ Select target creature | TargetsFromDifferentZone$ True | TargetMin$ 2 | TargetMax$ 2 | SpellDescription$ Target creature you control fights target creature you don't control. (Each deals damage equal to its power to the other.) +A:SP$ Pump | Cost$ G | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Choose target creature you control | SubAbility$ DBFight | SpellDescription$ Target creature you control fights target creature you don't control. (Each deals damage equal to its power to the other.) +SVar:DBFight:DB$ Fight | Defined$ ParentTarget | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Choose target creature an opponent controls SVar:Picture:http://www.wizards.com/global/images/magic/general/prey_upon.jpg Oracle:Target creature you control fights target creature you don't control. (Each deals damage equal to its power to the other.) diff --git a/forge-gui/res/cardsfolder/t/triangle_of_war.txt b/forge-gui/res/cardsfolder/t/triangle_of_war.txt index b64b7c0ca7f..15e805a5d21 100644 --- a/forge-gui/res/cardsfolder/t/triangle_of_war.txt +++ b/forge-gui/res/cardsfolder/t/triangle_of_war.txt @@ -1,6 +1,7 @@ Name:Triangle of War ManaCost:1 Types:Artifact -A:AB$ Fight | Cost$ 2 Sac<1/CARDNAME> | ValidTgts$ Creature | TgtPrompt$ Select target creature | TargetsFromDifferentZone$ True | TargetMin$ 2 | TargetMax$ 2 | SpellDescription$ Target creature you control fights target creature an opponent controls. (Each deals damage equal to its power to the other.) +A:AB$ Pump | Cost$ 2 Sac<1/CARDNAME> | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Choose target creature you control | SubAbility$ DBFight | SpellDescription$ Target creature you control fights target creature an opponent controls. (Each deals damage equal to its power to the other.) +SVar:DBFight:DB$ Fight | Defined$ ParentTarget | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Choose target creature an opponent controls SVar:Picture:http://www.wizards.com/global/images/magic/general/triangle_of_war.jpg Oracle:{2}, Sacrifice Triangle of War: Target creature you control fights target creature an opponent controls. (Each deals damage equal to its power to the other.) diff --git a/forge-gui/res/cardsfolder/v/vampire_lacerator.txt b/forge-gui/res/cardsfolder/v/vampire_lacerator.txt index cf53fef7242..cef887651a2 100644 --- a/forge-gui/res/cardsfolder/v/vampire_lacerator.txt +++ b/forge-gui/res/cardsfolder/v/vampire_lacerator.txt @@ -3,7 +3,7 @@ ManaCost:B Types:Creature Vampire Warrior PT:2/2 T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigLoseLife | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you lose 1 life unless an opponent has 10 or less life. -SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ You | LifeAmount$ 1 | ConditionLifeTotal$ Opponent | ConditionLifeAmount$ GE11 +SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ You | LifeAmount$ 1 | ConditionLifeTotal$ OpponentSmallest | ConditionLifeAmount$ GE11 SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/vampire_lacerator.jpg Oracle:At the beginning of your upkeep, you lose 1 life unless an opponent has 10 or less life. diff --git a/forge-gui/res/cardsfolder/v/vedalken_plotter.txt b/forge-gui/res/cardsfolder/v/vedalken_plotter.txt index aae315f125b..d45f5de7e9a 100644 --- a/forge-gui/res/cardsfolder/v/vedalken_plotter.txt +++ b/forge-gui/res/cardsfolder/v/vedalken_plotter.txt @@ -2,8 +2,9 @@ Name:Vedalken Plotter ManaCost:2 U Types:Creature Vedalken Wizard PT:1/1 -T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ExchangePlots | TriggerDescription$ When CARDNAME enters the battlefield, exchange control of target land you control and target land an opponent controls. -SVar:ExchangePlots:AB$ ExchangeControl | Cost$ 0 | ValidTgts$ Land | TgtPrompt$ Select target land | TargetsFromDifferentZone$ True | TargetMin$ 2 | TargetMax$ 2 | SpellDescription$ Exchange control of target land you control and target land an opponent controls. +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigTarget | TriggerDescription$ When CARDNAME enters the battlefield, exchange control of target land you control and target land an opponent controls. +SVar:TrigTarget:AB$ Pump | Cost$ 0 | ValidTgts$ Land.YouCtrl | TgtPrompt$ Choose target land you control | SubAbility$ DBExchange | SpellDescription$ Exchange control of target land you control and target land an opponent controls. +SVar:DBExchange:DB$ ExchangeControl | Defined$ ParentTarget | ValidTgts$ Land.OppCtrl | TgtPrompt$ Choose target land an opponent controls SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/vedalken_plotter.jpg Oracle:When Vedalken Plotter enters the battlefield, exchange control of target land you control and target land an opponent controls. diff --git a/forge-gui/src/main/java/forge/match/input/InputSelectTargets.java b/forge-gui/src/main/java/forge/match/input/InputSelectTargets.java index 4047d92c3e2..708315eb56a 100644 --- a/forge-gui/src/main/java/forge/match/input/InputSelectTargets.java +++ b/forge-gui/src/main/java/forge/match/input/InputSelectTargets.java @@ -124,12 +124,6 @@ public final class InputSelectTargets extends InputSyncronizedBase { return false; } - // If all cards must be from different zones - if (tgt.isDifferentZone() && lastTarget != null && !card.getController().equals(lastTarget.getController().getOpponent())) { - showMessage(sa.getHostCard() + " - Cannot target this card (not in different zones)"); - return false; - } - // If the cards can't share a creature type if (tgt.isWithoutSameCreatureType() && lastTarget != null && card.sharesCreatureTypeWith(lastTarget)) { showMessage(sa.getHostCard() + " - Cannot target this card (should not share a creature type)");