@@ -70,10 +70,10 @@ static void engage_player_random_xy(Object *o) {
7070 // Font::printf(5, 15, "%f", o->y - Camera::y);
7171
7272 if (o->state == 1 ) {
73- o->theta += 5 * Game::wave ;
73+ o->theta += 5 + Game::difficulty ;
7474 }
7575 else {
76- o->theta -= 5 * Game::wave ;
76+ o->theta -= 5 + Game::difficulty ;
7777 }
7878 // Debug
7979 // o->x = Camera::x;
@@ -83,7 +83,7 @@ static void engage_player_random_xy(Object *o) {
8383 return ;
8484 }
8585 EBullet::fire (o, EBULLET_BOMB);
86- o->timer = Game::wave > 10 ? 0 : (20 - Game::difficulty);
86+ o->timer = Game::wave > 20 ? 10 : (40 - Game::difficulty);
8787 // Keep within bounds of the screen
8888 if (o->x - Camera::x < -300 ) {
8989 o->vx = random (3 , 10 + Game::difficulty);
@@ -141,7 +141,7 @@ static void engage_player_flee(Object *o) {
141141 }
142142 EBullet::fire (o, EBULLET_BOMB);
143143
144- o->timer = Game::wave > 10 ? 0 : (20 - Game::wave );
144+ o->timer = Game::wave > 20 ? 20 : (50 - Game::difficulty );
145145 // o->x = Camera::x;
146146 // o->y = Camera::y;
147147 o->vx += random (-7 , 7 );
@@ -155,7 +155,7 @@ static void init_orbit(Object *o, BOOL left) {
155155 o->x = cos (angle) * 256 ;
156156 o->z = Camera::z + sin (angle) * 256 ;
157157 o->y = Camera::y + random (30 , 90 );
158- o->vy = random (-5 , 5 ) + (Game::difficulty * 2 );
158+ o->vy = random (-6 + (Game::difficulty * - 1 ), 6 + (Game::difficulty) );
159159 o->vx = 0 ;
160160 o->vz = -50 - (Game::difficulty * 2 );
161161 o->state = left ? 0 : 180 ;
@@ -193,9 +193,10 @@ static void engage_player_orbit(Object *o) {
193193 o->z = Camera::z + sin (rad) * 512 ;
194194
195195 if (--o->timer <= 0 ) {
196- o->timer = Game::wave > 10 ? 0 : (20 - Game::wave );
196+ o->timer = Game::wave > 20 ? 20 : (50 - Game::difficulty );
197197 EBullet::fire (o, EBULLET_BOMB);
198198 }
199+
199200}
200201
201202/* *
@@ -236,12 +237,12 @@ void Boss::action(Process *me, Object *o) {
236237 o->lines = NULL ;
237238
238239 if (Boss::boss_type == 1 ) {
239- o->y = random (-5 , 5 );
240+ // o->y = random(-5, 5);
240241 o->state = (o->state == 1 ) ? 0 : 1 ;
241242 }
242- else if (Boss::boss_type == 2 ) {
243- init_orbit (o, random () & 1 );
244- }
243+ // else if (Boss::boss_type == 2) {
244+ // init_orbit(o, random() & 1);
245+ // }
245246 // else {
246247 // randomize_flee(o);
247248 // }
@@ -304,48 +305,41 @@ void Boss::start_action(Process *me, Object *o) {
304305
305306void Boss::entry (Process *me, Object *o) {
306307 // production
307- Boss::boss_type = random (1 , 3 );
308-
309- // Debugging
310- // Boss::boss_type = 1;
311-
312308 game_mode = MODE_NEXT_WAVE;
313309 Game::kills = 0 ;
314310 Camera::vz = -20 ;
315311
316312 o->set_type (OTYPE_ENEMY);
317- o->lines = getBossLines ();
318313 o->z = Camera::z + z_dist;
319314
320315 o->state = 0 ;
321316 o->vz = Camera::vz;
322317
323318
324-
325- // PRODUCTION
326- Boss::hit_points = 10 + (Game::difficulty * Boss::boss_type);
327-
328- // DEBUG
329- // Boss::hit_points = 1;
330-
331-
332-
333- if (Boss::boss_type == 1 ) {
334- o->x = Camera::x + 512 ;
335- o->vx = -10 ;
336- o->y = Camera::y;
337- Sound::play_score (STAGE_1_BOSS_SONG);
319+ if (Game::wave % 3 == 0 ) {
320+ Boss::boss_type = 3 ;
321+ o->x = Camera::x - 512 ;
322+ o->vx = +10 ;
323+ o->vy = random (-3 , 3 );
324+ Sound::play_score (STAGE_3_BOSS_SONG);
338325 }
339- else if (Boss::boss_type == 2 ) {
326+ else if (Game::wave % 2 == 0 ) {
327+ Boss::boss_type = 2 ;
340328 init_orbit (o, random () & 1 );
341329 Sound::play_score (STAGE_2_BOSS_SONG);
342330 }
343- else {
344- o->x = Camera::x - 512 ;
345- o->vx = +10 ;
346- o->vy = random (-3 , 3 );
347- Sound::play_score (STAGE_3_BOSS_SONG);
331+ else {
332+ Boss::boss_type = 1 ;
333+ o->x = Camera::x + 512 ;
334+ o->vx = -10 ;
335+ o->y = Camera::y;
336+ Sound::play_score (STAGE_1_BOSS_SONG);
348337 }
349338
339+ o->lines = getBossLines ();
340+
341+ // PRODUCTION
342+ Boss::hit_points = 20 + (Game::difficulty * Boss::boss_type);
343+ // Boss::hit_points = 1;
350344 me->sleep (1 , Boss::start_action);
351345}
0 commit comments