mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +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 mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
|
@ -39,6 +40,8 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -95,8 +98,13 @@ class CastBlueSpellThisTurnCondition implements Condition {
|
|||
}
|
||||
|
||||
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) {
|
||||
super("DreamThiefWatcher", WatcherScope.PLAYER);
|
||||
|
@ -115,15 +123,13 @@ class DreamThiefWatcher extends WatcherImpl<DreamThiefWatcher> {
|
|||
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
if (event.getType() == EventType.SPELL_CAST
|
||||
&& controllerId == event.getPlayerId()) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell.getColor().isBlue()
|
||||
&& spell.getSourceId() != cardId) {
|
||||
if (!spell.getSourceId().equals(cardId) && filter.match(spell, game)) {
|
||||
condition = true;
|
||||
}
|
||||
}
|
||||
|
@ -134,4 +140,4 @@ class DreamThiefWatcher extends WatcherImpl<DreamThiefWatcher> {
|
|||
super.reset();
|
||||
condition = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBlueTargetEffect(), new ManaCostsImpl("{U}"));
|
||||
ability.addTarget(new TargetPermanent());
|
||||
ability.addTarget(new TargetPermanent(true));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
@ -108,4 +108,4 @@ class BecomesBlueTargetEffect extends ContinuousEffectImpl<BecomesBlueTargetEffe
|
|||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue