* Implemented chooseTargetAmount and new GUI dialog (distribute damage, distribute mana)
* Added tests and AI support;
* Test framework: added aliases support in TargetAmount dialogs;
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
* now it can be used to calc and find available mana and playable abilities;
* now tests and AI can use that abilities;
* now it follows mtg's rules and restrictions for mana activation order (rule 601.2f, see #768);
* Now human player uses same code for playable abilities search as test framework (old version used different code, so it could not work in one of the modes);
* Split cards - improves playable highlights;
* Split cards - fixed that it doesn't work with dynamic added abilities like flashback (#6327, #6470, #6549);
* Added hotkeys to select options (1-9 for choice, SPACE/ENTER for done, ESC for cancel);
* "Up to" modes choose dialog - added "done" button in dialog;
* "Up to" modes choose dialog - fixed that user can't cancel if already selected one mode;
* Added extra info about source object, selected and remaining modes to select, ability number for hotkey;
* Fixed that mode choose dialog doesn't close on cancel (#6199);
* Added support of spell ability choice in free cast (chooseSpellAbilityForCast);
* Added support of "up to" targets setup in addTargetAmount (use TestPlayer.TARGET_SKIP to stop target choose);
* Restored multiple checks for addTargetAmount;
* Fixed many wrong tests (wrong order or missing commands);
* No more game freezes on commanders from disconnected players;
* No more game freezes for disconnected players in started games (on mulligan, yes/no choices, etc);
* Fixed missing ability controller in some choose dialogs (wrong targets for gained controlled permanents);
* Added TODO for next fixes with take turn controllers;
* Game: added multiple cards/effects support (old version supported only 1 effect per game);
* Game: added combo support with split and adventure cards;
* AI: computer can see and play cards with dynamic added alternative cost (like Bolas's Citadel);
* UI: users can see playable cards with alternative cost.