mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Convert Stonecloaker, Reya Dawnbringer, Land Tax, Ratcatcher, Debtors' Knell, Defense of the Heart, Emeria Sky Ruin, Sosuke's Summons to Trigger
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
Name:Debtors' Knell
|
||||
ManaCost:4 WB WB WB
|
||||
Types:Enchantment
|
||||
Text:At the beginning of your upkeep, put target creature card from a graveyard onto the battlefield under your control.
|
||||
Text:no text
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ At the beginning of your upkeep, put target creature card from a graveyard onto the battlefield under your control.
|
||||
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Battlefield | GainControl$ True | ChangeNum$ 1 | TgtPrompt$ Choose target creature card in a graveyard | ValidTgts$ Creature
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/debtors_knell.jpg
|
||||
SetInfo:GPT|Rare|http://magiccards.info/scans/en/gp/141.jpg
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
Name:Defense of the Heart
|
||||
ManaCost:3 G
|
||||
Types:Enchantment
|
||||
Text:At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice CARDNAME, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library.
|
||||
Text:no text
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigChange | IsPresent$ Creature.YouDontCtrl | PresentCompare$ GE3 | TriggerDescription$ At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice CARDNAME, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library.
|
||||
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | SubAbility$ SVar=DBChange
|
||||
SVar:DBChange:DB$ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 2
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/defense_of_the_heart.jpg
|
||||
SetInfo:ULG|Rare|http://magiccards.info/scans/en/ul/100.jpg
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
Name:Emeria, the Sky Ruin
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
Text:At the beginning of your upkeep, if you control seven or more Plains, you may return target creature card from your graveyard to the battlefield.
|
||||
Text:
|
||||
K:CARDNAME enters the battlefield tapped.
|
||||
A:AB$Mana|Cost$T|Produced$W|SpellDescription$Add W to your mana pool.
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigChange | IsPresent$ Card.Plains+YouCtrl | PresentCompare$ GE7 | TriggerDescription$ At the beginning of your upkeep, if you control seven or more Plains, you may return target creature card from your graveyard to the battlefield.
|
||||
SVar:TrigChange:AB$ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouCtrl | Cost$ 0
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/emeria_the_sky_ruin.jpg
|
||||
SetInfo:ZEN|Rare|http://magiccards.info/scans/en/zen/213.jpg
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
Name:Land Tax
|
||||
ManaCost:W
|
||||
Types:Enchantment
|
||||
Text:At the beginning of your upkeep, if an opponent controls more lands than you, you may search your library for up to three basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.
|
||||
Text:no text
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigChange | IsPresent$ Land.YouDontCtrl | PresentCompare$ GTX | TriggerDescription$ At the beginning of your upkeep, if an opponent controls more lands than you, you may search your library for up to three basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.
|
||||
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Hand | ChangeType$ Land.Basic | ChangeNum$ 3
|
||||
SVar:X:Count$Valid Land.YouCtrl
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/land_tax.jpg
|
||||
SetInfo:4ED|Rare|http://magiccards.info/scans/en/4e/284.jpg
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
Name:Ratcatcher
|
||||
ManaCost:4 B B
|
||||
Types:Creature Ogre Rogue
|
||||
Text:At the beginning of your upkeep, you may search your library for a Rat card, reveal it, and put it into your hand. If you do, shuffle your library.
|
||||
Text:
|
||||
PT:4/4
|
||||
K:Fear
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigChange | TriggerDescription$ At the beginning of your upkeep, you may search your library for a Rat card, reveal it, and put it into your hand. If you do, shuffle your library.
|
||||
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Hand | ChangeType$ Card.Rat | ChangeNum$ 1
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ratcatcher.jpg
|
||||
SetInfo:DIS|Rare|http://magiccards.info/scans/en/di/52.jpg
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
Name:Reya Dawnbringer
|
||||
ManaCost:6 W W W
|
||||
Types:Legendary Creature Angel
|
||||
Text:At the beginning of your upkeep, you may return target creature card from your graveyard to the battlefield.
|
||||
Text:no text
|
||||
PT:4/6
|
||||
K:Flying
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigChange | TriggerDescription$ At the beginning of your upkeep, you may return target creature card from your graveyard to the battlefield.
|
||||
SVar:TrigChange:AB$ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouCtrl | Cost$ 0
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://resources.wizards.com/magic/cards/in/en-us/card22965.jpg
|
||||
SetInfo:INV|Rare|http://magiccards.info/scans/en/in/33.jpg
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
Name:Sosuke's Summons
|
||||
ManaCost:2 G
|
||||
Types:Sorcery
|
||||
Text:Put two 1/1 green Snake creature tokens onto the battlefield.\r\nWhenever a nontoken Snake enters the battlefield under your control, you may return Sosuke's Summons from your graveyard to your hand.
|
||||
#K:spMakeToken<>2<>Snake<>G 1 1 Snake<>Controller<>G<>Creature;Snake<>1<>1<>None
|
||||
A:SP$Token | Cost$ 2 G | TokenAmount$ 2 | TokenName$ Snake | TokenTypes$ Creature,Snake | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1
|
||||
Text:no text
|
||||
A:SP$Token | Cost$ 2 G | TokenAmount$ 2 | TokenName$ Snake | TokenTypes$ Creature,Snake | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put two 1/1 green Snake creature tokens onto the battlefield.
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Snake+nonToken+YouCtrl | TriggerZones$ Graveyard | Execute$ TrigChange | TriggerDescription$ Whenever a nontoken Snake enters the battlefield under your control, you may return Sosuke's Summons from your graveyard to your hand.
|
||||
SVar:TrigChange:AB$ChangeZone | Origin$ Graveyard | Destination$ Hand | Cost$ 0
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sosukes_summons.jpg
|
||||
SetInfo:BOK|Uncommon|http://magiccards.info/scans/en/bok/145.jpg
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
Name:Stonecloaker
|
||||
ManaCost:2 W
|
||||
Types:Creature Gargoyle
|
||||
Text:When CARDNAME enters the battlefield, return a creature you control to its owner's hand.\r\n\When CARDNAME enters the battlefield, exile target card from a graveyard.
|
||||
Text:no text
|
||||
PT:3/2
|
||||
K:Flash
|
||||
K:Flying
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, return a creature you control to its owner's hand.
|
||||
SVar:TrigChange:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | ChangeType$ Creature.YouCtrl
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, exile target card from a graveyard.
|
||||
SVar:TrigChange:AB$ChangeZone | Origin$ Graveyard | Destination$ Exile | ValidTgts$ Card | Cost$ 0
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/stonecloaker.jpg
|
||||
|
||||
@@ -6895,87 +6895,6 @@ public class CardFactory_Creatures {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Stonecloaker")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
Card c = getTargetCard();
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, c.getOwner());
|
||||
|
||||
if(AllZone.GameAction.isCardInPlay(c)) {
|
||||
AllZone.getZone(c).remove(c);
|
||||
|
||||
if(!c.isToken()) {
|
||||
Card newCard = AllZone.CardFactory.getCard(c.getName(), c.getOwner());
|
||||
|
||||
newCard.setCurSetCode(c.getCurSetCode());
|
||||
newCard.setImageFilename(c.getImageFilename());
|
||||
|
||||
hand.add(newCard);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Command intoPlay = new Command() {
|
||||
private static final long serialVersionUID = -4018162972761688814L;
|
||||
|
||||
public void execute() {
|
||||
|
||||
PlayerZone hYard = AllZone.getZone(Constant.Zone.Graveyard, AllZone.HumanPlayer);
|
||||
PlayerZone cYard = AllZone.getZone(Constant.Zone.Graveyard, AllZone.ComputerPlayer);
|
||||
CardList gravecards = new CardList();
|
||||
String title;
|
||||
|
||||
gravecards.addAll(cYard.getCards());
|
||||
if (gravecards.isEmpty()) {
|
||||
gravecards.addAll(hYard.getCards());
|
||||
title = "Choose your card";
|
||||
} else {
|
||||
title = "Choose compy's card";
|
||||
}
|
||||
|
||||
//System.out.println("size of grave: " + gravecards.size());
|
||||
|
||||
if(gravecards.size() > 0) {
|
||||
if(card.getController().equals(AllZone.HumanPlayer)) {
|
||||
Object o = GuiUtils.getChoiceOptional(title, gravecards.toArray());
|
||||
if(o != null) {
|
||||
Card removedCard = (Card) o;
|
||||
AllZone.GameAction.exile(removedCard);
|
||||
}
|
||||
} else {
|
||||
AllZone.GameAction.exile(gravecards.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, card.getController());
|
||||
|
||||
CardList creatures = new CardList(play.getCards());
|
||||
creatures = creatures.getType("Creature");
|
||||
|
||||
AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, creatures,
|
||||
"Select a creature you control.", false, false));
|
||||
ButtonUtil.disableAll();
|
||||
|
||||
}//execute()
|
||||
};//Command
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
|
||||
card.clearSpellAbility();
|
||||
|
||||
card.addSpellAbility(new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = 3089921616375272120L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Doomsday Specter")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
|
||||
@@ -50,7 +50,6 @@ public class GameActionUtil {
|
||||
upkeep_Honden_of_Infinite_Rage();
|
||||
upkeep_Dega_Sanctuary();
|
||||
upkeep_Sheltered_Valley();
|
||||
upkeep_Land_Tax();
|
||||
upkeep_Living_Artifact();
|
||||
upkeep_Tangle_Wire();
|
||||
upkeep_Mana_Vault();
|
||||
@@ -73,8 +72,6 @@ public class GameActionUtil {
|
||||
upkeep_Scute_Mob();
|
||||
upkeep_Lichenthrope();
|
||||
upkeep_Heartmender();
|
||||
//upkeep_AEther_Vial();
|
||||
upkeep_Ratcatcher();
|
||||
upkeep_Nath();
|
||||
upkeep_Anowon();
|
||||
upkeep_Cunning_Lethemancer();
|
||||
@@ -94,9 +91,6 @@ public class GameActionUtil {
|
||||
upkeep_Winnower_Patrol();
|
||||
upkeep_Wolf_Skull_Shaman();
|
||||
|
||||
upkeep_Debtors_Knell();
|
||||
upkeep_Reya();
|
||||
upkeep_Emeria();
|
||||
upkeep_Oversold_Cemetery();
|
||||
upkeep_Nether_Spirit();
|
||||
upkeep_Nettletooth_Djinn();
|
||||
@@ -7063,102 +7057,6 @@ public class GameActionUtil {
|
||||
AllZone.GameAction.playSpellAbilityForFree(c.getSpellPermanent());
|
||||
}
|
||||
|
||||
private static void upkeep_Land_Tax() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.getName("Land Tax");
|
||||
|
||||
PlayerZone oppPlayZone = AllZone.getZone(Constant.Zone.Battlefield, player.getOpponent());
|
||||
|
||||
CardList self = new CardList(playZone.getCards());
|
||||
CardList opp = new CardList(oppPlayZone.getCards());
|
||||
|
||||
self = self.getType("Land");
|
||||
opp = opp.getType("Land");
|
||||
|
||||
if (self.size() < opp.size()) {
|
||||
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
final Card c = list.get(i);
|
||||
Ability ability = new Ability(list.get(i), "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
|
||||
|
||||
CardList lands = new CardList(lib.getCards());
|
||||
lands = lands.getType("Basic");
|
||||
|
||||
if (player.equals(AllZone.HumanPlayer) && lands.size() > 0) {
|
||||
StringBuilder question = new StringBuilder();
|
||||
question.append("Search your library for up to 3 basic land cards, ");
|
||||
question.append("reveal them, and put them into your hand?");
|
||||
if (GameActionUtil.showYesNoDialog(c, question.toString())) {
|
||||
String title = "Pick a basic land card?";
|
||||
|
||||
Object o = GuiUtils.getChoiceOptional(title, lands.toArray());
|
||||
if (o != null) {
|
||||
Card card = (Card) o;
|
||||
lib.remove(card);
|
||||
hand.add(card);
|
||||
lands.remove(card);
|
||||
|
||||
if (lands.size() > 0) {
|
||||
o = GuiUtils.getChoiceOptional(title, lands.toArray());
|
||||
if (o != null) {
|
||||
card = (Card) o;
|
||||
lib.remove(card);
|
||||
hand.add(card);
|
||||
lands.remove(card);
|
||||
|
||||
if (lands.size() > 0) {
|
||||
o = GuiUtils.getChoiceOptional(title, lands.toArray());
|
||||
if (o != null) {
|
||||
card = (Card) o;
|
||||
lib.remove(card);
|
||||
hand.add(card);
|
||||
lands.remove(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
AllZone.HumanPlayer.shuffle();
|
||||
}// if choice yes
|
||||
} // player equals human
|
||||
else if (player.equals(AllZone.ComputerPlayer) && lands.size() > 0) {
|
||||
Card card = lands.get(0);
|
||||
lib.remove(card);
|
||||
hand.add(card);
|
||||
lands.remove(card);
|
||||
|
||||
if (lands.size() > 0) {
|
||||
card = lands.get(0);
|
||||
lib.remove(card);
|
||||
hand.add(card);
|
||||
lands.remove(card);
|
||||
|
||||
if (lands.size() > 0) {
|
||||
card = lands.get(0);
|
||||
lib.remove(card);
|
||||
hand.add(card);
|
||||
lands.remove(card);
|
||||
}
|
||||
}
|
||||
AllZone.ComputerPlayer.shuffle();
|
||||
}
|
||||
}
|
||||
|
||||
};// Ability
|
||||
ability.setStackDescription("Land Tax - search library for up to three basic land cards and put them into your hand");
|
||||
AllZone.Stack.add(ability);
|
||||
|
||||
}// for
|
||||
}// if fewer lands than opponent
|
||||
}// upkeep_Land_Tax()
|
||||
|
||||
private static void upkeep_Mana_Vault() {
|
||||
//this card is filtered out for the computer, so we will only worry about Human here
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
@@ -7838,53 +7736,6 @@ public class GameActionUtil {
|
||||
} // if creatures > 0
|
||||
}//heartmender
|
||||
|
||||
private static void upkeep_Ratcatcher() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
PlayerZone library = AllZone.getZone(Constant.Zone.Library, player);
|
||||
|
||||
CardList creatures = new CardList(library.getCards());
|
||||
creatures = creatures.getType("Rat");
|
||||
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.getName("Ratcatcher");
|
||||
|
||||
if(creatures.size() > 0 && list.size() > 0) {
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
|
||||
Ability ability = new Ability(list.get(i), "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
|
||||
|
||||
CardList rats = new CardList(lib.getCards());
|
||||
rats = rats.getType("Rat");
|
||||
|
||||
if(rats.size() > 0) {
|
||||
if(player.equals(AllZone.HumanPlayer)) {
|
||||
Object o = GuiUtils.getChoiceOptional("Pick a Rat to put into your hand",
|
||||
rats.toArray());
|
||||
if(o != null) {
|
||||
Card card = (Card) o;
|
||||
|
||||
AllZone.GameAction.moveToHand(card);
|
||||
}
|
||||
} else if(player.equals(AllZone.ComputerPlayer)) {
|
||||
Card card = rats.get(0);
|
||||
|
||||
AllZone.GameAction.moveToHand(card);
|
||||
}
|
||||
player.shuffle();
|
||||
}
|
||||
}
|
||||
|
||||
};// Ability
|
||||
ability.setStackDescription("Ratcatcher - search library for a rat and put into your hand");
|
||||
AllZone.Stack.add(ability);
|
||||
} // for
|
||||
} // if creatures > 0
|
||||
}
|
||||
|
||||
private static void upkeep_Nath() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
final Player opponent = player.getOpponent();
|
||||
@@ -8987,112 +8838,6 @@ public class GameActionUtil {
|
||||
}// for
|
||||
}// upkeep_Dark_Confidant()
|
||||
|
||||
private static void upkeep_Debtors_Knell() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
PlayerZone oppGrave = AllZone.getZone(Constant.Zone.Graveyard, player.getOpponent());
|
||||
|
||||
CardList creatures = new CardList();
|
||||
creatures.addAll(grave.getCards());
|
||||
creatures.addAll(oppGrave.getCards());
|
||||
creatures = creatures.getType("Creature");
|
||||
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.getName("Debtors' Knell");
|
||||
|
||||
if(creatures.size() > 0 && list.size() > 0) for(int i = 0; i < list.size(); i++) {
|
||||
{
|
||||
Ability ability = new Ability(list.get(i), "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
PlayerZone oppGrave = AllZone.getZone(Constant.Zone.Graveyard,
|
||||
player.getOpponent());
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
|
||||
CardList creatures = new CardList();
|
||||
creatures.addAll(grave.getCards());
|
||||
creatures.addAll(oppGrave.getCards());
|
||||
|
||||
creatures = creatures.getType("Creature");
|
||||
|
||||
if(player.equals(AllZone.HumanPlayer)) {
|
||||
Object o = GuiUtils.getChoiceOptional("Pick a creature to put onto the battlefield",
|
||||
creatures.toArray());
|
||||
if(o != null) {
|
||||
Card card = (Card) o;
|
||||
PlayerZone graveyard = AllZone.getZone(card);
|
||||
graveyard.remove(card);
|
||||
card.setController(player);
|
||||
playZone.add(card);
|
||||
}
|
||||
} else if(player.equals(AllZone.ComputerPlayer)) {
|
||||
Card card = creatures.get(0);
|
||||
PlayerZone graveyard = AllZone.getZone(card);
|
||||
graveyard.remove(card);
|
||||
card.setController(player);
|
||||
playZone.add(card);
|
||||
|
||||
}
|
||||
}
|
||||
};// Ability
|
||||
ability.setStackDescription("Debtors' Knell returns creature from graveyard to the battlefield.");
|
||||
AllZone.Stack.add(ability);
|
||||
}//for
|
||||
} // if creatures > 0
|
||||
|
||||
}
|
||||
|
||||
private static void upkeep_Emeria() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
|
||||
CardList creatures = new CardList(graveyard.getCards());
|
||||
creatures = creatures.getType("Creature");
|
||||
|
||||
CardList land = new CardList(playZone.getCards());
|
||||
land = land.getType("Plains");
|
||||
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.getName("Emeria, the Sky Ruin");
|
||||
|
||||
if(land.size() >= 7 && creatures.size() >= 1) {
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
Ability ability = new Ability(list.get(0), "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
|
||||
CardList creatures = new CardList(graveyard.getCards());
|
||||
creatures = creatures.getType("Creature");
|
||||
|
||||
if(player.equals(AllZone.HumanPlayer)) {
|
||||
Object o = GuiUtils.getChoiceOptional("Pick a creature to put onto the battlefield",
|
||||
creatures.toArray());
|
||||
if(o != null) {
|
||||
Card card = (Card) o;
|
||||
graveyard.remove(card);
|
||||
playZone.add(card);
|
||||
}
|
||||
} else if(player.equals(AllZone.ComputerPlayer)) {
|
||||
Card card = creatures.get(0);
|
||||
graveyard.remove(card);
|
||||
playZone.add(card);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};// Ability
|
||||
ability.setStackDescription("Emeria, the Sky Ruin returns creature from graveyard to the battlefield.");
|
||||
AllZone.Stack.add(ability);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void upkeep_Oversold_Cemetery() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
CardList cemeteryList = AllZoneUtil.getPlayerCardsInPlay(player, "Oversold Cemetery");
|
||||
@@ -9131,46 +8876,6 @@ public class GameActionUtil {
|
||||
}
|
||||
}//Oversold Cemetery
|
||||
|
||||
private static void upkeep_Reya() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
|
||||
CardList creatures = new CardList(graveyard.getCards());
|
||||
creatures = creatures.getType("Creature");
|
||||
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.getName("Reya Dawnbringer");
|
||||
|
||||
if(creatures.size() > 0 && list.size() > 0) {
|
||||
Ability ability = new Ability(list.get(0), "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
|
||||
CardList creatures = new CardList(graveyard.getCards());
|
||||
creatures = creatures.getType("Creature");
|
||||
|
||||
if(player.equals(AllZone.HumanPlayer)) {
|
||||
Object o = GuiUtils.getChoiceOptional("Pick a creature to put onto the battlefield",
|
||||
creatures.toArray());
|
||||
if(o != null) {
|
||||
Card card = (Card) o;
|
||||
|
||||
AllZone.GameAction.moveToPlay(card);
|
||||
}
|
||||
} else if(player.equals(AllZone.ComputerPlayer)) {
|
||||
Card card = creatures.get(0);
|
||||
AllZone.GameAction.moveToPlay(card);
|
||||
}
|
||||
}
|
||||
|
||||
};// Ability
|
||||
ability.setStackDescription("Reya returns creature from graveyard to the battlefield.");
|
||||
AllZone.Stack.add(ability);
|
||||
} // if creatures > 0
|
||||
} // reya
|
||||
|
||||
private static void upkeep_Nether_Spirit() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
final PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
@@ -11778,7 +11483,6 @@ public class GameActionUtil {
|
||||
Dauntless_Escort.execute();
|
||||
|
||||
Baru.execute();
|
||||
Sosukes_Summons.execute();
|
||||
|
||||
//Souls_Attendant.execute();
|
||||
Wirewood_Hivemaster.execute();
|
||||
@@ -12841,55 +12545,6 @@ public class GameActionUtil {
|
||||
}// execute
|
||||
}; // Windwright Mage
|
||||
|
||||
// Copied from Reach of Branches
|
||||
public static Command Sosukes_Summons= new Command() {
|
||||
private static final long serialVersionUID = -6316413742244380102L;
|
||||
CardList oldSnakes = new CardList();
|
||||
|
||||
public void execute() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
final CardList nCard = AllZoneUtil.getPlayerGraveyard(player, "Sosuke's Summons");
|
||||
|
||||
// get all Snakes that player has
|
||||
CardList newSnakes = AllZoneUtil.getPlayerTypeInPlay(player, "Snake");
|
||||
newSnakes = newSnakes.filter(AllZoneUtil.nonToken);
|
||||
|
||||
// if "Sosuke's Summons" is in graveyard and played a Forest
|
||||
if(0 < nCard.size() && newSnake(oldSnakes, newSnakes)) {
|
||||
SpellAbility ability = new Ability( new Card(), "0" ) {
|
||||
@Override
|
||||
public void resolve() {
|
||||
// return all Summons' to hand
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
for(int i = 0; i < nCard.size(); i++) {
|
||||
grave.remove(nCard.get(i));
|
||||
hand.add(nCard.get(i));
|
||||
}
|
||||
}// resolve()
|
||||
};// SpellAbility
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Sosuke's Summons - return card to ").append(player).append("'s hand");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.add(ability);
|
||||
}// if
|
||||
|
||||
// potential problem: if a snake is bounced to your hand - won't trigger when you play that snake
|
||||
oldSnakes.addAll(newSnakes.toArray());
|
||||
}// execute
|
||||
|
||||
// check if newList has anything that oldList doesn't have
|
||||
boolean newSnake(CardList oldList, CardList newList) {
|
||||
// check if a Snake enters the battlefield under your control
|
||||
for(int i = 0; i < newList.size(); i++)
|
||||
if(!oldList.contains(newList.get(i))) return true;
|
||||
|
||||
return false;
|
||||
}// newSnake()
|
||||
}; // Sosukes Summons
|
||||
|
||||
public static Command Baru = new Command() {
|
||||
private static final long serialVersionUID = 7535910275326543185L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user