mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
convert Urborg Syphon-Mage and Llanowar Behemoth to AF.
This commit is contained in:
@@ -3,6 +3,7 @@ ManaCost:3 G G
|
|||||||
Types:Creature Elemental
|
Types:Creature Elemental
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:4/4
|
PT:4/4
|
||||||
|
A:AB$Pump | Cost$ tapXType<1/Creature> | NumAtt$1|NumDef$ +1 | SpellDescription$ CARDNAME gets +1/+1 until end of turn.
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/9ed/en-us/card83152.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/9ed/en-us/card83152.jpg
|
||||||
SetInfo:8ED|Uncommon|http://magiccards.info/scans/en/8e/261.jpg
|
SetInfo:8ED|Uncommon|http://magiccards.info/scans/en/8e/261.jpg
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ ManaCost:GW
|
|||||||
Types:Legendary Creature Elf Warrior
|
Types:Legendary Creature Elf Warrior
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:1/1
|
PT:1/1
|
||||||
#K:abMakeToken 2 GW T<>1<>Elf Warrior<>GW 1 1 Elf Warrior<>Controller<>G W<>Creature;Elf;Warrior<>1<>1<>None<>put a 1/1 green and white Elf Warrior creature token onto the battlefield.
|
|
||||||
A:AB$Token | Cost$ 2 GW T | TokenAmount$ 1 | TokenName$ Elf Warrior | TokenTypes$ Creature,Elf,Warrior | TokenOwner$ Controller | TokenColors$ Green,White | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green and white Elf Warrior creature token onto the battlefield.
|
A:AB$Token | Cost$ 2 GW T | TokenAmount$ 1 | TokenName$ Elf Warrior | TokenTypes$ Creature,Elf,Warrior | TokenOwner$ Controller | TokenColors$ Green,White | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green and white Elf Warrior creature token onto the battlefield.
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/rhys_the_redeemed.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/rhys_the_redeemed.jpg
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ ManaCost:2 B
|
|||||||
Types:Creature Human Spellshaper
|
Types:Creature Human Spellshaper
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:2/2
|
PT:2/2
|
||||||
|
A:AB$LoseLife|Cost$2 B T Discard<1/Any>|LifeAmount$2|SubAbility$YouGainLife/2|SpellDescription$Each other player loses 2 life. You gain life equal to the life lost this way.
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/tsp/en-us/card108798.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/tsp/en-us/card108798.jpg
|
||||||
SetInfo:TSP|Common|http://magiccards.info/scans/en/ts/139.jpg
|
SetInfo:TSP|Common|http://magiccards.info/scans/en/ts/139.jpg
|
||||||
|
|||||||
@@ -7156,84 +7156,6 @@ public class CardFactory_Creatures {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Llanowar Behemoth")) {
|
|
||||||
final Ability ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return (getUntapped().size() != 0) && CardFactoryUtil.AI_doesCreatureAttack(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void chooseTargetAI() {
|
|
||||||
Card c = getUntapped().get(0);
|
|
||||||
c.tap();
|
|
||||||
setTargetCard(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
CardList getUntapped() {
|
|
||||||
CardList list = new CardList(AllZone.Computer_Battlefield.getCards());
|
|
||||||
list = list.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return c.isCreature() && c.isUntapped() && (!CardFactoryUtil.AI_doesCreatureAttack(c));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return list;
|
|
||||||
}//getUntapped()
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
card.addTempAttackBoost(1);
|
|
||||||
card.addTempDefenseBoost(1);
|
|
||||||
|
|
||||||
Command untilEOT = new Command() {
|
|
||||||
private static final long serialVersionUID = 6445782721494547172L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
card.addTempAttackBoost(-1);
|
|
||||||
card.addTempDefenseBoost(-1);
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
|
|
||||||
AllZone.EndOfTurn.addUntil(untilEOT);
|
|
||||||
}//resolve()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
Input target = new Input() {
|
|
||||||
private static final long serialVersionUID = 7721637420366357272L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void showMessage() {
|
|
||||||
AllZone.Display.showMessage("Select an untapped creature you control");
|
|
||||||
ButtonUtil.enableOnlyCancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectButtonCancel() {
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectCard(Card c, PlayerZone zone) {
|
|
||||||
if(c.isCreature() && zone.is(Constant.Zone.Battlefield, card.getController()) && c.isUntapped()) {
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card).append(" gets +1/+1 until end of turn.");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
c.tap();
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};//Input
|
|
||||||
ability.setBeforePayMana(target);
|
|
||||||
ability.setDescription("Tap an untapped creature you control: Llanowar Behemoth gets +1/+1 until end of turn.");
|
|
||||||
|
|
||||||
card.addSpellAbility(ability);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Memnarch")) {
|
else if(cardName.equals("Memnarch")) {
|
||||||
//has 2 non-tap abilities that effects itself
|
//has 2 non-tap abilities that effects itself
|
||||||
@@ -7274,74 +7196,10 @@ public class CardFactory_Creatures {
|
|||||||
return list;
|
return list;
|
||||||
}//getCreature()
|
}//getCreature()
|
||||||
};//SpellAbility
|
};//SpellAbility
|
||||||
/*
|
|
||||||
//**** start of ability2
|
|
||||||
final SpellAbility ability2 = new Ability(card, "3 U") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
if(AllZone.GameAction.isCardInPlay(getTargetCard())
|
|
||||||
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
|
||||||
|
|
||||||
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(false);
|
|
||||||
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(false);
|
|
||||||
|
|
||||||
//gain control of target artifact
|
|
||||||
PlayerZone from = AllZone.getZone(Constant.Zone.Play, getTargetCard().getController());
|
|
||||||
from.remove(getTargetCard());
|
|
||||||
|
|
||||||
|
|
||||||
getTargetCard().setController(card.getController());
|
|
||||||
|
|
||||||
PlayerZone to = AllZone.getZone(Constant.Zone.Play, card.getController());
|
|
||||||
to.add(getTargetCard());
|
|
||||||
to.setUpdate(true);
|
|
||||||
|
|
||||||
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(true);
|
|
||||||
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(true);
|
|
||||||
|
|
||||||
|
|
||||||
// AllZone.GameAction.moveTo(play, getTargetCard());
|
|
||||||
|
|
||||||
//TODO: controller probably is not set correctly
|
|
||||||
//TODO: when you take control, the creature looses type "Artifact" since
|
|
||||||
// GameAction.moveTo() makes a new card object
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
CardList list = getArtifactCreatures();
|
|
||||||
return list.size() != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void chooseTargetAI() {
|
|
||||||
CardList list = getArtifactCreatures();
|
|
||||||
Card target = CardFactoryUtil.AI_getBestCreature(list);
|
|
||||||
if(target == null) target = AllZone.Human_Play.get(0);
|
|
||||||
|
|
||||||
setTargetCard(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
CardList getArtifactCreatures() {
|
|
||||||
CardList list = new CardList(AllZone.Human_Play.getCards());
|
|
||||||
list = list.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return c.isCreature() && c.isArtifact() && CardFactoryUtil.canTarget(card, c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
};//SpellAbility
|
|
||||||
*/
|
|
||||||
card.addSpellAbility(ability1);
|
card.addSpellAbility(ability1);
|
||||||
//card.addSpellAbility(ability2);
|
|
||||||
|
|
||||||
ability1.setDescription("1 U U: Target permanent becomes an artifact in addition to its other types. (This effect doesn't end at end of turn.)");
|
ability1.setDescription("1 U U: Target permanent becomes an artifact in addition to its other types. (This effect doesn't end at end of turn.)");
|
||||||
//ability2.setDescription("3 U: Gain control of target artifact. (This effect doesn't end at end of turn.)");
|
|
||||||
|
|
||||||
ability1.setBeforePayMana(CardFactoryUtil.input_targetType(ability1, "All"));
|
ability1.setBeforePayMana(CardFactoryUtil.input_targetType(ability1, "All"));
|
||||||
//ability2.setBeforePayMana(CardFactoryUtil.input_targetType(ability2, "Artifact"));
|
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
@@ -7364,7 +7222,6 @@ public class CardFactory_Creatures {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
//get all creatures
|
|
||||||
CardList list = AllZoneUtil.getCreaturesInPlay();
|
CardList list = AllZoneUtil.getCreaturesInPlay();
|
||||||
|
|
||||||
list = list.filter(new CardListFilter() {
|
list = list.filter(new CardListFilter() {
|
||||||
@@ -7386,50 +7243,7 @@ public class CardFactory_Creatures {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Urborg Syphon-Mage")) {
|
|
||||||
final Ability_Tap ability = new Ability_Tap(card, "2 B") {
|
|
||||||
private static final long serialVersionUID = -1965170715774280112L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
Player opponent = card.getController().getOpponent();
|
|
||||||
opponent.loseLife(2, card);
|
|
||||||
card.getController().gainLife(2, card);
|
|
||||||
|
|
||||||
//computer discards here, TODO: should discard when ability put on stack
|
|
||||||
if(card.getController().equals(AllZone.ComputerPlayer)) AllZone.ComputerPlayer.discardRandom(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlay() {
|
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
|
||||||
return super.canPlay() && hand.getCards().length != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
int life = AllZone.HumanPlayer.getLife();
|
|
||||||
Card[] hand = AllZone.Computer_Hand.getCards();
|
|
||||||
return ((life < 11) || (5 < AllZone.Phase.getTurn())) && hand.length > 0;
|
|
||||||
}
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
card.addSpellAbility(ability);
|
|
||||||
ability.setDescription("2B, tap, Discard a card: Each other player loses 2 life. You gain life equal to the life lost this way.");
|
|
||||||
ability.setStackDescription("Urborg Syphon-Mage - Opponent loses 2 life, and you gain 2 life");
|
|
||||||
ability.setBeforePayMana(new Input_PayManaCost_Ability("2 B", new Command() {
|
|
||||||
private static final long serialVersionUID = 1186455545951390853L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
card.tap();
|
|
||||||
AllZone.InputControl.setInput(CardFactoryUtil.input_discard(ability));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Stangg")) {
|
else if(cardName.equals("Stangg")) {
|
||||||
|
|
||||||
@@ -7462,10 +7276,7 @@ public class CardFactory_Creatures {
|
|||||||
private static final long serialVersionUID = 1786900359843939456L;
|
private static final long serialVersionUID = 1786900359843939456L;
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
CardList list = new CardList();
|
CardList list = AllZoneUtil.getCardsInPlay("Stangg Twin");
|
||||||
list.addAll(AllZone.Computer_Battlefield.getCards());
|
|
||||||
list.addAll(AllZone.Human_Battlefield.getCards());
|
|
||||||
list = list.getName("Stangg Twin");
|
|
||||||
|
|
||||||
if(list.size() == 1) AllZone.GameAction.exile(list.get(0));
|
if(list.size() == 1) AllZone.GameAction.exile(list.get(0));
|
||||||
}
|
}
|
||||||
@@ -7688,99 +7499,6 @@ public class CardFactory_Creatures {
|
|||||||
destroy.setBeforePayMana(CardFactoryUtil.input_targetCreature(destroy));
|
destroy.setBeforePayMana(CardFactoryUtil.input_targetCreature(destroy));
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Marrow-Gnawer")) {
|
|
||||||
final Player player = card.getController();
|
|
||||||
|
|
||||||
final SpellAbility ability = new Ability_Tap(card) {
|
|
||||||
private static final long serialVersionUID = 447190529377334168L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
|
||||||
CardList cards = new CardList(play.getCards());
|
|
||||||
|
|
||||||
Card c = getTargetCard();
|
|
||||||
if(c != null) {
|
|
||||||
AllZone.GameAction.sacrifice(c);
|
|
||||||
|
|
||||||
CardList rats = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Rat")
|
|
||||||
|| cards.get(i).getKeyword().contains("Changeling")) {
|
|
||||||
Card k = cards.get(i);
|
|
||||||
rats.add(k);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!c.getName().equals("Marrow-Gnawer")) {
|
|
||||||
for(int j = 0; j < rats.size() - 1; j++) {
|
|
||||||
makeToken();
|
|
||||||
}
|
|
||||||
} else //some weird thing when targeting marrow himself, number of rats is different... so here's a hack:
|
|
||||||
{
|
|
||||||
for(int k = 0; k < rats.size(); k++) {
|
|
||||||
makeToken();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
CardList list = new CardList(AllZone.Computer_Play.getCards());
|
|
||||||
list = list.getType("Rat");
|
|
||||||
|
|
||||||
for(int i = 0; i < list.size(); i++) {
|
|
||||||
String name = list.get(i).getName();
|
|
||||||
if(!name.equals("Marrow-Gnawer") && !name.equals("Relentless Rats")) setTargetCard(list.get(i));
|
|
||||||
if(name.equals("B 1 1 Rat")) {
|
|
||||||
setTargetCard(list.get(i));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(getTargetCard() == null) Log.debug("Marrow-Gnawer", "getTargetCard null");
|
|
||||||
if(getTargetCard() != null && list.size() > 3) return true;
|
|
||||||
else return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void makeToken() {
|
|
||||||
CardFactoryUtil.makeToken("Rat", "B 1 1 Rat", card.getController(), "B", new String[] {"Creature", "Rat"}, 1,
|
|
||||||
1, new String[] {""});
|
|
||||||
}
|
|
||||||
|
|
||||||
};//ability
|
|
||||||
|
|
||||||
Input runtime = new Input() {
|
|
||||||
private static final long serialVersionUID = 8552290582665041908L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void showMessage() {
|
|
||||||
CardList rats = new CardList(
|
|
||||||
AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
|
|
||||||
rats = rats.getType("Rat");
|
|
||||||
|
|
||||||
stopSetNext(CardFactoryUtil.input_targetSpecific(ability, rats, "Select a Rat to sacrifice.",
|
|
||||||
false, false));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
card.addSpellAbility(ability);
|
|
||||||
ability.setDescription("Tap, Sacrifice a rat: Put X 1/1 black Rat creature tokens into play, where X is the number of Rats you control.");
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card.getName()).append(" - Put X 1/1 black Rat creature tokens into play, where X is the number of Rats you control.");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
ability.setBeforePayMana(runtime);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Horde of Notions")) {
|
else if(cardName.equals("Horde of Notions")) {
|
||||||
@@ -7847,8 +7565,6 @@ public class CardFactory_Creatures {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
getTargetPlayer().discard(this);
|
getTargetPlayer().discard(this);
|
||||||
//if(AllZone.ComputerPlayer.equals(getTargetPlayer())) AllZone.GameAction.discardRandom(getTargetPlayer(), this);
|
|
||||||
//else AllZone.InputControl.setInput(CardFactoryUtil.input_discard(this));
|
|
||||||
}//resolve()
|
}//resolve()
|
||||||
};//SpellAbility
|
};//SpellAbility
|
||||||
|
|
||||||
@@ -7873,37 +7589,7 @@ public class CardFactory_Creatures {
|
|||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Rhys the Redeemed")) {
|
else if(cardName.equals("Rhys the Redeemed")) {
|
||||||
/*
|
|
||||||
final Ability_Tap tokenAbility1 = new Ability_Tap(card, "2 GW") {
|
|
||||||
private static final long serialVersionUID = 411298860775527337L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
String phase = AllZone.Phase.getPhase();
|
|
||||||
return phase.equals(Constant.Phase.Main2);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void chooseTargetAI() {
|
|
||||||
card.tap();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
CardFactoryUtil.makeToken("Elf Warrior", "GW 1 1 Elf Warrior", card, "GW", new String[] {
|
|
||||||
"Creature", "Elf", "Warrior"}, 1, 1, new String[] {""});
|
|
||||||
}//resolve()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
card.addSpellAbility(tokenAbility1);
|
|
||||||
|
|
||||||
tokenAbility1.setDescription("2 GW, tap: Put a 1/1 green and white Elf Warrior creature token into play.");
|
|
||||||
tokenAbility1.setStackDescription(card.getName()
|
|
||||||
+ " - Put a 1/1 green and white Elf Warrior creature token into play.");
|
|
||||||
tokenAbility1.setBeforePayMana(new Input_PayManaCost(tokenAbility1));
|
|
||||||
*/
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
final Ability_Tap copyTokens1 = new Ability_Tap(card, "4 GW GW") {
|
final Ability_Tap copyTokens1 = new Ability_Tap(card, "4 GW GW") {
|
||||||
private static final long serialVersionUID = 6297992502069547478L;
|
private static final long serialVersionUID = 6297992502069547478L;
|
||||||
|
|
||||||
@@ -7986,37 +7672,30 @@ public class CardFactory_Creatures {
|
|||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Imperial Hellkite")) {
|
else if(cardName.equals("Imperial Hellkite")) {
|
||||||
final Player player = card.getController();
|
|
||||||
Command turnsFaceUp = new Command() {
|
Command turnsFaceUp = new Command() {
|
||||||
private static final long serialVersionUID = -1407485989096862288L;
|
private static final long serialVersionUID = -1407485989096862288L;
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
final Player player = card.getController();
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
CardList list = AllZoneUtil.getPlayerCardsInLibrary(player);
|
||||||
|
|
||||||
CardList list = new CardList(lib.getCards());
|
|
||||||
list = list.getType("Dragon");
|
list = list.getType("Dragon");
|
||||||
|
|
||||||
if(list.size() == 0) return;
|
if(list.size() == 0) return;
|
||||||
|
|
||||||
|
Card dragon = null;
|
||||||
if(player.equals(AllZone.ComputerPlayer)) {
|
if(player.isComputer()) {
|
||||||
Card dragon = CardFactoryUtil.AI_getBestCreature(list);
|
dragon = CardFactoryUtil.AI_getBestCreature(list);
|
||||||
lib.remove(dragon);
|
|
||||||
hand.add(dragon);
|
|
||||||
} else //human
|
} else //human
|
||||||
{
|
{
|
||||||
Object o = AllZone.Display.getChoiceOptional("Select Dragon", list.toArray());
|
Object o = AllZone.Display.getChoiceOptional("Select Dragon", list.toArray());
|
||||||
Card dragon = (Card) o;
|
dragon = (Card) o;
|
||||||
lib.remove(dragon);
|
|
||||||
hand.add(dragon);
|
|
||||||
}
|
}
|
||||||
|
AllZone.GameAction.moveToHand(dragon);
|
||||||
card.getController().shuffle();
|
card.getController().shuffle();
|
||||||
}//execute()
|
}//execute()
|
||||||
};//Command
|
};//Command
|
||||||
|
|
||||||
card.addTurnFaceUpCommand(turnsFaceUp);
|
card.addTurnFaceUpCommand(turnsFaceUp);
|
||||||
|
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
@@ -8054,20 +7733,16 @@ public class CardFactory_Creatures {
|
|||||||
private static final long serialVersionUID = 5202575895575352408L;
|
private static final long serialVersionUID = 5202575895575352408L;
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
CardList all = new CardList();
|
CardList all = AllZoneUtil.getCardsInPlay();
|
||||||
all.addAll(AllZone.Human_Battlefield.getCards());
|
|
||||||
all.addAll(AllZone.Computer_Battlefield.getCards());
|
|
||||||
|
|
||||||
CardList hum = new CardList();
|
CardList hum = AllZoneUtil.getPlayerCardsInPlay(AllZone.HumanPlayer);
|
||||||
hum.addAll(AllZone.Human_Battlefield.getCards());
|
|
||||||
|
|
||||||
if(all.size() != 0) {
|
if(all.size() != 0) {
|
||||||
|
if(card.getController().isHuman()) {
|
||||||
if(card.getController().equals(AllZone.HumanPlayer)) {
|
|
||||||
AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all,
|
AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, all,
|
||||||
"Select target permanent to tap/untap.", true, false));
|
"Select target permanent to tap/untap.", true, false));
|
||||||
ButtonUtil.enableAll();
|
ButtonUtil.enableAll();
|
||||||
} else if(card.getController().equals(AllZone.ComputerPlayer)) {
|
} else {
|
||||||
Card human = CardFactoryUtil.AI_getBestCreature(hum);
|
Card human = CardFactoryUtil.AI_getBestCreature(hum);
|
||||||
ability.setTargetCard(human);
|
ability.setTargetCard(human);
|
||||||
AllZone.Stack.add(ability);
|
AllZone.Stack.add(ability);
|
||||||
@@ -8139,159 +7814,6 @@ public class CardFactory_Creatures {
|
|||||||
|
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
/*
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Captain Sisay")) {
|
|
||||||
final Ability_Tap ability = new Ability_Tap(card) {
|
|
||||||
private static final long serialVersionUID = 7978812786945030021L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
Player player = card.getController();
|
|
||||||
if(player.equals(AllZone.HumanPlayer)) humanResolve();
|
|
||||||
else computerResolve();
|
|
||||||
}//resolve()
|
|
||||||
|
|
||||||
public void humanResolve() {
|
|
||||||
CardList cards = new CardList(AllZone.Human_Library.getCards());
|
|
||||||
//legends = legends.getType().contains("Legendary");
|
|
||||||
CardList legends = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
//System.out.println("type: " +cards.get(i).getType());
|
|
||||||
if(cards.get(i).getType().contains("Legendary")) {
|
|
||||||
//System.out.println(cards.get(i).getName());
|
|
||||||
Card c = cards.get(i);
|
|
||||||
legends.add(c);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(legends.size() != 0) {
|
|
||||||
Object check = AllZone.Display.getChoiceOptional("Select a legendary card", legends.toArray());
|
|
||||||
if(check != null) {
|
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
|
||||||
AllZone.GameAction.moveTo(hand, (Card) check);
|
|
||||||
}
|
|
||||||
AllZone.HumanPlayer.shuffle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void computerResolve() {
|
|
||||||
Card[] library = AllZone.Computer_Library.getCards();
|
|
||||||
CardList list = new CardList(library);
|
|
||||||
CardList legends = new CardList();
|
|
||||||
//list = list.getType("Creature");
|
|
||||||
|
|
||||||
for(int i = 0; i < list.size(); i++) {
|
|
||||||
if(list.get(i).getType().contains("Legendary")) {
|
|
||||||
Card k = list.get(i);
|
|
||||||
legends.add(k);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//pick best creature
|
|
||||||
if(legends.size() != 0) {
|
|
||||||
Card c = CardFactoryUtil.AI_getBestCreature(legends);
|
|
||||||
if(c == null) c = library[0];
|
|
||||||
Log.debug("Captain Sisay","computer picked - " + c);
|
|
||||||
AllZone.Computer_Library.remove(c);
|
|
||||||
AllZone.Computer_Hand.add(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
};//SpellAbility
|
|
||||||
//card.addSpellAbility(ability);
|
|
||||||
ability.setDescription("tap: Search your library for a legendary card, reveal that card, and put it into your hand. Then shuffle your library.");
|
|
||||||
ability.setBeforePayMana(new Input_NoCost_TapAbility(ability));
|
|
||||||
ability.setStackDescription("Captain Sisay searches for a legendary card...");
|
|
||||||
card.addSpellAbility(ability);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Brion Stoutarm")) {
|
|
||||||
|
|
||||||
final SpellAbility ability = new Ability_Tap(card, "R") {
|
|
||||||
private static final long serialVersionUID = -7755879134314608010L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
Player player = card.getController();
|
|
||||||
if(player.equals(AllZone.HumanPlayer)) humanResolve();
|
|
||||||
else computerResolve();
|
|
||||||
}//resolve()
|
|
||||||
|
|
||||||
public void humanResolve() {
|
|
||||||
Player player = card.getController();
|
|
||||||
|
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
|
||||||
CardList cards = new CardList(play.getCards());
|
|
||||||
|
|
||||||
CardList creatures = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Creature")
|
|
||||||
&& !cards.get(i).getName().equals("Brion Stoutarm")) {
|
|
||||||
Card k = cards.get(i);
|
|
||||||
creatures.add(k);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(creatures.size() != 0) {
|
|
||||||
Object check = AllZone.Display.getChoiceOptional("Select Creature to Sacrifice",
|
|
||||||
creatures.toArray());
|
|
||||||
if(check != null) {
|
|
||||||
Card c = (Card) check;
|
|
||||||
if(AllZone.GameAction.isCardInPlay(c)) {
|
|
||||||
int power = c.getNetAttack();
|
|
||||||
AllZone.GameAction.sacrifice(c);
|
|
||||||
Player opponent = player.getOpponent();
|
|
||||||
|
|
||||||
opponent.addDamage(power, card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}//humanResolve
|
|
||||||
|
|
||||||
public void computerResolve() {
|
|
||||||
Player player = card.getController();
|
|
||||||
|
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
|
||||||
CardList cards = new CardList(play.getCards());
|
|
||||||
|
|
||||||
CardList creatures = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Creature")
|
|
||||||
&& !cards.get(i).getName().equals("Brion Stoutarm")) {
|
|
||||||
Card k = cards.get(i);
|
|
||||||
creatures.add(k);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//.... TODO
|
|
||||||
|
|
||||||
}//compResolve
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
};//ability
|
|
||||||
|
|
||||||
card.addSpellAbility(ability);
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("R, tap, Sacrifice a creature other than Brion Stoutarm: Brion Stoutarm ");
|
|
||||||
sb.append("deals damage equal to the sacrificed creature's power to target player.");
|
|
||||||
ability.setDescription(sb.toString());
|
|
||||||
|
|
||||||
ability.setStackDescription("Brion Stoutarm deals damage equal to sacrificed creature's power");
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Trinket Mage")) {
|
else if(cardName.equals("Trinket Mage")) {
|
||||||
@@ -8734,103 +8256,7 @@ public class CardFactory_Creatures {
|
|||||||
card.addComesIntoPlayCommand(fetchBasicLand);
|
card.addComesIntoPlayCommand(fetchBasicLand);
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
/*
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Doomed Necromancer")) {
|
|
||||||
final SpellAbility ability = new Ability_Tap(card, "B") {
|
|
||||||
private static final long serialVersionUID = -6432831150810562390L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return getCreatures().length != 0;
|
|
||||||
}//canPlayAI()
|
|
||||||
|
|
||||||
public Card[] getCreatures() {
|
|
||||||
CardList creature = new CardList();
|
|
||||||
PlayerZone zone = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
|
|
||||||
creature.addAll(zone.getCards());
|
|
||||||
creature = creature.getType("Creature");
|
|
||||||
if (AllZone.Phase.getPhase().equals(Constant.Phase.Main2) && card.getController().equals(AllZone.ComputerPlayer)) {
|
|
||||||
creature = creature.getNotKeyword("At the beginning of the end step, sacrifice CARDNAME.");
|
|
||||||
}
|
|
||||||
creature = creature.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return c.getNetAttack() > 4;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return creature.toArray();
|
|
||||||
}//getCreatures()
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void chooseTargetAI() {
|
|
||||||
Card c[] = getCreatures();
|
|
||||||
Card biggest = c[0];
|
|
||||||
for(int i = 0; i < c.length; i++)
|
|
||||||
if(biggest.getNetAttack() < c[i].getNetAttack()) biggest = c[i];
|
|
||||||
|
|
||||||
setTargetCard(biggest);
|
|
||||||
}//chooseTargetAI()
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
if(card.getController().equals(AllZone.HumanPlayer)) {
|
|
||||||
CardList creature = new CardList();
|
|
||||||
PlayerZone zone = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
|
|
||||||
creature.addAll(zone.getCards());
|
|
||||||
creature = creature.getType("Creature");
|
|
||||||
if(creature.size() != 0) {
|
|
||||||
Object o = AllZone.Display.getChoice("Choose a creature from the graveyard to return to the battlefield", creature.toArray());
|
|
||||||
|
|
||||||
if(o != null) {
|
|
||||||
Card c = (Card) o;
|
|
||||||
if(AllZone.GameAction.isCardInZone(c, zone)) {
|
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController());
|
|
||||||
AllZone.GameAction.moveTo(play, c);
|
|
||||||
AllZone.GameAction.sacrifice(card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
AllZone.GameAction.sacrifice(card);
|
|
||||||
}
|
|
||||||
} else {//Computer
|
|
||||||
CardList creature = new CardList();
|
|
||||||
PlayerZone zone = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
|
|
||||||
creature.addAll(zone.getCards());
|
|
||||||
creature = creature.getType("Creature");
|
|
||||||
Card c[] = getCreatures();
|
|
||||||
Card biggest = c[0];
|
|
||||||
for(int i = 0; i < c.length; i++)
|
|
||||||
if(biggest.getNetAttack() < c[i].getNetAttack()) biggest = c[i];
|
|
||||||
|
|
||||||
if(creature.size() != 0) {
|
|
||||||
if(biggest != null) {
|
|
||||||
if(AllZone.GameAction.isCardInZone(biggest, zone)) {
|
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, biggest.getController());
|
|
||||||
AllZone.GameAction.moveTo(play, biggest);
|
|
||||||
AllZone.GameAction.sacrifice(card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
AllZone.GameAction.sacrifice(card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
card.addSpellAbility(ability);
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(cardName).append(" gets sacrificed to return target creature card from your graveyard to the battlefield");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
// ability.setDescription("B, Tap: Sacrifice Doomed Necromancer: Return target creature card from your graveyard to the battlefield");
|
|
||||||
// card.addSpellAbility(new Spell_Permanent(card) {
|
|
||||||
// private static final long serialVersionUID = -462134621235305833L;
|
|
||||||
// });
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Affa Guard Hound")) {
|
else if(cardName.equals("Affa Guard Hound")) {
|
||||||
final CommandReturn getCreature = new CommandReturn() {
|
final CommandReturn getCreature = new CommandReturn() {
|
||||||
|
|||||||
Reference in New Issue
Block a user