mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
fixed Deafening Silence
This commit is contained in:
parent
6289e9a1f5
commit
b324886c09
1 changed files with 3 additions and 8 deletions
|
@ -1,9 +1,9 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -69,18 +69,13 @@ class DeafeningSilenceEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Spell spell = game.getSpell(event.getTargetId());
|
||||
if (spell == null || spell.isCreature()) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card == null || card.isCreature()) {
|
||||
return false;
|
||||
}
|
||||
DeafeningSilenceWatcher watcher = game.getState().getWatcher(DeafeningSilenceWatcher.class);
|
||||
return watcher != null && watcher.castSpell(event.getPlayerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Each player can't cast more than one noncreature spell each turn.";
|
||||
}
|
||||
}
|
||||
|
||||
class DeafeningSilenceWatcher extends Watcher {
|
||||
|
|
Loading…
Reference in a new issue