Combined Code
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 v3 = targ.getBounds(_root);
var v7 = v3.xMax - v3.xMin;
var v6 = v3.yMax - v3.yMin;
if (v7 != undefined && v7 > 0 && v6 != undefined && v6 > 0) {
var v14 = targ._xscale / 100;
var v13 = targ._yscale / 100;
var v5 = Stage.width / v7;
var v4 = Stage.height / v6;
if (v5 <= v4) {
v4 = v5;
} else {
v5 = v4;
}
var v9 = (Stage.width - v7 * v5) / 2;
var v11 = (Stage.height - v6 * v4) / 2;
var v12 = v9 - (v3.xMin - targ._x);
var v10 = v11 - (v3.yMin - targ._y);
targ._x += (v12 - targ._x) * blendf;
targ._y += (v10 - targ._y) * blendf;
targ._xscale += (100 * v5 * v14 - targ._xscale) * blendf;
targ._yscale += (100 * v4 * v13 - 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 += 1;
playListIndex %= playList.length;
targetClip.G.goPlay(targetClip, playList[playListIndex]);
}
};
} else {}
}
movieClip 19 {
}
movieClip 33 {
}
movieClip 39 {
}
movieClip 60 {
}
movieClip 189 {
}
movieClip 191 {
}
movieClip 193 {
}
movieClip 195 {
}
movieClip 197 {
}
movieClip 205 {
}
movieClip 207 {
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 209 {
}
movieClip 367 {
}
movieClip 467 {
}
movieClip 469 {
}
movieClip 471 {
}
movieClip 473 {
}
movieClip 493 {
}
movieClip 495 {
}
movieClip 497 {
}
movieClip 499 {
}
movieClip 501 {
}
movieClip 503 {
}
movieClip 505 {
}
movieClip 527 {
}
movieClip 529 {
}
movieClip 537 {
}
movieClip 562 {
}
movieClip 607 {
}
movieClip 712 {
}
movieClip 751 {
}
movieClip 753 {
}
movieClip 923 {
}
movieClip 1151 {
frame 1 {
G.actIdle(this);
if (G.manualReset(this)) {
G.setScaleValue(100);
G.setName('Laza');
G.setStatus('Dragon');
G.setCredit('Multi');
G.setHAtk(10);
G.setMAtk(10);
G.setLAtk(10);
G.setHDef(31);
G.setMDef(28);
G.setLDef(31);
G.enemySetAttackHistogram(1, 1, 1);
G.setMaxHP(15);
G.setHP(15);
G.enemySetAllowPets(1);
var DragonTasks = function (G, Obj) {
if (G.chance(50)) {
G.goPlay(Obj, 'bash');
} else {
G.goPlay(Obj, 'stomp');
}
};
G.setF('DragonTasks', DragonTasks);
}
}
frame 41 {
G.goPlay(this, 'idle');
}
frame 43 {
G.actMove(this, 3);
G.setEnemySolid(0);
G.setEnemyFaceTarget(0);
G.setEnemyAIUseAttacks(0);
G.setEnemyAINoAutoIdle(1);
var deltac = Math.abs(G.playerGetXPosition() - G.enemyGetXPosition());
if (deltac > 350) {
G.enemyFacePlayer();
}
}
frame 52 {
if (G.hitPlayer(eatbox)) {
G.callF('DragonTasks', G, this);
}
}
frame 105 {
if (G.chance(10)) {
G.goPlay(this, 'nomno2');
} else {
G.goPlay(this, 'walk');
}
}
frame 107 {
G.actMove(this, 0);
}
frame 127 {
if (G.hitPlayer(eatbox)) {
G.consumePlayer(this);
G.goPlay(this, 'stomped');
}
}
frame 144 {
G.actIdle(this);
G.goPlay(this, 'idle');
}
frame 146 {
G.actMove(this, 0);
}
frame 171 {
if (G.hitPlayer(eatbox)) {
G.goPlay(this, 'bashed');
}
}
frame 202 {
G.actIdle(this);
G.goPlay(this, 'idle');
}
frame 206 {
G.startDigestion(this, 5);
var WigObj = new Object();
G.clearAnims(this);
WigObj.l = 'stomp_left';
WigObj.r = 'stomp_right';
WigObj.u = 'stomp_up';
WigObj.d = 'stomp_down';
G.setAnims(this, WigObj);
G.setEscape(this, 'end_stomp', 'L R U D', 8, 0);
}
frame 242 {
G.goPlay(this, 'stomped');
}
frame 244 {
G.consumePlayer(this);
}
frame 250 {
G.hurtPlayer(this, 2);
}
frame 311 {
G.goPlay(this, 'chew');
}
frame 313 {
G.startDigestion(this, 60);
var WigObj = new Object();
G.clearAnims(this);
WigObj.l = 'struggle_left';
WigObj.r = 'struggle_right';
WigObj.u = 'struggle_up';
WigObj.d = 'struggle_down';
WigObj.bl = 'please_left';
WigObj.br = 'please_right';
WigObj.bu = 'please_up';
WigObj.bd = 'please_down';
WigObj.b = 'angbeat';
G.setAnims(this, WigObj);
G.setEscape(this, 'snap', 'L R U ', 4, 0);
G.setEscape(this, 'swallow_hard', 'D ', 4, 0);
G.setEscape(this, 'randomchance', 'BD BU BL BR', 4, 0);
}
frame 329 {
G.hurtPlayer(this, 1);
}
frame 335 {
if (G.getPlayerHealthPercent() < 1) {
G.goPlay(this, 'swallow_hard');
} else {
if (G.chance(30)) {
G.goPlay(this, 'swallow_hard');
} else {
G.goPlay(this, 'chew');
}
}
}
frame 355 {
G.goPlay(this, 'chew');
}
frame 374 {
G.goPlay(this, 'chew');
}
frame 392 {
G.goPlay(this, 'chew');
}
frame 413 {
G.goPlay(this, 'chew');
}
frame 462 {
G.goPlay(this, 'chew');
}
frame 573 {
G.endDigestion(this);
G.stopDigestion(this);
}
frame 776 {
G.goPlay(this, 'mystomachworksonyou');
}
frame 778 {
var WigObj = new Object();
G.startDigestion(this, 60);
WigObj.l = 'belly_right';
WigObj.r = 'belly_left_choice';
G.setAnims(this, WigObj);
G.setEscape(this, 'poop', 'L R ', 8, 0);
}
frame 1033 {
G.clearAnims(this);
}
frame 1098 {
G.setPlayerHP(0);
G.actUnbusy();
G.goPlay(this, 'idle');
}
frame 1135 {
G.goPlay(this, 'mystomachworksonyou');
}
frame 1166 {
G.goPlay(this, 'mystomachworksonyou');
}
frame 1168 {
if (G.chance(50)) {
G.goPlay(this, 'belly_left');
} else {
G.goPlay(this, 'belly_left_alt');
}
}
frame 1203 {
G.goPlay(this, 'mystomachworksonyou');
}
frame 1205 {
G.endDigestion(this);
G.stopDigestion(this);
}
frame 1278 {
G.unconsumePlayer(this, -100);
G.actUnbusy();
G.goPlay(this, 'idle');
}
frame 1280 {
G.clearAnims(this);
}
frame 1299 {
G.hurtPlayer(this, 3);
}
frame 1302 {
if (G.chance(25)) {
G.goPlay(this, 'swallow_hard');
} else {
if (G.chance(30)) {
G.goPlay(this, 'chew');
} else {
G.goPlay(this, 'snap');
}
}
}
frame 1306 {
G.callF('DragonTasks', G, this);
}
frame 1307 {
G.callF('DragonTasks', G, this);
}
frame 1308 {
G.callF('DragonTasks', G, this);
}
frame 1309 {
if (G.chance(75)) {
G.goPlay(this, 'tonguepillow');
} else {
if (G.chance(60)) {
G.goPlay(this, 'letgo');
} else {
if (G.chance(50)) {
G.goPlay(this, 'ontopofnose');
} else {
G.goPlay(this, 'swallow_hard');
}
}
}
}
frame 1335 {
G.unconsumePlayer(this);
}
frame 1390 {
G.actMove(this, 3);
G.setEnemySolid(0);
G.setEnemyFaceTarget(0);
G.setEnemyAIUseAttacks(0);
G.setEnemyAINoAutoIdle(1);
}
frame 1427 {
G.actMove(this, 0);
G.setEnemySolid(1);
G.setEnemyFaceTarget(0);
G.setEnemyAIUseAttacks(0);
G.setEnemyAINoAutoIdle(1);
}
frame 1437 {
G.goPlay(this, 'waiting_for_the_bird');
}
frame 1439 {
G.consumePlayer(this);
}
frame 1460 {
G.goPlay(this, 'chew');
}
frame 1462 {
if (G.hitPlayer(eatbox)) {
G.goPlay(this, 'pannomed');
}
}
frame 1475 {
if (G.chance(75)) {
G.goPlay(this, 'waiting_for_the_bird');
} else {
G.goPlay(this, 'ifailed');
}
}
frame 1498 {
G.goPlay(this, 'walk');
}
frame 1500 {
G.actMove(this, 0);
G.setEnemySolid(0);
G.setEnemyFaceTarget(1);
G.setEnemyAIUseAttacks(0);
G.setEnemyAINoAutoIdle(1);
}
frame 1536 {
G.goPlay(this, 'idle');
}
frame 1558 {
G.goPlay(this, 'stomped');
}
frame 1593 {
G.goPlay(this, 'stomped');
}
frame 1640 {
G.goPlay(this, 'stomped');
}
frame 1673 {
G.goPlay(this, 'stomped');
}
frame 1802 {
G.unconsumePlayer(this, 900);
G.actUnbusy();
G.goPlay(this, 'idle');
}
}