mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Turn under control reworked:
- game: fixed game freezes when computer try to take control over another computer or human (added game logs, related to #12878); - cheats: improved take and give control commands, now you can give control under yourself to another player; - cheats: improved take and give control commands, now you can return control to computer in the same priority; - cheats: deleted useless and unused command to activate opponent's ability;
This commit is contained in:
parent
a5c354f960
commit
1f1d1088a1
6 changed files with 50 additions and 73 deletions
|
|
@ -360,9 +360,14 @@ public class HumanPlayer extends PlayerImpl {
|
|||
|
||||
// async command: cheat by current player
|
||||
if (response.getAsyncWantCheat()) {
|
||||
// execute cheats and continue
|
||||
// run cheats
|
||||
SystemUtil.executeCheatCommands(game, null, this);
|
||||
game.fireUpdatePlayersEvent(); // need force to game update for new possible data
|
||||
// force to game update for new possible data
|
||||
game.fireUpdatePlayersEvent();
|
||||
// must stop current dialog on changed control, so game can give priority to actual player
|
||||
if (this.isGameUnderControl() != game.getPlayer(this.getId()).isGameUnderControl()) {
|
||||
return;
|
||||
}
|
||||
// wait another answer
|
||||
if (canRespond()) {
|
||||
loop = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue