mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
implement [DSK] Screaming Nemesis
This commit is contained in:
parent
b01b5aa24d
commit
3acab4a76d
6 changed files with 231 additions and 43 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue