Frame 2
var dead = 0;
var win = 0;
var raped = 0;
var exploded = 0;
stop();
Frame 3
stop();
Instance of Symbol 149 MovieClip "game_actionsript" in Frame 3
onClipEvent (load) {
function generate_bomb(camera, dir, total) {
_root.attachMovie("bomb", "bomb" + total, total + 3);
if (total == 0) {
_root["bomb" + total].bomb_x = 510;
} else {
_root["bomb" + total].bomb_x = Math.round(((camera + 300) + ((Math.random() * 240) * dir)) + (60 * dir));
}
_root["bomb" + total]._y = Math.round(90 - (Math.random() * 10));
_root["bomb" + total].velocity = 10;
_root["bomb" + total].counter = 46;
}
function move_bombs(total, cirno) {
var _local3 = 300;
var _local4 = _root.exploded;
var _local2 = 0;
while (_local2 <= total) {
_root["bomb" + _local2]._y = _root["bomb" + _local2]._y + _root["bomb" + _local2].velocity;
if (_root["bomb" + _local2]._y < _local3) {
_root["bomb" + _local2].velocity = _root["bomb" + _local2].velocity + 1;
_root["bomb" + _local2]._rotation = _root["bomb" + _local2]._rotation + ((Math.random() * 30) + 40);
} else {
_root["bomb" + _local2].velocity = (_root["bomb" + _local2]._y - _local3) * -0.5;
_root["bomb" + _local2]._y = _local3;
}
_root["bomb" + _local2].counter = _root["bomb" + _local2].counter - 1;
if (_root["bomb" + _local2].counter < 10) {
_root["bomb" + _local2].gotoAndStop((_root["bomb" + _local2].counter % 2) + 4);
if (_root["bomb" + _local2].counter <= 3) {
_root["bomb" + _local2]._rotation = 0;
_root["bomb" + _local2].gotoAndStop(_root["bomb" + _local2].counter);
}
} else {
_root["bomb" + _local2].gotoAndStop(4);
}
if (_root["bomb" + _local2].counter == 2) {
bomb.start();
if (Math.abs(_root["bomb" + _local2].bomb_x - cirno) < 180) {
_local4 = 1;
}
}
if (_root["bomb" + _local2].counter <= 0) {
removeMovieClip(_root["bomb" + _local2]);
}
_local2++;
}
return(_local4);
}
function draw_bombs(total, camera) {
var _local2 = 0;
while (_local2 <= total) {
_root["bomb" + _local2]._x = _root["bomb" + _local2].bomb_x - camera;
_local2++;
}
}
function remove_bombs(total) {
var _local2 = 0;
while (_local2 <= total) {
removeMovieClip(_root["bomb" + _local2]);
_local2++;
}
}
function generate_frog(camera, total) {
_root.attachMovie("frog", "frog" + total, total + 500);
if (total % 2) {
_root["frog" + total].frog_x = Math.round(camera) + 650;
} else {
_root["frog" + total]._xscale = -100;
_root["frog" + total].frog_x = Math.round(camera) - 50;
}
_root["frog" + total]._y = 300;
_root["frog" + total].hop_interval = Math.round(Math.random() * 10);
}
function move_frogs(total, cirno) {
var _local4 = 0;
var _local2 = 0;
while (_local2 <= total) {
_root["frog" + _local2].gotoAndStop(1);
if (_root["frog" + _local2].hop_interval > 15) {
_root["frog" + _local2].gotoAndStop(2);
if (_root["frog" + _local2].frog_x < cirno) {
_root["frog" + _local2].frog_x = _root["frog" + _local2].frog_x + 7;
} else {
_root["frog" + _local2].frog_x = _root["frog" + _local2].frog_x - 7;
}
if (_root["frog" + _local2].hop_interval >= 20) {
_root["frog" + _local2].hop_interval = 0;
}
}
_root["frog" + _local2].hop_interval++;
if (Math.abs(_root["frog" + _local2].frog_x - cirno) < 50) {
_local4 = 1;
}
_local2++;
}
return(_local4);
}
function draw_frogs(total, camera) {
var _local2 = 0;
while (_local2 <= total) {
_root["frog" + _local2]._x = _root["frog" + _local2].frog_x - camera;
_local2++;
}
}
function remove_frogs(total) {
var _local2 = 0;
while (_local2 <= total) {
removeMovieClip(_root["frog" + _local2]);
_local2++;
}
}
function change_velocity(dir, vel) {
vel = vel + (dir * 2);
if (vel > 0) {
vel = vel - 1;
}
if (vel < 0) {
vel = vel + 1;
}
if (vel > 5) {
vel = 5;
}
if (vel < -5) {
vel = -5;
}
return(vel);
}
function shooting_recoil(shooting) {
var _local2 = 0;
_local2 = Math.floor(Math.exp((shooting + 7) / 6) - 3);
if (_root.cirno._xscale > 0) {
_local2 = _local2 * -1;
}
return(_local2);
}
function check_borders(cirno_x, left_border) {
if (cirno_x < left_border) {
cirno_x = left_border;
}
return(cirno_x);
}
function shoot_projectile(total, cirno_x) {
_root.attachMovie("projectile", "projectile" + total, total + 1000);
_root["projectile" + total].projectile_x = cirno_x;
_root["projectile" + total]._y = 300;
_root["projectile" + total].lifetime = 0;
_root["projectile" + total].reached = 0;
_root["projectile" + total].gotoAndPlay("idle");
if (_root.cirno._xscale > 0) {
_root["projectile" + total].dir = 1;
} else {
_root["projectile" + total].dir = -1;
_root["projectile" + total]._xscale = -100;
}
}
function move_projectiles(total, frog_total) {
var _local6;
var _local2 = 0;
while (_local2 <= total) {
if (_root["projectile" + _local2].reached > 0) {
_root["projectile" + _local2]._y = 300 - ((Math.sin(((9 - _root["projectile" + _local2].reached) / 2.5) + 1) * 130) - 50);
_root["projectile" + _local2].reached--;
if (_root["projectile" + _local2].reached == 0) {
removeMovieClip(_root["projectile" + _local2]);
}
} else {
_root["projectile" + _local2].projectile_x = _root["projectile" + _local2].projectile_x + (20 * _root["projectile" + _local2].dir);
_root["projectile" + _local2].lifetime++;
if (_root["projectile" + _local2]._currentframe == 4) {
_root["projectile" + _local2].gotoAndPlay("idle");
}
var _local3 = 0;
while (_local3 <= frog_total) {
if (_root["projectile" + _local2].reached == 0) {
if (Math.abs(_root["projectile" + _local2].projectile_x - _root["frog" + _local3].frog_x) < 50) {
freeze.start();
_root["projectile" + _local2]._x = _root["frog" + _local3]._x;
removeMovieClip(_root["frog" + _local3]);
_root["projectile" + _local2].gotoAndStop("freezed_frog");
_root["projectile" + _local2].reached = 9;
}
}
_local3++;
}
if (_root["projectile" + _local2].lifetime >= 15) {
removeMovieClip(_root["projectile" + _local2]);
}
}
_local2++;
}
}
function draw_projectiles(total, camera) {
var _local2 = 0;
while (_local2 <= total) {
_root["projectile" + _local2]._x = _root["projectile" + _local2].projectile_x - camera;
_local2++;
}
}
function remove_projectiles(total) {
var _local2 = 0;
while (_local2 <= total) {
removeMovieClip(_root["projectile" + _local2]);
_local2++;
}
}
function move_camera(cirno, camera) {
if ((cirno - camera) > 300) {
camera = camera + (1 + (((cirno - camera) - 300) / 5));
}
if (camera > (_root.bg._width - 600)) {
camera = _root.bg._width - 600;
}
return(camera);
}
var cirno_x = 0;
var cirno_direction = 0;
var cirno_velocity = 0;
var cirno_shooting = 0;
var camera_x = 0;
var left_border = 40;
var time_since_bomb = 0;
var bomb_interval = 1;
var bomb_direction = 1;
var bomb_total = 0;
var time_since_frog = 10;
var frog_interval = 50;
var frog_total = 0;
var projectile_total = 0;
var bomb = new Sound();
bomb.attachSound("bomb-explode.wav");
var ice = new Sound();
ice.attachSound("SE_ICEIKIHAKI.wav");
var freeze = new Sound();
freeze.attachSound("SE_ENEICEDAMAGE.wav");
var hit = new Sound();
hit.attachSound("hit3.wav");
}
onClipEvent (enterFrame) {
cirno_direction = 0;
if (_root.dead) {
} else if (cirno_shooting > 0) {
if ((_root.cirno._currentframe < 5) or (_root.cirno._currentframe > 6)) {
_root.cirno.gotoAndPlay("shoot");
}
cirno_shooting = cirno_shooting - 1;
} else if (Key.isDown(32)) {
ice.start();
_root.cirno.gotoAndPlay("shoot");
cirno_shooting = 10;
shoot_projectile(projectile_total, cirno_x);
projectile_total++;
} else if (Key.isDown(39)) {
cirno_direction = cirno_direction + 1;
_root.cirno._xscale = 100;
if ((3 > _root.cirno._currentframe) or (_root.cirno._currentframe > 4)) {
_root.cirno.gotoAndPlay("run");
}
} else if (Key.isDown(37)) {
cirno_direction = cirno_direction - 1;
_root.cirno._xscale = -100;
if ((3 > _root.cirno._currentframe) or (_root.cirno._currentframe > 4)) {
_root.cirno.gotoAndPlay("run");
}
} else if (_root.cirno._currentframe > 2) {
_root.cirno.gotoAndPlay("stand");
}
cirno_velocity = change_velocity(cirno_direction, cirno_velocity);
cirno_x = cirno_x + (Math.sin(cirno_velocity / 4) * 10.5);
cirno_x = cirno_x + shooting_recoil(cirno_shooting);
cirno_x = check_borders(cirno_x, left_border);
move_projectiles(projectile_total, frog_total);
if (time_since_bomb > bomb_interval) {
generate_bomb(camera_x, bomb_direction, bomb_total);
bomb_total++;
time_since_bomb = 0;
bomb_interval = (70 - (((camera_x + 600) / _root.bg._width) * 50)) + (Math.random() * 15);
bomb_direction = bomb_direction * -1;
}
time_since_bomb = time_since_bomb + 1;
_root.exploded = move_bombs(bomb_total, cirno_x);
if (time_since_frog > frog_interval) {
if ((((camera_x + 600) / _root.bg._width) * 100) < 80) {
generate_frog(camera_x, frog_total);
frog_total++;
}
time_since_frog = 0;
if (frog_total % 2) {
frog_interval = Math.round(Math.random() * 5) + 2;
} else {
frog_interval = Math.round(60 - (((camera_x + 600) / _root.bg._width) * 25));
}
}
time_since_frog = time_since_frog + 1;
_root.raped = move_frogs(frog_total, cirno_x);
camera_x = move_camera(cirno_x, camera_x);
left_border = camera_x + 40;
draw_bombs(bomb_total, camera_x);
draw_frogs(frog_total, camera_x);
draw_projectiles(projectile_total, camera_x);
_root.cirno._x = cirno_x - camera_x;
_root.bg._x = -camera_x;
if (cirno_x > _root.bg._width) {
_root.win = 1;
}
if (_root.dead or _root.win) {
remove_bombs(bomb_total);
remove_frogs(frog_total);
remove_projectiles(projectile_total);
_root.gotoAndStop("end");
}
if (_root.exploded or _root.raped) {
hit.start();
_root.cirno.gotoAndStop("dead");
_root.dead = 1;
}
}
Instance of Symbol 149 MovieClip in Frame 4
onClipEvent (load) {
var ending_screen;
if (_root.win) {
ending_screen = "win";
} else if (_root.exploded) {
ending_screen = "explosion";
} else if (_root.raped) {
ending_screen = "rape";
} else {
ending_screen = "mystery";
}
_root.attachMovie("end_" + ending_screen, "ending_screen", _root.getNextHighestDepth());
_root.ending_screen._x = 0;
_root.ending_screen._y = 0;
}
Symbol 65 MovieClip [end_win] Frame 27
stop();
Instance of Symbol 36 MovieClip in Symbol 65 MovieClip [end_win] Frame 27
onClipEvent (load) {
var pressed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32) and (pressed < 0)) {
this._parent.nextFrame();
pressed = 5;
} else {
pressed = pressed - 1;
}
}
Symbol 65 MovieClip [end_win] Frame 34
stopAllSounds();
Symbol 75 Button
on (release) {
removeMovieClip(_root.ending_screen);
_root.gotoAndStop(2);
}
Symbol 83 MovieClip [end_explosion] Frame 7
stop();
Symbol 120 Button
on (release) {
gotoAndStop (2);
}
Symbol 122 Button
on (release) {
gotoAndStop (1);
}
Symbol 126 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 2
stop();
Symbol 131 Button
on (release) {
gotoAndStop (3);
}