mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fecundity was converted to triggers. The hard-coded stuff was never removed or commented. Now, it is removed.
This commit is contained in:
@@ -2064,22 +2064,7 @@ public class GameAction {
|
||||
// Destroy needs to be called with Last Known Information
|
||||
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);
|
||||
for(int i = 0; i < list.size(); i++)
|
||||
GameActionUtil.executeDestroyCardEffects(list.get(i), c);
|
||||
|
||||
if(persist) {
|
||||
final Card persistCard = newCard;
|
||||
|
||||
@@ -1943,10 +1943,6 @@ public class GameActionUtil {
|
||||
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) {
|
||||
AllZone.Display.setCard(c);
|
||||
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) {
|
||||
if(c.getName().equals("Lotus Cobra")) landfall_Lotus_Cobra(c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user