mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 14:02:05 -08:00
Fixed some handling problems of triggered abilities.
This commit is contained in:
parent
e02b3377b3
commit
0443311f0e
8 changed files with 30 additions and 28 deletions
|
|
@ -1100,7 +1100,9 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
} finally {
|
||||
if (top != null) {
|
||||
state.getStack().remove(top);
|
||||
state.handleSimultaneousEvent(this);
|
||||
while (state.hasSimultaneousEvents()) {
|
||||
state.handleSimultaneousEvent(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import mage.constants.PhaseStep;
|
|||
*/
|
||||
public class GameOptions implements Serializable {
|
||||
|
||||
private static GameOptions defInstance = new GameOptions();
|
||||
private static final GameOptions defInstance = new GameOptions();
|
||||
|
||||
public static GameOptions getDefault() {
|
||||
return defInstance;
|
||||
|
|
|
|||
|
|
@ -235,7 +235,6 @@ public class Spell<T extends Spell<T>> implements StackObject, Card {
|
|||
if (this.getSpellAbility() instanceof BestowAbility) {
|
||||
updateOptionalCosts(0);
|
||||
result = card.putOntoBattlefield(game, fromZone, ability.getId(), controllerId);
|
||||
game.getState().handleSimultaneousEvent(game);
|
||||
return result;
|
||||
} else {
|
||||
//20091005 - 608.2b
|
||||
|
|
@ -246,7 +245,6 @@ public class Spell<T extends Spell<T>> implements StackObject, Card {
|
|||
} else {
|
||||
updateOptionalCosts(0);
|
||||
result = card.putOntoBattlefield(game, fromZone, ability.getId(), controllerId);
|
||||
game.getState().handleSimultaneousEvent(game);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,13 +28,12 @@
|
|||
|
||||
package mage.game.stack;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.game.Controllable;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface StackObject extends MageObject, Controllable {
|
||||
|
||||
boolean resolve(Game game);
|
||||
|
|
|
|||
|
|
@ -108,12 +108,13 @@ public abstract class Phase<T extends Phase<T>> implements Serializable {
|
|||
return false;
|
||||
}
|
||||
currentStep = step;
|
||||
if (!game.isSimulation() && checkStopOnStepOption(game)) {
|
||||
return false;
|
||||
}
|
||||
if (!game.getState().getTurnMods().skipStep(activePlayerId, getStep().getType())) {
|
||||
playStep(game);
|
||||
}
|
||||
if (!game.isSimulation() && checkStopOnStepOption(game)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
if (game.isPaused() || game.gameOver(null)) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue