mirror of
https://github.com/correl/mage.git
synced 2024-12-28 03:00:10 +00:00
[VOW] Implemented Concealing Curtains / Revealing Eye
This commit is contained in:
parent
d5d90b7b2d
commit
83caa6aa12
3 changed files with 144 additions and 0 deletions
47
Mage.Sets/src/mage/cards/c/ConcealingCurtains.java
Normal file
47
Mage.Sets/src/mage/cards/c/ConcealingCurtains.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ConcealingCurtains extends CardImpl {
|
||||
|
||||
public ConcealingCurtains(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
|
||||
|
||||
this.subtype.add(SubType.WALL);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(4);
|
||||
this.secondSideCardClazz = mage.cards.r.RevealingEye.class;
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// {2}{B}: Transform Concealing Curtains. Activate only as a sorcery.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new ActivateAsSorceryActivatedAbility(
|
||||
new TransformSourceEffect(), new ManaCostsImpl<>("{2}{B}")
|
||||
));
|
||||
}
|
||||
|
||||
private ConcealingCurtains(final ConcealingCurtains card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConcealingCurtains copy() {
|
||||
return new ConcealingCurtains(this);
|
||||
}
|
||||
}
|
95
Mage.Sets/src/mage/cards/r/RevealingEye.java
Normal file
95
Mage.Sets/src/mage/cards/r/RevealingEye.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
|
||||
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.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RevealingEye extends CardImpl {
|
||||
|
||||
public RevealingEye(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||
|
||||
this.subtype.add(SubType.EYE);
|
||||
this.subtype.add(SubType.HORROR);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
this.color.setBlack(true);
|
||||
this.nightCard = true;
|
||||
|
||||
// Menace
|
||||
this.addAbility(new MenaceAbility());
|
||||
|
||||
// When this creature transforms into Revealing Eye, target opponent reveals their hand. You may choose a nonland card from it. If you do, that player discards that card, then draws a card.
|
||||
Ability ability = new TransformIntoSourceTriggeredAbility(new RevealingEyeEffect());
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private RevealingEye(final RevealingEye card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RevealingEye copy() {
|
||||
return new RevealingEye(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RevealingEyeEffect extends OneShotEffect {
|
||||
|
||||
RevealingEyeEffect() {
|
||||
super(Outcome.Discard);
|
||||
staticText = "target opponent reveals their hand. You may choose a nonland card from it. " +
|
||||
"If you do, that player discards that card, then draws a card";
|
||||
}
|
||||
|
||||
private RevealingEyeEffect(final RevealingEyeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RevealingEyeEffect copy() {
|
||||
return new RevealingEyeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
if (controller == null || opponent == null) {
|
||||
return false;
|
||||
}
|
||||
opponent.revealCards(source, opponent.getHand(), game);
|
||||
if (opponent.getHand().count(StaticFilters.FILTER_CARD_NON_LAND, game) < 1) {
|
||||
return true;
|
||||
}
|
||||
TargetCard target = new TargetCardInHand(0, 1, StaticFilters.FILTER_CARD_NON_LAND);
|
||||
controller.choose(outcome, opponent.getHand(), target, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null) {
|
||||
return true;
|
||||
}
|
||||
opponent.discard(card, false, source, game);
|
||||
opponent.drawCards(1, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -85,6 +85,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Clever Distraction", 9, Rarity.UNCOMMON, mage.cards.c.CleverDistraction.class));
|
||||
cards.add(new SetCardInfo("Cloaked Cadet", 192, Rarity.UNCOMMON, mage.cards.c.CloakedCadet.class));
|
||||
cards.add(new SetCardInfo("Cobbled Lancer", 52, Rarity.UNCOMMON, mage.cards.c.CobbledLancer.class));
|
||||
cards.add(new SetCardInfo("Concealing Curtains", 101, Rarity.RARE, mage.cards.c.ConcealingCurtains.class));
|
||||
cards.add(new SetCardInfo("Consuming Tide", 53, Rarity.RARE, mage.cards.c.ConsumingTide.class));
|
||||
cards.add(new SetCardInfo("Courier Bat", 102, Rarity.COMMON, mage.cards.c.CourierBat.class));
|
||||
cards.add(new SetCardInfo("Cradle of Safety", 54, Rarity.COMMON, mage.cards.c.CradleOfSafety.class));
|
||||
|
@ -235,6 +236,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Resistance Squad", 32, Rarity.UNCOMMON, mage.cards.r.ResistanceSquad.class));
|
||||
cards.add(new SetCardInfo("Restless Bloodseeker", 128, Rarity.UNCOMMON, mage.cards.r.RestlessBloodseeker.class));
|
||||
cards.add(new SetCardInfo("Retrieve", 215, Rarity.UNCOMMON, mage.cards.r.Retrieve.class));
|
||||
cards.add(new SetCardInfo("Revealing Eye", 101, Rarity.RARE, mage.cards.r.RevealingEye.class));
|
||||
cards.add(new SetCardInfo("Riphook Raider", 203, Rarity.COMMON, mage.cards.r.RiphookRaider.class));
|
||||
cards.add(new SetCardInfo("Rot-Tide Gargantua", 129, Rarity.COMMON, mage.cards.r.RotTideGargantua.class));
|
||||
cards.add(new SetCardInfo("Runebound Wolf", 176, Rarity.UNCOMMON, mage.cards.r.RuneboundWolf.class));
|
||||
|
|
Loading…
Reference in a new issue