mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Some minor changes.
This commit is contained in:
parent
f777668a4d
commit
54b40646d9
37 changed files with 202 additions and 320 deletions
|
@ -41,8 +41,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
@ -51,14 +50,8 @@ import mage.target.common.TargetCreatureOrPlayer;
|
|||
*/
|
||||
public class AcidicSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public AcidicSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -70,7 +63,7 @@ public class AcidicSliver extends CardImpl {
|
|||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, filter,
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"All Slivers have \"{2}, Sacrifice this permanent: This permanent deals 2 damage to target creature or player.\"")));
|
||||
}
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -38,10 +36,10 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
|||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,19 +47,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
*/
|
||||
public class ArmorSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public ArmorSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 1, Duration.EndOfTurn), new GenericManaCost(2)), Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
|
||||
new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 1, Duration.EndOfTurn),
|
||||
new GenericManaCost(2)), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false)));
|
||||
}
|
||||
|
||||
public ArmorSliver(final ArmorSliver card) {
|
||||
|
|
|
@ -30,19 +30,18 @@ package mage.cards.a;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.CardsInHandCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.abilities.keyword.MadnessAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.players.Player;
|
||||
import mage.constants.TargetController;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,14 +50,19 @@ import mage.players.Player;
|
|||
public class AsylumVisitor extends CardImpl {
|
||||
|
||||
public AsylumVisitor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.subtype.add("Vampire");
|
||||
this.subtype.add("Wizard");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.
|
||||
this.addAbility(new AsylumVisitorTriggeredAbility());
|
||||
Ability ability = new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.ANY, false),
|
||||
new CardsInHandCondition(CardsInHandCondition.CountType.EQUAL_TO, 0, null, TargetController.ACTIVE),
|
||||
"At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.");
|
||||
Effect effect = new LoseLifeSourceControllerEffect(1);
|
||||
effect.setText("and you lose 1 life");
|
||||
this.addAbility(ability);
|
||||
|
||||
// Madness {1}{B}
|
||||
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{B}")));
|
||||
|
@ -73,67 +77,3 @@ public class AsylumVisitor extends CardImpl {
|
|||
return new AsylumVisitor(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AsylumVisitorTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public AsylumVisitorTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AsylumVisitorEffect());
|
||||
}
|
||||
|
||||
public AsylumVisitorTriggeredAbility(final AsylumVisitorTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsylumVisitorTriggeredAbility copy() {
|
||||
return new AsylumVisitorTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UPKEEP_STEP_PRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Player upkeepPlayer = game.getPlayer(event.getPlayerId());
|
||||
if (upkeepPlayer != null && upkeepPlayer.getHand().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.";
|
||||
}
|
||||
}
|
||||
|
||||
class AsylumVisitorEffect extends OneShotEffect {
|
||||
|
||||
public AsylumVisitorEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "you draw a card and you lose 1 life";
|
||||
}
|
||||
|
||||
public AsylumVisitorEffect(final AsylumVisitorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsylumVisitorEffect copy() {
|
||||
return new AsylumVisitorEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
Player upkeepPlayer = game.getPlayer(game.getActivePlayerId());
|
||||
if (you != null && upkeepPlayer != null && upkeepPlayer.getHand().isEmpty()) {
|
||||
you.drawCards(1, game);
|
||||
you.loseLife(1, game, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -28,17 +28,16 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.*;
|
||||
import mage.abilities.effects.PreventionEffectData;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -79,22 +78,21 @@ class AweStrikeEffect extends PreventionEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
this.used = true;
|
||||
this.discard();
|
||||
|
||||
PreventionEffectData preventionData = preventDamageAction(event, source, game);
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.gainLife(preventionData.getPreventedDamage(), game);
|
||||
}
|
||||
this.used = true;
|
||||
this.discard();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (!this.used && super.applies(event, source, game)) {
|
||||
MageObject mageObject = game.getObject(event.getSourceId());
|
||||
return this.getTargetPointer().getFirst(game, source).equals(mageObject.getId());
|
||||
Permanent targetCreature = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
|
||||
return targetCreature != null && targetCreature.getId().equals(event.getSourceId());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -38,10 +36,10 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
|||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,19 +47,14 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
*/
|
||||
public class BarbedSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public BarbedSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new GenericManaCost(2)), Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn),
|
||||
new GenericManaCost(2)), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false)));
|
||||
}
|
||||
|
||||
public BarbedSliver(final BarbedSliver card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,7 +45,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class BattleSliver extends CardImpl {
|
||||
|
||||
public BattleSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(3);
|
||||
|
@ -53,7 +53,7 @@ public class BattleSliver extends CardImpl {
|
|||
|
||||
// Sliver creatures you control get +2/+0.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,14 +45,15 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class BladeSliver extends CardImpl {
|
||||
|
||||
public BladeSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// All Sliver creatures get +1/+0.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 0, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver", "Sliver creatures"), false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostAllEffect(1, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false)));
|
||||
}
|
||||
|
||||
public BladeSliver(final BladeSliver card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class BonescytheSliver extends CardImpl {
|
||||
|
||||
public BonescytheSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -55,7 +55,7 @@ public class BonescytheSliver extends CardImpl {
|
|||
// Sliver creatures you control have double strike.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public BonescytheSliver(final BonescytheSliver card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,18 +45,14 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class BonesplitterSliver extends CardImpl {
|
||||
|
||||
public BonesplitterSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// All Sliver creatures get +2/+0.
|
||||
this.addAbility(
|
||||
new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new BoostAllEffect(2, 0, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver","Sliver creatures"), false)
|
||||
)
|
||||
);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostAllEffect(2, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false)));
|
||||
}
|
||||
|
||||
public BonesplitterSliver(final BonesplitterSliver card) {
|
||||
|
|
|
@ -44,7 +44,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -65,7 +65,7 @@ public class ConstrictingSliver extends CardImpl {
|
|||
}
|
||||
|
||||
public ConstrictingSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(3);
|
||||
|
@ -78,7 +78,7 @@ public class ConstrictingSliver extends CardImpl {
|
|||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Sliver", "Sliver creatures"),
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"Sliver creatures you control have \"When this creature enters the battlefield, you may exile target creature an opponent controls until this creature leaves the battlefield.\"")));
|
||||
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -50,7 +51,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class CryptSliver extends CardImpl {
|
||||
|
||||
public CryptSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -59,7 +60,7 @@ public class CryptSliver extends CardImpl {
|
|||
// All Slivers have "{tap}: Regenerate target Sliver."
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("Sliver", "Sliver")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver", "Sliver creatures"))));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public CryptSliver(final CryptSliver card) {
|
||||
|
|
|
@ -40,8 +40,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,14 +48,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
*/
|
||||
public class DarkheartSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public DarkheartSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -66,7 +59,7 @@ public class DarkheartSliver extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new SacrificeSourceCost());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, filter,
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"All Slivers have \"Sacrifice this permanent: You gain 3 life.\"")));
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class FurySliver extends CardImpl {
|
||||
|
||||
public FurySliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
@ -55,7 +55,7 @@ public class FurySliver extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield,
|
||||
new FilterCreaturePermanent("Sliver","Sliver creatures")
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS
|
||||
)
|
||||
));
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class GaleriderSliver extends CardImpl {
|
||||
|
||||
public GaleriderSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -55,7 +55,7 @@ public class GaleriderSliver extends CardImpl {
|
|||
// Sliver creatures you control have flying.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(FlyingAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public GaleriderSliver(final GaleriderSliver card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class GroundshakerSliver extends CardImpl {
|
||||
|
||||
public GroundshakerSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(5);
|
||||
|
@ -55,7 +55,7 @@ public class GroundshakerSliver extends CardImpl {
|
|||
// Sliver creatures you control have trample.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(TrampleAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public GroundshakerSliver(final GroundshakerSliver card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class HunterSliver extends CardImpl {
|
||||
|
||||
public HunterSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -54,7 +54,7 @@ public class HunterSliver extends CardImpl {
|
|||
|
||||
// All Sliver creatures have provoke.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new ProvokeAbility(),
|
||||
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver", "Sliver creatures"))));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public HunterSliver(final HunterSliver card) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -53,17 +54,17 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class MagmaSliver extends CardImpl {
|
||||
|
||||
public MagmaSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// All Slivers have "{tap}: Target Sliver creature gets +X/+0 until end of turn, where X is the number of Slivers on the battlefield."
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("Sliver", "Sliver creatures")), new StaticValue(0), Duration.EndOfTurn), new TapSourceCost());
|
||||
Target target = new TargetCreaturePermanent(new FilterCreaturePermanent("Sliver", "Sliver creature"));
|
||||
ability.addTarget(target);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver", "Sliver creatures"))));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS), new StaticValue(0), Duration.EndOfTurn), new TapSourceCost());
|
||||
Target target = new TargetCreaturePermanent(new FilterCreaturePermanent("Sliver", "Sliver creature"));
|
||||
ability.addTarget(target);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public MagmaSliver(final MagmaSliver card) {
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,7 +47,7 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
public class ManaweftSliver extends CardImpl {
|
||||
|
||||
public ManaweftSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -57,8 +57,8 @@ public class ManaweftSliver extends CardImpl {
|
|||
Ability ability = new AnyColorManaAbility();
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Sliver","Sliver creatures"),
|
||||
"Sliver creatures you control have \"{T}: Add one mana of any color to your mana pool.\"")));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"Sliver creatures you control have \"{T}: Add one mana of any color to your mana pool.\"")));
|
||||
}
|
||||
|
||||
public ManaweftSliver(final ManaweftSliver card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,7 +45,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class MeganticSliver extends CardImpl {
|
||||
|
||||
public MeganticSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(3);
|
||||
|
@ -53,7 +53,7 @@ public class MeganticSliver extends CardImpl {
|
|||
|
||||
// Sliver creatures you control get +3/+3.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostControlledEffect(3,3, Duration.WhileInGraveyard, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
new BoostControlledEffect(3, 3, Duration.WhileInGraveyard, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public MeganticSliver(final MeganticSliver card) {
|
||||
|
|
|
@ -46,7 +46,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -59,7 +59,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public class MistformSliver extends CardImpl {
|
||||
|
||||
public MistformSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.subtype.add("Illusion");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class MistformSliver extends CardImpl {
|
|||
|
||||
// All Slivers have "{1}: This permanent becomes the creature type of your choice in addition to its other types until end of turn."
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MistformSliverEffect(), new ManaCostsImpl("{1}"));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver", "Sliver creatures"))));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public MistformSliver(final MistformSliver card) {
|
||||
|
@ -81,41 +81,41 @@ public class MistformSliver extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class MistformSliverEffect extends OneShotEffect {
|
||||
|
||||
public MistformSliverEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "This permanent becomes the creature type of your choice in addition to its other types until end of turn";
|
||||
}
|
||||
|
||||
public MistformSliverEffect(final MistformSliverEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && permanent != null) {
|
||||
Choice typeChoice = new ChoiceImpl(true);
|
||||
typeChoice.setMessage("Choose creature type");
|
||||
typeChoice.setChoices(CardRepository.instance.getCreatureTypes());
|
||||
while (!player.choose(Outcome.Detriment, typeChoice, game)) {
|
||||
if (!player.canRespond()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice());
|
||||
ContinuousEffect effect = new AddCardSubTypeTargetEffect(typeChoice.getChoice(), Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MistformSliverEffect copy() {
|
||||
return new MistformSliverEffect(this);
|
||||
}
|
||||
class MistformSliverEffect extends OneShotEffect {
|
||||
|
||||
public MistformSliverEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "This permanent becomes the creature type of your choice in addition to its other types until end of turn";
|
||||
}
|
||||
|
||||
public MistformSliverEffect(final MistformSliverEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && permanent != null) {
|
||||
Choice typeChoice = new ChoiceImpl(true);
|
||||
typeChoice.setMessage("Choose creature type");
|
||||
typeChoice.setChoices(CardRepository.instance.getCreatureTypes());
|
||||
while (!player.choose(Outcome.Detriment, typeChoice, game)) {
|
||||
if (!player.canRespond()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice());
|
||||
ContinuousEffect effect = new AddCardSubTypeTargetEffect(typeChoice.getChoice(), Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MistformSliverEffect copy() {
|
||||
return new MistformSliverEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -40,31 +38,26 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
|||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public class MnemonicSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public MnemonicSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2));
|
||||
gainedAbility.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false)));
|
||||
}
|
||||
|
||||
public MnemonicSliver(final MnemonicSliver card) {
|
||||
|
|
|
@ -41,8 +41,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,14 +50,8 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class NecroticSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public NecroticSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -70,7 +63,7 @@ public class NecroticSliver extends CardImpl {
|
|||
ability.addTarget(new TargetPermanent());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, filter,
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"All Slivers have \"{3}, Sacrifice this permanent: Destroy target permanent.\"")));
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,14 +45,14 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class PlatedSliver extends CardImpl {
|
||||
|
||||
public PlatedSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// All Sliver creatures get +0/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(0, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver", "Sliver creatures"), false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(0, 1, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false)));
|
||||
}
|
||||
|
||||
public PlatedSliver(final PlatedSliver card) {
|
||||
|
|
|
@ -41,8 +41,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,14 +50,8 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class PoulticeSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public PoulticeSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -67,11 +60,11 @@ public class PoulticeSliver extends CardImpl {
|
|||
// All Slivers have "{2}, {tap}: Regenerate target Sliver."
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, filter,
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"Slivers have \"{2}, {T}: Regenerate target Sliver.\"")));
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,7 +45,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class PredatorySliver extends CardImpl {
|
||||
|
||||
public PredatorySliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -53,7 +53,7 @@ public class PredatorySliver extends CardImpl {
|
|||
|
||||
// Sliver creatures you control get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostControlledEffect(1,1, Duration.WhileInGraveyard, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
new BoostControlledEffect(1, 1, Duration.WhileInGraveyard, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public PredatorySliver(final PredatorySliver card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class SliverHivelord extends CardImpl {
|
||||
|
||||
public SliverHivelord(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}{R}{G}");
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class SliverHivelord extends CardImpl {
|
|||
// Sliver creatures you control have indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(IndestructibleAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver", "Sliver creatures"))));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,17 +40,16 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cbt33
|
||||
*/
|
||||
|
||||
public class SpectralSliver extends CardImpl {
|
||||
|
||||
public SpectralSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
this.subtype.add("Sliver");
|
||||
this.subtype.add("Spirit");
|
||||
|
||||
|
@ -58,8 +57,8 @@ public class SpectralSliver extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// All Sliver creatures have "{2}: This creature gets +1/+1 until end of turn."
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,1,Duration.EndOfTurn), new ManaCostsImpl("{2}"));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver", "Sliver creatures"))));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{2}"));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public SpectralSliver(final SpectralSliver card) {
|
||||
|
|
|
@ -38,11 +38,9 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.target.targetpointer.TargetPointer;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,14 +48,8 @@ import mage.target.targetpointer.TargetPointer;
|
|||
*/
|
||||
public class SpinedSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public SpinedSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -67,7 +59,7 @@ public class SpinedSliver extends CardImpl {
|
|||
BlockersCount value = new BlockersCount();
|
||||
Effect effect = new BoostTargetEffect(value, value, Duration.EndOfTurn, true);
|
||||
effect.setText("it gets +1/+1 until end of turn for each creature blocking it");
|
||||
this.addAbility(new BecomesBlockedAllTriggeredAbility(effect, false, filter, true));
|
||||
this.addAbility(new BecomesBlockedAllTriggeredAbility(effect, false, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, true));
|
||||
}
|
||||
|
||||
public SpinedSliver(final SpinedSliver card) {
|
||||
|
@ -82,7 +74,7 @@ public class SpinedSliver extends CardImpl {
|
|||
|
||||
class BlockersCount implements DynamicValue {
|
||||
|
||||
private String message;
|
||||
private final String message;
|
||||
|
||||
public BlockersCount() {
|
||||
this.message = "each creature blocking it";
|
||||
|
@ -95,8 +87,7 @@ class BlockersCount implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
TargetPointer attacker = effect.getTargetPointer();
|
||||
UUID attackerId = attacker.getFirst(game, sourceAbility);
|
||||
UUID attackerId = effect.getTargetPointer().getFirst(game, sourceAbility);
|
||||
for (CombatGroup combatGroup : game.getCombat().getGroups()) {
|
||||
if (combatGroup.getAttackers().contains(attackerId)) {
|
||||
return combatGroup.getBlockers().size();
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,7 +45,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class SteelformSliver extends CardImpl {
|
||||
|
||||
public SteelformSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -54,7 +54,7 @@ public class SteelformSliver extends CardImpl {
|
|||
// Sliver creatures you control get +0/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield,
|
||||
new FilterCreaturePermanent("Sliver", "Sliver creatures"), false)));
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false)));
|
||||
}
|
||||
|
||||
public SteelformSliver(final SteelformSliver card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class StrikingSliver extends CardImpl {
|
||||
|
||||
public StrikingSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -55,7 +55,7 @@ public class StrikingSliver extends CardImpl {
|
|||
// Sliver creatures you control have first strike.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public StrikingSliver(final StrikingSliver card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class SyphonSliver extends CardImpl {
|
||||
|
||||
public SyphonSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -55,7 +55,7 @@ public class SyphonSliver extends CardImpl {
|
|||
// Sliver creatures you control have lifelink.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(LifelinkAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public SyphonSliver(final SyphonSliver card) {
|
||||
|
|
|
@ -39,7 +39,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
@ -49,7 +49,7 @@ import mage.target.common.TargetCreatureOrPlayer;
|
|||
public class ThorncasterSliver extends CardImpl {
|
||||
|
||||
public ThorncasterSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -60,8 +60,8 @@ public class ThorncasterSliver extends CardImpl {
|
|||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Sliver","Sliver creatures"),
|
||||
"Sliver creatures you control have \"Whenever this creature attacks, it deals 1 damage to target creature or player.\"")));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"Sliver creatures you control have \"Whenever this creature attacks, it deals 1 damage to target creature or player.\"")));
|
||||
}
|
||||
|
||||
public ThorncasterSliver(final ThorncasterSliver card) {
|
||||
|
|
|
@ -38,8 +38,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,14 +46,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
*/
|
||||
public class TwoHeadedSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public TwoHeadedSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -63,8 +56,8 @@ public class TwoHeadedSliver extends CardImpl {
|
|||
// All Sliver creatures have menace. (They can't be blocked except by two or more creatures.)
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
|
||||
new MenaceAbility(),
|
||||
Duration.WhileOnBattlefield, filter,
|
||||
"All Sliver creatures have menace. (They can't be blocked except by two or more creatures.)")));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"All Sliver creatures have menace. <i>(They can't be blocked except by two or more creatures.)</i>")));
|
||||
}
|
||||
|
||||
public TwoHeadedSliver(final TwoHeadedSliver card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
public class VenomSliver extends CardImpl {
|
||||
|
||||
public VenomSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -55,7 +55,7 @@ public class VenomSliver extends CardImpl {
|
|||
// Sliver creatures you control have deathtouch.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(DeathtouchAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Sliver","Sliver creatures"))));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)));
|
||||
}
|
||||
|
||||
public VenomSliver(final VenomSliver card) {
|
||||
|
|
|
@ -41,8 +41,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,14 +49,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
*/
|
||||
public class VictualSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Sliver"));
|
||||
}
|
||||
|
||||
public VictualSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}");
|
||||
this.subtype.add("Sliver");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -69,7 +62,7 @@ public class VictualSliver extends CardImpl {
|
|||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, filter,
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS,
|
||||
"All Slivers have \"{2}, Sacrifice this permanent: You gain 4 life.\"")));
|
||||
}
|
||||
|
||||
|
|
|
@ -91,12 +91,28 @@ public class CardsInHandCondition implements Condition {
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case ACTIVE:
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
if (player != null) {
|
||||
switch (this.type) {
|
||||
case FEWER_THAN:
|
||||
conditionApplies = player.getHand().size() < this.count;
|
||||
break;
|
||||
case MORE_THAN:
|
||||
conditionApplies = player.getHand().size() > this.count;
|
||||
break;
|
||||
case EQUAL_TO:
|
||||
conditionApplies = player.getHand().size() == this.count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ANY:
|
||||
boolean conflict = false;
|
||||
switch (this.type) {
|
||||
case FEWER_THAN:
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
if (player.getHand().size() >= this.count) {
|
||||
conflict = true;
|
||||
|
@ -107,7 +123,7 @@ public class CardsInHandCondition implements Condition {
|
|||
break;
|
||||
case MORE_THAN:
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
if (player.getHand().size() <= this.count) {
|
||||
conflict = true;
|
||||
|
@ -118,7 +134,7 @@ public class CardsInHandCondition implements Condition {
|
|||
break;
|
||||
case EQUAL_TO:
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
if (player.getHand().size() != this.count) {
|
||||
conflict = true;
|
||||
|
|
|
@ -30,6 +30,7 @@ public class StaticFilters {
|
|||
public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card");
|
||||
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent("Goblin", "Goblin creatures");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent("Sliver", "Sliver creatures");
|
||||
|
||||
static {
|
||||
FILTER_PERMANENT_ARTIFACT_OR_CREATURE.add(Predicates.or(
|
||||
|
|
Loading…
Reference in a new issue