mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38: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
|
// only target RightSplit of it
|
||||||
final SpellAbility origSA = card.getState(CardStateName.RightSplit).getFirstAbility();
|
final SpellAbility origSA = card.getState(CardStateName.RightSplit).getFirstAbility();
|
||||||
|
origSA.setAftermath(true);
|
||||||
origSA.getRestrictions().setZone(ZoneType.Graveyard);
|
origSA.getRestrictions().setZone(ZoneType.Graveyard);
|
||||||
|
// The Exile part is done by the System itself
|
||||||
// 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);
|
|
||||||
} else if (keyword.startsWith("Awaken")) {
|
} else if (keyword.startsWith("Awaken")) {
|
||||||
final String[] k = keyword.split(":");
|
final String[] k = keyword.split(":");
|
||||||
final String counters = k[1];
|
final String counters = k[1];
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
private List<Object> triggerRemembered = Lists.newArrayList();
|
private List<Object> triggerRemembered = Lists.newArrayList();
|
||||||
|
|
||||||
private boolean flashBackAbility = false;
|
private boolean flashBackAbility = false;
|
||||||
|
private boolean aftermath = false;
|
||||||
private boolean cycling = false;
|
private boolean cycling = false;
|
||||||
private boolean delve = false;
|
private boolean delve = false;
|
||||||
private boolean dash = false;
|
private boolean dash = false;
|
||||||
@@ -736,6 +737,20 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
return flashBackAbility;
|
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() {
|
public boolean isOutlast() {
|
||||||
return outlast;
|
return outlast;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this is an exception for Aftermath. Needs to be somehow generalized.
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -583,6 +583,9 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
|||||||
game.getAction().exile(source);
|
game.getAction().exile(source);
|
||||||
sa.setFlashBackAbility(false);
|
sa.setFlashBackAbility(false);
|
||||||
}
|
}
|
||||||
|
else if (sa.isAftermath()) {
|
||||||
|
game.getAction().exile(source);
|
||||||
|
}
|
||||||
else if (source.hasKeyword("Rebound")
|
else if (source.hasKeyword("Rebound")
|
||||||
&& !fizzle
|
&& !fizzle
|
||||||
&& source.getCastFrom() == ZoneType.Hand
|
&& source.getCastFrom() == ZoneType.Hand
|
||||||
|
|||||||
Reference in New Issue
Block a user