From 9f7809de1c3458c45d269ff677604293f454c332 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Sun, 29 Mar 2015 14:27:29 -0400 Subject: [PATCH] Made the mines in Mars more sparse and numerous. There. Together with spreading out the asteroids, this has the effect of getting rid of the sort of boxed-in feel this mission originally had, and preventing the mission from being beaten simply by going up or down forever. --- src/alien.cpp | 2 +- src/game.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/alien.cpp b/src/alien.cpp index 491aae5..276605e 100644 --- a/src/alien.cpp +++ b/src/alien.cpp @@ -945,7 +945,7 @@ bool alien_place(object *alien) if (currentGame.area == MISN_MARS) { - alien->x = screen->w; + alien->x = screen->w + RANDRANGE(0, 400); alien->y = RANDRANGE(-screen->h / 3, (4 * screen->h) / 3); } diff --git a/src/game.cpp b/src/game.cpp index 7c2f06c..8e2238a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -924,14 +924,15 @@ int mainGameLoop() if ((currentGame.area == MISN_MARS) && (engine.addAliens > -1)) { - if ((rand() % 10) == 0) + if ((rand() % 5) == 0) // XXX: The originally specified range for x was [800, 100], // which with the original rrand function caused the result // returned to be `800 + rand() % -699`. Clearly a mistake, // but I'm not entirely sure what the original intention was. // For now, I've set the range to [800, 1500], which // approximately replicates the original's results. - addCollectable(RANDRANGE(800, 1500), player.y, P_MINE, 25, + addCollectable(RANDRANGE(800, 1500), + RANDRANGE(-screen->h / 3, (4 * screen->h) / 3), P_MINE, 25, 180 + rand() % 60); }