Fecundity was converted to triggers. The hard-coded stuff was never removed or commented. Now, it is removed.

This commit is contained in:
jendave
2011-08-06 20:44:35 +00:00
parent 82eb530c25
commit f37ffe5412
2 changed files with 0 additions and 51 deletions

View File

@@ -2064,22 +2064,7 @@ public class GameAction {
// Destroy needs to be called with Last Known Information // Destroy needs to be called with Last Known Information
c.destroy(); c.destroy();
//destroy card effects:
CardList list = AllZoneUtil.getCardsInPlay();
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
ArrayList<String> keywords = c.getKeyword();
for(String kw:keywords) {
if(kw.startsWith("Whenever ") && kw.contains(" put into")
&& kw.contains("graveyard from the battlefield,")) return true;
}
return false;
}
});
checkWheneverKeyword(c, "PermanentIntoGraveyard",null); checkWheneverKeyword(c, "PermanentIntoGraveyard",null);
for(int i = 0; i < list.size(); i++)
GameActionUtil.executeDestroyCardEffects(list.get(i), c);
if(persist) { if(persist) {
final Card persistCard = newCard; final Card persistCard = newCard;

View File

@@ -1943,10 +1943,6 @@ public class GameActionUtil {
AllZone.GameInfo.setResolvedFirstStrikeDamageThisCombat(false); AllZone.GameInfo.setResolvedFirstStrikeDamageThisCombat(false);
} }
public static void executeDestroyCardEffects(Card c, Card destroyed) {
if(destroyed.isCreature()) executeDestroyCreatureCardEffects(c, destroyed);
}
public static boolean showYesNoDialog(Card c, String question) { public static boolean showYesNoDialog(Card c, String question) {
AllZone.Display.setCard(c); AllZone.Display.setCard(c);
StringBuilder title = new StringBuilder(); StringBuilder title = new StringBuilder();
@@ -1987,38 +1983,6 @@ public class GameActionUtil {
} }
} }
//***CREATURES START HERE***
public static void executeDestroyCreatureCardEffects(Card c, Card destroyed) {
if (c.getName().equals("Fecundity")) destroyCreature_Fecundity(c, destroyed);
}
//***
private static void destroyCreature_Fecundity(Card c, Card destroyed) {
final Card crd = destroyed;
final Card crd2 = c;
Ability ability = new Ability(c, "0") {
@Override
public void resolve() {
Player player = crd.getController();
if (player.isHuman()) {
String question = "Draw a card?";
if (showYesNoDialog(crd2, question)) player.drawCard();
} else player.drawCard(); //computer
}
};
StringBuilder sb = new StringBuilder();
sb.append("Fecundity - ").append(destroyed.getController()).append(" may draw a card.");
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);
}
//***CREATURES END HERE***
public static void executeLandfallEffects(Card c) { public static void executeLandfallEffects(Card c) {
if(c.getName().equals("Lotus Cobra")) landfall_Lotus_Cobra(c); if(c.getName().equals("Lotus Cobra")) landfall_Lotus_Cobra(c);
} }