[THS] Added 11 blue cards.

This commit is contained in:
LevelX2 2013-09-10 16:42:32 +02:00
parent 478bd3979b
commit 36ecc1e121
15 changed files with 1044 additions and 4 deletions

View file

@ -79,6 +79,7 @@ public class DungeonGeists extends CardImpl<DungeonGeists> {
target.setRequired(true);
ability.addTarget(target);
this.addAbility(ability);
// watcher needed to send normal events to Dungeon Geists ReplacementEffect
this.addWatcher(new DungeonGeistsWatcher());
}
@ -167,7 +168,6 @@ class DungeonGeistsWatcher extends WatcherImpl<DungeonGeistsWatcher> {
if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
condition = true;
game.replaceEvent(event);
return;
}
}
}

View file

@ -0,0 +1,52 @@
/*
* 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.planeshift;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class Gainsay extends mage.sets.theros.Gainsay {
public Gainsay(UUID ownerId) {
super(ownerId);
this.cardNumber = 26;
this.expansionSetCode = "PLS";
}
public Gainsay(final Gainsay card) {
super(card);
}
@Override
public Gainsay copy() {
return new Gainsay(this);
}
}

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.effects.Effect;
import mage.abilities.effects.common.CopyPermanentEffect;
import mage.abilities.keyword.HeroicAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.functions.ApplyToPermanent;
/**
*
* @author LevelX2
*/
public class ArtisanOfForms extends CardImpl<ArtisanOfForms> {
public ArtisanOfForms(UUID ownerId) {
super(ownerId, 40, "Artisan of Forms", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.expansionSetCode = "THS";
this.subtype.add("Human");
this.subtype.add("Wizard");
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// <i>Heroic</i> - Whenever you cast a spell that targets Artisan of Forms, you may have Artisan of Forms become a copy of target creature and gain this ability.
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
effect.setText("have {this} become a copy of target creature and gain this ability");
this.addAbility(new HeroicAbility(effect, true));
}
public ArtisanOfForms(final ArtisanOfForms card) {
super(card);
}
@Override
public ArtisanOfForms copy() {
return new ArtisanOfForms(this);
}
}
class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent {
@Override
public Boolean apply(Game game, Permanent permanent) {
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
effect.setText("have {this} become a copy of target creature and gain this ability");
permanent.addAbility(new HeroicAbility(effect, true), game);
return true;
}
}

View 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class CurseOfTheSwine extends CardImpl<CurseOfTheSwine> {
public CurseOfTheSwine(UUID ownerId) {
super(ownerId, 46, "Curse of the Swine", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{U}{U}");
this.expansionSetCode = "THS";
this.color.setBlue(true);
// Exile X target creatures. For each creature exiled this way, its controller puts a 2/2 green Boar creature token onto the battlefield.
this.getSpellAbility().addEffect(new CurseOfTheSwineEffect());
// Correct number of targets will be set in adjustTargets
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
}
@Override
public void adjustTargets(Ability ability, Game game) {
if (ability instanceof SpellAbility) {
ability.getTargets().clear();
ability.addTarget(new TargetCreaturePermanent(ability.getManaCostsToPay().getX(), true));
}
}
public CurseOfTheSwine(final CurseOfTheSwine card) {
super(card);
}
@Override
public CurseOfTheSwine copy() {
return new CurseOfTheSwine(this);
}
}
class CurseOfTheSwineEffect extends OneShotEffect<CurseOfTheSwineEffect> {
public CurseOfTheSwineEffect() {
super(Outcome.Exile);
this.staticText = "Exile X target creatures. For each creature exiled this way, its controller puts a 2/2 green Boar creature token onto the battlefield";
}
public CurseOfTheSwineEffect(final CurseOfTheSwineEffect effect) {
super(effect);
}
@Override
public CurseOfTheSwineEffect copy() {
return new CurseOfTheSwineEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for(UUID targetId : this.getTargetPointer().getTargets(game, source)) {
Permanent creature = game.getPermanent(targetId);
if (creature != null) {
if (creature.moveToExile(null, null, source.getSourceId(), game)) {
CurseOfTheSwineBoarToken swineToken = new CurseOfTheSwineBoarToken();
swineToken.putOntoBattlefield(1, game, source.getSourceId(), creature.getControllerId());
}
}
}
return true;
}
}
class CurseOfTheSwineBoarToken extends Token {
CurseOfTheSwineBoarToken() {
super("Boar", "2/2 green Boar creature token");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Boar");
power = new MageInt(2);
toughness = new MageInt(2);
}
}

View file

@ -0,0 +1,68 @@
/*
* 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.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.ScryEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.Target;
import mage.target.TargetSpell;
/**
*
* @author LevelX2
*/
public class Dissolve extends CardImpl<Dissolve> {
public Dissolve(UUID ownerId) {
super(ownerId, 47, "Dissolve", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{U}");
this.expansionSetCode = "THS";
this.color.setBlue(true);
// Counter target spell. Scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.)
this.getSpellAbility().addEffect(new CounterTargetEffect());
Target target = new TargetSpell();
target.setRequired(true);
this.getSpellAbility().addTarget(target);
this.getSpellAbility().addEffect(new ScryEffect(1));
}
public Dissolve(final Dissolve card) {
super(card);
}
@Override
public Dissolve copy() {
return new Dissolve(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.ObjectColor;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.Target;
import mage.target.TargetSpell;
/**
*
* @author LevelX2
*/
public class Gainsay extends CardImpl<Gainsay> {
private static final FilterSpell filter = new FilterSpell("blue spell");
static {
filter.add(new ColorPredicate(ObjectColor.BLUE));
}
public Gainsay(UUID ownerId) {
super(ownerId, 49, "Gainsay", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
this.expansionSetCode = "THS";
this.color.setBlue(true);
// Counter target blue spell.
this.getSpellAbility().addEffect(new CounterTargetEffect());
Target target = new TargetSpell(filter);
target.setRequired(true);
this.getSpellAbility().addTarget(target);
}
public Gainsay(final Gainsay card) {
super(card);
}
@Override
public Gainsay copy() {
return new Gainsay(this);
}
}

View file

@ -0,0 +1,65 @@
/*
* 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.effects.common.ScryEffect;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class LostInALabyrinth extends CardImpl<LostInALabyrinth> {
public LostInALabyrinth(UUID ownerId) {
super(ownerId, 52, "Lost in a Labyrinth", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}");
this.expansionSetCode = "THS";
this.color.setBlue(true);
// Target creature gets -3/-0 until end of turn. Scry 1.</i>
this.getSpellAbility().addEffect(new BoostTargetEffect(-3,-0, Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
this.getSpellAbility().addEffect(new ScryEffect(1));
}
public LostInALabyrinth(final LostInALabyrinth card) {
super(card);
}
@Override
public LostInALabyrinth copy() {
return new LostInALabyrinth(this);
}
}

View file

@ -0,0 +1,66 @@
/*
* 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.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.ScryEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class Omenspeaker extends CardImpl<Omenspeaker> {
public Omenspeaker(UUID ownerId) {
super(ownerId, 57, "Omenspeaker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.expansionSetCode = "THS";
this.subtype.add("Human");
this.subtype.add("Wizard");
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// When Omenspeaker enters the battlefield, scry 2.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(2), false));
}
public Omenspeaker(final Omenspeaker card) {
super(card);
}
@Override
public Omenspeaker copy() {
return new Omenspeaker(this);
}
}

View file

@ -0,0 +1,173 @@
/*
* 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.BecomesMonstrousSourceTriggeredAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.keyword.MonstrosityAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.PhaseStep;
import mage.constants.Rarity;
import mage.constants.WatcherScope;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.target.common.TargetCreaturePermanent;
import mage.watchers.WatcherImpl;
/**
*
* @author LevelX2
*/
public class ShipbreakerKraken extends CardImpl<ShipbreakerKraken> {
public ShipbreakerKraken(UUID ownerId) {
super(ownerId, 63, "Shipbreaker Kraken", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}{U}");
this.expansionSetCode = "THS";
this.subtype.add("Kraken");
this.color.setBlue(true);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// {6}{U}{U}: Monstrosity 4.
this.addAbility(new MonstrosityAbility("{6}{U}{U}", 4));
// When Shipbreaker Kraken becomes monstrous, tap up to four target creatures. Those creatures don't untap during their controllers' untap steps for as long as you control Shipbreaker Kraken.
Ability ability = new BecomesMonstrousSourceTriggeredAbility(new TapTargetEffect());
ability.addTarget(new TargetCreaturePermanent(0,4));
ability.addEffect(new ShipbreakerKrakenReplacementEffect());
this.addAbility(ability);
this.addWatcher(new ShipbreakerKrakenWatcher());
}
public ShipbreakerKraken(final ShipbreakerKraken card) {
super(card);
}
@Override
public ShipbreakerKraken copy() {
return new ShipbreakerKraken(this);
}
}
class ShipbreakerKrakenReplacementEffect extends ReplacementEffectImpl<ShipbreakerKrakenReplacementEffect> {
public ShipbreakerKrakenReplacementEffect() {
super(Duration.OneUse, Outcome.Detriment);
this.staticText = "Those creatures don't untap during their controllers' untap steps for as long as you control {this}";
}
public ShipbreakerKrakenReplacementEffect(final ShipbreakerKrakenReplacementEffect effect) {
super(effect);
}
@Override
public ShipbreakerKrakenReplacementEffect copy() {
return new ShipbreakerKrakenReplacementEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
return true;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType() == GameEvent.EventType.LOST_CONTROL) {
if (event.getTargetId().equals(source.getSourceId())) {
this.used = true;
return false;
}
}
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(source.getSourceId())) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
this.used = true;
return false;
}
}
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP) {
if (targetPointer.getTargets(game, source).contains(event.getTargetId())) {
return true;
}
}
return false;
}
}
class ShipbreakerKrakenWatcher extends WatcherImpl<ShipbreakerKrakenWatcher> {
ShipbreakerKrakenWatcher () {
super("ControlLost", WatcherScope.CARD);
}
ShipbreakerKrakenWatcher(ShipbreakerKrakenWatcher watcher) {
super(watcher);
}
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.LOST_CONTROL && event.getPlayerId().equals(controllerId) && event.getTargetId().equals(sourceId)) {
condition = true;
game.replaceEvent(event);
return;
}
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(sourceId)) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
condition = true;
game.replaceEvent(event);
}
}
}
@Override
public void reset() {
//don't reset condition each turn - only when this leaves the battlefield
}
@Override
public ShipbreakerKrakenWatcher copy() {
return new ShipbreakerKrakenWatcher(this);
}
}

View 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.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.permanent.token.Token;
import mage.game.stack.Spell;
import mage.target.TargetSpell;
/**
*
* @author LevelX2
*/
public class SwanSong extends CardImpl<SwanSong> {
private static final FilterSpell filter = new FilterSpell("enchantment, instant or sorcery spell");
static {
filter.add(Predicates.or(new CardTypePredicate(CardType.ENCHANTMENT),
new CardTypePredicate(CardType.INSTANT),
new CardTypePredicate(CardType.SORCERY)));
}
public SwanSong(UUID ownerId) {
super(ownerId, 65, "Swan Song", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{U}");
this.expansionSetCode = "THS";
this.color.setBlue(true);
// Counter target enchantment, instant or sorcery spell. Its controller puts a 2/2 blue Bird creature token with flying onto the battlefield.
this.getSpellAbility().addEffect(new SwanSongEffect());
this.getSpellAbility().addTarget(new TargetSpell(filter));
}
public SwanSong(final SwanSong card) {
super(card);
}
@Override
public SwanSong copy() {
return new SwanSong(this);
}
}
class SwanSongEffect extends OneShotEffect<SwanSongEffect> {
public SwanSongEffect() {
super(Outcome.Benefit);
this.staticText = "Counter target enchantment, instant or sorcery spell. Its controller puts a 2/2 blue Bird creature token with flying onto the battlefield";
}
public SwanSongEffect(final SwanSongEffect effect) {
super(effect);
}
@Override
public SwanSongEffect copy() {
return new SwanSongEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
boolean countered = false;
for (UUID targetId : targetPointer.getTargets(game, source)) {
Spell spell = game.getStack().getSpell(targetId);
if (game.getStack().counter(targetId, source.getSourceId(), game)) {
countered = true;
}
if (spell != null) {
Token token = new SwanSongBirdToken();
token.putOntoBattlefield(1, game, source.getSourceId(), spell.getControllerId());
}
}
return countered;
}
}
class SwanSongBirdToken extends Token {
SwanSongBirdToken() {
super("Bird", "2/2 blue Bird creature token with flying");
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add("Bird");
power = new MageInt(2);
toughness = new MageInt(2);
this.addAbility(FlyingAbility.getInstance());
}
}

View file

@ -0,0 +1,66 @@
/*
* 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.effects.common.DrawCardControllerEffect;
import mage.abilities.keyword.HeroicAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class TritonFortuneHunter extends CardImpl<TritonFortuneHunter> {
public TritonFortuneHunter(UUID ownerId) {
super(ownerId, 69, "Triton Fortune Hunter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.expansionSetCode = "THS";
this.subtype.add("Merfolk");
this.subtype.add("Soldier");
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// <i>Heroic</i> - Whenever you cast a spell that targets Triton Fortune Hunter, draw a card.
this.addAbility(new HeroicAbility(new DrawCardControllerEffect(1)));
}
public TritonFortuneHunter(final TritonFortuneHunter card) {
super(card);
}
@Override
public TritonFortuneHunter copy() {
return new TritonFortuneHunter(this);
}
}

View file

@ -0,0 +1,65 @@
/*
* 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.effects.common.ReturnToHandTargetEffect;
import mage.abilities.effects.common.ScryEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class VoyagesEnd extends CardImpl<VoyagesEnd> {
public VoyagesEnd(UUID ownerId) {
super(ownerId, 73, "Voyage's End", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
this.expansionSetCode = "THS";
this.color.setBlue(true);
// Return target creature to its owner's hand. Scry 1.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
this.getSpellAbility().addEffect(new ScryEffect(1));
}
public VoyagesEnd(final VoyagesEnd card) {
super(card);
}
@Override
public VoyagesEnd copy() {
return new VoyagesEnd(this);
}
}

View file

@ -0,0 +1,80 @@
/*
* 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.common.SkipNextUntapTargetEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.keyword.HeroicAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class WavecrashTriton extends CardImpl<WavecrashTriton> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
static{
filter.add(new ControllerPredicate(TargetController.OPPONENT));
}
public WavecrashTriton(UUID ownerId) {
super(ownerId, 74, "Wavecrash Triton", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.expansionSetCode = "THS";
this.subtype.add("Merfolk");
this.subtype.add("Wizard");
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(4);
// Heroic - Whenever you cast a spell that targets Wavecrash Triton, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step.
Ability ability = new HeroicAbility(new TapTargetEffect());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addEffect(new SkipNextUntapTargetEffect("That creature"));
this.addAbility(ability);
}
public WavecrashTriton(final WavecrashTriton card) {
super(card);
}
@Override
public WavecrashTriton copy() {
return new WavecrashTriton(this);
}
}

View file

@ -88,7 +88,7 @@ public class ScryEffect extends OneShotEffect<ScryEffect> {
target1.clearChosen();
}
// move cards to the top of the library
int onTop = cards.size();
int onBottom = scryNumber - cards.size();
if (cards.size() > 1) {
TargetCard target2 = new TargetCard(Zone.PICK, filter2);
target2.setRequired(true);
@ -107,7 +107,7 @@ public class ScryEffect extends OneShotEffect<ScryEffect> {
card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
}
game.informPlayers(new StringBuilder(player.getName()).append(" puts ")
.append(onTop).append(onTop == 1 ?" card":"cards")
.append(onBottom).append(onBottom == 1 ?" card":" cards")
.append(" on the bottom of his or her library (scry ")
.append(scryNumber).append(")").toString());
return true;

View file

@ -47,7 +47,11 @@ import mage.game.stack.Spell;
public class HeroicAbility extends TriggeredAbilityImpl<HeroicAbility> {
public HeroicAbility(Effect effect) {
super(Zone.BATTLEFIELD, effect, false);
this(effect, false);
}
public HeroicAbility(Effect effect, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional);
}
public HeroicAbility(final HeroicAbility ability) {