mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
Added additional test for #7251;
Added last error info in too many errors game message;
This commit is contained in:
parent
c13d07b73d
commit
53c5abea14
3 changed files with 31 additions and 6 deletions
|
|
@ -7,6 +7,8 @@ import mage.game.Game;
|
|||
import mage.watchers.common.CardsDrawnThisTurnWatcher;
|
||||
|
||||
/**
|
||||
* Don't forget to add CardsDrawnThisTurnWatcher in card's definition
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum CardsDrawnThisTurnDynamicValue implements DynamicValue {
|
||||
|
|
|
|||
|
|
@ -1394,10 +1394,11 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
this.fireErrorEvent("Game exception occurred: ", ex);
|
||||
restoreState(bookmark, "Game exception: " + ex.getMessage());
|
||||
bookmark = 0;
|
||||
Player activePlayer = this.getPlayer(getActivePlayerId());
|
||||
if (errorContinueCounter > 15) {
|
||||
throw new MageException("Iterated player priority after game exception too often, game ends!");
|
||||
throw new MageException("Iterated player priority after game exception too often, game ends! Last error:\n "
|
||||
+ ex.getMessage());
|
||||
}
|
||||
Player activePlayer = this.getPlayer(getActivePlayerId());
|
||||
if (activePlayer != null && !activePlayer.isTestMode()) {
|
||||
errorContinueCounter++;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue