mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Merge origin/master
This commit is contained in:
commit
58432315b5
4 changed files with 24 additions and 21 deletions
|
@ -53,17 +53,16 @@ public class UnravelTheAEther extends CardImpl {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
|
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
|
||||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public UnravelTheAEther(UUID ownerId) {
|
public UnravelTheAEther(UUID ownerId) {
|
||||||
super(ownerId, 143, "Unravel the AEther", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
super(ownerId, 143, "Unravel the AEther", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
||||||
this.expansionSetCode = "BNG";
|
this.expansionSetCode = "BNG";
|
||||||
|
|
||||||
|
|
||||||
// Choose target artifact or enchantment. Its owner shuffles it into his or her library.
|
// Choose target artifact or enchantment. Its owner shuffles it into his or her library.
|
||||||
this.getSpellAbility().addEffect(new UnravelTheAEtherShuffleIntoLibraryEffect());
|
this.getSpellAbility().addEffect(new UnravelTheAEtherShuffleIntoLibraryEffect());
|
||||||
Target target = new TargetPermanent(1,1,filter,true);
|
Target target = new TargetPermanent(1, 1, filter, false);
|
||||||
this.getSpellAbility().addTarget(target);
|
this.getSpellAbility().addTarget(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +75,7 @@ public class UnravelTheAEther extends CardImpl {
|
||||||
return new UnravelTheAEther(this);
|
return new UnravelTheAEther(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class UnravelTheAEtherShuffleIntoLibraryEffect extends OneShotEffect {
|
class UnravelTheAEtherShuffleIntoLibraryEffect extends OneShotEffect {
|
||||||
|
|
||||||
public UnravelTheAEtherShuffleIntoLibraryEffect() {
|
public UnravelTheAEtherShuffleIntoLibraryEffect() {
|
||||||
|
@ -96,7 +96,7 @@ class UnravelTheAEtherShuffleIntoLibraryEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
if (permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true) ) {
|
if (permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true)) {
|
||||||
game.getPlayer(permanent.getOwnerId()).shuffleLibrary(game);
|
game.getPlayer(permanent.getOwnerId()).shuffleLibrary(game);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,8 +58,8 @@ public class StoneSeederHierophant extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever a land enters the battlefield under your control, untap Stone-Seeder Hierophant.
|
// Whenever a land enters the battlefield under your control, untap Stone-Seeder Hierophant.
|
||||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new FilterLandPermanent("a land"), false));
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new FilterLandPermanent("a land"), false, null, true));
|
||||||
|
|
||||||
// {tap}: Untap target land.
|
// {tap}: Untap target land.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
|
||||||
Target target = new TargetLandPermanent();
|
Target target = new TargetLandPermanent();
|
||||||
|
|
|
@ -28,33 +28,35 @@
|
||||||
package mage.sets.riseoftheeldrazi;
|
package mage.sets.riseoftheeldrazi;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.constants.*;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
|
||||||
import mage.abilities.costs.common.RevealTargetFromHandCost;
|
import mage.abilities.costs.common.RevealTargetFromHandCost;
|
||||||
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class InduceDespair extends CardImpl {
|
public class InduceDespair extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your hand");
|
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your hand");
|
||||||
|
|
||||||
public InduceDespair(UUID ownerId) {
|
public InduceDespair(UUID ownerId) {
|
||||||
super(ownerId, 114, "Induce Despair", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
super(ownerId, 114, "Induce Despair", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
||||||
this.expansionSetCode = "ROE";
|
this.expansionSetCode = "ROE";
|
||||||
|
|
||||||
|
|
||||||
// As an additional cost to cast Induce Despair, reveal a creature card from your hand.
|
// As an additional cost to cast Induce Despair, reveal a creature card from your hand.
|
||||||
// Target creature gets -X/-X until end of turn, where X is the revealed card's converted mana cost.
|
// Target creature gets -X/-X until end of turn, where X is the revealed card's converted mana cost.
|
||||||
this.getSpellAbility().addEffect(new InduceDespairEffect());
|
this.getSpellAbility().addEffect(new InduceDespairEffect());
|
||||||
|
@ -87,13 +89,14 @@ class InduceDespairEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
RevealTargetFromHandCost cost = (RevealTargetFromHandCost) source.getCosts().get(0);
|
RevealTargetFromHandCost cost = (RevealTargetFromHandCost) source.getCosts().get(0);
|
||||||
Permanent creature = game.getPermanent(targetPointer.getFirst(game, source));
|
Permanent creature = game.getPermanent(targetPointer.getFirst(game, source));
|
||||||
if (cost != null) {
|
if (cost != null && creature != null) {
|
||||||
int CMC = -1 * cost.convertedManaCosts;
|
int cmcBoost = -1 * cost.convertedManaCosts;
|
||||||
if (creature != null) {
|
ContinuousEffect effect = new BoostTargetEffect(cmcBoost, cmcBoost, Duration.EndOfTurn);
|
||||||
creature.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(CMC, CMC, Duration.EndOfTurn)), source.getSourceId(), game, false);
|
effect.setTargetPointer(new FixedTarget(creature.getId(), creature.getZoneChangeCounter(game)));
|
||||||
}
|
game.addEffect(effect, source);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
package mage.sets.urzaslegacy;
|
package mage.sets.urzaslegacy;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
@ -38,6 +35,8 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.keyword.EchoAbility;
|
import mage.abilities.keyword.EchoAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.target.common.TargetCreatureOrPlayer;
|
import mage.target.common.TargetCreatureOrPlayer;
|
||||||
|
|
||||||
|
@ -60,6 +59,7 @@ public class TickingGnomes extends CardImpl {
|
||||||
// Sacrifice Ticking Gnomes: Ticking Gnomes deals 1 damage to target creature or player.
|
// Sacrifice Ticking Gnomes: Ticking Gnomes deals 1 damage to target creature or player.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost());
|
||||||
ability.addTarget(new TargetCreatureOrPlayer());
|
ability.addTarget(new TargetCreatureOrPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TickingGnomes(final TickingGnomes card) {
|
public TickingGnomes(final TickingGnomes card) {
|
||||||
|
|
Loading…
Reference in a new issue