mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Card updates.
This commit is contained in:
parent
174a0217ed
commit
454efbbef6
3 changed files with 9 additions and 40 deletions
|
@ -30,13 +30,10 @@ package mage.sets.darksteel;
|
|||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
|
||||
import mage.abilities.common.DiscardsACardOpponentTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -48,8 +45,10 @@ public class GethsGrimoire extends CardImpl {
|
|||
super(ownerId, 123, "Geth's Grimoire", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
this.expansionSetCode = "DST";
|
||||
|
||||
Effect drawTrigger = new DrawCardSourceControllerEffect(1);
|
||||
drawTrigger.setText("You may draw a card.");
|
||||
// Whenever an opponent discards a card, you may draw a card.
|
||||
this.addAbility(new GethsGrimoireTriggeredAbility());
|
||||
this.addAbility(new DiscardsACardOpponentTriggeredAbility(drawTrigger, true));
|
||||
}
|
||||
|
||||
public GethsGrimoire(final GethsGrimoire card) {
|
||||
|
@ -60,32 +59,4 @@ public class GethsGrimoire extends CardImpl {
|
|||
public GethsGrimoire copy() {
|
||||
return new GethsGrimoire(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GethsGrimoireTriggeredAbility extends TriggeredAbilityImpl {
|
||||
GethsGrimoireTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), true);
|
||||
}
|
||||
|
||||
GethsGrimoireTriggeredAbility(final GethsGrimoireTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GethsGrimoireTriggeredAbility copy() {
|
||||
return new GethsGrimoireTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DISCARDED_CARD && game.getOpponents(this.getControllerId()).contains(event.getPlayerId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an opponent discards a card, you may draw a card.";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -116,7 +116,7 @@ class OrcishLibrarianEffect extends OneShotEffect {
|
|||
if (cards.size() > 0)
|
||||
{
|
||||
Card card = cards.getRandom(game);
|
||||
card.moveToExile(null, null, source.getSourceId(), game);
|
||||
player.moveCardToExileWithInfo(card, null, null, source.getId(), game, Zone.LIBRARY);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,11 +41,10 @@ import static mage.constants.Layer.TypeChangingEffects_4;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -79,10 +78,9 @@ public class Opalescence extends CardImpl {
|
|||
|
||||
class OpalescenceEffect extends ContinuousEffectImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("Each other non-Aura enchantment");
|
||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("Each other non-Aura enchantment");
|
||||
static {
|
||||
filter.add(Predicates.not(new SubtypePredicate("Aura")));
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public OpalescenceEffect() {
|
||||
|
|
Loading…
Reference in a new issue