Added a new menu choice to instantly choose all the possible targets (on battlefield) of an ability during its target selection (e.g. Proliferation ability can target a lot of permanents and players so using that menu choice all the targets will be instantly chosen and then the current player will be able to remove any of them or confirm the entire selection).
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
|
||||
## [master] (https://github.com/WagicProject/wagic/tree/master)
|
||||
|
||||
### 12/10/21
|
||||
- *Committed:* Added a new menu choice to instantly choose all the possible targets (on battlefield) of an ability during its target selection (e.g. Proliferation ability can target a lot of permanents and players so using that menu choice all the targets will be instantly chosen and then the current player will be able to remove any of them or confirm the entire selection). ([Vitty85](https://github.com/Vitty85))
|
||||
|
||||
### 09/10/21
|
||||
- *Committed:* Fixed the Proliferation and Damageable target chooser in order to avoid targeting permanents or players without counters and/or with some protections (e.g. hexproof, shroud and similar), fixed a Travis build toolchain error. ([Vitty85](https://github.com/Vitty85))
|
||||
- *Committed:* Fixed the Proliferation and Damageable target chooser in order to avoid targeting permanents or players without counters and/or with some protections (e.g. hexproof, shroud and similar), fixed a Travis build toolchain error. https://github.com/WagicProject/wagic/commit/4623167b0f608a8322de81b09d96f8642e1b33cd ([Vitty85](https://github.com/Vitty85))
|
||||
|
||||
- *Committed:* Fixed the Proliferation and Damageable target chooser in order to avoid targeting permanents or players without counters and/or with some protections (e.g. hexproof, shroud and similar). https://github.com/WagicProject/wagic/commit/4e18b6d79933b6d437cbdc1f5f007d39553113a2 ([Vitty85](https://github.com/Vitty85))
|
||||
|
||||
|
||||
@@ -283,6 +283,7 @@ public:
|
||||
/////// End Tournament Mod ///////////
|
||||
MENUITEM_TOGGLEATTACK_ALL_CREATURES = -32,
|
||||
MENUITEM_TASKBOARD = -33,
|
||||
MENUITEM_SELECT_ALL = -34,
|
||||
MENUITEM_MORE_INFO = kInfoMenuID
|
||||
};
|
||||
|
||||
|
||||
@@ -959,6 +959,8 @@ void GameStateDuel::Update(float dt)
|
||||
if(game->getCurrentGamePhase() == MTG_PHASE_COMBATATTACKERS && game->currentlyActing() == (Player*)game->currentPlayer){ // During attack phase it shows a button to toggle all creatures to attack mode
|
||||
menu->Add(MENUITEM_TOGGLEATTACK_ALL_CREATURES, "Toggle Attack all Creatures");
|
||||
}
|
||||
if(game->getCurrentTargetChooser() && game->getCurrentTargetChooser()->source->controller() == game->currentlyActing())
|
||||
menu->Add(MENUITEM_SELECT_ALL, "Select all possible targets");
|
||||
menu->Add(MENUITEM_MAIN_MENU, "Back to main menu");
|
||||
#ifdef TESTSUITE
|
||||
menu->Add(MENUITEM_UNDO, "Undo");
|
||||
@@ -1710,6 +1712,24 @@ void GameStateDuel::ButtonPressed(int controllerId, int controlId)
|
||||
menu->Close();
|
||||
setGamePhase(DUEL_STATE_CANCEL);
|
||||
break;
|
||||
case MENUITEM_SELECT_ALL:
|
||||
if(game->getCurrentTargetChooser() && game->getCurrentTargetChooser()->source && game->getCurrentTargetChooser()->source->isInPlay(game) && game->getCurrentTargetChooser()->canTarget(game->getCurrentTargetChooser()->source))
|
||||
game->cardClick(game->getCurrentTargetChooser()->source, game->getCurrentTargetChooser()->source);
|
||||
if(game->getCurrentTargetChooser() && game->getCurrentTargetChooser()->canTarget(game->players[0]))
|
||||
game->cardClick(NULL, game->players[0]);
|
||||
if(game->getCurrentTargetChooser() && game->getCurrentTargetChooser()->canTarget(game->players[1]))
|
||||
game->cardClick(NULL, game->players[1]);
|
||||
for(unsigned int i = 0; i < game->players[1]->inPlay()->cards.size(); i++){
|
||||
if(game->getCurrentTargetChooser() && game->getCurrentTargetChooser()->canTarget(game->players[1]->inPlay()->cards[i]))
|
||||
game->cardClick(game->players[1]->inPlay()->cards[i], game->players[1]->inPlay()->cards[i]);
|
||||
}
|
||||
for(unsigned int i = 0; i < game->players[0]->inPlay()->cards.size(); i++){
|
||||
if(game->getCurrentTargetChooser() && game->getCurrentTargetChooser()->source != game->players[0]->inPlay()->cards[i] && game->getCurrentTargetChooser()->canTarget(game->players[0]->inPlay()->cards[i]))
|
||||
game->cardClick(game->players[0]->inPlay()->cards[i], game->players[0]->inPlay()->cards[i]);
|
||||
}
|
||||
menu->Close();
|
||||
setGamePhase(DUEL_STATE_CANCEL);
|
||||
break;
|
||||
case MENUITEM_SPEED_FAST:
|
||||
tournament->setFastTimerMode(true);
|
||||
setAISpeed();
|
||||
|
||||
Reference in New Issue
Block a user