Asteroids now has some gameplay in non-shmup

This commit is contained in:
Zeno Rogue 2024-03-14 19:52:22 +01:00
parent 68f5ad6e92
commit cbccf4936d
5 changed files with 17 additions and 3 deletions

View File

@ -757,6 +757,11 @@ EX void killMonster(cell *c, eMonster who, flagtype deathflags IS(0)) {
// a reward for killing him before he shoots!
c->item = itOrbDragon;
}
if(m == moAsteroid && !shmup::on && c->item == itNone && c->wall != waChasm) {
c->item = itAsteroid;
changes.value_add(splitrocks, 2);
}
if(m == moOutlaw && (c->item == itNone || c->item == itRevolver) && c->wall != waChasm)
c->item = itBounty;
// note: an Orb appears underwater!

View File

@ -1569,9 +1569,9 @@ LAND( 0x30FF30, "Irradiated Field", laVariant, ZERO, itVarTreasure, RESERVED,
LAND( 0x202020, "Space Rocks", laAsteroids, ZERO, itAsteroid, RESERVED, rock_description)
ITEM( '!', 0xFFD0D0, "Fuel", itAsteroid, IC_TREASURE, ZERO, RESERVED, osNone, rock_description)
MONSTER('A', 0x606040, "Space Rock", moAsteroid, ZERO, RESERVED, moAsteroid, rock_description)
MONSTER('A', 0x606040, "Space Rock", moAsteroid, ZERO, RESERVED, moYeti, rock_description)
NATIVE(m == moAsteroid ? 2 : 0)
REQ( NEVER )
REQ( ALWAYS )
LAND( 0x00C0C0, "Wetland", laWet, ZERO, itWet, RESERVED,
"Some people have definitely drowned in this treacherous area. Better be careful!"

View File

@ -564,6 +564,7 @@ EX eLand getNewLand(eLand old) {
tab[cnt++] = laHalloween;
tab[cnt++] = laWildWest;
tab[cnt++] = laAsteroids;
// the advanced lands
if(all_unlocked || gold() >= R60) {

View File

@ -8,7 +8,7 @@
#include "hyper.h"
namespace hr {
EX int avengers, mirrorspirits, wandering_jiangshi, jiangshi_on_screen;
EX int avengers, mirrorspirits, wandering_jiangshi, jiangshi_on_screen, splitrocks;
EX bool timerghost = true;
EX bool gen_wandering = true;
@ -562,6 +562,12 @@ EX void wandering() {
else if(c->monst || c->pathdist == PINFD) break;
else if(c->land == laAsteroids && splitrocks && canReachPlayer(c, moYeti)) {
c->monst = moAsteroid;
splitrocks--;
continue;
}
else if(c->land == laAsteroids) {
int gen = 0;
if(asteroids_generated * 12 <= items[itAsteroid]) gen = 2;

View File

@ -224,6 +224,8 @@ EX void initgame() {
rosephase = 0;
shmup::count_pauses = 0;
splitrocks = 0;
if(firstland == laElementalWall) cwt.at->land = randomElementalLand();
resetview();