mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
GUI: improved choose creature type dialog - important creature types added to the start of the list and marked as my/opponent (closes #8478)
This commit is contained in:
parent
7b2e9b390c
commit
a974af3c61
41 changed files with 239 additions and 138 deletions
|
|
@ -547,6 +547,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
while (canRespond()) {
|
||||
prepareForResponse(game);
|
||||
if (!isExecutingMacro()) {
|
||||
replacementEffectChoice.onChooseStart(game, playerId);
|
||||
game.fireChooseChoiceEvent(playerId, replacementEffectChoice);
|
||||
}
|
||||
waitForResponse(game);
|
||||
|
|
@ -571,6 +572,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
int index = 0;
|
||||
for (String key : effectsMap.keySet()) {
|
||||
if (replacementEffectChoice.getChoiceKey().equals(key)) {
|
||||
replacementEffectChoice.onChooseEnd(game, playerId, replacementEffectChoice.getChoiceKey());
|
||||
return index;
|
||||
}
|
||||
index++;
|
||||
|
|
@ -624,6 +626,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
while (canRespond()) {
|
||||
prepareForResponse(game);
|
||||
if (!isExecutingMacro()) {
|
||||
choice.onChooseStart(game, playerId);
|
||||
game.fireChooseChoiceEvent(playerId, choice);
|
||||
}
|
||||
waitForResponse(game);
|
||||
|
|
@ -635,9 +638,11 @@ public class HumanPlayer extends PlayerImpl {
|
|||
} else {
|
||||
choice.setChoice(val);
|
||||
}
|
||||
choice.onChooseEnd(game, playerId, val);
|
||||
return true;
|
||||
} else if (!choice.isRequired()) {
|
||||
// cancel
|
||||
choice.onChooseEnd(game, playerId, null);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue