mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[AER] Added Scrap Trawler.
This commit is contained in:
parent
eb5b1771e6
commit
24f72004e3
5 changed files with 456 additions and 334 deletions
|
@ -34,7 +34,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -112,7 +111,7 @@ class MartyrsBondTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} or another nonland permanent you control is put into a graveyard from the battlefield, each opponent sacrifices a permanent that shares a card type with it";
|
||||
return "Whenever {this} or another nonland permanent you control is put into a graveyard from the battlefield, each opponent sacrifices a permanent that shares a card type with it.";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
123
Mage.Sets/src/mage/cards/s/ScrapTrawler.java
Normal file
123
Mage.Sets/src/mage/cards/s/ScrapTrawler.java
Normal file
|
@ -0,0 +1,123 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ScrapTrawler extends CardImpl {
|
||||
|
||||
public ScrapTrawler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
||||
|
||||
this.subtype.add("Construct");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever Scrap Trawler or another artifact you control is put into a graveyard from the battlefield,
|
||||
// return to your hand target artifact card in your graveyard with lesser converted mana cost.
|
||||
Ability ability = new ScrapTrawlerTriggeredAbility();
|
||||
ability.addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card in your graveyard with lesser converted mana cost")));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ScrapTrawler(final ScrapTrawler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScrapTrawler copy() {
|
||||
return new ScrapTrawler(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ScrapTrawlerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public ScrapTrawlerTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new ReturnToHandTargetEffect());
|
||||
getEffects().get(0).setText("return to your hand target artifact card in your graveyard with lesser converted mana cost");
|
||||
}
|
||||
|
||||
public ScrapTrawlerTriggeredAbility(final ScrapTrawlerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScrapTrawlerTriggeredAbility copy() {
|
||||
return new ScrapTrawlerTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ZONE_CHANGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD
|
||||
&& ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) {
|
||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||
if (permanent.getControllerId().equals(this.getControllerId()) && permanent.getCardType().contains(CardType.ARTIFACT)) {
|
||||
FilterCard filter = new FilterArtifactCard("artifact card in your graveyard with converted mana cost less than " + permanent.getManaCost().convertedManaCost());
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, permanent.getManaCost().convertedManaCost()));
|
||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter);
|
||||
getTargets().clear();
|
||||
addTarget(target);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} or another artifact you control is put into a graveyard from the battlefield, " + super.getRule();
|
||||
}
|
||||
|
||||
}
|
|
@ -28,16 +28,15 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -54,9 +53,8 @@ public class SunkenHope extends CardImpl {
|
|||
public SunkenHope(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}");
|
||||
|
||||
|
||||
// At the beginning of each player's upkeep, that player returns a creature he or she controls to its owner's hand.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ReturnToHandEffect(), TargetController.ANY, false, true));
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SunkenHopeReturnToHandEffect(), TargetController.ANY, false, true));
|
||||
}
|
||||
|
||||
public SunkenHope(final SunkenHope card) {
|
||||
|
@ -69,20 +67,20 @@ public class SunkenHope extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class ReturnToHandEffect extends OneShotEffect {
|
||||
class SunkenHopeReturnToHandEffect extends OneShotEffect {
|
||||
|
||||
public ReturnToHandEffect() {
|
||||
public SunkenHopeReturnToHandEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
staticText = "that player returns a creature he or she controls to its owner's hand";
|
||||
}
|
||||
|
||||
public ReturnToHandEffect(final ReturnToHandEffect effect) {
|
||||
public SunkenHopeReturnToHandEffect(final SunkenHopeReturnToHandEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnToHandEffect copy() {
|
||||
return new ReturnToHandEffect(this);
|
||||
public SunkenHopeReturnToHandEffect copy() {
|
||||
return new SunkenHopeReturnToHandEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -74,6 +74,7 @@ public class AetherRevolt extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Pia's Revolution", 91, Rarity.RARE, mage.cards.p.PiasRevolution.class));
|
||||
cards.add(new SetCardInfo("Quicksmith Rebel", 93, Rarity.RARE, mage.cards.q.QuicksmithRebel.class));
|
||||
cards.add(new SetCardInfo("Quicksmith Spy", 41, Rarity.RARE, mage.cards.q.QuicksmithSpy.class));
|
||||
cards.add(new SetCardInfo("Scrap Trawler", 175, Rarity.RARE, mage.cards.s.ScrapTrawler.class));
|
||||
cards.add(new SetCardInfo("Tezzeret the Schemer", 137, Rarity.MYTHIC, mage.cards.t.TezzeretTheSchemer.class));
|
||||
cards.add(new SetCardInfo("Tezzeret, Master of Metal", 190, Rarity.MYTHIC, mage.cards.t.TezzeretMasterOfMetal.class));
|
||||
cards.add(new SetCardInfo("Trophy Mage", 48, Rarity.UNCOMMON, mage.cards.t.TrophyMage.class));
|
||||
|
|
|
@ -182,6 +182,7 @@ public class MediaInserts extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sanctifier of Souls", 157, Rarity.RARE, mage.cards.s.SanctifierOfSouls.class));
|
||||
cards.add(new SetCardInfo("Sandsteppe Citadel", 134, Rarity.SPECIAL, mage.cards.s.SandsteppeCitadel.class));
|
||||
cards.add(new SetCardInfo("Scavenging Ooze", 70, Rarity.RARE, mage.cards.s.ScavengingOoze.class));
|
||||
cards.add(new SetCardInfo("Scrap Trawler", 164, Rarity.RARE, mage.cards.s.ScrapTrawler.class));
|
||||
cards.add(new SetCardInfo("Scythe Leopard", 141, Rarity.SPECIAL, mage.cards.s.ScytheLeopard.class));
|
||||
cards.add(new SetCardInfo("Seeker of the Way", 130, Rarity.SPECIAL, mage.cards.s.SeekerOfTheWay.class));
|
||||
cards.add(new SetCardInfo("Serra Avatar", 48, Rarity.MYTHIC, mage.cards.s.SerraAvatar.class));
|
||||
|
|
Loading…
Reference in a new issue