- Added Slapshot5's code for Natural Selection, Giant Tortoise.

This commit is contained in:
jendave
2011-08-06 03:57:36 +00:00
parent e12a65a6b9
commit eacdb4a66f
4 changed files with 100 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
natural_selection.jpg http://www.wizards.com/global/images/magic/general/natural_selection.jpg
epic_struggle.jpg http://www.wizards.com/global/images/magic/general/epic_struggle.jpg
reinforcements.jpg http://www.wizards.com/global/images/magic/general/reinforcements.jpg
rampant_growth.jpg http://www.wizards.com/global/images/magic/general/rampant_growth.jpg

View File

@@ -1,3 +1,14 @@
Natural Selection
G
Instant
Look at the top 3 cards of target player's library and put them back in any order. You may have that player shuffle his or her library.
Giant Tortoise
1 U
Creature Turtle
As long as Giant Tortoise is untapped, it gets +0/+3.
1/1
Landbind Ritual
3 W W
Sorcery

View File

@@ -17723,6 +17723,57 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Natural Selection")) {
/* Look at the top 3 cards of target player's library and put them
* back in any order. You may have that player shuffle his or
* her library */
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 8649520296192617609L;
@Override
public void resolve() {
String player = getTargetPlayer();
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
if(lib.size() < 3) return;
CardList topThree = new CardList();
//show top 3 cards:
topThree.add(lib.get(0));
topThree.add(lib.get(1));
topThree.add(lib.get(2));
for(int i = 1; i <= 3; i++) {
String Title = "Put on top: ";
if(i == 2) Title = "Put second from top: ";
if(i == 3) Title = "Put third from top: ";
Object o = AllZone.Display.getChoiceOptional(Title, topThree.toArray());
if(o == null) break;
Card c_1 = (Card) o;
topThree.remove(c_1);
lib.remove(c_1);
lib.add(c_1, i - 1);
}
String[] choices = new String[] {"Yes", "No"};
Object o = AllZone.Display.getChoice("Shuffle target player's library?", choices);
String myChoice = (String) o;
if(myChoice.equals("Yes")) {
AllZone.GameAction.shuffle(getTargetPlayer());
}
}
@Override
public boolean canPlayAI() {
//basically the same reason as Sensei's Diving Top
return false;
}
};//spell
card.clearSpellAbility();
card.addSpellAbility(spell);
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
}
//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found
if(hasKeyword(card, "Cycling") != -1) {

View File

@@ -13627,6 +13627,42 @@ public class GameActionUtil {
}// getRaptor()
}; // Castle Raptors
public static Command Giant_Tortoise = new Command() {
private static final long serialVersionUID = -8191148876633239167L;
CardList old = new CardList();
int pump = 3;
public void execute() {
Card c;
// reset all previous cards stats
for(int i = 0; i < old.size(); i++) {
c = old.get(i);
c.addSemiPermanentDefenseBoost(-pump);
}
old.clear();
CardList list = getCard("Giant Tortoise");
for(int i = 0; i < list.size(); i++) {
c = list.get(i);
// only add boost if card is untapped
if(c.isUntapped()) {
c.addSemiPermanentDefenseBoost(pump);
old.add(c);
}
}// for
}// execute()
CardList getCard(String name) {
CardList list = new CardList();
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName(name);
return list;
}// getCard()
}; // Giant_Tortoise
public static Command Radiant_Archangel = new Command() {
private static final long serialVersionUID = -7086544305058527889L;
@@ -15082,6 +15118,7 @@ public class GameActionUtil {
commands.put("Radiant_Archangel", Radiant_Archangel);
commands.put("Castle", Castle);
commands.put("Castle_Raptors", Castle_Raptors);
commands.put("Giant_Tortoise", Giant_Tortoise);
commands.put("Darksteel_Forge", Darksteel_Forge);
commands.put("Levitation", Levitation);