mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
- Fixed #5100. Added a replacement effect for skipping the combat phase.
This commit is contained in:
parent
43ee5e9c43
commit
2e17cb334e
7 changed files with 102 additions and 45 deletions
|
@ -1,14 +1,14 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.effects.common.SkipNextCombatEffect;
|
import mage.abilities.effects.common.SkipCombatStepEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,26 +16,28 @@ import mage.constants.SubType;
|
||||||
* @author Plopman
|
* @author Plopman
|
||||||
*/
|
*/
|
||||||
public final class BlindingAngel extends CardImpl {
|
public final class BlindingAngel extends CardImpl {
|
||||||
|
|
||||||
public BlindingAngel(UUID ownerId, CardSetInfo setInfo) {
|
public BlindingAngel(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
|
||||||
this.subtype.add(SubType.ANGEL);
|
this.subtype.add(SubType.ANGEL);
|
||||||
|
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
// Whenever Blinding Angel deals combat damage to a player, that player skips their next combat phase.
|
|
||||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SkipNextCombatEffect(), false, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Whenever Blinding Angel deals combat damage to a player, that player skips their next combat phase.
|
||||||
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SkipCombatStepEffect(Duration.OneUse).setText("that player skips their next combat phase."), false, true));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public BlindingAngel(final BlindingAngel card) {
|
public BlindingAngel(final BlindingAngel card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlindingAngel copy() {
|
public BlindingAngel copy() {
|
||||||
return new BlindingAngel(this);
|
return new BlindingAngel(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.effects.common.SkipNextCombatEffect;
|
import mage.abilities.effects.common.SkipCombatStepEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,10 +15,10 @@ import mage.target.common.TargetOpponent;
|
||||||
public final class EmptyCityRuse extends CardImpl {
|
public final class EmptyCityRuse extends CardImpl {
|
||||||
|
|
||||||
public EmptyCityRuse(UUID ownerId, CardSetInfo setInfo) {
|
public EmptyCityRuse(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}");
|
||||||
|
|
||||||
// Target opponent skips all combat phases of their next turn.
|
// Target opponent skips all combat phases of their next turn.
|
||||||
this.getSpellAbility().addEffect(new SkipNextCombatEffect());
|
this.getSpellAbility().addEffect(new SkipCombatStepEffect(Duration.UntilYourNextTurn).setText("Target opponent skips all combat phases of their next turn."));
|
||||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,4 +30,4 @@ public final class EmptyCityRuse extends CardImpl {
|
||||||
public EmptyCityRuse copy() {
|
public EmptyCityRuse copy() {
|
||||||
return new EmptyCityRuse(this);
|
return new EmptyCityRuse(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.effects.common.SkipNextCombatEffect;
|
import mage.abilities.effects.common.SkipCombatStepEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,19 +13,19 @@ import mage.target.TargetPlayer;
|
||||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
*/
|
*/
|
||||||
public final class FalsePeace extends CardImpl {
|
public final class FalsePeace extends CardImpl {
|
||||||
|
|
||||||
public FalsePeace(UUID ownerId, CardSetInfo setInfo) {
|
public FalsePeace(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}");
|
||||||
|
|
||||||
// Target player skips all combat phases of their next turn.
|
// Target player skips all combat phases of their next turn.
|
||||||
this.getSpellAbility().addEffect(new SkipNextCombatEffect());
|
this.getSpellAbility().addEffect(new SkipCombatStepEffect(Duration.UntilYourNextTurn).setText("Target player skips all combat phases of their next turn."));
|
||||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public FalsePeace(final FalsePeace card) {
|
public FalsePeace(final FalsePeace card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FalsePeace copy() {
|
public FalsePeace copy() {
|
||||||
return new FalsePeace(this);
|
return new FalsePeace(this);
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.effects.common.SkipNextCombatEffect;
|
import mage.abilities.effects.common.SkipCombatStepEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,19 +13,19 @@ import mage.target.TargetPlayer;
|
||||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
*/
|
*/
|
||||||
public final class MomentOfSilence extends CardImpl {
|
public final class MomentOfSilence extends CardImpl {
|
||||||
|
|
||||||
public MomentOfSilence(UUID ownerId, CardSetInfo setInfo) {
|
public MomentOfSilence(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
|
||||||
|
|
||||||
// Target player skips their next combat phase this turn.
|
// Target player skips their next combat phase this turn.
|
||||||
this.getSpellAbility().addEffect(new SkipNextCombatEffect());
|
this.getSpellAbility().addEffect(new SkipCombatStepEffect(Duration.EndOfTurn).setText("Target player skips their next combat this turn"));
|
||||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public MomentOfSilence(final MomentOfSilence card) {
|
public MomentOfSilence(final MomentOfSilence card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MomentOfSilence copy() {
|
public MomentOfSilence copy() {
|
||||||
return new MomentOfSilence(this);
|
return new MomentOfSilence(this);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -8,12 +7,13 @@ import mage.abilities.common.CantBlockAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.ManaWasSpentCondition;
|
import mage.abilities.condition.common.ManaWasSpentCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
import mage.abilities.effects.common.SkipNextCombatEffect;
|
import mage.abilities.effects.common.SkipCombatStepEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.ColoredManaSymbol;
|
import mage.constants.ColoredManaSymbol;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||||
|
|
||||||
|
@ -22,26 +22,26 @@ import mage.watchers.common.ManaSpentToCastWatcher;
|
||||||
* @author ilcartographer
|
* @author ilcartographer
|
||||||
*/
|
*/
|
||||||
public final class RevenantPatriarch extends CardImpl {
|
public final class RevenantPatriarch extends CardImpl {
|
||||||
|
|
||||||
public RevenantPatriarch(UUID ownerId, CardSetInfo setInfo) {
|
public RevenantPatriarch(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
||||||
this.subtype.add(SubType.SPIRIT);
|
this.subtype.add(SubType.SPIRIT);
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// When Revenant Patriarch enters the battlefield, if {W} was spent to cast it, target player skips their next combat phase.
|
// When Revenant Patriarch enters the battlefield, if {W} was spent to cast it, target player skips their next combat phase.
|
||||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SkipNextCombatEffect(), false);
|
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SkipCombatStepEffect(Duration.OneUse).setText("target player skips their next combat phase."), false);
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.W),
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.W),
|
||||||
"if {W} was spent to cast it, target player skips their next combat phase."), new ManaSpentToCastWatcher());
|
"if {W} was spent to cast it, target player skips their next combat phase."), new ManaSpentToCastWatcher());
|
||||||
// Revenant Patriarch can't block.
|
// Revenant Patriarch can't block.
|
||||||
this.addAbility(new CantBlockAbility());
|
this.addAbility(new CantBlockAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
public RevenantPatriarch(final RevenantPatriarch card) {
|
public RevenantPatriarch(final RevenantPatriarch card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RevenantPatriarch copy() {
|
public RevenantPatriarch copy() {
|
||||||
return new RevenantPatriarch(this);
|
return new RevenantPatriarch(this);
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.SkipNextCombatEffect;
|
import mage.abilities.effects.common.SkipCombatStepEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
|
@ -17,27 +17,27 @@ import mage.target.common.TargetOpponent;
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
*/
|
*/
|
||||||
public final class StonehornDignitary extends CardImpl {
|
public final class StonehornDignitary extends CardImpl {
|
||||||
|
|
||||||
public StonehornDignitary(UUID ownerId, CardSetInfo setInfo) {
|
public StonehornDignitary(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||||
this.subtype.add(SubType.RHINO);
|
this.subtype.add(SubType.RHINO);
|
||||||
this.subtype.add(SubType.SOLDIER);
|
this.subtype.add(SubType.SOLDIER);
|
||||||
|
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// When Stonehorn Dignitary enters the battlefield, target opponent skips their next combat phase.
|
// When Stonehorn Dignitary enters the battlefield, target opponent skips their next combat phase.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new SkipNextCombatEffect());
|
Ability ability = new EntersBattlefieldTriggeredAbility(new SkipCombatStepEffect(Duration.OneUse).setText("target opponent skips their next combat phase."));
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
public StonehornDignitary(final StonehornDignitary card) {
|
public StonehornDignitary(final StonehornDignitary card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StonehornDignitary copy() {
|
public StonehornDignitary copy() {
|
||||||
return new StonehornDignitary(this);
|
return new StonehornDignitary(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package mage.abilities.effects.common;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jeffwadsworth
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class SkipCombatStepEffect extends ReplacementEffectImpl {
|
||||||
|
|
||||||
|
public SkipCombatStepEffect(Duration duration) {
|
||||||
|
super(duration, Outcome.Detriment);
|
||||||
|
staticText = "that player skips their next combat phase";
|
||||||
|
}
|
||||||
|
|
||||||
|
public SkipCombatStepEffect(final SkipCombatStepEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SkipCombatStepEffect copy() {
|
||||||
|
return new SkipCombatStepEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.COMBAT_PHASE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
return event.getPlayerId().equals(targetPointer.getFirst(game, source));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue