mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
commit
2d577287d1
82 changed files with 1979 additions and 181 deletions
|
|
@ -1096,6 +1096,16 @@
|
||||||
|Generate|TOK:WWK|Snake|||SnakeToken|
|
|Generate|TOK:WWK|Snake|||SnakeToken|
|
||||||
|Generate|TOK:WWK|Soldier Ally|||JoinTheRanksSoldierToken|
|
|Generate|TOK:WWK|Soldier Ally|||JoinTheRanksSoldierToken|
|
||||||
|Generate|TOK:WWK|Wolf|||WolfToken|
|
|Generate|TOK:WWK|Wolf|||WolfToken|
|
||||||
|
|Generate|TOK:XLN|Dinosaur|||DinosaurToken|
|
||||||
|
|Generate|TOK:XLN|Illusion|||JaceCunningCastawayIllusionToken|
|
||||||
|
|Generate|TOK:XLN|Merfolk|||MerfolkHexproofToken|
|
||||||
|
|Generate|TOK:XLN|Pirate|||PirateToken|
|
||||||
|
|Generate|TOK:XLN|Plant|||DefenderPlantToken|
|
||||||
|
|Generate|TOK:XLN|Treasure|1||TreasureToken|
|
||||||
|
|Generate|TOK:XLN|Treasure|2||TreasureToken|
|
||||||
|
|Generate|TOK:XLN|Treasure|3||TreasureToken|
|
||||||
|
|Generate|TOK:XLN|Treasure|4||TreasureToken|
|
||||||
|
|Generate|TOK:XLN|Vampire|||IxalanVampireToken|
|
||||||
|Generate|TOK:ZEN|Angel|||AngelToken|
|
|Generate|TOK:ZEN|Angel|||AngelToken|
|
||||||
|Generate|TOK:ZEN|Beast|||BeastToken2|
|
|Generate|TOK:ZEN|Beast|||BeastToken2|
|
||||||
|Generate|TOK:ZEN|Bird|||BirdToken|
|
|Generate|TOK:ZEN|Bird|||BirdToken|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
||||||
public final static int MAGE_VERSION_MAJOR = 1;
|
public final static int MAGE_VERSION_MAJOR = 1;
|
||||||
public final static int MAGE_VERSION_MINOR = 4;
|
public final static int MAGE_VERSION_MINOR = 4;
|
||||||
public final static int MAGE_VERSION_PATCH = 26;
|
public final static int MAGE_VERSION_PATCH = 26;
|
||||||
public final static String MAGE_VERSION_MINOR_PATCH = "V4";
|
public final static String MAGE_VERSION_MINOR_PATCH = "V5";
|
||||||
public final static String MAGE_VERSION_INFO = "";
|
public final static String MAGE_VERSION_INFO = "";
|
||||||
|
|
||||||
private final int major;
|
private final int major;
|
||||||
|
|
|
||||||
|
|
@ -35,14 +35,11 @@ import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
import mage.abilities.keyword.DoubleStrikeAbility;
|
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.abilities.text.TextPartSubType;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.filter.predicate.mageobject.TextPartSubtypePredicate;
|
|
||||||
import mage.filter.predicate.permanent.TappedPredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
@ -68,11 +65,7 @@ public class AtarkaWorldRender extends CardImpl {
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
// Whenever a Dragon you control attacks, it gains double strike until end of turn.
|
// Whenever a Dragon you control attacks, it gains double strike until end of turn.
|
||||||
TextPartSubType textPart1 = (TextPartSubType) addTextPart(new TextPartSubType(SubType.DRAGON));
|
this.addAbility(new AtarkaWorldRenderEffect());
|
||||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Dragon you control");
|
|
||||||
filter.add(new TextPartSubtypePredicate(textPart1));
|
|
||||||
filter.add(Predicates.not(new TappedPredicate()));
|
|
||||||
this.addAbility(new AtarkaWorldRenderEffect(filter));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,16 +81,18 @@ public class AtarkaWorldRender extends CardImpl {
|
||||||
|
|
||||||
class AtarkaWorldRenderEffect extends TriggeredAbilityImpl {
|
class AtarkaWorldRenderEffect extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
FilterControlledCreaturePermanent filter;
|
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("dragon you control");
|
||||||
|
|
||||||
public AtarkaWorldRenderEffect(FilterControlledCreaturePermanent filter) {
|
static {
|
||||||
|
filter.add(new SubtypePredicate(SubType.DRAGON));
|
||||||
|
}
|
||||||
|
|
||||||
|
public AtarkaWorldRenderEffect() {
|
||||||
super(Zone.BATTLEFIELD, new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
|
super(Zone.BATTLEFIELD, new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
|
||||||
this.filter = filter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AtarkaWorldRenderEffect(final AtarkaWorldRenderEffect ability) {
|
public AtarkaWorldRenderEffect(final AtarkaWorldRenderEffect ability) {
|
||||||
super(ability);
|
super(ability);
|
||||||
this.filter = ability.filter.copy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
113
Mage.Sets/src/mage/cards/b/Backslide.java
Normal file
113
Mage.Sets/src/mage/cards/b/Backslide.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.b;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureAllEffect;
|
||||||
|
import mage.abilities.keyword.CyclingAbility;
|
||||||
|
import mage.abilities.keyword.MorphAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.Predicate;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
|
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class Backslide extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a morph ability");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new AbilityPredicate(MorphAbility.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Backslide(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||||
|
|
||||||
|
// Turn target creature with a morph ability face down.
|
||||||
|
this.getSpellAbility().addEffect(new BackslideEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
|
||||||
|
// Cycling {U}
|
||||||
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{U}")));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Backslide(final Backslide card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Backslide copy() {
|
||||||
|
return new Backslide(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BackslideEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
BackslideEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "Turn target creature with a morph ability face down.";
|
||||||
|
}
|
||||||
|
|
||||||
|
BackslideEffect(final BackslideEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BackslideEffect copy() {
|
||||||
|
return new BackslideEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Predicate pred = new PermanentIdPredicate(UUID.randomUUID());
|
||||||
|
for (Target target : source.getTargets()) {
|
||||||
|
for (UUID targetId : target.getTargets()) {
|
||||||
|
pred = Predicates.or(pred, new PermanentIdPredicate(targetId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||||
|
filter.add(pred);
|
||||||
|
game.addEffect(new BecomesFaceDownCreatureAllEffect(filter), source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -52,7 +52,7 @@ public class BehindTheScenes extends CardImpl {
|
||||||
|
|
||||||
// Creatures you control have skulk.
|
// Creatures you control have skulk.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
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.
|
// {4}{W}: Creatures you control get +1/+1 until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||||
|
|
|
||||||
145
Mage.Sets/src/mage/cards/b/BloodOath.java
Normal file
145
Mage.Sets/src/mage/cards/b/BloodOath.java
Normal file
|
|
@ -0,0 +1,145 @@
|
||||||
|
/*
|
||||||
|
* 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.b;
|
||||||
|
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageObject;
|
||||||
|
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.choices.Choice;
|
||||||
|
import mage.choices.ChoiceImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class BloodOath extends CardImpl {
|
||||||
|
|
||||||
|
public BloodOath(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}");
|
||||||
|
|
||||||
|
// Choose a card type. Target opponent reveals his or her hand. Blood Oath deals 3 damage to that player for each card of the chosen type revealed this way.
|
||||||
|
this.getSpellAbility().addEffect(new BloodOathEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public BloodOath(final BloodOath card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BloodOath copy() {
|
||||||
|
return new BloodOath(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BloodOathEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private static final Set<String> choice = new LinkedHashSet<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
choice.add(CardType.ARTIFACT.toString());
|
||||||
|
choice.add(CardType.CREATURE.toString());
|
||||||
|
choice.add(CardType.ENCHANTMENT.toString());
|
||||||
|
choice.add(CardType.INSTANT.toString());
|
||||||
|
choice.add(CardType.LAND.toString());
|
||||||
|
choice.add(CardType.PLANESWALKER.toString());
|
||||||
|
choice.add(CardType.SORCERY.toString());
|
||||||
|
choice.add(CardType.TRIBAL.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public BloodOathEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "Choose a card type. Target opponent reveals his or her hand. {this} deals 3 damage to that player for each card of the chosen type revealed this way";
|
||||||
|
}
|
||||||
|
|
||||||
|
public BloodOathEffect(final BloodOathEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BloodOathEffect copy() {
|
||||||
|
return new BloodOathEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||||
|
if (player != null && opponent != null && sourceObject != null) {
|
||||||
|
Choice choiceImpl = new ChoiceImpl();
|
||||||
|
choiceImpl.setChoices(choice);
|
||||||
|
while (player.canRespond() && !player.choose(Outcome.Neutral, choiceImpl, game)) {
|
||||||
|
}
|
||||||
|
CardType type = null;
|
||||||
|
String choosenType = choiceImpl.getChoice();
|
||||||
|
|
||||||
|
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
||||||
|
type = CardType.ARTIFACT;
|
||||||
|
} else if (choosenType.equals(CardType.LAND.toString())) {
|
||||||
|
type = CardType.LAND;
|
||||||
|
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
||||||
|
type = CardType.CREATURE;
|
||||||
|
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||||
|
type = CardType.ENCHANTMENT;
|
||||||
|
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
||||||
|
type = CardType.INSTANT;
|
||||||
|
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
||||||
|
type = CardType.SORCERY;
|
||||||
|
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||||
|
type = CardType.PLANESWALKER;
|
||||||
|
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
||||||
|
type = CardType.TRIBAL;
|
||||||
|
}
|
||||||
|
if (type != null) {
|
||||||
|
Cards hand = opponent.getHand();
|
||||||
|
opponent.revealCards(sourceObject.getIdName(), hand, game);
|
||||||
|
Set<Card> cards = hand.getCards(game);
|
||||||
|
int count = 0;
|
||||||
|
for (Card card : cards) {
|
||||||
|
if (card != null && card.getCardType().contains(type)) {
|
||||||
|
count += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
opponent.damage(count * 3, source.getSourceId(), game, false, true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -85,7 +85,7 @@ public class BloodbondMarch extends CardImpl {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Spell spell = (Spell) game.getStack().getStackObject(targetPointer.getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
|
|
||||||
if (spell == null) {
|
if (spell == null) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ import mage.players.Player;
|
||||||
public class BounteousKirin extends CardImpl {
|
public class BounteousKirin extends CardImpl {
|
||||||
|
|
||||||
public BounteousKirin(UUID ownerId, CardSetInfo setInfo) {
|
public BounteousKirin(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
this.subtype.add(SubType.KIRIN, SubType.SPIRIT);
|
this.subtype.add(SubType.KIRIN, SubType.SPIRIT);
|
||||||
|
|
||||||
|
|
@ -89,7 +89,7 @@ class BounteousKirinEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getState().getStack().getSpell(getTargetPointer().getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ import mage.game.stack.Spell;
|
||||||
public class CelestialKirin extends CardImpl {
|
public class CelestialKirin extends CardImpl {
|
||||||
|
|
||||||
public CelestialKirin(UUID ownerId, CardSetInfo setInfo) {
|
public CelestialKirin(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
this.subtype.add(SubType.KIRIN);
|
this.subtype.add(SubType.KIRIN);
|
||||||
this.subtype.add(SubType.SPIRIT);
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
|
@ -92,7 +92,7 @@ class CelestialKirinEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getState().getStack().getSpell(getTargetPointer().getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
int cmc = spell.getConvertedManaCost();
|
int cmc = spell.getConvertedManaCost();
|
||||||
FilterPermanent filter = new FilterPermanent();
|
FilterPermanent filter = new FilterPermanent();
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ public class ChandraTheFirebrand extends CardImpl {
|
||||||
class ChandraTheFirebrandAbility extends DelayedTriggeredAbility {
|
class ChandraTheFirebrandAbility extends DelayedTriggeredAbility {
|
||||||
|
|
||||||
ChandraTheFirebrandAbility() {
|
ChandraTheFirebrandAbility() {
|
||||||
super(new CopyTargetSpellEffect(), Duration.EndOfTurn);
|
super(new CopyTargetSpellEffect(true), Duration.EndOfTurn);
|
||||||
}
|
}
|
||||||
|
|
||||||
ChandraTheFirebrandAbility(final ChandraTheFirebrandAbility ability) {
|
ChandraTheFirebrandAbility(final ChandraTheFirebrandAbility ability) {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ import mage.target.TargetPlayer;
|
||||||
public class CloudhoofKirin extends CardImpl {
|
public class CloudhoofKirin extends CardImpl {
|
||||||
|
|
||||||
public CloudhoofKirin(UUID ownerId, CardSetInfo setInfo) {
|
public CloudhoofKirin(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
this.subtype.add(SubType.KIRIN);
|
this.subtype.add(SubType.KIRIN);
|
||||||
this.subtype.add(SubType.SPIRIT);
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
|
@ -98,10 +98,10 @@ class CloudhoofKirinEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
Player targetPlayer = null;
|
Player targetPlayer = null;
|
||||||
for(Target target: source.getTargets()) {
|
for (Target target : source.getTargets()) {
|
||||||
if (target instanceof TargetPlayer) {
|
if (target instanceof TargetPlayer) {
|
||||||
targetPlayer = game.getPlayer(target.getFirstTarget());
|
targetPlayer = game.getPlayer(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class ClovenCasting extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}{R}");
|
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}{R}");
|
||||||
|
|
||||||
// Whenever you cast a multicolored instant or sorcery spell, you may pay {1}. If you do, copy that spell. You may choose new targets for the copy.
|
// Whenever you cast a multicolored instant or sorcery spell, you may pay {1}. If you do, copy that spell. You may choose new targets for the copy.
|
||||||
Effect effect = new CopyTargetSpellEffect();
|
Effect effect = new CopyTargetSpellEffect(true);
|
||||||
effect.setText("copy that spell. You may choose new targets for the copy");
|
effect.setText("copy that spell. You may choose new targets for the copy");
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new GenericManaCost(1)), filter, true, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new GenericManaCost(1)), filter, true, true));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
136
Mage.Sets/src/mage/cards/c/CulturalExchange.java
Normal file
136
Mage.Sets/src/mage/cards/c/CulturalExchange.java
Normal file
|
|
@ -0,0 +1,136 @@
|
||||||
|
/*
|
||||||
|
* 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.c;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class CulturalExchange extends CardImpl {
|
||||||
|
|
||||||
|
public CulturalExchange(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}");
|
||||||
|
|
||||||
|
// Choose any number of creatures target player controls. Choose the same number of creatures another target player controls. Those players exchange control of those creatures.
|
||||||
|
this.getSpellAbility().addEffect(new CulturalExchangeEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetPlayer(2));
|
||||||
|
}
|
||||||
|
|
||||||
|
public CulturalExchange(final CulturalExchange card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CulturalExchange copy() {
|
||||||
|
return new CulturalExchange(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CulturalExchangeEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
CulturalExchangeEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "Choose any number of creatures target player controls. "
|
||||||
|
+ "Choose the same number of creatures another target player controls. "
|
||||||
|
+ "Those players exchange control of those creatures.";
|
||||||
|
}
|
||||||
|
|
||||||
|
CulturalExchangeEffect(final CulturalExchangeEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CulturalExchangeEffect copy() {
|
||||||
|
return new CulturalExchangeEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player1 = game.getPlayer(targetPointer.getTargets(game, source).get(0));
|
||||||
|
Player player2 = game.getPlayer(targetPointer.getTargets(game, source).get(1));
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (player1 == null || player2 == null || controller == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
FilterCreaturePermanent filter1 = new FilterCreaturePermanent("creatures " + player1.getLogName() + " controls");
|
||||||
|
FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures " + player2.getLogName() + " controls");
|
||||||
|
filter1.add(new ControllerIdPredicate(player1.getId()));
|
||||||
|
filter2.add(new ControllerIdPredicate(player2.getId()));
|
||||||
|
int creatureCount1 = game.getBattlefield().count(filter1, source.getSourceId(), source.getControllerId(), game);
|
||||||
|
int creatureCount2 = game.getBattlefield().count(filter2, source.getSourceId(), source.getControllerId(), game);
|
||||||
|
int creaturesToSwitch = Math.min(creatureCount1, creatureCount2);
|
||||||
|
if (creaturesToSwitch == 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
TargetCreaturePermanent target1 = new TargetCreaturePermanent(0, creaturesToSwitch, filter1, true);
|
||||||
|
if (target1.choose(Outcome.Benefit, controller.getId(), source.getSourceId(), game)) {
|
||||||
|
int otherToSwitch = target1.getTargets().size();
|
||||||
|
TargetCreaturePermanent target2 = new TargetCreaturePermanent(otherToSwitch, otherToSwitch, filter2, true);
|
||||||
|
if (target2.choose(Outcome.Benefit, controller.getId(), source.getSourceId(), game)) {
|
||||||
|
for (UUID creatureId : target1.getTargets()) {
|
||||||
|
Permanent creature = game.getPermanent(creatureId);
|
||||||
|
if (creature != null) {
|
||||||
|
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, player2.getId());
|
||||||
|
game.informPlayers(player2.getLogName() + " gains control of " + creature.getLogName());
|
||||||
|
effect.setTargetPointer(new FixedTarget(creature, game));
|
||||||
|
game.addEffect(effect, source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (UUID creatureId : target2.getTargets()) {
|
||||||
|
Permanent creature = game.getPermanent(creatureId);
|
||||||
|
if (creature != null) {
|
||||||
|
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, player1.getId());
|
||||||
|
game.informPlayers(player1.getLogName() + " gains control of " + creature.getLogName());
|
||||||
|
effect.setTargetPointer(new FixedTarget(creature, game));
|
||||||
|
game.addEffect(effect, source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -58,7 +58,7 @@ import mage.target.targetpointer.FixedTarget;
|
||||||
public class CurseOfEchoes extends CardImpl {
|
public class CurseOfEchoes extends CardImpl {
|
||||||
|
|
||||||
public CurseOfEchoes(UUID ownerId, CardSetInfo setInfo) {
|
public CurseOfEchoes(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
|
||||||
this.subtype.add(SubType.AURA, SubType.CURSE);
|
this.subtype.add(SubType.AURA, SubType.CURSE);
|
||||||
|
|
||||||
// Enchant player
|
// Enchant player
|
||||||
|
|
@ -143,7 +143,7 @@ class CurseOfEchoesEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
String chooseMessage = "Copy target spell? You may choose new targets for the copy.";
|
String chooseMessage = "Copy target spell? You may choose new targets for the copy.";
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
|
|
|
||||||
|
|
@ -28,21 +28,17 @@
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
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.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.keyword.OverloadAbility;
|
import mage.abilities.keyword.OverloadAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.common.FilterNonlandPermanent;
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.target.common.TargetNonlandPermanent;
|
import mage.target.common.TargetNonlandPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -58,14 +54,16 @@ public class CyclonicRift extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CyclonicRift(UUID ownerId, CardSetInfo setInfo) {
|
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.
|
// Return target nonland permanent you don't control to its owner's hand.
|
||||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter));
|
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter));
|
||||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
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.")
|
// 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) {
|
public CyclonicRift(final CyclonicRift card) {
|
||||||
|
|
@ -77,33 +75,3 @@ public class CyclonicRift extends CardImpl {
|
||||||
return new CyclonicRift(this);
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
@ -92,12 +91,9 @@ class DovescapeEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
int spellCMC = 0;
|
int spellCMC = 0;
|
||||||
UUID spellControllerID = null;
|
UUID spellControllerID = null;
|
||||||
if (spell == null) {
|
|
||||||
spell = (Spell) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.STACK);
|
|
||||||
}
|
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
spellCMC = spell.getConvertedManaCost();
|
spellCMC = spell.getConvertedManaCost();
|
||||||
spellControllerID = spell.getControllerId();
|
spellControllerID = spell.getControllerId();
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -49,7 +50,7 @@ import mage.players.Player;
|
||||||
public class DuskmantleSeer extends CardImpl {
|
public class DuskmantleSeer extends CardImpl {
|
||||||
|
|
||||||
public DuskmantleSeer(UUID ownerId, CardSetInfo setInfo) {
|
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.VAMPIRE);
|
||||||
this.subtype.add(SubType.WIZARD);
|
this.subtype.add(SubType.WIZARD);
|
||||||
|
|
||||||
|
|
@ -91,15 +92,15 @@ class DuskmantleSeerEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Card sourceCard = game.getCard(source.getSourceId());
|
Permanent sourceCard = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
if (sourceCard == null) {
|
if (sourceCard == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (Player player: game.getPlayers().values()) {
|
for (Player player : game.getPlayers().values()) {
|
||||||
if(player.getLibrary().hasCards()){
|
if (player.getLibrary().hasCards()) {
|
||||||
Card card = player.getLibrary().removeFromTop(game);
|
Card card = player.getLibrary().removeFromTop(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
Cards cards = new CardsImpl();
|
Cards cards = new CardsImpl();
|
||||||
cards.add(card);
|
cards.add(card);
|
||||||
player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game);
|
player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game);
|
||||||
player.loseLife(card.getConvertedManaCost(), game, false);
|
player.loseLife(card.getConvertedManaCost(), game, false);
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.ThrullToken;
|
import mage.game.permanent.token.ThrullToken;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
|
@ -95,10 +94,7 @@ class EndrekSahrMasterBreederEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell == null) {
|
|
||||||
spell = (Spell) game.getLastKnownInformation(((FixedTarget) getTargetPointer()).getTarget(), Zone.STACK);
|
|
||||||
}
|
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
int cmc = spell.getConvertedManaCost();
|
int cmc = spell.getConvertedManaCost();
|
||||||
if (cmc > 0) {
|
if (cmc > 0) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
public class EntrancingMelody extends CardImpl {
|
public class EntrancingMelody extends CardImpl {
|
||||||
|
|
||||||
public EntrancingMelody(UUID ownerId, CardSetInfo setInfo) {
|
public EntrancingMelody(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{U}{U}");
|
||||||
|
|
||||||
// Gain control of target creature with converted mana cost X.
|
// Gain control of target creature with converted mana cost X.
|
||||||
this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.Custom, true));
|
this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.Custom, true));
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public class FarbogRevenant extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Skulk
|
// Skulk
|
||||||
this.addAbility(SkulkAbility.getInstance());
|
this.addAbility(new SkulkAbility());
|
||||||
|
|
||||||
// Lifelink
|
// Lifelink
|
||||||
this.addAbility(LifelinkAbility.getInstance());
|
this.addAbility(LifelinkAbility.getInstance());
|
||||||
|
|
|
||||||
146
Mage.Sets/src/mage/cards/f/FleshReaver.java
Normal file
146
Mage.Sets/src/mage/cards/f/FleshReaver.java
Normal file
|
|
@ -0,0 +1,146 @@
|
||||||
|
/*
|
||||||
|
* 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.f;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
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.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class FleshReaver extends CardImpl {
|
||||||
|
|
||||||
|
public FleshReaver(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.HORROR);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Whenever Flesh Reaver deals damage to a creature or opponent, Flesh Reaver deals that much damage to you.
|
||||||
|
this.addAbility(new FleshReaverTriggeredAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
public FleshReaver(final FleshReaver card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FleshReaver copy() {
|
||||||
|
return new FleshReaver(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FleshReaverTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
FleshReaverTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new FleshReaverEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
FleshReaverTriggeredAbility(final FleshReaverTriggeredAbility effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FleshReaverTriggeredAbility copy() {
|
||||||
|
return new FleshReaverTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.DAMAGED_CREATURE || event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
if (!event.getSourceId().equals(sourceId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) {
|
||||||
|
if (event.getTargetId().equals(controllerId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (Effect effect : this.getEffects()) {
|
||||||
|
effect.setValue("damage", event.getAmount());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever {this} deals damage to a creature or opponent, {this} deals that much damage to you.";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class FleshReaverEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
FleshReaverEffect() {
|
||||||
|
super(Outcome.Detriment);
|
||||||
|
this.staticText = "{this} deals that much damage to you.";
|
||||||
|
}
|
||||||
|
|
||||||
|
FleshReaverEffect(final FleshReaverEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FleshReaverEffect copy() {
|
||||||
|
return new FleshReaverEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
Permanent creature = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
|
if (creature == null || controller == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int damageToDeal = (Integer) getValue("damage");
|
||||||
|
if (damageToDeal > 0) {
|
||||||
|
controller.damage(damageToDeal, source.getSourceId(), game, false, true);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -60,7 +60,7 @@ public class Fogwalker extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Skulk
|
// 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.
|
// 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());
|
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect());
|
||||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class ForgottenCreation extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Skulk
|
// 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.
|
// 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));
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ForgottenCreationEffect(), TargetController.YOU, true));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class FurtiveHomunculus extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Skulk (This creature can't be blocked by creatures with greater power.)
|
// 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) {
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
117
Mage.Sets/src/mage/cards/g/GeminiEngine.java
Normal file
117
Mage.Sets/src/mage/cards/g/GeminiEngine.java
Normal file
|
|
@ -0,0 +1,117 @@
|
||||||
|
/*
|
||||||
|
* 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.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
|
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.token.GeminiEngineTwinToken;
|
||||||
|
import mage.game.permanent.token.Token;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class GeminiEngine extends CardImpl {
|
||||||
|
|
||||||
|
public GeminiEngine(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.CONSTRUCT);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Whenever Gemini Engine attacks, create a colorless Construct artifact creature token named Twin that's attacking. Its power is equal to Gemini Engine's power and its toughness is equal to Gemini Engine's toughness. Sacrifice the token at end of combat.
|
||||||
|
this.addAbility(new AttacksTriggeredAbility(new GeminiEngineCreateTokenEffect(), false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GeminiEngine(final GeminiEngine card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GeminiEngine copy() {
|
||||||
|
return new GeminiEngine(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GeminiEngineCreateTokenEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
GeminiEngineCreateTokenEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "create a colorless Construct artifact creature token named Twin that's attacking. Its power is equal to {this}'s power and its toughness is equal to {this}'s toughness. Sacrifice the token at end of combat.";
|
||||||
|
}
|
||||||
|
|
||||||
|
GeminiEngineCreateTokenEffect(final GeminiEngineCreateTokenEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GeminiEngineCreateTokenEffect copy() {
|
||||||
|
return new GeminiEngineCreateTokenEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
|
Token token;
|
||||||
|
if (permanent != null) {
|
||||||
|
token = new GeminiEngineTwinToken(permanent.getPower().getValue(), permanent.getToughness().getValue());
|
||||||
|
} else {
|
||||||
|
token = new GeminiEngineTwinToken(0, 0);
|
||||||
|
}
|
||||||
|
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, true);
|
||||||
|
for (UUID tokenId : token.getLastAddedTokenIds()) {
|
||||||
|
Permanent tokenPerm = game.getPermanent(tokenId);
|
||||||
|
if (tokenPerm != null) {
|
||||||
|
Effect effect = new SacrificeTargetEffect("sacrifice " + tokenPerm.getLogName(), player.getId());
|
||||||
|
effect.setTargetPointer(new FixedTarget(tokenPerm, game));
|
||||||
|
game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(effect), source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -50,7 +50,7 @@ import mage.target.targetpointer.FixedTarget;
|
||||||
public class HiveMind extends CardImpl {
|
public class HiveMind extends CardImpl {
|
||||||
|
|
||||||
public HiveMind(UUID ownerId, CardSetInfo setInfo) {
|
public HiveMind(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{U}");
|
||||||
|
|
||||||
// Whenever a player casts an instant or sorcery spell, each other player copies that spell. Each of those players may choose new targets for his or her copy.
|
// Whenever a player casts an instant or sorcery spell, each other player copies that spell. Each of those players may choose new targets for his or her copy.
|
||||||
this.addAbility(new HiveMindTriggeredAbility());
|
this.addAbility(new HiveMindTriggeredAbility());
|
||||||
|
|
@ -125,11 +125,7 @@ class HiveMindEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell;
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
spell = game.getStack().getSpell(((FixedTarget) getTargetPointer()).getTarget());
|
|
||||||
if (spell == null) { // if spell e.g. was countered
|
|
||||||
spell = (Spell) game.getLastKnownInformation(((FixedTarget) getTargetPointer()).getTarget(), Zone.STACK);
|
|
||||||
}
|
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (spell != null && player != null) {
|
if (spell != null && player != null) {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(player.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(player.getId(), game)) {
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ public class HowlOfTheHorde extends CardImpl {
|
||||||
class HowlOfTheHordeDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
class HowlOfTheHordeDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
|
|
||||||
HowlOfTheHordeDelayedTriggeredAbility() {
|
HowlOfTheHordeDelayedTriggeredAbility() {
|
||||||
super(new CopyTargetSpellEffect(), Duration.EndOfTurn);
|
super(new CopyTargetSpellEffect(true), Duration.EndOfTurn);
|
||||||
}
|
}
|
||||||
|
|
||||||
HowlOfTheHordeDelayedTriggeredAbility(final HowlOfTheHordeDelayedTriggeredAbility ability) {
|
HowlOfTheHordeDelayedTriggeredAbility(final HowlOfTheHordeDelayedTriggeredAbility ability) {
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ import mage.target.TargetPlayer;
|
||||||
public class InfernalKirin extends CardImpl {
|
public class InfernalKirin extends CardImpl {
|
||||||
|
|
||||||
public InfernalKirin(UUID ownerId, CardSetInfo setInfo) {
|
public InfernalKirin(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
this.subtype.add(SubType.KIRIN);
|
this.subtype.add(SubType.KIRIN);
|
||||||
this.subtype.add(SubType.SPIRIT);
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
|
@ -100,11 +100,11 @@ class InfernalKirinEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
int cmc = spell.getConvertedManaCost();
|
int cmc = spell.getConvertedManaCost();
|
||||||
Player targetPlayer = null;
|
Player targetPlayer = null;
|
||||||
for(Target target: source.getTargets()) {
|
for (Target target : source.getTargets()) {
|
||||||
if (target instanceof TargetPlayer) {
|
if (target instanceof TargetPlayer) {
|
||||||
targetPlayer = game.getPlayer(target.getFirstTarget());
|
targetPlayer = game.getPlayer(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +112,7 @@ class InfernalKirinEffect extends OneShotEffect {
|
||||||
if (targetPlayer != null) {
|
if (targetPlayer != null) {
|
||||||
if (!targetPlayer.getHand().isEmpty()) {
|
if (!targetPlayer.getHand().isEmpty()) {
|
||||||
targetPlayer.revealCards("Infernal Kirin", targetPlayer.getHand(), game);
|
targetPlayer.revealCards("Infernal Kirin", targetPlayer.getHand(), game);
|
||||||
for (UUID uuid: targetPlayer.getHand().copy()) {
|
for (UUID uuid : targetPlayer.getHand().copy()) {
|
||||||
Card card = game.getCard(uuid);
|
Card card = game.getCard(uuid);
|
||||||
if (card != null && card.getConvertedManaCost() == cmc) {
|
if (card != null && card.getConvertedManaCost() == cmc) {
|
||||||
targetPlayer.discard(card, source, game);
|
targetPlayer.discard(card, source, game);
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,9 @@ class IxalansBindingReplacementEffect extends ContinuousRuleModifyingEffectImpl
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||||
Card card = game.getCard(event.getSourceId());
|
Card card = game.getCard(event.getSourceId());
|
||||||
|
if(event.getPlayerId().equals(source.getControllerId())){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (sourcePermanent != null && card != null) {
|
if (sourcePermanent != null && card != null) {
|
||||||
UUID exileZone = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
UUID exileZone = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
if (exileZone != null) {
|
if (exileZone != null) {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ package mage.cards.k;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
|
@ -51,7 +50,7 @@ import mage.target.common.TargetCreatureOrPlayer;
|
||||||
public class KaervekTheMerciless extends CardImpl {
|
public class KaervekTheMerciless extends CardImpl {
|
||||||
|
|
||||||
public KaervekTheMerciless(UUID ownerId, CardSetInfo setInfo) {
|
public KaervekTheMerciless(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{R}");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
this.subtype.add(SubType.SHAMAN);
|
this.subtype.add(SubType.SHAMAN);
|
||||||
|
|
@ -94,9 +93,9 @@ class KaervekTheMercilessEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
MageObject spellCast = game.getObject(getTargetPointer().getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spellCast instanceof Spell) {
|
if (spell != null) {
|
||||||
int cost = ((Spell) spellCast).getConvertedManaCost();
|
int cost = spell.getConvertedManaCost();
|
||||||
Player target = game.getPlayer(source.getFirstTarget());
|
Player target = game.getPlayer(source.getFirstTarget());
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
target.damage(cost, source.getSourceId(), game, false, true);
|
target.damage(cost, source.getSourceId(), game, false, true);
|
||||||
|
|
|
||||||
120
Mage.Sets/src/mage/cards/m/MasterOfTheVeil.java
Normal file
120
Mage.Sets/src/mage/cards/m/MasterOfTheVeil.java
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
/*
|
||||||
|
* 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.TurnedFaceUpSourceTriggeredAbility;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureAllEffect;
|
||||||
|
import mage.abilities.keyword.MorphAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.Predicate;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
|
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class MasterOfTheVeil extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a morph ability");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new AbilityPredicate(MorphAbility.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MasterOfTheVeil(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.WIZARD);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Morph {2}{U}
|
||||||
|
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}")));
|
||||||
|
|
||||||
|
// When Master of the Veil is turned face up, you may turn target creature with a morph ability face down.
|
||||||
|
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new MasterOfTheVeilEffect(), false, true);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent(1, 1, filter, false));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MasterOfTheVeil(final MasterOfTheVeil card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MasterOfTheVeil copy() {
|
||||||
|
return new MasterOfTheVeil(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MasterOfTheVeilEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
MasterOfTheVeilEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "turn target creature with a morph ability face down";
|
||||||
|
}
|
||||||
|
|
||||||
|
MasterOfTheVeilEffect(final MasterOfTheVeilEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MasterOfTheVeilEffect copy() {
|
||||||
|
return new MasterOfTheVeilEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Predicate pred = new PermanentIdPredicate(UUID.randomUUID());
|
||||||
|
for (Target target : source.getTargets()) {
|
||||||
|
for (UUID targetId : target.getTargets()) {
|
||||||
|
pred = Predicates.or(pred, new PermanentIdPredicate(targetId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||||
|
filter.add(pred);
|
||||||
|
game.addEffect(new BecomesFaceDownCreatureAllEffect(filter), source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -79,7 +79,7 @@ public class MavrenFeinDuskApostle extends CardImpl {
|
||||||
|
|
||||||
class MavrenFeinDuskApostleTriggeredAbility extends TriggeredAbilityImpl {
|
class MavrenFeinDuskApostleTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken Vampire you control");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken Vampires you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.VAMPIRE));
|
filter.add(new SubtypePredicate(SubType.VAMPIRE));
|
||||||
|
|
@ -109,7 +109,7 @@ class MavrenFeinDuskApostleTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
for (UUID creatureId : game.getCombat().getAttackers()) {
|
for (UUID creatureId : game.getCombat().getAttackers()) {
|
||||||
Permanent creature = game.getPermanent(creatureId);
|
Permanent creature = game.getPermanent(creatureId);
|
||||||
if (creature != null && filter.match(creature, game)) {
|
if (creature != null && filter.match(creature, game) && creature.getControllerId().equals(controllerId)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.token.MetallurgicSummoningsConstructToken;
|
import mage.game.permanent.token.MetallurgicSummoningsConstructToken;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -106,10 +105,7 @@ class MetallurgicSummoningsTokenEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell == null) {
|
|
||||||
spell = (Spell) game.getLastKnownInformation(((FixedTarget) getTargetPointer()).getTarget(), Zone.STACK);
|
|
||||||
}
|
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
int cmc = spell.getConvertedManaCost();
|
int cmc = spell.getConvertedManaCost();
|
||||||
if (cmc > 0) {
|
if (cmc > 0) {
|
||||||
|
|
|
||||||
143
Mage.Sets/src/mage/cards/m/MindstormCrown.java
Normal file
143
Mage.Sets/src/mage/cards/m/MindstormCrown.java
Normal file
|
|
@ -0,0 +1,143 @@
|
||||||
|
/*
|
||||||
|
* 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.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.WatcherScope;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class MindstormCrown extends CardImpl {
|
||||||
|
|
||||||
|
public MindstormCrown(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, draw a card if you had no cards in hand at the beginning of this turn. If you had a card in hand, Mindstorm Crown deals 1 damage to you.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MindstormCrownEffect(), TargetController.YOU, false), new MindstormCrownWatcher());
|
||||||
|
}
|
||||||
|
|
||||||
|
public MindstormCrown(final MindstormCrown card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MindstormCrown copy() {
|
||||||
|
return new MindstormCrown(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MindstormCrownEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
MindstormCrownEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
MindstormCrownEffect(final MindstormCrownEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MindstormCrownEffect copy() {
|
||||||
|
return new MindstormCrownEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
MindstormCrownWatcher watcher = (MindstormCrownWatcher) game.getState().getWatchers().get(MindstormCrownWatcher.class.getSimpleName());
|
||||||
|
if (watcher != null && watcher.getCardsInHandCount() == 0) {
|
||||||
|
player.drawCards(1, game);
|
||||||
|
} else {
|
||||||
|
if (permanent != null) {
|
||||||
|
player.damage(2, permanent.getId(), game, false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MindstormCrownWatcher extends Watcher {
|
||||||
|
|
||||||
|
private int cardsInHandCount;
|
||||||
|
|
||||||
|
public MindstormCrownWatcher() {
|
||||||
|
super(MindstormCrownWatcher.class.getSimpleName(), WatcherScope.GAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MindstormCrownWatcher(final MindstormCrownWatcher watcher) {
|
||||||
|
super(watcher);
|
||||||
|
cardsInHandCount = watcher.cardsInHandCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void watch(GameEvent event, Game game) {
|
||||||
|
if (event.getType() == GameEvent.EventType.BEGINNING_PHASE_PRE
|
||||||
|
&& game.getPhase() != null) {
|
||||||
|
Player player = game.getPlayer(game.getActivePlayerId());
|
||||||
|
int cardsInHand = 0;
|
||||||
|
if (player != null) {
|
||||||
|
cardsInHand = player.getHand().size();
|
||||||
|
}
|
||||||
|
cardsInHandCount = cardsInHand;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCardsInHandCount() {
|
||||||
|
return cardsInHandCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reset() {
|
||||||
|
cardsInHandCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MindstormCrownWatcher copy() {
|
||||||
|
return new MindstormCrownWatcher(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -84,7 +84,7 @@ class MirariTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
MirariTriggeredAbility() {
|
MirariTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyTargetSpellEffect(), new GenericManaCost(3)), false);
|
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyTargetSpellEffect(true), new GenericManaCost(3)), false);
|
||||||
this.addTarget(new TargetSpell(filter));
|
this.addTarget(new TargetSpell(filter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ class OdricLunarchMarshalEffect extends OneShotEffect {
|
||||||
|
|
||||||
// Skulk
|
// Skulk
|
||||||
if (game.getBattlefield().contains(filterSkulk, source.getControllerId(), 1, game)) {
|
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
|
// Trample
|
||||||
|
|
@ -185,4 +185,4 @@ class OdricLunarchMarshalEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class PaleRiderOfTrostad extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Skulk
|
// Skulk
|
||||||
this.addAbility(SkulkAbility.getInstance());
|
this.addAbility(new SkulkAbility());
|
||||||
|
|
||||||
// When Pale Rider of Trostad enters the battlefield, discard a card.
|
// When Pale Rider of Trostad enters the battlefield, discard a card.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardControllerEffect(1), false));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardControllerEffect(1), false));
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public class PersistentNightmare extends CardImpl {
|
||||||
this.nightCard = true;
|
this.nightCard = true;
|
||||||
|
|
||||||
// Skulk
|
// 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.
|
// When Persistent Nightmare deals combat damage to a player, return it to its owner's hand.
|
||||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ReturnToHandSourceEffect(), false));
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ReturnToHandSourceEffect(), false));
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public class PrimalWellspring extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// When that mana is spent to cast an instant or sorcery spell, copy that spell and you may choose new targets for the copy.
|
// When that mana is spent to cast an instant or sorcery spell, copy that spell and you may choose new targets for the copy.
|
||||||
Effect effect = new CopyTargetSpellEffect();
|
Effect effect = new CopyTargetSpellEffect(true);
|
||||||
effect.setText("copy that spell and you may choose new targets for the copy");
|
effect.setText("copy that spell and you may choose new targets for the copy");
|
||||||
this.addAbility(new PyrimalWellspringTriggeredAbility(ability.getOriginalId(), effect));
|
this.addAbility(new PyrimalWellspringTriggeredAbility(ability.getOriginalId(), effect));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ class PyromancerAscensionQuestTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
class PyromancerAscensionCopyTriggeredAbility extends TriggeredAbilityImpl {
|
class PyromancerAscensionCopyTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
PyromancerAscensionCopyTriggeredAbility() {
|
PyromancerAscensionCopyTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), true);
|
super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(true), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyromancerAscensionCopyTriggeredAbility(final PyromancerAscensionCopyTriggeredAbility ability) {
|
PyromancerAscensionCopyTriggeredAbility(final PyromancerAscensionCopyTriggeredAbility ability) {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public class PyromancersGoggles extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// When that mana is used to cast a red instant or sorcery spell, copy that spell and you may choose new targets for the copy.
|
// When that mana is used to cast a red instant or sorcery spell, copy that spell and you may choose new targets for the copy.
|
||||||
Effect effect = new CopyTargetSpellEffect();
|
Effect effect = new CopyTargetSpellEffect(true);
|
||||||
effect.setText("copy that spell and you may choose new targets for the copy");
|
effect.setText("copy that spell and you may choose new targets for the copy");
|
||||||
this.addAbility(new PyromancersGogglesTriggeredAbility(ability.getOriginalId(), effect));
|
this.addAbility(new PyromancersGogglesTriggeredAbility(ability.getOriginalId(), effect));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ class RamosDragonEngineAddCountersEffect extends OneShotEffect {
|
||||||
Player you = game.getPlayer(source.getControllerId());
|
Player you = game.getPlayer(source.getControllerId());
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
if (you != null && permanent != null) {
|
if (you != null && permanent != null) {
|
||||||
Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
int amount = 0;
|
int amount = 0;
|
||||||
if (spell.getColor(game).isWhite()) {
|
if (spell.getColor(game).isWhite()) {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class RancidRats extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Skulk
|
// Skulk
|
||||||
this.addAbility(SkulkAbility.getInstance());
|
this.addAbility(new SkulkAbility());
|
||||||
// Deathtouch
|
// Deathtouch
|
||||||
this.addAbility(DeathtouchAbility.getInstance());
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
107
Mage.Sets/src/mage/cards/r/ReveilleSquad.java
Normal file
107
Mage.Sets/src/mage/cards/r/ReveilleSquad.java
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
* 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.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.condition.InvertCondition;
|
||||||
|
import mage.abilities.condition.common.SourceTappedCondition;
|
||||||
|
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class ReveilleSquad extends CardImpl {
|
||||||
|
|
||||||
|
public ReveilleSquad(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.REBEL);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Whenever one or more creatures attack you, if Reveille Squad is untapped, you may untap all creatures you control.
|
||||||
|
this.addAbility(new ReveilleSquadTriggeredAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReveilleSquad(final ReveilleSquad card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReveilleSquad copy() {
|
||||||
|
return new ReveilleSquad(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ReveilleSquadTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
public ReveilleSquadTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new UntapAllControllerEffect(new FilterCreaturePermanent("all creatures you control")), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReveilleSquadTriggeredAbility(final ReveilleSquadTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReveilleSquadTriggeredAbility copy() {
|
||||||
|
return new ReveilleSquadTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
return game.getCombat().getDefenders().contains(controllerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkInterveningIfClause(Game game) {
|
||||||
|
return new InvertCondition(SourceTappedCondition.instance).apply(game, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever one or more creatures attack you, if {this} is untapped, you may untap all creatures you control.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -78,7 +78,7 @@ public class RikuOfTwoReflections extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Whenever you cast an instant or sorcery spell, you may pay {U}{R}. If you do, copy that spell. You may choose new targets for the copy.
|
// Whenever you cast an instant or sorcery spell, you may pay {U}{R}. If you do, copy that spell. You may choose new targets for the copy.
|
||||||
Effect effect = new CopyTargetSpellEffect();
|
Effect effect = new CopyTargetSpellEffect(true);
|
||||||
effect.setText("copy that spell. You may choose new targets for the copy");
|
effect.setText("copy that spell. You may choose new targets for the copy");
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new ManaCostsImpl("{U}{R}")), filter, false, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new ManaCostsImpl("{U}{R}")), filter, false, true));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,6 @@ import java.util.UUID;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.abilities.condition.common.CardsInControllerGraveCondition;
|
|
||||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
|
|
@ -64,9 +62,7 @@ public class SearchForAzcanta extends CardImpl {
|
||||||
this.addSuperType(SuperType.LEGENDARY);
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
|
||||||
// At the beginning of your upkeep, look at the top card of your library. You may put it into your graveyard. Then if you have seven or more cards in your graveyard, you may transform Search for Azcanta.
|
// At the beginning of your upkeep, look at the top card of your library. You may put it into your graveyard. Then if you have seven or more cards in your graveyard, you may transform Search for Azcanta.
|
||||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SearchForAzcantaLookLibraryEffect(), TargetController.YOU, true);
|
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SearchForAzcantaLookLibraryEffect(), TargetController.YOU, false);
|
||||||
ability.addEffect(new ConditionalOneShotEffect(new TransformSourceEffect(true), new CardsInControllerGraveCondition(7),
|
|
||||||
"Then if you have seven or more cards in your graveyard, you may transform {this}"));
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
this.addAbility(new TransformAbility());
|
this.addAbility(new TransformAbility());
|
||||||
}
|
}
|
||||||
|
|
@ -85,7 +81,8 @@ class SearchForAzcantaLookLibraryEffect extends OneShotEffect {
|
||||||
|
|
||||||
public SearchForAzcantaLookLibraryEffect() {
|
public SearchForAzcantaLookLibraryEffect() {
|
||||||
super(Outcome.DrawCard);
|
super(Outcome.DrawCard);
|
||||||
this.staticText = "look at the top card of your library. You may put that card into your graveyard";
|
this.staticText = "look at the top card of your library. You may put that card into your graveyard. "
|
||||||
|
+ "Then if you have seven or more cards in your graveyard, you may transform {this}.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public SearchForAzcantaLookLibraryEffect(final SearchForAzcantaLookLibraryEffect effect) {
|
public SearchForAzcantaLookLibraryEffect(final SearchForAzcantaLookLibraryEffect effect) {
|
||||||
|
|
@ -109,9 +106,11 @@ class SearchForAzcantaLookLibraryEffect extends OneShotEffect {
|
||||||
cards.add(card);
|
cards.add(card);
|
||||||
controller.lookAtCards(sourceObject.getIdName(), cards, game);
|
controller.lookAtCards(sourceObject.getIdName(), cards, game);
|
||||||
if (controller.chooseUse(Outcome.Neutral, "Do you wish to put the card into your graveyard?", source, game)) {
|
if (controller.chooseUse(Outcome.Neutral, "Do you wish to put the card into your graveyard?", source, game)) {
|
||||||
return controller.moveCards(card, Zone.GRAVEYARD, source, game);
|
controller.moveCards(card, Zone.GRAVEYARD, source, game);
|
||||||
|
}
|
||||||
|
if (controller.getGraveyard().size() > 6 && controller.chooseUse(Outcome.Neutral, "Transform " + sourceObject.getLogName() + "?", source, game)) {
|
||||||
|
new TransformSourceEffect(true).apply(game, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public class SkeletonKey extends CardImpl {
|
||||||
this.subtype.add(SubType.EQUIPMENT);
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
|
|
||||||
// Equipped creature has skulk.
|
// 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.
|
// 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);
|
Ability ability = new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "equipped creature", true);
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,7 @@ public class SoulConduit extends CardImpl {
|
||||||
// {6}, {tap}: Two target players exchange life totals.
|
// {6}, {tap}: Two target players exchange life totals.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulConduitEffect(), new GenericManaCost(6));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulConduitEffect(), new GenericManaCost(6));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer(2));
|
||||||
ability.addTarget(new TargetPlayer());
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,8 +86,8 @@ class SoulConduitEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player1 = game.getPlayer(source.getFirstTarget());
|
Player player1 = game.getPlayer(source.getTargets().get(0).getTargets().get(0));
|
||||||
Player player2 = game.getPlayer(source.getTargets().get(1).getFirstTarget());
|
Player player2 = game.getPlayer(source.getTargets().get(0).getTargets().get(1));
|
||||||
if (player1 != null && player2 != null) {
|
if (player1 != null && player2 != null) {
|
||||||
int lifePlayer1 = player1.getLife();
|
int lifePlayer1 = player1.getLife();
|
||||||
int lifePlayer2 = player2.getLife();
|
int lifePlayer2 = player2.getLife();
|
||||||
|
|
|
||||||
118
Mage.Sets/src/mage/cards/s/StalkingYeti.java
Normal file
118
Mage.Sets/src/mage/cards/s/StalkingYeti.java
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
/*
|
||||||
|
* 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.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.common.SourceOnBattlefieldCondition;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
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.permanent.Permanent;
|
||||||
|
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class StalkingYeti extends CardImpl {
|
||||||
|
|
||||||
|
public StalkingYeti(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.SNOW);
|
||||||
|
this.subtype.add(SubType.YETI);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// When Stalking Yeti enters the battlefield, if it's on the battlefield, it deals damage equal to its power to target creature an opponent controls and that creature deals damage equal to its power to Stalking Yeti.
|
||||||
|
Ability ability = new ConditionalTriggeredAbility(
|
||||||
|
new EntersBattlefieldTriggeredAbility(new StalkingYetiEffect()),
|
||||||
|
SourceOnBattlefieldCondition.instance,
|
||||||
|
"When {this} enters the battlefield, if it's on the battlefield, "
|
||||||
|
+ "it deals damage equal to its power to target creature an opponent controls "
|
||||||
|
+ "and that creature deals damage equal to its power to {this}."
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// {2}{snow}: Return Stalking Yeti to its owner's hand. Activate this ability only any time you could cast a sorcery.
|
||||||
|
this.addAbility(new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{S}")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public StalkingYeti(final StalkingYeti card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StalkingYeti copy() {
|
||||||
|
return new StalkingYeti(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class StalkingYetiEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
StalkingYetiEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "it deals damage equal to its power to target creature an opponent controls "
|
||||||
|
+ "and that creature deals damage equal to its power to {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
StalkingYetiEffect(final StalkingYetiEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StalkingYetiEffect copy() {
|
||||||
|
return new StalkingYetiEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent thisCreature = game.getPermanent(source.getSourceId());
|
||||||
|
Permanent thatCreature = game.getPermanent(source.getFirstTarget());
|
||||||
|
if (thisCreature == null || thatCreature == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
thatCreature.damage(thisCreature.getPower().getValue(), thisCreature.getId(), game, false, true);
|
||||||
|
thisCreature.damage(thatCreature.getPower().getValue(), thatCreature.getId(), game, false, true);
|
||||||
|
return 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -92,7 +92,7 @@ class SunbirdsInvocationTriggeredAbility extends SpellCastControllerTriggeredAbi
|
||||||
if (spell != null && spell.getFromZone() == Zone.HAND) {
|
if (spell != null && spell.getFromZone() == Zone.HAND) {
|
||||||
if (spell.getCard() != null) {
|
if (spell.getCard() != null) {
|
||||||
for (Effect effect : getEffects()) {
|
for (Effect effect : getEffects()) {
|
||||||
effect.setTargetPointer(new FixedTarget(spell.getId(), spell.getZoneChangeCounter(game)));
|
effect.setTargetPointer(new FixedTarget(spell.getId()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -125,8 +125,12 @@ class SunbirdsInvocationEffect extends OneShotEffect {
|
||||||
if (controller == null || sourceObject == null) {
|
if (controller == null || sourceObject == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
|
if (spell == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int xValue = spell.getConvertedManaCost();
|
||||||
Cards cards = new CardsImpl();
|
Cards cards = new CardsImpl();
|
||||||
int xValue = game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.STACK).getConvertedManaCost();
|
|
||||||
cards.addAll(controller.getLibrary().getTopCards(game, xValue));
|
cards.addAll(controller.getLibrary().getTopCards(game, xValue));
|
||||||
if (!cards.isEmpty()) {
|
if (!cards.isEmpty()) {
|
||||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||||
|
|
@ -138,7 +142,7 @@ class SunbirdsInvocationEffect extends OneShotEffect {
|
||||||
if (controller.chooseTarget(Outcome.PlayForFree, cards, target, source, game)) {
|
if (controller.chooseTarget(Outcome.PlayForFree, cards, target, source, game)) {
|
||||||
Card card = cards.get(target.getFirstTarget(), game);
|
Card card = cards.get(target.getFirstTarget(), game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
if (controller.chooseUse(outcome, "Do you wish to cast " + card.getName(), source, game)) {
|
if (controller.chooseUse(outcome, "Cast " + card.getLogName() + " without paying its mana cost?", source, game)) {
|
||||||
controller.cast(card.getSpellAbility(), game, true);
|
controller.cast(card.getSpellAbility(), game, true);
|
||||||
cards.remove(card);
|
cards.remove(card);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class SwarmIntelligence extends CardImpl {
|
||||||
|
|
||||||
// Whenever you cast an instant or sorcery spell, you may copy that spell. You may choose new targets for the copy.
|
// Whenever you cast an instant or sorcery spell, you may copy that spell. You may choose new targets for the copy.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||||
new CopyTargetSpellEffect().setText("you may copy that spell. You may choose new targets for the copy"), new FilterInstantOrSorcerySpell("an instant or sorcery spell"), true, true));
|
new CopyTargetSpellEffect(true).setText("you may copy that spell. You may choose new targets for the copy"), new FilterInstantOrSorcerySpell("an instant or sorcery spell"), true, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SwarmIntelligence(final SwarmIntelligence card) {
|
public SwarmIntelligence(final SwarmIntelligence card) {
|
||||||
|
|
|
||||||
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,6 +27,8 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
|
@ -51,10 +53,10 @@ import mage.target.TargetPlayer;
|
||||||
public class TunnelVision extends CardImpl {
|
public class TunnelVision extends CardImpl {
|
||||||
|
|
||||||
public TunnelVision(UUID ownerId, CardSetInfo setInfo) {
|
public TunnelVision(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}");
|
||||||
|
|
||||||
// Name a card. Target player reveals cards from the top of his or her library until the named card is revealed.
|
// Name a card. Target player reveals cards from the top of his or her library until the named card is revealed.
|
||||||
// If it is, that player puts the rest of the revealed cards into his or her graveyard and puts the named card on top of his or her library.
|
// If it is, that player puts the rest of the revealed cards into his or her graveyard and puts the named card on top of his or her library.
|
||||||
// Otherwise, the player shuffles his or her library.
|
// Otherwise, the player shuffles his or her library.
|
||||||
this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL));
|
this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL));
|
||||||
this.getSpellAbility().addEffect(new TunnelVisionEffect());
|
this.getSpellAbility().addEffect(new TunnelVisionEffect());
|
||||||
|
|
@ -74,7 +76,7 @@ public class TunnelVision extends CardImpl {
|
||||||
class TunnelVisionEffect extends OneShotEffect {
|
class TunnelVisionEffect extends OneShotEffect {
|
||||||
|
|
||||||
public TunnelVisionEffect() {
|
public TunnelVisionEffect() {
|
||||||
super(Outcome.Damage);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "Target player reveals cards from the top of his or her library until the named card is revealed. If it is, that player puts the rest of the revealed cards into his or her graveyard and puts the named card on top of his or her library. Otherwise, the player shuffles his or her library.";
|
this.staticText = "Target player reveals cards from the top of his or her library until the named card is revealed. If it is, that player puts the rest of the revealed cards into his or her graveyard and puts the named card on top of his or her library. Otherwise, the player shuffles his or her library.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -90,16 +92,16 @@ class TunnelVisionEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);
|
String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);
|
||||||
if (sourceObject == null || targetPlayer == null || cardName == null || cardName.isEmpty()) {
|
if (sourceObject == null || targetPlayer == null || cardName == null || cardName.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Cards cardsToReveal = new CardsImpl();
|
Cards cardsToReveal = new CardsImpl();
|
||||||
Cards cardsToBury = new CardsImpl();
|
Set<Card> cardsToBury = new HashSet<>();
|
||||||
Card namedCard = null;
|
Card namedCard = null;
|
||||||
|
|
||||||
// reveal until named card found
|
// reveal until named card found
|
||||||
// if named card found, put all revealed cards in grave and put named card on top of library
|
// if named card found, put all revealed cards in grave and put named card on top of library
|
||||||
// if named card not found, shuffle library
|
// if named card not found, shuffle library
|
||||||
|
|
@ -117,15 +119,15 @@ class TunnelVisionEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
targetPlayer.revealCards(sourceObject.getIdName(), cardsToReveal, game);
|
targetPlayer.revealCards(sourceObject.getIdName(), cardsToReveal, game);
|
||||||
if (namedCardFound) {
|
if (namedCardFound) {
|
||||||
targetPlayer.moveCards(cardsToBury, Zone.GRAVEYARD, source, game);
|
targetPlayer.moveCards(cardsToBury, Zone.GRAVEYARD, source, game);
|
||||||
targetPlayer.moveCards(namedCard, Zone.LIBRARY, source, game);
|
targetPlayer.moveCards(namedCard, Zone.LIBRARY, source, game);
|
||||||
} else {
|
} else {
|
||||||
|
targetPlayer.getLibrary().addAll(cardsToBury, game);
|
||||||
targetPlayer.shuffleLibrary(source, game);
|
targetPlayer.shuffleLibrary(source, game);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public class UninvitedGeist extends CardImpl {
|
||||||
this.secondSideCardClazz = UnimpededTrespasser.class;
|
this.secondSideCardClazz = UnimpededTrespasser.class;
|
||||||
|
|
||||||
// Skulk (This creature can't be blocked by creatures with greater power.)
|
// 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.
|
// When Uninvited Geist deals combat damage to a player, transform it.
|
||||||
this.addAbility(new TransformAbility());
|
this.addAbility(new TransformAbility());
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class VampireCutthroat extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Skulk
|
// Skulk
|
||||||
this.addAbility(SkulkAbility.getInstance());
|
this.addAbility(new SkulkAbility());
|
||||||
// Lifelink
|
// Lifelink
|
||||||
this.addAbility(LifelinkAbility.getInstance());
|
this.addAbility(LifelinkAbility.getInstance());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
121
Mage.Sets/src/mage/cards/w/WeaverOfLies.java
Normal file
121
Mage.Sets/src/mage/cards/w/WeaverOfLies.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.w;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureAllEffect;
|
||||||
|
import mage.abilities.keyword.MorphAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.Predicate;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
|
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class WeaverOfLies extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creatures with a morph ability");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new AbilityPredicate(MorphAbility.class));
|
||||||
|
filter.add(new AnotherPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public WeaverOfLies(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.BEAST);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Morph {4}{U}
|
||||||
|
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{U}")));
|
||||||
|
|
||||||
|
// When Weaver of Lies is turned face up, turn any number of target creatures with a morph ability other than Weaver of Lies face down.
|
||||||
|
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new WeaverOfLiesEffect(), false, false);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE, filter, false));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WeaverOfLies(final WeaverOfLies card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WeaverOfLies copy() {
|
||||||
|
return new WeaverOfLies(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WeaverOfLiesEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
WeaverOfLiesEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "turn any number of target creatures with a morph ability other than {this} face down";
|
||||||
|
}
|
||||||
|
|
||||||
|
WeaverOfLiesEffect(final WeaverOfLiesEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WeaverOfLiesEffect copy() {
|
||||||
|
return new WeaverOfLiesEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Predicate pred = new PermanentIdPredicate(UUID.randomUUID());
|
||||||
|
for (Target target : source.getTargets()) {
|
||||||
|
for (UUID targetId : target.getTargets()) {
|
||||||
|
pred = Predicates.or(pred, new PermanentIdPredicate(targetId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||||
|
filter.add(pred);
|
||||||
|
game.addEffect(new BecomesFaceDownCreatureAllEffect(filter), source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -62,7 +62,7 @@ public class WharfInfiltrator extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Skulk
|
// 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.
|
// Whenever Wharf Infiltrator deals combat damage to a player, you may draw a card. If you do, discard a card.
|
||||||
Effect effect = new DrawDiscardControllerEffect();
|
Effect effect = new DrawDiscardControllerEffect();
|
||||||
|
|
|
||||||
|
|
@ -154,10 +154,7 @@ class ZadaHedronGrinderEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||||
if (spell == null) {
|
|
||||||
spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK);
|
|
||||||
}
|
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (spell != null && controller != null) {
|
if (spell != null && controller != null) {
|
||||||
// search the target that targets source
|
// search the target that targets source
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ public class Coldsnap extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Snow-Covered Swamp", 153, Rarity.COMMON, mage.cards.s.SnowCoveredSwamp.class));
|
cards.add(new SetCardInfo("Snow-Covered Swamp", 153, Rarity.COMMON, mage.cards.s.SnowCoveredSwamp.class));
|
||||||
cards.add(new SetCardInfo("Soul Spike", 70, Rarity.RARE, mage.cards.s.SoulSpike.class));
|
cards.add(new SetCardInfo("Soul Spike", 70, Rarity.RARE, mage.cards.s.SoulSpike.class));
|
||||||
cards.add(new SetCardInfo("Squall Drifter", 17, Rarity.COMMON, mage.cards.s.SquallDrifter.class));
|
cards.add(new SetCardInfo("Squall Drifter", 17, Rarity.COMMON, mage.cards.s.SquallDrifter.class));
|
||||||
|
cards.add(new SetCardInfo("Stalking Yeti", 98, Rarity.UNCOMMON, mage.cards.s.StalkingYeti.class));
|
||||||
cards.add(new SetCardInfo("Steam Spitter", 124, Rarity.UNCOMMON, mage.cards.s.SteamSpitter.class));
|
cards.add(new SetCardInfo("Steam Spitter", 124, Rarity.UNCOMMON, mage.cards.s.SteamSpitter.class));
|
||||||
cards.add(new SetCardInfo("Stromgald Crusader", 71, Rarity.UNCOMMON, mage.cards.s.StromgaldCrusader.class));
|
cards.add(new SetCardInfo("Stromgald Crusader", 71, Rarity.UNCOMMON, mage.cards.s.StromgaldCrusader.class));
|
||||||
cards.add(new SetCardInfo("Sun's Bounty", 18, Rarity.COMMON, mage.cards.s.SunsBounty.class));
|
cards.add(new SetCardInfo("Sun's Bounty", 18, Rarity.COMMON, mage.cards.s.SunsBounty.class));
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ public class Darksteel extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Fireball", 60, Rarity.UNCOMMON, mage.cards.f.Fireball.class));
|
cards.add(new SetCardInfo("Fireball", 60, Rarity.UNCOMMON, mage.cards.f.Fireball.class));
|
||||||
cards.add(new SetCardInfo("Flamebreak", 61, Rarity.RARE, mage.cards.f.Flamebreak.class));
|
cards.add(new SetCardInfo("Flamebreak", 61, Rarity.RARE, mage.cards.f.Flamebreak.class));
|
||||||
cards.add(new SetCardInfo("Furnace Dragon", 62, Rarity.RARE, mage.cards.f.FurnaceDragon.class));
|
cards.add(new SetCardInfo("Furnace Dragon", 62, Rarity.RARE, mage.cards.f.FurnaceDragon.class));
|
||||||
|
cards.add(new SetCardInfo("Gemini Engine", 121, Rarity.RARE, mage.cards.g.GeminiEngine.class));
|
||||||
cards.add(new SetCardInfo("Genesis Chamber", 122, Rarity.UNCOMMON, mage.cards.g.GenesisChamber.class));
|
cards.add(new SetCardInfo("Genesis Chamber", 122, Rarity.UNCOMMON, mage.cards.g.GenesisChamber.class));
|
||||||
cards.add(new SetCardInfo("Geth's Grimoire", 123, Rarity.UNCOMMON, mage.cards.g.GethsGrimoire.class));
|
cards.add(new SetCardInfo("Geth's Grimoire", 123, Rarity.UNCOMMON, mage.cards.g.GethsGrimoire.class));
|
||||||
cards.add(new SetCardInfo("Goblin Archaeologist", 63, Rarity.UNCOMMON, mage.cards.g.GoblinArchaeologist.class));
|
cards.add(new SetCardInfo("Goblin Archaeologist", 63, Rarity.UNCOMMON, mage.cards.g.GoblinArchaeologist.class));
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,7 @@ public class Legions extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Lowland Tracker", 17, Rarity.COMMON, mage.cards.l.LowlandTracker.class));
|
cards.add(new SetCardInfo("Lowland Tracker", 17, Rarity.COMMON, mage.cards.l.LowlandTracker.class));
|
||||||
cards.add(new SetCardInfo("Macetail Hystrodon", 106, Rarity.COMMON, mage.cards.m.MacetailHystrodon.class));
|
cards.add(new SetCardInfo("Macetail Hystrodon", 106, Rarity.COMMON, mage.cards.m.MacetailHystrodon.class));
|
||||||
cards.add(new SetCardInfo("Magma Sliver", 107, Rarity.RARE, mage.cards.m.MagmaSliver.class));
|
cards.add(new SetCardInfo("Magma Sliver", 107, Rarity.RARE, mage.cards.m.MagmaSliver.class));
|
||||||
|
cards.add(new SetCardInfo("Master of the Veil", 43, Rarity.UNCOMMON, mage.cards.m.MasterOfTheVeil.class));
|
||||||
cards.add(new SetCardInfo("Merchant of Secrets", 44, Rarity.COMMON, mage.cards.m.MerchantOfSecrets.class));
|
cards.add(new SetCardInfo("Merchant of Secrets", 44, Rarity.COMMON, mage.cards.m.MerchantOfSecrets.class));
|
||||||
cards.add(new SetCardInfo("Mistform Sliver", 46, Rarity.COMMON, mage.cards.m.MistformSliver.class));
|
cards.add(new SetCardInfo("Mistform Sliver", 46, Rarity.COMMON, mage.cards.m.MistformSliver.class));
|
||||||
cards.add(new SetCardInfo("Mistform Ultimus", 47, Rarity.RARE, mage.cards.m.MistformUltimus.class));
|
cards.add(new SetCardInfo("Mistform Ultimus", 47, Rarity.RARE, mage.cards.m.MistformUltimus.class));
|
||||||
|
|
@ -178,6 +179,7 @@ public class Legions extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Wall of Hope", 24, Rarity.COMMON, mage.cards.w.WallOfHope.class));
|
cards.add(new SetCardInfo("Wall of Hope", 24, Rarity.COMMON, mage.cards.w.WallOfHope.class));
|
||||||
cards.add(new SetCardInfo("Warbreak Trumpeter", 116, Rarity.UNCOMMON, mage.cards.w.WarbreakTrumpeter.class));
|
cards.add(new SetCardInfo("Warbreak Trumpeter", 116, Rarity.UNCOMMON, mage.cards.w.WarbreakTrumpeter.class));
|
||||||
cards.add(new SetCardInfo("Ward Sliver", 25, Rarity.UNCOMMON, mage.cards.w.WardSliver.class));
|
cards.add(new SetCardInfo("Ward Sliver", 25, Rarity.UNCOMMON, mage.cards.w.WardSliver.class));
|
||||||
|
cards.add(new SetCardInfo("Weaver of Lies", 57, Rarity.RARE, mage.cards.w.WeaverOfLies.class));
|
||||||
cards.add(new SetCardInfo("White Knight", 27, Rarity.UNCOMMON, mage.cards.w.WhiteKnight.class));
|
cards.add(new SetCardInfo("White Knight", 27, Rarity.UNCOMMON, mage.cards.w.WhiteKnight.class));
|
||||||
cards.add(new SetCardInfo("Willbender", 58, Rarity.UNCOMMON, mage.cards.w.Willbender.class));
|
cards.add(new SetCardInfo("Willbender", 58, Rarity.UNCOMMON, mage.cards.w.Willbender.class));
|
||||||
cards.add(new SetCardInfo("Windborn Muse", 28, Rarity.RARE, mage.cards.w.WindbornMuse.class));
|
cards.add(new SetCardInfo("Windborn Muse", 28, Rarity.RARE, mage.cards.w.WindbornMuse.class));
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ public class MercadianMasques extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Blaster Mage", 175, Rarity.COMMON, mage.cards.b.BlasterMage.class));
|
cards.add(new SetCardInfo("Blaster Mage", 175, Rarity.COMMON, mage.cards.b.BlasterMage.class));
|
||||||
cards.add(new SetCardInfo("Blockade Runner", 60, Rarity.COMMON, mage.cards.b.BlockadeRunner.class));
|
cards.add(new SetCardInfo("Blockade Runner", 60, Rarity.COMMON, mage.cards.b.BlockadeRunner.class));
|
||||||
cards.add(new SetCardInfo("Blood Hound", 176, Rarity.RARE, mage.cards.b.BloodHound.class));
|
cards.add(new SetCardInfo("Blood Hound", 176, Rarity.RARE, mage.cards.b.BloodHound.class));
|
||||||
|
cards.add(new SetCardInfo("Blood Oath", 177, Rarity.RARE, mage.cards.b.BloodOath.class));
|
||||||
cards.add(new SetCardInfo("Boa Constrictor", 231, Rarity.UNCOMMON, mage.cards.b.BoaConstrictor.class));
|
cards.add(new SetCardInfo("Boa Constrictor", 231, Rarity.UNCOMMON, mage.cards.b.BoaConstrictor.class));
|
||||||
cards.add(new SetCardInfo("Bog Smugglers", 117, Rarity.COMMON, mage.cards.b.BogSmugglers.class));
|
cards.add(new SetCardInfo("Bog Smugglers", 117, Rarity.COMMON, mage.cards.b.BogSmugglers.class));
|
||||||
cards.add(new SetCardInfo("Bog Witch", 118, Rarity.COMMON, mage.cards.b.BogWitch.class));
|
cards.add(new SetCardInfo("Bog Witch", 118, Rarity.COMMON, mage.cards.b.BogWitch.class));
|
||||||
|
|
@ -151,6 +152,7 @@ public class MercadianMasques extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Fountain Watch", 19, Rarity.RARE, mage.cards.f.FountainWatch.class));
|
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("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("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("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("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));
|
cards.add(new SetCardInfo("Giant Caterpillar", 249, Rarity.COMMON, mage.cards.g.GiantCaterpillar.class));
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ public class Mirrodin extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Mesmeric Orb", 204, Rarity.RARE, mage.cards.m.MesmericOrb.class));
|
cards.add(new SetCardInfo("Mesmeric Orb", 204, Rarity.RARE, mage.cards.m.MesmericOrb.class));
|
||||||
cards.add(new SetCardInfo("Mind's Eye", 205, Rarity.RARE, mage.cards.m.MindsEye.class));
|
cards.add(new SetCardInfo("Mind's Eye", 205, Rarity.RARE, mage.cards.m.MindsEye.class));
|
||||||
cards.add(new SetCardInfo("Mindslaver", 206, Rarity.RARE, mage.cards.m.Mindslaver.class));
|
cards.add(new SetCardInfo("Mindslaver", 206, Rarity.RARE, mage.cards.m.Mindslaver.class));
|
||||||
|
cards.add(new SetCardInfo("Mindstorm Crown", 207, Rarity.UNCOMMON, mage.cards.m.MindstormCrown.class));
|
||||||
cards.add(new SetCardInfo("Molder Slug", 125, Rarity.RARE, mage.cards.m.MolderSlug.class));
|
cards.add(new SetCardInfo("Molder Slug", 125, Rarity.RARE, mage.cards.m.MolderSlug.class));
|
||||||
cards.add(new SetCardInfo("Molten Rain", 101, Rarity.COMMON, mage.cards.m.MoltenRain.class));
|
cards.add(new SetCardInfo("Molten Rain", 101, Rarity.COMMON, mage.cards.m.MoltenRain.class));
|
||||||
cards.add(new SetCardInfo("Moriok Scavenger", 68, Rarity.COMMON, mage.cards.m.MoriokScavenger.class));
|
cards.add(new SetCardInfo("Moriok Scavenger", 68, Rarity.COMMON, mage.cards.m.MoriokScavenger.class));
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ public class Odyssey extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Crashing Centaur", 235, Rarity.UNCOMMON, mage.cards.c.CrashingCentaur.class));
|
cards.add(new SetCardInfo("Crashing Centaur", 235, Rarity.UNCOMMON, mage.cards.c.CrashingCentaur.class));
|
||||||
cards.add(new SetCardInfo("Crypt Creeper", 125, Rarity.COMMON, mage.cards.c.CryptCreeper.class));
|
cards.add(new SetCardInfo("Crypt Creeper", 125, Rarity.COMMON, mage.cards.c.CryptCreeper.class));
|
||||||
cards.add(new SetCardInfo("Crystal Quarry", 318, Rarity.RARE, mage.cards.c.CrystalQuarry.class));
|
cards.add(new SetCardInfo("Crystal Quarry", 318, Rarity.RARE, mage.cards.c.CrystalQuarry.class));
|
||||||
|
cards.add(new SetCardInfo("Cultural Exchange", 79, Rarity.RARE, mage.cards.c.CulturalExchange.class));
|
||||||
cards.add(new SetCardInfo("Cursed Monstrosity", 126, Rarity.RARE, mage.cards.c.CursedMonstrosity.class));
|
cards.add(new SetCardInfo("Cursed Monstrosity", 126, Rarity.RARE, mage.cards.c.CursedMonstrosity.class));
|
||||||
cards.add(new SetCardInfo("Darkwater Catacombs", 319, Rarity.RARE, mage.cards.d.DarkwaterCatacombs.class));
|
cards.add(new SetCardInfo("Darkwater Catacombs", 319, Rarity.RARE, mage.cards.d.DarkwaterCatacombs.class));
|
||||||
cards.add(new SetCardInfo("Darkwater Egg", 299, Rarity.UNCOMMON, mage.cards.d.DarkwaterEgg.class));
|
cards.add(new SetCardInfo("Darkwater Egg", 299, Rarity.UNCOMMON, mage.cards.d.DarkwaterEgg.class));
|
||||||
|
|
@ -214,6 +215,7 @@ public class Odyssey extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Metamorphic Wurm", 250, Rarity.UNCOMMON, mage.cards.m.MetamorphicWurm.class));
|
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("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("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("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("Mirari", 303, Rarity.RARE, mage.cards.m.Mirari.class));
|
||||||
cards.add(new SetCardInfo("Molten Influence", 207, Rarity.RARE, mage.cards.m.MoltenInfluence.class));
|
cards.add(new SetCardInfo("Molten Influence", 207, Rarity.RARE, mage.cards.m.MoltenInfluence.class));
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ public class Onslaught extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Aven Brigadier", 7, Rarity.RARE, mage.cards.a.AvenBrigadier.class));
|
cards.add(new SetCardInfo("Aven Brigadier", 7, Rarity.RARE, mage.cards.a.AvenBrigadier.class));
|
||||||
cards.add(new SetCardInfo("Aven Fateshaper", 69, Rarity.UNCOMMON, mage.cards.a.AvenFateshaper.class));
|
cards.add(new SetCardInfo("Aven Fateshaper", 69, Rarity.UNCOMMON, mage.cards.a.AvenFateshaper.class));
|
||||||
cards.add(new SetCardInfo("Aven Soulgazer", 8, Rarity.UNCOMMON, mage.cards.a.AvenSoulgazer.class));
|
cards.add(new SetCardInfo("Aven Soulgazer", 8, Rarity.UNCOMMON, mage.cards.a.AvenSoulgazer.class));
|
||||||
|
cards.add(new SetCardInfo("Backslide", 70, Rarity.COMMON, mage.cards.b.Backslide.class));
|
||||||
cards.add(new SetCardInfo("Barkhide Mauler", 246, Rarity.COMMON, mage.cards.b.BarkhideMauler.class));
|
cards.add(new SetCardInfo("Barkhide Mauler", 246, Rarity.COMMON, mage.cards.b.BarkhideMauler.class));
|
||||||
cards.add(new SetCardInfo("Barren Moor", 312, Rarity.COMMON, mage.cards.b.BarrenMoor.class));
|
cards.add(new SetCardInfo("Barren Moor", 312, Rarity.COMMON, mage.cards.b.BarrenMoor.class));
|
||||||
cards.add(new SetCardInfo("Battering Craghorn", 188, Rarity.COMMON, mage.cards.b.BatteringCraghorn.class));
|
cards.add(new SetCardInfo("Battering Craghorn", 188, Rarity.COMMON, mage.cards.b.BatteringCraghorn.class));
|
||||||
|
|
@ -276,6 +277,7 @@ public class Onslaught extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Starlit Sanctum", 325, Rarity.UNCOMMON, mage.cards.s.StarlitSanctum.class));
|
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("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("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("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("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));
|
cards.add(new SetCardInfo("Swamp", 339, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ public class Prophecy extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Quicksilver Wall", 41, Rarity.UNCOMMON, mage.cards.q.QuicksilverWall.class));
|
cards.add(new SetCardInfo("Quicksilver Wall", 41, Rarity.UNCOMMON, mage.cards.q.QuicksilverWall.class));
|
||||||
cards.add(new SetCardInfo("Rebel Informer", 75, Rarity.RARE, mage.cards.r.RebelInformer.class));
|
cards.add(new SetCardInfo("Rebel Informer", 75, Rarity.RARE, mage.cards.r.RebelInformer.class));
|
||||||
cards.add(new SetCardInfo("Rethink", 42, Rarity.COMMON, mage.cards.r.Rethink.class));
|
cards.add(new SetCardInfo("Rethink", 42, Rarity.COMMON, mage.cards.r.Rethink.class));
|
||||||
|
cards.add(new SetCardInfo("Reveille Squad", 18, Rarity.UNCOMMON, mage.cards.r.ReveilleSquad.class));
|
||||||
cards.add(new SetCardInfo("Rhystic Circle", 19, Rarity.COMMON, mage.cards.r.RhysticCircle.class));
|
cards.add(new SetCardInfo("Rhystic Circle", 19, Rarity.COMMON, mage.cards.r.RhysticCircle.class));
|
||||||
cards.add(new SetCardInfo("Rhystic Study", 45, Rarity.COMMON, mage.cards.r.RhysticStudy.class));
|
cards.add(new SetCardInfo("Rhystic Study", 45, Rarity.COMMON, mage.cards.r.RhysticStudy.class));
|
||||||
cards.add(new SetCardInfo("Rhystic Tutor", 77, Rarity.RARE, mage.cards.r.RhysticTutor.class));
|
cards.add(new SetCardInfo("Rhystic Tutor", 77, Rarity.RARE, mage.cards.r.RhysticTutor.class));
|
||||||
|
|
|
||||||
|
|
@ -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("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("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("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("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("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));
|
cards.add(new SetCardInfo("Seton's Scout", 138, Rarity.UNCOMMON, mage.cards.s.SetonsScout.class));
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,7 @@ public class UrzasSaga extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Fertile Ground", 252, Rarity.COMMON, mage.cards.f.FertileGround.class));
|
cards.add(new SetCardInfo("Fertile Ground", 252, Rarity.COMMON, mage.cards.f.FertileGround.class));
|
||||||
cards.add(new SetCardInfo("Fiery Mantle", 186, Rarity.COMMON, mage.cards.f.FieryMantle.class));
|
cards.add(new SetCardInfo("Fiery Mantle", 186, Rarity.COMMON, mage.cards.f.FieryMantle.class));
|
||||||
cards.add(new SetCardInfo("Fire Ants", 187, Rarity.UNCOMMON, mage.cards.f.FireAnts.class));
|
cards.add(new SetCardInfo("Fire Ants", 187, Rarity.UNCOMMON, mage.cards.f.FireAnts.class));
|
||||||
|
cards.add(new SetCardInfo("Flesh Reaver", 136, Rarity.UNCOMMON, mage.cards.f.FleshReaver.class));
|
||||||
cards.add(new SetCardInfo("Fluctuator", 295, Rarity.RARE, mage.cards.f.Fluctuator.class));
|
cards.add(new SetCardInfo("Fluctuator", 295, Rarity.RARE, mage.cards.f.Fluctuator.class));
|
||||||
cards.add(new SetCardInfo("Fog Bank", 75, Rarity.UNCOMMON, mage.cards.f.FogBank.class));
|
cards.add(new SetCardInfo("Fog Bank", 75, Rarity.UNCOMMON, mage.cards.f.FogBank.class));
|
||||||
cards.add(new SetCardInfo("Forest", 347, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Forest", 347, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
|
||||||
|
|
@ -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("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("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("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("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("Thunderbolt", 115, Rarity.COMMON, mage.cards.t.Thunderbolt.class));
|
||||||
cards.add(new SetCardInfo("Thundermare", 116, Rarity.RARE, mage.cards.t.Thundermare.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
|
Reported bug: Behind the Scenes grants skulk to all creatures instead of just ones under owner's control
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void behindTheScenesShouldOnlyGrantSkulkToCreaturesYouControl() {
|
public void behindTheScenesShouldOnlyGrantSkulkToCreaturesYouControl() {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Behind the Scenes {2}{B}
|
Behind the Scenes {2}{B}
|
||||||
Enchantment
|
Enchantment
|
||||||
Creatures you control have skulk. (They can't be blocked by creatures with greater power.)
|
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
|
{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 hGiant = "Hill Giant"; // {3}{R} 3/3
|
||||||
String bSable = "Bronze Sable"; // {2} 2/1
|
String bSable = "Bronze Sable"; // {2} 2/1
|
||||||
String memnite = "Memnite"; // {0} 1/1
|
String memnite = "Memnite"; // {0} 1/1
|
||||||
String gBears = "Grizzly Bears"; // {1}{G} 2/2
|
String gBears = "Grizzly Bears"; // {1}{G} 2/2
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, bScenes);
|
addCard(Zone.BATTLEFIELD, playerA, bScenes);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, hGiant);
|
addCard(Zone.BATTLEFIELD, playerA, hGiant);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, bSable);
|
addCard(Zone.BATTLEFIELD, playerA, bSable);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, memnite);
|
addCard(Zone.BATTLEFIELD, playerB, memnite);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, gBears);
|
addCard(Zone.BATTLEFIELD, playerB, gBears);
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertAbility(playerA, hGiant, SkulkAbility.getInstance(), true);
|
assertAbility(playerA, hGiant, new SkulkAbility(), true);
|
||||||
assertAbility(playerA, bSable, SkulkAbility.getInstance(), true);
|
assertAbility(playerA, bSable, new SkulkAbility(), true);
|
||||||
assertAbility(playerB, memnite, SkulkAbility.getInstance(), false);
|
assertAbility(playerB, memnite, new SkulkAbility(), false);
|
||||||
assertAbility(playerB, gBears, SkulkAbility.getInstance(), false);
|
assertAbility(playerB, gBears, new SkulkAbility(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,17 +43,30 @@ import mage.players.Player;
|
||||||
*/
|
*/
|
||||||
public class CopyTargetSpellEffect extends OneShotEffect {
|
public class CopyTargetSpellEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private boolean useLKI = false;
|
||||||
|
|
||||||
public CopyTargetSpellEffect() {
|
public CopyTargetSpellEffect() {
|
||||||
super(Outcome.Copy);
|
super(Outcome.Copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CopyTargetSpellEffect(boolean useLKI) {
|
||||||
|
super(Outcome.Copy);
|
||||||
|
this.useLKI = useLKI;
|
||||||
|
}
|
||||||
|
|
||||||
public CopyTargetSpellEffect(final CopyTargetSpellEffect effect) {
|
public CopyTargetSpellEffect(final CopyTargetSpellEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
|
this.useLKI = effect.useLKI;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
Spell spell;
|
||||||
|
if (useLKI) {
|
||||||
|
spell = game.getSpellOrLKIStack(targetPointer.getFirst(game, source));
|
||||||
|
} else {
|
||||||
|
spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
||||||
|
}
|
||||||
if (spell == null) {
|
if (spell == null) {
|
||||||
spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK);
|
spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,11 @@
|
||||||
*/
|
*/
|
||||||
package mage.abilities.keyword;
|
package mage.abilities.keyword;
|
||||||
|
|
||||||
import java.io.ObjectStreamException;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.EvasionAbility;
|
import mage.abilities.StaticAbility;
|
||||||
import mage.abilities.MageSingleton;
|
|
||||||
import mage.abilities.effects.RestrictionEffect;
|
import mage.abilities.effects.RestrictionEffect;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
|
@ -18,31 +17,26 @@ import mage.game.permanent.Permanent;
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class SkulkAbility extends EvasionAbility implements MageSingleton {
|
public class SkulkAbility extends StaticAbility {
|
||||||
|
|
||||||
private static final SkulkAbility instance = new SkulkAbility();
|
public SkulkAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new SkulkEffect(Duration.WhileOnBattlefield));
|
||||||
private Object readResolve() throws ObjectStreamException {
|
|
||||||
return instance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SkulkAbility getInstance() {
|
public SkulkAbility(final SkulkAbility ability) {
|
||||||
return instance;
|
super(ability);
|
||||||
}
|
|
||||||
|
|
||||||
private SkulkAbility() {
|
|
||||||
this.addEffect(new SkulkEffect(Duration.WhileOnBattlefield));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Ability copy() {
|
public Ability copy() {
|
||||||
return instance;
|
return new SkulkAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Skulk <i>(This creature can't be blocked by creatures with greater power.)</i>";
|
return "Skulk <i>(This creature can't be blocked by creatures with greater power.)</i>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class SkulkEffect extends RestrictionEffect {
|
class SkulkEffect extends RestrictionEffect {
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public enum CardRepository {
|
||||||
// raise this if db structure was changed
|
// raise this if db structure was changed
|
||||||
private static final long CARD_DB_VERSION = 51;
|
private static final long CARD_DB_VERSION = 51;
|
||||||
// raise this if new cards were added to the server
|
// raise this if new cards were added to the server
|
||||||
private static final long CARD_CONTENT_VERSION = 91;
|
private static final long CARD_CONTENT_VERSION = 92;
|
||||||
private Dao<CardInfo, Object> cardDao;
|
private Dao<CardInfo, Object> cardDao;
|
||||||
private Set<String> classNames;
|
private Set<String> classNames;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ public enum CounterType {
|
||||||
M1M1(new BoostCounter(-1, -1).name),
|
M1M1(new BoostCounter(-1, -1).name),
|
||||||
M2M1(new BoostCounter(-2, -1).name),
|
M2M1(new BoostCounter(-2, -1).name),
|
||||||
M2M2(new BoostCounter(-2, -2).name),
|
M2M2(new BoostCounter(-2, -2).name),
|
||||||
|
MINE("mine"),
|
||||||
MINING("mining"),
|
MINING("mining"),
|
||||||
MIRE("mire"),
|
MIRE("mire"),
|
||||||
MUSTER("muster"),
|
MUSTER("muster"),
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ import mage.game.match.MatchType;
|
||||||
import mage.game.permanent.Battlefield;
|
import mage.game.permanent.Battlefield;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.PermanentCard;
|
import mage.game.permanent.PermanentCard;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
import mage.game.stack.SpellStack;
|
import mage.game.stack.SpellStack;
|
||||||
import mage.game.turn.Phase;
|
import mage.game.turn.Phase;
|
||||||
import mage.game.turn.Step;
|
import mage.game.turn.Step;
|
||||||
|
|
@ -106,6 +107,10 @@ public interface Game extends MageItem, Serializable {
|
||||||
|
|
||||||
UUID getOwnerId(MageObject object);
|
UUID getOwnerId(MageObject object);
|
||||||
|
|
||||||
|
Spell getSpell(UUID spellId);
|
||||||
|
|
||||||
|
Spell getSpellOrLKIStack(UUID spellId);
|
||||||
|
|
||||||
Permanent getPermanent(UUID permanentId);
|
Permanent getPermanent(UUID permanentId);
|
||||||
|
|
||||||
Permanent getPermanentOrLKIBattlefield(UUID permanentId);
|
Permanent getPermanentOrLKIBattlefield(UUID permanentId);
|
||||||
|
|
|
||||||
|
|
@ -445,6 +445,20 @@ public abstract class GameImpl implements Game, Serializable {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Spell getSpell(UUID spellId) {
|
||||||
|
return state.getStack().getSpell(spellId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Spell getSpellOrLKIStack(UUID spellId) {
|
||||||
|
Spell spell = state.getStack().getSpell(spellId);
|
||||||
|
if (spell == null) {
|
||||||
|
spell = (Spell) this.getLastKnownInformation(spellId, Zone.STACK);
|
||||||
|
}
|
||||||
|
return spell;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Permanent getPermanent(UUID permanentId) {
|
public Permanent getPermanent(UUID permanentId) {
|
||||||
return state.getPermanent(permanentId);
|
return state.getPermanent(permanentId);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package mage.game.permanent.token;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
public class GeminiEngineTwinToken extends Token {
|
||||||
|
|
||||||
|
public GeminiEngineTwinToken(int power, int toughness) {
|
||||||
|
super("Twin", "colorless Construct artifact creature token named Twin that's attacking. Its power is equal to Gemini Engine's power and its toughness is equal to Gemini Engine's toughness.");
|
||||||
|
cardType.add(CardType.ARTIFACT);
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
subtype.add(SubType.CONSTRUCT);
|
||||||
|
this.power = new MageInt(power);
|
||||||
|
this.toughness = new MageInt(toughness);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -76,7 +76,7 @@ Shadow|instance|
|
||||||
Shroud|instance|
|
Shroud|instance|
|
||||||
Soulbond|instance|
|
Soulbond|instance|
|
||||||
Soulshift|number|
|
Soulshift|number|
|
||||||
Skulk|instance|
|
Skulk|new|
|
||||||
Storm|new|
|
Storm|new|
|
||||||
Sunburst|new|
|
Sunburst|new|
|
||||||
Swampcycling|cost|
|
Swampcycling|cost|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue