#SEQUENCE "charge_01";
# particle_make( "fire_00", add(rand(-1.5,1.5), this_x()), add(rand(-1.5,1.5), this_y()), add(this_z(), 1));
  lvar("count", add(lvar("count"), .02));
# var func = nop;
  func = if(geq(lvar("count"), 1), seq_jump, nop);
  func("dash");
# wait(.02, 1);
  move_to( char_get_x("player"), char_get_y("player"), 0 );

#SEQUENCE "dash";
# particle_make( "japanese_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "japanese_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "japanese_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "japanese_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  var tx = char_get_x("player");
  var ty = char_get_y("player");
  var dx = sub( tx, this_x() );
  var dy = sub( ty, this_y() );
  var dist = sqrt( add( mult(dy,dy), mult(dx,dx) ) );
  lvar("dx", div(dx, dist));
  lvar("dy", div(dy, dist));
# seq_jump("phase_01");

#SEQUENCE "phase_01";
# particle_make( "fire_00", this_x(), this_y(), add(this_z(), 1));
  lvar("phase_01", add(lvar("phase_01"), .03));
# var func = nop;
  func = if(geq(lvar("phase_01"), .2), seq_jump, nop);
  func("dash2");
# wait(.03, 1);
  move(mult(lvar("dx"), 4), mult(lvar("dy"), 4), 10);

#SEQUENCE "dash2";
# wait( .5, 1 );
  move_to(char_get_x("player"), char_get_y("player"), 0);
# var tx = char_get_x("player");
  var ty = char_get_y("player");
  var dx = sub( tx, this_x() );
  var dy = sub( ty, this_y() );
  var dist = sqrt( add( mult(dy,dy), mult(dx,dx) ) );
  lvar("dx", div(dx, dist));
  lvar("dy", div(dy, dist));
# seq_jump("phase_02");

#SEQUENCE "phase_02";
# particle_make( "fire_00", this_x(), this_y(), add(this_z(), 1));
  lvar("phase_02", add(lvar("phase_02"), .03));
# var func = nop;
  func = if(geq(lvar("phase_02"), .2), seq_jump, nop);
  func("dash3");
# wait(.03, 1);
  move( mult(lvar("dx"), 4), mult(lvar("dy"), 4), 10);

#SEQUENCE "dash3";
# wait( .5, 1 );
  move_to(char_get_x("player"), char_get_y("player"), 0);
# var tx = char_get_x("player");
  var ty = char_get_y("player");
  var dx = sub( tx, this_x() );
  var dy = sub( ty, this_y() );
  var dist = sqrt( add( mult(dy,dy), mult(dx,dx) ) );
  lvar("dx", div(dx, dist));
  lvar("dy", div(dy, dist));
# seq_jump("phase_03");

#SEQUENCE "phase_03";
# particle_make( "fire_00", this_x(), this_y(), add(this_z(), 1));
  lvar("phase_03", add(lvar("phase_03"), .03));
# var func = nop;
  func = if(geq(lvar("phase_03"), .2), seq_jump, nop);
  func("explode");
# wait(.03, 1);
  move(mult(lvar("dx"), 4), mult(lvar("dy"), 4), 10);

#SEQUENCE "explode";
# wait( .5, 1 );
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( add(this_x(), 2.5 ), this_y(), 1, .05, 200, 0, 0, "boss", "fire_00");
  sound_play("player/fire_01.wav", add(this_x(), 3), this_y(), 1 );
# wait( .05, 1 );
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( this_x(), add(this_y(), 2.5), 1, .05, 200, 0, 0, "boss", "fire_00");
  sound_play("player/fire_02.wav", this_x(), add(this_y(), 3), 1 );
# wait( .05, 1 );
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( add(this_x(), -2.5 ), this_y(), 1, .05, 200, 0, 0, "boss", "fire_00");
  sound_play("player/fire_03.wav", add(this_x(), -3 ), this_y(), 1 );
# wait( .05, 1 );
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( this_x(), add(this_y(), -2.5), 1, .05, 200, 0, 0, "boss", "fire_00");
  sound_play("player/fire_01.wav", this_x(), add(this_y(), -3), 1 );
# wait(.04, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( this_x(), add(this_y(), -6), 3, .05, 100, 0, 0, "boss", "fire_00");
  sound_play("player/green_fire_01.wav", this_x(), add(this_y(), -6), 1 );
# wait(.04, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( add(this_x(), 4 ), add(this_y(), -4), 3, .05, 100, 0, 0, "boss", "fire_00");
  sound_play("player/green_fire_02.wav", add(this_x(), 4 ), add(this_y(), -4), 1 );
# wait(.04, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( add(this_x(), 6), this_y(), 3, .05, 100, 0, 0, "boss", "fire_00");
  sound_play("player/green_fire_03.wav", add(this_x(), 6), this_y(), 1 );
# wait(.04, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( add(this_x(), 4 ), add(this_y(), 4), 3, .05, 100, 0, 0, "boss", "fire_00");
  sound_play("player/green_fire_01.wav", add(this_x(), 4 ), add(this_y(), 4), 1 );
# wait(.04, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( this_x(), add(this_y(), 6), 3, .05, 100, 0, 0, "boss", "fire_00");
  sound_play("player/green_fire_02.wav", this_x(), add(this_y(), 6), 1 );
# wait(.04, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( add(this_x(), -4 ), add(this_y(), -4), 3, .05, 100, 0, 0, "boss", "fire_00");
  sound_play("player/green_fire_03.wav", add(this_x(), -4 ), add(this_y(), -4), 1 );
# wait(.04, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( add(this_x(), -6), this_y(), 3, .05, 100, 0, 0, "boss", "fire_00");
  sound_play("player/green_fire_01.wav", add(this_x(), -6), this_y(), 1 );
# wait(.04, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# explosion_make( add(this_x(), -4 ), add(this_y(), 4), 3, .05, 100, 0, 0, "boss", "fire_00");
  sound_play("player/green_fire_02.wav", add(this_x(), -4 ), add(this_y(), 4), 1 );
# wait( 2, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# this_control_pop();
# wait(.15);
