Added grenade combo counter HUD message and gameplay stat.
This commit is contained in:
parent
fab49ae250
commit
5f212282b2
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Blob Wars : Attrition\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-04-15 12:32:17+0100\n"
|
||||
"POT-Creation-Date: 2018-04-24 07:16:21+0100\n"
|
||||
"PO-Revision-Date: ???\n"
|
||||
"Last-Translator: ???\n"
|
||||
"Language-Team: ???\n"
|
||||
|
@ -64,6 +64,9 @@ msgstr ""
|
|||
msgid "EyeDroid explosion kills"
|
||||
msgstr ""
|
||||
|
||||
msgid "Best grenade combo"
|
||||
msgstr ""
|
||||
|
||||
msgid "Time spent flying"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -45,6 +45,18 @@ void addExplosion(float x, float y, int radius, Entity *owner)
|
|||
|
||||
if (killTimer < SDL_GetTicks())
|
||||
{
|
||||
if (numKilled >= 2)
|
||||
{
|
||||
setGameplayMessage(MSG_STANDARD, "%d hit grenade combo!", numKilled);
|
||||
|
||||
game.stats[STAT_EYE_DROID_EXPLOSION_KILLS] = MAX(game.stats[STAT_EYE_DROID_EXPLOSION_KILLS], numKilled);
|
||||
}
|
||||
|
||||
if (numKilled >= 12)
|
||||
{
|
||||
awardTrophy("GRENADE_COMBO");
|
||||
}
|
||||
|
||||
numKilled = 0;
|
||||
}
|
||||
|
||||
|
@ -98,9 +110,4 @@ void addExplosion(float x, float y, int radius, Entity *owner)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (numKilled >= 12)
|
||||
{
|
||||
awardTrophy("GRENADE_COMBO");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,5 +28,6 @@ extern void playBattleSound(int snd, int ch, int x, int y);
|
|||
extern int rrnd(int low, int high);
|
||||
extern void stunBob(void);
|
||||
extern void swapSelf(Entity *e);
|
||||
extern void setGameplayMessage(int newMessageType, const char *format, ...);
|
||||
|
||||
extern Game game;
|
||||
|
|
|
@ -357,6 +357,7 @@ enum
|
|||
STAT_SHOTS_HIT,
|
||||
STAT_SHOT_ACCURACY,
|
||||
STAT_EYE_DROID_EXPLOSION_KILLS,
|
||||
STAT_GRENADE_COMBO,
|
||||
STAT_FLY_TIME,
|
||||
STAT_SWIM_TIME,
|
||||
STAT_CHERRIES_PICKED_UP,
|
||||
|
|
|
@ -46,6 +46,7 @@ void initStats(void)
|
|||
statDescription[STAT_SHOTS_HIT] = _("Shots hit");
|
||||
statDescription[STAT_SHOT_ACCURACY] = _("Accuracy");
|
||||
statDescription[STAT_EYE_DROID_EXPLOSION_KILLS] = _("EyeDroid explosion kills");
|
||||
statDescription[STAT_GRENADE_COMBO] = _("Best grenade combo");
|
||||
statDescription[STAT_FLY_TIME] = _("Time spent flying");
|
||||
statDescription[STAT_SWIM_TIME] = _("Time spent swimming");
|
||||
statDescription[STAT_CHERRIES_PICKED_UP] = _("Cherries picked up");
|
||||
|
|
|
@ -78,6 +78,7 @@ void initLookups(void)
|
|||
addLookup("STAT_SHOTS_FIRED", STAT_SHOTS_FIRED);
|
||||
addLookup("STAT_SHOTS_HIT", STAT_SHOTS_HIT);
|
||||
addLookup("STAT_EYE_DROID_EXPLOSION_KILLS", STAT_EYE_DROID_EXPLOSION_KILLS);
|
||||
addLookup("STAT_GRENADE_COMBO", STAT_GRENADE_COMBO);
|
||||
addLookup("STAT_FLY_TIME", STAT_FLY_TIME);
|
||||
addLookup("STAT_SWIM_TIME", STAT_SWIM_TIME);
|
||||
addLookup("STAT_CHERRIES_PICKED_UP", STAT_CHERRIES_PICKED_UP);
|
||||
|
|
Loading…
Reference in New Issue