[THS] Added 10 cards (1 blue 9 multicolor).

This commit is contained in:
LevelX2 2013-09-12 17:18:51 +02:00
parent 8e19052d6d
commit 13cc227ebb
10 changed files with 1096 additions and 0 deletions

View file

@ -0,0 +1,88 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.HeroicAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
/**
*
* @author LevelX2
*/
public class AnaxAndCymede extends CardImpl<AnaxAndCymede> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
public AnaxAndCymede(UUID ownerId) {
super(ownerId, 186, "Anax and Cymede", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}{W}");
this.expansionSetCode = "THS";
this.supertype.add("Legendary");
this.subtype.add("Human");
this.subtype.add("Soldier");
this.color.setRed(true);
this.color.setWhite(true);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// First Strike
this.addAbility(FirstStrikeAbility.getInstance());
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Heroic - Whenever you cast a spell that targets Anax and Cymede, creatures you control get +1/+1 and gain trample until end of turn.
Effect effect = new BoostControlledEffect(1,1, Duration.EndOfTurn, filter);
effect.setText("creatures you control get +1/+1");
Ability ability = new HeroicAbility(effect);
effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, filter);
effect.setText("and gain trample until end of turn");
ability.addEffect(effect);
this.addAbility(ability);
}
public AnaxAndCymede(final AnaxAndCymede card) {
super(card);
}
@Override
public AnaxAndCymede copy() {
return new AnaxAndCymede(this);
}
}

View file

@ -0,0 +1,73 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldOrDiesSourceTriggeredAbility;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.TargetPermanent;
/**
*
* @author LevelX2
*/
public class AshenRider extends CardImpl<AshenRider> {
public AshenRider(UUID ownerId) {
super(ownerId, 187, "Ashen Rider", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{W}{W}{B}{B}");
this.expansionSetCode = "THS";
this.subtype.add("Archon");
this.color.setBlack(true);
this.color.setWhite(true);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Ashen Rider enters the battlefield or dies, exile target permanent.
Ability ability = new EntersBattlefieldOrDiesSourceTriggeredAbility(new ExileTargetEffect(), false);
ability.addTarget(new TargetPermanent(true));
this.addAbility(ability);
}
public AshenRider(final AshenRider card) {
super(card);
}
@Override
public AshenRider copy() {
return new AshenRider(this);
}
}

View file

@ -0,0 +1,266 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.PayVariableLoyaltyCost;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetCardInExile;
import mage.target.common.TargetOpponent;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
/**
*
* @author LevelX2
*/
public class AshiokNightmareWeaver extends CardImpl<AshiokNightmareWeaver> {
public AshiokNightmareWeaver(UUID ownerId) {
super(ownerId, 188, "Ashiok, Nightmare Weaver", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{1}{U}{B}");
this.expansionSetCode = "THS";
this.subtype.add("Ashiok");
this.color.setBlue(true);
this.color.setBlack(true);
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), false));
// +2: Exile the top three cards of target opponent's library.
LoyaltyAbility ability = new LoyaltyAbility(new AshiokNightmareWeaverExileEffect(), 2);
ability.addTarget(new TargetOpponent(true));
this.addAbility(ability);
// -X: Put a creature card with converted mana cost X exiled with Ashiok, Nightmare Weaver onto the battlefield under your control. That creature is a Nightmare in addition to its other types.
this.addAbility(new LoyaltyAbility(new AshiokNightmareWeaverPutIntoPlayEffect()));
// -10: Exile all cards from all opponents' hands and graveyards.);
this.addAbility(new LoyaltyAbility(new AshiokNightmareWeaverExileAllEffect(), -10));
}
public AshiokNightmareWeaver(final AshiokNightmareWeaver card) {
super(card);
}
@Override
public AshiokNightmareWeaver copy() {
return new AshiokNightmareWeaver(this);
}
}
class AshiokNightmareWeaverExileEffect extends OneShotEffect<AshiokNightmareWeaverExileEffect> {
public AshiokNightmareWeaverExileEffect() {
super(Outcome.Exile);
this.staticText = "Exile the top three cards of target opponent's library";
}
public AshiokNightmareWeaverExileEffect(final AshiokNightmareWeaverExileEffect effect) {
super(effect);
}
@Override
public AshiokNightmareWeaverExileEffect copy() {
return new AshiokNightmareWeaverExileEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
UUID exileId = CardUtil.getCardExileZoneId(game, source);
Player opponent = game.getPlayer(this.getTargetPointer().getFirst(game, source));
if (opponent != null) {
for (int i = 0; i < 3; i++) {
Card card = opponent.getLibrary().getFromTop(game);
if (card != null) {
card.moveToExile(exileId, "Ashiok, Nightmare Weaver", source.getSourceId(), game);
}
}
}
return false;
}
}
class AshiokNightmareWeaverPutIntoPlayEffect extends OneShotEffect<AshiokNightmareWeaverPutIntoPlayEffect> {
public AshiokNightmareWeaverPutIntoPlayEffect() {
super(Outcome.PutCreatureInPlay);
this.staticText = "Put a creature card with converted mana cost X exiled with {this} onto the battlefield under your control. That creature is a Nightmare in addition to its other types";
}
public AshiokNightmareWeaverPutIntoPlayEffect(final AshiokNightmareWeaverPutIntoPlayEffect effect) {
super(effect);
}
@Override
public AshiokNightmareWeaverPutIntoPlayEffect copy() {
return new AshiokNightmareWeaverPutIntoPlayEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
int cmc = 0;
for (Cost cost : source.getCosts()) {
if (cost instanceof PayVariableLoyaltyCost) {
cmc = ((PayVariableLoyaltyCost) cost).getAmount();
}
}
FilterCard filter = new FilterCreatureCard(new StringBuilder("creature card with converted mana cost {").append(cmc).append("} exiled with Ashiok, Nightmare Weaver").toString());
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc));
Target target = new TargetCardInExile(filter, CardUtil.getCardExileZoneId(game, source));
if (target.canChoose(source.getSourceId(), player.getId(), game)) {
if (player.chooseTarget(Outcome.PutCreatureInPlay, target, source, game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null && card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), player.getId())) {
ContinuousEffectImpl effect = new AshiokNightmareWeaverAddTypeEffect();
effect.setTargetPointer(new FixedTarget(card.getId()));
game.addEffect(effect, source);
return true;
}
}
}
return false;
}
}
class AshiokNightmareWeaverAddTypeEffect extends ContinuousEffectImpl<AshiokNightmareWeaverAddTypeEffect> {
public AshiokNightmareWeaverAddTypeEffect() {
super(Duration.Custom, Outcome.Neutral);
staticText = "That creature is a Nightmare in addition to its other types";
}
public AshiokNightmareWeaverAddTypeEffect(final AshiokNightmareWeaverAddTypeEffect effect) {
super(effect);
}
@Override
public AshiokNightmareWeaverAddTypeEffect copy() {
return new AshiokNightmareWeaverAddTypeEffect(this);
}
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (creature != null) {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == SubLayer.NA) {
creature.getSubtype().add("Nightmare");
}
break;
}
return true;
} else {
this.used = true;
}
return false;
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean hasLayer(Layer layer) {
return layer == Layer.TypeChangingEffects_4;
}
}
class AshiokNightmareWeaverExileAllEffect extends OneShotEffect<AshiokNightmareWeaverExileAllEffect> {
public AshiokNightmareWeaverExileAllEffect() {
super(Outcome.Exile);
this.staticText = "Exile all cards from all opponents' hands and graveyards";
}
public AshiokNightmareWeaverExileAllEffect(final AshiokNightmareWeaverExileAllEffect effect) {
super(effect);
}
@Override
public AshiokNightmareWeaverExileAllEffect copy() {
return new AshiokNightmareWeaverExileAllEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
UUID exileId = CardUtil.getCardExileZoneId(game, source);
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(opponentId);
if (opponent != null) {
for (UUID cardId :opponent.getHand()) {
Card card = game.getCard(cardId);
if (card != null) {
card.moveToExile(exileId, "Ashiok, Nightmare Weaver", source.getSourceId(), game);
}
}
for (UUID cardId :opponent.getGraveyard()) {
Card card = game.getCard(cardId);
if (card != null) {
card.moveToExile(exileId, "Ashiok, Nightmare Weaver", source.getSourceId(), game);
}
}
}
}
return true;
}
}

View file

@ -0,0 +1,73 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ScryEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.HeroicAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.counters.CounterType;
/**
*
* @author LevelX2
*/
public class BattlewiseHoplite extends CardImpl<BattlewiseHoplite> {
public BattlewiseHoplite(UUID ownerId) {
super(ownerId, 189, "Battlewise Hoplite", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}{U}");
this.expansionSetCode = "THS";
this.subtype.add("Human");
this.subtype.add("Soldier");
this.color.setBlue(true);
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Heroic - Whenever you cast a spell that targets Battlewise Hoplite, put a +1/+1 counter on Battlewise Hoplite, then scry 1.
Ability ability = new HeroicAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
ability.addEffect(new ScryEffect(1));
this.addAbility(ability);
}
public BattlewiseHoplite(final BattlewiseHoplite card) {
super(card);
}
@Override
public BattlewiseHoplite copy() {
return new BattlewiseHoplite(this);
}
}

View file

@ -0,0 +1,110 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
/**
*
* @author LevelX2
*/
public class DestructiveRevelry extends CardImpl<DestructiveRevelry> {
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
static {
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
}
public DestructiveRevelry(UUID ownerId) {
super(ownerId, 192, "Destructive Revelry", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{R}{G}");
this.expansionSetCode = "THS";
this.color.setRed(true);
this.color.setGreen(true);
// Destroy target artifact or enchantment. Destructive Revelry deals 2 damage to that permanent's controller.
this.getSpellAbility().addEffect(new DestructiveRevelryEffect());
Target target = new TargetPermanent(filter);
target.setRequired(true);
this.getSpellAbility().addTarget(target);
}
public DestructiveRevelry(final DestructiveRevelry card) {
super(card);
}
@Override
public DestructiveRevelry copy() {
return new DestructiveRevelry(this);
}
}
class DestructiveRevelryEffect extends OneShotEffect<DestructiveRevelryEffect> {
public DestructiveRevelryEffect() {
super(Outcome.DestroyPermanent);
this.staticText = "Destroy target artifact or enchantment. Destructive Revelry deals 2 damage to that permanent's controller";
}
public DestructiveRevelryEffect(final DestructiveRevelryEffect effect) {
super(effect);
}
@Override
public DestructiveRevelryEffect copy() {
return new DestructiveRevelryEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (permanent != null) {
permanent.destroy(source.getSourceId(), game, false);
Player permController = game.getPlayer(permanent.getControllerId());
if (permController != null) {
permController.damage(2, source.getSourceId(), game, false, true);
return true;
}
}
return false;
}
}

View file

@ -0,0 +1,87 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MonstrousCondition;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.MonstrosityAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LevelX2
*/
public class FleecemaneLion extends CardImpl<FleecemaneLion> {
public FleecemaneLion(UUID ownerId) {
super(ownerId, 193, "Fleecemane Lion", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}{W}");
this.expansionSetCode = "THS";
this.subtype.add("Cat");
this.color.setGreen(true);
this.color.setWhite(true);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// {3}{G}{W}: Monstrosity 1.
this.addAbility(new MonstrosityAbility("{3}{G}{W}", 1));
// As long as Fleecemane Lion is monstrous, it has hexproof and indestructible.
Effect effect = new ConditionalContinousEffect(
new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield),
MonstrousCondition.getInstance(),
"As long as {this} is monstrous, it has hexproof");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
effect = new ConditionalContinousEffect(
new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
MonstrousCondition.getInstance(),
"and indestructible");
ability.addEffect(effect);
this.addAbility(ability);
}
public FleecemaneLion(final FleecemaneLion card) {
super(card);
}
@Override
public FleecemaneLion copy() {
return new FleecemaneLion(this);
}
}

View file

@ -0,0 +1,86 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AttacksCreatureYourControlTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/**
*
* @author LevelX2
*/
public class KragmaWarcaller extends CardImpl<KragmaWarcaller> {
private static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent("Minotaur creatures you control");
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("Minotaur you control");
static {
filter1.add(new SubtypePredicate("Minotaur"));
}
public KragmaWarcaller(UUID ownerId) {
super(ownerId, 195, "Kragma Warcaller", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{R}");
this.expansionSetCode = "THS";
this.subtype.add("Minotaur");
this.subtype.add("Warrior");
this.color.setRed(true);
this.color.setBlack(true);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Minotaur creatures you control have haste.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter1, false)));
// Whenever a Minotaur you control attacks, it gets +2/+0 until end of turn.
Effect effect = new BoostTargetEffect(2,0, Duration.EndOfTurn);
effect.setText("it gets +2/+0 until end of turn");
this.addAbility(new AttacksCreatureYourControlTriggeredAbility(effect, false, filter1, true));
}
public KragmaWarcaller(final KragmaWarcaller card) {
super(card);
}
@Override
public KragmaWarcaller copy() {
return new KragmaWarcaller(this);
}
}

View file

@ -0,0 +1,102 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalRestrictionEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CantAttackSourceEffect;
import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
/**
*
* @author LevelX2
*/
public class MedomaiTheAgeless extends CardImpl<MedomaiTheAgeless> {
public MedomaiTheAgeless(UUID ownerId) {
super(ownerId, 196, "Medomai the Ageless", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{W}{U}");
this.expansionSetCode = "THS";
this.supertype.add("Legendary");
this.subtype.add("Sphinx");
this.color.setBlue(true);
this.color.setWhite(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Medomai the Ageless deals combat damage to a player, take an extra turn after this one.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddExtraTurnControllerEffect(), false));
// Medomai the Ageless can't attack during extra turns.
Effect effect = new ConditionalRestrictionEffect(new CantAttackSourceEffect(Duration.WhileOnBattlefield), ExtraTurnCondition.getInstance());
effect.setText("{this} can't attack during extra turns");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}
public MedomaiTheAgeless(final MedomaiTheAgeless card) {
super(card);
}
@Override
public MedomaiTheAgeless copy() {
return new MedomaiTheAgeless(this);
}
}
class ExtraTurnCondition implements Condition {
private static ExtraTurnCondition fInstance = null;
private ExtraTurnCondition() {}
public static Condition getInstance() {
if (fInstance == null) {
fInstance = new ExtraTurnCondition();
}
return fInstance;
}
@Override
public boolean apply(Game game, Ability source) {
return game.getState().isExtraTurn();
}
}

View file

@ -0,0 +1,128 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.condition.common.MonstrousCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.MonstrosityAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
/**
*
* @author LevelX2
*/
public class PolisCrusher extends CardImpl<PolisCrusher> {
public PolisCrusher(UUID ownerId) {
super(ownerId, 198, "Polis Crusher", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{G}");
this.expansionSetCode = "THS";
this.subtype.add("Cyclops");
this.color.setRed(true);
this.color.setGreen(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Trample
this.addAbility(TrampleAbility.getInstance());
// protection from enchantments
this.addAbility(new ProtectionAbility(new FilterEnchantmentPermanent()));
// {4}{R}{G}: Monstrosity 3.
this.addAbility(new MonstrosityAbility("{4}{R}{G}", 3));
// Whenever Polis Crusher deals combat damage to a player, if Polis Crusher is monstrous, destroy target enchantment that player controls.
Ability ability = new ConditionalTriggeredAbility(
new DealsCombatDamageToAPlayerTriggeredAbility(new PolisCrusherDestroyEffect(), false, true),
MonstrousCondition.getInstance(),
"Whenever {this} deals combat damage to a player, if {this} is monstrous, destroy target enchantment that player controls.");
this.addAbility(ability);
}
public PolisCrusher(final PolisCrusher card) {
super(card);
}
@Override
public PolisCrusher copy() {
return new PolisCrusher(this);
}
}
class PolisCrusherDestroyEffect extends OneShotEffect<PolisCrusherDestroyEffect> {
public PolisCrusherDestroyEffect() {
super(Outcome.DestroyPermanent);
this.staticText = "destroy target enchantment that player controls";
}
public PolisCrusherDestroyEffect(final PolisCrusherDestroyEffect effect) {
super(effect);
}
@Override
public PolisCrusherDestroyEffect copy() {
return new PolisCrusherDestroyEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player attackedPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && attackedPlayer != null) {
FilterPermanent filter = new FilterEnchantmentPermanent("enchantment attacked player controls");
filter.add(new ControllerIdPredicate(attackedPlayer.getId()));
Target target = new TargetPermanent(filter);
target.setRequired(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
&& controller.chooseTarget(outcome, target, source, game)) {
Permanent enchantment = game.getPermanent(target.getFirstTarget());
if (enchantment != null) {
return enchantment.destroy(source.getSourceId(), game, false);
}
}
}
return false;
}
}

View file

@ -0,0 +1,83 @@
/*
* 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ScryEffect;
import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LevelX2
*/
public class PrognosticSphinx extends CardImpl<PrognosticSphinx> {
public PrognosticSphinx(UUID ownerId) {
super(ownerId, 60, "Prognostic Sphinx", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.expansionSetCode = "THS";
this.subtype.add("Sphinx");
this.color.setBlue(true);
this.power = new MageInt(3);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Discard a card: Prognostic Sphinx gains hexproof until end of turn. Tap it.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.EndOfTurn), new DiscardCardCost());
Effect effect = new TapSourceEffect();
effect.setText("Tap it");
ability.addEffect(effect);
this.addAbility(ability);
// Whenever Prognostic Sphinx attacks, scry 3.</i>
this.addAbility(new AttacksTriggeredAbility(new ScryEffect(3), false));
}
public PrognosticSphinx(final PrognosticSphinx card) {
super(card);
}
@Override
public PrognosticSphinx copy() {
return new PrognosticSphinx(this);
}
}