Game.endTurn() is bugged. #463
Comments
|
I've seen that the game.endTurn(playerId) only ends the turn of the currently active player. It's not clear to me, why this check is done. Spontaneous i would say this check can be removed. The EndTurnEffect sets the ability controller as value for the playerId. So I guess this logic is not ok. Is this maybe also the cause of the problems you found? Or did you find also any problems, if the active player ends it's turn? View commit the endTurn method was added: |
|
Maybe @magenoxx knows why the check for the active player id is/was neccessary. |
|
I guess it is to prevent skipping another player's turn if somehow the turn changed while the ability was on the stack. Not sure how that could happen, but I guess that was the reasoning. And no matter who casts Time Stop when, the turn actually doesn't end. It will actually go through the steps outlined in Turn.endTurn(), but won't actually end the turn. The game will carry on in whatever step it was. |
But why is the controllerId set to the parameter? If you would be right, the active player id has to be set to the parameter. |
|
To end the turn this code in Turn.endTurn() should do it. So we have to check, why it doesn't work. |
|
You are right. I was not thinking that it should be activePlayerId. I have no idea then; might be a bug. |
|
I guess the phases go on because later some code in Turn.play was commented out, that stopped the phases loop before. I'll look into this and will try to fix it. |
From emerald000:
Game.endTurn() is currently bugged, and EndTurnEffect is by extension. Time Stop and Sundial of the Infinite aren't doing anything and Time Vault is quite better as you don't skip your turn to untap it.
The text was updated successfully, but these errors were encountered: