mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Aftermath: now a property of SpellAbility the Game now knows to exile the card even if it got countered.
This commit is contained in:
@@ -3536,15 +3536,9 @@ public class CardFactoryUtil {
|
||||
|
||||
// only target RightSplit of it
|
||||
final SpellAbility origSA = card.getState(CardStateName.RightSplit).getFirstAbility();
|
||||
origSA.setAftermath(true);
|
||||
origSA.getRestrictions().setZone(ZoneType.Graveyard);
|
||||
|
||||
// Add the Exile Self Part
|
||||
String dbStr = "DB$ ChangeZone | Origin$ Stack | Destination$ Exile";
|
||||
|
||||
final AbilitySub newSA = (AbilitySub) AbilityFactory.getAbility(dbStr.toString(), card);
|
||||
|
||||
// append to original SA
|
||||
origSA.appendSubAbility(newSA);
|
||||
// The Exile part is done by the System itself
|
||||
} else if (keyword.startsWith("Awaken")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final String counters = k[1];
|
||||
|
||||
@@ -97,6 +97,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
private List<Object> triggerRemembered = Lists.newArrayList();
|
||||
|
||||
private boolean flashBackAbility = false;
|
||||
private boolean aftermath = false;
|
||||
private boolean cycling = false;
|
||||
private boolean delve = false;
|
||||
private boolean dash = false;
|
||||
@@ -736,6 +737,20 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
return flashBackAbility;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the aftermath
|
||||
*/
|
||||
public boolean isAftermath() {
|
||||
return aftermath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aftermath the aftermath to set
|
||||
*/
|
||||
public void setAftermath(boolean aftermath) {
|
||||
this.aftermath = aftermath;
|
||||
}
|
||||
|
||||
public boolean isOutlast() {
|
||||
return outlast;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
}
|
||||
|
||||
// TODO: this is an exception for Aftermath. Needs to be somehow generalized.
|
||||
if (this.getZone() != ZoneType.Graveyard && sa.getHostCard().hasKeyword("Aftermath") && sa.isRightSplit()) {
|
||||
if (this.getZone() != ZoneType.Graveyard && sa.isAftermath() && sa.isRightSplit()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -583,6 +583,9 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
game.getAction().exile(source);
|
||||
sa.setFlashBackAbility(false);
|
||||
}
|
||||
else if (sa.isAftermath()) {
|
||||
game.getAction().exile(source);
|
||||
}
|
||||
else if (source.hasKeyword("Rebound")
|
||||
&& !fizzle
|
||||
&& source.getCastFrom() == ZoneType.Hand
|
||||
|
||||
Reference in New Issue
Block a user