Frame 1
stop();
Frame 2
_xscale = 125;
_yscale = 125;
moat = 0;
towerNE = 0;
towerSE = 0;
towerNW = 0;
towerSW = 0;
ArchAtkLVL = 1;
BarrierLVL = 0;
barrier_active = 0;
ArmorLVL = 1;
MaxHealth = 100 * _root.ArmorLVL;
Health = MaxHealth;
WizAtkLVL = 1;
WizSpdLVL = 1;
LastCast = getTimer();
LastArrowNE = getTimer();
LastArrowNW = getTimer();
LastArrowSE = getTimer();
LastArrowSW = getTimer();
EnemiesRemaining = 0;
LargestEnemy = 0;
Level = 1;
Play = 0;
MenuUp = 0;
Timer = 0;
Gold = 0;
EnemySpawner = [[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 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, 0, 0, 0, 0, 4, 0, 0, 6, 0, 0, 4, 0, 0, 0, 7, 0, 6, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 6, 0, 0, 3, 0, 0, 7, 0, 0, 5, 0, 0, 0, 4, 0, 0, 6, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 2, 0, 5, 0, 8], [8, 0, 4, 0, 0, 6, 0, 0, 4, 0, 0, 0, 7, 0, 6, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 6, 0, 0, 3, 0, 0, 7, 0, 0, 5, 0, 0, 0, 4, 8, 0, 6, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 2, 0, 5, 0, 0, 6, 0, 5, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 0, 5, 0, 0, 0, 0, 6, 0, 5, 0, 6, 0, 0, 0, 0, 8]];
Audio = new Sound(this);
Audio.attachSound("Music_Opening");
Audio.start(0, 99);
stop();
Frame 3
stop();
Instance of Symbol 22 MovieClip in Frame 3
onClipEvent (enterFrame) {
_root.MaxHealth = 100 * _root.ArmorLVL;
gotoAndStop(_root.ArmorLVL);
}
Instance of Symbol 24 MovieClip [Wizard] in Frame 3
onClipEvent (load) {
Fmax = 0;
}
onClipEvent (enterFrame) {
ova = (200 - _root._ymouse) / (200 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
this._yscale = 100;
if ((200 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
this._yscale = -100;
}
if (((200 - _root._xmouse) >= 0) && ((200 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
this._yscale = 100;
}
if (Key.isDown(65) && (getTimer() > ((_root.LastCast + 500) + ((1000 * (4 - _root.WizSpdLVL)) / 3)))) {
_root.attachMovie("Fireball", "Fireball_" + Fmax, 10 + Fmax);
_root["Fireball_" + Fmax].rot = this._rotation;
Fmax = Fmax + 1;
if (Fmax > 8) {
Fmax = 0;
}
_root.LastCast = getTimer();
}
}
Instance of Symbol 27 MovieClip in Frame 3
onClipEvent (enterFrame) {
if ((_root.BarrierLVL != 0) && (_root.barrier_active == 1)) {
_alpha = 60;
} else {
_alpha = 0;
}
}
Instance of Symbol 29 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.towerNE == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 29 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.towerSE == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 29 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.towerSW == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 29 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.towerNW == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 49 MovieClip in Frame 3
onClipEvent (load) {
Amax = 0;
}
onClipEvent (enterFrame) {
ova = (50 - _root._ymouse) / (350 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
if ((350 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
}
if (((350 - _root._xmouse) >= 0) && ((50 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
}
if (_root.towerNE == 1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if ((Key.isDown(83) && (_root.towerNE == 1)) && (getTimer() > (_root.LastArrowNE + 500))) {
gotoAndPlay (2);
if (_root.ArchAtkLVL == 1) {
_root.attachMovie("Arrow", "Arrow_2_" + Amax, 35 + Amax);
} else if (_root.ArchAtkLVL == 2) {
_root.attachMovie("Arrow2", "Arrow_2_" + Amax, 35 + Amax);
} else if (_root.ArchAtkLVL == 3) {
_root.attachMovie("Arrow3", "Arrow_2_" + Amax, 35 + Amax);
} else if (_root.ArchAtkLVL == 4) {
_root.attachMovie("Arrow4", "Arrow_2_" + Amax, 35 + Amax);
}
_root["Arrow_2_" + Amax].rot = this._rotation * (0.96 + (0.01 * random(9)));
_root["Arrow_2_" + Amax]._x = 350;
_root["Arrow_2_" + Amax]._y = 50;
Amax = Amax + 1;
if (Amax > 12) {
Amax = 0;
}
_root.LastArrowNE = getTimer();
}
}
Instance of Symbol 49 MovieClip in Frame 3
onClipEvent (load) {
Amax = 0;
}
onClipEvent (enterFrame) {
ova = (350 - _root._ymouse) / (350 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
if ((350 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
}
if (((350 - _root._xmouse) >= 0) && ((350 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
}
if (_root.towerSE == 1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if ((Key.isDown(83) && (_root.towerSE == 1)) && (getTimer() > (_root.LastArrowSE + 500))) {
gotoAndPlay (2);
if (_root.ArchAtkLVL == 1) {
_root.attachMovie("Arrow", "Arrow_3_" + Amax, 50 + Amax);
} else if (_root.ArchAtkLVL == 2) {
_root.attachMovie("Arrow2", "Arrow_3_" + Amax, 50 + Amax);
} else if (_root.ArchAtkLVL == 3) {
_root.attachMovie("Arrow3", "Arrow_3_" + Amax, 50 + Amax);
} else if (_root.ArchAtkLVL == 4) {
_root.attachMovie("Arrow4", "Arrow_3_" + Amax, 50 + Amax);
}
_root["Arrow_3_" + Amax].rot = this._rotation * (0.96 + (0.01 * random(9)));
_root["Arrow_3_" + Amax]._x = 350;
_root["Arrow_3_" + Amax]._y = 350;
Amax = Amax + 1;
if (Amax > 12) {
Amax = 0;
}
_root.LastArrowSE = getTimer();
}
}
Instance of Symbol 49 MovieClip in Frame 3
onClipEvent (load) {
Amax = 0;
}
onClipEvent (enterFrame) {
ova = (350 - _root._ymouse) / (50 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
if ((50 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
}
if (((50 - _root._xmouse) >= 0) && ((350 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
}
if (_root.towerSW == 1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if ((Key.isDown(83) && (_root.towerSW == 1)) && (getTimer() > (_root.LastArrowSW + 500))) {
gotoAndPlay (2);
if (_root.ArchAtkLVL == 1) {
_root.attachMovie("Arrow", "Arrow_4_" + Amax, 65 + Amax);
} else if (_root.ArchAtkLVL == 2) {
_root.attachMovie("Arrow2", "Arrow_4_" + Amax, 65 + Amax);
} else if (_root.ArchAtkLVL == 3) {
_root.attachMovie("Arrow3", "Arrow_4_" + Amax, 65 + Amax);
} else if (_root.ArchAtkLVL == 4) {
_root.attachMovie("Arrow4", "Arrow_4_" + Amax, 65 + Amax);
}
_root["Arrow_4_" + Amax].rot = this._rotation * (0.96 + (0.01 * random(9)));
_root["Arrow_4_" + Amax]._x = 50;
_root["Arrow_4_" + Amax]._y = 350;
Amax = Amax + 1;
if (Amax > 12) {
Amax = 0;
}
_root.LastArrowSW = getTimer();
}
}
Instance of Symbol 49 MovieClip in Frame 3
onClipEvent (load) {
Amax = 0;
}
onClipEvent (enterFrame) {
ova = (50 - _root._ymouse) / (50 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
if ((50 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
}
if (((50 - _root._xmouse) >= 0) && ((50 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
}
if (_root.towerNW == 1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if ((Key.isDown(83) && (_root.towerNW == 1)) && (getTimer() > (_root.LastArrowNW + 500))) {
gotoAndPlay (2);
if (_root.ArchAtkLVL == 1) {
_root.attachMovie("Arrow", "Arrow_1_" + Amax, 20 + Amax);
} else if (_root.ArchAtkLVL == 2) {
_root.attachMovie("Arrow2", "Arrow_1_" + Amax, 20 + Amax);
} else if (_root.ArchAtkLVL == 3) {
_root.attachMovie("Arrow3", "Arrow_1_" + Amax, 20 + Amax);
} else if (_root.ArchAtkLVL == 4) {
_root.attachMovie("Arrow4", "Arrow_1_" + Amax, 20 + Amax);
}
_root["Arrow_1_" + Amax].rot = this._rotation * (0.96 + (0.01 * random(9)));
_root["Arrow_1_" + Amax]._x = 50;
_root["Arrow_1_" + Amax]._y = 50;
Amax = Amax + 1;
if (Amax > 12) {
Amax = 0;
}
_root.LastArrowNW = getTimer();
}
}
Instance of Symbol 51 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.moat == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 52 MovieClip in Frame 3
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
gotoAndStop(_root.Timer);
}
Instance of Symbol 155 MovieClip [Cam] "Cam" in Frame 3
onClipEvent (enterFrame) {
this._x = (_xmouse * 0.5) + 200;
this._y = (_ymouse * 0.5) + 200;
}
Instance of Symbol 268 MovieClip in Frame 3
onClipEvent (enterFrame) {
Mouse.hide();
this._x = _root._xmouse;
this._y = _root._ymouse;
this._rotation = _root.Map.Wizard._rotation;
}
Frame 4
Mouse.show();
Audio.stop();
stop();
Frame 5
Mouse.show();
Audio.stop();
stop();
Symbol 27 MovieClip Frame 25
if (_root.BarrierLVL == 2) {
gotoAndPlay (30);
} else {
gotoAndPlay (1);
}
Symbol 27 MovieClip Frame 54
gotoAndPlay (30);
Symbol 49 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 13
gotoAndStop (1);
Instance of Symbol 22 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (enterFrame) {
_root.MaxHealth = 100 * _root.ArmorLVL;
gotoAndStop(_root.ArmorLVL);
}
Instance of Symbol 24 MovieClip [Wizard] in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (load) {
Fmax = 0;
}
onClipEvent (enterFrame) {
ova = (200 - _root._ymouse) / (200 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
this._yscale = 100;
if ((200 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
this._yscale = -100;
}
if (((200 - _root._xmouse) >= 0) && ((200 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
this._yscale = 100;
}
if (Key.isDown(65) && (getTimer() > ((_root.LastCast + 500) + ((1000 * (4 - _root.WizSpdLVL)) / 3)))) {
_root.attachMovie("Fireball", "Fireball_" + Fmax, 10 + Fmax);
_root["Fireball_" + Fmax].rot = this._rotation;
Fmax = Fmax + 1;
if (Fmax > 8) {
Fmax = 0;
}
_root.LastCast = getTimer();
}
}
Instance of Symbol 27 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (enterFrame) {
if ((_root.BarrierLVL != 0) && (_root.barrier_active == 1)) {
_alpha = 60;
} else {
_alpha = 0;
}
}
Instance of Symbol 29 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (enterFrame) {
if (_root.towerNE == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 29 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (enterFrame) {
if (_root.towerSE == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 29 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (enterFrame) {
if (_root.towerSW == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 29 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (enterFrame) {
if (_root.towerNW == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 49 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (load) {
Amax = 0;
}
onClipEvent (enterFrame) {
ova = (50 - _root._ymouse) / (350 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
if ((350 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
}
if (((350 - _root._xmouse) >= 0) && ((50 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
}
if (_root.towerNE == 1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if ((Key.isDown(83) && (_root.towerNE == 1)) && (getTimer() > (_root.LastArrowNE + 500))) {
gotoAndPlay (2);
if (_root.ArchAtkLVL == 1) {
_root.attachMovie("Arrow", "Arrow_2_" + Amax, 35 + Amax);
} else if (_root.ArchAtkLVL == 2) {
_root.attachMovie("Arrow2", "Arrow_2_" + Amax, 35 + Amax);
} else if (_root.ArchAtkLVL == 3) {
_root.attachMovie("Arrow3", "Arrow_2_" + Amax, 35 + Amax);
} else if (_root.ArchAtkLVL == 4) {
_root.attachMovie("Arrow4", "Arrow_2_" + Amax, 35 + Amax);
}
_root["Arrow_2_" + Amax].rot = this._rotation * (0.96 + (0.01 * random(9)));
_root["Arrow_2_" + Amax]._x = 350;
_root["Arrow_2_" + Amax]._y = 50;
Amax = Amax + 1;
if (Amax > 12) {
Amax = 0;
}
_root.LastArrowNE = getTimer();
}
}
Instance of Symbol 49 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (load) {
Amax = 0;
}
onClipEvent (enterFrame) {
ova = (350 - _root._ymouse) / (350 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
if ((350 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
}
if (((350 - _root._xmouse) >= 0) && ((350 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
}
if (_root.towerSE == 1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if ((Key.isDown(83) && (_root.towerSE == 1)) && (getTimer() > (_root.LastArrowSE + 500))) {
gotoAndPlay (2);
if (_root.ArchAtkLVL == 1) {
_root.attachMovie("Arrow", "Arrow_3_" + Amax, 50 + Amax);
} else if (_root.ArchAtkLVL == 2) {
_root.attachMovie("Arrow2", "Arrow_3_" + Amax, 50 + Amax);
} else if (_root.ArchAtkLVL == 3) {
_root.attachMovie("Arrow3", "Arrow_3_" + Amax, 50 + Amax);
} else if (_root.ArchAtkLVL == 4) {
_root.attachMovie("Arrow4", "Arrow_3_" + Amax, 50 + Amax);
}
_root["Arrow_3_" + Amax].rot = this._rotation * (0.96 + (0.01 * random(9)));
_root["Arrow_3_" + Amax]._x = 350;
_root["Arrow_3_" + Amax]._y = 350;
Amax = Amax + 1;
if (Amax > 12) {
Amax = 0;
}
_root.LastArrowSE = getTimer();
}
}
Instance of Symbol 49 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (load) {
Amax = 0;
}
onClipEvent (enterFrame) {
ova = (350 - _root._ymouse) / (50 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
if ((50 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
}
if (((50 - _root._xmouse) >= 0) && ((350 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
}
if (_root.towerSW == 1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if ((Key.isDown(83) && (_root.towerSW == 1)) && (getTimer() > (_root.LastArrowSW + 500))) {
gotoAndPlay (2);
if (_root.ArchAtkLVL == 1) {
_root.attachMovie("Arrow", "Arrow_4_" + Amax, 65 + Amax);
} else if (_root.ArchAtkLVL == 2) {
_root.attachMovie("Arrow2", "Arrow_4_" + Amax, 65 + Amax);
} else if (_root.ArchAtkLVL == 3) {
_root.attachMovie("Arrow3", "Arrow_4_" + Amax, 65 + Amax);
} else if (_root.ArchAtkLVL == 4) {
_root.attachMovie("Arrow4", "Arrow_4_" + Amax, 65 + Amax);
}
_root["Arrow_4_" + Amax].rot = this._rotation * (0.96 + (0.01 * random(9)));
_root["Arrow_4_" + Amax]._x = 50;
_root["Arrow_4_" + Amax]._y = 350;
Amax = Amax + 1;
if (Amax > 12) {
Amax = 0;
}
_root.LastArrowSW = getTimer();
}
}
Instance of Symbol 49 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (load) {
Amax = 0;
}
onClipEvent (enterFrame) {
ova = (50 - _root._ymouse) / (50 - _root._xmouse);
this._rotation = Math.atan(ova) * 57.2957795130823;
if ((50 - _root._xmouse) < 0) {
this._rotation = this._rotation + 180;
}
if (((50 - _root._xmouse) >= 0) && ((50 - _root._ymouse) < 0)) {
this._rotation = this._rotation + 360;
}
if (_root.towerNW == 1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if ((Key.isDown(83) && (_root.towerNW == 1)) && (getTimer() > (_root.LastArrowNW + 500))) {
gotoAndPlay (2);
if (_root.ArchAtkLVL == 1) {
_root.attachMovie("Arrow", "Arrow_1_" + Amax, 20 + Amax);
} else if (_root.ArchAtkLVL == 2) {
_root.attachMovie("Arrow2", "Arrow_1_" + Amax, 20 + Amax);
} else if (_root.ArchAtkLVL == 3) {
_root.attachMovie("Arrow3", "Arrow_1_" + Amax, 20 + Amax);
} else if (_root.ArchAtkLVL == 4) {
_root.attachMovie("Arrow4", "Arrow_1_" + Amax, 20 + Amax);
}
_root["Arrow_1_" + Amax].rot = this._rotation * (0.96 + (0.01 * random(9)));
_root["Arrow_1_" + Amax]._x = 50;
_root["Arrow_1_" + Amax]._y = 50;
Amax = Amax + 1;
if (Amax > 12) {
Amax = 0;
}
_root.LastArrowNW = getTimer();
}
}
Instance of Symbol 51 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (enterFrame) {
if (_root.moat == 0) {
_alpha = 0;
} else {
_alpha = 100;
}
}
Instance of Symbol 52 MovieClip in Symbol 53 MovieClip [Map] Frame 1
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
gotoAndStop(_root.Timer);
}
Symbol 61 MovieClip Frame 21
gotoAndPlay (1);
Symbol 61 MovieClip Frame 34
if (_root.BarrierLVL == 1) {
_parent.Health = _parent.Health - 4;
} else if (_root.BarrierLVL == 2) {
_parent.Health = _parent.Health - 8;
}
if (_parent.Health > 0) {
_root.Health = _root.Health - _parent.Strength;
}
Symbol 61 MovieClip Frame 60
gotoAndPlay (30);
Symbol 61 MovieClip Frame 72
stop();
Symbol 62 MovieClip [Giant] Frame 1
walk = 1;
dead = 0;
Health = 250 + (20 * _root.Level);
MaxHealth = Health;
Strength = 5 + (4 * _root.Level);
side = random(4);
if (side < 3) {
if (side == 0) {
this._x = -200;
} else {
this._x = 600;
}
this._y = random(651) - 125;
} else {
if (side == 3) {
this._y = -200;
} else {
this._y = 600;
}
this._x = random(651) - 125;
}
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
Instance of Symbol 56 MovieClip in Symbol 62 MovieClip [Giant] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 61 MovieClip in Symbol 62 MovieClip [Giant] Frame 1
onClipEvent (enterFrame) {
this._rotation = _parent.rot;
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 62 MovieClip [Giant] Frame 2
speed = 1;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
if ((Health <= 0) || (_root._currentframe != 3)) {
dead = 1;
gotoAndPlay (4);
}
if (walk == 1) {
if ((_root.moat == 1) && (((((287.5 < _x) && (_x < 327.5)) || ((72.5 < _x) && (_x < 112.5))) && ((72.5 < _y) && (_y < 327.5))) || ((((287.5 < _y) && (_y < 327.5)) || ((72.5 < _y) && (_y < 112.5))) && ((72.5 < _x) && (_x < 327.5))))) {
this._x = this._x + (0.3 * xinc);
this._y = this._y + (0.3 * yinc);
} else {
this._x = this._x + xinc;
this._y = this._y + yinc;
}
}
if (((this._x <= 254) && (this._x >= 146)) && ((this._y <= 254) && (this._y >= 146))) {
walk = 0;
_root.barrier_active = 1;
}
Symbol 62 MovieClip [Giant] Frame 3
gotoAndPlay (2);
Symbol 62 MovieClip [Giant] Frame 4
_root.barrier_active = 0;
_root.Gold = _root.Gold + 100;
Symbol 62 MovieClip [Giant] Frame 23
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 63 MovieClip Frame 21
gotoAndPlay (1);
Symbol 63 MovieClip Frame 34
if (_root.BarrierLVL == 1) {
_parent.Health = _parent.Health - 4;
} else if (_root.BarrierLVL == 2) {
_parent.Health = _parent.Health - 8;
}
if (_parent.Health > 0) {
_root.Health = _root.Health - _parent.Strength;
}
Symbol 63 MovieClip Frame 60
gotoAndPlay (30);
Symbol 63 MovieClip Frame 72
stop();
Symbol 64 MovieClip [Troll] Frame 1
walk = 1;
dead = 0;
Health = 58 + (4 * _root.Level);
MaxHealth = Health;
Strength = 2 * _root.Level;
side = random(4);
if (side < 3) {
if (side == 0) {
this._x = -200;
} else {
this._x = 600;
}
this._y = random(651) - 125;
} else {
if (side == 3) {
this._y = -200;
} else {
this._y = 600;
}
this._x = random(651) - 125;
}
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
Instance of Symbol 56 MovieClip in Symbol 64 MovieClip [Troll] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 63 MovieClip in Symbol 64 MovieClip [Troll] Frame 1
onClipEvent (enterFrame) {
this._rotation = _parent.rot;
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 64 MovieClip [Troll] Frame 2
speed = 1;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
if ((Health <= 0) || (_root._currentframe != 3)) {
dead = 1;
gotoAndPlay (4);
}
if (walk == 1) {
if ((_root.moat == 1) && (((((287.5 < _x) && (_x < 327.5)) || ((72.5 < _x) && (_x < 112.5))) && ((72.5 < _y) && (_y < 327.5))) || ((((287.5 < _y) && (_y < 327.5)) || ((72.5 < _y) && (_y < 112.5))) && ((72.5 < _x) && (_x < 327.5))))) {
this._x = this._x + (0.3 * xinc);
this._y = this._y + (0.3 * yinc);
} else {
this._x = this._x + xinc;
this._y = this._y + yinc;
}
}
if (((this._x <= 254) && (this._x >= 146)) && ((this._y <= 254) && (this._y >= 146))) {
walk = 0;
_root.barrier_active = 1;
}
Symbol 64 MovieClip [Troll] Frame 3
gotoAndPlay (2);
Symbol 64 MovieClip [Troll] Frame 4
_root.barrier_active = 0;
_root.Gold = _root.Gold + 100;
Symbol 64 MovieClip [Troll] Frame 23
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 67 MovieClip Frame 21
gotoAndPlay (1);
Symbol 67 MovieClip Frame 34
if (_root.BarrierLVL == 1) {
_parent.Health = _parent.Health - 2;
} else if (_root.BarrierLVL == 2) {
_parent.Health = _parent.Health - 4;
}
if (_parent.Health > 0) {
_root.Health = _root.Health - _parent.Strength;
}
Symbol 67 MovieClip Frame 60
gotoAndPlay (30);
Symbol 67 MovieClip Frame 72
stop();
Symbol 68 MovieClip [Demon Lord] Frame 1
walk = 1;
dead = 0;
Health = 500 + (20 * _root.Level);
MaxHealth = Health;
Strength = 2 + (2 * _root.Level);
Circling = 0;
Attack = 0;
ShotNum = 1;
Angling = 3;
side = random(4);
if (side < 3) {
if (side == 0) {
this._x = -200;
} else {
this._x = 600;
}
this._y = random(800) - 200;
} else {
if (side == 3) {
this._y = -200;
} else {
this._y = 600;
}
this._x = random(800) - 200;
}
Instance of Symbol 56 MovieClip in Symbol 68 MovieClip [Demon Lord] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 67 MovieClip in Symbol 68 MovieClip [Demon Lord] Frame 1
onClipEvent (enterFrame) {
if (_parent.Circling == 1) {
this._rotation = _parent.rot + 90;
} else {
this._rotation = _parent.rot;
}
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 68 MovieClip [Demon Lord] Frame 2
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
speed = 3;
if (((this._x <= 450) && (this._x >= -50)) && ((this._y <= 450) && (this._y >= -50))) {
Circling = 1;
}
if (Circling == 1) {
xinc = Angling * Math.cos(((rot - 90) / 180) * Math.PI);
yinc = Angling * Math.sin(((rot - 90) / 180) * Math.PI);
Attack++;
} else {
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
}
if (Attack >= 45) {
Attack = 0;
_root.attachMovie("DL_Shot", "Enemy_" + ShotNum, 200 + ShotNum);
ShotNum++;
if (ShotNum > 10) {
ShotNum = 1;
}
}
if ((Health <= 0) || (_root._currentframe != 3)) {
dead = 1;
gotoAndPlay (4);
}
if (walk == 1) {
this._x = this._x + xinc;
this._y = this._y + yinc;
}
if (Health < MaxHealth) {
Health++;
}
Symbol 68 MovieClip [Demon Lord] Frame 3
gotoAndPlay (2);
Symbol 68 MovieClip [Demon Lord] Frame 4
_root.barrier_active = 0;
_root.Gold = _root.Gold + 50;
Symbol 68 MovieClip [Demon Lord] Frame 23
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 69 MovieClip Frame 21
gotoAndPlay (1);
Symbol 69 MovieClip Frame 34
if (_root.BarrierLVL == 1) {
_parent.Health = _parent.Health - 4;
} else if (_root.BarrierLVL == 2) {
_parent.Health = _parent.Health - 8;
}
if (_parent.Health > 0) {
_root.Health = _root.Health - _parent.Strength;
}
Symbol 69 MovieClip Frame 60
gotoAndPlay (30);
Symbol 69 MovieClip Frame 72
stop();
Symbol 70 MovieClip [Black Knight] Frame 1
walk = 1;
dead = 0;
Health = 12 + (4 * _root.Level);
MaxHealth = Health;
Strength = 1 + (1 * _root.Level);
side = random(4);
if (side < 3) {
if (side == 0) {
this._x = -200;
} else {
this._x = 600;
}
this._y = random(651) - 125;
} else {
if (side == 3) {
this._y = -200;
} else {
this._y = 600;
}
this._x = random(651) - 125;
}
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
Instance of Symbol 56 MovieClip in Symbol 70 MovieClip [Black Knight] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 69 MovieClip in Symbol 70 MovieClip [Black Knight] Frame 1
onClipEvent (enterFrame) {
this._rotation = _parent.rot;
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 70 MovieClip [Black Knight] Frame 2
speed = 2;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
if ((Health <= 0) || (_root._currentframe != 3)) {
dead = 1;
gotoAndPlay (4);
}
if (walk == 1) {
if ((_root.moat == 1) && (((((287.5 < _x) && (_x < 327.5)) || ((72.5 < _x) && (_x < 112.5))) && ((72.5 < _y) && (_y < 327.5))) || ((((287.5 < _y) && (_y < 327.5)) || ((72.5 < _y) && (_y < 112.5))) && ((72.5 < _x) && (_x < 327.5))))) {
this._x = this._x + (0.3 * xinc);
this._y = this._y + (0.3 * yinc);
} else {
this._x = this._x + xinc;
this._y = this._y + yinc;
}
}
if (((this._x <= 254) && (this._x >= 146)) && ((this._y <= 254) && (this._y >= 146))) {
walk = 0;
_root.barrier_active = 1;
}
Symbol 70 MovieClip [Black Knight] Frame 3
gotoAndPlay (2);
Symbol 70 MovieClip [Black Knight] Frame 4
_root.barrier_active = 0;
_root.Gold = _root.Gold + 50;
Symbol 70 MovieClip [Black Knight] Frame 23
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 73 MovieClip Frame 21
gotoAndPlay (1);
Symbol 73 MovieClip Frame 34
if (_root.BarrierLVL == 1) {
_parent.Health = _parent.Health - 4;
} else if (_root.BarrierLVL == 2) {
_parent.Health = _parent.Health - 8;
}
if (_parent.Health > 0) {
_root.Health = _root.Health - _parent.Strength;
_root.attachMovie("Explosion", "Explosion", 120);
_root.Explosion._x = _parent._x;
_root.Explosion._y = _parent._y;
_root.barrier_active = 0;
_root.EnemiesRemaining--;
_parent.removeMovieClip();
}
Symbol 73 MovieClip Frame 60
gotoAndPlay (30);
Symbol 73 MovieClip Frame 72
stop();
Symbol 74 MovieClip [Frenetic] Frame 1
walk = 1;
dead = 0;
Health = 4 + (3 * _root.Level);
MaxHealth = Health;
Strength = 25 + (3 * _root.Level);
side = random(4);
if (side < 3) {
if (side == 0) {
this._x = -200;
} else {
this._x = 600;
}
this._y = random(651) - 125;
} else {
if (side == 3) {
this._y = -200;
} else {
this._y = 600;
}
this._x = random(651) - 125;
}
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
Instance of Symbol 56 MovieClip in Symbol 74 MovieClip [Frenetic] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 73 MovieClip in Symbol 74 MovieClip [Frenetic] Frame 1
onClipEvent (enterFrame) {
this._rotation = _parent.rot;
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 74 MovieClip [Frenetic] Frame 2
speed = 4;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
if ((Health <= 0) || (_root._currentframe != 3)) {
dead = 1;
gotoAndPlay (4);
}
if (walk == 1) {
if ((_root.moat == 1) && (((((287.5 < _x) && (_x < 327.5)) || ((72.5 < _x) && (_x < 112.5))) && ((72.5 < _y) && (_y < 327.5))) || ((((287.5 < _y) && (_y < 327.5)) || ((72.5 < _y) && (_y < 112.5))) && ((72.5 < _x) && (_x < 327.5))))) {
this._x = this._x + (0.3 * xinc);
this._y = this._y + (0.3 * yinc);
} else {
this._x = this._x + xinc;
this._y = this._y + yinc;
}
}
if (((this._x <= 254) && (this._x >= 146)) && ((this._y <= 254) && (this._y >= 146))) {
walk = 0;
_root.barrier_active = 1;
}
Symbol 74 MovieClip [Frenetic] Frame 3
gotoAndPlay (2);
Symbol 74 MovieClip [Frenetic] Frame 4
_root.barrier_active = 0;
_root.Gold = _root.Gold + 100;
Symbol 74 MovieClip [Frenetic] Frame 23
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 80 MovieClip Frame 21
gotoAndPlay (1);
Symbol 80 MovieClip Frame 36
if (_root.BarrierLVL == 1) {
_parent.Health = _parent.Health - 4;
} else if (_root.BarrierLVL == 2) {
_parent.Health = _parent.Health - 8;
}
if (_parent.Health > 0) {
_root.Health = _root.Health - _parent.Strength;
}
Symbol 80 MovieClip Frame 60
gotoAndPlay (30);
Symbol 80 MovieClip Frame 72
stop();
Symbol 81 MovieClip [Dragon] Frame 1
walk = 1;
dead = 0;
Health = 50 + (7 * _root.Level);
MaxHealth = Health;
Strength = 2 + (2 * _root.Level);
Angling = (random(9) - 4) / 2;
side = random(4);
if (side < 3) {
if (side == 0) {
this._x = -200;
} else {
this._x = 600;
}
this._y = random(800) - 200;
} else {
if (side == 3) {
this._y = -200;
} else {
this._y = 600;
}
this._x = random(800) - 200;
}
Instance of Symbol 56 MovieClip in Symbol 81 MovieClip [Dragon] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 80 MovieClip in Symbol 81 MovieClip [Dragon] Frame 1
onClipEvent (enterFrame) {
this._rotation = _parent.rot + (28.6478897565412 * Math.atan(_parent.Angling / _parent.speed));
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 81 MovieClip [Dragon] Frame 2
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
speed = 1.5;
xinc = (speed * Math.sin(((rot - 90) / 180) * Math.PI)) + (Angling * Math.cos(((rot - 90) / 180) * Math.PI));
yinc = (-1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI))) + (Angling * Math.sin(((rot - 90) / 180) * Math.PI));
if ((Health <= 0) || (_root._currentframe != 3)) {
dead = 1;
gotoAndPlay (4);
}
if (walk == 1) {
this._x = this._x + xinc;
this._y = this._y + yinc;
}
if (((this._x <= 254) && (this._x >= 146)) && ((this._y <= 254) && (this._y >= 146))) {
walk = 0;
_root.barrier_active = 1;
}
Symbol 81 MovieClip [Dragon] Frame 3
gotoAndPlay (2);
Symbol 81 MovieClip [Dragon] Frame 4
_root.barrier_active = 0;
_root.Gold = _root.Gold + 15;
Symbol 81 MovieClip [Dragon] Frame 23
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 82 MovieClip Frame 21
gotoAndPlay (1);
Symbol 82 MovieClip Frame 34
if (_root.BarrierLVL == 1) {
_parent.Health = _parent.Health - 4;
} else if (_root.BarrierLVL == 2) {
_parent.Health = _parent.Health - 8;
}
if (_parent.Health > 0) {
_root.Health = _root.Health - _parent.Strength;
}
Symbol 82 MovieClip Frame 60
gotoAndPlay (30);
Symbol 82 MovieClip Frame 72
stop();
Symbol 83 MovieClip [Demonite] Frame 1
walk = 1;
dead = 0;
Health = 19 + (4 * _root.Level);
MaxHealth = Health;
Strength = 2 + (1 * _root.Level);
Angling = (random(9) - 4) / 2;
side = random(4);
if (side < 3) {
if (side == 0) {
this._x = -200;
} else {
this._x = 600;
}
this._y = random(800) - 200;
} else {
if (side == 3) {
this._y = -200;
} else {
this._y = 600;
}
this._x = random(800) - 200;
}
Instance of Symbol 56 MovieClip in Symbol 83 MovieClip [Demonite] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 82 MovieClip in Symbol 83 MovieClip [Demonite] Frame 1
onClipEvent (enterFrame) {
this._rotation = _parent.rot + (28.6478897565412 * Math.atan(_parent.Angling / _parent.speed));
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 83 MovieClip [Demonite] Frame 2
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
speed = 1.5;
xinc = (speed * Math.sin(((rot - 90) / 180) * Math.PI)) + (Angling * Math.cos(((rot - 90) / 180) * Math.PI));
yinc = (-1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI))) + (Angling * Math.sin(((rot - 90) / 180) * Math.PI));
if ((Health <= 0) || (_root._currentframe != 3)) {
dead = 1;
gotoAndPlay (4);
}
if (walk == 1) {
this._x = this._x + xinc;
this._y = this._y + yinc;
}
if (((this._x <= 254) && (this._x >= 146)) && ((this._y <= 254) && (this._y >= 146))) {
walk = 0;
_root.barrier_active = 1;
}
Symbol 83 MovieClip [Demonite] Frame 3
gotoAndPlay (2);
Symbol 83 MovieClip [Demonite] Frame 4
_root.barrier_active = 0;
_root.Gold = _root.Gold + 15;
Symbol 83 MovieClip [Demonite] Frame 23
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 84 MovieClip Frame 14
gotoAndPlay (6);
Symbol 85 MovieClip [DL_Shot] Frame 1
Health = 40;
MaxHealth = Health;
Strength = 20;
speed = -12;
Angling = (random(9) - 4) / 2;
this._x = _root.Enemy_0._x;
this._y = _root.Enemy_0._y;
Instance of Symbol 56 MovieClip in Symbol 85 MovieClip [DL_Shot] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 84 MovieClip in Symbol 85 MovieClip [DL_Shot] Frame 1
onClipEvent (enterFrame) {
this._rotation = _parent.rot;
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 85 MovieClip [DL_Shot] Frame 2
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
xinc = (speed * Math.sin(((rot - 90) / 180) * Math.PI)) + (Angling * Math.cos(((rot - 90) / 180) * Math.PI));
yinc = (-1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI))) + (Angling * Math.sin(((rot - 90) / 180) * Math.PI));
if (speed < 4) {
speed = speed + 0.5;
}
if (((Health <= 0) || (_root._currentframe != 3)) || (_root.Play == 0)) {
gotoAndPlay (4);
}
this._x = this._x + xinc;
this._y = this._y + yinc;
i = 0;
while (i < 9) {
if (this.hitTest(_root["Fireball_" + i])) {
_root["Fireball_" + i].gotoAndPlay(4);
this.removeMovieClip();
}
i++;
}
if (((this._x <= 254) && (this._x >= 146)) && ((this._y <= 254) && (this._y >= 146))) {
_root.Health = _root.Health - Strength;
this.removeMovieClip();
}
Symbol 85 MovieClip [DL_Shot] Frame 3
gotoAndPlay (2);
Symbol 85 MovieClip [DL_Shot] Frame 6
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 86 MovieClip Frame 21
gotoAndPlay (1);
Symbol 86 MovieClip Frame 34
if (_root.BarrierLVL == 1) {
_parent.Health = _parent.Health - 4;
} else if (_root.BarrierLVL == 2) {
_parent.Health = _parent.Health - 8;
}
if (_parent.Health > 0) {
_root.Health = _root.Health - _parent.Strength;
}
Symbol 86 MovieClip Frame 60
gotoAndPlay (30);
Symbol 86 MovieClip Frame 72
stop();
Symbol 87 MovieClip [Darkling] Frame 1
walk = 1;
dead = 0;
Health = 6 + (2 * _root.Level);
MaxHealth = Health;
Strength = 1 * _root.Level;
side = random(4);
if (side < 3) {
if (side == 0) {
this._x = -200;
} else {
this._x = 600;
}
this._y = random(651) - 125;
} else {
if (side == 3) {
this._y = -200;
} else {
this._y = 600;
}
this._x = random(651) - 125;
}
ova = (_y - 200) / (_x - 200);
rot = Math.atan(ova) * 57.2957795130823;
if ((_x - 200) < 0) {
rot = rot + 180;
}
if (((_x - 200) >= 0) && ((_y - 200) < 0)) {
rot = rot + 360;
}
Instance of Symbol 56 MovieClip in Symbol 87 MovieClip [Darkling] Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _parent.Health) / _parent.MaxHealth);
_xscale = ((Percent * 16) / 30);
gotoAndStop(Percent);
}
Instance of Symbol 86 MovieClip in Symbol 87 MovieClip [Darkling] Frame 1
onClipEvent (enterFrame) {
this._rotation = _parent.rot;
if ((_parent.walk == 0) && (_currentframe < 30)) {
gotoAndPlay (30);
}
if ((_parent.dead == 1) && (_currentframe < 65)) {
gotoAndPlay (65);
}
}
Symbol 87 MovieClip [Darkling] Frame 2
speed = 2;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
if ((Health <= 0) || (_root._currentframe != 3)) {
dead = 1;
gotoAndPlay (4);
}
if (walk == 1) {
if ((_root.moat == 1) && (((((287.5 < _x) && (_x < 327.5)) || ((72.5 < _x) && (_x < 112.5))) && ((72.5 < _y) && (_y < 327.5))) || ((((287.5 < _y) && (_y < 327.5)) || ((72.5 < _y) && (_y < 112.5))) && ((72.5 < _x) && (_x < 327.5))))) {
this._x = this._x + (0.3 * xinc);
this._y = this._y + (0.3 * yinc);
} else {
this._x = this._x + xinc;
this._y = this._y + yinc;
}
}
if (((this._x <= 254) && (this._x >= 146)) && ((this._y <= 254) && (this._y >= 146))) {
walk = 0;
_root.barrier_active = 1;
}
Symbol 87 MovieClip [Darkling] Frame 3
gotoAndPlay (2);
Symbol 87 MovieClip [Darkling] Frame 4
_root.barrier_active = 0;
_root.Gold = _root.Gold + 10;
Symbol 87 MovieClip [Darkling] Frame 23
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
gotoAndPlay (22);
} else {
_root.EnemiesRemaining--;
this.removeMovieClip();
}
Symbol 90 MovieClip [Arrow] Frame 1
this._rotation = rot;
Symbol 90 MovieClip [Arrow] Frame 2
speed = 8;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
this._x = this._x + xinc;
this._y = this._y + yinc;
if (_root.Timer < 31) {
i = 0;
while (i < (_root.Timer + 1)) {
if ((_root.EnemySpawner[_root.Level - 1][i] != 0) && (_root["Enemy_" + i].Health > 0)) {
if (this.hitTest(_root["Enemy_" + i])) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i++;
}
} else {
if ((_root.EnemySpawner[_root.Level - 1][0] != 0) && (_root.Enemy_0.Health > 0)) {
if (this.hitTest(_root.Enemy_0)) {
_root.Enemy_0.Health = _root.Enemy_0.Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i = _root.Timer - 30;
while (i < (_root.Timer + 1)) {
if ((_root.EnemySpawner[_root.Level - 1][i] != 0) && (_root["Enemy_" + i].Health > 0)) {
if (this.hitTest(_root["Enemy_" + i])) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i++;
}
}
if ((Math.abs(this._x) > 600) || (Math.abs(this._y) > 600)) {
gotoAndPlay (4);
}
Symbol 90 MovieClip [Arrow] Frame 3
gotoAndPlay (2);
Symbol 90 MovieClip [Arrow] Frame 8
this.removeMovieClip();
Symbol 92 MovieClip [Fireball] Frame 1
this._y = 200;
this._x = 200;
this._rotation = rot;
this._alpha = 70;
Symbol 92 MovieClip [Fireball] Frame 2
speed = 6;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
this._x = this._x + xinc;
this._y = this._y + yinc;
i = 0;
while (i < (_root.Timer + 1)) {
if (_root.EnemySpawner[_root.Level - 1][i] != 0) {
if (this.hitTest(_root["Enemy_" + i]) && (_root["Enemy_" + i].Health > 0)) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (10 * _root.WizAtkLVL);
gotoAndPlay (4);
}
}
i++;
}
if ((Math.abs(this._x) > 600) || (Math.abs(this._y) > 600)) {
gotoAndPlay (4);
}
Symbol 92 MovieClip [Fireball] Frame 3
gotoAndPlay (2);
Symbol 92 MovieClip [Fireball] Frame 8
this.removeMovieClip();
Symbol 95 MovieClip [Arrow4] Frame 1
this._rotation = rot;
Symbol 95 MovieClip [Arrow4] Frame 2
speed = 8;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
this._x = this._x + xinc;
this._y = this._y + yinc;
if (_root.Timer < 31) {
i = 0;
while (i < (_root.Timer + 1)) {
if ((_root.EnemySpawner[_root.Level - 1][i] != 0) && (_root["Enemy_" + i].Health > 0)) {
if (this.hitTest(_root["Enemy_" + i])) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i++;
}
} else {
if ((_root.EnemySpawner[_root.Level - 1][0] != 0) && (_root.Enemy_0.Health > 0)) {
if (this.hitTest(_root.Enemy_0)) {
_root.Enemy_0.Health = _root.Enemy_0.Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i = _root.Timer - 30;
while (i < (_root.Timer + 1)) {
if ((_root.EnemySpawner[_root.Level - 1][i] != 0) && (_root["Enemy_" + i].Health > 0)) {
if (this.hitTest(_root["Enemy_" + i])) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i++;
}
}
if ((Math.abs(this._x) > 600) || (Math.abs(this._y) > 600)) {
gotoAndPlay (4);
}
Symbol 95 MovieClip [Arrow4] Frame 3
gotoAndPlay (2);
Symbol 95 MovieClip [Arrow4] Frame 8
this.removeMovieClip();
Symbol 98 MovieClip [Arrow2] Frame 1
this._rotation = rot;
Symbol 98 MovieClip [Arrow2] Frame 2
speed = 8;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
this._x = this._x + xinc;
this._y = this._y + yinc;
if (_root.Timer < 31) {
i = 0;
while (i < (_root.Timer + 1)) {
if ((_root.EnemySpawner[_root.Level - 1][i] != 0) && (_root["Enemy_" + i].Health > 0)) {
if (this.hitTest(_root["Enemy_" + i])) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i++;
}
} else {
if ((_root.EnemySpawner[_root.Level - 1][0] != 0) && (_root.Enemy_0.Health > 0)) {
if (this.hitTest(_root.Enemy_0)) {
_root.Enemy_0.Health = _root.Enemy_0.Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i = _root.Timer - 30;
while (i < (_root.Timer + 1)) {
if ((_root.EnemySpawner[_root.Level - 1][i] != 0) && (_root["Enemy_" + i].Health > 0)) {
if (this.hitTest(_root["Enemy_" + i])) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i++;
}
}
if ((Math.abs(this._x) > 600) || (Math.abs(this._y) > 600)) {
gotoAndPlay (4);
}
Symbol 98 MovieClip [Arrow2] Frame 3
gotoAndPlay (2);
Symbol 98 MovieClip [Arrow2] Frame 8
this.removeMovieClip();
Symbol 101 MovieClip [Arrow3] Frame 1
this._rotation = rot;
Symbol 101 MovieClip [Arrow3] Frame 2
speed = 8;
xinc = speed * Math.sin(((rot - 90) / 180) * Math.PI);
yinc = -1 * (speed * Math.cos(((rot - 90) / 180) * Math.PI));
this._x = this._x + xinc;
this._y = this._y + yinc;
if (_root.Timer < 31) {
i = 0;
while (i < (_root.Timer + 1)) {
if ((_root.EnemySpawner[_root.Level - 1][i] != 0) && (_root["Enemy_" + i].Health > 0)) {
if (this.hitTest(_root["Enemy_" + i])) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i++;
}
} else {
if ((_root.EnemySpawner[_root.Level - 1][0] != 0) && (_root.Enemy_0.Health > 0)) {
if (this.hitTest(_root.Enemy_0)) {
_root.Enemy_0.Health = _root.Enemy_0.Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i = _root.Timer - 30;
while (i < (_root.Timer + 1)) {
if ((_root.EnemySpawner[_root.Level - 1][i] != 0) && (_root["Enemy_" + i].Health > 0)) {
if (this.hitTest(_root["Enemy_" + i])) {
_root["Enemy_" + i].Health = _root["Enemy_" + i].Health - (4 + (4 * (_root.ArchAtkLVL - 1)));
gotoAndPlay (4);
}
}
i++;
}
}
if ((Math.abs(this._x) > 600) || (Math.abs(this._y) > 600)) {
gotoAndPlay (4);
}
Symbol 101 MovieClip [Arrow3] Frame 3
gotoAndPlay (2);
Symbol 101 MovieClip [Arrow3] Frame 8
this.removeMovieClip();
Symbol 106 Button
on (press) {
gotoAndPlay (4);
}
Symbol 120 Button
on (press) {
if ((_root.towerNW == 0) && (_root.Gold >= 1000)) {
_root.Gold = _root.Gold - 1000;
_root.towerNW = 1;
}
}
Symbol 121 Button
on (press) {
if ((_root.ArmorLVL == 1) && (_root.Gold >= 500)) {
_root.Gold = _root.Gold - 500;
_root.ArmorLVL = 2;
_root.Health = _root.Health + 100;
} else if ((_root.ArmorLVL == 2) && (_root.Gold >= 1000)) {
_root.Gold = _root.Gold - 1000;
_root.ArmorLVL = 3;
_root.Health = _root.Health + 100;
} else if ((_root.ArmorLVL == 3) && (_root.Gold >= 2000)) {
_root.Gold = _root.Gold - 2000;
_root.ArmorLVL = 4;
_root.Health = _root.Health + 100;
}
}
Symbol 122 Button
on (press) {
if ((_root.moat == 0) && (_root.Gold >= 1200)) {
_root.Gold = _root.Gold - 1200;
_root.moat = 1;
}
}
Symbol 123 Button
on (press) {
if ((_root.BarrierLVL == 0) && (_root.Gold >= 1500)) {
_root.Gold = _root.Gold - 1500;
_root.BarrierLVL = 1;
} else if ((_root.BarrierLVL == 1) && (_root.Gold >= 2500)) {
_root.Gold = _root.Gold - 2500;
_root.BarrierLVL = 2;
}
}
Symbol 124 Button
on (press) {
if ((_root.ArchAtkLVL == 1) && (_root.Gold >= 500)) {
_root.Gold = _root.Gold - 500;
_root.ArchAtkLVL++;
} else if ((_root.ArchAtkLVL == 2) && (_root.Gold >= 1000)) {
_root.Gold = _root.Gold - 1000;
_root.ArchAtkLVL++;
} else if ((_root.ArchAtkLVL == 3) && (_root.Gold >= 2000)) {
_root.Gold = _root.Gold - 2000;
_root.ArchAtkLVL++;
}
}
Symbol 125 Button
on (press) {
if ((_root.WizAtkLVL == 1) && (_root.Gold >= 100)) {
_root.Gold = _root.Gold - 100;
_root.WizAtkLVL++;
} else if ((_root.WizAtkLVL == 2) && (_root.Gold >= 500)) {
_root.Gold = _root.Gold - 500;
_root.WizAtkLVL++;
} else if ((_root.WizAtkLVL == 3) && (_root.Gold >= 1000)) {
_root.Gold = _root.Gold - 1000;
_root.WizAtkLVL++;
}
}
Symbol 126 Button
on (press) {
if ((_root.WizSpdLVL == 1) && (_root.Gold >= 100)) {
_root.Gold = _root.Gold - 100;
_root.WizSpdLVL++;
} else if ((_root.WizSpdLVL == 2) && (_root.Gold >= 500)) {
_root.Gold = _root.Gold - 500;
_root.WizSpdLVL++;
} else if ((_root.WizSpdLVL == 3) && (_root.Gold >= 1000)) {
_root.Gold = _root.Gold - 1000;
_root.WizSpdLVL++;
}
}
Symbol 127 Button
on (press) {
if ((_root.towerNE == 0) && (_root.Gold >= 1000)) {
_root.Gold = _root.Gold - 1000;
_root.towerNE = 1;
}
}
Symbol 128 Button
on (press) {
if ((_root.towerSW == 0) && (_root.Gold >= 1000)) {
_root.Gold = _root.Gold - 1000;
_root.towerSW = 1;
}
}
Symbol 129 Button
on (press) {
if ((_root.towerSE == 0) && (_root.Gold >= 1000)) {
_root.Gold = _root.Gold - 1000;
_root.towerSE = 1;
}
}
Symbol 130 Button
on (press) {
if ((_root.Health < _root.MaxHealth) && (_root.Gold >= 75)) {
_root.Health = _root.Health + 25;
_root.Gold = _root.Gold - 75;
if (_root.Health > _root.MaxHealth) {
_root.Health = _root.MaxHealth;
}
}
}
Symbol 131 Button
on (press) {
if (_root.Play == 0) {
_root.Play = 1;
}
}
Symbol 133 Button
on (press) {
gotoAndPlay (2);
}
Symbol 139 Button
on (press) {
_parent.EnemyViewed--;
}
Symbol 140 Button
on (press) {
_parent.EnemyViewed++;
}
Symbol 142 MovieClip [Upgrader] Frame 1
_x = -282.3;
_y = -199.05;
_xscale = 150;
_yscale = 150;
_alpha = 0;
EnemyViewed = 80;
Instance of Symbol 113 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
Text = "Repair 25 Damage:\n75 Gold";
}
Instance of Symbol 113 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.ArmorLVL == 1) {
Text = "Large Castle:\n500 Gold";
} else if (_root.ArmorLVL == 2) {
Text = "Huge Castle:\n1000 Gold";
} else if (_root.ArmorLVL == 3) {
Text = "Ultimate Castle:\n2000 Gold";
} else {
Text = "";
}
}
Instance of Symbol 113 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.moat == 0) {
Text = "Build Moat:\n1200 Gold";
} else {
Text = "";
}
}
Instance of Symbol 113 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.BarrierLVL == 0) {
Text = "Cast Barrier:\n1500 Gold";
} else if (_root.BarrierLVL == 1) {
Text = "Upgrade Barrier:\n2500 Gold";
} else {
Text = "";
}
}
Instance of Symbol 113 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.WizSpdLVL == 1) {
Text = "Faster Casting:\n100 Gold";
} else if (_root.WizSpdLVL == 2) {
Text = "Faster Casting:\n500 Gold";
} else if (_root.WizSpdLVL == 3) {
Text = "Faster Casting:\n1000 Gold";
} else {
Text = "";
}
}
Instance of Symbol 113 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.WizAtkLVL == 1) {
Text = "Stronger Fireball:\n100 Gold";
} else if (_root.WizAtkLVL == 2) {
Text = "Stronger Fireball:\n500 Gold";
} else if (_root.WizAtkLVL == 3) {
Text = "Stronger Fireball:\n1000 Gold";
} else {
Text = "";
}
}
Instance of Symbol 113 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.ArchAtkLVL == 1) {
Text = "Iron Arrows:\n500 Gold";
} else if (_root.ArchAtkLVL == 2) {
Text = "Magic Arrows:\n1000 Gold";
} else if (_root.ArchAtkLVL == 3) {
Text = "Light Arrows:\n2000 Gold";
} else {
Text = "";
}
}
Instance of Symbol 113 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if ((((_root.towerNE == 0) || (_root.towerSE == 0)) || (_root.towerNW == 0)) || (_root.towerSW == 0)) {
Text = "Build Towers:\n1000 Gold Each";
} else {
Text = "";
}
}
Instance of Symbol 101 MovieClip [Arrow3] in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.ArchAtkLVL == 2) {
_alpha = 100;
} else {
_alpha = 0;
}
stop();
}
Instance of Symbol 98 MovieClip [Arrow2] in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.ArchAtkLVL == 1) {
_alpha = 100;
} else {
_alpha = 0;
}
stop();
}
Instance of Symbol 95 MovieClip [Arrow4] in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
if (_root.ArchAtkLVL == 3) {
_alpha = 100;
} else {
_alpha = 0;
}
stop();
}
Instance of Symbol 22 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_root.ArmorLVL + 1);
}
Instance of Symbol 27 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 1
onClipEvent (enterFrame) {
gotoAndStop((_root.BarrierLVL * 29) + 1);
}
Symbol 142 MovieClip [Upgrader] Frame 2
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
Symbol 142 MovieClip [Upgrader] Frame 3
gotoAndPlay (2);
Instance of Symbol 136 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 4
onClipEvent (enterFrame) {
if (((_parent.EnemyViewed % 8) + 1) == 1) {
Text = "Darkling\nBasic Land Unit\n\nDarklings are shadow-like creatures with limited intelligence and weak defences. They are only truly dangerous in large numbers.";
} else if (((_parent.EnemyViewed % 8) + 1) == 2) {
Text = "Black Knight\nSpecial Land Unit\n\nBlack Knights are Darklings with protective armor. This makes them only slightly more difficult to dispatch than Darklings.";
} else if (((_parent.EnemyViewed % 8) + 1) == 3) {
Text = "Troll\nElite Land Unit\n\nTrolls are fearsome opponents with tough hides and powerful fists. They are slow-moving, however, and it is best to bring them down before they can cause excessive damage.";
} else if (((_parent.EnemyViewed % 8) + 1) == 4) {
Text = "Frenetic\nKamikaze Land Unit\n\nFrenetics are suicidal Goblins with dynamite strapped to their backs. If these quick fiends reach the walls they will detonate, dealing enormous damage.";
} else if (((_parent.EnemyViewed % 8) + 1) == 5) {
Text = "Giant\nUltimate Land Unit\n\nGiants are horrific foes; only intense concentrated fire will bring them down, and should they reach the walls their blows will shatter through defenses with ease.";
} else if (((_parent.EnemyViewed % 8) + 1) == 6) {
Text = "Demonite\nBasic Air Unit\n\nDemonites are winged horrors from the same realm as Demonites. They fly over most obstacles, and swoop in on their targets, making them more difficult to hit from afar.";
} else if (((_parent.EnemyViewed % 8) + 1) == 7) {
Text = "Dragon\nElite Air Unit\n\nThese fearsome two-headed dragons are faster and more cunning than Demonites. Their breath weapons are powerful enough to melt stone.";
} else if (((_parent.EnemyViewed % 8) + 1) == 8) {
Text = "Demon Lord\nDark Army Commander\n\nDemon Lords are the strongest of all the Mist Creatures, and they recover health rapidly in combat. Their dark energy blasts can be countered with fire, however.";
} else {
Text = "";
}
}
Instance of Symbol 141 MovieClip in Symbol 142 MovieClip [Upgrader] Frame 4
onClipEvent (enterFrame) {
gotoAndStop((_parent.EnemyViewed % 8) + 1);
}
Symbol 142 MovieClip [Upgrader] Frame 5
gotoAndPlay (4);
Symbol 143 MovieClip [Explosion] Frame 11
this.removeMovieClip();
Symbol 154 MovieClip Frame 1
if ((_root.Play == 0) && (_root.MenuUp == 0)) {
_root.MenuUp = 1;
_parent.attachMovie("Upgrader", "Upgrader", 100);
} else if ((_root.Play == 1) && (_root.MenuUp == 1)) {
_root.MenuUp = 0;
_parent.Upgrader.removeMovieClip();
}
Instance of Symbol 56 MovieClip in Symbol 154 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
onClipEvent (enterFrame) {
Percent = Math.floor((100 * _root.Health) / _root.MaxHealth);
_xscale = ((Percent * 200) / 30);
_x = (Percent - 182.5);
gotoAndStop(Percent);
if (_root.Health <= 0) {
_root.gotoAndPlay(4);
}
}
Instance of Symbol 151 MovieClip in Symbol 154 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = _root.Timer * -3;
}
Symbol 155 MovieClip [Cam] Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 172 Button
on (release) {
_root.play();
}
Symbol 173 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 173 MovieClip Frame 2
gotoAndPlay (1);
Symbol 210 MovieClip Frame 309
_parent.play();
Symbol 251 Button
on (release) {
_root.play();
}
Symbol 252 MovieClip Frame 143
_parent.play();
stop();
Symbol 253 MovieClip Frame 1
PercentLoad = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
BytesLoaded = _root.getBytesLoaded();
BytesTotal = _root.getBytesTotal();
TimePassed = getTimer() / 1000;
TimeLeft = ((100 / Percentload) * (getTimer() / 1000)) - TimePassed;
if (PercentLoad == 100) {
gotoAndPlay (3);
}
Symbol 253 MovieClip Frame 2
gotoAndPlay (1);
Symbol 253 MovieClip Frame 33
stop();
Symbol 253 MovieClip Frame 34
stop();
Symbol 253 MovieClip Frame 35
_root.play();
Symbol 256 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 263 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 264 Button
on (press) {
_root.gotoAndPlay(3);
}
Symbol 266 MovieClip Frame 135
stop();
Symbol 270 MovieClip Frame 1
Symbol 270 MovieClip Frame 16
if ((_root.Timer >= 120) && (_root.EnemiesRemaining == 0)) {
_root.Timer = 0;
_root.Level++;
_root.Play = 0;
} else if (_root.Timer >= 120) {
_root.Timer = 120;
}
if (_root.Level == 16) {
_root.gotoAndPlay(5);
}
if ((_root.Play == 1) && (_root.Timer < 120)) {
if (_root.Timer == 0) {
_root.Audio.stop();
if ((_root.Level == 7) || (_root.Level == 12)) {
_root.Audio.attachSound("Music_Level_3");
} else if ((_root.Level == 8) || (_root.Level == 13)) {
_root.Audio.attachSound("Music_Level_5");
} else if (_root.Level > 10) {
_root.Audio.attachSound("Music_Level_" + (_root.Level - 5));
} else {
_root.Audio.attachSound("Music_Level_" + _root.Level);
}
_root.Audio.start(0, 99);
}
if (_root.EnemySpawner[_root.Level - 1][_root.Timer] != 0) {
_root.EnemiesRemaining++;
if (_root.EnemySpawner[_root.Level - 1][_root.Timer] == 1) {
_root.attachMovie("Darkling", "Enemy_" + _root.Timer, 100 + _root.Timer);
} else if (_root.EnemySpawner[_root.Level - 1][_root.Timer] == 2) {
_root.attachMovie("Black Knight", "Enemy_" + _root.Timer, 100 + _root.Timer);
} else if (_root.EnemySpawner[_root.Level - 1][_root.Timer] == 3) {
_root.attachMovie("Troll", "Enemy_" + _root.Timer, 100 + _root.Timer);
} else if (_root.EnemySpawner[_root.Level - 1][_root.Timer] == 4) {
_root.attachMovie("Frenetic", "Enemy_" + _root.Timer, 100 + _root.Timer);
} else if (_root.EnemySpawner[_root.Level - 1][_root.Timer] == 5) {
_root.attachMovie("Giant", "Enemy_" + _root.Timer, 100 + _root.Timer);
} else if (_root.EnemySpawner[_root.Level - 1][_root.Timer] == 6) {
_root.attachMovie("Demonite", "Enemy_" + _root.Timer, 100 + _root.Timer);
} else if (_root.EnemySpawner[_root.Level - 1][_root.Timer] == 7) {
_root.attachMovie("Dragon", "Enemy_" + _root.Timer, 100 + _root.Timer);
} else if (_root.EnemySpawner[_root.Level - 1][_root.Timer] == 8) {
_root.attachMovie("Demon Lord", "Enemy_" + _root.Timer, 100 + _root.Timer);
}
}
_root.Timer++;
}
gotoAndPlay (2);
Symbol 276 Button
on (press) {
_root.gotoAndPlay(1);
}
Instance of Symbol 31 MovieClip in Symbol 278 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = (_alpha + 2);
} else {
_parent.gotoAndPlay(20);
}
}
Symbol 278 MovieClip Frame 16
gotoAndPlay (1);
Symbol 278 MovieClip Frame 35
stop();
Instance of Symbol 31 MovieClip in Symbol 284 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = (_alpha + 2);
} else {
_parent.gotoAndPlay(20);
}
}
Symbol 284 MovieClip Frame 16
gotoAndPlay (1);
Symbol 284 MovieClip Frame 35
stop();