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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user