Browse Source

Merge branch 'fix_bossrush_settings' of lcmstaff/invaders into master

blue 4 years ago
parent
commit
52c8b3f5a8
2 changed files with 17 additions and 14 deletions
  1. 5 3
      bossrush.cpp
  2. 12 11
      functions.cpp

+ 5 - 3
bossrush.cpp

@@ -100,7 +100,7 @@ int main(int argc,char** argv)
 	boss1=bosses[0];
 	boss1.alive=true;
 
-	player1.weaponclass=1;
+	player1.weaponclass=0;
 
 	//NCURSES STUFF
 	initscr();
@@ -134,8 +134,10 @@ int main(int argc,char** argv)
 
 	player1.set_commands(commands);
 
-	if(level<3)
+	if(level==1)
 		player1.weaponclass=2;
+	else if(level<4)
+		player1.weaponclass=1;
 
 	erase();
 
@@ -183,7 +185,7 @@ int main(int argc,char** argv)
 			mvaddch(boss1.y+j,boss1.x+boss1.width-1,' ');
 		}
 		boss1.next_pos();
-		if((double)rand()/RAND_MAX<shootrate*10.)		
+		if((double)rand()/RAND_MAX<shootrate*25.)
 			boss1.shoot(bombs);	
 		
 		

+ 12 - 11
functions.cpp

@@ -1441,38 +1441,39 @@ int choose_level_bossrush(int* commands)
 
 void setup_level_bossrush(int level, double& shootr, double& poweruprate, int& walls_num, int& refresh_t)
 {
+	walls_num = 3;
 	switch(level)        //setting game parameters
 	{
 		case 1:
 		{
-			shootr = 0.006;
-			refresh_t = (int)(0.09*1E3);
-			poweruprate = 0.066;
+			shootr = 0.02;
+			refresh_t = (int)(0.07*1E3);
+			poweruprate = 0.04;
 			break;
 		}
 		case 2:
 		{
-			shootr = 0.009;
-			refresh_t = (int)(0.085*1E3);
-			poweruprate = 0.05;
+			shootr = 0.02;
+			refresh_t = (int)(0.07*1E3);
+			poweruprate = 0.04;
 			break;
 		}
 		case 3:
 		{
-			shootr = 0.015;
-			refresh_t = (int)(0.08*1E3);
-			poweruprate = 0.044;
+			shootr = 0.02;
+			refresh_t = (int)(0.07*1E3);
+			poweruprate = 0.04;
 			break;
 		}
 		case 4:
 		{
-			shootr = 0.020;
+			shootr = 0.02;
 			refresh_t = (int)(0.07*1E3);
 			poweruprate = 0.04;
+			walls_num = 2;
 			break;
 		}
 	}
-	walls_num = 3;
 }
 
 void resetbosses(boss* Bosses,boss& boss1,player& player1){