implement [DSK] Screaming Nemesis

This commit is contained in:
Susucre 2024-07-06 18:55:53 +02:00
parent b01b5aa24d
commit 3acab4a76d
6 changed files with 231 additions and 43 deletions

View file

@ -0,0 +1,39 @@
package mage.abilities.effects.common.continuous;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.game.Game;
import mage.players.Player;
/**
* @author Susucr
*/
public class CantGainLifeRestOfGameTargetEffect extends ContinuousEffectImpl {
public CantGainLifeRestOfGameTargetEffect() {
super(Duration.EndOfGame, Layer.PlayerEffects, SubLayer.NA, Outcome.Neutral);
staticText = "that player can't gain life for the rest of the game";
}
private CantGainLifeRestOfGameTargetEffect(final CantGainLifeRestOfGameTargetEffect effect) {
super(effect);
}
@Override
public CantGainLifeRestOfGameTargetEffect copy() {
return new CantGainLifeRestOfGameTargetEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
if (player != null) {
player.setCanGainLife(false);
}
return true;
}
}

View file

@ -13,6 +13,10 @@ public class TargetAnyTarget extends TargetPermanentOrPlayer {
this(1);
}
public TargetAnyTarget(FilterAnyTarget filter) {
this(1, 1, filter);
}
public TargetAnyTarget(int numTargets) {
this(numTargets, numTargets);
}