Combined Code
movieClip 18 {
}
instance of movieClip 18 {
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
this._xscale = 1500 * (_root.getBytesLoaded() / _root.getBytesTotal());
} else {
_root.play();
}
_parent.loadtext = 'Loading... ' + Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 1000) / 10 + ' Percent';
}
}
// unknown tag 88 length 63
frame 3 {
function colorize(obje, passr, passg, passb, passa) {
tempc = new Color(eval(obje));
tempc = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
tempc.rb = passr;
tempc.gb = passg;
tempc.bb = passb;
tempc.ab = passa;
(eval(obje)).Acolor = tempc;
(eval(obje)).Ccolor = new Color(eval(obje));
(eval(obje)).Ccolor.setTransform((eval(obje)).Acolor);
}
GLOBAL_PLAYERGRAPHIC = 1;
}
movieClip 21 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 36 {
frame 1 {
stop();
}
}
movieClip 41 {
}
movieClip 43 {
}
movieClip 45 {
}
movieClip 47 {
}
movieClip 50 {
}
movieClip 52 {
frame 1 {
stop();
}
}
movieClip 55 {
}
movieClip 57 {
frame 1 {
function setbarvalue(v) {
if (v < 0) {
v = 0;
}
colorv = int(v / 64);
if (colorv == 0) {
_root.colorize(bar, 0, 200, 0, 0);
_root.colorize(nextcolor, 0, 0, 0, 0);
} else {
if (colorv == 1) {
_root.colorize(bar, 200, 200, 0, 0);
_root.colorize(nextcolor, 0, 200, 0, 0);
} else {
if (colorv == 2) {
_root.colorize(bar, 255, 128, 0, 0);
_root.colorize(nextcolor, 200, 200, 0, 0);
} else {
if (colorv == 3) {
_root.colorize(bar, 200, 0, 0, 0);
_root.colorize(nextcolor, 255, 128, 0, 0);
} else {
if (colorv == 4) {
_root.colorize(bar, 200, 200, 200, 0);
_root.colorize(nextcolor, 200, 0, 0, 0);
} else {
_root.colorize(bar, 200, 200, 200, 0);
_root.colorize(nextcolor, 50, 50, 50, 0);
}
}
}
}
}
v %= 64;
bar._yscale = v / 0.64;
}
}
frame 2 {
stop();
}
}
movieClip 58 {
}
movieClip 60 {
}
movieClip 63 {
frame 10 {
stop();
}
}
button 64 {
on (press) {
var xp = hpslider._xmouse;
var yp = hpslider._ymouse;
var xs = hpslider._width;
var ys = hpslider._height;
var factor = Math.abs(yp) / xs;
factor = (factor - 0.1) / 0.8;
_parent.controller.setPlayerHP(factor * 63);
}
}
button 65 {
on (press) {
emptygrid.drawnyet = undefined;
emptygrid.selectnext = selectf;
_parent.controller.pickEnemy(0);
_parent.controller.resetPlayer();
}
}
// unknown tag 88 length 76
button 68 {
on (press) {
var ncols = blockColumns;
var xmf = (_xmouse - -148) / 148;
var ymf = (_ymouse - -120) / 36;
if (xmf > 1) {
xmf = 1;
}
if (xmf < 0) {
xmf = 0;
}
if (ymf > 1) {
ymf = 1;
}
if (ymf < 0) {
ymf = 0;
}
var selectmax = _parent.controller.GLOBAL_MAXENEMYFRAMES;
var selectmax4 = Math.floor(selectmax / ncols);
if (selectmax4 > 0) {
while (selectmax > selectmax4 * ncols) {
selectmax4 += 1;
}
}
var selectf = xmf * selectmax4;
var naxy = 1 / ncols;
while (ymf > naxy) {
selectf += selectmax4;
naxy += 1 / ncols;
}
selectf = Math.floor(selectf);
selectf += 1;
emptygrid.drawnyet = undefined;
emptygrid.selectnext = selectf;
var maxe = selectf;
_parent.controller.pickEnemy(maxe);
_parent.controller.resetPlayer();
}
}
// unknown tag 88 length 36
button 72 {
on (press) {
var parc = _parent.controller;
parc.setPlayerGraphic(parc.getPlayerGraphic() + 1);
}
}
button 76 {
on (press) {
_parent.controller.resetPlayer();
}
}
button 83 {
on (release, releaseOutside) {
mousedown = 0;
}
on (press) {
mousedown = 1;
}
}
movieClip 85 {
instance sldbak of movieClip 60 {
onClipEvent (enterFrame) {
_parent.Mx = _xmouse;
_parent.My = _ymouse;
}
}
}
movieClip 89 {
}
movieClip 93 {
}
movieClip 97 {
}
button 99 {
on (press) {
var parc = _parent.controller;
parc.GLOBAL_TRUEPAUSE = !parc.GLOBAL_TRUEPAUSE;
}
}
button 101 {
on (press) {
var parc = _parent.controller;
parc.toggleSlowMode();
}
}
button 102 {
on (press) {
var parc = _parent.controller;
parc.toggleQuality();
}
}
button 106 {
on (press) {
gotoAndStop('nogui');
}
}
button 107 {
on (release, releaseOutside) {
_parent.controller.guiTextScroll = 0;
}
on (press) {
_parent.controller.guiTextScroll = 1;
}
}
button 108 {
on (press) {
gotoAndStop('debuggui');
}
}
button 112 {
on (press) {
gotoAndStop('game');
}
}
movieClip 118 {
frame 1 {
function updateCallback() {}
function camControl() {
parentColor.setTransform(camColor.getTransform());
var v4 = sX / (fixX * this._xscale / 100);
var v3 = sY / (fixY * this._yscale / 100);
_parent._x = cX - this._x * v4;
_parent._y = cY - this._y * v3;
_parent._xscale = 100 * v4;
_parent._yscale = 100 * v3;
mouseX = _xmouse;
mouseY = _ymouse;
updateCallback();
}
function resetStage() {
var v2 = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
parentColor.setTransform(v2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
_xscale = 100;
_yscale = 100;
_x = fixX / 2;
_y = fixY / 2;
}
parentColor.setTransform(camColor.getTransform());
this.stop();
var oldMode = Stage.scaleMode;
Stage.scaleMode = 'exactFit';
var cX = Stage.width / 2;
var cY = Stage.height / 2;
var sX = Stage.width;
var sY = Stage.height;
var fixX = 320;
var fixY = 240;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
}
frame 4 {
function getCellCoords(idex, selectmax4, delx, dern, ncolumns) {
if (dern == undefined) {
dern = 1;
}
if (idex == undefined) {
idex = 0;
}
if (idex < 0) {
idex = 0;
}
if (idex > 1024) {
idex = 0;
}
var v3 = 0;
while (idex >= selectmax4) {
idex -= selectmax4;
++v3;
}
var v4 = new Object();
v4.xMin = idex * delx + dern;
v4.xMax = idex * delx + delx - dern;
v4.yMin = v3 * 36 / ncolumns + dern;
v4.yMax = v3 * 36 / ncolumns + 36 / ncolumns - dern;
return v4;
}
function drawCell(M, idex, selectmax4, delx, color, dern, ncolumns) {
var v1 = getCellCoords(idex, selectmax4, delx, dern, ncolumns);
M.lineStyle(0, 0);
M.beginFill(color, 100);
M.moveTo(v1.xMin, v1.yMin);
M.lineTo(v1.xMax, v1.yMin);
M.lineTo(v1.xMax, v1.yMax);
M.lineTo(v1.xMin, v1.yMax);
M.lineTo(v1.xMin, v1.yMin);
M.endFill();
}
function drawCellBits(M, bits, idex, selectmax4, delx, color, dern, ncolumns) {
var v2 = getCellCoords(idex, selectmax4, delx, dern, ncolumns);
var v4 = (v2.xMin + v2.xMax) / 2;
var v3 = (v2.yMin + v2.yMax) / 2;
if (bits & 1) {
M.lineStyle(0, 0);
M.beginFill(color, 100);
M.moveTo(v2.xMin, v2.yMin);
M.lineTo(v4, v2.yMin);
M.lineTo(v4, v3);
M.lineTo(v2.xMin, v3);
M.lineTo(v2.xMin, v2.yMin);
M.endFill();
}
if (bits & 2) {
M.lineStyle(0, 0);
M.beginFill(color, 100);
M.moveTo(v4, v2.yMin);
M.lineTo(v2.xMax, v2.yMin);
M.lineTo(v2.xMax, v3);
M.lineTo(v4, v3);
M.lineTo(v4, v2.yMin);
M.endFill();
}
if (bits & 4) {
M.lineStyle(0, 0);
M.beginFill(color, 100);
M.moveTo(v2.xMin, v3);
M.lineTo(v4, v3);
M.lineTo(v4, v2.yMax);
M.lineTo(v2.xMin, v2.yMax);
M.lineTo(v2.xMin, v3);
M.endFill();
}
if (bits & 8) {
M.lineStyle(0, 0);
M.beginFill(color, 100);
M.moveTo(v4, v3);
M.lineTo(v2.xMax, v3);
M.lineTo(v2.xMax, v2.yMax);
M.lineTo(v4, v2.yMax);
M.lineTo(v4, v3);
M.endFill();
}
if (bits & 16) {
var v6 = v4 - v4 / 2;
var v5 = v3 - v3 / 2;
M.lineStyle(0, 0);
M.beginFill(color, 100);
M.moveTo(v4 - v6, v3 - v5);
M.lineTo(v4 + v6, v3 - v5);
M.lineTo(v4 + v6, v3 + v5);
M.lineTo(v4 - v6, v3 + v5);
M.lineTo(v4 - v6, v3 - v5);
M.endFill();
}
}
function drawCellX(M, idex, selectmax4, delx, color, dern, ncolumns) {
var v1 = getCellCoords(idex, selectmax4, delx, dern, ncolumns);
M.lineStyle(0.5, color, 100);
M.beginFill(0, 0);
M.moveTo(v1.xMin, v1.yMin);
M.lineTo(v1.xMax, v1.yMax);
M.moveTo(v1.xMax, v1.yMin);
M.lineTo(v1.xMin, v1.yMax);
M.endFill();
}
function drawCellChar(M, uchar, idex, selectmax4, delx, color, dern, ncolumns) {
var v1 = getCellCoords(idex, selectmax4, delx, dern, ncolumns);
M.lineStyle(0.5, color, 100);
M.beginFill(0, 0);
var v5 = (v1.xMin + v1.xMax) / 2;
var v4 = (v1.yMin + v1.yMax) / 2;
if (char8segmap.hasOwnProperty(uchar)) {
var v3 = char8segmap[uchar];
if (v3 & 1) {
M.moveTo(v1.xMin, v1.yMin);
M.lineTo(v1.xMax, v1.yMin);
}
if (v3 & 2) {
M.moveTo(v1.xMin, v1.yMin);
M.lineTo(v1.xMin, v4);
}
if (v3 & 4) {
M.moveTo(v1.xMin, v4);
M.lineTo(v1.xMax, v4);
}
if (v3 & 8) {
M.moveTo(v1.xMax, v1.yMin);
M.lineTo(v1.xMax, v4);
}
if (v3 & 16) {
M.moveTo(v1.xMin, v4);
M.lineTo(v1.xMin, v1.yMax);
}
if (v3 & 32) {
M.moveTo(v1.xMin, v1.yMax);
M.lineTo(v1.xMax, v1.yMax);
}
if (v3 & 64) {
M.moveTo(v1.xMax, v4);
M.lineTo(v1.xMax, v1.yMax);
}
}
M.endFill();
}
function gridSelectFrom(max, may) {}
function updateCallback() {
var v3 = blockColumns;
if (emptygrid != undefined) {
if (emptygrid.drawnyet == undefined || emptygrid.selectnext != emptygrid.selectprev) {
var v8 = _parent.controller.GLOBAL_MAXENEMYFRAMES;
var v4 = Math.floor(v8 / v3);
if (v4 > 0) {
while (v8 > v4 * v3) {
v4 += 1;
}
}
var v2 = emptygrid;
v2.clear();
var v7 = 148 / v4;
v2.lineStyle(0.5, 4210752);
v2.beginFill(0, 0);
var v5 = v7;
while (v5 < 148) {
v2.moveTo(v5, 0);
v2.lineTo(v5, 36);
v5 += v7;
}
v5 = 1 / 1 * v3;
while (v5 < 1) {
v2.moveTo(0, v5 * 36);
v2.lineTo(148, v5 * 36);
v5 += 1 / 1 * v3;
}
v2.endFill();
emptygrid.drawnyet = true;
emptygrid.lastselectedenemy = 0;
drawCellX(v2, 0, v4, v7, 8388608, 1, v3);
colorlist = new Array();
colorlist.push(4194304);
colorlist.push(4202496);
colorlist.push(4210688);
colorlist.push(16448);
colorlist.push(64);
colorlist.push(4194368);
var v10 = _parent.controller.GLOBAL_ENEMY_DATA;
var v6 = 1;
while (v6 < v8) {
var v9 = v6 / colorlist.length & 15;
drawCellBits(v2, v9, v6 - 1, v4, v7, colorlist[v6 % colorlist.length], 2, v3);
++v6;
}
v6 = v8;
while (v6 < v3 * v4) {
drawCellX(v2, v6, v4, v7, 8388608, 1, v3);
++v6;
}
drawCell(v2, _parent.controller.GLOBAL_ENEMY._currentframe - 1, v4, v7, 32768, 1, v3);
emptygrid.selectprev = emptygrid.selectnext;
}
}
}
var blockX = 16;
var blockY = 0;
var blockWidth = 128;
var blockHeight = 36;
var blockColumns = 5;
char8segmap = new Object();
char8segmap.0 = 91;
char8segmap.1 = 72;
char8segmap.2 = 61;
char8segmap.3 = 109;
char8segmap.4 = 78;
char8segmap.5 = 103;
char8segmap.6 = 119;
char8segmap.7 = 73;
char8segmap.8 = 127;
char8segmap.9 = 79;
char8segmap.A = 95;
char8segmap.B = 118;
char8segmap.C = 52;
char8segmap.D = 124;
char8segmap.E = 55;
char8segmap.F = 23;
char8segmap.G = 115;
char8segmap.H = 94;
char8segmap.I = 64;
char8segmap.J = 120;
char8segmap.K = 30;
char8segmap.L = 50;
char8segmap.M = 92;
char8segmap.N = 84;
char8segmap.O = 116;
char8segmap.P = 31;
char8segmap.Q = 27;
char8segmap.R = 20;
char8segmap.S = 103;
char8segmap.T = 19;
char8segmap.U = 122;
char8segmap.V = 112;
char8segmap.W = 14;
char8segmap.X = 94;
char8segmap.Y = 78;
char8segmap.Z = 28;
}
frame 10 {
function updateCallback() {}
}
frame 16 {
function updateCallback() {}
exturl = _root.externalURL;
}
}
frame 4 {
flashTraceFilters = function (mc) {
var v2 = mc.filters;
for (var v4 in v2) {
var v1 = v2[v4];
trace('Filter: ' + typeof v1 + ' ' + v4);
for (var v3 in v1) {
trace('\t' + v3 + ': ' + v1[v3]);
}
if (v1 instanceof flash.filters.GradientBevelFilter) {
scode = '';
scode += 'new flash.filters.GradientBevelFilter( ';
scode += v1.distance + ', ';
scode += v1.angle + ', ';
scode += 'Array(' + v1.colors + '), ';
scode += 'Array(' + v1.alphas + '), ';
scode += 'Array(' + v1.ratios + '), ';
scode += v1.blurX + ', ';
scode += v1.blurY + ', ';
scode += v1.strength + ', ';
scode += v1.quality + ', ';
scode += '"' + v1.type + '", ';
scode += v1.knockout;
scode += ' )';
trace(scode);
}
}
};
flashApplyFilter = function (MC, filtobject) {
var v1 = [];
v1.push(filtobject);
MC.filters = v1;
};
flashApplyFilters = function (MC, filtlist) {
var v2 = [];
for (obj in filtlist) {
v2.push(filtlist[obj]);
}
MC.filters = v2;
};
flashColorize = function (obj, r, g, b, al) {
var v2 = new flash.geom.Transform(obj);
if (al == undefined) {
al = 1;
}
var v1 = new flash.geom.ColorTransform(r, g, b, al, 0, 0, 0, 0);
v2.colorTransform = v1;
return v1;
};
onEnterFrame = function () {
gamescore = 'Score: ' + minigame.entertainor.gGameScore;
};
stop();
}
movieClip 120 {
}
movieClip 129 {
frame 1 {
stop();
}
frame 8 {
removeMovieClip(this);
_parent.removeMovieClip(this);
}
}
movieClip 130 {
instance entertainor of movieClip 120 {
onClipEvent (load) {
function FireOrange(x, y) {
if (gActiveOranges < 16) {
var newname = 'ong_' + gGarbageClipCurr;
gGarbageClip.duplicateMovieClip(newname, gGarbageClipCurr + 1024);
var clip = eval('_parent.' + newname);
clip._x = x;
clip._y = y;
clip._xvel = Math.random() * 32 - 16;
clip._yvel = Math.random() * 32 - 16;
clip._xscale = 12 + Math.random() * 12;
clip._yscale = clip._xscale;
delmc._rotation = 0;
clip.destroy = false;
clip.gotoAndStop(1);
++gGarbageClipCurr;
if (gGarbageClipCurr > 256) {
gGarbageClipCurr = 0;
}
gGarbageClips.push(clip);
++gActiveOranges;
}
}
var gGarbageClip = _parent.dup_orange;
var gGarbageClipCurr = 0;
var gGarbageClips = [];
var gMouseState = 0;
var gMouseXPrev = 0;
var gMouseYPrev = 0;
var gTimer = 5;
var gFieldWidth = 1000;
var gFieldHeight = 700;
var gActiveOranges = 0;
var gGameScore = 0;
}
onClipEvent (enterFrame) {
gTimer += 1;
if (gTimer > 5) {
FireOrange(Math.random() * gFieldWidth, Math.random() * gFieldHeight);
gTimer = 0;
}
var remarray = [];
var hitany = 0;
var clickany = 0;
var i = 0;
var imax = gGarbageClips.length;
while (i < imax) {
var mc = gGarbageClips[i];
if (gMouseState) {
var dx = _parent._xmouse - mc._x;
var dy = _parent._ymouse - mc._y;
var dm = dx * dx + dy * dy;
if (dm < mc._xscale * mc._xscale) {
remarray.push(i);
hitany += 1;
}
clickany += 1;
}
mc._yvel += 0.327;
mc._y += mc._yvel;
mc._x += mc._xvel;
if (mc._x < 0) {
mc._x = -mc._x;
mc._xvel = -mc._xvel;
} else {
if (mc._x > gFieldWidth) {
mc._x = gFieldWidth + (gFieldWidth - mc._x);
mc._xvel = -mc._xvel;
}
}
if (mc._y < 0) {
mc._y = -mc._y;
mc._yvel = -mc._yvel;
} else {
if (mc._y > gFieldHeight) {
mc._y = gFieldHeight + (gFieldHeight - mc._y);
mc._yvel = -mc._yvel;
}
}
++i;
}
if (clickany) {
if (hitany == 0) {
gGameScore -= 1;
if (gGameScore < 0) {
gGameScore = 0;
}
} else {}
}
var r = 0;
var rcount = 0;
var rmax = remarray.length;
while (r < rmax) {
var delmc = gGarbageClips[remarray[r] - rcount];
gGameScore += Math.floor(delmc._xscale) - 11;
delmc.play();
delmc._rotation = Math.random() * 360;
gGarbageClips.splice(remarray[r] - rcount, 1);
--gActiveOranges;
++rcount;
++r;
}
gMouseXPrev = _parent._xmouse;
gMouseYPrev = _parent._ymouse;
}
onClipEvent (mouseDown) {
gMouseState += 1;
}
onClipEvent (mouseUp) {
gMouseState = 0;
}
}
}
button 139 {
on (release) {
_root.externalURL = exturl;
play();
}
}
movieClip 146 {
frame 5 {
stop();
}
}
// unknown tag 88 length 79
// unknown tag 88 length 50
frame 6 {
stop();
}
movieClip 165 {
}
movieClip 167 {
}
movieClip 170 {
frame 1 {
stop();
}
}
movieClip 172 {
}
movieClip 174 {
}
movieClip 176 {
}
movieClip 178 {
}
movieClip 182 {
}
movieClip 184 {
}
movieClip 194 {
}
movieClip 199 {
}
movieClip 201 {
}
movieClip 205 {
frame 1 {
gotoAndStop(_root.GLOBAL_WEAPON_TYPE);
stop();
}
frame 2 {
gotoAndStop(_root.GLOBAL_WEAPON_TYPE);
stop();
}
frame 3 {
gotoAndStop(_root.GLOBAL_WEAPON_TYPE);
stop();
}
frame 4 {
gotoAndStop(_root.GLOBAL_WEAPON_TYPE);
stop();
}
}
movieClip 206 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 9 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 208 {
}
movieClip 210 {
}
movieClip 212 {
}
movieClip 214 {
}
movieClip 216 {
}
movieClip 218 {
}
movieClip 220 {
}
movieClip 221 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
head2._visible = false;
}
};
}
instance head2 of movieClip 218 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
instance head of movieClip 220 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
frame 32 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 223 {
}
movieClip 225 {
}
movieClip 237 {
frame 1 {
stop();
}
}
movieClip 238 {
}
movieClip 240 {
}
movieClip 242 {
}
movieClip 246 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 30 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 277 {
frame 1 {
stop();
}
}
movieClip 278 {
}
movieClip 288 {
frame 25 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 289 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 290 {
}
movieClip 292 {
}
movieClip 294 {
}
movieClip 296 {
}
movieClip 297 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 12 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('walk');
}
}
movieClip 299 {
}
movieClip 301 {
}
movieClip 302 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
head2._visible = false;
}
};
}
instance head2 of movieClip 218 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
instance head of movieClip 220 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
frame 20 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('walk');
}
}
movieClip 312 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 17 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('walk');
}
}
movieClip 335 {
frame 25 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('walk');
}
}
movieClip 336 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 338 {
}
movieClip 340 {
}
movieClip 342 {
}
movieClip 343 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 13 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 344 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
head2._visible = false;
}
};
}
instance head2 of movieClip 218 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
instance head of movieClip 220 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
frame 13 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 348 {
}
movieClip 350 {
}
movieClip 353 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 12 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 359 {
}
movieClip 360 {
}
movieClip 371 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
}
};
}
frame 13 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 372 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 374 {
}
movieClip 376 {
}
movieClip 377 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 14 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 379 {
}
movieClip 381 {
}
movieClip 382 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
head2._visible = false;
}
};
}
instance head2 of movieClip 218 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
instance head of movieClip 220 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
frame 14 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 387 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 10 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 398 {
frame 11 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 399 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 401 {
}
movieClip 403 {
}
movieClip 405 {
}
movieClip 406 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 13 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 407 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
head2._visible = false;
}
};
}
instance head2 of movieClip 218 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
instance head of movieClip 220 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
frame 13 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 411 {
}
movieClip 413 {
}
movieClip 416 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 16 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 432 {
frame 13 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 433 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 435 {
}
movieClip 436 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 15 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 437 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
head2._visible = false;
}
};
}
instance head2 of movieClip 218 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
instance head of movieClip 220 {
onClipEvent (load) {
if (!_root.GLOBAL_PLAYERHEAD) {
_visible = false;
}
}
}
frame 15 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 444 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 15 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 460 {
frame 15 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 461 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 463 {
}
movieClip 465 {
}
movieClip 466 {
}
movieClip 468 {
}
movieClip 471 {
}
movieClip 472 {
}
movieClip 474 {
}
movieClip 475 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 476 {
}
movieClip 477 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 5 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 479 {
frame 1 {
stop();
}
}
movieClip 480 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
head2._visible = false;
}
};
}
frame 7 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 482 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 7 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 488 {
frame 5 {
_parent._parent.s_ended = 1;
_parent._parent.gotoAndStop('idle');
}
}
movieClip 489 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 490 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 20 {
stop();
}
}
movieClip 491 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
head2._visible = false;
}
};
}
frame 14 {
stop();
}
}
movieClip 497 {
frame 1 {
onEnterFrame = function () {
if (!_root.GLOBAL_PLAYERHEAD) {
head._visible = false;
}
};
}
frame 15 {
stop();
}
}
movieClip 498 {
frame 13 {
stop();
}
}
movieClip 499 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 500 {
frame 1 {
stop();
nextFrame();
}
frame 2 {
s_idle = 1;
s_moving = 0;
s_attacking = 0;
s_hit = 0;
s_animbusy = 0;
s_vx = 0;
s_decidedanim = 'idle';
}
frame 6 {
gotoAndStop('idle');
}
frame 7 {
s_idle = 0;
s_moving = 4;
s_attacking = 0;
s_hit = 0;
s_animbusy = 0;
s_decidedanim = 'walk';
}
frame 12 {
gotoAndStop('idle');
}
frame 13 {
s_idle = 0;
s_moving = 8;
s_attacking = 0;
s_hit = 0;
s_animbusy = 0;
s_decidedanim = 'run';
}
frame 17 {
gotoAndStop('idle');
}
frame 18 {
s_animbusy = 1;
s_decidedanim = 'turn';
}
frame 22 {
gotoAndStop('idle');
}
frame 23 {
s_idle = 0;
s_moving = 0;
s_attacking = 1;
s_hit = 0;
s_animbusy = 1;
s_atktype = 2;
s_decidedanim = 'atkh';
}
frame 28 {
gotoAndStop('idle');
}
frame 29 {
s_idle = 0;
s_moving = 0;
s_attacking = 1;
s_hit = 0;
s_animbusy = 1;
s_atktype = 1;
s_decidedanim = 'atkm';
}
frame 34 {
gotoAndStop('idle');
}
frame 35 {
s_idle = 0;
s_moving = 0;
s_attacking = 1;
s_hit = 0;
s_animbusy = 1;
s_atktype = 0;
s_decidedanim = 'atkl';
}
frame 39 {
gotoAndStop('idle');
}
frame 41 {
s_idle = 0;
s_moving = 0;
s_attacking = 1;
s_hit = 0;
s_animbusy = 1;
s_atktype = 4;
s_decidedanim = 'atkp';
}
frame 45 {
gotoAndStop('idle');
}
frame 46 {
s_idle = 0;
s_moving = 0;
s_attacking = 0;
s_hit = 1;
s_animbusy = 1;
s_vx = 6;
s_decidedanim = 'hith';
}
frame 50 {
gotoAndStop('idle');
}
frame 51 {
s_idle = 0;
s_moving = 0;
s_attacking = 0;
s_hit = 1;
s_animbusy = 1;
s_vx = 4;
s_decidedanim = 'hitm';
}
frame 55 {
gotoAndStop('idle');
}
frame 56 {
s_idle = 0;
s_moving = 0;
s_attacking = 0;
s_hit = 1;
s_animbusy = 1;
s_vx = 2;
s_decidedanim = 'hitl';
}
frame 60 {
gotoAndStop('idle');
}
frame 61 {
s_idle = 0;
s_moving = 0;
s_attacking = 0;
s_hit = 1;
s_animbusy = 1;
s_vx = 0;
s_decidedanim = 'death';
}
frame 74 {
s_idle = 0;
s_moving = 0;
s_attacking = 0;
s_hit = 1;
s_animbusy = 1;
hp = 0;
s_decidedanim = 'dead';
}
frame 79 {
stop();
}
frame 81 {
s_decidedanim = 'blank';
}
frame 85 {
gotoAndStop('blank');
}
}
movieClip 501 {
}
movieClip 549 {
}
movieClip 550 {
}
movieClip 552 {
}
movieClip 640 {
}
movieClip 642 {
}
movieClip 644 {
}
movieClip 646 {
}
movieClip 647 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 649 {
}
movieClip 650 {
}
movieClip 652 {
}
movieClip 654 {
}
movieClip 655 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 657 {
}
movieClip 659 {
}
movieClip 661 {
}
movieClip 663 {
}
movieClip 664 {
frame 1 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 2 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 3 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
frame 4 {
gotoAndStop(_root.GLOBAL_PLAYERGRAPHIC);
}
}
movieClip 667 {
}
movieClip 682 {
frame 20 {
goandplay(1);
}
}
movieClip 755 {
frame 1 {
onEnterFrame = function () {
if (_parent.G != undefined) {
if (!_parent.G.isPaused()) {
if (_parent.animstruct != undefined) {
_parent.G.handleBasicStruggle(_parent, _parent.animstruct);
} else {
_parent.G.handleBasicStruggle(_parent);
}
}
}
};
}
}
movieClip 796 {
}
// unknown tag 88 length 96
movieClip 799 {
frame 18 {
G.goPlay(this, 'dfst');
}
}
movieClip 800 {
instance danger of movieClip 799 {
}
}
movieClip 807 {
frame 102 {
gotoAndPlay('yoda');
}
}
movieClip 930 {
frame 1 {
G.actIdle(this);
head.eye.gotoAndStop('normal');
if (G.manualReset(this)) {
G.setScaleValue(100);
G.setName('Najarala');
G.setStatus('WingSnakeWyvern');
G.setCredit('');
G.setHAtk(6);
G.setMAtk(7);
G.setLAtk(6);
G.setHDef(5);
G.setMDef(6);
G.setLDef(7);
G.setMaxHP(200);
G.setHP(200);
G.enemySetAttackHistogram(3, 2, 1);
}
}
frame 32 {
G.goPlay(this, 'idle');
}
frame 34 {
G.actMove(this, 3);
if (G.enemyFacingLeft()) {
txttesst._xscale = -100;
texttesst.txttest.text = 'aaaa';
}
}
frame 62 {
G.goPlay(this, 'walk');
}
frame 64 {
G.actHurt(this, 0);
G.endDigestion(this);
G.unconsumePlayer(this, 50);
G.actUnbusy();
head.eye.gotoAndStop('damage');
}
frame 120 {
G.actHurt(this, 0);
}
frame 127 {
G.goPlay(this, 'dead');
}
frame 129 {
G.actHurt(this, 0);
G.endDigestion(this);
head.eye.gotoAndStop('damage');
}
frame 137 {
G.goPlay(this, 'idle');
}
frame 139 {
G.actHurt(this, 0);
G.endDigestion(this);
head.eye.gotoAndStop('damage');
}
frame 147 {
G.goPlay(this, 'idle');
}
frame 149 {
G.actHurt(this, 0);
G.endDigestion(this);
head.eye.gotoAndStop('damage');
}
frame 157 {
G.goPlay(this, 'idle');
}
frame 159 {
G.actAttack(this, G.ATTACK_MEDIUM);
head.eye.gotoAndStop('angry');
G.actBusy(this);
}
frame 216 {
if (G.hitPlayer(eatbox)) {
G.goPlay(this, 'blessatk');
}
}
frame 260 {
G.goPlay(this, 'idle');
}
frame 261 {
G.qteEvent(20);
}
frame 262 {
if (G.qteCheck()) {
G.goPlay(this, 'blessmiss');
}
}
frame 263 {
G.consumePlayer();
}
frame 282 {
G.hurtPlayer(this, 10);
}
frame 669 {
head.eye.gotoAndStop('glup');
}
frame 721 {
head.eye.gotoAndStop('angry');
}
frame 746 {
G.startDigestion(this, 0);
head.eye.gotoAndStop('angry');
if (G.getPlayerHealthPercent() == 0) {
G.goPlay(this, 'syouka1');
}
var WigObj = new Object();
WigObj.l = 'noml';
WigObj.r = 'nomr';
WigObj.u = 'nomu';
WigObj.d = 'nomd';
trace(WigObj);
G.setAnims(this, WigObj);
G.setEscape(this, 'haki', 'L R U D', 8, 0);
}
frame 746 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 754 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 761 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 767 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 773 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 780 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 786 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 792 {
G.goPlay(this, 'nom1');
}
frame 793 {
head.eye.gotoAndStop('glup');
G.clearAnims(this);
}
frame 810 {
G.goPlay(this, 'nom1');
}
frame 811 {
head.eye.gotoAndStop('glup');
G.clearAnims(this);
}
frame 828 {
G.goPlay(this, 'nom1');
}
frame 829 {
head.eye.gotoAndStop('glup');
G.clearAnims(this);
}
frame 846 {
G.goPlay(this, 'nom1');
}
frame 847 {
head.eye.gotoAndStop('glup');
G.clearAnims(this);
}
frame 864 {
G.goPlay(this, 'nom1');
}
frame 865 {
head.eye.gotoAndStop('glup');
G.endDigestion(this);
}
frame 893 {
head.eye.gotoAndStop('normal');
}
frame 936 {
G.goPlay(this, 'idle');
}
frame 937 {
head.eye.gotoAndStop('hakidasi');
G.endDigestion(this);
}
frame 1014 {
G.goPlay(this, 'idle');
G.unconsumePlayer(this, 350);
}
frame 1018 {
G.actAttack(this, G.ATTACK_MEDIUM);
head.eye.gotoAndStop('angry');
G.actBusy(this);
}
frame 1031 {
if (G.hitPlayer(eatbox)) {
G.goPlay(this, 'fumituke');
}
}
frame 1036 {
G.goPlay(this, 'idle');
}
frame 1037 {
G.consumePlayer();
ydr.gotoAndPlay('yoda');
}
frame 1040 {
geizi.gotoAndStop(31);
}
frame 1050 {
var gg = 31;
}
frame 1052 {
G.hurtPlayer(this, 1);
}
frame 1052 {
gg += 3;
if (gg > 101) {
gg = 101;
}
geizi.gotoAndStop(gg);
}
frame 1052 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1053 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1054 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1055 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1056 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1057 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1058 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1059 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1060 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1061 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1062 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1063 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1064 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1065 {
gg += 4;
if (gg > 101) {
gg = 101;
}
geizi.gotoAndStop(gg);
}
frame 1065 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1066 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1067 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1068 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1069 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1070 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1071 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1072 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1073 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1074 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1075 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1076 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1077 {
G.goPlay(this, 'fumituke2');
}
frame 1077 {
if (G.playerTapGet() != undefined && G.playerTapGet() != '') {
gg -= 2;
}
geizi.gotoAndStop(gg);
if (G.getPlayerHealthPercent() == 0 || gg == 101) {
G.goPlay(this, 'gokkun2');
}
if (gg < 0) {
G.unconsumePlayer(this, 150);
G.goPlay(this, 'idle');
}
}
frame 1291 {
head.eye.gotoAndStop('glup');
}
frame 1303 {
head.eye.gotoAndStop('normal');
}
frame 1333 {
G.startDigestion(this, 0);
head.eye.gotoAndStop('angry');
if (G.getPlayerHealthPercent() == 0) {
G.goPlay(this, 'syouka2');
}
var WigObj = new Object();
WigObj.l = 'nom2l';
WigObj.r = 'nom2r';
WigObj.u = 'nom2u';
WigObj.d = 'nom2d';
trace(WigObj);
G.setAnims(this, WigObj);
G.setEscape(this, 'haki2', 'L R U D', 8, 0);
}
frame 1333 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 1342 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 1351 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 1360 {
G.goPlay(this, 'nom2');
}
frame 1361 {
G.clearAnims(this);
head.eye.gotoAndStop('damage');
}
frame 1383 {
G.goPlay(this, 'nom2');
}
frame 1384 {
G.clearAnims(this);
head.eye.gotoAndStop('damage');
}
frame 1405 {
G.goPlay(this, 'nom2');
}
frame 1406 {
G.clearAnims(this);
head.eye.gotoAndStop('glup');
}
frame 1428 {
G.goPlay(this, 'nom2');
}
frame 1429 {
G.clearAnims(this);
head.eye.gotoAndStop('glup');
}
frame 1452 {
G.goPlay(this, 'nom2');
}
frame 1453 {
head.eye.gotoAndStop('hakidasi');
G.endDigestion(this);
}
frame 1531 {
G.goPlay(this, 'idle');
G.unconsumePlayer(this, 350);
}
frame 1544 {
head.eye.gotoAndStop('glup');
}
frame 1561 {
head.eye.gotoAndStop('normal');
}
frame 1573 {
G.goPlay(this, 'idle');
}
frame 1574 {
G.actAttack(this, G.ATTACK_HIGH);
}
frame 1604 {
if (G.hitPlayer(eatbox)) {
G.goPlay(this, 'eatatk');
}
}
frame 1620 {
if (G.hitPlayer(eatbox)) {
G.goPlay(this, 'eatatk2');
}
}
frame 1632 {
G.actIdle(this);
head.eye.gotoAndStop('normal');
if (G.manualReset(this)) {
G.setScaleValue(100);
G.setName('ガララアジャラ');
G.setStatus('WingSnakeWyvern');
G.setCredit('');
G.setHAtk(6);
G.setMAtk(7);
G.setLAtk(6);
G.setHDef(5);
G.setMDef(6);
G.setLDef(7);
G.setMaxHP(200);
G.setHP(200);
}
}
frame 1633 {
G.qteEvent(20);
}
frame 1634 {
if (G.qteCheck()) {
G.goPlay(this, 'eatmiss');
}
}
frame 1635 {
G.consumePlayer();
}
frame 1706 {
head.eye.gotoAndStop('glup');
}
frame 1722 {
head.eye.gotoAndStop('normal');
}
frame 1754 {
G.goPlay(this, 'atk3nom');
}
frame 1755 {
G.qteEvent(20);
}
frame 1756 {
if (G.qteCheck()) {
G.goPlay(this, 'eatmiss2');
}
}
frame 1757 {
G.consumePlayer();
}
frame 1895 {
var i = 0;
var ii = Math.floor(Math.random() * 2) + 2;
}
frame 1896 {
head.eye.gotoAndStop('glup');
if (i == ii) {
G.goPlay(this, 'atk3glup2');
}
}
frame 1935 {
G.goPlay(this, 'licking');
i += 1;
}
frame 1981 {
head.eye.gotoAndStop('normal');
}
frame 2009 {
head.eye.gotoAndStop('normal');
G.startDigestion(this, 0);
if (G.getPlayerHealthPercent() == 0) {
G.goPlay(this, 'syouka3');
}
var WigObj = new Object();
WigObj.l = 'nom3l';
WigObj.r = 'nom3r';
WigObj.u = 'nom3u';
WigObj.d = 'nom3d';
trace(WigObj);
G.setAnims(this, WigObj);
G.setEscape(this, 'haki3', 'L R U D', 8, 0);
}
frame 2009 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 2021 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 2035 {
G.hurtPlayer(this, 1);
G.healEnemy(2);
}
frame 2047 {
G.goPlay(this, 'atk3nom');
}
frame 2048 {
head.eye.gotoAndStop('damage');
}
frame 2063 {
G.goPlay(this, 'atk3nom');
}
frame 2064 {
head.eye.gotoAndStop('glup');
}
frame 2080 {
G.goPlay(this, 'atk3nom');
}
frame 2096 {
G.goPlay(this, 'atk3nom');
}
frame 2113 {
G.goPlay(this, 'atk3nom');
}
frame 2114 {
G.endDigestion(this);
}
frame 2175 {
head.eye.gotoAndStop('glup');
}
frame 2188 {
G.goPlay(this, 'idle');
}
frame 2189 {
G.endDigestion(this);
head.eye.gotoAndStop('haki');
}
frame 2266 {
G.goPlay(this, 'idle');
G.unconsumePlayer(this, 50);
}
}
movieClip 931 {
frame 1 {
stop();
}
frame 12 {
this.m_scale = 100;
this.m_name = 'EXTERNAL';
this.m_status = 'SxS*NOTLOADED';
this.m_credit = '';
this.maxhp = 100;
this.hp = this.maxhp;
this.enemy.in_movex = 0;
this.enemy.in_movey = 0;
this.enemy.in_action = 0;
this.hatk = 0;
this.matk = 0;
this.latk = 0;
this.hdef = 0;
this.mdef = 0;
this.ldef = 0;
enemy.s_atktype = 0;
enemy.s_animbusy = 0;
enemy.s_idle = 1;
enemy.s_moving = 0;
enemy.s_attacking = 0;
enemy.s_hit = 0;
enemy.s_vx = 0;
m_cameraoffset = 0;
stop();
}
}
movieClip 932 {
}
movieClip 965 {
frame 1 {
stop();
}
frame 3 {
gotoAndStop(1);
}
frame 6 {
gotoAndStop(1);
}
frame 20 {
gotoAndStop(1);
}
frame 31 {
gotoAndStop(1);
}
frame 46 {
gotoAndStop(1);
}
frame 61 {
gotoAndStop(1);
}
frame 76 {
gotoAndStop(1);
}
frame 91 {
gotoAndStop(1);
}
frame 101 {
gotoAndStop(1);
}
frame 111 {
gotoAndStop(1);
}
frame 121 {
gotoAndStop(1);
}
frame 131 {
gotoAndStop(1);
}
frame 141 {
gotoAndStop(1);
}
frame 151 {
gotoAndStop(1);
}
frame 158 {
gotoAndStop(1);
}
frame 166 {
gotoAndStop(1);
}
frame 176 {
gotoAndStop(1);
}
frame 186 {
gotoAndStop(1);
}
frame 196 {
gotoAndStop(1);
}
frame 206 {
gotoAndStop(1);
}
frame 216 {
gotoAndStop(1);
}
frame 226 {
gotoAndStop(1);
}
frame 236 {
gotoAndStop(1);
}
frame 246 {
gotoAndStop(1);
}
frame 256 {
gotoAndStop(1);
}
frame 266 {
gotoAndStop(1);
}
frame 278 {
gotoAndStop(1);
}
frame 291 {
gotoAndStop(1);
}
frame 301 {
gotoAndStop(1);
}
frame 311 {
gotoAndStop(1);
}
frame 321 {
gotoAndStop(1);
}
frame 331 {
gotoAndStop(1);
}
frame 341 {
gotoAndStop(1);
}
frame 351 {
gotoAndStop(1);
}
frame 361 {
gotoAndStop(1);
}
frame 371 {
gotoAndStop(1);
}
frame 381 {
gotoAndStop(1);
}
frame 391 {
gotoAndStop(1);
}
}
movieClip 1004 {
}
movieClip 1007 {
frame 1 {
stop();
}
frame 2 {
gotoAndStop(1);
}
frame 3 {
gotoAndStop(1);
}
frame 12 {
gotoAndStop(1);
}
frame 23 {
gotoAndStop(1);
}
frame 42 {
gotoAndStop(1);
}
frame 51 {
gotoAndStop(1);
}
frame 58 {
gotoAndStop(1);
}
frame 65 {
gotoAndStop(1);
}
frame 95 {
gotoAndStop(1);
}
frame 102 {
gotoAndStop(1);
}
frame 109 {
gotoAndStop(1);
}
frame 120 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 150 {
gotoAndStop(1);
}
frame 151 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 179 {
gotoAndStop(1);
}
frame 180 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 210 {
gotoAndStop(1);
}
frame 211 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 239 {
gotoAndStop(1);
}
frame 240 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 270 {
gotoAndStop(1);
}
frame 271 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 300 {
gotoAndStop(1);
}
frame 302 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 307 {
gotoAndStop(1);
}
frame 310 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 315 {
gotoAndStop(1);
}
frame 318 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 321 {
gotoAndStop(1);
}
frame 327 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 330 {
gotoAndStop(1);
}
frame 337 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 340 {
gotoAndStop(1);
}
frame 348 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 351 {
gotoAndStop(1);
}
frame 358 {
_xscale = Math.abs(_xscale);
_yscale = Math.abs(_xscale);
_rotation = 0;
}
frame 361 {
gotoAndStop(1);
}
frame 371 {
gotoAndStop(1);
}
frame 381 {
gotoAndStop(1);
}
frame 391 {
gotoAndStop(1);
}
}
frame 8 {
var m_input_raw_mouse_x = _xmouse;
var m_input_raw_mouse_y = _ymouse;
var m_input_raw_mouse_dx = 0;
var m_input_raw_mouse_dy = 0;
var m_input_raw_mouse_down = 0;
var m_input_raw_mouse_clicked = 0;
var m_input_raw_mouse_wheel = 0;
var m_input_keys_active = new Object();
var m_game_mouse_listener = new Object();
m_game_mouse_listener.onMouseMove = function () {
var v2 = _xmouse;
var v1 = _ymouse;
m_input_raw_mouse_dx = v2 - m_input_raw_mouse_x;
m_input_raw_mouse_dy = v1 - m_input_raw_mouse_y;
m_input_raw_mouse_x = v2;
m_input_raw_mouse_y = v1;
};
m_game_mouse_listener.onMouseDown = function () {
if (m_input_raw_mouse_down == 0) {
m_input_raw_mouse_clicked = 1;
}
m_input_raw_mouse_down += 1;
};
m_game_mouse_listener.onMouseUp = function () {
m_input_raw_mouse_down = 0;
};
m_game_mouse_listener.onMouseWheel = function (vdelta) {
m_input_raw_mouse_wheel += vdelta;
};
Mouse.addListener(m_game_mouse_listener);
stop();
}
frame 8 {
GLOBAL_ENEMY.is_external_loaded;
}
movieClip 1013 {
}
movieClip 1015 {
}
movieClip 1018 {
}
movieClip 1021 {
}
movieClip 1022 {
}
instance controller of movieClip 58 {
onClipEvent (load) {
function _extSetup(T, D) {
var v5;
var v2 = T._parent;
if (T == T.G._parent.enemyshad.t.enemy) {
trace(T + ' ' + T._parent + ' ' + T.G);
trace('Ext setup was shadow!');
} else {
if (T == T.G._parent.enemyshad.t.enemy.enemy) {
trace(T + ' ' + T._parent + ' ' + T.G);
trace('Ext setup was shadow from correct external clip!');
} else {
trace('Ext setup called: ' + T);
for (var v4 in D) {
v2[v4] = D[v4];
}
v2.hp = v2.maxhp;
T.in_movex = 0;
T.in_movey = 0;
T.in_action = 0;
if (D.in_movex != undefined) {
T.in_movex = D.in_movex;
}
if (D.in_movey != undefined) {
T.in_movey = D.in_movey;
}
if (D.in_action != undefined) {
T.in_action = D.in_action;
}
T.s_atktype = 0;
T.s_animbusy = 0;
T.s_idle = 1;
T.s_moving = 0;
T.s_attacking = 0;
T.s_hit = 0;
T.s_vx = 0;
v2.ignore_hitweak = -1;
v2.ignore_hitanim = false;
v2.ignore_hitanimonly = false;
v2.hatk_original = v2.hatk;
v2.matk_original = v2.matk;
v2.latk_original = v2.latk;
v2.hdef_original = v2.hdef;
v2.mdef_original = v2.mdef;
v2.ldef_original = v2.ldef;
v2.hatk_original = v2.hatk;
T.is_external = true;
T.is_external_loaded = false;
v2._xscale = 100;
v2._yscale = 100;
T._xscale = 100;
T._yscale = 100;
v5 = 'idle';
}
}
if (D.m_scale == undefined) {
v2.m_scale = 100;
}
var v6 = 100 * (100 / v2.m_scale);
T.onEnterFrame = function () {};
if (v5 != undefined) {
T.gotoAndPlay(v5);
}
T._xscale = v6;
T._yscale = v6;
}
function goPlay(target, animm) {
var v1;
var v2;
if (target != undefined and animm != undefined) {
v1 = target;
v2 = animm;
} else {
if (target != undefined) {
trace('Reassigned target to enemy: ' + target + ' ' + animm);
v1 = getEnemyT(GLOBAL_ENEMY);
v2 = target;
} else {
trace(' goPlay has bad arguments: ' + target + ' ' + animm);
}
}
v1 = target;
v2 = animm;
trace(' goPlay has bad arguments: ' + target + ' ' + animm);
if (v1.__animmap == undefined) {
v1.__animmap = new Object();
}
if (v1.__animnamemap == undefined) {
v1.__animnamemap = new Object();
}
if (v1.__aniprefix != undefined) {
v2 = v1.__aniprefix + v2;
}
if (!v1.__animmap.hasOwnProperty(v1._currentframe)) {
v1.__animmap[v1._currentframe] = new Object();
}
v1.__animcurrent = v2;
v1.gotoAndPlay(v2);
v1.__animmap[v1._currentframe][v2] = 0;
if (!v1.__animnamemap.hasOwnProperty(v2)) {
v1.__animnamemap[v2] = new Object({'fmin': v1._currentframe, 'fmax': v1._currentframe});
}
var v4 = v1.__animnamemap[v2];
if (v1._currentframe > v4.fmax) {
v4.fmax = v1._currentframe;
}
if (v1._currentframe < v4.fmin) {
v4.fmin = v1._currentframe;
}
}
function goPlayGetMinFrame(target, aname) {
if (target.__animmap != undefined) {
if (target.__animmap.hasOwnProperty(aname)) {
return target.__animnamemap[aname].fmin;
}
}
return undefined;
}
function goPlayGetMaxFrame(target, aname) {
if (target.__animmap != undefined) {
if (target.__animmap.hasOwnProperty(aname)) {
return target.__animnamemap[aname].fmax;
}
}
return undefined;
}
function _loadMovie(targ, url, usermessage) {
var tp = targ._parent;
GLOBAL_ENEMY.is_external_loaded = false;
tp.MovieClipLoaderURL = url;
tp.onLoadInit = function (target_mc) {};
tp.onLoadComplete = function (target_mc, httpStatus) {
GLOBAL_ENEMY.is_external_loaded = true;
};
tp.onLoadProgress = function (target_mc, errorCode, httpStatus) {};
tp.onLoadError = function (target_mc, errorCode, httpStatus) {
trace('Could not load: ' + tp.MovieClipLoaderURL);
Log('Could not load: ' + tp.MovieClipLoaderURL);
};
var v1 = new MovieClipLoader();
v1.addListener(tp);
v1.loadClip(url, targ);
}
function cameraComputeZoomScale() {
var v5 = GLOBAL_PLAYER._x - _parent.camControl._x;
var v3 = GLOBAL_PLAYER._y - _parent.camControl._y;
var v4 = 120 + (1 - GLOBAL_CAMERA_ZOOMPLAYER) * (GLOBAL_FLOOR - 120) - _parent.camControl._y;
var v6 = -(GLOBAL_PLAYER._y - GLOBAL_FLOOR);
var v2 = v6 / (GLOBAL_CAMERA_ZOOMPLAYER * 240 / 2);
if (v2 > 1) {
v2 = 1;
}
if (v2 < 0) {
v2 = 0;
}
v3 = v2 * v3 + (1 - v2) * v4;
_parent.camControl._x += v5;
_parent.camControl._y += v3;
_parent.camControl._xscale *= GLOBAL_CAMERA_ZOOMPLAYER;
_parent.camControl._yscale *= GLOBAL_CAMERA_ZOOMPLAYER;
}
function isPaused() {
if (GLOBAL_PAUSE or GLOBAL_TRUEPAUSE) {
return true;
}
return false;
}
function mcPointToLocal(mc, px, py) {
var v5 = new flash.geom.Point(px, py);
if (mc != undefined) {
var v6 = new Array();
var v8 = this._parent;
var v2 = mc;
while (v2 != v8) {
v6.unshift(v2);
v2 = v2._parent;
}
var v4 = 0;
var v7 = v6.length;
while (v4 != v7) {
v2 = v6[v4];
var v3 = v2.transform.matrix.clone();
v3.invert();
v5 = v3.transformPoint(v5);
++v4;
}
}
return Object({'_x': v5.x, '_y': v5.y});
}
function mcPointToGlobal(mc, px, py) {
var v4 = new flash.geom.Point(px, py);
if (mc != undefined) {
var v5 = this._parent;
var v2 = mc;
while (v2 != v5) {
var v3 = v2.transform.matrix;
v4 = v3.transformPoint(v4);
v2 = v2._parent;
}
}
return Object({'_x': v4.x, '_y': v4.y});
}
function rand(nval, pval) {
if (pval == undefined) {
if (nval == undefined) {
return Math.random();
} else {
if (nval > 0) {
return Math.floor(nval * Math.random());
} else {
if (nval == 0) {
} else {}
}
}
return 0;
}
return 0;
}
function chance(percent) {
if (percent != undefined) {
return 100 * Math.random() < percent;
} else {
return 100 * Math.random() < 50;
}
}
function smoothChanceDown(healthpercent) {
var v1 = 100 - healthpercent;
if (v1 > 0) {
if (v1 < 100) {
return chance(v1);
return false;
}
return true;
}
return false;
}
function smoothChanceUp(healthpercent) {
var v1 = healthpercent;
if (v1 > 0) {
if (v1 < 100) {
return chance(v1);
return false;
}
return true;
}
return false;
}
function chanceSmoothLess(percent, lowpercent) {
if (percent <= lowpercent) {
return true;
} else {
if (lowpercent < 100) {
(percent - lowpercent) / (100 - lowpercent);
} else {
return true;
}
}
}
function chanceCall(percent, functionptr, arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
if (chance(percent)) {
functionptr(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
return true;
}
return false;
}
function histFromObject(A) {
var v4 = new Array();
var v2 = new Array();
for (akey in A) {
v2.push(akey);
}
v2.sort();
var v1 = 0;
while (v1 < v2.length) {
v4.push(A[v2[v1]]);
++v1;
}
return v4;
}
function histToUnityRange(A) {
var v3 = 0;
var v4 = 0;
var v5 = 0;
for (akey in A) {
var v1 = A[akey];
if (v1 < v3) {
v3 = v1;
}
if (v1 > v4) {
v4 = v1;
}
v5 += v1;
}
v4 /= v5;
v3 /= v5;
if (v3 < v4) {
var v6 = new Object();
var v7 = v4 - v3;
for (akey in A) {
v6[akey] = (A[akey] / v5 - v3) / v7;
}
return histFromObject(v6);
}
return histFromObject(A);
}
function histSelect(distofanims) {
var v2 = new Array();
var v9 = new Array();
var v4 = 0;
var v8 = 0;
for (akey in distofanims) {
var v1 = distofanims[akey];
v2.push(v1);
v9.push(akey);
if (v1 < v4) {
v4 = v1;
}
if (v1 > v8) {
v8 = v1;
}
}
if (v4 < v8) {
var v7 = 0;
var v3 = 0;
while (v3 < v2.length) {
var v6 = v2[v3] - v4;
v7 += v6;
v2[v3] = v7;
++v3;
}
var v10 = Math.random() * v7;
v3 = 0;
while (v3 < v2.length) {
if (v2[v3] > v10) {
return v9[v3];
}
++v3;
}
}
for (var v11 in distofanims) {
return v11;
}
return undefined;
}
function histBlend(A, B, factor) {
if (A.length == B.length) {
var v2 = histToUnityRange(A);
var v4 = histToUnityRange(B);
var v3 = new Array(v2.length);
var v1 = 0;
while (v1 < v2.length) {
v3[v1] = v2[v1] + factor * (v4[v1] - v2[v1]);
++v1;
}
return histToUnityRange(v3);
}
return histFromObject(A);
}
function setPlayerGraphic(sid) {
if (sid < 1) {
sid = 1;
}
sid %= GLOBAL_MAX_PLAYERGRAPHIC;
if (sid < 1) {
sid = 1;
}
_root.GLOBAL_PLAYERGRAPHIC = sid;
}
function getPlayerGraphic() {
return _root.GLOBAL_PLAYERGRAPHIC;
}
function getPlayerMode() {
return GLOBAL_PLAYER_MODE;
}
function isPlayerFacingEnemy() {
var v1 = GLOBAL_ENEMY._xscale > 0;
var v2 = GLOBAL_PLAYER._xscale > 0;
return v1 != v2;
}
function enemyFacing() {
if (GLOBAL_ENEMY._xscale >= 0) {
return 1;
}
return -1;
}
function enemyFacingRight() {
return GLOBAL_ENEMY._xscale >= 0;
}
function enemyFacingLeft() {
return GLOBAL_ENEMY._xscale < 0;
}
function playerInputX() {
return GLOBAL_PLAYER.in_movex;
}
function playerInputY() {
return GLOBAL_PLAYER.in_movey;
}
function playerInputA() {
return GLOBAL_PLAYER.in_action;
}
function playerTapReset() {
GLOBAL_PLAYER_TAPS.L = 2;
GLOBAL_PLAYER_TAPS.R = 2;
GLOBAL_PLAYER_TAPS.U = 2;
GLOBAL_PLAYER_TAPS.D = 2;
GLOBAL_PLAYER_TAPS.B = 2;
}
function playerTapGet() {
var v1 = '';
for (var v2 in GLOBAL_PLAYER_TAPS) {
if (GLOBAL_PLAYER_TAPS[v2] == 1) {
v1 += v2;
}
}
return v1;
}
function getPlayerRelativeMovement(option) {
if (option == undefined) {
option = 0;
}
var v2 = GLOBAL_PLAYER;
var v6 = GLOBAL_ENEMY;
var v4 = v6._xscale > 0;
var v1 = '';
var v3 = '';
if (v2.in_action) {
v1 = 'B';
v3 += 'B';
}
v3 = v1;
if (v2.in_movex < 0) {
if (v4) {
v1 += 'L';
} else {
v1 += 'R';
}
v3 = v1;
} else {
if (v2.in_movex > 0) {
if (v4) {
v1 += 'R';
} else {
v1 += 'L';
}
v3 = v1;
} else {
if (v2.in_movey < 0) {
v1 += 'D';
} else {
if (v2.in_movey > 0) {
v1 += 'U';
}
}
}
}
if (v1 == '') {
}
if (option == 1) {
if (v2.in_movey < 0) {
v3 += 'D';
} else {
if (v2.in_movey > 0) {
v3 += 'U';
}
}
return v3;
}
return v1;
}
function getNextAnimation(AO, RM) {
var v2 = '';
if (AO != undefined) {
if (RM == 'B') {
if (AO.b != undefined) {
v2 = AO.b;
}
return v2;
}
if (RM == 'L') {
if (AO.l != undefined) {
v2 = AO.l;
} else {
if (AO.bl != undefined) {
v2 = AO.bl;
}
}
return v2;
}
if (RM == 'R') {
if (AO.r != undefined) {
v2 = AO.r;
} else {
if (AO.br != undefined) {
v2 = AO.br;
}
}
return v2;
}
if (RM == 'U') {
if (AO.u != undefined) {
v2 = AO.u;
} else {
if (AO.bu != undefined) {
v2 = AO.bu;
}
}
return v2;
}
if (RM == 'D') {
if (AO.d != undefined) {
v2 = AO.d;
} else {
if (AO.bd != undefined) {
v2 = AO.bd;
}
}
return v2;
}
if (RM == 'BL') {
if (AO.bl != undefined) {
v2 = AO.bl;
} else {
if (AO.l != undefined) {
v2 = AO.l;
}
}
return v2;
}
if (RM == 'BR') {
if (AO.br != undefined) {
v2 = AO.br;
} else {
if (AO.r != undefined) {
v2 = AO.r;
}
}
return v2;
}
if (RM == 'BU') {
if (AO.bu != undefined) {
v2 = AO.bu;
} else {
if (AO.u != undefined) {
v2 = AO.u;
}
}
return v2;
}
if (RM == 'BD') {
if (AO.bd != undefined) {
v2 = AO.bd;
} else {
if (AO.d != undefined) {
v2 = AO.d;
}
}
return v2;
}
if (RM == 'LU') {
if (AO.lu != undefined) {
v2 = AO.lu;
} else {
if (AO.l != undefined) {
v2 = AO.l;
} else {
if (AO.u != undefined) {
v2 = AO.u;
}
}
}
return v2;
}
if (RM == 'RU') {
if (AO.ru != undefined) {
v2 = AO.ru;
} else {
if (AO.r != undefined) {
v2 = AO.r;
} else {
if (AO.u != undefined) {
v2 = AO.u;
}
}
}
return v2;
}
if (RM == 'LD') {
if (AO.ld != undefined) {
v2 = AO.ld;
} else {
if (AO.l != undefined) {
v2 = AO.l;
} else {
if (AO.d != undefined) {
v2 = AO.d;
}
}
}
return v2;
}
if (RM == 'RD') {
if (AO.rd != undefined) {
v2 = AO.rd;
} else {
if (AO.r != undefined) {
v2 = AO.r;
} else {
if (AO.d != undefined) {
v2 = AO.d;
}
}
}
return v2;
}
if (RM == 'BLU') {
if (AO.blu != undefined) {
v2 = AO.blu;
} else {
if (AO.bl != undefined) {
v2 = AO.bl;
} else {
if (AO.bu != undefined) {
v2 = AO.bu;
} else {
if (AO.b != undefined) {
v2 = AO.b;
} else {
if (AO.l != undefined) {
v2 = AO.l;
} else {
if (AO.u != undefined) {
v2 = AO.u;
}
}
}
}
}
}
return v2;
}
if (RM == 'BRU') {
if (AO.bru != undefined) {
v2 = AO.bru;
} else {
if (AO.br != undefined) {
v2 = AO.br;
} else {
if (AO.bu != undefined) {
v2 = AO.bu;
} else {
if (AO.b != undefined) {
v2 = AO.b;
} else {
if (AO.r != undefined) {
v2 = AO.r;
} else {
if (AO.u != undefined) {
v2 = AO.u;
}
}
}
}
}
}
return v2;
}
if (RM == 'BLD') {
if (AO.bld != undefined) {
v2 = AO.bld;
} else {
if (AO.bl != undefined) {
v2 = AO.bl;
} else {
if (AO.bd != undefined) {
v2 = AO.bd;
} else {
if (AO.b != undefined) {
v2 = AO.b;
} else {
if (AO.l != undefined) {
v2 = AO.l;
} else {
if (AO.d != undefined) {
v2 = AO.d;
}
}
}
}
}
}
return v2;
}
if (RM == 'BRD') {
if (AO.brd != undefined) {
v2 = AO.brd;
return v2;
}
if (AO.br != undefined) {
v2 = AO.br;
return v2;
}
if (AO.bd != undefined) {
v2 = AO.bd;
return v2;
}
if (AO.b != undefined) {
v2 = AO.b;
return v2;
}
if (AO.r != undefined) {
v2 = AO.r;
return v2;
}
if (AO.d != undefined) {
v2 = AO.d;
}
}
}
return v2;
}
function initDigestion(target) {
_traceF1('initDigestion');
target.digeststruct = new Object();
target.digeststruct.frames = 0;
target.digeststruct.curr = 0;
target.digeststruct.escapes = new Array();
}
function startDigestion(target, onehpperframes) {
_traceF2('startDigestion');
if (target.digeststruct == undefined) {
initDigestion(target);
}
target.digeststruct.frames = onehpperframes;
}
function stopDigestion(target) {
_traceF1('stopDigestion');
target.digeststruct.frames = 0;
target.digeststruct.curr = 0;
target.digeststruct.escapes = new Array();
target.digeststruct = undefined;
}
function endDigestion(target) {
_traceF1('endDigestion');
target.digeststruct.frames = 0;
target.digeststruct.curr = 0;
target.digeststruct.escapes = new Array();
target.digeststruct = undefined;
}
function getDigestion(target) {
if (target.digeststruct == undefined) {
initDigestion(target);
}
return target.digeststruct;
}
function hurtPlayer(whodoes, amount) {
if (amount >= 0) {
if (GLOBAL_PLAYER.hp > amount) {
GLOBAL_PLAYER.hp -= amount;
} else {
GLOBAL_PLAYER.hp = 0;
}
} else {
healPlayer(whodoes, -amount);
}
}
function healPlayer(whodoes, amount) {
if (amount >= 0) {
GLOBAL_PLAYER.hp += amount;
if (GLOBAL_PLAYER.hp > GLOBAL_PLAYER.maxhp) {
GLOBAL_PLAYER.hp = GLOBAL_PLAYER.maxhp;
}
} else {
hurtPlayer(whodoes, -amount);
}
}
function healEnemy(amount, optiona) {
if (optiona != undefined) {
amount = optiona;
}
if (amount >= 0) {
GLOBAL_ENEMY.hp += amount;
if (GLOBAL_ENEMY.hp > GLOBAL_ENEMY.maxhp) {
GLOBAL_ENEMY.hp = GLOBAL_ENEMY.maxhp;
}
} else {
hurtEnemy(-amount);
}
}
function hurtEnemy(amount, optiona) {
if (optiona != undefined) {
amount = optiona;
}
if (amount >= 0) {
if (GLOBAL_ENEMY.hp > amount) {
GLOBAL_ENEMY.hp -= amount;
} else {
GLOBAL_ENEMY.hp = 0;
}
} else {
healEnemy(-amount);
}
}
function enemySetIgnoreHits(vals) {
if (vals != 0) {
GLOBAL_ENEMY.ignore_hitanim = 1;
} else {
GLOBAL_ENEMY.ignore_hitanim = 0;
}
}
function enemySetIgnoreWeakHits(vals) {
if (vals == undefined) {
GLOBAL_ENEMY.ignore_hitweak = -1;
} else {
GLOBAL_ENEMY.ignore_hitweak = vals;
}
}
function enemySetDontPlayHitAnimation(vals) {
if (vals != 0) {
GLOBAL_ENEMY.ignore_hitanimonly = 1;
} else {
GLOBAL_ENEMY.ignore_hitanimonly = 0;
}
}
function enemySetAttackHistogram(vallow, valmedium, valhigh) {
if (vallow == undefined) {
vallow = 0;
}
if (valmedium == undefined) {
valmedium = 0;
}
if (valhigh == undefined) {
valhigh = 0;
}
if (valhigh < 0) {
valhigh = 0;
}
if (valmedium < 0) {
valmedium = 0;
}
if (vallow < 0) {
vallow = 0;
}
if (valhigh + valmedium + vallow <= 0) {
vallow = 0.09;
valmedium = 0.71;
valhigh = 0.1;
}
var v1 = new Array(valhigh, vallow, valmedium);
var v5 = v1[0] + v1[1] + v1[2];
v1[0] /= v5;
v1[1] /= v5;
v1[2] /= v5;
GLOBAL_ENEMY_ATKUSE = v1;
}
function enemySetAllowPets(doit) {
GLOBAL_ALLOW_PETS = doit;
}
function getNumEscapes(targ) {
if (targ.digeststruct != undefined) {
var v1 = targ.digeststruct;
if (v1.escapes != undefined) {
return v1.escapes.length;
}
}
return 0;
}
function setAnims(targ, AO) {
if (targ.animstruct == undefined) {
targ.animstruct = new Object();
}
targ.animstruct = AO;
}
function clearAnims(targ, AO) {
targ.animstruct = undefined;
}
function setEscape(targ, nextanim, inputseq, count, options) {
if (targ.digeststruct != undefined) {
var v6 = targ.digeststruct;
var v7 = new Object();
v7.inseq = inputseq;
v7.count = count;
v7.options = options;
v7.curr = 0;
v7.anim = nextanim;
v7.inputs = new Array();
var v8 = inputseq.split(' ');
var v5 = 0;
while (v5 < v8.length) {
var v3 = v8[v5].toUpperCase();
var v4 = '';
var v2 = 0;
while (v2 < v3.length) {
var v1 = v3.charCodeAt(v2);
if (v1 >= 65 && v1 <= 90) {
v4 += String.fromCharCode(v1);
}
++v2;
}
if (v4.length > 0) {
v7.inputs.push(v4);
}
++v5;
}
if (v6.escapes == undefined) {
v6.escapes = new Array();
v6.escapes.push(v7);
} else {
v5 = 0;
while (v5 < v6.escapes.length) {
if (v6.escapes[v5].anim == nextanim) {
}
++v5;
}
v6.escapes.push(v7);
}
}
}
function updateOnlyDigestion(target) {
if (target.digeststruct != undefined) {
var v2 = target.digeststruct;
if (v2.frames > 0) {
v2.curr += 1;
this.hurtPlayer(target, 1 / v2.frames);
}
}
}
function updateDigestion(target, movedex) {
var v8 = '';
if (target.digeststruct != undefined) {
var v7 = target.digeststruct;
updateOnlyDigestion(target);
if (v7.escapes != undefined) {
if (movedex == '') {
if (GLOBAL_PLAYER.hp < 1) {
movedex = 'E';
} else {
movedex = 'W';
}
}
var v5 = 0;
while (v5 < v7.escapes.length) {
var v1 = v7.escapes[v5];
var v4 = false;
var v2 = 0;
while (v2 < v1.inputs.length) {
if (v1.inputs[v2] == 'W') {
v4 = true;
break;
}
++v2;
}
if (v4) {
if (movedex != 'W') {
v1.curr = 0;
}
} else {
v1.curr -= 0.03333333333333333;
}
if (v1.curr < 0) {
v1.curr = 0;
}
if (movedex != undefined) {
var v6 = 0;
v2 = 0;
while (v2 < v1.inputs.length) {
if (v1.inputs[v2] == movedex) {
v6 = true;
break;
}
++v2;
}
if (v6) {
if (movedex == 'W') {
v1.curr += 0.03333333333333333;
} else {
v1.curr += 1;
}
if (v1.curr > v1.count) {
if (v8 == '') {
v8 = v1.anim;
v1.curr = 0;
}
}
} else {}
}
++v5;
}
}
}
return v8;
}
function upMapAOVars(AO) {
if (AO != undefined) {
if (AO.E != undefined) {
if (AO.e == undefined) {
AO.e = AO.E;
}
}
if (AO.W != undefined) {
if (AO.w == undefined) {
AO.w = AO.W;
}
}
if (AO.L != undefined) {
if (AO.l == undefined) {
AO.l = AO.L;
}
}
if (AO.R != undefined) {
if (AO.r == undefined) {
AO.r = AO.R;
}
}
if (AO.U != undefined) {
if (AO.u == undefined) {
AO.u = AO.U;
}
}
if (AO.D != undefined) {
if (AO.d == undefined) {
AO.d = AO.D;
}
}
if (AO.B != undefined) {
if (AO.b == undefined) {
AO.b = AO.B;
}
}
if (AO.BL != undefined) {
if (AO.bl == undefined) {
AO.bl = AO.BL;
}
}
if (AO.BR != undefined) {
if (AO.br == undefined) {
AO.br = AO.BR;
}
}
if (AO.BU != undefined) {
if (AO.bu == undefined) {
AO.bu = AO.BU;
}
}
if (AO.BD != undefined) {
if (AO.bd == undefined) {
AO.bd = AO.BD;
}
}
if (AO.LU != undefined) {
if (AO.lu == undefined) {
AO.lu = AO.LU;
}
}
if (AO.RU != undefined) {
if (AO.ru == undefined) {
AO.ru = AO.RU;
}
}
if (AO.LD != undefined) {
if (AO.ld == undefined) {
AO.ld = AO.LD;
}
}
if (AO.RD != undefined) {
if (AO.rd == undefined) {
AO.rd = AO.RD;
}
}
if (AO.BLU != undefined) {
if (AO.blu == undefined) {
AO.blu = AO.BLU;
}
}
if (AO.BRU != undefined) {
if (AO.bru == undefined) {
AO.bru = AO.BRU;
}
}
if (AO.BLD != undefined) {
if (AO.bld == undefined) {
AO.bld = AO.BLD;
}
}
if (AO.BRD != undefined) {
if (AO.brd == undefined) {
AO.brd = AO.BRD;
}
}
}
}
function handleBasicStruggle(targ, AO) {
if (targ.animstruct != undefined) {
if (AO == undefined) {
AO = targ.animstruct;
}
}
upMapAOVars(AO);
targ.animstruct = AO;
if (AO != undefined) {
if (GLOBAL_PLAYER.hp < 1) {
if (AO.e != undefined) {
goPlay(targ, AO.e);
return false;
}
}
}
var v4 = getPlayerRelativeMovement(1);
var v1 = updateDigestion(targ, v4);
if (v1 == '') {
v1 = getNextAnimation(AO, v4);
if (v1 != '') {
goPlay(targ, v1);
_traceF2('Handle digest update, play this: ' + v1 + ' from ' + targmoveindex);
return true;
} else {
_traceF2('Handle digest update, play this digest: ' + v1 + ' from ' + targmoveindex);
}
return false;
}
goPlay(targ, v1);
return true;
return false;
}
function actIdle(target) {
_traceF1('actIdle');
target.s_idle = 1;
target.s_atktype = 0;
target.s_animbusy = 0;
target.s_moving = 0;
target.s_attacking = 0;
target.s_hit = 0;
target.in_movex = 0;
target.in_movey = 0;
target.in_action = 0;
target.s_vx = 0;
}
function actMove(target, uvx) {
_traceF1('actMove');
target.s_idle = 0;
if (uvx != undefined) {
target.s_moving = uvx;
} else {
target.s_moving = 0;
}
target.s_attacking = 0;
target.s_hit = 0;
target.s_animbusy = 0;
}
function actMoveAttack(target, uvx, attype) {
_traceF1('actMoveAttack');
target.s_idle = 0;
if (uvx != undefined) {
target.s_moving = uvx;
} else {
target.s_moving = 0;
}
target.s_attacking = 0;
target.s_hit = 0;
target.s_animbusy = 0;
target.s_attacking = 1;
target.s_animbusy = 0;
target.s_atktype = attype;
}
function actHurt(target, knockback) {
_traceF1('actHurt');
target.s_idle = 0;
target.s_moving = 0;
target.s_attacking = 0;
target.s_hit = 1;
target.s_animbusy = 1;
if (knockback != undefined) {
target.s_vx = knockback;
} else {
target.s_vx = 0;
}
}
function actAttack(target, type) {
_traceF1('actAttack');
target.s_idle = 0;
target.s_moving = 0;
target.s_attacking = 1;
target.s_hit = 0;
target.s_animbusy = 1;
target.s_atktype = type;
}
function actBusy(target, movex) {
_traceF1('actBusy');
target.s_idle = 0;
target.s_moving = 0;
target.s_attacking = 0;
target.s_hit = 1;
target.s_animbusy = 1;
if (movex != undefined) {
target.s_vx = -movex;
target.s_moving = -movex;
} else {
target.s_moving = 0;
target.s_vx = 0;
}
}
function actUnbusy(target) {
_traceF1('actUnbusy');
target.s_hit = 0;
target.s_animbusy = 0;
target.s_vx = 0;
}
function consumePlayer(target) {
_traceF1('consumePlayer');
var v1 = GLOBAL_PLAYER;
v1.s_consumed = 1;
v1._alpha = 0;
v1.s_animbusy = 1;
v1.s_hit = 1;
v1.s_vx = 0;
v1.in_movex = 0;
v1.in_movey = 0;
v1.in_action = 0;
v1.stop();
v1.mc.stop();
GLOBAL_ENEMY.s_atktype = 8;
}
function isPlayerConsumed(target) {
if (target == undefined) {
target = GLOBAL_PLAYER;
}
if (target.s_consumed != undefined) {
return target.s_consumed > 0;
} else {
return target._alpha < 50;
}
}
function suckPlayer(target, range, speed) {
var v3 = GLOBAL_PLAYER;
var v4 = mcPointToGlobal(target, 0, 0);
var v2 = v4._x - v3._x;
if (Math.abs(v2) < range) {
var v1 = 1 - Math.abs(v2 / range);
if (v2 < 0) {
v1 = -v1;
}
v3._x += speed * v1;
}
}
function instantKillPlayer(target) {
_traceF1('instantKillPlayer');
var v1 = GLOBAL_PLAYER;
v1.hp = 0;
}
function setPlayerStatus(msg) {
GLOBAL_PLAYER.m_status = msg;
}
function pointsSetPerDamage(factor) {
if (factor > 0) {
GLOBAL_SCORE_ON_DAMAGE = factor;
} else {
GLOBAL_SCORE_ON_DAMAGE = 0;
}
}
function pointsAdd(amount, dontuselog) {
if (amount > 0) {
GLOBAL_POINTS += amount;
if (dontuselog == 1) {
Log(GLOBAL_PLAYER.m_name + ' got ' + amount + ' points!');
}
}
}
function pointsGet(amount) {
return GLOBAL_POINTS;
}
function pointsGetFightDelta(amount) {
return GLOBAL_POINTS - GLOBAL_POINTS_START;
}
function setHAtk(v) {
GLOBAL_ENEMY.hatk = v;
}
function setMAtk(v) {
GLOBAL_ENEMY.matk = v;
}
function setLAtk(v) {
GLOBAL_ENEMY.latk = v;
}
function setHDef(v) {
GLOBAL_ENEMY.hdef = v;
}
function setMDef(v) {
GLOBAL_ENEMY.mdef = v;
}
function setLDef(v) {
GLOBAL_ENEMY.ldef = v;
}
function setMaxHP(v) {
GLOBAL_ENEMY.maxhp = v;
}
function setHP(v) {
GLOBAL_ENEMY.hp = v;
}
function setHMLDef(vh, vm, vl) {
GLOBAL_ENEMY.hdef = vh;
GLOBAL_ENEMY.mdef = vm;
GLOBAL_ENEMY.ldef = vl;
}
function setHMLAtk(vh, vm, vl) {
GLOBAL_ENEMY.hatk = vh;
GLOBAL_ENEMY.matk = vm;
GLOBAL_ENEMY.latk = vl;
}
function setScaleValue(v) {
GLOBAL_ENEMY.m_scale = v;
GLOBAL_ENEMY.enemy.m_scale = v;
(getEnemyT(GLOBAL_ENEMY)).m_scale = v;
var v2 = 100 * (100 / v);
if (GLOBAL_ENEMY._xscale >= 0) {
GLOBAL_ENEMY._xscale = 100;
} else {
GLOBAL_ENEMY._xscale = -100;
}
GLOBAL_ENEMY._yscale = 100;
(getEnemyT(GLOBAL_ENEMY))._xscale = v2;
(getEnemyT(GLOBAL_ENEMY))._yscale = v2;
}
function setName(v) {
GLOBAL_ENEMY.m_name = v;
}
function setStatus(v) {
GLOBAL_ENEMY.m_status = v;
}
function setCredit(v) {
GLOBAL_ENEMY.m_credit = v;
}
function getHAtk() {
return GLOBAL_ENEMY.hatk;
}
function getMAtk() {
return GLOBAL_ENEMY.matk;
}
function getLAtk() {
return GLOBAL_ENEMY.latk;
}
function getHDef() {
return GLOBAL_ENEMY.hdef;
}
function getMDef() {
return GLOBAL_ENEMY.mdef;
}
function getLDef() {
return GLOBAL_ENEMY.ldef;
}
function getMaxHP() {
return GLOBAL_ENEMY.maxhp;
}
function getHP() {
return GLOBAL_ENEMY.hp;
}
function getScaleValue() {
return GLOBAL_ENEMY.m_scale;
}
function getName() {
return GLOBAL_ENEMY.m_name;
}
function getStatus() {
return GLOBAL_ENEMY.m_status;
}
function getCredit() {
return GLOBAL_ENEMY.m_credit;
}
function resetHAtk(v) {
GLOBAL_ENEMY.hatk = GLOBAL_ENEMY.hatk_original;
}
function resetMAtk(v) {
GLOBAL_ENEMY.matk = GLOBAL_ENEMY.matk_original;
}
function resetLAtk(v) {
GLOBAL_ENEMY.latk = GLOBAL_ENEMY.latk_original;
}
function resetHDef(v) {
GLOBAL_ENEMY.hdef = GLOBAL_ENEMY.hdef_original;
}
function resetMDef(v) {
GLOBAL_ENEMY.mdef = GLOBAL_ENEMY.mdef_original;
}
function resetLDef(v) {
GLOBAL_ENEMY.ldef = GLOBAL_ENEMY.ldef_original;
}
function resetMaxHP(v) {
GLOBAL_ENEMY.maxhp = GLOBAL_ENEMY.maxhp_original;
}
function setEnemySolid(v) {
if (v == 1) {
GLOBAL_ENEMY.m_notsolid = undefined;
} else {
GLOBAL_ENEMY.m_notsolid = 1;
}
}
function setEnemyFaceTarget(v) {
if (v == 1) {
GLOBAL_ENEMY.m_dontfacetarget = 0;
} else {
GLOBAL_ENEMY.m_dontfacetarget = 1;
}
}
function setEnemyAIUseAttacks(v) {
if (v == 1) {
GLOBAL_ENEMY.m_dontattackauto = undefined;
} else {
GLOBAL_ENEMY.m_dontattackauto = 1;
}
}
function setPlayerHP(v) {
GLOBAL_PLAYER.hp = v;
}
function enemyReplaceWalk(newanim) {
if (newanim == undefined) {
newanim = 'walk';
}
GLOBAL_ENEMY.replaceAnimWalk = newanim;
if ((getEnemyT(GLOBAL_ENEMY)).__animcurrent != newanim) {
goPlay(getEnemyT(GLOBAL_ENEMY), newanim);
}
}
function syncSubclip(owner, subclip, framename, funccall) {
if (GLOBAL_SYNCMAP.hasOwnProperty(subclip)) {
GLOBAL_SYNCMAP[subclip].framename = framename;
GLOBAL_SYNCMAP[subclip].owner = owner;
GLOBAL_SYNCMAP[subclip].target = subclip;
GLOBAL_SYNCMAP[subclip].ownerstring = String(owner);
GLOBAL_SYNCMAP[subclip].targetstring = (String(subclip)).substr(GLOBAL_SYNCMAP[subclip].ownerstring.length);
GLOBAL_SYNCMAP[subclip].funccall = funccall;
} else {
var v2 = new Object();
v2.framename = framename;
v2.owner = owner;
v2.target = subclip;
v2.funccall = funccall;
v2.ownerstring = String(owner);
v2.targetstring = (String(subclip)).substr(v2.ownerstring.length);
v2.fixedframemap = new Object();
GLOBAL_SYNCMAP[subclip] = v2;
}
}
function setPostSync(func) {
GLOBAL_POSTSYNC = func;
}
function setValue(key, val) {
if (GLOBAL_VALUES[key] != val) {
_traceF1('setValue( ' + key + ', ' + val + ');');
}
GLOBAL_VALUES[key] = val;
}
function getValue(key, usedefault) {
if (GLOBAL_VALUES.hasOwnProperty(key)) {
return GLOBAL_VALUES[key];
}
return usedefault;
}
function hasValue(key) {
return GLOBAL_VALUES.hasOwnProperty(key);
}
function addValue(key, addme) {
if (GLOBAL_VALUES.hasOwnProperty(key)) {
if (addme != val) {
_traceF1('addValue( ' + key + ', ' + addme + ');');
}
GLOBAL_VALUES[key] += addme;
return true;
return false;
}
trace('Value: ' + key + ' does not exist, adding as 0');
GLOBAL_VALUES[key] = addme;
return false;
}
function setF(key, func) {
GLOBAL_FUNCS[key] = func;
}
function callF(key, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
if (GLOBAL_FUNCS.hasOwnProperty(key)) {
return GLOBAL_FUNCS[key](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
} else {
trace('callF: ' + key + ' does not exist');
}
}
function setAnimPrefix(target, v) {
target.__aniprefix = v;
}
function unconsumePlayer(target, xposrel, playanim) {
_traceF1('unconsumePlayer');
if (isPlayerConsumed(GLOBAL_PLAYER)) {
var v1 = GLOBAL_PLAYER;
v1.s_consumed = 0;
v1._alpha = 100;
v1.s_animbusy = 0;
v1.s_hit = 1;
v1.s_vx = 0;
v1.in_movex = 0;
v1.in_movey = 0;
v1.in_action = 0;
if (playanim != undefined) {
goPlay(v1, playanim);
} else {
goPlay(v1, 'hitm');
}
if (xposrel != undefined) {
v1._x = target._parent._x + xposrel * (target._xscale / 100) * (target._parent._xscale / 100);
} else {
v1._x = target._parent._x + 32 * (target._xscale / 100) * (target._parent._xscale / 100);
}
}
}
function playerDistance(target) {
var v3 = getCBox(GLOBAL_PLAYER);
if (target == undefined) {
target = getEnemyT(GLOBAL_ENEMY);
}
var v2 = getCBox(GLOBAL_ENEMY.enemy);
if (v3 != undefined and v2 != undefined) {
A = v3.getBounds(_root);
B = v2.getBounds(_root);
if (A.xMin < B.xMax and A.xMax > B.xMin) {
if (A.yMin < B.yMax and A.yMax > B.yMin) {
return -Math.abs(0.5 * (A.xMax + A.xMin - (B.xMax + B.xMin)));
}
}
if (A.xMin > B.xMax) {
return Math.abs(B.xMax - A.xMin);
return Math.abs(GLOBAL_PLAYER._x - GLOBAL_ENEMY._x);
}
if (A.xMax < B.xMin) {
return Math.abs(B.xMin - A.xMax);
}
}
return Math.abs(GLOBAL_PLAYER._x - GLOBAL_ENEMY._x);
}
function playerWithin(target, distance, fardistance) {
if (fardistance != undefined) {
var v1 = playerDistance(target);
return v1 >= distance and v1 <= fardistance;
} else {
return playerDistance(target) < distance;
}
}
function playSound(soundkey, extravolume, exparam) {
var v5 = _parent.soundbank;
if (extravolume != undefined) {
var v7 = new Sound(v5);
v7.setVolume(extravolume);
} else {
var v7 = new Sound(v5);
v7.setVolume(100);
}
var v4 = '';
var v2 = 0;
while (v2 < soundkey.length) {
if (soundkey.charCodeAt(v2) == 46) {
v4 += '_';
} else {
v4 += soundkey.charAt(v2);
}
++v2;
}
var v9 = v5._currentframe;
v5.gotoAndPlay(1);
v5.gotoAndPlay(v4);
var v6 = v5._currentframe;
if (v6 == 1) {
trace('Manual soundplay' + v5 + ': ' + v4 + ' :' + extravolume + ' |' + exparam + ' [' + v9 + ' ' + v6 + ']');
}
}
function _getCBox(bc) {
if (bc.cbox != undefined) {
return bc.cbox;
return undefined;
}
if (bc.cBox != undefined) {
return bc.cBox;
return undefined;
}
if (bc.Cbox != undefined) {
return bc.Cbox;
return undefined;
}
if (bc.CBox != undefined) {
return bc.CBox;
return undefined;
}
if (bc.CBOX != undefined) {
return bc.CBOX;
}
return undefined;
}
function _getABox(bc) {
if (bc.abox != undefined) {
return bc.abox;
return undefined;
}
if (bc.aBox != undefined) {
return bc.aBox;
return undefined;
}
if (bc.Abox != undefined) {
return bc.Abox;
return undefined;
}
if (bc.ABox != undefined) {
return bc.ABox;
return undefined;
}
if (bc.ABOX != undefined) {
return bc.ABOX;
}
return undefined;
}
function _getSBox(bc) {
if (bc.sbox != undefined) {
return bc.sbox;
return undefined;
}
if (bc.sBox != undefined) {
return bc.sBox;
return undefined;
}
if (bc.Sbox != undefined) {
return bc.Sbox;
return undefined;
}
if (bc.SBox != undefined) {
return bc.SBox;
return undefined;
}
if (bc.SBOX != undefined) {
return bc.SBOX;
}
return undefined;
}
function _getScopelessFunc(bc, usefunc) {
var v1 = usefunc(bc);
if (v1 != undefined) {
return v1;
}
v1 = usefunc(bc.aniclip.mc);
if (v1 != undefined) {
return v1;
}
v1 = usefunc(bc.enemy);
if (v1 != undefined) {
return v1;
}
return undefined;
}
function getCBox(mc) {
return _getScopelessFunc(mc, _getCBox);
}
function getABox(mc) {
return _getScopelessFunc(mc, _getABox);
}
function getSBox(mc) {
return _getScopelessFunc(mc, _getSBox);
}
function getEnemyT(GE) {
if (GE.enemy.enemy != undefined) {
return GE.enemy.enemy;
} else {
return GE.enemy;
}
}
function _getScopeless(bc, targetname) {
var v1 = function (xc) {
if (xc.hasOwnProperty(targetname)) {
return xc[targetname];
}
return undefined;
};
return _getScopelessFunc(bc, v1);
}
function reassignAllXClips(mc) {
var v3 = getCBox(mc);
if (v3 == mc) {
v3 = undefined;
}
if (v3 != mc.cbox) {
mc.cbox = v3;
}
if (v3 != mc.cBox) {
mc.cBox = v3;
}
if (v3 != mc.CBox) {
mc.CBox = v3;
}
if (v3 != mc.CBOX) {
mc.CBOX = v3;
}
var v4 = getABox(mc);
if (v4 == mc) {
v4 = undefined;
}
if (v4 != mc.abox) {
mc.abox = v4;
}
if (v4 != mc.aBox) {
mc.aBox = v4;
}
if (v4 != mc.ABox) {
mc.ABox = v4;
}
if (v4 != mc.ABOX) {
mc.ABOX = v4;
}
var v2 = getSBox(mc);
if (v2 == mc) {
v2 = undefined;
}
if (v2 != mc.sbox) {
mc.sbox = v2;
}
if (v2 != mc.sBox) {
mc.sBox = v2;
}
if (v2 != mc.SBox) {
mc.SBox = v2;
}
if (v2 != mc.SBOX) {
mc.SBOX = v2;
}
}
function hitPlayerHeadCenter(clip) {
return clip.hitTest(_root.player.head.center);
}
function hitPlayerHead(clip) {
return clip.hitTest(_root.player.head);
}
function hitPlayerCenter(clip) {
return clip.hitTest(_root.player.centerbox);
}
function hitPlayer(clip) {
return clip.hitTest(_root.player.cbox);
}
function getPlayer() {
return _root.player;
}
function getPlayerHealthPercent() {
return 100 * (_root.player.hp / 63);
}
function getEnemyHealthPercent() {
return 100 * (_root.enemy.hp / _root.enemy.maxhp);
}
function getPlayerHP() {
return _root.player.hp;
}
function getEnemyHP() {
return _root.enemy.hp;
}
function getEnemy() {
return _root.enemy;
}
function getController() {
return _root.controller;
}
function enemyFacePlayer() {
if (GLOBAL_ENEMY._x < GLOBAL_PLAYER._x) {
GLOBAL_ENEMY._xscale = Math.abs(GLOBAL_ENEMY._xscale);
} else {
GLOBAL_ENEMY._xscale = -Math.abs(GLOBAL_ENEMY._xscale);
}
}
function setPlayerHasHead(v) {
if (v) {
_root.GLOBAL_PLAYERHEAD = 1;
GLOBAL_PLAYERHASHEAD = true;
} else {
_root.GLOBAL_PLAYERHEAD = 0;
GLOBAL_PLAYERHASHEAD = false;
}
}
function toggleQuality() {
if (_root._quality == 'LOW') {
_root._quality = 'MEDIUM';
} else {
if (_root._quality == 'MEDIUM') {
_root._quality = 'HIGH';
} else {
_root._quality = 'LOW';
}
}
}
function toggleSlowMode() {
++GLOBAL_PAUSEHFR;
GLOBAL_PAUSEHFR %= 4;
}
function legacy4Struggle(target, aright, aleft, aup, adown) {
return legacy8StruggleDist(target, aright, aleft, aup, adown, aright, aleft, aup, adown);
}
function legacy8Struggle(target, aright, aleft, aup, adown, bright, bleft, bup, bdown) {
return legacy8StruggleDist(target, aright, aleft, aup, adown, bright, bleft, bup, bdown);
}
function legacyRandomStruggle(target, aright, aleft, aup, adown) {
var v1 = new Object();
if (adown != undefined) {
v1[adown] = 1;
}
if (aup != undefined) {
v1[aup] = 1;
}
if (aleft != undefined) {
v1[aleft] = 1;
}
if (aright != undefined) {
v1[aright] = 1;
}
return legacy8StruggleDist(target, v1, v1, v1, v1, v1, v1, v1, v1);
}
function legacySelectAndPlay(target, distofanims) {
if (typeof distofanims == 'string') {
target.gotoAndPlay(distofanims);
return true;
return false;
}
var v1 = histSelect(distofanims);
if (v1 != undefined) {
target.gotoAndPlay(v1);
return true;
}
return false;
}
function legacy4StruggleDist(target, aright, aleft, aup, adown, bright, bleft, bup, bdown) {
return legacy8StruggleDist(target, aright, aleft, aup, adown, aright, aleft, aup, adown);
}
function legacy8StruggleDist(target, aright, aleft, aup, adown, bright, bleft, bup, bdown) {
var v4 = playerInputX();
var v3 = playerInputY();
var v5 = playerInputA();
var v2 = enemyFacingRight();
if (v5 != 0) {
if (v4 < 0) {
if (v2) {
return legacySelectAndPlay(target, aleft);
} else {
return legacySelectAndPlay(target, aright);
}
} else {
if (v4 > 0) {
if (v2) {
return legacySelectAndPlay(target, aright);
} else {
return legacySelectAndPlay(target, aleft);
}
} else {
if (v3 > 0) {
return legacySelectAndPlay(target, aup);
} else {
if (v3 < 0) {
return legacySelectAndPlay(target, adown);
}
}
}
}
return false;
}
if (v4 < 0) {
if (v2) {
return legacySelectAndPlay(target, bleft);
} else {
return legacySelectAndPlay(target, bright);
}
return false;
}
if (v4 > 0) {
if (v2) {
return legacySelectAndPlay(target, bright);
} else {
return legacySelectAndPlay(target, bleft);
}
return false;
}
if (v3 > 0) {
return legacySelectAndPlay(target, bup);
return false;
}
if (v3 < 0) {
return legacySelectAndPlay(target, bdown);
}
return false;
}
function _stopExtSounds() {
var v2 = new Sound(GLOBAL_ENEMY);
v2.stop();
v2.setVolume(0);
var v3 = new Sound(GLOBAL_ENEMY.enemy);
v3.stop();
v3.setVolume(0);
var v4 = new Sound(GLOBAL_ENEMY.enemy.enemy);
v4.stop();
v4.setVolume(0);
var v5 = new Sound(GLOBAL_ENEMY.enemy.enemy.enemy);
v5.stop();
v5.setVolume(0);
var v1 = new Sound(getEnemyT(GLOBAL_ENEMY));
v1.stop();
v1.setVolume(0);
}
function _startExtSounds() {
var v2 = new Sound(GLOBAL_ENEMY);
v2.stop();
v2.setVolume(100);
var v3 = new Sound(GLOBAL_ENEMY.enemy);
v3.stop();
v3.setVolume(100);
var v4 = new Sound(GLOBAL_ENEMY.enemy.enemy);
v4.stop();
v4.setVolume(100);
var v5 = new Sound(GLOBAL_ENEMY.enemy.enemy.enemy);
v5.stop();
v5.setVolume(100);
var v1 = new Sound(getEnemyT(GLOBAL_ENEMY));
v1.stop();
v1.setVolume(100);
}
function manualReset(T) {
if (T._manuallyReset == undefined) {
GLOBAL_DELAY_STARTNOISE = 4;
var v3 = T.getBytesLoaded() >= T.getBytesTotal();
if (v3) {
T._manuallyReset = 0;
var v2 = T._parent;
v2.m_scale = 100;
v2.m_name = 'NULL';
v2.m_status = 'NULL';
v2.m_credit = 'AUTO';
v2.maxhp = 100;
v2.hp = v2.maxhp;
T.in_movex = 0;
T.in_movey = 0;
T.in_action = 0;
v2.hatk = 0;
v2.matk = 0;
v2.latk = 0;
v2.hdef = 0;
v2.mdef = 0;
v2.ldef = 0;
T.s_atktype = 0;
T.s_animbusy = 0;
T.s_idle = 1;
T.s_moving = 0;
T.s_attacking = 0;
T.s_hit = 0;
T.s_vx = 0;
v2.m_cameraoffset = 0;
return true;
return false;
}
trace('Force Reframe...');
T.gotoAndPlay('idle');
}
return false;
}
function calcShadowPosition(ycoord) {
var v2 = Math.abs(GLOBAL_FLOOR - ycoord) / 10;
var v1 = 1;
if (v2 > 1) {
v1 = 1 / v2;
if (v1 > 1) {
v1 = 1;
}
}
return GLOBAL_FLOOR;
}
function calcShadowScale(ycoord) {
var v2 = Math.abs(GLOBAL_FLOOR - ycoord) / 10;
if (v2 > 1) {
var v1 = 1 / v2;
if (v1 > 1) {
v1 = 1;
}
return Math.sqrt(v1);
} else {
return 1;
}
}
function _traceFx(msg) {
trace('#GT [' + GLOBAL_ENEMY_FRAMES_RUN + '](' + (getEnemyT(GLOBAL_ENEMY))._currentframe + ')\t' + msg);
}
function enableFullTrace(newlevel) {
GLOBAL_FULL_TRACE = 0;
_traceF0 = function (msg) {
_traceFx(msg);
};
_traceF1 = function (msg) {};
_traceF2 = function (msg) {};
_traceF3 = function (msg) {};
if (newlevel > 0) {
_traceF1 = function (msg) {
_traceFx(msg);
};
GLOBAL_FULL_TRACE = 1;
if (newlevel > 1) {
_traceF2 = function (msg) {
_traceFx(msg);
};
GLOBAL_FULL_TRACE = 2;
if (newlevel > 2) {
_traceF3 = function (msg) {
_traceFx(msg);
};
GLOBAL_FULL_TRACE = 3;
}
}
}
}
function disableFullTrace() {
GLOBAL_FULL_TRACE = 0;
}
function Log(s) {
LogScrollOffset = 0;
GLOBAL_LOG.unshift(s + '\n');
if (GLOBAL_LOG.length > 4096) {
GLOBAL_LOG.pop();
}
}
function LogParsed(s) {
var v5 = '';
var v1 = 0;
var v8 = s.length;
while (v1 < v8) {
if (s.charCodeAt(v1) == 37) {
if (v1 + 1 < v8) {
if (s.charCodeAt(v1 + 1) == 91) {
var v7 = v1 + 2;
var v6 = v7;
var v3 = v1 + 1;
while (v3 < v8) {
if (s.charCodeAt(v3) == 93) {
v6 = v3;
break;
}
++v3;
}
var v2 = s.substr(v7, v6 - v7);
if (GLOBAL_VALUES.hasOwnProperty(v2)) {
v5 += GLOBAL_VALUES[v2];
} else {
v2 = v2.toLowerCase();
hasmsg = v2;
if (v2 == 'enemyname') {
hasmsg = GLOBAL_ENEMY.m_name;
} else {
if (v2 == 'playername') {
hasmsg = 'Barb';
} else {
if (v2 == 'enemydescr') {
hasmsg = GLOBAL_ENEMY.m_status;
} else {
if (v2 == 'playerdescr') {
hasmsg = '';
} else {
if (v2 == 'enemyhp') {
hasmsg = GLOBAL_ENEMY.hp;
} else {
if (v2 == 'playerhp') {
hasmsg = GLOBAL_PLAYER.hp;
}
}
}
}
}
}
v5 += hasmsg;
}
v1 = v6 + 1;
} else {
v5 += s.charAt(v1);
v5 += s.charAt(v1 + 1);
v1 += 2;
}
} else {
v5 += s.charAt(v1);
++v1;
}
} else {
v5 += s.charAt(v1);
++v1;
}
}
Log(v5);
}
function numclamp(v) {
if (v < 0) {
v = 0;
return v;
}
v = Math.ceil(v);
return v;
}
function addcharactervariables(targ) {
targ.hp = 63;
targ.in_movex = 0;
targ.in_movey = 0;
targ.in_action = 0;
targ.hatk = 32;
targ.matk = 32;
targ.latk = 32;
targ.hdef = 0;
targ.mdef = 0;
targ.ldef = 0;
targ.hdefon = 0;
targ.mdefon = 0;
targ.ldefon = 0;
targ.s_atktype = 0;
targ.s_animbusy = 0;
targ.s_idle = 1;
targ.s_moving = 0;
targ.s_attacking = 0;
targ.s_hit = 0;
targ.s_vx = 0;
targ.s_movespeed = 1;
targ.m_name = 'NULL';
targ.m_status = 'NULL';
targ._y = GLOBAL_FLOOR;
targ.s_vy = 0;
}
function pauseall() {
GLOBAL_PAUSE = true;
GLOBAL_PLAYER.stop();
GLOBAL_PLAYER.aniclip.mc.stop();
(getEnemyT(GLOBAL_ENEMY)).stop();
_parent.playershad.t.stop();
_parent.playershad.t.head.stop();
_parent.playershad.t.aniclip.stop();
_parent.playershad.t.aniclip.mc.stop();
_parent.enemyshad.t.stop();
_parent.enemyshad.t.enemy.stop();
GLOBAL_ENEMYSPARK.stop();
GLOBAL_PLAYERSPARK.stop();
}
function unpauseall() {
GLOBAL_PAUSE = false;
if (!GLOBAL_QTE_DATA.active) {
GLOBAL_PLAYER.play(GLOBAL_PLAYER._currentframe);
GLOBAL_PLAYER.aniclip.mc.play();
(getEnemyT(GLOBAL_ENEMY)).play(GLOBAL_ENEMY._currentframe);
GLOBAL_ENEMYSPARK.play(GLOBAL_ENEMYSPARK._currentframe);
GLOBAL_PLAYERSPARK.stop(GLOBAL_PLAYERSPARK._currentframe);
} else {}
}
function moveCharacterGravity(sourcedata, char) {
char.s_vy += 0.5333333333333333;
sourcedata._y += char.s_vy;
if (sourcedata._y >= GLOBAL_FLOOR) {
sourcedata._y = GLOBAL_FLOOR;
char.s_vy = 0;
}
}
function movecharacter(obje, objdataclip, options) {
var v4 = Math.abs(obje._xscale);
var v3 = 'null';
if (!isPlayerConsumed(objdataclip)) {
if ((objdataclip.s_idle || objdataclip.s_moving != 0) && (!objdataclip.s_attacking && !objdataclip.s_hit && !objdataclip.s_animbusy)) {
if (objdataclip.in_action) {
obje.hdefon = 0;
obje.mdefon = 0;
obje.ldefon = 0;
if (objdataclip.attackmode == undefined || objdataclip.attackmode == 0) {
if (objdataclip.in_movex > 0) {
if (obje.m_dontfacetarget != 1) {
obje._xscale = v4;
}
v3 = 'atkm';
} else {
if (objdataclip.in_movex < 0) {
if (obje.m_dontfacetarget != 1) {
obje._xscale = -v4;
}
v3 = 'atkm';
}
}
if (objdataclip.in_movey > 0) {
v3 = 'atkh';
} else {
if (objdataclip.in_movey < 0) {
v3 = 'atkl';
}
}
} else {
if (objdataclip.in_movex > 0) {
if (obje.m_dontfacetarget != 1) {
obje._xscale = v4;
}
v3 = 'atkp';
} else {
if (objdataclip.in_movex < 0) {
if (obje.m_dontfacetarget != 1) {
obje._xscale = -v4;
}
v3 = 'atkp';
}
}
if (objdataclip.in_movey > 0) {
v3 = 'atkp';
} else {
if (objdataclip.in_movey < 0) {
v3 = 'atkp';
}
}
}
} else {
if (objdataclip.in_movex > 0) {
obje.hdefon = 0;
obje.mdefon = 0;
obje.ldefon = 0;
if (obje.m_dontfacetarget != 1) {
obje._xscale = v4;
}
if (objdataclip.s_moving == 0) {
v3 = 'walk';
}
} else {
if (objdataclip.in_movex < 0) {
obje.hdefon = 0;
obje.mdefon = 0;
obje.ldefon = 0;
if (obje.m_dontfacetarget != 1) {
obje._xscale = -v4;
}
if (objdataclip.s_moving == 0) {
v3 = 'walk';
}
} else {
if (objdataclip.in_movex == 0) {
obje.hdefon = 0;
obje.mdefon = 0;
obje.ldefon = 0;
if (objdataclip.in_movey > 0) {
obje.hdefon = 1;
} else {
if (objdataclip.in_movey < 0) {
obje.ldefon = 1;
} else {
if (objdataclip.in_movey == 0) {
obje.mdefon = 1;
}
}
}
}
}
}
}
if (objdataclip.in_movex == 0) {
if (objdataclip.s_moving != 0 && !objdataclip.s_attacking && !objdataclip.s_hit && !objdataclip.s_animbusy) {
v3 = 'idle';
}
}
} else {
if (objdataclip.s_moving != 0) {
}
}
}
objdataclip.def_h._visible = false;
objdataclip.def_m._visible = false;
objdataclip.def_l._visible = false;
if (obje.hdefon != 0) {
objdataclip.def_h._visible = true;
}
if (obje.mdefon != 0) {
objdataclip.def_m._visible = true;
}
if (obje.ldefon != 0) {
objdataclip.def_l._visible = true;
}
if (v3 == 'null') {
if (objdataclip.s_idle == 0 && objdataclip.s_moving == 0 && objdataclip.s_attacking == 0 && objdataclip.s_hit == 1 && objdataclip.s_animbusy == 1) {
v3 = objdataclip.__animcurrent;
}
}
if (v3 != 'null') {
if (v3 == 'walk') {
if (objdataclip.replaceAnimWalk != undefined) {
v3 = objdataclip.replaceAnimWalk;
} else {
v3 = 'walk';
}
}
if (options != undefined and options == 2) {
objdataclip.__animcurrent = v3;
objdataclip.gotoAndStop(v3);
} else {
if (objdataclip.__animcurrent != v3) {
goPlay(objdataclip, v3);
} else {}
}
} else {}
}
function moveplayer() {
GLOBAL_PLAYER.attackmode = GLOBAL_PLAYER_MODE;
movecharacter(GLOBAL_PLAYER, GLOBAL_PLAYER, 2);
if (!isPlayerConsumed(GLOBAL_PLAYER)) {
if (GLOBAL_PLAYER.s_idle == 0 && GLOBAL_PLAYER.s_moving != 0 && GLOBAL_PLAYER.s_vx == 0 && !GLOBAL_PLAYER.s_animbusy) {
GLOBAL_PLAYER._x += (GLOBAL_PLAYER._xscale / Math.abs(GLOBAL_PLAYER._xscale)) * GLOBAL_PLAYER.s_moving;
}
}
if (GLOBAL_PLAYER.s_vx != 0 && !GLOBAL_PLAYER.s_animbusy) {
if (GLOBAL_PLAYER._x > GLOBAL_ENEMY._x) {
GLOBAL_PLAYER._x += GLOBAL_PLAYER.s_vx;
} else {
GLOBAL_PLAYER._x -= GLOBAL_PLAYER.s_vx;
}
}
moveCharacterGravity(GLOBAL_PLAYER, GLOBAL_PLAYER);
if (GLOBAL_ENEMY.m_notsolid != 1) {
var v2 = getCBox(GLOBAL_ENEMY.enemy);
var v3 = getCBox(GLOBAL_PLAYER);
if (v3 != undefined && v2 != undefined && v3.hitTest(v2)) {
if (GLOBAL_PLAYER._x < GLOBAL_ENEMY._x) {
GLOBAL_PLAYER._x += (v2.getBounds(_root)).xMin - (v3.getBounds(_root)).xMax;
} else {
GLOBAL_PLAYER._x += (v2.getBounds(_root)).xMax - (v3.getBounds(_root)).xMin;
}
}
}
}
function moveenemy(ENMC) {
moveCharacterGravity(ENMC, getEnemyT(ENMC));
if ((getEnemyT(ENMC))._run != undefined) {
return (getEnemyT(ENMC))._run(this, ENMC);
}
if (getEnemyT(ENMC) != undefined) {
movecharacter(ENMC, getEnemyT(ENMC), undefined);
} else {
movecharacter(ENMC, ENMC, undefined);
}
if (ENMC.m_dontfacetarget != 1) {
enemyFacePlayer();
} else {}
if ((getEnemyT(ENMC)).s_idle == 0 && (getEnemyT(ENMC)).s_moving != 0 && !(getEnemyT(ENMC)).s_animbusy) {
ENMC._x += (ENMC._xscale / Math.abs(ENMC._xscale)) * (getEnemyT(ENMC)).s_moving * ENMC.s_movespeed;
}
if ((getEnemyT(ENMC)).s_vx != 0 && !(getEnemyT(ENMC)).s_animbusy) {
if (GLOBAL_PLAYER._x > ENMC._x) {
ENMC._x -= (getEnemyT(ENMC)).s_vx;
} else {
ENMC._x += (getEnemyT(ENMC)).s_vx;
}
} else {
if ((getEnemyT(ENMC)).s_moving != 0 && (getEnemyT(ENMC)).s_vx != 0 && (getEnemyT(ENMC)).s_animbusy) {
if (GLOBAL_PLAYER._x > ENMC._x) {
ENMC._x -= (getEnemyT(ENMC)).s_vx;
} else {
ENMC._x += (getEnemyT(ENMC)).s_vx;
}
}
}
if (ENMC.m_notsolid != 1) {
if ((getCBox(ENMC.enemy)).hitTest(getCBox(GLOBAL_PLAYER))) {
if (ENMC._x < GLOBAL_PLAYER._x) {
ENMC._x += ((getCBox(GLOBAL_PLAYER)).getBounds(_root)).xMin - ((getCBox(ENMC.enemy)).getBounds(_root)).xMax;
} else {
ENMC._x += ((getCBox(GLOBAL_PLAYER)).getBounds(_root)).xMax - ((getCBox(ENMC.enemy)).getBounds(_root)).xMin;
}
}
}
}
function setClipAt(mc, clip) {
var v2 = clip.getBounds(_root);
mc._x = (v2.xMax + v2.xMin) * 0.5;
mc._y = (v2.xMax + v2.xMin) * 0.5;
}
function setClipAtExact(mc, clip) {
var v2 = mcPointToGlobal(clip, 0, 0);
var v6 = mcPointToGlobal(clip, 1, 0);
var v4 = v6._x - v2._x;
var v3 = v6._y - v2._y;
var v5 = Math.sqrt(v4 * v4 + v3 * v3);
var v7 = 57.29577951308232 * Math.atan2(v3 / v5, v4 / v5);
mc._x = v2._x;
mc._y = v2._y;
mc._rotation = v7;
mc._xscale = 100 * v5 / 1;
mc._yscale = mc._xscale;
}
function _resetSparkSim(clip) {
clip.xvel = 0;
clip.yvel = 0;
clip.rotvel = 0;
clip.xacc = 0;
clip.yacc = 0;
clip.rotacc = 0;
clip.shrinkto = 0;
clip.shrinktime = 0;
clip.shrinktimemax = 0;
}
function _updateSparkSim(mc, steps) {
if (mc.xacc != 0) {
mc.xvel += steps * mc.xacc;
}
if (mc.yacc != 0) {
mc.yvel += steps * mc.yacc;
}
if (mc.rotacc != 0) {
mc.rotvel += steps * mc.rotacc;
}
if (mc.xvel != 0) {
mc._x += steps * mc.xvel;
}
if (mc.yvel != 0) {
mc._y += steps * mc.yvel;
}
if (mc.rotvel != 0) {
mc._rotation += steps * mc.rotvel;
}
if (mc.shrinktimemax > 0) {
if (mc.shrinktime == mc.shrinktimemax) {
mc._originalscalex = mc._xscale;
mc._originalscaley = mc._yscale;
}
mc.shrinktime -= steps;
if (mc.shrinktime < 0) {
mc.shrinktime = 0;
}
var v3 = (1 - mc.shrinkto) * (1 * mc.shrinktime / 1 * mc.shrinktimemax);
mc._xscale = (mc.shrinkto + v3) * mc._originalscalex;
mc._yscale = (mc.shrinkto + v3) * mc._originalscaley;
}
}
function _setClipPhysics(clip, vx, vy, ax, ay, rv, ra, shrinkin, shrinkamount) {
if (vx != undefined) {
clip.xvel = vx;
} else {
clip.xvel = 0;
}
if (vy != undefined) {
clip.yvel = vy;
} else {
clip.yvel = 0;
}
if (ax != undefined) {
clip.xacc = ax;
} else {
clip.xacc = 0;
}
if (ay != undefined) {
clip.yacc = ay;
} else {
clip.yacc = 0;
}
if (rv != undefined) {
clip.rotvel = rv;
} else {
clip.rotvel = 0;
}
if (ra != undefined) {
clip.rotacc = ra;
} else {
clip.rotacc = 0;
}
if (shrinkin != undefined) {
clip.shrinkto = 0;
clip.shrinktime = shrinkin;
clip.shrinktimemax = shrinkin;
if (shrinkamount != undefined) {
clip.shrinkto = shrinkamount / 100;
}
} else {
clip.shrinktimemax = 0;
clip.shrinkto = 0;
clip.shrinktime = 0;
}
}
function _parseClipPhysicsAndSet(clip, lex) {
var v5;
var v4;
var v10;
var v9;
var v7;
var v11;
var v8;
var v6;
var v2 = lex.split(',');
var v3 = v2.length;
var v1 = 0;
while (v1 < v3) {
if (v2[v1] == 'MoveUp') {
++v1;
if (v1 < v3) {
v4 = -Number(v2[v1]);
}
} else {
if (v2[v1] == 'MoveRight') {
++v1;
if (v1 < v3) {
v5 = Number(v2[v1]);
}
} else {
if (v2[v1] == 'MoveLeft') {
++v1;
if (v1 < v3) {
v5 = -Number(v2[v1]);
}
} else {
if (v2[v1] == 'MoveDown') {
++v1;
if (v1 < v3) {
v4 = Number(v2[v1]);
}
} else {
if (v2[v1] == 'Spin') {
++v1;
if (v1 < v3) {
v7 = Number(v2[v1]);
}
} else {
if (v2[v1] == 'Shrink') {
++v1;
if (v1 < v3) {
v8 = 60;
v6 = Number(v2[v1]);
}
}
}
}
}
}
}
++v1;
}
_setClipPhysics(clip, v5, v4, v10, v9, v7, v11, v8, v6);
}
function setEnemySparkPhysics(lex) {
_parseClipPhysicsAndSet(GLOBAL_ENEMYSPARK, lex);
}
function setPlayerSparkPhysics(lex) {
_parseClipPhysicsAndSet(GLOBAL_PLAYERSPARK, lex);
}
function setEnemySparkAnim(anim) {
if (anim != undefined) {
GLOBAL_PLAYERSPARK.gotoAndPlay(anim);
}
}
function setPlayerSparkAt(clip, anim, offsetx, offsety) {
setClipAt(GLOBAL_PLAYERSPARK, clip);
_resetSparkSim(GLOBAL_PLAYERSPARK);
if (GLOBAL_PLAYER._xscale < 0) {
GLOBAL_PLAYERSPARK._xscale = -100;
} else {
GLOBAL_PLAYERSPARK._xscale = 100;
}
if (offsetx != undefined) {
if (GLOBAL_PLAYERSPARK._xscale > 0) {
GLOBAL_PLAYERSPARK._x += offsetx;
} else {
GLOBAL_PLAYERSPARK._x -= offsetx;
}
}
if (offsety != undefined) {
GLOBAL_PLAYERSPARK._y += offsety;
}
if (anim != undefined) {
GLOBAL_PLAYERSPARK.gotoAndPlay(anim);
}
}
function setEnemySparkAt(clip, anim, offsetx, offsety) {
setClipAt(GLOBAL_ENEMYSPARK, clip);
_resetSparkSim(GLOBAL_ENEMYSPARK);
if (GLOBAL_ENEMY._xscale < 0) {
GLOBAL_ENEMYSPARK._xscale = -100;
} else {
GLOBAL_ENEMYSPARK._xscale = 100;
}
if (offsetx != undefined) {
if (GLOBAL_ENEMYSPARK._xscale > 0) {
GLOBAL_ENEMYSPARK._x += offsetx;
} else {
GLOBAL_ENEMYSPARK._x -= offsetx;
}
}
if (offsety != undefined) {
GLOBAL_ENEMYSPARK._y += offsety;
}
if (anim != undefined) {
GLOBAL_ENEMYSPARK.gotoAndPlay(anim);
}
}
function setPlayerScale(val) {
GLOBAL_PLAYER._xscale = val * (GLOBAL_PLAYER._xscale / Math.abs(GLOBAL_PLAYER._xscale));
GLOBAL_PLAYER._yscale = val * (GLOBAL_PLAYER._yscale / Math.abs(GLOBAL_PLAYER._yscale));
}
function getPlayerScale() {
return Math.abs(GLOBAL_PLAYER._xscale);
}
function setEnemySparkOnScreen(anim, screenfloatx, screenfloaty, screenscale) {
_resetSparkSim(GLOBAL_ENEMYSPARK);
GLOBAL_ENEMYSPARK._x = _parent.camControl._x;
GLOBAL_ENEMYSPARK._y = _parent.camControl._y;
var v3 = 0;
if (screenfloatx != undefined) {
v3 = screenfloatx * _parent.camControl.fixX * (_parent.camControl._xscale / 200);
}
var v2 = 0;
if (screenfloaty != undefined) {
v2 = -screenfloaty * _parent.camControl.fixY * (_parent.camControl._yscale / 200);
}
GLOBAL_ENEMYSPARK._x += v3;
GLOBAL_ENEMYSPARK._y += v2;
if (screenscale != undefined) {
GLOBAL_ENEMYSPARK._xscale = screenscale * Math.abs(_parent.camControl._xscale / 100);
GLOBAL_ENEMYSPARK._yscale = screenscale * Math.abs(_parent.camControl._yscale / 100);
}
if (anim != undefined) {
GLOBAL_ENEMYSPARK.gotoAndPlay(anim);
}
}
function setEnemySparkAtExact(clip, anim, param) {
_resetSparkSim(GLOBAL_ENEMYSPARK);
setClipAtExact(GLOBAL_ENEMYSPARK, clip);
if (param != undefined) {
for (var v2 in param) {
GLOBAL_ENEMYSPARK[v2] = param[v2];
}
}
if (anim != undefined) {
GLOBAL_ENEMYSPARK.gotoAndPlay(anim);
}
}
function unscaleEnemySpark(arg1) {
if (arg1 != undefined) {
GLOBAL_ENEMYSPARK._xscale = arg1;
GLOBAL_ENEMYSPARK._yscale = arg1;
} else {
GLOBAL_ENEMYSPARK._xscale = 100;
GLOBAL_ENEMYSPARK._yscale = 100;
}
}
function getEnemySpark() {
return GLOBAL_ENEMYSPARK;
}
function damagecollisions() {
var v2 = null;
var v1 = null;
var v4 = getABox(GLOBAL_PLAYER);
var v6 = getCBox(GLOBAL_PLAYER);
var v3 = getABox(GLOBAL_ENEMY.enemy);
var v5 = getCBox(GLOBAL_ENEMY.enemy);
if ((getEnemyT(GLOBAL_ENEMY)).s_attacking) {
if (v3 != undefined && v6 != undefined && v3.hitTest(v6)) {
if ((getEnemyT(GLOBAL_ENEMY)).s_atktype < 1) {
var v7 = GLOBAL_ENEMY.latk - GLOBAL_PLAYER.ldef;
if (GLOBAL_PLAYER.ldefon != 0) {
v7 /= 2;
}
v7 = numclamp(v7);
setEnemySparkAt(getABox(GLOBAL_ENEMY.enemy));
if (GLOBAL_PLAYER.ldefon != 0) {
GLOBAL_ENEMYSPARK.gotoAndPlay('cutblock');
} else {
GLOBAL_ENEMYSPARK.gotoAndPlay('cutlow');
}
GLOBAL_PLAYER.hp -= v7;
v2 = 'hitl';
GLOBAL_PLAYER.s_hit = 1;
(getEnemyT(GLOBAL_ENEMY)).s_attacking = 0;
Log(GLOBAL_ENEMY.m_name + ' hit ' + GLOBAL_PLAYER.m_name + ' for ' + v7 + '!');
} else {
if ((getEnemyT(GLOBAL_ENEMY)).s_atktype == 1) {
var v7 = GLOBAL_ENEMY.matk - GLOBAL_PLAYER.mdef;
if (GLOBAL_PLAYER.mdefon != 0) {
v7 /= 2;
}
v7 = numclamp(v7);
setEnemySparkAt(getABox(GLOBAL_ENEMY.enemy));
if (GLOBAL_PLAYER.mdefon != 0) {
GLOBAL_ENEMYSPARK.gotoAndPlay('cutblock');
} else {
GLOBAL_ENEMYSPARK.gotoAndPlay('cutmid');
}
GLOBAL_PLAYER.hp -= v7;
v2 = 'hitm';
GLOBAL_PLAYER.s_hit = 1;
(getEnemyT(GLOBAL_ENEMY)).s_attacking = 0;
Log(GLOBAL_ENEMY.m_name + ' hit ' + GLOBAL_PLAYER.m_name + ' for ' + v7 + '!');
} else {
if ((getEnemyT(GLOBAL_ENEMY)).s_atktype == 2) {
var v7 = GLOBAL_ENEMY.hatk - GLOBAL_PLAYER.hdef;
if (GLOBAL_PLAYER.hdefon != 0) {
v7 /= 2;
}
v7 = numclamp(v7);
setEnemySparkAt(getABox(GLOBAL_ENEMY.enemy));
if (GLOBAL_PLAYER.hdefon != 0) {
GLOBAL_ENEMYSPARK.gotoAndPlay('cutblock');
} else {
GLOBAL_ENEMYSPARK.gotoAndPlay('cuthigh');
}
GLOBAL_PLAYER.hp -= v7;
v2 = 'hith';
GLOBAL_PLAYER.s_hit = 1;
(getEnemyT(GLOBAL_ENEMY)).s_attacking = 0;
Log(GLOBAL_ENEMY.m_name + ' hit ' + GLOBAL_PLAYER.m_name + ' for ' + v7 + '!');
} else {}
}
}
numclamp(GLOBAL_PLAYER.hp);
}
}
if (GLOBAL_PLAYER.s_attacking and GLOBAL_ENEMY.hp >= 1) {
if (v5 != undefined && v4 != undefined && v4.hitTest(v5)) {
if (GLOBAL_PLAYER.s_atktype < 1) {
var v7 = GLOBAL_PLAYER.latk - GLOBAL_ENEMY.ldef;
if (GLOBAL_ENEMY.ldefon != 0) {
v7 /= 2;
}
v7 = numclamp(v7);
setPlayerSparkAt(getABox(GLOBAL_PLAYER));
if (GLOBAL_ENEMY.ldefon != 0) {
GLOBAL_PLAYERSPARK.gotoAndPlay('hitblock');
} else {
GLOBAL_PLAYERSPARK.gotoAndPlay('hitlow');
}
GLOBAL_ENEMY.hp -= v7;
if (!GLOBAL_ENEMY.ignore_hitanim) {
if (v7 > GLOBAL_ENEMY.ignore_hitweak && !GLOBAL_ENEMY.ignore_hitanimonly) {
v1 = 'hitl';
}
}
if (v7 > GLOBAL_ENEMY.ignore_hitweak && !GLOBAL_ENEMY.ignore_hitanimonly) {
GLOBAL_ENEMY.s_hit = true;
GLOBAL_ENEMY.ai = -1;
}
GLOBAL_PLAYER.s_attacking = 0;
if (GLOBAL_SCORE_ON_DAMAGE * v7 > 0) {
GLOBAL_POINTS += GLOBAL_SCORE_ON_DAMAGE * v7;
Log(GLOBAL_PLAYER.m_name + ' hit ' + GLOBAL_ENEMY.m_name + ' for ' + v7 + '!');
}
} else {
if (GLOBAL_PLAYER.s_atktype == 1) {
var v7 = GLOBAL_PLAYER.matk - GLOBAL_ENEMY.mdef;
if (GLOBAL_ENEMY.lmdefon != 0) {
v7 /= 2;
}
v7 = numclamp(v7);
setPlayerSparkAt(getABox(GLOBAL_PLAYER));
if (GLOBAL_ENEMY.lmdefon != 0) {
GLOBAL_PLAYERSPARK.gotoAndPlay('hitblock');
} else {
GLOBAL_PLAYERSPARK.gotoAndPlay('hitmid');
}
GLOBAL_ENEMY.hp -= v7;
if (!GLOBAL_ENEMY.ignore_hitanim) {
if (v7 > GLOBAL_ENEMY.ignore_hitweak && !GLOBAL_ENEMY.ignore_hitanimonly) {
v1 = 'hitm';
}
}
if (v7 > GLOBAL_ENEMY.ignore_hitweak && !GLOBAL_ENEMY.ignore_hitanimonly) {
GLOBAL_ENEMY.s_hit = true;
GLOBAL_ENEMY.ai = -1;
}
GLOBAL_PLAYER.s_attacking = 0;
if (GLOBAL_SCORE_ON_DAMAGE * v7 > 0) {
GLOBAL_POINTS += GLOBAL_SCORE_ON_DAMAGE * v7;
Log(GLOBAL_PLAYER.m_name + ' hit ' + GLOBAL_ENEMY.m_name + ' for ' + v7 + '!');
}
} else {
if (GLOBAL_PLAYER.s_atktype == 2) {
var v7 = GLOBAL_PLAYER.hatk - GLOBAL_ENEMY.hdef;
if (GLOBAL_ENEMY.hdefon != 0) {
v7 /= 2;
}
v7 = numclamp(v7);
setPlayerSparkAt(getABox(GLOBAL_PLAYER));
if (GLOBAL_ENEMY.hdefon != 0) {
GLOBAL_PLAYERSPARK.gotoAndPlay('hitblock');
} else {
GLOBAL_PLAYERSPARK.gotoAndPlay('hithigh');
}
GLOBAL_ENEMY.hp -= v7;
if (!GLOBAL_ENEMY.ignore_hitanim) {
if (v7 > GLOBAL_ENEMY.ignore_hitweak && !GLOBAL_ENEMY.ignore_hitanimonly) {
v1 = 'hith';
}
}
if (v7 > GLOBAL_ENEMY.ignore_hitweak && !GLOBAL_ENEMY.ignore_hitanimonly) {
GLOBAL_ENEMY.s_hit = true;
GLOBAL_ENEMY.ai = -1;
}
GLOBAL_PLAYER.s_attacking = 0;
if (GLOBAL_SCORE_ON_DAMAGE * v7 > 0) {
GLOBAL_POINTS += GLOBAL_SCORE_ON_DAMAGE * v7;
Log(GLOBAL_PLAYER.m_name + ' hit ' + GLOBAL_ENEMY.m_name + ' for ' + v7 + '!');
}
} else {
if (GLOBAL_PLAYER.s_atktype == 4) {
var v7 = 0;
if (GLOBAL_ALLOW_PETS) {
setPlayerSparkAt(getABox(GLOBAL_PLAYER));
GLOBAL_PLAYERSPARK.gotoAndPlay('heart');
v1 = 'hitp';
Log(GLOBAL_PLAYER.m_name + ' pet ' + GLOBAL_ENEMY.m_name + '!');
} else {
setPlayerSparkAt(getABox(GLOBAL_PLAYER));
GLOBAL_PLAYERSPARK.gotoAndPlay('heart');
}
GLOBAL_PLAYER.s_attacking = 0;
}
}
}
}
numclamp(GLOBAL_ENEMY.hp);
}
}
if (v1 != null) {
goPlay(getEnemyT(GLOBAL_ENEMY), v1);
}
if (v2 != null) {
goPlay(GLOBAL_PLAYER, v2);
actHurt(GLOBAL_PLAYER, 1);
}
}
function _pickEnemyReset() {
GLOBAL_VALUES = new Object();
GLOBAL_SYNCMAP = new Object();
GLOBAL_POSTSYNC = function (G, Obj, extra) {};
GLOBAL_ENEMY.m_scale = undefined;
GLOBAL_ENEMY.enemy.m_scale = undefined;
(getEnemyT(GLOBAL_ENEMY)).m_scale = undefined;
GLOBAL_ALLOW_PETS = 0;
BLOCK_ENEMY_ONE_FRAME = true;
GLOBAL_SHOW_CONSUMED_PLAYER = false;
}
function pickEnemy(userev) {
GLOBAL_ENEMY_FRAMES_RUN = 0;
GLOBAL_ENEMY_REQUEST_VICTORY = 0;
GLOBAL_ENEMY_REQUEST_VICTORY_NEXT = 0;
var v4 = userev;
var v3;
if (v4 < 2 || v4 > GLOBAL_MAXENEMYFRAMES) {
if (GLOBAL_ENEMY._currentframe + 1 > GLOBAL_MAXENEMYFRAMES) {
_pickEnemyReset();
v3 = 2;
} else {
_pickEnemyReset();
v3 = GLOBAL_ENEMY._currentframe + 1;
}
} else {
if (GLOBAL_ENEMY._currentframe == int(v4)) {
} else {
_pickEnemyReset();
v3 = int(v4);
}
}
if (v3 != undefined) {
GLOBAL_ENEMY.m_scale = 100;
GLOBAL_ENEMY.m_name = 'Default';
GLOBAL_ENEMY.m_status = 'Default';
GLOBAL_ENEMY.m_credit = '';
GLOBAL_ENEMY.maxhp = 1;
GLOBAL_ENEMY.hp = GLOBAL_ENEMY.maxhp;
GLOBAL_ENEMY.enemy.in_movex = 0;
GLOBAL_ENEMY.enemy.in_movey = 0;
GLOBAL_ENEMY.enemy.in_action = 0;
(getEnemyT(GLOBAL_ENEMY)).in_movex = 0;
(getEnemyT(GLOBAL_ENEMY)).in_movey = 0;
(getEnemyT(GLOBAL_ENEMY)).in_action = 0;
GLOBAL_ENEMY.hatk = 0;
GLOBAL_ENEMY.matk = 0;
GLOBAL_ENEMY.latk = 0;
GLOBAL_ENEMY.hdef = 0;
GLOBAL_ENEMY.mdef = 0;
GLOBAL_ENEMY.ldef = 0;
GLOBAL_ENEMY.enemy.s_atktype = 0;
GLOBAL_ENEMY.enemy.s_animbusy = 0;
GLOBAL_ENEMY.enemy.s_idle = 1;
GLOBAL_ENEMY.enemy.s_moving = 0;
GLOBAL_ENEMY.enemy.s_attacking = 0;
GLOBAL_ENEMY.enemy.s_hit = 0;
GLOBAL_ENEMY.enemy.s_vx = 0;
(getEnemyT(GLOBAL_ENEMY)).s_atktype = 0;
(getEnemyT(GLOBAL_ENEMY)).s_animbusy = 0;
(getEnemyT(GLOBAL_ENEMY)).s_idle = 1;
(getEnemyT(GLOBAL_ENEMY)).s_moving = 0;
(getEnemyT(GLOBAL_ENEMY)).s_attacking = 0;
(getEnemyT(GLOBAL_ENEMY)).s_hit = 0;
(getEnemyT(GLOBAL_ENEMY)).s_vx = 0;
GLOBAL_ENEMY.m_cameraoffset = 0;
GLOBAL_ENEMY.m_animPrefix = undefined;
GLOBAL_ENEMY.m_background = undefined;
GLOBAL_ENEMY.m_notsolid = undefined;
GLOBAL_ENEMY.m_dontfacetarget = 0;
GLOBAL_ENEMY.m_dontattackauto = undefined;
GLOBAL_ENEMY.m_dontplayhurt = undefined;
GLOBAL_ENEMY.m_dontplayhurtforweakattacks = -1;
GLOBAL_ENEMY._manuallyReset = undefined;
GLOBAL_ENEMY.is_external = undefined;
GLOBAL_ENEMY.is_external_loaded = undefined;
GLOBAL_ENEMY.enemy.is_external_loaded = undefined;
GLOBAL_ENEMY.enemy.enemy.is_external_loaded = undefined;
GLOBAL_ENEMY.m_loadurl = undefined;
GLOBAL_ENEMY_ATKUSE = new Array(0.1, 0.09, 0.71);
GLOBAL_ENEMY.gotoAndStop(v3);
GLOBAL_ENEMY.enemy.G = this;
GLOBAL_ENEMY.enemy.enemy.G = this;
(getEnemyT(GLOBAL_ENEMY)).G = this;
GLOBAL_ENEMY.m_blatently_reset = 2;
GLOBAL_ENEMY.m_blatently_resetenemy = v3;
if (v3 > GLOBAL_MAXENEMYNONEXTERNAL) {
GLOBAL_ENEMY.m_loadurl = _root.externalURL;
GLOBAL_ENEMY.is_external = _root.externalURL;
GLOBAL_ENEMY.m_name = 'EXTERNAL';
GLOBAL_ENEMY.m_status = 'SxS*NOTLOADED';
var v5 = v3 - GLOBAL_MAXENEMYNONEXTERNAL - 1;
if (v5 < GLOBAL_LOADEEMS.length) {
GLOBAL_ENEMY.m_loadurl = GLOBAL_LOADEEMS[v5];
GLOBAL_ENEMY.is_external = GLOBAL_LOADEEMS[v5];
}
BLOCK_ENEMY_ONE_FRAME = true;
}
musicStop();
}
GLOBAL_ENEMY.enemy.G = this;
(getEnemyT(GLOBAL_ENEMY)).G = this;
GLOBAL_ENEMY.enemy.enemy.G = this;
GLOBAL_ENEMY.ignore_hitweak = -1;
GLOBAL_ENEMY.ignore_hitanim = false;
GLOBAL_ENEMY.ignore_hitanimonly = false;
GLOBAL_ENEMY.hatk_original = GLOBAL_ENEMY.hatk;
GLOBAL_ENEMY.matk_original = GLOBAL_ENEMY.matk;
GLOBAL_ENEMY.latk_original = GLOBAL_ENEMY.latk;
GLOBAL_ENEMY.hdef_original = GLOBAL_ENEMY.hdef;
GLOBAL_ENEMY.mdef_original = GLOBAL_ENEMY.mdef;
GLOBAL_ENEMY.ldef_original = GLOBAL_ENEMY.ldef;
GLOBAL_ENEMY.hatk_original = GLOBAL_ENEMY.hatk;
Log('A new enemy approaches...');
GLOBAL_PLAYER.m_status = 'Normal';
GLOBAL_SCORE_ON_DAMAGE = 1;
GLOBAL_POINTS_START = GLOBAL_POINTS;
fadeInBG();
_resetSparkSim(GLOBAL_ENEMYSPARK);
_resetSparkSim(GLOBAL_PLAYERSPARK);
BLOCK_ENEMY_ONE_FRAME = true;
if (Math.random() < 0.5) {
GLOBAL_ENEMY._x = GLOBAL_PLAYER._x + 640;
GLOBAL_ENEMY._xscale = -Math.abs(GLOBAL_ENEMY._xscale);
} else {
GLOBAL_ENEMY._x = GLOBAL_PLAYER._x - 640;
GLOBAL_ENEMY._xscale = Math.abs(GLOBAL_ENEMY._xscale);
}
GLOBAL_ENEMY_TIMEOUT = 0;
}
function victoryStatus() {
if (GLOBAL_ENEMY.hp < 1) {
return -1;
} else {
return GLOBAL_ENEMY_REQUEST_VICTORY;
}
}
function victoryRequest(nextenemy, endanim) {
GLOBAL_ENEMY_REQUEST_VICTORY = 1;
GLOBAL_ENEMY_REQUEST_VICTORY_NEXT = 0;
if (nextenemy != undefined) {
if (typeof nextenemy == 'number') {
GLOBAL_ENEMY_REQUEST_VICTORY_NEXT = nextenemy;
} else {
if (typeof nextenemy == 'string') {
if (GLOBAL_ENEMIES_BY_NAME.hasOwnProperty(nextenemy)) {
GLOBAL_ENEMY_REQUEST_VICTORY_NEXT = GLOBAL_ENEMIES_BY_NAME[nextenemy];
} else {
_traceF0('requestVictory does not have monster: "' + nextenemy + '"');
}
}
}
}
}
function ObjHitsBody(obj) {
return (getCBox(GLOBAL_PLAYER)).hitTest(obj);
}
function ObjHitsBodyCenter(obj) {
return GLOBAL_PLAYER.centerbox.hitTest(obj);
}
function ObjHitsHead(obj) {
return GLOBAL_PLAYER.head.hitTest(obj);
}
function ObjHitsHeadCenter(obj) {
return GLOBAL_PLAYER.head.center.hitTest(obj);
}
function CanVoreHigh() {
if (GLOBAL_PLAYER.hdefon == 0) {
return true;
}
return false;
}
function CanVoreMid() {
if (GLOBAL_PLAYER.mdefon == 0) {
return true;
}
return false;
}
function CanVoreLow() {
if (GLOBAL_PLAYER.ldefon == 0) {
return true;
}
return false;
}
function CanVore() {
if (GLOBAL_PLAYER.ldefon == 0 && GLOBAL_PLAYER.mdefon == 0 && GLOBAL_PLAYER.hdefon == 0) {
return true;
}
return false;
}
function shakeBegin(freq, amplitude, autodecay) {
if (GLOBAL_CAMERA_SHAKE.use == 0) {
GLOBAL_CAMERA_SHAKE.phase = 0;
GLOBAL_CAMERA_SHAKE.decay = 0;
GLOBAL_CAMERA_SHAKE.maxdecay = 10;
}
GLOBAL_CAMERA_SHAKE.use = 1;
GLOBAL_CAMERA_SHAKE.amp = amplitude;
GLOBAL_CAMERA_SHAKE.freq = freq * Math.PI;
GLOBAL_CAMERA_SHAKE.autodecay = -1;
if (autodecay != undefined) {
if (autodecay > 0) {
GLOBAL_CAMERA_SHAKE.autodecay = autodecay;
} else {
GLOBAL_CAMERA_SHAKE.autodecay = -1;
}
}
}
function shakeEnd(decay) {
GLOBAL_CAMERA_SHAKE.autodecay = -1;
GLOBAL_CAMERA_SHAKE.use = 0;
if (decay != undefined) {
if (decay > 0) {
GLOBAL_CAMERA_SHAKE.maxdecay = decay;
} else {
GLOBAL_CAMERA_SHAKE.maxdecay = 0;
}
}
}
function _setClipColor(mc, color) {
var v2 = new flash.geom.Transform(mc);
var v6 = 1;
var v4 = (color & 255) / 255;
var v7 = (color >> 8 & 255) / 255;
var v3 = (color >> 16 & 255) / 255;
var v1 = new flash.geom.ColorTransform(v4, v7, v3, v6, 0, 0, 0, 0);
v2.colorTransform = v1;
return v1;
}
function fadeBG(nframes, optionalcolor) {
GLOBAL_BG_FADE_COLOR = 0;
if (optionalcolor != undefined) {
GLOBAL_BG_FADE_COLOR = optionalcolor;
}
GLOBAL_BG_FADE = -1;
GLOBAL_BG_FADE_TIME = -1;
if (nframes != undefined and nframes > 0) {
GLOBAL_BG_FADE = 0;
GLOBAL_BG_FADE_TIME = nframes;
} else {
_setClipColor(GLOBAL_SCROLLBG, GLOBAL_BG_FADE_COLOR);
GLOBAL_BG_FADE_PREV_COLOR = GLOBAL_BG_FADE_COLOR;
}
}
function fadeInBG(nframes, optionalcolor) {
GLOBAL_BG_FADE_COLOR = 16777215;
if (optionalcolor != undefined) {
GLOBAL_BG_FADE_COLOR = optionalcolor;
}
GLOBAL_BG_FADE = -1;
GLOBAL_BG_FADE_TIME = -1;
if (nframes != undefined and nframes > 0) {
GLOBAL_BG_FADE = 0;
GLOBAL_BG_FADE_TIME = nframes;
} else {
_setClipColor(GLOBAL_SCROLLBG, GLOBAL_BG_FADE_COLOR);
GLOBAL_BG_FADE_PREV_COLOR = GLOBAL_BG_FADE_COLOR;
}
}
function showConsumedPlayer(how, freezy) {
if (how != undefined) {
GLOBAL_SHOW_CONSUMED_PLAYER = how;
} else {
GLOBAL_SHOW_CONSUMED_PLAYER = false;
}
if (freezy != undefined) {
GLOBAL_SHOW_CONSUMED_PLAYER_FROZEN = freezy;
} else {
GLOBAL_SHOW_CONSUMED_PLAYER_FROZEN = false;
}
}
function musicPlay(localname) {
if (localname != GLOBAL_MUSIC_FILE) {
GLOBAL_MUSIC_FILE = localname;
}
trace('MUSIC: ' + GLOBAL_MUSIC_FILE);
GLOBAL_MUSIC.loadSound(GLOBAL_MUSIC_FILE, true);
GLOBAL_MUSIC.start();
GLOBAL_MUSIC.onSoundComplete = function () {
GLOBAL_MUSIC.start();
};
GLOBAL_MUSIC.setVolume(0.5 * GLOBAL_SET_VOLUME);
}
function musicStop() {
GLOBAL_MUSIC.setVolume(0);
GLOBAL_MUSIC.stop();
}
function musicUpdate() {}
function resetPlayer() {
GLOBAL_PLAYER.hp = 63;
GLOBAL_PLAYER.s_atktype = 0;
GLOBAL_PLAYER.s_animbusy = 0;
GLOBAL_PLAYER.s_idle = 1;
GLOBAL_PLAYER.s_moving = 0;
GLOBAL_PLAYER.s_attacking = 0;
GLOBAL_PLAYER.s_hit = 0;
GLOBAL_PLAYER.s_vx = 0;
GLOBAL_PLAYER.s_consumed = undefined;
GLOBAL_PLAYER._alpha = 100;
GLOBAL_PLAYER.head._alpha = 100;
GLOBAL_PLAYER.head._visible = true;
GLOBAL_PLAYER._visible = true;
setPlayerScale(100);
goPlay(GLOBAL_PLAYER, 'idle');
setPlayerHasHead(true);
G.enemyFacePlayer();
}
function qteEvent(frames, typeobject) {
if (typeobject == undefined) {
typeobject = new Object({'type': 1});
}
for (var v2 in typeobject) {
GLOBAL_QTE_DATA[v2] = typeobject[v2];
}
if (frames == undefined) {
frames = 20;
}
GLOBAL_QTE_DATA.result = 0;
GLOBAL_QTE_DATA.active = true;
GLOBAL_QTE_DATA.timeleft = frames;
GLOBAL_QTE_DATA.qsetup = 0;
GLOBAL_ENEMY.enemy.stop();
(getEnemyT(GLOBAL_ENEMY)).stop();
GLOBAL_PLAYER.stop();
GLOBAL_PLAYER.aniclip.mc.stop();
if (GLOBAL_SHOW_CONSUMED_PLAYER) {
GLOBAL_PLAYER._alpha = 100;
}
}
function qteAbort(setto) {
if (setto != undefined) {
GLOBAL_QTE_DATA.result = setto;
} else {
GLOBAL_QTE_DATA.result = 0;
}
GLOBAL_QTE_DATA.active = 0;
}
function qteCheck() {
trace('Checking QTE result: ' + GLOBAL_QTE_DATA.result);
return GLOBAL_QTE_DATA.result;
}
GLOBAL_SET_VOLUME = 50;
GLOBAL_MAX_PLAYERGRAPHIC = 5;
_root.GLOBAL_WEAPON_TYPE = 2;
GLOBAL_ENEMIES_BY_NAME_LOADING = 0;
GLOBAL_CAMERA_ZOOMPLAYER = 1;
GLOBAL_ALLOW_PETS = 0;
GLOBAL_PLAYER_MODE = 0;
GLOBAL_PLAYER_MODE_MAX = 1;
GLOBAL_PLAYER_MODE_DETECT = 0;
GLOBAL_ENEMY_REQUEST_VICTORY = 0;
GLOBAL_ENEMY_REQUEST_VICTORY_NEXT = 0;
_root.GLOBAL_PLAYERGRAPHIC = 1;
_root.GLOBAL_PLAYERHEAD = 1;
GLOBAL_QTE_DATA = new Object({'result': 0});
ATTACK_MEDIUM = 1;
ATTACK_HIGH = 2;
ATTACK_LOW = 0;
ATTACK_SPECIAL = 1;
_parent.camControl.gotoAndStop('game');
_parent.camControl.resetStage();
GLOBAL_SYNCMAP = new Object();
GLOBAL_POSTSYNC = function (G, Obj, extra) {};
GLOBAL_VALUES = new Object();
GLOBAL_FUNCS = new Object();
_root.nvSetVolume = function (amt100) {
var v2 = new Sound(_parent);
v2.setVolume(amt100);
GLOBAL_SET_VOLUME = amt100;
GLOBAL_MUSIC.setVolume(0.5 * GLOBAL_SET_VOLUME);
};
_root.nvSetVolume(GLOBAL_SET_VOLUME);
GLOBAL_ENEMY_DATA = new Object();
GLOBAL_CURRENT_BACKGROUND = 'default';
GLOBAL_FLOOR = 180;
GLOBAL_LIVES = 6;
GLOBAL_KILLS = 0;
GLOBAL_POINTS = 0;
GLOBAL_LOG = new Array();
GLOBAL_TRUEPAUSE = false;
GLOBAL_PAUSE = false;
GLOBAL_PAUSECTR = false;
GLOBAL_PAUSEHFR = 0;
GLOBAL_PAUSEHFRCTR = 0;
GLOBAL_PLAYER = _parent.player;
GLOBAL_PLAYERHASHEAD = true;
GLOBAL_ENEMY = _parent.enemy;
GLOBAL_ENEMY_TIMEOUT = 0;
GLOBAL_BG = _parent.MBG;
_parent.colorize(_parent.playershad, -100, -100, -100, -50);
_parent.colorize(_parent.enemyshad, -100, -100, -100, -50);
GLOBAL_CAMERA_SHAKE = new Object();
GLOBAL_CAMERA_SHAKE.use = false;
GLOBAL_CAMERA_SHAKE.freq = 5;
GLOBAL_CAMERA_SHAKE.amp = 1;
GLOBAL_CAMERA_SHAKE.decay = 0;
GLOBAL_CAMERA_SHAKE.maxdecay = 0;
GLOBAL_ENEMYSPARK = _parent.enemyspark;
GLOBAL_PLAYERSPARK = _parent.playerspark;
GLOBAL_ENEMY_FRAMES_RUN = 0;
GLOBAL_FULL_TRACE = 0;
GLOBAL_ENEMY_ATKUSE = new Array(0.1, 0.09, 0.71);
GLOBAL_PLAYER_TAPS = new Object();
GLOBAL_SCORE_ON_DAMAGE = 1;
GLOBAL_POINTS_START = 0;
GLOBAL_DELAY_STARTNOISE = 0;
playerTapReset();
GLOBAL_SHOW_CONSUMED_PLAYER = false;
GLOBAL_SHOW_CONSUMED_PLAYER_FROZEN = false;
GLOBAL_MAXENEMYFRAMES = GLOBAL_ENEMY._totalframes;
_traceF0 = _traceFx;
_traceF1 = function (msg) {};
_traceF2 = function (msg) {};
_traceF3 = function (msg) {};
LogScrollOffset = 0;
GLOBAL_BG_FADE = -1;
GLOBAL_BG_FADE_TIME = -1;
GLOBAL_BG_FADE_COLOR = 16777215;
GLOBAL_BG_FADE_PREV_COLOR = 16777215;
GLOBAL_SCROLLBG = _parent.scrollbg;
GLOBAL_MUSIC = new Sound(this);
GLOBAL_MUSIC_FILE = '';
addcharactervariables(GLOBAL_PLAYER);
addcharactervariables(GLOBAL_ENEMY);
GLOBAL_ENEMY.ai = 1;
GLOBAL_PLAYER.m_name = 'Barb';
GLOBAL_PLAYER.m_status = 'Normal';
setPlayerHasHead(true);
GLOBAL_ENEMIES_BY_NAME = new Object();
GLOBAL_ENEMIES_BY_NAME_SORTED = new Array();
BLOCK_ENEMY_ONE_FRAME = true;
pickEnemy(0);
GLOBAL_MAXENEMYNONEXTERNAL = 6;
GLOBAL_MAXENEMYFRAMES = GLOBAL_MAXENEMYNONEXTERNAL + 1;
GLOBAL_LOADEEMS = new Array();
LOADINGXML = false;
REGISTER_FIRST_ENEMY_FRAME = 1;
GLOBAL_ENEMY.gotoAndStop('external');
}
onClipEvent (enterFrame) {
if (REGISTER_FIRST_ENEMY_FRAME) {
GLOBAL_MAXENEMYNONEXTERNAL = GLOBAL_ENEMY._currentframe;
GLOBAL_MAXENEMYFRAMES = GLOBAL_MAXENEMYNONEXTERNAL;
GLOBAL_LOADEEMS = new Array();
REGISTER_FIRST_ENEMY_FRAME = 0;
pickEnemy(0);
BLOCK_ENEMY_ONE_FRAME = true;
trace('Synced auto: ' + GLOBAL_MAXENEMYNONEXTERNAL);
var loadme = new XML();
loadme.ignoreWhite = true;
loadme.onLoad = function (success) {
var v1 = loadme.firstChild.firstChild;
while (v1 != null) {
var v2 = v1.attributes.path;
GLOBAL_LOADEEMS.push(v2);
GLOBAL_MAXENEMYFRAMES += 1;
v1 = v1.nextSibling;
}
trace('loaded XML ' + GLOBAL_LOADEEMS);
LOADINGXML = false;
};
LOADINGXML = true;
loadme.load('external.xml');
}
if (LOADINGXML) {
if (loadme.getBytesTotal() > 0) {
}
return undefined;
}
GLOBAL_PLAYER.aniclip.mc.G = this;
GLOBAL_ENEMY.enemy.G = this;
GLOBAL_ENEMY.enemy.enemy.G = this;
(getEnemyT(GLOBAL_ENEMY)).G = this;
var correctMyExternalEnemy = 0;
if (GLOBAL_ENEMY.m_name == 'EXTERNAL') {
BLOCK_ENEMY_ONE_FRAME = true;
if (GLOBAL_ENEMY.m_status == 'SxS*NOTLOADED') {
if (GLOBAL_ENEMIES_BY_NAME_LOADING > 0) {
pickEnemy(2);
GLOBAL_ENEMIES_BY_NAME_LOADING = 0;
var nenemies = 0;
var names = new Array();
for (var key in GLOBAL_ENEMIES_BY_NAME) {
names.push(new Object({'name': key, 'value': GLOBAL_ENEMIES_BY_NAME[key]}));
}
names.sortOn('name', Array.CASEINSENSITIVE);
GLOBAL_ENEMIES_BY_NAME_SORTED = new Object();
var ia = 0;
while (ia < names.length) {
GLOBAL_ENEMIES_BY_NAME_SORTED[ia + 2] = names[ia].value;
++ia;
}
trace(GLOBAL_ENEMIES_BY_NAME_SORTED);
_parent.camControl.gotoAndStop('game');
return undefined;
}
_stopExtSounds();
if (GLOBAL_ENEMY.m_loadurl != undefined) {
GLOBAL_ENEMY.is_external = GLOBAL_ENEMY.m_loadurl;
GLOBAL_ENEMY.is_external_loaded = false;
GLOBAL_ENEMY._manuallyReset = undefined;
GLOBAL_ENEMY.enemy._xscale = 100;
GLOBAL_ENEMY.enemy._yscale = 100;
_loadMovie(_parent.enemyshad.t.enemy, GLOBAL_ENEMY.m_loadurl, '');
_loadMovie(GLOBAL_ENEMY.enemy, GLOBAL_ENEMY.m_loadurl, '');
} else {
GLOBAL_ENEMY.is_external = _root.externalURL;
GLOBAL_ENEMY.is_external_loaded = false;
GLOBAL_ENEMY._manuallyReset = undefined;
GLOBAL_ENEMY.enemy._xscale = 100;
GLOBAL_ENEMY.enemy._yscale = 100;
_loadMovie(_parent.enemyshad.t.enemy, _root.externalURL, '');
_loadMovie(GLOBAL_ENEMY.enemy, _root.externalURL, '');
}
_stopExtSounds();
_parent.enemyshad.t.enemy.G = this;
_parent.enemyshad.t.enemy.enemy.G = this;
GLOBAL_ENEMY.m_status = '';
} else {}
}
if (GLOBAL_ENEMY.is_external) {
if (GLOBAL_ENEMY.is_external_loaded) {
var FMin = goPlayGetMinFrame(getEnemyT(GLOBAL_ENEMY), 'idle');
if (FMin == undefined) {
FMin = 1;
}
if ((getEnemyT(GLOBAL_ENEMY))._currentframe != FMin) {
correctMyExternalEnemy = 1;
}
}
}
if (GLOBAL_ENEMY.m_blatently_reset > 0) {
--GLOBAL_ENEMY.m_blatently_reset;
if (GLOBAL_ENEMY.m_blatently_reset < 1) {
GLOBAL_CURRENT_BACKGROUND = GLOBAL_ENEMY.m_background;
if (GLOBAL_CURRENT_BACKGROUND == undefined) {
GLOBAL_CURRENT_BACKGROUND = 'default';
}
_parent.scrollbg.gotoAndStop(GLOBAL_CURRENT_BACKGROUND);
var usethisenemy = GLOBAL_ENEMY.m_blatently_resetenemy;
if (GLOBAL_ENEMY_DATA.hasOwnProperty(usethisenemy)) {
} else {
var EDATA = new Object();
EDATA.m_scale = GLOBAL_ENEMY.m_scale;
EDATA.m_name = GLOBAL_ENEMY.m_name;
EDATA.m_status = GLOBAL_ENEMY.m_status;
EDATA.m_credit = GLOBAL_ENEMY.m_credit;
EDATA.maxhp = GLOBAL_ENEMY.maxhp;
_parent.camControl.gui_loadtext = EDATA.m_name;
GLOBAL_ENEMIES_BY_NAME[EDATA.m_name] = GLOBAL_ENEMY._currentframe;
GLOBAL_ENEMY_DATA[usethisenemy] = EDATA;
}
}
}
if (GLOBAL_ENEMIES_BY_NAME_LOADING > 0) {
pickEnemy(Math.floor(GLOBAL_ENEMIES_BY_NAME_LOADING) + 1);
GLOBAL_ENEMIES_BY_NAME_LOADING += 0.5;
_parent.camControl.gotoAndStop('loading');
_parent.scrollbg._visible = false;
return undefined;
} else {
_parent.scrollbg._visible = true;
}
var inputKeyAction = Key.isDown(101) || Key.isDown(32);
var inputKeyLeft = Key.isDown(100) || Key.isDown(37);
var inputKeyRight = Key.isDown(102) || Key.isDown(39);
var inputKeyUp = Key.isDown(104) || Key.isDown(38);
var inputKeyDown = Key.isDown(98) || Key.isDown(40);
var inputMouseX = (_parent.camControl.mouseX - -160) / 320;
var inputMouseY = (_parent.camControl.mouseY - -72) / 144;
var inputMouseB = _parent.m_input_raw_mouse_down;
var inputMouseValid = false;
if (inputMouseX >= 0 && inputMouseX <= 1) {
if (inputMouseY >= 0 && inputMouseY <= 1) {
inputMouseValid = true;
}
}
var inputB = 1 & (Key.isDown(101) || Key.isDown(32));
var inputL = 1 & (Key.isDown(100) || Key.isDown(37));
var inputR = 1 & (Key.isDown(102) || Key.isDown(39));
var inputU = 1 & (Key.isDown(104) || Key.isDown(38));
var inputD = 1 & (Key.isDown(98) || Key.isDown(40));
_parent.camControl.mousecursor.gotoAndStop('none');
if (inputMouseValid) {
if (inputMouseB) {
var useactioncode = false;
if (inputMouseX < 0.5) {
GLOBAL_PLAYER.in_action = false;
} else {
GLOBAL_PLAYER.in_action = true;
useactioncode = true;
}
var dx = inputMouseX / 0.5;
var dy = inputMouseY / 1;
if (dx > 1) {
dx -= 1;
mcframe += 'A';
}
GLOBAL_PLAYER.in_movex = 0;
GLOBAL_PLAYER.in_movey = 0;
if (useactioncode) {
inputB |= 1;
if (dx < 0.333) {
inputL |= 1;
GLOBAL_PLAYER.in_movex = -1;
if (GLOBAL_PLAYER._xscale > 0) {
GLOBAL_PLAYER._xscale = -Math.abs(GLOBAL_PLAYER._xscale);
}
} else {
if (dx > 0.666) {
inputR |= 1;
GLOBAL_PLAYER.in_movex = 1;
if (GLOBAL_PLAYER._xscale < 0) {
GLOBAL_PLAYER._xscale = Math.abs(GLOBAL_PLAYER._xscale);
}
} else {}
}
if (dy < 0.333) {
inputU |= 1;
GLOBAL_PLAYER.in_movey = 1;
} else {
if (dy > 0.666) {
inputD |= 1;
GLOBAL_PLAYER.in_movey = -1;
} else {}
}
} else {
if (Math.abs(dx - 0.5) > Math.abs(dy - 0.5)) {
if (dx < 0.333) {
inputL |= 1;
GLOBAL_PLAYER.in_movex = -1;
if (GLOBAL_PLAYER._xscale > 0) {
GLOBAL_PLAYER._xscale = -Math.abs(GLOBAL_PLAYER._xscale);
}
} else {
if (dx > 0.666) {
inputR |= 1;
GLOBAL_PLAYER.in_movex = 1;
if (GLOBAL_PLAYER._xscale < 0) {
GLOBAL_PLAYER._xscale = Math.abs(GLOBAL_PLAYER._xscale);
}
} else {}
}
} else {
if (dy < 0.333) {
inputU |= 1;
GLOBAL_PLAYER.in_movey = 1;
} else {
if (dy > 0.666) {
inputD |= 1;
GLOBAL_PLAYER.in_movey = -1;
} else {}
}
}
}
} else {}
var mcframe = 'c';
var dx = inputMouseX / 0.5;
var dy = inputMouseY / 1;
if (dx > 1) {
dx -= 1;
mcframe += 'A';
if (dx < 0.333) {
mcframe += 'L';
} else {
if (dx > 0.666) {
mcframe += 'R';
}
}
if (dy < 0.333) {
mcframe += 'U';
} else {
if (dy > 0.666) {
mcframe += 'D';
}
}
} else {
if (Math.abs(dx - 0.5) > Math.abs(dy - 0.5)) {
if (dx < 0.333) {
mcframe += 'L';
} else {
if (dx > 0.666) {
mcframe += 'R';
}
}
} else {
if (dy < 0.333) {
mcframe += 'U';
} else {
if (dy > 0.666) {
mcframe += 'D';
}
}
}
}
_parent.camControl.mousecursor.gotoAndStop(mcframe);
}
if (inputL) {
GLOBAL_PLAYER_TAPS.L += 1;
} else {
GLOBAL_PLAYER_TAPS.L = 0;
}
if (inputR) {
GLOBAL_PLAYER_TAPS.R += 1;
} else {
GLOBAL_PLAYER_TAPS.R = 0;
}
if (inputU) {
GLOBAL_PLAYER_TAPS.U += 1;
} else {
GLOBAL_PLAYER_TAPS.U = 0;
}
if (inputD) {
GLOBAL_PLAYER_TAPS.D += 1;
} else {
GLOBAL_PLAYER_TAPS.D = 0;
}
if (inputB) {
GLOBAL_PLAYER_TAPS.B += 1;
} else {
GLOBAL_PLAYER_TAPS.B = 0;
}
GLOBAL_CAMERA_ZOOMPLAYER = getPlayerScale() / 100;
if (GLOBAL_QTE_DATA.active) {
var QT = _parent.camControl.mcqte;
GLOBAL_QTE_DATA.fadetime = 10;
var deltaxm = 128;
var deltaym = -40;
if (enemyFacingRight()) {
deltaxm = Math.abs(deltaxm);
} else {
deltaxm = -Math.abs(deltaxm);
}
QT._x = deltaxm;
QT._y = deltaym;
QT._visible = true;
if (!GLOBAL_PAUSE) {
GLOBAL_QTE_DATA.timeleft -= 1;
}
if (GLOBAL_QTE_DATA.timeleft < 0) {
GLOBAL_QTE_DATA.active = false;
}
if ((getEnemyT(GLOBAL_ENEMY)).camera != undefined) {
var offy = 0;
var cbounds = (getEnemyT(GLOBAL_ENEMY)).camera.getBounds(_root);
var useviewbox = false;
if (cbounds.xMax != undefined) {
if (cbounds.xMax - cbounds.xMin > 2 && cbounds.yMax - cbounds.yMin > 2) {
useviewbox = true;
}
}
if (useviewbox) {
var xsize = cbounds.xMax - cbounds.xMin;
var ysize = cbounds.yMax - cbounds.yMin;
var ysp = ysize * 320 / 240;
if (xsize >= ysp) {
ysize = xsize * 240 / 320;
} else {
xsize = ysize * 320 / 240;
}
var newx = 0.5 * (cbounds.xMin + cbounds.xMax);
var newy = 0.5 * (cbounds.yMin + cbounds.yMax);
var newxscale = xsize / 3.2;
var newyscale = ysize / 2.4;
_parent.camControl._x = newx;
_parent.camControl._y = newy;
_parent.camControl._xscale = newxscale;
_parent.camControl._yscale = newyscale;
delmove = (160 - newx) * decayspeed;
} else {
_parent.camControl.resetStage();
var offx = (GLOBAL_ENEMY._xscale / Math.abs(GLOBAL_ENEMY._xscale)) * ((getEnemyT(GLOBAL_ENEMY))._xscale / Math.abs((getEnemyT(GLOBAL_ENEMY))._xscale)) * (getEnemyT(GLOBAL_ENEMY)).camera._x;
delmove = (160 - GLOBAL_ENEMY._x - offx) * decayspeed;
cameraComputeZoomScale();
}
}
_parent.camControl.emenydir.gotoAndStop('qte');
_traceF1('QTE Active');
if (GLOBAL_QTE_DATA.type == 1) {
if (GLOBAL_QTE_DATA.qsetup == 0) {
playerTapReset();
var barray = new Array('L', 'D', 'U', 'R');
GLOBAL_QTE_DATA.qbutton = barray[Math.floor(Math.random() * barray.length)];
GLOBAL_QTE_DATA.qsetup = 1;
}
QT.gotoAndStop(GLOBAL_QTE_DATA.qbutton);
if (playerTapGet() == GLOBAL_QTE_DATA.qbutton) {
GLOBAL_QTE_DATA.active = false;
GLOBAL_QTE_DATA.result = 1;
}
} else {
if (GLOBAL_QTE_DATA.type == 2) {
if (GLOBAL_QTE_DATA.qsetup == 0) {
playerTapReset();
var barray = new Array('B', 'L', 'D', 'U', 'R');
GLOBAL_QTE_DATA.qbutton = barray[Math.floor(Math.random() * barray.length)];
GLOBAL_QTE_DATA.qsetup = 1;
}
QT.gotoAndStop(GLOBAL_QTE_DATA.qbutton);
if (playerTapGet() == GLOBAL_QTE_DATA.qbutton) {
GLOBAL_QTE_DATA.active = false;
GLOBAL_QTE_DATA.result = 1;
}
} else {
if (GLOBAL_QTE_DATA.qsetup == 0) {
playerTapReset();
GLOBAL_QTE_DATA.qsetup = 1;
}
QT.gotoAndStop('ANY');
if ((playerTapGet()).length > 0) {
GLOBAL_QTE_DATA.active = false;
GLOBAL_QTE_DATA.result = 1;
}
}
}
if (!GLOBAL_QTE_DATA.active) {
trace(' Should QTE play ');
if (!GLOBAL_PAUSE) {
unpauseall();
}
if (GLOBAL_QTE_DATA.result) {
QT.gotoAndStop('OK');
} else {
QT.gotoAndStop('FAIL');
}
} else {
GLOBAL_ENEMY.enemy.stop();
(getEnemyT(GLOBAL_ENEMY)).stop();
GLOBAL_PLAYER.stop();
GLOBAL_PLAYER.aniclip.mc.stop();
}
if (GLOBAL_SHOW_CONSUMED_PLAYER) {
if (isPlayerConsumed(GLOBAL_PLAYER)) {
GLOBAL_PLAYER._alpha = 100;
} else {
GLOBAL_PLAYER._alpha = 100;
}
} else {
if (isPlayerConsumed(GLOBAL_PLAYER)) {
GLOBAL_PLAYER._alpha = 0;
} else {
GLOBAL_PLAYER._alpha = 100;
}
}
} else {
if (!GLOBAL_PAUSE) {
if (GLOBAL_QTE_DATA.fadetime > 0) {
GLOBAL_QTE_DATA.fadetime -= 1;
} else {
_parent.camControl.mcqte._visible = false;
_parent.camControl.mcqte.gotoAndStop(1);
}
if (inputB) {
GLOBAL_PLAYER.in_action = true;
} else {
GLOBAL_PLAYER.in_action = false;
}
if (inputL) {
GLOBAL_PLAYER.in_movex = -1;
} else {
if (inputR) {
GLOBAL_PLAYER.in_movex = 1;
} else {
GLOBAL_PLAYER.in_movex = 0;
}
}
if (inputU) {
GLOBAL_PLAYER.in_movey = 1;
} else {
if (inputD) {
GLOBAL_PLAYER.in_movey = -1;
} else {
GLOBAL_PLAYER.in_movey = 0;
}
}
if (GLOBAL_PLAYER_MODE_DETECT < 0) {
GLOBAL_PLAYER_MODE_DETECT = 0;
} else {
GLOBAL_PLAYER_MODE_DETECT -= 0.08;
}
if (GLOBAL_PLAYER_TAPS.D == 1) {
GLOBAL_PLAYER_MODE_DETECT += 1;
if (GLOBAL_PLAYER_MODE_DETECT > 3) {
GLOBAL_PLAYER_MODE += 1;
if (GLOBAL_PLAYER_MODE > GLOBAL_PLAYER_MODE_MAX) {
GLOBAL_PLAYER_MODE = 0;
}
setPlayerSparkAt(GLOBAL_PLAYER);
setPlayerSparkPhysics('MoveUp,2');
GLOBAL_PLAYERSPARK.gotoAndPlay('number' + GLOBAL_PLAYER_MODE);
GLOBAL_PLAYER_MODE_DETECT = 0;
}
}
_parent.camControl.mousecursor._x = _parent.camControl.mouseX;
_parent.camControl.mousecursor._y = _parent.camControl.mouseY;
_updateSparkSim(GLOBAL_PLAYERSPARK, 1);
_updateSparkSim(GLOBAL_ENEMYSPARK, 1);
moveplayer();
if ((Math.abs(GLOBAL_PLAYER._x - GLOBAL_ENEMY._x) < 2 * GLOBAL_PLAYER._width || !GLOBAL_PLAYER.s_attacking) && ((getCBox(GLOBAL_PLAYER)).getBounds(_root)).xMax + 16 < ((getCBox(GLOBAL_ENEMY.enemy)).getBounds(_root)).xMin) {
(getEnemyT(GLOBAL_ENEMY)).in_movex = -1 * GLOBAL_ENEMY.ai;
if (Math.random() * 10 < 2) {
GLOBAL_ENEMY.ai = 1;
}
} else {
if ((Math.abs(GLOBAL_PLAYER._x - GLOBAL_ENEMY._x) < 2 * GLOBAL_PLAYER._width || !GLOBAL_PLAYER.s_attacking) && ((getCBox(GLOBAL_PLAYER)).getBounds(_root)).xMin - 16 > ((getCBox(GLOBAL_ENEMY.enemy)).getBounds(_root)).xMax) {
(getEnemyT(GLOBAL_ENEMY)).in_movex = 1 * GLOBAL_ENEMY.ai;
if (Math.random() * 10 < 2) {
GLOBAL_ENEMY.ai = 1;
}
} else {
(getEnemyT(GLOBAL_ENEMY)).in_movex = 0;
if (GLOBAL_PLAYER.s_attacking && !(getEnemyT(GLOBAL_ENEMY)).s_attacking && Math.abs(GLOBAL_PLAYER._x - GLOBAL_ENEMY._x) < 2 * GLOBAL_PLAYER._width) {
GLOBAL_ENEMY.ai = -1;
} else {
if ((getEnemyT(GLOBAL_ENEMY)).s_moving != 0 && !(getEnemyT(GLOBAL_ENEMY)).s_attacking && !(getEnemyT(GLOBAL_ENEMY)).s_hit && !(getEnemyT(GLOBAL_ENEMY)).s_animbusy) {
goPlay(getEnemyT(GLOBAL_ENEMY), 'idle');
} else {
var goleft = GLOBAL_PLAYER._x < GLOBAL_ENEMY._x;
var trulyleft = true;
var whichattack = histSelect(GLOBAL_ENEMY_ATKUSE);
if (GLOBAL_ENEMY.m_dontattackauto != 1) {
if (goleft) {
if (whichattack == 0) {
(getEnemyT(GLOBAL_ENEMY)).in_movex = 0;
(getEnemyT(GLOBAL_ENEMY)).in_movey = 1;
(getEnemyT(GLOBAL_ENEMY)).in_action = 1;
} else {
if (whichattack == 1) {
(getEnemyT(GLOBAL_ENEMY)).in_movex = 0;
(getEnemyT(GLOBAL_ENEMY)).in_movey = -1;
(getEnemyT(GLOBAL_ENEMY)).in_action = 1;
} else {
(getEnemyT(GLOBAL_ENEMY)).in_movex = -1;
(getEnemyT(GLOBAL_ENEMY)).in_movey = 0;
(getEnemyT(GLOBAL_ENEMY)).in_action = 1;
}
}
} else {
if (whichattack == 0) {
(getEnemyT(GLOBAL_ENEMY)).in_movex = 0;
(getEnemyT(GLOBAL_ENEMY)).in_movey = 1;
(getEnemyT(GLOBAL_ENEMY)).in_action = 1;
} else {
if (whichattack == 1) {
(getEnemyT(GLOBAL_ENEMY)).in_movex = 0;
(getEnemyT(GLOBAL_ENEMY)).in_movey = -1;
(getEnemyT(GLOBAL_ENEMY)).in_action = 1;
} else {
(getEnemyT(GLOBAL_ENEMY)).in_movex = 1;
(getEnemyT(GLOBAL_ENEMY)).in_movey = 0;
(getEnemyT(GLOBAL_ENEMY)).in_action = 1;
}
}
}
}
}
}
}
}
if (Key.isDown(87)) {
(getEnemyT(GLOBAL_ENEMY)).in_movey = 1;
} else {
if (Key.isDown(83)) {
(getEnemyT(GLOBAL_ENEMY)).in_movey = -1;
}
}
if (Key.isDown(65)) {
(getEnemyT(GLOBAL_ENEMY)).in_movex = 1;
} else {
if (Key.isDown(68)) {
(getEnemyT(GLOBAL_ENEMY)).in_movex = -1;
}
}
if (Key.isDown(70)) {
(getEnemyT(GLOBAL_ENEMY)).in_action = 1;
}
if (GLOBAL_ENEMY_REQUEST_VICTORY) {
if (((getEnemyT(GLOBAL_ENEMY)).s_idle || (getEnemyT(GLOBAL_ENEMY)).s_moving) && (!(getEnemyT(GLOBAL_ENEMY)).s_attacking && !(getEnemyT(GLOBAL_ENEMY)).s_hit && !(getEnemyT(GLOBAL_ENEMY)).s_animbusy)) {
var movehere = GLOBAL_ENEMY._x - GLOBAL_PLAYER._x;
if (movehere > 0) {
GLOBAL_ENEMY._xscale = Math.abs(GLOBAL_ENEMY._xscale);
(getEnemyT(GLOBAL_ENEMY)).in_movex = -1;
} else {
GLOBAL_ENEMY._xscale = -Math.abs(GLOBAL_ENEMY._xscale);
(getEnemyT(GLOBAL_ENEMY)).in_movex = 1;
}
(getEnemyT(GLOBAL_ENEMY)).in_movey = 0;
(getEnemyT(GLOBAL_ENEMY)).in_action = 0;
setEnemyFaceTarget(0);
}
}
if (GLOBAL_PLAYER.hp > 0) {
GLOBAL_ENEMY.enemy.G = this;
GLOBAL_ENEMY.enemy.enemy.G = this;
(getEnemyT(GLOBAL_ENEMY)).G = this;
if (!BLOCK_ENEMY_ONE_FRAME) {
moveenemy(GLOBAL_ENEMY);
}
}
damagecollisions();
var delmove = 0;
var decayspeed = 0.25;
if (!isPlayerConsumed(GLOBAL_PLAYER)) {
delmove = (160 - GLOBAL_PLAYER._x) * decayspeed;
_parent.camControl.resetStage();
cameraComputeZoomScale();
} else {
if ((getEnemyT(GLOBAL_ENEMY)).camera != undefined) {
var offy = 0;
var cbounds = (getEnemyT(GLOBAL_ENEMY)).camera.getBounds(_root);
var useviewbox = false;
if (cbounds.xMax != undefined) {
if (cbounds.xMax - cbounds.xMin > 2 && cbounds.yMax - cbounds.yMin > 2) {
useviewbox = true;
}
}
if (useviewbox) {
var xsize = cbounds.xMax - cbounds.xMin;
var ysize = cbounds.yMax - cbounds.yMin;
var ysp = ysize * 320 / 240;
if (xsize >= ysp) {
ysize = xsize * 240 / 320;
} else {
xsize = ysize * 320 / 240;
}
var newx = 0.5 * (cbounds.xMin + cbounds.xMax);
var newy = 0.5 * (cbounds.yMin + cbounds.yMax);
var newxscale = xsize / 3.2;
var newyscale = ysize / 2.4;
_parent.camControl._x = newx;
_parent.camControl._y = newy;
_parent.camControl._xscale = newxscale;
_parent.camControl._yscale = newyscale;
delmove = (160 - newx) * decayspeed;
} else {
_parent.camControl.resetStage();
var offx = (GLOBAL_ENEMY._xscale / Math.abs(GLOBAL_ENEMY._xscale)) * ((getEnemyT(GLOBAL_ENEMY))._xscale / Math.abs((getEnemyT(GLOBAL_ENEMY))._xscale)) * (getEnemyT(GLOBAL_ENEMY)).camera._x;
delmove = (160 - GLOBAL_ENEMY._x - offx) * decayspeed;
cameraComputeZoomScale();
}
} else {
_parent.camControl.resetStage();
if (GLOBAL_ENEMY.m_cameraoffset != undefined) {
var offx = (GLOBAL_ENEMY._xscale / Math.abs(GLOBAL_ENEMY._xscale)) * ((getEnemyT(GLOBAL_ENEMY))._xscale / Math.abs((getEnemyT(GLOBAL_ENEMY))._xscale)) * GLOBAL_ENEMY.m_cameraoffset;
delmove = (160 - GLOBAL_ENEMY._x - offx) * decayspeed;
}
cameraComputeZoomScale();
}
}
if (GLOBAL_CAMERA_SHAKE.use != 0) {
_parent.camControl._y += GLOBAL_CAMERA_SHAKE.amp * Math.cos(GLOBAL_CAMERA_SHAKE.phase);
GLOBAL_CAMERA_SHAKE.phase += GLOBAL_CAMERA_SHAKE.freq;
GLOBAL_CAMERA_SHAKE.decay = 0;
if (GLOBAL_CAMERA_SHAKE.autodecay > 0) {
--GLOBAL_CAMERA_SHAKE.autodecay;
if (GLOBAL_CAMERA_SHAKE.autodecay < 1) {
GLOBAL_CAMERA_SHAKE.use = 0;
}
}
} else {
if (GLOBAL_CAMERA_SHAKE.maxdecay > 0) {
var decay = 1 - GLOBAL_CAMERA_SHAKE.decay / GLOBAL_CAMERA_SHAKE.maxdecay;
if (decay < 0) {
decay = 0;
} else {
_parent.camControl._y += decay * GLOBAL_CAMERA_SHAKE.amp * Math.cos(GLOBAL_CAMERA_SHAKE.phase);
GLOBAL_CAMERA_SHAKE.decay += 1;
}
}
}
if (GLOBAL_BG_FADE_TIME >= 0 and GLOBAL_BG_FADE >= 0) {
++GLOBAL_BG_FADE;
if (GLOBAL_BG_FADE >= GLOBAL_BG_FADE_TIME) {
GLOBAL_BG_FADE = GLOBAL_BG_FADE_TIME;
}
var fadef = 1 * GLOBAL_BG_FADE / 1 * GLOBAL_BG_FADE_TIME;
var fader = Math.floor((GLOBAL_BG_FADE_PREV_COLOR & 255) * (1 - fadef) + fadef * (GLOBAL_BG_FADE_COLOR & 255));
var fadeg = Math.floor((GLOBAL_BG_FADE_PREV_COLOR >> 8 & 255) * (1 - fadef) + fadef * (GLOBAL_BG_FADE_COLOR >> 8 & 255));
var fadeb = Math.floor((GLOBAL_BG_FADE_PREV_COLOR >> 16 & 255) * (1 - fadef) + fadef * (GLOBAL_BG_FADE_COLOR >> 16 & 255));
var fadec = fader + (fadeg << 8) + (fadeb << 16);
_setClipColor(_parent.scrollbg, fadec);
if (GLOBAL_BG_FADE >= GLOBAL_BG_FADE_TIME) {
GLOBAL_BG_FADE_PREV_COLOR = GLOBAL_BG_FADE_COLOR;
GLOBAL_BG_FADE_TIME = -1;
GLOBAL_BG_FADE = -1;
}
}
if (delmove != 0) {
_parent.scrollbg.gotoAndStop(GLOBAL_CURRENT_BACKGROUND);
GLOBAL_PLAYER._x += delmove;
GLOBAL_ENEMY._x += delmove;
_parent.scrollbg.mc._x += delmove;
var waxol = _parent.scrollbg.mc._width / 3;
if (_parent.scrollbg.mc._x < 0) {
_parent.scrollbg.mc._x += waxol;
} else {
if (_parent.scrollbg.mc._x > waxol) {
_parent.scrollbg.mc._x -= waxol;
}
}
}
if (isPlayerConsumed(GLOBAL_PLAYER)) {
_parent.camControl.emenydir.gotoAndStop('eaten');
} else {
if (GLOBAL_PLAYER.hp < 1) {
_parent.camControl.emenydir.gotoAndStop('dead');
} else {
if (GLOBAL_ENEMY._x < GLOBAL_PLAYER._x - 160) {
_parent.camControl.emenydir.gotoAndStop(3);
} else {
if (GLOBAL_ENEMY._x > GLOBAL_PLAYER._x + 160) {
_parent.camControl.emenydir.gotoAndStop(2);
} else {
_parent.camControl.emenydir.gotoAndStop(1);
}
}
}
}
if (GLOBAL_PLAYER.hp < 1) {
if (!GLOBAL_PLAYER.s_hit && !GLOBAL_PLAYER.s_animbusy) {
goPlay(GLOBAL_PLAYER, 'death');
}
}
if (GLOBAL_ENEMY.hp < 1) {
GLOBAL_ENEMY.hp = 0;
if (!GLOBAL_ENEMY.ignore_hitanim) {
if (GLOBAL_ENEMY_TIMEOUT == 1) {
goPlay(getEnemyT(GLOBAL_ENEMY), 'death');
++GLOBAL_KILLS;
Log('YOU KILLED THE ' + GLOBAL_ENEMY.m_name + '!');
}
++GLOBAL_ENEMY_TIMEOUT;
if (GLOBAL_ENEMY_TIMEOUT > 60) {
pickEnemy(0);
resetPlayer();
}
} else {
GLOBAL_ENEMY_TIMEOUT = 0;
}
} else {
if (GLOBAL_ENEMY_REQUEST_VICTORY) {
if (GLOBAL_ENEMY_TIMEOUT == 1) {
Log('YOU DEFEATED THE ' + GLOBAL_ENEMY.m_name + '!');
}
if (_parent.camControl.bounds.hitTest(GLOBAL_ENEMY)) {
} else {
trace('notvisible! ');
GLOBAL_ENEMY_TIMEOUT = 150;
}
++GLOBAL_ENEMY_TIMEOUT;
if (GLOBAL_ENEMY_TIMEOUT > 150) {
pickEnemy(GLOBAL_ENEMY_REQUEST_VICTORY_NEXT);
}
} else {
GLOBAL_ENEMY_TIMEOUT = 0;
}
}
if (GLOBAL_SHOW_CONSUMED_PLAYER) {
if (isPlayerConsumed(GLOBAL_PLAYER)) {
GLOBAL_PLAYER._alpha = 100;
} else {
GLOBAL_PLAYER._alpha = 100;
}
} else {
if (isPlayerConsumed(GLOBAL_PLAYER)) {
GLOBAL_PLAYER._alpha = 0;
} else {
GLOBAL_PLAYER._alpha = 100;
}
}
GLOBAL_ENEMYSPARK.nextFrame();
GLOBAL_PLAYERSPARK.nextFrame();
_parent.camControl.gui_enemyhp.setbarvalue(GLOBAL_ENEMY.hp);
_parent.camControl.gui_playerhp.setbarvalue(GLOBAL_PLAYER.hp);
_parent.camControl.gui_playername = GLOBAL_PLAYER.m_name;
_parent.camControl.gui_playerstatus = GLOBAL_PLAYER.m_status;
_parent.camControl.gui_enemyname = GLOBAL_ENEMY.m_name;
_parent.camControl.gui_enemystatus = GLOBAL_ENEMY.m_status + '[' + GLOBAL_ENEMY.m_credit + ']';
_parent.camControl.gui_points = 'Score: ' + GLOBAL_POINTS;
_parent.camControl.gui_kills = 'Kills: ' + GLOBAL_KILLS;
_parent.playershad._y = calcShadowPosition(GLOBAL_PLAYER._y);
_parent.playershad._x = GLOBAL_PLAYER._x;
_parent.playershad._yscale = 10 * calcShadowScale(GLOBAL_PLAYER._y);
_parent.playershad._xscale = GLOBAL_PLAYER._xscale * calcShadowScale(GLOBAL_PLAYER._y);
_parent.playershad.t.gotoAndStop(GLOBAL_PLAYER._currentframe);
_parent.playershad._alpha = GLOBAL_PLAYER._alpha;
if (GLOBAL_SHOW_CONSUMED_PLAYER) {
_parent.playershad._visible = true;
} else {
if (isPlayerConsumed(GLOBAL_PLAYER)) {
_parent.playershad._visible = false;
} else {
_parent.playershad._visible = true;
}
}
_parent.playershad.t.head._alpha = GLOBAL_PLAYER.head._alpha;
_parent.playershad.t.head._x = GLOBAL_PLAYER.head._x;
_parent.playershad.t.head._y = GLOBAL_PLAYER.head._y;
_parent.enemyshad._y = calcShadowPosition(GLOBAL_ENEMY._y);
_parent.enemyshad._x = GLOBAL_ENEMY._x;
_parent.enemyshad._xscale = 100;
_parent.enemyshad._yscale = 10;
_parent.enemyshad.t._xscale = GLOBAL_ENEMY._xscale * calcShadowScale(GLOBAL_ENEMY._y);
_parent.enemyshad.t._yscale = GLOBAL_ENEMY._yscale * calcShadowScale(GLOBAL_ENEMY._y);
_parent.enemyshad.t.enemy._xscale = GLOBAL_ENEMY.enemy._xscale;
_parent.enemyshad.t.enemy._yscale = GLOBAL_ENEMY.enemy._yscale;
_parent.enemyshad.t.enemy.enemy._xscale = GLOBAL_ENEMY.enemy.enemy._xscale;
_parent.enemyshad.t.enemy.enemy._yscale = GLOBAL_ENEMY.enemy.enemy._yscale;
_parent.enemyshad.t.enemy.G = undefined;
_parent.enemyshad.t.enemy.enemy.G = undefined;
_parent.enemyshad.t.G = undefined;
_parent.enemyshad.G = undefined;
_parent.enemyshad.t.gotoAndStop(GLOBAL_ENEMY._currentframe);
_parent.enemyshad.t.enemy.gotoAndStop(GLOBAL_ENEMY.enemy._currentframe);
_parent.enemyshad.t.enemy.enemy.gotoAndStop(GLOBAL_ENEMY.enemy.enemy._currentframe);
++GLOBAL_ENEMY_FRAMES_RUN;
} else {
if (GLOBAL_TRUEPAUSE) {
if (inputMouseValid) {
if (inputMouseB) {
if (inputMouseX < 0.333) {
inputKeyLeft = 1;
} else {
if (inputMouseX > 0.666) {
inputKeyRight = 1;
}
}
if (inputMouseY < 0.333) {
inputKeyUp = 1;
} else {
if (inputMouseY > 0.666) {
inputKeyDown = 1;
}
}
} else {}
}
var delx = inputKeyRight - inputKeyLeft;
var dely = inputKeyUp - inputKeyDown;
if (inputKeyAction) {
if (dely != 0) {
var factorx = 1;
if (dely > 0) {
factorx = 1.125;
} else {
if (dely < 0) {
factorx = 0.8;
}
}
_parent.camControl._xscale *= factorx;
_parent.camControl._yscale *= factorx;
}
if (delx != 0) {
_parent.camControl._xscale += 0.1 * (100 - _parent.camControl._xscale);
_parent.camControl._yscale += 0.1 * (100 - _parent.camControl._yscale);
}
if (_parent.camControl._xscale < 26.2144) {
_parent.camControl._xscale = 26.2144;
} else {
if (_parent.camControl._xscale > 100) {
_parent.camControl._xscale = 100;
}
}
if (_parent.camControl._yscale < 26.2144) {
_parent.camControl._yscale = 26.2144;
} else {
if (_parent.camControl._yscale > 100) {
_parent.camControl._yscale = 100;
}
}
} else {
if (delx != 0) {
_parent.camControl._x += 8 * delx * _parent.camControl._xscale / 100;
}
if (dely != 0) {
_parent.camControl._y -= 8 * dely * _parent.camControl._yscale / 100;
}
}
}
}
}
if (Key.isDown(8)) {
setPlayerScale(Math.floor(19 * Math.random()) * 10 + 10);
}
if (Key.isDown(45)) {
if (!GLOBAL_PAUSECTR) {
GLOBAL_TRUEPAUSE = !GLOBAL_TRUEPAUSE;
var TM = (getEnemyT(GLOBAL_ENEMY)).__animmap;
trace('ENEMY MAP: ');
for (var fkey in TM) {
trace('frame ' + fkey);
var ao = TM[fkey];
for (var akey in ao) {
trace('\t' + akey);
}
}
}
GLOBAL_PAUSECTR = true;
} else {
GLOBAL_PAUSECTR = false;
}
if (Key.isDown(35)) {
resetPlayer();
}
if (Key.isDown(36)) {
++GLOBAL_PAUSEHFR;
GLOBAL_PAUSEHFR %= 4;
}
if (Key.isDown(16)) {
}
if (!GLOBAL_TRUEPAUSE) {
if (GLOBAL_PAUSEHFR != 0) {
GLOBAL_PAUSEHFRCTR += 1;
if (GLOBAL_PAUSEHFRCTR > GLOBAL_PAUSEHFR) {
unpauseall();
GLOBAL_PAUSEHFRCTR = 0;
} else {
pauseall();
}
} else {
if (!GLOBAL_TRUEPAUSE and GLOBAL_PAUSE) {
unpauseall();
}
}
} else {
if (GLOBAL_TRUEPAUSE and !GLOBAL_PAUSE) {
pauseall();
}
}
var esounds = new Sound(_parent.enemyshad);
esounds.setVolume(0);
var psounds = new Sound(_parent.playershad);
psounds.setVolume(0);
_parent.flashColorize(_parent.playershad, -1, -1, -1, 0.4);
_parent.flashColorize(_parent.enemyshad, -1, -1, -1, 0.4);
GLOBAL_ENEMY.G = this;
GLOBAL_ENEMY.enemy.G = this;
GLOBAL_ENEMY.enemy.enemy.G = this;
(getEnemyT(GLOBAL_ENEMY)).G = this;
GLOBAL_PLAYER.G = this;
_root.G = this;
GLOBAL_ENEMY.enemy.goPlay = function (animf) {
_root.controller.goPlay(_root.controller.GLOBAL_ENEMY.enemy, animf);
};
(getEnemyT(GLOBAL_ENEMY)).goPlay = function (animf) {
_root.controller.goPlay(_root.controller.GLOBAL_ENEMY.enemy.enemy, animf);
};
if (_parent.camControl.sld_sound.mousedown) {
var sldtarg = _parent.camControl.sld_sound;
var my = sldtarg.My;
var checkyb = sldtarg.sldbak.getBounds(_parent.camControl.sld_sound);
var sldcoord = my;
var sldsize = checkyb.yMax - checkyb.yMin;
var val = -100 * (sldcoord / sldsize);
if (val > 100) {
val = 100;
}
if (val < 0) {
val = 0;
}
sldtarg.sld._yscale = val;
_root.nvSetVolume(val);
}
_parent.camControl.gui_playergfxid = _root.GLOBAL_PLAYERGRAPHIC;
BLOCK_ENEMY_ONE_FRAME = false;
if (_parent.camControl.exturl != undefined) {
if (_parent.camControl.exturl != _root.externalURL) {
trace('exturl exists? :' + _parent.camControl.exturl);
_root.externalURL = _parent.camControl.exturl;
}
}
reassignAllXClips(GLOBAL_ENEMY);
reassignAllXClips(GLOBAL_ENEMY.enemy);
reassignAllXClips(GLOBAL_ENEMY.enemy.enemy);
reassignAllXClips(GLOBAL_PLAYER);
if (GLOBAL_PLAYERHASHEAD) {
setPlayerHasHead(true);
} else {
setPlayerHasHead(false);
}
if (guiTextScroll == 1) {
var gmx = (_parent.camControl.mouseX - -160) / 240;
var gmy = (_parent.camControl.mouseY - 72) / 48;
if (gmx > 0 and gmx < 1) {
if (gmy > 0 and gmy < 1) {
if (gmx < 0.1) {
LogScrollOffset = 0;
} else {
if (gmx > 0.9) {
LogScrollOffset = GLOBAL_LOG.length - 2;
} else {
LogScrollOffset += (gmy - 0.5) * 4;
}
}
if (LogScrollOffset > GLOBAL_LOG.length - 2) {
LogScrollOffset = GLOBAL_LOG.length - 2;
}
if (LogScrollOffset < 0) {
LogScrollOffset = 0;
}
}
}
}
var offi = Math.floor(LogScrollOffset);
_parent.camControl.gui_leveldesc = '';
if (offi == 0) {
_parent.camControl.gui_leveldesc = 'Arid Mountains\n';
}
if (offi < GLOBAL_LOG.length) {
_parent.camControl.gui_leveldesc += GLOBAL_LOG[offi + 0];
++offi;
}
if (offi < GLOBAL_LOG.length) {
_parent.camControl.gui_leveldesc += GLOBAL_LOG[offi + 0];
++offi;
}
if (offi < GLOBAL_LOG.length) {
_parent.camControl.gui_leveldesc += GLOBAL_LOG[offi + 0];
++offi;
}
if (offi < GLOBAL_LOG.length) {
_parent.camControl.gui_leveldesc += GLOBAL_LOG[offi + 0];
++offi;
}
if (GLOBAL_PLAYER.aniclip != undefined) {
GLOBAL_PLAYER.stop();
GLOBAL_PLAYER.aniclip.stop();
GLOBAL_PLAYER.aniclip.mc.stop();
var updateplayerclip = !GLOBAL_PAUSE;
if (GLOBAL_SHOW_CONSUMED_PLAYER) {
if (GLOBAL_SHOW_CONSUMED_PLAYER_FROZEN) {
if (isPlayerConsumed(GLOBAL_PLAYER)) {
updateplayerclip = false;
}
}
}
if (!GLOBAL_PAUSE && !GLOBAL_QTE_DATA.active) {
var cframe = GLOBAL_PLAYER.aniclip.mc._currentframe;
var tframe = GLOBAL_PLAYER.aniclip.mc._totalframes;
if (cframe == tframe) {
if (GLOBAL_PLAYER.hp < 1) {
GLOBAL_PLAYER.aniclip.mc.stop();
} else {
GLOBAL_PLAYER.aniclip.mc.gotoAndStop(1);
}
} else {
GLOBAL_PLAYER.aniclip.mc.gotoAndStop(cframe + 1);
}
} else {
GLOBAL_PLAYER.stop();
GLOBAL_PLAYER.aniclip.stop();
GLOBAL_PLAYER.aniclip.mc.stop();
}
_parent.playershad.t.aniclip.gotoAndStop(GLOBAL_PLAYER.aniclip._currentframe);
_parent.playershad.t.aniclip.mc.gotoAndStop(GLOBAL_PLAYER.aniclip.mc._currentframe);
GLOBAL_PLAYER.aniclip.mc.head._visible = _root.GLOBAL_PLAYERHEAD;
GLOBAL_PLAYER.aniclip.mc.head2._visible = _root.GLOBAL_PLAYERHEAD;
GLOBAL_PLAYER.aniclip.mc.head3._visible = _root.GLOBAL_PLAYERHEAD;
_parent.playershad.t.aniclip.mc.head._visible = _root.GLOBAL_PLAYERHEAD;
_parent.playershad.t.aniclip.mc.head2._visible = _root.GLOBAL_PLAYERHEAD;
_parent.playershad.t.aniclip.mc.head3._visible = _root.GLOBAL_PLAYERHEAD;
}
for (var skey in GLOBAL_SYNCMAP) {
var S = GLOBAL_SYNCMAP[skey];
if (S.owner._visible) {
if (S.target != undefined) {
if (S.owner.__animcurrent == S.framename) {
var anis = S.owner.__animnamemap[S.framename];
if (anis != undefined) {
var delfram = S.owner._currentframe - anis.fmin;
if (!S.fixedframemap.hasOwnProperty(S.framename)) {
S.target.gotoAndStop(S.framename);
S.fixedframemap[S.framename] = S.target._currentframe;
}
S.target.gotoAndStop(S.fixedframemap[S.framename] + delfram);
S.target._visible = true;
if (S.target._alpha < 100) {
S.target._alpha += 5;
}
if (S.target._alpha > 95) {
S.target._alpha = 100;
}
} else {
trace('not mapped yet? ' + anis + ' ' + S.framename);
}
} else {}
}
}
if (S.funccall != undefined) {
S.funccall(this, S.owner, S.target);
}
}
GLOBAL_POSTSYNC(this, getEnemyT(GLOBAL_ENEMY), undefined);
musicUpdate();
if (correctMyExternalEnemy) {
GLOBAL_ENEMY._manuallyReset = undefined;
goPlay(getEnemyT(GLOBAL_ENEMY), 'idle');
(getEnemyT(GLOBAL_ENEMY)).gotoAndStop((getEnemyT(GLOBAL_ENEMY))._totalframes);
(getEnemyT(GLOBAL_ENEMY)).gotoAndPlay('idle');
GLOBAL_ENEMY.is_external_loaded = undefined;
}
if (GLOBAL_ENEMY.is_external) {
if (correctMyExternalEnemy || GLOBAL_ENEMY.is_external_loaded != undefined) {
_stopExtSounds();
}
}
if (GLOBAL_DELAY_STARTNOISE > 0) {
--GLOBAL_DELAY_STARTNOISE;
if (GLOBAL_DELAY_STARTNOISE < 1) {
_startExtSounds();
}
}
}
}