- Added Merseine.

This commit is contained in:
Sloth
2014-10-24 14:22:10 +00:00
parent 1abd41b469
commit 8f90f65371
6 changed files with 51 additions and 4 deletions

1
.gitattributes vendored
View File

@@ -8842,6 +8842,7 @@ forge-gui/res/cardsfolder/m/merrow_levitator.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/merrow_reejerey.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/merrow_reejerey.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/merrow_wavebreakers.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/merrow_wavebreakers.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/merrow_witsniper.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/merrow_witsniper.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/merseine.txt -text
forge-gui/res/cardsfolder/m/mesa_enchantress.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/mesa_enchantress.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/mesa_falcon.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/mesa_falcon.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/mesa_pegasus.txt -text forge-gui/res/cardsfolder/m/mesa_pegasus.txt -text

View File

@@ -30,6 +30,7 @@ public class CostPartMana extends CostPart {
private final ManaCost cost; private final ManaCost cost;
private boolean xCantBe0 = false; private boolean xCantBe0 = false;
private boolean isExiledCreatureCost = false; private boolean isExiledCreatureCost = false;
private boolean isEnchantedCreatureCost = false;
private final String restriction; private final String restriction;
public boolean shouldPayLast() { public boolean shouldPayLast() {
@@ -48,7 +49,8 @@ public class CostPartMana extends CostPart {
this.cost = cost; this.cost = cost;
this.xCantBe0 = "XCantBe0".equals(restriction); this.xCantBe0 = "XCantBe0".equals(restriction);
this.isExiledCreatureCost = "Exiled".equalsIgnoreCase(restriction); this.isExiledCreatureCost = "Exiled".equalsIgnoreCase(restriction);
this.restriction = xCantBe0 || isExiledCreatureCost ? null : restriction; this.isEnchantedCreatureCost = "EnchantedCost".equalsIgnoreCase(restriction);
this.restriction = xCantBe0 || isExiledCreatureCost || isEnchantedCreatureCost? null : restriction;
} }
/** /**
@@ -87,6 +89,11 @@ public class CostPartMana extends CostPart {
public boolean isExiledCreatureCost() { public boolean isExiledCreatureCost() {
return isExiledCreatureCost; return isExiledCreatureCost;
} }
public boolean isEnchantedCreatureCost() {
return isEnchantedCreatureCost;
}
@Override @Override
public boolean isReusable() { return true; } public boolean isReusable() { return true; }
@@ -119,6 +126,8 @@ public class CostPartMana extends CostPart {
if (isExiledCreatureCost() && sa.getPaidList(CostExile.HashLKIListKey)!= null && !sa.getPaidList(CostExile.HashLKIListKey).isEmpty()) { if (isExiledCreatureCost() && sa.getPaidList(CostExile.HashLKIListKey)!= null && !sa.getPaidList(CostExile.HashLKIListKey).isEmpty()) {
// back from the brink // back from the brink
return sa.getPaidList(CostExile.HashLKIListKey).get(0).getManaCost(); return sa.getPaidList(CostExile.HashLKIListKey).get(0).getManaCost();
} if (isEnchantedCreatureCost() && sa.getHostCard().getEnchantingCard() != null) {
return sa.getHostCard().getEnchantingCard().getManaCost();
} else { } else {
return getManaToPay(); return getManaToPay();
} }

View File

@@ -121,6 +121,10 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
this.setOpponentOnly(true); this.setOpponentOnly(true);
} }
if (params.containsKey("EnchantedControllerActivator")) {
this.setEnchantedControllerOnly(true);
}
if (params.containsKey("OwnerOnly")) { if (params.containsKey("OwnerOnly")) {
this.setOwnerOnly(true); this.setOwnerOnly(true);
} }
@@ -277,13 +281,18 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
return activator.equals(c.getOwner()); return activator.equals(c.getOwner());
} }
if (activator.equals(c.getController()) && !this.isOpponentOnly()) { if (activator.equals(c.getController()) && !this.isOpponentOnly() && !isEnchantedControllerOnly()) {
return true; return true;
} }
if (activator.isOpponentOf(c.getController()) && this.isOpponentOnly()) { if (activator.isOpponentOf(c.getController()) && this.isOpponentOnly()) {
return true; return true;
} }
if (c.getEnchantingCard() != null && activator.equals(c.getEnchantingCard().getController()) && this.isEnchantedControllerOnly()) {
return true;
}
if (sa.isSpell() && activator.isOpponentOf(c.getController()) && c.hasKeyword("May be played by your opponent")) { if (sa.isSpell() && activator.isOpponentOf(c.getController()) && c.hasKeyword("May be played by your opponent")) {
return true; return true;
} }

View File

@@ -59,6 +59,7 @@ public class SpellAbilityVariables {
this.instantSpeed = sav.isInstantSpeed(); this.instantSpeed = sav.isInstantSpeed();
this.anyPlayer = sav.isAnyPlayer(); this.anyPlayer = sav.isAnyPlayer();
this.opponentOnly = sav.isOpponentOnly(); this.opponentOnly = sav.isOpponentOnly();
this.enchantedControllerOnly = sav.isEnchantedControllerOnly();
this.ownerOnly = sav.isOwnerOnly(); this.ownerOnly = sav.isOwnerOnly();
this.opponentTurn = sav.isOpponentTurn(); this.opponentTurn = sav.isOpponentTurn();
this.playerTurn = sav.isPlayerTurn(); this.playerTurn = sav.isPlayerTurn();
@@ -110,6 +111,9 @@ public class SpellAbilityVariables {
/** The b opponent only. */ /** The b opponent only. */
private boolean opponentOnly = false; private boolean opponentOnly = false;
/** The b opponent only. */
private boolean enchantedControllerOnly = false;
/** The b owner only. */ /** The b owner only. */
private boolean ownerOnly = false; private boolean ownerOnly = false;
@@ -964,6 +968,19 @@ public class SpellAbilityVariables {
this.opponentOnly = opponentOnly; this.opponentOnly = opponentOnly;
} }
/**
* @return the opponentOnly
*/
public boolean isEnchantedControllerOnly() {
return enchantedControllerOnly;
}
/**
* @param opponentOnly the opponentOnly to set
*/
public void setEnchantedControllerOnly(boolean enchantedControllerOnly) {
this.enchantedControllerOnly = enchantedControllerOnly;
}
/** /**
* @return the ownerOnly * @return the ownerOnly
*/ */

View File

@@ -1,7 +1,7 @@
Name:Back from the Brink Name:Back from the Brink
ManaCost:4 U U ManaCost:4 U U
Types:Enchantment Types:Enchantment
A:AB$ CopyPermanent | Cost$ ExileFromGrave<1/Creature> Mana<20\Exiled> | CostDesc$ Exile a creature card from your graveyard and pay its mana cost | Defined$ Exiled | SorcerySpeed$ True | SpellDescription$ Put a token onto the battlefield that's a copy of that card. Activate this ability only any time you could cast a sorcery. A:AB$ CopyPermanent | Cost$ ExileFromGrave<1/Creature> Mana<20\Exiled> | CostDesc$ Exile a creature card from your graveyard and pay its mana cost: | Defined$ Exiled | SorcerySpeed$ True | SpellDescription$ Put a token onto the battlefield that's a copy of that card. Activate this ability only any time you could cast a sorcery.
SVar:NonStackingEffect:True SVar:NonStackingEffect:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/back_from_the_brink.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/back_from_the_brink.jpg
Oracle:Exile a creature card from your graveyard and pay its mana cost: Put a token onto the battlefield that's a copy of that card. Activate this ability only any time you could cast a sorcery. Oracle:Exile a creature card from your graveyard and pay its mana cost: Put a token onto the battlefield that's a copy of that card. Activate this ability only any time you could cast a sorcery.

View File

@@ -0,0 +1,11 @@
Name:Merseine
ManaCost:2 U U
Types:Enchantment Aura
K:Enchant creature
A:SP$ Attach | Cost$ 2 U U | ValidTgts$ Creature | AILogic$ KeepTapped
K:etbCounter:NET:3
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ CARDNAME doesn't untap during your untap step. | CheckSVar$ X | Description$ Enchanted creature doesn't untap during its controller's untap step if Merseine has a net counter on it.
A:AB$ RemoveCounter | EnchantedControllerActivator$ True | Cost$ Mana<1\EnchantedCost> | | CostDesc$ Pay enchanted creature's mana cost: | CounterType$ NET | CounterNum$ 1 | SpellDescription$ Remove a net counter from CARDNAME. Any player may activate this ability, but only if he or she controls the enchanted creature.
SVar:X:Count$CardCounters.NET
Oracle:Enchant creature\nMerseine enters the battlefield with three net counters on it.\nEnchanted creature doesn't untap during its controller's untap step if Merseine has a net counter on it.\nPay enchanted creature's mana cost: Remove a net counter from Merseine. Any player may activate this ability, but only if he or she controls the enchanted creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/Merseine.jpg