Fix Catastrophe allowing regeneration on land choice for creatures

This commit is contained in:
tool4EvEr
2024-07-29 21:07:23 +02:00
committed by Hans Mackowiak
parent 45ef20e765
commit 0a474c955a
2 changed files with 5 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ public class DestroyAllEffect extends SpellAbilityEffect {
*/
@Override
public void resolve(SpellAbility sa) {
final boolean noRegen = sa.hasParam("NoRegen");
boolean noRegen = sa.hasParam("NoRegen");
final Card card = sa.getHostCard();
final boolean isOptional = sa.hasParam("Optional");
final Game game = sa.getActivatingPlayer().getGame();
@@ -90,6 +90,9 @@ public class DestroyAllEffect extends SpellAbilityEffect {
CardZoneTable zoneMovements = AbilityKey.addCardZoneTableParams(params, sa);
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) {
card.addRemembered(zoneMovements.getLastStateBattlefield().get(c));
}

View File

@@ -2,6 +2,6 @@ Name:Catastrophe
ManaCost:4 W W
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.
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.
Oracle:Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated.