mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
cards
This commit is contained in:
parent
89770db58e
commit
99e368df92
8 changed files with 512 additions and 2 deletions
103
Mage.Sets/src/mage/sets/alarareborn/NemesisofReason.java
Normal file
103
Mage.Sets/src/mage/sets/alarareborn/NemesisofReason.java
Normal file
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* 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.alarareborn;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class NemesisofReason extends CardImpl<NemesisofReason> {
|
||||
|
||||
public NemesisofReason (UUID ownerId) {
|
||||
super(ownerId, 28, "Nemesis of Reason", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{B}");
|
||||
this.expansionSetCode = "ARB";
|
||||
this.subtype.add("Leviathan");
|
||||
this.subtype.add("Horror");
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(7);
|
||||
this.addAbility(new NemesisofReasonTriggeredAbility());
|
||||
}
|
||||
|
||||
public NemesisofReason (final NemesisofReason card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NemesisofReason copy() {
|
||||
return new NemesisofReason(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NemesisofReasonTriggeredAbility extends TriggeredAbilityImpl<NemesisofReasonTriggeredAbility> {
|
||||
NemesisofReasonTriggeredAbility() {
|
||||
super(Constants.Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(10));
|
||||
}
|
||||
|
||||
NemesisofReasonTriggeredAbility(final NemesisofReasonTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NemesisofReasonTriggeredAbility copy() {
|
||||
return new NemesisofReasonTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId()) ) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever Nemesis of Reason attacks, defending player puts the top ten cards of his or her library into his or her graveyard.";
|
||||
}
|
||||
}
|
61
Mage.Sets/src/mage/sets/mirrodinbesieged/TurntheTide.java
Normal file
61
Mage.Sets/src/mage/sets/mirrodinbesieged/TurntheTide.java
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* 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.mirrodinbesieged;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.continious.BoostOpponentsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class TurntheTide extends CardImpl<TurntheTide> {
|
||||
|
||||
public TurntheTide (UUID ownerId) {
|
||||
super(ownerId, 35, "Turn the Tide", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
this.expansionSetCode = "MBS";
|
||||
this.color.setBlue(true);
|
||||
this.getSpellAbility().addEffect(new BoostOpponentsEffect(-2, 0, Constants.Duration.EndOfTurn));
|
||||
}
|
||||
|
||||
public TurntheTide (final TurntheTide card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TurntheTide copy() {
|
||||
return new TurntheTide(this);
|
||||
}
|
||||
|
||||
}
|
65
Mage.Sets/src/mage/sets/newphyrexia/GethsVerdict.java
Normal file
65
Mage.Sets/src/mage/sets/newphyrexia/GethsVerdict.java
Normal 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.newphyrexia;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.effects.common.SacrificeEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class GethsVerdict extends CardImpl<GethsVerdict> {
|
||||
|
||||
public GethsVerdict (UUID ownerId) {
|
||||
super(ownerId, 61, "Geth's Verdict", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}{B}");
|
||||
this.expansionSetCode = "NPH";
|
||||
this.color.setBlack(true);
|
||||
this.getSpellAbility().addEffect(new SacrificeEffect(new FilterCreaturePermanent(), 1, "Target player"));
|
||||
this.getSpellAbility().addEffect(new LoseLifeTargetEffect(1));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
}
|
||||
|
||||
public GethsVerdict (final GethsVerdict card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GethsVerdict copy() {
|
||||
return new GethsVerdict(this);
|
||||
}
|
||||
|
||||
}
|
98
Mage.Sets/src/mage/sets/newphyrexia/GitaxianProbe.java
Normal file
98
Mage.Sets/src/mage/sets/newphyrexia/GitaxianProbe.java
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class GitaxianProbe extends CardImpl<GitaxianProbe> {
|
||||
|
||||
public GitaxianProbe (UUID ownerId) {
|
||||
super(ownerId, 35, "Gitaxian Probe", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{UP}");
|
||||
this.expansionSetCode = "NPH";
|
||||
this.color.setBlue(true);
|
||||
this.getSpellAbility().addEffect(new GitaxianProbeEffect());
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(1));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
}
|
||||
|
||||
public GitaxianProbe (final GitaxianProbe card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GitaxianProbe copy() {
|
||||
return new GitaxianProbe(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class GitaxianProbeEffect extends OneShotEffect<GitaxianProbeEffect> {
|
||||
GitaxianProbeEffect() {
|
||||
super(Constants.Outcome.Detriment);
|
||||
}
|
||||
|
||||
GitaxianProbeEffect(final GitaxianProbeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player player = game.getPlayer(targetPointer.getFirst(source));
|
||||
if (player != null && controller != null) {
|
||||
controller.lookAtCards("Gitaxian Probe", player.getHand(), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GitaxianProbeEffect copy() {
|
||||
return new GitaxianProbeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Ability source) {
|
||||
return "Look at target player's hand";
|
||||
}
|
||||
}
|
61
Mage.Sets/src/mage/sets/newphyrexia/NoxiousRevival.java
Normal file
61
Mage.Sets/src/mage/sets/newphyrexia/NoxiousRevival.java
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class NoxiousRevival extends CardImpl<NoxiousRevival> {
|
||||
|
||||
public NoxiousRevival (UUID ownerId) {
|
||||
super(ownerId, 118, "Noxious Revival", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{GP}");
|
||||
this.expansionSetCode = "NPH";
|
||||
this.color.setGreen(true);
|
||||
this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true));
|
||||
this.getSpellAbility().addTarget(new TargetCardInGraveyard());
|
||||
}
|
||||
|
||||
public NoxiousRevival (final NoxiousRevival card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NoxiousRevival copy() {
|
||||
return new NoxiousRevival(this);
|
||||
}
|
||||
|
||||
}
|
119
Mage.Sets/src/mage/sets/scarsofmirrodin/GlintHawkIdol.java
Normal file
119
Mage.Sets/src/mage/sets/scarsofmirrodin/GlintHawkIdol.java
Normal file
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* 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.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Abilities;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class GlintHawkIdol extends CardImpl<GlintHawkIdol> {
|
||||
|
||||
public GlintHawkIdol (UUID ownerId) {
|
||||
super(ownerId, 156, "Glint Hawk Idol", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "SOM";
|
||||
this.addAbility(new GlintHawkIdolTriggeredAbility());
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new GlintHawkIdolToken(), ""), new ColoredManaCost(Constants.ColoredManaSymbol.W)));
|
||||
|
||||
}
|
||||
|
||||
public GlintHawkIdol (final GlintHawkIdol card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlintHawkIdol copy() {
|
||||
return new GlintHawkIdol(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class GlintHawkIdolTriggeredAbility extends TriggeredAbilityImpl<GlintHawkIdolTriggeredAbility> {
|
||||
GlintHawkIdolTriggeredAbility() {
|
||||
super(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new GlintHawkIdolToken(), ""), true);
|
||||
}
|
||||
|
||||
GlintHawkIdolTriggeredAbility(final GlintHawkIdolTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlintHawkIdolTriggeredAbility copy() {
|
||||
return new GlintHawkIdolTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && !event.getTargetId().equals(this.getSourceId())) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
|
||||
if (zEvent.getToZone() == Constants.Zone.BATTLEFIELD) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null && permanent.getCardType().contains(CardType.ARTIFACT)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever another artifact enters the battlefield under your control, you may have Glint Hawk Idol become a 2/2 Bird artifact creature with flying until end of turn.";
|
||||
}
|
||||
}
|
||||
|
||||
class GlintHawkIdolToken extends Token {
|
||||
GlintHawkIdolToken() {
|
||||
super("", "a 2/2 Bird artifact creature with flying");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Bird");
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
|
@ -67,7 +67,7 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
Player player = game.getPlayer(targetPointer.getFirst(source));
|
||||
if (player != null) {
|
||||
// putting cards to grave shouldn't end the game, so getting minimun available
|
||||
int cardsCount = Math.min(amount.calculate(game, source), player.getLibrary().size());
|
||||
|
|
|
@ -113,7 +113,10 @@ public class BecomesCreatureSourceEOTEffect extends ContinuousEffectImpl<Becomes
|
|||
|
||||
@Override
|
||||
public String getText(Ability source) {
|
||||
return "Until end of turn {this} becomes a " + token.getDescription() + " that's still a " + this.type;
|
||||
if (type.length() > 0)
|
||||
return "Until end of turn {this} becomes a " + token.getDescription() + " that's still a " + this.type;
|
||||
else
|
||||
return "Until end of turn {this} becomes a " + token.getDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue