mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28: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
|
// 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;
|
||||||
|
|||||||
@@ -1942,10 +1942,6 @@ public class GameActionUtil {
|
|||||||
AllZone.GameInfo.setAssignedFirstStrikeDamageThisCombat(false);
|
AllZone.GameInfo.setAssignedFirstStrikeDamageThisCombat(false);
|
||||||
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);
|
||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user