Frame 1
Stage.showMenu = false;
stop();
Frame 2
stop();
Stage.showMenu = false;
delete _root.onEnterFrame;
_root.savedstuff = SharedObject.getLocal("PICO");
if (_root.savedstuff.data.maxlvl == undefined) {
_root.savedstuff.data.maxlvl = 0;
}
Frame 3
stop();
Stage.showMenu = false;
_root.freshWep = function () {
_root.toolarray = new Array();
_root.hparray = new Array();
_root.teamname = new Array();
u = 0;
while (u < 3) {
b = (_root.toolarray[u] = new Array());
b[0] = 999;
b[1] = 5;
b[2] = 1;
b[_root.teamarray[u] + 3] = 1;
_root.hparray[u] = 100;
_root.teamname[u] = _root.masternames[_root.teamarray[u]];
trace(_root.teamname);
u++;
}
if (_root.compai != true) {
_root.badtools = new Array();
_root.badhp = new Array();
_root.badname = new Array();
u = 0;
while (u < 3) {
b = (_root.badtools[u] = new Array());
b[0] = 999;
b[1] = 5;
b[2] = 1;
b[_root.badteam[u] + 3] = 1;
_root.badhp[u] = 100;
_root.badname[u] = _root.masternames[_root.badteam[u]];
u++;
}
}
};
_root.masternames = new Array("Pico", "NeNe", "Darnell", "Uber Sam", "Hominid", "Skull-kid");
if (_root.savedstuff.data.maxlvl > 3) {
_root.alienunlocked = true;
}
if (_root.savedstuff.data.maxlvl > 7) {
_root.skullunlocked = true;
}
if (_root.alienunlocked == true) {
_root.drag4.shade._visible = false;
_root.drag4.dude._visible = true;
_root.drag4.lock._visible = false;
} else {
_root.drag4.shade._visible = true;
_root.drag4.dude._visible = false;
}
if (_root.skullunlocked == true) {
_root.drag5.shade._visible = false;
_root.drag5.dude._visible = true;
_root.drag5.lock._visible = false;
} else {
_root.drag5.shade._visible = true;
_root.drag5.dude._visible = false;
}
_root.teamarray = new Array();
if (_root.compai != true) {
_root.badteam = new Array();
} else {
_root.badteam = new Array(3, 3, 3);
_root.badname = new Array("Uber Sam", "Uber John", "Uber Frank");
_root.badhp = new Array(100, 100, 100);
}
p = 0;
while (p < 6) {
var thing = eval ("_root.drag" + p);
thing.id = p;
thing.onPress = function () {
trace("id:" + this.id);
t = _root.attachMovie("dragger" + this.id, "dragger", 100);
t.lock._visible = false;
t._x = _root._xmouse - (t._width / 2);
t._y = _root._ymouse - (t._height / 2);
t.id = this.id;
if ((t.id == 4) and (_root.alienunlocked != true)) {
t.dude._visible = false;
}
if ((t.id == 5) and (_root.skullunlocked != true)) {
t.dude._visible = false;
}
t.startDrag();
t.onMouseUp = function () {
t.stopDrag();
g = 0;
while (g < 4) {
var checker = eval ("_root.slot" + g);
if (t.hitTest(checker.hitter)) {
if (t.id < 4) {
checker.nam = _root.masternames[t.id];
}
d = checker.holder.attachMovie("dragger" + this.id, "slotted", 2);
if (t.id == 4) {
d._y = -55;
d._x = -5;
}
if (t.id == 5) {
d._y = -70;
d._x = -35;
}
d.lock._visible = false;
if ((t.id == 4) and (_root.alienunlocked != true)) {
t.dude._visible = false;
}
if ((t.id == 5) and (_root.skullunlocked != true)) {
t.dude._visible = false;
}
d._y = d._y - 15;
d._xscale = 153;
d._yscale = d._xscale;
if (t.id < 4) {
_root.teamarray[checker.id] = t.id;
} else {
if ((t.id == 4) and (_root.alienunlocked == true)) {
_root.teamarray[checker.id] = t.id;
checker.nam = _root.masternames[t.id];
d.shade._visible = false;
} else if (t.id == 4) {
d.unloadMovie();
trace("not unlocked yet!");
e = _root.attachMovie("explain", "explain", 777891);
e._x = 350;
e._y = 200;
e.holder.msg = "Beat all the levels in free movement mode to unlock this character!";
_root.teamarray[checker.id] = undefined;
checker.nam = "none";
}
if ((t.id == 5) and (_root.skullunlocked == true)) {
_root.teamarray[checker.id] = t.id;
checker.nam = _root.masternames[t.id];
d.shade._visible = false;
} else if (t.id == 5) {
d.unloadMovie();
trace("not unlocked yet!");
e = _root.attachMovie("explain", "explain", 777891);
e._x = 350;
e._y = 200;
e.holder.msg = "Beat all the levels in artillery mode to unlock this character!";
_root.teamarray[checker.id] = undefined;
checker.nam = "none";
}
}
}
g++;
}
if (_root.compai != true) {
g = 0;
while (g < 4) {
var checker = eval ("_root.badslot" + g);
if (t.hitTest(checker.hitter)) {
if (t.id < 4) {
checker.nam = _root.masternames[t.id];
}
d = checker.holder.attachMovie("dragger" + this.id, "slotted", 2);
d.lock._visible = false;
if (t.id == 4) {
d._y = -55;
d._x = -5;
}
if (t.id == 5) {
d._y = -70;
d._x = -35;
}
if ((t.id == 4) and (_root.alienunlocked != true)) {
t.dude._visible = false;
}
if ((t.id == 5) and (_root.skullunlocked != true)) {
t.dude._visible = false;
}
d._y = d._y - 15;
d._xscale = 153;
d._yscale = d._xscale;
if (t.id < 4) {
_root.badteam[checker.id] = t.id;
} else {
if ((t.id == 4) and (_root.alienunlocked == true)) {
_root.badteam[checker.id] = t.id;
checker.nam = _root.masternames[t.id];
d.shade._visible = false;
} else if (t.id == 4) {
d.unloadMovie();
trace("not unlocked yet!");
e = _root.attachMovie("explain", "explain", 777891);
e._x = 350;
e._y = 200;
e.holder.msg = "Beat all the levels in free movement mode to unlock this character!";
_root.badteam[checker.id] = undefined;
checker.nam = "none";
}
if ((t.id == 5) and (_root.skullunlocked == true)) {
_root.badteam[checker.id] = t.id;
checker.nam = _root.masternames[t.id];
d.shade._visible = false;
} else if (t.id == 5) {
d.unloadMovie();
trace("not unlocked yet!");
e = _root.attachMovie("explain", "explain", 777891);
e._x = 350;
e._y = 200;
e.holder.msg = "Beat all the levels in artillery mode to unlock this character!";
_root.badteam[checker.id] = undefined;
checker.nam = "none";
}
}
}
g++;
}
}
t.onEnterFrame = function () {
if (t._alpha > 0) {
t._alpha = t._alpha - 15;
} else {
t.unloadMovie;
delete t.onEnterFrame;
delete t.onMouseUp;
}
};
};
};
p++;
}
Instance of Symbol 1299 MovieClip "slot0" in Frame 3
onClipEvent (load) {
this.id = 0;
}
Instance of Symbol 1299 MovieClip "slot1" in Frame 3
onClipEvent (load) {
this.id = 1;
}
Instance of Symbol 1299 MovieClip "slot2" in Frame 3
onClipEvent (load) {
this.id = 2;
}
Instance of Symbol 1299 MovieClip "badslot0" in Frame 3
onClipEvent (load) {
this.id = 0;
}
Instance of Symbol 1299 MovieClip "badslot1" in Frame 3
onClipEvent (load) {
this.id = 1;
}
Instance of Symbol 1299 MovieClip "badslot2" in Frame 3
onClipEvent (load) {
this.id = 2;
}
Instance of Symbol 1309 MovieClip in Frame 3
onClipEvent (load) {
if (_root.compai == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Frame 4
stop();
Stage.showMenu = false;
_root.artillery = false;
_root.aiadjust = 0;
Instance of Symbol 1330 MovieClip in Frame 4
onClipEvent (load) {
this.id = 0;
h = 0;
while (h < 4) {
var dis = eval ("this.thumb" + h);
dis._visible = false;
h++;
}
var showit = eval ("this.thumb" + this.id);
showit._visible = true;
this.lock._visible = false;
this.onRelease = function () {
_root.mylev = 0;
_root.mygrav = 1;
_root.myheight = 800;
_root.baddiey = 0;
_root.teamy = 0;
_root.freshWep();
_root.gotoAndStop(5);
};
}
Instance of Symbol 1330 MovieClip in Frame 4
onClipEvent (load) {
this.id = 1;
h = 0;
while (h < 4) {
var dis = eval ("this.thumb" + h);
dis._visible = false;
h++;
}
var showit = eval ("this.thumb" + this.id);
showit._visible = true;
if (_root.savedstuff.data.maxlvl > 0) {
this.lock._visible = false;
}
this.onRelease = function () {
if (_root.savedstuff.data.maxlvl > 0) {
_root.mylev = 1;
_root.freshWep();
_root.mygrav = 0.45;
_root.myheight = 800;
_root.baddiey = 250;
_root.teamy = 250;
_root.gotoAndStop(5);
}
};
}
Instance of Symbol 1330 MovieClip in Frame 4
onClipEvent (load) {
this.id = 2;
h = 0;
while (h < 4) {
var dis = eval ("this.thumb" + h);
dis._visible = false;
h++;
}
var showit = eval ("this.thumb" + this.id);
showit._visible = true;
if (_root.savedstuff.data.maxlvl > 1) {
this.lock._visible = false;
}
this.onRelease = function () {
if (_root.savedstuff.data.maxlvl > 1) {
_root.mylev = 2;
_root.freshWep();
_root.mygrav = 1;
_root.myheight = 800;
_root.baddiey = 20;
_root.teamy = 160;
_root.gotoAndStop(5);
}
};
}
Instance of Symbol 1330 MovieClip in Frame 4
onClipEvent (load) {
_root.lvl3beat = true;
this.id = 3;
h = 0;
while (h < 4) {
var dis = eval ("this.thumb" + h);
dis._visible = false;
h++;
}
var showit = eval ("this.thumb" + this.id);
showit._visible = true;
if (_root.savedstuff.data.maxlvl > 2) {
this.lock._visible = false;
}
this.onRelease = function () {
if (_root.savedstuff.data.maxlvl > 2) {
_root.mylev = 3;
_root.freshWep();
_root.mygrav = 0.45;
_root.myheight = 1450;
_root.baddiey = 0;
_root.teamy = 0;
_root.gotoAndStop(5);
}
};
}
Instance of Symbol 1330 MovieClip in Frame 4
onClipEvent (load) {
this.id = 0;
h = 0;
while (h < 4) {
var dis = eval ("this.thumb" + h);
dis._visible = false;
h++;
}
var showit = eval ("this.thumb" + this.id);
showit._visible = true;
if (_root.savedstuff.data.maxlvl > 3) {
this.lock._visible = false;
}
this.onRelease = function () {
if (_root.savedstuff.data.maxlvl > 3) {
_root.mylev = 0;
_root.freshWep();
_root.mygrav = 1;
_root.myheight = 800;
_root.artillery = true;
_root.gotoAndStop(5);
}
};
}
Instance of Symbol 1330 MovieClip in Frame 4
onClipEvent (load) {
this.id = 1;
h = 0;
while (h < 4) {
var dis = eval ("this.thumb" + h);
dis._visible = false;
h++;
}
var showit = eval ("this.thumb" + this.id);
showit._visible = true;
if (_root.savedstuff.data.maxlvl > 4) {
this.lock._visible = false;
}
this.onRelease = function () {
if (_root.savedstuff.data.maxlvl > 4) {
_root.mylev = 1;
_root.freshWep();
_root.mygrav = 0.45;
_root.myheight = 800;
_root.artillery = true;
_root.gotoAndStop(5);
}
};
}
Instance of Symbol 1330 MovieClip in Frame 4
onClipEvent (load) {
this.id = 2;
h = 0;
while (h < 4) {
var dis = eval ("this.thumb" + h);
dis._visible = false;
h++;
}
var showit = eval ("this.thumb" + this.id);
showit._visible = true;
if (_root.savedstuff.data.maxlvl > 5) {
this.lock._visible = false;
}
this.onRelease = function () {
if (_root.savedstuff.data.maxlvl > 5) {
_root.mylev = 2;
_root.freshWep();
_root.mygrav = 1;
_root.myheight = 800;
_root.artillery = true;
_root.gotoAndStop(5);
}
};
}
Instance of Symbol 1330 MovieClip in Frame 4
onClipEvent (load) {
this.id = 3;
h = 0;
while (h < 4) {
var dis = eval ("this.thumb" + h);
dis._visible = false;
h++;
}
var showit = eval ("this.thumb" + this.id);
showit._visible = true;
if (_root.savedstuff.data.maxlvl > 6) {
this.lock._visible = false;
}
this.onRelease = function () {
if (_root.savedstuff.data.maxlvl > 6) {
_root.mylev = 3;
_root.freshWep();
_root.mygrav = 0.45;
_root.myheight = 1450;
_root.artillery = true;
_root.gotoAndStop(5);
}
};
}
Frame 5
function lineOfSite(x1, y1, x2, y2) {
var _local5 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
var _local4 = Math.atan((y2 - y1) / (x2 - x1));
_local4 = _local4 + (((x2 - x1) < 0) ? Math.PI : 0);
_local4 = _local4 + ((((x2 - x1) >= 0) && ((y2 - y1) < 0)) ? (Math.PI*2) : 0);
pos = 0;
while (pos <= _local5) {
var _local3 = Math.floor((pos * Math.cos(_local4)) + x1);
var _local2 = Math.floor((pos * Math.sin(_local4)) + y1);
if (_root.fg.hitTest(_local3, _local2, true) and (!_root.maskee.hitTest(_local3, _local2, true))) {
trace("land in the way");
return(false);
}
if (pos >= (_local5 - 1)) {
return(true);
}
pos++;
}
}
stop();
Stage.showMenu = true;
_root.clearlvl = function () {
_root.fg.unloadMovie();
_root.wormy.unloadMovie();
_root.bg.unloadMovie();
_root.worms.unloadMovie();
_root.teambar.unloadMovie();
_root.baddiebar.unloadMovie();
_root.bal.unloadMovie();
_root.readout.unloadMovie();
_root.masker.unloadMovie();
_root.maskee.unloadMovie();
_root.water.unloadMovie();
_root.options.unloadMovie();
_root.mainbut.unloadMovie();
_root.toolarray = new Array();
_root.badtools = new Array();
_root.tranny = false;
o = 0;
while (o < _root.teamarray.length) {
_root.hparray[o] = 100;
o++;
}
o = 0;
while (o < _root.badteam.length) {
_root.badhp[o] = 100;
o++;
}
};
_root.makeCrate = function () {
var _local4 = random(100);
if (_local4 < 15) {
c = _root.wormy.attachMovie("crate", "crate" + _root.cratecount, 560 + _root.cratecount);
c.isacrate = true;
c._xscale = 35;
c._yscale = c._xscale;
c._x = random(2500) - 450;
c._y = -350;
var _local3 = random(10);
if (_root.alienunlocked == true) {
c.id = random(6) + 2;
}
if (_root.skullunlocked == true) {
c.id = random(7) + 2;
}
if ((_root.skullunlocked != true) and (_root.alienunlocked != true)) {
c.id = random(4) + 2;
}
if (_local3 <= 3) {
c.health = true;
c.health._visible = true;
c.crate._visible = false;
} else {
c.health._visible = false;
c.crate._visible = true;
}
trace("crate is: " + c.id);
c.onEnterFrame = function () {
_root.physics(this);
};
_root.cratecount = _root.cratecount + 1;
}
};
_root.makeBad = function (id) {
bo = id + _root.teamarray.length;
var bad = ("worm" + _root.badteam[id]);
b = _root.wormy.attachMovie(bad, "baddie" + id, bo);
b.id = _root.badteam[id];
b.place = id;
b._xscale = -25;
b._yscale = 25;
b._x = 750 + (150 * id);
b._y = _root.baddiey;
var yib = eval ("_root.wormy.baddie" + id);
yib.onEnterFrame = function () {
_root.physics(this);
};
yib.baddie = true;
yib.pointer._visible = false;
};
_root.createIt = function (id) {
var dog = ("worm" + _root.teamarray[id]);
v = _root.wormy.attachMovie(dog, "worm" + id, id);
v.id = _root.teamarray[id];
v.place = id;
v._xscale = 25;
v._yscale = v._xscale;
v._x = (-120 * id) + 270;
v._y = _root.teamy;
var yoyo = eval (v);
trace("yoyo" + yoyo);
yoyo.onEnterFrame = function () {
_root.physics(this);
};
yoyo.pointer._visible = false;
};
_root.checkHit = function (circ, size) {
var hitathing = false;
i = 0;
while (i < _root.cratecount) {
var dacrate = eval ("_root.wormy.crate" + i);
if (circ.hitTest(dacrate)) {
dacrate.unloadMovie();
dacrate.removeMovieClip();
}
i++;
}
d = 0;
while (d < _root.teamarray.length) {
var dude = eval ("_root.wormy.worm" + d);
if (circ.hitTest(dude) and (dude.dead != true)) {
hitathing = true;
var xdist = (dude._x - circ._x);
if (_root.projtype == "dyno") {
var calc = ((size / xdist) * 1.5);
} else {
var calc = ((size / xdist) * 3);
}
if (calc > 40) {
calc = 40;
}
if (calc < -40) {
calc = -40;
}
dude.Xvel = calc;
dude._y = dude._y - 15;
dude.Yvel = -10;
if (_root.projtype == "dyno") {
var whattosubtract = Math.abs(dude.Xvel * 4);
} else {
var whattosubtract = Math.abs(dude.Xvel * 1.5);
}
if (whattosubtract > _root.hparray[dude.place]) {
whattosubtract = _root.hparray[dude.place];
}
_root.hparray[dude.place] = parseInt(_root.hparray[dude.place]) - whattosubtract;
_root.aiadjust = 0;
}
d++;
}
d = 0;
while (d < _root.badteam.length) {
var dude = eval ("_root.wormy.baddie" + d);
if (circ.hitTest(dude) and (dude.dead != true)) {
if (_root.masterturn == 0) {
hitathing = true;
}
var xdist = (dude._x - circ._x);
if (_root.projtype == "dyno") {
var calc = ((size / xdist) * 1.5);
} else {
var calc = ((size / xdist) * 3);
}
if (calc > 40) {
calc = 40;
}
if (calc < -40) {
calc = -40;
}
dude.Xvel = calc;
dude._y = dude._y - 15;
dude.Yvel = -10;
if (_root.projtype == "dyno") {
var whattosubtract = Math.abs(dude.Xvel * 4);
} else {
var whattosubtract = Math.abs(dude.Xvel * 1.5);
}
if (whattosubtract > _root.badhp[dude.place]) {
whattosubtract = _root.badhp[dude.place];
}
_root.badhp[dude.place] = parseInt(_root.badhp[dude.place]) - whattosubtract;
}
d++;
}
if ((hitathing == false) and (_root.masterturn == 1)) {
if (_root.compai == true) {
_root.aiadjust = _root.aiadjust + 15;
trace("ai adjust is: " + _root.aiadjust);
if (_root.aiadjust > 45) {
_root.aiadjust = 22;
}
}
}
};
_root.optsCenter = function () {
_root.options._x = (Stage.width / 2) - (_root.options._width / 2);
_root.options._y = 5;
};
_root.initLevel = function (lvl, grv, ht) {
_root.cratecount = 0;
_root.splodecount = 777;
_root.masterht = ht;
_root.masterturn = 0;
_root.teamturn = 0;
_root.badturn = -1;
var vertplace = 360;
z = _root.attachMovie("teambar", "teambar", 10000);
z.dacolor = 52224;
z.daoutline = 30464;
z._x = 10;
z._y = vertplace;
u = _root.attachMovie("teambar", "baddiebar", 10001);
u.dacolor = 16711680 /* 0xFF0000 */;
u.daoutline = 7798784 /* 0x770000 */;
u._x = 494;
u._y = vertplace;
u.baddie = true;
m = _root.attachMovie("readout", "readout", 10002);
m._x = 217;
m._y = vertplace - 2;
_root.attachMovie("bg" + lvl, "bg", 0);
_root.attachMovie("fg" + lvl, "fg", 1);
_root.attachMovie("bg" + lvl, "maskee", 2);
_root.createEmptyMovieClip("masker", 3);
_root.createEmptyMovieClip("wormy", 4);
_root.maskee.setMask(_root.masker);
_root.createEmptyMovieClip("worms", 5);
_root.createEmptyMovieClip("bal", 6);
l = _root.attachMovie("water", "water", 8);
l._y = _root.masterht;
var firsty = ("worm" + _root.teamarray[0]);
if (_root.teamarray[0] == undefined) {
firsty = "worm" + _root.teamarray[1];
}
if (_root.teamarray[1] == undefined) {
firsty = "worm" + _root.teamarray[2];
}
w = _root.worms.attachMovie(firsty, firsty, 0);
if ((firsty == ("worm" + _root.teamarray[0])) and (beenfound != true)) {
w.id = _root.teamarray[0];
w.place = 0;
var beenfound = true;
}
if ((firsty == ("worm" + _root.teamarray[1])) and (beenfound != true)) {
w.id = _root.teamarray[1];
w.place = 1;
var beenfound = true;
}
if ((firsty == ("worm" + _root.teamarray[2])) and (beenfound != true)) {
w.id = _root.teamarray[2];
w.place = 2;
var beenfound = true;
}
w._xscale = 25;
w._yscale = w._xscale;
w._x = 350;
w._y = 200;
w.pointer._visible = false;
var togo = eval ("_root.worms." + firsty);
_root.selectaroon = togo;
togo.onEnterFrame = function () {
_root.physics(this);
};
_root.showname = "Go for it " + _root.teamname[w.place];
var showme = (w.place + 1);
trace("w.place + 1=" + showme);
p = w.place + 1;
while (p < _root.teamarray.length) {
_root.createIt(p);
trace("p is: " + p);
p++;
}
d = 0;
while (d < _root.badteam.length) {
_root.makeBad(d);
d++;
}
_root.grav = grv;
_root.circcount = 0;
m = _root.attachMovie("mainencap", "mainbut", 10);
m._x = 3;
m._y = 3;
_root.buildOpts(1);
};
_root.buildTools = function (lastx) {
var r = _root.options;
var myc = 0;
if (_root.selectaroon.baddie != true) {
cv = 0;
while (cv < 9) {
var datool = _root.toolarray[_root.selectaroon.place][cv];
if ((datool != undefined) and (datool != 0)) {
var depther = (lastx / 68);
t = r.attachMovie("optionbg", "optionbg", (depther + cv) + 1);
p = t.holder.attachMovie("inst" + cv, "inst" + cv, 0);
p.triggy = parseInt(datool);
myc = myc + 1;
t._x = lastx + (myc * 68);
}
cv++;
}
} else {
cv = 0;
while (cv < 9) {
var datool = _root.badtools[_root.selectaroon.place][cv];
if ((datool != undefined) and (datool != 0)) {
var depther = (lastx / 68);
t = r.attachMovie("optionbg", "optionbg", (depther + cv) + 1);
p = t.holder.attachMovie("inst" + cv, "inst" + cv, 0);
p.triggy = parseInt(datool);
myc = myc + 1;
t._x = lastx + (myc * 68);
}
cv++;
}
}
};
_root.buildOpts = function (modem) {
if (_root.buildingopts != true) {
r = _root.createEmptyMovieClip("options", 7);
r._xscale = 79;
r._yscale = r._xscale;
_root.buildingopts = true;
if (modem == 0) {
t = r.attachMovie("optionbg", "optionbg", 0);
t.holder.attachMovie("inst_switch", "inst_switch", 0);
t = r.attachMovie("optionbg", "optionbg", 1);
t.holder.attachMovie("inst_choose", "inst_choose", 0);
t._x = 68;
}
if (modem == 1) {
t = r.attachMovie("optionbg", "optionbg", 1);
t.holder.attachMovie("inst_jump", "inst_jump", 0);
t._x = 68;
_root.buildTools(68);
}
if (modem == 2) {
t = r.attachMovie("optionbg", "optionbg", 0);
t.holder.attachMovie("inst_esc", "inst_esc", 0);
t = r.attachMovie("optionbg", "optionbg", 1);
t.holder.attachMovie("inst_aim", "inst_aim", 0);
t._x = 68;
t = r.attachMovie("optionbg", "optionbg", 2);
t.holder.attachMovie("inst_power", "inst_power", 0);
t._x = 136;
}
if (modem == 3) {
t = r.attachMovie("optionbg", "optionbg", 0);
t.holder.attachMovie("inst_esc", "inst_esc", 0);
t = r.attachMovie("optionbg", "optionbg", 1);
t.holder.attachMovie("inst_jump", "inst_jump", 0);
t._x = 68;
t = r.attachMovie("optionbg", "optionbg", 2);
t.holder.attachMovie("inst_target", "inst_target", 0);
t._x = 136;
}
_root.optsCenter();
}
};
_root.optsDown = function () {
_root.options.onEnterFrame = function () {
if (_root.options._xscale > 0) {
_root.options._xscale = _root.options._xscale - 15;
_root.options._yscale = _root.options._xscale;
if (_root.options._xscale <= 0) {
_root.options.unloadMovie();
_root.options.removeMovieClip();
}
_root.optsCenter();
}
};
};
_root.alignem = function () {
_root.masker._y = _root.fg._y;
_root.masker._x = _root.fg._x;
_root.wormy._y = _root.fg._y;
_root.wormy._x = _root.fg._x;
_root.bal._x = _root.fg._x;
_root.bal._y = _root.fg._y;
_root.water._y = _root.fg._y + _root.masterht;
};
_root.lookahead = function (who) {
_root.alignem();
var _local5 = who.virtx + who.Xvel;
var _local4 = true;
f = -20;
while (f < 20) {
var _local3 = who._y + f;
if ((_root.fg.hitTest(_local5, _local3, true) and (!_root.maskee.hitTest(_local5, _local3, true))) and (_local4 == true)) {
who.nexty = _local3;
who.dadist = who.nexty - who._y;
if (who.dadist > -18) {
if (_root.selectaroon == who) {
_root.fg._y = _root.fg._y - (who.dadist / 2);
}
}
_root.alignem();
_local4 = false;
}
f++;
}
if (_root.selectaroon == who) {
if (who._xscale > 0) {
var _local7 = who._x + 35;
} else {
var _local7 = who._x - 35;
}
var _local6 = who._y + 30;
if ((!_root.fg.hitTest(_local7, _local6, true)) || (_root.fg.hitTest(_local7, _local6, true) and _root.maskee.hitTest(_local7, _local6, true))) {
if ((_root.compai == true) and (_root.masterturn == 1)) {
trace("jump!");
who.Yvel = -10;
}
}
}
};
_root.physics = function (who) {
if ((who.Yvel == 0) and (who.isacrate == true)) {
delete who.onEnterFrame;
who.onEnterFrame = function () {
if (this.hitTest(_root.selectaroon)) {
if (c.health != true) {
if (_root.selectaroon.baddie != true) {
t = _root.toolarray[_root.selectaroon.place][this.id];
if (t != undefined) {
_root.toolarray[_root.selectaroon.place][this.id] = t + 1;
trace(_root.toolarray[_root.selectaroon.place][this.id]);
} else {
_root.toolarray[_root.selectaroon.place][this.id] = 1;
trace(_root.toolarray[_root.selectaroon.place][this.id]);
}
} else {
t = _root.badtools[_root.selectaroon.place][this.id];
if (t != undefined) {
_root.badtools[_root.selectaroon.place][this.id] = t + 1;
trace(_root.badtools[_root.selectaroon.place][this.id]);
} else {
_root.badtools[_root.selectaroon.place][this.id] = 1;
trace(_root.badtools[_root.selectaroon.place][this.id]);
}
}
} else if (_root.selectaroon.baddie != true) {
if (_root.hparray[_root.selectaroon.place] <= 75) {
_root.hparray[_root.selectaroon.place] = parseInt(_root.hparray[_root.selectaroon.place]) + 25;
} else {
_root.hparray[_root.selectaroon.place] = 100;
}
} else if (_root.badhp[_root.selectaroon.place] <= 75) {
_root.badhp[_root.selectaroon.place] = parseInt(_root.hparray[_root.selectaroon.place]) + 25;
} else {
_root.badhp[_root.selectaroon.place] = 100;
}
_root.buildOpts(1);
this.unloadMovie();
this.removeMovieClip();
}
};
}
if (((who.dead != true) and (_root.selectaroon.aiming != true)) || (_root.projtype == "none6")) {
if (((_root.tranny != true) and (_root.proj != true)) and (_root.looking != true)) {
if (who.beeninit != true) {
who.Yvel = 0;
who.Xvel = 0;
who.beeninit = true;
}
if (who.Yvel < 12) {
who.Yvel = who.Yvel + _root.grav;
}
who.Xvel = who.Xvel / 1.2;
if (_root.selectaroon == who) {
who.virtx = (who._x + who.Xvel) + _root.worms._x;
who.virty = (who._y + who.Yvel) + _root.worms._y;
} else {
who.virtx = (who._x + _root.fg._x) + who.Xvel;
who.virty = (who._y + Math.abs(who.Yvel)) + _root.fg._y;
}
if ((_root.selectaroon == who) and (fg._y < ((_root.masterht - 150) * -1))) {
if (who.baddie != true) {
_root.hparray[who.place] = 0;
} else {
_root.badhp[who.place] = 0;
}
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
_root.showname = _root.teamname[who.place] + " is DEAD!";
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
_root.showname = _root.badname[who.place] + " is DEAD!";
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.dead = true;
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
_root.switchTurn(who.virtx - _root.fg._x, who.virty - _root.fg._y, goin);
}
who.leftedge = (who.virtx - (who._width / 2)) + 2;
who.rightedge = (who.virtx + (who._width / 2)) - 2;
if (who.jumping != true) {
who.midy = (who.virty - (who._height / 2)) - 3;
} else {
who.midy = (who.virty - (who._height / 2)) + 10;
}
who.topy = (who.virty - who._height) + 10;
if (_root.fg.hitTest(who.leftedge, who.midy, true) and (!_root.maskee.hitTest(who.leftedge, who.midy, true))) {
who.Xvel = who.Xvel * -1;
if (_root.selectaroon == who) {
_root.fg._x = _root.fg._x - 2;
}
}
if (_root.fg.hitTest(who.rightedge, who.midy, true) and (!_root.maskee.hitTest(who.rightedge, who.midy, true))) {
who.Xvel = who.Xvel * -1;
if (_root.selectaroon == who) {
_root.fg._x = _root.fg._x + 2;
}
}
if (_root.fg.hitTest(who.virtx, who.topy, true) and (!_root.maskee.hitTest(who.virtx, who.topy, true))) {
who.Yvel = who.Yvel * -1.2;
if (_root.selectaroon == who) {
_root.fg._y = _root.fg._y - 1;
}
}
if (_root.fg.hitTest(who.virtx, who.virty, true) and (!_root.maskee.hitTest(who.virtx, who.virty, true))) {
who.Yvel = 0;
_root.lookahead(who);
who.jumping = false;
who.bumped = false;
_root.alignem();
} else {
if (who.aiming != true) {
who.jumping = true;
}
_root.alignem();
}
if (_root.selectaroon != who) {
who._y = who._y + who.Yvel;
who._x = who._x + who.Xvel;
}
if ((who.jumping == true) and (_root.selectaroon != who)) {
if (who.deathplay != true) {
who.guts.gotoAndStop("jump");
}
} else if (_root.selectaroon != who) {
if (who.deathplay != true) {
who.guts.gotoAndStop("rest");
}
}
if (who.isacrate != true) {
if (who.baddie != true) {
if (_root.hparray[who.place] <= 0) {
_root.showname = _root.teamname[who.place] + " is DEAD!";
if (who.deathplay != true) {
who.guts.gotoAndStop("die");
who.deathplay = true;
}
who.healthbar._visible = false;
if (who.deathcomp == true) {
who._alpha = who._alpha - 5;
}
if (who._alpha <= 0) {
who.dead = true;
who.deathplay = false;
who.Xvel = 0;
who.Yvel = 0;
who.jumping = false;
delete who.onEnterFrame;
who._visible = false;
who._x = -99999;
}
}
} else if (_root.badhp[who.place] <= 0) {
_root.showname = _root.badname[who.place] + " is DEAD!";
if (who.deathplay != true) {
who.guts.gotoAndStop("die");
who.deathplay = true;
}
who.healthbar._visible = false;
if (who.deathcomp == true) {
who._alpha = who._alpha - 5;
}
if (who._alpha <= 0) {
who.dead = true;
who.deathplay = false;
who.Xvel = 0;
who.Yvel = 0;
who.jumping = false;
delete who.onEnterFrame;
who._visible = false;
who._x = -99999;
}
}
}
if (((((who.virty > (_root.water._y + 90)) and (_root.selectaroon != who)) and (_root.looking != true)) and (_root.tranny != true)) and (_root.proj != true)) {
if (who.isacrate != true) {
who.Yvel = 0;
who.Xvel = 0;
who.jumping = false;
who.dead = true;
if (who.baddie != true) {
_root.showname = _root.teamname[who.place] + " DROWNED!";
_root.hparray[who.place] = 0;
} else {
_root.showname = _root.badname[who.place] + " DROWNED!";
_root.badhp[who.place] = 0;
}
who.deathplay = false;
}
}
}
}
};
_root.land = function (who) {
if ((_root.tranny != true) and (_root.looking != true)) {
if (_root.proj != true) {
var _local2 = _root.selectaroon;
who._y = who._y - _local2.Yvel;
who._x = who._x - _local2.Xvel;
_root.alignem();
}
}
};
_root.checkVel = function () {
var check1 = true;
var check2 = true;
f = 0;
while (f < _root.teamarray.length) {
var thinger = eval ("_root.wormy.worm" + f);
var abx = Math.abs(thinger.Xvel);
if (((thinger.jumping == true) || (abx > 1)) || (thinger.deathplay == true)) {
check1 = false;
}
f++;
}
f = 0;
while (f < _root.badteam.length) {
var thinger = eval ("_root.wormy.baddie" + f);
var abx = Math.abs(thinger.Xvel);
if (((thinger.jumping == true) || (abx > 1)) || (thinger.deathplay == true)) {
check2 = false;
}
f++;
}
if ((check1 == true) and (check2 == true)) {
var norg = true;
} else {
var norg = false;
}
return(norg);
};
_root.reCenter = function (word) {
if (word == undefined) {
word = 1;
}
_root.worms.onEnterFrame = function () {
var _local2 = _root.worms._x;
var _local3 = _root.worms._y;
_root.worms._x = _root.worms._x - (_local2 / 3);
_root.worms._y = _root.worms._y - (_local3 / 3);
_root.fg._x = _root.fg._x - (_local2 / 3);
_root.fg._y = _root.fg._y - (_local3 / 3);
_root.alignem();
var _local4 = Math.abs(_local2);
if (_local4 < 2) {
_root.worms._x = _root.worms._x - _local2;
_root.worms._y = _root.worms._y - _local3;
_root.looking = false;
_root.alignem();
_root.buildOpts(word);
delete _root.worms.onEnterFrame;
}
};
};
_root.getClosest = function (who, modem) {
_root.aispecial = false;
var range = 9500;
var whodat = undefined;
var absy = undefined;
var wor = undefined;
t = 0;
while (t < (_root.teamarray.length + 1)) {
wor = eval ("_root.wormy.worm" + t);
var myx = (wor.virtx - who.virtx);
var myy = (wor.virty - who.virty);
absy = Math.sqrt((myx * myx) + (myy * myy));
var shouldshoot = _root.lineOfSite(who.virtx, who.virty - 10, wor.virtx, wor.virty - 10);
trace("Should Shoot: " + shouldshoot);
if (who.virtx == NaN) {
trace("yibee");
myx = wor.virtx - (who._x + _root.fg._x);
myy = wor.virty - (who._y + _root.fg._y);
absy = Math.sqrt((myx * myx) + (myy * myy));
shouldshoot = _root.lineOfSite(who._x + fg._x, (who._y + fg._y) - 10, wor.virtx, wor.virty - 10);
trace("Should Shoot: " + shouldshoot);
}
if (((absy < range) and (wor.dead != true)) and (shouldshoot == true)) {
range = absy;
trace("range is: " + range);
whodat = wor;
}
t++;
}
if (whodat == undefined) {
p = 0;
while (p < _root.teamarray.length) {
var hel = eval ("_root.wormy.worm" + p);
if (hel.dead != true) {
whodat = hel;
var checkshot = _root.lineOfSite(who.virtx, who.virty - 10, whodat.virtx, whodat.virty - 10);
if (checkshot == false) {
_root.aispecial = true;
} else {
_root.aispecial = false;
}
}
p++;
}
}
if (modem == 0) {
return(whodat);
}
if (modem == 1) {
return(range);
}
};
_root.chooseMover = function (modem) {
_root.aiarray = new Array();
f = 0;
while (f < _root.badteam.length) {
var yib = eval ("_root.wormy.baddie" + f);
if (yib != dead) {
_root.aiarray[yib.place] = getClosest(yib, 0);
trace("the ai array is: " + _root.aiarray);
}
f++;
}
var theone = 9500;
j = 0;
while (j < _root.aiarray.length) {
var tester = _root.aiarray[j];
var origin = eval ("_root.wormy.baddie" + j);
if ((origin.dead != true) and (tester.dead != true)) {
if (_root.selectaroon.place == origin.place) {
var dister = Math.abs(tester.virtx - 350);
var sendai = (tester.virtx - 350);
} else {
var dister = Math.abs(tester.virtx - origin.virtx);
var sendai = (tester.virtx - origin.virtx);
}
}
if (dister < theone) {
theone = dister;
var mything = origin;
}
j++;
}
if (modem == 0) {
return(mything);
}
if (modem == 1) {
return(sendai);
}
};
_root.lineGuys = function (x1, y1, x2, y2) {
var dist = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
var angle = Math.atan((y2 - y1) / (x2 - x1));
angle = angle + (((x2 - x1) < 0) ? Math.PI : 0);
angle = angle + ((((x2 - x1) >= 0) && ((y2 - y1) < 0)) ? (Math.PI*2) : 0);
pos = 0;
while (pos <= dist) {
var x = Math.floor((pos * Math.cos(angle)) + x1);
var y = Math.floor((pos * Math.sin(angle)) + y1);
g = 0;
while (g < _root.badteam.length) {
var thinger = eval ("_root.wormy.baddie" + g);
if (thinger.hitTest(x, y, true) and (!_root.selectaroon.hitTest(x, y, true))) {
trace("guy in the way");
return(false);
}
g++;
}
if (pos >= (dist - 1)) {
return(true);
}
pos++;
}
};
_root.runShot = function (goal, ranger, dir) {
_root.selectaroon.power = 0;
if (dir > 0) {
_root.selectaroon._xscale = 25;
} else {
_root.selectaroon._xscale = -25;
}
_root.selectaroon.aiming = true;
var _local4 = _root.aiarray[_root.selectaroon.place];
var _local7 = _root.lineGuys(350, 180, _local4.virtx, _local4.virty);
trace("yoink is: " + _local7);
if (_local7 == false) {
_root.aispecial = true;
}
var _local9 = ranger;
var _local8 = _local4.virty - 255;
var _local14 = Math.atan2(_local8, _local9);
var _local10 = (_local14 * 180) / Math.PI;
var _local5;
if (_root.aispecial == true) {
var _local13 = random(6);
var tingle = "homing";
_root.selectaroon.rot = -45;
var powgoal = (45 * (_root.grav * 2));
_root.homex = _local4._x + (random(200) - 100);
_root.homey = _local4._y;
if (_local13 <= 3) {
trace("ai special turned off!");
_root.aispecial = false;
_local5 = 1;
}
}
if ((_root.aispecial != true) and (_local5 == undefined)) {
_local5 = random(2);
}
if ((_local5 == 0) || (_root.aispecial == true)) {
_root.selectaroon.guts.gotoAndStop("action0");
if (_root.aispecial != true) {
_root.selectaroon.rot = _local10;
var powgoal = ((ranger / 6) * _root.grav);
var tingle = "cannonball";
}
}
if (_local5 == 1) {
_root.selectaroon.guts.gotoAndStop("action1");
_root.selectaroon.guts.action1.arm0.nade._visible = true;
_root.selectaroon.guts.action1.arm0.dyno._visible = false;
if ((((_root.mylev == 1) || (_root.mylev == 3)) || (_root.mylev == 4)) || (_root.mylev == 7)) {
_root.selectaroon.rot = -50 + _root.aiadjust;
var powgoal = ((ranger / 15) - _root.aiadjust);
} else {
_root.selectaroon.rot = -65 + _root.aiadjust;
var powgoal = ((ranger / 13) - _root.aiadjust);
trace("datarget: " + _local4);
}
var tingle = "nade";
}
if ((powgoal < 20) || (powgoal == undefined)) {
powgoal = 20;
}
_root.aiclip.onEnterFrame = function () {
if (_root.selectaroon.power < powgoal) {
_root.selectaroon.power = _root.selectaroon.power + 3.5;
} else {
trace("tingle: " + tingle);
v = _root.bal.attachMovie(tingle, tingle, 500);
var _local3 = _root.selectaroon.rot * (Math.PI/180);
if (_root.selectaroon._xscale > 0) {
v._x = (_root.selectaroon._x - _root.fg._x) + (Math.cos(_local3) * _root.selectaroon.power);
v.Xvel = (Math.cos(_local3) * _root.selectaroon.power) / 3;
_root.fg._x = _root.fg._x - (Math.cos(_local3) * _root.selectaroon.power);
} else {
v._x = (_root.selectaroon._x - _root.fg._x) - (Math.cos(_local3) * _root.selectaroon.power);
v.Xvel = ((Math.cos(_local3) * _root.selectaroon.power) / 3) * -1;
_root.fg._x = _root.fg._x + (Math.cos(_local3) * _root.selectaroon.power);
}
v._y = ((_root.selectaroon._y - _root.fg._y) - 25) + (Math.sin(_local3) * _root.selectaroon.power);
v.Yvel = (Math.sin(_local3) * _root.selectaroon.power) / 3;
_root.fg._y = _root.fg._y - ((Math.sin(_local3) * _root.selectaroon.power) / 3);
v._yscale = 35;
v._xscale = v._yscale;
v.gorx = _root.homex;
v.gory = _root.homey;
_root.selectaroon.aiming = false;
_root.selectaroon.ready = false;
_root.proj = true;
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
if (_root.selectaroon.deadpass == true) {
t.deadpass = true;
}
var _local5 = (_root.selectaroon._x - _root.wormy._x) + _root.worms._x;
var _local4 = (_root.selectaroon._y - _root.wormy._y) + _root.worms._y;
t._x = _local5;
t._y = _local4;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
_root.projtype = undefined;
_root.badgoing = false;
_root.tranny = false;
_root.readytoselect = false;
_root.aispecial = false;
tingle = undefined;
delete _root.aiclip.onEnterFrame;
}
};
};
_root.aiswitch = function (goal, ranger, dir) {
trace("goal: " + goal);
trace("ranger: " + ranger);
trace("dir: " + dir);
if ((_root.selectaroon.place != goal.place) and (_root.aiswitchcount < _root.badteam.length)) {
trace("AI switch!");
_root.aiswitchcount = _root.aiswitchcount + 1;
_root.readytoselect = false;
alignem();
var beenthere = false;
var mebe = _root.getNextdude(_root.selectaroon);
_root.aiswitching = true;
var goalx = ((mebe._x * -1) + 350);
var goaly = ((mebe._y * -1) + 200);
_root.aiclip.onEnterFrame = function () {
if (_root.aiswitching == true) {
var _local9 = _root.fg._x;
var _local8 = _root.fg._y;
var _local3 = goalx - _local9;
var _local4 = goaly - _local8;
_root.fg._x = _root.fg._x + (_local3 / 6);
_root.worms._x = _root.worms._x + (_local3 / 6);
_root.fg._y = _root.fg._y + (_local4 / 6);
_root.worms._y = _root.worms._y + (_local4 / 6);
alignem();
var _local7 = Math.abs(_local3);
if (_local7 < 2) {
_root.showname = _root.badname[_root.selectaroon.place + 1] + " is goin' for it!";
if (_root.showname == (undefined + " is goin' for it!")) {
_root.showname = _root.badname[0] + " is goin for it!";
}
_root.fg._x = _root.fg._x + _local3;
_root.worms._x = _root.worms._x + _local3;
_root.fg._y = _root.fg._y + _local4;
_root.worms._y = _root.worms._y + _local4;
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
var _local6 = (_root.selectaroon._x - _root.wormy._x) + _root.worms._x;
var _local5 = (_root.selectaroon._y - _root.wormy._y) + _root.worms._y;
t.pointer._visible = false;
t._x = _local6;
t._y = _local5;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.onEnterFrame = function () {
_root.physics(this);
};
if (beenthere != true) {
_root.worms._x = 0;
_root.worms._y = 0;
g = _root.worms.attachMovie("worm" + mebe.id, "baddie" + mebe.place, 0);
g.baddie = true;
if (mebe.dead == true) {
g.dead = true;
}
g._x = 350;
g._y = 200;
g._xscale = mebe._xscale;
g._yscale = 25;
g.id = mebe.id;
g.place = mebe.place;
beenthere = true;
}
mebe.unloadMovie();
g.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon = g;
_root.readytoselect = true;
_root.aiswitching = false;
_root.aiswitch(goal, ranger, dir);
alignem();
}
}
};
} else {
if (ranger <= 150) {
trace("too close");
_root.runShot(goal, ranger, dir);
}
if (ranger >= 900) {
_root.runShot(goal, ranger, dir);
_root.aispecial = true;
}
_root.selectaroon.pointer._visible = false;
if ((ranger > 150) and (ranger < 900)) {
_root.runShot(goal, ranger, dir);
}
}
};
_root.runMove = function (goal, ranger, dir) {
_root.tranny = false;
_root.proj = false;
_root.looking = false;
_root.badgoing = false;
_root.aimovin = true;
_root.selectaroon.Xvel = 0;
if (dir > 0) {
var whereto = ((_root.fg._x + dir) + 100);
trace("whereto: " + whereto);
} else {
var whereto = ((_root.fg._x + dir) - 100);
}
_root.aiclip.onEnterFrame = function () {
if (dir >= 0) {
if (_root.fg._x < whereto) {
_root.selectaroon._xscale = -25;
v = (_root.selectaroon.Xvel = -4);
_root.selectaroon.guts.gotoAndStop("walk");
} else if (_root.fg.hitTest(_root.selectaroon.virtx, _root.selectaroon.virty, true) and (!_root.maskee.hitTest(_root.selectaroon.virtx, _root.selectaroon.virty, true))) {
_root.aimovin = false;
_root.badgoing = true;
_root.tranny = true;
delete _root.aiclip.onEnterFrame;
_root.runShot(goal, 350, 15);
}
} else if (_root.fg._x > whereto) {
_root.selectaroon._xscale = 25;
v = (_root.selectaroon.Xvel = 4);
_root.selectaroon.guts.gotoAndStop("walk");
} else if (_root.fg.hitTest(_root.selectaroon.virtx, _root.selectaroon.virty, true) and (!_root.maskee.hitTest(_root.selectaroon.virtx, _root.selectaroon.virty, true))) {
_root.aimovin = false;
_root.badgoing = true;
_root.tranny = true;
delete _root.aiclip.onEnterFrame;
_root.runShot(goal, 350, -15);
}
};
};
_root.runAI = function () {
_root.badgoing = true;
_root.aiswitchcount = 0;
_root.aispecial = false;
var _local3 = _root.chooseMover(0);
var _local2 = _root.chooseMover(1);
var _local4 = Math.abs(_local2);
_root.aiswitch(_local3, _local4, _local2);
};
_root.switchTurn = function (dax, day, who) {
_root.checkDeath();
if (((_root.mylev != 2) and (_root.mylev != 6)) and (_root.artillery != true)) {
_root.makeCrate();
}
_root.readytoselect = false;
if (_root.masterturn == 0) {
_root.masterturn = 1;
} else {
_root.masterturn = 0;
}
var waiter = 0;
_root.fg.onEnterFrame = function () {
var _local5 = _root.checkVel();
if (_local5 == true) {
if ((who.dead == true) || (who == undefined)) {
who = _root.getNextdude(who);
}
waiter = waiter + 1;
var _local9 = 350 - who._x;
var _local7 = 200 - who._y;
var _local6 = _local9;
var _local8 = _local7;
}
if (waiter >= 25) {
var _local3 = _local6 - _root.fg._x;
var _local4 = _local8 - _root.fg._y;
_root.fg._x = _root.fg._x + (_local3 / 10);
_root.fg._y = _root.fg._y + (_local4 / 10);
_root.alignem();
var _local10 = Math.abs(_local3);
if (_local10 < 2) {
if (_root.masterturn == 1) {
if (_root.compai != true) {
_root.showname = "Space to select " + _root.badname[who.place];
} else {
_root.showname = "Uber Kids Turn. Watch out!";
}
} else {
_root.showname = "Space to select " + _root.teamname[who.place];
}
_root.fg._x = _root.fg._x + _local3;
_root.fg._y = _root.fg._y + _local4;
_root.turncount = 0;
_root.worms._x = 0;
_root.worms._y = 0;
g = _root.worms.attachMovie("worm" + who.id, "worm" + who.place, 0);
g._x = 350;
g._y = 200;
g._xscale = who._xscale;
g._yscale = 25;
g.id = who.id;
g.place = who.place;
if (who.baddie == true) {
g.baddie = true;
}
if (who.dead == true) {
g.dead = true;
}
g.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon = g;
if (_root.readytoselect != true) {
_root.tranny = true;
if (_root.compai != true) {
_root.buildOpts(0);
} else {
_root.buildOpts(0);
if (_root.masterturn == 1) {
_root.runAI();
}
}
}
_root.readytoselect = true;
who.unloadMovie();
_root.alignem();
delete _root.fg.onEnterFrame;
}
}
};
};
_root.checkDeath = function () {
p = 0;
while (p < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + p);
if (thing.dead != true) {
var check1 = true;
}
p++;
}
p = 0;
while (p < _root.badteam.length) {
var thing = eval ("_root.wormy.worm" + p);
if (thing.dead != true) {
var check2 = true;
}
p++;
}
if (check1 != true) {
_root.youwon = false;
j = _root.attachMovie("endtran0", "endtran", 2300);
j._x = 350;
j._y = 100;
_root.tranny = true;
}
if (check2 != true) {
_root.youwon = true;
j = _root.attachMovie("endtran0", "endtran", 2300);
j._x = 350;
j._y = 100;
_root.tranny = true;
}
};
_root.getNextdude = function (who) {
if (who == undefined) {
if (_root.masterturn == 0) {
h = 0;
while (who == undefined) {
who = eval ("_root.wormy.worm" + h);
who.place = h;
h++;
}
}
if (_root.masterturn == 1) {
h = 0;
while (who == undefined) {
who = eval ("_root.wormy.baddie" + h);
who.place = h;
h++;
}
who.baddie = true;
trace(who.baddie);
}
}
var foundem = false;
var loops = 0;
if (who.baddie != true) {
f = who.place + 1;
while (foundem != true) {
if ((f == _root.teamarray.length) and (foundem != true)) {
f = 0;
}
var whobie = eval ("_root.wormy.worm" + f);
if ((whobie.dead != true) and (whobie != undefined)) {
foundem = true;
return(whobie);
}
if (loops > (_root.teamarray.length * 2)) {
foundem = true;
_root.youwon = false;
j = _root.attachMovie("endtran0", "endtran", 2300);
j._x = 350;
j._y = 100;
return("gameover");
}
loops = loops + 1;
f++;
}
} else {
f = who.place + 1;
while (foundem != true) {
if ((f == _root.badteam.length) and (foundem != true)) {
f = 0;
}
var whobie = eval ("_root.wormy.baddie" + f);
if ((whobie.dead != true) and (whobie != undefined)) {
foundem = true;
return(whobie);
}
if (loops > (_root.badteam.length * 2)) {
foundem = true;
_root.youwon = true;
j = _root.attachMovie("endtran0", "endtran", 2300);
j._x = 350;
j._y = 100;
return("gameover");
}
loops = loops + 1;
f++;
}
}
};
_root.switchguy = function () {
trace("switch!");
_root.readytoselect = false;
alignem();
var beenthere = false;
_root.buildOpts(0);
var mebe = _root.getNextdude(_root.selectaroon);
_root.tranny = true;
var goalx = ((mebe._x * -1) + 350);
var goaly = ((mebe._y * -1) + 200);
_root.fg.onEnterFrame = function () {
if (_root.tranny == true) {
var _local9 = _root.fg._x;
var _local8 = _root.fg._y;
var _local3 = goalx - _local9;
var _local4 = goaly - _local8;
_root.fg._x = _root.fg._x + (_local3 / 6);
_root.worms._x = _root.worms._x + (_local3 / 6);
_root.fg._y = _root.fg._y + (_local4 / 6);
_root.worms._y = _root.worms._y + (_local4 / 6);
alignem();
var _local7 = Math.abs(_local3);
if (_local7 < 2) {
if (_root.selectaroon.baddie != true) {
_root.showname = "Space to select " + _root.teamname[_root.selectaroon.place];
if (_root.showname == ("Space to select " + undefined)) {
_root.showname = "Space to select " + _root.teamname[0];
}
} else {
_root.showname = "Space to select " + _root.badname[_root.selectaroon.place];
if (_root.showname == ("Space to select " + undefined)) {
_root.showname = "Space to select " + _root.badname[0];
}
}
_root.fg._x = _root.fg._x + _local3;
_root.worms._x = _root.worms._x + _local3;
_root.fg._y = _root.fg._y + _local4;
_root.worms._y = _root.worms._y + _local4;
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
var _local6 = (_root.selectaroon._x - _root.wormy._x) + _root.worms._x;
var _local5 = (_root.selectaroon._y - _root.wormy._y) + _root.worms._y;
t.pointer._visible = false;
t._x = _local6;
t._y = _local5;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.onEnterFrame = function () {
_root.physics(this);
};
if (beenthere != true) {
_root.worms._x = 0;
_root.worms._y = 0;
if (mebe.baddie != true) {
g = _root.worms.attachMovie("worm" + mebe.id, "worm" + mebe.place, 0);
} else {
g = _root.worms.attachMovie("worm" + mebe.id, "baddie" + mebe.place, 0);
g.baddie = true;
}
if (mebe.dead == true) {
g.dead = true;
}
if (mebe.deadpass == true) {
g.deadpass = true;
}
g._x = 350;
g._y = 200;
g._xscale = mebe._xscale;
g._yscale = 25;
g.id = mebe.id;
g.place = mebe.place;
beenthere = true;
}
mebe.unloadMovie();
g.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon = g;
if (_root.readytoselect != true) {
u = _root.worms.attachMovie("pointer", "pointer", 1);
u.pointer._visible = true;
}
_root.readytoselect = true;
alignem();
}
}
};
};
_root.runReady = function () {
trace("hhhhhhhhhhhhhhhhhhhhhhhhh");
_root.readytoselect = false;
_root.worms.pointer.unloadMovie();
_root.tranny = false;
_root.proj = false;
_root.selectaroon.aiming = false;
_root.selectaroon.pointer._visible = false;
if (_root.selectaroon.baddie != true) {
_root.showname = "Go for it " + _root.teamname[_root.selectaroon.place];
} else {
_root.showname = "Go for it " + _root.badname[_root.selectaroon.place];
}
_root.buildOpts(1);
};
_root.initLevel(_root.mylev, _root.mygrav, _root.myheight);
_root.onEnterFrame = function () {
if (_root.badgoing != true) {
if (Key.isDown(32)) {
if ((_root.selectaroon.aiming == true) and (_root.looking != true)) {
if (_root.selectaroon.power < 120) {
_root.selectaroon.power = _root.selectaroon.power + 6;
}
}
if (_root.homing == true) {
_root.teletarget.unloadMovie();
_root.homex = _root.selectaroon._x - _root.wormy._x;
_root.homey = _root.selectaroon._y - _root.wormy._y;
_root.reCenter(2);
_root.tranny = false;
_root.readytoselect = false;
_root.selectaroon.aiming = false;
if ((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) {
_root.selectaroon.rot = 0;
_root.selectaroon.power = 0;
_root.selectaroon.aiming = true;
_root.readytoselect = false;
}
if (_root.selectaroon.aiming == true) {
_root.selectaroon.guts.gotoAndStop("action0");
_root.projtype = "homing";
}
_root.homing = false;
}
if (_root.teleporting == true) {
if (_root.selectaroon.baddie != true) {
_root.toolarray[_root.selectaroon.place][2] = _root.toolarray[_root.selectaroon.place][2] - 1;
} else {
_root.badtools[_root.selectaroon.place][2] = _root.badtools[_root.selectaroon.place][2] - 1;
}
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = (_root.selectaroon._x - _root.wormy._x);
var fydist = (_root.selectaroon._y - _root.wormy._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
_root.looking = false;
_root.teleporting = false;
_root.teletarget.unloadMovie();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.teleporting = false;
_root.switchTurn(fxdist, fydist, goin);
_root.readytoselect = true;
_root.alignem();
}
if (((_root.readytoselect == true) and (_root.projtype != "homing")) and (_root.buildingopts == false)) {
_root.runReady();
}
}
if (((Key.isDown(32) and (_root.projtype == "none9")) and (_root.selectaroon.aiming == true)) and (_root.selectaroon.ready == true)) {
_root.selectaroon.guts.saw.gotoAndPlay("go");
_root.selectaroon.ready = false;
if (_root.selectaroon.baddie != true) {
_root.toolarray[_root.selectaroon.place][8] = _root.toolarray[_root.selectaroon.place][8] - 1;
} else {
_root.badtools[_root.selectaroon.place][8] = _root.badtools[_root.selectaroon.place][8] - 1;
}
}
if (((Key.isDown(32) and (_root.projtype == "none5")) and (_root.selectaroon.aiming == true)) and (_root.selectaroon.ready == true)) {
_root.selectaroon.guts.hari.gotoAndPlay("stab");
_root.selectaroon.ready = false;
if (_root.selectaroon.baddie != true) {
_root.toolarray[_root.selectaroon.place][4] = _root.toolarray[_root.selectaroon.place][4] - 1;
} else {
_root.badtools[_root.selectaroon.place][4] = _root.badtools[_root.selectaroon.place][4] - 1;
}
}
if (((Key.isDown(32) and (_root.projtype == "none6")) and (_root.selectaroon.aiming == true)) and (_root.selectaroon.ready == true)) {
_root.selectaroon.guts.burn.gotoAndPlay("fry");
_root.selectaroon.ready = false;
if (_root.selectaroon.baddie != true) {
_root.toolarray[_root.selectaroon.place][5] = _root.toolarray[_root.selectaroon.place][5] - 1;
} else {
_root.badtools[_root.selectaroon.place][5] = _root.badtools[_root.selectaroon.place][5] - 1;
}
}
if ((((!Key.isDown(32)) and (_root.selectaroon.power > 0)) and (_root.selectaroon.aiming == true)) and (_root.selectaroon.ready == true)) {
var tingle = _root.projtype;
if (_root.selectaroon.baddie != true) {
if (_root.projtype == "nade") {
_root.toolarray[_root.selectaroon.place][1] = _root.toolarray[_root.selectaroon.place][1] - 1;
}
if (_root.projtype == "dyno") {
_root.toolarray[_root.selectaroon.place][3] = _root.toolarray[_root.selectaroon.place][3] - 1;
}
if (_root.projtype == "homing") {
_root.toolarray[_root.selectaroon.place][6] = _root.toolarray[_root.selectaroon.place][6] - 1;
}
if (_root.projtype == "energyball") {
_root.toolarray[_root.selectaroon.place][7] = _root.toolarray[_root.selectaroon.place][7] - 1;
}
} else {
if (_root.projtype == "nade") {
_root.badtools[_root.selectaroon.place][1] = _root.badtools[_root.selectaroon.place][1] - 1;
}
if (_root.projtype == "dyno") {
_root.badtools[_root.selectaroon.place][3] = _root.badtools[_root.selectaroon.place][3] - 1;
}
if (_root.projtype == "homing") {
_root.badtools[_root.selectaroon.place][6] = _root.badtools[_root.selectaroon.place][6] - 1;
}
if (_root.projtype == "energyball") {
_root.badtools[_root.selectaroon.place][7] = _root.badtools[_root.selectaroon.place][7] - 1;
}
}
v = _root.bal.attachMovie(tingle, tingle, 500);
var rads = (_root.selectaroon.rot * (Math.PI/180));
if (_root.selectaroon._xscale > 0) {
v._x = (_root.selectaroon.virtx - _root.fg._x) + (Math.cos(rads) * _root.selectaroon.power);
v.Xvel = (Math.cos(rads) * _root.selectaroon.power) / 3;
_root.fg._x = _root.fg._x - (Math.cos(rads) * _root.selectaroon.power);
} else {
v._x = (_root.selectaroon.virtx - _root.fg._x) - (Math.cos(rads) * _root.selectaroon.power);
v.Xvel = ((Math.cos(rads) * _root.selectaroon.power) / 3) * -1;
_root.fg._x = _root.fg._x + (Math.cos(rads) * _root.selectaroon.power);
}
v._y = ((_root.selectaroon.virty - _root.fg._y) - 25) + (Math.sin(rads) * _root.selectaroon.power);
v.Yvel = (Math.sin(rads) * _root.selectaroon.power) / 3;
_root.fg._y = _root.fg._y - ((Math.sin(rads) * _root.selectaroon.power) / 3);
v._yscale = 35;
v._xscale = v._yscale;
v.gorx = _root.homex;
v.gory = _root.homey;
_root.selectaroon.aiming = false;
_root.selectaroon.ready = false;
_root.proj = true;
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
if (_root.selectaroon.deadpass == true) {
t.deadpass = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
_root.projtype = undefined;
}
if (_root.tranny != true) {
_root.land(_root.fg);
if (Key.isDown(38)) {
if (_root.looking != true) {
if ((((_root.selectaroon.jumping != true) and (_root.selectaroon.aiming != true)) and (_root.proj != true)) and (_root.artillery != true)) {
_root.selectaroon.Yvel = -10;
_root.selectaroon.jumping = true;
}
if (_root.selectaroon.aiming == true) {
_root.selectaroon.rot = _root.selectaroon.rot - 3;
}
} else {
_root.worms._y = _root.worms._y + 8;
_root.fg._y = _root.fg._y + 8;
_root.alignem();
}
}
if (Key.isDown(40)) {
if (_root.looking != true) {
if (_root.selectaroon.aiming == true) {
_root.selectaroon.rot = _root.selectaroon.rot + 3;
}
} else {
_root.worms._y = _root.worms._y - 8;
_root.fg._y = _root.fg._y - 8;
_root.alignem();
}
}
if (Key.isDown(39)) {
if (_root.looking != true) {
if (_root.maskee.hitTest(_root.selectaroon.rightedge, _root.selectaroon.topy, true) || (!_root.fg.hitTest(_root.selectaroon.rightedge, _root.selectaroon.topy, true))) {
if ((_root.selectaroon.aiming != true) and (_root.artillery != true)) {
_root.selectaroon.Xvel = _root.selectaroon.Xvel + 1.5;
_root.selectaroon.guts.gotoAndStop("walk");
}
_root.selectaroon._xscale = 25;
}
} else {
_root.worms._x = _root.worms._x - 8;
_root.fg._x = _root.fg._x - 8;
_root.alignem();
}
}
if (Key.isDown(37)) {
if (_root.looking != true) {
if (_root.maskee.hitTest(_root.selectaroon.leftedge, _root.selectaroon.topy, true) || (!_root.fg.hitTest(_root.selectaroon.leftedge, _root.selectaroon.topy, true))) {
if ((_root.selectaroon.aiming != true) and (_root.artillery != true)) {
_root.selectaroon.Xvel = _root.selectaroon.Xvel - 1.5;
_root.selectaroon.guts.gotoAndStop("walk");
}
_root.selectaroon._xscale = -25;
}
} else {
_root.worms._x = _root.worms._x + 8;
_root.fg._x = _root.fg._x + 8;
_root.alignem();
}
}
if (((!Key.isDown(37)) and (!Key.isDown(39))) and (_root.selectaroon.jumping != true)) {
if ((_root.selectaroon.aiming != true) and (_root.aimovin != true)) {
_root.selectaroon.guts.gotoAndStop("rest");
}
}
if (Key.isDown(27)) {
if (_root.selectaroon.aiming == true) {
_root.reCenter();
_root.selectaroon.aiming = false;
_root.selectaroon.ready = false;
_root.looking = false;
_root.teleporting = false;
_root.homing = false;
_root.teletarget.unloadMovie();
_root.readytoselect = false;
_root.tranny = false;
_root.selectaroon.aiming = false;
_root.selectaroon.jumping = false;
_root.proj = false;
_root.selectaroon.floozy = false;
_root.projtype = undefined;
_root.runReady();
}
}
if (_root.selectaroon.jumping == true) {
_root.selectaroon.guts.gotoAndStop("jump");
}
}
}
};
Instance of Symbol 1334 MovieClip "aiclip" in Frame 5
on (keyPress "q") {
var beenset = false;
if (_root._quality == "HIGH") {
_root._quality = "MEDIUM";
beenset = true;
} else if ((_root._quality == "MEDIUM") and (beenset != true)) {
_root._quality = "LOW";
beenset = true;
}
if ((_root._quality == "LOW") and (beenset != true)) {
_root._quality = "HIGH";
}
}
on (keyPress "p") {
if ((((((_root.looking != true) and (_root.selectaroon.aiming != true)) and (_root.tranny != true)) and (_root.proj != true)) and (_root.teleporting != true)) and (_root.badgoing != true)) {
_root.looking = true;
p = _root.attachMovie("pauser", "pauser", 87652);
p._x = 350;
p._y = 200;
_root.optsDown();
} else if (((_root.looking == true) and (_root.teleporting != true)) and (_root.badgoing != true)) {
_root.reCenter();
_root.pauser.gotoAndPlay("collapse");
}
}
on (keyPress "s") {
if ((((_root.selectaroon.aiming != true) and (_root.looking != true)) and (_root.badgoing != true)) and (_root.readytoselect == true)) {
_root.switchguy();
}
}
on (keyPress "1") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][0] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][0] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.rot = 0;
_root.selectaroon.power = 0;
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.buildOpts(2);
_root.selectaroon.guts.gotoAndStop("action0");
_root.projtype = "cannonball";
_root.proceed = false;
}
}
}
on (keyPress "2") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][1] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][1] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.rot = 0;
_root.selectaroon.power = 0;
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.buildOpts(2);
_root.selectaroon.guts.gotoAndStop("action1");
_root.selectaroon.guts.action1.arm0.nade._visible = true;
_root.selectaroon.guts.action1.arm0.dyno._visible = false;
_root.projtype = "nade";
_root.proceed = false;
}
}
}
on (keyPress "3") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][2] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][2] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.buildOpts(3);
_root.selectaroon.guts.gotoAndStop("action3");
_root.looking = true;
_root.teleporting = true;
r = _root.attachMovie("teletarget", "teletarget", 843);
r._x = 350;
r._y = 180;
_root.projtype = "none3";
_root.proceed = false;
}
}
}
on (keyPress "4") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][3] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][3] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.rot = 0;
_root.selectaroon.power = 0;
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.buildOpts(2);
_root.selectaroon.guts.gotoAndStop("action1");
_root.selectaroon.guts.action1.arm0.nade._visible = false;
_root.selectaroon.guts.action1.arm0.dyno._visible = true;
_root.projtype = "dyno";
_root.proceed = false;
}
}
}
on (keyPress "5") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][4] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][4] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.selectaroon.ready = false;
_root.buildOpts(2);
_root.selectaroon.guts.gotoAndStop("action5");
_root.projtype = "none5";
_root.proceed = false;
}
}
}
on (keyPress "6") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][5] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][5] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.selectaroon.ready = false;
_root.buildOpts(2);
_root.selectaroon.guts.gotoAndStop("action6");
_root.projtype = "none6";
_root.proceed = false;
}
}
}
on (keyPress "7") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][6] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][6] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.buildOpts(3);
_root.selectaroon.guts.gotoAndStop("action3");
_root.looking = true;
_root.homing = true;
r = _root.attachMovie("teletarget", "teletarget", 843);
r._x = 350;
r._y = 180;
_root.projtype = "none7";
_root.proceed = false;
}
}
}
on (keyPress "8") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][7] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][7] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.rot = 0;
_root.selectaroon.power = 0;
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.buildOpts(2);
_root.selectaroon.guts.gotoAndStop("action8");
_root.projtype = "energyball";
_root.proceed = false;
}
}
}
on (keyPress "9") {
if (_root.selectaroon.baddie != true) {
if ((_root.toolarray[_root.selectaroon.place][8] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
} else if ((_root.badtools[_root.selectaroon.place][8] > 0) and (_root.badgoing != true)) {
_root.proceed = true;
}
if (_root.proceed == true) {
if (((((((_root.readytoselect != true) and (_root.tranny != true)) and (_root.selectaroon.aiming != true)) and (_root.selectaroon.jumping != true)) and (_root.proj != true)) and (_root.selectaroon.floozy != true)) and (_root.looking != true)) {
_root.selectaroon.aiming = true;
_root.selectaroon.Xvel = 0;
_root.selectaroon.Yvel = 0;
_root.selectaroon.ready = false;
_root.buildOpts(2);
_root.selectaroon.guts.gotoAndStop("action9");
_root.projtype = "none9";
_root.proceed = false;
}
}
}
Frame 15
stop();
Stage.showMenu = false;
Symbol 24 MovieClip [splode] Frame 26
stop();
this.unloadMovie();
Instance of Symbol 60 MovieClip "powerthing" in Symbol 66 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 67 MovieClip Frame 15
stop();
this.myfill = new Color(this.zook.fill);
this.myfill.setRGB(16764057);
this.myoutline = new Color(this.zook.outline);
this.myoutline.setRGB(6772760);
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Instance of Symbol 85 MovieClip "dyno" in Symbol 90 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 60 MovieClip "powerthing" in Symbol 92 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 93 MovieClip Frame 1
this.hand0fill = new Color(this.arm0.handfill);
this.hand0outline = new Color(this.arm0.handoutline);
this.arm0fill = new Color(this.arm0.fill);
this.arm0outline = new Color(this.arm0.outline);
this.hand1fill = new Color(this.arm1.handfill);
this.hand1outline = new Color(this.arm1.handoutline);
this.arm1fill = new Color(this.arm1.fill);
this.arm1outline = new Color(this.arm1.outline);
this.hand0fill.setRGB(16764057);
this.hand1fill.setRGB(16764057);
this.hand0outline.setRGB(6772760);
this.hand1outline.setRGB(6772760);
this.arm0fill.setRGB(38656);
this.arm1fill.setRGB(38656);
this.arm0outline.setRGB(32512);
this.arm1outline.setRGB(32512);
Symbol 93 MovieClip Frame 10
stop();
this.onEnterFrame = function () {
this.arm0._rotation = this._parent._parent.rot;
this.arm1._rotation = this._parent._parent.rot;
this.aimer._rotation = this._parent._parent.rot;
};
Symbol 133 MovieClip Frame 92
stop();
this._parent._parent.deathcomp = true;
Instance of Symbol 60 MovieClip "powerthing" in Symbol 142 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 143 MovieClip Frame 6
stop();
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 187 MovieClip Frame 25
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 187 MovieClip Frame 80
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = _root.hparray[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = _root.badhp[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
}
Symbol 187 MovieClip Frame 143
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 193 MovieClip Frame 16
stop();
Symbol 228 MovieClip Frame 10
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 228 MovieClip Frame 30
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 228 MovieClip Frame 90
h = _root.attachMovie("harakiri", "harakiri", 74910);
h._x = 350;
h._y = 200;
if (this._parent._parent.baddie != true) {
_root.hparray[this._parent._parent.place] = 0;
} else {
_root.badhp[this._parent._parent.place] = 0;
}
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 255 MovieClip Frame 22
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 255 MovieClip Frame 37
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
var noid = (849 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
var noid = (9950 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
}
Instance of Symbol 180 MovieClip in Symbol 255 MovieClip Frame 97
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 255 MovieClip Frame 98
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
var noid = (849 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
var noid = (9950 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
Symbol 255 MovieClip Frame 155
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 256 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 2
stop();
Symbol 256 MovieClip Frame 3
stop();
Symbol 256 MovieClip Frame 10
stop();
Symbol 256 MovieClip Frame 11
stop();
Symbol 256 MovieClip Frame 20
stop();
Symbol 256 MovieClip Frame 25
stop();
Symbol 256 MovieClip Frame 35
stop();
Symbol 256 MovieClip Frame 40
stop();
Symbol 256 MovieClip Frame 45
stop();
Symbol 256 MovieClip Frame 50
stop();
Instance of Symbol 260 MovieClip in Symbol 263 MovieClip Frame 1
onClipEvent (load) {
var my_color = new Color(this);
var my_outline = new Color(this._parent.outline);
if (this._parent._parent._parent.baddie == true) {
my_color.setRGB(16711680);
my_outline.setRGB(7798784);
} else {
my_color.setRGB(52224);
my_outline.setRGB(30464);
}
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent.baddie != true) {
this._xscale = _root.hparray[this._parent._parent._parent.place];
} else {
this._xscale = _root.badhp[this._parent._parent._parent.place];
}
this._parent._xscale = this._parent._parent._parent._xscale * 4;
}
Instance of Symbol 263 MovieClip "guts" in Symbol 264 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 264 MovieClip "healthbar" in Symbol 268 MovieClip [worm0] Frame 1
/* no clip actions */
Instance of Symbol 267 MovieClip "pointer" in Symbol 268 MovieClip [worm0] Frame 1
/* no clip actions */
Symbol 280 MovieClip [fg3] Frame 1
this.cacheAsBitmap = true;
Symbol 282 MovieClip [fg2] Frame 1
this.cacheAsBitmap = true;
Symbol 284 MovieClip [fg1] Frame 1
this.cacheAsBitmap = true;
Symbol 286 MovieClip [fg0] Frame 1
this.cacheAsBitmap = true;
Symbol 311 MovieClip Frame 16
stop();
this.myfill = new Color(this.zook.fill);
this.myfill.setRGB(16768921);
this.myoutline = new Color(this.zook.outline);
this.myoutline.setRGB(6116398);
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 313 MovieClip Frame 1
this.hand0fill = new Color(this.arm0.handfill);
this.hand0outline = new Color(this.arm0.handoutline);
this.arm0fill = new Color(this.arm0.fill);
this.arm0outline = new Color(this.arm0.outline);
this.hand1fill = new Color(this.arm1.handfill);
this.hand1outline = new Color(this.arm1.handoutline);
this.arm1fill = new Color(this.arm1.fill);
this.arm1outline = new Color(this.arm1.outline);
this.hand0fill.setRGB(16768921);
this.hand1fill.setRGB(16768921);
this.hand0outline.setRGB(8088093);
this.hand1outline.setRGB(8088093);
this.arm0fill.setRGB(16777215);
this.arm1fill.setRGB(16777215);
this.arm0outline.setRGB(9079434);
this.arm1outline.setRGB(9079434);
Symbol 313 MovieClip Frame 10
stop();
this.onEnterFrame = function () {
this.arm0._rotation = this._parent._parent.rot;
this.arm1._rotation = this._parent._parent.rot;
this.aimer._rotation = this._parent._parent.rot;
};
Symbol 319 MovieClip Frame 16
stop();
Symbol 340 MovieClip Frame 25
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 340 MovieClip Frame 79
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = _root.hparray[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = _root.badhp[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
}
Symbol 340 MovieClip Frame 143
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Instance of Symbol 60 MovieClip "powerthing" in Symbol 349 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 350 MovieClip Frame 6
stop();
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 368 MovieClip Frame 37
stop();
this._parent._parent.deathcomp = true;
Symbol 392 MovieClip Frame 10
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 392 MovieClip Frame 30
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 392 MovieClip Frame 90
h = _root.attachMovie("harakiri", "harakiri", 74910);
h._x = 350;
h._y = 200;
if (this._parent._parent.baddie != true) {
_root.hparray[this._parent._parent.place] = 0;
} else {
_root.badhp[this._parent._parent.place] = 0;
}
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 420 MovieClip Frame 20
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 420 MovieClip Frame 34
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
var noid = (849 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
var noid = (9950 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
}
Instance of Symbol 180 MovieClip in Symbol 420 MovieClip Frame 97
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 420 MovieClip Frame 98
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
var noid = (849 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
var noid = (9950 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
Symbol 420 MovieClip Frame 132
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 421 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 2
stop();
Symbol 421 MovieClip Frame 3
stop();
Symbol 421 MovieClip Frame 10
stop();
Symbol 421 MovieClip Frame 11
stop();
Symbol 421 MovieClip Frame 15
stop();
Symbol 421 MovieClip Frame 21
stop();
Symbol 421 MovieClip Frame 27
stop();
Symbol 421 MovieClip Frame 35
stop();
Symbol 421 MovieClip Frame 40
stop();
Symbol 421 MovieClip Frame 45
stop();
Instance of Symbol 264 MovieClip "healthbar" in Symbol 422 MovieClip [worm1] Frame 1
/* no clip actions */
Symbol 444 MovieClip Frame 15
stop();
this.myfill = new Color(this.zook.fill);
this.myfill.setRGB(11688218);
this.myoutline = new Color(this.zook.outline);
this.myoutline.setRGB(6693376);
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 446 MovieClip Frame 1
this.hand0fill = new Color(this.arm0.handfill);
this.hand0outline = new Color(this.arm0.handoutline);
this.arm0fill = new Color(this.arm0.fill);
this.arm0outline = new Color(this.arm0.outline);
this.hand1fill = new Color(this.arm1.handfill);
this.hand1outline = new Color(this.arm1.handoutline);
this.arm1fill = new Color(this.arm1.fill);
this.arm1outline = new Color(this.arm1.outline);
this.hand0fill.setRGB(11688218);
this.hand1fill.setRGB(11688218);
this.hand0outline.setRGB(6693376);
this.hand1outline.setRGB(6693376);
this.arm0fill.setRGB(16776960);
this.arm1fill.setRGB(16776960);
this.arm0outline.setRGB(8355584);
this.arm1outline.setRGB(8355584);
Symbol 446 MovieClip Frame 10
stop();
this.onEnterFrame = function () {
this.arm0._rotation = this._parent._parent.rot;
this.arm1._rotation = this._parent._parent.rot;
this.aimer._rotation = this._parent._parent.rot;
};
Symbol 452 MovieClip Frame 16
stop();
Symbol 470 MovieClip Frame 52
stop();
this._parent._parent.deathcomp = true;
Instance of Symbol 60 MovieClip "powerthing" in Symbol 480 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 481 MovieClip Frame 7
stop();
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 521 MovieClip Frame 25
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 521 MovieClip Frame 78
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = _root.hparray[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = _root.badhp[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
}
Symbol 521 MovieClip Frame 143
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 540 MovieClip Frame 10
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 540 MovieClip Frame 30
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 540 MovieClip Frame 90
h = _root.attachMovie("harakiri", "harakiri", 74910);
h._x = 350;
h._y = 200;
if (this._parent._parent.baddie != true) {
_root.hparray[this._parent._parent.place] = 0;
} else {
_root.badhp[this._parent._parent.place] = 0;
}
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 569 MovieClip Frame 19
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 569 MovieClip Frame 34
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
var noid = (849 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
var noid = (9950 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
}
Instance of Symbol 180 MovieClip in Symbol 569 MovieClip Frame 89
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 569 MovieClip Frame 90
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
var noid = (849 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
var noid = (9950 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
Symbol 569 MovieClip Frame 123
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 570 MovieClip Frame 1
stop();
Symbol 570 MovieClip Frame 2
stop();
Symbol 570 MovieClip Frame 3
stop();
Symbol 570 MovieClip Frame 10
stop();
Symbol 570 MovieClip Frame 11
stop();
Symbol 570 MovieClip Frame 15
stop();
Symbol 570 MovieClip Frame 20
stop();
Symbol 570 MovieClip Frame 25
stop();
Symbol 570 MovieClip Frame 30
stop();
Symbol 570 MovieClip Frame 35
stop();
Symbol 570 MovieClip Frame 40
stop();
Instance of Symbol 264 MovieClip "healthbar" in Symbol 571 MovieClip [worm2] Frame 1
/* no clip actions */
Symbol 595 MovieClip Frame 15
stop();
this.myfill = new Color(this.zook.fill);
this.myfill.setRGB(16764057);
this.myoutline = new Color(this.zook.outline);
this.myoutline.setRGB(6772760);
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 597 MovieClip Frame 1
this.hand0fill = new Color(this.arm0.handfill);
this.hand0outline = new Color(this.arm0.handoutline);
this.arm0fill = new Color(this.arm0.fill);
this.arm0outline = new Color(this.arm0.outline);
this.hand1fill = new Color(this.arm1.handfill);
this.hand1outline = new Color(this.arm1.handoutline);
this.arm1fill = new Color(this.arm1.fill);
this.arm1outline = new Color(this.arm1.outline);
this.hand0fill.setRGB(16764057);
this.hand1fill.setRGB(16764057);
this.hand0outline.setRGB(6772760);
this.hand1outline.setRGB(6772760);
this.arm0fill.setRGB(16721177);
this.arm1fill.setRGB(16721177);
this.arm0outline.setRGB(8324608);
this.arm1outline.setRGB(8324608);
Symbol 597 MovieClip Frame 10
stop();
this.onEnterFrame = function () {
this.arm0._rotation = this._parent._parent.rot;
this.arm1._rotation = this._parent._parent.rot;
this.aimer._rotation = this._parent._parent.rot;
};
Symbol 603 MovieClip Frame 16
stop();
Symbol 663 MovieClip Frame 14
stop();
Symbol 667 MovieClip Frame 139
stop();
this._parent._parent.deathcomp = true;
Instance of Symbol 60 MovieClip "powerthing" in Symbol 677 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 678 MovieClip Frame 7
stop();
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 699 MovieClip Frame 21
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 699 MovieClip Frame 81
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = _root.hparray[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = _root.badhp[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
}
Symbol 699 MovieClip Frame 143
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 720 MovieClip Frame 10
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 720 MovieClip Frame 30
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 720 MovieClip Frame 90
h = _root.attachMovie("harakiri", "harakiri", 74910);
h._x = 350;
h._y = 200;
if (this._parent._parent.baddie != true) {
_root.hparray[this._parent._parent.place] = 0;
} else {
_root.badhp[this._parent._parent.place] = 0;
}
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 752 MovieClip Frame 28
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 752 MovieClip Frame 40
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
var noid = (849 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
var noid = (9950 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
}
Instance of Symbol 180 MovieClip in Symbol 752 MovieClip Frame 99
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 752 MovieClip Frame 100
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
var noid = (849 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
var noid = (9950 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
Symbol 752 MovieClip Frame 121
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 753 MovieClip Frame 1
stop();
Symbol 753 MovieClip Frame 2
stop();
Symbol 753 MovieClip Frame 3
stop();
Symbol 753 MovieClip Frame 10
stop();
Symbol 753 MovieClip Frame 11
stop();
Symbol 753 MovieClip Frame 15
stop();
Symbol 753 MovieClip Frame 20
stop();
Symbol 753 MovieClip Frame 25
stop();
Symbol 753 MovieClip Frame 30
stop();
Symbol 753 MovieClip Frame 35
stop();
Symbol 753 MovieClip Frame 40
stop();
Symbol 753 MovieClip Frame 45
stop();
Instance of Symbol 264 MovieClip "healthbar" in Symbol 754 MovieClip [worm3] Frame 1
/* no clip actions */
Symbol 775 MovieClip Frame 15
stop();
this.myfill = new Color(this.zook.fill);
this.myfill.setRGB(16635404);
this.myoutline = new Color(this.zook.outline);
this.myoutline.setRGB(0);
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 783 MovieClip Frame 10
stop();
this.onEnterFrame = function () {
this.arm0._rotation = this._parent._parent.rot;
this.arm1._rotation = this._parent._parent.rot;
this.aimer._rotation = this._parent._parent.rot;
};
Symbol 790 MovieClip Frame 15
stop();
Symbol 802 MovieClip Frame 32
stop();
this._parent._parent.deathcomp = true;
Symbol 821 MovieClip Frame 21
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 821 MovieClip Frame 81
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = _root.hparray[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = _root.badhp[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
}
Symbol 821 MovieClip Frame 143
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 855 MovieClip Frame 10
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 855 MovieClip Frame 30
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 855 MovieClip Frame 90
h = _root.attachMovie("harakiri", "harakiri", 74910);
h._x = 350;
h._y = 200;
if (this._parent._parent.baddie != true) {
_root.hparray[this._parent._parent.place] = 0;
} else {
_root.badhp[this._parent._parent.place] = 0;
}
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Instance of Symbol 60 MovieClip "powerthing" in Symbol 864 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 865 MovieClip Frame 6
stop();
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 895 MovieClip Frame 23
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 895 MovieClip Frame 35
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
var noid = (849 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
var noid = (9950 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
}
Instance of Symbol 180 MovieClip in Symbol 895 MovieClip Frame 93
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 895 MovieClip Frame 94
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
var noid = (849 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
var noid = (9950 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
Symbol 895 MovieClip Frame 103
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 896 MovieClip Frame 1
stop();
Symbol 896 MovieClip Frame 2
stop();
Symbol 896 MovieClip Frame 3
stop();
Symbol 896 MovieClip Frame 10
stop();
Symbol 896 MovieClip Frame 11
stop();
Symbol 896 MovieClip Frame 15
stop();
Symbol 896 MovieClip Frame 20
stop();
Symbol 896 MovieClip Frame 25
stop();
Symbol 896 MovieClip Frame 30
stop();
Symbol 896 MovieClip Frame 35
stop();
Symbol 896 MovieClip Frame 40
stop();
Instance of Symbol 264 MovieClip "healthbar" in Symbol 897 MovieClip [worm4] Frame 1
/* no clip actions */
Instance of Symbol 60 MovieClip "powerthing" in Symbol 921 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 922 MovieClip Frame 15
stop();
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 930 MovieClip Frame 10
stop();
this.onEnterFrame = function () {
this.arm0._rotation = this._parent._parent.rot;
this.arm1._rotation = this._parent._parent.rot;
this.aimer._rotation = this._parent._parent.rot;
};
Symbol 937 MovieClip Frame 22
stop();
Symbol 985 MovieClip [bigsplode] Frame 16
stop();
this.unloadMovie();
Symbol 986 MovieClip Frame 75
stop();
this._parent._parent.deathcomp = true;
Instance of Symbol 60 MovieClip "powerthing" in Symbol 997 MovieClip Frame 1
onClipEvent (load) {
this._parent._parent._parent._parent.ready = true;
this._parent._parent._parent._parent.power = 0;
this.pow0._visible = false;
this.pow1._visible = false;
this.pow2._visible = false;
this.pow3._visible = false;
this.pow4._visible = false;
}
onClipEvent (enterFrame) {
if (this._parent._parent._parent._parent.power > 20) {
this.pow0._visible = true;
} else {
this.pow0._visible = false;
}
if (this._parent._parent._parent._parent.power > 40) {
this.pow1._visible = true;
} else {
this.pow1._visible = false;
}
if (this._parent._parent._parent._parent.power > 60) {
this.pow2._visible = true;
} else {
this.pow2._visible = false;
}
if (this._parent._parent._parent._parent.power > 80) {
this.pow3._visible = true;
} else {
this.pow3._visible = false;
}
if (this._parent._parent._parent._parent.power > 100) {
this.pow4._visible = true;
} else {
this.pow4._visible = false;
}
}
Symbol 998 MovieClip Frame 7
stop();
this.onEnterFrame = function () {
this.zook._rotation = this._parent._parent.rot;
};
Symbol 1018 MovieClip Frame 10
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 1018 MovieClip Frame 30
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 1018 MovieClip Frame 90
h = _root.attachMovie("harakiri", "harakiri", 74910);
h._x = 350;
h._y = 200;
if (this._parent._parent.baddie != true) {
_root.hparray[this._parent._parent.place] = 0;
} else {
_root.badhp[this._parent._parent.place] = 0;
}
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 1039 MovieClip Frame 25
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 1039 MovieClip Frame 75
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = _root.hparray[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = _root.badhp[thing.place] - 50;
thing.Xvel = (this._parent._parent._parent._xscale / 25) * 15;
thing._y = thing._y - 20;
thing.Yvel = Math.abs(thing.Xvel) * -1;
}
g++;
}
}
Symbol 1039 MovieClip Frame 143
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 1064 MovieClip Frame 17
stop();
this._parent._parent.ready = true;
Instance of Symbol 180 MovieClip in Symbol 1064 MovieClip Frame 29
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
var noid = (849 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
var noid = (9950 + thing.place);
b = _root.attachMovie("bloodgush", "bloodgush" + noid, noid);
b._xscale = thing._xscale;
b._yscale = 25;
b._x = thing.virtx;
b._y = thing.virty - 37;
}
g++;
}
}
Symbol 1064 MovieClip Frame 77
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
var noid = (849 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
var noid = (9950 + thing.place);
var tig = eval ("_root.bloodgush" + noid);
tig.unloadMovie();
g++;
}
Instance of Symbol 180 MovieClip in Symbol 1064 MovieClip Frame 77
onClipEvent (load) {
g = 0;
while (g < _root.teamarray.length) {
var thing = eval ("_root.wormy.worm" + g);
if (this.hitTest(thing)) {
_root.hparray[thing.place] = 0;
}
g++;
}
g = 0;
while (g < _root.badteam.length) {
var thing = eval ("_root.wormy.baddie" + g);
if (this.hitTest(thing)) {
_root.badhp[thing.place] = 0;
}
g++;
}
}
Symbol 1064 MovieClip Frame 98
if (_root.selectaroon.baddie != true) {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "worm" + _root.selectaroon.place, _root.selectaroon.place);
} else {
t = _root.wormy.attachMovie("worm" + _root.selectaroon.id, "baddie" + _root.selectaroon.place, _root.selectaroon.place + _root.teamarray.length);
t.baddie = true;
}
if (_root.selectaroon.dead == true) {
t.dead = true;
}
var fxdist = ((_root.selectaroon._x - _root.wormy._x) + _root.worms._x);
var fydist = ((_root.selectaroon._y - _root.wormy._y) + _root.worms._y);
t._x = fxdist;
t._y = fydist;
t._xscale = _root.selectaroon._xscale;
t._yscale = 25;
t.id = _root.selectaroon.id;
t.place = _root.selectaroon.place;
t.pointer._visible = false;
t.onEnterFrame = function () {
_root.physics(this);
};
_root.selectaroon.unloadMovie();
_root.optsDown();
_root.alignem();
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._parent._parent._x, this._parent._parent._y, goin);
_root.alignem();
Symbol 1065 MovieClip Frame 1
stop();
Symbol 1065 MovieClip Frame 2
stop();
Symbol 1065 MovieClip Frame 3
stop();
Symbol 1065 MovieClip Frame 10
stop();
Symbol 1065 MovieClip Frame 11
stop();
Symbol 1065 MovieClip Frame 15
stop();
Symbol 1065 MovieClip Frame 20
stop();
Symbol 1065 MovieClip Frame 25
stop();
Symbol 1065 MovieClip Frame 30
stop();
Symbol 1065 MovieClip Frame 35
stop();
Symbol 1065 MovieClip Frame 45
stop();
Instance of Symbol 264 MovieClip "healthbar" in Symbol 1066 MovieClip [worm5] Frame 1
/* no clip actions */
Symbol 1073 MovieClip [teambar] Frame 1
var my_color = new Color(this.barry);
my_color.setRGB(this.dacolor);
var my_outline = new Color(this.outline);
my_outline.setRGB(this.daoutline);
this.getScale = function () {
var _local3 = 0;
if (this.baddie != true) {
f = 0;
while (f < _root.hparray.length) {
_local3 = _local3 + parseInt(_root.hparray[f]);
f++;
}
var _local4 = _local3 / _root.hparray.length;
} else {
f = 0;
while (f < _root.badhp.length) {
_local3 = _local3 + parseInt(_root.badhp[f]);
f++;
}
var _local4 = _local3 / _root.badhp.length;
}
return([_local4]);
};
Instance of Symbol 1069 MovieClip "barry" in Symbol 1073 MovieClip [teambar] Frame 1
onClipEvent (enterFrame) {
t = this._parent.getScale();
this._xscale = parseInt(t);
}
Symbol 1075 MovieClip [cannonball] Frame 1
this.onEnterFrame = function () {
this.virtx = this._x + _root.bal._x;
this.virty = this._y + _root.bal._y;
_root.fg._x = _root.fg._x - this.Xvel;
_root.fg._y = _root.fg._y - this.Yvel;
_root.worms._x = _root.worms._x - this.Xvel;
_root.worms._y = _root.worms._y - this.Yvel;
this.leftside = this.virtx - (this._width / 2);
this.rightside = this.virtx + (this._width / 2);
if ((((_root.fg.hitTest(this.virtx, this.virty, true) and (!_root.maskee.hitTest(this.virtx, this.virty, true))) || (_root.wormy.hitTest(this.leftside, this.virty, true))) || (_root.wormy.hitTest(this.rightside, this.virty, true))) || (_root.fg._y < ((_root.masterht - 100) * -1))) {
this.unloadMovie();
if (_root.fg._y > ((_root.masterht - 100) * -1)) {
r = _root.bal.attachMovie("splode", "splode", _root.splodecount);
r._xscale = 110;
r._yscale = r._xscale;
r._x = this._x - this.Xvel;
r._y = this._y + this.Yvel;
_root.splodecount = _root.splodecount + 1;
t = _root.masker.attachMovie("circ", "circ" + _root.circcount, _root.circcount);
t._x = (this.virtx - this.Xvel) - _root.bal._x;
t._y = (this.virty - this.Yvel) - _root.bal._y;
t._xscale = 200;
t._yscale = t._xscale;
_root.circcount = _root.circcount + 1;
_root.proj = false;
_root.checkHit(t, 200);
}
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._x, this._y, goin);
_root.projtype = undefined;
_root.buildingopts = false;
_root.alignem();
delete this.onEnterFrame;
}
this._x = this._x + this.Xvel;
this._y = this._y + this.Yvel;
this.Xvel = this.Xvel / 1.01;
this.Yvel = this.Yvel + (_root.grav / 1.2);
_root.alignem();
};
Symbol 1081 MovieClip [nade] Frame 1
stop();
this.runsplode = function () {
this.unloadMovie();
if (_root.fg._y > ((_root.masterht - 100) * -1)) {
r = _root.bal.attachMovie("bigsplode", "bigsplode", _root.splodecount);
r._xscale = 250;
r._yscale = r._xscale;
r._x = this._x;
r._y = this._y + 40;
t = _root.masker.attachMovie("circ", "circ" + _root.circcount, _root.circcount);
t._x = (this.virtx - this.Xvel) - _root.bal._x;
t._y = (this.virty - this.Yvel) - _root.bal._y;
t._xscale = 400;
t._yscale = t._xscale;
_root.circcount = _root.circcount + 1;
_root.proj = false;
_root.checkHit(t, 300);
}
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._x, this._y, goin);
_root.projtype = undefined;
_root.buildingopts = false;
_root.alignem();
delete this.onEnterFrame;
};
this.timey = 0;
this.onEnterFrame = function () {
this.virtx = (this._x + _root.bal._x) + this.Xvel;
this.virty = (this._y + _root.bal._y) + (this.Yvel / 2);
_root.fg._x = _root.fg._x - this.Xvel;
_root.worms._x = _root.worms._x - this.Xvel;
if (this.followstop != true) {
_root.worms._y = _root.worms._y - this.Yvel;
_root.fg._y = _root.fg._y - this.Yvel;
}
this.leftside = (this.virtx - (this._width / 2)) + this.Xvel;
this.rightside = (this.virtx + (this._width / 2)) + this.Xvel;
this.topy = (this.virty - this._height) - 3;
if ((((_root.fg.hitTest(this.leftside, this.topy, true) and (!_root.maskee.hitTest(this.leftside, this.topy, true))) || (_root.fg.hitTest(this.rightside, this.topy, true) and (!_root.maskee.hitTest(this.rightside, this.topy, true)))) || (_root.wormy.hitTest(this.leftside, this.topy, true))) || (_root.wormy.hitTest(this.rightside, this.topy, true))) {
this.Xvel = this.Xvel * -0.3;
}
if (((_root.fg.hitTest(this.virtx, this.virty, true) and (!_root.maskee.hitTest(this.virtx, this.virty, true))) || (_root.wormy.hitTest(this.virtx, this.virty, true))) || (_root.wormy.hitTest(this.virtx, this.virty, true))) {
this.Xvel = this.Xvel / 1.85;
this.Yvel = this.Yvel * -0.7;
if (this.followstop != true) {
_root.fg._y = _root.fg._y - (this.Yvel * 3);
}
this.followstop = true;
var _local3 = Math.abs(this.Xvel);
if (_local3 < 0.2) {
this.Yvel = 0;
this.Xvel = 0;
}
_root.alignem();
} else {
var _local3 = Math.abs(this.Xvel);
if (_local3 > 0.4) {
this.dax = this.Xvel;
this.day = this.Yvel;
this.angle = Math.atan2(this.day, this.dax);
this.finale = (this.angle * 180) / Math.PI;
this._rotation = this.finale;
}
}
this.timey = this.timey + 1;
if (this.timey > 110) {
this.gotoAndStop("flash");
}
if ((this.timey > 135) || (_root.fg._y < ((_root.masterht - 100) * -1))) {
this.runsplode();
}
this._x = this._x + this.Xvel;
this._y = this._y + this.Yvel;
this.Xvel = this.Xvel / 1.01;
this.Yvel = this.Yvel + (_root.grav / 1.3);
_root.alignem();
};
Symbol 1081 MovieClip [nade] Frame 2
stop();
Symbol 1093 MovieClip [optionbg] Frame 1
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 2
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 3
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 4
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 5
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 6
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 7
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 8
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 9
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 10
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 11
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 12
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 13
_root.optsCenter();
Symbol 1093 MovieClip [optionbg] Frame 14
stop();
_root.optsCenter();
_root.buildingopts = false;
Instance of Symbol 1113 MovieClip in Symbol 1114 MovieClip [inst_jump] Frame 1
onClipEvent (load) {
if (((_root.artillery == true) and (_root.projtype != "none3")) and (_root.projtype != "none7")) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 1162 MovieClip [dyno] Frame 1
stop();
this.runsplode = function () {
this.unloadMovie();
if (_root.fg._y > ((_root.masterht - 100) * -1)) {
r = _root.bal.attachMovie("bigsplode", "bigsplode", _root.splodecount);
r._xscale = 400;
r._yscale = r._xscale;
r._x = this._x;
r._y = this._y + 60;
t = _root.masker.attachMovie("circ", "circ" + _root.circcount, _root.circcount);
t._x = (this.virtx - this.Xvel) - _root.bal._x;
t._y = (this.virty - this.Yvel) - _root.bal._y;
t._xscale = 700;
t._yscale = t._xscale;
_root.circcount = _root.circcount + 1;
_root.proj = false;
_root.checkHit(t, 300);
}
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._x, this._y, goin);
_root.projtype = undefined;
_root.buildingopts = false;
_root.alignem();
delete this.onEnterFrame;
};
this.timey = 0;
this.onEnterFrame = function () {
this.virtx = (this._x + _root.bal._x) + this.Xvel;
this.virty = (this._y + _root.bal._y) + (this.Yvel / 2);
_root.fg._x = _root.fg._x - this.Xvel;
_root.worms._x = _root.worms._x - this.Xvel;
if (this.followstop != true) {
_root.worms._y = _root.worms._y - this.Yvel;
_root.fg._y = _root.fg._y - this.Yvel;
}
this.leftside = (this.virtx - (this._width / 2)) + this.Xvel;
this.rightside = (this.virtx + (this._width / 2)) + this.Xvel;
this.topy = (this.virty - this._height) - 3;
if ((((_root.fg.hitTest(this.leftside, this.topy, true) and (!_root.maskee.hitTest(this.leftside, this.topy, true))) || (_root.fg.hitTest(this.rightside, this.topy, true) and (!_root.maskee.hitTest(this.rightside, this.topy, true)))) || (_root.wormy.hitTest(this.leftside, this.topy, true))) || (_root.wormy.hitTest(this.rightside, this.topy, true))) {
this.Xvel = this.Xvel * -0.3;
}
if (((_root.fg.hitTest(this.virtx, this.virty, true) and (!_root.maskee.hitTest(this.virtx, this.virty, true))) || (_root.wormy.hitTest(this.virtx, this.virty, true))) || (_root.wormy.hitTest(this.virtx, this.virty, true))) {
this.Xvel = this.Xvel / 1.85;
this.Yvel = this.Yvel * -0.7;
if (this.followstop != true) {
_root.fg._y = _root.fg._y - (this.Yvel * 3);
}
this.followstop = true;
var _local3 = Math.abs(this.Xvel);
if (_local3 < 0.2) {
this.Yvel = 0;
this.Xvel = 0;
}
_root.alignem();
} else {
var _local3 = Math.abs(this.Xvel);
if (_local3 > 0.4) {
this.dax = this.Xvel;
this.day = this.Yvel;
this.angle = Math.atan2(this.day, this.dax);
this.finale = (this.angle * 180) / Math.PI;
this._rotation = this.finale;
}
}
this.timey = this.timey + 1;
if (this.timey > 120) {
this.gotoAndStop("flash");
}
if ((this.timey > 135) || (_root.fg._y < ((_root.masterht - 100) * -1))) {
this.runsplode();
}
this._x = this._x + this.Xvel;
this._y = this._y + this.Yvel;
this.Xvel = this.Xvel / 1.01;
this.Yvel = this.Yvel + (_root.grav / 1.3);
_root.alignem();
};
Symbol 1162 MovieClip [dyno] Frame 2
stop();
Symbol 1166 MovieClip [homing] Frame 1
stop();
this.runsplode = function () {
this.unloadMovie();
if (_root.fg._y > ((_root.masterht - 100) * -1)) {
r = _root.bal.attachMovie("bigsplode", "bigsplode", _root.splodecount);
r._xscale = 250;
r._yscale = r._xscale;
r._x = this._x;
r._y = this._y + 40;
t = _root.masker.attachMovie("circ", "circ" + _root.circcount, _root.circcount);
t._x = (this.virtx - this.Xvel) - _root.bal._x;
t._y = (this.virty - this.Yvel) - _root.bal._y;
t._xscale = 400;
t._yscale = t._xscale;
_root.circcount = _root.circcount + 1;
_root.proj = false;
_root.checkHit(t, 300);
}
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._x, this._y, goin);
_root.alignem();
_root.projtype = undefined;
_root.buildingopts = false;
delete this.onEnterFrame;
};
this.timey = 0;
this.onEnterFrame = function () {
this.virtx = (this._x + _root.bal._x) + this.Xvel;
this.virty = (this._y + _root.bal._y) + this.Yvel;
this.leftside = this.virtx - (this._width / 2);
this.rightside = this.virtx + (this._width / 2);
this.topy = this.virty - this._height;
if ((((_root.fg.hitTest(this.leftside, this.virty, true) and (!_root.maskee.hitTest(this.leftside, this.virty, true))) || (_root.fg.hitTest(this.rightside, this.virty, true) and (!_root.maskee.hitTest(this.rightside, this.virty, true)))) || (_root.wormy.hitTest(this.leftside, this.virty, true))) || (_root.wormy.hitTest(this.rightside, this.virty, true))) {
this.runsplode();
}
if (this.startitup != true) {
_root.fg._x = _root.fg._x - this.Xvel;
_root.worms._x = _root.worms._x - this.Xvel;
_root.fg._y = _root.fg._y - this.Yvel;
_root.worms._y = _root.worms._y - this.Yvel;
this._x = this._x + this.Xvel;
this._y = this._y + this.Yvel;
this.Xvel = this.Xvel / 1.01;
this.Yvel = this.Yvel + (_root.grav / 1.3);
if (this.Yvel >= 0) {
this.startitup = true;
}
this.dax = this.Xvel;
this.day = this.Yvel;
} else {
var _local4 = this.gorx - this._x;
var _local5 = this.gory - this._y;
var _local6 = Math.abs(_local4);
if (_local6 < 2) {
this.runsplode();
}
this.dax = _local4;
this.day = _local5;
var _local3 = 12;
this._x = this._x + (_local4 / _local3);
this._y = this._y + (_local5 / _local3);
_root.fg._x = _root.fg._x - (_local4 / _local3);
_root.worms._x = _root.worms._x - (_local4 / _local3);
_root.fg._y = _root.fg._y - (_local5 / _local3);
_root.worms._y = _root.worms._y - (_local5 / _local3);
}
this.angle = Math.atan2(this.day, this.dax);
this.finale = (this.angle * 180) / Math.PI;
this._rotation = this.finale;
_root.alignem();
};
Symbol 1177 MovieClip [energyball] Frame 1
stop();
this.runsplode = function () {
this.unloadMovie();
if (_root.fg._y > ((_root.masterht - 100) * -1)) {
r = _root.bal.attachMovie("bigsplode", "bigsplode", _root.splodecount);
r._xscale = 390;
r._yscale = r._xscale;
r._x = this._x;
r._y = this._y + 75;
t = _root.masker.attachMovie("circ", "circ" + _root.circcount, _root.circcount);
t._x = (this.virtx - this.Xvel) - _root.bal._x;
t._y = (this.virty - this.Yvel) - _root.bal._y;
t._xscale = 600;
t._yscale = t._xscale;
_root.circcount = _root.circcount + 1;
_root.proj = false;
_root.checkHit(t, 550);
}
if (_root.masterturn == 0) {
_root.badturn = _root.badturn + 1;
if (_root.badturn == _root.badteam.length) {
_root.badturn = 0;
}
var goin = eval ("_root.wormy.baddie" + _root.badturn);
} else {
_root.teamturn = _root.teamturn + 1;
if (_root.teamturn == _root.teamarray.length) {
_root.teamturn = 0;
}
var goin = eval ("_root.wormy.worm" + _root.teamturn);
}
_root.switchTurn(this._x, this._y, goin);
_root.alignem();
delete this.onEnterFrame;
};
this.timey = 0;
this.onEnterFrame = function () {
this.virtx = (this._x + _root.bal._x) + (this.Xvel / 3);
this.virty = (this._y + _root.bal._y) + (this.Yvel / 3);
this.leftside = this.virtx - (this._width / 2);
this.rightside = this.virtx + (this._width / 2);
this.topy = this.virty - this._height;
if ((((_root.fg.hitTest(this.leftside, this.virty, true) and (!_root.maskee.hitTest(this.leftside, this.virty, true))) || (_root.fg.hitTest(this.rightside, this.virty, true) and (!_root.maskee.hitTest(this.rightside, this.virty, true)))) || (_root.wormy.hitTest(this.leftside, this.virty, true))) || (_root.wormy.hitTest(this.rightside, this.virty, true))) {
this.runsplode();
}
_root.fg._x = _root.fg._x - (this.Xvel / 3);
_root.worms._x = _root.worms._x - (this.Xvel / 3);
_root.fg._y = _root.fg._y - (this.Yvel / 3);
_root.worms._y = _root.worms._y - (this.Yvel / 3);
this._x = this._x + (this.Xvel / 3);
this._y = this._y + (this.Yvel / 3);
this.timey = this.timey + 1;
if (this.timey >= 120) {
this.gotoAndStop("flash");
}
if (this.timey > 150) {
this.runsplode();
}
_root.alignem();
};
Symbol 1197 Button
on (release) {
_root.gotoAndStop(3);
this._parent.gotoAndPlay("collapse");
_root.clearlvl();
}
Symbol 1202 Button
on (release) {
_root.gotoAndStop(4);
this._parent.gotoAndPlay("collapse");
_root.clearlvl();
}
Symbol 1207 Button
on (release) {
_root.gotoAndStop(2);
this._parent.gotoAndPlay("collapse");
_root.clearlvl();
}
Symbol 1213 MovieClip [endtran0] Frame 1
this.thingy.secret._visible = false;
if (_root.youwon == true) {
this.thingy.win1._visible = true;
this.thingy.win2._visible = false;
if (_root.mylev == 0) {
if (_root.savedstuff.data.maxlvl < 1) {
_root.savedstuff.data.maxlvl = 1;
}
}
if (_root.mylev == 1) {
if (_root.savedstuff.data.maxlvl < 2) {
_root.savedstuff.data.maxlvl = 2;
}
}
if (_root.mylev == 2) {
if (_root.savedstuff.data.maxlvl < 3) {
_root.savedstuff.data.maxlvl = 3;
}
}
if (_root.mylev == 3) {
if (_root.savedstuff.data.maxlvl < 4) {
_root.savedstuff.data.maxlvl = 4;
}
_root.alienunlocked = true;
this.thingy.secret._visible = true;
}
if ((_root.mylev == 0) and (_root.artillery == true)) {
if (_root.savedstuff.data.maxlvl < 5) {
_root.savedstuff.data.maxlvl = 5;
}
}
if ((_root.mylev == 1) and (_root.artillery == true)) {
if (_root.savedstuff.data.maxlvl < 6) {
_root.savedstuff.data.maxlvl = 6;
}
}
if ((_root.mylev == 2) and (_root.artillery == true)) {
if (_root.savedstuff.data.maxlvl < 7) {
_root.savedstuff.data.maxlvl = 7;
}
}
if ((_root.mylev == 3) and (_root.artillery == true)) {
if (_root.savedstuff.data.maxlvl < 8) {
_root.savedstuff.data.maxlvl = 8;
}
_root.skullunlocked = true;
this.thingy.secret._visible = true;
}
} else {
this.win.team2._visible = true;
this.win.team1._visible = false;
}
Symbol 1213 MovieClip [endtran0] Frame 16
stop();
Symbol 1213 MovieClip [endtran0] Frame 26
this.unloadMovie();
this.removeMovieClip();
Symbol 1218 MovieClip [pauser] Frame 15
stop();
Symbol 1218 MovieClip [pauser] Frame 28
this.unloadMovie();
this.removeMovieClip();
Symbol 1221 MovieClip [harakiri] Frame 55
stop();
this.unloadMovie();
this.removeMovieClip();
Symbol 1226 MovieClip [explain] Frame 157
this.unloadMovie();
this.removeMovieClip();
Symbol 1227 Button
on (release) {
_root.gotoAndStop(2);
_root.clearlvl();
}
Instance of Symbol 1254 MovieClip in Symbol 1256 MovieClip Frame 1
onClipEvent (enterFrame) {
var t0 = _root.getBytesLoaded();
var t1 = _root.getBytesTotal();
this._parent.perc = (t0 / t1) * 100;
this._xscale = this._parent.perc;
}
Symbol 1260 Button
on (release) {
_root.gotoAndStop(2);
}
Instance of Symbol 1256 MovieClip in Symbol 1269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.perc >= 100) {
this._visible = false;
this._parent.doit._visible = true;
delete this.onEnterFrame;
delete this._parent.onEnterFrame;
}
}
Instance of Symbol 1263 MovieClip "doit" in Symbol 1269 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 1269 MovieClip Frame 42
stop();
Symbol 1279 Button
on (press) {
_root.compai = true;
_root.gotoAndStop(3);
}
Symbol 1283 Button
on (press) {
_root.compai = false;
_root.gotoAndStop(3);
}
Symbol 1287 Button
on (press) {
_root.gotoAndPlay("credits");
}
Symbol 1290 MovieClip Frame 31
stop();
Symbol 1303 Button
on (release) {
var checkit0 = false;
var checkit1 = false;
trace("team array is: " + _root.teamarray);
h = 0;
while (h < 4) {
if (_root.teamarray[h] != undefined) {
checkit0 = true;
}
h++;
}
h = 0;
while (h < 4) {
if (_root.badteam[h] != undefined) {
checkit1 = true;
}
h++;
}
if ((checkit0 == true) and (checkit1 == true)) {
_root.gotoAndPlay(4);
} else {
trace("choose at least one person!");
e = _root.attachMovie("explain", "explain", 777891);
e._x = 350;
e._y = 200;
e.holder.msg = "Choose at least one player for each team!";
}
_root.freshWep();
}
Symbol 1310 Button
on (release) {
_root.teamarray = new Array();
_root.badteam = new Array();
_root.gotoAndStop(2);
}
Symbol 1331 Button
on (release) {
_root.teamarray = new Array();
_root.badteam = new Array();
_root.gotoAndStop(2);
}
Symbol 1340 Button
on (release) {
getURL ("http://www.bomtoons.com", _blank);
}
Symbol 1341 Button
on (release) {
_root.gotoAndStop(2);
}