forked from External/mage
* Fixed import of Dirty Wererat (cbt33).
This commit is contained in:
parent
44ccb830b7
commit
c10c4da9bf
2 changed files with 11 additions and 3 deletions
|
|
@ -37,8 +37,11 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
|
|
@ -72,7 +75,12 @@ public class CeaseFire extends CardImpl<CeaseFire> {
|
|||
}
|
||||
|
||||
class CeaseFireEffect extends ReplacementEffectImpl<CeaseFireEffect> {
|
||||
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell();
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
public CeaseFireEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Detriment);
|
||||
staticText = "Target player can't cast creature spells.";
|
||||
|
|
@ -101,7 +109,7 @@ class CeaseFireEffect extends ReplacementEffectImpl<CeaseFireEffect> {
|
|||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.CAST_SPELL && event.getPlayerId().equals(source.getFirstTarget())) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
if (object.getCardType().contains(CardType.CREATURE)) {
|
||||
if (filter.match((Spell) object, game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
|
|||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.CantBlockSourceEffect;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
import mage.abilities.effects.common.combat.CantBlockSourceEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue