mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
- Added DTK cards. Savage Ventmaw, Shorecrasher Elemental, and Swift Warkite.
This commit is contained in:
parent
0533430abf
commit
e4f42c0da2
3 changed files with 355 additions and 0 deletions
72
Mage.Sets/src/mage/sets/dragonsoftarkir/SavageVentmaw.java
Normal file
72
Mage.Sets/src/mage/sets/dragonsoftarkir/SavageVentmaw.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.dragonsoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SavageVentmaw extends CardImpl {
|
||||
|
||||
public SavageVentmaw(UUID ownerId) {
|
||||
super(ownerId, 231, "Savage Ventmaw", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}{G}");
|
||||
this.expansionSetCode = "DTK";
|
||||
this.subtype.add("Dragon");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Savage Ventmaw attacks, add {R}{R}{R}{G}{G}{G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end.
|
||||
Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(3, 0, 3, 0, 0, 0, 0), "your", true);
|
||||
effect.setText("add {R}{R}{R}{G}{G}{G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end");
|
||||
this.addAbility(new AttacksTriggeredAbility(effect, false));
|
||||
|
||||
}
|
||||
|
||||
public SavageVentmaw(final SavageVentmaw card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SavageVentmaw copy() {
|
||||
return new SavageVentmaw(this);
|
||||
}
|
||||
}
|
|
@ -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.sets.dragonsoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class ShorecrasherElemental extends CardImpl {
|
||||
|
||||
public ShorecrasherElemental(UUID ownerId) {
|
||||
super(ownerId, 73, "Shorecrasher Elemental", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{U}{U}{U}");
|
||||
this.expansionSetCode = "DTK";
|
||||
this.subtype.add("Elemental");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {U}: Exile Shorecrasher Elemental, then return it to the battlefield face down under its owner's control.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShorecrasherElementalEffect(), new ManaCostsImpl("{U}")));
|
||||
|
||||
// {1}: Shorecrasher Elemental gets +1/-1 or -1/+1 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{1}"));
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new BoostSourceEffect(-1, 1, Duration.EndOfTurn));
|
||||
ability.addMode(mode);
|
||||
this.addAbility(ability);
|
||||
|
||||
// Megamorph {4}{U}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{U}"), true));
|
||||
|
||||
}
|
||||
|
||||
public ShorecrasherElemental(final ShorecrasherElemental card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShorecrasherElemental copy() {
|
||||
return new ShorecrasherElemental(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ShorecrasherElementalEffect extends OneShotEffect {
|
||||
|
||||
public ShorecrasherElementalEffect() {
|
||||
super(Outcome.Neutral);
|
||||
this.staticText = "Exile {this}, then return it to the battlefield face down under its owner's control";
|
||||
}
|
||||
|
||||
public ShorecrasherElementalEffect(final ShorecrasherElementalEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShorecrasherElementalEffect copy() {
|
||||
return new ShorecrasherElementalEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent shorecrasherElemental = game.getPermanent(source.getSourceId());
|
||||
if (shorecrasherElemental != null) {
|
||||
if (shorecrasherElemental.moveToExile(source.getSourceId(), "Shorecrasher Elemental", source.getSourceId(), game)) {
|
||||
Card card = game.getExile().getCard(source.getSourceId(), game);
|
||||
if (card != null) {
|
||||
card.setFaceDown(true);
|
||||
return card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
166
Mage.Sets/src/mage/sets/dragonsoftarkir/SwiftWarkite.java
Normal file
166
Mage.Sets/src/mage/sets/dragonsoftarkir/SwiftWarkite.java
Normal file
|
@ -0,0 +1,166 @@
|
|||
/*
|
||||
* 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.dragonsoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter.ComparisonType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
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.TargetCardInHand;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SwiftWarkite extends CardImpl {
|
||||
|
||||
public SwiftWarkite(UUID ownerId) {
|
||||
super(ownerId, 233, "Swift Warkite", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}{R}");
|
||||
this.expansionSetCode = "DTK";
|
||||
this.subtype.add("Dragon");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Swift Warkite enters the battlefield, you may put a creature card with converted mana cost 3 or less from your hand or graveyard onto the battlefield. That creature gains haste. Return it to your hand at the beginning of the next end step.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SwiftWarkiteEffect(), true));
|
||||
|
||||
}
|
||||
|
||||
public SwiftWarkite(final SwiftWarkite card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwiftWarkite copy() {
|
||||
return new SwiftWarkite(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SwiftWarkiteEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("creature card with converted mana cost 3 or less from your hand or graveyard");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4));
|
||||
}
|
||||
|
||||
SwiftWarkiteEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "you may put a creature card with converted mana cost 3 or less from your hand or graveyard onto the battlefield. That creature gains haste. Return it to your hand at the beginning of the next end step";
|
||||
}
|
||||
|
||||
SwiftWarkiteEffect(final SwiftWarkiteEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwiftWarkiteEffect copy() {
|
||||
return new SwiftWarkiteEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (controller.chooseUse(Outcome.PutCardInPlay, "Put a creature card from your hand? (No = from your graveyard)", game)) {
|
||||
Target target = new TargetCardInHand(0, 1, filter);
|
||||
controller.choose(outcome, target, source.getSourceId(), game);
|
||||
Card card = controller.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
if (controller.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId())) {
|
||||
Permanent creature = game.getPermanent(card.getId());
|
||||
if (creature != null) {
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
||||
game.addEffect(effect, source);
|
||||
Effect effect2 = new ReturnToHandTargetEffect();
|
||||
effect2.setTargetPointer(new FixedTarget(creature.getId()));
|
||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect2);
|
||||
delayedAbility.setControllerId(source.getControllerId());
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Target target = new TargetCardInYourGraveyard(0, 1, filter);
|
||||
target.choose(Outcome.PutCardInPlay, source.getControllerId(), source.getSourceId(), game);
|
||||
Card card = controller.getGraveyard().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId());
|
||||
Permanent creature = game.getPermanent(card.getId());
|
||||
if (creature != null) {
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
||||
game.addEffect(effect, source);
|
||||
Effect effect2 = new ReturnToHandTargetEffect();
|
||||
effect2.setTargetPointer(new FixedTarget(creature.getId()));
|
||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect2);
|
||||
delayedAbility.setControllerId(source.getControllerId());
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue