Frame 1
System.security.allowDomain("*");
if (_root.controller == undefined) {
var playList = new Array("idle", "walk");
var playListIndex = 0;
var targetClip = enemy;
targetClip.stop();
recenterEnemy = function (targ, blendf) {
if (blendf == undefined) {
blendf = 0.1;
}
var _local3 = targ.getBounds(_root);
var _local7 = _local3.xMax - _local3.xMin;
var _local6 = _local3.yMax - _local3.yMin;
if ((((_local7 != undefined) && (_local7 > 0)) && (_local6 != undefined)) && (_local6 > 0)) {
var _local14 = targ._xscale / 100;
var _local13 = targ._yscale / 100;
var _local5 = Stage.width / _local7;
var _local4 = Stage.height / _local6;
if (_local5 <= _local4) {
_local4 = _local5;
} else {
_local5 = _local4;
}
var _local9 = (Stage.width - (_local7 * _local5)) / 2;
var _local11 = (Stage.height - (_local6 * _local4)) / 2;
var _local12 = _local9 - (_local3.xMin - targ._x);
var _local10 = _local11 - (_local3.yMin - targ._y);
targ._x = targ._x + ((_local12 - targ._x) * blendf);
targ._y = targ._y + ((_local10 - targ._y) * blendf);
targ._xscale = targ._xscale + ((((100 * _local5) * _local14) - targ._xscale) * blendf);
targ._yscale = targ._yscale + ((((100 * _local4) * _local13) - targ._yscale) * blendf);
return(1);
}
return(0);
};
recenterEnemy(targetClip);
targetClip.G = new Object();
targetClip.G.goPlay = function (targ, aname) {
targ.gotoAndPlay(aname);
};
var mouseListener = new Object();
var mouseData = new Object({x:_xmouse, y:_ymousem, down:0, up:0});
mouseListener.onMouseMove = function () {
mouseData.x = _xmouse;
mouseData.y = _ymouse;
};
mouseListener.onMouseDown = function () {
mouseData.down = 1;
};
mouseListener.onMouseUp = function () {
mouseData.up = 1;
};
Mouse.addListener(mouseListener);
onEnterFrame = function () {
recenterEnemy(targetClip);
if (mouseData.up) {
mouseData.down = 0;
mouseData.up = 0;
}
if (mouseData.down) {
mouseData.down = 0;
playListIndex = playListIndex + 1;
playListIndex = playListIndex % playList.length;
targetClip.G.goPlay(targetClip, playList[playListIndex]);
}
};
}
Symbol 6 MovieClip Frame 1
this.onEnterFrame = function () {
_root.controller.updateVictimSync(this);
};
Symbol 32 MovieClip Frame 1
this.onEnterFrame = function () {
_visible = false;
_root.controller.updateVictimSyncClip(this, "vicWholeTop");
};
Symbol 34 MovieClip Frame 1
this.onEnterFrame = function () {
_visible = false;
_root.controller.updateVictimSyncClip(this, "vicWholeBot");
};
Symbol 47 MovieClip 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);
}
}
}
};
Symbol 89 MovieClip Frame 1
onEnterFrame = function () {
if (_parent.G != undefined) {
if (!_parent.G.isPaused()) {
_parent.G.updateOnlyDigestion(_parent);
}
}
};
Symbol 115 MovieClip Frame 1
function _run(G, Obj) {
G.V._pre_run(G, Obj);
if (G.V.nextAIFunction != G.V.currAIFunction) {
G.V.currAIFunction = G.V.nextAIFunction;
}
G.V[G.V.currAIFunction](G, Obj);
G.V._post_run(G, Obj);
}
G.actIdle(this);
if (G.manualReset(this)) {
G.setScaleValue(400);
G.setName("Snakehead");
G.setStatus("Snappy");
G.setCredit("Z");
G.setHAtk(0);
G.setMAtk(0);
G.setLAtk(0);
G.setHDef(99);
G.setMDef(99);
G.setLDef(99);
G.enemySetAttackHistogram(1, 1, 1);
G.setMaxHP(63.9999);
G.setHP(64);
G.setEnemyFaceTarget(0);
G.setEnemySolid(1);
G.setEnemyRollOption(0);
G.setEnemyAINoAutoIdle(1);
G.enemySetDontPlayHitAnimation(1);
G.setEnemyAIUseAttacks(0);
G.enemySetAllowPets(1);
G.enemySetViewBetween(1);
G.enemyFacePlayer();
G.requestUseBarb(10);
G.GLOBAL_ENEMY_USE_GRAVITY = false;
G.V.lastHit = undefined;
G.V.playerIsTapping = false;
G.V.currAIFunction = undefined;
G.V.nextAIFunction = "serpent_initial_ai";
G.V.currPostSync = "serpent_postsync";
G.V.nextanim = "idle";
G.V.postSync = function (G, Obj) {
G.V[G.V.currPostSync](G, Obj);
var _local2 = G.playerTapGet();
G.V.playerIsTapping = false;
if (_local2 != "") {
G.V.playerIsTapping = true;
}
};
G.setPostSync(G.V.postSync);
G.V.hitCallback = function (G, Obj, hittype, hitdamage) {
G.V.lastHit = hittype;
return(undefined);
};
G.enemySetIgnoreHitCallbackName("hitCallback");
G.V.IsPlayerRollingAtEnemy = function (G) {
if (G.GLOBAL_TAPDASH_STATE > 0) {
if (G.enemyFacing() != G.playerFacing()) {
var _local2 = G.playerSignedDistanceFix();
if ((_local2 >= 10) && (_local2 < 110)) {
return(true);
}
}
}
return(false);
};
G.V.IsPlayerHuggingAtEnemy = function (G) {
var _local1 = G.playerCurrAnim();
if (_local1.indexOf("atk") == 0) {
if (_local1.indexOf("atkp") == 0) {
var _local2 = G.playerSignedDistanceFix();
if ((_local2 >= 0) && (_local2 < 40)) {
return(true);
}
}
}
return(false);
};
G.V.IsPlayerAnimAttack = function (G) {
var _local1 = G.playerCurrAnim();
if (_local1.indexOf("atk") == 0) {
if (_local1.indexOf("atkp") == 0) {
} else {
return(true);
}
}
return(false);
};
G.V.IsPlayerAnimIdle = function (G) {
var _local1 = G.playerCurrAnim();
if ((_local1.indexOf("idle") == 0) || (_local1.indexOf("walk") == 0)) {
return(true);
}
return(false);
};
G.V.IsPlayerInNearRange = function (G) {
if (G.enemyFacing() != G.playerFacing()) {
var _local1 = G.playerSignedDistanceFix();
if ((_local1 >= 0) && (_local1 < 60)) {
return(true);
}
}
return(false);
};
G.V._pre_run = function (G, Obj) {
G.V.canim = G.playerCurrAnim();
G.V.nextanim = G.enemyCurrAnim();
if (!G.isPlayerConsumed()) {
if (G.getPlayerHP() < 64) {
if (G.getPlayerScale() < 100) {
G.healPlayer(this, 0.0166666666666667);
} else {
G.healPlayer(this, 0.0333333333333333);
}
} else if (G.getPlayerScale() < 100) {
G.setPlayerScale(100);
}
}
};
G.V._post_run = function (G, Obj) {
if (G.V.lastHit != undefined) {
G.V.lastHit = undefined;
var _local2 = G.V.lastHit;
if ((((_local2 != "l") && (_local2 != "m")) && (_local2 != "h")) && (_local2 != "p")) {
_local2 = "h";
}
G.hurtEnemy(G.getMaxHP() / 18);
G.V.nextanim = "hit" + _local2;
}
var _local4 = G.getEnemyT(Obj).s_moving;
Obj._x = Obj._x + ((Obj._xscale / Math.abs(Obj._xscale)) * _local4);
var _local5 = G.enemyCurrAnim();
if (G.V.nextanim != _local5) {
G.goPlay(G.getEnemyT(Obj), G.V.nextanim);
}
};
G.V.serpent_Inactive = function (G) {
var _local1 = G.enemyCurrAnim();
return(((_local1.substr(0, 4) == "idle") || (_local1 == "walk")) || (_local1 == "walkcont"));
};
G.V.serpent_postsync = function (G, Obj) {
G.GLOBAL_PLAYER_BLOCKROLLS = false;
G.GLOBAL_PLAYER_BLOCKATTACKS = false;
G.GLOBAL_PLAYER_MOVESCALE = 1;
G.copyTransform(topteeth, head);
G.copyTransform(backjaw, jaw);
G.copyTransform(backteeth, jaw);
};
G.V.serpent_attack = function (G, Obj, anim, percent) {
if (percent == undefined) {
percent = 0.1;
}
if (anim == undefined) {
anim = "hith";
}
G.hurtPlayer(Obj, 64 * percent);
G.goPlay(G.GLOBAL_PLAYER, anim);
};
G.V.serpent_initial_ai = function (G, Obj) {
var _local3 = G.getEnemyT(Obj);
if (G.getEnemyHP() <= 0) {
if ((G.V.nextanim != "dead") or (G.V.nextanim != "death")) {
G.V.nextanim = "death";
}
} else if (G.V.serpent_Inactive(G)) {
if (G.V.IsPlayerRollingAtEnemy(G)) {
_local3.s_moving = 0;
if (G.getPlayerScale() < 100) {
G.V.nextanim = G.histPick(["stompatk", "stompatk"], [1, 1]);
} else {
G.V.nextanim = G.histPick(["atkl", "atkl"], [1, 1]);
}
} else if (G.V.IsPlayerHuggingAtEnemy(G)) {
G.enemySetAllowPets(1);
G.V.nextanim = "idle";
} else if (G.V.IsPlayerAnimAttack(G) and G.V.IsPlayerInNearRange(G)) {
_local3.s_moving = 0;
if (G.getPlayerScale() < 100) {
G.V.nextanim = G.histPick(["stompatk", "stompatk"], [1, 1]);
} else {
G.V.nextanim = G.histPick(["atkh", "atkh"], [1, 1]);
}
} else {
var _local2 = G.playerSignedDistanceFix();
if (((G.playerEnemyCenterDistance() > 0) && (_local2 < 10)) && (G.V.IsPlayerAnimIdle(G))) {
if (G.getPlayerScale() < 100) {
G.V.nextanim = G.histPick(["stompatk", "stompatk"], [1, 1]);
} else {
G.V.nextanim = "grabclose";
}
} else if ((_local2 > 0) && (_local2 < 60)) {
var _local5 = ["atkm", "atkm"];
var _local4 = [1, 1];
if (G.getPlayerScale() < 100) {
_local5 = ["stompatk"];
_local4 = [1];
} else if ((_local2 < 50) && (_local2 > 20)) {
_local5 = ["atkm", "eatexample"];
_local4 = [1, G.smoothChanceDown(G.getPlayerHealthPercent()) + 0.015625];
}
_local3.s_moving = 0;
G.V.nextanim = G.histPick(_local5, _local4);
G.enemySetAllowPets(0);
} else if ((_local2 < 0) && (_local2 > -60)) {
} else if (Math.abs(_local2) > 300) {
G.enemyFacePlayer();
if (G.V.nextanim != "walkcont") {
G.V.nextanim = "walk";
}
} else if (_local2 <= -60) {
G.enemyFacePlayer();
} else if (G.chance(5)) {
if (G.chance(50)) {
if (G.V.nextanim != "walkcont") {
G.V.nextanim = "walk";
}
} else {
_local3.s_moving = 0;
if (G.getPlayerScale() < 100) {
G.V.nextanim = G.histPick(["stompatk", "stompatk", "stompatk"], [1, 1, 1]);
} else {
G.V.nextanim = G.histPick(["atkm", "atkl", "atkh"], [1, 1, 1]);
}
G.enemySetAllowPets(0);
}
}
}
}
};
}
Symbol 115 MovieClip Frame 45
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 59
G.goPlay(this, "options");
Symbol 115 MovieClip Frame 66
G.actMove(this, 3);
Symbol 115 MovieClip Frame 75
G.goPlay(this, "walkcont");
Symbol 115 MovieClip Frame 76
G.actMove(this, 3);
Symbol 115 MovieClip Frame 96
G.goPlay(this, "walkcont");
Symbol 115 MovieClip Frame 101
G.actHurt(this, 4);
G.endDigestion(this);
Symbol 115 MovieClip Frame 106
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 107
G.actHurt(this, 4);
G.endDigestion(this);
Symbol 115 MovieClip Frame 112
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 113
G.actHurt(this, 4);
G.endDigestion(this);
Symbol 115 MovieClip Frame 118
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 121
G.actHurt(this, 0);
Symbol 115 MovieClip Frame 133
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 136
G.actHurt(this, 0);
G.endDigestion(this);
G.unconsumePlayer(this, 50);
G.actUnbusy();
Symbol 115 MovieClip Frame 152
G.actHurt(this, 0);
Symbol 115 MovieClip Frame 159
G.goPlay(this, "dead");
Symbol 115 MovieClip Frame 165
G.actAttack(this, G.ATTACK_MEDIUM);
Symbol 115 MovieClip Frame 173
if (G.hitPlayer(somebox)) {
G.V.serpent_attack(G, this, "hitm", 0.1);
}
Symbol 115 MovieClip Frame 183
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 185
G.actAttack(this, G.ATTACK_HIGH);
Symbol 115 MovieClip Frame 193
if (G.hitPlayer(somebox)) {
G.V.serpent_attack(G, this, "hith", 0.1);
}
Symbol 115 MovieClip Frame 204
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 206
G.actAttack(this, G.ATTACK_LOW);
Symbol 115 MovieClip Frame 214
if (G.hitPlayer(somebox)) {
G.V.serpent_attack(G, this, "hitl", 0.1);
}
Symbol 115 MovieClip Frame 225
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 238
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 268
G.actBusy(this);
Symbol 115 MovieClip Frame 283
if (G.hitPlayer(eatbox)) {
G.endDigestion(this);
G.consumePlayer(this);
G.goPlay(this, "swalllowtest");
}
Symbol 115 MovieClip Frame 286
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 298
if (G.hitPlayer(somebox)) {
G.goPlay(this, "stompatkget");
}
Symbol 115 MovieClip Frame 312
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 325
if (G.hitPlayer(somebox)) {
G.goPlay(this, "grabcloseget");
}
Symbol 115 MovieClip Frame 328
G.goPlay(this, "idle");
Symbol 115 MovieClip Frame 334
G.endDigestion(this);
G.consumePlayer(this);
Symbol 115 MovieClip Frame 362
G.goPlay(this, "fullsmall");
Symbol 115 MovieClip Frame 363
G.startDigestion(this, 12.8);
var WigObj = new Object();
G.setAnims(this, WigObj);
G.setEscape(this, "idle", "E", 1, 0);
Symbol 115 MovieClip Frame 402
G.goPlay(this, "fullsmall");
Symbol 115 MovieClip Frame 404
G.endDigestion(this);
G.consumePlayer(this);
Symbol 115 MovieClip Frame 442
G.goPlay(this, "swalllowtest_gulp");
Symbol 115 MovieClip Frame 444
G.endDigestion(this);
G.consumePlayer(this);
Symbol 115 MovieClip Frame 490
G.goPlay(this, "full_test1");
Symbol 115 MovieClip Frame 492
G.startDigestion(this, 25.6);
var WigObj = new Object();
WigObj.tl = "squirm_test_1";
WigObj.tr = "squirm_test_1";
WigObj.tu = "squirm_test_1";
WigObj.td = "squirm_test_1";
G.setAnims(this, WigObj);
G.setEscape(this, "finishsimple", "TU TD TL TR", 7, 0);
G.setEscape(this, "finishsimple", "E", 1, 0);
Symbol 115 MovieClip Frame 541
G.goPlay(this, "full_test1");
Symbol 115 MovieClip Frame 543
G.startDigestion(this, 6.4);
Symbol 115 MovieClip Frame 567
G.goPlay(this, "full_test1");
Symbol 115 MovieClip Frame 569
G.instantKillPlayer(this);
G.setPlayerScale(50);
Symbol 115 MovieClip Frame 631
G.healPlayer(this, 16);
G.unconsumePlayer(this, -30);
G.goPlay(this, "idle");