#SEQUENCE "start";
# 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) ) );
  dx = div(dx, dist);
  dy = div(dy, dist);
  lvar("dx", dx);
  lvar("dy", dy);
# seq_jump("charge_01");

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

#SEQUENCE "teleport";
# particle_make( "greek_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "greek_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "greek_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "greek_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make("smoke_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(.5,1), 1);
  particle_make("smoke_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(.5,1), 1);
  particle_make("smoke_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(.5,1), 1);
  particle_make("smoke_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(.5,1), 1);
# script_load("bosses/phemus_teleport_end");
# this_kill();
# wait( 5 );
