convert Okina, Temple to the Grandfathers to AF_Pump.

This commit is contained in:
jendave
2011-08-06 13:44:55 +00:00
parent 9dd5005745
commit 0e32a7ce64
2 changed files with 2 additions and 269 deletions

View File

@@ -3,6 +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.
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

@@ -968,275 +968,7 @@ class CardFactory_Lands {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Okina, Temple to the Grandfathers")) {
final Ability_Tap ability = new Ability_Tap(card, "G") {
private static final long serialVersionUID = 8154776336533992188L;
@Override
public boolean canPlayAI() {
return getAttacker() != null && super.canPlayAI();
}
@Override
public void chooseTargetAI() {
setTargetCard(getAttacker());
}
public Card getAttacker() {
//target creature that is going to attack
Combat c = ComputerUtil.getAttackers();
CardList att = new CardList();
att.addAll(c.getAttackers());
for(int i = 0; i < att.size(); i++) {
Card crd = att.get(i);
if(crd.getType().contains("Legendary")) return crd;
}
return null;
}//getAttacker()
@Override
public void resolve() {
final Card[] target = new Card[1];
final Command untilEOT = new Command() {
private static final long serialVersionUID = 6362813153010836856L;
public void execute() {
if(AllZone.GameAction.isCardInPlay(target[0])) {
target[0].addTempAttackBoost(-1);
target[0].addTempDefenseBoost(-1);
}
}
};
target[0] = getTargetCard();
if(AllZone.GameAction.isCardInPlay(target[0]) && target[0].getType().contains("Legendary")
&& CardFactoryUtil.canTarget(card, target[0])) {
target[0].addTempAttackBoost(1);
target[0].addTempDefenseBoost(1);
AllZone.EndOfTurn.addUntil(untilEOT);
}
}
};
Input runtime = new Input() {
private static final long serialVersionUID = 6126636768830864856L;
@Override
public void showMessage() {
CardList choice = new CardList();
choice.addAll(AllZone.Human_Battlefield.getCards());
choice.addAll(AllZone.Computer_Battlefield.getCards());
choice = choice.getType("Creature");
choice = choice.filter(new CardListFilter() {
public boolean addCard(Card c) {
return (c.getType().contains("Legendary"));
}
});
//System.out.println("size of choice: " + choice.size());
stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice,
"Select target legendary Creature:", true, false));
}
};
ability.setDescription("G, tap: Target legendary creature gets +1/+1 until end of turn.");
StringBuilder sb = new StringBuilder();
sb.append(card.getName()).append(" - gives target legendary creature +1/+1 until end of turn.");
ability.setStackDescription(sb.toString());
card.addSpellAbility(ability);
ability.setBeforePayMana(runtime);
}//*************** END ************ END **************************
/*
//*************** START *********** START **************************
else if(cardName.equals("Academy Ruins")) {
final Ability_Tap ability = new Ability_Tap(card, "1 U") {
private static final long serialVersionUID = -1322368528417127121L;
@Override
public void resolve() {
Player player = card.getController();
if(player.equals(AllZone.HumanPlayer)) humanResolve();
else computerResolve();
}
public void humanResolve() {
CardList cards = new CardList(AllZone.Human_Graveyard.getCards());
CardList list = new CardList();
for(int i = 0; i < cards.size(); i++) {
//System.out.println("type: " +cards.get(i).getType());
if(cards.get(i).getType().contains("Artifact")) {
//System.out.println(cards.get(i).getName());
Card c = cards.get(i);
list.add(c);
}
}
if(list.size() != 0) {
Object check = AllZone.Display.getChoiceOptional("Select Artifact", list.toArray());
if(check != null) {
//PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController());
//library.add((Card)check, 0);
AllZone.GameAction.moveToTopOfLibrary((Card) check);
}
}
}
public void computerResolve() {
Card[] grave = AllZone.Computer_Graveyard.getCards();
CardList list = new CardList(grave);
CardList arts = new CardList();
for(int i = 0; i < list.size(); i++) {
if(list.get(i).getType().contains("Artifact")) {
Card k = list.get(i);
arts.add(k);
}
}
//pick best artifact
if(arts.size() != 0) {
Card c = CardFactoryUtil.AI_getBestArtifact(list);
if(c == null) c = grave[0];
Log.debug("Academy Ruins", "computer picked - " + c);
AllZone.Computer_Graveyard.remove(c);
AllZone.Computer_Library.add(c, 0);
}
}//computerResolve
@Override
public boolean canPlay() {
Player controller = card.getController();
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, controller);
CardList list = new CardList(grave.getCards());
CardList cards = new CardList();
for(int i = 0; i < list.size(); i++) {
if(list.get(i).getType().contains("Artifact")) {
cards.add(list.get(i));
}
}
if(cards.size() > 0 && AllZone.GameAction.isCardInPlay(card) && card.isUntapped()) return true;
else return false;
}
};
ability.setDescription("1 U, tap: Put target artifact card in your graveyard on top of your library.");
StringBuilder sb = new StringBuilder();
sb.append(card.getName()).append(" - put artifact card in your graveyard on top of your library.");
ability.setStackDescription(sb.toString());
card.addSpellAbility(ability);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Volrath's Stronghold")) {
final Ability_Tap ability = new Ability_Tap(card, "1 B") {
private static final long serialVersionUID = 2821525387844776907L;
@Override
public void resolve() {
Player player = card.getController();
if(player.equals(AllZone.HumanPlayer)) humanResolve();
else computerResolve();
}
public void humanResolve() {
CardList cards = new CardList(AllZone.Human_Graveyard.getCards());
CardList list = new CardList();
for(int i = 0; i < cards.size(); i++) {
//System.out.println("type: " +cards.get(i).getType());
if(cards.get(i).getType().contains("Creature")) {
//System.out.println(cards.get(i).getName());
Card c = cards.get(i);
list.add(c);
}
}
if(list.size() != 0) {
Object check = AllZone.Display.getChoiceOptional("Select Creature", list.toArray());
if(check != null) {
//PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController());
//library.add((Card)check, 0);
AllZone.GameAction.moveToTopOfLibrary((Card) check);
}
}
}
public void computerResolve() {
Card[] grave = AllZone.Computer_Graveyard.getCards();
CardList list = new CardList(grave);
CardList creats = new CardList();
for(int i = 0; i < list.size(); i++) {
if(list.get(i).getType().contains("Creature")) {
Card k = list.get(i);
creats.add(k);
}
}
//pick best artifact
if(creats.size() != 0) {
Card c = CardFactoryUtil.AI_getBestCreature(list);
if(c == null) c = grave[0];
//System.out.println("computer picked - " +c);
AllZone.Computer_Graveyard.remove(c);
//AllZone.Computer_Library.add(c, 0);
AllZone.GameAction.moveToTopOfLibrary(c);
}
}//computerResolve
@Override
public boolean canPlay() {
Player controller = card.getController();
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, controller);
CardList list = new CardList(grave.getCards());
CardList cards = new CardList();
for(int i = 0; i < list.size(); i++) {
if(list.get(i).getType().contains("Creature")) {
cards.add(list.get(i));
}
}
if(super.canPlay() && cards.size() > 0 && AllZone.GameAction.isCardInPlay(card)
&& card.isUntapped()) return true;
else return false;
}
};
ability.setDescription("1 B, tap: Put target creature card in your graveyard on top of your library.");
StringBuilder sb = new StringBuilder();
sb.append(card.getName()).append(" - put creature card in your graveyard on top of your library.");
ability.setStackDescription(sb.toString());
card.addSpellAbility(ability);
}//*************** END ************ END **************************
*/
//*************** START *********** START **************************
else if(cardName.equals("Oboro, Palace in the Clouds")) {
final Ability ability = new Ability(card, "1") {