mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Remove some more references to getOpponent, refactor some cards to support the changes.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.)
|
||||
|
||||
@@ -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.)
|
||||
|
||||
@@ -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.)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)");
|
||||
|
||||
Reference in New Issue
Block a user