mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Convert Archon of Justice and Wort, Boggart Auntie to Trigger
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
Name:Archon of Justice
|
||||
ManaCost:3 W W
|
||||
Types:Creature Archon
|
||||
Text:When Archon of Justice is put into a graveyard from the battlefield, exile target permanent.
|
||||
Text:no text
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChange | TriggerDescription$ When Archon of Justice is put into a graveyard from the battlefield, exile target permanent.
|
||||
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | ValidTgts$ Permanent | Origin$ Battlefield | Destination$ Exile
|
||||
PT:4/4
|
||||
K:Flying
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -4,6 +4,8 @@ Types:Legendary Creature Goblin Shaman
|
||||
Text:At the beginning of your upkeep, you may return target Goblin card from your graveyard to your hand.
|
||||
PT:3/3
|
||||
K:Fear
|
||||
T:Mode$ Phase | Phase$ Upkeep | Player$ You | Execute$ TrigChangeZone | Optional$ True | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you may return target Goblin card from your graveyard to your hand.
|
||||
SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target Goblin card in your graveyard | ValidTgts$ Goblin.YouCtrl
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/wort_boggart_auntie.jpg
|
||||
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/252.jpg
|
||||
|
||||
@@ -6116,66 +6116,6 @@ public class CardFactory_Creatures {
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Archon of Justice")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(getTargetCard() != null) {
|
||||
if(AllZone.GameAction.isCardInPlay(getTargetCard())
|
||||
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
||||
AllZone.GameAction.exile(getTargetCard());
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
ability.setStackDescription("Archon of Justice - Exile target permanent.");
|
||||
|
||||
Command leavesPlay = new Command() {
|
||||
private static final long serialVersionUID = 7552566264976488465L;
|
||||
|
||||
public void execute() {
|
||||
if(card.getController().equals(AllZone.HumanPlayer)) AllZone.InputControl.setInput(CardFactoryUtil.input_targetPermanent(ability));
|
||||
else {
|
||||
/*
|
||||
* if computer controlled Archon of Justice have it select the best creature, or enchantment,
|
||||
* or artifact, whatever the human controllers, and as a last option a card it controls.
|
||||
*/
|
||||
Card temp;
|
||||
|
||||
CardList human_list = new CardList(AllZone.Human_Battlefield.getCards());
|
||||
human_list.remove("Mana Pool");
|
||||
temp = CardFactoryUtil.AI_getBestCreature(human_list);
|
||||
if(temp != null) ability.setTargetCard(CardFactoryUtil.AI_getBestCreature(human_list));
|
||||
if(ability.getTargetCard() == null) {
|
||||
temp = CardFactoryUtil.AI_getBestEnchantment(human_list, card, false);
|
||||
if(temp != null) ability.setTargetCard(CardFactoryUtil.AI_getBestEnchantment(
|
||||
human_list, card, true));
|
||||
}
|
||||
if(ability.getTargetCard() == null) {
|
||||
temp = CardFactoryUtil.AI_getBestArtifact(human_list);
|
||||
if(temp != null) ability.setTargetCard(CardFactoryUtil.AI_getBestArtifact(human_list));
|
||||
}
|
||||
if(ability.getTargetCard() == null) {
|
||||
if(human_list.size() == 0) {
|
||||
CardList computer_list = new CardList(AllZone.Computer_Battlefield.getCards());
|
||||
if(computer_list.size() == 0) {
|
||||
return; //we have nothing in play to destroy.
|
||||
} else {
|
||||
ability.setTargetCard(computer_list.get(0)); //should determine the worst card to destroy, but this case wont be hit much.
|
||||
}
|
||||
}
|
||||
ability.setTargetCard(human_list.get(0));
|
||||
}
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
}//execute()
|
||||
};//Command
|
||||
card.addDestroyCommand(leavesPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Knight of the White Orchid")) {
|
||||
final Ability ability = new Ability(card, "0") {
|
||||
|
||||
@@ -67,7 +67,6 @@ public class GameActionUtil {
|
||||
upkeep_Festering_Wound_Counter();
|
||||
upkeep_Festering_Wound_Damage();
|
||||
upkeep_Greener_Pastures();
|
||||
upkeep_Wort();
|
||||
upkeep_Squee();
|
||||
upkeep_Sporesower_Thallid();
|
||||
upkeep_Dragonmaster_Outcast();
|
||||
@@ -9183,53 +9182,6 @@ public class GameActionUtil {
|
||||
} // if creatures > 0
|
||||
} // reya
|
||||
|
||||
private static void upkeep_Wort() {
|
||||
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("Goblin");
|
||||
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.getName("Wort, Boggart Auntie");
|
||||
|
||||
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);
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
|
||||
|
||||
CardList creatures = new CardList(graveyard.getCards());
|
||||
creatures = creatures.getType("Goblin");
|
||||
|
||||
if(player.equals(AllZone.HumanPlayer)) {
|
||||
Object o = GuiUtils.getChoiceOptional("Pick a goblin to put into your hand",
|
||||
creatures.toArray());
|
||||
if(o != null) {
|
||||
Card card = (Card) o;
|
||||
graveyard.remove(card);
|
||||
hand.add(card);
|
||||
}
|
||||
} else if(player.equals(AllZone.ComputerPlayer)) {
|
||||
Card card = creatures.get(0);
|
||||
graveyard.remove(card);
|
||||
hand.add(card);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};// Ability
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Wort returns creature from graveyard to ").append(player).append("'s hand");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.add(ability);
|
||||
} // if creatures > 0
|
||||
} // Wort
|
||||
|
||||
private static void upkeep_Nether_Spirit() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
final PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
|
||||
Reference in New Issue
Block a user