mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
* Blinding Beam - Fixed that the players creatures don't untap effect lasted until end of game instead until the next untap phase of target player.
This commit is contained in:
parent
d7b7f6c234
commit
f4c0412c8c
2 changed files with 15 additions and 8 deletions
|
|
@ -45,6 +45,7 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.turn.Step;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
@ -146,6 +147,17 @@ class BlindingBeamEffect2 extends ReplacementEffectImpl<BlindingBeamEffect2> {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInactive(Ability source, Game game) {
|
||||
if (game.getPhase().getStep().getType() == PhaseStep.UNTAP && game.getStep().getStepPart() == Step.StepPart.PRE)
|
||||
{
|
||||
if (game.getActivePlayerId().equals(targetPlayerId) || game.getPlayer(source.getControllerId()).hasReachedNextTurnAfterLeaving()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
// replace untap event of creatures of target player
|
||||
|
|
@ -155,12 +167,6 @@ class BlindingBeamEffect2 extends ReplacementEffectImpl<BlindingBeamEffect2> {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
// discard effect at end of next untap step of target player
|
||||
if (event.getType().equals(EventType.UNTAP_STEP_POST)) {
|
||||
if (targetPlayerId.equals(event.getPlayerId())) {
|
||||
discard();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue