forked from External/mage
fixed Mana Maze not allowing colorless spells to be cast (fixes #4112)
This commit is contained in:
parent
79d4c07d20
commit
e967c39513
1 changed files with 3 additions and 5 deletions
|
|
@ -53,11 +53,10 @@ import mage.watchers.Watcher;
|
|||
public class ManaMaze extends CardImpl {
|
||||
|
||||
public ManaMaze(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
|
||||
// Players can't cast spells that share a color with the spell most recently cast this turn.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ManaMazeEffect()), new LastSpellCastWatcher());
|
||||
|
||||
}
|
||||
|
||||
public ManaMaze(final ManaMaze card) {
|
||||
|
|
@ -91,9 +90,8 @@ class ManaMazeEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
Card card = game.getCard(event.getSourceId());
|
||||
if (card != null) {
|
||||
LastSpellCastWatcher watcher = (LastSpellCastWatcher) game.getState().getWatchers().get(LastSpellCastWatcher.class.getSimpleName());
|
||||
if (watcher != null
|
||||
&& watcher.lastSpellCast != null) {
|
||||
return card.getColor(game).contains(watcher.lastSpellCast.getColor(game));
|
||||
if (watcher != null && watcher.lastSpellCast != null) {
|
||||
return !card.getColor(game).intersection(watcher.lastSpellCast.getColor(game)).isColorless();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue