Added new primitives and added a new menu choice to toggle all creature to attacking mode during attack phase.

This commit is contained in:
valfieri
2020-06-22 22:35:33 +02:00
parent a2594f1fb7
commit 210a250dce
5 changed files with 2585 additions and 1625 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -95046,7 +95046,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Revel of the Fallen God name=Revel of the Fallen God
auto=token(Satyr,Creature Satyr,2/2,red green,haste)*4 controller auto=token(Satyr,Creature Satyr,2/2,red,green,haste)*4 controller
text=Put four 2/2 red and green Satyr creature tokens with haste onto the battlefield. text=Put four 2/2 red and green Satyr creature tokens with haste onto the battlefield.
mana={3}{R}{R}{G}{G} mana={3}{R}{R}{G}{G}
type=Sorcery type=Sorcery
File diff suppressed because it is too large Load Diff
+1
View File
@@ -278,6 +278,7 @@ public:
MENUITEM_FILL_NEXT_STAGE_HARD = -30, MENUITEM_FILL_NEXT_STAGE_HARD = -30,
MENUITEM_FILL_NEXT_STAGE = -31, MENUITEM_FILL_NEXT_STAGE = -31,
/////// End Tournament Mod /////////// /////// End Tournament Mod ///////////
MENUITEM_TOGGLEATTACK_ALL_CREATURES = -32,
MENUITEM_MORE_INFO = kInfoMenuID MENUITEM_MORE_INFO = kInfoMenuID
}; };
+12
View File
@@ -939,6 +939,9 @@ void GameStateDuel::Update(float dt)
menu->Add(MENUITEM_MULLIGAN, "Mulligan"); menu->Add(MENUITEM_MULLIGAN, "Mulligan");
} }
//END almosthumane - mulligan //END almosthumane - mulligan
if(game->getCurrentGamePhase() == MTG_PHASE_COMBATATTACKERS){ // During attack phase it shows a button to toggle all creatures to attack mode
menu->Add(MENUITEM_TOGGLEATTACK_ALL_CREATURES, "Toggle Attack all Creatures");
}
menu->Add(MENUITEM_MAIN_MENU, "Back to main menu"); menu->Add(MENUITEM_MAIN_MENU, "Back to main menu");
#ifdef TESTSUITE #ifdef TESTSUITE
menu->Add(MENUITEM_UNDO, "Undo"); menu->Add(MENUITEM_UNDO, "Undo");
@@ -1663,6 +1666,15 @@ void GameStateDuel::ButtonPressed(int controllerId, int controlId)
// menu->Close(); // menu->Close();
// mGamePhase = DUEL_STATE_CONTINUE; // mGamePhase = DUEL_STATE_CONTINUE;
// break; // break;
case MENUITEM_TOGGLEATTACK_ALL_CREATURES:
for(unsigned int i = 0; i < game->players[0]->inPlay()->cards.size(); i++){
if(game->players[0]->inPlay()->cards[i]->canAttack()){
game->players[0]->inPlay()->cards[i]->toggleAttacker();
}
}
menu->Close();
setGamePhase(DUEL_STATE_CANCEL);
break;
case MENUITEM_SPEED_FAST: case MENUITEM_SPEED_FAST:
tournament->setFastTimerMode(true); tournament->setFastTimerMode(true);
setAISpeed(); setAISpeed();