mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Added slapshot5's Ivory Tower, Ali from Cairo, Reprisal code.
- Fixed Rathi Trapper mana text.
This commit is contained in:
@@ -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
|
||||
X B R G
|
||||
Sorcery
|
||||
|
||||
@@ -17565,6 +17565,42 @@ public class CardFactory implements NewConstants {
|
||||
}
|
||||
//*************** 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
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(hasKeyword(card, "Cycling") != -1) {
|
||||
|
||||
@@ -9148,7 +9148,7 @@ public class CardFactory_Creatures {
|
||||
}
|
||||
};//SpellAbility
|
||||
card.addSpellAbility(ability);
|
||||
ability.setDescription("W, tap: Tap target creature.");
|
||||
ability.setDescription("B, tap: Tap target creature.");
|
||||
ability.setBeforePayMana(CardFactoryUtil.input_targetCreature(ability));
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
@@ -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() {
|
||||
// System.out.println("checking !!!");
|
||||
// RuntimeException run = new RuntimeException();
|
||||
@@ -366,6 +378,12 @@ public class GameAction {
|
||||
|
||||
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) {
|
||||
Constant.Runtime.WinLose.addWin();
|
||||
stop = true;
|
||||
|
||||
@@ -85,6 +85,7 @@ public class GameActionUtil {
|
||||
upkeep_Blaze_Counters();
|
||||
upkeep_Dark_Confidant(); // keep this one semi-last
|
||||
|
||||
upkeep_Ivory_Tower();
|
||||
upkeep_BlackVice(); // keep this one last, since it happens at the end
|
||||
// of the upkeep.
|
||||
upkeep_Howling_Mine(); // keep this one even laster, since it would
|
||||
@@ -5680,6 +5681,32 @@ public class GameActionUtil {
|
||||
}// for
|
||||
}// 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
|
||||
// upkeep in MTG forge.
|
||||
// So Black Vise's effects happen at the beginning of the upkeep instead of
|
||||
|
||||
Reference in New Issue
Block a user