fixed Chance for Glory giving indestructible to noncreature permanents

This commit is contained in:
Evan Kranzler 2018-10-20 20:13:26 -04:00
parent 685175acd8
commit 01dfede9e9

View file

@ -1,16 +1,17 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class ChanceForGlory extends CardImpl {
@ -19,9 +20,10 @@ public final class ChanceForGlory extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{W}");
// Creatures you control gain indestructible. Take an extra turn after this one. At the beginning of that turn's end step, you lose the game.
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
IndestructibleAbility.getInstance(), Duration.EndOfGame
).setText("Creatures you control gain indestructible"));
this.getSpellAbility().addEffect(new GainAbilityAllEffect(
IndestructibleAbility.getInstance(), Duration.EndOfGame,
StaticFilters.FILTER_CONTROLLED_CREATURES
).setText("Creatures you control gain indestructible."));
this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect(true));
}