Added some nerfs for the Mars mission in super-easy mode.

This makes mines much less frequent and spreads the asteroids out
much more. The other super-easy mode nerfs don't work on Mars, so
these custom nerfs are necessary to keep the difficulty consistent.
This commit is contained in:
Layla Marchant 2020-05-26 20:03:42 -04:00
parent 5e1892235c
commit b73a56e587
3 changed files with 31 additions and 10 deletions

View File

@ -1473,10 +1473,18 @@ int alien_place(Object *alien)
alien->y = RANDRANGE(-screen->h, 0); alien->y = RANDRANGE(-screen->h, 0);
if (game.area == MISN_MARS) if (game.area == MISN_MARS)
{
if (game.difficulty == DIFFICULTY_SUPEREASY)
{
alien->x = screen->w + RANDRANGE(0, 1200);
alien->y = RANDRANGE(-screen->h, screen->h);
}
else
{ {
alien->x = screen->w + RANDRANGE(0, 400); alien->x = screen->w + RANDRANGE(0, 400);
alien->y = RANDRANGE(-screen->h / 3, (4 * screen->h) / 3); alien->y = RANDRANGE(-screen->h / 3, (4 * screen->h) / 3);
} }
}
for (int i = 0 ; i < ALIEN_MAX ; i++) for (int i = 0 ; i < ALIEN_MAX ; i++)
{ {

View File

@ -2448,6 +2448,8 @@ void game_getDifficultyText(char *dest, int difficulty)
int game_mainLoop() int game_mainLoop()
{ {
float chance;
engine_resetLists(); engine_resetLists();
mission_set(game.area); mission_set(game.area);
@ -2774,7 +2776,12 @@ int game_mainLoop()
if ((game.area == MISN_MARS) && (engine.addAliens > -1)) if ((game.area == MISN_MARS) && (engine.addAliens > -1))
{ {
if ((rand() % 5) == 0) if (game.difficulty == DIFFICULTY_SUPEREASY)
chance = 1. / 20.;
else
chance = 1. / 5.;
if (CHANCE(chance))
// Note: The originally specified range for x was [800, 100], // Note: The originally specified range for x was [800, 100],
// which with the original rrand function caused the result // which with the original rrand function caused the result
// returned to be `800 + rand() % -699`. Clearly a mistake, // returned to be `800 + rand() % -699`. Clearly a mistake,

View File

@ -1186,17 +1186,23 @@ void mission_showStartScreen()
if (mission.timeLimit1[0] > 0) if (mission.timeLimit1[0] > 0)
{ {
if (game.area != MISN_MARS) if (game.area == MISN_MARS)
{ {
/// "%d" must be retained. It is replaced with the mission time snprintf(temp, STRMAX_SHORT, ngettext(
/// limit in minutes. /// "%d" must be retained. It is replaced with the mission required
snprintf(temp, STRMAX_SHORT, _("TIME LIMIT: %d minutes"), mission.timeLimit1[0]); /// survival time in minutes.
"SURVIVAL FOR %d minute",
"SURVIVAL FOR %d minutes",
mission.timeLimit1[0]), mission.timeLimit1[0]);
} }
else else
{ {
/// "%d" must be retained. It is replaced with the mission required snprintf(temp, STRMAX_SHORT, ngettext(
/// survival time in minutes. /// "%d" must be retained. It is replaced with the mission time
snprintf(temp, STRMAX_SHORT, _("SURVIVAL FOR %d minutes"), mission.timeLimit1[0]); /// limit in minutes.
"TIME LIMIT: %d minute",
"TIME LIMIT: %d minutes",
mission.timeLimit1[0]), mission.timeLimit1[0]);
} }
screen_renderUnicode(temp, -1, screen->h / 2 + 195, FONT_RED); screen_renderUnicode(temp, -1, screen->h / 2 + 195, FONT_RED);
} }