mirror of
https://github.com/correl/mage.git
synced 2024-12-28 11:14:13 +00:00
Merge pull request #4018 from theelk801/master
Implemented several cards, reverted Skulk change
This commit is contained in:
commit
379aba7de0
29 changed files with 565 additions and 84 deletions
|
@ -52,7 +52,7 @@ public class BehindTheScenes extends CardImpl {
|
|||
|
||||
// Creatures you control have skulk.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(SkulkAbility.getInstance(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES)));
|
||||
new GainAbilityControlledEffect(new SkulkAbility(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES)));
|
||||
|
||||
// {4}{W}: Creatures you control get +1/+1 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
|
|
|
@ -28,21 +28,17 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.OverloadAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -58,14 +54,16 @@ public class CyclonicRift extends CardImpl {
|
|||
}
|
||||
|
||||
public CyclonicRift(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Return target nonland permanent you don't control to its owner's hand.
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter));
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
|
||||
// Overload {6}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
|
||||
this.addAbility(new OverloadAbility(this, new CyclonicRiftEffect(), new ManaCostsImpl("{6}{U}")));
|
||||
Effect effect = new ReturnToHandFromBattlefieldAllEffect(filter);
|
||||
effect.setText("Return each nonland permanent you don't control to its owner's hand");
|
||||
this.addAbility(new OverloadAbility(this, effect, new ManaCostsImpl("{6}{U}")));
|
||||
}
|
||||
|
||||
public CyclonicRift(final CyclonicRift card) {
|
||||
|
@ -77,33 +75,3 @@ public class CyclonicRift extends CardImpl {
|
|||
return new CyclonicRift(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CyclonicRiftEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent();
|
||||
|
||||
public CyclonicRiftEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
staticText = "Return each nonland permanent you don't control to its owner's hand";
|
||||
}
|
||||
|
||||
public CyclonicRiftEffect(final CyclonicRiftEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
if (!creature.getControllerId().equals(source.getControllerId())) {
|
||||
creature.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CyclonicRiftEffect copy() {
|
||||
return new CyclonicRiftEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
|
@ -49,7 +50,7 @@ import mage.players.Player;
|
|||
public class DuskmantleSeer extends CardImpl {
|
||||
|
||||
public DuskmantleSeer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}");
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
|
||||
|
@ -91,15 +92,15 @@ class DuskmantleSeerEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Card sourceCard = game.getCard(source.getSourceId());
|
||||
Permanent sourceCard = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (sourceCard == null) {
|
||||
return false;
|
||||
}
|
||||
for (Player player: game.getPlayers().values()) {
|
||||
if(player.getLibrary().hasCards()){
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
if (player.getLibrary().hasCards()) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game);
|
||||
player.loseLife(card.getConvertedManaCost(), game, false);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class FarbogRevenant extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Skulk
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
|
||||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
|
|
@ -60,7 +60,7 @@ public class Fogwalker extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Skulk
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
// When Fogwalker enters the battlefield, target creature an opponent controls doesn't untap during it controler's next untap step.
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
|
|
@ -56,7 +56,7 @@ public class ForgottenCreation extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Skulk
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
// At the beginning of your upkeep, you may discard all the cards in your hand. If you do, draw that many cards.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ForgottenCreationEffect(), TargetController.YOU, true));
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class FurtiveHomunculus extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Skulk (This creature can't be blocked by creatures with greater power.)
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
}
|
||||
|
||||
public FurtiveHomunculus(final FurtiveHomunculus card) {
|
||||
|
|
113
Mage.Sets/src/mage/cards/g/GamePreserve.java
Normal file
113
Mage.Sets/src/mage/cards/g/GamePreserve.java
Normal file
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class GamePreserve extends CardImpl {
|
||||
|
||||
public GamePreserve(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
|
||||
// At the beginning of your upkeep, each player reveals the top card of his or her library. If all cards revealed this way are creature cards, put those cards onto the battlefield under their owners' control.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DuskmarEffect(), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
public GamePreserve(final GamePreserve card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GamePreserve copy() {
|
||||
return new GamePreserve(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DuskmarEffect extends OneShotEffect {
|
||||
|
||||
public DuskmarEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "each player reveals the top card of his or her library. If all cards revealed this way are creature cards, put those cards onto the battlefield under their owners' control";
|
||||
}
|
||||
|
||||
public DuskmarEffect(final DuskmarEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DuskmarEffect copy() {
|
||||
return new DuskmarEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourceCard = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (sourceCard == null) {
|
||||
return false;
|
||||
}
|
||||
boolean putToPlay = true;
|
||||
Cards cards = new CardsImpl();
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
if (player.getLibrary().hasCards()) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
if (!card.isCreature()) {
|
||||
putToPlay = false;
|
||||
}
|
||||
player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game);
|
||||
}
|
||||
} else {
|
||||
putToPlay = false;
|
||||
}
|
||||
}
|
||||
if (putToPlay) {
|
||||
game.getPlayers().values().iterator().next().moveCards(cards.getCards(game), Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
121
Mage.Sets/src/mage/cards/m/MineLayer.java
Normal file
121
Mage.Sets/src/mage/cards/m/MineLayer.java
Normal file
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BecomesTappedTriggeredAbility;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.permanent.CounterPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class MineLayer extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("land with a mine counter on it");
|
||||
|
||||
static {
|
||||
filter.add(new CounterPredicate(CounterType.MINE));
|
||||
}
|
||||
|
||||
public MineLayer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
this.subtype.add(SubType.DWARF);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {1}{R}, {tap}: Put a mine counter on target land.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.MINE.createInstance()), new TapSourceCost());
|
||||
ability.addCost(new ManaCostsImpl("{1}{R}"));
|
||||
ability.addTarget(new TargetLandPermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever a land with a mine counter on it becomes tapped, destroy it.
|
||||
this.addAbility(new BecomesTappedTriggeredAbility(new DestroyTargetEffect().setText("destroy that land"), false, filter, true));
|
||||
|
||||
// When Mine Layer leaves the battlefield, remove all mine counters from all lands.
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new RemoveAllMineCountersEffect(), false));
|
||||
}
|
||||
|
||||
public MineLayer(final MineLayer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MineLayer copy() {
|
||||
return new MineLayer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RemoveAllMineCountersEffect extends OneShotEffect {
|
||||
|
||||
public RemoveAllMineCountersEffect() {
|
||||
super(Outcome.Neutral);
|
||||
this.staticText = "remove all mine counters from all lands";
|
||||
}
|
||||
|
||||
public RemoveAllMineCountersEffect(final RemoveAllMineCountersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RemoveAllMineCountersEffect copy() {
|
||||
return new RemoveAllMineCountersEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(CardType.LAND)) {
|
||||
if (permanent != null) {
|
||||
permanent.getCounters(game).removeAllCounters(CounterType.MINE);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -171,7 +171,7 @@ class OdricLunarchMarshalEffect extends OneShotEffect {
|
|||
|
||||
// Skulk
|
||||
if (game.getBattlefield().contains(filterSkulk, source.getControllerId(), 1, game)) {
|
||||
game.addEffect(new GainAbilityControlledEffect(SkulkAbility.getInstance(), Duration.EndOfTurn, filterCreatures), source);
|
||||
game.addEffect(new GainAbilityControlledEffect(new SkulkAbility(), Duration.EndOfTurn, filterCreatures), source);
|
||||
}
|
||||
|
||||
// Trample
|
||||
|
@ -185,4 +185,4 @@ class OdricLunarchMarshalEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class PaleRiderOfTrostad extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Skulk
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
|
||||
// When Pale Rider of Trostad enters the battlefield, discard a card.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardControllerEffect(1), false));
|
||||
|
|
|
@ -54,7 +54,7 @@ public class PersistentNightmare extends CardImpl {
|
|||
this.nightCard = true;
|
||||
|
||||
// Skulk
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
|
||||
// When Persistent Nightmare deals combat damage to a player, return it to its owner's hand.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ReturnToHandSourceEffect(), false));
|
||||
|
|
|
@ -50,7 +50,7 @@ public class RancidRats extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Skulk
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
// Deathtouch
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
}
|
||||
|
|
91
Mage.Sets/src/mage/cards/r/RebornHero.java
Normal file
91
Mage.Sets/src/mage/cards/r/RebornHero.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CardsInControllerGraveCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class RebornHero extends CardImpl {
|
||||
|
||||
public RebornHero(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Threshold - As long as seven or more cards are in your graveyard, Reborn Hero has "When Reborn Hero dies, you may pay {W}{W}. If you do, return Reborn Hero to the battlefield under your control."
|
||||
Ability ability = new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(new DiesTriggeredAbility(new DoIfCostPaid(
|
||||
new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{W}{W}")
|
||||
))),
|
||||
new CardsInControllerGraveCondition(7),
|
||||
"As long as seven or more cards are in your graveyard, "
|
||||
+ "{this} has \"When {this} dies, you may pay {W}{W}. "
|
||||
+ "If you do, return {this} to the battlefield under your control.\""
|
||||
)
|
||||
);
|
||||
ability.setAbilityWord(AbilityWord.THRESHOLD);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public RebornHero(final RebornHero card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RebornHero copy() {
|
||||
return new RebornHero(this);
|
||||
}
|
||||
}
|
|
@ -57,7 +57,7 @@ public class SkeletonKey extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature has skulk.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(SkulkAbility.getInstance(), AttachmentType.EQUIPMENT)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new SkulkAbility(), AttachmentType.EQUIPMENT)));
|
||||
|
||||
// Whenever equipped creature deals combat damage to a player, you may draw a card. if you do, discard a card.
|
||||
Ability ability = new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "equipped creature", true);
|
||||
|
|
124
Mage.Sets/src/mage/cards/s/StrongarmTactics.java
Normal file
124
Mage.Sets/src/mage/cards/s/StrongarmTactics.java
Normal file
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetDiscard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class StrongarmTactics extends CardImpl {
|
||||
|
||||
public StrongarmTactics(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
|
||||
|
||||
// Each player discards a card. Then each player who didn't discard a creature card this way loses 4 life.
|
||||
this.getSpellAbility().addEffect(new StrongarmTacticsEffect());
|
||||
}
|
||||
|
||||
public StrongarmTactics(final StrongarmTactics card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrongarmTactics copy() {
|
||||
return new StrongarmTactics(this);
|
||||
}
|
||||
}
|
||||
|
||||
class StrongarmTacticsEffect extends OneShotEffect {
|
||||
|
||||
StrongarmTacticsEffect() {
|
||||
super(Outcome.Discard);
|
||||
this.staticText = "Each player discards a card. Then each player who didn't discard a creature card this way loses 4 life.";
|
||||
}
|
||||
|
||||
StrongarmTacticsEffect(final StrongarmTacticsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrongarmTacticsEffect copy() {
|
||||
return new StrongarmTacticsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
// Store for each player the cards to discard, that's important because all discard shall happen at the same time
|
||||
HashMap<UUID, Cards> cardsToDiscard = new HashMap<>();
|
||||
if (controller != null) {
|
||||
// choose cards to discard
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
int numberOfCardsToDiscard = Math.min(1, player.getHand().size());
|
||||
Cards cards = new CardsImpl();
|
||||
Target target = new TargetDiscard(numberOfCardsToDiscard, numberOfCardsToDiscard, new FilterCard(), playerId);
|
||||
player.chooseTarget(outcome, target, source, game);
|
||||
cards.addAll(target.getTargets());
|
||||
cardsToDiscard.put(playerId, cards);
|
||||
}
|
||||
}
|
||||
// discard all choosen cards
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
Cards cardsPlayer = cardsToDiscard.get(playerId);
|
||||
if (cardsPlayer != null) {
|
||||
for (UUID cardId : cardsPlayer) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
if (!(player.discard(card, source, game) && card.isCreature())) {
|
||||
player.loseLife(4, game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
63
Mage.Sets/src/mage/cards/t/TeferisVeil.java
Normal file
63
Mage.Sets/src/mage/cards/t/TeferisVeil.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.PhaseOutTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class TeferisVeil extends CardImpl {
|
||||
|
||||
public TeferisVeil(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
|
||||
// Whenever a creature you control attacks, it phases out at end of combat.
|
||||
Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new PhaseOutTargetEffect("it", false)));
|
||||
effect.setText("it phases out at end of combat");
|
||||
this.addAbility(new AttacksCreatureYouControlTriggeredAbility(effect, false, true));
|
||||
}
|
||||
|
||||
public TeferisVeil(final TeferisVeil card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TeferisVeil copy() {
|
||||
return new TeferisVeil(this);
|
||||
}
|
||||
}
|
|
@ -54,7 +54,7 @@ public class UninvitedGeist extends CardImpl {
|
|||
this.secondSideCardClazz = UnimpededTrespasser.class;
|
||||
|
||||
// Skulk (This creature can't be blocked by creatures with greater power.)
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
|
||||
// When Uninvited Geist deals combat damage to a player, transform it.
|
||||
this.addAbility(new TransformAbility());
|
||||
|
|
|
@ -50,7 +50,7 @@ public class VampireCutthroat extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Skulk
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class WharfInfiltrator extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Skulk
|
||||
this.addAbility(SkulkAbility.getInstance());
|
||||
this.addAbility(new SkulkAbility());
|
||||
|
||||
// Whenever Wharf Infiltrator deals combat damage to a player, you may draw a card. If you do, discard a card.
|
||||
Effect effect = new DrawDiscardControllerEffect();
|
||||
|
|
|
@ -151,6 +151,7 @@ public class MercadianMasques extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fountain Watch", 19, Rarity.RARE, mage.cards.f.FountainWatch.class));
|
||||
cards.add(new SetCardInfo("Fresh Volunteers", 20, Rarity.COMMON, mage.cards.f.FreshVolunteers.class));
|
||||
cards.add(new SetCardInfo("Furious Assault", 191, Rarity.COMMON, mage.cards.f.FuriousAssault.class));
|
||||
cards.add(new SetCardInfo("Game Preserve", 248, Rarity.RARE, mage.cards.g.GamePreserve.class));
|
||||
cards.add(new SetCardInfo("Gerrard's Irregulars", 192, Rarity.COMMON, mage.cards.g.GerrardsIrregulars.class));
|
||||
cards.add(new SetCardInfo("Ghoul's Feast", 137, Rarity.UNCOMMON, mage.cards.g.GhoulsFeast.class));
|
||||
cards.add(new SetCardInfo("Giant Caterpillar", 249, Rarity.COMMON, mage.cards.g.GiantCaterpillar.class));
|
||||
|
|
|
@ -214,6 +214,7 @@ public class Odyssey extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Metamorphic Wurm", 250, Rarity.UNCOMMON, mage.cards.m.MetamorphicWurm.class));
|
||||
cards.add(new SetCardInfo("Millikin", 302, Rarity.UNCOMMON, mage.cards.m.Millikin.class));
|
||||
cards.add(new SetCardInfo("Mindslicer", 149, Rarity.RARE, mage.cards.m.Mindslicer.class));
|
||||
cards.add(new SetCardInfo("Mine Layer", 205, Rarity.RARE, mage.cards.m.MineLayer.class));
|
||||
cards.add(new SetCardInfo("Minotaur Explorer", 206, Rarity.UNCOMMON, mage.cards.m.MinotaurExplorer.class));
|
||||
cards.add(new SetCardInfo("Mirari", 303, Rarity.RARE, mage.cards.m.Mirari.class));
|
||||
cards.add(new SetCardInfo("Molten Influence", 207, Rarity.RARE, mage.cards.m.MoltenInfluence.class));
|
||||
|
|
|
@ -276,6 +276,7 @@ public class Onslaught extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Starlit Sanctum", 325, Rarity.UNCOMMON, mage.cards.s.StarlitSanctum.class));
|
||||
cards.add(new SetCardInfo("Starstorm", 238, Rarity.RARE, mage.cards.s.Starstorm.class));
|
||||
cards.add(new SetCardInfo("Steely Resolve", 286, Rarity.RARE, mage.cards.s.SteelyResolve.class));
|
||||
cards.add(new SetCardInfo("Strongarm Tactics", 173, Rarity.RARE, mage.cards.s.StrongarmTactics.class));
|
||||
cards.add(new SetCardInfo("Sunfire Balm", 56, Rarity.UNCOMMON, mage.cards.s.SunfireBalm.class));
|
||||
cards.add(new SetCardInfo("Supreme Inquisitor", 117, Rarity.RARE, mage.cards.s.SupremeInquisitor.class));
|
||||
cards.add(new SetCardInfo("Swamp", 339, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
@ -151,6 +151,7 @@ public class Torment extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Pyromania", 112, Rarity.UNCOMMON, mage.cards.p.Pyromania.class));
|
||||
cards.add(new SetCardInfo("Radiate", 113, Rarity.RARE, mage.cards.r.Radiate.class));
|
||||
cards.add(new SetCardInfo("Rancid Earth", 78, Rarity.COMMON, mage.cards.r.RancidEarth.class));
|
||||
cards.add(new SetCardInfo("Reborn Hero", 14, Rarity.RARE, mage.cards.r.RebornHero.class));
|
||||
cards.add(new SetCardInfo("Restless Dreams", 79, Rarity.COMMON, mage.cards.r.RestlessDreams.class));
|
||||
cards.add(new SetCardInfo("Sengir Vampire", 80, Rarity.RARE, mage.cards.s.SengirVampire.class));
|
||||
cards.add(new SetCardInfo("Seton's Scout", 138, Rarity.UNCOMMON, mage.cards.s.SetonsScout.class));
|
||||
|
|
|
@ -178,6 +178,7 @@ public class Weatherlight extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Straw Golem", 158, Rarity.UNCOMMON, mage.cards.s.StrawGolem.class));
|
||||
cards.add(new SetCardInfo("Striped Bears", 82, Rarity.COMMON, mage.cards.s.StripedBears.class));
|
||||
cards.add(new SetCardInfo("Tariff", 144, Rarity.RARE, mage.cards.t.Tariff.class));
|
||||
cards.add(new SetCardInfo("Teferi's Veil", 53, Rarity.UNCOMMON, mage.cards.t.TeferisVeil.class));
|
||||
cards.add(new SetCardInfo("Tendrils of Despair", 25, Rarity.COMMON, mage.cards.t.TendrilsOfDespair.class));
|
||||
cards.add(new SetCardInfo("Thunderbolt", 115, Rarity.COMMON, mage.cards.t.Thunderbolt.class));
|
||||
cards.add(new SetCardInfo("Thundermare", 116, Rarity.RARE, mage.cards.t.Thundermare.class));
|
||||
|
|
|
@ -14,34 +14,34 @@ public class GainAbilitiesTest extends CardTestPlayerBase {
|
|||
|
||||
/*
|
||||
Reported bug: Behind the Scenes grants skulk to all creatures instead of just ones under owner's control
|
||||
*/
|
||||
*/
|
||||
@Test
|
||||
public void behindTheScenesShouldOnlyGrantSkulkToCreaturesYouControl() {
|
||||
|
||||
|
||||
/*
|
||||
Behind the Scenes {2}{B}
|
||||
Enchantment
|
||||
Creatures you control have skulk. (They can't be blocked by creatures with greater power.)
|
||||
{4}{W}: Creatures you control get +1/+1 until end of turn
|
||||
*/
|
||||
String bScenes = "Behind the Scenes";
|
||||
*/
|
||||
String bScenes = "Behind the Scenes";
|
||||
String hGiant = "Hill Giant"; // {3}{R} 3/3
|
||||
String bSable = "Bronze Sable"; // {2} 2/1
|
||||
String memnite = "Memnite"; // {0} 1/1
|
||||
String gBears = "Grizzly Bears"; // {1}{G} 2/2
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, bScenes);
|
||||
addCard(Zone.BATTLEFIELD, playerA, hGiant);
|
||||
addCard(Zone.BATTLEFIELD, playerA, bSable);
|
||||
addCard(Zone.BATTLEFIELD, playerB, memnite);
|
||||
addCard(Zone.BATTLEFIELD, playerB, gBears);
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertAbility(playerA, hGiant, SkulkAbility.getInstance(), true);
|
||||
assertAbility(playerA, bSable, SkulkAbility.getInstance(), true);
|
||||
assertAbility(playerB, memnite, SkulkAbility.getInstance(), false);
|
||||
assertAbility(playerB, gBears, SkulkAbility.getInstance(), false);
|
||||
|
||||
assertAbility(playerA, hGiant, new SkulkAbility(), true);
|
||||
assertAbility(playerA, bSable, new SkulkAbility(), true);
|
||||
assertAbility(playerB, memnite, new SkulkAbility(), false);
|
||||
assertAbility(playerB, gBears, new SkulkAbility(), false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,12 +5,11 @@
|
|||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.EvasionAbility;
|
||||
import mage.abilities.MageSingleton;
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -18,31 +17,26 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SkulkAbility extends EvasionAbility implements MageSingleton {
|
||||
public class SkulkAbility extends StaticAbility {
|
||||
|
||||
private static final SkulkAbility instance = new SkulkAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
public SkulkAbility() {
|
||||
super(Zone.BATTLEFIELD, new SkulkEffect(Duration.WhileOnBattlefield));
|
||||
}
|
||||
|
||||
public static SkulkAbility getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private SkulkAbility() {
|
||||
this.addEffect(new SkulkEffect(Duration.WhileOnBattlefield));
|
||||
public SkulkAbility(final SkulkAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability copy() {
|
||||
return instance;
|
||||
return new SkulkAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Skulk <i>(This creature can't be blocked by creatures with greater power.)</i>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SkulkEffect extends RestrictionEffect {
|
||||
|
|
|
@ -87,6 +87,7 @@ public enum CounterType {
|
|||
M1M1(new BoostCounter(-1, -1).name),
|
||||
M2M1(new BoostCounter(-2, -1).name),
|
||||
M2M2(new BoostCounter(-2, -2).name),
|
||||
MINE("mine"),
|
||||
MINING("mining"),
|
||||
MIRE("mire"),
|
||||
MUSTER("muster"),
|
||||
|
|
|
@ -76,7 +76,7 @@ Shadow|instance|
|
|||
Shroud|instance|
|
||||
Soulbond|instance|
|
||||
Soulshift|number|
|
||||
Skulk|instance|
|
||||
Skulk|new|
|
||||
Storm|new|
|
||||
Sunburst|new|
|
||||
Swampcycling|cost|
|
||||
|
|
Loading…
Reference in a new issue