convert Goblin Burrows, Daru Encampment, and Shizo Death's Storehouse to AB$Pump

This commit is contained in:
jendave
2011-08-06 13:45:04 +00:00
parent 0e32a7ce64
commit a47ae1ffb4
5 changed files with 6 additions and 380 deletions

View File

@@ -3,7 +3,8 @@ ManaCost:no cost
Types:Land
Text:no text
K:tap: add 1
A:AB$Pump | Cost$ W T | ValidTgts$ Creature.Soldier | TgtPrompt$ Select target Soldier creature | NumAtt$ +1|NumDef$+1| SpellDescription$ Target Soldier creature gets +1/+1 until end of turn.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/Daru_Encampment.jpg
SVar:Picture:http://www.wizards.com/global/images/magic/general/daru_encampment.jpg
SetInfo:ONS|Uncommon|http://magiccards.info/scans/en/on/315.jpg
End

View File

@@ -3,6 +3,7 @@ ManaCost:no cost
Types:Land
Text:no text
K:tap: add 1
A:AB$Pump | Cost$ 1 R T | ValidTgts$ Creature.Goblin | TgtPrompt$ Select target Goblin creature | NumAtt$ +2| SpellDescription$ Target Goblin creature gets +2/+0 until end of turn.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_burrows.jpg
SetInfo:ONS|Uncommon|http://magiccards.info/scans/en/on/318.jpg

View File

@@ -3,7 +3,7 @@ ManaCost:no cost
Types:Legendary Land
Text:no text
K:tap: add G
A:SP$Pump | Cost$ G T | ValidTgts$ Creature.Legendary | TgtPrompt$ Select target legendary creature | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ Target legendary creature gets +1/+1 until end of turn.
A:AB$Pump | Cost$ G T | ValidTgts$ Creature.Legendary | TgtPrompt$ Select target legendary creature | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ Target legendary creature gets +1/+1 until end of turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/okina_temple_to_the_grandfathers.jpg
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/280.jpg

View File

@@ -3,7 +3,8 @@ ManaCost:no cost
Types:Legendary Land
Text:no text
K:tap: add B
A:AB$Pump | Cost$ B T | ValidTgts$ Creature.Legendary | TgtPrompt$ Select target legendary creature | KW$Fear | SpellDescription$ Target legendary creature gains fear until end of turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/Shizo_Deaths_Storehouse.jpg
SVar:Picture:http://www.wizards.com/global/images/magic/general/shizo_deaths_storehouse.jpg
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/283.jpg
End

View File

@@ -1211,129 +1211,6 @@ class CardFactory_Lands {
a1.setBeforePayMana(new Input_PayManaCost_Ability(a1.getManaCost(), paid1));
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Shizo, Death's Storehouse")) {
final SpellAbility[] a2 = new SpellAbility[1];
final Command eot2 = new Command() {
private static final long serialVersionUID = 6180724472470740160L;
public void execute() {
Card c = a2[0].getTargetCard();
if(AllZone.GameAction.isCardInPlay(c)) {
c.removeIntrinsicKeyword("Fear");
}
}
};
a2[0] = new Ability_Tap(card, "B") {
private static final long serialVersionUID = 3561450520225198222L;
@Override
public boolean canPlayAI() {
return getLegendaryAttackers().size() > 0 && super.canPlayAI();
}
@Override
public void chooseTargetAI() {
setTargetCard(getAttacker());
}
public CardList getLegendaryAttackers() {
Combat c = ComputerUtil.getAttackers();
CardList att = new CardList(c.getAttackers());
// Shizo can only target Legendary, don't target creatures that already have Fear
att = att.filter(new CardListFilter() {
public boolean addCard(Card c) {
return CardFactoryUtil.canTarget(card, c) && c.getType().contains("Legendary")
&& !c.getIntrinsicKeyword().contains("Fear");
}
});
att.remove(card);
return att;
}
public Card getAttacker() {
//target creature that is going to attack
CardList att = getLegendaryAttackers();
if (att.size() == 0) return null;
att.shuffle();
return att.get(0);
}//getAttacker()
@Override
public void resolve() {
Card c = a2[0].getTargetCard();
if (AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) {
if(!c.getIntrinsicKeyword().contains("Fear")) c.addIntrinsicKeyword("Fear");
AllZone.EndOfTurn.addUntil(eot2);
}
}//resolve()
};//SpellAbility
card.addSpellAbility(a2[0]);
a2[0].setDescription("B, tap: Target legendary creature gains fear until end of turn.");
Input target = new Input() {
private static final long serialVersionUID = 1032601702189887609L;
@Override
public void showMessage() {
PlayerZone comp = AllZone.getZone(Constant.Zone.Battlefield, AllZone.ComputerPlayer);
PlayerZone hum = AllZone.getZone(Constant.Zone.Battlefield, AllZone.HumanPlayer);
CardList legendaryCreats = new CardList();
legendaryCreats.addAll(comp.getCards());
legendaryCreats.addAll(hum.getCards());
legendaryCreats = legendaryCreats.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isCreature()
&& c.getType().contains("Legendary")
&& CardFactoryUtil.canTarget(card, c);
}
});
stopSetNext(CardFactoryUtil.input_targetSpecific(a2[0], legendaryCreats, "Select target legendary creature", true, false));
}//showMessage()
};//Input target
a2[0].setBeforePayMana(target);
/* This input allows the human to target any legendary card, creature or not!
@SuppressWarnings("unused")
// target unused
final Input target = new Input() {
private static final long serialVersionUID = 8913477363141356082L;
@Override
public void showMessage() {
ButtonUtil.enableOnlyCancel();
AllZone.Display.showMessage("Select legendary creature to get fear");
}
@Override
public void selectCard(Card c, PlayerZone zone) {
if(!CardFactoryUtil.canTarget(card, c)) {
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
} else if(c.isCreature() && c.getType().contains("Legendary")) {
card.tap();
AllZone.Human_Play.updateObservers();
a2[0].setTargetCard(c);//since setTargetCard() changes stack description
a2[0].setStackDescription(c + " gets fear until EOT");
AllZone.InputControl.resetInput();
AllZone.Stack.add(a2[0]);
}
}//selectCard()
@Override
public void selectButtonCancel() {
card.untap();
stop();
}
};//Input target
a2[0].setBeforePayMana(CardFactoryUtil.input_targetType(a2[0], "Legendary"));
*/
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Novijen, Heart of Progress")) {
@@ -1376,260 +1253,6 @@ class CardFactory_Lands {
//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Goblin Burrows")) {
final SpellAbility[] a2 = new SpellAbility[1];
final Command eot2 = new Command() {
private static final long serialVersionUID = 6180724472470740160L;
public void execute() {
Card c = a2[0].getTargetCard();
if(AllZone.GameAction.isCardInPlay(c)) {
c.addTempAttackBoost(-2);
}
}
};
a2[0] = new Ability_Tap(card, "1 R") {
private static final long serialVersionUID = 3561450520225198222L;
@Override
public boolean canPlayAI() {
return getAttacker() != null && super.canPlayAI();
}
@Override
public void chooseTargetAI() {
setTargetCard(getAttacker());
}
/*
* getAttacker() will now filter out non-Goblins and non-Changelings
*/
public Card getAttacker() {
//target creature that is going to attack
Combat attackers = ComputerUtil.getAttackers();
CardList list = new CardList(attackers.getAttackers());
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return CardFactoryUtil.canTarget(card, c) &&
(c.getType().contains("Goblin") || c.getKeyword().contains("Changeling"));
}
});
list.remove(card);
list.shuffle();
if(list.size() != 0) return list.get(0);
else return null;
}//getAttacker()
@Override
public void resolve() {
Card c = a2[0].getTargetCard();
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) {
c.addTempAttackBoost(2);
AllZone.EndOfTurn.addUntil(eot2);
}
}//resolve()
};//SpellAbility
card.addSpellAbility(a2[0]);
a2[0].setDescription("1 R, tap: Target Goblin gets +2/+0 until end of turn.");
/*
@SuppressWarnings("unused")
// target unused
final Input target = new Input() {
private static final long serialVersionUID = 8913477363141356082L;
@Override
public void showMessage() {
ButtonUtil.enableOnlyCancel();
AllZone.Display.showMessage("Select Goblin to get +2/+0");
}
@Override
public void selectCard(Card c, PlayerZone zone) {
if(!CardFactoryUtil.canTarget(card, c)) {
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
} else if(c.isCreature() && (c.getType().contains("Goblin") || c.getKeyword().contains("Changeling") )) {
card.tap();
AllZone.Human_Play.updateObservers();
a2[0].setTargetCard(c);//since setTargetCard() changes stack description
a2[0].setStackDescription(c + " gets +2/+0 until EOT");
AllZone.InputControl.resetInput();
AllZone.Stack.add(a2[0]);
}
}//selectCard()
@Override
public void selectButtonCancel() {
card.untap();
stop();
}
};//Input target
*/
/*
* This input method will allow the human to select both Goblins and Changelings
*/
Input runtime = new Input() {
private static final long serialVersionUID = 8320178628066517937L;
@Override
public void showMessage() {
PlayerZone comp = AllZone.getZone(Constant.Zone.Battlefield, AllZone.ComputerPlayer);
PlayerZone hum = AllZone.getZone(Constant.Zone.Battlefield, AllZone.HumanPlayer);
CardList creatures = new CardList();
creatures.addAll(comp.getCards());
creatures.addAll(hum.getCards());
creatures = creatures.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isCreature() && CardFactoryUtil.canTarget(card, c) &&
(c.getType().contains("Goblin") || c.getKeyword().contains("Changeling"));
}
});
stopSetNext(CardFactoryUtil.input_targetSpecific(a2[0], creatures, "Select target Goblin", true, false));
}
};//Input target
a2[0].setBeforePayMana(runtime);
// a2[0].setBeforePayMana(CardFactoryUtil.input_targetType(a2[0], "Goblin"));
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Daru Encampment")) {
final SpellAbility[] a2 = new SpellAbility[1];
final Command eot2 = new Command() {
private static final long serialVersionUID = 6180724472470740160L;
public void execute() {
Card c = a2[0].getTargetCard();
if(AllZone.GameAction.isCardInPlay(c)) {
c.addTempAttackBoost(-1);
c.addTempDefenseBoost(-1);
}
}
};
a2[0] = new Ability_Tap(card, "W") {
private static final long serialVersionUID = 3561450520225198222L;
@Override
public boolean canPlayAI() {
return getAttacker() != null && super.canPlayAI();
}
@Override
public void chooseTargetAI() {
setTargetCard(getAttacker());
}
/*
* getAttacker() will now filter out non-Soldiers and non-Changelings
*/
public Card getAttacker() {
//target creature that is going to attack
Combat attackers = ComputerUtil.getAttackers();
CardList list = new CardList(attackers.getAttackers());
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return CardFactoryUtil.canTarget(card, c) &&
(c.getType().contains("Soldier") || c.getKeyword().contains("Changeling"));
}
});
list.remove(card);
list.shuffle();
if(list.size() != 0) return list.get(0);
else return null;
}//getAttacker()
@Override
public void resolve() {
Card c = a2[0].getTargetCard();
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) {
c.addTempAttackBoost(1);
c.addTempDefenseBoost(1);
AllZone.EndOfTurn.addUntil(eot2);
}
}//resolve()
};//SpellAbility
card.addSpellAbility(a2[0]);
a2[0].setDescription("W, tap: Target Soldier gets +1/+1 until end of turn.");
/*
@SuppressWarnings("unused")
// target unused
final Input target = new Input() {
private static final long serialVersionUID = 8913477363141356082L;
@Override
public void showMessage() {
ButtonUtil.enableOnlyCancel();
AllZone.Display.showMessage("Select Soldier to get +1/+1");
}
@Override
public void selectCard(Card c, PlayerZone zone) {
if(!CardFactoryUtil.canTarget(card, c)) {
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
} else if(c.isCreature() && (c.getType().contains("Soldier") || c.getKeyword().contains("Changeling") ) ) {
card.tap();
AllZone.Human_Play.updateObservers();
a2[0].setTargetCard(c);//since setTargetCard() changes stack description
a2[0].setStackDescription(c + " gets +1/+1 until EOT");
AllZone.InputControl.resetInput();
AllZone.Stack.add(a2[0]);
}
}//selectCard()
@Override
public void selectButtonCancel() {
card.untap();
stop();
}
};//Input target
*/
/*
* This input method will allow the human to select both Soldiers and Changelings
*/
Input runtime = new Input() {
private static final long serialVersionUID = 8320178628066517937L;
@Override
public void showMessage() {
PlayerZone comp = AllZone.getZone(Constant.Zone.Battlefield, AllZone.ComputerPlayer);
PlayerZone hum = AllZone.getZone(Constant.Zone.Battlefield, AllZone.HumanPlayer);
CardList creatures = new CardList();
creatures.addAll(comp.getCards());
creatures.addAll(hum.getCards());
creatures = creatures.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isCreature() && CardFactoryUtil.canTarget(card, c) &&
(c.getType().contains("Soldier") || c.getKeyword().contains("Changeling"));
}
});
stopSetNext(CardFactoryUtil.input_targetSpecific(a2[0], creatures, "Select target Soldier", true, false));
}
};//Input target
a2[0].setBeforePayMana(runtime);
// a2[0].setBeforePayMana(CardFactoryUtil.input_targetType(a2[0], "Soldier"));
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Duskmantle, House of Shadow")) {
card.clearSpellKeepManaAbility();