#SEQUENCE "start";
# game_save( );
 char_control_jump("player", "human");
 avar("coins", char_get_attribute("player", "money"));
 //avar("current_music", music_play("boss2.wav", 0, 1, 1));
 avar("ccspeed_level", 1);
 avar("ccdamage_level", 4);
 avar("speed_level", 1.333);
 avar("health_level", 1.333);
 avar("exp_level", .001);
 avar("projdamage_level", 1);
 avar("steropes_health", 750);
 avar("phemus_health", 2000);
 avar("steropes_b_health", 750);
 avar("phemus_b_health", 2000);
 avar("lava_ready", 1);
 avar("whipstone_spring_ready", 1);
 avar("player_spring_ready", 1);
 avar("teleport", 1);
 //avar("boss_dead", 3);
 char_set_paint("player", 200);
 avar("player_laser", char_get_attribute("player", "laser"));
 avar("player_explosion", char_get_attribute("player", "explosion"));
 avar("player_vortex", char_get_attribute("player", "vortex"));
 //screenFX_make( "fade_black", "wash" );
 //screenFX_make( "fade_red", "wash", "*color = colorRGB(1.0,0.0,0.0); *variance = 0.5; *additive = 0;" );
 //screenFX_make( "fade_white", "wash", "*color = colorRGB(1.0,1.0,1.0); *variance = 0.5; *additive = 1;" );
 //screenFX_make( "heat", "heat");
 //screenFX_make( "blur", "blur");
 //screenFX_make( "phemus_pic", "boss pic", "*tex = \"boss_pics/eyeclops.tga\";*fade=1.0;*move=1.0;" );
 //avar("music", music_play( "patches_02.wav", 0, 1, 0 ));
 //screenFX_fade( "blur", 1, .1 );
 //screenFX_fade( "fade_white", 5, 1 );
 //screenFX_fade( "phemus_pic", 3, .5 );
 //load_event("forest/kenki_dead");
 //script_load("player/win");
 var func = nop;
 func = if(char_get_attribute("player", "opening"), screenFX_make, nop);
 //func( "fade_black", "wash" );
# seq_jump("wait");

#SEQUENCE "check";
# var check = if(geq(avar("total_spawn"), 50), 1, 0);
  avar("spawn_off", check);
# wait( 5 );

#SEQUENCE "run";
# wait ( rand(1,1.1) );

//whipstone's lunch

# var func = nop;
  func = if(geq(time_get(), 720), avar, nop);
  func("nilbog_whipstone_lunch", 1);

//repaint

# var func = nop;
  func = if(geq(time_get(), 1200), seq_jump, nop);
  func("red_dawn");

#SEQUENCE "battle";
# time_set_rate( 30 );
//# script_load("battle/battle_sequence");
# seq_jump("wait");

#SEQUENCE "red_dawn";
# avar("red_rand", add(avar("red_rand"), .003));
  avar("yellow_rand", sub(avar("yellow_rand"), .015));
# light_color( "sun", avar("red_rand"), avar("yellow_rand"), 0 );
# var func = nop;
  func = if(leq(avar("yellow_rand"), .05), seq_jump, nop);
  func("wait");
# wait ( .05 );

#SEQUENCE "spawn";
# var x_var = rand(0, 75);
  char_make("monsters/simple2", x_var, 0);
  char_make("monsters/simple2", x_var, 75);
# var y_var = rand(0, 75);
  char_make("monsters/simple2", 0, y_var);
  char_make("monsters/simple2", 75, y_var);
  var func = nop;
  func = if(eq(avar("spawned"), 5), seq_jump, nop);
  func("shooter");
# seq_jump("respawn");

#SEQUENCE "shooter";
# var x_var = rand(0, 75);
  char_make("monsters/simple_mother", x_var, 0);
  char_make("monsters/simple_mother", x_var, 75);
# var y_var = rand(0, 75);
  char_make("monsters/simple_mother", 0, y_var);
  char_make("monsters/simple_mother", 75, y_var);
  avar("spawned", 0);
# seq_jump("respawn");

#SEQUENCE "respawn";
# var func = nop;
  func = if(leq(avar("wait"), 1), nop, avar);
  func("wait", sub(avar("wait"), .1));
  avar("spawned", add(avar("spawned"), 1));
# wait (avar("wait"));
# seq_jump("spawn");

#SEQUENCE "wait";
# wait ( 10000 );
