Daddy32: Tasks Mode
Gives the user the opportunity to earn some credits for performing various tasks.
Known bugs removed, tested stability-wise, not so much game-wise.
Lots of to-dos and ideas still remaining, better balance between task difficulty and their rewards needed - please comment.
Usage:
Enter shop, open menu, select 'See available tasks'.
All tasks in the list are active, until they expire ('Days left'; day passes after each duel (won, lost or quited)).
You can finish any of the tasks and get bonus. For particular task, the bonus gets a bit smaller every day (until expiration).
This commit is contained in:
@@ -57,6 +57,7 @@ enum
|
||||
SUBMENUITEM_CLASSIC,
|
||||
SUBMENUITEM_RANDOM1,
|
||||
SUBMENUITEM_RANDOM2,
|
||||
SUBMENUITEM_QUICK_TEST, //!!
|
||||
};
|
||||
|
||||
|
||||
@@ -569,6 +570,7 @@ JLBFont * mFont = resources.GetJLBFont(Constants::MENU_FONT);
|
||||
#ifdef TESTSUITE
|
||||
subMenuController->Add(SUBMENUITEM_TESTSUITE, "Test Suite");
|
||||
#endif
|
||||
subMenuController->Add(SUBMENUITEM_QUICK_TEST, "Quick test"); //!!
|
||||
currentState = MENU_STATE_MAJOR_SUBMENU | MENU_STATE_MINOR_NONE;
|
||||
}
|
||||
break;
|
||||
@@ -642,11 +644,30 @@ JLBFont * mFont = resources.GetJLBFont(Constants::MENU_FONT);
|
||||
currentState = MENU_STATE_MAJOR_DUEL | MENU_STATE_MINOR_SUBMENU_CLOSING;
|
||||
break;
|
||||
#endif
|
||||
case SUBMENUITEM_QUICK_TEST: //!!
|
||||
subMenuController->Close();
|
||||
runTest();
|
||||
currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_SUBMENU_CLOSING;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void GameStateMenu::runTest() { //!!
|
||||
/*TaskList *tlist = new TaskList();
|
||||
TaskWinAgainst *t1 = new TaskWinAgainst((rand()%10)+1);
|
||||
TaskWinAgainst *t2 = new TaskWinAgainst((rand()%10)+1);
|
||||
t1->setExpiration((rand()%5)+1);
|
||||
t2->setExpiration((rand()%5)+1);
|
||||
tlist->passOneDay();
|
||||
tlist->addTask(t1);
|
||||
tlist->addTask(t2);
|
||||
tlist->save();
|
||||
SAFE_DELETE(tlist);
|
||||
//SAFE_DELETE(t);*/
|
||||
}
|
||||
|
||||
ostream& GameStateMenu::toString(ostream& out) const
|
||||
{
|
||||
return out << "GameStateMenu ::: scroller : " << scroller
|
||||
|
||||
Reference in New Issue
Block a user