Section 1
//battleScene_329 (apocalypse_fla.battleScene_329)
package apocalypse_fla {
import flash.display.*;
public dynamic class battleScene_329 extends MovieClip {
public var sun:MovieClip;
}
}//package apocalypse_fla
Section 2
//frenchie2Shadow_MC_252 (apocalypse_fla.frenchie2Shadow_MC_252)
package apocalypse_fla {
import flash.display.*;
public dynamic class frenchie2Shadow_MC_252 extends MovieClip {
public var shadow:MovieClip;
}
}//package apocalypse_fla
Section 3
//moon_MC_342 (apocalypse_fla.moon_MC_342)
package apocalypse_fla {
import flash.display.*;
public dynamic class moon_MC_342 extends MovieClip {
public var moon:MovieClip;
}
}//package apocalypse_fla
Section 4
//noAwards_92 (apocalypse_fla.noAwards_92)
package apocalypse_fla {
import flash.display.*;
public dynamic class noAwards_92 extends MovieClip {
public var neutral_mc:MovieClip;
}
}//package apocalypse_fla
Section 5
//worldMapDayNight_MC_338 (apocalypse_fla.worldMapDayNight_MC_338)
package apocalypse_fla {
import flash.display.*;
public dynamic class worldMapDayNight_MC_338 extends MovieClip {
public var sun:MovieClip;
}
}//package apocalypse_fla
Section 6
//ability (apocalypseClasses.ability)
package apocalypseClasses {
public class ability {
public var power:Number;// = 0
public var cost:Number;// = 0
public var scale:Number;// = 0
public var abilityName:String;// = ""
public var reload:Number;// = 0
public var lvl:Number;// = 0
public var powType:String;// = "Potency"
public var reloadTimer:Number;// = 0
public var powerString:String;// = ""
public var description:String;// = ""
public function ability(_arg1:String){
abilityName = "";
description = "";
powerString = "";
lvl = 0;
cost = 0;
power = 0;
scale = 0;
reload = 0;
reloadTimer = 0;
powType = "Potency";
super();
abilityName = _arg1;
setInitialStats();
}
public function unlearn():void{
setInitialStats();
}
public function upgrade():Boolean{
lvl++;
if (lvl == 1){
cost = 1;
if ((((((((((abilityName == globalVars.LANDMINE)) || ((abilityName == globalVars.BOLT)))) || ((abilityName == globalVars.FIREBALL)))) || ((abilityName == globalVars.BALL_LIGHTNING)))) || ((abilityName == globalVars.AFFINITY_BLAST)))){
cost = 10;
};
if ((((((abilityName == globalVars.FLARE_STORM)) || ((abilityName == globalVars.SNARE)))) || ((abilityName == globalVars.BRAIN_BOMB)))){
cost = 15;
};
if ((((((abilityName == globalVars.FLAME_SNAKE)) || ((abilityName == globalVars.STORM_BOLTS)))) || ((abilityName == globalVars.RAIN_STORM)))){
cost = 20;
};
if ((((((abilityName == globalVars.SECOND_SUN)) || ((abilityName == globalVars.CLOUD_COVER)))) || ((abilityName == globalVars.LEVITATE)))){
cost = 25;
};
if ((((((abilityName == globalVars.SLUDGE)) || ((abilityName == globalVars.TIME_FREEZE)))) || ((abilityName == globalVars.TIME_SHIFT)))){
cost = 30;
};
if ((((((((((abilityName == globalVars.CRIPPLING_MIST)) || ((abilityName == globalVars.OOZINATE)))) || ((abilityName == globalVars.PUSHBACK)))) || ((abilityName == globalVars.VORTEX)))) || ((abilityName == globalVars.ERUPTION)))){
cost = 40;
};
if ((((((((((((((abilityName == globalVars.PHOTOSYNTHESIS)) || ((abilityName == globalVars.TOXIC_OOZE)))) || ((abilityName == globalVars.SURVIVOR_MAGNET)))) || ((abilityName == globalVars.MINE_FIELD)))) || ((abilityName == globalVars.METEOR)))) || ((abilityName == globalVars.TSUNAMI)))) || ((abilityName == globalVars.SURVIVOR_SAFETY)))){
cost = 50;
};
if (abilityName == globalVars.HEAL){
cost = 80;
};
if ((((((((abilityName == globalVars.FIRE_MASTER)) || ((abilityName == globalVars.BOLT_MASTER)))) || ((abilityName == globalVars.EARTHQUAKE)))) || ((abilityName == globalVars.ANNIHILATOR)))){
cost = 75;
};
if ((((((((((((abilityName == globalVars.LUNAR_POWER)) || ((abilityName == globalVars.SOLAR_POWER)))) || ((abilityName == globalVars.SAVIOR)))) || ((abilityName == globalVars.VAMPIRE_BITE)))) || ((abilityName == globalVars.SOLAR_ENERGY)))) || ((abilityName == globalVars.LUNAR_ENERGY)))){
cost = 100;
};
if (abilityName == globalVars.APOCALYPSE){
cost = 500;
};
if (abilityName == globalVars.ARMOR){
cost = 1500;
};
setPowerString();
return (true);
};
switch (abilityName){
case globalVars.FLARE:
cost = (cost + 1);
power = (power + 0.025);
if (reload > 15){
reload = (reload - 1);
};
if (reload < 15){
reload = 15;
};
break;
case globalVars.FIREBALL:
cost = (cost + 3);
power = (power + (power * 0.0388));
if (power > 45){
power = 45;
};
scale = (scale + 0.01);
if (reload > 90){
reload = (reload - 6);
};
if (reload < 90){
reload = 60;
};
break;
case globalVars.FLARE_STORM:
cost = (cost + 2);
power = (power + 1);
if (reload > 300){
reload = (reload - 15);
};
if (reload < 300){
reload = 300;
};
break;
case globalVars.FLAME_SNAKE:
cost = (cost + 5);
power = (power + 15);
break;
case globalVars.BOLT:
cost = (cost + 2);
power = (power + 0.5);
if (reload > 60){
reload = (reload - 2);
};
if (reload < 60){
reload = 60;
};
break;
case globalVars.STORM_BOLTS:
cost = (cost + 2);
power = (power + 1);
if (reload > 300){
reload = (reload - 15);
};
if (reload < 300){
reload = 300;
};
break;
case globalVars.BALL_LIGHTNING:
cost = (cost + 3);
power = (power + 0.5);
if (reload > 300){
reload = (reload - 10);
};
if (reload < 300){
reload = 300;
};
break;
case globalVars.ANNIHILATOR:
power = (power + 1);
if (scale < 2){
scale = (scale + 0.1);
};
if (reload > 600){
reload = (reload - 20);
};
if (reload < 600){
reload = 600;
};
break;
case globalVars.LANDMINE:
cost = (cost + 3);
power = (power + (power * 0.05));
if (power > 30){
power = 30;
};
if (scale < 2){
scale = (scale + 0.05);
};
if (reload > 150){
reload = (reload - 15);
};
if (reload < 150){
reload = 150;
};
break;
case globalVars.MINE_FIELD:
cost = (cost + 10);
power = (power + 1);
break;
case globalVars.VAMPIRE_BITE:
cost = (cost + 10);
power = (power + 1);
if (reload > 300){
reload = (reload - 23);
};
if (reload < 300){
reload = 300;
};
break;
case globalVars.EARTHQUAKE:
if (power < 150){
power = (power + 15);
};
if (reload > 600){
reload = (reload - 60);
};
if (reload < 600){
reload = 600;
};
break;
case globalVars.TSUNAMI:
cost = (cost + 10);
power = (power + 0.1);
if (reload > 900){
reload = (reload - 45);
};
if (reload < 900){
reload = 900;
};
break;
case globalVars.METEOR:
cost = (cost + 10);
power = (power + 2);
if (reload > 900){
reload = (reload - 45);
};
if (reload < 900){
reload = 900;
};
break;
case globalVars.ERUPTION:
cost = (cost + 5);
power = (power + 15);
if (reload > 300){
reload = (reload - 30);
};
if (reload < 300){
reload = 300;
};
break;
case globalVars.AFFINITY_BLAST:
cost = (cost + 5);
if (reload > 15){
reload = (reload - 1);
};
if (reload < 15){
reload = 15;
};
break;
case globalVars.APOCALYPSE:
power = (power + 1);
break;
case globalVars.RAIN_STORM:
cost = (cost + 1);
power = (power + 0.05);
break;
case globalVars.HEAL:
cost = (cost + 10);
power = (power + 1);
break;
case globalVars.SECOND_SUN:
cost = (cost + 5);
power = (power + 30);
break;
case globalVars.CLOUD_COVER:
cost = (cost + 5);
power = (power + 30);
break;
case globalVars.TIME_SHIFT:
cost = (cost + 5);
power = (power + 10);
break;
case globalVars.TIME_FREEZE:
cost = (cost + 5);
power = (power + 10);
break;
case globalVars.LEVITATE:
cost = (cost + 2);
power = (power + 15);
break;
case globalVars.SNARE:
power = (power + 10);
if (reload > 30){
reload = (reload - 15);
};
if (reload < 30){
reload = 30;
};
break;
case globalVars.SLUDGE:
cost = (cost + 1);
power = (power + 15);
if (scale < 3){
scale = (scale + 0.1);
};
if (reload > 150){
reload = (reload - 15);
};
if (reload < 150){
reload = 150;
};
break;
case globalVars.TOXIC_OOZE:
cost = (cost + 2);
power = (power + 15);
scale = (scale + 0.15);
if (reload > 150){
reload = (reload - 15);
};
if (reload < 150){
reload = 150;
};
break;
case globalVars.CRIPPLING_MIST:
cost = (cost + 5);
power = (power + 15);
if (scale < 2){
scale = (scale + 0.05);
};
if (reload > 300){
reload = (reload - 20);
};
if (reload < 300){
reload = 300;
};
break;
case globalVars.PUSHBACK:
cost = (cost + 5);
power = (power + 1);
if (reload > 150){
reload = (reload - 10);
};
if (reload < 150){
reload = 150;
};
break;
case globalVars.VORTEX:
cost = (cost + 10);
power = (power + 10);
break;
case globalVars.BRAIN_BOMB:
cost = (cost + 2);
power = (power + (power * 0.05));
if (power > 50){
power = 50;
};
scale = (scale + 0.05);
if (reload > 150){
reload = (reload - 15);
};
if (reload < 150){
reload = 150;
};
break;
case globalVars.SURVIVOR_SAFETY:
cost = (cost + 10);
power = (power + 15);
break;
case globalVars.SOLAR_ENERGY:
cost = (cost + 50);
power = (power + 0.03);
break;
case globalVars.LUNAR_ENERGY:
cost = (cost + 50);
power = (power + 0.03);
break;
case globalVars.SOLAR_POWER:
cost = (cost + 10);
power = (power + 0.05);
break;
case globalVars.LUNAR_POWER:
cost = (cost + 10);
power = (power + 0.05);
break;
case globalVars.PHOTOSYNTHESIS:
cost = (cost + 10);
if (reload > 60){
reload = (reload - 15);
};
if (reload < 60){
reload = 60;
};
break;
case globalVars.FIRE_MASTER:
cost = (cost + 15);
power = (power + 0.05);
break;
case globalVars.BOLT_MASTER:
cost = (cost + 15);
power = (power + 0.05);
break;
case globalVars.ARMOR:
cost = (cost + 500);
power = (power + 1);
break;
case globalVars.SURVIVOR_MAGNET:
cost = (cost + 25);
power = (power + 0.25);
break;
case globalVars.SAVIOR:
cost = (cost + 30);
power = (power + 10);
break;
case globalVars.OOZINATE:
cost = (cost + 5);
power = (power + 0.2);
if (scale < 4){
scale = (scale + 0.1);
};
break;
default:
break;
};
setPowerString();
return (true);
}
public function setStats(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:String):void{
abilityName = _arg1;
description = _arg2;
powType = _arg8;
lvl = _arg3;
cost = _arg4;
power = _arg5;
scale = _arg6;
reload = _arg7;
reloadTimer = 0;
if (abilityName == ""){
description = "";
powType = "Potency";
lvl = 0;
cost = 0;
power = 0;
scale = 0;
reload = 0;
};
setPowerString();
}
public function setPowerString():void{
if (lvl <= 0){
powerString = (powType + ": ???");
} else {
if (powType == "Depth"){
powerString = (((powType + ": ") + Number(power).toFixed(2)) + "ft");
} else {
if (powType == "Duration"){
powerString = (((powType + ": ") + Number((power / 30)).toFixed(2)) + "sec");
} else {
if (powType == "Modifier"){
powerString = (((powType + ": +") + Number((power * 100)).toFixed(0)) + "%");
} else {
if (powType == "Flares"){
powerString = ((powType + ": ") + Number((power * 2)).toFixed(2));
} else {
if (powType == "DPS"){
powerString = ((powType + ": ") + Number(((scale / 5) * 30)).toFixed(2));
} else {
powerString = ((powType + ": ") + Number(power).toFixed(2));
};
};
};
};
};
};
}
public function getModPowerString(_arg1:Number):String{
var _local2:String;
_local2 = "";
if (lvl <= 0){
_local2 = (powType + ": ???");
} else {
if (powType == "Depth"){
_local2 = (((powType + ": ") + Number(_arg1).toFixed(2)) + "ft");
} else {
if (powType == "Duration"){
_local2 = (((powType + ": ") + Number((_arg1 / 30)).toFixed(2)) + "sec");
} else {
if (powType == "Modifier"){
_local2 = (((powType + ": +") + Number((_arg1 * 100)).toFixed(0)) + "%");
} else {
if (powType == "Flares"){
_local2 = ((powType + ": ") + Number((_arg1 * 2)).toFixed(2));
} else {
if (powType == "DPS"){
_local2 = ((powType + ": ") + Number(((scale / 5) * 30)).toFixed(2));
} else {
_local2 = ((powType + ": ") + Number(_arg1).toFixed(2));
};
};
};
};
};
};
return (_local2);
}
public function setInitialStats():void{
switch (abilityName){
case globalVars.FLARE:
description = "Creates a pinpoint flare of flaming energy.";
powType = "Damage";
lvl = 1;
cost = 1;
power = 1;
scale = 1;
reload = 30;
reloadTimer = 0;
break;
case globalVars.FIREBALL:
description = "A blazing fireball burns to a point and explodes.";
powType = "Damage";
lvl = 0;
cost = 180;
power = 15;
scale = 1;
reload = 210;
reloadTimer = 0;
break;
case globalVars.FLARE_STORM:
description = "Causes a storm to erupt, creating hot spots at random.";
powType = "Flares";
lvl = 0;
cost = 100;
power = 15;
scale = 1;
reload = 800;
reloadTimer = 0;
break;
case globalVars.FLAME_SNAKE:
description = "Summons a flaming snake that follows your every whim.";
powType = "Duration";
lvl = 0;
cost = 400;
power = 150;
scale = 1;
reload = 900;
reloadTimer = 0;
break;
case globalVars.BOLT:
description = "A powerful lightning strike. Can electrify water.";
powType = "Damage";
lvl = 0;
cost = 130;
power = 10;
scale = 1;
reload = 90;
reloadTimer = 0;
break;
case globalVars.STORM_BOLTS:
description = "Summons a raging storm; bolts of lightning rain from the sky.";
powType = "Bolts";
lvl = 0;
cost = 200;
power = 10;
scale = 1;
reload = 1000;
reloadTimer = 0;
break;
case globalVars.BALL_LIGHTNING:
description = "Lightning strikes an area and jumps to and from nearby enemies.";
powType = "Damage";
lvl = 0;
cost = 200;
power = 8;
scale = 1;
reload = 450;
reloadTimer = 0;
break;
case globalVars.ANNIHILATOR:
description = "Emits a beam of death that annihilates all that stand in it's path.";
powType = "Damage";
lvl = 0;
cost = 200;
power = 1;
scale = 1;
reload = 900;
reloadTimer = 0;
break;
case globalVars.LANDMINE:
description = "Places a landmine that explodes on contact. Takes 5 secs to activate.";
powType = "Damage";
lvl = 0;
cost = 100;
power = 10;
scale = 1;
reload = 450;
reloadTimer = 0;
break;
case globalVars.MINE_FIELD:
description = "Land mines are planted all over the battlefield.";
powType = "Mines";
lvl = 0;
cost = 200;
power = 4;
scale = 1;
reload = 1200;
reloadTimer = 0;
break;
case globalVars.VAMPIRE_BITE:
description = "Drains an enemy's health. Can only be used when it's dark.";
powType = "HP Drained";
lvl = 0;
cost = 350;
power = 1;
scale = 1;
reload = 600;
reloadTimer = 0;
break;
case globalVars.EARTHQUAKE:
description = "Tremors rip through the ground, stunning and damaging land enemies.";
powType = "Duration";
lvl = 0;
cost = 800;
power = 75;
scale = 1;
reload = 1800;
reloadTimer = 0;
break;
case globalVars.TSUNAMI:
description = "A tidal wave sweeps over the battlefield, damaging enemies.";
powType = "Depth";
lvl = 0;
cost = 1000;
power = 1;
scale = 1;
reload = 1800;
reloadTimer = 0;
break;
case globalVars.METEOR:
description = "Summons a meteor to crash onto the battlefield.";
powType = "Damage";
lvl = 0;
cost = 1200;
power = 10;
scale = 1;
reload = 1800;
reloadTimer = 0;
break;
case globalVars.ERUPTION:
description = "Magma spills out from the earth's core, torching an area.";
powType = "Duration";
lvl = 0;
cost = 400;
power = 90;
scale = 1;
reload = 900;
reloadTimer = 0;
break;
case globalVars.AFFINITY_BLAST:
description = "A blast that inflicts more damage if evil, grows in size if good.";
powType = "Damage";
lvl = 0;
cost = 500;
power = 1;
scale = 1;
reload = 30;
reloadTimer = 0;
break;
case globalVars.APOCALYPSE:
description = "The end of the world. Basically.";
powType = "Power";
lvl = 0;
cost = 1500;
power = 1;
scale = 1;
reload = 2970;
reloadTimer = 0;
break;
case globalVars.RAIN_STORM:
description = "Rain storms are summoned, drenching the battlefield.";
powType = "Depth";
lvl = 0;
cost = 50;
power = 0.5;
scale = 1;
reload = 450;
reloadTimer = 0;
break;
case globalVars.HEAL:
description = "Heals your wounds.";
powType = "HP Healed";
lvl = 0;
cost = 200;
power = 1;
scale = 1;
reload = 900;
reloadTimer = 0;
break;
case globalVars.SECOND_SUN:
description = "Creates an artificial sun to light the battlefield.";
powType = "Duration";
lvl = 0;
cost = 100;
power = 180;
scale = 1;
reload = 1200;
reloadTimer = 0;
break;
case globalVars.CLOUD_COVER:
description = "Summons clouds to cover the battlefield in darkness.";
powType = "Duration";
lvl = 0;
cost = 100;
power = 180;
scale = 1;
reload = 1200;
reloadTimer = 0;
break;
case globalVars.TIME_SHIFT:
description = "Alters the flow of time, slowing everything down.";
powType = "Duration";
lvl = 0;
cost = 200;
power = 90;
scale = 1;
reload = 1200;
reloadTimer = 0;
break;
case globalVars.TIME_FREEZE:
description = "Breaks the flow of time completely, freezing everything in place.";
powType = "Duration";
lvl = 0;
cost = 350;
power = 90;
scale = 1;
reload = 1200;
reloadTimer = 0;
break;
case globalVars.LEVITATE:
description = "Hover in the air, out of reach from some enemies.";
powType = "Duration";
lvl = 0;
cost = 100;
power = 120;
scale = 1;
reload = 750;
reloadTimer = 0;
break;
case globalVars.SNARE:
description = "Plants a snare that immobilizes on contact. Takes 3 secs to activate.";
powType = "Duration";
lvl = 0;
cost = 50;
power = 60;
scale = 1;
reload = 360;
reloadTimer = 0;
break;
case globalVars.SLUDGE:
description = "A sticky sludge slows down incoming targets.";
powType = "Duration";
lvl = 0;
cost = 80;
power = 90;
scale = 1;
reload = 450;
reloadTimer = 0;
break;
case globalVars.TOXIC_OOZE:
description = "Ooze that emits a gas poisonous to the infected.";
powType = "DPS";
lvl = 0;
cost = 150;
power = 90;
scale = 1;
reload = 450;
reloadTimer = 0;
break;
case globalVars.CRIPPLING_MIST:
description = "A mist arises, making the infected more suceptible to damage.";
powType = "Duration";
lvl = 0;
cost = 150;
power = 90;
scale = 1;
reload = 600;
reloadTimer = 0;
break;
case globalVars.PUSHBACK:
description = "A psychic force pushes close enemies away.";
powType = "Force";
lvl = 0;
cost = 150;
power = 10;
scale = 1;
reload = 300;
reloadTimer = 0;
break;
case globalVars.VORTEX:
description = "Enemies and survivors are drawn into a swirling vortex.";
powType = "Duration";
lvl = 0;
cost = 500;
power = 60;
scale = 1;
reload = 1800;
reloadTimer = 0;
break;
case globalVars.BRAIN_BOMB:
description = "A bomb is planted in the target's brain; detonates when the brain dies.";
powType = "Damage";
lvl = 0;
cost = 300;
power = 20;
scale = 1;
reload = 450;
reloadTimer = 0;
break;
case globalVars.SURVIVOR_SAFETY:
description = "All survivors are immune to damage for an amount of time.";
powType = "Duration";
lvl = 0;
cost = 500;
power = 90;
scale = 1;
reload = 900;
reloadTimer = 0;
break;
case globalVars.SOLAR_ENERGY:
description = "While the sun is up, ability cooldowns are shorter.";
powType = "Modifier";
lvl = 0;
cost = 100;
power = 0.05;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.LUNAR_ENERGY:
description = "While it is dark, ability cooldowns are shorter.";
powType = "Modifier";
lvl = 0;
cost = 100;
power = 0.05;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.SOLAR_POWER:
description = "While the sun is up, abilities are more powerful.";
powType = "Modifier";
lvl = 0;
cost = 100;
power = 0.05;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.LUNAR_POWER:
description = "While it is dark, abilities are more powerful.";
powType = "Modifier";
lvl = 0;
cost = 100;
power = 0.05;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.PHOTOSYNTHESIS:
description = "While the sun is up, your health will steadily increase by 1.";
powType = "HP Healed";
lvl = 0;
cost = 400;
power = 1;
scale = 1;
reload = 360;
reloadTimer = 0;
break;
case globalVars.FIRE_MASTER:
description = "All spells related to fire do more damage.";
powType = "Modifier";
lvl = 0;
cost = 150;
power = 0.05;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.BOLT_MASTER:
description = "All spells related to lightning do more damage.";
powType = "Modifier";
lvl = 0;
cost = 150;
power = 0.05;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.ARMOR:
description = "Nullifies all damage that is less than or equal to potency.";
powType = "Potency";
lvl = 0;
cost = 1000;
power = 1;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.SURVIVOR_MAGNET:
description = "Attracts survivors, increasing their speed.";
powType = "Speed Bonus";
lvl = 0;
cost = 150;
power = 0.5;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.SAVIOR:
description = "Grants survivors greater resolve, increasing their health.";
powType = "HP Bonus";
lvl = 0;
cost = 250;
power = 10;
scale = 1;
reload = 0;
reloadTimer = 0;
break;
case globalVars.OOZINATE:
description = "Toxic ooze flows out of your pores, poisoning the infected.";
powType = "DPS";
lvl = 0;
cost = 400;
power = 1;
scale = 2;
reload = 0;
reloadTimer = 0;
break;
default:
description = "";
lvl = 0;
cost = 0;
power = 0;
scale = 0;
reload = 0;
reloadTimer = 0;
break;
};
setPowerString();
}
}
}//package apocalypseClasses
Section 7
//area (apocalypseClasses.area)
package apocalypseClasses {
public class area {
public var enemiesKilled:Number;
public var noDamage3:Boolean;// = false
public var noDamage1:Boolean;// = false
public var noDamage2:Boolean;// = false
public var survivorsSaved:Number;
public var noDamageCounter:Number;// = 0
public var survivorsTotal:Number;
public var areaName:String;
public var survivorsRemaining:Number;
public var survivorsKilled:Number;
public function area(_arg1:String, _arg2:Number){
noDamageCounter = 0;
noDamage1 = false;
noDamage2 = false;
noDamage3 = false;
super();
areaName = _arg1;
enemiesKilled = (survivorsSaved = (survivorsKilled = 0));
survivorsRemaining = (survivorsTotal = _arg2);
}
public function setStats(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:String, _arg9:String, _arg10:String):void{
areaName = _arg1;
enemiesKilled = _arg2;
survivorsSaved = _arg3;
survivorsKilled = _arg4;
survivorsRemaining = _arg5;
survivorsTotal = _arg6;
noDamageCounter = _arg7;
if (_arg8 == "true"){
noDamage1 = true;
} else {
noDamage1 = false;
};
if (_arg9 == "true"){
noDamage2 = true;
} else {
noDamage2 = false;
};
if (_arg10 == "true"){
noDamage3 = true;
} else {
noDamage3 = false;
};
}
}
}//package apocalypseClasses
Section 8
//delayedAbility (apocalypseClasses.delayedAbility)
package apocalypseClasses {
public class delayedAbility {
public var timer:Number;
public var ability:String;
public var startX:Number;
public var startY:Number;
public function delayedAbility(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number){
ability = _arg1;
timer = _arg2;
startX = _arg3;
startY = _arg4;
}
}
}//package apocalypseClasses
Section 9
//enemy (apocalypseClasses.enemy)
package apocalypseClasses {
import flash.display.*;
public class enemy extends MovieClip {
public var hp:Number;
public var shadow_mc:MovieClip;
public var reloadTimer:Number;
public var poison_mc:MovieClip;
public var suicide:Boolean;
public var inRange:Boolean;
public var ap:Number;
public var speedMod:Number;// = 0
public var range:Number;
public var bombActive:Boolean;
public var brainBombed:Boolean;// = false
public var speed:Number;
public var aquatic:Boolean;
public var damage:Number;
public var extraDamageTaken:Number;// = 0
public var model_mc:MovieClip;
public var hitByBallLightning:Boolean;// = false
public var pushbackMove:Number;// = 0
public var reload:Number;
public var poisonStrength:Number;// = 0
public var tempFlying:Boolean;
public var flying:Boolean;
public var isBoss:Boolean;
public var poisoned:Number;// = -1
public var deathType:String;// = ""
public var immobilized:Number;// = 0
public var isSurvivor:Boolean;// = false
public var maxPushbackMove:Number;// = 0
public var bitten:Boolean;// = false
public function enemy(){
deathType = "";
isSurvivor = false;
hitByBallLightning = false;
bitten = false;
immobilized = 0;
poisoned = -1;
poisonStrength = 0;
speedMod = 0;
extraDamageTaken = 0;
pushbackMove = 0;
maxPushbackMove = 0;
brainBombed = false;
super();
isBoss = false;
suicide = false;
bombActive = false;
aquatic = false;
if ((this is enemy1_MC)){
hp = 10;
ap = 1;
speed = 5;
damage = 1;
range = 45;
reload = 30;
flying = false;
inRange = false;
} else {
if ((this is enemy2_MC)){
hp = 50;
ap = 3;
speed = 2.5;
damage = 1;
range = 45;
reload = 30;
flying = false;
inRange = false;
} else {
if ((this is enemy3_MC)){
hp = 10;
ap = 3;
speed = 4.5;
damage = 1;
range = 200;
reload = 60;
flying = false;
inRange = false;
} else {
if ((this is enemy4_MC)){
hp = 50;
ap = 6;
speed = 5;
damage = 10;
range = 45;
reload = 60;
flying = false;
inRange = false;
suicide = true;
bombActive = true;
} else {
if ((this is enemy5_MC)){
hp = 120;
ap = 9;
speed = 3;
damage = 10;
range = 45;
reload = 60;
flying = false;
inRange = false;
suicide = true;
bombActive = true;
};
};
};
};
};
if ((this is enemy6_MC)){
hp = 120;
ap = 8;
speed = 5;
damage = 2;
range = 45;
reload = 30;
flying = false;
inRange = false;
};
if ((this is enemy7_MC)){
hp = 180;
ap = 14;
speed = 2.5;
damage = 3;
range = 45;
reload = 30;
flying = false;
inRange = false;
};
if ((this is enemy8_MC)){
hp = 140;
ap = 16;
speed = 4;
damage = 4;
range = 45;
reload = 30;
flying = false;
inRange = false;
} else {
if ((this is blackCrab_MC)){
hp = 100;
ap = 10;
speed = 2;
damage = 2;
range = 70;
reload = 60;
flying = false;
inRange = false;
} else {
if ((this is frenchie1_MC)){
hp = 30;
ap = 4;
speed = 5;
damage = 1;
range = 45;
reload = 30;
flying = false;
inRange = false;
} else {
if ((this is frenchie2_MC)){
hp = 30;
ap = 6;
speed = 4.5;
damage = 1;
range = 200;
reload = 60;
flying = false;
inRange = false;
} else {
if ((this is jamieOgre_MC)){
hp = 5000;
ap = 500;
speed = 3;
damage = 10;
range = 50;
reload = 60;
flying = false;
inRange = false;
isBoss = true;
} else {
if ((this is greenBeret_MC)){
hp = 110;
ap = 14;
speed = 3;
damage = 1;
range = 250;
reload = 20;
flying = false;
inRange = false;
} else {
if ((this is greenBeretPistol_MC)){
hp = 60;
ap = 11;
speed = 3;
damage = 1;
range = 200;
reload = 60;
flying = false;
inRange = false;
} else {
if ((this is greenBeretMelee_MC)){
hp = 100;
ap = 13;
speed = 4;
damage = 2;
range = 45;
reload = 30;
flying = false;
inRange = false;
} else {
if ((this is imposter1_MC)){
hp = 140;
ap = 14;
speed = 4;
damage = 2;
range = 45;
reload = 30;
flying = false;
inRange = false;
} else {
if ((this is imposter2_MC)){
hp = 120;
ap = 13;
speed = 4;
damage = 1;
range = 200;
reload = 45;
flying = false;
inRange = false;
} else {
if ((this is jetpackGuy1_MC)){
hp = 120;
ap = 22;
speed = 6;
damage = 2;
range = 200;
reload = 45;
flying = true;
inRange = false;
} else {
if ((this is jetpackGuy2_MC)){
hp = 150;
ap = 22;
speed = 6;
damage = 1;
range = 300;
reload = 20;
flying = true;
inRange = false;
} else {
if ((this is redCrab_MC)){
hp = 400;
ap = 20;
speed = 3.5;
damage = 6;
range = 70;
reload = 60;
flying = false;
inRange = false;
} else {
if ((this is turtle_MC)){
hp = 1000;
ap = 25;
speed = 1.5;
damage = 6;
range = 45;
reload = 40;
flying = false;
inRange = false;
aquatic = true;
} else {
if ((this is bird_MC)){
hp = 250;
ap = 20;
speed = 5;
damage = 4;
range = 225;
reload = 45;
flying = true;
inRange = false;
} else {
if ((this is bossCrab_MC)){
hp = 8000;
ap = 500;
speed = 3;
damage = 10;
range = 100;
reload = 60;
flying = false;
inRange = false;
isBoss = true;
} else {
if ((this is demonCrab_MC)){
hp = 500;
ap = 50;
speed = 3.5;
damage = 4;
range = 70;
reload = 60;
flying = false;
inRange = false;
} else {
if ((this is knifer_MC)){
hp = 300;
ap = 30;
speed = 5.5;
damage = 2;
range = 45;
reload = 30;
flying = false;
inRange = false;
} else {
if ((this is machineGunner_MC)){
hp = 100;
ap = 30;
speed = 2;
damage = 1;
range = 525;
reload = 20;
flying = false;
inRange = false;
} else {
if ((this is rocketeer1_MC)){
hp = 150;
ap = 30;
speed = 6;
damage = 2;
range = 300;
reload = 45;
flying = true;
inRange = false;
} else {
if ((this is rocketeer2_MC)){
hp = 100;
ap = 50;
speed = 6;
damage = 1;
range = 400;
reload = 20;
flying = true;
inRange = false;
} else {
if ((this is wyvern_MC)){
hp = 300;
ap = 50;
speed = 5;
damage = 3;
range = 200;
reload = 45;
flying = true;
inRange = false;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (!globalVars.shadowsEnabled){
removeChild(shadow_mc);
};
range = (range - 25);
poison_mc.alpha = 0;
}
public function updateShadowOnProgression(_arg1:Number):void{
var _local2:Number;
if (!this.contains(shadow_mc)){
return;
};
if (shadow_mc.shadow.currentLabel == "end"){
_local2 = 1;
} else {
_local2 = (shadow_mc.shadow.currentFrame + 1);
};
shadow_mc.gotoAndStop((Math.round((_arg1 * 360)) + 1));
shadow_mc.shadow.gotoAndStop(_local2);
}
public function updateShadowOnAngle(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
if (!this.contains(shadow_mc)){
return;
};
if (shadow_mc.shadow.currentLabel == "end"){
_local3 = 1;
} else {
_local3 = (shadow_mc.shadow.currentFrame + 1);
};
_local4 = Math.atan(((x - _arg1) / (y - _arg2)));
shadow_mc.gotoAndStop((Math.round((((_local4 / Math.PI) * 180) * 2)) + 180));
shadow_mc.shadow.gotoAndStop(_local3);
}
public function attack():void{
if (((suicide) && (!((currentLabel == "attack"))))){
gotoAndPlay("attack");
};
reloadTimer--;
if (reloadTimer > 0){
return;
};
gotoAndPlay("attack");
globalVars.game.damagePlayer(damage);
reloadTimer = reload;
if (suicide){
takeDamage(hp);
};
}
public function moveTowardPoint(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
if (Math.abs(Math.sqrt((Math.pow((y - _arg2), 2) + Math.pow((x - _arg1), 2)))) < range){
inRange = true;
return;
};
if (y < globalVars.enemyStopY){
inRange = false;
reloadTimer = reload;
return;
};
inRange = false;
reloadTimer = reload;
_local3 = Math.max(0, (speed - speedMod));
_local4 = Math.atan(((x - _arg1) / (y - _arg2)));
_local5 = Math.abs((Math.sin(_local4) * _local3));
_local6 = Math.abs((Math.cos(_local4) * _local3));
if (x < _arg1){
x = (x + _local5);
} else {
if (x > _arg1){
x = (x - _local5);
};
};
if (y < _arg2){
y = (y + _local6);
} else {
if (y > _arg2){
y = (y - _local6);
};
};
}
public function takeDamage(_arg1:Number, _arg2:String=""):void{
if (_arg2 == ""){
_arg2 = globalVars.ENEMY_DEATH;
};
hp = (hp - _arg1);
hp = (hp - extraDamageTaken);
deathType = _arg2;
}
public function update(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{
var _local4:Array;
var _local5:*;
if (poisoned < 0){
poison_mc.alpha = 0;
} else {
poison_mc.alpha = 1;
};
if (currentLabel == "attack"){
model_mc.alpha = 0;
} else {
model_mc.alpha = 1;
};
if (contains(shadow_mc)){
shadow_mc.alpha = 1;
};
_local4 = globalVars.game.getAffectingAbilities(this.model_mc);
extraDamageTaken = 0;
_local5 = 0;
while (_local5 < _local4.length) {
if ((_local4[_local5] is affinityBlastGood_MC)){
globalVars.game.abilityEffects(this, globalVars.AFFINITY_BLAST);
};
if ((_local4[_local5] is affinityBlastEvil_MC)){
globalVars.game.abilityEffects(this, globalVars.AFFINITY_BLAST);
};
if ((_local4[_local5] is flare_MC)){
globalVars.game.abilityEffects(this, globalVars.FLARE);
};
if ((_local4[_local5] is bolt_MC)){
globalVars.game.abilityEffects(this, globalVars.BOLT);
};
if ((_local4[_local5] is flameSnake_MC)){
globalVars.game.abilityEffects(this, globalVars.FLAME_SNAKE);
};
if ((_local4[_local5] is ballLightning_MC)){
globalVars.game.abilityEffects(this, globalVars.BALL_LIGHTNING);
};
if ((_local4[_local5] is annihilator_MC)){
globalVars.game.abilityEffects(this, globalVars.ANNIHILATOR);
};
if ((_local4[_local5] is vampireBite_MC)){
globalVars.game.abilityEffects(this, globalVars.VAMPIRE_BITE);
};
if ((_local4[_local5] is cripplingMist_MC)){
globalVars.game.abilityEffects(this, globalVars.CRIPPLING_MIST);
};
if ((((((((_local4[_local5] is toxicOoze_MC)) && (((y + 20) <= _local4[_local5].y)))) && (!(flying)))) && (!(tempFlying)))){
globalVars.game.abilityEffects(this, globalVars.TOXIC_OOZE);
};
if ((((((((_local4[_local5] is oozinate_MC)) && (((y + 20) <= _local4[_local5].y)))) && (!(flying)))) && (!(tempFlying)))){
globalVars.game.abilityEffects(this, globalVars.OOZINATE);
};
if ((((((((_local4[_local5] is sludge_MC)) && (((y + 20) <= _local4[_local5].y)))) && (!(flying)))) && (!(tempFlying)))){
speedMod = (speed / 2);
};
if ((((((_local4[_local5] is pushback_MC)) && (!(flying)))) && (!(tempFlying)))){
globalVars.game.abilityEffects(this, globalVars.PUSHBACK);
};
if ((_local4[_local5] is brainBomb_MC)){
globalVars.game.abilityEffects(this, globalVars.BRAIN_BOMB);
};
if ((_local4[_local5] is brainBombExplosion_MC)){
globalVars.game.abilityEffects(this, globalVars.BRAIN_BOMB_EXPLOSION);
};
if ((_local4[_local5] is Explosion_MC)){
globalVars.game.abilityEffects(this, globalVars.SUICIDE_EXPLOSION);
};
if ((_local4[_local5] is meteor_MC)){
globalVars.game.abilityEffects(this, globalVars.METEOR);
};
if ((((_local4[_local5] is eruption_MC)) && (((y + 20) <= _local4[_local5].y)))){
globalVars.game.abilityEffects(this, globalVars.ERUPTION);
};
if ((((((_local4[_local5] is earthquake_MC)) && (!(flying)))) && (!(tempFlying)))){
_arg3 = false;
globalVars.game.abilityEffects(this, globalVars.EARTHQUAKE);
};
if ((((((_local4[_local5] is tsunami_MC)) && (!(flying)))) && (!(tempFlying)))){
_arg3 = false;
globalVars.game.abilityEffects(this, globalVars.TSUNAMI);
};
if ((_local4[_local5] is fireball_MC)){
globalVars.game.abilityEffects(this, globalVars.FIREBALL);
if (_local4[_local5].currentLabel != "explode"){
_local4[_local5].gotoAndPlay("explode");
};
};
if ((((((_local4[_local5] is landmine_MC)) && (!(flying)))) && (!(tempFlying)))){
if (((((y + 20) <= _local4[_local5].y)) && ((_local4[_local5].currentLabel == "activated")))){
globalVars.game.abilityEffects(this, globalVars.LANDMINE_EXPLOSION);
_local4[_local5].play();
} else {
if (_local4[_local5].currentLabel == "explosion"){
globalVars.game.abilityEffects(this, globalVars.LANDMINE);
};
};
};
if ((((((_local4[_local5] is snare_MC)) && (!(flying)))) && (!(tempFlying)))){
if (((((y + 20) <= _local4[_local5].y)) && ((_local4[_local5].currentLabel == "activated")))){
_local4[_local5].play();
globalVars.game.abilityEffects(this, globalVars.SNARE);
};
};
if ((((((((_local4[_local5] is puddle_MC)) && (!(flying)))) && (!(tempFlying)))) && (((y + 20) <= _local4[_local5].y)))){
if (aquatic){
speedMod = -3.5;
};
if (bombActive){
if ((this is enemy4_MC)){
globalVars.game.addEnemyAt(new enemy1_MC(), x, y);
globalVars.game.removeEnemy(this);
} else {
if ((this is enemy5_MC)){
globalVars.game.addEnemyAt(new enemy2_MC(), x, y);
globalVars.game.removeEnemy(this);
};
};
};
if (_local4[_local5].currentLabel == "electrified"){
globalVars.game.abilityEffects(this, globalVars.PUDDLE, _local4[_local5].alpha);
};
};
if ((((((((_local4[_local5] is tsunamiWater_MC)) || ((_local4[_local5] is tsunamiWater2_MC)))) && (!(flying)))) && (!(tempFlying)))){
if (aquatic){
speedMod = -3.5;
};
if (bombActive){
if ((this is enemy4_MC)){
globalVars.game.addEnemyAt(new enemy1_MC(), x, y);
globalVars.game.removeEnemy(this);
} else {
if ((this is enemy5_MC)){
globalVars.game.addEnemyAt(new enemy2_MC(), x, y);
globalVars.game.removeEnemy(this);
};
};
};
if (_local4[_local5].currentLabel == "electrified"){
globalVars.game.abilityEffects(this, globalVars.PUDDLE, _local4[_local5].alpha);
};
};
_local5++;
};
if (hp <= 0){
globalVars.game.killEnemy(this);
return;
};
poisoned--;
if (poisoned > 0){
deathType = globalVars.ENEMY_DEATH;
hp = (hp - poisonStrength);
};
if (speedMod > 0){
speedMod = (speedMod - 0.05);
};
if (speedMod < 0){
speedMod = (speedMod + 0.1);
};
if (!_arg3){
return;
};
if (pushbackMove > (-(maxPushbackMove) * 2)){
tempFlying = true;
y = (y - pushbackMove);
pushbackMove--;
if (contains(shadow_mc)){
shadow_mc.alpha = 0;
};
return;
} else {
tempFlying = false;
if (contains(shadow_mc)){
shadow_mc.alpha = 1;
};
};
immobilized--;
if (immobilized <= 0){
moveTowardPoint(_arg1, _arg2);
};
if (inRange){
attack();
};
}
}
}//package apocalypseClasses
Section 10
//game (apocalypseClasses.game)
package apocalypseClasses {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import com.kongregate.as3.client.*;
import flash.geom.*;
import soundClasses.*;
public class game extends MovieClip {
private var worldMapTipTimer:Number;// = 0
private var delayedAbilities:Array;
private var savePercent:Number;// = 0
private var enemySpawnList:Array;
private var finalBattleCompleted:Boolean;// = false
private var oozinateActivated:Boolean;// = false
private var enemies:Array;
private var cloudCoverActive:Number;// = 0
private var PLAYER_START_Y:Number;// = 0
public var abilityInfo_mc:MovieClip;
public var screen_mc:MovieClip;
private var days:Number;// = 0
private var enemiesIndex:Number;
private var inBattle:Boolean;// = false
private var survivorSpawnPercent:Number;
private var currentTip:Number;// = 0
private var survivorSpawnList:Array;
private var secondSunActive:Number;// = 0
private var enemyMaxSpawnTimer:Number;
private var daytime:Boolean;// = true
private var abilitiesIndex:Number;
private var deaths:Number;// = 0
private var abilityTargets:Array;
private var spawnTimer:Number;// = 0
private var abilityBooleans:Array;
private var timeShiftTimer:Number;// = -1
private var earthquakeTimer:Number;// = -1
public var keyboardArray:Array;
private var survivorSafetyTimer:Number;// = -1
public var currentPopUp:String;// = ""
private var kills:Number;// = 0
public var destinationInfo_mc:MovieClip;
private var currentActivePlayerShadow:String;
public var player:playerData;
private var pauseTimer:Number;// = 0
private var battleTimerStart:Number;// = 0
private var meteorTimer:Number;// = -1
private var awardWon:Boolean;// = false
private var daylight:Number;// = 0
private var PLAYER_LEVITATE_Y:Number;// = 0
private var survivorsClearedPopup:Boolean;// = false
public var sounds:Array;
public var currentScreen:String;
private var abilities:Array;
private var tempAbilityReps:Number;
private var vortexX:Number;// = -1
private var vortexY:Number;// = -1
private var battleTimer:Number;// = 0
private var damage:Number;// = 0
private var currentAbility:String;
public var grabbedAbility_mc:MovieClip;
private var flameSnakeTimer:Number;// = -1
public var forKongregate:Boolean;// = true
private var apEarned:Number;// = 0
public var currentCategory:String;// = ""
private var stallEndBattle:Number;// = 0
private var awards:Number;// = 0
private var abilityReleaseTimer:Number;// = 0
private var abilityNumbers:Array;
private var bossOnScreen:Boolean;// = false
private var globalBattleScale:Number;// = 1
private var upgrades:Number;// = 0
private var clickedOnAbilityBTN:Boolean;// = false
private var levitateTimer:Number;// = -1
private var currentAbilityIndex:Number;
private var timeFreezeTimer:Number;// = -1
public var popUp_mc:MovieClip;
private var enemySpawnPercent:Number;
public var kongregate:KongregateAPI;
private var mouseIsDown:Boolean;// = false
private var currentSurvivorAP:Number;
public function game(){
PLAYER_START_Y = 0;
PLAYER_LEVITATE_Y = 0;
screen_mc = new MovieClip();
popUp_mc = new MovieClip();
destinationInfo_mc = new MovieClip();
abilityInfo_mc = new MovieClip();
grabbedAbility_mc = new MovieClip();
currentPopUp = "";
currentCategory = "";
sounds = new Array();
savePercent = 0;
kills = 0;
damage = 0;
deaths = 0;
apEarned = 0;
upgrades = 0;
awards = 0;
days = 0;
clickedOnAbilityBTN = false;
spawnTimer = 0;
inBattle = false;
battleTimer = 0;
stallEndBattle = 0;
battleTimerStart = 0;
daylight = 0;
cloudCoverActive = 0;
secondSunActive = 0;
flameSnakeTimer = -1;
earthquakeTimer = -1;
meteorTimer = -1;
timeShiftTimer = -1;
timeFreezeTimer = -1;
survivorSafetyTimer = -1;
levitateTimer = -1;
vortexX = -1;
vortexY = -1;
oozinateActivated = false;
daytime = true;
awardWon = false;
bossOnScreen = false;
pauseTimer = 0;
globalBattleScale = 1;
finalBattleCompleted = false;
survivorsClearedPopup = false;
abilityReleaseTimer = 0;
worldMapTipTimer = 0;
currentTip = 0;
mouseIsDown = false;
keyboardArray = new Array();
forKongregate = true;
super();
sounds[globalVars.ENEMY_DEATH] = new AdvancedSound(new enemyDeath_mp3(), 0.3);
sounds[globalVars.ENEMY_BURNT] = new AdvancedSound(new enemyDeath_mp3(), 0.3);
sounds[globalVars.FLARE] = (sounds[globalVars.AFFINITY_BLAST] = new AdvancedSound(new flare_mp3(), 0.8));
sounds[globalVars.FIREBALL] = new AdvancedSound(new fireball_mp3());
sounds[globalVars.FLAME_SNAKE] = new AdvancedSound(new fire_mp3());
sounds[globalVars.BOLT] = (sounds[globalVars.BALL_LIGHTNING] = new AdvancedSound(new bolt_mp3(), 0.55));
sounds[globalVars.ANNIHILATOR] = new AdvancedSound(new beam_mp3());
sounds[globalVars.VAMPIRE_BITE] = new AdvancedSound(new bite_mp3());
sounds[globalVars.METEOR] = new AdvancedSound(new meteor_mp3(), 0.8);
sounds[globalVars.TSUNAMI] = new AdvancedSound(new tsunami_mp3(), 0.8);
sounds[globalVars.EARTHQUAKE] = (sounds[globalVars.METEOR_EARTHQUAKE] = new AdvancedSound(new earthquake_mp3()));
sounds[globalVars.LANDMINE_EXPLOSION] = (sounds[globalVars.BRAIN_BOMB_EXPLOSION] = (sounds[globalVars.SUICIDE_EXPLOSION] = new AdvancedSound(new explosion_mp3())));
sounds[globalVars.CRIPPLING_MIST] = new AdvancedSound(new mist_mp3(), 1);
sounds[globalVars.TOXIC_OOZE] = (sounds[globalVars.SLUDGE] = new AdvancedSound(new ooze_mp3()));
sounds[globalVars.RAIN_STORM] = new AdvancedSound(new rain_mp3(), 0.4);
sounds[globalVars.LANDMINE] = (sounds[globalVars.SNARE] = new AdvancedSound(new setTrap_mp3()));
sounds[globalVars.BRAIN_BOMB] = new AdvancedSound(new brainBomb_mp3(), 0.3);
sounds[globalVars.SNARE_TRIPPED] = new AdvancedSound(new snare_mp3(), 0.6);
sounds[globalVars.HEAL] = new AdvancedSound(new heal_mp3(), 0.3);
sounds[globalVars.PUSHBACK] = new AdvancedSound(new pushback_mp3());
sounds[globalVars.LEVITATE_EFFECT] = new AdvancedSound(new levitate_mp3());
sounds[globalVars.TIME_SHIFT] = (sounds[globalVars.TIME_FREEZE] = new AdvancedSound(new timeShift_mp3(), 0.8));
sounds[globalVars.VORTEX] = new AdvancedSound(new vortex_mp3());
sounds[globalVars.SURVIVOR_SAFETY] = new AdvancedSound(new survivorSafety_mp3());
sounds[globalVars.LEARN_ABILITY] = new AdvancedSound(new abilityLearn_mp3());
sounds[globalVars.ELECTRIFY] = new AdvancedSound(new electrify_mp3());
sounds[globalVars.DAMAGE] = new AdvancedSound(new playerDamage_mp3());
sounds[globalVars.MAIN_MENU] = new AdvancedSound(new fire_mp3(), 0.3);
sounds[globalVars.GRADE] = new AdvancedSound(new gradeGiven_mp3());
sounds[globalVars.POP_UP] = new AdvancedSound(new popup_mp3());
sounds[globalVars.SURVIVOR_SAVED] = new AdvancedSound(new saved_mp3());
sounds[globalVars.SURVIVOR_KILLED] = new AdvancedSound(new survivorDeath_mp3());
sounds[globalVars.SURVIVOR_BONUS] = (sounds[globalVars.SURVIVORS_SAVED_BONUS] = (sounds[globalVars.SURVIVOR_KILL_BONUS] = (sounds[globalVars.WARRIOR_BONUS] = (sounds[globalVars.NO_DAMAGE_BONUS1] = (sounds[globalVars.NO_DAMAGE_BONUS2] = (sounds[globalVars.NO_DAMAGE_BONUS3] = new AdvancedSound(new award_mp3())))))));
sounds[globalVars.BG_MUSIC] = new AdvancedSound(new BGmusic_mp3(), 0.8);
sounds[globalVars.BG_MUSIC].play(80, 1000);
globalVars.game = this;
player = new playerData();
currentAbilityIndex = 0;
currentAbility = player.abilityLoadout[currentAbilityIndex];
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
this.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
this.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheel);
this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
changeScreen(globalVars.MAIN_MENU, new mainMenu_MC());
}
public function removeAbility(_arg1:MovieClip):void{
var _local2:*;
if (!this.contains(_arg1)){
return;
};
_local2 = 0;
while (_local2 < abilities.length) {
if (abilities[_local2] == _arg1){
if ((((((((((((((((((((((((((((((abilities[_local2] is puddle_MC)) || ((abilities[_local2] is secondSun_MC)))) || ((abilities[_local2] is cloudCover_MC)))) || ((abilities[_local2] is tsunamiGraphics_MC)))) || ((abilities[_local2] is tsunamiWater_MC)))) || ((abilities[_local2] is snare_MC)))) || ((abilities[_local2] is landmine_MC)))) || ((abilities[_local2] is sludge_MC)))) || ((abilities[_local2] is toxicOoze_MC)))) || ((abilities[_local2] is oozinate_MC)))) || ((abilities[_local2] is tsunamiWater2_MC)))) || ((abilities[_local2] is vortex_MC)))) || ((abilities[_local2] is meteorCrater_MC)))) || ((abilities[_local2] is eruption_MC)))) || ((abilities[_local2] is eruptionHole_MC)))){
screen_mc.removeChild(_arg1);
abilities[_local2] = null;
return;
};
this.removeChild(_arg1);
abilities[_local2] = null;
};
_local2++;
};
}
public function allNPCsDead():Boolean{
var _local1:*;
_local1 = 0;
while (_local1 < enemies.length) {
if (enemies[_local1] != null){
return (false);
};
_local1++;
};
return (true);
}
public function goToPregame(_arg1:Event=null):void{
player = new playerData();
awardWon = (survivorsClearedPopup = (finalBattleCompleted = false));
daytime = true;
currentCategory = "";
changePopUp("", null);
changeScreen(globalVars.PREGAME, new pregame_MC());
}
public function popUpSaveNotification(_arg1:Event=null):void{
changePopUp(globalVars.GAME_SAVED, new gameSavedPopUp_MC());
}
public function unpauseBattle(_arg1:Event=null):void{
var _local2:*;
changePopUp("", null);
stage.focus = this;
pauseTimer = 15;
_local2 = 0;
while (_local2 < abilities.length) {
if (abilities[_local2] != null){
abilities[_local2].visible = true;
abilities[_local2].prevFrame();
abilities[_local2].play();
};
_local2++;
};
}
public function mouseUp(_arg1:MouseEvent=null):void{
mouseIsDown = false;
}
public function addedToStage(_arg1:Event=null):void{
stage.quality = StageQuality.MEDIUM;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUp);
if (forKongregate){
kongregate = new KongregateAPI();
this.addChild(kongregate);
};
}
public function findNearestEnemy(_arg1:Number, _arg2:Number, _arg3:Boolean=false):enemy{
var _local4:Number;
var _local5:enemy;
var _local6:*;
_local4 = 100000;
_local5 = null;
_local6 = 0;
while (_local6 < enemies.length) {
if (((!((enemies[_local6] == null))) && (!(enemies[_local6].isSurvivor)))){
if ((((Math.abs(Math.sqrt((Math.pow((enemies[_local6].y - _arg2), 2) + Math.pow((enemies[_local6].x - _arg1), 2)))) < _local4)) && (!(_arg3)))){
_local4 = Math.abs(Math.sqrt((Math.pow((enemies[_local6].y - _arg2), 2) + Math.pow((enemies[_local6].x - _arg1), 2))));
_local5 = enemies[_local6];
} else {
if ((((Math.abs(Math.sqrt((Math.pow((enemies[_local6].y - _arg2), 2) + Math.pow((enemies[_local6].x - _arg1), 2)))) < _local4)) && (((_arg3) && (!(enemies[_local6].hitByBallLightning)))))){
_local4 = Math.abs(Math.sqrt((Math.pow((enemies[_local6].y - _arg2), 2) + Math.pow((enemies[_local6].x - _arg1), 2))));
_local5 = enemies[_local6];
};
};
};
_local6++;
};
return (_local5);
}
public function changeScreen(_arg1:String, _arg2:MovieClip):void{
if (this.contains(screen_mc)){
screenSetUp("remove");
this.removeChild(screen_mc);
};
if (_arg1 == ""){
return;
};
this.addChildAt((screen_mc = _arg2), 1);
currentScreen = _arg1;
screenSetUp("add");
}
public function goToHighScores(_arg1:Event=null):void{
savePercent = player.getSavePercent();
kills = player.scoringArray[2];
damage = Math.abs(player.scoringArray[3]);
deaths = player.scoringArray[5];
apEarned = player.scoringArray[0];
upgrades = player.scoringArray[1];
awards = player.getNumberOfAwards();
days = player.scoringArray[4];
if (forKongregate){
kongregate.stats.submit("Deaths", deaths);
kongregate.stats.submit("Days", days);
kongregate.scores.submit(getFinalScore());
};
changePopUp("", null);
changeScreen(globalVars.HIGH_SCORES_SCREEN, new highScoresScreen_MC());
}
public function pauseBattle(_arg1:Event=null):void{
var _local2:*;
changePopUp(globalVars.BATTLE_PAUSED, new gamePausedPopUp_MC());
pauseTimer = 15;
_local2 = 0;
while (_local2 < abilities.length) {
if (abilities[_local2] != null){
abilities[_local2].visible = false;
abilities[_local2].stop();
};
_local2++;
};
}
public function setAbility(_arg1:Event=null):void{
var _local2:String;
var _local3:Number;
if (grabbedAbility_mc.icon_mc == undefined){
return;
};
if (mouseIsDown){
return;
};
_local2 = _arg1.target.name;
_local3 = Number(_local2.substring((_local2.indexOf("y") + 1), _local2.indexOf("_")));
player.abilityLoadout[_local3] = grabbedAbility_mc.icon_mc.currentLabel;
grabbedAbility_mc = new MovieClip();
updateAbilityIcons();
}
public function updateAbilityName(_arg1:String):void{
if (!this.contains(abilityInfo_mc)){
return;
};
abilityInfo_mc.damage_txt.text = player.getAbilityPowerString(_arg1);
if (player.getAbilityLevel(_arg1) >= 1){
abilityInfo_mc.cooldown_txt.text = (Number((player.getAbilityReload(_arg1) / 30)).toFixed(2) + "sec");
} else {
abilityInfo_mc.cooldown_txt.text = "???";
};
abilityInfo_mc.description_txt.text = player.getAbilityDescription(_arg1);
abilityInfo_mc.cost_txt.text = ("Cost: " + player.getAbilityCost(_arg1));
if (player.getAbilityCost(_arg1) > player.ap){
abilityInfo_mc.cost_txt.textColor = 0xFF0000;
};
if (player.getAbilityLevelString(_arg1) == "X"){
abilityInfo_mc.cost_txt.text = " -MAX LEVEL-";
abilityInfo_mc.cost_txt.textColor = 0xFF9900;
};
}
public function findNearestBallLightningTarget(_arg1:Number, _arg2:Number):enemy{
var _local3:enemy;
var _local4:Boolean;
_local3 = null;
_local4 = false;
while (!(_local4)) {
_local3 = findNearestEnemy(_arg1, _arg2, true);
if (_local3 != null){
_local3.hitByBallLightning = true;
_local4 = true;
} else {
if (_local3 == null){
_local4 = true;
};
};
};
return (_local3);
}
public function killSurvivor(_arg1:survivor):void{
addAbilityAt(_arg1.deathType, _arg1.x, _arg1.y);
if (_arg1.brainBombed){
addAbilityAt(globalVars.BRAIN_BOMB_EXPLOSION, _arg1.x, _arg1.y);
};
addAbilityAt(globalVars.SURVIVOR_KILLED, _arg1.x, _arg1.y);
player.areas[currentScreen].survivorsKilled++;
removeSurvivor(_arg1);
player.addAP(1);
player.addAffinity(-1);
if (player.areas[currentScreen].survivorsKilled == player.areas[currentScreen].survivorsTotal){
addAbilityAt(globalVars.SURVIVOR_KILL_BONUS, 0, 0);
} else {
if ((player.areas[currentScreen].survivorsSaved + player.areas[currentScreen].survivorsKilled) == player.areas[currentScreen].survivorsTotal){
addAbilityAt(globalVars.SURVIVOR_BONUS, 0, 0);
};
};
}
public function deleteGame(_arg1:Event=null):void{
var _local2:Number;
var _local3:SharedObject;
_local2 = 1;
_local3 = SharedObject.getLocal(("ApocalypseSave" + _local2));
_local3.clear();
changePopUp("", null);
}
public function moveAbilityTowardPoint(_arg1:MovieClip, _arg2:Point, _arg3:Number=5, _arg4:Boolean=false):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if ((_arg1 is fireball_MC)){
_arg3 = 8;
_arg4 = true;
};
if ((_arg1 is ballLightning_MC)){
_arg3 = 25;
_arg4 = false;
};
_arg3 = (_arg3 * globalBattleScale);
if (((!(_arg4)) && ((Math.abs(Math.sqrt((Math.pow((_arg1.y - _arg2.y), 2) + Math.pow((_arg1.x - _arg2.x), 2)))) < _arg3)))){
_arg3 = Math.abs(Math.sqrt((Math.pow((_arg1.y - _arg2.y), 2) + Math.pow((_arg1.x - _arg2.x), 2))));
};
_local5 = Math.atan(((_arg1.x - _arg2.x) / (_arg1.y - _arg2.y)));
_local6 = Math.abs((Math.sin(_local5) * _arg3));
_local7 = Math.abs((Math.cos(_local5) * _arg3));
if (!_arg4){
if (_arg1.x < _arg2.x){
_arg1.x = (_arg1.x + _local6);
} else {
if (_arg1.x > _arg2.x){
_arg1.x = (_arg1.x - _local6);
};
};
if (_arg1.y < _arg2.y){
_arg1.y = (_arg1.y + _local7);
} else {
if (_arg1.y > _arg2.y){
_arg1.y = (_arg1.y - _local7);
};
};
} else {
if (_arg2.x <= screen_mc.player_mc.x){
_arg1.x = (_arg1.x - _local6);
} else {
_arg1.x = (_arg1.x + _local6);
};
if (_arg2.y <= screen_mc.player_mc.y){
_arg1.y = (_arg1.y - _local7);
} else {
_arg1.y = (_arg1.y + _local7);
};
};
}
public function setQuality(_arg1:Event=null):void{
var _local2:String;
_local2 = stage.quality.toLocaleLowerCase();
if (_local2 == StageQuality.LOW){
stage.quality = StageQuality.MEDIUM;
} else {
if (_local2 == StageQuality.MEDIUM){
stage.quality = StageQuality.HIGH;
} else {
if (_local2 == StageQuality.HIGH){
stage.quality = StageQuality.LOW;
};
};
};
_arg1.target.label_txt.text = stage.quality;
}
public function goToAbilityDevelopment(_arg1:Event=null):void{
changePopUp("", null);
changeScreen(globalVars.ABILITY_DEVELOPMENT, new abilityScreen_MC());
changeAbilityCategory(null, "offensive");
}
public function abilityEffects(_arg1:MovieClip, _arg2:String, _arg3:Number=0):void{
switch (_arg2){
case globalVars.FLARE:
_arg1.takeDamage(player.getAbilityPower(globalVars.FLARE));
break;
case globalVars.AFFINITY_BLAST:
_arg1.takeDamage(player.getAbilityPower(globalVars.AFFINITY_BLAST));
break;
case globalVars.FLAME_SNAKE:
_arg1.takeDamage(0.5);
break;
case globalVars.FIREBALL:
_arg1.takeDamage(player.getAbilityPower(globalVars.FIREBALL));
break;
case globalVars.BOLT:
_arg1.takeDamage(player.getAbilityPower(globalVars.BOLT));
break;
case globalVars.BALL_LIGHTNING:
_arg1.takeDamage(player.getAbilityPower(globalVars.BALL_LIGHTNING));
break;
case globalVars.ANNIHILATOR:
_arg1.takeDamage(player.getAbilityPower(globalVars.ANNIHILATOR));
break;
case globalVars.EARTHQUAKE:
_arg1.takeDamage(1);
break;
case globalVars.TSUNAMI:
_arg1.takeDamage(player.getAbilityPower(globalVars.TSUNAMI));
if (_arg1.isSurvivor){
_arg1.scaleX = (_arg1.scaleY = globalBattleScale);
};
if ((((_arg1.y < (globalVars.STAGE_HEIGHT - 50))) && (!(_arg1.isBoss)))){
_arg1.y = (_arg1.y + (20 * globalBattleScale));
};
break;
case globalVars.LANDMINE:
_arg1.takeDamage(player.getAbilityPower(globalVars.LANDMINE));
break;
case globalVars.LANDMINE_EXPLOSION:
sounds[globalVars.LANDMINE_EXPLOSION].play();
break;
case globalVars.VAMPIRE_BITE:
if (_arg1.bitten){
return;
};
_arg1.bitten = true;
_arg1.takeDamage(player.getAbilityPower(globalVars.VAMPIRE_BITE));
addAbilityAt(globalVars.VAMPIRE_HEAL, 0, 0);
break;
case globalVars.SNARE:
_arg1.immobilized = player.getAbilityPower(globalVars.SNARE);
sounds[globalVars.SNARE_TRIPPED].play();
break;
case globalVars.PUDDLE:
if (_arg3 > 0){
_arg1.hp = (_arg1.hp - (_arg3 * 5));
};
break;
case globalVars.TOXIC_OOZE:
_arg1.poisoned = 150;
_arg1.poisonStrength = (player.getAbilityScale(globalVars.TOXIC_OOZE) / 5);
break;
case globalVars.OOZINATE:
_arg1.poisoned = 150;
_arg1.poisonStrength = (player.getAbilityScale(globalVars.OOZINATE) / 5);
break;
case globalVars.CRIPPLING_MIST:
_arg1.extraDamageTaken = (player.getAbilityPower(globalVars.CRIPPLING_MIST) / 75);
break;
case globalVars.PUSHBACK:
if (!_arg1.isBoss){
_arg1.maxPushbackMove = (_arg1.pushbackMove = player.getAbilityPower(globalVars.PUSHBACK));
};
break;
case globalVars.METEOR:
_arg1.takeDamage(player.getAbilityPower(globalVars.METEOR));
meteorTimer = 60;
break;
case globalVars.BRAIN_BOMB:
_arg1.brainBombed = true;
break;
case globalVars.BRAIN_BOMB_EXPLOSION:
_arg1.takeDamage(player.getAbilityPower(globalVars.BRAIN_BOMB));
break;
case globalVars.SUICIDE_EXPLOSION:
_arg1.takeDamage(1.5);
break;
case globalVars.ERUPTION:
_arg1.takeDamage(player.getAbilityPower(globalVars.FLARE));
break;
default:
break;
};
}
public function nextTip(_arg1:Event=null):void{
worldMapTipTimer = 150;
currentTip++;
if (currentTip >= globalVars.worldMapTips.length){
currentTip = 0;
};
}
public function setShadows(_arg1:Event=null):void{
globalVars.shadowsEnabled = !(globalVars.shadowsEnabled);
if (globalVars.shadowsEnabled){
_arg1.target.label_txt.text = "ON";
} else {
_arg1.target.label_txt.text = "OFF";
};
}
public function goToArea(_arg1:Event=null):void{
var _local2:String;
var _local3:*;
removeAreaName();
abilities = new Array();
abilityTargets = new Array();
abilityBooleans = new Array();
abilityNumbers = new Array();
delayedAbilities = new Array();
enemies = new Array();
enemySpawnList = new Array();
survivorSpawnList = new Array();
currentActivePlayerShadow = "Idle";
battleTimerStart = (battleTimer = (abilitiesIndex = (enemiesIndex = (enemySpawnPercent = (enemyMaxSpawnTimer = (survivorSpawnPercent = (daylight = (cloudCoverActive = (secondSunActive = 0)))))))));
flameSnakeTimer = (earthquakeTimer = (meteorTimer = (timeShiftTimer = (timeFreezeTimer = (levitateTimer = (survivorSafetyTimer = (vortexX = (vortexY = -1))))))));
awardWon = (bossOnScreen = false);
globalBattleScale = 1;
inBattle = true;
if (_arg1 != null){
_local2 = _arg1.target.name.substring(0, _arg1.target.name.indexOf("_"));
} else {
_local2 = globalVars.FINAL_BATTLE;
};
changePopUp("", null);
switch (_local2){
case globalVars.GREAT_PLAINS:
changeScreen(globalVars.GREAT_PLAINS, new greatPlainsArea_MC());
enemySpawnList = new Array(new enemy1_MC());
survivorSpawnList = new Array(new survivor1_MC());
enemySpawnPercent = 0.005;
enemyMaxSpawnTimer = 60;
survivorSpawnPercent = 0.0055;
battleTimerStart = (battleTimer = 1400);
break;
case globalVars.SAHARA_DESERT:
changeScreen(globalVars.SAHARA_DESERT, new sarahaDesertArea_MC());
enemySpawnList = new Array(new enemy1_MC(), new enemy1_MC(), new enemy1_MC(), new enemy2_MC(), new blackCrab_MC());
survivorSpawnList = new Array(new survivor1_MC());
enemySpawnPercent = 0.007;
enemyMaxSpawnTimer = 55;
survivorSpawnPercent = 0.005;
battleTimerStart = (battleTimer = 1400);
break;
case globalVars.CAIRO:
changeScreen(globalVars.CAIRO, new CairoArea_MC());
enemySpawnList = new Array(new enemy1_MC(), new enemy1_MC(), new blackCrab_MC(), new blackCrab_MC(), new enemy4_MC());
survivorSpawnList = new Array(new survivor1_MC(), new survivor1_MC(), new survivor2_MC());
enemySpawnPercent = 0.0085;
enemyMaxSpawnTimer = 45;
survivorSpawnPercent = 0.0075;
battleTimerStart = (battleTimer = 1600);
break;
case globalVars.PARIS:
changeScreen(globalVars.PARIS, new ParisArea_MC());
enemySpawnList = new Array(new frenchie1_MC(), new frenchie2_MC());
survivorSpawnList = new Array(new survivor1_MC(), new survivor2_MC());
enemySpawnPercent = 0.01;
enemyMaxSpawnTimer = 30;
survivorSpawnPercent = 0.025;
battleTimerStart = (battleTimer = 1800);
break;
case globalVars.FORT_BRAGG:
changeScreen(globalVars.FORT_BRAGG, new FortBraggArea_MC());
enemySpawnList = new Array(new greenBeretMelee_MC(), new greenBeretMelee_MC(), new greenBeretPistol_MC(), new greenBeretPistol_MC(), new greenBeret_MC());
survivorSpawnList = new Array(new survivor1_MC(), new survivor2_MC());
enemySpawnPercent = 0.003;
enemyMaxSpawnTimer = 50;
survivorSpawnPercent = 0.0035;
battleTimerStart = (battleTimer = 1800);
break;
case globalVars.MOSCOW:
changeScreen(globalVars.MOSCOW, new MoscowArea_MC());
enemySpawnList = new Array(new enemy4_MC(), new enemy4_MC(), new enemy5_MC(), new greenBeretMelee_MC(), new greenBeretPistol_MC());
survivorSpawnList = new Array(new survivor1_MC(), new survivor2_MC());
enemySpawnPercent = 0.015;
enemyMaxSpawnTimer = 30;
survivorSpawnPercent = 0.015;
battleTimerStart = (battleTimer = 1800);
break;
case globalVars.MUMBAI:
changeScreen(globalVars.MUMBAI, new MumbaiArea_MC());
enemySpawnList = new Array(new imposter1_MC(), new imposter1_MC(), new imposter2_MC(), new imposter2_MC(), new enemy5_MC());
survivorSpawnList = new Array(new survivor1_MC(), new survivor2_MC());
enemySpawnPercent = 0.04;
enemyMaxSpawnTimer = 25;
survivorSpawnPercent = 0.03;
battleTimerStart = (battleTimer = 1800);
globalBattleScale = 0.9;
break;
case globalVars.NYC:
changeScreen(globalVars.NYC, new NYCArea_MC());
enemySpawnList = new Array(new enemy6_MC(), new enemy6_MC(), new enemy7_MC(), new enemy8_MC(), new greenBeret_MC());
survivorSpawnList = new Array(new survivor1_MC(), new survivor2_MC());
enemySpawnPercent = 0.06;
enemyMaxSpawnTimer = 25;
survivorSpawnPercent = 0.03;
battleTimerStart = (battleTimer = 1800);
globalBattleScale = 0.8;
break;
case globalVars.TOKYO:
changeScreen(globalVars.TOKYO, new TokyoArea_MC());
enemySpawnList = new Array(new enemy1_MC(), new enemy1_MC(), new enemy1_MC(), new enemy7_MC(), new enemy8_MC(), new enemy8_MC(), new jetpackGuy1_MC(), new jetpackGuy2_MC());
survivorSpawnList = new Array(new survivor1_MC(), new survivor2_MC());
enemySpawnPercent = 0.1;
enemyMaxSpawnTimer = 20;
survivorSpawnPercent = 0.06;
battleTimerStart = (battleTimer = 1800);
globalBattleScale = 0.7;
break;
case globalVars.GALAPAGOS_ISLANDS:
changeScreen(globalVars.GALAPAGOS_ISLANDS, new GalapagosIslandsArea_MC());
enemySpawnList = new Array(new redCrab_MC(), new turtle_MC(), new bird_MC());
survivorSpawnList = new Array(new survivor3_MC());
enemySpawnPercent = 0.01;
enemyMaxSpawnTimer = 30;
survivorSpawnPercent = 0.002;
battleTimerStart = (battleTimer = 1800);
break;
case globalVars.FINAL_BATTLE:
changeScreen(globalVars.FINAL_BATTLE, new FinalArea_MC());
enemySpawnList = new Array(new demonCrab_MC(), new demonCrab_MC(), new knifer_MC(), new knifer_MC(), new machineGunner_MC(), new machineGunner_MC(), new rocketeer1_MC(), new rocketeer2_MC(), new wyvern_MC());
survivorSpawnList = new Array(new survivor1_MC());
enemySpawnPercent = 0.1;
enemyMaxSpawnTimer = 15;
survivorSpawnPercent = 0.001;
battleTimerStart = (battleTimer = 3600);
globalBattleScale = 0.5;
daytime = true;
break;
default:
inBattle = false;
battleTimerStart = (battleTimer = 0);
return;
};
var _local4 = player.scoringArray;
var _local5 = 4;
var _local6 = (_local4[_local5] + 1);
_local4[_local5] = _local6;
screen_mc.player_mc.scaleX = (screen_mc.player_mc.scaleX * globalBattleScale);
screen_mc.player_mc.scaleY = (screen_mc.player_mc.scaleY * globalBattleScale);
PLAYER_START_Y = screen_mc.player_mc.y;
PLAYER_LEVITATE_Y = (PLAYER_START_Y - (60 * globalBattleScale));
globalVars.enemyStopY = (screen_mc.player_mc.y + (globalVars.MIN_ENEMY_Y * globalBattleScale));
globalVars.survivorStopY = (screen_mc.player_mc.y + (globalVars.MIN_SURVIVOR_Y * globalBattleScale));
hidePlayerShadows();
player.resetReloadTimers();
updateAbilityIcons();
if (daytime){
screen_mc.removeChild(screen_mc.moon_mc);
} else {
screen_mc.removeChild(screen_mc.sun_mc);
};
screen_mc.player_mc.affinityOverlay_mc.gotoAndStop(Math.round((41 + ((player.affinity / globalVars.MAX_AFFINITY) * 40))));
if (((!((screen_mc.ground_mc == null))) && (screen_mc.contains(screen_mc.ground_mc)))){
screen_mc.ground_mc.cacheAsBitmap = true;
};
if (((!((screen_mc.props_mc == null))) && (screen_mc.contains(screen_mc.props_mc)))){
screen_mc.props_mc.cacheAsBitmap = true;
};
oozinateActivated = false;
if (globalVars.PASSIVE_ABILITIES_REQUIRED_IN_LOADOUT){
_local3 = 0;
while (_local3 < player.abilityLoadout.length) {
if (player.abilityLoadout[_local3] == globalVars.OOZINATE){
addAbilityAt(globalVars.OOZINATE, screen_mc.player_mc.x, (screen_mc.player_mc.y + (30 * globalBattleScale)));
oozinateActivated = true;
break;
};
_local3++;
};
} else {
if (player.getAbilityLevel(globalVars.OOZINATE) > 0){
addAbilityAt(globalVars.OOZINATE, screen_mc.player_mc.x, (screen_mc.player_mc.y + (30 * globalBattleScale)));
oozinateActivated = true;
};
};
}
public function changeAbilityCategory(_arg1:Event=null, _arg2:String=""):void{
var _local3:MovieClip;
if (currentCategory == ""){
popUpAbilityPrompt();
};
if (_arg1 != null){
_arg2 = _arg1.target.name.substring(0, _arg1.target.name.indexOf("_"));
} else {
_local3 = MovieClip(screen_mc.getChildByName((_arg2 + "_btn")));
_local3.onRollOut(null);
};
currentCategory = _arg2;
screenSetUp("remove");
screenSetUp("add");
}
public function displayAbilityName(_arg1:Event=null):void{
var _local2:String;
var _local3:Number;
var _local4:String;
if (_arg1 == null){
return;
};
if (this.contains(grabbedAbility_mc)){
return;
};
_local2 = _arg1.target.name;
_local3 = _local2.indexOf("_");
_local4 = _local2.substring(0, _local3);
abilityRollOut();
this.addChild((abilityInfo_mc = new abilityInfo_MC()));
abilityInfo_mc.label_txt.text = _local4;
updateAbilityName(_local4);
abilityInfo_mc.x = _arg1.target.x;
abilityInfo_mc.y = _arg1.target.y;
}
public function onEnterFrame(_arg1:Event=null):void{
var _local2:*;
var _local3:Boolean;
var _local4:Boolean;
var _local5:*;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Number;
var _local9:MovieClip;
var _local10:MovieClip;
var _local11:Array;
var _local12:*;
abilityReleaseTimer--;
if (mouseIsDown){
mouseDown();
};
if (globalVars.soundEnabled){
if (currentScreen == globalVars.MAIN_MENU){
if (((!(sounds[globalVars.MAIN_MENU].isPlaying())) || ((sounds[globalVars.MAIN_MENU].getPositionPercent() >= 0.8)))){
sounds[globalVars.MAIN_MENU].play(150);
};
} else {
sounds[globalVars.MAIN_MENU].stop();
};
};
if (currentScreen == globalVars.ABILITY_DEVELOPMENT){
if (currentCategory == "offensive"){
screen_mc.offensive_btn.gotoAndStop("over");
};
if (currentCategory == "support"){
screen_mc.support_btn.gotoAndStop("over");
};
if (currentCategory == "passive"){
screen_mc.passive_btn.gotoAndStop("over");
};
if (this.contains(grabbedAbility_mc)){
grabbedAbility_mc.alpha = 0.75;
grabbedAbility_mc.x = mouseX;
grabbedAbility_mc.y = mouseY;
if (!mouseIsDown){
releaseAbility();
};
};
if (abilityReleaseTimer == 0){
grabbedAbility_mc = new MovieClip();
};
} else {
if (currentScreen == globalVars.WORLD_MAP){
worldMapTipTimer++;
if (worldMapTipTimer >= 251){
worldMapTipTimer = 0;
screen_mc.tip_txt.alpha = 1;
} else {
if (worldMapTipTimer >= 200){
screen_mc.tip_txt.alpha = (screen_mc.tip_txt.alpha + 0.03);
screen_mc.tip_txt.text = globalVars.worldMapTips[currentTip];
} else {
if (worldMapTipTimer >= 150){
if (worldMapTipTimer == 150){
_local2 = Math.floor((Math.random() * globalVars.worldMapTips.length));
while (currentTip == _local2) {
_local2 = Math.floor((Math.random() * globalVars.worldMapTips.length));
};
currentTip = _local2;
};
screen_mc.tip_txt.alpha = (screen_mc.tip_txt.alpha - 0.03);
if (screen_mc.tip_txt.alpha < 0){
screen_mc.tip_txt.alpha = 0;
};
};
};
};
} else {
if (currentScreen == globalVars.SCORE_SCREEN){
_local3 = true;
if (savePercent < player.getSavePercent()){
savePercent = (savePercent + 0.6);
_local3 = false;
};
if (savePercent > player.getSavePercent()){
savePercent = player.getSavePercent();
};
if (kills < player.scoringArray[2]){
kills = (kills + 11);
_local3 = false;
};
if (kills > player.scoringArray[2]){
kills = player.scoringArray[2];
};
if (damage < Math.abs(player.scoringArray[3])){
damage = (damage + 6);
_local3 = false;
};
if (damage > Math.abs(player.scoringArray[3])){
damage = Math.abs(player.scoringArray[3]);
};
if (deaths < player.scoringArray[5]){
deaths++;
_local3 = false;
};
if (apEarned < player.scoringArray[0]){
apEarned = (apEarned + 151);
_local3 = false;
};
if (apEarned > player.scoringArray[0]){
apEarned = player.scoringArray[0];
};
if (upgrades < player.scoringArray[1]){
upgrades = (upgrades + 4);
_local3 = false;
};
if (upgrades > player.scoringArray[1]){
upgrades = player.scoringArray[1];
};
if (awards < player.getNumberOfAwards()){
awards++;
_local3 = false;
};
if (days < player.scoringArray[4]){
days++;
_local3 = false;
};
screen_mc.scores_txt.text = (((((((((((((((((((player.affinityTitle + "\n") + player.affinity) + "\n") + Number(savePercent).toFixed(1)) + "%\n") + kills) + "\n") + damage) + "\n") + deaths) + "\n") + apEarned) + "\n") + upgrades) + "\n") + awards) + "\n") + days) + "\n");
screen_mc.finalScore_txt.text = getFinalScore();
if (((_local3) && ((screen_mc.grade_mc.currentLabel == "start")))){
screen_mc.grade_mc.gotoAndPlay(getFinalGrade());
sounds[globalVars.GRADE].play(0);
};
} else {
if (inBattle){
_local4 = false;
if ((((((timeFreezeTimer > 0)) || ((currentPopUp == globalVars.BATTLE_PAUSED)))) || ((((timeShiftTimer > 0)) && (!(((timeShiftTimer % 3) == 0))))))){
_local4 = true;
};
if (!_local4){
battleTimer--;
stallEndBattle--;
if (battleTimer == 0){
player.areas[currentScreen].noDamageCounter++;
};
if ((((((battleTimer <= 0)) && (allNPCsDead()))) && ((stallEndBattle <= 0)))){
if (player.areas[currentScreen].noDamageCounter < 0){
player.areas[currentScreen].noDamageCounter = 0;
};
if ((((player.areas[currentScreen].noDamageCounter == 1)) && (!(player.areas[currentScreen].noDamage1)))){
player.areas[currentScreen].noDamage1 = true;
addAbilityAt(globalVars.NO_DAMAGE_BONUS1, 0, 0);
return;
};
if ((((player.areas[currentScreen].noDamageCounter == 2)) && (!(player.areas[currentScreen].noDamage2)))){
player.areas[currentScreen].noDamage2 = true;
addAbilityAt(globalVars.NO_DAMAGE_BONUS2, 0, 0);
return;
};
if ((((player.areas[currentScreen].noDamageCounter == 3)) && (!(player.areas[currentScreen].noDamage3)))){
player.areas[currentScreen].noDamage3 = true;
addAbilityAt(globalVars.NO_DAMAGE_BONUS3, 0, 0);
return;
};
endBattle();
daytime = !(daytime);
if (currentScreen == globalVars.FINAL_BATTLE){
finalBattleCompleted = true;
};
goToWorldMap();
return;
};
if (daytime){
globalVars.dayProgression = (100 - Math.round(((battleTimer / battleTimerStart) * 100)));
screen_mc.sun_mc.gotoAndStop((500 - Math.round(((battleTimer / battleTimerStart) * 500))));
} else {
globalVars.dayProgression = 2;
screen_mc.moon_mc.gotoAndStop((500 - Math.round(((battleTimer / battleTimerStart) * 500))));
};
if ((((cloudCoverActive > 30)) && ((daylight < 90)))){
daylight = 90;
} else {
if ((((cloudCoverActive > 30)) && ((daylight < 100)))){
daylight++;
} else {
if ((((cloudCoverActive > 30)) && ((daylight == 100)))){
daylight = daylight;
} else {
if ((((secondSunActive > 30)) && ((daylight > 50)))){
daylight--;
} else {
if ((((secondSunActive > 30)) && ((daylight < 50)))){
daylight++;
} else {
if (daylight > globalVars.dayProgression){
daylight--;
} else {
if (daylight < globalVars.dayProgression){
daylight++;
};
};
};
};
};
};
};
screen_mc.daylight_mc.gotoAndStop(daylight);
spawnTimer++;
if ((((((spawnTimer >= enemyMaxSpawnTimer)) || ((Math.random() <= enemySpawnPercent)))) && ((battleTimer > 0)))){
_local8 = Math.floor((Math.random() * enemySpawnList.length));
_local9 = new enemySpawnList[_local8].constructor();
if (((!(_local9.isBoss)) || (!(bossOnScreen)))){
if (_local9.isBoss){
bossOnScreen = true;
};
addEnemyAt(_local9, (globalVars.STAGE_WIDTH * Math.random()), (globalVars.STAGE_HEIGHT + 20));
if (spawnTimer >= enemyMaxSpawnTimer){
spawnTimer = 0;
};
};
};
if (currentScreen == globalVars.FINAL_BATTLE){
if (battleTimer == 3000){
addEnemyAt(new bossCrab_MC(), (globalVars.STAGE_WIDTH * Math.random()), (globalVars.STAGE_HEIGHT + 20));
};
if (battleTimer == 2100){
addEnemyAt(new bossCrab_MC(), (globalVars.STAGE_WIDTH * Math.random()), (globalVars.STAGE_HEIGHT + 20));
};
if (battleTimer == 1100){
addEnemyAt(new bossCrab_MC(), (globalVars.STAGE_WIDTH * Math.random()), (globalVars.STAGE_HEIGHT + 20));
};
};
if ((((((Math.random() <= survivorSpawnPercent)) && ((player.areas[currentScreen].survivorsRemaining > 0)))) && ((battleTimer > 0)))){
_local8 = Math.floor((Math.random() * survivorSpawnList.length));
_local10 = new survivorSpawnList[_local8].constructor();
addEnemyAt(_local10, (globalVars.STAGE_WIDTH * Math.random()), (globalVars.STAGE_HEIGHT + 20));
player.areas[currentScreen].survivorsRemaining--;
};
};
pauseTimer--;
if (((((keyboardArray[27]) && ((currentPopUp == "")))) && ((pauseTimer <= 0)))){
pauseBattle();
} else {
if (((((keyboardArray[27]) && (!((currentPopUp == ""))))) && ((pauseTimer <= 0)))){
unpauseBattle();
};
};
if (currentPopUp == globalVars.BATTLE_PAUSED){
return;
};
_local5 = 49;
while (_local5 <= 56) {
if (keyboardArray[_local5]){
currentAbilityIndex = (_local5 - 49);
};
currentAbility = player.abilityLoadout[currentAbilityIndex];
updateAbilityIcons();
_local5++;
};
player.update();
screen_mc.player_mc.affinityOverlay_mc.gotoAndStop(Math.round((41 + ((player.affinity / globalVars.MAX_AFFINITY) * 40))));
if (globalVars.shadowsEnabled){
if (screen_mc.player_mc.currentLabel == "Idle"){
currentActivePlayerShadow = "Idle";
};
_local5 = 0;
while (_local5 < globalVars.allPlayerShadows.length) {
screen_mc.player_mc.getChildByName((("shadow" + globalVars.allPlayerShadows[_local5]) + "_mc")).alpha = 0;
_local5++;
};
if (levitateTimer < 0){
screen_mc.player_mc.getChildByName((("shadow" + currentActivePlayerShadow) + "_mc")).gotoAndStop(Math.round(((battleTimer / battleTimerStart) * 180)));
screen_mc.player_mc.getChildByName((("shadow" + currentActivePlayerShadow) + "_mc")).alpha = 0.5;
screen_mc.player_mc.shadowAffinity_mc.gotoAndStop(Math.round(((battleTimer / battleTimerStart) * 180)));
screen_mc.player_mc.shadowAffinity_mc.shadow_mc.gotoAndStop(Math.round((41 + ((player.affinity / globalVars.MAX_AFFINITY) * 40))));
screen_mc.player_mc.shadowAffinity_mc.alpha = 0.5;
};
};
screen_mc.hp_txt.text = ("HP: " + player.hp);
screen_mc.ap_txt.text = ("AP: " + player.ap);
_local5 = 0;
while (_local5 < enemies.length) {
if (enemies[_local5] != null){
if (globalVars.shadowsEnabled){
if (daytime){
enemies[_local5].updateShadowOnAngle(screen_mc.sun_mc.sun.x, screen_mc.sun_mc.sun.y);
} else {
if (!daytime){
enemies[_local5].updateShadowOnAngle(screen_mc.moon_mc.moon.x, screen_mc.moon_mc.moon.y);
};
};
};
if (enemies[_local5].isSurvivor){
if (survivorSafetyTimer > 0){
enemies[_local5].invincible = true;
} else {
enemies[_local5].invincible = false;
};
};
if (((((!((vortexX == -1))) && (!((vortexY == -1))))) && (!(enemies[_local5].isBoss)))){
if (enemies[_local5].isSurvivor){
enemies[_local5].scaleX = (enemies[_local5].scaleY = globalBattleScale);
};
moveObjectTowardPoint(enemies[_local5], vortexX, vortexY, 10);
enemies[_local5].update(screen_mc.player_mc.x, (screen_mc.player_mc.y + 25), false);
} else {
enemies[_local5].update(screen_mc.player_mc.x, (screen_mc.player_mc.y + 25), !(_local4));
};
};
_local5++;
};
_local5 = 0;
while (_local5 < delayedAbilities.length) {
if (delayedAbilities[_local5] != null){
delayedAbilities[_local5].timer--;
addAbilityAt(delayedAbilities[_local5].ability, delayedAbilities[_local5].startX, delayedAbilities[_local5].startY, delayedAbilities[_local5].timer);
if (delayedAbilities[_local5].timer <= 0){
delayedAbilities[_local5] = null;
};
};
_local5++;
};
if (!inBattle){
return;
};
_local6 = false;
_local7 = false;
if (!_local4){
secondSunActive--;
cloudCoverActive--;
levitateTimer--;
};
flameSnakeTimer--;
earthquakeTimer--;
meteorTimer--;
timeShiftTimer--;
timeFreezeTimer--;
survivorSafetyTimer--;
if (flameSnakeTimer > 0){
addAbilityAt(globalVars.FLAME_SNAKE, mouseX, mouseY);
};
if ((((earthquakeTimer > 0)) || ((meteorTimer > 0)))){
if (earthquakeTimer > 0){
addAbilityAt(globalVars.EARTHQUAKE, 0, 0);
};
if (meteorTimer > 0){
addAbilityAt(globalVars.METEOR_EARTHQUAKE, 0, 0);
};
if (x == 0){
x = (x - 5);
} else {
if (x < 0){
x = (x + 10);
} else {
if (x > 0){
x = (x - 10);
};
};
};
} else {
x = (y = 0);
};
if (levitateTimer > 0){
addAbilityAt(globalVars.LEVITATE_EFFECT, 0, 0);
};
if ((((levitateTimer > 0)) && ((screen_mc.player_mc.y > PLAYER_LEVITATE_Y)))){
screen_mc.player_mc.y--;
};
if ((((levitateTimer < 0)) && ((screen_mc.player_mc.y < PLAYER_START_Y)))){
screen_mc.player_mc.y = (screen_mc.player_mc.y + 5);
};
updateBallLightning();
_local5 = 0;
while (_local5 < abilities.length) {
if (((((!((abilities[_local5] == null))) && ((abilities[_local5] is landmine_MC)))) && ((abilities[_local5].currentLabel == "explosion")))){
abilities[_local5].scaleX = (abilities[_local5].scaleY = player.getAbilityScale(globalVars.LANDMINE));
};
if (((!((abilities[_local5] == null))) && ((abilities[_local5] is meteorCrater_MC)))){
if (_local6){
abilities[_local5].play();
};
_local6 = true;
};
if (((!((abilities[_local5] == null))) && ((abilities[_local5] is annihilator_MC)))){
screen_mc.player_mc.getChildByName((("shadow" + currentActivePlayerShadow) + "_mc")).alpha = 0;
currentActivePlayerShadow = globalVars.FWD_HAND_SHADOW;
screen_mc.player_mc.gotoAndPlay("HandsFwd");
if (globalVars.shadowsEnabled){
if ((((levitateTimer < 0)) && (daytime))){
screen_mc.player_mc.getChildByName((("shadow" + currentActivePlayerShadow) + "_mc")).gotoAndStop(Math.round(((battleTimer / battleTimerStart) * 180)));
screen_mc.player_mc.getChildByName((("shadow" + currentActivePlayerShadow) + "_mc")).alpha = 1;
};
};
};
if (((!((abilities[_local5] == null))) && ((((((abilities[_local5] is puddle_MC)) || ((abilities[_local5] is tsunamiWater_MC)))) || ((abilities[_local5] is tsunamiWater2_MC)))))){
if (!abilityBooleans[_local5]){
_local11 = getAffectingAbilities(abilities[_local5]);
_local12 = 0;
while (_local12 < _local11.length) {
if ((((((abilities[_local5] is tsunamiWater_MC)) || ((abilities[_local5] is tsunamiWater2_MC)))) && ((_local11[_local12] is puddle_MC)))){
abilities[_local5].alpha = (abilities[_local5].alpha + 0.1);
_local11[_local12].alpha = 0;
} else {
if ((((((((abilities[_local5].currentLabel == "start")) && ((_local11[_local12] is bolt_MC)))) || ((_local11[_local12] is ballLightning_MC)))) || ((((_local11[_local12] is puddle_MC)) && ((_local11[_local12].currentLabel == "electrified")))))){
abilities[_local5].gotoAndPlay("electrified");
abilityBooleans[_local5] = true;
if (!sounds[globalVars.ELECTRIFY].isPlaying()){
sounds[globalVars.ELECTRIFY].play();
};
};
};
_local12++;
};
};
if (!_local4){
abilities[_local5].alpha = (abilities[_local5].alpha - 1E-5);
};
if (abilities[_local5].alpha == 0){
removeAbility(abilities[_local5]);
};
};
if (((((((((((!((abilities[_local5] == null))) && ((abilities[_local5] is secondSun_MC)))) && ((secondSunActive == 30)))) || (((((!((abilities[_local5] == null))) && ((abilities[_local5] is cloudCover_MC)))) && ((cloudCoverActive == 30)))))) || (((((!((abilities[_local5] == null))) && ((abilities[_local5] is timeShift_MC)))) && ((timeShiftTimer == 30)))))) || (((((!((abilities[_local5] == null))) && ((abilities[_local5] is timeFreeze_MC)))) && ((timeFreezeTimer == 30)))))){
abilities[_local5].gotoAndPlay("fade");
};
if (((!((abilities[_local5] == null))) && ((((((((((abilities[_local5] is sludge_MC)) || ((abilities[_local5] is toxicOoze_MC)))) || ((abilities[_local5] is cripplingMist_MC)))) || ((abilities[_local5] is vortex_MC)))) || ((abilities[_local5] is eruption_MC)))))){
var _local13 = abilityNumbers;
var _local14 = _local5;
var _local15 = (_local13[_local14] - 1);
_local13[_local14] = _local15;
if (abilityNumbers[_local5] <= 0){
abilities[_local5].play();
if ((abilities[_local5] is vortex_MC)){
sounds[globalVars.VORTEX].stop();
vortexX = (vortexY = -1);
};
};
};
if (((!((abilities[_local5] == null))) && (!((abilityTargets[_local5] == null))))){
moveAbilityTowardPoint(abilities[_local5], abilityTargets[_local5]);
};
if (((((((!((abilities[_local5] == null))) && (!((abilities[(_local5 - 1)] == null))))) && ((abilities[_local5] is rainStorm_MC)))) && ((abilities[_local5].currentLabel == "rain")))){
abilities[(_local5 - 1)].alpha = player.getAbilityPower(globalVars.RAIN_STORM);
};
if (((!((abilities[_local5] == null))) && ((abilities[_local5].currentLabel == "destroy")))){
removeAbility(abilities[_local5]);
};
_local5++;
};
clickedOnAbilityBTN = false;
};
};
};
};
}
public function goToSaveGameScreen(_arg1:Event=null):void{
changePopUp("", null);
changeScreen(globalVars.FILE_SCREEN_SAVE, new fileScreen_MC());
}
public function getFinalScore():Number{
return (Math.max(1, Math.round(((savePercent * 100) + ((((((((Math.abs((player.affinity * 100)) + (kills * 200)) - (damage * 70)) - (deaths * 1000)) + (apEarned * 8)) + (upgrades * 100)) + (awards * 1000)) - (Math.max(0, (days - 50)) * 10000)) / (days / 3))))));
}
public function killEnemy(_arg1:enemy):void{
addAbilityAt(_arg1.deathType, _arg1.x, _arg1.y);
if (_arg1.brainBombed){
addAbilityAt(globalVars.BRAIN_BOMB_EXPLOSION, _arg1.x, _arg1.y);
} else {
if (_arg1.bombActive){
addAbilityAt(globalVars.SUICIDE_EXPLOSION, _arg1.x, _arg1.y);
};
};
player.addAP(_arg1.ap);
var _local2 = player.scoringArray;
var _local3 = 2;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
if (forKongregate){
kongregate.stats.submit("EnemiesKilled", player.scoringArray[2]);
};
removeEnemy(_arg1);
stallEndBattle = 30;
player.areas[currentScreen].enemiesKilled++;
if (player.areas[currentScreen].enemiesKilled == 100){
addAbilityAt(globalVars.WARRIOR_BONUS, 0, 0);
};
}
public function mouseDown(_arg1:MouseEvent=null):void{
if (currentPopUp == globalVars.BATTLE_PAUSED){
return;
};
if (clickedOnAbilityBTN){
return;
};
mouseIsDown = true;
if (inBattle){
if (player.getAbilityReloadTimer(currentAbility) <= 0){
tempAbilityReps = player.getAbilityPower(currentAbility);
addAbilityAt(currentAbility, mouseX, mouseY);
};
};
}
public function setMusic(_arg1:Event=null):void{
globalVars.musicEnabled = !(globalVars.musicEnabled);
if (globalVars.musicEnabled){
_arg1.target.label_txt.text = "ON";
sounds[globalVars.BG_MUSIC].play(80, 1000);
} else {
_arg1.target.label_txt.text = "OFF";
sounds[globalVars.BG_MUSIC].stop();
};
}
public function goToLoadGameScreen(_arg1:Event=null):void{
changePopUp("", null);
changeScreen(globalVars.FILE_SCREEN, new fileScreen_MC());
}
public function removeLoadoutAbility(_arg1:Event=null):void{
var _local2:String;
var _local3:Number;
_local2 = _arg1.target.name;
_local3 = Number(_local2.substring((_local2.indexOf("y") + 1), _local2.indexOf("_")));
player.abilityLoadout[_local3] = "";
updateAbilityIcons();
}
public function changePopUp(_arg1:String, _arg2:MovieClip):void{
if (this.contains(popUp_mc)){
popUpSetUp("remove");
this.removeChild(popUp_mc);
};
currentPopUp = _arg1;
if (_arg1 == ""){
return;
};
this.addChildAt((popUp_mc = _arg2), 2);
popUpSetUp("add");
if (globalVars.soundEnabled){
sounds[globalVars.POP_UP].play();
};
}
public function goToWorldMap(_arg1:Event=null):void{
if (finalBattleCompleted){
inBattle = false;
if (currentPopUp == ""){
changePopUp(globalVars.GAME_CLEARED_POPUP, new gameClearedPopup_MC());
} else {
changePopUp("", null);
};
changeScreen(globalVars.SCORE_SCREEN, new scoreScreen_MC());
return;
};
inBattle = false;
changePopUp("", null);
changeScreen(globalVars.WORLD_MAP, new worldMap_MC());
if (!survivorsClearedPopup){
screen_mc.removeChild(screen_mc.FinalBattle_xxx_btn);
};
if (((awardWon) && (!(player.awardPopup)))){
player.awardPopup = true;
popUpAwardPrompt();
} else {
if (((!(survivorsClearedPopup)) && (player.clearedEachArea()))){
survivorsClearedPopup = true;
popUpSurvivorsCleared();
};
};
}
public function abilityRollOut(_arg1:Event=null):void{
if (this.contains(abilityInfo_mc)){
this.removeChild(abilityInfo_mc);
};
if (((mouseIsDown) && (!(this.contains(grabbedAbility_mc))))){
grabAbility(_arg1);
};
}
public function hidePlayerShadows():void{
var _local1:*;
var _local2:MovieClip;
if (!globalVars.shadowsEnabled){
_local1 = 0;
while (_local1 < globalVars.allPlayerShadows.length) {
_local2 = screen_mc.player_mc.getChildByName((("shadow" + globalVars.allPlayerShadows[_local1]) + "_mc"));
_local2.scaleX = (_local2.scaleY = (_local2.alpha = 0));
_local1++;
};
};
}
public function saveGame(_arg1:Event=null):void{
var _local2:Number;
var _local3:SharedObject;
_local2 = 1;
_local3 = SharedObject.getLocal(("ApocalypseSave" + _local2));
_local3.clear();
_local3.data.saved = true;
_local3.data.daytime = daytime;
_local3.data.hp = player.hp;
_local3.data.ap = player.ap;
_local3.data.scoringArray = player.scoringArray;
_local3.data.affinity = player.affinity;
_local3.data.awardPopup = player.awardPopup;
_local3.data.loadout = player.abilityLoadout;
_local3.data.abilitiesArray = player.saveAbilities();
_local3.data.areasArray = player.saveAreas();
_local3.flush();
changePopUp(globalVars.GAME_SAVED, new gameSavedPopUp_MC());
changeScreen(globalVars.WORLD_MAP, new worldMap_MC());
}
public function releaseAbility(_arg1:Boolean=true):void{
if (this.contains(grabbedAbility_mc)){
this.removeChild(grabbedAbility_mc);
};
if (_arg1){
abilityReleaseTimer = 1;
};
}
public function getAffectingAbilities(_arg1:MovieClip):Array{
var _local2:Array;
var _local3:*;
_local2 = new Array();
_local3 = 0;
while (_local3 < abilities.length) {
if (((!((abilities[_local3] == null))) && (_arg1.hitTestObject(abilities[_local3])))){
_local2.push(abilities[_local3]);
};
_local3++;
};
return (_local2);
}
public function damagePlayer(_arg1:Number):void{
var _local2:*;
if (globalVars.PASSIVE_ABILITIES_REQUIRED_IN_LOADOUT){
_local2 = 0;
while (_local2 < player.abilityLoadout.length) {
if (player.abilityLoadout[_local2] == globalVars.ARMOR){
if (_arg1 <= player.getAbilityPower(globalVars.ARMOR)){
return;
};
break;
};
_local2++;
};
} else {
if ((((player.getAbilityLevel(globalVars.ARMOR) > 0)) && ((_arg1 <= player.getAbilityPower(globalVars.ARMOR))))){
return;
};
};
player.areas[currentScreen].noDamageCounter = -1;
player.addHP(-(_arg1));
addAbilityAt(globalVars.DAMAGE, 0, 0);
abilities[(abilitiesIndex - 1)].damageAmt_txt.text = (("-" + _arg1) + " HP");
if (player.hp <= 0){
endBattle();
player.onDeath();
if (currentScreen == globalVars.FINAL_BATTLE){
player.hp = 50;
};
changeScreen(globalVars.WORLD_MAP, new worldMap_MC());
popUpOnDeathInfo();
};
}
public function popUpSetUp(_arg1:String):void{
if (_arg1 == "add"){
switch (currentPopUp){
case globalVars.YES_NO:
popUp_mc.yes_btn.label_txt.text = "YES";
popUp_mc.no_btn.label_txt.text = "NO";
popUp_mc.yes_btn.addEventListener("onRelease", goToMainMenu);
popUp_mc.no_btn.addEventListener("onRelease", goToWorldMap);
break;
case globalVars.ABILITY_PROMPT:
popUp_mc.ok_btn.label_txt.text = "OK";
popUp_mc.ok_btn.addEventListener("onRelease", goToAbilityDevelopment);
break;
case globalVars.AWARD_PROMPT:
popUp_mc.ok_btn.label_txt.text = "OK";
popUp_mc.ok_btn.addEventListener("onRelease", goToWorldMap);
break;
case globalVars.SURVIVORS_CLEAR_POPUP:
popUp_mc.ok_btn.label_txt.text = "OK";
popUp_mc.ok_btn.addEventListener("onRelease", goToWorldMap);
break;
case globalVars.DEATH_INFO:
popUp_mc.ok_btn.label_txt.text = "OK";
popUp_mc.ok_btn.addEventListener("onRelease", goToWorldMap);
break;
case globalVars.GAME_SAVED:
popUp_mc.ok_btn.label_txt.text = "OK";
popUp_mc.ok_btn.addEventListener("onRelease", goToWorldMap);
break;
case globalVars.DELETE_PROMPT:
popUp_mc.yes_btn.label_txt.text = "YES";
popUp_mc.no_btn.label_txt.text = "NO";
popUp_mc.yes_btn.addEventListener("onRelease", deleteGame);
popUp_mc.no_btn.addEventListener("onRelease", goToMainMenu);
break;
case globalVars.GAME_CLEARED_POPUP:
popUp_mc.ok_btn.label_txt.text = "OK";
popUp_mc.ok_btn.addEventListener("onRelease", goToWorldMap);
break;
default:
break;
};
} else {
if (_arg1 == "remove"){
switch (currentPopUp){
case globalVars.YES_NO:
popUp_mc.yes_btn.removeEventListener("onRelease", goToMainMenu);
popUp_mc.no_btn.removeEventListener("onRelease", goToWorldMap);
break;
case globalVars.ABILITY_PROMPT:
popUp_mc.ok_btn.removeEventListener("onRelease", goToAbilityDevelopment);
break;
case globalVars.AWARD_PROMPT:
popUp_mc.ok_btn.removeEventListener("onRelease", goToWorldMap);
break;
case globalVars.SURVIVORS_CLEAR_POPUP:
popUp_mc.ok_btn.removeEventListener("onRelease", goToWorldMap);
break;
case globalVars.DEATH_INFO:
popUp_mc.ok_btn.removeEventListener("onRelease", goToWorldMap);
break;
case globalVars.GAME_SAVED:
popUp_mc.ok_btn.removeEventListener("onRelease", goToWorldMap);
break;
case globalVars.DELETE_PROMPT:
popUp_mc.yes_btn.removeEventListener("onRelease", deleteGame);
popUp_mc.no_btn.removeEventListener("onRelease", goToMainMenu);
break;
case globalVars.GAME_CLEARED_POPUP:
popUp_mc.ok_btn.removeEventListener("onRelease", goToWorldMap);
break;
default:
break;
};
};
};
}
public function goToErrorScreen(_arg1:Event=null):void{
changePopUp("", null);
changeScreen(globalVars.ERROR_SCREEN, new errorScreen_MC());
}
public function popUpConfirmation(_arg1:Event=null):void{
changePopUp(globalVars.YES_NO, new yesNoPrompt_MC());
}
public function grabAbility(_arg1:Event=null):void{
var _local2:String;
var _local3:Number;
var _local4:String;
if (_arg1 == null){
return;
};
if (((!(globalVars.PASSIVE_ABILITIES_REQUIRED_IN_LOADOUT)) && ((currentCategory == "passive")))){
return;
};
_local2 = _arg1.target.name;
_local3 = _local2.indexOf("_");
_local4 = _local2.substring(0, _local3);
releaseAbility(false);
if (player.getAbilityLevel(_local4) == 0){
_local4 = globalVars.UNKNOWN;
};
if (_local4 == globalVars.UNKNOWN){
return;
};
this.addChild((grabbedAbility_mc = new grabbedAbility_MC()));
grabbedAbility_mc.icon_mc.gotoAndStop(_local4);
if (((!((_local4 == ""))) && (!((_local4 == globalVars.UNKNOWN))))){
grabbedAbility_mc.number_txt.text = player.getAbilityLevel(_local4);
};
}
public function updateBallLightning():void{
var _local1:*;
var _local2:enemy;
_local1 = 0;
while (_local1 < abilities.length) {
if (((!((abilities[_local1] == null))) && ((abilities[_local1] is ballLightning_MC)))){
_local2 = null;
if (Math.abs(Math.sqrt((Math.pow((abilities[_local1].y - abilityTargets[_local1].y), 2) + Math.pow((abilities[_local1].x - abilityTargets[_local1].x), 2)))) < (10 * globalBattleScale)){
_local2 = findNearestBallLightningTarget(abilities[_local1].x, abilities[_local1].y);
if (((((!((_local2 == null))) && ((_local2.y < (globalVars.STAGE_HEIGHT - 25))))) && ((Math.abs(Math.sqrt((Math.pow((abilities[_local1].y - _local2.y), 2) + Math.pow((abilities[_local1].x - _local2.x), 2)))) < (175 * globalBattleScale))))){
abilityTargets[_local1] = new Point(_local2.x, _local2.y);
abilities[_local1].stop();
} else {
if (_local2 == null){
if (((!((abilities[_local1].currentLabel == "fade"))) && (!((abilities[_local1].currentLabel == "destroy"))))){
abilities[_local1].gotoAndPlay("fade");
};
abilities[_local1].play();
};
};
};
};
_local1++;
};
}
public function changeAbility(_arg1:Event=null):void{
var _local2:String;
var _local3:Number;
clickedOnAbilityBTN = true;
mouseIsDown = false;
_local2 = _arg1.target.name;
_local3 = Number(_local2.substring((_local2.indexOf("_") - 1), _local2.indexOf("_")));
currentAbilityIndex = _local3;
currentAbility = player.abilityLoadout[currentAbilityIndex];
updateAbilityIcons();
}
public function goToMainMenu(_arg1:Event=null):void{
changePopUp("", null);
changeScreen(globalVars.MAIN_MENU, new mainMenu_MC());
}
public function addAbilityAt(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number=-1):void{
var _local5:String;
var _local6:String;
var _local7:Number;
var _local8:Number;
var _local9:delayedAbility;
var _local10:*;
var _local11:Number;
var _local12:Number;
if (_arg4 > 0){
return;
};
_local5 = "start";
_local6 = "";
switch (_arg1){
case globalVars.SURVIVOR_SAVED:
this.addChild((abilities[abilitiesIndex] = new survivorSaved_MC()));
abilities[abilitiesIndex].ap_txt.text = (("+" + currentSurvivorAP) + " AP!");
stallEndBattle = 30;
break;
case globalVars.SURVIVOR_KILLED:
this.addChild((abilities[abilitiesIndex] = new survivorKilled_MC()));
abilities[abilitiesIndex].ap_txt.text = "+1 AP!";
stallEndBattle = 30;
break;
case globalVars.SURVIVOR_BONUS:
this.addChild((abilities[abilitiesIndex] = new survivorBonus_MC()));
_local7 = Math.max(player.areas[currentScreen].survivorsSaved, player.areas[currentScreen].survivorsKilled);
abilities[abilitiesIndex].ap_txt.text = (("+" + (_local7 * 8)) + " AP!");
player.addAP((_local7 * 8));
stallEndBattle = 90;
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
awardWon = true;
if (_local7 == player.areas[currentScreen].survivorsSaved){
player.addAffinity(7);
} else {
if (_local7 == player.areas[currentScreen].survivorsKilled){
player.addAffinity(-7);
};
};
break;
case globalVars.SURVIVORS_SAVED_BONUS:
this.addChild((abilities[abilitiesIndex] = new survivorsSavedBonus_MC()));
abilities[abilitiesIndex].ap_txt.text = (("+" + (player.areas[currentScreen].survivorsSaved * 10)) + " AP");
player.addAP((player.areas[currentScreen].survivorsSaved * 10));
stallEndBattle = 90;
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
awardWon = true;
player.addAffinity(25);
break;
case globalVars.SURVIVOR_KILL_BONUS:
this.addChild((abilities[abilitiesIndex] = new survivorKillBonus_MC()));
abilities[abilitiesIndex].ap_txt.text = (("+" + (player.areas[currentScreen].survivorsKilled * 8)) + " AP");
player.addAP((player.areas[currentScreen].survivorsKilled * 8));
stallEndBattle = 90;
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
awardWon = true;
player.addAffinity(-25);
break;
case globalVars.WARRIOR_BONUS:
if (currentScreen == globalVars.FINAL_BATTLE){
return;
};
this.addChild((abilities[abilitiesIndex] = new warriorBonus_MC()));
abilities[abilitiesIndex].ap_txt.text = (("+" + 200) + " AP");
player.addAP(200);
stallEndBattle = 90;
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
awardWon = true;
break;
case globalVars.NO_DAMAGE_BONUS1:
if (currentScreen == globalVars.FINAL_BATTLE){
return;
};
this.addChild((abilities[abilitiesIndex] = new noDamageBonus1_MC()));
abilities[abilitiesIndex].ap_txt.text = "+25 AP";
player.addAP(25);
stallEndBattle = 90;
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
awardWon = true;
break;
case globalVars.NO_DAMAGE_BONUS2:
if (currentScreen == globalVars.FINAL_BATTLE){
return;
};
this.addChild((abilities[abilitiesIndex] = new noDamageBonus2_MC()));
abilities[abilitiesIndex].ap_txt.text = "+50 AP";
player.addAP(50);
stallEndBattle = 90;
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
awardWon = true;
break;
case globalVars.NO_DAMAGE_BONUS3:
if (currentScreen == globalVars.FINAL_BATTLE){
return;
};
this.addChild((abilities[abilitiesIndex] = new noDamageBonus3_MC()));
abilities[abilitiesIndex].ap_txt.text = "+75 AP";
player.addAP(75);
stallEndBattle = 90;
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
awardWon = true;
break;
case globalVars.ENEMY_DEATH:
this.addChild((abilities[abilitiesIndex] = new enemyDeath_MC()));
break;
case globalVars.ENEMY_BURNT:
this.addChild((abilities[abilitiesIndex] = new enemyBurnt_MC()));
break;
case globalVars.DAMAGE:
this.addChild((abilities[abilitiesIndex] = new damage_MC()));
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
break;
case globalVars.AFFINITY_BLAST:
if (player.affinity >= -1){
if (_arg4 == -1){
_local6 = "Yellow1";
};
player.playerAbilities[globalVars.AFFINITY_BLAST].power = (1 + Math.abs((player.affinity / 500)));
player.playerAbilities[globalVars.AFFINITY_BLAST].scale = (1 + (player.affinity / 80));
this.addChild((abilities[abilitiesIndex] = new affinityBlastGood_MC()));
} else {
if (player.affinity <= -2){
if (_arg4 == -1){
_local6 = "Black1";
};
player.playerAbilities[globalVars.AFFINITY_BLAST].power = (1 + Math.abs((player.affinity / 50)));
player.playerAbilities[globalVars.AFFINITY_BLAST].scale = 1;
this.addChild((abilities[abilitiesIndex] = new affinityBlastEvil_MC()));
};
};
break;
case globalVars.APOCALYPSE:
_local6 = "Black2";
currentActivePlayerShadow = globalVars.TWO_HAND_SHADOW;
screen_mc.player_mc.gotoAndPlay(_local6);
_local10 = 0;
while (_local10 < (player.playerAbilities[globalVars.APOCALYPSE].power * 6)) {
_local8 = (screen_mc.player_mc.y + 100);
_local9 = new delayedAbility(globalVars.AFFINITY_BLAST, ((_local10 * 10) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local9 = new delayedAbility(globalVars.AFFINITY_BLAST, ((_local10 * 10) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local9 = new delayedAbility(globalVars.AFFINITY_BLAST, ((_local10 * 10) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local9 = new delayedAbility(globalVars.AFFINITY_BLAST, ((_local10 * 10) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local10++;
};
if (player.playerAbilities[globalVars.APOCALYPSE].power >= 1){
addAbilityAt(globalVars.EARTHQUAKE, 0, 0);
};
if (player.playerAbilities[globalVars.APOCALYPSE].power >= 3){
_local9 = new delayedAbility(globalVars.METEOR, 60, 0, 0);
delayedAbilities.push(_local9);
};
if (player.playerAbilities[globalVars.APOCALYPSE].power >= 4){
_local9 = new delayedAbility(globalVars.TSUNAMI, 90, 0, 0);
delayedAbilities.push(_local9);
};
player.resetAbilityTimer(currentAbility);
return;
case globalVars.FLARE:
if (_arg4 == -1){
_local6 = "Red1";
};
this.addChild((abilities[abilitiesIndex] = new flare_MC()));
break;
case globalVars.FLARE_STORM:
_local6 = "Red2";
currentActivePlayerShadow = globalVars.TWO_HAND_SHADOW;
screen_mc.player_mc.gotoAndPlay(_local6);
_local10 = 0;
while (_local10 < player.getAbilityPower(globalVars.FLARE_STORM)) {
_local8 = (screen_mc.player_mc.y + 100);
_local9 = new delayedAbility(globalVars.FLARE, ((_local10 * 10) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local9 = new delayedAbility(globalVars.FLARE, ((_local10 * 10) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local9 = new delayedAbility(globalVars.FLARE, ((_local10 * 10) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local10++;
};
player.resetAbilityTimer(currentAbility);
return;
case globalVars.FLAME_SNAKE:
_local6 = "Red2";
this.addChild((abilities[abilitiesIndex] = new flameSnake_MC()));
if (flameSnakeTimer < 0){
flameSnakeTimer = player.getAbilityPower(globalVars.FLAME_SNAKE);
};
break;
case globalVars.FIREBALL:
_local6 = "Red2";
this.addChild((abilities[abilitiesIndex] = new fireball_MC()));
abilityTargets[abilitiesIndex] = new Point(_arg2, _arg3);
_local5 = "target";
break;
case globalVars.STORM_BOLTS:
_local6 = "Yellow2";
currentActivePlayerShadow = globalVars.TWO_HAND_SHADOW;
screen_mc.player_mc.gotoAndPlay(_local6);
_local10 = 0;
while (_local10 < player.getAbilityPower(globalVars.STORM_BOLTS)) {
_local8 = (screen_mc.player_mc.y + 150);
_local9 = new delayedAbility(globalVars.BOLT, ((_local10 * 7) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local10++;
};
player.resetAbilityTimer(currentAbility);
return;
case globalVars.BOLT:
if (_arg4 == 0){
addAbilityAt(globalVars.BOLT_GRAPHICS2, _arg2, _arg3);
} else {
_local6 = "Yellow1";
addAbilityAt(globalVars.BOLT_GRAPHICS, _arg2, _arg3);
};
this.addChild((abilities[abilitiesIndex] = new bolt_MC()));
break;
case globalVars.BOLT_GRAPHICS:
this.addChild((abilities[abilitiesIndex] = new boltGraphics_MC()));
_local10 = 0;
while (_local10 < abilities.length) {
if (((abilityBooleans[_local10]) && ((((((abilities[_local10] is puddle_MC)) || ((abilities[_local10] is tsunamiWater_MC)))) || ((abilities[_local10] is tsunamiWater2_MC)))))){
abilityBooleans[_local10] = false;
};
_local10++;
};
break;
case globalVars.BOLT_GRAPHICS2:
this.addChild((abilities[abilitiesIndex] = new boltGraphics2_MC()));
_local10 = 0;
while (_local10 < abilities.length) {
if (((abilityBooleans[_local10]) && ((((((abilities[_local10] is puddle_MC)) || ((abilities[_local10] is tsunamiWater_MC)))) || ((abilities[_local10] is tsunamiWater2_MC)))))){
abilityBooleans[_local10] = false;
};
_local10++;
};
break;
case globalVars.BALL_LIGHTNING:
_local6 = "Yellow2";
addAbilityAt(globalVars.BOLT_GRAPHICS, _arg2, _arg3);
this.addChild((abilities[abilitiesIndex] = new ballLightning_MC()));
abilityTargets[abilitiesIndex] = new Point(_arg2, _arg3);
_local10 = 0;
while (_local10 < enemies.length) {
if (((!((enemies[_local10] == null))) && (!(enemies[_local10].isSurvivor)))){
enemies[_local10].hitByBallLightning = false;
};
_local10++;
};
break;
case globalVars.ANNIHILATOR:
this.addChild((abilities[abilitiesIndex] = new annihilator_MC()));
_arg2 = screen_mc.player_mc.x;
_arg3 = (screen_mc.player_mc.y + ((30 * player.getAbilityScale(globalVars.ANNIHILATOR)) * globalBattleScale));
break;
case globalVars.EARTHQUAKE:
if (earthquakeTimer < 0){
earthquakeTimer = player.getAbilityPower(globalVars.EARTHQUAKE);
};
this.addChild((abilities[abilitiesIndex] = new earthquake_MC()));
_local6 = "Green2";
break;
case globalVars.METEOR_EARTHQUAKE:
this.addChild((abilities[abilitiesIndex] = new earthquake_MC()));
break;
case globalVars.METEOR:
addAbilityAt(globalVars.METEOR_CRATER, 0, 0);
this.addChild((abilities[abilitiesIndex] = new meteor_MC()));
_arg3 = 0;
_arg2 = _arg3;
_local6 = "Black2";
break;
case globalVars.METEOR_CRATER:
if (currentScreen == globalVars.FINAL_BATTLE){
return;
};
screen_mc.addChildAt((abilities[abilitiesIndex] = new meteorCrater_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
break;
case globalVars.TSUNAMI:
addAbilityAt(globalVars.TSUNAMI_GRAPHICS, 0, 0);
addAbilityAt(globalVars.TSUNAMI_WATER, 0, 0);
this.addChild((abilities[abilitiesIndex] = new tsunami_MC()));
_arg3 = 0;
_arg2 = _arg3;
break;
case globalVars.TSUNAMI_GRAPHICS:
screen_mc.addChildAt((abilities[abilitiesIndex] = new tsunamiGraphics_MC()), screen_mc.getChildIndex(screen_mc.skyDepth_mc));
_local6 = "Blue2";
break;
case globalVars.TSUNAMI_WATER:
if (currentScreen == globalVars.FINAL_BATTLE){
return;
};
if ((((((((currentScreen == globalVars.NYC)) || ((currentScreen == globalVars.PARIS)))) || ((currentScreen == globalVars.MUMBAI)))) || ((currentScreen == globalVars.GALAPAGOS_ISLANDS)))){
screen_mc.addChildAt((abilities[abilitiesIndex] = new tsunamiWater2_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
} else {
screen_mc.addChildAt((abilities[abilitiesIndex] = new tsunamiWater_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
};
abilities[abilitiesIndex].alpha = player.getAbilityPower(globalVars.TSUNAMI);
abilityBooleans[abilitiesIndex] = false;
break;
case globalVars.LANDMINE:
if (_arg3 < (screen_mc.player_mc.y + 70)){
_arg3 = (screen_mc.player_mc.y + 70);
};
screen_mc.addChildAt((abilities[abilitiesIndex] = new landmine_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
_local6 = "Black1";
break;
case globalVars.MINE_FIELD:
_local6 = "Black2";
currentActivePlayerShadow = globalVars.TWO_HAND_SHADOW;
screen_mc.player_mc.gotoAndPlay(_local6);
_local10 = 0;
while (_local10 < player.getAbilityPower(globalVars.MINE_FIELD)) {
_local8 = (screen_mc.player_mc.y + 150);
_local9 = new delayedAbility(globalVars.LANDMINE, ((_local10 * 5) + 1), (100 + (Math.random() * (globalVars.STAGE_WIDTH - 200))), (_local8 + (Math.random() * (globalVars.STAGE_HEIGHT - _local8))));
delayedAbilities.push(_local9);
_local10++;
};
player.resetAbilityTimer(currentAbility);
return;
case globalVars.SNARE:
if (_arg3 < (screen_mc.player_mc.y + 70)){
_arg3 = (screen_mc.player_mc.y + 70);
};
_local6 = "Green1";
screen_mc.addChildAt((abilities[abilitiesIndex] = new snare_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
break;
case globalVars.SLUDGE:
if (_arg3 < (screen_mc.player_mc.y + 70)){
_arg3 = (screen_mc.player_mc.y + 70);
};
_local6 = "Green1";
screen_mc.addChildAt((abilities[abilitiesIndex] = new sludge_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
abilityNumbers[abilitiesIndex] = player.getAbilityPower(globalVars.SLUDGE);
_arg3 = (_arg3 + ((player.getAbilityScale(globalVars.SLUDGE) * 25) * globalBattleScale));
break;
case globalVars.TOXIC_OOZE:
if (_arg3 < (screen_mc.player_mc.y + 70)){
_arg3 = (screen_mc.player_mc.y + 70);
};
_local6 = "Green2";
screen_mc.addChildAt((abilities[abilitiesIndex] = new toxicOoze_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
abilityNumbers[abilitiesIndex] = player.getAbilityPower(globalVars.TOXIC_OOZE);
_arg3 = (_arg3 + ((player.getAbilityScale(globalVars.TOXIC_OOZE) * 25) * globalBattleScale));
break;
case globalVars.OOZINATE:
if (oozinateActivated){
return;
};
screen_mc.addChildAt((abilities[abilitiesIndex] = new oozinate_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
abilityNumbers[abilitiesIndex] = 999999999;
_arg3 = (_arg3 + ((player.getAbilityScale(globalVars.OOZINATE) * 35) * globalBattleScale));
break;
case globalVars.VAMPIRE_BITE:
if (!isDark()){
return;
};
this.addChild((abilities[abilitiesIndex] = new vampireBite_MC()));
_local10 = 0;
while (_local10 < enemies.length) {
if (enemies[_local10] != null){
enemies[_local10].bitten = false;
};
_local10++;
};
_local6 = "Black1";
break;
case globalVars.CRIPPLING_MIST:
_local6 = "Blue2";
this.addChild((abilities[abilitiesIndex] = new cripplingMist_MC()));
abilityNumbers[abilitiesIndex] = player.getAbilityPower(globalVars.CRIPPLING_MIST);
break;
case globalVars.RAIN_STORM:
_arg2 = (_arg2 + (((Math.random() * -150) + 75) * globalBattleScale));
_arg3 = (_arg3 + (((Math.random() * -150) + 75) * globalBattleScale));
if ((((((((_arg2 < 0)) || ((_arg2 > globalVars.STAGE_WIDTH)))) || ((_arg3 < globalVars.enemyStopY)))) || ((_arg3 > globalVars.STAGE_HEIGHT)))){
tempAbilityReps = (tempAbilityReps - 0.05);
if (tempAbilityReps > 0){
addAbilityAt(_arg1, _arg2, _arg3);
} else {
return;
};
};
if (tempAbilityReps <= 0){
return;
};
addAbilityAt(globalVars.PUDDLE, _arg2, (_arg3 + 50));
this.addChild((abilities[abilitiesIndex] = new rainStorm_MC()));
tempAbilityReps = (tempAbilityReps - 0.1);
_local6 = "Blue1";
break;
case globalVars.PUDDLE:
screen_mc.addChildAt((abilities[abilitiesIndex] = new puddle_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
abilities[abilitiesIndex].alpha = -10;
abilities[abilitiesIndex].gotoAndStop("start");
abilityBooleans[abilitiesIndex] = false;
break;
case globalVars.SECOND_SUN:
if (secondSunActive > 0){
return;
};
if (cloudCoverActive > 30){
cloudCoverActive = 31;
};
screen_mc.addChildAt((abilities[abilitiesIndex] = new secondSun_MC()), screen_mc.getChildIndex(screen_mc.skyDepth_mc));
_arg2 = (globalVars.STAGE_WIDTH / 2);
_arg3 = 75;
secondSunActive = Math.round(player.getAbilityPower(globalVars.SECOND_SUN));
_local6 = "Yellow2";
break;
case globalVars.CLOUD_COVER:
if (cloudCoverActive > 0){
return;
};
if (secondSunActive > 30){
secondSunActive = 31;
};
screen_mc.addChildAt((abilities[abilitiesIndex] = new cloudCover_MC()), screen_mc.getChildIndex(screen_mc.skyDepth_mc));
_arg2 = (globalVars.STAGE_WIDTH / 2);
_arg3 = 75;
cloudCoverActive = Math.round(player.getAbilityPower(globalVars.CLOUD_COVER));
_local6 = "Black2";
break;
case globalVars.HEAL:
_local6 = "Green2";
this.addChild((abilities[abilitiesIndex] = new heal_MC()));
abilities[abilitiesIndex].healAmt_txt.text = (("+" + Math.floor(player.getAbilityPower(globalVars.HEAL))) + " HP");
player.addHP(Math.floor(player.getAbilityPower(globalVars.HEAL)));
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
break;
case globalVars.VAMPIRE_HEAL:
this.addChild((abilities[abilitiesIndex] = new heal_MC()));
abilities[abilitiesIndex].healAmt_txt.text = (("+" + Math.floor(player.getAbilityPower(globalVars.VAMPIRE_BITE))) + " HP");
player.addHP(Math.floor(player.getAbilityPower(globalVars.VAMPIRE_BITE)));
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
break;
case globalVars.PHOTOSYNTHESIS:
this.addChild((abilities[abilitiesIndex] = new heal_MC()));
abilities[abilitiesIndex].healAmt_txt.text = "+1 HP";
player.addHP(1);
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
break;
case globalVars.TIME_SHIFT:
this.addChild((abilities[abilitiesIndex] = new timeShift_MC()));
abilities[abilitiesIndex].stop();
_arg3 = 0;
_arg2 = _arg3;
timeShiftTimer = Math.round(player.getAbilityPower(globalVars.TIME_SHIFT));
_local6 = "Black2";
break;
case globalVars.TIME_FREEZE:
_local6 = "Blue2";
this.addChild((abilities[abilitiesIndex] = new timeFreeze_MC()));
abilities[abilitiesIndex].stop();
_arg3 = 0;
_arg2 = _arg3;
timeFreezeTimer = Math.round(player.getAbilityPower(globalVars.TIME_FREEZE));
break;
case globalVars.SURVIVOR_SAFETY:
survivorSafetyTimer = player.getAbilityPower(globalVars.SURVIVOR_SAFETY);
_local6 = "Blue2";
if (((!((sounds[_arg1] == null))) && (globalVars.soundEnabled))){
sounds[_arg1].play();
};
if (((!((_arg1 == globalVars.SURVIVOR_SAVED))) && (!((_arg4 == 0))))){
if (_local6 != ""){
if (_local6.search("1") != -1){
currentActivePlayerShadow = globalVars.ONE_HAND_SHADOW;
};
if (_local6.search("2") != -1){
currentActivePlayerShadow = globalVars.TWO_HAND_SHADOW;
};
if (_local6 == "HandsFwd"){
currentActivePlayerShadow = globalVars.FWD_HAND_SHADOW;
};
screen_mc.player_mc.gotoAndPlay(_local6);
};
player.resetAbilityTimer(_arg1);
};
return;
case globalVars.LEVITATE:
levitateTimer = player.getAbilityPower(globalVars.LEVITATE);
player.resetAbilityTimer(_arg1);
_local6 = "Blue1";
currentActivePlayerShadow = globalVars.ONE_HAND_SHADOW;
screen_mc.player_mc.gotoAndPlay(_local6);
return;
case globalVars.LEVITATE_EFFECT:
this.addChild((abilities[abilitiesIndex] = new levitateEffect_MC()));
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
break;
case globalVars.PUSHBACK:
this.addChild((abilities[abilitiesIndex] = new pushback_MC()));
_arg2 = screen_mc.player_mc.x;
_arg3 = screen_mc.player_mc.y;
_local6 = "HandsFwd";
break;
case globalVars.VORTEX:
if (((!((vortexX == -1))) || (!((vortexY == -1))))){
return;
};
if (_arg3 < (screen_mc.player_mc.y + 100)){
_arg3 = (screen_mc.player_mc.y + 100);
};
screen_mc.addChildAt((abilities[abilitiesIndex] = new vortex_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
abilityNumbers[abilitiesIndex] = player.getAbilityPower(globalVars.VORTEX);
vortexX = _arg2;
vortexY = _arg3;
_local6 = "Black2";
break;
case globalVars.BRAIN_BOMB:
this.addChild((abilities[abilitiesIndex] = new brainBomb_MC()));
_local6 = "Blue1";
break;
case globalVars.BRAIN_BOMB_EXPLOSION:
this.addChild((abilities[abilitiesIndex] = new brainBombExplosion_MC()));
abilities[abilitiesIndex].scaleX = (abilities[abilitiesIndex].scaleY = player.getAbilityScale(globalVars.BRAIN_BOMB));
break;
case globalVars.SUICIDE_EXPLOSION:
this.addChild((abilities[abilitiesIndex] = new Explosion_MC()));
abilities[abilitiesIndex].scaleX = (abilities[abilitiesIndex].scaleY = 1);
break;
case globalVars.ERUPTION:
if (_arg3 < (screen_mc.player_mc.y + 110)){
_arg3 = (screen_mc.player_mc.y + 110);
};
if (meteorTimer <= 0){
meteorTimer = 10;
};
_arg3 = (_arg3 + (80 * globalBattleScale));
addAbilityAt(globalVars.ERUPTION_HOLE, _arg2, _arg3);
_local6 = "Red2";
screen_mc.addChildAt((abilities[abilitiesIndex] = new eruption_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
abilityNumbers[abilitiesIndex] = player.getAbilityPower(globalVars.ERUPTION);
break;
case globalVars.ERUPTION_HOLE:
screen_mc.addChildAt((abilities[abilitiesIndex] = new eruptionHole_MC()), screen_mc.getChildIndex(screen_mc.terrainDepth_mc));
abilityNumbers[abilitiesIndex] = player.getAbilityPower(globalVars.ERUPTION);
break;
default:
return;
};
if (((!((sounds[_arg1] == null))) && (globalVars.soundEnabled))){
if (_arg1 == globalVars.FLAME_SNAKE){
if (((!(sounds[_arg1].isPlaying())) || ((sounds[_arg1].getPositionPercent() >= 0.8)))){
sounds[_arg1].play(150);
};
} else {
if ((((_arg1 == globalVars.EARTHQUAKE)) || ((_arg1 == globalVars.METEOR_EARTHQUAKE)))){
if (((!(sounds[_arg1].isPlaying())) || ((sounds[_arg1].getPositionPercent() >= 0.5)))){
sounds[_arg1].play(200);
};
} else {
if (_arg1 == globalVars.LEVITATE_EFFECT){
if (((!(sounds[_arg1].isPlaying())) || ((sounds[_arg1].getPositionPercent() >= 0.8)))){
sounds[_arg1].play(200);
};
} else {
if (_arg1 == globalVars.CRIPPLING_MIST){
sounds[_arg1].play(180);
} else {
sounds[_arg1].play();
};
};
};
};
};
if (((((!((player.playerAbilities[_arg1] == null))) && (!((_arg1 == globalVars.BRAIN_BOMB))))) && (!((_arg1 == globalVars.LANDMINE))))){
abilities[abilitiesIndex].scaleX = (abilities[abilitiesIndex].scaleY = player.getAbilityScale(_arg1));
};
if ((((_arg1 == globalVars.SECOND_SUN)) || ((_arg1 == globalVars.CLOUD_COVER)))){
abilities[abilitiesIndex].scaleX = (abilities[abilitiesIndex].scaleX * 0.8);
abilities[abilitiesIndex].scaleY = (abilities[abilitiesIndex].scaleY * 0.8);
} else {
if (((((((((((((((((((!((_arg1 == globalVars.BOLT_GRAPHICS))) && (!((_arg1 == globalVars.EARTHQUAKE))))) && (!((_arg1 == globalVars.TIME_SHIFT))))) && (!((_arg1 == globalVars.TIME_FREEZE))))) && (!((_arg1 == globalVars.TSUNAMI))))) && (!((_arg1 == globalVars.TSUNAMI_GRAPHICS))))) && (!((_arg1 == globalVars.TSUNAMI_WATER))))) && (!((_arg1 == globalVars.METEOR_EARTHQUAKE))))) && (!((_arg1 == globalVars.METEOR))))) && (!((_arg1 == globalVars.METEOR_CRATER))))){
abilities[abilitiesIndex].scaleX = (abilities[abilitiesIndex].scaleX * globalBattleScale);
abilities[abilitiesIndex].scaleY = (abilities[abilitiesIndex].scaleY * globalBattleScale);
};
};
if (_local5 == "start"){
abilities[abilitiesIndex].x = _arg2;
abilities[abilitiesIndex].y = _arg3;
} else {
if (_local5 == "target"){
abilities[abilitiesIndex].x = screen_mc.player_mc.x;
abilities[abilitiesIndex].y = (screen_mc.player_mc.y + 20);
_local11 = Math.atan(((abilities[abilitiesIndex].x - _arg2) / (abilities[abilitiesIndex].y - _arg3)));
_local12 = Math.round(((-(_local11) / Math.PI) * 180));
if (_arg3 <= abilities[abilitiesIndex].y){
_local12 = (_local12 + 180);
};
abilities[abilitiesIndex].rotation = _local12;
};
};
abilitiesIndex++;
if (((!((_arg1 == globalVars.SURVIVOR_SAVED))) && (!((_arg4 == 0))))){
if (_local6 != ""){
if (_local6.search("1") != -1){
currentActivePlayerShadow = globalVars.ONE_HAND_SHADOW;
};
if (_local6.search("2") != -1){
currentActivePlayerShadow = globalVars.TWO_HAND_SHADOW;
};
if (_local6 == "HandsFwd"){
currentActivePlayerShadow = globalVars.FWD_HAND_SHADOW;
};
screen_mc.player_mc.gotoAndPlay(_local6);
};
player.resetAbilityTimer(_arg1);
};
if ((((tempAbilityReps > 0)) && ((_arg1 == globalVars.RAIN_STORM)))){
addAbilityAt(_arg1, _arg2, _arg3);
};
}
public function keyUp(_arg1:KeyboardEvent):void{
keyboardArray[_arg1.keyCode] = false;
}
public function upgradeAbility(_arg1:Event=null):void{
var _local2:String;
var _local3:*;
_local2 = _arg1.target.name.substring(0, _arg1.target.name.indexOf("_"));
if (_local2 == ""){
return;
};
if (player.upgrade(_local2)){
if (player.getAbilityLevel(_local2) == 1){
if (((!((sounds[globalVars.LEARN_ABILITY] == null))) && (globalVars.soundEnabled))){
sounds[globalVars.LEARN_ABILITY].play();
};
_local3 = 0;
while (_local3 < player.abilityLoadout.length) {
if (((!(globalVars.PASSIVE_ABILITIES_REQUIRED_IN_LOADOUT)) && ((currentCategory == "passive")))){
break;
};
if (player.abilityLoadout[_local3] == ""){
player.abilityLoadout[_local3] = _local2;
updateAbilityIcons();
break;
};
_local3++;
};
} else {
if (((!((sounds[globalVars.UPGRADE_ABILITY] == null))) && (globalVars.soundEnabled))){
sounds[globalVars.UPGRADE_ABILITY].play();
};
};
screenSetUp("remove");
screenSetUp("add");
updateAbilityName(_local2);
} else {
if (((!((sounds[globalVars.CANT_UPGRADE] == null))) && (globalVars.soundEnabled))){
sounds[globalVars.CANT_UPGRADE].play(130);
};
};
releaseAbility();
}
public function updateAbilityIcons():void{
var _local1:*;
var _local2:MovieClip;
var _local3:Boolean;
var _local4:Boolean;
_local1 = 0;
while (_local1 < player.abilityLoadout.length) {
_local2 = MovieClip(screen_mc.getChildByName((("ability" + _local1) + "_btn")));
_local2.cooldown_mc.alpha = Math.max(Math.min(0.75, (player.getAbilityReloadTimer(player.abilityLoadout[_local1]) / 100)), 0);
_local2.cooldown_mc.reload_txt.text = (Math.ceil(((player.getAbilityReloadTimer(player.abilityLoadout[_local1]) / 30) * 2)) / 2);
_local2.cooldown_mc.reload_txt.alpha = 10;
_local2.highlight_mc.alpha = 0;
_local2.icon_mc.gotoAndStop(player.abilityLoadout[_local1]);
_local2.number_txt.text = String((_local1 + 1));
_local3 = false;
if ((((((player.abilityLoadout[_local1] == globalVars.LUNAR_POWER)) || ((player.abilityLoadout[_local1] == globalVars.LUNAR_ENERGY)))) || ((player.abilityLoadout[_local1] == globalVars.VAMPIRE_BITE)))){
_local3 = true;
};
if (((((_local3) && ((globalVars.dayProgression >= 0)))) && (!(isDark())))){
_local2.cooldown_mc.alpha = 0.75;
_local2.cooldown_mc.reload_txt.alpha = 0;
};
_local4 = false;
if ((((((player.abilityLoadout[_local1] == globalVars.SOLAR_POWER)) || ((player.abilityLoadout[_local1] == globalVars.SOLAR_ENERGY)))) || ((player.abilityLoadout[_local1] == globalVars.PHOTOSYNTHESIS)))){
_local4 = true;
};
if (((((_local4) && ((globalVars.dayProgression >= 0)))) && (isDark()))){
_local2.cooldown_mc.alpha = 0.75;
_local2.cooldown_mc.reload_txt.alpha = 0;
};
_local1++;
};
_local2 = MovieClip(screen_mc.getChildByName((("ability" + currentAbilityIndex) + "_btn")));
if (inBattle){
_local2.highlight_mc.alpha = 1;
};
}
public function removeEnemy(_arg1:enemy):void{
var _local2:*;
if (!this.contains(_arg1)){
return;
};
if (_arg1.isBoss){
bossOnScreen = false;
};
_local2 = 0;
while (_local2 < enemies.length) {
if (enemies[_local2] == _arg1){
screen_mc.removeChild(_arg1);
enemies[_local2] = null;
};
_local2++;
};
}
public function endBattle():void{
var _local1:*;
if (player.affinity >= -1){
player.playerAbilities[globalVars.AFFINITY_BLAST].power = (1 + Math.abs((player.affinity / 500)));
player.playerAbilities[globalVars.AFFINITY_BLAST].scale = (1 + (player.affinity / 80));
} else {
if (player.affinity <= -2){
player.playerAbilities[globalVars.AFFINITY_BLAST].power = (1 + Math.abs((player.affinity / 50)));
player.playerAbilities[globalVars.AFFINITY_BLAST].scale = 1;
};
};
_local1 = 0;
while (_local1 < enemies.length) {
if (((!((enemies[_local1] == null))) && ((enemies[_local1] is enemy)))){
removeEnemy(enemies[_local1]);
} else {
if (((!((enemies[_local1] == null))) && ((enemies[_local1] is survivor)))){
player.areas[currentScreen].survivorsRemaining++;
removeSurvivor(enemies[_local1]);
};
};
_local1++;
};
_local1 = 0;
while (_local1 < abilities.length) {
if (abilities[_local1] != null){
removeAbility(abilities[_local1]);
};
_local1++;
};
_local1 = 0;
while (_local1 < delayedAbilities.length) {
delayedAbilities[_local1] = null;
_local1++;
};
inBattle = false;
globalVars.dayProgression = -1;
player.resetReloadTimers();
x = 0;
if (forKongregate){
kongregate.stats.submit("Awards", player.getNumberOfAwards());
};
}
public function removeAreaName(_arg1:Event=null):void{
if (this.contains(destinationInfo_mc)){
this.removeChild(destinationInfo_mc);
};
}
public function screenSetUp(_arg1:String):void{
var _local2:Number;
var _local3:MovieClip;
var _local4:*;
var _local5:MovieClip;
var _local6:String;
if (_arg1 == "add"){
switch (currentScreen){
case globalVars.MAIN_MENU:
screen_mc.newGame_btn.label_txt.text = "NEW GAME";
screen_mc.loadGame_btn.label_txt.text = "CONTINUE";
screen_mc.options_btn.label_txt.text = "OPTIONS";
screen_mc.newGame_btn.addEventListener("onRelease", goToPregame);
screen_mc.loadGame_btn.addEventListener("onRelease", loadGame);
screen_mc.delete_btn.addEventListener("onRelease", popUpDeletePrompt);
screen_mc.options_btn.addEventListener("onRelease", goToOptions);
break;
case globalVars.FILE_SCREEN_SAVE:
screen_mc.back_btn.label_txt.text = "BACK";
screen_mc.file1_btn.label_txt.text = "FILE 1";
screen_mc.file2_btn.label_txt.text = "FILE 2";
screen_mc.file3_btn.label_txt.text = "FILE 3";
screen_mc.back_btn.addEventListener("onRelease", goToWorldMap);
screen_mc.file1_btn.addEventListener("onRelease", saveGame);
screen_mc.file2_btn.addEventListener("onRelease", saveGame);
screen_mc.file3_btn.addEventListener("onRelease", saveGame);
break;
case globalVars.FILE_SCREEN:
screen_mc.back_btn.label_txt.text = "BACK";
screen_mc.file1_btn.label_txt.text = "FILE 1";
screen_mc.file2_btn.label_txt.text = "FILE 2";
screen_mc.file3_btn.label_txt.text = "FILE 3";
screen_mc.back_btn.addEventListener("onRelease", goToMainMenu);
screen_mc.file1_btn.addEventListener("onRelease", loadGame);
screen_mc.file2_btn.addEventListener("onRelease", loadGame);
screen_mc.file3_btn.addEventListener("onRelease", loadGame);
break;
case globalVars.PREGAME:
screen_mc.back_btn.label_txt.text = "BACK";
screen_mc.start_btn.label_txt.text = "START GAME";
screen_mc.back_btn.addEventListener("onRelease", goToMainMenu);
screen_mc.start_btn.addEventListener("onRelease", goToWorldMap);
break;
case globalVars.OPTIONS:
screen_mc.quality_btn.label_txt.text = stage.quality;
if (globalVars.shadowsEnabled){
screen_mc.shadows_btn.label_txt.text = "ON";
} else {
screen_mc.shadows_btn.label_txt.text = "OFF";
};
if (globalVars.musicEnabled){
screen_mc.music_btn.label_txt.text = "ON";
} else {
screen_mc.music_btn.label_txt.text = "OFF";
};
if (globalVars.soundEnabled){
screen_mc.sound_btn.label_txt.text = "ON";
} else {
screen_mc.sound_btn.label_txt.text = "OFF";
};
screen_mc.back_btn.label_txt.text = "BACK";
screen_mc.quality_btn.addEventListener("onRelease", setQuality);
screen_mc.shadows_btn.addEventListener("onRelease", setShadows);
screen_mc.music_btn.addEventListener("onRelease", setMusic);
screen_mc.sound_btn.addEventListener("onRelease", setSound);
screen_mc.back_btn.addEventListener("onRelease", goToMainMenu);
break;
case globalVars.WORLD_MAP:
worldMapTipTimer = 0;
screen_mc.tip_txt.text = globalVars.worldMapTips[currentTip];
if (daytime){
screen_mc.dayNight_mc.stop();
} else {
screen_mc.dayNight_mc.gotoAndStop("night");
};
_local2 = 0;
if (player.affinity > 0){
_local2 = Math.min(player.affinity, globalVars.MAX_AFFINITY);
};
if (player.affinity < 0){
_local2 = Math.max(player.affinity, -(globalVars.MAX_AFFINITY));
};
screen_mc.affinityBar_mc.pointer_mc.x = ((screen_mc.affinityBar_mc.bar_mc.width / 2) + (((_local2 / globalVars.MAX_AFFINITY) * screen_mc.affinityBar_mc.bar_mc.width) / 2));
if ((player.affinity / globalVars.MAX_AFFINITY) <= -0.9){
screen_mc.affinityBar_mc.devil_mc.alpha = 0.5;
};
if ((player.affinity / globalVars.MAX_AFFINITY) >= 0.9){
screen_mc.affinityBar_mc.angel_mc.alpha = 0.5;
};
screen_mc.affinityBar_mc.title_txt.text = player.affinityTitle;
screen_mc.hp_txt.text = ("HP: " + player.hp);
screen_mc.ability_btn.label_txt.text = "ABILITIES";
screen_mc.save_btn.label_txt.text = "SAVE GAME";
screen_mc.back_btn.label_txt.text = "QUIT";
screen_mc.nextTip_btn.label_txt.text = "NEXT TIP";
screen_mc.ability_btn.addEventListener("onRelease", goToAbilityDevelopment);
screen_mc.save_btn.addEventListener("onRelease", saveGame);
screen_mc.back_btn.addEventListener("onRelease", popUpConfirmation);
screen_mc.nextTip_btn.addEventListener("onRelease", nextTip);
_local4 = 0;
while (_local4 < screen_mc.numChildren) {
if (((!((screen_mc.getChildAt(_local4) == null))) && ((screen_mc.getChildAt(_local4) is destination_BTN)))){
screen_mc.getChildAt(_local4).addEventListener("onRelease", goToArea);
screen_mc.getChildAt(_local4).addEventListener("onRollOver", displayAreaName);
screen_mc.getChildAt(_local4).addEventListener("onRollOut", removeAreaName);
};
_local4++;
};
break;
case globalVars.ABILITY_DEVELOPMENT:
updateAbilityIcons();
screen_mc.ap_txt.text = ("AP: " + player.ap);
screen_mc.offensive_btn.label_txt.text = "OFFENSIVE";
screen_mc.support_btn.label_txt.text = "SUPPORT";
screen_mc.passive_btn.label_txt.text = "PASSIVE";
screen_mc.back_btn.label_txt.text = "BACK";
screen_mc.offensive_btn.addEventListener("onRelease", changeAbilityCategory);
screen_mc.support_btn.addEventListener("onRelease", changeAbilityCategory);
screen_mc.passive_btn.addEventListener("onRelease", changeAbilityCategory);
screen_mc.back_btn.addEventListener("onRelease", goToWorldMap);
screen_mc.offensiveTree_mc.scaleX = (screen_mc.supportTree_mc.scaleX = (screen_mc.passiveTree_mc.scaleX = 0));
screen_mc.offensiveTree_mc.scaleY = (screen_mc.supportTree_mc.scaleY = (screen_mc.passiveTree_mc.scaleY = 0));
if ((((currentCategory == "")) || ((currentCategory == "offensive")))){
_local3 = screen_mc.offensiveTree_mc;
};
if (currentCategory == "support"){
_local3 = screen_mc.supportTree_mc;
};
if (currentCategory == "passive"){
_local3 = screen_mc.passiveTree_mc;
};
_local3.scaleX = (_local3.scaleY = 1);
_local4 = 0;
while (_local4 < _local3.numChildren) {
if (((!((_local3.getChildAt(_local4) == null))) && ((_local3.getChildAt(_local4) is abilityUpgrade_BTN)))){
_local5 = MovieClip(_local3.getChildAt(_local4));
_local6 = _local5.name.substring(0, _local5.name.indexOf("_"));
if (player.getAbilityLevel(_local6) == 0){
_local6 = globalVars.UNKNOWN;
};
_local5.icon_mc.gotoAndStop(_local6);
if (((!((_local6 == ""))) && (!((_local6 == globalVars.UNKNOWN))))){
_local5.number_txt.text = player.getAbilityLevelString(_local6);
};
_local5.addEventListener("onRelease", upgradeAbility);
_local5.addEventListener("onRollOver", displayAbilityName);
_local5.addEventListener("onRollOut", abilityRollOut);
};
_local4++;
};
_local4 = 0;
while (_local4 < screen_mc.numChildren) {
if (((!((screen_mc.getChildAt(_local4) == null))) && ((screen_mc.getChildAt(_local4) is ability_BTN)))){
screen_mc.getChildAt(_local4).addEventListener("onRollOver", setAbility);
screen_mc.getChildAt(_local4).addEventListener("onRelease", removeLoadoutAbility);
};
_local4++;
};
break;
case globalVars.SCORE_SCREEN:
savePercent = (kills = (damage = (deaths = (apEarned = (upgrades = (awards = (days = 0)))))));
screen_mc.grade_mc.stop();
screen_mc.submit_btn.label_txt.text = "SUBMIT";
screen_mc.submit_btn.addEventListener("onRelease", goToHighScores);
break;
case globalVars.HIGH_SCORES_SCREEN:
screen_mc.back_btn.label_txt.text = "QUIT";
screen_mc.back_btn.addEventListener("onRelease", goToMainMenu);
if (forKongregate){
kongregate.scores.requestList(showKongregateLeaderboard);
};
break;
case globalVars.ERROR_SCREEN:
screen_mc.back_btn.label_txt.text = "OK";
screen_mc.back_btn.addEventListener("onRelease", goToMainMenu);
break;
default:
if (inBattle){
_local4 = 0;
while (_local4 < screen_mc.numChildren) {
if (((!((screen_mc.getChildAt(_local4) == null))) && ((screen_mc.getChildAt(_local4) is ability_BTN)))){
screen_mc.getChildAt(_local4).addEventListener("onPress", changeAbility);
};
_local4++;
};
};
break;
};
} else {
if (_arg1 == "remove"){
switch (currentScreen){
case globalVars.MAIN_MENU:
screen_mc.newGame_btn.removeEventListener("onRelease", goToPregame);
screen_mc.loadGame_btn.removeEventListener("onRelease", loadGame);
screen_mc.delete_btn.removeEventListener("onRelease", popUpDeletePrompt);
screen_mc.options_btn.removeEventListener("onRelease", goToOptions);
break;
case globalVars.FILE_SCREEN_SAVE:
screen_mc.back_btn.removeEventListener("onRelease", goToWorldMap);
screen_mc.file1_btn.removeEventListener("onRelease", saveGame);
screen_mc.file2_btn.removeEventListener("onRelease", saveGame);
screen_mc.file3_btn.removeEventListener("onRelease", saveGame);
break;
case globalVars.FILE_SCREEN:
screen_mc.back_btn.removeEventListener("onRelease", goToMainMenu);
screen_mc.file1_btn.removeEventListener("onRelease", loadGame);
screen_mc.file2_btn.removeEventListener("onRelease", loadGame);
screen_mc.file3_btn.removeEventListener("onRelease", loadGame);
break;
case globalVars.PREGAME:
screen_mc.back_btn.removeEventListener("onRelease", goToMainMenu);
screen_mc.start_btn.removeEventListener("onRelease", goToWorldMap);
break;
case globalVars.OPTIONS:
screen_mc.quality_btn.removeEventListener("onRelease", setQuality);
screen_mc.shadows_btn.removeEventListener("onRelease", setShadows);
screen_mc.music_btn.removeEventListener("onRelease", setMusic);
screen_mc.sound_btn.removeEventListener("onRelease", setSound);
screen_mc.back_btn.removeEventListener("onRelease", goToMainMenu);
break;
case globalVars.WORLD_MAP:
screen_mc.ability_btn.removeEventListener("onRelease", goToAbilityDevelopment);
screen_mc.save_btn.removeEventListener("onRelease", saveGame);
screen_mc.back_btn.removeEventListener("onRelease", goToMainMenu);
screen_mc.nextTip_btn.removeEventListener("onRelease", nextTip);
_local4 = 0;
while (_local4 < screen_mc.numChildren) {
if (((!((screen_mc.getChildAt(_local4) == null))) && ((screen_mc.getChildAt(_local4) is destination_BTN)))){
screen_mc.getChildAt(_local4).removeEventListener("onRelease", goToArea);
screen_mc.getChildAt(_local4).removeEventListener("onRollOver", displayAreaName);
screen_mc.getChildAt(_local4).removeEventListener("onRollOut", removeAreaName);
};
_local4++;
};
break;
case globalVars.ABILITY_DEVELOPMENT:
screen_mc.offensive_btn.removeEventListener("onRelease", changeAbilityCategory);
screen_mc.support_btn.removeEventListener("onRelease", changeAbilityCategory);
screen_mc.passive_btn.removeEventListener("onRelease", changeAbilityCategory);
screen_mc.back_btn.removeEventListener("onRelease", goToWorldMap);
if (currentCategory == "offensive"){
_local3 = screen_mc.offensiveTree_mc;
};
if (currentCategory == "support"){
_local3 = screen_mc.supportTree_mc;
};
if (currentCategory == "passive"){
_local3 = screen_mc.passiveTree_mc;
};
_local4 = 0;
while (_local4 < _local3.numChildren) {
if (((!((_local3.getChildAt(_local4) == null))) && ((_local3.getChildAt(_local4) is abilityUpgrade_BTN)))){
_local5 = MovieClip(_local3.getChildAt(_local4));
_local5.removeEventListener("onRelease", upgradeAbility);
_local5.removeEventListener("onRollOver", displayAbilityName);
_local5.removeEventListener("onRollOut", abilityRollOut);
};
_local4++;
};
_local4 = 0;
while (_local4 < screen_mc.numChildren) {
if (((!((screen_mc.getChildAt(_local4) == null))) && ((screen_mc.getChildAt(_local4) is ability_BTN)))){
screen_mc.getChildAt(_local4).removeEventListener("onRollOver", setAbility);
screen_mc.getChildAt(_local4).removeEventListener("onRelease", removeLoadoutAbility);
};
_local4++;
};
break;
case globalVars.SCORE_SCREEN:
screen_mc.submit_btn.removeEventListener("onRelease", goToHighScores);
break;
case globalVars.HIGH_SCORES_SCREEN:
screen_mc.back_btn.removeEventListener("onRelease", goToMainMenu);
break;
case globalVars.ERROR_SCREEN:
screen_mc.back_btn.removeEventListener("onRelease", goToMainMenu);
break;
default:
if (inBattle){
_local4 = 0;
while (_local4 < screen_mc.numChildren) {
if (((!((screen_mc.getChildAt(_local4) == null))) && ((screen_mc.getChildAt(_local4) is ability_BTN)))){
screen_mc.getChildAt(_local4).removeEventListener("onPress", changeAbility);
};
_local4++;
};
};
break;
};
};
};
}
public function removeSurvivor(_arg1:survivor):void{
var _local2:*;
if (!this.contains(_arg1)){
return;
};
_local2 = 0;
while (_local2 < enemies.length) {
if (enemies[_local2] == _arg1){
screen_mc.removeChild(_arg1);
enemies[_local2] = null;
};
_local2++;
};
}
public function popUpSurvivorsCleared(_arg1:Event=null):void{
changePopUp(globalVars.SURVIVORS_CLEAR_POPUP, new survivorsClearedPopup_MC());
}
public function displayAreaName(_arg1:Event=null):void{
var _local2:String;
var _local3:Number;
var _local4:String;
var _local5:String;
if (_arg1 == null){
return;
};
_local2 = _arg1.target.name;
_local3 = _local2.indexOf("_");
_local4 = _local2.substring(0, _local3);
_local5 = _local2.substring((_local3 + 1), _local2.indexOf("_", (_local3 + 1)));
removeAreaName();
this.addChild((destinationInfo_mc = new destinationInfo_MC()));
destinationInfo_mc.label_txt.text = _local4;
if (_local4 == globalVars.GREAT_PLAINS){
destinationInfo_mc.label_txt.text = "The Great Plains";
};
if (_local4 == globalVars.SAHARA_DESERT){
destinationInfo_mc.label_txt.text = "The Sahara Desert";
};
if (_local4 == globalVars.FORT_BRAGG){
destinationInfo_mc.label_txt.text = "Fort Bragg";
};
if (_local4 == globalVars.GALAPAGOS_ISLANDS){
destinationInfo_mc.label_txt.text = "Galapagos Islands";
};
destinationInfo_mc.difficulty_txt.text = (_local5 + " / 100");
if (_local5 == "xxx"){
destinationInfo_mc.difficulty_txt.text = "???";
};
destinationInfo_mc.saved_txt.text = (player.areas[_local4].survivorsSaved + " Saved");
destinationInfo_mc.killed_txt.text = (player.areas[_local4].survivorsKilled + " Killed");
destinationInfo_mc.remaining_txt.text = (player.areas[_local4].survivorsRemaining + " Remaining");
destinationInfo_mc.neutral_mc.alpha = (destinationInfo_mc.angel_mc.alpha = 0);
destinationInfo_mc.devil_mc.alpha = (destinationInfo_mc.warrior_mc.alpha = 0);
destinationInfo_mc.noDamage1_mc.alpha = (destinationInfo_mc.noDamage2_mc.alpha = (destinationInfo_mc.noDamage3_mc.alpha = 0));
if (_local4 != globalVars.FINAL_BATTLE){
if (player.areas[_local4].enemiesKilled >= 100){
destinationInfo_mc.warrior_mc.alpha = 1;
};
if (player.areas[_local4].survivorsRemaining == 0){
if (player.areas[_local4].survivorsKilled == 0){
destinationInfo_mc.angel_mc.alpha = 1;
} else {
if (player.areas[_local4].survivorsSaved == 0){
destinationInfo_mc.devil_mc.alpha = 1;
} else {
destinationInfo_mc.neutral_mc.alpha = 1;
};
};
};
if (player.areas[_local4].noDamage1){
destinationInfo_mc.noDamage1_mc.alpha = 1;
};
if (player.areas[_local4].noDamage2){
destinationInfo_mc.noDamage2_mc.alpha = 2;
};
if (player.areas[_local4].noDamage3){
destinationInfo_mc.noDamage3_mc.alpha = 3;
};
destinationInfo_mc.noAwards_mc.alpha = 1;
if ((((((((((((((destinationInfo_mc.neutral_mc.alpha == 1)) || ((destinationInfo_mc.angel_mc.alpha == 1)))) || ((destinationInfo_mc.devil_mc.alpha == 1)))) || ((destinationInfo_mc.warrior_mc.alpha == 1)))) || ((destinationInfo_mc.noDamage1_mc.alpha == 1)))) || ((destinationInfo_mc.noDamage2_mc.alpha == 1)))) || ((destinationInfo_mc.noDamage3_mc.alpha == 1)))){
destinationInfo_mc.noAwards_mc.alpha = 0;
};
} else {
destinationInfo_mc.noAwards_mc.alpha = 0;
};
destinationInfo_mc.x = _arg1.target.x;
destinationInfo_mc.y = _arg1.target.y;
}
public function saveSurvivor(_arg1:survivor):void{
player.areas[currentScreen].survivorsSaved++;
currentSurvivorAP = _arg1.ap;
player.addAP(currentSurvivorAP);
addAbilityAt(globalVars.SURVIVOR_SAVED, _arg1.x, _arg1.y);
removeSurvivor(_arg1);
player.addAffinity(1);
if (forKongregate){
kongregate.stats.submit("SavePercent", player.getSavePercent());
};
if (player.areas[currentScreen].survivorsSaved == player.areas[currentScreen].survivorsTotal){
addAbilityAt(globalVars.SURVIVORS_SAVED_BONUS, 0, 0);
} else {
if ((player.areas[currentScreen].survivorsSaved + player.areas[currentScreen].survivorsKilled) == player.areas[currentScreen].survivorsTotal){
addAbilityAt(globalVars.SURVIVOR_BONUS, 0, 0);
};
};
}
public function keyDown(_arg1:KeyboardEvent):void{
keyboardArray[_arg1.keyCode] = true;
}
public function showKongregateLeaderboard(_arg1:Object):void{
var _local2:*;
if (((((!(forKongregate)) || ((_arg1.list == null)))) || (!(_arg1.success)))){
goToErrorScreen();
return;
};
screen_mc.scores_txt.text = "";
_local2 = 0;
while (_local2 < _arg1.list.length) {
if (_arg1.list[_local2] == null){
return;
};
screen_mc.scores_txt.text = (screen_mc.scores_txt.text + (((_arg1.list[_local2].username + " - ") + _arg1.list[_local2].score) + "\n"));
_local2++;
};
}
public function popUpOnDeathInfo(_arg1:Event=null):void{
changePopUp(globalVars.DEATH_INFO, new deathInfo_MC());
}
public function popUpAwardPrompt(_arg1:Event=null):void{
changePopUp(globalVars.AWARD_PROMPT, new awardPrompt_MC());
}
public function setSound(_arg1:Event=null):void{
globalVars.soundEnabled = !(globalVars.soundEnabled);
if (globalVars.soundEnabled){
_arg1.target.label_txt.text = "ON";
} else {
_arg1.target.label_txt.text = "OFF";
};
}
public function mouseWheel(_arg1:MouseEvent=null):void{
var _local2:Boolean;
var _local3:*;
return;
if (_local2){
return;
};
if (_arg1.delta > 0){
currentAbilityIndex++;
while (player.abilityLoadout[currentAbilityIndex] == "") {
currentAbilityIndex++;
};
};
if (_arg1.delta < 0){
currentAbilityIndex--;
while (player.abilityLoadout[currentAbilityIndex] == "") {
currentAbilityIndex--;
};
};
if (currentAbilityIndex >= player.abilityLoadout.length){
currentAbilityIndex = 0;
while (player.abilityLoadout[currentAbilityIndex] == "") {
currentAbilityIndex++;
};
};
if (currentAbilityIndex < 0){
currentAbilityIndex = (player.abilityLoadout.length - 1);
while (player.abilityLoadout[currentAbilityIndex] == "") {
currentAbilityIndex--;
};
};
currentAbility = player.abilityLoadout[currentAbilityIndex];
}
public function goToOptions(_arg1:Event=null):void{
changePopUp("", null);
changeScreen(globalVars.OPTIONS, new options_MC());
}
public function popUpAbilityPrompt(_arg1:Event=null):void{
changePopUp(globalVars.ABILITY_PROMPT, new abilityPrompt_MC());
}
public function moveObjectTowardPoint(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (Math.abs(Math.sqrt((Math.pow((_arg1.y - _arg3), 2) + Math.pow((_arg1.x - _arg2), 2)))) <= _arg4){
return;
};
_local5 = Math.atan(((_arg1.x - _arg2) / (_arg1.y - _arg3)));
_local6 = Math.abs((Math.sin(_local5) * _arg4));
_local7 = Math.abs((Math.cos(_local5) * _arg4));
if (_arg1.x < _arg2){
_arg1.x = (_arg1.x + _local6);
} else {
if (_arg1.x > _arg2){
_arg1.x = (_arg1.x - _local6);
};
};
if (_arg1.y < _arg3){
_arg1.y = (_arg1.y + _local7);
} else {
if (_arg1.y > _arg3){
_arg1.y = (_arg1.y - _local7);
};
};
}
public function isDark():Boolean{
if (cloudCoverActive > 0){
return (true);
};
if (secondSunActive > 0){
return (false);
};
if ((((daylight < 10)) || ((daylight > 90)))){
return (true);
};
return (false);
}
public function getFinalGrade():String{
if (getFinalScore() > 120000){
return ("A");
};
if (getFinalScore() > 90000){
return ("B");
};
if (getFinalScore() > 70000){
return ("C");
};
if (getFinalScore() > 50000){
return ("D");
};
return ("F");
}
public function addEnemyAt(_arg1:MovieClip, _arg2:Number, _arg3:Number):MovieClip{
var _local4:*;
if (_arg1.flying){
screen_mc.addChildAt((enemies[enemiesIndex] = _arg1), screen_mc.getChildIndex(screen_mc.flyingEnemyDepth_mc));
} else {
screen_mc.addChildAt((enemies[enemiesIndex] = _arg1), screen_mc.getChildIndex(screen_mc.enemyDepth_mc));
};
enemies[enemiesIndex].x = _arg2;
enemies[enemiesIndex].y = _arg3;
if (enemies[enemiesIndex].isSurvivor){
if (globalVars.PASSIVE_ABILITIES_REQUIRED_IN_LOADOUT){
_local4 = 0;
while (_local4 < player.abilityLoadout.length) {
if (player.abilityLoadout[_local4] == globalVars.SURVIVOR_MAGNET){
enemies[enemiesIndex].speed = (enemies[enemiesIndex].speed + player.getAbilityPower(globalVars.SURVIVOR_MAGNET));
break;
};
_local4++;
};
_local4 = 0;
while (_local4 < player.abilityLoadout.length) {
if (player.abilityLoadout[_local4] == globalVars.SAVIOR){
enemies[enemiesIndex].hp = (enemies[enemiesIndex].hp + player.getAbilityPower(globalVars.SAVIOR));
break;
};
_local4++;
};
} else {
if (player.getAbilityLevel(globalVars.SURVIVOR_MAGNET) > 0){
enemies[enemiesIndex].speed = (enemies[enemiesIndex].speed + player.getAbilityPower(globalVars.SURVIVOR_MAGNET));
};
if (player.getAbilityLevel(globalVars.SAVIOR) > 0){
enemies[enemiesIndex].hp = (enemies[enemiesIndex].hp + player.getAbilityPower(globalVars.SAVIOR));
};
};
};
enemiesIndex++;
enemies[(enemiesIndex - 1)].scaleX = (enemies[(enemiesIndex - 1)].scaleX * globalBattleScale);
enemies[(enemiesIndex - 1)].scaleY = (enemies[(enemiesIndex - 1)].scaleY * globalBattleScale);
enemies[(enemiesIndex - 1)].range = (enemies[(enemiesIndex - 1)].range * globalBattleScale);
enemies[(enemiesIndex - 1)].speed = (enemies[(enemiesIndex - 1)].speed * globalBattleScale);
return (enemies[(enemiesIndex - 1)]);
}
public function popUpDeletePrompt(_arg1:Event=null):void{
var _local2:SharedObject;
_local2 = SharedObject.getLocal("ApocalypseSave1");
if (_local2 == null){
return;
};
if (!_local2.data.saved){
return;
};
changePopUp(globalVars.DELETE_PROMPT, new deletePrompt_MC());
}
public function loadGame(_arg1:Event=null):void{
var _local2:Number;
var _local3:SharedObject;
_local2 = 1;
_local3 = SharedObject.getLocal(("ApocalypseSave" + _local2));
if (_local3 == null){
return;
};
if (!_local3.data.saved){
return;
};
player = new playerData();
if (_local3.data.daytime != null){
daytime = _local3.data.daytime;
};
if (_local3.data.hp != null){
player.hp = _local3.data.hp;
};
if (_local3.data.ap != null){
player.ap = _local3.data.ap;
};
if (_local3.data.scoringArray != null){
player.scoringArray = _local3.data.scoringArray;
};
if (_local3.data.affinity != null){
player.affinity = _local3.data.affinity;
};
if (_local3.data.awardPopup != null){
player.awardPopup = _local3.data.awardPopup;
};
if (_local3.data.loadout != null){
player.abilityLoadout = _local3.data.loadout;
};
if (_local3.data.abilitiesArray != null){
player.loadAbilities(_local3.data.abilitiesArray);
};
if (_local3.data.areasArray != null){
player.loadAreas(_local3.data.areasArray);
};
player.addAffinity(0);
currentCategory = "offensive";
survivorsClearedPopup = (finalBattleCompleted = false);
goToWorldMap();
}
}
}//package apocalypseClasses
Section 11
//globalVars (apocalypseClasses.globalVars)
package apocalypseClasses {
import flash.display.*;
public class globalVars {
public static var AFFINITY_BLAST:String = "AffinityBlast";
public static var ERUPTION_HOLE:String = "eruptionHole";
public static var enemyStopY:Number;
public static var SUICIDE_EXPLOSION:String = "suicideExplosion";
public static var SECOND_SUN:String = "SecondSun";
public static var AFFINITY_SHADOW:String = "Affinity";
public static var LUNAR_ENERGY:String = "LunarEnergy";
public static var FORT_BRAGG:String = "FortBragg";
public static var game:MovieClip;
public static var BRAIN_BOMB_EXPLOSION:String = "brainBombExplosion";
public static var MAIN_MENU:String = "mainMenu";
public static var UNKNOWN:String = "unknown";
public static var MUMBAI:String = "Mumbai";
public static var MIN_ENEMY_Y:Number = 30;
public static var ABILITY_PROMPT:String = "abilityPrompt";
public static var SURVIVOR_SAFETY:String = "SurvivorSafety";
public static var LUNAR_POWER:String = "LunarPower";
public static var SAHARA_DESERT:String = "SaharaDesert";
public static var YES_NO:String = "Yes/No";
public static var FWD_HAND_SHADOW:String = "Fwd";
public static var TSUNAMI_GRAPHICS:String = "tsunamiGraphics";
public static var TOKYO:String = "Tokyo";
public static var TIME_FREEZE:String = "TimeFreeze";
public static var APOCALYPSE:String = "Apocalypse";
public static var RAIN_STORM:String = "RainStorm";
public static var SNARE_TRIPPED:String = "SnareTripped";
public static var allAreas:Array = new Array(GREAT_PLAINS, SAHARA_DESERT, NYC, PARIS, CAIRO, FORT_BRAGG, MUMBAI, TOKYO, GALAPAGOS_ISLANDS, MOSCOW, FINAL_BATTLE);
public static var BRAIN_BOMB:String = "BrainBomb";
public static var HIGH_SCORES_SCREEN:String = "highScoresScreen";
public static var shadowsEnabled:Boolean = true;
public static var TIME_SHIFT:String = "TimeShift";
public static var ONE_HAND_SHADOW:String = "1hand";
public static var DELETE_PROMPT:String = "deletePrompt";
public static var OPTIONS:String = "options";
public static var BALL_LIGHTNING:String = "BallLightning";
public static var FIRE_MASTER:String = "FireMaster";
public static var GAME_CLEARED_POPUP:String = "gameCleared";
public static var FILE_SCREEN:String = "fileScreen";
public static var BATTLE_PAUSED:String = "battlePaused";
public static var BOLT:String = "Bolt";
public static var WARRIOR_BONUS:String = "warriorBonus";
public static var ERROR_SCREEN:String = "errorScreen";
public static var allAbilities:Array = new Array("", FLARE, BOLT, FLARE_STORM, STORM_BOLTS, RAIN_STORM, LANDMINE, FIREBALL, SOLAR_ENERGY, LUNAR_ENERGY, SOLAR_POWER, LUNAR_POWER, PHOTOSYNTHESIS, HEAL, FLAME_SNAKE, FIRE_MASTER, BOLT_MASTER, BALL_LIGHTNING, ANNIHILATOR, VAMPIRE_BITE, SECOND_SUN, CLOUD_COVER, ARMOR, TIME_SHIFT, TIME_FREEZE, LEVITATE, EARTHQUAKE, SNARE, TSUNAMI, SLUDGE, TOXIC_OOZE, SURVIVOR_MAGNET, SAVIOR, OOZINATE, CRIPPLING_MIST, PUSHBACK, VORTEX, BRAIN_BOMB, METEOR, ERUPTION, MINE_FIELD, AFFINITY_BLAST, APOCALYPSE, SURVIVOR_SAFETY);
public static var VAMPIRE_BITE:String = "VampireBite";
public static var LANDMINE_EXPLOSION:String = "LandmineExplosion";
public static var VORTEX:String = "Vortex";
public static var ENEMY_DEATH:String = "enemyDeath";
public static var LANDMINE:String = "Landmine";
public static var SURVIVOR_KILL_BONUS:String = "survivorKillBonus";
public static var worldMapTips:Array = new Array("Pay attention to the difficulties of areas. Don't walk into a location that you're not prepared for!", "If you use a lightning ability on water, it will become electrified and damage survivors and enemies.", "Killing survivors will lower your affinity, saving them will raise it.", "If you are experiencing slow down while in battle, lowering the graphics quality in 'Options' will help.", "Revisit areas to gain AP and get stronger before going to the more difficult areas.", "Most support abilities are useful for saving survivors.", "Affinity is a rating of how good or evil you are. The way you look will reflect this.", "You can hold down the left mouse button instead of clicking over and over when using abilities.", "When an enemy is poisoned, a green skull and crossbones will appear over its head.", "Once a passive ability is learned, it is always in effect. It does not need to be added to your loadout.", "If you're low on health, invest in the Heal, Vampire Bite, and Photosynthesis abilities to regain some HP.", "If an enemy is carrying a bomb, walking through water will extinguish the fuse.", "The Affinity Blast ability will not hurt survivors if you are on the 'good' side of the affinity scale.", "Killing survivors will lower your affinity, making you evil. Saving them will raise it, making you good.");
public static var EARTHQUAKE:String = "Earthquake";
public static var ENEMY_BURNT:String = "enemyBurnt";
public static var SURVIVOR_MAGNET:String = "SurvivorMagnet";
public static var SURVIVORS_CLEAR_POPUP:String = "survivorsClearedPopup";
public static var SCORE_SCREEN:String = "scoreScreen";
public static var SOLAR_POWER:String = "SolarPower";
public static var MOSCOW:String = "Moscow";
public static var NO_DAMAGE_BONUS1:String = "noDamageBonus1";
public static var NO_DAMAGE_BONUS2:String = "noDamageBonus2";
public static var NO_DAMAGE_BONUS3:String = "noDamageBonus3";
public static var CLOUD_COVER:String = "CloudCover";
public static var WORLD_MAP:String = "worldMap";
public static var OOZINATE:String = "Oozinate";
public static var FLAME_SNAKE:String = "FlameSnake";
public static var BOLT_GRAPHICS:String = "boltGraphics";
public static var FLARE_STORM:String = "FlareStorm";
public static var SOLAR_ENERGY:String = "SolarEnergy";
public static var METEOR_CRATER:String = "meteorCrater";
public static var PREGAME:String = "pregame";
public static var STAGE_WIDTH:Number = 800;
public static var PUSHBACK:String = "Pushback";
public static var GALAPAGOS_ISLANDS:String = "GalapagosIslands";
public static var SURVIVORS_SAVED_BONUS:String = "survivorsSavedBonus";
public static var allPlayerShadows:Array = new Array("Idle", ONE_HAND_SHADOW, TWO_HAND_SHADOW, FWD_HAND_SHADOW, AFFINITY_SHADOW);
public static var ERUPTION:String = "Eruption";
public static var ARMOR:String = "Armor";
public static var SAVIOR:String = "Savior";
public static var CAIRO:String = "Cairo";
public static var FILE_SCREEN_SAVE:String = "fileScreenSave";
public static var TOXIC_OOZE:String = "ToxicOoze";
public static var FIREBALL:String = "Fireball";
public static var PASSIVE_ABILITIES_REQUIRED_IN_LOADOUT:Boolean = false;
public static var METEOR_EARTHQUAKE:String = "meteorEarthquake";
public static var soundEnabled:Boolean = true;
public static var TSUNAMI:String = "Tsunami";
public static var ELECTRIFY:String = "electrify";
public static var BOLT_MASTER:String = "BoltMaster";
public static var survivorStopY:Number;
public static var TWO_HAND_SHADOW:String = "2hand";
public static var CANT_UPGRADE:String = "CantUpgrade";
public static var ABILITY_DEVELOPMENT:String = "abilityDevelopment";
public static var POP_UP:String = "PopUp";
public static var PARIS:String = "Paris";
public static var DAMAGE:String = "damage";
public static var musicEnabled:Boolean = true;
public static var SURVIVOR_BONUS:String = "survivorBonus";
public static var STORM_BOLTS:String = "StormBolts";
public static var MIN_SURVIVOR_Y:Number = 0;
public static var PUDDLE:String = "puddle";
public static var dayProgression:Number;
public static var TSUNAMI_WATER:String = "tsunamiWater";
public static var LEVITATE:String = "Levitate";
public static var BG_MUSIC:String = "bg";
public static var SLUDGE:String = "Sludge";
public static var ANNIHILATOR:String = "Annihilator";
public static var VAMPIRE_HEAL:String = "VampireHeal";
public static var PHOTOSYNTHESIS:String = "Photosynthesis";
public static var AWARD_PROMPT:String = "awardPrompt";
public static var STAGE_HEIGHT:Number = 600;
public static var METEOR:String = "Meteor";
public static var FLARE:String = "Flare";
public static var CRIPPLING_MIST:String = "CripplingMist";
public static var GRADE:String = "GradeGiven";
public static var DEATH_INFO:String = "deathInfo";
public static var FINAL_BATTLE:String = "FinalBattle";
public static var MAX_AFFINITY:Number = 500;
public static var UPGRADE_ABILITY:String = "UpgradeAbility";
public static var BUTTON_HOVER:String = "ButtonHover";
public static var NYC:String = "NYC";
public static var BOLT_GRAPHICS2:String = "boltGraphics2";
public static var SURVIVOR_SAVED:String = "survivorSaved";
public static var GAME_SAVED:String = "gameSaved";
public static var MAX_HP:Number = 150;
public static var LEVITATE_EFFECT:String = "levitateEffect";
public static var HEAL:String = "Heal";
public static var SURVIVOR_KILLED:String = "survivorKilled";
public static var MINE_FIELD:String = "MineField";
public static var SNARE:String = "Snare";
public static var GREAT_PLAINS:String = "GreatPlains";
public static var LEARN_ABILITY:String = "LearnAbility";
}
}//package apocalypseClasses
Section 12
//playerData (apocalypseClasses.playerData)
package apocalypseClasses {
public class playerData {
public var areas:Array;
public var hp:Number;// = 0
public var scoringArray:Array;
public var awardPopup:Boolean;// = false
public var affinityTitle:String;// = "Neutral"
public var abilityLoadout:Array;
public var playerAbilities:Array;
public var affinity:Number;// = 0
public var ap:Number;// = 0
public function playerData(){
var _local1:*;
hp = 0;
ap = 0;
affinity = 0;
affinityTitle = "Neutral";
awardPopup = false;
scoringArray = new Array(0, 0, 0, 0, 0, 0);
areas = new Array();
playerAbilities = new Array();
super();
hp = 20;
ap = (scoringArray[0] = 50);
scoringArray[1] = 1;
affinity = 0;
addAffinity(0);
abilityLoadout = new Array(globalVars.FLARE, "", "", "", "", "", "", "");
areas[globalVars.GREAT_PLAINS] = new area(globalVars.GREAT_PLAINS, 20);
areas[globalVars.SAHARA_DESERT] = new area(globalVars.SAHARA_DESERT, 10);
areas[globalVars.NYC] = new area(globalVars.NYC, 125);
areas[globalVars.PARIS] = new area(globalVars.PARIS, 100);
areas[globalVars.CAIRO] = new area(globalVars.CAIRO, 35);
areas[globalVars.FORT_BRAGG] = new area(globalVars.FORT_BRAGG, 15);
areas[globalVars.MOSCOW] = new area(globalVars.MOSCOW, 65);
areas[globalVars.MUMBAI] = new area(globalVars.MUMBAI, 150);
areas[globalVars.TOKYO] = new area(globalVars.TOKYO, 200);
areas[globalVars.GALAPAGOS_ISLANDS] = new area(globalVars.GALAPAGOS_ISLANDS, 5);
areas[globalVars.FINAL_BATTLE] = new area(globalVars.FINAL_BATTLE, 0);
_local1 = 0;
while (_local1 < globalVars.allAbilities.length) {
playerAbilities[globalVars.allAbilities[_local1]] = new ability(globalVars.allAbilities[_local1]);
_local1++;
};
}
public function loadAreas(_arg1:Array):void{
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:String;
var _local10:String;
var _local11:String;
var _local12:String;
var _local13:String;
var _local14:String;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = 0;
_local4 = 0;
var _temp1 = _local3;
_local3 = _arg1[_local2].indexOf("~", _local3);
_local5 = _arg1[_local2].substring(_temp1, _local3);
var _temp2 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local6 = _arg1[_local2].substring(_temp2, _local3);
var _temp3 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local7 = _arg1[_local2].substring(_temp3, _local3);
var _temp4 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local8 = _arg1[_local2].substring(_temp4, _local3);
var _temp5 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local9 = _arg1[_local2].substring(_temp5, _local3);
var _temp6 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local10 = _arg1[_local2].substring(_temp6, _local3);
var _temp7 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local11 = _arg1[_local2].substring(_temp7, _local3);
var _temp8 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local12 = _arg1[_local2].substring(_temp8, _local3);
var _temp9 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local13 = _arg1[_local2].substring(_temp9, _local3);
var _temp10 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local14 = _arg1[_local2].substring(_temp10, _local3);
areas[_local5] = new area("", 0);
areas[_local5].setStats(_local5, _local6, _local7, _local8, _local9, _local10, _local11, _local12, _local13, _local14);
_local2++;
};
}
public function loadAbilities(_arg1:Array):void{
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:String;
var _local10:String;
var _local11:String;
var _local12:String;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = 0;
_local4 = 0;
var _temp1 = _local3;
_local3 = _arg1[_local2].indexOf("~", _local3);
_local5 = _arg1[_local2].substring(_temp1, _local3);
var _temp2 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local6 = _arg1[_local2].substring(_temp2, _local3);
var _temp3 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local7 = _arg1[_local2].substring(_temp3, _local3);
var _temp4 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local8 = _arg1[_local2].substring(_temp4, _local3);
var _temp5 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local9 = _arg1[_local2].substring(_temp5, _local3);
var _temp6 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local10 = _arg1[_local2].substring(_temp6, _local3);
var _temp7 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local11 = _arg1[_local2].substring(_temp7, _local3);
var _temp8 = (_local3 + 1);
_local3 = _arg1[_local2].indexOf("~", (_local3 + 1));
_local12 = _arg1[_local2].substring(_temp8, _local3);
playerAbilities[_local5] = new ability("");
playerAbilities[_local5].setStats(_local5, _local6, _local7, _local8, _local9, _local10, _local11, _local12);
_local2++;
};
}
public function getAbilityReload(_arg1:String):Number{
if (playerAbilities[_arg1] == null){
return (0);
};
return ((playerAbilities[_arg1].reload * getModifier("reload", _arg1)));
}
public function update():void{
var _local1:*;
_local1 = 0;
while (_local1 < globalVars.allAbilities.length) {
playerAbilities[globalVars.allAbilities[_local1]].reloadTimer--;
_local1++;
};
if (globalVars.PASSIVE_ABILITIES_REQUIRED_IN_LOADOUT){
_local1 = 0;
while (_local1 < abilityLoadout.length) {
if ((((abilityLoadout[_local1] == globalVars.PHOTOSYNTHESIS)) && (!(globalVars.game.isDark())))){
if (playerAbilities[globalVars.PHOTOSYNTHESIS].reloadTimer <= 0){
globalVars.game.addAbilityAt(globalVars.PHOTOSYNTHESIS, 0, 0);
};
return;
};
_local1++;
};
} else {
if ((((((getAbilityLevel(globalVars.PHOTOSYNTHESIS) > 0)) && ((playerAbilities[globalVars.PHOTOSYNTHESIS].reloadTimer <= 0)))) && (!(globalVars.game.isDark())))){
globalVars.game.addAbilityAt(globalVars.PHOTOSYNTHESIS, 0, 0);
};
};
}
public function saveAbilities():Array{
var _local1:Array;
var _local2:*;
var _local3:ability;
_local1 = new Array();
_local2 = 0;
while (_local2 < globalVars.allAbilities.length) {
_local3 = playerAbilities[globalVars.allAbilities[_local2]];
_local1[_local2] = (((((((((((((((_local3.abilityName + "~") + _local3.description) + "~") + _local3.lvl) + "~") + _local3.cost) + "~") + _local3.power) + "~") + _local3.scale) + "~") + _local3.reload) + "~") + _local3.powType) + "~");
_local2++;
};
return (_local1);
}
public function getModifier(_arg1:String, _arg2:String):Number{
var _local3:String;
var _local4:Number;
var _local5:*;
if (_arg2 == globalVars.ARMOR){
return (1);
};
if (_arg2 == globalVars.FIRE_MASTER){
return (1);
};
if (_arg2 == globalVars.BOLT_MASTER){
return (1);
};
if (_arg2 == globalVars.SOLAR_ENERGY){
return (1);
};
if (_arg2 == globalVars.LUNAR_ENERGY){
return (1);
};
if (_arg2 == globalVars.SOLAR_POWER){
return (1);
};
if (_arg2 == globalVars.LUNAR_POWER){
return (1);
};
if (_arg2 == globalVars.SURVIVOR_MAGNET){
return (1);
};
if (_arg2 == globalVars.SAVIOR){
return (1);
};
if (_arg2 == globalVars.PHOTOSYNTHESIS){
return (1);
};
if (_arg2 == globalVars.TIME_SHIFT){
return (1);
};
if (_arg2 == globalVars.TIME_FREEZE){
return (1);
};
if (_arg2 == globalVars.PUSHBACK){
return (1);
};
_local3 = "none";
if (((((((!((_arg2.search("Fire") == -1))) || (!((_arg2.search("Flame") == -1))))) || (!((_arg2.search("Flare") == -1))))) || (!((_arg2.search("Erupt") == -1))))){
_local3 = "fire";
};
if (((!((_arg2.search("Bolt") == -1))) || (!((_arg2.search("Lightning") == -1))))){
_local3 = "bolt";
};
_local4 = 1;
if (globalVars.PASSIVE_ABILITIES_REQUIRED_IN_LOADOUT){
_local5 = 0;
while (_local5 < abilityLoadout.length) {
if (globalVars.dayProgression >= 0){
if ((((((abilityLoadout[_local5] == globalVars.SOLAR_ENERGY)) && ((_arg1 == "reload")))) && (!(globalVars.game.isDark())))){
_local4 = (1 - playerAbilities[globalVars.SOLAR_ENERGY].power);
};
if ((((((abilityLoadout[_local5] == globalVars.LUNAR_ENERGY)) && ((_arg1 == "reload")))) && (globalVars.game.isDark()))){
_local4 = (1 - playerAbilities[globalVars.LUNAR_ENERGY].power);
};
if ((((((abilityLoadout[_local5] == globalVars.SOLAR_POWER)) && ((_arg1 == "power")))) && (!(globalVars.game.isDark())))){
_local4 = (1 + playerAbilities[globalVars.SOLAR_POWER].power);
};
if ((((((abilityLoadout[_local5] == globalVars.LUNAR_POWER)) && ((_arg1 == "power")))) && (globalVars.game.isDark()))){
_local4 = (1 + playerAbilities[globalVars.LUNAR_POWER].power);
};
};
if ((((((abilityLoadout[_local5] == globalVars.FIRE_MASTER)) && ((_arg1 == "power")))) && ((_local3 == "fire")))){
_local4 = (1 + playerAbilities[globalVars.FIRE_MASTER].power);
};
if ((((((abilityLoadout[_local5] == globalVars.BOLT_MASTER)) && ((_arg1 == "power")))) && ((_local3 == "bolt")))){
_local4 = (1 + playerAbilities[globalVars.BOLT_MASTER].power);
};
if (_local4 != 1){
return (_local4);
};
_local5++;
};
} else {
if (globalVars.dayProgression >= 0){
if ((((((getAbilityLevel(globalVars.SOLAR_ENERGY) > 0)) && ((_arg1 == "reload")))) && (!(globalVars.game.isDark())))){
_local4 = (1 - playerAbilities[globalVars.SOLAR_ENERGY].power);
};
if ((((((getAbilityLevel(globalVars.LUNAR_ENERGY) > 0)) && ((_arg1 == "reload")))) && (globalVars.game.isDark()))){
_local4 = (1 - playerAbilities[globalVars.LUNAR_ENERGY].power);
};
if ((((((getAbilityLevel(globalVars.SOLAR_POWER) > 0)) && ((_arg1 == "power")))) && (!(globalVars.game.isDark())))){
_local4 = (1 + playerAbilities[globalVars.SOLAR_POWER].power);
};
if ((((((getAbilityLevel(globalVars.LUNAR_POWER) > 0)) && ((_arg1 == "power")))) && (globalVars.game.isDark()))){
_local4 = (1 + playerAbilities[globalVars.LUNAR_POWER].power);
};
};
if ((((((getAbilityLevel(globalVars.FIRE_MASTER) > 0)) && ((_arg1 == "power")))) && ((_local3 == "fire")))){
_local4 = (1 + playerAbilities[globalVars.FIRE_MASTER].power);
};
if ((((((getAbilityLevel(globalVars.BOLT_MASTER) > 0)) && ((_arg1 == "power")))) && ((_local3 == "bolt")))){
_local4 = (1 + playerAbilities[globalVars.BOLT_MASTER].power);
};
};
return (_local4);
}
public function getAbilityReloadTimer(_arg1:String):Number{
if (playerAbilities[_arg1] == null){
return (0);
};
return (playerAbilities[_arg1].reloadTimer);
}
public function getSavePercent():Number{
var _local1:Number;
var _local2:Number;
var _local3:*;
var _local4:area;
_local1 = 0;
_local2 = 0;
_local3 = 0;
while (_local3 < globalVars.allAreas.length) {
_local4 = areas[globalVars.allAreas[_local3]];
_local1 = (_local1 + _local4.survivorsSaved);
_local2 = (_local2 + _local4.survivorsTotal);
_local3++;
};
return (((_local1 / _local2) * 100));
}
public function getNumberOfAwards():Number{
var _local1:Number;
var _local2:*;
var _local3:area;
_local1 = 0;
_local2 = 0;
while (_local2 < globalVars.allAreas.length) {
_local3 = areas[globalVars.allAreas[_local2]];
if (_local3.areaName == globalVars.FINAL_BATTLE){
} else {
if (_local3.survivorsRemaining == 0){
_local1++;
};
if (_local3.enemiesKilled >= 100){
_local1++;
};
if (_local3.noDamage1){
_local1++;
};
if (_local3.noDamage2){
_local1++;
};
if (_local3.noDamage3){
_local1++;
};
};
_local2++;
};
return (_local1);
}
public function onDeath():void{
var _local1 = scoringArray;
var _local2 = 4;
var _local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
hp = 5;
ap = 0;
}
public function saveAreas():Array{
var _local1:Array;
var _local2:*;
var _local3:area;
_local1 = new Array();
_local2 = 0;
while (_local2 < globalVars.allAreas.length) {
_local3 = areas[globalVars.allAreas[_local2]];
_local1[_local2] = (((((((((((((((((((_local3.areaName + "~") + _local3.enemiesKilled) + "~") + _local3.survivorsSaved) + "~") + _local3.survivorsKilled) + "~") + _local3.survivorsRemaining) + "~") + _local3.survivorsTotal) + "~") + _local3.noDamageCounter) + "~") + _local3.noDamage1) + "~") + _local3.noDamage2) + "~") + _local3.noDamage3) + "~");
_local2++;
};
return (_local1);
}
public function noSurvivorsRemaining():Boolean{
var _local1:*;
var _local2:area;
_local1 = 0;
while (_local1 < globalVars.allAreas.length) {
_local2 = areas[globalVars.allAreas[_local1]];
if (_local2.survivorsRemaining > 0){
return (false);
};
_local1++;
};
return (true);
}
public function upgradeCheck(_arg1:String):Boolean{
if ((((ap < playerAbilities[_arg1].cost)) || (!(requirementsMet(_arg1))))){
return (false);
};
return (true);
}
public function upgrade(_arg1:String):Boolean{
if (!upgradeCheck(_arg1)){
return (false);
};
ap = (ap - playerAbilities[_arg1].cost);
if (!playerAbilities[_arg1].upgrade()){
ap = (ap + playerAbilities[_arg1].cost);
return (false);
};
var _local2 = scoringArray;
var _local3 = 1;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
if (affinity >= -1){
playerAbilities[globalVars.AFFINITY_BLAST].power = (1 + Math.abs((affinity / 250)));
playerAbilities[globalVars.AFFINITY_BLAST].scale = (1 + (affinity / 80));
} else {
if (affinity <= -2){
playerAbilities[globalVars.AFFINITY_BLAST].power = (1 + Math.abs((affinity / 50)));
playerAbilities[globalVars.AFFINITY_BLAST].scale = 1;
};
};
return (true);
}
public function getAbilityLevelString(_arg1:String):String{
if (playerAbilities[_arg1] == null){
return ("0");
};
if ((((_arg1 == globalVars.PUSHBACK)) && ((playerAbilities[_arg1].lvl >= 16)))){
return ("X");
};
if ((((_arg1 == globalVars.EARTHQUAKE)) && ((playerAbilities[_arg1].lvl >= 21)))){
return ("X");
};
if ((((_arg1 == globalVars.PHOTOSYNTHESIS)) && ((playerAbilities[_arg1].lvl >= 21)))){
return ("X");
};
if ((((_arg1 == globalVars.LUNAR_ENERGY)) && ((playerAbilities[_arg1].lvl >= 6)))){
return ("X");
};
if ((((_arg1 == globalVars.SOLAR_ENERGY)) && ((playerAbilities[_arg1].lvl >= 6)))){
return ("X");
};
if ((((_arg1 == globalVars.ANNIHILATOR)) && ((playerAbilities[_arg1].lvl >= 20)))){
return ("X");
};
if ((((_arg1 == globalVars.HEAL)) && ((playerAbilities[_arg1].lvl >= 15)))){
return ("X");
};
if ((((_arg1 == globalVars.VAMPIRE_BITE)) && ((playerAbilities[_arg1].lvl >= 15)))){
return ("X");
};
if ((((_arg1 == globalVars.TSUNAMI)) && ((playerAbilities[_arg1].lvl >= 21)))){
return ("X");
};
if ((((_arg1 == globalVars.METEOR)) && ((playerAbilities[_arg1].lvl >= 21)))){
return ("X");
};
if ((((_arg1 == globalVars.FLAME_SNAKE)) && ((playerAbilities[_arg1].lvl >= 21)))){
return ("X");
};
if ((((_arg1 == globalVars.ERUPTION)) && ((playerAbilities[_arg1].lvl >= 25)))){
return ("X");
};
if ((((_arg1 == globalVars.STORM_BOLTS)) && ((playerAbilities[_arg1].lvl >= 51)))){
return ("X");
};
if ((((_arg1 == globalVars.FLARE_STORM)) && ((playerAbilities[_arg1].lvl >= 46)))){
return ("X");
};
if ((((_arg1 == globalVars.MINE_FIELD)) && ((playerAbilities[_arg1].lvl >= 22)))){
return ("X");
};
if ((((_arg1 == globalVars.SNARE)) && ((playerAbilities[_arg1].lvl >= 25)))){
return ("X");
};
if ((((_arg1 == globalVars.SLUDGE)) && ((playerAbilities[_arg1].lvl >= 25)))){
return ("X");
};
if ((((_arg1 == globalVars.TOXIC_OOZE)) && ((playerAbilities[_arg1].lvl >= 21)))){
return ("X");
};
if ((((_arg1 == globalVars.CRIPPLING_MIST)) && ((playerAbilities[_arg1].lvl >= 25)))){
return ("X");
};
if ((((_arg1 == globalVars.TIME_SHIFT)) && ((playerAbilities[_arg1].lvl >= 22)))){
return ("X");
};
if ((((_arg1 == globalVars.TIME_FREEZE)) && ((playerAbilities[_arg1].lvl >= 16)))){
return ("X");
};
if ((((_arg1 == globalVars.VORTEX)) && ((playerAbilities[_arg1].lvl >= 10)))){
return ("X");
};
if ((((_arg1 == globalVars.LEVITATE)) && ((playerAbilities[_arg1].lvl >= 9)))){
return ("X");
};
if ((((_arg1 == globalVars.SECOND_SUN)) && ((playerAbilities[_arg1].lvl >= 15)))){
return ("X");
};
if ((((_arg1 == globalVars.CLOUD_COVER)) && ((playerAbilities[_arg1].lvl >= 15)))){
return ("X");
};
if ((((_arg1 == globalVars.RAIN_STORM)) && ((playerAbilities[_arg1].lvl >= 41)))){
return ("X");
};
if ((((_arg1 == globalVars.OOZINATE)) && ((playerAbilities[_arg1].lvl >= 21)))){
return ("X");
};
if ((((_arg1 == globalVars.SURVIVOR_MAGNET)) && ((playerAbilities[_arg1].lvl >= 11)))){
return ("X");
};
if ((((_arg1 == globalVars.SAVIOR)) && ((playerAbilities[_arg1].lvl >= 20)))){
return ("X");
};
if ((((_arg1 == globalVars.FIRE_MASTER)) && ((playerAbilities[_arg1].lvl >= 40)))){
return ("X");
};
if ((((_arg1 == globalVars.BOLT_MASTER)) && ((playerAbilities[_arg1].lvl >= 40)))){
return ("X");
};
if ((((_arg1 == globalVars.LUNAR_POWER)) && ((playerAbilities[_arg1].lvl >= 40)))){
return ("X");
};
if ((((_arg1 == globalVars.SOLAR_POWER)) && ((playerAbilities[_arg1].lvl >= 40)))){
return ("X");
};
if ((((_arg1 == globalVars.ARMOR)) && ((playerAbilities[_arg1].lvl >= 10)))){
return ("X");
};
if ((((_arg1 == globalVars.FLARE)) && ((playerAbilities[_arg1].lvl >= 81)))){
return ("X");
};
if ((((_arg1 == globalVars.BOLT)) && ((playerAbilities[_arg1].lvl >= 31)))){
return ("X");
};
if ((((_arg1 == globalVars.BALL_LIGHTNING)) && ((playerAbilities[_arg1].lvl >= 35)))){
return ("X");
};
if ((((_arg1 == globalVars.FIREBALL)) && ((playerAbilities[_arg1].lvl >= 30)))){
return ("X");
};
if ((((_arg1 == globalVars.LANDMINE)) && ((playerAbilities[_arg1].lvl >= 24)))){
return ("X");
};
if ((((_arg1 == globalVars.BRAIN_BOMB)) && ((playerAbilities[_arg1].lvl >= 21)))){
return ("X");
};
if ((((_arg1 == globalVars.AFFINITY_BLAST)) && ((playerAbilities[_arg1].lvl >= 16)))){
return ("X");
};
if ((((_arg1 == globalVars.APOCALYPSE)) && ((playerAbilities[_arg1].lvl >= 5)))){
return ("X");
};
if ((((_arg1 == globalVars.SURVIVOR_SAFETY)) && ((playerAbilities[_arg1].lvl >= 11)))){
return ("X");
};
return (playerAbilities[_arg1].lvl);
}
public function getAbilityPowerString(_arg1:String):String{
if (playerAbilities[_arg1] == null){
return ("");
};
return (playerAbilities[_arg1].getModPowerString(getAbilityPower(_arg1)));
}
public function addHP(_arg1:Number):void{
hp = (hp + _arg1);
if (hp > globalVars.MAX_HP){
hp = globalVars.MAX_HP;
};
if (_arg1 < 0){
scoringArray[3] = (scoringArray[3] - _arg1);
};
}
public function resetAbilityTimer(_arg1:String):void{
if (playerAbilities[_arg1] == null){
return;
};
playerAbilities[_arg1].reloadTimer = getAbilityReload(_arg1);
}
public function requirementsMet(_arg1:String):Boolean{
if (getAbilityLevelString(_arg1) == "X"){
return (false);
};
switch (_arg1){
case globalVars.FLARE_STORM:
if (getAbilityLevel(globalVars.FLARE) < 1){
return (false);
};
break;
case globalVars.FIREBALL:
if (getAbilityLevel(globalVars.FLARE) < 1){
return (false);
};
break;
case globalVars.FLAME_SNAKE:
if (getAbilityLevel(globalVars.FIREBALL) < 1){
return (false);
};
break;
case globalVars.STORM_BOLTS:
if (getAbilityLevel(globalVars.BOLT) < 1){
return (false);
};
break;
case globalVars.BALL_LIGHTNING:
if (getAbilityLevel(globalVars.BOLT) < 1){
return (false);
};
break;
case globalVars.ANNIHILATOR:
if (getAbilityLevel(globalVars.BALL_LIGHTNING) < 1){
return (false);
};
break;
case globalVars.EARTHQUAKE:
if ((((getAbilityLevel(globalVars.FLARE_STORM) < 1)) && ((getAbilityLevel(globalVars.STORM_BOLTS) < 1)))){
return (false);
};
break;
case globalVars.TSUNAMI:
if (getAbilityLevel(globalVars.EARTHQUAKE) < 1){
return (false);
};
break;
case globalVars.SECOND_SUN:
if (getAbilityLevel(globalVars.RAIN_STORM) < 1){
return (false);
};
break;
case globalVars.CLOUD_COVER:
if (getAbilityLevel(globalVars.RAIN_STORM) < 1){
return (false);
};
break;
case globalVars.TIME_FREEZE:
if (getAbilityLevel(globalVars.TIME_SHIFT) < 1){
return (false);
};
break;
case globalVars.SLUDGE:
if (getAbilityLevel(globalVars.SNARE) < 1){
return (false);
};
break;
case globalVars.CRIPPLING_MIST:
if ((((getAbilityLevel(globalVars.SLUDGE) < 1)) && ((getAbilityLevel(globalVars.TIME_FREEZE) < 1)))){
return (false);
};
break;
case globalVars.TOXIC_OOZE:
if (getAbilityLevel(globalVars.SNARE) < 1){
return (false);
};
break;
case globalVars.SOLAR_ENERGY:
if (getAbilityLevel(globalVars.SOLAR_POWER) < 1){
return (false);
};
break;
case globalVars.LUNAR_ENERGY:
if (getAbilityLevel(globalVars.LUNAR_POWER) < 1){
return (false);
};
break;
case globalVars.PHOTOSYNTHESIS:
if (getAbilityLevel(globalVars.SOLAR_ENERGY) < 1){
return (false);
};
break;
case globalVars.SAVIOR:
if (getAbilityLevel(globalVars.SURVIVOR_MAGNET) < 1){
return (false);
};
break;
case globalVars.PUSHBACK:
if (getAbilityLevel(globalVars.LEVITATE) < 1){
return (false);
};
break;
case globalVars.VORTEX:
if ((((getAbilityLevel(globalVars.PUSHBACK) < 1)) && ((getAbilityLevel(globalVars.TIME_FREEZE) < 1)))){
return (false);
};
break;
case globalVars.METEOR:
if (getAbilityLevel(globalVars.EARTHQUAKE) < 1){
return (false);
};
break;
case globalVars.ERUPTION:
if (getAbilityLevel(globalVars.FIREBALL) < 1){
return (false);
};
break;
case globalVars.MINE_FIELD:
if (getAbilityLevel(globalVars.LANDMINE) < 1){
return (false);
};
break;
case globalVars.BRAIN_BOMB:
if (getAbilityLevel(globalVars.TOXIC_OOZE) < 1){
return (false);
};
break;
case globalVars.AFFINITY_BLAST:
if (getAbilityLevel(globalVars.BALL_LIGHTNING) < 1){
return (false);
};
break;
case globalVars.APOCALYPSE:
if (getAbilityLevel(globalVars.AFFINITY_BLAST) < 1){
return (false);
};
break;
default:
break;
};
return (true);
}
public function addAffinity(_arg1:Number):void{
affinity = (affinity + _arg1);
if (affinity > 10){
if (affinity >= 500){
affinityTitle = "The Messiah";
} else {
if (affinity >= 450){
affinityTitle = "Savior";
} else {
if (affinity >= 400){
affinityTitle = "Champion";
} else {
if (affinity >= 350){
affinityTitle = "Guardian";
} else {
if (affinity >= 300){
affinityTitle = "Angel";
} else {
if (affinity >= 250){
affinityTitle = "Sentinel";
} else {
if (affinity >= 200){
affinityTitle = "Protector";
} else {
if (affinity >= 150){
affinityTitle = "Defender";
} else {
if (affinity >= 100){
affinityTitle = "Lifeguard";
} else {
if (affinity >= 50){
affinityTitle = "Boyscout";
};
};
};
};
};
};
};
};
};
};
} else {
if (affinity < -10){
if (affinity <= -500){
affinityTitle = "Grim Reaper";
} else {
if (affinity <= -450){
affinityTitle = "The Beast";
} else {
if (affinity <= -400){
affinityTitle = "Monster";
} else {
if (affinity <= -350){
affinityTitle = "Devil";
} else {
if (affinity <= -300){
affinityTitle = "Savage";
} else {
if (affinity <= -250){
affinityTitle = "Brute";
} else {
if (affinity <= -200){
affinityTitle = "Hellion";
} else {
if (affinity <= -150){
affinityTitle = "Barbarian";
} else {
if (affinity <= -100){
affinityTitle = "Fiend";
} else {
if (affinity <= -50){
affinityTitle = "Rebel";
};
};
};
};
};
};
};
};
};
};
} else {
affinityTitle = "Neutral";
};
};
if (affinity > globalVars.MAX_AFFINITY){
affinity = globalVars.MAX_AFFINITY;
};
if (affinity < -(globalVars.MAX_AFFINITY)){
affinity = -(globalVars.MAX_AFFINITY);
};
}
public function getAbilityPower(_arg1:String):Number{
var _local2:Number;
if (playerAbilities[_arg1] == null){
return (0);
};
_local2 = (playerAbilities[_arg1].power * getModifier("power", _arg1));
if ((((((((((((((_arg1 == globalVars.FLARE_STORM)) || ((_arg1 == globalVars.STORM_BOLTS)))) || ((_arg1 == globalVars.SECOND_SUN)))) || ((_arg1 == globalVars.CLOUD_COVER)))) || ((_arg1 == globalVars.TIME_SHIFT)))) || ((_arg1 == globalVars.TIME_FREEZE)))) || ((_arg1 == globalVars.MINE_FIELD)))){
_local2 = Math.round(_local2);
};
return (_local2);
}
public function addAP(_arg1:Number):void{
ap = (ap + _arg1);
scoringArray[0] = (scoringArray[0] + _arg1);
if (globalVars.game.forKongregate){
globalVars.game.kongregate.stats.submit("APEarned", scoringArray[0]);
};
}
public function getAbility(_arg1:String):ability{
return (playerAbilities[_arg1]);
}
public function resetReloadTimers():void{
var _local1:*;
_local1 = 0;
while (_local1 < globalVars.allAbilities.length) {
playerAbilities[globalVars.allAbilities[_local1]].reloadTimer = 0;
_local1++;
};
}
public function getAbilityDescription(_arg1:String):String{
if (playerAbilities[_arg1] == null){
return ("");
};
return (playerAbilities[_arg1].description);
}
public function getAbilityCost(_arg1:String):Number{
if (playerAbilities[_arg1] == null){
return (0);
};
return (playerAbilities[_arg1].cost);
}
public function clearedEachArea():Boolean{
var _local1:*;
var _local2:area;
_local1 = 0;
while (_local1 < globalVars.allAreas.length) {
_local2 = areas[globalVars.allAreas[_local1]];
if (_local2.areaName == globalVars.FINAL_BATTLE){
} else {
if (_local2.survivorsRemaining == _local2.survivorsTotal){
return (false);
};
};
_local1++;
};
return (true);
}
public function getAbilityScale(_arg1:String):Number{
if (playerAbilities[_arg1] == null){
return (0);
};
return (playerAbilities[_arg1].scale);
}
public function getAbilityLevel(_arg1:String):Number{
if (playerAbilities[_arg1] == null){
return (0);
};
return (playerAbilities[_arg1].lvl);
}
}
}//package apocalypseClasses
Section 13
//survivor (apocalypseClasses.survivor)
package apocalypseClasses {
import flash.display.*;
public class survivor extends MovieClip {
public var hp:Number;
public var shadow_mc:MovieClip;
public var invincible:Boolean;// = false
public var ap:Number;
public var speedMod:Number;// = 0
public var range:Number;
public var brainBombed:Boolean;// = false
public var help_mc:MovieClip;
public var speed:Number;
public var extraDamageTaken:Number;// = 0
public var model_mc:MovieClip;
public var helpTimer:Number;// = 0
public var immobilized:Number;// = 0
public var isSurvivor:Boolean;// = true
public var isBoss:Boolean;
public var invincible_mc:MovieClip;
public var deathType:String;// = ""
public var bitten:Boolean;// = false
public function survivor(){
deathType = "";
helpTimer = 0;
isSurvivor = true;
bitten = false;
immobilized = 0;
speedMod = 0;
extraDamageTaken = 0;
brainBombed = false;
invincible = false;
super();
isBoss = false;
if ((this is survivor1_MC)){
hp = 10;
ap = 5;
speed = 5;
range = 25;
} else {
if ((this is survivor2_MC)){
hp = 15;
ap = 10;
speed = 2;
range = 25;
} else {
if ((this is survivor3_MC)){
hp = 20;
ap = 200;
speed = 1;
range = 25;
};
};
};
if (!globalVars.shadowsEnabled){
removeChild(shadow_mc);
};
invincible_mc.alpha = 0;
}
public function survivalComplete():void{
globalVars.game.saveSurvivor(this);
}
public function updateShadowOnProgression(_arg1:Number):void{
var _local2:Number;
if (!this.contains(shadow_mc)){
return;
};
if (shadow_mc.shadow.currentLabel == "end"){
_local2 = 1;
} else {
_local2 = (shadow_mc.shadow.currentFrame + 1);
};
shadow_mc.gotoAndStop((Math.round((_arg1 * 360)) + 1));
shadow_mc.shadow.gotoAndStop(_local2);
}
public function updateShadowOnAngle(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
if (!this.contains(shadow_mc)){
return;
};
if (shadow_mc.shadow.currentLabel == "end"){
_local3 = 1;
} else {
_local3 = (shadow_mc.shadow.currentFrame + 1);
};
_local4 = Math.atan(((x - _arg1) / (y - _arg2)));
shadow_mc.gotoAndStop((Math.round((((_local4 / Math.PI) * 180) * 2)) + 180));
shadow_mc.shadow.gotoAndStop(_local3);
}
public function update(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{
var _local4:Array;
var _local5:*;
helpTimer--;
if (helpTimer <= 0){
help_mc.scaleX = (help_mc.scaleY = 1);
if (helpTimer <= -30){
helpTimer = 30;
};
} else {
help_mc.scaleX = (help_mc.scaleY = 0);
};
if (invincible){
invincible_mc.alpha = 1;
model_mc.alpha = 0;
} else {
invincible_mc.alpha = 0;
model_mc.alpha = 1;
};
_local4 = globalVars.game.getAffectingAbilities(this.model_mc);
_local5 = 0;
while (_local5 < _local4.length) {
if ((_local4[_local5] is affinityBlastEvil_MC)){
globalVars.game.abilityEffects(this, globalVars.AFFINITY_BLAST);
};
if ((_local4[_local5] is flare_MC)){
globalVars.game.abilityEffects(this, globalVars.FLARE);
};
if ((_local4[_local5] is bolt_MC)){
globalVars.game.abilityEffects(this, globalVars.BOLT);
};
if ((_local4[_local5] is flameSnake_MC)){
globalVars.game.abilityEffects(this, globalVars.FLAME_SNAKE);
};
if ((_local4[_local5] is ballLightning_MC)){
globalVars.game.abilityEffects(this, globalVars.BALL_LIGHTNING);
};
if ((_local4[_local5] is annihilator_MC)){
globalVars.game.abilityEffects(this, globalVars.ANNIHILATOR);
};
if ((_local4[_local5] is vampireBite_MC)){
globalVars.game.abilityEffects(this, globalVars.VAMPIRE_BITE);
};
if ((_local4[_local5] is cripplingMist_MC)){
globalVars.game.abilityEffects(this, globalVars.CRIPPLING_MIST);
} else {
extraDamageTaken = 0;
};
if ((((_local4[_local5] is sludge_MC)) && (((y + 20) <= _local4[_local5].y)))){
speedMod = (speed / 2);
};
if ((_local4[_local5] is brainBomb_MC)){
globalVars.game.abilityEffects(this, globalVars.BRAIN_BOMB);
};
if ((_local4[_local5] is brainBombExplosion_MC)){
globalVars.game.abilityEffects(this, globalVars.BRAIN_BOMB_EXPLOSION);
};
if ((_local4[_local5] is Explosion_MC)){
globalVars.game.abilityEffects(this, globalVars.SUICIDE_EXPLOSION);
};
if ((_local4[_local5] is meteor_MC)){
globalVars.game.abilityEffects(this, globalVars.METEOR);
};
if ((((_local4[_local5] is eruption_MC)) && (((y + 20) <= _local4[_local5].y)))){
globalVars.game.abilityEffects(this, globalVars.ERUPTION);
};
if ((_local4[_local5] is earthquake_MC)){
_arg3 = false;
globalVars.game.abilityEffects(this, globalVars.EARTHQUAKE);
};
if ((_local4[_local5] is tsunami_MC)){
_arg3 = false;
globalVars.game.abilityEffects(this, globalVars.TSUNAMI);
};
if ((_local4[_local5] is fireball_MC)){
globalVars.game.abilityEffects(this, globalVars.FIREBALL);
if (_local4[_local5].currentLabel != "explode"){
_local4[_local5].gotoAndPlay("explode");
};
};
if ((_local4[_local5] is landmine_MC)){
if (((((((y + 20) <= _local4[_local5].y)) && ((_local4[_local5].currentLabel == "activated")))) || ((_local4[_local5].currentLabel == "explosion")))){
if (_local4[_local5].currentLabel == "explosion"){
globalVars.game.abilityEffects(this, globalVars.LANDMINE);
};
_local4[_local5].play();
};
};
if ((_local4[_local5] is puddle_MC)){
if (((((y + 20) <= _local4[_local5].y)) && ((_local4[_local5].currentLabel == "electrified")))){
globalVars.game.abilityEffects(this, globalVars.PUDDLE, _local4[_local5].alpha);
};
};
if ((((_local4[_local5] is tsunamiWater_MC)) || ((_local4[_local5] is tsunamiWater2_MC)))){
if (_local4[_local5].currentLabel == "electrified"){
globalVars.game.abilityEffects(this, globalVars.PUDDLE, _local4[_local5].alpha);
};
};
_local5++;
};
if (hp <= 0){
globalVars.game.killSurvivor(this);
return;
};
if (speedMod > 0){
speedMod = (speedMod - 0.05);
};
if (!_arg3){
return;
};
immobilized--;
if (immobilized > 0){
return;
};
if (x < _arg1){
moveTowardPoint((_arg1 - 70), (globalVars.survivorStopY - 10));
} else {
moveTowardPoint((_arg1 + 70), (globalVars.survivorStopY - 10));
};
if ((((scaleX <= 0)) || ((scaleY <= 0)))){
survivalComplete();
};
}
public function moveTowardPoint(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
if (y < globalVars.survivorStopY){
scaleX = (scaleX - 0.01);
scaleY = (scaleY - 0.01);
return;
};
_local3 = Math.max(0, (speed - speedMod));
_local4 = Math.atan(((x - _arg1) / (y - _arg2)));
_local5 = Math.abs((Math.sin(_local4) * _local3));
_local6 = Math.abs((Math.cos(_local4) * _local3));
if (x < _arg1){
x = (x + _local5);
} else {
if (x > _arg1){
x = (x - _local5);
};
};
if (y < _arg2){
y = (y + _local6);
} else {
if (y > _arg2){
y = (y - _local6);
};
};
}
public function takeDamage(_arg1:Number, _arg2:String=""):void{
if ((((scaleX <= 0.65)) || ((scaleY <= 0.65)))){
return;
};
if (invincible){
return;
};
if (_arg2 == ""){
_arg2 = globalVars.ENEMY_DEATH;
};
hp = (hp - _arg1);
hp = (hp - extraDamageTaken);
deathType = _arg2;
}
}
}//package apocalypseClasses
Section 14
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent)
package com.kongregate.as3.client.events {
import flash.events.*;
public class KongregateEvent extends Event {
public static const COMPLETE:String = "component_api_available";
public function KongregateEvent(_arg1:String){
super(_arg1);
}
}
}//package com.kongregate.as3.client.events
Section 15
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService)
package com.kongregate.as3.client.services {
import flash.events.*;
public class AbstractShadowService extends EventDispatcher {
protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{
trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4));
}
}
}//package com.kongregate.as3.client.services
Section 16
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow)
package com.kongregate.as3.client.services {
public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices {
private var mode:String;
public function HighScoreServiceShadow(){
mode = "";
}
public function submit(_arg1:Number, _arg2:String=null):void{
alert("IHighScoreServices", "submit", arguments);
}
public function connect():Boolean{
alert("IKongregateServices", "connect");
return (true);
}
public function requestList(_arg1:Function):void{
alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]"));
_arg1({success:false});
}
public function setMode(_arg1:String):void{
alert("IHighScoreServices", "setMode", arguments);
this.mode = _arg1;
}
}
}//package com.kongregate.as3.client.services
Section 17
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices)
package com.kongregate.as3.client.services {
public interface IHighScoreServices {
function setMode(_arg1:String):void;
function submit(_arg1:Number, _arg2:String=null):void;
function requestList(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 18
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices)
package com.kongregate.as3.client.services {
import flash.events.*;
public interface IKongregateServices extends IEventDispatcher {
function getPlayerInfo(_arg1:Function):void;
function connect(_arg1:Number=-1):Boolean;
}
}//package com.kongregate.as3.client.services
Section 19
//IStatServices (com.kongregate.as3.client.services.IStatServices)
package com.kongregate.as3.client.services {
public interface IStatServices {
function submitArray(_arg1:Array):void;
function submit(_arg1:String, _arg2:Number):void;
}
}//package com.kongregate.as3.client.services
Section 20
//IUserServices (com.kongregate.as3.client.services.IUserServices)
package com.kongregate.as3.client.services {
public interface IUserServices {
function getName():String;
function getPlayerInfo(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 21
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow)
package com.kongregate.as3.client.services {
public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices {
public function getName():String{
alert("IKongregateServices", "getName");
return ("Guest");
}
public function connect(_arg1:Number=-1):Boolean{
alert("IKongregateServices", "connect", arguments);
return (true);
}
public function getPlayerInfo(_arg1:Function):void{
alert("IKongregateServices", "getPlayerInfo");
_arg1(new Object());
}
}
}//package com.kongregate.as3.client.services
Section 22
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow)
package com.kongregate.as3.client.services {
public class StatServiceShadow extends AbstractShadowService implements IStatServices {
public function submitArray(_arg1:Array):void{
alert("IStatServices", "submitArray", arguments);
}
public function submit(_arg1:String, _arg2:Number):void{
alert("IStatServices", "submitStat", arguments);
}
}
}//package com.kongregate.as3.client.services
Section 23
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow)
package com.kongregate.as3.client.services {
public class UserServiceShadow extends AbstractShadowService implements IUserServices {
public function getName():String{
alert("UserService", "getName");
return ("Guest");
}
public function getPlayerInfo(_arg1:Function):void{
alert("UserService", "getPlayerInfo");
_arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""});
}
}
}//package com.kongregate.as3.client.services
Section 24
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
public interface IAPIBootstrap {
function init(_arg1:Event=null, _arg2:Stage=null):void;
function hideLog():void;
function showLog(_arg1:int=0):void;
}
}//package com.kongregate.as3.client
Section 25
//KongregateAPI (com.kongregate.as3.client.KongregateAPI)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import com.kongregate.as3.client.services.*;
import com.kongregate.as3.client.events.*;
import flash.system.*;
import flash.errors.*;
import flash.utils.*;
public class KongregateAPI extends Sprite {
private const VERSION:Number = 1;
private var loader:Loader;
private var loadedDomain:ApplicationDomain;
private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices";
private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices";
private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices";
private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices";
private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf";
private static var _connected:Boolean;
private static var kUser:IUserServices;
private static var _loaded:Boolean;
private static var kServices:IKongregateServices;
private static var kScores:IHighScoreServices;
private static var mInstance:KongregateAPI;
private static var kStats:IStatServices;
private static var kAPI:IAPIBootstrap;
public function KongregateAPI(){
if (mInstance != null){
throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access."));
};
mInstance = this;
this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
public function get loaded():Boolean{
return (_loaded);
}
public function get connected():Boolean{
return (_connected);
}
private function alertConnected(_arg1:TimerEvent=null):void{
var _local2:KongregateEvent;
var _local3:Boolean;
_local2 = new KongregateEvent(KongregateEvent.COMPLETE);
_local3 = this.dispatchEvent(_local2);
}
private function init(_arg1:Event):void{
var _local2:Object;
var _local3:String;
var _local4:URLRequest;
var _local5:LoaderContext;
this.removeEventListener(Event.ADDED_TO_STAGE, init);
_loaded = false;
_connected = false;
_local2 = LoaderInfo(root.loaderInfo).parameters;
_local3 = _local2.api_path;
if (_local3 == null){
trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded.");
createShadowServices();
return;
};
Security.allowDomain("*.kongregate.com");
Security.allowDomain("kongregatetrunk.com");
_local4 = new URLRequest(_local3);
_local5 = new LoaderContext(false);
_local5.applicationDomain = ApplicationDomain.currentDomain;
_local5.securityDomain = SecurityDomain.currentDomain;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(_local4, _local5);
}
public function get api():IAPIBootstrap{
return (kAPI);
}
private function loadComplete(_arg1:Event):void{
getServices();
}
public function get scores():IHighScoreServices{
return (kScores);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
throw (new IOError(("API file not found. " + _arg1)));
}
public function get services():IKongregateServices{
return (kServices);
}
public function get stats():IStatServices{
return (kStats);
}
private function createShadowServices():void{
var _local1:Timer;
trace(">>> Kongregate Shadow Services instantiated for local development..");
kServices = new KongregateServiceShadow();
kScores = new HighScoreServiceShadow();
kStats = new StatServiceShadow();
kUser = new UserServiceShadow();
_local1 = new Timer(200, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected);
_local1.start();
_connected = true;
}
public function get user():IUserServices{
return (kUser);
}
private function getServices():void{
var _local1:ApplicationDomain;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = ApplicationDomain.currentDomain;
kAPI = IAPIBootstrap(loader.getChildAt(0));
this.addChild(loader);
_local2 = _local1.getDefinition(CLASS_SERVICES);
trace(_local2);
kServices = _local2.getInstance();
_local3 = _local1.getDefinition(CLASS_SCORES);
kScores = _local3.getInstance();
_local4 = _local1.getDefinition(CLASS_STATS);
kStats = _local4.getInstance();
_local5 = _local1.getDefinition(CLASS_USER);
kUser = _local5.getInstance();
kServices.connect(VERSION);
_loaded = true;
_connected = true;
alertConnected();
}
public static function getInstance():KongregateAPI{
if (!mInstance){
throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it."));
};
return (mInstance);
}
}
}//package com.kongregate.as3.client
Section 26
//AdvancedSound (soundClasses.AdvancedSound)
package soundClasses {
import flash.events.*;
import flash.media.*;
import flash.net.*;
public class AdvancedSound {
private var currentlyPlaying:Boolean;// = false
private var soundVolume:Number;// = 0.65
private var soundTransformer:SoundTransform;
private var soundChannel:SoundChannel;
private var sound:Sound;
public function AdvancedSound(_arg1:Sound=null, _arg2:Number=0.65){
sound = new Sound();
soundChannel = new SoundChannel();
soundTransformer = new SoundTransform();
soundVolume = 0.65;
currentlyPlaying = false;
super();
if (_arg1 != null){
sound = _arg1;
};
setVolume(_arg2);
}
public function soundComplete(_arg1:Event):void{
soundChannel.stop();
currentlyPlaying = false;
}
public function stop():void{
soundChannel.stop();
currentlyPlaying = false;
}
public function play(_arg1:Number=80, _arg2:Number=1):void{
stop();
soundChannel = sound.play(_arg1, _arg2, soundTransformer);
soundTransformer = soundChannel.soundTransform;
soundTransformer.volume = soundVolume;
soundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
currentlyPlaying = true;
}
public function isPlaying():Boolean{
return (currentlyPlaying);
}
public function load(_arg1:URLRequest){
sound.load(_arg1);
}
public function setSound(_arg1:Sound){
sound = _arg1;
}
public function getPositionPercent():Number{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = soundChannel.position;
_local2 = sound.length;
_local3 = ((sound.bytesTotal * _local2) / sound.bytesLoaded);
return ((_local1 / _local3));
}
public function setVolume(_arg1:Number):void{
soundVolume = _arg1;
soundTransformer.volume = soundVolume;
soundChannel.soundTransform = soundTransformer;
}
public function getVolume():Number{
return (soundVolume);
}
}
}//package soundClasses
Section 27
//MCButton (ui.MCButton)
package ui {
import flash.events.*;
import flash.display.*;
public class MCButton extends MovieClip {
private var OVER_FRAME:Number;
private var pressed:Boolean;// = false
private var target:Number;
private var DOWN:String;// = "down"
private var UP_FRAME:Number;
private var UP:String;// = "up"
private var OVER:String;// = "over"
public function MCButton(){
UP = "up";
OVER = "over";
DOWN = "down";
pressed = false;
super();
gotoAndStop(OVER);
OVER_FRAME = currentFrame;
gotoAndStop(UP);
UP_FRAME = currentFrame;
this.addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
this.addEventListener(MouseEvent.MOUSE_DOWN, this.onPress);
this.addEventListener(MouseEvent.MOUSE_UP, this.onRelease);
this.addEventListener(MouseEvent.ROLL_OUT, this.onRollOut);
this.addEventListener(MouseEvent.ROLL_OVER, this.onRollOver);
}
public function onRelease(_arg1:MouseEvent):void{
if (pressed){
pressed = false;
gotoAndStop(OVER);
target = -1;
dispatchEvent(new Event("onRelease"));
};
}
public function onRollOut(_arg1:MouseEvent):void{
target = UP_FRAME;
dispatchEvent(new Event("onRollOut"));
}
public function onEnterFrame(_arg1:Event):void{
if (target != -1){
if (target < currentFrame){
gotoAndStop((currentFrame - 1));
};
if (target > currentFrame){
gotoAndStop((currentFrame + 1));
};
};
}
public function onPress(_arg1:MouseEvent):void{
pressed = true;
gotoAndStop(DOWN);
target = -1;
dispatchEvent(new Event("onPress"));
}
public function onRollOver(_arg1:MouseEvent):void{
pressed = false;
target = OVER_FRAME;
dispatchEvent(new Event("onRollOver"));
}
}
}//package ui
Section 28
//ability_BTN (ability_BTN)
package {
import ui.*;
public dynamic class ability_BTN extends MCButton {
}
}//package
Section 29
//abilityCategory_BTN (abilityCategory_BTN)
package {
import ui.*;
public dynamic class abilityCategory_BTN extends MCButton {
}
}//package
Section 30
//abilityHighlight_MC (abilityHighlight_MC)
package {
import flash.display.*;
public dynamic class abilityHighlight_MC extends MovieClip {
}
}//package
Section 31
//abilityIcon_MC (abilityIcon_MC)
package {
import flash.display.*;
public dynamic class abilityIcon_MC extends MovieClip {
public function abilityIcon_MC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 32
//abilityInfo_MC (abilityInfo_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class abilityInfo_MC extends MovieClip {
public var cost_txt:TextField;
public var damage_txt:TextField;
public var label_txt:TextField;
public var description_txt:TextField;
public var cooldown_txt:TextField;
}
}//package
Section 33
//abilityLearn_mp3 (abilityLearn_mp3)
package {
import flash.media.*;
public dynamic class abilityLearn_mp3 extends Sound {
}
}//package
Section 34
//abilityPrompt_MC (abilityPrompt_MC)
package {
import flash.display.*;
public dynamic class abilityPrompt_MC extends MovieClip {
public var ok_btn:mainMenu_BTN;
}
}//package
Section 35
//abilityScreen_MC (abilityScreen_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class abilityScreen_MC extends MovieClip {
public var offensive_btn:abilityCategory_BTN;
public var support_btn:abilityCategory_BTN;
public var supportTree_mc:supportTree_MC;
public var back_btn:mainMenu_BTN;
public var ability0_btn:ability_BTN;
public var passive_btn:abilityCategory_BTN;
public var ability3_btn:ability_BTN;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var offensiveTree_mc:offensiveTree_MC;
public var ap_txt:TextField;
public var passiveTree_mc:passiveTree_MC;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var ability4_btn:ability_BTN;
}
}//package
Section 36
//abilityUpgrade_BTN (abilityUpgrade_BTN)
package {
import ui.*;
public dynamic class abilityUpgrade_BTN extends MCButton {
}
}//package
Section 37
//abilityUpgrade_mp3 (abilityUpgrade_mp3)
package {
import flash.media.*;
public dynamic class abilityUpgrade_mp3 extends Sound {
}
}//package
Section 38
//affinityBar_MC (affinityBar_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class affinityBar_MC extends MovieClip {
public var pointer_mc:MovieClip;
public var title_txt:TextField;
public var devil_mc:MovieClip;
public var bar_mc:MovieClip;
public var angel_mc:MovieClip;
}
}//package
Section 39
//affinityBlastEvil_MC (affinityBlastEvil_MC)
package {
import flash.display.*;
public dynamic class affinityBlastEvil_MC extends MovieClip {
}
}//package
Section 40
//affinityBlastGood_MC (affinityBlastGood_MC)
package {
import flash.display.*;
public dynamic class affinityBlastGood_MC extends MovieClip {
}
}//package
Section 41
//annihilator_MC (annihilator_MC)
package {
import flash.display.*;
public dynamic class annihilator_MC extends MovieClip {
}
}//package
Section 42
//award_mp3 (award_mp3)
package {
import flash.media.*;
public dynamic class award_mp3 extends Sound {
}
}//package
Section 43
//awardPrompt_MC (awardPrompt_MC)
package {
import flash.display.*;
public dynamic class awardPrompt_MC extends MovieClip {
public var ok_btn:mainMenu_BTN;
}
}//package
Section 44
//ballLightning_MC (ballLightning_MC)
package {
import flash.display.*;
public dynamic class ballLightning_MC extends MovieClip {
}
}//package
Section 45
//beam_mp3 (beam_mp3)
package {
import flash.media.*;
public dynamic class beam_mp3 extends Sound {
}
}//package
Section 46
//BGmusic_mp3 (BGmusic_mp3)
package {
import flash.media.*;
public dynamic class BGmusic_mp3 extends Sound {
}
}//package
Section 47
//bird_MC (bird_MC)
package {
import apocalypseClasses.*;
public dynamic class bird_MC extends enemy {
public function bird_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 48
//birdShadow_MC (birdShadow_MC)
package {
import flash.display.*;
public dynamic class birdShadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 49
//bite_mp3 (bite_mp3)
package {
import flash.media.*;
public dynamic class bite_mp3 extends Sound {
}
}//package
Section 50
//blackCrab_MC (blackCrab_MC)
package {
import apocalypseClasses.*;
public dynamic class blackCrab_MC extends enemy {
public function blackCrab_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 51
//blackCrabShadow_MC (blackCrabShadow_MC)
package {
import flash.display.*;
public dynamic class blackCrabShadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 52
//bolt_MC (bolt_MC)
package {
import flash.display.*;
public dynamic class bolt_MC extends MovieClip {
}
}//package
Section 53
//bolt_mp3 (bolt_mp3)
package {
import flash.media.*;
public dynamic class bolt_mp3 extends Sound {
}
}//package
Section 54
//boltGraphics_MC (boltGraphics_MC)
package {
import flash.display.*;
public dynamic class boltGraphics_MC extends MovieClip {
}
}//package
Section 55
//boltGraphics2_MC (boltGraphics2_MC)
package {
import flash.display.*;
public dynamic class boltGraphics2_MC extends MovieClip {
}
}//package
Section 56
//bossCrab_MC (bossCrab_MC)
package {
import apocalypseClasses.*;
public dynamic class bossCrab_MC extends enemy {
public function bossCrab_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 57
//brainBomb_MC (brainBomb_MC)
package {
import flash.display.*;
public dynamic class brainBomb_MC extends MovieClip {
}
}//package
Section 58
//brainBomb_mp3 (brainBomb_mp3)
package {
import flash.media.*;
public dynamic class brainBomb_mp3 extends Sound {
}
}//package
Section 59
//brainBombExplosion_MC (brainBombExplosion_MC)
package {
import flash.display.*;
public dynamic class brainBombExplosion_MC extends MovieClip {
}
}//package
Section 60
//CairoArea_MC (CairoArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class CairoArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var props_mc:MovieClip;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 61
//cantUpgrade_mp3 (cantUpgrade_mp3)
package {
import flash.media.*;
public dynamic class cantUpgrade_mp3 extends Sound {
}
}//package
Section 62
//cloudCover_MC (cloudCover_MC)
package {
import flash.display.*;
public dynamic class cloudCover_MC extends MovieClip {
public function cloudCover_MC(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package
Section 63
//cooldown_MC (cooldown_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class cooldown_MC extends MovieClip {
public var reload_txt:TextField;
}
}//package
Section 64
//cripplingMist_MC (cripplingMist_MC)
package {
import flash.display.*;
public dynamic class cripplingMist_MC extends MovieClip {
public function cripplingMist_MC(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package
Section 65
//damage_MC (damage_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class damage_MC extends MovieClip {
public var damageAmt_txt:TextField;
public var healAmt_txt:TextField;
}
}//package
Section 66
//daylight_MC (daylight_MC)
package {
import flash.display.*;
public dynamic class daylight_MC extends MovieClip {
}
}//package
Section 67
//deathInfo_MC (deathInfo_MC)
package {
import flash.display.*;
public dynamic class deathInfo_MC extends MovieClip {
public var ok_btn:mainMenu_BTN;
}
}//package
Section 68
//delete_BTN (delete_BTN)
package {
import ui.*;
public dynamic class delete_BTN extends MCButton {
}
}//package
Section 69
//deletePrompt_MC (deletePrompt_MC)
package {
import flash.display.*;
public dynamic class deletePrompt_MC extends MovieClip {
public var yes_btn:mainMenu_BTN;
public var no_btn:mainMenu_BTN;
}
}//package
Section 70
//demonCrab_MC (demonCrab_MC)
package {
import apocalypseClasses.*;
public dynamic class demonCrab_MC extends enemy {
public function demonCrab_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 71
//destination_BTN (destination_BTN)
package {
import ui.*;
public dynamic class destination_BTN extends MCButton {
}
}//package
Section 72
//destinationInfo_MC (destinationInfo_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class destinationInfo_MC extends MovieClip {
public var difficulty_txt:TextField;
public var noAwards_mc:MovieClip;
public var neutral_mc:MovieClip;
public var noDamage1_mc:MovieClip;
public var devil_mc:MovieClip;
public var noDamage2_mc:MovieClip;
public var label_txt:TextField;
public var warrior_mc:MovieClip;
public var killed_txt:TextField;
public var noDamage3_mc:MovieClip;
public var angel_mc:MovieClip;
public var remaining_txt:TextField;
public var saved_txt:TextField;
}
}//package
Section 73
//earthquake_MC (earthquake_MC)
package {
import flash.display.*;
public dynamic class earthquake_MC extends MovieClip {
}
}//package
Section 74
//earthquake_mp3 (earthquake_mp3)
package {
import flash.media.*;
public dynamic class earthquake_mp3 extends Sound {
}
}//package
Section 75
//electrify_mp3 (electrify_mp3)
package {
import flash.media.*;
public dynamic class electrify_mp3 extends Sound {
}
}//package
Section 76
//enemy1_MC (enemy1_MC)
package {
import apocalypseClasses.*;
public dynamic class enemy1_MC extends enemy {
public function enemy1_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("cells");
}
}
}//package
Section 77
//enemy1Shadow_MC (enemy1Shadow_MC)
package {
import flash.display.*;
public dynamic class enemy1Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 78
//enemy2_MC (enemy2_MC)
package {
import apocalypseClasses.*;
public dynamic class enemy2_MC extends enemy {
public function enemy2_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 79
//enemy2Shadow_MC (enemy2Shadow_MC)
package {
import flash.display.*;
public dynamic class enemy2Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 80
//enemy3_MC (enemy3_MC)
package {
import apocalypseClasses.*;
public dynamic class enemy3_MC extends enemy {
public function enemy3_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 81
//enemy3Shadow_MC (enemy3Shadow_MC)
package {
import flash.display.*;
public dynamic class enemy3Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 82
//enemy4_MC (enemy4_MC)
package {
import apocalypseClasses.*;
public dynamic class enemy4_MC extends enemy {
public function enemy4_MC(){
addFrameScript(0, frame1, 69, frame70);
}
function frame70(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
function frame1(){
stop();
}
}
}//package
Section 83
//enemy4Shadow_MC (enemy4Shadow_MC)
package {
import flash.display.*;
public dynamic class enemy4Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 84
//enemy5_MC (enemy5_MC)
package {
import apocalypseClasses.*;
public dynamic class enemy5_MC extends enemy {
public function enemy5_MC(){
addFrameScript(0, frame1, 69, frame70);
}
function frame70(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
function frame1(){
stop();
}
}
}//package
Section 85
//enemy5Shadow_MC (enemy5Shadow_MC)
package {
import flash.display.*;
public dynamic class enemy5Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 86
//enemy6_MC (enemy6_MC)
package {
import apocalypseClasses.*;
public dynamic class enemy6_MC extends enemy {
public function enemy6_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 87
//enemy7_MC (enemy7_MC)
package {
import apocalypseClasses.*;
public dynamic class enemy7_MC extends enemy {
public function enemy7_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 88
//enemy8_MC (enemy8_MC)
package {
import apocalypseClasses.*;
public dynamic class enemy8_MC extends enemy {
public function enemy8_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 89
//enemy8Shadow_MC (enemy8Shadow_MC)
package {
import flash.display.*;
public dynamic class enemy8Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 90
//enemyBurnt_MC (enemyBurnt_MC)
package {
import flash.display.*;
public dynamic class enemyBurnt_MC extends MovieClip {
}
}//package
Section 91
//enemyDeath_MC (enemyDeath_MC)
package {
import flash.display.*;
public dynamic class enemyDeath_MC extends MovieClip {
}
}//package
Section 92
//enemyDeath_mp3 (enemyDeath_mp3)
package {
import flash.media.*;
public dynamic class enemyDeath_mp3 extends Sound {
}
}//package
Section 93
//errorScreen_MC (errorScreen_MC)
package {
import flash.display.*;
public dynamic class errorScreen_MC extends MovieClip {
public var back_btn:mainMenu_BTN;
}
}//package
Section 94
//eruption_MC (eruption_MC)
package {
import flash.display.*;
public dynamic class eruption_MC extends MovieClip {
public function eruption_MC(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 95
//eruptionHole_MC (eruptionHole_MC)
package {
import flash.display.*;
public dynamic class eruptionHole_MC extends MovieClip {
public function eruptionHole_MC(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package
Section 96
//Explosion_MC (Explosion_MC)
package {
import flash.display.*;
public dynamic class Explosion_MC extends MovieClip {
}
}//package
Section 97
//explosion_mp3 (explosion_mp3)
package {
import flash.media.*;
public dynamic class explosion_mp3 extends Sound {
}
}//package
Section 98
//fileScreen_MC (fileScreen_MC)
package {
import flash.display.*;
public dynamic class fileScreen_MC extends MovieClip {
public var back_btn:mainMenu_BTN;
public var file3_btn:mainMenu_BTN;
public var file1_btn:mainMenu_BTN;
public var file2_btn:mainMenu_BTN;
}
}//package
Section 99
//FinalArea_MC (FinalArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class FinalArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:finalSun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 100
//finalSun_MC (finalSun_MC)
package {
import flash.display.*;
public dynamic class finalSun_MC extends MovieClip {
public var sun:MovieClip;
}
}//package
Section 101
//fire_mp3 (fire_mp3)
package {
import flash.media.*;
public dynamic class fire_mp3 extends Sound {
}
}//package
Section 102
//fireball_MC (fireball_MC)
package {
import flash.display.*;
public dynamic class fireball_MC extends MovieClip {
}
}//package
Section 103
//fireball_mp3 (fireball_mp3)
package {
import flash.media.*;
public dynamic class fireball_mp3 extends Sound {
}
}//package
Section 104
//flameSnake_MC (flameSnake_MC)
package {
import flash.display.*;
public dynamic class flameSnake_MC extends MovieClip {
}
}//package
Section 105
//flare_MC (flare_MC)
package {
import flash.display.*;
public dynamic class flare_MC extends MovieClip {
}
}//package
Section 106
//flare_mp3 (flare_mp3)
package {
import flash.media.*;
public dynamic class flare_mp3 extends Sound {
}
}//package
Section 107
//FortBraggArea_MC (FortBraggArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class FortBraggArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 108
//frenchie1_MC (frenchie1_MC)
package {
import apocalypseClasses.*;
public dynamic class frenchie1_MC extends enemy {
public function frenchie1_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 109
//frenchie1Shadow_MC (frenchie1Shadow_MC)
package {
import flash.display.*;
public dynamic class frenchie1Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 110
//frenchie2_MC (frenchie2_MC)
package {
import apocalypseClasses.*;
public dynamic class frenchie2_MC extends enemy {
public function frenchie2_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 111
//GalapagosIslandsArea_MC (GalapagosIslandsArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class GalapagosIslandsArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var props_mc:MovieClip;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 112
//game_MC (game_MC)
package {
import apocalypseClasses.*;
public dynamic class game_MC extends game {
}
}//package
Section 113
//gameClearedPopup_MC (gameClearedPopup_MC)
package {
import flash.display.*;
public dynamic class gameClearedPopup_MC extends MovieClip {
public var ok_btn:mainMenu_BTN;
}
}//package
Section 114
//gamePausedPopUp_MC (gamePausedPopUp_MC)
package {
import flash.display.*;
public dynamic class gamePausedPopUp_MC extends MovieClip {
}
}//package
Section 115
//gameSavedPopUp_MC (gameSavedPopUp_MC)
package {
import flash.display.*;
public dynamic class gameSavedPopUp_MC extends MovieClip {
public var ok_btn:mainMenu_BTN;
}
}//package
Section 116
//grabbedAbility_MC (grabbedAbility_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class grabbedAbility_MC extends MovieClip {
public var icon_mc:abilityIcon_MC;
public var number_txt:TextField;
}
}//package
Section 117
//grade_MC (grade_MC)
package {
import flash.display.*;
public dynamic class grade_MC extends MovieClip {
public function grade_MC(){
addFrameScript(0, frame1, 9, frame10, 18, frame19, 27, frame28, 36, frame37, 45, frame46);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame19(){
stop();
}
function frame37(){
stop();
}
function frame28(){
stop();
}
function frame46(){
stop();
}
}
}//package
Section 118
//gradeGiven_mp3 (gradeGiven_mp3)
package {
import flash.media.*;
public dynamic class gradeGiven_mp3 extends Sound {
}
}//package
Section 119
//greatPlainsArea_MC (greatPlainsArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class greatPlainsArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 120
//greenBeret_MC (greenBeret_MC)
package {
import apocalypseClasses.*;
public dynamic class greenBeret_MC extends enemy {
public function greenBeret_MC(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 121
//greenBeretMelee_MC (greenBeretMelee_MC)
package {
import apocalypseClasses.*;
public dynamic class greenBeretMelee_MC extends enemy {
public function greenBeretMelee_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 122
//greenBeretMeleeShadow_MC (greenBeretMeleeShadow_MC)
package {
import flash.display.*;
public dynamic class greenBeretMeleeShadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 123
//greenBeretPistol_MC (greenBeretPistol_MC)
package {
import apocalypseClasses.*;
public dynamic class greenBeretPistol_MC extends enemy {
public function greenBeretPistol_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 124
//greenBeretShadow_MC (greenBeretShadow_MC)
package {
import flash.display.*;
public dynamic class greenBeretShadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 125
//heal_MC (heal_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class heal_MC extends MovieClip {
public var healAmt_txt:TextField;
}
}//package
Section 126
//heal_mp3 (heal_mp3)
package {
import flash.media.*;
public dynamic class heal_mp3 extends Sound {
}
}//package
Section 127
//highScoresScreen_MC (highScoresScreen_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class highScoresScreen_MC extends MovieClip {
public var back_btn:mainMenu_BTN;
public var scores_txt:TextField;
}
}//package
Section 128
//imposter1_MC (imposter1_MC)
package {
import apocalypseClasses.*;
public dynamic class imposter1_MC extends enemy {
public function imposter1_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 129
//imposter2_MC (imposter2_MC)
package {
import apocalypseClasses.*;
public dynamic class imposter2_MC extends enemy {
public function imposter2_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 130
//jamieOgre_MC (jamieOgre_MC)
package {
import apocalypseClasses.*;
public dynamic class jamieOgre_MC extends enemy {
public function jamieOgre_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 131
//jamieOgreShadow_MC (jamieOgreShadow_MC)
package {
import flash.display.*;
public dynamic class jamieOgreShadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 132
//jetpackGuy1_MC (jetpackGuy1_MC)
package {
import apocalypseClasses.*;
public dynamic class jetpackGuy1_MC extends enemy {
public function jetpackGuy1_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 133
//jetpackGuy1Shadow_MC (jetpackGuy1Shadow_MC)
package {
import flash.display.*;
public dynamic class jetpackGuy1Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 134
//jetpackGuy2_MC (jetpackGuy2_MC)
package {
import apocalypseClasses.*;
public dynamic class jetpackGuy2_MC extends enemy {
public function jetpackGuy2_MC(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 135
//jetpackGuy2Shadow_MC (jetpackGuy2Shadow_MC)
package {
import flash.display.*;
public dynamic class jetpackGuy2Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 136
//knifer_MC (knifer_MC)
package {
import apocalypseClasses.*;
public dynamic class knifer_MC extends enemy {
public function knifer_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 137
//landmine_MC (landmine_MC)
package {
import flash.display.*;
public dynamic class landmine_MC extends MovieClip {
public function landmine_MC(){
addFrameScript(149, frame150);
}
function frame150(){
stop();
}
}
}//package
Section 138
//levitate_mp3 (levitate_mp3)
package {
import flash.media.*;
public dynamic class levitate_mp3 extends Sound {
}
}//package
Section 139
//levitateEffect_MC (levitateEffect_MC)
package {
import flash.display.*;
public dynamic class levitateEffect_MC extends MovieClip {
}
}//package
Section 140
//machineGunner_MC (machineGunner_MC)
package {
import apocalypseClasses.*;
public dynamic class machineGunner_MC extends enemy {
public function machineGunner_MC(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 141
//mainMenu_BTN (mainMenu_BTN)
package {
import ui.*;
public dynamic class mainMenu_BTN extends MCButton {
}
}//package
Section 142
//mainMenu_MC (mainMenu_MC)
package {
import flash.display.*;
public dynamic class mainMenu_MC extends MovieClip {
public var options_btn:mainMenu_BTN;
public var newGame_btn:mainMenu_BTN;
public var loadGame_btn:mainMenu_BTN;
public var delete_btn:delete_BTN;
}
}//package
Section 143
//meteor_MC (meteor_MC)
package {
import flash.display.*;
public dynamic class meteor_MC extends MovieClip {
}
}//package
Section 144
//meteor_mp3 (meteor_mp3)
package {
import flash.media.*;
public dynamic class meteor_mp3 extends Sound {
}
}//package
Section 145
//meteorCrater_MC (meteorCrater_MC)
package {
import flash.display.*;
public dynamic class meteorCrater_MC extends MovieClip {
public function meteorCrater_MC(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package
Section 146
//mist_mp3 (mist_mp3)
package {
import flash.media.*;
public dynamic class mist_mp3 extends Sound {
}
}//package
Section 147
//MoscowArea_MC (MoscowArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MoscowArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var props_mc:MovieClip;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 148
//MumbaiArea_MC (MumbaiArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MumbaiArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var props_mc:MovieClip;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 149
//noDamageBonus1_MC (noDamageBonus1_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class noDamageBonus1_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 150
//noDamageBonus2_MC (noDamageBonus2_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class noDamageBonus2_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 151
//noDamageBonus3_MC (noDamageBonus3_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class noDamageBonus3_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 152
//NYCArea_MC (NYCArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class NYCArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var props_mc:MovieClip;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 153
//offensiveTree_MC (offensiveTree_MC)
package {
import flash.display.*;
public dynamic class offensiveTree_MC extends MovieClip {
public var FlameSnake_btn:abilityUpgrade_BTN;
public var Earthquake_btn:abilityUpgrade_BTN;
public var AffinityBlast_btn:abilityUpgrade_BTN;
public var Flare_btn:abilityUpgrade_BTN;
public var StormBolts_btn:abilityUpgrade_BTN;
public var MineField_btn:abilityUpgrade_BTN;
public var Meteor_btn:abilityUpgrade_BTN;
public var Tsunami_btn:abilityUpgrade_BTN;
public var Fireball_btn:abilityUpgrade_BTN;
public var BallLightning_btn:abilityUpgrade_BTN;
public var Landmine_btn:abilityUpgrade_BTN;
public var Apocalypse_btn:abilityUpgrade_BTN;
public var VampireBite_btn:abilityUpgrade_BTN;
public var Annihilator_btn:abilityUpgrade_BTN;
public var Eruption_btn:abilityUpgrade_BTN;
public var Bolt_btn:abilityUpgrade_BTN;
public var FlareStorm_btn:abilityUpgrade_BTN;
}
}//package
Section 154
//ooze_mp3 (ooze_mp3)
package {
import flash.media.*;
public dynamic class ooze_mp3 extends Sound {
}
}//package
Section 155
//oozinate_MC (oozinate_MC)
package {
import flash.display.*;
public dynamic class oozinate_MC extends MovieClip {
public function oozinate_MC(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package
Section 156
//option_BTN (option_BTN)
package {
import ui.*;
public dynamic class option_BTN extends MCButton {
}
}//package
Section 157
//options_MC (options_MC)
package {
import flash.display.*;
public dynamic class options_MC extends MovieClip {
public var back_btn:mainMenu_BTN;
public var quality_btn:mainMenu_BTN;
public var sound_btn:mainMenu_BTN;
public var shadows_btn:mainMenu_BTN;
public var music_btn:mainMenu_BTN;
}
}//package
Section 158
//ParisArea_MC (ParisArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class ParisArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var props_mc:MovieClip;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 159
//passiveTree_MC (passiveTree_MC)
package {
import flash.display.*;
public dynamic class passiveTree_MC extends MovieClip {
public var LunarPower_btn:abilityUpgrade_BTN;
public var FireMaster_btn:abilityUpgrade_BTN;
public var Oozinate_btn:abilityUpgrade_BTN;
public var Armor_btn:abilityUpgrade_BTN;
public var Photosynthesis_btn:abilityUpgrade_BTN;
public var SolarPower_btn:abilityUpgrade_BTN;
public var SolarEnergy_btn:abilityUpgrade_BTN;
public var BoltMaster_btn:abilityUpgrade_BTN;
public var LunarEnergy_btn:abilityUpgrade_BTN;
public var SurvivorMagnet_btn:abilityUpgrade_BTN;
public var Savior_btn:abilityUpgrade_BTN;
}
}//package
Section 160
//player_MC (player_MC)
package {
import flash.display.*;
public dynamic class player_MC extends MovieClip {
public var shadow2hand_mc:player2HandShadow_MC;
public var affinityOverlay_mc:MovieClip;
public var shadow1hand_mc:player1HandShadow_MC;
public var shadowIdle_mc:playerIdleShadow_MC;
public var shadowAffinity_mc:playerAffinityShadow_MC;
public var shadowFwd_mc:playerFwdShadow_MC;
public function player_MC(){
addFrameScript(9, frame10, 19, frame20, 29, frame30, 38, frame39, 48, frame49, 58, frame59, 68, frame69, 78, frame79, 88, frame89, 98, frame99, 108, frame109, 118, frame119);
}
function frame79(){
gotoAndStop("Idle");
}
function frame89(){
gotoAndStop("Idle");
}
function frame10(){
stop();
}
function frame20(){
gotoAndStop("Idle");
}
function frame109(){
gotoAndStop("Idle");
}
function frame30(){
gotoAndStop("Idle");
}
function frame99(){
gotoAndStop("Idle");
}
function frame39(){
gotoAndStop("Idle");
}
function frame49(){
gotoAndStop("Idle");
}
function frame119(){
gotoAndStop("Idle");
}
function frame59(){
gotoAndStop("Idle");
}
function frame69(){
gotoAndStop("Idle");
}
}
}//package
Section 161
//player1HandShadow_MC (player1HandShadow_MC)
package {
import flash.display.*;
public dynamic class player1HandShadow_MC extends MovieClip {
public var shadow_mc:MovieClip;
public var shadow:MovieClip;
}
}//package
Section 162
//player2HandShadow_MC (player2HandShadow_MC)
package {
import flash.display.*;
public dynamic class player2HandShadow_MC extends MovieClip {
public var shadow_mc:MovieClip;
public var shadow:MovieClip;
}
}//package
Section 163
//playerAffinityShadow_MC (playerAffinityShadow_MC)
package {
import flash.display.*;
public dynamic class playerAffinityShadow_MC extends MovieClip {
public var shadow_mc:MovieClip;
}
}//package
Section 164
//playerDamage_mp3 (playerDamage_mp3)
package {
import flash.media.*;
public dynamic class playerDamage_mp3 extends Sound {
}
}//package
Section 165
//playerFwdShadow_MC (playerFwdShadow_MC)
package {
import flash.display.*;
public dynamic class playerFwdShadow_MC extends MovieClip {
public var shadow_mc:MovieClip;
public var shadow:MovieClip;
}
}//package
Section 166
//playerIdleShadow_MC (playerIdleShadow_MC)
package {
import flash.display.*;
public dynamic class playerIdleShadow_MC extends MovieClip {
public var shadow_mc:MovieClip;
public var shadow:MovieClip;
}
}//package
Section 167
//popup_mp3 (popup_mp3)
package {
import flash.media.*;
public dynamic class popup_mp3 extends Sound {
}
}//package
Section 168
//pregame_MC (pregame_MC)
package {
import flash.display.*;
public dynamic class pregame_MC extends MovieClip {
public var back_btn:mainMenu_BTN;
public var start_btn:mainMenu_BTN;
}
}//package
Section 169
//puddle_MC (puddle_MC)
package {
import flash.display.*;
public dynamic class puddle_MC extends MovieClip {
public function puddle_MC(){
addFrameScript(88, frame89);
}
function frame89(){
gotoAndStop("start");
}
}
}//package
Section 170
//pushback_MC (pushback_MC)
package {
import flash.display.*;
public dynamic class pushback_MC extends MovieClip {
}
}//package
Section 171
//pushback_mp3 (pushback_mp3)
package {
import flash.media.*;
public dynamic class pushback_mp3 extends Sound {
}
}//package
Section 172
//rain_mp3 (rain_mp3)
package {
import flash.media.*;
public dynamic class rain_mp3 extends Sound {
}
}//package
Section 173
//rainDrop_MC (rainDrop_MC)
package {
import flash.display.*;
public dynamic class rainDrop_MC extends MovieClip {
}
}//package
Section 174
//rainStorm_MC (rainStorm_MC)
package {
import flash.display.*;
public dynamic class rainStorm_MC extends MovieClip {
}
}//package
Section 175
//redCrab_MC (redCrab_MC)
package {
import apocalypseClasses.*;
public dynamic class redCrab_MC extends enemy {
public function redCrab_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 176
//rocketeer1_MC (rocketeer1_MC)
package {
import apocalypseClasses.*;
public dynamic class rocketeer1_MC extends enemy {
public function rocketeer1_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 177
//rocketeer2_MC (rocketeer2_MC)
package {
import apocalypseClasses.*;
public dynamic class rocketeer2_MC extends enemy {
public function rocketeer2_MC(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 178
//sarahaDesertArea_MC (sarahaDesertArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class sarahaDesertArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 179
//saved_mp3 (saved_mp3)
package {
import flash.media.*;
public dynamic class saved_mp3 extends Sound {
}
}//package
Section 180
//scoreScreen_MC (scoreScreen_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class scoreScreen_MC extends MovieClip {
public var grade_mc:grade_MC;
public var scores_txt:TextField;
public var finalScore_txt:TextField;
public var submit_btn:mainMenu_BTN;
}
}//package
Section 181
//secondSun_MC (secondSun_MC)
package {
import flash.display.*;
public dynamic class secondSun_MC extends MovieClip {
public function secondSun_MC(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package
Section 182
//setTrap_mp3 (setTrap_mp3)
package {
import flash.media.*;
public dynamic class setTrap_mp3 extends Sound {
}
}//package
Section 183
//sludge_MC (sludge_MC)
package {
import flash.display.*;
public dynamic class sludge_MC extends MovieClip {
public function sludge_MC(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package
Section 184
//snare_MC (snare_MC)
package {
import flash.display.*;
public dynamic class snare_MC extends MovieClip {
public function snare_MC(){
addFrameScript(90, frame91);
}
function frame91(){
stop();
}
}
}//package
Section 185
//snare_mp3 (snare_mp3)
package {
import flash.media.*;
public dynamic class snare_mp3 extends Sound {
}
}//package
Section 186
//sun_MC (sun_MC)
package {
import flash.display.*;
public dynamic class sun_MC extends MovieClip {
public var sun:MovieClip;
}
}//package
Section 187
//supportTree_MC (supportTree_MC)
package {
import flash.display.*;
public dynamic class supportTree_MC extends MovieClip {
public var SurvivorSafety_btn:abilityUpgrade_BTN;
public var Snare_btn:abilityUpgrade_BTN;
public var BrainBomb_btn:abilityUpgrade_BTN;
public var Pushback_btn:abilityUpgrade_BTN;
public var CloudCover_btn:abilityUpgrade_BTN;
public var Sludge_btn:abilityUpgrade_BTN;
public var Levitate_btn:abilityUpgrade_BTN;
public var ToxicOoze_btn:abilityUpgrade_BTN;
public var CripplingMist_btn:abilityUpgrade_BTN;
public var TimeFreeze_btn:abilityUpgrade_BTN;
public var Vortex_btn:abilityUpgrade_BTN;
public var Heal_btn:abilityUpgrade_BTN;
public var SecondSun_btn:abilityUpgrade_BTN;
public var TimeShift_btn:abilityUpgrade_BTN;
public var RainStorm_btn:abilityUpgrade_BTN;
}
}//package
Section 188
//survivor1_MC (survivor1_MC)
package {
import apocalypseClasses.*;
public dynamic class survivor1_MC extends survivor {
}
}//package
Section 189
//survivor1Shadow_MC (survivor1Shadow_MC)
package {
import flash.display.*;
public dynamic class survivor1Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 190
//survivor2_MC (survivor2_MC)
package {
import apocalypseClasses.*;
public dynamic class survivor2_MC extends survivor {
}
}//package
Section 191
//survivor2Shadow_MC (survivor2Shadow_MC)
package {
import flash.display.*;
public dynamic class survivor2Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 192
//survivor3_MC (survivor3_MC)
package {
import apocalypseClasses.*;
public dynamic class survivor3_MC extends survivor {
}
}//package
Section 193
//survivor3Shadow_MC (survivor3Shadow_MC)
package {
import flash.display.*;
public dynamic class survivor3Shadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 194
//survivorBonus_MC (survivorBonus_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class survivorBonus_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 195
//survivorDeath_mp3 (survivorDeath_mp3)
package {
import flash.media.*;
public dynamic class survivorDeath_mp3 extends Sound {
}
}//package
Section 196
//survivorHelp_MC (survivorHelp_MC)
package {
import flash.display.*;
public dynamic class survivorHelp_MC extends MovieClip {
}
}//package
Section 197
//survivorKillBonus_MC (survivorKillBonus_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class survivorKillBonus_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 198
//survivorKilled_MC (survivorKilled_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class survivorKilled_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 199
//survivorSafety_mp3 (survivorSafety_mp3)
package {
import flash.media.*;
public dynamic class survivorSafety_mp3 extends Sound {
}
}//package
Section 200
//survivorSaved_MC (survivorSaved_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class survivorSaved_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 201
//survivorsClearedPopup_MC (survivorsClearedPopup_MC)
package {
import flash.display.*;
public dynamic class survivorsClearedPopup_MC extends MovieClip {
public var ok_btn:mainMenu_BTN;
}
}//package
Section 202
//survivorsSavedBonus_MC (survivorsSavedBonus_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class survivorsSavedBonus_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 203
//timeFreeze_MC (timeFreeze_MC)
package {
import flash.display.*;
public dynamic class timeFreeze_MC extends MovieClip {
}
}//package
Section 204
//timeShift_MC (timeShift_MC)
package {
import flash.display.*;
public dynamic class timeShift_MC extends MovieClip {
}
}//package
Section 205
//timeShift_mp3 (timeShift_mp3)
package {
import flash.media.*;
public dynamic class timeShift_mp3 extends Sound {
}
}//package
Section 206
//TokyoArea_MC (TokyoArea_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TokyoArea_MC extends MovieClip {
public var ability0_btn:ability_BTN;
public var flyingEnemyDepth_mc:MovieClip;
public var ground_mc:MovieClip;
public var ability3_btn:ability_BTN;
public var sun_mc:sun_MC;
public var ability7_btn:ability_BTN;
public var ability1_btn:ability_BTN;
public var ability5_btn:ability_BTN;
public var daylight_mc:daylight_MC;
public var ap_txt:TextField;
public var enemyDepth_mc:MovieClip;
public var moon_mc:MovieClip;
public var hp_txt:TextField;
public var player_mc:player_MC;
public var props_mc:MovieClip;
public var skyDepth_mc:MovieClip;
public var ability2_btn:ability_BTN;
public var ability6_btn:ability_BTN;
public var terrainDepth_mc:MovieClip;
public var ability4_btn:ability_BTN;
}
}//package
Section 207
//toxicOoze_MC (toxicOoze_MC)
package {
import flash.display.*;
public dynamic class toxicOoze_MC extends MovieClip {
public function toxicOoze_MC(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package
Section 208
//tsunami_MC (tsunami_MC)
package {
import flash.display.*;
public dynamic class tsunami_MC extends MovieClip {
}
}//package
Section 209
//tsunami_mp3 (tsunami_mp3)
package {
import flash.media.*;
public dynamic class tsunami_mp3 extends Sound {
}
}//package
Section 210
//tsunamiGraphics_MC (tsunamiGraphics_MC)
package {
import flash.display.*;
public dynamic class tsunamiGraphics_MC extends MovieClip {
}
}//package
Section 211
//tsunamiWater_MC (tsunamiWater_MC)
package {
import flash.display.*;
public dynamic class tsunamiWater_MC extends MovieClip {
public var ground_mc:MovieClip;
public function tsunamiWater_MC(){
addFrameScript(89, frame90, 159, frame160);
}
function frame160(){
gotoAndStop("start");
}
function frame90(){
stop();
}
}
}//package
Section 212
//tsunamiWater2_MC (tsunamiWater2_MC)
package {
import flash.display.*;
public dynamic class tsunamiWater2_MC extends MovieClip {
public var ground_mc:MovieClip;
public function tsunamiWater2_MC(){
addFrameScript(89, frame90, 159, frame160);
}
function frame160(){
gotoAndStop("start");
}
function frame90(){
stop();
}
}
}//package
Section 213
//turtle_MC (turtle_MC)
package {
import apocalypseClasses.*;
public dynamic class turtle_MC extends enemy {
public function turtle_MC(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 214
//turtleShadow_MC (turtleShadow_MC)
package {
import flash.display.*;
public dynamic class turtleShadow_MC extends MovieClip {
public var shadow:MovieClip;
}
}//package
Section 215
//vampireBite_MC (vampireBite_MC)
package {
import flash.display.*;
public dynamic class vampireBite_MC extends MovieClip {
}
}//package
Section 216
//warriorBonus_MC (warriorBonus_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class warriorBonus_MC extends MovieClip {
public var ap_txt:TextField;
}
}//package
Section 217
//worldMap_MC (worldMap_MC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class worldMap_MC extends MovieClip {
public var FortBragg_48_btn:destination_BTN;
public var back_btn:mainMenu_BTN;
public var nextTip_btn:mainMenu_BTN;
public var SaharaDesert_14_btn:destination_BTN;
public var NYC_87_btn:destination_BTN;
public var Tokyo_92_btn:destination_BTN;
public var FinalBattle_xxx_btn:destination_BTN;
public var affinityBar_mc:affinityBar_MC;
public var save_btn:mainMenu_BTN;
public var GreatPlains_1_btn:destination_BTN;
public var Mumbai_75_btn:destination_BTN;
public var tip_txt:TextField;
public var Moscow_63_btn:destination_BTN;
public var Paris_32_btn:destination_BTN;
public var hp_txt:TextField;
public var Cairo_22_btn:destination_BTN;
public var ability_btn:mainMenu_BTN;
public var dayNight_mc:MovieClip;
public var GalapagosIslands_100_btn:destination_BTN;
}
}//package
Section 218
//vortex_MC (vortex_MC)
package {
import flash.display.*;
public dynamic class vortex_MC extends MovieClip {
public function vortex_MC(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package
Section 219
//vortex_mp3 (vortex_mp3)
package {
import flash.media.*;
public dynamic class vortex_mp3 extends Sound {
}
}//package
Section 220
//wyvern_MC (wyvern_MC)
package {
import apocalypseClasses.*;
public dynamic class wyvern_MC extends enemy {
public function wyvern_MC(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
model_mc.alpha = 1;
gotoAndStop("idle");
}
}
}//package
Section 221
//yesNoPrompt_MC (yesNoPrompt_MC)
package {
import flash.display.*;
public dynamic class yesNoPrompt_MC extends MovieClip {
public var yes_btn:mainMenu_BTN;
public var no_btn:mainMenu_BTN;
}
}//package