mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Fix Catastrophe allowing regeneration on land choice for creatures
This commit is contained in:
committed by
Hans Mackowiak
parent
45ef20e765
commit
0a474c955a
@@ -42,7 +42,7 @@ public class DestroyAllEffect extends SpellAbilityEffect {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void resolve(SpellAbility sa) {
|
public void resolve(SpellAbility sa) {
|
||||||
final boolean noRegen = sa.hasParam("NoRegen");
|
boolean noRegen = sa.hasParam("NoRegen");
|
||||||
final Card card = sa.getHostCard();
|
final Card card = sa.getHostCard();
|
||||||
final boolean isOptional = sa.hasParam("Optional");
|
final boolean isOptional = sa.hasParam("Optional");
|
||||||
final Game game = sa.getActivatingPlayer().getGame();
|
final Game game = sa.getActivatingPlayer().getGame();
|
||||||
@@ -90,6 +90,9 @@ public class DestroyAllEffect extends SpellAbilityEffect {
|
|||||||
CardZoneTable zoneMovements = AbilityKey.addCardZoneTableParams(params, sa);
|
CardZoneTable zoneMovements = AbilityKey.addCardZoneTableParams(params, sa);
|
||||||
|
|
||||||
for (Card c : list) {
|
for (Card c : list) {
|
||||||
|
if (sa.hasParam("NoRegenValid")) {
|
||||||
|
noRegen = c.isValid(sa.getParam("NoRegenValid"), sa.getActivatingPlayer(), card, sa);
|
||||||
|
}
|
||||||
if (game.getAction().destroy(c, sa, !noRegen, params) && remDestroyed) {
|
if (game.getAction().destroy(c, sa, !noRegen, params) && remDestroyed) {
|
||||||
card.addRemembered(zoneMovements.getLastStateBattlefield().get(c));
|
card.addRemembered(zoneMovements.getLastStateBattlefield().get(c));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ Name:Catastrophe
|
|||||||
ManaCost:4 W W
|
ManaCost:4 W W
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ GenericChoice | Choices$ DBKillLand,DBKillCreatures | Defined$ You | AILogic$ BestOption | StackDescription$ SpellDescription | SpellDescription$ Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated.
|
A:SP$ GenericChoice | Choices$ DBKillLand,DBKillCreatures | Defined$ You | AILogic$ BestOption | StackDescription$ SpellDescription | SpellDescription$ Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated.
|
||||||
SVar:DBKillLand:DB$ DestroyAll | ValidCards$ Land | SpellDescription$ Destroy all lands.
|
SVar:DBKillLand:DB$ DestroyAll | ValidCards$ Land | NoRegenValid$ Creature | SpellDescription$ Destroy all lands.
|
||||||
SVar:DBKillCreatures:DB$ DestroyAll | ValidCards$ Creature | NoRegen$ True | SpellDescription$ Destroy all creatures. They can't be regenerated.
|
SVar:DBKillCreatures:DB$ DestroyAll | ValidCards$ Creature | NoRegen$ True | SpellDescription$ Destroy all creatures. They can't be regenerated.
|
||||||
Oracle:Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated.
|
Oracle:Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated.
|
||||||
|
|||||||
Reference in New Issue
Block a user