forked from External/mage
Implemented Vicious Conquistador
This commit is contained in:
parent
4d20b5fae4
commit
7071a6a0b7
3 changed files with 69 additions and 41 deletions
|
|
@ -29,17 +29,12 @@ package mage.cards.p;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.players.Players;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -48,14 +43,14 @@ import mage.players.Players;
|
|||
public class PulseTracker extends CardImpl {
|
||||
|
||||
public PulseTracker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new AttacksTriggeredAbility(new PulseTrackerLoseLifeEffect(), false));
|
||||
this.addAbility(new AttacksTriggeredAbility(new LoseLifeOpponentsEffect(1), false));
|
||||
}
|
||||
|
||||
public PulseTracker(final PulseTracker card) {
|
||||
|
|
@ -67,36 +62,3 @@ public class PulseTracker extends CardImpl {
|
|||
return new PulseTracker(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PulseTrackerLoseLifeEffect extends OneShotEffect {
|
||||
|
||||
private static final String effectText = "each opponent loses 1 life";
|
||||
|
||||
PulseTrackerLoseLifeEffect ( ) {
|
||||
super(Outcome.Damage);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
||||
PulseTrackerLoseLifeEffect ( PulseTrackerLoseLifeEffect effect ) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Players players = game.getPlayers();
|
||||
|
||||
for ( Player player : players.values() ) {
|
||||
if ( !player.getId().equals(source.getControllerId()) ) {
|
||||
player.loseLife(1, game, false);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PulseTrackerLoseLifeEffect copy() {
|
||||
return new PulseTrackerLoseLifeEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue