mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
[ZNR] fixed Moraug, Fury of Akoum creating extra turns incorrectly (#7046)
This commit is contained in:
parent
a95e92455c
commit
19344b00a4
3 changed files with 19 additions and 32 deletions
|
|
@ -1,15 +1,10 @@
|
|||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
|
@ -17,14 +12,11 @@ import java.util.Set;
|
|||
public enum AddendumCondition implements Condition {
|
||||
|
||||
instance;
|
||||
private static final Set<TurnPhase> turnPhases = EnumSet.of(
|
||||
TurnPhase.PRECOMBAT_MAIN, TurnPhase.POSTCOMBAT_MAIN
|
||||
);
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (!game.isActivePlayer(source.getControllerId()) ||
|
||||
!turnPhases.contains(game.getTurn().getPhase().getType())) {
|
||||
!game.getPhase().getType().isMain()) {
|
||||
return false;
|
||||
}
|
||||
if (CastFromEverywhereSourceCondition.instance.apply(game, source)) {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
package mage.constants;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public enum TurnPhase {
|
||||
BEGINNING ("Beginning"),
|
||||
PRECOMBAT_MAIN ("Precombat Main"),
|
||||
COMBAT ("Combat"),
|
||||
POSTCOMBAT_MAIN ("Postcombat Main"),
|
||||
END ("End");
|
||||
BEGINNING("Beginning"),
|
||||
PRECOMBAT_MAIN("Precombat Main"),
|
||||
COMBAT("Combat"),
|
||||
POSTCOMBAT_MAIN("Postcombat Main"),
|
||||
END("End");
|
||||
|
||||
private final String text;
|
||||
|
||||
|
|
@ -22,4 +21,7 @@ public enum TurnPhase {
|
|||
return text;
|
||||
}
|
||||
|
||||
public boolean isMain() {
|
||||
return this == PRECOMBAT_MAIN || this == POSTCOMBAT_MAIN;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue