mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08: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
|
|
@ -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…
Add table
Add a link
Reference in a new issue