Frame 1
MochiAd.showPreloaderAd({id:"be83b6383db2484b", res:"728x500"});
Frame 2
loadedBytes = _root.getBytesLoaded();
totalBytes = _root.getBytesTotal();
_root.loading_hearts.bar._width = 340 * (loadedBytes / totalBytes);
if (_framesloaded >= _totalframes) {
_root.play_button.gotoAndStop("play_game");
this.stop();
}
Frame 3
gotoAndPlay (2);
Frame 31
gotoAndPlay (33);
Frame 32
this.stop();
Frame 33
this.stop();
_global.g_nightTime = false;
_global.g_inSpace = false;
Instance of Symbol 718 MovieClip in Frame 33
/* no clip actions */
Instance of Symbol 743 MovieClip in Frame 34
onClipEvent (load) {
this.cacheAsBitmap = true;
waitTime = 66;
tickTimer = waitTime;
curFrame = random(this._totalframes) + 1;
gotoAndStop(curFrame +32);
_global.g_nightTime = (curFrame > 850) && (curFrame < 2730);
_global.g_inSpace = (curFrame > 1810) && (curFrame < 2245);
trace("_global.g_nightTime: " + _global.g_nightTime);
}
onClipEvent (enterFrame) {
if (!_root.paused) {
if ((tickTimer--) < 0) {
tickTimer = waitTime;
if ((curFrame++) > this._totalframes) {
curFrame = 1;
}
gotoAndStop(curFrame +32);
this.cacheAsBitmap = true;
}
}
}
Instance of Symbol 745 MovieClip in Frame 34
onClipEvent (load) {
orig_y = _y;
lowered = false;
raised = false;
moveRate = 0.5;
dropRate = 0.5;
raiseRate = 0.5;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
if (!lowered) {
_x = (_x - moveRate);
if (_x < 0) {
_x = 728;
}
}
if (_global.g_inSpace && (!lowered)) {
if (_y > (orig_y + 100)) {
lowered = true;
} else {
_y = (_y + dropRate);
raised = false;
lowered = false;
}
} else if ((!_global.g_inSpace) && (!raised)) {
if (_y < orig_y) {
raised = true;
} else {
_y = (_y - raiseRate);
raised = false;
lowered = false;
}
}
}
}
Instance of Symbol 747 MovieClip in Frame 34
onClipEvent (load) {
orig_y = _y;
lowered = false;
raised = false;
moveRate = 1.2;
dropRate = 0.5;
raiseRate = 0.5;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
if (!lowered) {
_x = (_x - moveRate);
if (_x < 0) {
_x = 728;
}
}
if (_global.g_inSpace && (!lowered)) {
if (_y > (orig_y + 100)) {
lowered = true;
} else {
_y = (_y + dropRate);
raised = false;
lowered = false;
}
} else if ((!_global.g_inSpace) && (!raised)) {
if (_y < orig_y) {
raised = true;
} else {
_y = (_y - raiseRate);
raised = false;
lowered = false;
}
}
}
}
Instance of Symbol 830 MovieClip in Frame 34
onClipEvent (load) {
midx = Stage.width / 2;
midy = Stage.height / 2;
}
onClipEvent (enterFrame) {
if (_root.paused) {
_x = midx;
_y = midy;
} else {
_x = -999;
}
}
Instance of Symbol 833 MovieClip "stepper" in Frame 34
onClipEvent (load) {
function getRandomShop() {
return(shop_names[random(shop_names.length)]);
}
function resetStepperVars() {
endDelay = 0;
timeToNextEnemy = 100 + random(100);
}
function getNextEnemy() {
lvl = (_root.level - 1) % game_levels.length;
game_set = game_levels[lvl];
return(game_set[random(game_set.length)]);
}
_alpha = 0;
endDelay = 0;
timeToNextEnemy = 0;
enemyWaitTime = 100;
shopTimer = 7920;
waveCount = 3;
maxOnScreen = 10;
elapsedTime = 0;
prev_time = getTimer();
time_count = 0;
frame_count = 0;
fps_ticker = 0;
fps_ticks = 0;
fps_total = 0;
shop_names = new Array("gym", "aid", "arms");
resetStepperVars();
level01 = new Array();
i = 0;
while (i < 1) {
level01.push("enemy_norm");
i++;
}
i = 0;
while (i < 1) {
level01.push("enemy_black");
i++;
}
i = 0;
while (i < 1) {
level01.push("enemy_candy3");
i++;
}
i = 0;
while (i < 1) {
level01.push("enemy_candy2");
i++;
}
i = 0;
while (i < 1) {
level01.push("enemy_candy");
i++;
}
i = 0;
while (i < 1) {
level01.push("enemy_norm_white");
i++;
}
level02 = new Array();
i = 0;
while (i < 1) {
level02.push("enemy_norm");
i++;
}
i = 0;
while (i < 1) {
level02.push("enemy_black");
i++;
}
i = 0;
while (i < 1) {
level02.push("enemy_candy3");
i++;
}
i = 0;
while (i < 1) {
level02.push("enemy_candy2");
i++;
}
i = 0;
while (i < 1) {
level02.push("enemy_candy");
i++;
}
i = 0;
while (i < 1) {
level02.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 0) {
level02.push("gunship");
i++;
}
i = 0;
while (i < 4) {
level02.push("bomber");
i++;
}
i = 0;
while (i < 0) {
level02.push("dragon");
i++;
}
i = 0;
while (i < 0) {
level02.push("spaceship");
i++;
}
level03 = new Array();
i = 0;
while (i < 1) {
level03.push("enemy_norm");
i++;
}
i = 0;
while (i < 1) {
level03.push("enemy_black");
i++;
}
i = 0;
while (i < 1) {
level03.push("enemy_candy3");
i++;
}
i = 0;
while (i < 1) {
level03.push("enemy_candy2");
i++;
}
i = 0;
while (i < 1) {
level03.push("enemy_candy");
i++;
}
i = 0;
while (i < 1) {
level03.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 1) {
level03.push("gunship");
i++;
}
i = 0;
while (i < 1) {
level03.push("bomber");
i++;
}
i = 0;
while (i < 0) {
level03.push("dragon");
i++;
}
i = 0;
while (i < 0) {
level03.push("spaceship");
i++;
}
level04 = new Array();
i = 0;
while (i < 1) {
level04.push("enemy_norm");
i++;
}
i = 0;
while (i < 1) {
level04.push("enemy_black");
i++;
}
i = 0;
while (i < 1) {
level04.push("enemy_candy3");
i++;
}
i = 0;
while (i < 1) {
level04.push("enemy_candy2");
i++;
}
i = 0;
while (i < 1) {
level04.push("enemy_candy");
i++;
}
i = 0;
while (i < 1) {
level04.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 5) {
level04.push("gunship");
i++;
}
i = 0;
while (i < 0) {
level04.push("bomber");
i++;
}
i = 0;
while (i < 30) {
level04.push("dragon");
i++;
}
i = 0;
while (i < 0) {
level04.push("spaceship");
i++;
}
level05 = new Array();
i = 0;
while (i < 0) {
level05.push("enemy_norm");
i++;
}
i = 0;
while (i < 0) {
level05.push("enemy_black");
i++;
}
i = 0;
while (i < 0) {
level05.push("enemy_candy3");
i++;
}
i = 0;
while (i < 0) {
level05.push("enemy_candy2");
i++;
}
i = 0;
while (i < 0) {
level05.push("enemy_candy");
i++;
}
i = 0;
while (i < 0) {
level05.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 0) {
level05.push("gunship");
i++;
}
i = 0;
while (i < 0) {
level05.push("bomber");
i++;
}
i = 0;
while (i < 1) {
level05.push("dragon");
i++;
}
i = 0;
while (i < 0) {
level05.push("spaceship");
i++;
}
level06 = new Array();
i = 0;
while (i < 1) {
level06.push("enemy_norm");
i++;
}
i = 0;
while (i < 1) {
level06.push("enemy_black");
i++;
}
i = 0;
while (i < 1) {
level06.push("enemy_candy3");
i++;
}
i = 0;
while (i < 1) {
level06.push("enemy_candy2");
i++;
}
i = 0;
while (i < 1) {
level06.push("enemy_candy");
i++;
}
i = 0;
while (i < 0) {
level06.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 0) {
level06.push("gunship");
i++;
}
i = 0;
while (i < 1) {
level06.push("bomber");
i++;
}
i = 0;
while (i < 0) {
level06.push("dragon");
i++;
}
i = 0;
while (i < 20) {
level06.push("spaceship");
i++;
}
level07 = new Array();
i = 0;
while (i < 0) {
level07.push("enemy_norm");
i++;
}
i = 0;
while (i < 0) {
level07.push("enemy_black");
i++;
}
i = 0;
while (i < 0) {
level07.push("enemy_candy3");
i++;
}
i = 0;
while (i < 0) {
level07.push("enemy_candy2");
i++;
}
i = 0;
while (i < 0) {
level07.push("enemy_candy");
i++;
}
i = 0;
while (i < 0) {
level07.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 0) {
level07.push("gunship");
i++;
}
i = 0;
while (i < 0) {
level07.push("bomber");
i++;
}
i = 0;
while (i < 0) {
level07.push("dragon");
i++;
}
i = 0;
while (i < 1) {
level07.push("spaceship");
i++;
}
level08 = new Array();
i = 0;
while (i < 0) {
level08.push("enemy_norm");
i++;
}
i = 0;
while (i < 0) {
level08.push("enemy_black");
i++;
}
i = 0;
while (i < 0) {
level08.push("enemy_candy3");
i++;
}
i = 0;
while (i < 0) {
level08.push("enemy_candy2");
i++;
}
i = 0;
while (i < 0) {
level08.push("enemy_candy");
i++;
}
i = 0;
while (i < 0) {
level08.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 0) {
level08.push("gunship");
i++;
}
i = 0;
while (i < 1) {
level08.push("bomber");
i++;
}
i = 0;
while (i < 0) {
level08.push("dragon");
i++;
}
i = 0;
while (i < 1) {
level08.push("spaceship");
i++;
}
level09 = new Array();
i = 0;
while (i < 0) {
level09.push("enemy_norm");
i++;
}
i = 0;
while (i < 0) {
level09.push("enemy_black");
i++;
}
i = 0;
while (i < 1) {
level09.push("enemy_candy3");
i++;
}
i = 0;
while (i < 1) {
level09.push("enemy_candy2");
i++;
}
i = 0;
while (i < 1) {
level09.push("enemy_candy");
i++;
}
i = 0;
while (i < 0) {
level09.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 1) {
level09.push("gunship");
i++;
}
i = 0;
while (i < 1) {
level09.push("bomber");
i++;
}
i = 0;
while (i < 1) {
level09.push("dragon");
i++;
}
i = 0;
while (i < 1) {
level09.push("spaceship");
i++;
}
level10 = new Array();
i = 0;
while (i < 0) {
level10.push("enemy_norm");
i++;
}
i = 0;
while (i < 0) {
level10.push("enemy_black");
i++;
}
i = 0;
while (i < 0) {
level10.push("enemy_candy3");
i++;
}
i = 0;
while (i < 0) {
level10.push("enemy_candy2");
i++;
}
i = 0;
while (i < 0) {
level10.push("enemy_candy");
i++;
}
i = 0;
while (i < 0) {
level10.push("enemy_norm_white");
i++;
}
i = 0;
while (i < 3) {
level10.push("gunship");
i++;
}
i = 0;
while (i < 3) {
level10.push("bomber");
i++;
}
i = 0;
while (i < 10) {
level10.push("dragon");
i++;
}
i = 0;
while (i < 10) {
level10.push("spaceship");
i++;
}
game_levels = new Array(level01, level02, level03, level04, level05, level06, level07, level08, level09, level10);
}
onClipEvent (enterFrame) {
elapsedTime = getTimer() - prev_time;
time_count = time_count + elapsedTime;
prev_time = getTimer();
frame_count++;
if (time_count > 333) {
time_count = 0;
_root.fps = frame_count * 3;
frame_count = 0;
}
if ((fps_ticker++) > 50) {
if (_root.fps < _root.min_fps) {
_root.min_fps = _root.fps;
}
if (_root.fps > _root.max_fps) {
_root.max_fps = _root.fps;
}
fps_ticks++;
fps_total = fps_total + _root.fps;
_root.avg_fps = fps_total / fps_ticks;
}
_root.enemy_count = _root.enemies.length;
if (!_root.paused) {
_root.updateHitCombo();
if (_root.g_lvl_kills >= 30) {
_root.g_lvl_kills = 0;
trace("hit!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
_root.level++;
_root.showLevelDisplay();
}
if ((_root.enemy_count < maxOnScreen) && ((timeToNextEnemy--) <= 0)) {
var num = 0;
while (num < waveCount) {
waveCount = random(3) + 1;
ene_type = getNextEnemy();
xpos = _root.g_width + 30;
ypos = random(_root.g_ground - 200) + 50;
ene = _root.addObj(ene_type, _root.enemy_layer, _root.getNextEnemyLevel());
ene.vx = (((-random(500)) / 500) - 0.4) - (_root.level * 0.04);
ene.vy = 0;
ene._x = xpos;
ene._y = ypos;
_root.enemies.push(ene);
num++;
}
timeToNextEnemy = enemyWaitTime + random(enemyWaitTime);
}
if ((shopTimer--) <= 0) {
shopTimer = 7920;
shop = _root.addShop(getRandomShop());
shop._x = Stage.width + 100;
shop._y = random(Stage.height - 100) + 50;
}
if ((_root.gameOver() && (!_root.game_ended)) && ((endDelay++) > 0)) {
_root.game_ended = true;
_root.endGame();
}
}
updateAfterEvent();
}
Instance of Symbol 839 MovieClip in Frame 34
onClipEvent (load) {
ty = 20;
}
onClipEvent (enterFrame) {
if ((_root.hit_combo > 0) && (_y < ty)) {
_y = (_y + 0.5);
} else if ((_root.hit_combo <= 0) && (_y > -15)) {
_y = (_y - 0.5);
}
}
Instance of Symbol 841 MovieClip in Frame 34
onClipEvent (load) {
orig_y = _y;
lowered = false;
raised = false;
moveRate = 3;
dropRate = 0.5;
raiseRate = 0.5;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
if (!lowered) {
_x = (_x - moveRate);
if (_x < 0) {
_x = 728;
}
}
if (_global.g_inSpace && (!lowered)) {
if (_y > (orig_y + 100)) {
lowered = true;
} else {
_y = (_y + dropRate);
raised = false;
lowered = false;
}
} else if ((!_global.g_inSpace) && (!raised)) {
if (_y < orig_y) {
raised = true;
} else {
_y = (_y - raiseRate);
raised = false;
lowered = false;
}
}
}
}
Frame 35
function playSound(filename) {
mysound = new Sound();
mysound.attachSound(filename);
mysound.start(0, 1);
}
function saveData() {
trace("Saving Data");
myLocalSO.data.place_score_1 = place_score_1;
myLocalSO.data.place_score_2 = place_score_2;
myLocalSO.data.place_score_3 = place_score_3;
myLocalSO.data.place_name_1 = place_name_1;
myLocalSO.data.place_name_2 = place_name_2;
myLocalSO.data.place_name_3 = place_name_3;
myLocalSO.data.player_name = player_name;
myLocalSO.data.highScoreColor = highScoreColor;
}
function increaseScore(amt, x, y) {
trace("increaseScore: " + amt);
_root.g_lvl_kills++;
_root.score = _root.score + amt;
_global.g_gold = _global.g_gold + amt;
refreshScoreText();
refreshGoldText();
}
function gameOver() {
return(_root.cupid.hp <= 0);
}
function endGame() {
_root.paused = true;
updatedTopScores();
openGameOver();
}
function updatedTopScores() {
if (score > place_score_1) {
place_score_3 = place_score_2;
place_score_2 = place_score_1;
place_score_1 = score;
place_name_3 = place_name_2;
place_name_2 = place_name_1;
place_name_1 = player_name;
_root.end_text = "New high score! 1st Place";
} else if (score > place_score_2) {
place_score_3 = place_score_2;
place_score_2 = score;
place_name_3 = place_name_2;
place_name_2 = player_name;
_root.end_text = "New high score! 2nd Place";
} else if (score > place_score_3) {
place_score_3 = score;
place_name_3 = player_name;
_root.end_text = "New high score! 3rd Place";
} else if (score > 1000) {
_root.end_text = "Nice shooting.";
} else if (score > 700) {
_root.end_text = "Not bad. Keep Practicing";
} else if (score > 400) {
_root.end_text = "Ouch... better luck next time.";
} else {
_root.end_text = "Noob Tip: use mouse-left click to fire :P";
}
saveData();
}
function restartGame() {
cleanGameboard();
resetGame();
}
function cleanGameboard() {
for (i in enemies) {
enemies[i].unloadMovie();
}
enemies = new Array();
for (i in shop_list) {
shop_list[i].unloadMovie();
}
shop_list = new Array();
}
function resetGame() {
game_ended = false;
_root.level_ticker = 0;
_root.fps_ticks = 0;
_root.fps_total = 0;
_root.avg_fps = 0;
_root.max_fps = 0;
_root.min_fps = 9999;
_root.stepper.resetStepperVars();
_root.hit_combo = 0;
_global.g_maxAmmo = 50;
_global.g_maxAmmoRank = 0;
_global.g_fire_ammo_count = 10;
_global.g_ice_ammo_count = 10;
_global.g_bomb_ammo_count = 10;
_global.g_numHeals = 0;
_global.g_gold = 0;
_global.g_wingRank = 0;
_global.g_muscleRank = 0;
refreshAmmoText();
_root.score = 0;
_root.level = 1;
_root.g_lvl_kills = 0;
_root.cupid.resetCupid();
_root.heart_meter._visible = true;
_root.shield_bars._visible = true;
refreshLevelText();
refreshScoreText();
refreshGoldText();
}
function showTopScores() {
paused = true;
temp = _root.upgrade_layer.attachMovie("top_scores", "top_scores_" + SCORES, SCORES);
temp._x = g_width / 2;
temp._y = g_ground / 2;
top_scores_screen = temp;
disableButtons();
}
function showLevelDisplay() {
refreshLevelText();
temp = _root.upgrade_layer.attachMovie("level_display", "level_display_" + LEVEL_DISPLAY, LEVEL_DISPLAY);
temp._x = g_width / 2;
temp._y = g_ground / 2;
disableButtons();
}
function closeTopScores() {
top_scores_screen.unloadMovie();
enableButtons();
}
function openNamer() {
trace("opening namer");
paused = true;
temp = _root.upgrade_layer.attachMovie("namer_screen", "namer" + NAMER, NAMER);
temp._x = g_width / 2;
temp._y = g_ground * 0.75;
namer_screen = temp;
disableButtons();
}
function closeNamer() {
namer_screen.unloadMovie();
enableButtons();
}
function openGameOver() {
trace("opening gameOver screen");
temp = _root.upgrade_layer.attachMovie("game_over_screen", "game_over_screen" + GAMEOVER_NUM, GAMEOVER_NUM);
temp._x = g_width / 2;
temp._y = g_ground / 2;
game_over_screen = temp;
disableButtons();
}
function closeGameOver() {
game_over_screen.unloadMovie();
}
function openHelp() {
trace("opening help");
paused = true;
temp = _root.upgrade_layer.attachMovie("help_screen", "help_screen" + HELP_NUM, HELP_NUM);
temp._x = g_width / 2;
temp._y = g_ground / 2;
help_screen = temp;
disableButtons();
}
function closeHelp() {
trace("closing help");
help_screen.unloadMovie();
enableButtons();
}
function shootAtCupid(xpos, ypos, speed, p_type, setRot) {
var _local4;
var _local3;
var _local2;
var _local1;
_local2 = cupid._x - xpos;
_local1 = cupid._y - ypos;
dist = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
_local4 = (_local2 / dist) * speed;
_local3 = (_local1 / dist) * speed;
proj = addObj(p_type, bullet_layer, getNextProjectileLevel());
proj.vx = _local4;
proj.vy = _local3;
proj._x = xpos;
proj._y = ypos;
if (setRot) {
updateRotation(proj);
}
return(proj);
}
function updateRotation(proj) {
radians = Math.atan(proj.vy / proj.vx);
if (proj.vx > 0) {
proj._rotation = radians * _global.g_rotFact;
} else {
proj._rotation = (radians * _global.g_rotFact) + 180;
}
if ((vx < 1E-5) && (vx > -1E-5)) {
proj._rotation = proj._rotation + 180;
}
}
function showLevelDisplay() {
temp = _root.upgrade_layer.attachMovie("level_display", "level_display_" + LEVEL_DISPLAY, LEVEL_DISPLAY);
temp._x = g_width / 2;
temp._y = g_ground / 2;
}
function updateHitCombo() {
if (g_lastHit < 200) {
g_lastHit++;
if (g_lastHit >= 200) {
addToScore();
_root.hit_combo = 0;
}
}
}
function addToScore() {
temp = _root.addObj("score_increase", _root.debris_fg_layer, getNextDebrisFGLevel());
temp._x = 640;
temp._y = 40;
amt = _root.hit_combo * 10;
temp.amount = amt;
increaseScore(amt, 0, 0);
}
function addHitCombo() {
_root.g_lastHit = 0;
_root.hit_combo++;
}
function getNextProjectileLevel() {
if ((proj_lvl++) > 100) {
proj_lvl = 1;
}
return(proj_lvl);
}
function getNextDebrisFGLevel() {
if ((debris_lvl++) > 40) {
debris_lvl = 1;
}
return(debris_lvl);
}
function getNextDebrisBGLevel() {
if ((debris_bg_lvl++) > 40) {
debris_bg_lvl = 1;
}
return(debris_bg_lvl);
}
function getNextEnemyLevel() {
if ((ene_lvl++) > 200) {
ene_lvl = 1;
}
return(ene_lvl);
}
function getNextShopLevel() {
if ((sho_lvl++) > 5) {
sho_lvl = 1;
}
return(sho_lvl);
}
function addObj(obj, layer, lvl) {
temp = layer.attachMovie(obj, (obj + "_id_") + lvl, lvl);
return(temp);
}
function bloodExplosion(x, y, btype) {
i = 0;
while (i < 4) {
temp = _root.addObj("blood_drop", _root.debris_bg_layer, _root.getNextDebrisBGLevel());
temp._x = x;
temp._y = y;
temp.vx = (random(100) - 50) / 20;
temp.vy = (-random(100)) / 20;
temp._xscale = (temp._yscale = random(200) + 200);
if (btype == "oil") {
temp._color = "black";
}
temp.btype = btype;
i++;
}
}
function projExplosion(obj, x, y, amt) {
i = 0;
while (i < amt) {
temp = _root.addObj(obj, _root.debris_bg_layer, _root.getNextDebrisBGLevel());
temp._x = x;
temp._y = y;
temp.vx = (random(100) - 50) / 20;
temp.vy = (-random(100)) / 20;
temp._xscale = (temp._yscale = random(100) + 50);
i++;
}
}
function addFlyingTroop(troop, xpos, ypos, xscale, yscale) {
var _local1;
_local1 = addObj(troop, debris_bg_layer, getNextDebrisBGLevel());
_local1._x = xpos;
_local1._y = ypos;
_local1._xscale = xscale;
_local1._yscale = yscale;
_local1._rotation = random(360);
}
function removeEnemy(ene) {
tempArray = new Array();
for (i in enemies) {
nextEn = enemies[i];
if (ene != nextEn) {
tempArray.push(nextEn);
}
}
ene.removeMovieClip();
enemies = tempArray;
}
function removeShop(sho) {
tempArray = new Array();
for (i in shop_list) {
nextShop = shop_list[i];
if (sho != nextShop) {
tempArray.push(nextShop);
}
}
sho.removeMovieClip();
shop_list = tempArray;
}
function addEnemy(eType) {
var _local1 = addObj(eType, enemy_layer, getNextEnemyLevel());
enemies.push(_local1);
return(_local1);
}
function addShop(sType) {
trace("Adding Shop: " + sType);
var _local1;
_local1 = addObj("shop", shop_layer, getNextShopLevel());
_local1.stype = sType;
shop_list.push(_local1);
return(_local1);
}
function smartRotation(currentRotation, targetRotation, rotationAmount) {
if (Math.abs(currentRotation - targetRotation) <= rotationAmount) {
currentRotation = targetRotation;
} else if (currentRotation != targetRotation) {
if ((currentRotation >= 0) && (targetRotation >= 0)) {
if (currentRotation > targetRotation) {
currentRotation = currentRotation - rotationAmount;
} else if (currentRotation < targetRotation) {
currentRotation = currentRotation + rotationAmount;
}
} else if ((currentRotation < 0) && (targetRotation < 0)) {
if (currentRotation > targetRotation) {
currentRotation = currentRotation - rotationAmount;
} else if (currentRotation < targetRotation) {
currentRotation = currentRotation + rotationAmount;
}
} else if ((currentRotation < 0) && (targetRotation >= 0)) {
if ((Math.abs(currentRotation) + Math.abs(targetRotation)) <= 180) {
currentRotation = currentRotation + rotationAmount;
} else if ((Math.abs(currentRotation) + Math.abs(targetRotation)) > 180) {
currentRotation = currentRotation - rotationAmount;
}
} else if ((currentRotation >= 0) && (targetRotation < 0)) {
if ((Math.abs(currentRotation) + Math.abs(targetRotation)) < 180) {
currentRotation = currentRotation - rotationAmount;
} else if ((Math.abs(currentRotation) + Math.abs(targetRotation)) >= 180) {
currentRotation = currentRotation + rotationAmount;
}
}
}
return(currentRotation);
}
function setProjSettings(proj, clipName, ptype, inner, outer, gravityOn) {
proj_mc = proj.attachMovie(clipName, "proj_graphic", 1);
proj_mc.outer._color = outer;
proj_mc.inner._color = inner;
proj.ptype = ptype;
proj.gravEffect = gravityOn;
}
function testHitShop() {
var _local1;
var _local2 = "none";
trace("testing hit in shop_list: " + shop_list);
for (i in shop_list) {
_local1 = shop_list[i];
if (_local1.body.hitTest(cupid._x, cupid._y, 0)) {
trace("hit shop: " + _local1);
loadShopWindow(_local1.getType());
break;
}
}
}
function loadShopWindow(stype) {
trace("Loading Shop Window: " + stype);
open_shop_window = _root.shop_window_layer.attachMovie("shop_window_" + stype, "shopwindow", 1);
open_shop_window._x = Stage.width / 2;
open_shop_window._y = Stage.height / 2;
_root.paused = true;
disableButtons();
}
function closeShopWindow() {
open_shop_window.unloadMovie();
_root.paused = false;
enableButtons();
}
function refreshAmmoText() {
ammo_fire_txt.text = _global.g_fire_ammo_count;
ammo_ice_txt.text = _global.g_ice_ammo_count;
ammo_bomb_txt.text = _global.g_bomb_ammo_count;
}
function disableButtons() {
options.scoresButton.enabled = false;
options.helpButton.enabled = false;
options.nameButton.enabled = false;
options.pauseGameButton.enabled = false;
}
function enableButtons() {
options.scoresButton.enabled = true;
options.helpButton.enabled = true;
options.nameButton.enabled = true;
options.pauseGameButton.enabled = true;
}
function refreshHeartMeter() {
_root.heart_meter.update(_root.cupid.hp, _root.cupid.max_hp);
}
function refreshScoreText() {
msg = "" + _root.score;
_root.score_txt.text = msg;
}
function refreshGoldText() {
msg = "" + _global.g_gold;
_root.gold_txt.text = msg;
}
function refreshLevelText() {
msg = "" + _root.level;
_root.level_txt.text = msg;
}
this.stop();
_global.g_myVersion = "alpha001";
loadMovie ("http://www.lostvectors.com/cupids_revenge/hs.swf", _root.hs_layer);
loadMovie ("http://www.lostvectors.com/cupids_revenge/version_checker.swf", _root.version_checker);
loadMovie ("http://www.lostvectors.com/general/banner.swf", _root.banner_layer);
_root._quality = "MEDIUM";
KEY_W = 87;
KEY_A = 65;
KEY_S = 83;
KEY_D = 68;
KEY_X = 88;
KEY_C = 67;
KEY_J = 74;
KEY_K = 75;
KEY_L = 76;
KEY_U = 85;
KEY_Z = 90;
KEY_SPACEBAR = 32;
_global.g_maxAmmo = 50;
_global.g_maxAmmoRank = 0;
_global.g_fire_ammo_count = 10;
_global.g_ice_ammo_count = 10;
_global.g_bomb_ammo_count = 10;
_global.ammo_inc_fire = 5;
_global.ammo_inc_bomb = 5;
_global.ammo_inc_ice = 5;
_global.g_rotFact = 57.2957795130823;
_global.g_numHeals = 0;
_global.g_gold = 0;
_global.g_wingRank = 0;
_global.g_muscleRank = 0;
enemies = new Array();
shop_list = new Array();
g_width = 728;
g_ground = 500;
_root.paused = true;
var open_shop_window = null;
end_text = "Nice shooting!";
LEVEL_DISPLAY = 7;
HELP_NUM = 6;
SCORES = 4;
NAMER = 5;
GAMEOVER_NUM = 3;
UG_LAYER = 1;
top_scores_screen = null;
help_screen = null;
namer_screen = null;
game_over_screen1 = null;
_root.place_score_1 = 300;
_root.place_score_2 = 200;
_root.place_score_3 = 100;
_root.place_name_1 = "Jax";
_root.place_name_2 = "Matrox";
_root.place_name_3 = "Razor";
_root.player_name = "cupid";
myLocalSO = SharedObject.getLocal("gm02");
if (myLocalSO.data.place_score_1 != null) {
trace("Shared Object Data Found... loading data");
place_score_1 = myLocalSO.data.highScore;
_root.place_score_1 = myLocalSO.data.place_score_1;
_root.place_score_2 = myLocalSO.data.place_score_2;
_root.place_score_3 = myLocalSO.data.place_score_3;
_root.place_name_1 = myLocalSO.data.place_name_1;
_root.place_name_2 = myLocalSO.data.place_name_2;
_root.place_name_3 = myLocalSO.data.place_name_3;
_root.player_name = myLocalSO.data.player_name;
paused = false;
} else {
trace("no object found... loading default data");
_root.first_time_playing = true;
_root.place_score_1 = 300;
_root.place_score_2 = 200;
_root.place_score_3 = 100;
_root.place_name_1 = "Jax";
_root.place_name_2 = "Matrox";
_root.place_name_3 = "Razor";
_root.player_name = "Cupid";
_root.paused = true;
openNamer();
openHelp();
}
g_lvl_kills = 0;
score = 0;
level = 1;
game_ended = false;
_root.g_lvl_kills = 0;
resetGame();
gravity = 0.08;
game_ended = false;
_root.enemy_count = 0;
_root.arrow_type = "arrow_norm";
_root.level_ticker = 0;
_root.fps_ticks = 0;
_root.fps_total = 0;
_root.avg_fps = 0;
_root.max_fps = 0;
_root.min_fps = 9999;
someListener = new Object();
someListener.onMouseDown = function () {
_root.pulling = true;
_root.shot_fired = false;
};
Mouse.addListener(someListener);
someListener2 = new Object();
someListener2.onMouseUp = function () {
_root.pulling = false;
};
Mouse.addListener(someListener2);
g_lastHit = 999;
hit_combo = 0;
proj_lvl = 1;
debris_lvl = 1;
debris_bg_lvl = 1;
ene_lvl = 1;
sho_lvl = 1;
_global._colorDefinitions = {black:0, midnightblue:1644912, dodgerblue:2003199, lightseagreen:2142890, forestgreen:2263842, seagreen:3050327, darkslategray:3100495, darkslategrey:3100495, limegreen:3329330, mediumseagreen:3978097, turquoise:4251856, royalblue:4286945, steelblue:4620980, darkslateblue:4734347, mediumturquoise:4772300, indigo:4915330, darkolivegreen:5597999, cadetblue:6266528, darkgreen:6553600, cornflowerblue:6591981, mediumaquamarine:6737322, dimgray:6908265, dimgrey:6908265, slateblue:6970061, olivedrab:7048739, slategrey:7372944, slategray:7372944, lightslategray:7833753, lightslategrey:7833753, mediumslateblue:8087790, lawngreen:8190976, chartreuse:8388352, aquamarine:8388564, navy:8388608, maroon:8388608, green:65280, purple:8388736, olive:8421376, teal:8421376, grey:8421504, gray:8421504, skyblue:8900331, lightskyblue:8900346, blueviolet:9055202, darkblue:9109504, darkred:9109504, darkmagenta:9109643, saddlebrown:9127187, darkcyan:9145088, darkseagreen:9419919, lightgreen:9498256, mediumpurple:9662683, darkviolet:9699539, palegreen:10025880, darkorchid:10040012, yellowgreen:10145074, sienna:10506797, brown:10824234, darkgrey:11119017, darkgray:11119017, lightblue:11393254, greenyellow:11403055, paleturquoise:11529966, lightsteelblue:11584734, powderblue:11591910, firebrick:11674146, darkgoldenrod:12092939, mediumorchid:12211667, rosybrown:12357519, darkkhaki:12433259, deepskyblue:12582656, silver:12632256, mediumvioletred:13047173, mediumblue:13434880, indianred:13458524, peru:13468991, darkturquoise:13553920, chocolate:13789470, tan:13808780, lightgray:13882323, lightgrey:13882323, thistle:14204888, orchid:14315734, goldenrod:14329120, palevioletred:14381203, crimson:14423100, gainsboro:14474460, plum:14524637, burlywood:14596231, lightcyan:14745599, lavender:15132410, darksalmon:15308410, violet:15631086, palegoldenrod:15657130, lightcoral:15761536, khaki:15787660, aliceblue:15792383, honeydew:15794160, azure:15794175, sandybrown:16032864, wheat:16113331, beige:16119260, whitesmoke:16119285, mintcream:16121850, ghostwhite:16316671, salmon:16416882, mediumspringgreen:16423424, antiquewhite:16444375, linen:16445670, lightgoldenrodyellow:16448210, oldlace:16643558, red:16711680, lime:16711680, blue:255, fuchsia:16711935, magenta:16711935, deeppink:16716947, orangered:16729344, tomato:16737095, hotpink:16738740, springgreen:16744192, coral:16744272, darkorange:16747520, lightsalmon:16752762, orange:16753920, lightpink:16758465, pink:16761035, gold:16766720, peachpuff:16767673, navajowhite:16768685, moccasin:16770229, bisque:16770244, mistyrose:16770273, blanchedalmond:16772045, papayawhip:16773077, lavenderblush:16773365, seashell:16774638, cornsilk:16775388, lemonchiffon:16775885, floralwhite:16775920, snow:16775930, yellow:16776960, cyan:65535, aqua:16776960, lightyellow:16777184, ivory:16777200, white:16777215};
getColor = function () {
var _local3;
var _local2;
var _local4 = new Color(this).getRGB();
for (_local3 in _colorDefinitions) {
if (_local4 == _colorDefinitions[_local3]) {
return(_local3);
}
if (_local4 < _colorDefinitions[_local3]) {
_local2 = "0x" + _local4.toString(16);
while (_local2.length < 8) {
_local2 = _local2 + "0";
}
return(_local2);
}
}
_local2 = "0x" + _local4.toString(16);
while (_local2.length < 8) {
_local2 = _local2 + "0";
}
return(_local2);
};
setColor = function (col) {
if (typeof(col) == "string") {
if (col.charAt(0) == "0") {
new Color(this).setRGB(parseInt(col));
} else {
new Color(this).setRGB(_colorDefinitions[col]);
}
} else {
new Color(this).setRGB(col);
}
};
MovieClip.prototype.addProperty("_color", getColor, setColor);
Instance of Symbol 606 MovieClip [game_over_screen] in Frame 35
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 586 MovieClip [help_screen] in Frame 35
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 571 MovieClip [namer_screen] in Frame 35
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 565 MovieClip [top_scores] in Frame 35
onClipEvent (load) {
this.unloadMovie();
}
Symbol 3 MovieClip [shop] Frame 1
function step() {
_x = (_x + vx);
_y = ((Stage.height / 2) + (Math.sin(_x * 0.01) * 50));
if (_x < -100) {
_root.removeShop(this);
}
}
function getType() {
return(stype);
}
vx = -3;
this.createEmptyMovieClip("shopBod", 1);
shopBod.attachMovie("shop_" + stype, "shop_graphic", 1);
body._visible = false;
this.onEnterFrame = function () {
if (!_root.paused) {
this.step();
}
};
Instance of Symbol 15 MovieClip in Symbol 19 MovieClip Frame 1
/* no clip actions */
Symbol 40 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = (("increase max health by " + _parent.heart1_max) + "\n$") + _parent.heart1_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseExtraHealth(1);
}
Symbol 41 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = (("increase max health by " + _parent.heart2_max) + "\n$") + _parent.heart2_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseExtraHealth(2);
}
Symbol 42 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = (("increase max health by " + _parent.heart3_max) + "\n$") + _parent.heart3_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseExtraHealth(3);
}
Symbol 43 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = (("increase max health by " + _parent.heart4_max) + "\n$") + _parent.heart4_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseExtraHealth(4);
}
Symbol 51 Button
on (rollOver) {
overButton = true;
msg_box.msg = (("Cost to heal is $" + healCost) + ".\n Number of prior heals: ") + _global.g_numHeals;
}
on (rollOut) {
overButton = false;
}
on (release) {
purchaseHeal();
}
Symbol 52 MovieClip Frame 1
function update(health, maxHealth) {
var _local2;
maxPlayerHearts = maxHealth / healthPerHeart;
totalHeartHealth = health / healthPerHeart;
fullHearts = Math.floor(totalHeartHealth);
partialHeart = totalHeartHealth - fullHearts;
hindex = 0;
while (hindex < fullHearts) {
_local2 = this["h" + hindex];
updateBar(_local2.bar, 1);
_local2._visible = true;
hindex++;
}
if (partialHeart > 0) {
_local2 = this["h" + hindex];
updateBar(_local2.bar, partialHeart);
_local2._visible = true;
hindex++;
}
while (hindex < maxPlayerHearts) {
_local2 = this["h" + hindex];
updateBar(_local2.bar, 0);
_local2._visible = true;
hindex++;
}
while (hindex < MAX_HEART_BARS) {
this["h" + hindex]._visible = false;
hindex++;
}
}
function updateBar(bar, perc) {
bar._y = bar._height * (1 - perc);
}
var healthPerHeart = 100;
var fullHearts;
var totalHeartHealth;
var hindex;
var maxPlayerHearts;
var MAX_HEART_BARS = 5;
Symbol 60 Button
on (release) {
closeWindow();
}
Instance of Symbol 50 MovieClip "red_cross" in Symbol 61 MovieClip [shop_window_aid] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 54 MovieClip "msg_box" in Symbol 61 MovieClip [shop_window_aid] Frame 1
onClipEvent (load) {
msg = "";
}
onClipEvent (enterFrame) {
if (_parent.overButton) {
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
_x = _parent._xmouse;
_y = _parent._ymouse;
} else if (_alpha > 0) {
_alpha = (_alpha - 5);
}
}
Symbol 61 MovieClip [shop_window_aid] Frame 2
function closeWindow() {
_root.closeShopWindow();
_root.cupid.hp = hp;
_root.cupid.max_hp = max_hp;
_root.refreshHeartMeter();
_global.g_gold = gold;
}
function purchaseHeal() {
if (gold >= healCost) {
_global.g_numHeals++;
gold = gold - healCost;
hp = max_hp;
}
refreshGold();
}
function purchaseExtraHealth(rank) {
curHeartCost = this[("heart" + rank) + "_cost"];
if ((gold >= curHeartCost) && (maxHeartRank < 5)) {
gold = gold - curHeartCost;
maxHeartRank++;
max_hp = this[("heart" + rank) + "_max"];
}
refreshGold();
refreshHearts();
refreshHeartButtons();
overButton = false;
}
function refreshHearts() {
heart_meter_hosp.update(hp, max_hp);
}
function refreshHeartButtons() {
heartButtons.gotoAndStop(maxHeartRank);
}
function refreshGold() {
var _local1 = 0;
if (gold >= 10000) {
_local1 = Math.round(gold / 10000);
gold_msg = ("~" + _local1) + "0 k";
} else {
gold_msg = "" + gold;
}
}
this.stop();
_parent.overButton = false;
max_hp = _root.cupid.max_hp;
hp = _root.cupid.hp;
maxHeartRank = max_hp / 100;
trace("maxHeartRank: " + maxHeartRank);
healCost = (_global.g_numHeals + 1) * (max_hp - hp);
heart1_max = 200;
heart1_cost = 500;
heart2_max = 300;
heart2_cost = 1000;
heart3_max = 400;
heart3_cost = 5000;
heart4_max = 500;
heart4_cost = 10000;
gold = _global.g_gold;
gold_msg = "";
refreshGold();
refreshHearts();
refreshHeartButtons();
if (hp >= max_hp) {
heal_button.enabled = false;
} else {
red_cross._visible = true;
}
Symbol 66 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = "Improves arm strength\n$" + _parent.muscle1_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseMuscle(1);
}
Symbol 67 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = "Improves arm strength\n$" + _parent.muscle2_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseMuscle(2);
}
Symbol 68 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = "Improves arm strength\n$" + _parent.muscle3_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseMuscle(3);
}
Symbol 69 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = "Improves arm strength\n$" + _parent.muscle4_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseMuscle(4);
}
Symbol 78 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = "Improves wing strength\n$" + _parent.wing1_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseWing(1);
}
Symbol 79 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = "Improves wing strength\n$" + _parent.wing2_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseWing(2);
}
Symbol 80 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = "Improves wing strength\n$" + _parent.wing3_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseWing(3);
}
Symbol 81 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = "Improves wing strength\n$" + _parent.wing4_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseWing(4);
}
Symbol 86 MovieClip [shop_window_gym] Frame 1
function closeWindow() {
_root.closeShopWindow();
_global.g_wingRank = maxWingRank;
_global.g_muscleRank = maxMuscleRank;
_global.g_gold = gold;
_root.cupid.updateShootingStats();
_root.cupid.updateMovementStats();
}
function refreshGold() {
var _local1 = 0;
if (gold >= 10000) {
_local1 = Math.round(gold / 10000);
gold_msg = ("~" + _local1) + "0 k";
} else {
gold_msg = "" + gold;
}
}
function refreshMuscleButtons() {
muscleButtons.gotoAndStop(maxMuscleRank + 1);
}
function refreshWingButtons() {
wingButtons.gotoAndStop(maxWingRank + 1);
}
function purchaseMuscle(rank) {
curMuscleCost = this[("muscle" + rank) + "_cost"];
if ((gold >= curMuscleCost) && (maxMuscleRank < 4)) {
gold = gold - curMuscleCost;
maxMuscleRank++;
maxMuscle = this[("muscle" + rank) + "_max"];
}
refreshGold();
refreshMuscleButtons();
overButton = false;
}
function purchaseWing(rank) {
curWingCost = this[("wing" + rank) + "_cost"];
if ((gold >= curWingCost) && (maxWingRank < 4)) {
gold = gold - curWingCost;
maxWingRank++;
maxWing = this[("wing" + rank) + "_max"];
}
refreshGold();
refreshWingButtons();
overButton = false;
}
_parent.overButton = false;
muscle1_cost = 500;
muscle2_cost = 1000;
muscle3_cost = 5000;
muscle4_cost = 10000;
wing1_cost = 500;
wing2_cost = 1000;
wing3_cost = 5000;
wing4_cost = 10000;
maxWingRank = _global.g_wingRank;
maxMuscleRank = _global.g_muscleRank;
gold = _global.g_gold;
gold_msg = "";
refreshGold();
refreshMuscleButtons();
refreshWingButtons();
Instance of Symbol 54 MovieClip "msg_box" in Symbol 86 MovieClip [shop_window_gym] Frame 1
onClipEvent (load) {
msg = "";
}
onClipEvent (enterFrame) {
if (_parent.overButton) {
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
_x = _parent._xmouse;
_y = _parent._ymouse;
} else if (_alpha > 0) {
_alpha = (_alpha - 5);
}
}
Symbol 110 Button
on (rollOver) {
overButton = true;
msg_box.msg = (("" + fire_amt) + " fire arrows\n$") + fire_cost;
}
on (rollOut) {
overButton = false;
}
on (release) {
purchaseFire();
}
Symbol 111 Button
on (rollOver) {
overButton = true;
msg_box.msg = (("" + ice_amt) + " ice arrows\n$") + ice_cost;
}
on (rollOut) {
overButton = false;
}
on (release) {
purchaseIce();
}
Symbol 112 Button
on (rollOver) {
overButton = true;
msg_box.msg = (("" + bomb_amt) + " bomb arrows\n$") + bomb_cost;
}
on (rollOut) {
overButton = false;
}
on (release) {
purchaseBomb();
}
Symbol 120 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = (("" + _parent.pouch1_max) + " max\narrow pouch\n$") + _parent.pouch1_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseAmmoPouch(1);
}
Symbol 121 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = (("" + _parent.pouch2_max) + " max\narrow pouch\n$") + _parent.pouch2_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseAmmoPouch(2);
}
Symbol 122 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = (("" + _parent.pouch3_max) + " max\narrow pouch\n$") + _parent.pouch3_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseAmmoPouch(3);
}
Symbol 123 Button
on (rollOver) {
_parent.overButton = true;
_parent.msg_box.msg = (("" + _parent.pouch4_max) + " max\narrow pouch\n$") + _parent.pouch4_cost;
}
on (rollOut) {
_parent.overButton = false;
}
on (release) {
_parent.purchaseAmmoPouch(4);
}
Symbol 126 Button
on (rollOver) {
overButton = true;
var num = getAmmoSpaceRemaining();
if (num > 0) {
msg_box.msg = ("You have room for " + getAmmoSpaceRemaining()) + " arrows.";
} else {
msg_box.msg = "Your ammo bag is full.";
}
}
on (rollOut) {
overButton = false;
}
Symbol 129 MovieClip [shop_window_arms] Frame 1
function closeWindow() {
_root.closeShopWindow();
_global.g_maxAmmo = maxAmmo;
_global.g_maxAmmoRank = maxAmmoRank;
_global.g_fire_ammo_count = fire_ammo_count;
_global.g_ice_ammo_count = ice_ammo_count;
_global.g_bomb_ammo_count = bomb_ammo_count;
_root.refreshAmmoText();
_global.g_gold = gold;
}
function purchaseFire() {
if ((gold >= fire_cost) && (!maxAmmoReached())) {
gold = gold - fire_cost;
fire_ammo_count = fire_ammo_count + getDeltaAmmo(fire_amt);
}
refreshGold();
refreshAmmoText();
}
function purchaseIce() {
if ((gold >= ice_cost) && (!maxAmmoReached())) {
gold = gold - ice_cost;
ice_ammo_count = ice_ammo_count + getDeltaAmmo(ice_amt);
}
refreshGold();
refreshAmmoText();
}
function purchaseBomb() {
if ((gold >= bomb_cost) && (!maxAmmoReached())) {
gold = gold - bomb_cost;
bomb_ammo_count = bomb_ammo_count + getDeltaAmmo(bomb_amt);
}
refreshGold();
refreshAmmoText();
}
function refreshGold() {
var _local1 = 0;
if (gold >= 10000) {
_local1 = Math.round(gold / 10000);
gold_msg = ("~" + _local1) + "0 k";
} else {
gold_msg = "" + gold;
}
}
function getDeltaAmmo(amt) {
var _local1 = 0;
var _local4 = getTotalAmmo();
var _local2 = _local4 + amt;
if (_local2 >= maxAmmo) {
_local1 = (amt - _local2) + maxAmmo;
trace("1. " + _local1);
} else {
_local1 = amt;
trace("2. " + _local1);
}
return(_local1);
}
function maxAmmoReached() {
return(getTotalAmmo() >= maxAmmo);
}
function getTotalAmmo() {
return((fire_ammo_count + ice_ammo_count) + bomb_ammo_count);
}
function refreshAmmoPouch() {
ammoPouchButtons.gotoAndStop(maxAmmoRank + 1);
}
function refreshAmmoText() {
total_ammo = getTotalAmmo();
total_ammo_txt.text = total_ammo;
}
function purchaseAmmoPouch(rank) {
curPouchCost = this[("pouch" + rank) + "_cost"];
if ((gold >= curPouchCost) && (maxAmmoRank < 4)) {
gold = gold - curPouchCost;
maxAmmoRank++;
maxAmmo = this[("pouch" + rank) + "_max"];
}
refreshGold();
refreshAmmoPouch();
overButton = false;
}
function getAmmoSpaceRemaining() {
var _local1 = maxAmmo - getTotalAmmo();
if (_local1 < 0) {
_local1 = 0;
}
return(_local1);
}
_parent.overButton = false;
fire_amt = 200;
fire_cost = 100;
ice_amt = 200;
ice_cost = 100;
bomb_amt = 200;
bomb_cost = 300;
pouch1_max = 100;
pouch1_cost = 500;
pouch2_max = 200;
pouch2_cost = 1000;
pouch3_max = 500;
pouch3_cost = 5000;
pouch4_max = 2000;
pouch4_cost = 10000;
maxAmmo = _global.g_maxAmmo;
maxAmmoRank = _global.g_maxAmmoRank;
fire_ammo_count = _global.g_fire_ammo_count;
ice_ammo_count = _global.g_ice_ammo_count;
bomb_ammo_count = _global.g_bomb_ammo_count;
total_ammo = getTotalAmmo();
gold = _global.g_gold;
gold_msg = "";
refreshGold();
refreshAmmoPouch();
refreshAmmoText();
Instance of Symbol 54 MovieClip "msg_box" in Symbol 129 MovieClip [shop_window_arms] Frame 1
onClipEvent (load) {
msg = "";
}
onClipEvent (enterFrame) {
if (_parent.overButton) {
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
_x = _parent._xmouse;
_y = _parent._ymouse;
} else if (_alpha > 0) {
_alpha = (_alpha - 5);
}
}
Symbol 190 MovieClip [ship_explosion_red] Frame 1
stop();
alpha_change = 1;
rate = 0.5;
Instance of Symbol 131 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
if (_alpha < 1) {
_parent.unloadMovie();
}
_rotation = (_rotation + rotRate);
}
Instance of Symbol 133 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 135 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 137 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 139 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 141 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 143 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 145 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 147 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 149 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 151 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 153 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 155 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 157 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 159 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 161 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 163 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 165 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 167 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 169 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 171 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 173 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 175 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 177 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 179 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 181 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 183 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 185 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 187 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip [ship_explosion_red] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Symbol 191 MovieClip [ship_explosion_poison] Frame 1
stop();
alpha_change = 1;
rate = 0.5;
Instance of Symbol 131 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
if (_alpha < 1) {
_parent.unloadMovie();
}
_rotation = (_rotation + rotRate);
}
Instance of Symbol 133 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 135 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 137 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 139 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 141 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 143 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 145 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 147 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 149 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 151 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 153 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 155 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 157 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 159 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 161 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 163 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 165 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 167 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 169 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 171 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 173 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 175 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 177 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 179 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 181 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 183 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 185 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 187 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 189 MovieClip in Symbol 191 MovieClip [ship_explosion_poison] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Symbol 192 MovieClip [ship_explosion_ice] Frame 1
stop();
alpha_change = 1;
rate = 0.5;
Instance of Symbol 131 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
if (_alpha < 1) {
_parent.unloadMovie();
}
_rotation = (_rotation + rotRate);
}
Instance of Symbol 133 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 135 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 137 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 139 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 141 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 143 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 145 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 147 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 149 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 151 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 153 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 155 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 157 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 159 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 161 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 163 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 165 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 167 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 169 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 171 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 173 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 175 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 177 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 179 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 181 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 183 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 185 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 187 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 189 MovieClip in Symbol 192 MovieClip [ship_explosion_ice] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Symbol 193 MovieClip [ship_explosion_fire] Frame 1
stop();
alpha_change = 1;
rate = 0.5;
Instance of Symbol 131 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
if (_alpha < 1) {
_parent.unloadMovie();
}
_rotation = (_rotation + rotRate);
}
Instance of Symbol 133 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 135 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 137 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 139 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 141 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 143 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 145 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 147 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 149 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 151 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 153 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 155 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 157 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 159 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 161 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 163 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 165 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 167 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 169 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 171 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 173 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 175 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 177 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 179 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 181 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 183 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 185 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Instance of Symbol 187 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = _x * _parent.rate;
vy = _y * _parent.rate;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
}
Instance of Symbol 189 MovieClip in Symbol 193 MovieClip [ship_explosion_fire] Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
}
Symbol 196 MovieClip [spaceship] Frame 1
function step() {
dx = (dy = 0);
if (g_missile_speed > goal_speed) {
g_missile_speed = g_missile_speed * shift_rate;
} else {
g_missile_speed = g_missile_speed / shift_rate;
}
if (g_missile_turn_rate > goal_turn_rate) {
g_missile_turn_rate = g_missile_turn_rate * shift_rate;
} else {
g_missile_turn_rate = g_missile_turn_rate / shift_rate;
}
if (escapeMode) {
dx = escapeSpot_x - _x;
dy = escapeSpot_y - _y;
} else {
dx = target_enemy._x - _x;
dy = target_enemy._y - _y;
}
dist = Math.sqrt((dx * dx) + (dy * dy));
vx = vx + ((g_missile_turn_rate * dx) / dist);
vy = vy + ((g_missile_turn_rate * dy) / dist);
normDist = Math.sqrt((vx * vx) + (vy * vy));
vx = (g_missile_speed * vx) / normDist;
vy = (g_missile_speed * vy) / normDist;
radians = Math.atan(vy / vx);
if (vx == 0) {
radians = radians + Math.PI;
}
if (vx > 0) {
dspot._rotation = (radians * _global.g_rotFact) - 90;
} else {
dspot._rotation = (radians * _global.g_rotFact) + 90;
}
xprev = _x;
yprev = _y;
_x = (_x + vx);
_y = (_y + vy);
xcur = _x;
ycur = _y;
if (((((_x > xmin) && (_x < xmax)) && (_y > ymin)) && (_y < ymax)) && ((timeToShoot++) > waitTime)) {
if ((shot++) >= 2) {
shot = 0;
waitTime = 300;
} else {
waitTime = 10;
}
timeToShoot = 0;
shoot();
}
if ((actionTimer--) < 0) {
escapeMode = random(2) == 0;
if (escapeMode) {
escapeSpot_x = random(xmax);
escapeSpot_y = random(ymax);
}
actionTimer = 66 + random(300);
shiftGears();
}
}
function shiftGears() {
goal_turn_rate = 0.05 + (Math.random() * 0.3);
goal_speed = 3 + (Math.random() * 3);
}
function counterEffect() {
if (counterTimer <= 0) {
counterTimer = 20;
vx = vx * -1;
vy = vy * -1;
}
}
function takeDamage(ptype, xp, yp, pvx, pvy, rot) {
ship_animation.gotoAndStop(101 - Math.floor((100 * hp) / maxhp));
if (ptype == "arrow_norm") {
hp = hp - 1;
} else if (ptype == "arrow_fire") {
hp = hp - 5;
} else if (ptype == "arrow_ice") {
hp = hp - 1;
} else if (ptype == "arrow_bomb") {
hp = hp - 15;
}
if (hp <= 0) {
hp = 0;
deathExplosion();
destroy();
dead = true;
}
updateHPBar();
if (ptype == "arrow_bomb") {
deathExplosion();
}
}
function destroy() {
_root.removeEnemy(this);
}
function deathExplosion() {
var _local3 = _root.addObj("ship_explosion_" + etype, _root.debris_fg_layer, _root.getNextDebrisFGLevel());
_local3._x = _x;
_local3._y = _y;
var _local2 = _root.addObj("bomb_blast", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
_local2._x = _x;
_local2._y = _y;
_local2._rotation = random(360);
_local2._xscale = (_local2._yscale = 25);
_root.playSound("bomb_hit.wav");
_root.addHitCombo();
}
function shoot() {
_root.playSound("ching2.wav");
proj = _root.shootAtCupid(_x, _y, p_speed, "proj1", true);
_root.setProjSettings(proj, "p_laser2", etype, pc_inner, pc_outer, gravOn);
}
var types = new Array("fire", "ice", "poison", "red");
etype = types[random(types.length)];
dead = false;
shootDelay = 300;
shootTimer = shootDelay;
pc_inner = "";
pc_outer = "";
gravOn = false;
counterTimer = 0;
p_speed = 5;
escapeMode = true;
actionTimer = random(300);
xmin = 0;
xmax = Stage.width;
ymin = 0;
ymax = Stage.height;
escapeSpot_x = random(xmax);
escapeSpot_y = random(ymax);
shot = 0;
if (etype == "red") {
dspot.attachMovie("ship_red", "ship", 1);
pc_outer = "red";
pc_inner = "white";
} else if (etype == "ice") {
dspot.attachMovie("ship_ice", "ship", 1);
pc_outer = "blue";
pc_inner = "cyan";
} else if (etype == "fire") {
dspot.attachMovie("ship_fire", "ship", 1);
pc_outer = "orange";
pc_inner = "yellow";
} else if (etype == "poison") {
dspot.attachMovie("ship_poison", "ship", 1);
pc_outer = "green";
pc_inner = "white";
}
timeToShoot = 0;
speed = 10;
target_enemy = _root.cupid;
g_missile_turn_rate = 0.1;
g_missile_speed = 5;
goal_speed = g_missile_speed;
goal_turn_rate = g_missile_turn_rate;
shift_rate = 0.98;
shiftGears();
waitTime = random(150) + 50;
hp = 3;
maxhp = hp;
Instance of Symbol 194 MovieClip "body" in Symbol 196 MovieClip [spaceship] Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 206 MovieClip [proj1] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
if (gravEffect) {
vy = vy + _root.gravity;
}
if (active && (_root.cupid.body.hitTest(_x, _y, 0))) {
reaction = _root.cupid.getProjectileReaction(ptype);
if (reaction < 0) {
vx = vx * -1;
vy = vy * -1;
_root.updateRotation(this);
active = false;
} else {
_root.cupid.hurt(reaction * 5);
destroy();
}
}
if (!gravEffect) {
if ((((_x > xmax) || (_x < xmin)) || (_y > ymax)) || (_y < ymin)) {
destroy();
}
} else if (((_x > xmax) || (_x < xmin)) || (_y > ymax)) {
destroy();
}
}
function updateAngle() {
}
function destroy() {
this.removeMovieClip();
}
xmin = -20;
xmax = Stage.width + 20;
ymin = -20;
ymax = Stage.height + 20;
active = true;
Instance of Symbol 205 MovieClip in Symbol 206 MovieClip [proj1] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 228 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 1
function setPercent(num) {
bar._width = num;
}
Symbol 230 MovieClip [dragon] Frame 1
function step() {
if (hp_bar._alpha > 0) {
hp_bar._alpha = hp_bar._alpha - 5;
}
if (counterTimer > 0) {
counterTimer--;
}
m_target_x = _root.cupid._x;
m_target_y = _root.cupid._y;
var _local3 = 6;
if (!isDead()) {
if ((shootTimer--) < 0) {
shootTimer = shootDelay;
proj = _root.shootAtCupid(_x, _y, _local3, "proj1", true);
_root.setProjSettings(proj, "p_glob", dtype, pc_inner, pc_outer, gravOn);
}
if ((m_target_x > _x) && (vx < _local3)) {
vx = vx + 0.05;
} else if ((m_target_x < _x) && (vx > (-_local3))) {
vx = vx - 0.05;
}
if ((m_target_y > _y) && (vy < _local3)) {
vy = vy + 0.02;
} else if ((m_target_y < _y) && (vy > (-_local3))) {
vy = vy - 0.02;
}
if (vx > 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else {
vy = vy + 0.08;
_rotation = (_rotation - 0.2);
}
updatePosition();
if (_y > (_parent._parent.g_ground + 100)) {
destroy();
}
}
function updatePosition() {
_x = (_x + vx);
_y = (_y + vy);
}
function counterEffect() {
if (counterTimer <= 0) {
counterTimer = 20;
vx = vx * -1;
vy = vy * -1;
}
}
function takeDamage(ptype, xp, yp, pvx, pvy, rot) {
if (ptype == "arrow_norm") {
hp = hp - 1;
} else if (ptype == "arrow_fire") {
hp = hp - 5;
} else if (ptype == "arrow_ice") {
hp = hp - 1;
} else if (ptype == "arrow_bomb") {
hp = hp - 15;
}
if (hp <= 0) {
hp = 0;
deathExplosion();
destroy();
dead = true;
}
updateHPBar();
if (ptype == "arrow_bomb") {
deathExplosion();
}
}
function deathExplosion() {
var _local2 = _root.addObj("bomb_blast", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
_local2._x = _x;
_local2._y = _y;
_local2._rotation = random(360);
_local2._xscale = (_local2._yscale = 50);
if (dtype == "ice") {
_root.projExplosion("proj_ice", _x, _y, 4);
_root.playSound("ice_shatter.wav");
} else if (dtype == "fire") {
_root.projExplosion("proj_flame", _x, _y, 4);
_root.playSound("bomb.wav");
} else if (dtype == "poison") {
_root.bloodExplosion(_x, _y, "oil");
_root.playSound("blood_splat.wav");
} else {
_root.bloodExplosion(_x, _y, "blood");
_root.playSound("blood_splat.wav");
}
_root.addHitCombo();
}
function updateHPBar() {
hp_bar.bar._width = (hp / max_hp) * 100;
hp_bar._alpha = 100;
}
function isDead() {
return(hp == 0);
}
function setHP(num) {
hp = num;
}
function destroy() {
_root.removeEnemy(this);
}
max_hp = 5;
hp = max_hp;
var types = new Array("fire", "ice", "poison", "red");
dtype = types[random(types.length)];
etype = dtype;
dead = false;
shootDelay = 300;
shootTimer = shootDelay;
pc_inner = "";
pc_outer = "";
gravOn = false;
counterTimer = 0;
if (dtype == "red") {
dspot.attachMovie("red_dragon", "dragon", 1);
pc_outer = "darkred";
pc_inner = "red";
} else if (dtype == "ice") {
dspot.attachMovie("ice_dragon", "dragon", 1);
pc_outer = "darkcyan";
pc_inner = "cyan";
} else if (dtype == "fire") {
dspot.attachMovie("fire_dragon", "dragon", 1);
pc_outer = "gold";
pc_inner = "yellow";
} else if (dtype == "poison") {
dspot.attachMovie("poison_dragon", "dragon", 1);
pc_outer = "darkgreen";
pc_inner = "green";
}
Instance of Symbol 223 MovieClip "body" in Symbol 230 MovieClip [dragon] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 284 MovieClip [enemy_bomb_drop] Frame 1
function step() {
vy = vy + _root.gravity;
_x = (_x + vx);
_y = (_y + vy);
xpos = _x;
ypos = _y;
if (vx > 0) {
_rotation = (_rotation + 0.3);
} else {
_rotation = (_rotation - 0.3);
}
if ((((_x < xmin) || (_x > xmax)) || (_y < ymin)) || (_y > ymax)) {
_root.removeEnemy(this);
}
}
function takeDamage(ptype, xp, yp, pvx, pvy, rot) {
hp = 0;
deathExplosion();
}
function deathExplosion() {
var _local2 = _root.addObj("bomb_blast", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
_local2._x = _x;
_local2._y = _y;
_local2._rotation = random(360);
_local2._xscale = (_local2._yscale = 100);
_root.playSound("bomb_hit.wav");
_root.addHitCombo();
}
hp = 1;
xpos = _x;
ypos = _y;
xmax = Stage.width + 10;
ymax = Stage.height + 10;
xmin = -10;
ymin = -10;
etype = "bomb";
if (vx < 0) {
_xscale = -100;
}
Instance of Symbol 281 MovieClip "body" in Symbol 284 MovieClip [enemy_bomb_drop] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 283 MovieClip in Symbol 284 MovieClip [enemy_bomb_drop] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 287 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 1
function setPercent(num) {
bar._width = num;
}
Symbol 289 MovieClip [bomber] Frame 1
function step() {
if (hp_bar._alpha > 0) {
hp_bar._alpha = hp_bar._alpha - 5;
}
if (isDead()) {
vy = vy + 0.08;
_rotation = (_rotation - 0.2);
}
if ((_x > 100) && ((bombTimer--) < 0)) {
bombTimer = bombDelay;
if ((++bombCount) >= 3) {
bombCount = 0;
bombTimer = bombTimer * 3;
}
dropBomb();
}
if (_x < -75) {
_root.removeEnemy(this);
}
updatePosition();
if (_y > (Stage.height + 100)) {
destroy();
}
}
function updatePosition() {
_x = (_x + vx);
_y = (_y + vy);
}
function dropBomb() {
_root.playSound("firecat3.wav");
proj = _root.addEnemy("enemy_bomb_drop");
proj.vx = vx;
proj.vy = 0;
proj._x = _x;
proj._y = _y;
}
function takeDamage(ptype, xp, yp, pvx, pvy, rot) {
trace("Taking Damage");
if (ptype == "arrow_norm") {
hp = hp - 1;
} else if (ptype == "arrow_fire") {
hp = hp - 5;
} else if (ptype == "arrow_ice") {
hp = hp - 1;
} else if (ptype == "arrow_bomb") {
hp = hp - 15;
}
if (hp <= 0) {
hp = 0;
if (!dead) {
deathExplosion();
}
dead = true;
}
updateHPBar();
if (ptype == "arrow_bomb") {
deathExplosion();
}
}
function deathExplosion() {
var _local2 = _root.addObj("bomb_blast", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
_local2._x = _x;
_local2._y = _y;
_local2._rotation = random(360);
_local2._xscale = (_local2._yscale = 75);
_root.playSound("bomb_hit.wav");
_root.addHitCombo();
}
function updateHPBar() {
hp_bar.bar._width = (hp / max_hp) * 100;
hp_bar._alpha = 100;
}
function isDead() {
return(hp == 0);
}
function setHP(num) {
hp = num;
}
function destroy() {
_root.removeEnemy(this);
}
vx = -2;
vy = 0;
max_hp = 50;
hp = max_hp;
etype = "bomber";
dead = false;
bombDelay = 22;
bombTimer = bombDelay;
bombCount = 0;
_x = (_x + (20 + random(20)));
Instance of Symbol 281 MovieClip "body" in Symbol 289 MovieClip [bomber] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 286 MovieClip in Symbol 289 MovieClip [bomber] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 292 MovieClip [gun_flash] Frame 1
function step() {
_alpha = (_alpha - decayRate);
if (_alpha < 0) {
this.unloadMovie();
}
}
decayRate = 5;
Instance of Symbol 291 MovieClip in Symbol 292 MovieClip [gun_flash] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Symbol 308 MovieClip [bomb_blast] Frame 27
this.unloadMovie();
Symbol 315 MovieClip [proj_enemy_steel] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
clipBod._rotation = clipBod._rotation + rate;
if ((boundaryTimer--) < 0) {
boundaryTimer = 50;
if ((((_x < xmin) || (_x > xmax)) || (_y < ymin)) || (_y > ymax)) {
destroy();
}
}
}
function takeDamage(ptype, xp, yp, pvx, pvy, rot) {
deathExplosion();
destroy();
}
function destroy() {
_root.removeEnemy(this);
}
function deathExplosion() {
var _local2 = _root.addObj("bomb_blast", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
_local2._x = _x;
_local2._y = _y;
_local2._rotation = random(360);
_local2._xscale = (_local2._yscale = 25);
_root.playSound("bomb_hit.wav");
}
m_type = "steel";
rate = 11;
xmax = Stage.width + 50;
xmin = -50;
ymin = -50;
ymax = Stage.height + 50;
boundaryTimer = 50;
Instance of Symbol 313 MovieClip "clipBod" in Symbol 315 MovieClip [proj_enemy_steel] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 314 MovieClip "body" in Symbol 315 MovieClip [proj_enemy_steel] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 318 MovieClip [deb_plank_4] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
vy = vy + 0.1;
_rotation = (_rotation + (vx * 10));
if (_y > ylimit) {
this.unloadMovie();
}
}
vx = (random(100) - 50) / 50;
vy = ((-random(100)) - 20) / 50;
ylimit = _parent._parent.g_ground + 50;
Instance of Symbol 317 MovieClip in Symbol 318 MovieClip [deb_plank_4] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Symbol 321 MovieClip [deb_plank_3] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
vy = vy + 0.1;
_rotation = (_rotation + (vx * 10));
if (_y > ylimit) {
this.unloadMovie();
}
}
vx = (random(100) - 50) / 50;
vy = ((-random(100)) - 20) / 50;
ylimit = _parent._parent.g_ground + 50;
Instance of Symbol 320 MovieClip in Symbol 321 MovieClip [deb_plank_3] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Symbol 324 MovieClip [deb_plank_2] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
vy = vy + 0.1;
_rotation = (_rotation + (vx * 10));
if (_y > ylimit) {
this.unloadMovie();
}
}
vx = (random(100) - 50) / 50;
vy = ((-random(100)) - 20) / 50;
ylimit = _parent._parent.g_ground + 50;
Instance of Symbol 323 MovieClip in Symbol 324 MovieClip [deb_plank_2] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Symbol 327 MovieClip [deb_plank_1] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
vy = vy + 0.1;
_rotation = (_rotation + (vx * 10));
if (_y > ylimit) {
this.unloadMovie();
}
}
vx = (random(100) - 50) / 50;
vy = ((-random(100)) - 20) / 50;
ylimit = _parent._parent.g_ground + 50;
Instance of Symbol 326 MovieClip in Symbol 327 MovieClip [deb_plank_1] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Symbol 330 MovieClip [deb_ene_foot] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
vy = vy + 0.1;
_rotation = (_rotation + (vx * 10));
if (_y > ylimit) {
this.unloadMovie();
}
}
vx = (random(100) - 50) / 50;
vy = ((-random(200)) - 50) / 50;
ylimit = _parent._parent.g_ground + 50;
Instance of Symbol 329 MovieClip in Symbol 330 MovieClip [deb_ene_foot] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Symbol 337 MovieClip [deb_ene_cat] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
vy = vy + 0.1;
_rotation = (_rotation + (vx * 10));
if (_y > ylimit) {
this.unloadMovie();
}
}
vx = (random(100) - 50) / 50;
vy = ((-random(200)) - 50) / 50;
ylimit = _parent._parent.g_ground + 50;
Instance of Symbol 336 MovieClip in Symbol 337 MovieClip [deb_ene_cat] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Symbol 350 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 100
stop();
gotoAndPlay (1);
Symbol 350 MovieClip Frame 121
_parent.walking = true;
trace("start walking again");
Symbol 352 MovieClip [deb_ene_boss] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
vy = vy + 0.1;
_rotation = (_rotation + (vx * 10));
if (_y > ylimit) {
this.unloadMovie();
}
}
vx = (random(100) - 50) / 50;
vy = ((-random(200)) - 50) / 50;
ylimit = _parent._parent.g_ground + 50;
Instance of Symbol 351 MovieClip in Symbol 352 MovieClip [deb_ene_boss] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Symbol 355 MovieClip [deb_ene_archer] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
vy = vy + 0.1;
_rotation = (_rotation + (vx * 10));
if (_y > ylimit) {
this.unloadMovie();
}
}
vx = (random(100) - 50) / 50;
vy = ((-random(200)) - 50) / 50;
ylimit = _parent._parent.g_ground + 50;
Instance of Symbol 354 MovieClip in Symbol 355 MovieClip [deb_ene_archer] Frame 1
onClipEvent (enterFrame) {
if (!_parent._parent._parent.g_paused) {
_parent.step();
}
}
Instance of Symbol 358 MovieClip "hitBox" in Symbol 359 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 358 MovieClip "hitBox" in Symbol 360 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 358 MovieClip "hitBox" in Symbol 361 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 358 MovieClip "hitBox" in Symbol 362 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 365 MovieClip in Symbol 366 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + _parent._parent._parent.blade_spin_rate);
}
onClipEvent (load) {
_rotation = (_rotation + random(360));
}
Symbol 382 MovieClip [cannon] Frame 1
var cannons = new Array(c1, c2, c3);
c1.ctype = "proj_enemy_fire";
c2.ctype = "proj_enemy_ice";
c3.ctype = "proj_enemy_steel";
var num_cannons = 3;
var cannonNdx = 2;
var bod = cannons[cannonNdx];
var ndx = 0;
while (ndx < num_cannons) {
if (bod != cannons[ndx]) {
cannons[ndx]._alpha = 0;
}
ndx++;
}
var ammo = bod.ctype;
Symbol 383 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 1
function setPercent(num) {
bar._width = num;
}
Symbol 385 MovieClip [gunship] Frame 1
function initGuns() {
var _local1 = 0;
while (_local1 < guns.length) {
var _local2 = 5;
if (_local2 > 500) {
_local2 = 500;
}
var _local3 = (random(200) + 200) - _local2;
m_maxLoadTime = _local3;
guns[_local1].timerTarget = _local3;
guns[_local1].dead = false;
_local1++;
}
}
function step() {
if (hp_bar._alpha > 0) {
hp_bar._alpha = hp_bar._alpha - 5;
}
if (isDead()) {
vy = vy + 0.08;
_rotation = (_rotation - 0.2);
if (blade_spin_rate > 5) {
blade_spin_rate = blade_spin_rate - 0.4;
}
} else {
stepGuns();
}
updatePosition();
if ((_x < goal_xspot) && (!isDead())) {
if (vx < 0) {
vx = vx + 0.005;
} else {
vx = 0;
}
}
if (_y > (Stage.height + 100)) {
destroy();
}
}
function updatePosition() {
_x = (_x + vx);
_y = (_y + vy);
}
function takeDamage(ptype, xp, yp, pvx, pvy, rot) {
trace("Taking Damage");
if (ptype == "arrow_norm") {
hp = hp - 1;
} else if (ptype == "arrow_fire") {
hp = hp - 5;
} else if (ptype == "arrow_ice") {
hp = hp - 1;
} else if (ptype == "arrow_bomb") {
hp = hp - 15;
}
if (hp <= 0) {
hp = 0;
if (!dead) {
deathExplosion();
}
dead = true;
}
updateHPBar();
if (ptype == "arrow_bomb") {
deathExplosion();
}
testHitTroops(xp, yp);
}
function deathExplosion() {
var _local2 = _root.addObj("bomb_blast", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
_local2._x = _x;
_local2._y = _y;
_local2._rotation = random(360);
_local2._xscale = (_local2._yscale = 75);
_root.playSound("bomb_hit.wav");
_root.addHitCombo();
}
function updateHPBar() {
hp_bar.bar._width = (hp / max_hp) * 100;
hp_bar._alpha = 100;
}
function isDead() {
return(hp == 0);
}
function setHP(num) {
hp = num;
}
function destroy() {
_root.removeEnemy(this);
}
function stepGuns() {
if (m_rotRate < m_max_rotRate) {
m_rotRate = m_rotRate + 0.01;
}
var _local2 = 0;
while (_local2 < guns.length) {
gun = guns[_local2];
if ((!gun.dead) && ((gun.timerTarget--) < 200)) {
if (gun.timerTarget < 0) {
var _local3 = 5;
if (_local3 > 500) {
_local3 = 500;
}
var _local1 = (random(500) + 600) - _local3;
m_maxLoadTime = _local1;
if (m_bossDead) {
_local1 = _local1 * 2;
}
gun.timerTarget = _local1;
shootAtDragon(gun);
gun.bod.barrel._x = -10;
} else {
aimAtDragon(gun);
}
}
if (gun.bod.barrel._x < 15.3) {
gun.bod.barrel._x = gun.bod.barrel._x + 0.5;
}
_local2++;
}
}
function shootAtDragon(gun) {
var _local14;
var _local13;
var _local12;
var _local6;
var _local5;
var _local7 = 2;
var _local8 = 10;
var _local11 = "";
var _local3;
var _local4;
_local11 = gun.ammo;
_local6 = Math.cos((gun._rotation * Math.PI) / 180);
_local5 = Math.sin((gun._rotation * Math.PI) / 180);
_local13 = _local6 * _local7;
_local12 = _local5 * _local7;
_local3 = _root.addEnemy(_local11);
var _local9 = (_x + gun._x) + (_local6 * _local8);
var _local10 = (_y + gun._y) + (_local5 * _local8);
_local3.vx = _local13;
_local3.vy = _local12;
_local3._x = _local9;
_local3._y = _local10;
_root.playSound("bomb_hit.wav");
_local4 = _root.addObj("gun_flash", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
_local4._x = _local9;
_local4._y = _local10;
_local4._rotation = gun._rotation;
}
function aimAtDragon(gun) {
var _local2 = (_x + gun._x) - _root.cupid._x;
var _local5 = (_y + gun._y) - _root.cupid._y;
var _local7 = gun._rotation;
var _local3 = 0;
var _local4 = Math.atan(_local5 / _local2);
if (_local2 > 0) {
_local3 = ((_local4 * 180) / Math.PI) + 180;
if ((_local2 > 0) && (_local5 > 0)) {
_local3 = ((_local4 * 180) / Math.PI) - 180;
}
} else {
_local3 = (_local4 * 180) / Math.PI;
}
if ((_local2 < 1E-5) && (_local2 > -1E-5)) {
_local3 = _local3 + 180;
}
gun._rotation = _root.smartRotation(_local7, _local3, m_rotRate);
}
function testHitTroops(xp, yp) {
if ((archer != null) && (archer.hitTest(xp, yp, 0))) {
m_archerDead = true;
archer.unloadMovie();
_root.addFlyingTroop("deb_ene_archer", xp, yp, archer._xscale, archer._yscale);
_root.increaseScore(100, xp, yp);
} else if ((boss != null) && (boss.hitTest(xp, yp, 0))) {
m_bossDead = true;
_root.addFlyingTroop("deb_ene_boss", _x, _y, archer._xscale, archer._yscale);
boss.unloadMovie();
_root.increaseScore.addScore(400, xp, yp);
} else if ((foot1 != null) && (foot1.hitTest(xp, yp, 0))) {
m_foot1Dead = true;
_root.addFlyingTroop("deb_ene_foot", xp, yp, archer._xscale, archer._yscale);
foot1.unloadMovie();
_root.increaseScore.addScore(200, xp, yp);
} else if ((foot2 != null) && (foot2.hitTest(xp, yp, 0))) {
m_foot2Dead = true;
_root.addFlyingTroop("deb_ene_foot", xp, yp, archer._xscale, archer._yscale);
foot2.unloadMovie();
_root.increaseScore.addScore(200, xp, yp);
} else if ((flagger != null) && (flagger.hitTest(xp, yp, 0))) {
m_flaggerDead = true;
_root.addFlyingTroop("deb_ene_cat", xp, yp, archer._xscale, archer._yscale);
flagger.unloadMovie();
_root.increaseScore.addScore(100, xp, yp);
}
updateGunState();
}
function updateGunState() {
gun1.dead = m_flaggerDead && (m_foot2Dead);
gun2.dead = m_bossDead;
gun3.dead = m_archerDead && (m_foot1Dead);
if ((((m_archerDead && (m_flaggerDead)) && (m_foot2Dead)) && (m_foot1Dead)) && (m_bossDead)) {
hp = 0;
}
}
function slowShooting(amt) {
var _local2 = 0;
while (_local2 < guns.length) {
var _local1 = guns[_local2].timerTarget;
_local1.timerTarget = _local1.timerTarget + amt;
if (_local1.timerTarget > m_maxLoadTime) {
_local1.timerTarget = m_maxLoadTime;
}
_local2++;
}
if (((m_rotRate = m_rotRate - 0.05)) < 0.5) {
m_rotRate = 0.5;
}
}
vx = -0.5;
vy = 0;
max_hp = 100;
hp = max_hp;
smokeTimer = 0;
goal_xspot = (Stage.width / 2) + random(Math.floor(Stage.width / 3));
blade_spin_rate = 23;
etype = "air_ship";
m_archerDead = false;
m_foot1Dead = false;
m_foot2Dead = false;
m_bossDead = false;
m_flaggerDead = false;
dead = false;
_x = (Stage.width + _width);
var guns = new Array(gun1, gun2, gun3);
gun1.ammo = "proj_enemy_steel";
gun2.ammo = "proj_enemy_steel";
gun3.ammo = "proj_enemy_steel";
initGuns();
var m_maxLoadTime;
var m_max_rotRate = 1;
var m_rotRate = m_max_rotRate;
Instance of Symbol 367 MovieClip in Symbol 385 MovieClip [gunship] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 369 MovieClip "body" in Symbol 385 MovieClip [gunship] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 390 MovieClip [score_increase] Frame 1
function step() {
_y = (_y - 0.1);
if ((myCount++) > 100) {
this.removeMovieClip();
}
}
myCount = 0;
trace("Score...............");
Instance of Symbol 389 MovieClip in Symbol 390 MovieClip [score_increase] Frame 1
onClipEvent (enterFrame) {
if (!_root.pause) {
_parent.step();
}
}
Symbol 393 MovieClip [red_cloud] Frame 63
this.unloadMovie();
Symbol 396 MovieClip [proj_rock_yellow] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "rock");
vy = vy * -0.4;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(8);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 395 MovieClip in Symbol 396 MovieClip [proj_rock_yellow] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 399 MovieClip [proj_rock_pink] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "rock");
vy = vy * -0.4;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(8);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 398 MovieClip in Symbol 399 MovieClip [proj_rock_pink] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 402 MovieClip [proj_rock_green] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "rock");
vy = vy * -0.4;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(8);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 401 MovieClip in Symbol 402 MovieClip [proj_rock_green] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 405 MovieClip [proj_ice] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "ice");
vy = vy * -0.4;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(8);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 404 MovieClip in Symbol 405 MovieClip [proj_ice] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 408 MovieClip [proj_flame] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / mpi);
} else {
_rotation = (((radians * 180) / mpi) + 180);
}
if ((vx < 1E-5) && (vx > -1E-5)) {
_rotation = (_rotation + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 0))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "flame");
this.unloadMovie();
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(12);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 20;
mpi = Math.PI;
Instance of Symbol 407 MovieClip in Symbol 408 MovieClip [proj_flame] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 411 MovieClip Frame 60
this.stop();
Symbol 412 MovieClip [blood_drop] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / mpi);
} else {
_rotation = (((radians * 180) / mpi) + 180);
}
if ((vx < 1E-5) && (vx > -1E-5)) {
_rotation = (_rotation + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 0))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, btype);
this.removeMovieClip();
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 15;
mpi = Math.PI;
Instance of Symbol 411 MovieClip in Symbol 412 MovieClip [blood_drop] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 417 MovieClip [level_display] Frame 1
function step() {
_alpha = (_alpha - 10);
if (_alpha < 0) {
this.removeMovieClip();
}
}
_alpha = 1000;
Instance of Symbol 416 MovieClip in Symbol 417 MovieClip [level_display] Frame 1
onClipEvent (enterFrame) {
_parent.step();
}
Symbol 420 MovieClip [ice_heart_fade] Frame 1
function step() {
if (_alpha > 0) {
_alpha = (_alpha - 5);
} else {
this.removeMovieClip();
}
}
_alpha = targetAlph;
Instance of Symbol 419 MovieClip in Symbol 420 MovieClip [ice_heart_fade] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 421 MovieClip [ice_heart] Frame 1
function step() {
if (_alpha < targetAlph) {
_alpha = (_alpha + 5);
}
}
_alpha = 0;
Instance of Symbol 419 MovieClip in Symbol 421 MovieClip [ice_heart] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 443 MovieClip Frame 1
stop();
Symbol 444 MovieClip [flame_heart_fade] Frame 1
function step() {
if (_alpha > 0) {
_alpha = (_alpha - 5);
} else {
this.unloadMovie();
}
}
_alpha = targetAlph;
Instance of Symbol 443 MovieClip "body" in Symbol 444 MovieClip [flame_heart_fade] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 452 MovieClip Frame 1
stop();
Symbol 453 MovieClip [flame_heart] Frame 1
function step() {
if (_alpha < targetAlph) {
_alpha = (_alpha + 5);
}
if ((count++) > 5) {
count = 1;
}
body.gotoAndStop(count);
}
_alpha = 0;
count = 0;
Instance of Symbol 452 MovieClip "body" in Symbol 453 MovieClip [flame_heart] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused()) {
_parent.step();
}
}
Symbol 456 MovieClip [explosion_pow] Frame 20
this.unloadMovie();
Symbol 460 MovieClip [enemy_oil_tr] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "oil");
vy = vy * -0.65;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 459 MovieClip in Symbol 460 MovieClip [enemy_oil_tr] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 464 MovieClip [enemy_oil_tl] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "oil");
vy = vy * -0.65;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 463 MovieClip in Symbol 464 MovieClip [enemy_oil_tl] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 468 MovieClip [eo_p2] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "oil");
split();
this.unloadMovie();
}
}
}
function split() {
temp = _root.addObj("enemy_oil_tr", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
temp.vx = 1.5;
temp.vy = -3.5;
temp = _root.addObj("enemy_oil_br", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
temp.vx = 3;
temp.vy = -1;
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 467 MovieClip in Symbol 468 MovieClip [eo_p2] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 472 MovieClip [eo_p1] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "oil");
split();
this.unloadMovie();
}
}
}
function split() {
temp = _root.addObj("enemy_oil_tl", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
temp.vx = -1.5;
temp.vy = -3.5;
temp = _root.addObj("enemy_oil_bl", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
temp.vx = -3;
temp.vy = -1;
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 471 MovieClip in Symbol 472 MovieClip [eo_p1] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 476 MovieClip [enemy_oil_br] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "oil");
vy = vy * -0.65;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 475 MovieClip in Symbol 476 MovieClip [enemy_oil_br] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 480 MovieClip [enemy_oil_bl] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "oil");
vy = vy * -0.65;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 479 MovieClip in Symbol 480 MovieClip [enemy_oil_bl] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 483 MovieClip [ep_br] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "blood");
vy = vy * -0.65;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 482 MovieClip in Symbol 483 MovieClip [ep_br] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 484 MovieClip [ep_tr] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "blood");
vy = vy * -0.65;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 482 MovieClip in Symbol 484 MovieClip [ep_tr] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 485 MovieClip [ep_right] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "blood");
split();
this.unloadMovie();
}
}
}
function split() {
temp = _root.addObj("ep_tr", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
temp.vx = 1.5;
temp.vy = -3.5;
temp.bod.gotoAndStop(pcolor);
temp = _root.addObj("ep_br", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
temp.vx = 3;
temp.vy = -1;
temp.bod.gotoAndStop(pcolor);
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 482 MovieClip in Symbol 485 MovieClip [ep_right] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 486 MovieClip [ep_tl] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "blood");
vy = vy * -0.65;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 482 MovieClip in Symbol 486 MovieClip [ep_tl] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 487 MovieClip [ep_bl] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "blood");
vy = vy * -0.65;
fly_count = 30;
}
}
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 482 MovieClip in Symbol 487 MovieClip [ep_bl] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 488 MovieClip [ep_left] Frame 1
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((fly_count--) < 0) {
testHitEnemies();
testHitHero();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((mom != ene) && (ene.body.hitTest(_x, _y, 1))) {
ene.placeSplat(_x, _y, vx, vy, _xscale, "blood");
split();
this.unloadMovie();
}
}
}
function split() {
temp = _root.addObj("ep_tl", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
temp.vx = -1.5;
temp.vy = -3.5;
temp.bod.gotoAndStop(pcolor);
temp = _root.addObj("ep_bl", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
temp.vx = -3;
temp.vy = -1;
temp.bod.gotoAndStop(pcolor);
}
function testHitHero() {
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_root.cupid.hurt(5);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
fly_count = 10;
Instance of Symbol 482 MovieClip in Symbol 488 MovieClip [ep_left] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 490 MovieClip in Symbol 491 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 499 MovieClip [enemy_norm_white] Frame 1
function step() {
if (vx > max_speed) {
vx = vx - 0.05;
}
if (hp <= 0) {
vy = vy + _root.gravity;
if ((timeToNextHit++) > 30) {
testHitEnemies();
}
}
xprev = _x;
yprev = _y;
_x = (_x + vx);
_y = (_y + vy);
xpos = _x;
ypos = _y;
if ((_x < -20) || (_y > (_root.g_ground + 20))) {
if (_x < -20) {
_root.cupid.hurt(5);
}
_root.removeEnemy(this);
} else if (_y > 425) {
deathExplosion();
_root.removeEnemy(this);
}
if ((hp < max_hp) && (blood_pool._y > 10.5)) {
blood_pool._y = blood_pool._y - 0.1;
}
if (on_fire) {
if ((onFireCount++) > 20) {
onFireCount = 0;
hp--;
}
}
}
function takeDamage(atype, x, y, avx, avy, rot) {
_root.playSound("hit.wav");
vx = avx * 0.2;
if (atype == "arrow_norm") {
hp = hp - 1;
} else if (atype == "arrow_fire") {
hp = hp - 1;
setFire();
} else if (atype == "arrow_ice") {
setIce();
} else if (atype == "arrow_bomb") {
deathExplosion();
_root.removeEnemy(this);
}
if (hp < -5) {
_root.bloodExplosion(_x, _y, "blood");
quadSplit();
_root.removeEnemy(this);
} else if (hp < -3) {
_root.bloodExplosion(_x, _y, "blood");
dualSplit();
_root.removeEnemy(this);
} else {
stickArrow(x, y, avx, avy, rot);
}
}
function dualSplit() {
temp = _root.addObj("ep_right", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x + 5;
temp._y = _y;
temp.vx = 3;
temp.vy = -2;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
temp = _root.addObj("ep_left", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x - 5;
temp._y = _y;
temp.vx = -3;
temp.vy = -2;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
}
function quadSplit() {
temp = _root.addObj("ep_tl", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x - 5;
temp._y = _y - 5;
temp.vx = -1.5;
temp.vy = -3.5;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
temp = _root.addObj("ep_tr", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x + 5;
temp._y = _y - 5;
temp.vx = 1.5;
temp.vy = -3.5;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
temp = _root.addObj("ep_bl", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x - 5;
temp._y = _y + 5;
temp.vx = -3;
temp.vy = -1;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
temp = _root.addObj("ep_br", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x + 5;
temp._y = _y + 5;
temp.vx = 3;
temp.vy = -1;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
}
function stickArrow(x, y, avx, avy, rot) {
dx = x - _x;
dy = y - _y;
proj = null;
if (on_fire) {
proj = _root.addObj("proj_flame", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
} else if (on_ice) {
proj = _root.addObj("proj_ice", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
} else {
temp = _root.addObj("arrow_stuck", stuck_arrow_layer, getNextArrowLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj("blood_drip", blood_layer, getNextBloodLevel());
temp._x = dx;
temp._y = dy;
temp._xscale = (temp._yscale = random(100) + 50);
proj = _root.addObj("blood_drop", _root.debris_bg_layer, _root.getNextDebrisBGLevel());
proj._xscale = (proj._yscale = random(150) + 150);
proj.btype = "blood";
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
temp = _root.addObj("arrow_stuck_back", stuck_arrow_back_layer, getNextArrowBackLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj("blood_gusher", stuck_arrow_back_layer, getNextArrowBackLevel());
temp._x = dx;
temp._y = dy;
temp.vx = avx;
temp.vy = avy;
temp.btype = "blood";
}
}
function placeSplat(x, y, avx, avy, scale, hitby) {
_root.addHitCombo();
dx = x - _x;
dy = y - _y;
if (hitby == "blood") {
temp = _root.addObj("blood_splat", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "rock") {
hp = -10;
_root.bloodExplosion(_x, _y, "blood");
temp = _root.addObj("blood_splash", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "oil") {
if (on_fire) {
_root.projExplosion("proj_flame", _x, _y, 2);
_root.removeEnemy(this);
} else {
temp = _root.addObj("blood_splash", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = random(100) + 50);
temp._color = "black";
oilCount++;
}
} else if (hitby == "flame") {
setFire();
} else if (hitby == "ice") {
if (on_ice) {
deathExplosion();
_root.removeEnemy(this);
} else {
setIce();
}
}
}
function flameOn() {
on_fire = true;
temp = _root.addObj("flame_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 100;
temp = _root.addObj("flame_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 50;
}
function iceOn() {
on_ice = true;
vx = origvx * 0.2;
max_speed = vx;
temp = _root.addObj("ice_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 50;
}
function iceOff() {
on_ice = false;
max_speed = origvx;
temp = _root.addObj("ice_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 50;
}
function flameOff() {
on_fire = false;
temp = _root.addObj("flame_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 100;
temp = _root.addObj("flame_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 50;
}
function setFire() {
if (on_ice) {
iceOff();
} else if (!on_fire) {
flameOn();
if (oilCount > 0) {
amt = oilCount * 2;
hp = hp - oilCount;
if (amt > 7) {
amt = 7;
}
_root.projExplosion("proj_flame", _x, _y, amt);
if (oilCount > 1) {
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.removeEnemy(this);
} else {
oilCount = 0;
}
}
}
}
function setIce() {
if (on_fire) {
flameOff();
} else if (!on_ice) {
iceOn();
}
}
function getNextArrowLevel() {
if ((arrow_lvl++) > 3) {
arrow_lvl = 1;
}
return(arrow_lvl);
}
function getNextArrowBackLevel() {
if ((arrow_back_lvl++) > 3) {
arrow_back_lvl = 1;
}
return(arrow_back_lvl);
}
function getNextSplatLevel() {
if ((splat_lvl++) > 3) {
splat_lvl = 1;
}
return(splat_lvl);
}
function getNextBloodLevel() {
if ((blood_lvl++) > 3) {
blood_lvl = 1;
}
return(blood_lvl);
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((ene != this) && (ene.body.hitTest(body))) {
if (ene._y < _y) {
ene.vy = -3;
} else {
vy = -3;
}
hp = 0;
ene.hp = 0;
ene.vx = ene.vx * ((random(100) - 50) / 20);
vx = vx * ((random(100) - 50) / 20);
if (ene.on_ice) {
ene.deathExplosion();
_root.removeEnemy(ene);
} else {
ene.vx = ene.vx * ((random(100) - 50) / 40);
if (on_fire) {
ene.setFire();
} else if (on_ice) {
ene.setIce();
}
ene.timeToNextHit = 0;
}
deathExplosion();
timeToNextHit = 0;
_root.removeEnemy(this);
}
}
}
function deathExplosion() {
if (on_fire) {
_root.playSound("bomb.wav");
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.projExplosion("proj_flame", _x, _y, 4);
} else if (on_ice) {
_root.playSound("ice_shatter.wav");
_root.projExplosion("proj_ice", _x, _y, 4);
} else {
_root.playSound("blood_splat.wav");
_root.bloodExplosion(_x, _y, "blood");
dualSplit();
}
_root.g_lvl_kills++;
_root.addHitCombo();
}
max_hp = 2 + Math.floor(_root.level * 0.2);
hp = max_hp;
timeToNextHit = 0;
xprev = _x;
yprev = _y;
origvx = vx;
oilCount = 0;
on_fire = false;
on_ice = false;
onFireCount = 0;
max_speed = origvx;
pcolor = "white";
arrow_lvl = 1;
arrow_back_lvl = 1;
splat_lvl = 1;
blood_lvl = 1;
Instance of Symbol 493 MovieClip in Symbol 499 MovieClip [enemy_norm_white] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 498 MovieClip "body" in Symbol 499 MovieClip [enemy_norm_white] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 500 MovieClip [enemy_norm] Frame 1
function step() {
if (vx > max_speed) {
vx = vx - 0.05;
}
if (hp <= 0) {
vy = vy + _root.gravity;
if ((timeToNextHit++) > 30) {
testHitEnemies();
}
}
xprev = _x;
yprev = _y;
_x = (_x + vx);
_y = (_y + vy);
xpos = _x;
ypos = _y;
if ((_x < -20) || (_y > (_root.g_ground + 20))) {
if (_x < -20) {
_root.cupid.hurt(5);
}
_root.removeEnemy(this);
} else if (_y > 425) {
deathExplosion();
_root.removeEnemy(this);
}
if ((hp < max_hp) && (blood_pool._y > 10.5)) {
blood_pool._y = blood_pool._y - 0.1;
}
if (on_fire) {
if ((onFireCount++) > 20) {
onFireCount = 0;
hp--;
}
}
}
function takeDamage(atype, x, y, avx, avy, rot) {
_root.playSound("hit.wav");
vx = avx * 0.2;
if (atype == "arrow_norm") {
hp = hp - 1;
} else if (atype == "arrow_fire") {
hp = hp - 1;
setFire();
} else if (atype == "arrow_ice") {
setIce();
} else if (atype == "arrow_bomb") {
deathExplosion();
_root.removeEnemy(this);
}
if (hp < -5) {
_root.bloodExplosion(_x, _y, "blood");
quadSplit();
_root.removeEnemy(this);
} else if (hp < -3) {
_root.bloodExplosion(_x, _y, "blood");
dualSplit();
_root.removeEnemy(this);
} else {
stickArrow(x, y, avx, avy, rot);
}
}
function dualSplit() {
temp = _root.addObj("ep_right", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x + 5;
temp._y = _y;
temp.vx = 3;
temp.vy = -2;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
temp = _root.addObj("ep_left", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x - 5;
temp._y = _y;
temp.vx = -3;
temp.vy = -2;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
}
function quadSplit() {
temp = _root.addObj("ep_tl", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x - 5;
temp._y = _y - 5;
temp.vx = -1.5;
temp.vy = -3.5;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
temp = _root.addObj("ep_tr", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x + 5;
temp._y = _y - 5;
temp.vx = 1.5;
temp.vy = -3.5;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
temp = _root.addObj("ep_bl", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x - 5;
temp._y = _y + 5;
temp.vx = -3;
temp.vy = -1;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
temp = _root.addObj("ep_br", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x + 5;
temp._y = _y + 5;
temp.vx = 3;
temp.vy = -1;
temp.bod.gotoAndStop(pcolor);
temp.pcolor = pcolor;
}
function stickArrow(x, y, avx, avy, rot) {
dx = x - _x;
dy = y - _y;
proj = null;
if (on_fire) {
proj = _root.addObj("proj_flame", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
} else if (on_ice) {
proj = _root.addObj("proj_ice", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
} else {
temp = _root.addObj("arrow_stuck", stuck_arrow_layer, getNextArrowLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj("blood_drip", blood_layer, getNextBloodLevel());
temp._x = dx;
temp._y = dy;
temp._xscale = (temp._yscale = random(100) + 50);
proj = _root.addObj("blood_drop", _root.debris_bg_layer, _root.getNextDebrisBGLevel());
proj._xscale = (proj._yscale = random(150) + 150);
proj.btype = "blood";
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
temp = _root.addObj("arrow_stuck_back", stuck_arrow_back_layer, getNextArrowBackLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj("blood_gusher", stuck_arrow_back_layer, getNextArrowBackLevel());
temp._x = dx;
temp._y = dy;
temp.vx = avx;
temp.vy = avy;
temp.btype = "blood";
}
}
function placeSplat(x, y, avx, avy, scale, hitby) {
_root.addHitCombo();
dx = x - _x;
dy = y - _y;
if (hitby == "blood") {
temp = _root.addObj("blood_splat", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "rock") {
hp = -10;
_root.bloodExplosion(_x, _y, "blood");
temp = _root.addObj("blood_splash", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "oil") {
if (on_fire) {
_root.projExplosion("proj_flame", _x, _y, 2);
_root.removeEnemy(this);
} else {
temp = _root.addObj("blood_splash", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = random(100) + 50);
temp._color = "black";
oilCount++;
}
} else if (hitby == "flame") {
setFire();
} else if (hitby == "ice") {
if (on_ice) {
deathExplosion();
_root.removeEnemy(this);
} else {
setIce();
}
}
}
function flameOn() {
on_fire = true;
temp = _root.addObj("flame_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 100;
temp = _root.addObj("flame_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 50;
}
function iceOn() {
on_ice = true;
vx = origvx * 0.2;
max_speed = vx;
temp = _root.addObj("ice_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 50;
}
function iceOff() {
on_ice = false;
max_speed = origvx;
temp = _root.addObj("ice_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 50;
}
function flameOff() {
on_fire = false;
temp = _root.addObj("flame_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 100;
temp = _root.addObj("flame_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 50;
}
function setFire() {
if (on_ice) {
iceOff();
} else if (!on_fire) {
flameOn();
if (oilCount > 0) {
amt = oilCount * 2;
hp = hp - oilCount;
if (amt > 7) {
amt = 7;
}
_root.projExplosion("proj_flame", _x, _y, amt);
if (oilCount > 1) {
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.removeEnemy(this);
} else {
oilCount = 0;
}
}
}
}
function setIce() {
if (on_fire) {
flameOff();
} else if (!on_ice) {
iceOn();
}
}
function getNextArrowLevel() {
if ((arrow_lvl++) > 3) {
arrow_lvl = 1;
}
return(arrow_lvl);
}
function getNextArrowBackLevel() {
if ((arrow_back_lvl++) > 3) {
arrow_back_lvl = 1;
}
return(arrow_back_lvl);
}
function getNextSplatLevel() {
if ((splat_lvl++) > 3) {
splat_lvl = 1;
}
return(splat_lvl);
}
function getNextBloodLevel() {
if ((blood_lvl++) > 3) {
blood_lvl = 1;
}
return(blood_lvl);
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((ene != this) && (ene.body.hitTest(body))) {
if (ene._y < _y) {
ene.vy = -3;
} else {
vy = -3;
}
hp = 0;
ene.hp = 0;
ene.vx = ene.vx * ((random(100) - 50) / 20);
vx = vx * ((random(100) - 50) / 20);
if (ene.on_ice) {
ene.deathExplosion();
_root.removeEnemy(ene);
} else {
ene.vx = ene.vx * ((random(100) - 50) / 40);
if (on_fire) {
ene.setFire();
} else if (on_ice) {
ene.setIce();
}
ene.timeToNextHit = 0;
}
deathExplosion();
timeToNextHit = 0;
_root.removeEnemy(this);
}
}
}
function deathExplosion() {
if (on_fire) {
_root.playSound("bomb.wav");
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.projExplosion("proj_flame", _x, _y, 4);
} else if (on_ice) {
_root.playSound("ice_shatter.wav");
_root.projExplosion("proj_ice", _x, _y, 4);
} else {
_root.playSound("blood_splat.wav");
_root.bloodExplosion(_x, _y, "blood");
dualSplit();
}
_root.g_lvl_kills++;
_root.addHitCombo();
}
max_hp = 2 + Math.floor(_root.level * 0.2);
hp = max_hp;
timeToNextHit = 0;
xprev = _x;
yprev = _y;
origvx = vx;
oilCount = 0;
on_fire = false;
on_ice = false;
onFireCount = 0;
max_speed = origvx;
pcolor = "pink";
arrow_lvl = 1;
arrow_back_lvl = 1;
splat_lvl = 1;
blood_lvl = 1;
Instance of Symbol 498 MovieClip in Symbol 500 MovieClip [enemy_norm] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 498 MovieClip "body" in Symbol 500 MovieClip [enemy_norm] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 507 MovieClip [enemy_candy3] Frame 1
function step() {
if (hp <= 0) {
vy = vy + _root.gravity;
if ((timeToNextHit++) > 30) {
testHitEnemies();
}
}
xprev = _x;
yprev = _y;
_x = (_x + vx);
_y = (_y + vy);
xpos = _x;
ypos = _y;
if ((_x < -20) || (_y > (_root.g_ground + 20))) {
if (_x < -20) {
_root.cupid.hurt(10);
}
_root.removeEnemy(this);
} else if (_y > 425) {
deathExplosion();
_root.removeEnemy(this);
}
if ((hp < max_hp) && (blood_pool._y > 10.5)) {
blood_pool._y = blood_pool._y - 0.1;
}
if (on_fire) {
if ((onFireCount++) > 40) {
onFireCount = 0;
hp--;
}
}
}
function takeDamage(atype, x, y, avx, avy, rot) {
_root.playSound("bomb.wav");
hp = hp - 1;
stickArrow(x, y, avx, avy, rot);
if (atype == "arrow_norm") {
hp = hp - 1;
} else if (atype == "arrow_fire") {
hp = hp - 1;
setFire();
} else if (atype == "arrow_ice") {
setIce();
} else if (atype == "arrow_bomb") {
deathExplosion();
_root.removeEnemy(this);
}
}
function getRandomScratch() {
return(scratches[random(scratches.length)]);
}
function stickArrow(x, y, avx, avy, rot) {
dx = x - _x;
dy = y - _y;
temp = _root.addObj("arrow_stuck", stuck_arrow_layer, getNextArrowLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj(getRandomScratch(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
proj = null;
if (on_fire) {
proj = _root.addObj("proj_flame", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
} else if (on_ice) {
proj = _root.addObj("proj_ice", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
} else {
proj = _root.addObj("proj_rock_yellow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 50);
}
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
}
function getBloodSplash() {
return(bloodSplashes[random(bloodSplashes.length)]);
}
function placeSplat(x, y, avx, avy, scale, hitby) {
_root.addHitCombo();
dx = x - _x;
dy = y - _y;
if (hitby == "blood") {
temp = _root.addObj(getBloodSplash(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "rock") {
hp = hp - 5;
temp = _root.addObj(getRandomScratch(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "oil") {
if (on_fire) {
_root.projExplosion("proj_flame", _x, _y, 2);
hp = hp - 5;
} else {
temp = _root.addObj("blood_splash", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = random(100) + 50);
temp._color = "black";
oilCount++;
}
} else if (hitby == "flame") {
setFire();
if (oilCount > 0) {
amt = oilCount;
if (amt > 6) {
amt = 6;
}
_root.projExplosion("proj_flame", _x, _y, amt);
if (oilCount > 5) {
temp = _root.addObj("yellow_cloud", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.removeEnemy(this);
} else {
oilCount = 0;
hp = hp - (2 * oilCount);
}
}
} else if (hitby == "ice") {
if (on_ice) {
deathExplosion();
_root.removeEnemy(this);
} else {
setIce();
}
}
}
function flameOn() {
on_fire = true;
temp = _root.addObj("flame_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 100;
temp._y;
temp = _root.addObj("flame_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 50;
temp._y = -4;
}
function flameOff() {
on_fire = false;
temp = _root.addObj("flame_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 100;
temp._y = -4;
temp = _root.addObj("flame_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 50;
temp._y = -4;
}
function iceOn() {
on_ice = true;
vx = origvx * 0.2;
max_speed = vx;
temp = _root.addObj("ice_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 50;
}
function iceOff() {
on_ice = false;
max_speed = origvx;
vx = max_speed;
temp = _root.addObj("ice_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 50;
}
function setFire() {
if (on_ice) {
iceOff();
} else if (!on_fire) {
flameOn();
if (oilCount > 0) {
amt = oilCount * 2;
hp = hp - oilCount;
if (amt > 7) {
amt = 7;
}
_root.projExplosion("proj_flame", _x, _y, amt);
if (oilCount > 3) {
_root.removeEnemy(this);
} else {
oilCount = 0;
}
}
}
}
function setIce() {
if (on_fire) {
flameOff();
} else if (!on_ice) {
iceOn();
}
}
function getNextArrowLevel() {
if ((arrow_lvl++) > 20) {
arrow_lvl = 1;
}
return(arrow_lvl);
}
function getNextArrowBackLevel() {
if ((arrow_back_lvl++) > 20) {
arrow_back_lvl = 1;
}
return(arrow_back_lvl);
}
function getNextSplatLevel() {
if ((splat_lvl++) > 20) {
splat_lvl = 1;
}
return(splat_lvl);
}
function getNextBloodLevel() {
if ((blood_lvl++) > 20) {
blood_lvl = 1;
}
return(blood_lvl);
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((ene != this) && (ene.body.hitTest(body))) {
if (ene._y < _y) {
ene.vy = -3;
} else {
vy = -3;
}
hp = 0;
ene.hp = 0;
ene.vx = ene.vx * ((random(100) - 50) / 20);
vx = vx * ((random(100) - 50) / 20);
if (ene.on_ice) {
ene.deathExplosion();
_root.removeEnemy(ene);
} else {
ene.vx = ene.vx * ((random(100) - 50) / 40);
if (on_fire) {
ene.setFire();
} else if (on_ice) {
ene.setIce();
}
ene.timeToNextHit = 0;
}
deathExplosion();
timeToNextHit = 0;
_root.removeEnemy(this);
}
}
}
function deathExplosion() {
if (on_fire) {
_root.playSound("bomb_hit.wav");
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.projExplosion("proj_flame", _x, _y, 4);
} else if (on_ice) {
_root.playSound("ice_shatter.wav");
_root.projExplosion("proj_ice", _x, _y, 4);
} else {
_root.playSound("bomb.wav");
_root.projExplosion("proj_rock_yellow", _x, _y, 5);
}
temp = _root.addObj("yellow_cloud", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.g_lvl_kills++;
_root.addHitCombo();
}
max_hp = 5 + Math.floor(_root.level * 0.5);
hp = max_hp;
timeToNextHit = 0;
xprev = _x;
yprev = _y;
origvx = vx;
on_fire = false;
on_ice = false;
onFireCount = 0;
max_speed = origvx;
scratches = new Array("heart_candy3_ghit1", "heart_candy3_ghit2", "heart_candy3_ghit3");
bloodSplashes = new Array("blood_splat", "blood_splat");
arrow_lvl = 1;
arrow_back_lvl = 1;
splat_lvl = 1;
blood_lvl = 1;
Instance of Symbol 504 MovieClip in Symbol 507 MovieClip [enemy_candy3] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 506 MovieClip "body" in Symbol 507 MovieClip [enemy_candy3] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 512 MovieClip [enemy_candy2] Frame 1
function step() {
if (hp <= 0) {
vy = vy + _root.gravity;
if ((timeToNextHit++) > 30) {
testHitEnemies();
}
}
xprev = _x;
yprev = _y;
_x = (_x + vx);
_y = (_y + vy);
xpos = _x;
ypos = _y;
if ((_x < -20) || (_y > (_root.g_ground + 20))) {
if (_x < -20) {
_root.cupid.hurt(7);
}
_root.removeEnemy(this);
} else if (_y > 425) {
deathExplosion();
_root.removeEnemy(this);
}
if ((hp < max_hp) && (blood_pool._y > 10.5)) {
blood_pool._y = blood_pool._y - 0.1;
}
if (on_fire) {
if ((onFireCount++) > 20) {
onFireCount = 0;
hp--;
}
}
}
function takeDamage(atype, x, y, avx, avy, rot) {
_root.playSound("bomb.wav");
hp = hp - 1;
stickArrow(x, y, avx, avy, rot);
if (atype == "arrow_norm") {
hp = hp - 1;
} else if (atype == "arrow_fire") {
hp = hp - 1;
setFire();
} else if (atype == "arrow_ice") {
setIce();
} else if (atype == "arrow_bomb") {
deathExplosion();
_root.removeEnemy(this);
}
}
function getRandomScratch() {
return(scratches[random(scratches.length)]);
}
function stickArrow(x, y, avx, avy, rot) {
dx = x - _x;
dy = y - _y;
temp = _root.addObj("arrow_stuck", stuck_arrow_layer, getNextArrowLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj(getRandomScratch(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
proj = null;
if (on_fire) {
proj = _root.addObj("proj_flame", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
} else if (on_ice) {
proj = _root.addObj("proj_ice", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
} else {
proj = _root.addObj("proj_rock_pink", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 50);
}
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
}
function getBloodSplash() {
return(bloodSplashes[random(bloodSplashes.length)]);
}
function placeSplat(x, y, avx, avy, scale, hitby) {
_root.addHitCombo();
dx = x - _x;
dy = y - _y;
if (hitby == "blood") {
temp = _root.addObj(getBloodSplash(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "rock") {
hp = hp - 5;
temp = _root.addObj(getRandomScratch(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "oil") {
if (on_fire) {
_root.projExplosion("proj_flame", _x, _y, 2);
hp = hp - 5;
} else {
temp = _root.addObj("blood_splash", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = random(100) + 50);
temp._color = "black";
oilCount++;
}
} else if (hitby == "flame") {
setFire();
if (oilCount > 0) {
amt = oilCount;
if (amt > 6) {
amt = 6;
}
_root.projExplosion("proj_flame", _x, _y, amt);
if (oilCount > 5) {
temp = _root.addObj("pink_cloud", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.removeEnemy(this);
} else {
oilCount = 0;
hp = hp - (2 * oilCount);
}
}
} else if (hitby == "ice") {
if (on_ice) {
deathExplosion();
_root.removeEnemy(this);
} else {
setIce();
}
}
}
function flameOn() {
on_fire = true;
temp = _root.addObj("flame_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 100;
temp._y;
temp = _root.addObj("flame_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 50;
temp._y = -4;
}
function flameOff() {
on_fire = false;
temp = _root.addObj("flame_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 100;
temp._y = -4;
temp = _root.addObj("flame_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 50;
temp._y = -4;
}
function iceOn() {
on_ice = true;
vx = origvx * 0.2;
max_speed = vx;
temp = _root.addObj("ice_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 50;
}
function iceOff() {
on_ice = false;
max_speed = origvx;
vx = max_speed;
temp = _root.addObj("ice_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 50;
}
function setFire() {
if (on_ice) {
iceOff();
} else if (!on_fire) {
flameOn();
if (oilCount > 0) {
amt = oilCount * 2;
hp = hp - oilCount;
if (amt > 7) {
amt = 7;
}
_root.projExplosion("proj_flame", _x, _y, amt);
if (oilCount > 3) {
_root.removeEnemy(this);
} else {
oilCount = 0;
}
}
}
}
function setIce() {
if (on_fire) {
flameOff();
} else if (!on_ice) {
iceOn();
}
}
function getNextArrowLevel() {
if ((arrow_lvl++) > 20) {
arrow_lvl = 1;
}
return(arrow_lvl);
}
function getNextArrowBackLevel() {
if ((arrow_back_lvl++) > 20) {
arrow_back_lvl = 1;
}
return(arrow_back_lvl);
}
function getNextSplatLevel() {
if ((splat_lvl++) > 20) {
splat_lvl = 1;
}
return(splat_lvl);
}
function getNextBloodLevel() {
if ((blood_lvl++) > 20) {
blood_lvl = 1;
}
return(blood_lvl);
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((ene != this) && (ene.body.hitTest(body))) {
if (ene._y < _y) {
ene.vy = -3;
} else {
vy = -3;
}
hp = 0;
ene.hp = 0;
ene.vx = ene.vx * ((random(100) - 50) / 20);
vx = vx * ((random(100) - 50) / 20);
if (ene.on_ice) {
ene.deathExplosion();
_root.removeEnemy(ene);
} else {
ene.vx = ene.vx * ((random(100) - 50) / 40);
if (on_fire) {
ene.setFire();
} else if (on_ice) {
ene.setIce();
}
ene.timeToNextHit = 0;
}
deathExplosion();
timeToNextHit = 0;
_root.removeEnemy(this);
}
}
}
function deathExplosion() {
if (on_fire) {
_root.playSound("bomb_hit.wav");
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.projExplosion("proj_flame", _x, _y, 4);
} else if (on_ice) {
ammo = _root.addObj("ammo_ice", _root.enemy_layer, _root.getNextEnemyLevel());
ammo._x = _x;
ammo._y = _y;
_root.playSound("ice_shatter.wav");
_root.projExplosion("proj_ice", _x, _y, 4);
} else {
_root.playSound("bomb.wav");
_root.projExplosion("proj_rock_pink", _x, _y, 5);
}
temp = _root.addObj("pink_cloud", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.g_lvl_kills++;
_root.addHitCombo();
}
max_hp = 4 + Math.floor(_root.level * 0.4);
hp = max_hp;
timeToNextHit = 0;
xprev = _x;
yprev = _y;
origvx = vx;
on_fire = false;
on_ice = false;
onFireCount = 0;
max_speed = origvx;
scratches = new Array("heart_candy2_ghit1", "heart_candy2_ghit2", "heart_candy2_ghit3");
bloodSplashes = new Array("blood_splat", "blood_splat");
arrow_lvl = 1;
arrow_back_lvl = 1;
splat_lvl = 1;
blood_lvl = 1;
Instance of Symbol 511 MovieClip in Symbol 512 MovieClip [enemy_candy2] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 506 MovieClip "body" in Symbol 512 MovieClip [enemy_candy2] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 518 MovieClip [enemy_candy] Frame 1
function step() {
if (hp <= 0) {
vy = vy + _root.gravity;
if ((timeToNextHit++) > 30) {
testHitEnemies();
}
}
xprev = _x;
yprev = _y;
_x = (_x + vx);
_y = (_y + vy);
xpos = _x;
ypos = _y;
if ((_x < -20) || (_y > (_root.g_ground + 20))) {
if (_x < -20) {
_root.cupid.hurt(12);
}
_root.removeEnemy(this);
} else if (_y > 425) {
deathExplosion();
_root.removeEnemy(this);
}
if ((hp < max_hp) && (blood_pool._y > 10.5)) {
blood_pool._y = blood_pool._y - 0.1;
}
if (on_fire) {
if ((onFireCount++) > 15) {
onFireCount = 0;
hp--;
}
}
}
function takeDamage(atype, x, y, avx, avy, rot) {
_root.playSound("bomb.wav");
hp = hp - 1;
stickArrow(x, y, avx, avy, rot);
if (atype == "arrow_norm") {
hp = hp - 1;
} else if (atype == "arrow_fire") {
hp = hp - 1;
setFire();
} else if (atype == "arrow_ice") {
setIce();
} else if (atype == "arrow_bomb") {
deathExplosion();
_root.removeEnemy(this);
}
}
function getRandomScratch() {
return(scratches[random(scratches.length)]);
}
function stickArrow(x, y, avx, avy, rot) {
dx = x - _x;
dy = y - _y;
temp = _root.addObj("arrow_stuck", stuck_arrow_layer, getNextArrowLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj(getRandomScratch(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
proj = null;
if (on_fire) {
proj = _root.addObj("proj_flame", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
} else if (on_ice) {
proj = _root.addObj("proj_ice", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
} else {
proj = _root.addObj("proj_rock_green", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 50);
}
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
}
function getBloodSplash() {
return(bloodSplashes[random(bloodSplashes.length)]);
}
function placeSplat(x, y, avx, avy, scale, hitby) {
_root.addHitCombo();
dx = x - _x;
dy = y - _y;
if (hitby == "blood") {
temp = _root.addObj(getBloodSplash(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "rock") {
hp = hp - 5;
temp = _root.addObj(getRandomScratch(), splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "oil") {
if (on_fire) {
_root.projExplosion("proj_flame", _x, _y, 2);
hp = hp - 5;
} else {
temp = _root.addObj("blood_splash", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = random(100) + 50);
temp._color = "black";
oilCount++;
}
} else if (hitby == "flame") {
setFire();
if (oilCount > 0) {
amt = oilCount;
if (amt > 6) {
amt = 6;
}
_root.projExplosion("proj_flame", _x, _y, amt);
if (oilCount > 5) {
temp = _root.addObj("green_cloud", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.removeEnemy(this);
} else {
oilCount = 0;
hp = hp - (2 * oilCount);
}
}
} else if (hitby == "ice") {
if (on_ice) {
deathExplosion();
_root.removeEnemy(this);
} else {
setIce();
}
}
}
function flameOn() {
on_fire = true;
temp = _root.addObj("flame_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 100;
temp._y = -4;
temp = _root.addObj("flame_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 50;
temp._y = -4;
}
function flameOff() {
on_fire = false;
temp = _root.addObj("flame_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 100;
temp._y = -4;
temp = _root.addObj("flame_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 105);
temp.targetAlph = 50;
temp._y = -4;
}
function iceOn() {
on_ice = true;
vx = origvx * 0.2;
max_speed = vx;
temp = _root.addObj("ice_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 50;
}
function iceOff() {
on_ice = false;
max_speed = origvx;
vx = max_speed;
temp = _root.addObj("ice_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 158);
temp.targetAlph = 50;
}
function setFire() {
if (on_ice) {
iceOff();
} else if (!on_fire) {
flameOn();
if (oilCount > 0) {
amt = oilCount * 2;
hp = hp - oilCount;
if (amt > 7) {
amt = 7;
}
_root.projExplosion("proj_flame", _x, _y, amt);
if (oilCount > 3) {
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.removeEnemy(this);
} else {
oilCount = 0;
}
}
}
}
function setIce() {
if (on_fire) {
flameOff();
} else if (!on_ice) {
iceOn();
}
}
function getNextArrowLevel() {
if ((arrow_lvl++) > 20) {
arrow_lvl = 1;
}
return(arrow_lvl);
}
function getNextArrowBackLevel() {
if ((arrow_back_lvl++) > 20) {
arrow_back_lvl = 1;
}
return(arrow_back_lvl);
}
function getNextSplatLevel() {
if ((splat_lvl++) > 20) {
splat_lvl = 1;
}
return(splat_lvl);
}
function getNextBloodLevel() {
if ((blood_lvl++) > 20) {
blood_lvl = 1;
}
return(blood_lvl);
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((ene != this) && (ene.body.hitTest(body))) {
if (ene._y < _y) {
ene.vy = -3;
} else {
vy = -3;
}
hp = 0;
ene.hp = 0;
ene.vx = ene.vx * ((random(100) - 50) / 20);
vx = vx * ((random(100) - 50) / 20);
if (ene.on_ice) {
ene.deathExplosion();
_root.removeEnemy(ene);
} else {
ene.vx = ene.vx * ((random(100) - 50) / 40);
if (on_fire) {
ene.setFire();
} else if (on_ice) {
ene.setIce();
}
ene.timeToNextHit = 0;
}
deathExplosion();
timeToNextHit = 0;
_root.removeEnemy(this);
}
}
}
function deathExplosion() {
if (on_fire) {
_root.playSound("bomb_hit.wav");
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.projExplosion("proj_flame", _x, _y, 4);
ammo = _root.addObj("ammo_fire", _root.enemy_layer, _root.getNextEnemyLevel());
ammo._x = _x;
ammo._y = _y;
} else if (on_ice) {
_root.playSound("ice_shatter.wav");
_root.projExplosion("proj_ice", _x, _y, 4);
} else {
_root.playSound("bomb.wav");
_root.projExplosion("proj_rock_green", _x, _y, 5);
}
temp = _root.addObj("green_cloud", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.g_lvl_kills++;
_root.addHitCombo();
}
max_hp = 6 + Math.floor(_root.level * 0.6);
hp = max_hp;
timeToNextHit = 0;
xprev = _x;
yprev = _y;
origvx = vx;
on_fire = false;
on_ice = false;
onFireCount = 0;
max_speed = origvx;
scratches = new Array("heart_candy_ghit1", "heart_candy_ghit2", "heart_candy_ghit3");
bloodSplashes = new Array("blood_splat", "blood_splat");
arrow_lvl = 1;
arrow_back_lvl = 1;
splat_lvl = 1;
blood_lvl = 1;
Instance of Symbol 516 MovieClip in Symbol 518 MovieClip [enemy_candy] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 506 MovieClip "body" in Symbol 518 MovieClip [enemy_candy] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 521 MovieClip [enemy_black] Frame 1
function step() {
if (vx > max_speed) {
vx = vx - 0.05;
}
if (hp <= 0) {
vy = vy + _root.gravity;
if ((timeToNextHit++) > 30) {
testHitEnemies();
}
}
xprev = _x;
yprev = _y;
_x = (_x + vx);
_y = (_y + vy);
xpos = _x;
ypos = _y;
if ((_x < -20) || (_y > (_root.g_ground + 20))) {
if (_x < -20) {
_root.cupid.hurt(7);
}
_root.removeEnemy(this);
} else if (_y > 425) {
deathExplosion();
_root.removeEnemy(this);
}
if ((hp < max_hp) && (blood_pool._y > 10.5)) {
blood_pool._y = blood_pool._y - 0.1;
}
if (on_fire) {
if ((onFireCount++) > 5) {
deathExplosion();
_root.removeEnemy(this);
}
}
}
function takeDamage(atype, x, y, avx, avy, rot) {
_root.playSound("hit.wav");
vx = avx * 0.2;
if (atype == "arrow_norm") {
hp = hp - 1;
} else if (atype == "arrow_fire") {
hp = hp - 1;
setFire();
} else if (atype == "arrow_ice") {
setIce();
} else if (atype == "arrow_bomb") {
deathExplosion();
_root.removeEnemy(this);
}
if (hp < -5) {
_root.bloodExplosion(_x, _y, "oil");
dualSplit();
_root.removeEnemy(this);
} else if (hp < -3) {
_root.bloodExplosion(_x, _y, "oil");
dualSplit();
_root.removeEnemy(this);
} else {
stickArrow(x, y, avx, avy, rot);
}
}
function setFire() {
if (on_ice) {
iceOff();
} else if (!on_fire) {
flameOn();
}
}
function setIce() {
if (on_fire) {
flameOff();
} else if (!on_ice) {
iceOn();
}
}
function stickArrow(x, y, avx, avy, rot) {
dx = x - _x;
dy = y - _y;
proj = null;
if (on_fire) {
proj = _root.addObj("proj_flame", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
} else if (on_ice) {
proj = _root.addObj("proj_ice", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
proj._xscale = (proj._yscale = random(100) + 100);
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
} else {
temp = _root.addObj("arrow_stuck", stuck_arrow_layer, getNextArrowLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj("blood_drip", blood_layer, getNextBloodLevel());
temp._x = dx;
temp._y = dy;
temp._xscale = (temp._yscale = random(100) + 50);
temp._color = "black";
proj = _root.addObj("blood_drop", _root.debris_bg_layer, _root.getNextDebrisBGLevel());
proj._xscale = (proj._yscale = random(150) + 150);
proj.btype = "oil";
proj._color = "black";
proj._x = x;
proj._y = y;
proj.vx = avx * 0.3;
proj.vy = avy * 0.3;
proj.mom = this;
temp = _root.addObj("arrow_stuck_back", stuck_arrow_back_layer, getNextArrowBackLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = rot;
temp = _root.addObj("blood_gusher", stuck_arrow_back_layer, getNextArrowBackLevel());
temp._x = dx;
temp._y = dy;
temp.vx = avx;
temp.vy = avy;
temp.btype = "oil";
}
}
function placeSplat(x, y, avx, avy, scale, hitby) {
_root.addHitCombo();
dx = x - _x;
dy = y - _y;
if (hitby == "blood") {
temp = _root.addObj("blood_splat", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
} else if (hitby == "flame") {
if (!on_fire) {
setFire();
}
} else if (hitby == "rock") {
hp = -10;
if (on_fire) {
_root.projExplosion(x, y, "proj_flame", 1);
} else {
_root.bloodExplosion(x, y, "oil");
temp = _root.addObj("blood_splash", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
temp._color = "black";
}
} else if (hitby == "oil") {
if (on_fire) {
_root.projExplosion(x, y, "proj_flame", 4);
} else {
temp = _root.addObj("blood_splat", splat_layer, getNextSplatLevel());
temp._x = dx;
temp._y = dy;
temp._rotation = random(360);
temp._xscale = (temp._yscale = scale + 50);
temp._color = "black";
}
} else if (hitby == "ice") {
if (on_ice) {
deathExplosion();
_root.removeEnemy(this);
} else {
setIce();
}
}
}
function dualSplit() {
temp = _root.addObj("eo_p2", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x + 5;
temp._y = _y;
temp.vx = 3;
temp.vy = -2;
temp = _root.addObj("eo_p1", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x - 5;
temp._y = _y;
temp.vx = -3;
temp.vy = -2;
}
function flameOn() {
on_fire = true;
temp = _root.addObj("flame_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 100;
temp = _root.addObj("flame_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 50;
}
function iceOn() {
on_ice = true;
vx = origvx * 0.2;
max_speed = vx;
temp = _root.addObj("ice_heart", flame_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart", flame2_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 50;
}
function iceOff() {
on_ice = false;
max_speed = origvx;
temp = _root.addObj("ice_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 100;
temp = _root.addObj("ice_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 100);
temp.targetAlph = 50;
}
function flameOff() {
on_fire = false;
temp = _root.addObj("flame_heart_fade", flame_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 100;
temp = _root.addObj("flame_heart_fade", flame2_layer, 1);
temp._xscale = (temp._yscale = 65);
temp.targetAlph = 50;
}
function getNextArrowLevel() {
if ((arrow_lvl++) > 3) {
arrow_lvl = 1;
}
return(arrow_lvl);
}
function getNextArrowBackLevel() {
if ((arrow_back_lvl++) > 3) {
arrow_back_lvl = 1;
}
return(arrow_back_lvl);
}
function getNextSplatLevel() {
if ((splat_lvl++) > 3) {
splat_lvl = 1;
}
return(splat_lvl);
}
function getNextBloodLevel() {
if ((blood_lvl++) > 3) {
blood_lvl = 1;
}
return(blood_lvl);
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if ((ene != this) && (ene.body.hitTest(body))) {
if (ene._y < _y) {
ene.vy = -3;
} else {
vy = -3;
}
hp = 0;
ene.hp = 0;
if (ene.on_ice) {
ene.deathExplosion();
_root.removeEnemy(ene);
} else {
ene.vx = ene.vx * ((random(100) - 50) / 40);
if (on_fire) {
ene.setFire();
} else if (on_ice) {
ene.setIce();
}
ene.timeToNextHit = 0;
}
deathExplosion();
timeToNextHit = 0;
_root.removeEnemy(this);
}
}
}
function deathExplosion() {
if (on_fire) {
_root.playSound("bomb_hit.wav");
temp = _root.addObj("explosion_pow", _root.debris_fg_layer, _root.getNextDebrisFGLevel());
temp._x = _x;
temp._y = _y;
_root.projExplosion("proj_flame", _x, _y, 4);
} else if (on_ice) {
_root.playSound("ice_shatter.wav");
_root.projExplosion("proj_ice", _x, _y, 4);
} else {
_root.playSound("blood_splat.wav");
_root.bloodExplosion(_x, _y, "oil");
if (random(3) == 0) {
ammo = _root.addObj("ammo_bomb", _root.enemy_layer, _root.getNextEnemyLevel());
ammo._x = _x;
ammo._y = _y;
}
dualSplit();
}
_root.g_lvl_kills++;
_root.addHitCombo();
}
max_hp = 2 + Math.floor(_root.level * 0.2);
hp = max_hp;
timeToNextHit = 0;
xprev = _x;
yprev = _y;
origvx = vx;
on_fire = false;
on_ice = false;
onFireCount = 0;
max_speed = origvx;
arrow_lvl = 1;
arrow_back_lvl = 1;
splat_lvl = 1;
blood_lvl = 1;
Instance of Symbol 520 MovieClip in Symbol 521 MovieClip [enemy_black] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 498 MovieClip "body" in Symbol 521 MovieClip [enemy_black] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 525 MovieClip in Symbol 526 MovieClip [demo_msg] Frame 1
onClipEvent (load) {
_alpha = 0;
}
on (release) {
getURL ("http://www.lostvectors.com");
}
Symbol 529 MovieClip Frame 63
this.unloadMovie();
Symbol 536 MovieClip Frame 100
this.stop();
Symbol 537 MovieClip [blood_splat] Frame 1
function step() {
if ((count++) > 500) {
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.removeMovieClip();
}
}
}
Instance of Symbol 536 MovieClip in Symbol 537 MovieClip [blood_splat] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 540 MovieClip Frame 10
this.unloadMovie();
Symbol 541 MovieClip [blood_splash_fast] Frame 1
function step() {
anim.gotoAndStop(count++);
}
count = 1;
Instance of Symbol 540 MovieClip "anim" in Symbol 541 MovieClip [blood_splash_fast] Frame 1
/* no clip actions */
Symbol 542 MovieClip [blood_splash] Frame 1
function step() {
if ((count++) > 3000) {
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.removeMovieClip();
}
}
}
Instance of Symbol 539 MovieClip in Symbol 542 MovieClip [blood_splash] Frame 1
/* no clip actions */
Symbol 545 MovieClip [blood_gusher] Frame 1
function step() {
if (bleed_count <= 2) {
ramt = 1;
if (((timeToBleed = timeToBleed + ramt)) > nextTime) {
nextTime = random(20) + 10;
bleed_count++;
timeToBleed = 0;
temp = _root.addObj("blood_drop", _root.debris_bg_layer, _root.getNextDebrisBGLevel());
temp._x = _parent._parent._x + _x;
temp._y = _parent._parent._y + _y;
speedfactor = (50 + random(50)) / 200;
temp.vx = vx * speedfactor;
temp.vy = vy * speedfactor;
scaleFactor = random(400) + 60;
temp._xscale = (temp._yscale = scaleFactor);
if (btype == "oil") {
temp._color = "black";
}
temp.btype = btype;
}
} else {
this.removeMovieClip();
}
}
bleed_count = 1;
timeToBleed = 9999;
nextTime = 0;
Instance of Symbol 544 MovieClip in Symbol 545 MovieClip [blood_gusher] Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (!_root.paused()) {
_parent.step();
}
}
Symbol 549 MovieClip Frame 200
this.stop();
Symbol 550 MovieClip [blood_drip] Frame 1
function step() {
if ((myCount++) <= 200) {
bod.gotoAndStop(count);
}
}
myCount = 1;
Instance of Symbol 549 MovieClip "bod" in Symbol 550 MovieClip [blood_drip] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 563 Button
on (release) {
_root.closeTopScores();
}
Symbol 569 Button
on (release) {
_root.closeNamer();
_root.paused = false;
}
Symbol 574 Button
on (release) {
_root.closeHelp();
}
Symbol 577 Button
on (release) {
_root.help_text = "Prevent the hearts from reaching the left side of the screen. You lose hit points from getting hit by debris, coliding with enemies, or having enemies reach the left side of the screen. The game is over when cupid's hit points are reduced to zero (indicated by the health meter shaped as a heart at the center/bottom of the screen.";
}
Symbol 579 Button
on (release) {
_root.help_text = "There are tree types of enemies...\n\nPink Hearts - bleed when shot (looks cool).\n\nBlack Hearts - spill oil that is highly flamable, explode when hit by fire arrow.\n\nCandy Arrow - Most resistant to normal arrows (highest hit points), different colors have more or less hit points than the others.";
}
Symbol 581 Button
on (release) {
_root.help_text = "1. Enemies will fall and colide with enemies below them.\n\n2. You get more points for combos.\n\n3. Try to figure out when the best time is to use a special arrow (fire, bomb, ice).\n\n4. When certain enemies explode certain ways they give special arrow ammo. Try to figure out which explosions cause the ammo to appear.\n\n5. Don't waste your ammo.";
}
Symbol 584 Button
on (release) {
_root.help_text = this.orig_help_text;
}
Symbol 586 MovieClip [help_screen] Frame 1
_root.help_text = "Controls:\n";
_root.help_text = _root.help_text + "A (hold): Move Left\n";
_root.help_text = _root.help_text + "D (hold): Move Right\n";
_root.help_text = _root.help_text + "W (hold): Move Up\n";
_root.help_text = _root.help_text + "S (hold): Move Down\n";
_root.help_text = _root.help_text + "Left Mouse Click: Fire Arrow of current type\n";
_root.help_text = _root.help_text + "#1-4 Change Firing Modes (normal-arrow, fire, ice, bomb)\n";
_root.help_text = _root.help_text + "Upgrade Shops fly by on clouds. To go in one move close to it and hit SPACEBAR.\n";
orig_help_text = _root.help_text;
Symbol 595 Button
on (release) {
_root.closeGameOver();
_root.restartGame();
}
Instance of Symbol 609 MovieClip in Symbol 610 MovieClip [arrow_stuck_back] Frame 1
onClipEvent (load) {
if (_global.g_nightTime) {
_visible = false;
}
}
Instance of Symbol 614 MovieClip in Symbol 615 MovieClip [arrow_stuck] Frame 1
onClipEvent (load) {
if (_global.g_nightTime) {
_visible = false;
}
}
Symbol 909 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function showPreloaderAd(options) {
var _local29 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812};
options = _parseOptions(options, _local29);
var _local15 = options.clip;
var _local25 = 11000;
var _local28 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
return(undefined);
}
_local15.stop();
var mc = _local15._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local16 = _getRes(options);
var _local5 = _local16[0];
var _local14 = _local16[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local8 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local8._x = 10;
_local8._y = _local14 - 20;
var _local24 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local26 = options.outline;
delete options.outline;
var _local6 = _local8.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local8.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local24);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local7 = _local8.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local26, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local5 - 20, 0);
_local7.lineTo(_local5 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local25;
chk.ad_timeout = _local28;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
var _local15 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd"};
options = _parseOptions(options, _local15);
var _local6 = options.clip;
var _local12 = 11000;
var _local14 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
return(undefined);
}
_local6.stop();
var mc = _local6._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local7 = _getRes(options);
var _local16 = _local7[0];
var _local13 = _local7[1];
mc._x = _local16 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local12;
chk.ad_timeout = _local14;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.4";
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.4";
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 631 Button
on (release) {
_parent.gotoAndPlay("fadeToBlack");
}
Symbol 632 MovieClip Frame 1
this.stop();
Instance of Symbol 407 MovieClip in Symbol 638 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 639 MovieClip [ammo_fire] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
if (_y > ypos) {
vy = vy - 0.02;
} else if (vy <= ypos) {
vy = vy + 0.02;
}
if (vy > 2) {
vy = 2;
} else if (vy < -2) {
vy = -2;
}
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_global.g_fire_ammo_count = _global.g_fire_ammo_count + _global.ammo_inc_fire;
_root.refreshAmmoText();
this.unloadMovie();
}
}
vy = 4;
vx = -0.2;
ypos = _y;
Instance of Symbol 638 MovieClip in Symbol 639 MovieClip [ammo_fire] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 642 MovieClip [ammo_bomb] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
if (_y > ypos) {
vy = vy - 0.02;
} else if (vy <= ypos) {
vy = vy + 0.02;
}
if (vy > 2) {
vy = 2;
} else if (vy < -2) {
vy = -2;
}
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_global.g_bomb_ammo_count = _global.g_bomb_ammo_count + _global.ammo_inc_bomb;
_root.refreshAmmoText();
this.unloadMovie();
}
}
vy = 4;
vx = -0.2;
ypos = _y;
Instance of Symbol 641 MovieClip in Symbol 642 MovieClip [ammo_bomb] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 404 MovieClip in Symbol 644 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 645 MovieClip [ammo_ice] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
if (_y > ypos) {
vy = vy - 0.02;
} else if (vy <= ypos) {
vy = vy + 0.02;
}
if (vy > 2) {
vy = 2;
} else if (vy < -2) {
vy = -2;
}
if (_root.cupid.body.hitTest(_x, _y, 0)) {
_global.g_ice_ammo_count = _global.g_ice_ammo_count + _global.ammo_inc_ice;
_root.refreshAmmoText();
this.unloadMovie();
}
}
vy = 4;
vx = -0.2;
ypos = _y;
Instance of Symbol 644 MovieClip in Symbol 645 MovieClip [ammo_ice] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 651 MovieClip [arrow_bomb] Frame 1
function setVelocity(xdelta, ydelta) {
trace((("setting vx and vy: " + xdelta) + " ") + ydelta);
vx = xdelta;
vy = ydelta;
}
function step() {
if (!_global.g_inSpace) {
vy = vy + (_root.gravity * 2);
}
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = (radians * _global.g_rotFact);
} else {
_rotation = ((radians * _global.g_rotFact) + 180);
}
if ((vx < 1E-5) && (vx > -1E-5)) {
_rotation = (_rotation + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
testHitEnemies();
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if (ene.body.hitTest(_x, _y, 1)) {
ene.takeDamage("arrow_bomb", _x, _y, vx, vy, _rotation);
this.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 648 MovieClip in Symbol 651 MovieClip [arrow_bomb] Frame 1
onClipEvent (load) {
if (_global.g_nightTime) {
_visible = false;
}
}
Instance of Symbol 650 MovieClip in Symbol 651 MovieClip [arrow_bomb] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 653 MovieClip [arrow_fire] Frame 1
function setVelocity(xdelta, ydelta) {
trace((("setting vx and vy: " + xdelta) + " ") + ydelta);
vx = xdelta;
vy = ydelta;
}
function step() {
if (!_global.g_inSpace) {
vy = vy + (_root.gravity * 2);
}
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = (radians * _global.g_rotFact);
} else {
_rotation = ((radians * _global.g_rotFact) + 180);
}
if ((vx < 1E-5) && (vx > -1E-5)) {
_rotation = (_rotation + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
testHitEnemies();
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if (ene.body.hitTest(_x, _y, 1)) {
ene.takeDamage("arrow_fire", _x, _y, vx, vy, _rotation);
this.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 648 MovieClip in Symbol 653 MovieClip [arrow_fire] Frame 1
onClipEvent (load) {
if (_global.g_nightTime) {
_visible = false;
}
}
Instance of Symbol 407 MovieClip in Symbol 653 MovieClip [arrow_fire] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 655 MovieClip [arrow_ice] Frame 1
function setVelocity(xdelta, ydelta) {
trace((("setting vx and vy: " + xdelta) + " ") + ydelta);
vx = xdelta;
vy = ydelta;
}
function step() {
if (!_global.g_inSpace) {
vy = vy + (_root.gravity * 2);
}
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = (radians * _global.g_rotFact);
} else {
_rotation = ((radians * _global.g_rotFact) + 180);
}
if ((vx < 1E-5) && (vx > -1E-5)) {
_rotation = (_rotation + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
testHitEnemies();
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if (ene.body.hitTest(_x, _y, 1)) {
ene.takeDamage("arrow_ice", _x, _y, vx, vy, _rotation);
this.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 648 MovieClip in Symbol 655 MovieClip [arrow_ice] Frame 1
onClipEvent (load) {
if (_global.g_nightTime) {
_visible = false;
}
}
Instance of Symbol 404 MovieClip in Symbol 655 MovieClip [arrow_ice] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 659 MovieClip [arrow_norm] Frame 1
function setVelocity(xdelta, ydelta) {
trace((("setting vx and vy: " + xdelta) + " ") + ydelta);
vx = xdelta;
vy = ydelta;
}
function step() {
if (!_global.g_inSpace) {
vy = vy + (_root.gravity * 2);
}
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = (radians * _global.g_rotFact);
} else {
_rotation = ((radians * _global.g_rotFact) + 180);
}
if ((vx < 1E-5) && (vx > -1E-5)) {
_rotation = (_rotation + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
testHitEnemies();
}
function testHitEnemies() {
for (i in _root.enemies) {
ene = _root.enemies[i];
if (ene.body.hitTest(_x, _y, 1)) {
ene.takeDamage("arrow_norm", _x, _y, vx, vy, _rotation);
this.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 658 MovieClip in Symbol 659 MovieClip [arrow_norm] Frame 1
onClipEvent (load) {
trace("_global.g_nightTime: " + _global.g_nightTime);
if (_global.g_nightTime) {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 674 MovieClip Frame 1
this.stop();
Symbol 677 MovieClip Frame 1
var mTarget = this.createEmptyMovieClip("music_mc", this.getNextHighestDepth());
var music = new Sound(mTarget);
music.attachSound("music_track1.mp3");
music.setVolume(50);
music.start();
music.onSoundComplete = function () {
this.start();
};
Symbol 680 MovieClip Frame 200
this.stop();
Symbol 681 MovieClip Frame 1
function step() {
if ((myCount++) <= 200) {
bod.gotoAndStop(count);
}
}
myCount = 1;
Instance of Symbol 680 MovieClip in Symbol 681 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 682 MovieClip Frame 100
this.stop();
Symbol 683 MovieClip Frame 63
this.unloadMovie();
Symbol 692 Button
on (release) {
getURL ("http://www.lostvectors.com/", "_blank");
}
Symbol 713 MovieClip Frame 1
this.stop();
Symbol 713 MovieClip Frame 197
this.stop();
Symbol 715 Button
on (release) {
getURL ("http://www.marcustyr.com", "_blank");
}
Symbol 718 MovieClip Frame 98
this.lv_logo.heart.gotoAndPlay(2);
Symbol 718 MovieClip Frame 309
_root.gotoAndPlay("game_start");
Symbol 718 MovieClip Frame 354
this.unloadMovie();
Symbol 734 MovieClip Frame 15
this.stop();
Symbol 743 MovieClip Frame 2
_global.g_inSpace = false;
_global.g_nightTime = false;
Symbol 743 MovieClip Frame 873
_global.g_nightTime = true;
Symbol 743 MovieClip Frame 1831
_global.g_inSpace = true;
Symbol 743 MovieClip Frame 2246
_global.g_inSpace = false;
Symbol 743 MovieClip Frame 2731
_global.g_nightTime = false;
Symbol 803 MovieClip Frame 1
stop();
Instance of Symbol 407 MovieClip in Symbol 811 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.shooting_mode == "fire") && (_global.g_fire_ammo_count > 0)) {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 404 MovieClip in Symbol 811 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.shooting_mode == "ice") && (_global.g_ice_ammo_count > 0)) {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 650 MovieClip in Symbol 811 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.shooting_mode == "bomb") && (_global.g_bomb_ammo_count > 0)) {
_alpha = 100;
} else {
_alpha = 0;
}
}
Symbol 812 MovieClip Frame 30
stop();
Instance of Symbol 812 MovieClip "bow_bod" in Symbol 823 MovieClip Frame 1
onClipEvent (enterFrame) {
}
Symbol 825 MovieClip Frame 1
function playHurtSound() {
_root.playSound(hurtsounds[random(hurtsounds.length)]);
}
function resetCupid() {
mdx = 0;
mdy = 0;
hp = 100;
max_hp = hp;
maxShotLoad = DEFAULT_LOAD_TIME;
speed = norm_speed;
_root.heart_meter.update(hp, max_hp);
inv_count = 0;
frameCount = 1;
timeToShoot = 9999;
invincable = false;
_x = 80;
_y = (_root.g_ground / 2);
resetShields();
}
function hurt(amt) {
if (hurtCount >= 20) {
hp_percent = hp / max_hp;
amt = Math.round(amt);
hurtCount = 0;
hp = hp - amt;
_root.heart_meter.update(hp, max_hp);
playHurtSound();
}
}
function getProjectileReaction(ptype) {
var _local1 = 0;
trace("ptype: " + ptype);
if (((((ptype == "ice") && (iceShieldOn)) || ((ptype == "fire") && (fireShieldOn))) || ((ptype == "poison") && (bioShieldOn))) || (superShieldOn)) {
_local1 = -1;
} else if (((iceShieldOn || (fireShieldOn)) || (bioShieldOn)) || (basicShieldOn)) {
_local1 = 0.5;
}
return(_local1);
}
function resetShields() {
maxShieldPower = 5000;
fireShieldOn = false;
fireShieldPower = 0;
iceShieldOn = false;
iceShieldPower = 0;
bioShieldOn = false;
bioShieldPower = 0;
basicShieldOn = false;
basicShieldPower = 0;
superShieldOn = false;
superShieldPower = 0;
sight.superShield_mc._visible = false;
sight.basicShield_mc._visible = false;
sight.bioShield_mc._visible = false;
sight.iceShield_mc._visible = false;
sight.fireShield_mc._visible = false;
_root.shield_bars.mega.update(superShieldPower / maxShieldPower);
_root.shield_bars.ice.update(iceShieldPower / maxShieldPower);
_root.shield_bars.fire.update(fireShieldPower / maxShieldPower);
_root.shield_bars.basic.update(basicShieldPower / maxShieldPower);
_root.shield_bars.bio.update(bioShieldPower / maxShieldPower);
}
function step() {
if (hurtCount < 20) {
hurtCount++;
}
xpos = _x;
ypos = _y;
if (Math.abs(vx) < 0.05) {
vx = 0;
}
if (Math.abs(vy) < 0.05) {
vy = 0;
}
_x = (_x + vx);
_y = (_y + vy);
sight.superShield_mc._visible = false;
sight.basicShield_mc._visible = false;
sight.bioShield_mc._visible = false;
sight.iceShield_mc._visible = false;
sight.fireShield_mc._visible = false;
if (fireShieldOn && (fireShieldPower > 0)) {
fireShieldPower--;
sight.fireShield_mc._alpha = fireShieldPower;
sight.fireShield_mc._visible = true;
activeShield = "fire";
_root.shield_bars.fire.update(fireShieldPower / maxShieldPower);
} else if (iceShieldOn && (iceShieldPower > 0)) {
iceShieldPower--;
sight.iceShield_mc._alpha = iceShieldPower;
sight.iceShield_mc._visible = true;
activeShield = "ice";
_root.shield_bars.ice.update(iceShieldPower / maxShieldPower);
} else if (bioShieldOn && (bioShieldPower > 0)) {
bioShieldPower--;
sight.bioShield_mc._alpha = bioShieldPower;
sight.bioShield_mc._visible = true;
activeShield = "poison";
_root.shield_bars.bio.update(bioShieldPower / maxShieldPower);
} else if (basicShieldOn && (basicShieldPower > 0)) {
basicShieldPower--;
sight.basicShield_mc._alpha = basicShieldPower;
sight.basicShield_mc._visible = true;
activeShield = "basic";
_root.shield_bars.basic.update(basicShieldPower / maxShieldPower);
} else if (superShieldOn && (superShieldPower > 0)) {
superShieldPower--;
sight.superShield_mc._alpha = superShieldPower;
sight.superShield_mc._visible = true;
activeShield = "super";
_root.shield_bars.mega.update(superShieldPower / maxShieldPower);
} else {
activeShield = "";
fireShieldOn = false;
iceShieldOn = false;
bioShieldOn = false;
basicShieldOn = false;
superShieldOn = false;
}
if (_x < half_width) {
_x = half_width;
} else if (_x > (_root.g_width - half_width)) {
_x = (_root.g_width - half_width);
}
if (_y < half_height) {
_y = half_height;
} else if (_y > (_root.g_ground - half_height)) {
_y = (_root.g_ground - half_height);
}
if (Key.isDown(_root.KEY_D) && (Key.isDown(_root.KEY_W))) {
vx = diag_speed * speed;
vy = diag_speed * (-speed);
} else if (Key.isDown(_root.KEY_A) && (Key.isDown(_root.KEY_W))) {
vx = diag_speed * (-speed);
vy = diag_speed * (-speed);
} else if (Key.isDown(_root.KEY_A) && (Key.isDown(_root.KEY_S))) {
vx = diag_speed * (-speed);
vy = diag_speed * speed;
} else if (Key.isDown(_root.KEY_D) && (Key.isDown(_root.KEY_S))) {
vx = diag_speed * speed;
vy = diag_speed * speed;
} else if (Key.isDown(_root.KEY_A)) {
vx = -speed;
vy = 0;
} else if (Key.isDown(_root.KEY_S)) {
vx = 0;
vy = speed;
} else if (Key.isDown(_root.KEY_W)) {
vx = 0;
vy = -speed;
} else if (Key.isDown(_root.KEY_D)) {
vx = speed;
vy = 0;
} else {
vx = vx * 0.8;
vy = vy * 0.8;
}
if (Key.isDown(_root.KEY_SPACEBAR)) {
if (!testedShopHit) {
testedShopHit = true;
_root.testHitShop();
}
} else {
testedShopHit = false;
}
timeToShoot++;
if (hasAmmo()) {
frameCount++;
} else {
frameCount = 1;
}
if (frameCount >= 30) {
frameCount = 30;
}
sight.bow_bod.gotoAndStop(frameCount);
if (_root._ymouse < 460) {
if (!autoFire) {
if (_root.pulling && (!_root.shot_fired)) {
if (timeToShoot > maxShotLoad) {
_root.shot_fired = true;
timeToShoot = 1;
shoot();
frameCount = 1;
}
}
} else if (_root.pulling) {
if (timeToShoot > maxShotLoad) {
_root.shot_fired = true;
timeToShoot = 1;
shoot();
frameCount = 1;
}
}
}
testHitEnemies();
}
function killHero() {
hp = hp - 5;
}
function testHitEnemies() {
for (endx in _root.enemies) {
ene = _root.enemies[endx];
if (body.hitTest(ene.body)) {
enemyHitReaction(ene);
break;
}
}
}
function enemyHitReaction(ene) {
if ((ene.etype == activeShield) || (activeShield == "super")) {
ene.counterEffect();
} else {
hurt(5);
ene.deathExplosion();
_root.removeEnemy(ene);
}
}
function shoot() {
if (_root.arrow_type == "arrow_fire") {
if (_global.g_fire_ammo_count > 0) {
_global.g_fire_ammo_count--;
shootNow();
}
} else if (_root.arrow_type == "arrow_ice") {
if (_global.g_ice_ammo_count > 0) {
_global.g_ice_ammo_count--;
shootNow();
}
} else if (_root.arrow_type == "arrow_bomb") {
if (_global.g_bomb_ammo_count > 0) {
_global.g_bomb_ammo_count--;
shootNow();
}
} else {
shootNow();
}
}
function shootNow() {
_root.refreshAmmoText();
_root.playSound(shootSound);
power = 15;
rads = (sight._rotation * Math.PI) / 180;
xfactor = Math.cos(rads);
yfactor = Math.sin(rads);
lvx = power * xfactor;
lvy = power * yfactor;
lvl = _root.getNextProjectileLevel();
proj = _root.addObj(_root.arrow_type, _root.bullet_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = _x + (xfactor * 20);
proj._y = _y + (yfactor * 20);
proj._rotation = sight._rotation;
}
function hasAmmo() {
if (_root.arrow_type == "arrow_fire") {
return(_global.g_fire_ammo_count > 0);
}
if (_root.arrow_type == "arrow_ice") {
return(_global.g_ice_ammo_count > 0);
}
if (_root.arrow_type == "arrow_bomb") {
return(_global.g_bomb_ammo_count > 0);
}
return(true);
}
function updateMovementStats() {
speed = norm_speed + (_global.g_wingRank * 0.4);
}
function updateShootingStats() {
maxShotLoad = DEFAULT_LOAD_TIME - (_global.g_muscleRank * 5);
}
norm_speed = 3;
boost_speed = 6;
speed = norm_speed;
diag_speed = 0.7071;
half_width = _width / 2;
half_height = _height / 2;
inv_count = 0;
invincable = false;
timeToShoot = 9999;
frameCount = 1;
autoFire = true;
shootSound = "swoosh.wav";
_global.g_fire_ammo_count = 10;
_global.g_ice_ammo_count = 10;
_global.g_bomb_ammo_count = 10;
DEFAULT_LOAD_TIME = 25;
maxShotLoad = DEFAULT_LOAD_TIME;
maxShieldPower = 5000;
fireShieldOn = false;
fireShieldPower = 0;
iceShieldOn = false;
iceShieldPower = 0;
bioShieldOn = false;
bioShieldPower = 0;
basicShieldOn = false;
basicShieldPower = 0;
superShieldOn = false;
superShieldPower = 0;
sight.superShield_mc._visible = false;
sight.basicShield_mc._visible = false;
sight.bioShield_mc._visible = false;
sight.iceShield_mc._visible = false;
sight.fireShield_mc._visible = false;
_root.shield_bars.mega.update(superShieldPower / maxShieldPower);
_root.shield_bars.ice.update(iceShieldPower / maxShieldPower);
_root.shield_bars.fire.update(fireShieldPower / maxShieldPower);
_root.shield_bars.basic.update(basicShieldPower / maxShieldPower);
_root.shield_bars.bio.update(bioShieldPower / maxShieldPower);
activeShield = "";
testedShopHit = false;
mdx = 0;
mdy = 0;
hp = 100;
max_hp = 100;
hurtsounds = new Array("oof.wav", "uh.wav", "oreh.wav");
Instance of Symbol 823 MovieClip "sight" in Symbol 825 MovieClip Frame 1
onClipEvent (load) {
yorig = _y;
}
onClipEvent (enterFrame) {
if (!_root.paused) {
dx = -(_root._xmouse - _parent._x);
dy = -(_root._ymouse - _parent._y);
_parent.mdx = dx;
_parent.mdy = dy;
_root.hero.mdx = dx;
_root.hero.mdy = dy;
radians = Math.atan(dy / dx);
if (dx > 0) {
_rotation = (((radians * 180) / Math.PI) + 180);
} else {
_rotation = ((radians * 180) / Math.PI);
}
_parent.step();
}
}
Instance of Symbol 824 MovieClip "body" in Symbol 825 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 828 Button
on (keyPress "1") {
_root.shooting_mode = "norm";
_root.arrow_type = "arrow_norm";
_root.cupid.frameCount = 1;
}
on (keyPress "2") {
_root.shooting_mode = "fire";
_root.arrow_type = "arrow_fire";
_root.cupid.frameCount = 1;
}
on (keyPress "3") {
_root.shooting_mode = "ice";
_root.arrow_type = "arrow_ice";
_root.cupid.frameCount = 1;
}
on (keyPress "4") {
_root.shooting_mode = "bomb";
_root.arrow_type = "arrow_bomb";
_root.cupid.frameCount = 1;
}
on (keyPress "p") {
if (!_root.game_ended) {
_root.paused = !_root.paused;
}
}
Symbol 847 MovieClip Frame 1
function update(perc) {
if (perc < 0.0001) {
_visible = false;
_parent.bio_button.enabled = false;
} else {
_visible = true;
bar._y = bar._height * (1 - perc);
_parent.bio_button.enabled = true;
}
}
Symbol 848 MovieClip Frame 1
function update(perc) {
if (perc < 0.0001) {
_visible = false;
_parent.basic_button.enabled = false;
} else {
_visible = true;
bar._y = bar._height * (1 - perc);
_parent.basic_button.enabled = true;
}
}
Symbol 849 MovieClip Frame 1
function update(perc) {
if (perc < 0.0001) {
_visible = false;
_parent.fire_button.enabled = false;
} else {
_visible = true;
bar._y = bar._height * (1 - perc);
_parent.fire_button.enabled = true;
}
}
Symbol 850 MovieClip Frame 1
function update(perc) {
if (perc < 0.0001) {
_visible = false;
_parent.ice_button.enabled = false;
} else {
_visible = true;
bar._y = bar._height * (1 - perc);
_parent.ice_button.enabled = true;
}
}
Symbol 851 MovieClip Frame 1
function update(perc) {
if (perc < 0.0001) {
_visible = false;
_parent.mega_button.enabled = false;
} else {
_visible = true;
bar._y = bar._height * (1 - perc);
_parent.mega_button.enabled = true;
}
}
Symbol 853 Button
on (release) {
_root.cupid.bioShieldOn = !_root.cupid.bioShieldOn;
_root.cupid.iceShieldOn = false;
_root.cupid.superShieldOn = false;
_root.cupid.basicShieldOn = false;
_root.cupid.fireShieldOn = false;
}
Symbol 854 Button
on (release) {
_root.cupid.basicShieldOn = !_root.cupid.basicShieldOn;
_root.cupid.iceShieldOn = false;
_root.cupid.superShieldOn = false;
_root.cupid.bioShieldOn = false;
_root.cupid.fireShieldOn = false;
}
Symbol 855 Button
on (release) {
_root.cupid.fireShieldOn = !_root.cupid.fireShieldOn;
_root.cupid.iceShieldOn = false;
_root.cupid.superShieldOn = false;
_root.cupid.bioShieldOn = false;
_root.cupid.basicShieldOn = false;
}
Symbol 856 Button
on (release) {
_root.cupid.superShieldOn = !_root.cupid.superShieldOn;
_root.cupid.iceShieldOn = false;
_root.cupid.bioShieldOn = false;
_root.cupid.basicShieldOn = false;
_root.cupid.fireShieldOn = false;
}
Symbol 857 Button
on (release) {
_root.cupid.iceShieldOn = !cupid.iceShieldOn;
_root.cupid.fireShieldOn = false;
_root.cupid.superShieldOn = false;
_root.cupid.bioShieldOn = false;
_root.cupid.basicShieldOn = false;
}
Symbol 872 Button
on (release) {
if (!_root.game_ended) {
_root.paused = !_root.paused;
}
update();
}
Symbol 873 MovieClip Frame 1
function update() {
if (_root.paused) {
body.gotoAndStop("play_icon");
} else {
body.gotoAndStop("pause_icon");
}
}
body.gotoAndStop("pause_icon");
Instance of Symbol 871 MovieClip "body" in Symbol 873 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.step();
}
Symbol 875 Button
on (release) {
if (!_root.game_ended) {
_root.openNamer();
}
}
Symbol 876 Button
on (release) {
_root.openHelp();
}
Symbol 877 Button
on (release) {
if (!_root.game_ended) {
_root.showTopScores();
}
}
Symbol 888 MovieClip Frame 1
function setVolumeLevel() {
volumeValue = Math.floor((bar._x / 80) * 100);
trace("volumeValue: " + volumeValue);
_root.music_manager.music.setVolume(volumeValue);
}
var pressed = false;
var volumeValue = 100;
Instance of Symbol 885 MovieClip "grip" in Symbol 888 MovieClip Frame 1
on (press) {
this.startDrag();
_parent.pressed = true;
}
on (release, releaseOutside) {
stopDrag();
_parent.pressed = false;
}
Instance of Symbol 887 MovieClip "bar" in Symbol 888 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.pressed && (_x >= 0)) && (_x <= 80)) {
_x = _parent.grip._x;
_parent.setVolumeLevel();
}
_x = ((_x > 80) ? 80 : (_x));
_x = ((_x < 0) ? 0 : (_x));
_parent.volume_level._x = _x;
_parent.grip._x = _x;
_parent.grip._y = _y;
}
onClipEvent (load) {
_x = 40;
_parent.grip._x = _x;
_parent.grip._y = _y;
}
Symbol 889 Button
on (release) {
getURL ("http://www.lostvectors.com/", "_blank");
}