add the "sacrifice unless" lands from Visions

This commit is contained in:
jendave
2011-08-06 23:17:12 +00:00
parent f852e03ec9
commit 3bdc338dc9
7 changed files with 114 additions and 0 deletions

5
.gitattributes vendored
View File

@@ -1387,6 +1387,7 @@ res/cardsfolder/copper_myr.txt -text svneol=native#text/plain
res/cardsfolder/copper_tablet.txt -text svneol=native#text/plain res/cardsfolder/copper_tablet.txt -text svneol=native#text/plain
res/cardsfolder/copperhorn_scout.txt -text svneol=native#text/plain res/cardsfolder/copperhorn_scout.txt -text svneol=native#text/plain
res/cardsfolder/copperline_gorge.txt -text svneol=native#text/plain res/cardsfolder/copperline_gorge.txt -text svneol=native#text/plain
res/cardsfolder/coral_atoll.txt -text svneol=native#text/plain
res/cardsfolder/coral_eel.txt -text svneol=native#text/plain res/cardsfolder/coral_eel.txt -text svneol=native#text/plain
res/cardsfolder/coral_helm.txt -text svneol=native#text/plain res/cardsfolder/coral_helm.txt -text svneol=native#text/plain
res/cardsfolder/coral_merfolk.txt -text svneol=native#text/plain res/cardsfolder/coral_merfolk.txt -text svneol=native#text/plain
@@ -1857,6 +1858,7 @@ res/cardsfolder/doomsday_specter.txt -text svneol=native#text/plain
res/cardsfolder/door_to_nothingness.txt -text svneol=native#text/plain res/cardsfolder/door_to_nothingness.txt -text svneol=native#text/plain
res/cardsfolder/doran_the_siege_tower.txt -text svneol=native#text/plain res/cardsfolder/doran_the_siege_tower.txt -text svneol=native#text/plain
res/cardsfolder/dormant_gomazoa.txt svneol=native#text/plain res/cardsfolder/dormant_gomazoa.txt svneol=native#text/plain
res/cardsfolder/dormant_volcano.txt -text svneol=native#text/plain
res/cardsfolder/dosans_oldest_chant.txt -text svneol=native#text/plain res/cardsfolder/dosans_oldest_chant.txt -text svneol=native#text/plain
res/cardsfolder/double_cleave.txt -text svneol=native#text/plain res/cardsfolder/double_cleave.txt -text svneol=native#text/plain
res/cardsfolder/doubling_season.txt -text svneol=native#text/plain res/cardsfolder/doubling_season.txt -text svneol=native#text/plain
@@ -2213,6 +2215,7 @@ res/cardsfolder/evasive_action.txt -text svneol=native#text/plain
res/cardsfolder/even_the_odds.txt svneol=native#text/plain res/cardsfolder/even_the_odds.txt svneol=native#text/plain
res/cardsfolder/everbark_shaman.txt svneol=native#text/plain res/cardsfolder/everbark_shaman.txt svneol=native#text/plain
res/cardsfolder/everflowing_chalice.txt -text svneol=native#text/plain res/cardsfolder/everflowing_chalice.txt -text svneol=native#text/plain
res/cardsfolder/everglades.txt -text svneol=native#text/plain
res/cardsfolder/evil_eye_of_orms_by_gore.txt -text svneol=native#text/plain res/cardsfolder/evil_eye_of_orms_by_gore.txt -text svneol=native#text/plain
res/cardsfolder/evil_eye_of_urborg.txt -text svneol=native#text/plain res/cardsfolder/evil_eye_of_urborg.txt -text svneol=native#text/plain
res/cardsfolder/evil_presence.txt -text svneol=native#text/plain res/cardsfolder/evil_presence.txt -text svneol=native#text/plain
@@ -3598,6 +3601,7 @@ res/cardsfolder/jund_hackblade.txt -text svneol=native#text/plain
res/cardsfolder/jund_panorama.txt -text svneol=native#text/plain res/cardsfolder/jund_panorama.txt -text svneol=native#text/plain
res/cardsfolder/jund_sojourners.txt svneol=native#text/plain res/cardsfolder/jund_sojourners.txt svneol=native#text/plain
res/cardsfolder/jungle_barrier.txt -text svneol=native#text/plain res/cardsfolder/jungle_barrier.txt -text svneol=native#text/plain
res/cardsfolder/jungle_basin.txt -text svneol=native#text/plain
res/cardsfolder/jungle_lion.txt -text svneol=native#text/plain res/cardsfolder/jungle_lion.txt -text svneol=native#text/plain
res/cardsfolder/jungle_patrol.txt svneol=native#text/plain res/cardsfolder/jungle_patrol.txt svneol=native#text/plain
res/cardsfolder/jungle_shrine.txt -text svneol=native#text/plain res/cardsfolder/jungle_shrine.txt -text svneol=native#text/plain
@@ -3650,6 +3654,7 @@ res/cardsfolder/karma.txt -text svneol=native#text/plain
res/cardsfolder/karmic_guide.txt -text svneol=native#text/plain res/cardsfolder/karmic_guide.txt -text svneol=native#text/plain
res/cardsfolder/karn_silver_golem.txt -text svneol=native#text/plain res/cardsfolder/karn_silver_golem.txt -text svneol=native#text/plain
res/cardsfolder/karns_touch.txt svneol=native#text/plain res/cardsfolder/karns_touch.txt svneol=native#text/plain
res/cardsfolder/karoo.txt -text svneol=native#text/plain
res/cardsfolder/karoo_meerkat.txt -text svneol=native#text/plain res/cardsfolder/karoo_meerkat.txt -text svneol=native#text/plain
res/cardsfolder/karplusan_forest.txt -text svneol=native#text/plain res/cardsfolder/karplusan_forest.txt -text svneol=native#text/plain
res/cardsfolder/karplusan_giant.txt -text svneol=native#text/plain res/cardsfolder/karplusan_giant.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:Coral Atoll
ManaCost:no cost
Types:Land
Text:When CARDNAME enters the battlefield, sacrifice it unless you return an untapped Island you control to its owner's hand.
K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ 1 U | SpellDescription$ Add 1 U to your mana pool.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/coral_atoll.jpg
End

View File

@@ -0,0 +1,9 @@
Name:Dormant Volcano
ManaCost:no cost
Types:Land
Text:When CARDNAME enters the battlefield, sacrifice it unless you return an untapped Mountain you control to its owner's hand.
K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ 1 R | SpellDescription$ Add 1 R to your mana pool.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dormant_volcano.jpg
End

View File

@@ -0,0 +1,9 @@
Name:Everglades
ManaCost:no cost
Types:Land
Text:When CARDNAME enters the battlefield, sacrifice it unless you return an untapped Swamp you control to its owner's hand.
K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ 1 B | SpellDescription$ Add 1 B to your mana pool.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/everglades.jpg
End

View File

@@ -0,0 +1,9 @@
Name:Jungle Basin
ManaCost:no cost
Types:Land
Text:When CARDNAME enters the battlefield, sacrifice it unless you return an untapped Forest you control to its owner's hand.
K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ 1 G | SpellDescription$ Add 1 G to your mana pool.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/jungle_basin.jpg
End

View File

@@ -0,0 +1,9 @@
Name:Karoo
ManaCost:no cost
Types:Land
Text:When CARDNAME enters the battlefield, sacrifice it unless you return an untapped Plains you control to its owner's hand.
K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ 1 W | SpellDescription$ Add 1 W to your mana pool.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/karoo.jpg
End

View File

@@ -830,6 +830,70 @@ class CardFactory_Lands {
card.addComesIntoPlayCommand(comesIntoPlay); card.addComesIntoPlayCommand(comesIntoPlay);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Coral Atoll") || cardName.equals("Dormant Volcano")
|| cardName.equals("Evergaldes") || cardName.equals("Jungle Basin")
|| cardName.equals("Karoo")) {
final String[] type = new String[1];
if(cardName.equals("Coral Atoll")) type[0] = "Island";
else if(cardName.equals("Dormant Volcano")) type[0] = "Mountain";
else if(cardName.equals("Everglades")) type[0] = "Swamp";
else if(cardName.equals("Jungle Basin")) type[0] = "Forest";
else if(cardName.equals("Karoo")) type[0] = "Plains";
final SpellAbility sacOrNo = new Ability(card, "") {
@Override
public void resolve() {
final Player player = card.getController();
final CardList land = AllZoneUtil.getPlayerCardsInPlay(player).getValidCards(type[0]+".untapped", player, card);
if( player.equals(AllZone.ComputerPlayer)) {
if( land.size() > 0 ) {
Card c = CardFactoryUtil.getWorstLand(land);
AllZone.GameAction.moveToHand(c);
}
else {
AllZone.GameAction.sacrifice(card);
}
}
else { //this is the human resolution
Input target = new Input() {
private static final long serialVersionUID = -7886610643693087790L;
public void showMessage() {
AllZone.Display.showMessage(card+" - Select one untapped "+type[0]+" to return");
ButtonUtil.enableOnlyCancel();
}
public void selectButtonCancel() {
AllZone.GameAction.sacrifice(card);
stop();
}
public void selectCard(Card c, PlayerZone zone) {
if(zone.is(Constant.Zone.Battlefield) && land.contains(c)) {
AllZone.GameAction.moveToHand(c);
stop();
}
}//selectCard()
};//Input
AllZone.InputControl.setInput(target);
}
}
};
sacOrNo.setStackDescription("When CARDNAME enters the battlefield, sacrifice it unless you return an untapped "+type[0]+" you control to its owner's hand.");
final Command comesIntoPlay = new Command() {
private static final long serialVersionUID = -5777499632266148456L;
public void execute() {
AllZone.Stack.add(sacOrNo);
}
};
card.addComesIntoPlayCommand(comesIntoPlay);
}//*************** END ************ END **************************
return card; return card;
} }