- Added slapshot5's Ivory Tower, Ali from Cairo, Reprisal code.

- Fixed Rathi Trapper mana text.
This commit is contained in:
jendave
2011-08-06 03:38:25 +00:00
parent d9c3595929
commit 7542f8d8fb
6 changed files with 99 additions and 2 deletions

View File

@@ -1,3 +1,19 @@
Reprisal
1 W
Instant
Destroy target creature with power 4 or greater. It can't be regenerated.
Ali from Cairo
2 R R
Creature Human
Damage that would reduce your life total to less than 1 reduces it to 1 instead.
0/1
Ivory Tower
1
Artifact
At the beginning of your upkeep, you gain X life, where X is the number of cards in your hand minus four.
Lavalanche Lavalanche
X B R G X B R G
Sorcery Sorcery

View File

@@ -17565,6 +17565,42 @@ public class CardFactory implements NewConstants {
} }
//*************** END ************ END ************************** //*************** END ************ END **************************
//*************** START *********** START **************************
if(cardName.equals("Reprisal")) {
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 8653455310355884536L;
public void resolve() {
if(AllZone.GameAction.isCardInPlay(getTargetCard())) {
AllZone.GameAction.destroy(getTargetCard());
}
}//resolve
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
Input target = new Input() {
private static final long serialVersionUID = 4794354831721082791L;
public void showMessage() {
AllZone.Display.showMessage("Select target Creature to destroy");
ButtonUtil.enableOnlyCancel();
}
public void selectButtonCancel() {
stop();
}
public void selectCard(Card c, PlayerZone zone) {
if(zone.is(Constant.Zone.Play) && c.isCreature() && (c.getNetAttack() > 3)) {
spell.setTargetCard(c);
stopSetNext(new Input_PayManaCost(spell));
}
}
};//input
spell.setBeforePayMana(target);
}//*************** END ************ END **************************
// Cards with Cycling abilities // Cards with Cycling abilities
// -1 means keyword "Cycling" not found // -1 means keyword "Cycling" not found
if(hasKeyword(card, "Cycling") != -1) { if(hasKeyword(card, "Cycling") != -1) {

View File

@@ -9148,7 +9148,7 @@ public class CardFactory_Creatures {
} }
};//SpellAbility };//SpellAbility
card.addSpellAbility(ability); card.addSpellAbility(ability);
ability.setDescription("W, tap: Tap target creature."); ability.setDescription("B, tap: Tap target creature.");
ability.setBeforePayMana(CardFactoryUtil.input_targetCreature(ability)); ability.setBeforePayMana(CardFactoryUtil.input_targetCreature(ability));
}//*************** END ************ END ************************** }//*************** END ************ END **************************

View File

@@ -356,6 +356,18 @@ public class GameAction {
} }
} }
private boolean isAliFromCairoInPlay(PlayerZone zone) {
if( zone == null ) {
return false;
}
else {
CardList all = new CardList();
all.addAll(zone.getCards());
return all.containsName("Ali from Cairo");
}
}
public void checkStateEffects() { public void checkStateEffects() {
// System.out.println("checking !!!"); // System.out.println("checking !!!");
// RuntimeException run = new RuntimeException(); // RuntimeException run = new RuntimeException();
@@ -366,6 +378,12 @@ public class GameAction {
boolean stop = false; boolean stop = false;
if (isAliFromCairoInPlay(AllZone.Computer_Play) && AllZone.Computer_Life.getLife() < 1)
AllZone.Computer_Life.setLife(1);
if (isAliFromCairoInPlay(AllZone.Human_Play) && AllZone.Human_Life.getLife() < 1)
AllZone.Human_Life.setLife(1);
if(AllZone.Computer_Life.getLife() <= 0 || AllZone.Computer_PoisonCounter.getPoisonCounters() >= 10) { if(AllZone.Computer_Life.getLife() <= 0 || AllZone.Computer_PoisonCounter.getPoisonCounters() >= 10) {
Constant.Runtime.WinLose.addWin(); Constant.Runtime.WinLose.addWin();
stop = true; stop = true;

View File

@@ -85,6 +85,7 @@ public class GameActionUtil {
upkeep_Blaze_Counters(); upkeep_Blaze_Counters();
upkeep_Dark_Confidant(); // keep this one semi-last upkeep_Dark_Confidant(); // keep this one semi-last
upkeep_Ivory_Tower();
upkeep_BlackVice(); // keep this one last, since it happens at the end upkeep_BlackVice(); // keep this one last, since it happens at the end
// of the upkeep. // of the upkeep.
upkeep_Howling_Mine(); // keep this one even laster, since it would upkeep_Howling_Mine(); // keep this one even laster, since it would
@@ -5680,6 +5681,32 @@ public class GameActionUtil {
}// for }// for
}// upkeep_Convalescence() }// upkeep_Convalescence()
public static void upkeep_Ivory_Tower() {
final String player = AllZone.Phase.getActivePlayer();
PlayerZone playZone = AllZone.getZone(Constant.Zone.Play,player);
CardList list = new CardList(playZone.getCards());
list = list.getName("Ivory Tower");
Ability ability;
for(int i = 0; i < list.size(); i++) {
ability = new Ability(list.get(i), "0") {
public void resolve() {
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
int numCards = hand.getCards().length;
if( numCards > 4 ) {
AllZone.GameAction.getPlayerLife(player).addLife(numCards-4);
}
}
};//Ability
ability.setStackDescription("Ivory Tower - " +player+ " gains 1 life for each card > 4");
AllZone.Stack.add(ability);
}//for
}//upkeep_Ivory Tower()
// Currently we don't determine the difference between beginning and end of // Currently we don't determine the difference between beginning and end of
// upkeep in MTG forge. // upkeep in MTG forge.
// So Black Vise's effects happen at the beginning of the upkeep instead of // So Black Vise's effects happen at the beginning of the upkeep instead of

View File

@@ -22,7 +22,7 @@ public class Mana_PayCost {
//note that when the cost is displayed it is backward "2/G 2/R 2/B 2/U 2/W" //note that when the cost is displayed it is backward "2/G 2/R 2/B 2/U 2/W"
//so you would have to tap W, then U, then B, then R, then G (order matters) //so you would have to tap W, then U, then B, then R, then G (order matters)
public Mana_PayCost(String manaCost) { public Mana_PayCost(String manaCost) {
manaPart = split(manaCost); manaPart = split(manaCost);
} }
public boolean isNeeded(String mana) { public boolean isNeeded(String mana) {