mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Triggered abilities - Fixed a bug that triggered abilities triggered not at the correct time but too late.
This commit is contained in:
parent
b964758325
commit
c0aa97802e
1 changed files with 3 additions and 7 deletions
|
@ -1041,13 +1041,8 @@ public abstract class GameImpl implements Game, Serializable {
|
||||||
state.setPriorityPlayerId(player.getId());
|
state.setPriorityPlayerId(player.getId());
|
||||||
while (!player.isPassed() && player.isInGame() && !isPaused() && !gameOver(null)) {
|
while (!player.isPassed() && player.isInGame() && !isPaused() && !gameOver(null)) {
|
||||||
if (!resuming) {
|
if (!resuming) {
|
||||||
if (checkStateAndTriggered()) {
|
// 603.3. Once an ability has triggered, its controller puts it on the stack as an object thats not a card the next time a player would receive priority
|
||||||
do {
|
checkStateAndTriggered();
|
||||||
state.handleSimultaneousEvent(this);
|
|
||||||
applyEffects();
|
|
||||||
} while (state.hasSimultaneousEvents());
|
|
||||||
}
|
|
||||||
//resetLKI();
|
|
||||||
applyEffects();
|
applyEffects();
|
||||||
saveState(false);
|
saveState(false);
|
||||||
if (isPaused() || gameOver(null)) {
|
if (isPaused() || gameOver(null)) {
|
||||||
|
@ -1272,6 +1267,7 @@ public abstract class GameImpl implements Game, Serializable {
|
||||||
//20091005 - 115.5
|
//20091005 - 115.5
|
||||||
while (!isPaused() && !gameOver(null)) {
|
while (!isPaused() && !gameOver(null)) {
|
||||||
if (!checkStateBasedActions() ) {
|
if (!checkStateBasedActions() ) {
|
||||||
|
state.handleSimultaneousEvent(this);
|
||||||
if (isPaused() || gameOver(null) || !checkTriggered()) {
|
if (isPaused() || gameOver(null) || !checkTriggered()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue