Added commander mode achievement and improved its graphic resources, added fixed primitives, fixes RNA set file, added new keyword and events to code the ability of six-side die roll.

This commit is contained in:
valfieri
2020-12-14 19:20:05 +01:00
parent a753bb0c1b
commit bf3d35463f
22 changed files with 1224 additions and 189 deletions
+15
View File
@@ -277,6 +277,12 @@ void Credits::compute(GameObserver* g, GameApp * _app)
goa = (GameOptionAward*) &options[Options::EVILTWIN_MODE_UNLOCKED];
goa->giveAward();
}
else if ((unlocked = isCommanderUnlocked()))
{
unlockedTextureName = "commander_unlocked.png";
goa = (GameOptionAward*) &options[Options::COMMANDER_MODE_UNLOCKED];
goa->giveAward();
}
else if ((unlocked = isRandomDeckUnlocked()))
{
unlockedTextureName = "randomdeck_unlocked.png";
@@ -669,6 +675,15 @@ int Credits::isEvilTwinUnlocked()
return 0;
}
int Credits::isCommanderUnlocked()
{
if (options[Options::COMMANDER_MODE_UNLOCKED].number)
return 0;
if (p1->life >= 40 && p2->game->graveyard->nb_cards && (p1->game->graveyard->nb_cards < p2->game->graveyard->nb_cards))
return 1;
return 0;
}
int Credits::isRandomDeckUnlocked()
{
if (0 == options[Options::DIFFICULTY].number)