mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Minor fixes to Dream Thief and Indigo Faerie.
This commit is contained in:
parent
6388c939ee
commit
93a1597e5d
2 changed files with 15 additions and 9 deletions
|
@ -29,6 +29,7 @@ package mage.sets.eventide;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.ObjectColor;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
|
@ -39,6 +40,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -96,7 +99,12 @@ class CastBlueSpellThisTurnCondition implements Condition {
|
||||||
|
|
||||||
class DreamThiefWatcher extends WatcherImpl<DreamThiefWatcher> {
|
class DreamThiefWatcher extends WatcherImpl<DreamThiefWatcher> {
|
||||||
|
|
||||||
UUID cardId;
|
private static final FilterSpell filter = new FilterSpell();
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||||
|
}
|
||||||
|
|
||||||
|
private UUID cardId;
|
||||||
|
|
||||||
public DreamThiefWatcher(UUID cardId) {
|
public DreamThiefWatcher(UUID cardId) {
|
||||||
super("DreamThiefWatcher", WatcherScope.PLAYER);
|
super("DreamThiefWatcher", WatcherScope.PLAYER);
|
||||||
|
@ -115,15 +123,13 @@ class DreamThiefWatcher extends WatcherImpl<DreamThiefWatcher> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void watch(GameEvent event, Game game) {
|
public void watch(GameEvent event, Game game) {
|
||||||
if (condition == true) //no need to check - condition has already occured
|
if (condition == true) { //no need to check - condition has already occured
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (event.getType() == EventType.SPELL_CAST
|
if (event.getType() == EventType.SPELL_CAST
|
||||||
&& controllerId == event.getPlayerId()) {
|
&& controllerId == event.getPlayerId()) {
|
||||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||||
if (spell.getColor().isBlue()
|
if (!spell.getSourceId().equals(cardId) && filter.match(spell, game)) {
|
||||||
&& spell.getSourceId() != cardId) {
|
|
||||||
condition = true;
|
condition = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class IndigoFaerie extends CardImpl<IndigoFaerie> {
|
||||||
|
|
||||||
// {U}: Target permanent becomes blue in addition to its other colors until end of turn.
|
// {U}: Target permanent becomes blue in addition to its other colors until end of turn.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBlueTargetEffect(), new ManaCostsImpl("{U}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBlueTargetEffect(), new ManaCostsImpl("{U}"));
|
||||||
ability.addTarget(new TargetPermanent());
|
ability.addTarget(new TargetPermanent(true));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue