mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge pull request #3836 from theelk801/master
Implemented C17: Galecaster Colossus and Kheru Mind-Eater
This commit is contained in:
commit
f4766723ca
4 changed files with 285 additions and 33 deletions
88
Mage.Sets/src/mage/cards/g/GalecasterColossus.java
Normal file
88
Mage.Sets/src/mage/cards/g/GalecasterColossus.java
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.cards.g;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapTargetCost;
|
||||||
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
import mage.target.common.TargetNonlandPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class GalecasterColossus extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent you don't control");
|
||||||
|
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("untapped Wizard you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||||
|
filter2.add(new SubtypePredicate(SubType.WIZARD));
|
||||||
|
filter2.add(Predicates.not(new TappedPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GalecasterColossus(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
|
||||||
|
|
||||||
|
this.subtype.add("Giant");
|
||||||
|
this.subtype.add("Wizard");
|
||||||
|
this.power = new MageInt(5);
|
||||||
|
this.toughness = new MageInt(6);
|
||||||
|
|
||||||
|
// Tap an untapped Wizard you control: Return target nonland permanent you don't control to its owner's hand.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new TapTargetCost(new TargetControlledPermanent(1, 1, filter2, true)));
|
||||||
|
ability.addTarget(new TargetNonlandPermanent(filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GalecasterColossus(final GalecasterColossus card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GalecasterColossus copy() {
|
||||||
|
return new GalecasterColossus(this);
|
||||||
|
}
|
||||||
|
}
|
194
Mage.Sets/src/mage/cards/k/KheruMindEater.java
Normal file
194
Mage.Sets/src/mage/cards/k/KheruMindEater.java
Normal file
|
@ -0,0 +1,194 @@
|
||||||
|
/*
|
||||||
|
* 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.k;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.AsThoughEffectImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.AsThoughEffectType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.game.ExileZone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetCardInHand;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class KheruMindEater extends CardImpl {
|
||||||
|
|
||||||
|
public KheruMindEater(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||||
|
|
||||||
|
this.subtype.add("Vampire");
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Menace
|
||||||
|
this.addAbility(new MenaceAbility());
|
||||||
|
|
||||||
|
// Whenever Kheru Mind-Eater deals combat damage to a player, that player exiles a card from his or her hand face down.
|
||||||
|
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new KheruMindEaterExileEffect(), false, true));
|
||||||
|
|
||||||
|
// You may look at and play cards exiled with Kheru Mind-Eater.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KheruMindEaterEffect()));
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new KheruMindEaterLookAtCardEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public KheruMindEater(final KheruMindEater card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KheruMindEater copy() {
|
||||||
|
return new KheruMindEater(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class KheruMindEaterExileEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public KheruMindEaterExileEffect() {
|
||||||
|
super(Outcome.Discard);
|
||||||
|
staticText = "that player exiles a card of his or her hand face down";
|
||||||
|
}
|
||||||
|
|
||||||
|
public KheruMindEaterExileEffect(final KheruMindEaterExileEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||||
|
if (player != null && player.getHand().size() > 0) {
|
||||||
|
Target target = new TargetCardInHand(1, new FilterCard());
|
||||||
|
target.chooseTarget(Outcome.Exile, player.getId(), source, game);
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||||
|
if (card != null && sourceObject != null) {
|
||||||
|
if (player.moveCardToExileWithInfo(card, CardUtil.getCardExileZoneId(game, source), sourceObject.getIdName(), source.getSourceId(), game, Zone.HAND, true)) {
|
||||||
|
card.setFaceDown(true, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KheruMindEaterExileEffect copy() {
|
||||||
|
return new KheruMindEaterExileEffect(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class KheruMindEaterEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
|
public KheruMindEaterEffect() {
|
||||||
|
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
|
||||||
|
staticText = "You may play cards exiled with {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public KheruMindEaterEffect(final KheruMindEaterEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KheruMindEaterEffect copy() {
|
||||||
|
return new KheruMindEaterEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||||
|
Card card = game.getCard(objectId);
|
||||||
|
if (affectedControllerId.equals(source.getControllerId()) && card != null && game.getState().getZone(card.getId()) == Zone.EXILED) {
|
||||||
|
ExileZone zone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
|
||||||
|
return zone != null && zone.contains(card.getId());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class KheruMindEaterLookAtCardEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
|
public KheruMindEaterLookAtCardEffect() {
|
||||||
|
super(AsThoughEffectType.LOOK_AT_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit);
|
||||||
|
staticText = "You may look at cards exiled with {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public KheruMindEaterLookAtCardEffect(final KheruMindEaterLookAtCardEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KheruMindEaterLookAtCardEffect copy() {
|
||||||
|
return new KheruMindEaterLookAtCardEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||||
|
if (affectedControllerId.equals(source.getControllerId())) {
|
||||||
|
Card card = game.getCard(objectId);
|
||||||
|
if (card != null) {
|
||||||
|
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||||
|
if (sourceObject == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
UUID exileId = CardUtil.getCardExileZoneId(game, source);
|
||||||
|
ExileZone exile = game.getExile().getExileZone(exileId);
|
||||||
|
return exile != null && exile.contains(objectId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -121,38 +121,6 @@ class MirriWeatherlightDuelistBlockRestrictionEffect extends RestrictionEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*class MirriWeatherlightDuelistAttackRestrictionEffect extends RestrictionEffect {
|
|
||||||
|
|
||||||
MirriWeatherlightDuelistAttackRestrictionEffect() {
|
|
||||||
super(Duration.WhileOnBattlefield);
|
|
||||||
staticText = "no more than one creature can attack you each combat";
|
|
||||||
}
|
|
||||||
|
|
||||||
MirriWeatherlightDuelistAttackRestrictionEffect(final MirriWeatherlightDuelistAttackRestrictionEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public MirriWeatherlightDuelistAttackRestrictionEffect copy() {
|
|
||||||
return new MirriWeatherlightDuelistAttackRestrictionEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
|
|
||||||
for (UUID creature : game.getCombat().getAttackers()) {
|
|
||||||
if (game.getPermanent(creature).getControllerId().equals(attacker.getControllerId())
|
|
||||||
&& game.getCombat().getDefendingPlayerId(creature, game).equals(source.getControllerId())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
class MirriWeatherlightDuelistAttackRestrictionEffect extends ContinuousEffectImpl {
|
class MirriWeatherlightDuelistAttackRestrictionEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
private final int maxAttackedBy;
|
private final int maxAttackedBy;
|
||||||
|
|
|
@ -61,9 +61,11 @@ public class Commander2017 extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Edgar Markov", 36, Rarity.MYTHIC, mage.cards.e.EdgarMarkov.class));
|
cards.add(new SetCardInfo("Edgar Markov", 36, Rarity.MYTHIC, mage.cards.e.EdgarMarkov.class));
|
||||||
cards.add(new SetCardInfo("Fortunate Few", 4, Rarity.RARE, mage.cards.f.FortunateFew.class));
|
cards.add(new SetCardInfo("Fortunate Few", 4, Rarity.RARE, mage.cards.f.FortunateFew.class));
|
||||||
cards.add(new SetCardInfo("Fractured Identity", 37, Rarity.RARE, mage.cards.f.FracturedIdentity.class));
|
cards.add(new SetCardInfo("Fractured Identity", 37, Rarity.RARE, mage.cards.f.FracturedIdentity.class));
|
||||||
|
cards.add(new SetCardInfo("Galecaster Colossus", 10, Rarity.RARE, mage.cards.g.GalecasterColossus.class));
|
||||||
cards.add(new SetCardInfo("Herald's Horn", 53, Rarity.UNCOMMON, mage.cards.h.HeraldsHorn.class));
|
cards.add(new SetCardInfo("Herald's Horn", 53, Rarity.UNCOMMON, mage.cards.h.HeraldsHorn.class));
|
||||||
cards.add(new SetCardInfo("Hungry Lynx", 31, Rarity.RARE, mage.cards.h.HungryLynx.class));
|
cards.add(new SetCardInfo("Hungry Lynx", 31, Rarity.RARE, mage.cards.h.HungryLynx.class));
|
||||||
cards.add(new SetCardInfo("Inalla, Archmage Ritualist", 38, Rarity.MYTHIC, mage.cards.i.InallaArchmageRitualist.class));
|
cards.add(new SetCardInfo("Inalla, Archmage Ritualist", 38, Rarity.MYTHIC, mage.cards.i.InallaArchmageRitualist.class));
|
||||||
|
cards.add(new SetCardInfo("Kheru Mind-Eater", 17, Rarity.RARE, mage.cards.k.KheruMindEater.class));
|
||||||
cards.add(new SetCardInfo("Kindred Dominance", 18, Rarity.RARE, mage.cards.k.KindredDominance.class));
|
cards.add(new SetCardInfo("Kindred Dominance", 18, Rarity.RARE, mage.cards.k.KindredDominance.class));
|
||||||
cards.add(new SetCardInfo("Mirri, Weatherlight Duelist", 43, Rarity.MYTHIC, mage.cards.m.MirriWeatherlightDuelist.class));
|
cards.add(new SetCardInfo("Mirri, Weatherlight Duelist", 43, Rarity.MYTHIC, mage.cards.m.MirriWeatherlightDuelist.class));
|
||||||
cards.add(new SetCardInfo("Mirror of the Forebears", 54, Rarity.UNCOMMON, mage.cards.m.MirrorOfTheForebears.class));
|
cards.add(new SetCardInfo("Mirror of the Forebears", 54, Rarity.UNCOMMON, mage.cards.m.MirrorOfTheForebears.class));
|
||||||
|
|
Loading…
Reference in a new issue