Combined Code
movieClip 3 {
}
// unknown tag 88 length 67
movieClip 7 {
}
movieClip 9 lvl1 {
frame 1 {
this._x = 28;
this._y = -135;
}
frame 25 {
stop();
}
}
movieClip 12 {
}
movieClip 13 lvl2 {
frame 1 {
this._x = -133;
this._y = -65;
}
frame 25 {
stop();
}
}
movieClip 16 {
}
movieClip 17 lvl3 {
frame 1 {
this._x = -10;
this._y = -45;
}
frame 25 {
stop();
}
}
movieClip 20 {
}
movieClip 21 lvl4 {
frame 1 {
this._x = -93;
this._y = 73;
}
frame 25 {
stop();
}
}
movieClip 23 {
}
movieClip 24 lvl5 {
frame 1 {
this._x = 81;
this._y = 60;
}
frame 25 {
stop();
}
}
movieClip 26 {
}
movieClip 27 lvl6 {
frame 1 {
this._x = 160;
this._y = -13;
}
frame 25 {
stop();
}
}
movieClip 29 {
}
movieClip 30 lvl7 {
frame 1 {
this._x = 162;
this._y = -93;
}
frame 25 {
stop();
}
}
movieClip 37 ghostHit1 {
frame 6 {
this.removeMovieClip();
}
}
movieClip 62 fly {
frame 1 {
_root.playSound('flyUse');
}
frame 13 {
this.removeMovieClip();
}
}
frame 1 {
function myFirstItemHandler() {
getURL('http://www.axis-games.com/castlequest.php', '');
}
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem('(c)2009 - axis-games.com', myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
_root.menu = my_cm;
urlStart = _url.indexOf('://') + 3;
urlEnd = _url.indexOf('/', urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf('.') - 1;
pfixEnd = domain.lastIndexOf('.', LastDot) + 1;
domain = domain.substring(pfixEnd, domain.length);
_root.testing.text = domain;
trace(domain);
if (domain != '' && domain != 'armorgames.com') {
stop();
_root._visible = false;
}
}
// unknown tag 88 length 63
frame 5 {
stop();
}
movieClip 72 {
}
button 77 {
on (press) {
getURL('http://www.armorgames.com', '_blank');
}
}
movieClip 80 {
frame 1 {
_root.stop();
gotoAndPlay(2);
}
frame 218 {
_root.gotoAndStop('axisIntro');
}
}
frame 9 {
function myFirstItemHandler() {
getURL('http://www.axis-games.com/castlequest.php', '');
}
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem('(c)2009 - axis-games.com', myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
_root.menu = my_cm;
stop();
}
movieClip 100 {
frame 39 {
stop();
}
}
movieClip 120 {
frame 39 {
stop();
}
}
movieClip 122 {
}
// unknown tag 88 length 81
movieClip 127 {
}
movieClip 148 {
frame 35 {
this.gotoAndPlay(1);
}
}
movieClip 150 {
}
movieClip 151 {
frame 144 {
stopAllSounds();
}
frame 145 {
_root.gotoAndPlay('export');
}
}
frame 10 {
stopAllSounds();
}
movieClip 166 deathBoltHit {
frame 14 {
this.removeMovieClip();
}
}
movieClip 173 {
}
movieClip 174 blackIce {
instance of movieClip 173 {
onClipEvent (enterFrame) {
_root.checkForProjectile(this._parent, 'blackIce');
}
}
frame 25 {
this.removeMovieClip();
}
}
movieClip 191 blackIceHit {
frame 1 {
_root.playSound('blackIceHit');
}
frame 24 {
this.removeMovieClip();
}
}
movieClip 204 hellFireHit {
frame 7 {
this.removeMovieClip();
}
}
movieClip 211 impaleHit {
frame 6 {
this.removeMovieClip();
}
}
movieClip 236 guardianSpirit {
frame 1 {
_root.playSound('guardianShield');
}
frame 13 {
this.removeMovieClip();
}
}
movieClip 243 tornado2Hit {
frame 6 {
this.removeMovieClip();
}
}
movieClip 250 {
frame 6 {
this._parent.removeMovieClip();
}
}
movieClip 251 whirlwindHit {
}
movieClip 256 {
frame 4 {
this._parent.removeMovieClip();
}
}
movieClip 257 stunPunchHit {
}
movieClip 264 energyShield {
}
movieClip 271 stabHit {
frame 6 {
this.removeMovieClip();
}
}
// unknown tag 88 length 60
movieClip 276 {
frame 1 {
stop();
}
}
movieClip 277 enemySCT {
frame 20 {
this.removeMovieClip();
}
}
movieClip 279 {
}
movieClip 280 heroSCT {
frame 20 {
this.removeMovieClip();
}
}
movieClip 307 levelUpEffect {
frame 26 {
_root.showTutorial(2);
this.removeMovieClip();
}
}
movieClip 310 item1_1 {
}
movieClip 313 item1_2 {
}
movieClip 316 item1_3 {
}
movieClip 319 item1_4 {
}
movieClip 322 item1_5 {
}
movieClip 325 item2_1 {
}
movieClip 328 item2_2 {
}
movieClip 331 item2_3 {
}
movieClip 334 item2_4 {
}
movieClip 337 item2_5 {
}
movieClip 340 item5_1 {
}
movieClip 344 frontStart {
}
movieClip 347 item3_1 {
}
movieClip 350 castleDoor {
}
movieClip 353 frontRocks {
}
movieClip 356 item4_1 {
}
movieClip 357 tornadoHit {
frame 6 {
this.removeMovieClip();
}
}
movieClip 364 {
}
movieClip 365 hellFire {
instance of movieClip 364 {
onClipEvent (enterFrame) {
_root.checkForProjectile(this._parent, 'hellFire');
}
}
frame 20 {
this.removeMovieClip();
}
}
movieClip 374 {
}
movieClip 375 deathBolt {
instance of movieClip 374 {
onClipEvent (enterFrame) {
_root.checkForProjectile(this._parent, 'deathBolt');
}
}
frame 21 {
this.removeMovieClip();
}
}
movieClip 381 {
}
movieClip 388 {
frame 9 {
_root.checkForProjectile(this.weapon, 'brimstone');
_root.playSound('hexinAttack3');
_root.shakeScreen(4);
}
frame 17 {
this._parent.removeMovieClip();
}
}
movieClip 389 brimstone {
}
movieClip 396 {
}
movieClip 405 {
}
movieClip 406 {
}
movieClip 421 {
frame 3 {
_root.playSound('gargoyleAttack2');
}
frame 6 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'gargoyle', 'melee', 2);
}
frame 10 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 424 {
frame 1 {
_root.playSound('ghostHit');
}
frame 4 {
this._parent.hit = false;
this._parent.attacking = false;
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 433 {
}
movieClip 434 {
frame 1 {
_root.playSound('effect4');
}
frame 15 {
_root.removeFromArray('scrollDead', this._parent._parent.scrollName);
this._parent._parent.removeMovieClip();
}
}
movieClip 435 {
frame 1 {
stop();
}
}
movieClip 436 gargoyle {
instance inside of movieClip 435 {
onClipEvent (load) {
this.idName = 'gargoyle';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.damage = _root[this.idName][8];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.attackTimer = 0;
this.stunTimer = 0;
this.freezeTimer = 0;
this.canHit = true;
this.canStun = true;
this.canFreeze = true;
this._parent._y = _root.ground;
}
onClipEvent (enterFrame) {
if (this.dead == false && this.stunned == false && _root.gamePaused == false) {
var dif = _root[_root.hero]._x - this._parent._x;
if (dif > _root[this.idName][18]) {
this.speed = _root.chaseSpeed;
} else {
this.speed = _root[this.idName][1];
}
if (dif > 0) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
var xDif = Math.abs(dif);
if (this.hit == false) {
if (xDif > this.attackRange && !this.attacking && !this.frozen) {
this.gotoAndStop('walk');
if (_root[_root.hero]._x <= this._parent._x) {
this._parent._x -= this.speed;
} else {
this._parent._x += this.speed;
}
} else {
if (xDif <= this.attackRange && !this.attacking && this.attackTimer == 0) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack1');
} else {
if (!this.attacking) {
this.gotoAndStop('stand');
}
}
}
}
if (this.attackTimer > 0) {
++this.attackTimer;
if (this.attackTimer >= this.attackReset) {
this.attackTimer = 0;
}
}
} else {
if (this.dead) {
this.gotoAndStop('die');
}
}
if (this.stunned && _root.gamePaused == false && this.dead == false) {
++this.stunTimer;
if (this.stunTimer >= this.releaseStun) {
this.stunned = false;
this.stunTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
if (this.frozen && _root.gamePaused == false && this.dead == false) {
++this.freezeTimer;
if (this.freezeTimer >= this.releaseFreeze) {
_root.removeColorEffect(this._parent);
this.frozen = false;
this.freezeTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
}
}
}
movieClip 441 centaurHit1 {
frame 5 {
this.removeMovieClip();
}
}
movieClip 442 centaurHit2 {
frame 5 {
this.removeMovieClip();
}
}
movieClip 443 centaurHit3 {
frame 5 {
this.removeMovieClip();
}
}
movieClip 452 {
}
movieClip 465 {
}
movieClip 468 {
frame 1 {
_root.playSound('titanHit');
}
frame 4 {
this._parent.hit = false;
}
}
movieClip 489 {
}
movieClip 490 {
frame 1 {
_root.playSound('centaurDie');
}
frame 35 {
_root.nextArea();
this._parent._parent.removeMovieClip();
}
}
movieClip 491 {
}
movieClip 504 {
frame 1 {
this._parent.canHit = false;
++this._parent.timesAttacked;
if (this._parent.timesAttacked > 3) {
this._parent.chargeDir = this._parent._parent._xscale / 100;
this._parent.action = 'charge';
this._parent.gotoAndStop('attack3');
} else {
this._parent.findAttack();
}
}
frame 5 {
this.weapon._visible = false;
_root.playSound('bullAttack');
_root.checkCollision(this.weapon, 'centaur', 'melee', 1);
}
frame 8 {
this._parent.canHit = true;
}
}
movieClip 513 {
frame 1 {
++this._parent.timesAttacked;
if (this._parent.timesAttacked >= 3) {
this._parent.chargeDir = this._parent._parent._xscale / 100;
this._parent.action = 'charge';
this._parent.gotoAndStop('attack3');
} else {
this._parent.findAttack();
}
}
frame 7 {
_root.playSound('centaurAttack2');
_root.playSound('centaurAttack2');
_root.useAttackEnemy(this._parent._parent, 2);
_root.useAttackEnemy(this._parent._parent, 4);
}
frame 12 {
this._parent.canHit = true;
}
}
movieClip 514 {
frame 1 {
this.weapon._visible = false;
_root.playSound('centaurAttack3');
_root.checkCollision(this.weapon, 'centaur', 'melee', 3);
}
}
movieClip 515 {
frame 1 {
stop();
}
}
movieClip 516 centaur {
instance inside of movieClip 515 {
onClipEvent (load) {
this.idName = 'centaur';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.canHit = false;
this.canStun = false;
this.canFreeze = false;
this.actionTimer = 0;
this.action = 'enter';
this.chargeDir = 1;
this._parent._y = _root.ground;
this._parent._x = 850;
this.timesAttacked = 0;
}
onClipEvent (enterFrame) {
function findAttack() {
var v3 = Math.abs(_root[_root.hero]._x - this._parent._x);
if (v3 < 160) {
this.action = 'attack1';
this.canHit = false;
} else {
if (v3 > 300) {
this.action = 'attack2';
this.canHit = false;
} else {
this.action = 'approach';
}
}
}
_root.bossWindow.hpBar._xscale = (this.health / _root[this.idName][0]) * 100;
if (this.hit == false && this.dead == false && _root.gamePaused == false) {
if (this._parent._x > 670 || this._parent._x < -20) {
this.canHit = false;
}
if (this.action == 'enter') {
this.canHit = true;
this.gotoAndStop('walk');
this._parent._x -= this.speed * (this._parent._xscale / 100);
if (this._parent._x <= 550 && this._parent._x > 100) {
findAttack();
}
} else {
if (this.action == 'attack1') {
this.gotoAndStop('attack1');
} else {
if (this.action == 'attack2') {
this.gotoAndStop('attack2');
} else {
if (this.action == 'approach') {
this.canHit = true;
this.gotoAndStop('walk');
if (this._parent._x < _root[_root.hero]._x) {
this._parent._x += this.speed;
this._parent._xscale = -100;
} else {
this._parent._x -= this.speed;
this._parent._xscale = 100;
}
findAttack();
} else {
if (this.action == 'charge') {
this.canHit = true;
this.gotoAndStop('attack3');
this._parent._x -= this.speed * 2 * (this._parent._xscale / 100);
if (this._parent._x < -75 || this._parent._x > 725) {
this._parent._xscale *= -1;
this.action = 'enter';
this.timesAttacked = 0;
}
} else {
if (this.action == 'stand') {
this.gotoAndStop('stand');
}
}
}
}
}
}
}
}
}
}
movieClip 519 {
}
movieClip 520 centaurAttack2 {
instance of movieClip 519 {
onClipEvent (enterFrame) {
_root.checkCollision(this._parent, 'centaur', 'proj', 2);
}
}
frame 16 {
this.removeMovieClip();
}
}
movieClip 521 centaurAttack4 {
instance of movieClip 519 {
onClipEvent (enterFrame) {
_root.checkCollision(this._parent, 'centaur', 'proj', 2);
}
}
frame 16 {
this.removeMovieClip();
}
}
movieClip 522 gladiatorHit1 {
}
movieClip 523 gladiatorHit2 {
}
movieClip 524 gladiatorHit3 {
}
movieClip 533 {
frame 36 {
this._parent.findAttack();
}
}
movieClip 544 {
}
movieClip 563 {
frame 12 {
++this._parent.timesAttacked;
_root.useAttackEnemy(this._parent._parent, 1);
_root.playSound('gladiatorAttack1');
}
frame 19 {
if (this._parent.timesAttacked > 3) {
this._parent.chargeDir = this._parent._parent._xscale / 100;
this._parent.action = 'charge';
this._parent.gotoAndStop('attack3');
} else {
this._parent.action = 'stand';
}
}
}
movieClip 574 {
frame 3 {
_root.playSound('gladiatorAttack2');
}
frame 16 {
this.weapon._visible = false;
++this._parent.timesAttacked;
_root.checkCollision(this.weapon, 'gladiator', 'melee', 2);
}
frame 20 {
if (this._parent.timesAttacked > 3) {
this._parent.chargeDir = this._parent._parent._xscale / 100;
this._parent.action = 'charge';
this._parent.gotoAndStop('attack3');
} else {
this._parent.action = 'stand';
}
}
}
movieClip 577 {
frame 1 {
_root.playSound('gladiatorHit');
}
frame 4 {
this._parent.hit = false;
if (this._parent.health < _root.gladiator[0] / 2) {
this._parent.attackRange = 200;
}
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
}
if (this._parent.action == 'stand') {
this._parent.findAttack();
}
}
}
movieClip 604 {
}
movieClip 605 {
frame 1 {
_root.playSound('centaurDie');
}
frame 37 {
_root.nextArea();
this._parent._parent.removeMovieClip();
}
}
movieClip 606 {
frame 1 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'gladiator', 'melee', 3);
_root.playSound('gladiatorCharge');
}
frame 7 {
_root.playSound('gladiatorCharge');
}
}
movieClip 607 {
frame 1 {
stop();
}
}
movieClip 608 gladiator {
instance inside of movieClip 607 {
onClipEvent (load) {
this.idName = 'gladiator';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.canHit = false;
this.canStun = false;
this.canFreeze = false;
this.stunTimer = 0;
this.action = 'enter';
this.chargeDir = 1;
this._parent._y = _root.ground;
this._parent._x = 850;
this.stunned = false;
this.timesAttacked = 0;
this.bugTimer = 0;
}
onClipEvent (enterFrame) {
function findAttack() {
var v3 = Math.abs(_root[_root.hero]._x - this._parent._x);
if (v3 < this.attackRange) {
if (this.health > _root[this.idName][0] / 2) {
this.action = 'attack1';
} else {
if (v3 < this.attackRange - 100) {
this.action = 'attack2';
} else {
this.action = 'approach';
}
}
} else {
this.action = 'approach';
}
}
_root.bossWindow.hpBar._xscale = (this.health / _root[this.idName][0]) * 100;
if (this._parent._x > 600) {
++this.bugTimer;
if (this.bugTimer >= 125) {
this.bugTimer = 0;
_root._parent._x = 575;
findAttack();
}
}
if (this.hit == false && this.dead == false && _root.gamePaused == false) {
if (this._parent._x > 670 || this._parent._x < -20) {
this.canHit = false;
}
if (this.action != 'charge' && this.action != 'enter') {
if (this._parent._x < _root[_root.hero]._x) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
}
if (this.action == 'enter') {
this.canHit = true;
this.gotoAndStop('walk');
this._parent._x -= this.speed * (this._parent._xscale / 100);
if (this._parent._x <= 550 && this._parent._x > 100) {
findAttack();
}
} else {
if (this.action == 'attack1') {
this.canHit = false;
this.gotoAndStop('attack1');
} else {
if (this.action == 'attack2') {
this.canHit = false;
this.gotoAndStop('attack2');
} else {
if (this.action == 'approach') {
this.canHit = true;
this.gotoAndStop('walk');
if (this._parent._x < _root[_root.hero]._x) {
this._parent._x += this.speed;
this._parent._xscale = -100;
} else {
this._parent._x -= this.speed;
this._parent._xscale = 100;
}
findAttack();
} else {
if (this.action == 'charge') {
this.gotoAndStop('attack3');
this.canHit = true;
this._parent._x -= (this.speed + 2) * (this._parent._xscale / 100);
if (this._parent._x < -75 || this._parent._x > 725) {
this._parent._xscale *= -1;
this.action = 'enter';
this.timesAttacked = 0;
}
} else {
if (this.action == 'stand') {
this.canHit = true;
this.gotoAndStop('stand');
}
}
}
}
}
}
}
}
}
}
movieClip 611 {
}
movieClip 612 gladiatorAttack1 {
instance of movieClip 611 {
onClipEvent (enterFrame) {
_root.checkCollision(this._parent, 'gladiator', 'proj', 1);
}
}
frame 10 {
this.removeMovieClip();
}
}
movieClip 617 houndHit1 {
frame 5 {
this.removeMovieClip();
}
}
movieClip 626 {
}
movieClip 627 {
}
movieClip 652 {
frame 9 {
this.weapon._visible = false;
_root.shakeScreen(4);
_root.checkCollision(this.weapon, 'hound', 'melee', 1);
_root.playSound('houndAttack');
}
frame 14 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 655 {
frame 1 {
_root.playSound('houndHit');
}
frame 4 {
this._parent.hit = false;
this._parent.attacking = false;
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 666 {
}
movieClip 667 {
frame 1 {
_root.playSound('houndDie');
}
frame 14 {
_root.removeFromArray('scrollDead', this._parent._parent.scrollName);
this._parent._parent.removeMovieClip();
}
}
movieClip 684 {
}
movieClip 685 {
frame 1 {
stop();
}
}
movieClip 686 hound {
instance inside of movieClip 685 {
onClipEvent (load) {
this.idName = 'hound';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.damage = _root[this.idName][8];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.attackTimer = 0;
this.stunTimer = 0;
this.freezeTimer = 0;
this.canHit = true;
this.canStun = true;
this.canFreeze = true;
this._parent._y = _root.ground;
}
onClipEvent (enterFrame) {
if (this.dead == false && this.stunned == false && _root.gamePaused == false) {
var dif = _root[_root.hero]._x - this._parent._x;
if (dif > _root[this.idName][18]) {
this.speed = _root.chaseSpeed;
} else {
this.speed = _root[this.idName][1];
}
if (dif > 0) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
var xDif = Math.abs(dif);
if (this.hit == false) {
if (xDif > this.attackRange && !this.attacking && !this.frozen) {
this.gotoAndStop('walk');
if (_root[_root.hero]._x <= this._parent._x) {
this._parent._x -= this.speed;
} else {
this._parent._x += this.speed;
}
} else {
if (xDif <= this.attackRange && !this.attacking && this.attackTimer == 0) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack1');
} else {
if (!this.attacking) {
this.gotoAndStop('stand');
}
}
}
}
if (this.attackTimer > 0) {
++this.attackTimer;
if (this.attackTimer >= this.attackReset) {
this.attackTimer = 0;
}
}
} else {
if (this.dead) {
this.gotoAndStop('die');
}
}
if (this.stunned && _root.gamePaused == false && this.dead == false) {
++this.stunTimer;
if (this.stunTimer >= this.releaseStun) {
this.stunned = false;
this.stunTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
if (this.frozen && _root.gamePaused == false && this.dead == false) {
++this.freezeTimer;
if (this.freezeTimer >= this.releaseFreeze) {
_root.removeColorEffect(this._parent);
this.frozen = false;
this.freezeTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
}
}
}
movieClip 693 monkHit1 {
frame 1 {
_root.playSound('monkAttackHit');
}
frame 4 {
this.removeMovieClip();
}
}
movieClip 696 {
}
movieClip 697 monkAttack1 {
instance of movieClip 696 {
onClipEvent (enterFrame) {
_root.checkCollision(this._parent, 'monk', 'proj', 1);
}
}
frame 15 {
this.removeMovieClip();
}
}
movieClip 704 {
}
movieClip 713 {
}
movieClip 722 {
frame 5 {
_root.useAttackEnemy(this._parent._parent, 1);
_root.playSound('monkAttack');
}
frame 9 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 725 {
frame 1 {
_root.playSound('zombieHit');
}
frame 4 {
this._parent.hit = false;
this._parent.attacking = false;
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 726 {
}
movieClip 747 {
}
movieClip 748 {
frame 1 {
_root.playSound('monkDie');
}
frame 15 {
_root.removeFromArray('scrollDead', this._parent._parent.scrollName);
this._parent._parent.removeMovieClip();
}
}
movieClip 749 {
frame 1 {
stop();
}
}
movieClip 750 monk {
instance inside of movieClip 749 {
onClipEvent (load) {
this.idName = 'monk';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.damage = _root[this.idName][8];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.attackTimer = 0;
this.stunTimer = 0;
this.freezeTimer = 0;
this.canHit = true;
this.canStun = true;
this.canFreeze = true;
this._parent._y = _root.ground;
}
onClipEvent (enterFrame) {
if (this.dead == false && this.stunned == false && _root.gamePaused == false) {
var dif = _root[_root.hero]._x - this._parent._x;
if (dif > _root[this.idName][18]) {
this.speed = _root.chaseSpeed;
} else {
this.speed = _root[this.idName][1];
}
if (dif > 0) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
var xDif = Math.abs(dif);
if (this.hit == false) {
if (xDif > this.attackRange && !this.attacking && !this.frozen || this._parent._x < 25 || this._parent._x > 625) {
this.gotoAndStop('walk');
if (_root[_root.hero]._x <= this._parent._x) {
this._parent._x -= this.speed;
} else {
this._parent._x += this.speed;
}
} else {
if (xDif <= this.attackRange && !this.attacking && this.attackTimer == 0) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack1');
} else {
if (!this.attacking) {
this.gotoAndStop('stand');
}
}
}
}
if (this.attackTimer > 0) {
++this.attackTimer;
if (this.attackTimer >= this.attackReset) {
this.attackTimer = 0;
}
}
} else {
if (this.dead) {
this.gotoAndStop('die');
}
}
if (this.stunned && _root.gamePaused == false && this.dead == false) {
++this.stunTimer;
if (this.stunTimer >= this.releaseStun) {
this.stunned = false;
this.stunTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
if (this.frozen && _root.gamePaused == false && this.dead == false) {
++this.freezeTimer;
if (this.freezeTimer >= this.releaseFreeze) {
_root.removeColorEffect(this._parent);
this.frozen = false;
this.freezeTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
}
}
}
movieClip 755 skeletonHit1 {
frame 7 {
this.removeMovieClip();
}
}
movieClip 762 {
}
movieClip 771 {
}
movieClip 788 {
frame 7 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'skeleton', 'melee', 1);
_root.playSound('skeletonAttack');
}
frame 10 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 791 {
frame 1 {
_root.playSound('skeletonHit');
}
frame 4 {
this._parent.hit = false;
this._parent.attacking = false;
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 792 {
}
movieClip 803 {
}
movieClip 804 {
frame 1 {
_root.playSound('skeletonDie');
}
frame 13 {
_root.removeFromArray('scrollDead', this._parent._parent.scrollName);
this._parent._parent.removeMovieClip();
}
}
movieClip 805 {
frame 1 {
stop();
}
}
movieClip 806 skeleton {
instance inside of movieClip 805 {
onClipEvent (load) {
this.idName = 'skeleton';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.damage = _root[this.idName][8];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.attackTimer = 0;
this.stunTimer = 0;
this.freezeTimer = 0;
this.canHit = true;
this.canStun = true;
this.canFreeze = true;
this._parent._y = _root.ground;
}
onClipEvent (enterFrame) {
if (this.dead == false && this.stunned == false && _root.gamePaused == false) {
var dif = _root[_root.hero]._x - this._parent._x;
if (dif > _root[this.idName][18]) {
this.speed = _root.chaseSpeed;
} else {
this.speed = _root[this.idName][1];
}
if (dif > 0) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
var xDif = Math.abs(dif);
if (this.hit == false) {
if (xDif > this.attackRange && !this.attacking && !this.frozen) {
this.gotoAndStop('walk');
if (_root[_root.hero]._x <= this._parent._x) {
this._parent._x -= this.speed;
} else {
this._parent._x += this.speed;
}
} else {
if (xDif <= this.attackRange && !this.attacking && this.attackTimer == 0) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack1');
} else {
if (!this.attacking) {
this.gotoAndStop('stand');
}
}
}
}
if (this.attackTimer > 0) {
++this.attackTimer;
if (this.attackTimer >= this.attackReset) {
this.attackTimer = 0;
}
}
} else {
if (this.dead) {
this.gotoAndStop('die');
}
}
if (this.stunned && _root.gamePaused == false && this.dead == false) {
++this.stunTimer;
if (this.stunTimer >= this.releaseStun) {
this.stunned = false;
this.stunTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
if (this.frozen && _root.gamePaused == false && this.dead == false) {
++this.freezeTimer;
if (this.freezeTimer >= this.releaseFreeze) {
_root.removeColorEffect(this._parent);
this.frozen = false;
this.freezeTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
}
}
}
movieClip 817 {
}
movieClip 818 ghostAttack1 {
instance of movieClip 817 {
onClipEvent (enterFrame) {
_root.checkCollision(this._parent, 'ghost', 'proj', 1);
}
}
frame 20 {
this.removeMovieClip();
}
}
movieClip 827 {
}
movieClip 836 {
}
movieClip 837 {
}
movieClip 840 {
frame 1 {
_root.playSound('ghostHit');
}
frame 4 {
this._parent.hit = false;
this._parent.attacking = false;
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 853 {
frame 1 {
_root.playSound('ghostDie');
}
frame 9 {
_root.removeFromArray('scrollDead', this._parent._parent.scrollName);
this._parent._parent.removeMovieClip();
}
}
movieClip 882 {
frame 12 {
_root.useAttackEnemy(this._parent._parent, 1);
_root.playSound('ghostAttack');
}
frame 27 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 883 {
frame 1 {
stop();
}
}
movieClip 884 ghost {
instance inside of movieClip 883 {
onClipEvent (load) {
this.idName = 'ghost';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.damage = _root[this.idName][8];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.attackTimer = 0;
this.stunTimer = 0;
this.freezeTimer = 0;
this.canHit = true;
this.canStun = true;
this.canFreeze = true;
this._parent._y = _root.ground;
}
onClipEvent (enterFrame) {
if (this.dead == false && this.stunned == false && _root.gamePaused == false) {
var dif = _root[_root.hero]._x - this._parent._x;
if (dif > _root[this.idName][18]) {
this.speed = _root.chaseSpeed;
} else {
this.speed = _root[this.idName][1];
}
if (dif > 0) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
var xDif = Math.abs(dif);
if (this.hit == false) {
if ((xDif > this.attackRange || this._parent._x < 25 || this._parent._x > 625) && !this.attacking && !this.frozen) {
this.gotoAndStop('walk');
if (_root[_root.hero]._x <= this._parent._x) {
this._parent._x -= this.speed;
} else {
this._parent._x += this.speed;
}
} else {
if (xDif <= this.attackRange && !this.attacking && this.attackTimer == 0) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack1');
} else {
if (!this.attacking) {
this.gotoAndStop('stand');
}
}
}
}
if (this.attackTimer > 0) {
++this.attackTimer;
if (this.attackTimer >= this.attackReset) {
this.attackTimer = 0;
}
}
}
if (this.stunned && _root.gamePaused == false && this.dead == false) {
++this.stunTimer;
if (this.stunTimer >= this.releaseStun) {
this.stunned = false;
this.stunTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
if (this.frozen && _root.gamePaused == false && this.dead == false) {
++this.freezeTimer;
if (this.freezeTimer >= this.releaseFreeze) {
_root.removeColorEffect(this._parent);
this.frozen = false;
this.freezeTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
}
}
}
movieClip 899 taurenAttack1 {
frame 40 {
_root.useAttackEnemy(_root[_root.enemyArray[0]], 3);
this.removeMovieClip();
}
}
movieClip 912 taurenAttack2 {
frame 1 {
_root.checkCollision(this.weapon, 'tauren', 'melee', 2);
_root.playSound('taurenAttack2');
}
frame 13 {
this.removeMovieClip();
}
}
movieClip 915 {
}
movieClip 928 taurenAttack3 {
instance of movieClip 915 {
onClipEvent (enterFrame) {
_root.checkCollision(this._parent, 'tauren', 'proj', 2);
}
}
frame 7 {
_root.shakeScreen(4);
_root.playSound('taurenAttack1');
}
frame 12 {
if (_root.bossEffectX < this._x && this._x < 550) {
var atkName = 'attack' + _root.attackDepth;
_root.attachMovie('taurenAttack3', atkName, _root.attackDepth++);
_root[atkName]._x = this._x + 115;
_root[atkName]._y = _root.ground;
} else {
if (_root.bossEffectX > this._x && this._x > 50) {
var atkName = 'attack' + _root.attackDepth;
_root.attachMovie('taurenAttack3', atkName, _root.attackDepth++);
_root[atkName]._x = this._x - 115;
_root[atkName]._y = _root.ground;
}
}
this.removeMovieClip();
}
}
movieClip 933 taurenHit1 {
frame 7 {
this.removeMovieClip();
}
}
movieClip 942 {
frame 24 {
if (random(2) == 0) {
this._parent.timesAttacked = 0;
this._parent.action = 'attack2';
} else {
this._parent.timesAttacked = 0;
this._parent.action = 'attack1';
}
if (this._parent._parent._x > 550) {
this._parent.action = 'enter';
}
}
}
movieClip 953 {
}
movieClip 956 {
frame 1 {
_root.playSound('taurenHit');
}
frame 4 {
if (this._parent.action == 'stand') {
if (random(2) == 0) {
this._parent.timesAttacked = 0;
this._parent.action = 'attack2';
} else {
this._parent.timesAttacked = 0;
this._parent.action = 'attack1';
}
if (this._parent._parent._x > 550) {
this._parent.action = 'enter';
}
} else {
this._parent.hit = false;
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
}
movieClip 967 {
}
movieClip 968 {
frame 1 {
_root.playSound('centaurDie');
}
frame 16 {
_root.nextArea();
this._parent._parent.removeMovieClip();
}
}
movieClip 969 {
}
movieClip 980 {
frame 9 {
_root.useAttackEnemy(this._parent._parent, 1);
}
frame 18 {
this.canHit = true;
}
frame 32 {
this._parent.action = 'backOut';
this._parent.gotoAndStop('backOut');
}
}
movieClip 991 {
frame 17 {
++this._parent.timesAttacked;
_root.shakeScreen(4);
_root.useAttackEnemy(this._parent._parent, 2);
}
frame 25 {
if (this._parent.timesAttacked >= 3) {
this._parent.action = 'backOut';
this._parent.gotoAndStop('backOut');
}
}
}
movieClip 992 {
frame 1 {
stop();
}
}
movieClip 993 tauren {
instance inside of movieClip 992 {
onClipEvent (load) {
this.idName = 'tauren';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.canHit = false;
this.canStun = false;
this.canFreeze = false;
this.actionTimer = 0;
this.action = 'enter';
this._parent._y = _root.ground;
this._parent._x = 850;
this.timesAttacked = 5;
}
onClipEvent (enterFrame) {
_root.bossWindow.hpBar._xscale = (this.health / _root[this.idName][0]) * 100;
if (this.hit == false && this.dead == false && _root.gamePaused == false) {
if (this._parent._x > 730) {
this.canHit = false;
}
if (this.action == 'enter') {
this.canHit = true;
this.gotoAndStop('walk');
this._parent._x -= this.speed + 1;
if (this._parent._x <= 550) {
if (this.timesAttacked == 5) {
this.canHit = true;
this.action = 'stand';
this.gotoAndStop('stand');
} else {
if (random(2) == 0) {
this.timesAttacked = 0;
this.action = 'attack2';
} else {
this.timesAttacked = 0;
this.action = 'attack1';
}
}
}
} else {
if (this.action == 'attack1') {
this.canHit = false;
this.gotoAndStop('attack1');
} else {
if (this.action == 'attack2') {
this.canHit = false;
this.gotoAndStop('attack2');
} else {
if (this.action == 'backOut') {
this.canHit = true;
this.gotoAndStop('backOut');
this._parent._x += this.speed + 1;
if (this._parent._x >= 850) {
this.action = 'enter';
this._parent._x = 775;
}
} else {
if (this.action == 'stand') {
this.gotoAndStop('stand');
}
}
}
}
}
}
}
}
}
movieClip 1000 {
}
movieClip 1013 {
frame 9 {
this.weapon._visible = false;
_root.shakeScreen(4);
_root.checkCollision(this.weapon, 'titan', 'melee', 1);
_root.playSound('titanAttack2');
}
frame 11 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 1026 {
}
movieClip 1035 {
}
movieClip 1036 {
frame 14 {
_root.removeFromArray('scrollDead', this._parent._parent.scrollName);
this._parent._parent.removeMovieClip();
}
}
movieClip 1037 {
}
movieClip 1040 {
frame 1 {
_root.playSound('titanHit');
}
frame 4 {
this._parent.hit = false;
this._parent.attacking = false;
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1041 {
}
movieClip 1042 titan {
instance inside of movieClip 1041 {
onClipEvent (load) {
this.idName = 'titan';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.damage = _root[this.idName][8];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.attackTimer = 0;
this.stunTimer = 0;
this.freezeTimer = 0;
this.canHit = true;
this.canStun = true;
this.canFreeze = true;
this._parent._y = _root.ground;
}
onClipEvent (enterFrame) {
if (this.dead == false && this.stunned == false && _root.gamePaused == false) {
var dif = _root[_root.hero]._x - this._parent._x;
if (dif > _root[this.idName][18]) {
this.speed = _root.chaseSpeed;
} else {
this.speed = _root[this.idName][1];
}
if (dif > 0) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
var xDif = Math.abs(dif);
if (this.hit == false) {
if (xDif > this.attackRange && !this.attacking && !this.frozen) {
this.gotoAndStop('walk');
if (_root[_root.hero]._x <= this._parent._x) {
this._parent._x -= this.speed;
} else {
this._parent._x += this.speed;
}
} else {
if (xDif <= this.attackRange && !this.attacking && this.attackTimer == 0) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack1');
} else {
if (!this.attacking) {
this.gotoAndStop('stand');
}
}
}
}
if (this.attackTimer > 0) {
++this.attackTimer;
if (this.attackTimer >= this.attackReset) {
this.attackTimer = 0;
}
}
} else {
if (this.dead) {
this.gotoAndStop('die');
}
}
if (this.stunned && _root.gamePaused == false && this.dead == false) {
++this.stunTimer;
if (this.stunTimer >= this.releaseStun) {
this.stunned = false;
this.stunTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
if (this.frozen && _root.gamePaused == false && this.dead == false) {
++this.freezeTimer;
if (this.freezeTimer >= this.releaseFreeze) {
_root.removeColorEffect(this._parent);
this.frozen = false;
this.freezeTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
}
}
}
movieClip 1055 {
frame 4 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'wizard', 'melee', 1);
}
frame 8 {
this._parent.removeMovieClip();
}
}
movieClip 1056 wizardAttack1 {
}
movieClip 1057 wizardHit1 {
frame 1 {
_root.playSound('wizardAttackHit');
}
frame 7 {
this.removeMovieClip();
}
}
movieClip 1064 {
}
movieClip 1073 {
}
movieClip 1096 {
frame 5 {
_root.playSound('wizardAttack1');
}
frame 17 {
_root.useAttackEnemy(this._parent._parent, 1);
}
frame 26 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 1105 {
frame 6 {
_root.playSound('bullAttack');
}
frame 8 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'wizard', 'melee', 2);
}
frame 9 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'wizard', 'melee', 2);
}
frame 16 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 1108 {
frame 1 {
_root.playSound('wizardHit');
}
frame 4 {
this._parent.hit = false;
this._parent.attacking = false;
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1109 {
}
movieClip 1118 {
}
movieClip 1119 {
frame 1 {
_root.playSound('wizardDie');
}
frame 15 {
_root.removeFromArray('scrollDead', this._parent._parent.scrollName);
this._parent._parent.removeMovieClip();
}
}
movieClip 1120 {
frame 1 {
stop();
}
}
movieClip 1121 wizard {
instance inside of movieClip 1120 {
onClipEvent (load) {
this.idName = 'wizard';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.damage = _root[this.idName][8];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.attackTimer = 0;
this.stunTimer = 0;
this.freezeTimer = 0;
this.canHit = true;
this.canStun = true;
this.canFreeze = true;
this._parent._y = _root.ground;
}
onClipEvent (enterFrame) {
if (this.dead == false && this.stunned == false && _root.gamePaused == false) {
var dif = _root[_root.hero]._x - this._parent._x;
if (dif > _root[this.idName][18]) {
this.speed = _root.chaseSpeed;
} else {
this.speed = _root[this.idName][1];
}
if (dif > 0) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
var xDif = Math.abs(dif);
if (this.hit == false) {
if (xDif > this.attackRange && xDif < 300 && !this.attacking && this.attackTimer == 0 && this._parent._x > 25 && this._parent._x < 625) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack1');
} else {
if (xDif > this.attackRange && !this.attacking && !this.frozen) {
this.gotoAndStop('walk');
if (_root[_root.hero]._x <= this._parent._x) {
this._parent._x -= this.speed;
} else {
this._parent._x += this.speed;
}
} else {
if (xDif <= this.attackRange && !this.attacking && this.attackTimer == 0) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack2');
} else {
if (!this.attacking) {
this.gotoAndStop('stand');
}
}
}
}
}
if (this.attackTimer > 0) {
++this.attackTimer;
if (this.attackTimer >= this.attackReset) {
this.attackTimer = 0;
}
}
} else {
if (this.dead) {
this.gotoAndStop('die');
}
}
if (this.stunned && _root.gamePaused == false && this.dead == false) {
++this.stunTimer;
if (this.stunTimer >= this.releaseStun) {
this.stunned = false;
this.stunTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
if (this.frozen && _root.gamePaused == false && this.dead == false) {
++this.freezeTimer;
if (this.freezeTimer >= this.releaseFreeze) {
_root.removeColorEffect(this._parent);
this.frozen = false;
this.freezeTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
}
}
}
movieClip 1126 zombieHit1 {
frame 3 {
this.removeMovieClip();
}
}
movieClip 1135 {
}
movieClip 1146 {
}
movieClip 1177 {
frame 10 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'zombie', 'melee', 1);
_root.playSound('zombieAttack1');
}
frame 19 {
this._parent.attacking = false;
this._parent.gotoAndStop('stand');
}
}
movieClip 1180 {
frame 1 {
_root.playSound('zombieHit');
}
frame 5 {
this._parent.hit = false;
this._parent.attacking = false;
if (this._parent.stunned) {
this._parent.gotoAndStop('stunned');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1181 {
}
movieClip 1202 {
}
movieClip 1203 {
frame 1 {
_root.playSound('zombieDie');
}
frame 16 {
_root.removeFromArray('scrollDead', this._parent._parent.scrollName);
this._parent._parent.removeMovieClip();
}
}
movieClip 1204 {
frame 1 {
stop();
}
}
movieClip 1205 zombie {
instance inside of movieClip 1204 {
onClipEvent (load) {
this.idName = 'zombie';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.damage = _root[this.idName][8];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.attackTimer = 0;
this.stunTimer = 0;
this.freezeTimer = 0;
this.canHit = true;
this.canStun = true;
this.canFreeze = true;
this._parent._y = _root.ground;
}
onClipEvent (enterFrame) {
if (this.dead == false && this.stunned == false && _root.gamePaused == false) {
var dif = _root[_root.hero]._x - this._parent._x;
if (dif > _root[this.idName][18]) {
this.speed = _root.chaseSpeed;
} else {
this.speed = _root[this.idName][1];
}
if (dif > 0) {
this._parent._xscale = -100;
} else {
this._parent._xscale = 100;
}
var xDif = Math.abs(dif);
if (this.hit == false) {
if (xDif > this.attackRange && !this.attacking && !this.frozen) {
this.gotoAndStop('walk');
if (_root[_root.hero]._x <= this._parent._x) {
this._parent._x -= this.speed;
} else {
this._parent._x += this.speed;
}
} else {
if (xDif <= this.attackRange && !this.attacking && this.attackTimer == 0) {
this.attacking = true;
this.attackTimer = 1;
this.gotoAndStop('attack1');
} else {
if (!this.attacking) {
this.gotoAndStop('stand');
}
}
}
}
if (this.attackTimer > 0) {
++this.attackTimer;
if (this.attackTimer >= this.attackReset) {
this.attackTimer = 0;
}
}
} else {
if (this.dead) {
this.gotoAndStop('die');
}
}
if (this.stunned && _root.gamePaused == false && this.dead == false) {
++this.stunTimer;
if (this.stunTimer >= this.releaseStun) {
this.stunned = false;
this.stunTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
if (this.frozen && _root.gamePaused == false && this.dead == false) {
++this.freezeTimer;
if (this.freezeTimer >= this.releaseFreeze) {
_root.removeColorEffect(this._parent);
this.frozen = false;
this.freezeTimer = 0;
this.hit = false;
this.attacking = false;
this.gotoAndStop('stand');
}
}
}
}
}
movieClip 1216 {
}
movieClip 1222 {
frame 5 {
this._parent.hit = false;
this._parent.gotoAndStop('frozen');
}
}
movieClip 1239 {
frame 5 {
stopAllSounds();
_root.playSound('princessHit');
}
frame 16 {
_root.pauseGame();
_root[_root.hero].gotoAndStop('stand');
_root.playSound('princessFree');
}
frame 110 {
_root.attachMovie('fadeToBlack', 'fadeToBlack', _root.getNextHighestDepth());
_root.fadeToBlack.goal = 'victory';
stop();
}
}
movieClip 1240 {
frame 1 {
stop();
}
}
movieClip 1241 princess {
instance inside of movieClip 1240 {
onClipEvent (load) {
this._parent._alpha = 0;
this._parent._y = _root.ground;
this._parent._x = 450;
this.idName = 'princess';
this.health = _root[this.idName][0];
this.expAmt = 0;
this.attacking = false;
this.dead = false;
this.hit = false;
this.stunned = false;
this.frozen = false;
this.canHit = true;
_root.playSound('princessFall');
}
onClipEvent (enterFrame) {
if (this._parent._alpha < 100) {
this._parent._alpha += 1;
} else {
this.canHit = true;
}
}
}
}
movieClip 1243 {
}
movieClip 1244 fadeToWhite {
frame 20 {
this.removeMovieClip();
}
}
movieClip 1245 fadeToBlack {
frame 20 {
if (this.goal == 'victory') {
_root.bgImage1.removeMovieClip();
_root.bgImage2.removeMovieClip();
_root[_root.hero].removeMovieClip();
_root.prin.removeMovieClip();
_root.transitionWindow.removeMovieClip();
_root.tutorialWindow.removeMovieClip();
_root.respawnWindow.removeMovieClip();
_root.messageWindow.removeMovieClip();
_root.characterScreen.removeMovieClip();
_root.mapMenu.removeMovieClip();
_root.hotBar.removeMovieClip();
_root.characterBar.removeMovieClip();
}
_root.gotoAndStop(this.goal);
this.removeMovieClip();
}
}
movieClip 1254 {
frame 1 {
if (this._parent.timesAttacked > 3) {
this._parent.action = 'backOut';
}
}
frame 24 {
this._parent.findAttack();
}
}
movieClip 1271 {
frame 7 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'hexin', 'melee', 1);
_root.playSound('gladiatorAttack1');
}
frame 32 {
_root.useAttackEnemy(this._parent._parent, 2);
}
frame 40 {
this._parent.action = 'stand';
}
}
movieClip 1294 {
frame 7 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'hexin', 'melee', 1);
_root.playSound('gladiatorAttack1');
}
frame 18 {
_root.useAttackEnemy(this._parent._parent, 2);
this._parent.action = 'stand';
}
}
movieClip 1315 {
frame 1 {
_root.playSound('hexinDie');
}
frame 11 {
_root.bossWindow._visible = false;
_root.nextArea();
this._parent._parent.removeMovieClip();
}
}
movieClip 1318 {
frame 1 {
_root.playSound('hexinHit');
++this._parent.hitNum;
}
frame 4 {
this._parent.hit = false;
if (this._parent.hitNum == 4) {
this._parent.findAttack();
this._parent.hitNum = 0;
}
}
}
movieClip 1327 {
}
movieClip 1328 {
frame 1 {
stop();
}
}
movieClip 1329 hexin {
instance inside of movieClip 1328 {
onClipEvent (load) {
this.idName = 'hexin';
this.health = _root[this.idName][0];
this.speed = _root[this.idName][1];
this.attackReset = _root[this.idName][2];
this.attackRange = _root[this.idName][3];
this.expAmt = _root[this.idName][7];
this.attacking = false;
this.dead = false;
this.hit = false;
this.canHit = false;
this.canStun = false;
this.canFreeze = false;
this.actionTimer = 0;
this.action = 'enter';
this._parent._y = _root.ground;
this._parent._x = 850;
this.timesAttacked = 5;
this.hitNum = 0;
}
onClipEvent (enterFrame) {
function findAttack() {
++this.timesAttacked;
var v3 = Math.abs(_root[_root.hero]._x - this._parent._x);
if (random(2) == 0) {
this.action = 'attack1';
} else {
this.action = 'attack2';
}
}
_root.bossWindow.hpBar._xscale = (this.health / _root[this.idName][0]) * 100;
if (this.hit == false && this.dead == false && _root.gamePaused == false) {
if (this._parent._x > 730) {
this.canHit = false;
}
if (this.action == 'enter') {
this.canHit = true;
this.gotoAndStop('walk');
this._parent._x -= this.speed;
if (this._parent._x <= 575) {
if (this.timesAttacked == 5) {
this.timesAttacked = 0;
this.action = 'stand';
} else {
this.hitNum = 0;
this.timesAttacked = 0;
findAttack();
}
}
} else {
if (this.action == 'attack1') {
this.canHit = false;
this.gotoAndStop('attack1');
} else {
if (this.action == 'attack2') {
this.canHit = false;
this.gotoAndStop('attack2');
} else {
if (this.action == 'backOut') {
this.canHit = true;
this.gotoAndStop('walk');
this._parent._x += this.speed;
if (this._parent._x >= 850) {
this.action = 'enter';
this._parent._x = 775;
}
} else {
if (this.action == 'stand') {
this.canHit = true;
this.gotoAndStop('stand');
}
}
}
}
}
}
}
}
}
movieClip 1348 hexinAttack2 {
frame 15 {
this.weapon._visible = false;
_root.checkCollision(this.weapon, 'hexin', 'melee', 2);
_root.playSound('hexinAttack2');
}
frame 31 {
this.removeMovieClip();
}
}
movieClip 1349 hexinAttack3 {
frame 25 {
this.weapon._visible = false;
_root.shakeScreen(6);
_root.checkCollision(this.weapon, 'hexin', 'melee', 3);
_root.playSound('hexinAttack3');
}
frame 33 {
this.removeMovieClip();
}
}
movieClip 1356 hexinHit3 {
frame 7 {
this.removeMovieClip();
}
}
movieClip 1361 sliceHit {
frame 1 {
_root.playSound('sliceHit');
}
frame 5 {
this.removeMovieClip();
}
}
movieClip 1362 quickSlashHit {
frame 1 {
_root.playSound('sliceHit');
}
frame 5 {
this.removeMovieClip();
}
}
frame 11 {
function myFirstItemHandler() {
getURL('http://www.axis-games.com/castlequest.php', '');
}
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem('(c)2009 - axis-games.com', myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
_root.menu = my_cm;
_root.attachMovie('fadeToWhite', 'fadeToWhite', _root.getNextHighestDepth());
playMoreGamesBtn.useHandCursor = false;
startGameBtn.useHandCursor = false;
creditsBtn.useHandCursor = false;
stopAllSounds();
_root.soundHolder.gotoAndPlay(2);
stop();
}
// unknown tag 88 length 69
button 1369 {
on (release) {
getURL('http://www.axis-games.com', '_blank');
}
}
button 1374 {
on (release) {
getURL('http://www.axis-games.com', '_blank');
}
}
movieClip 1380 {
}
// unknown tag 88 length 145
button 1389 {
on (release) {
_root.attachMovie('fadeToBlack', 'fadeToBlack', _root.getNextHighestDepth());
_root.fadeToBlack.goal = 'charSelect';
}
}
button 1393 {
on (release) {
_root.attachMovie('fadeToBlack', 'fadeToBlack', _root.getNextHighestDepth());
_root.fadeToBlack.goal = 'credits';
}
}
button 1396 {
on (release) {
getURL('http://www.armorgames.com', '_blank');
}
}
movieClip 1399 {
frame 1 {
stop();
}
frame 2 {
this.gotoAndStop(1);
}
}
frame 17 {
function myFirstItemHandler() {
getURL('http://www.axis-games.com/castlequest.php', '');
}
function beginGame(heroType) {
_root.hero = heroType;
if (charNa.text == '') {
if (heroType == 'maxx') {
_root.characterName = 'Maxx';
} else {
_root.characterName = 'Cabon';
}
} else {
_root.characterName = charNa.text;
}
_root.attachMovie('fadeToBlack', 'fadeToBlack', _root.getNextHighestDepth());
_root.fadeToBlack.goal = 'game';
}
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem('(c)2009 - axis-games.com', myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
_root.menu = my_cm;
_root.maxxBtn.useHandCursor = false;
_root.attachMovie('fadeToWhite', 'fadeToWhite', _root.getNextHighestDepth());
_root.onEnterFrame = function () {
if ((codeArea.codeTxt.text == 'axis' || codeArea.codeTxt.text == 'Axis' || codeArea.codeTxt.text == 'AXIS') && _root.cabonMan._currentframe == 1) {
_root.cabonMan.gotoAndStop(2);
_root.cabonMan.cabonBtn.useHandCursor = false;
codeArea.gotoAndStop(2);
}
};
stop();
}
// unknown tag 88 length 62
movieClip 1409 {
frame 1 {
stop();
}
}
movieClip 1418 {
}
button 1420 {
on (release) {
_root.beginGame('cabon');
}
on (rollOver) {
_root.charDescription.gotoAndStop(3);
}
on (rollOut) {
_root.charDescription.gotoAndStop(1);
}
}
movieClip 1421 {
frame 1 {
manman.gotoAndStop(1);
stop();
}
}
movieClip 1428 {
}
button 1430 {
on (release) {
_root.beginGame('maxx');
}
on (rollOver) {
_root.charDescription.gotoAndStop(2);
}
on (rollOut) {
_root.charDescription.gotoAndStop(1);
}
}
movieClip 1437 {
frame 1 {
stop();
}
}
frame 27 {
function myFirstItemHandler() {
getURL('http://www.axis-games.com/castlequest.php', '');
}
function showTutorial(num) {
if (tutorialArray[num] == false) {
tutorialArray[num] = true;
pauseGame();
_root.tutorialWindow.gotoAndStop(num + 1);
}
}
function closeTutorials() {
if (_root.characterScreen._visible == false) {
unPauseGame();
}
_root.tutorialWindow.gotoAndStop(1);
}
function cancleTutorials() {
closeTutorials();
var v1 = 1;
while (v1 < tutorialArray.length) {
tutorialArray[v1] = true;
++v1;
}
}
function playSound(sound) {
if (soundOn && allowSound) {
_root.sounds.gotoAndPlay(sound);
}
}
function ambientSound() {
clearInterval(soundInterval);
if (area <= 4) {
soundInterval = setInterval(ambientSound, 20000 + random(20000));
playSound('effect' + area);
}
}
function setHotBar() {
var v2 = 1;
while (v2 < 7) {
_root.hotBar['slot' + v2].gotoAndStop(hotBarList[v2]);
_root.hotBar['slot' + v2].btn.useHandCursor = false;
++v2;
}
}
function openAbilityMenu(slot) {
playSound('click');
clearInterval(menuInterval);
_root.hotBar.abilityMenu._y = -25;
_root.hotBar.abilityMenu._x = -360 + slot * 40;
var v2 = 1;
while (v2 < 7) {
_root.hotBar.abilityMenu['slot' + v2].gotoAndStop(abilityList[v2]);
_root.hotBar.abilityMenu['slot' + v2].btn.useHandCursor = false;
++v2;
}
hotBarValue = slot;
menuInterval = setInterval(openMenu, 5);
}
function closeAbilityMenu() {
clearInterval(menuInterval);
menuInterval = setInterval(closeMenu, 5);
}
function openMenu() {
_root.hotBar.abilityMenu._y -= 3;
var v2 = -30 - 18 * (abilityList.length - 1);
if (_root.hotBar.abilityMenu._y <= v2) {
_root.hotBar.abilityMenu._y = v2;
clearInterval(menuInterval);
}
}
function closeMenu() {
hotBarValue = null;
_root.hotBar.abilityMenu._y += 3;
if (_root.hotBar.abilityMenu._y >= 25) {
_root.hotBar.abilityMenu._y = stopValue;
clearInterval(menuInterval);
}
}
function setNewAbility(slot) {
if (_root.hotBar.abilityMenu._y < -25) {
playSound('click');
_root.hotBar['slot' + hotBarValue].gotoAndStop(abilityList[slot]);
_root.hotBar['slot' + hotBarValue].btn.useHandCursor = false;
hotBarList[hotBarValue] = abilityList[slot];
closeAbilityMenu();
}
}
function showAbilityTooltip(slot) {
playSound('rollOver');
_root.hotBar.abilityText.gotoAndStop(hotBarList[slot]);
}
function showCharacterText() {
_root.characterBar.healthText.text = Math.round(currentHealth) + '/' + maxHealth;
_root.characterBar.energyText.text = Math.round(currentEnergy) + '/' + maxEnergy;
_root.characterBar.expText.text = currentExp + '/' + expToLevel;
}
function getMaxHealth() {
var v3 = baseHealth * (level * 0.4 / 8);
var v1 = baseHealth + v3;
var v2 = v1 * healthBonus;
var v4 = Math.round(v1 + v2);
return v4;
}
function getMaxEnergy() {
var v3 = baseEnergy * (level * 0.4 / 8);
var v1 = baseEnergy + v3;
var v2 = v1 * energyBonus;
var v4 = Math.round(v1 + v2);
return v4;
}
function regen() {
if (gamePaused == false) {
changeHealth(healthRegen);
changeEnergy(energyRegen);
}
}
function spawnEnemy() {
if (gamePaused == false && bossFight == false) {
++enemyNum;
var v3 = 'area' + area;
var v4 = _root[v3][random(_root[v3].length)];
var v2 = 'e' + enemyNum;
_root.attachMovie(v4, v2, enemyDepth + enemyNum);
enemyArray[enemyArray.length] = v2;
scrollDead[scrollDead.length] = v2;
_root[v2].scrollName = v2;
_root[v2].hitPlace._visible = false;
if (random(2) == 0 && distanceMoved < distanceTilBoss[area] - 200) {
_root[v2]._x = 700;
} else {
_root[v2]._x = -80;
}
if (random(100) <= doubleSpawn[area]) {
++enemyNum;
v4 = _root[v3][random(_root[v3].length)];
v2 = 'e' + enemyNum;
_root.attachMovie(v4, v2, enemyDepth + enemyNum);
enemyArray[enemyArray.length] = v2;
scrollDead[scrollDead.length] = v2;
_root[v2].scrollName = v2;
_root[v2].hitPlace._visible = false;
if (_root['e' + (enemyNum - 1)]._x < 0 && distanceMoved < distanceTilBoss[area] - 200) {
_root[v2]._x = 700;
} else {
_root[v2]._x = -80;
}
}
if (enemyArray.length > 3) {
allowScroll = false;
}
}
}
function spawnBoss() {
clearInterval(bossInterval);
++enemyNum;
var v3 = bossArray[area];
var v2 = 'e' + enemyNum;
_root.bossWindow.portrait.gotoAndStop(area);
_root.bossWindow.names.gotoAndStop(area);
_root.bossWindow.hpBar._xscale = 100;
_root.bossWindow._visible = true;
_root.attachMovie(v3, v2, enemyDepth + enemyNum);
enemyArray[enemyArray.length] = v2;
_root[v2].hitPlace._visible = false;
_root[v2]._x = 700;
}
function getTalentText(talent) {
if (_root.tutorialWindow._currentframe == 1) {
var v5 = _root[talent][1];
var v3 = String(talent) + String(v5);
_root.playSound('rollOver');
if (_root.characterScreen.dTalents.getDepth() == topDepth) {
_root.characterScreen.dTalents.talentTree.talentText.gotoAndStop(v3);
var v4 = _root.characterScreen.dTalents.talentTree[talent + 'MC']._x;
var v6 = _root.characterScreen.dTalents.talentTree[talent + 'MC']._y;
_root.characterScreen.dTalents.talentTree.talentText._x = v4 - 25;
_root.characterScreen.dTalents.talentTree.talentText._y = v6 - 23;
} else {
_root.characterScreen.oTalents.talentTree.talentText.gotoAndStop(v3);
var v4 = _root.characterScreen.oTalents.talentTree[talent + 'MC']._x;
var v6 = _root.characterScreen.oTalents.talentTree[talent + 'MC']._y;
_root.characterScreen.oTalents.talentTree.talentText._x = v4 - 25;
_root.characterScreen.oTalents.talentTree.talentText._y = v6 - 23;
}
}
}
function getHiddenTalentText(talent) {
if (_root.tutorialWindow._currentframe == 1) {
var v6 = _root[talent][1];
var v3 = String(talent) + 'H';
if (_root.characterScreen.dTalents.getDepth() == topDepth) {
_root.characterScreen.dTalents.talentTree.talentText.gotoAndStop(v3);
var v4 = _root.characterScreen.dTalents.talentTree[talent + 'MC']._x;
var v5 = _root.characterScreen.dTalents.talentTree[talent + 'MC']._y;
_root.characterScreen.dTalents.talentTree.talentText._x = v4 - 25;
_root.characterScreen.dTalents.talentTree.talentText._y = v5 - 23;
} else {
_root.characterScreen.oTalents.talentTree.talentText.gotoAndStop(v3);
var v4 = _root.characterScreen.oTalents.talentTree[talent + 'MC']._x;
var v5 = _root.characterScreen.oTalents.talentTree[talent + 'MC']._y;
_root.characterScreen.oTalents.talentTree.talentText._x = v4 - 25;
_root.characterScreen.oTalents.talentTree.talentText._y = v5 - 23;
}
}
}
function resetTalentText() {
if (_root.characterScreen.dTalents.getDepth() == topDepth) {
_root.characterScreen.dTalents.talentTree.talentText.gotoAndStop(1);
} else {
_root.characterScreen.oTalents.talentTree.talentText.gotoAndStop(1);
}
}
function processTalent(talent) {
if (currentTalentPoints > 0 && _root[talent][1] < _root[talent][2]) {
--currentTalentPoints;
if (currentTalentPoints > 0) {
_root.hotBar.tpNum.text = currentTalentPoints;
} else {
_root.hotBar.tpNum.text = '';
}
_root.playSound('gainTalent');
++_root[talent][1];
if (talent == 'block') {
showTutorial(5);
} else {
if (talent == 'fly') {
showTutorial(6);
}
}
if (_root.characterScreen.dTalents.getDepth() == topDepth) {
_root.characterScreen.dTalents.talentTree[talent + 'Txt'].text = _root[talent][1] + '/' + _root[talent][2];
} else {
_root.characterScreen.oTalents.talentTree[talent + 'Txt'].text = _root[talent][1] + '/' + _root[talent][2];
}
if (_root[talent][0] == 'passive') {
var v4 = _root[talent][5];
_root[v4] = _root[talent][6][_root[talent][1]];
} else {
if (_root[talent][0] == 'ability') {
showTutorial(4);
abilityList[abilityList.length] = _root[talent][5];
var v3 = 1;
while (v3 < 7) {
if (hotBarList[v3] == '') {
hotBarList[v3] = _root[talent][5];
setHotBar();
break;
}
++v3;
}
}
}
if (_root[talent][1] == _root[talent][2]) {
if (_root.characterScreen.dTalents.getDepth() == topDepth) {
_root.characterScreen.dTalents.talentTree[talent + 'Arrow'].gotoAndPlay(2);
_root.characterScreen.dTalents.talentTree[talent + 'MC'][talent + 'Btn'].useHandCursor = false;
} else {
_root.characterScreen.oTalents.talentTree[talent + 'Arrow'].gotoAndPlay(2);
_root.characterScreen.oTalents.talentTree[talent + 'MC'][talent + 'Btn'].useHandCursor = false;
}
if (_root[talent][3] != null && level >= levelPerTier[_root[talent][4] + 1]) {
if (_root.characterScreen.dTalents.getDepth() == topDepth) {
_root.characterScreen.dTalents.talentTree[_root[talent][3] + 'MC'].gotoAndStop(2);
_root.characterScreen.dTalents.talentTree[_root[talent][3] + 'MC'][_root[talent][3] + 'Btn'].useHandCursor = false;
} else {
_root.characterScreen.oTalents.talentTree[_root[talent][3] + 'MC'].gotoAndStop(2);
_root.characterScreen.oTalents.talentTree[_root[talent][3] + 'MC'][_root[talent][3] + 'Btn'].useHandCursor = false;
}
}
}
maxHealth = getMaxHealth();
maxEnergy = getMaxEnergy();
changeHealth(0);
changeEnergy(0);
getTalentText(talent);
setCharacterText();
} else {
if (currentTalentPoints == 0) {
showMessage('You have no Talent Points');
} else {
showMessage('That Talent is already maxed');
}
}
}
function updateTalents() {
var v4 = 0;
while (v4 < allDTalents.length) {
var v2 = allDTalents[v4];
var v3 = _root[v2][3];
var v5 = _root[v2][4];
if (v3 != null && _root[v2][1] == _root[v2][2] && level >= levelPerTier[v5 + 1]) {
_root.characterScreen.dTalents.talentTree[v3 + 'MC'].gotoAndStop(2);
_root.characterScreen.dTalents.talentTree[v3 + 'MC'][v3 + 'Btn'].useHandCursor = false;
}
if (_root[v2][7] == null && _root.characterScreen.dTalents.talentTree[v2 + 'MC']._currentframe == 1 && level >= levelPerTier[v5]) {
_root.characterScreen.dTalents.talentTree[v2 + 'MC'].gotoAndStop(2);
_root.characterScreen.dTalents.talentTree[v2 + 'MC'][v2 + 'Btn'].useHandCursor = false;
}
++v4;
}
v4 = 0;
while (v4 < allOTalents.length) {
v2 = allOTalents[v4];
v3 = _root[v2][3];
v5 = _root[v2][4];
if (v3 != null && _root[v2][1] == _root[v2][2] && level >= levelPerTier[v5 + 1]) {
_root.characterScreen.oTalents.talentTree[v3 + 'MC'].gotoAndStop(2);
_root.characterScreen.oTalents.talentTree[v3 + 'MC'][v3 + 'Btn'].useHandCursor = false;
}
if (_root[v2][7] == null && _root.characterScreen.oTalents.talentTree[v2 + 'MC']._currentframe == 1 && level >= levelPerTier[v5]) {
_root.characterScreen.oTalents.talentTree[v2 + 'MC'].gotoAndStop(2);
_root.characterScreen.oTalents.talentTree[v2 + 'MC'][v2 + 'Btn'].useHandCursor = false;
}
++v4;
}
}
function useAttack(attack) {
var v2 = 'attack' + attackDepth;
++attackDepth;
_root.attachMovie(attack, v2, attackDepth);
_root[v2]._xscale = _root[hero]._xscale;
_root[v2]._x = _root[hero]._x;
_root[v2]._y = _root[hero]._y;
if (attack == 'brimstone' || attack == 'levelUpEffect') {
_root[v2]._y = ground;
}
}
function attachHitEffect(attackName, attackType, tempEnemy) {
var v2 = 'hit' + attackDepth;
++attackDepth;
if (attackType == 'blackIce') {
_root[tempEnemy].attachMovie(attackType + 'Hit', 'insideHitEffect', attackDepth);
_root[tempEnemy].insideHitEffect._xscale = attackName._xscale;
} else {
_root.attachMovie(attackType + 'Hit', v2, attackDepth);
_root[v2]._xscale = attackName._xscale;
_root[v2]._x = _root[tempEnemy]._x + _root[attackType][6] * (attackName._xscale / 100);
_root[v2]._y = attackName._y + _root[attackType][7];
}
}
function checkForProjectile(attackName, attackType) {
var v4 = 0;
while (v4 < enemyArray.length) {
var v6 = enemyArray[v4];
if (attackName.hitTest(_root[v6].hitPlace) && _root[v6].inside.canHit) {
criticalHit = false;
var v2 = getDamage(attackType);
var v5 = _root[attackType][2] * (_root[hero]._xscale / 100);
if (hero == 'cabon') {
if (focusedMind[1] > 0) {
v2 += Math.round(v2 * focusedMind[6][focusedMind[1]]);
}
if (attackType == 'brimstone' && fireAndIce[1] > 0) {
v2 += Math.round(v2 * fireAndIce[6][fireAndIce[1]]);
}
if (deadlyFocusOn) {
_root.characterBar.effectIcon.gotoAndStop(1);
deadlyFocusOn = false;
v2 *= 2;
}
if (_root[v6].inside.frozen && shatter[1] > 0) {
if (random(100) < shatter[6][shatter[1]]) {
++criticalHitsLvl;
v2 *= 2;
criticalHit = true;
}
}
if (criticalHit && deadlyFocus[1] > 0) {
_root.characterBar.effectIcon.gotoAndStop('deadlyFocus');
deadlyFocusOn = true;
}
if (criticalHit && feedback[1] > 0) {
var v7 = Math.round(maxEnergy * feedback[6][feedback[1]]);
changeEnergy(v7);
}
}
checkMaxDamage(v2);
damageDoneLvl += v2;
_root[v6]._x += v5;
_root[v6].inside.health -= v2;
_root[v6].inside.hit = true;
_root[v6].inside.gotoAndStop('hit');
_root[v6].inside.frozen = false;
removeColorEffect(_root[v6]);
attachHitEffect(attackName, attackType, v6);
if (v6 == 'prin' || bossFight) {
_root[v6]._x -= v5;
}
if (_root[attackType][5] && _root[v6].inside.canFreeze) {
attachFreezeEffect(_root[v6]);
_root[v6].inside.frozen = true;
_root[v6].inside.releaseFreeze = _root[attackType][8];
}
if (_root[attackType][4] && _root[v6].inside.canStun) {
_root[v6].inside.stunned = true;
_root[v6].inside.releaseStun = _root[attackType][8];
}
if (_root[v6].inside.health <= 0) {
++enemiesKilled;
++enemiesKilledLvl;
_root.kongregateStats.submit('MonstersKilled', enemiesKilled);
changeExp(_root[v6].inside.expAmt);
_root[v6].inside.dead = true;
_root[v6].inside.gotoAndStop('die');
toBeKilled[toBeKilled.length] = v6;
}
attachEnemySCT(v6, v2, criticalHit);
if (_root[attackType][3] == false) {
attackName.removeMovieClip();
}
}
++v4;
}
v4 = 0;
while (v4 < toBeKilled.length) {
v6 = toBeKilled[v4];
removeFromArray('enemyArray', v6);
++v4;
}
toBeKilled = [];
}
function getDamage(attack) {
var v2 = Math.round(_root[attack][0] + random(_root[attack][0]) + _root[attack][9] * level);
if (random(100) < critChance) {
++criticalHitsLvl;
criticalHit = true;
v2 *= 2;
}
return v2;
}
function attachEnemySCT(enemy, dam, crit) {
var v2 = 'sct' + attackDepth;
++attackDepth;
_root.attachMovie('enemySCT', v2, attackDepth);
if (crit) {
_root[v2].inside.gotoAndStop(2);
}
_root[v2].inside.damageText.text = dam;
_root[v2]._x = _root[enemy]._x;
_root[v2]._y = _root[enemy]._y - _root[enemy]._height - 5;
}
function attachHeroSCT(dam) {
var v2 = 'sct' + attackDepth;
++attackDepth;
_root.attachMovie('heroSCT', v2, attackDepth);
_root[v2].inside.damageText.text = dam;
_root[v2]._x = _root[hero]._x;
_root[v2]._y = _root[hero]._y - _root[hero]._height - 10;
if (energyShieldOn) {
_root[v2]._y += 110;
}
}
function checkForHit(attackType) {
var v5 = 0;
while (v5 < enemyArray.length) {
var v6 = enemyArray[v5];
if (_root[hero].attack.weapon.hitTest(_root[v6].hitPlace) && _root[v6].inside.canHit && _root[v6].inside.dead == false) {
criticalHit = false;
var v2 = getDamage(attackType);
var v4 = _root[attackType][2] * (_root[hero]._xscale / 100);
if (hero == 'maxx') {
if (powerSwing[1] > 0) {
v2 = Math.round(v2 + v2 * powerSwing[6][powerSwing[1]]);
}
if (medusaBlade[1] > 0 && _root[v6].inside.canStun) {
if (random(100) < medusaBlade[6][medusaBlade[1]]) {
_root[v6].inside.stunned = true;
_root[v6].inside.releaseStun = 75;
}
}
if (forceBlade[1] > 0) {
v4 = Math.round(v4 + v4 * forceBlade[6][forceBlade[1]]);
}
if (_root[v6].inside.stunned && criticalHit && stoneBreaker[1] > 0) {
if (random(100) < stoneBreaker[6][stoneBreaker[1]]) {
v2 = _root[v6].inside.health;
}
}
}
if (drainSoul[1] > 0) {
var v7 = drainSoul[6][drainSoul[1]];
changeEnergy(v7);
}
checkMaxDamage(v2);
attachEnemySCT(v6, v2, criticalHit);
_root[v6]._x += v4;
damageDoneLvl += v2;
_root[v6].inside.health -= v2;
_root[v6].inside.hit = true;
_root[v6].inside.gotoAndStop('hit');
_root[v6].inside.frozen = false;
removeColorEffect(_root[v6]);
attachHitEffect(_root[hero], attackType, v6);
if (v6 == 'prin' || bossFight) {
_root[v6]._x -= v4;
}
if (lifeTap[1] > 0) {
changeHealth(Math.round(v2 * lifeTap[6][lifeTap[1]]));
}
if (_root[attackType][5] && _root[v6].inside.canFreeze) {
attachFreezeEffect(_root[v6]);
_root[v6].inside.frozen = true;
_root[v6].inside.releaseFreeze = _root[attackType][8];
}
if (_root[attackType][4] && _root[v6].inside.canStun) {
_root[v6].inside.stunned = true;
_root[v6].inside.releaseStun = _root[attackType][8];
}
if (_root[v6].inside.health <= 0) {
if (siphonLife[1] > 0) {
changeHealth(Math.round(getMaxHealth() * 0.05));
}
++enemiesKilled;
++enemiesKilledLvl;
_root.kongregateStats.submit('MonstersKilled', enemiesKilled);
changeExp(_root[v6].inside.expAmt);
_root[v6].inside.dead = true;
_root[v6].inside.gotoAndStop('die');
toBeKilled[toBeKilled.length] = v6;
}
if (_root[attackType][3] == false) {
break;
}
}
++v5;
}
v5 = 0;
while (v5 < toBeKilled.length) {
v6 = toBeKilled[v5];
removeFromArray('enemyArray', v6);
++v5;
}
toBeKilled = [];
}
function attachFreezeEffect(enemy) {
var v1 = new flash.geom.Transform(enemy);
v1.colorTransform = iceColorTransform;
}
function attachHeroEffect(color) {
var v2 = new flash.geom.Transform(_root[hero]);
v2.colorTransform = color;
}
function removeColorEffect(enemy) {
var v1 = new flash.geom.Transform(enemy);
v1.colorTransform = blankColor;
}
function checkMaxDamage(dam) {
if (dam > maxDamage) {
maxDamage = dam;
_root.kongregateStats.submit('HighestHit', maxDamage);
showMessage('NEW DAMAGE RECORD!');
}
}
function stunHero(end) {
heroStunned = true;
endStun = end;
stunTimer = 0;
}
function slowHero(end) {
if (heroSlowed == false) {
heroSpeed *= 0.5;
}
heroSlowed = true;
endSlow = end;
slowTimer = 0;
}
function showMessage(mes) {
_root.messageWindow.gotoAndPlay(2);
_root.messageWindow.messageTxt.text = mes;
}
function removeFromArray(array, enemy) {
var v2 = 0;
while (v2 < _root[array].length) {
var v3 = _root[array][v2];
if (String(enemy) == String(v3)) {
_root[array].splice(v2, 1);
break;
}
++v2;
}
}
function changeExp(amt) {
currentExp += amt;
if (currentExp >= expToLevel) {
currentExp -= expToLevel;
if (level < 30) {
expToLevel = expSplits[level];
} else {
expToLevel = 100;
}
++level;
_root.kongregateStats.submit('HighestLevel', level);
useAttack('levelUpEffect');
playSound('levelUp');
showMessage('Level Up! \n You gained 1 Talent Point');
++currentTalentPoints;
maxHealth = getMaxHealth();
maxEnergy = getMaxEnergy();
currentHealth = maxHealth;
currentEnergy = maxEnergy;
_root.characterBar.healthBar._xscale = 100;
_root.characterBar.energyBar._xscale = 100;
_root.hotBar.tpNum.text = currentTalentPoints;
showCharacterText();
updateTalents();
}
if (currentExp < 0) {
currentExp = 0;
}
_root.characterBar.expBar._xscale = (currentExp / expToLevel) * 100;
}
function changeHealth(amt) {
currentHealth += amt;
if (currentHealth <= 0) {
currentHealth = 0;
heroDie();
} else {
if (currentHealth > maxHealth) {
currentHealth = maxHealth;
}
}
showCharacterText();
_root.characterBar.healthBar._xscale = (currentHealth / maxHealth) * 100;
}
function changeEnergy(amt) {
currentEnergy += amt;
if (currentEnergy > maxEnergy) {
currentEnergy = maxEnergy;
} else {
if (currentEnergy <= 0) {
currentEnergy = 0;
if (hero == 'cabon' && energyShieldOn) {
energyShieldOn = false;
_root.cabon.energyShield.removeMovieClip();
}
}
}
showCharacterText();
_root.characterBar.energyBar._xscale = (currentEnergy / maxEnergy) * 100;
}
function useAttackEnemy(enemy, atkNum) {
var v2 = 'attack' + attackDepth;
var v5 = enemy.inside.idName + 'Attack' + atkNum;
++attackDepth;
_root.attachMovie(v5, v2, attackDepth);
_root[v2]._xscale = enemy._xscale;
if (enemy.inside.idName == 'tauren') {
if (atkNum == 1) {
bossEffectX = random(250) + 250;
_root[v2]._x = bossEffectX;
_root[v2]._y = 110;
} else {
if (atkNum == 2) {
_root[v2]._x = _root[hero]._x;
_root[v2]._y = ground;
} else {
if (atkNum == 3) {
++attackDepth;
_root.attachMovie(v5, v2, attackDepth);
_root[v2]._x = bossEffectX - 115;
_root[v2]._y = ground;
v2 = 'attack' + attackDepth;
++attackDepth;
_root.attachMovie(v5, v2, attackDepth);
_root[v2]._x = bossEffectX + 115;
_root[v2]._y = ground;
}
}
}
} else {
if (enemy.inside.idName == 'hexin') {
if (atkNum == 2) {
bossEffectX = random(600) + 25;
_root[v2]._x = bossEffectX;
_root[v2]._y = ground;
} else {
if (atkNum == 3) {
_root[v2]._x = 50;
_root[v2]._y = ground;
}
}
} else {
if (enemy.inside.idName == 'wizard') {
_root[v2]._x = _root[hero]._x;
_root[v2]._y = ground;
} else {
_root[v2]._x = enemy._x;
_root[v2]._y = enemy._y;
}
}
}
}
function checkCollision(enemy, enemyModel, attackType, atkNum) {
if (hero == 'maxx' && enemy.hitTest(_root[hero]) || hero == 'cabon' && enemy.hitTest(_root[hero].hitPlace)) {
var v7 = false;
var v8 = false;
if (hero == 'maxx' && isBlocking && random(100) < blockChance) {
if (attackType == 'melee') {
if (enemy._parent._parent._parent._xscale == _root[hero]._xscale) {
v7 = true;
attachEnemyHit(enemyModel, enemy._parent._parent._parent, true, atkNum);
attachHeroSCT('Blocked!');
_root.playSound('blocking' + (random(2) + 1));
if (shieldOfValor[1] > 0) {
changeEnergy(shieldOfValor[6][shieldOfValor[1]]);
}
}
} else {
if (enemy._xscale == _root[hero]._xscale || enemyModel == 'bull' && enemy._parent._xscale == _root[hero]._xscale) {
v7 = true;
attachHeroSCT('Blocked!');
_root.playSound('blocking' + (random(2) + 1));
if (shieldOfValor[1] > 0) {
changeEnergy(shieldOfValor[6][shieldOfValor[1]]);
}
attachEnemyHit(enemyModel, enemy, true, atkNum);
enemy.removeMovieClip();
}
}
} else {
if (random(100) < dodgeChance && isBlocking == false) {
v8 = true;
attachHeroSCT('Dodged!');
if (attackType == 'melee') {
attachEnemyHit(enemyModel, enemy._parent._parent._parent, true, atkNum);
} else {
attachEnemyHit(enemyModel, enemy, true, atkNum);
enemy.removeMovieClip();
}
} else {
if (_root[hero]._currentframe != 85 && attackType == 'proj') {
attachEnemyHit(enemyModel, enemy, true, atkNum);
enemy.removeMovieClip();
}
}
}
if (_root[hero]._currentframe != 85 && v7 == false && v8 == false) {
var v5 = getDamageDone(enemyModel, atkNum);
if (!energyShieldOn) {
damageTakenLvl += v5;
changeHealth(v5 * -1);
} else {
changeEnergy(v5 * 1.8 * -1);
if (currentEnergy <= 0) {
_root.cabon.energyShield.removeMovieClip();
energyShieldOn = false;
}
if (synergy[1] > 0) {
changeHealth(Math.round(v5 * 0.5));
}
if (attackType == 'melee' && frostAura[1] > 0 && random(100) < frostAura[6][frostAura[1]]) {
enemy._parent._parent.frozen = true;
enemy._parent._parent.releaseFreeze = 50;
enemy._parent._parent.gotoAndStop('frozen');
}
}
if (_root[enemyModel][10 + atkNum] > 0) {
slowHero(_root[enemyModel][10 + atkNum]);
attachHeroEffect(_root[enemyModel][17]);
}
if (_root[enemyModel][13 + atkNum] > 0) {
stunHero(_root[enemyModel][13 + atkNum]);
attachHeroEffect(_root[enemyModel][17]);
}
if (attackType == 'melee') {
attachEnemyHit(enemyModel, enemy._parent._parent._parent, false, atkNum);
var v9 = _root[enemyModel][6] * (enemy._parent._parent._parent._xscale / 100);
} else {
attachEnemyHit(enemyModel, enemy, false, atkNum);
var v9 = _root[enemyModel][6] * (enemy._xscale / 100);
if (enemyModel != 'tauren') {
enemy.removeMovieClip();
}
}
attachHeroSCT(v5);
hit = true;
_root[hero].gotoAndStop('hit');
var v10 = enemy._parent._parent._parent._xscale / 100;
if (isAttacking == false && _root[hero]._x > +_root[hero]._width && _root[hero]._x < 650 - _root[hero]._width) {
_root[hero]._x -= v9;
}
}
}
}
function attachEnemyHit(modelName, from, gray, atkNum) {
var v2 = 'hit' + attackDepth;
++attackDepth;
_root.attachMovie(modelName + 'Hit' + atkNum, v2, attackDepth);
_root[v2]._xscale = from._xscale;
if (gray) {
var v3 = new flash.geom.Transform(_root[v2]);
v3.colorTransform = grayColorTransform;
}
_root[v2]._x = _root[hero]._x;
_root[v2]._y = _root[hero]._y;
}
function getDamageDone(type, atkNum) {
var v2 = _root[type][7 + atkNum] + random(_root[type][7 + atkNum] / 2);
if (hero == 'maxx') {
if (guardianSpiritOn) {
v2 = 0;
guardianSpiritOn = false;
_root.characterBar.effectIcon.gotoAndStop(1);
} else {
if (guardianSpirit[1] > 0 && random(100) < guardianSpirit[6][guardianSpirit[1]]) {
guardianSpiritOn = true;
_root.attachMovie('guardianSpirit', 'gSpirit', 993);
_root.gSpirit._x = _root[hero]._x - 7;
_root.gSpirit._y = _root[hero]._y - 45;
_root.characterBar.effectIcon.gotoAndStop('guardianSpirit');
}
if (stoneSkin[1] > 0) {
var v3 = Math.round(v2 * stoneSkin[6][stoneSkin[1]]);
v2 -= v3;
}
}
}
if (v2 < 0) {
v2 = 1;
}
return v2;
}
function sortEnemies() {
var v4;
var v7;
var v3 = 0;
while (v3 < enemyArray.length) {
v4 = v3;
var v2 = v3;
while (v2 < enemyArray.length - 1) {
var v5 = Math.abs(_root[enemyArray[v2 + 1]]._x - _root[hero]._x);
var v6 = Math.abs(_root[enemyArray[v4]]._x - _root[hero]._x);
if (v5 < v6) {
v4 = v2 + 1;
}
++v2;
}
v7 = enemyArray[v3];
enemyArray[v3] = enemyArray[v4];
enemyArray[v4] = v7;
++v3;
}
}
function scrollBackground() {
var v3 = heroSpeed;
if (isFlying) {
v3 = heroSpeed * 1.5;
} else {
v3 = heroSpeed;
}
enemyTimer += random(2);
distanceMoved += v3;
_root.bgImage1._x -= v3;
_root.bgImage2._x -= v3;
_root.chains._x -= v3 + 4;
_root.tower._x -= v3;
_root.frontRocks._x -= v3;
if (_root.chains._x < -30) {
_root.chains.removeMovieClip();
}
if (_root.tower._x < -400) {
_root.tower.removeMovieClip();
}
if (_root.frontRocks._x < -400) {
_root.frontRocks.removeMovieClip();
}
_root.hotBar.levelProgress._xscale = (distanceMoved / distanceTilBoss[area]) * 100;
if (_root.hotBar.levelProgress._xscale >= 50 && shownCheckpoint == false) {
shownCheckpoint = true;
showMessage('Checkpoint Reached');
}
var v2 = 0;
while (v2 < enemyArray.length) {
_root[enemyArray[v2]]._x -= v3;
++v2;
}
v2 = 0;
while (v2 < scrollDead.length) {
if (_root[scrollDead[v2]].inside.dead) {
_root[scrollDead[v2]]._x -= v3;
}
++v2;
}
if (area == 3 && distanceMoved >= 5000) {
_root.bgImage2.castleDoor._visible = true;
_root.bgImage2.caveDoor._visible = true;
removeBGItems('bgImage2');
}
if (_root.bgImage1._x < -1195) {
_root.bgImage1.swapDepths(_root.bgImage2.getDepth());
removeBGItems('bgImage1');
_root.bgImage1._x = _root.bgImage2._x + 1200;
placeBGItems('bgImage1');
if (area == 3) {
_root.bgImage1.wallStart._visible = true;
_root.bgImage1.backChain._visible = false;
_root.bgImage1.backTower._visible = false;
_root.bgImage1.gate._visible = false;
} else {
if (area == 4) {
_root.bgImage1.backChain._visible = false;
}
}
} else {
if (_root.bgImage2._x < -1195) {
_root.bgImage2.swapDepths(_root.bgImage1.getDepth());
removeBGItems('bgImage2');
_root.bgImage2._x = _root.bgImage1._x + 1200;
placeBGItems('bgImage2');
}
}
}
function removeBGItems(bgNum) {
_root[bgNum].bgItem1.removeMovieClip();
_root[bgNum].bgItem2.removeMovieClip();
_root[bgNum].bgItem1.removeMovieClip();
_root[bgNum].bgItem2.removeMovieClip();
}
function placeBGItems(bgNum) {
var v2 = 1;
while (v2 <= 2) {
var v5 = random(5) + 1;
var v3 = 'bgItem' + v2;
if (area == 5 && v5 < 4 && _root.chains._x == undefined) {
_root.chains.removeMovieClip();
_root.attachMovie('item5_1', 'chains', 999989);
_root.chains._x = 700;
_root.chains._y = 400;
} else {
if (area == 4 && v5 == 2 && _root.frontRocks._x == undefined) {
_root.attachMovie('frontRocks', 'frontRocks', 999989);
_root.frontRocks._x = 750;
_root.frontRocks._y = 400;
if (random(2) == 1) {
_root.frontRocks._xscale = -100;
}
} else {
if (area != 5) {
if (area != 3 || distanceMoved > 50) {
_root[bgNum].attachMovie('item' + area + '_' + v5, v3, _root[bgNum].getNextHighestDepth());
_root[bgNum][v3]._x = v2 * 600 - 500 + random(100);
_root[bgNum][v3]._y = 400;
if (random(2) == 1) {
_root[bgNum][v3]._xscale = -100;
}
}
}
}
}
++v2;
}
}
function heroDie() {
_root[hero]._y = ground;
_root[hero].gotoAndStop('dying');
_root.respawnWindow.gotoAndPlay(2);
++deathsLvl;
++deathsTot;
_root.kongregateStats.submit('Deaths', deathsTot);
heroDead = true;
standEnemies();
pauseGame();
}
function respawnHero() {
stopAllSounds();
_root.bossWindow._visible = false;
_root.playSound('theme' + area);
_root[hero]._y = ground;
_root[hero]._x = 75;
_root[hero].gotoAndStop('stand');
_root[hero]._xscale = 100;
_root.chains.removeMovieClip();
heroDead = false;
allowScroll = true;
bossFight = false;
currentHealth = maxHealth;
currentEnergy = maxEnergy;
_root.characterBar.healthBar._xscale = 100;
_root.characterBar.energyBar._xscale = 100;
showCharacterText();
if (_root.hotBar.levelProgress._xscale >= 50) {
distanceMoved = distanceTilBoss[area] / 2;
_root.hotBar.levelProgress._xscale = 50;
if (area == 3) {
distanceMoved = 2400;
_root.hotBar.levelProgress._xscale = (distanceMoved / distanceTilBoss[area]) * 100;
}
} else {
distanceMoved = 0;
_root.hotBar.levelProgress._xscale = 0;
}
isFlying = false;
isAttacking = false;
isBlocking = false;
isJumping = false;
hit = false;
heroStunned = false;
_root.bgImage1._x = 0;
_root.bgImage2._x = 1200;
_root.bgImage1.swapDepths(990);
_root.bgImage2.swapDepths(991);
if (area == 3) {
if (distanceMoved == 0) {
removeBGItems('bgImage1');
_root.bgImage1.wallStart._visible = false;
_root.bgImage1.backChain._visible = true;
_root.bgImage1.backTower._visible = true;
_root.bgImage1.gate._visible = true;
_root.attachMovie('frontStart', 'tower', 999989);
} else {
_root.bgImage2.castleDoor._visible = false;
_root.bgImage2.caveDoor._visible = false;
}
} else {
if (area == 4 && distanceMoved == 0) {
_root.bgImage1.backChain._visible = true;
}
}
changeExp(level * -1);
enemyTimer = 0;
clearEnemiesOnStage();
unPauseGame();
}
function standEnemies() {
var v2 = 0;
while (v2 < enemyArray.length) {
var v3 = enemyArray[v2];
_root[v3].inside.gotoAndStop('stand');
++v2;
}
}
function clearEnemiesOnStage() {
var v2 = 0;
while (v2 < enemyArray.length) {
var v3 = enemyArray[v2];
_root[v3].removeMovieClip();
++v2;
}
enemyArray = [];
}
function nextArea() {
_root.bossWindow._visible = false;
_root[hero]._visible = false;
var v3 = int(timeTakenLvl / 25);
var v4 = int(v3 / 60);
var v2 = int(v3 - v4 * 60);
if (v2 < 10) {
v2 = '0' + v2;
}
_root.kongregateStats.submit('MonstersKilled', enemiesKilled);
_root.statsWindow.timeTakenTxt.text = v4 + ':' + v2;
_root.statsWindow.enemiesKilledTxt.text = enemiesKilledLvl;
_root.statsWindow.damageDoneTxt.text = damageDoneLvl;
_root.statsWindow.damageTakenTxt.text = damageTakenLvl;
_root.statsWindow.criticalHitsTxt.text = criticalHitsLvl;
_root.statsWindow.deathsTxt.text = deathsLvl;
_root.statsWindow._visible = true;
gamePaused = true;
}
function startNewLevel() {
if (area < 7) {
_root[hero]._visible = true;
_root.statsWindow._visible = false;
_root.mapMenu._visible = true;
enemiesKilledLvl = 0;
damageDoneLvl = 0;
damageTakenLvl = 0;
criticalHitsLvl = 0;
timeTakenLvl = 0;
deathsLvl = 0;
removeBGItems('bgImage1');
removeBGItems('bgImage2');
_root.mapMenu['lvl' + area].gotoAndStop('cleared');
_root.mapMenu.attachMovie('lvl' + (area + 1), 'lvl' + (area + 1), _root.mapMenu.getNextHighestDepth());
_root.mapMenu.mapIcon.gotoAndStop(area + 1);
stopAllSounds();
++area;
shownCheckpoint = false;
_root.playSound('theme' + area);
_root.bgImage1.gotoAndStop(area);
_root.bgImage2.gotoAndStop(area);
_root.staticBackground.gotoAndStop(area);
if (area == 3) {
_root.bgImage1.wallStart._visible = false;
_root.bgImage1.backChain._visible = true;
_root.bgImage1.backTower._visible = true;
_root.bgImage2.castleDoor._visible = false;
_root.bgImage2.caveDoor._visible = false;
_root.bgImage1.gate._visible = true;
_root.attachMovie('frontStart', 'tower', 999989);
_root.bgImage1[getInstanceAtDepth(_root.bgImage1.getNextHighestDepth() - 1)].removeMovieClip();
} else {
if (area == 4) {
_root.bgImage1.backChain._visible = true;
}
}
placeBGItems('bgImage1');
placeBGItems('bgImage2');
_root[hero]._y = ground;
_root[hero]._x = 75;
_root[hero].gotoAndStop('stand');
_root[hero]._xscale = 100;
allowScroll = true;
bossFight = false;
currentHealth = maxHealth;
currentEnergy = maxEnergy;
_root.characterBar.healthBar._xscale = 100;
_root.characterBar.energyBar._xscale = 100;
showCharacterText();
distanceMoved = 0;
_root.hotBar.levelProgress._xscale = 0;
isFlying = false;
isAttacking = false;
isBlocking = false;
isJumping = false;
_root.bgImage1._x = 0;
_root.bgImage2._x = 1200;
enemyTimer = 0;
_root.chains.removeMovieClip();
} else {
stopAllSounds();
_root.playSound('princessFree');
_root.attachMovie('fadeToBlack', 'fadeToBlack', _root.getNextHighestDepth());
_root.fadeToBlack.goal = 'victory';
}
}
function princessEvent() {
++enemyNum;
_root.statsWindow._visible = false;
_root[hero]._visible = true;
allowScroll = false;
bossFight = true;
stopAllSounds();
_root.attachMovie('princess', 'prin', heroDepth - 1);
gamePaused = false;
_root[hero].gotoAndStop('stand');
_root.statsWindow.removeMovieClip();
enemyArray[enemyArray.length] = 'prin';
}
function moveHero() {
if (allowSound == false) {
allowSound = true;
}
if (distanceMoved > distanceTilBoss[area] && bossFight == false) {
allowScroll = false;
if (enemyArray.length == 0) {
if (bossArray[area] == null) {
nextArea();
} else {
distanceMoved = 0;
bossFight = true;
allowScroll = false;
_root.playSound('bossAlert');
bossInterval = setInterval(spawnBoss, 4000);
}
}
} else {
++enemyTimer;
if (enemyTimer >= spawnValue && enemyArray.length < 4 && allowScroll) {
spawnEnemy();
spawnValue = 100 + random(50) + enemyArray.length * 25;
enemyTimer = 0;
} else {
if (allowScroll == false) {
enemyTimer = 0;
}
}
}
if (hit == false && heroStunned == false) {
if (Key.isDown(39) && !isBlocking && !isAttacking && !isFlying && _root[hero]._x < 650 - _root[hero]._width / 2) {
_root[hero]._xscale = 100;
if (enemyArray.length < 2 && bossFight == false && distanceMoved < distanceTilBoss[area]) {
allowScroll = true;
}
if (!isJumping) {
_root[hero].gotoAndStop('walk');
}
if (_root[hero]._x >= 400 && allowScroll) {
scrollBackground();
} else {
_root[hero]._x += heroSpeed;
}
} else {
if (Key.isDown(37) && !isBlocking && !isAttacking && !isFlying && _root[hero]._x > _root[hero]._width / 2) {
_root[hero]._xscale = -100;
_root[hero]._x -= heroSpeed;
if (!isJumping) {
_root[hero].gotoAndStop('walk');
}
}
}
if (Key.isDown(40) && block[1] == 1 && !isAttacking && !isFlying) {
_root[hero].gotoAndStop('duck');
isBlocking = true;
} else {
isBlocking = false;
}
if (isFlying) {
if (!isAttacking) {
_root[hero].gotoAndStop('fly');
}
var v2 = maxEnergy * 0.05 / 25;
changeEnergy(v2 * -1);
if (currentEnergy <= 1 && !isAttacking) {
heroFalling = true;
isFlying = false;
allowFly = false;
_root[hero].gotoAndStop('jump');
isJumping = true;
gravity = jumpSpeed;
}
if (Key.isDown(39) && _root[hero]._x < 650 - _root[hero]._width / 2) {
_root[hero]._xscale = 100;
if (_root[hero]._x >= 450 && allowScroll) {
scrollBackground();
} else {
_root[hero]._x += heroSpeed * 1.5;
}
} else {
if (Key.isDown(37) && _root[hero]._x > _root[hero]._width / 2) {
_root[hero]._x -= heroSpeed * 1.5;
_root[hero]._xscale = -100;
}
}
if (Key.isDown(38) && _root[hero]._y > _root[hero]._height) {
_root[hero]._y -= heroSpeed * 1.5;
} else {
if (Key.isDown(40)) {
_root[hero]._y += heroSpeed * 1.5;
if (_root[hero]._y >= ground) {
_root[hero]._y = ground;
isFlying = false;
allowFly = false;
attackFinished = false;
isAttacking = false;
}
}
}
}
if (Key.isDown(49) && !isBlocking && !isAttacking) {
useMeleeAttack(49);
} else {
if (Key.isDown(50) && !isBlocking && !isAttacking) {
useMeleeAttack(50);
} else {
if (Key.isDown(51) && !isBlocking && !isAttacking) {
useMeleeAttack(51);
} else {
if (Key.isDown(52) && !isBlocking && !isAttacking) {
useMeleeAttack(52);
} else {
if (Key.isDown(53) && !isBlocking && !isAttacking) {
useMeleeAttack(53);
} else {
if (Key.isDown(54) && !isBlocking && !isAttacking) {
useMeleeAttack(54);
}
}
}
}
}
}
if (!Key.isDown(37) && !Key.isDown(39) && !isBlocking && !isJumping && !isAttacking && !isFlying) {
_root[hero].gotoAndStop('stand');
}
}
if (hit == true) {
++hitTimer;
if (hitTimer >= 5) {
hitTimer = 0;
isAttacking = false;
hit = false;
}
}
if (heroStunned) {
++stunTimer;
if (stunTimer >= endStun) {
heroStunned = false;
attachHeroEffect(blankColor);
}
}
if (heroSlowed) {
++slowTimer;
if (slowTimer >= endSlow) {
heroSlowed = false;
attachHeroEffect(blankColor);
heroSpeed *= 2;
}
}
if (Key.isDown(38) && !isJumping && !isAttacking && !hit && !isFlying && !heroStunned) {
isJumping = true;
gravity = 0;
_root[hero].gotoAndStop('jump');
} else {
if (isJumping) {
if (!Key.isDown(38)) {
allowFly = true;
allowDoubleJump = true;
}
if (Key.isDown(38) && !isAttacking) {
if (fly[1] == 1 && allowFly && heroFalling == false) {
isFlying = true;
isJumping = false;
_root[hero]._y -= 10;
_root[hero].gotoAndStop('fly');
useAttack('fly');
} else {
if (doubleJump[1] == 1 && allowDoubleJump && doneDoubleJump == false) {
gravity = 0;
doneDoubleJump = true;
allowDoubleJump = false;
}
}
}
_root[hero]._y -= jumpSpeed;
_root[hero]._y += gravity;
gravity += 0.7;
if (_root[hero]._y >= ground) {
_root[hero]._y = ground;
heroFalling = false;
allowFly = false;
isJumping = false;
allowDoubleJump = false;
doneDoubleJump = false;
if (!isAttacking) {
_root[hero].gotoAndStop('stand');
}
}
}
}
if (!Key.isDown(attackKey) && attackFinished) {
attackFinished = false;
isAttacking = false;
}
}
function useMeleeAttack(keyNum) {
var v2 = hotBarList[keyNum - 48];
if (v2 != '') {
if (currentEnergy - _root[v2][1] >= 0) {
changeEnergy(_root[v2][1] * -1);
attackKey = keyNum;
isAttacking = true;
sortEnemies();
_root[hero].gotoAndStop(v2);
} else {
showMessage('Insufficient Energy');
}
}
}
function attackMove(amt) {
_root[hero]._x += amt * (_root[hero]._xscale / 100);
if (_root[hero]._x - 26 < 0) {
_root[hero]._x = 26;
} else {
if (_root[hero]._x + 26 > 650) {
_root[hero]._x = 624;
}
}
}
function toggleCharacterScreen() {
if (_root.tutorialWindow._currentframe == 1 && heroDead == false) {
_root.playSound('click');
if (_root.characterScreen._visible) {
unPauseGame();
_root.characterScreen._visible = false;
} else {
showTutorial(3);
pauseGame();
setCharacterText();
_root.mapMenu._visible = false;
_root.characterScreen._visible = true;
}
}
}
function setCharacterText() {
_root.characterScreen.nextLevelTxt.text = currentExp + '/' + expToLevel;
_root.characterScreen.healthTxt.text = Math.round(currentHealth) + '/' + maxHealth;
_root.characterScreen.energyTxt.text = Math.round(currentEnergy) + '/' + maxEnergy;
_root.characterScreen.healthRegenTxt.text = healthRegen * 10 + '/sec';
_root.characterScreen.energyRegenTxt.text = energyRegen * 10 + '/sec';
_root.characterScreen.critChanceTxt.text = critChance + '%';
_root.characterScreen.dodgeChanceTxt.text = dodgeChance + '%';
if (hero == 'maxx' && block[1] > 0) {
_root.characterScreen.blockChanceTxt.text = blockChance + '%';
} else {
_root.characterScreen.blockChanceTxt.text = 'N/A';
}
}
function pauseGame() {
gamePaused = true;
_root.hotBar.pauseIcon.gotoAndStop(2);
}
function unPauseGame() {
gamePaused = false;
_root.hotBar.pauseIcon.gotoAndStop(1);
}
function togglePause() {
if (heroDead == false && _root.characterScreen._visible == false && _root.tutorialWindow._currentframe == 1 && _root.mapMenu._visible == false) {
_root.playSound('click');
if (gamePaused) {
unPauseGame();
} else {
pauseGame();
}
}
}
function toggleSound() {
if (soundOn) {
soundOn = false;
_root.hotBar.soundIcon.gotoAndStop(2);
stopAllSounds();
} else {
soundOn = true;
_root.hotBar.soundIcon.gotoAndStop(1);
_root.playSound('theme' + area);
}
}
function toggleMap() {
if (heroDead == false && _root.tutorialWindow._currentframe == 1) {
_root.playSound('click');
if (_root.mapMenu._visible) {
_root.mapMenu._visible = false;
if (_root.characterScreen._visible == false && _root.tutorialWindow._currentframe == 1) {
unPauseGame();
}
} else {
_root.characterScreen._visible = false;
_root.mapMenu._visible = true;
pauseGame();
}
}
}
function toggleQuality() {
_root.playSound('click');
if (_root._quality == 'LOW') {
_root._quality = 'MEDIUM';
} else {
if (_root._quality == 'MEDIUM') {
_root._quality = 'HIGH';
} else {
_root._quality = 'LOW';
}
}
}
function shakeScreen(dur) {
clearInterval(shakeInterval);
if (isJumping || isFlying) {
} else {
_root[hero]._y = ground;
}
var v2 = 0;
while (v2 < enemyArray.length) {
_root[enemyArray[v2]]._y = ground;
++v2;
}
_root.bgImage1._y = 0;
_root.bgImage2._y = 0;
shakeNum = 0;
endShake = dur;
moveScreen();
shakeInterval = setInterval(moveScreen, 40);
}
function moveScreen() {
++shakeNum;
if (shakeNum % 2 == 0) {
moveObjects(5);
} else {
moveObjects(-5);
}
if (shakeNum == endShake) {
clearInterval(shakeInterval);
var v2 = 0;
while (v2 < enemyArray.length) {
_root[enemyArray[v2]]._y = ground;
++v2;
}
if (isJumping || isFlying) {
} else {
_root[hero]._y = ground;
}
_root.bgImage1._y = 0;
_root.bgImage2._y = 0;
}
}
function moveObjects(yMove) {
_root.bgImage1._y += yMove;
_root.bgImage2._y += yMove;
if (!isJumping && !isFlying) {
_root[hero]._y += yMove;
}
var v2 = 0;
while (v2 < enemyArray.length) {
var v3 = enemyArray[v2];
_root[v3]._y += yMove;
++v2;
}
}
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem('(c)2009 - axis-games.com', myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
_root.menu = my_cm;
stopAllSounds();
_root.attachMovie('fadeToWhite', 'fadeToWhite', _root.getNextHighestDepth());
if (hero == 'maxx') {
heroSpeed = 5;
jumpSpeed = 8;
abilityList = [null, 'slice'];
hotBarList = [null, 'slice', '', '', '', '', ''];
allDTalents = ['guardianSpirit', 'shieldOfValor', 'lifeTap', 'siphonLife', 'stoneSkin', 'energize', 'rejuvinate', 'improvedBlock', 'vitality', 'block'];
allOTalents = ['stunPunchT', 'quickSlashT', 'medusaBlade', 'deadEye', 'impaleT', 'stoneBreaker', 'forceBlade', 'tornadoT', 'whirlwindT', 'powerSwing'];
guardianSpirit = ['heroHit', 0, 2, null, 2, 'proc', [0, 10, 20], 'stoneSkin'];
shieldOfValor = ['heroHit', 0, 1, null, 3, 'currentEnergy', [0, 5], 'improvedBlock'];
lifeTap = ['heroAtk', 0, 2, 'siphonLife', 3, 'currentHealth', [0, 0.05, 0.1], 'rejuvinate'];
siphonLife = ['heroAtk', 0, 1, null, 4, 'currentHealth', [0, 0.05], 'lifeTap'];
stoneSkin = ['heroHit', 0, 2, 'guardianSpirit', 1, 'damageTaken', [0, 0.08, 0.15], null];
block = ['passive', 0, 1, 'improvedBlock', 1, 'blockChance', [0, 70], null];
vitality = ['passive', 0, 5, 'lifeTap', 2, 'healthBonus', [0, 0.05, 0.1, 0.15, 0.2, 0.25], 'rejuvinate'];
improvedBlock = ['passive', 0, 3, 'shieldOfValor', 2, 'blockChance', [0, 77, 84, 90], 'block'];
rejuvinate = ['passive', 0, 5, 'vitality', 1, 'healthRegen', [0, 0.05, 0.1, 0.15, 0.2, 0.25], null];
energize = ['passive', 0, 3, null, 3, 'energyRegen', [0, 0.2, 0.25, 0.3], null];
stunPunchT = ['ability', 0, 1, 'medusaBlade', 1, 'stunPunch', [0, 1], null];
quickSlashT = ['ability', 0, 1, 'impaleT', 1, 'quickSlash', [0, 1], null];
impaleT = ['ability', 0, 1, 'tornadoT', 2, 'impale', [0, 1], 'quickSlashT'];
tornadoT = ['ability', 0, 1, 'whirlwindT', 3, 'tornado', [0, 1], 'impaleT'];
whirlwindT = ['ability', 0, 1, null, 4, 'whirlwind', [0, 1], 'tornadoT'];
powerSwing = ['heroAtk', 0, 5, null, 1, 'damageDelt', [0, 0.05, 0.1, 0.15, 0.2, 0.25], null];
medusaBlade = ['heroAtk', 0, 5, 'stoneBreaker', 2, 'stun', [0, 2, 5, 6, 8, 10], 'stunPunchT'];
deadEye = ['passive', 0, 3, null, 2, 'critChance', [0, 5, 10, 15], null];
stoneBreaker = ['heroAtk', 0, 3, null, 3, 'killChance', [0, 50, 75, 100], 'medusaBlade'];
forceBlade = ['heroAtk', 0, 4, null, 3, 'knockBack', [0, 0.25, 0.5, 0.75, 1], null];
slice = [3, 0.5, 8, false, false, false, -10, -33, 0, 0.2];
quickSlash = [6, 5, 10, false, false, false, -10, -33, 0, 0.3];
impale = [6, 12, 15, true, false, false, -10, -33, 0, 0.3];
tornado = [2, 15, 20, false, true, false, -10, -33, 25, 0.1];
tornado2 = [7, 0, 20, false, false, false, -10, -33, 0, 0.3];
whirlwind = [5, 20, 25, true, false, false, -10, -33, 0, 0.3];
stunPunch = [2, 6, 8, false, true, false, -10, -33, 50, 0.1];
} else {
if (hero == 'cabon') {
heroSpeed = 6;
jumpSpeed = 8;
abilityList = [null, 'stab'];
hotBarList = [null, 'stab', '', '', '', '', ''];
allDTalents = ['glider', 'expansiveMind', 'flowingThought', 'evasion', 'energyShieldT', 'drainSoul', 'fly', 'frostAura', 'stamina', 'synergy'];
allOTalents = ['blackIceT', 'focusedMind', 'hellFireT', 'shatter', 'precision', 'deathBoltT', 'fireAndIce', 'feedback', 'brimstoneT', 'deadlyFocus'];
glider = ['passive', 0, 2, 'evasion', 1, 'heroSpeed', [0, 6.5, 7], null];
expansiveMind = ['passive', 0, 5, 'energyShieldT', 1, 'energyBonus', [0, 0.1, 0.2, 0.3, 0.4, 0.5], null];
flowingThought = ['passive', 0, 3, 'drainSoul', 1, 'energyRegen', [0, 0.1, 0.2, 0.3], null];
evasion = ['passive', 0, 3, null, 2, 'dodgeChance', [5, 10, 15, 20], 'glider'];
fly = ['passive', 0, 1, null, 3, null, [0, true], null];
frostAura = ['passive', 0, 3, 'synergy', 3, 'frostAuraOn', [0, 15, 30, 40], 'energyShieldT'];
stamina = ['passive', 0, 3, null, 3, 'healthBonus', [0, 0.05, 0.1, 0.15], null];
synergy = ['heroHit', 0, 1, null, 4, null, [0, true], 'frostAura'];
drainSoul = ['heroAtk', 0, 3, null, 2, 'currentEnergy', [0, 1, 2, 3], 'flowingThought'];
energyShieldT = ['ability', 0, 1, 'frostAura', 2, 'energyShield', [0, 1], 'expansiveMind'];
hellFireT = ['ability', 0, 1, null, 1, 'hellFire', [0, 1], null];
blackIceT = ['ability', 0, 1, 'shatter', 1, 'blackIce', [0, 1], null];
deathBoltT = ['ability', 0, 1, null, 2, 'deathBolt', [0, 1], null];
brimstoneT = ['ability', 0, 1, null, 3, 'brimstone', [0, 1], null];
precision = ['passive', 0, 5, 'feedback', 2, 'critChance', [0, 3, 6, 9, 12, 15], 'focusedMind'];
focusedMind = ['heroAtk', 0, 5, 'precision', 1, 'damageDelt', [0, 0.03, 0.06, 0.09, 0.12, 0.15], null];
shatter = ['heroAtk', 0, 3, 'fireAndIce', 2, 'critChance', [0, 20, 40, 60], 'blackIce'];
fireAndIce = ['heroAtk', 0, 3, null, 3, 'damageDelt', [0, 0.2, 0.4, 0.6], null];
feedback = ['heroAtk', 0, 4, 'deadlyFocus', 3, 'currentEnergy', [0, 0.01, 0.02, 0.03, 0.04], 'precision'];
deadlyFocus = ['heroAtk', 0, 1, null, 4, 'damageDelt', [0, 1], 'feedback'];
stab = [3, 0.5, 5, false, false, false, -10, -33, 0, 0.1];
energyShield = [0, 5, 0, false, false, false, -10, -53, 0, 0];
deathBolt = [5, 9, 5, false, true, false, -25, -33, 50, 0.2];
blackIce = [1, 8, 0, false, false, true, -5, -10, 125, 0.1];
hellFire = [3, 4, 2, false, false, false, -25, -33, 0, 0.3];
brimstone = [15, 25, 0, true, false, false, -25, 10, 0, 0.4];
}
}
distanceMoved = 0;
gamePaused = false;
allowScroll = true;
soundOn = true;
allowSound = true;
enemyTimer = 0;
spawnValue = 200;
bossFight = false;
soundInterval = setInterval(ambientSound, 10000 + random(10000));
bindings = [null, '1', '2', '3', '4', '5', '6'];
expSplits = [8, 10, 12, 12, 14, 14, 16, 16, 18, 18, 21, 23, 25, 28, 31, 35, 38, 41, 45, 49, 55, 60, 65, 70, 80, 90, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
ground = 400;
area = 1;
isJumping = false;
isAttacking = false;
isBlocking = false;
isFlying = false;
attackTimer = 0;
attackKey = 0;
attackFinished = false;
hitTimer = 0;
slowTimer = 0;
stunTimer = 0;
allowFly = false;
allowDoubleJump = false;
doneDoubleJump = false;
heroFalling = false;
heroSlowed = false;
heroStunned = false;
level = 1;
maxDamage = 0;
healthBonus = 0;
energyBonus = 0;
baseHealth = 50;
baseEnergy = 75;
currentExp = 0;
heroDead = false;
expToLevel = expSplits[0];
maxHealth = getMaxHealth();
currentHealth = maxHealth;
maxEnergy = getMaxEnergy();
currentEnergy = maxEnergy;
currentTalentPoints = 0;
changeHealth(0);
changeEnergy(0);
dodgeChance = 5;
blockChance = 0;
critChance = 0;
healthRegen = 0.05;
energyRegen = 0.15;
damageTaken = 0;
damageDelt = 0;
hit = false;
characterName = String(characterName);
_root[hero]._y = ground;
_root[hero]._x = 50;
regenInterval = setInterval(regen, 100);
enemiesKilledLvl = 0;
damageDoneLvl = 0;
damageTakenLvl = 0;
criticalHitsLvl = 0;
timeTakenLvl = 0;
_root.timeTakenTot = 0;
deathsLvl = 0;
_root.deathsTot = 0;
guardianSpiritOn = false;
energyShieldOn = false;
deadlyFocusOn = false;
levelPerTier = [0, 0, 10, 17, 25];
topDepth = 90002;
bottomDepth = 90001;
enemyDepth = 1000;
attackDepth = 10000;
heroDepth = 999;
_root.hotBar.portrait.gotoAndStop(hero);
_root.hotBar.levelProgress._xscale = 0;
_root.characterScreen._visible = false;
_root.characterScreen._x = 325;
_root.characterScreen._y = 225;
_root.statsWindow._x = 325;
_root.statsWindow._y = 250;
_root.statsWindow._visible = false;
_root.mapMenu._visible = false;
_root.mapMenu._x = 325;
_root.mapMenu._y = 250;
_root[hero].swapDepths(heroDepth);
_root.transitionWindow.swapDepths(999999);
_root.tutorialWindow.swapDepths(999998);
_root.respawnWindow.swapDepths(999997);
_root.messageWindow.swapDepths(999996);
_root.statsWindow.swapDepths(999995);
_root.characterScreen.swapDepths(999994);
_root.mapMenu.swapDepths(999993);
_root.hotBar.swapDepths(999992);
_root.characterBar.swapDepths(999991);
_root.bossWindow.swapDepths(999990);
_root.bgImage1.swapDepths(990);
_root.bgImage2.swapDepths(991);
_root.characterBar.expBar._xscale = 0;
_root.hotBar.abilityMenu._y = -25;
_root.mapMenu.nextLevelBtn._visible = false;
_root.hotBar.tpNum.text = '';
shownCheckpoint = false;
_root.characterScreen.dTalents.talentTree.gotoAndStop(hero);
_root.characterScreen.oTalents.talentTree.gotoAndStop(hero);
_root.characterScreen.oTalents.swapDepths(bottomDepth);
_root.characterScreen.dTalents.swapDepths(topDepth);
_root.characterScreen.oTalents.linkText.gotoAndStop(2);
var iceColorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 40, 200, 0);
var poisonColorTransform = new flash.geom.ColorTransform(0.6, 1, 0.6, 1, 0, 100, 0, 255);
var grayColorTransform = new flash.geom.ColorTransform(0.3, 0.3, 0.3, 0.8, 0, 0, 0, 0);
var blankColor = new flash.geom.ColorTransform();
_root.bossWindow._visible = false;
var i = 0;
while (i < 11) {
var tName = allDTalents[i];
_root.characterScreen.dTalents.talentTree[tName + 'Txt'].text = _root[tName][1] + '/' + _root[tName][2];
_root.characterScreen.dTalents.talentTree[tName + 'MC'][tName + 'Un'].useHandCursor = false;
var tName = allOTalents[i];
_root.characterScreen.oTalents.talentTree[tName + 'Txt'].text = _root[tName][1] + '/' + _root[tName][2];
_root.characterScreen.oTalents.talentTree[tName + 'MC'][tName + 'Un'].useHandCursor = false;
++i;
}
tutorialArray = [null, false, false, false, false, false, false];
_root.enemiesKilled = 0;
enemyNum = 0;
bossEffectX = 0;
bossInterval = 0;
chaseSpeed = heroSpeed + 2;
enemyArray = [];
scrollDead = [];
toBeKilled = [];
distanceTilBoss = [0, 4500, 5300, 6000, 6200, 6500, 7000, 7500];
skeleton = [15, 3, 40, 75, 0, -45, 5, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, null, 200];
monk = [20, 4, 90, 250, 0, -45, 5, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, null, 250];
ghost = [25, 3, 60, 250, 0, -45, 5, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, null, 350];
zombie = [35, 3, 65, 100, 0, -45, 5, 4, 9, 9, 0, 0, 0, 0, 0, 0, 0, null, 300];
hound = [45, 5, 40, 85, 0, -45, 5, 4, 9, 0, 0, 0, 0, 0, 0, 0, 0, null, 200];
bull = [53, 3, 60, 300, 0, -45, 5, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, null, 200];
ninja = [57, 4, 60, 250, 0, -45, 5, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, null, 300];
titan = [65, 5, 60, 100, 0, -45, 5, 6, 12, 0, 0, 0, 0, 0, 0, 0, 0, null, 200];
wizard = [80, 5, 60, 100, 0, -45, 5, 7, 12, 9, 0, 0, 0, 0, 0, 0, 0, null, 300];
gargoyle = [95, 2.5, 50, 100, 0, -45, 5, 8, 14, 12, 0, 0, 0, 0, 0, 0, 0, null, 300];
centaur = [100, 6, 65, 500, 0, -45, 5, 10, 7, 7, 7, 0, 0, 0, 0, 0, 0, null];
tauren = [400, 6, 65, 500, 0, -45, 5, 20, 10, 15, 0, 0, 0, 0, 0, 0, 0, null];
gladiator = [500, 8, 65, 500, 0, -45, 5, 30, 15, 20, 5, 0, 0, 0, 0, 0, 0, null];
hexin = [900, 2, 65, 500, 0, -45, 5, 0, 32, 33, 30, 0, 0, 0, 0, 0, 0, null];
princess = [20, 3, 40, 75, 0, -45, 5, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, null];
if (hero == 'cabon') {
gladiator = [500, 8, 65, 500, 0, -45, 5, 30, 9, 15, 3, 0, 0, 0, 0, 0, 0, null];
}
area1 = ['skeleton'];
area2 = ['skeleton', 'monk'];
area3 = ['monk', 'zombie'];
area4 = ['zombie', 'hound'];
area5 = ['hound', 'titan'];
area6 = ['titan', 'wizard'];
area7 = ['wizard', 'gargoyle'];
bossArray = [null, null, 'centaur', null, 'tauren', null, 'gladiator', 'hexin'];
doubleSpawn = [0, 25, 30, 35, 35, 35, 40, 45];
createHotKeys();
updateTalents();
setHotBar();
_root.playSound('theme1');
_root.bgImage1.gotoAndStop(area);
_root.bgImage2.gotoAndStop(area);
_root.staticBackground.gotoAndStop(area);
placeBGItems('bgImage1');
placeBGItems('bgImage2');
pauseGame();
_root.mapMenu.nextLevelBtn._visible = false;
_root.mapMenu._visible = true;
_root.mapMenu.attachMovie('lvl1', 'lvl1', _root.mapMenu.getNextHighestDepth());
_root.onEnterFrame = function () {
if (gamePaused == false) {
++timeTakenLvl;
++timeTakenTot;
moveHero();
}
};
onMouseDown = function () {
if (!_root.hotBar.abilityMenu.hitTest(_xmouse, _ymouse, true)) {
closeAbilityMenu();
}
};
var keyListener = new Object();
Key.addListener(keyListener);
keyListener.onKeyDown = function () {
var v1 = Key.getCode();
if (v1 == 80) {
togglePause();
} else {
if (v1 == 67) {
toggleCharacterScreen();
} else {
if (v1 == 77) {
toggleMap();
} else {
if (v1 == 83) {
toggleSound();
} else {
if (v1 == 81) {
toggleQuality();
}
}
}
}
}
};
stop();
}
movieClip 1449 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
}
movieClip 1457 {
}
movieClip 1461 {
}
movieClip 1466 {
}
movieClip 1468 {
}
movieClip 1473 {
}
movieClip 1484 {
frame 1 {
stop();
}
}
movieClip 1493 {
}
movieClip 1502 {
frame 6 {
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1507 {
frame 4 {
stop();
}
}
movieClip 1522 {
frame 14 {
stop();
}
}
movieClip 1535 {
frame 4 {
this.weapon._visible = false;
_root.checkForHit('quickSlash');
}
frame 5 {
_root.playSound('quickSlashUse');
}
frame 11 {
_root.attackFinished = true;
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1546 {
frame 1 {
_root.playSound('stunPunchUse');
}
frame 7 {
this.weapon._visible = false;
_root.checkForHit('stunPunch');
}
frame 11 {
_root.attackFinished = true;
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1561 {
frame 6 {
_root.playSound('impaleUse');
}
frame 9 {
this.weapon._visible = false;
_root.checkForHit('impale');
}
frame 14 {
_root.attackMove(60);
_root.attackFinished = true;
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1586 {
frame 7 {
this.weapon._visible = false;
_root.playSound('tornadoUse');
_root.checkForHit('tornado');
}
frame 12 {
_root.playSound('tornadoUse2');
}
frame 17 {
this.weapon._visible = false;
_root.checkForHit('tornado2');
}
frame 22 {
_root.attackMove(50);
_root.attackFinished = true;
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1617 {
frame 4 {
_root.playSound('whirlwindUse');
}
frame 7 {
this.weapon._visible = false;
_root.checkForHit('whirlwind');
}
frame 14 {
_root.playSound('whirlwindUse');
}
frame 18 {
this.weapon._visible = false;
_root.checkForHit('whirlwind');
}
frame 21 {
_root.playSound('whirlwindUse');
}
frame 23 {
this.weapon._visible = false;
_root.checkForHit('whirlwind');
}
frame 30 {
_root.attackMove(60);
_root.attackFinished = true;
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1628 {
frame 4 {
_root.playSound('sliceUse');
}
frame 5 {
this.weapon._visible = false;
_root.checkForHit('slice');
}
frame 8 {
_root.attackFinished = true;
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
movieClip 1629 {
frame 1 {
stop();
}
}
movieClip 1638 {
}
movieClip 1643 {
frame 6 {
if (_root.isFlying) {
this._parent.gotoAndStop('fly');
} else {
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
}
movieClip 1668 {
frame 25 {
stop();
}
}
movieClip 1675 {
frame 3 {
_root.playSound('stabUse');
}
frame 4 {
this.weapon._visible = false;
_root.checkForHit('stab');
}
frame 9 {
_root.attackFinished = true;
if (_root.isFlying) {
this._parent.gotoAndStop('fly');
} else {
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
}
movieClip 1694 {
frame 7 {
_root.useAttack('deathBolt');
}
frame 9 {
_root.playSound('deathBoltUse');
}
frame 13 {
_root.attackFinished = true;
if (_root.isFlying) {
this._parent.gotoAndStop('fly');
} else {
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
}
movieClip 1701 {
frame 4 {
_root.useAttack('hellFire');
_root.playSound('hellFireUse');
}
frame 9 {
_root.attackFinished = true;
if (_root.isFlying) {
this._parent.gotoAndStop('fly');
} else {
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
}
movieClip 1706 {
frame 4 {
_root.useAttack('blackIce');
}
frame 7 {
_root.playSound('blackIceUse');
}
frame 10 {
_root.attackFinished = true;
if (_root.isFlying) {
this._parent.gotoAndStop('fly');
} else {
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
}
movieClip 1707 {
}
movieClip 1710 {
frame 1 {
_root.playSound('energyShieldCast');
}
frame 4 {
if (_root.energyShieldOn == false) {
_root.cabon.attachMovie('energyShield', 'energyShield', 1);
_root.cabon.energyShield._x = _root.cabon.weapon._x;
_root.cabon.energyShield._y = _root.cabon.weapon._y;
_root.energyShieldOn = true;
} else {
_root.energyShieldOn = false;
_root.cabon.energyShield.removeMovieClip();
}
}
frame 5 {
_root.attackFinished = true;
if (_root.isFlying) {
this._parent.gotoAndStop('fly');
} else {
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
}
movieClip 1721 {
frame 1 {
_root.playSound('brimstoneCast');
}
frame 7 {
_root.useAttack('brimstone');
}
frame 12 {
_root.attackFinished = true;
if (_root.isFlying) {
this._parent.gotoAndStop('fly');
} else {
if (_root.isJumping) {
this._parent.gotoAndStop('jump');
} else {
this._parent.gotoAndStop('stand');
}
}
}
}
movieClip 1722 {
frame 1 {
if (_root.isFlying) {
this.gotoAndStop('fly');
}
stop();
}
}
movieClip 1800 {
frame 1 {
stop();
}
frame 4 {
this.gotoAndStop(1);
}
frame 5 {
this.gotoAndStop(1);
}
frame 6 {
this.gotoAndStop(1);
}
frame 15 {
this.gotoAndStop(1);
}
frame 16 {
this.gotoAndStop(1);
}
frame 17 {
this.gotoAndStop(1);
}
frame 30 {
this.gotoAndStop(1);
}
frame 31 {
this.gotoAndStop(1);
}
frame 32 {
this.gotoAndStop(1);
}
frame 41 {
this.gotoAndStop(1);
}
frame 42 {
this.gotoAndStop(1);
}
frame 43 {
this.gotoAndStop(1);
}
frame 44 {
this.gotoAndStop(1);
}
frame 54 {
this.gotoAndStop(1);
}
frame 55 {
this.gotoAndStop(1);
}
frame 56 {
this.gotoAndStop(1);
}
frame 57 {
this.gotoAndStop(1);
}
frame 66 {
this.gotoAndStop(1);
}
frame 67 {
this.gotoAndStop(1);
}
frame 68 {
this.gotoAndStop(1);
}
frame 77 {
this.gotoAndStop(1);
}
frame 78 {
this.gotoAndStop(1);
}
frame 79 {
this.gotoAndStop(1);
}
frame 88 {
this.gotoAndStop(1);
}
frame 97 {
this.gotoAndStop(1);
}
frame 98 {
this.gotoAndStop(1);
}
frame 99 {
this.gotoAndStop(1);
}
frame 108 {
this.gotoAndStop(1);
}
frame 109 {
this.gotoAndStop(1);
}
frame 110 {
this.gotoAndStop(1);
}
frame 111 {
this.gotoAndStop(1);
}
frame 123 {
this.gotoAndStop(1);
}
frame 124 {
this.gotoAndStop(1);
}
frame 135 {
this.gotoAndStop(1);
}
frame 136 {
this.gotoAndStop(1);
}
frame 137 {
this.gotoAndStop(1);
}
frame 138 {
this.gotoAndStop(1);
}
frame 150 {
this.gotoAndStop(1);
}
frame 151 {
this.gotoAndStop(1);
}
frame 152 {
this.gotoAndStop(1);
}
frame 153 {
this.gotoAndStop(1);
}
frame 154 {
this.gotoAndStop(1);
}
frame 162 {
this.gotoAndStop(1);
}
frame 171 {
this.gotoAndStop(1);
}
frame 182 {
this.gotoAndStop(1);
}
frame 191 {
this.gotoAndStop(1);
}
frame 192 {
this.gotoAndStop(1);
}
frame 203 {
this.gotoAndStop(1);
}
frame 214 {
this.gotoAndStop(1);
}
frame 221 {
this.gotoAndStop(1);
}
frame 231 {
this.gotoAndStop(1);
}
frame 249 {
this.gotoAndStop(1);
}
frame 261 {
this.gotoAndStop(1);
}
frame 274 {
this.gotoAndStop(1);
}
frame 284 {
this.gotoAndStop(1);
}
frame 285 {
this.gotoAndStop(1);
}
frame 295 {
this.gotoAndStop(1);
}
frame 306 {
this.gotoAndStop(1);
}
frame 318 {
this.gotoAndStop(1);
}
frame 328 {
this.gotoAndStop(1);
}
frame 335 {
this.gotoAndStop(1);
}
frame 342 {
this.gotoAndStop(1);
}
frame 349 {
this.gotoAndStop(1);
}
frame 356 {
this.gotoAndStop(1);
}
frame 363 {
this.gotoAndStop(1);
}
frame 370 {
this.gotoAndStop(1);
}
frame 377 {
this.gotoAndStop(1);
}
frame 386 {
this.gotoAndStop(1);
}
frame 395 {
this.gotoAndStop(1);
}
frame 404 {
this.gotoAndStop(1);
}
frame 412 {
this.gotoAndStop(1);
}
frame 422 {
this.gotoAndStop(1);
}
frame 429 {
this.gotoAndStop(1);
}
frame 436 {
this.gotoAndStop(1);
}
frame 443 {
this.gotoAndStop(1);
}
frame 450 {
this.gotoAndStop(1);
}
frame 460 {
this.gotoAndStop(1);
}
frame 471 {
this.gotoAndStop(1);
}
}
movieClip 1805 {
}
movieClip 1810 {
frame 1 {
stop();
}
}
movieClip 1814 {
}
movieClip 1816 {
}
movieClip 1817 {
frame 1 {
stop();
}
}
movieClip 1818 {
frame 1 {
stop();
}
}
// unknown tag 88 length 148
button 1823 {
on (release) {
_root.toggleMap();
_root.showTutorial(1);
}
}
movieClip 1824 {
frame 1 {
closeBtn.useHandCursor = false;
}
instance mapIcon of movieClip 1818 {
onClipEvent (enterFrame) {
this.heroIcon.gotoAndStop(_root.hero);
}
}
}
// unknown tag 88 length 148
movieClip 1827 {
frame 1 {
stop();
}
}
movieClip 1830 {
}
movieClip 1832 {
}
movieClip 1834 {
}
movieClip 1836 {
}
movieClip 1847 {
frame 1 {
stop();
}
}
movieClip 1848 {
}
button 1851 {
on (release) {
_root.closeAbilityMenu();
}
}
// unknown tag 88 length 60
button 1856 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1860 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1864 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1868 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1872 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1876 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1880 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1884 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1888 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1892 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1896 {
on (release) {
_root.setNewAbility(this.id);
}
}
button 1900 {
on (release) {
_root.setNewAbility(this.id);
}
}
movieClip 1901 {
frame 1 {
stop();
}
}
movieClip 1902 {
frame 1 {
btn.useHandCursor = false;
}
instance slot5 of movieClip 1901 {
onClipEvent (load) {
this.id = 5;
}
}
instance slot4 of movieClip 1901 {
onClipEvent (load) {
this.id = 4;
}
}
instance slot3 of movieClip 1901 {
onClipEvent (load) {
this.id = 3;
}
}
instance slot2 of movieClip 1901 {
onClipEvent (load) {
this.id = 2;
}
}
instance slot1 of movieClip 1901 {
onClipEvent (load) {
this.id = 1;
this.useHandCursor = false;
}
}
instance slot6 of movieClip 1901 {
onClipEvent (load) {
this.id = 6;
}
}
}
movieClip 1904 {
}
movieClip 1910 {
}
button 1912 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1915 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1919 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1923 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1927 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1931 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
movieClip 1934 {
}
button 1935 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1938 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1941 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1944 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1947 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
button 1950 {
on (release) {
_root.openAbilityMenu(this.id);
}
on (rollOver) {
_root.showAbilityTooltip(this.id);
}
on (rollOut) {
_root.hotBar.abilityText.gotoAndStop(1);
}
}
movieClip 1951 {
frame 1 {
stop();
}
}
movieClip 1956 {
frame 1 {
stop();
}
}
movieClip 1961 {
frame 1 {
stop();
}
}
movieClip 1968 {
frame 1 {
stop();
}
}
button 1973 {
on (release) {
_root.togglePause();
}
on (rollOver) {
_root.hotBar.tooltip.gotoAndStop(5);
_root.playSound('rollOver');
}
on (rollOut) {
_root.hotBar.tooltip.gotoAndStop(1);
}
}
button 1974 {
on (release) {
_root.toggleSound();
}
on (rollOver) {
_root.hotBar.tooltip.gotoAndStop(4);
_root.playSound('rollOver');
}
on (rollOut) {
_root.hotBar.tooltip.gotoAndStop(1);
}
}
button 1975 {
on (release) {
_root.toggleMap();
}
on (rollOver) {
_root.hotBar.tooltip.gotoAndStop(3);
_root.playSound('rollOver');
}
on (rollOut) {
_root.hotBar.tooltip.gotoAndStop(1);
}
}
button 1976 {
on (release) {
_root.toggleCharacterScreen();
}
on (rollOver) {
_root.hotBar.tooltip.gotoAndStop(2);
_root.playSound('rollOver');
}
on (rollOut) {
_root.hotBar.tooltip.gotoAndStop(1);
}
}
button 1977 {
on (release) {
_root.toggleQuality();
}
on (rollOver) {
_root.hotBar.tooltip.gotoAndStop(6);
_root.playSound('rollOver');
}
on (rollOut) {
_root.hotBar.tooltip.gotoAndStop(1);
}
}
movieClip 1983 {
frame 1 {
stop();
}
}
movieClip 1996 {
frame 1 {
stop();
}
}
movieClip 2012 {
frame 1 {
btn1.useHandCursor = false;
btn2.useHandCursor = false;
btn3.useHandCursor = false;
btn4.useHandCursor = false;
btn5.useHandCursor = false;
}
instance slot3 of movieClip 1951 {
onClipEvent (load) {
this.id = 3;
}
}
instance slot1 of movieClip 1951 {
onClipEvent (load) {
this.id = 1;
}
}
instance slot6 of movieClip 1951 {
onClipEvent (load) {
this.id = 6;
}
}
instance slot2 of movieClip 1951 {
onClipEvent (load) {
this.id = 2;
}
}
instance slot4 of movieClip 1951 {
onClipEvent (load) {
this.id = 4;
}
}
instance slot5 of movieClip 1951 {
onClipEvent (load) {
this.id = 5;
}
}
instance portrait of movieClip 1961 {
onClipEvent (release) {
_root.toggleCharacterScreen();
}
}
}
movieClip 2015 {
}
button 2022 {
on (release) {
this.gotoAndPlay('close');
}
}
movieClip 2023 {
frame 1 {
stop();
}
frame 2 {
_root[_root.hero].gotoAndStop('dying');
}
frame 11 {
btn1.useHandCursor = false;
stop();
}
frame 20 {
_root.respawnHero();
}
frame 29 {
this.gotoAndStop(1);
}
}
movieClip 2024 {
frame 1 {
stop();
}
frame 10 {
_root.startNewLevel();
}
}
movieClip 2030 {
}
button 2034 {
on (release) {
if (_root.characterScreen.oTalents.getDepth() == _root.bottomDepth) {
_root.characterScreen.oTalents.linkText.gotoAndStop(1);
_root.characterScreen.dTalents.linkText.gotoAndStop(2);
_root.characterScreen.oTalents.swapDepths(_root.characterScreen.dTalents);
}
}
}
movieClip 2035 {
frame 1 {
stop();
}
frame 2 {
oBtn.useHandCursor = false;
}
}
movieClip 2215 {
frame 1 {
stop();
}
}
movieClip 2218 {
}
movieClip 2219 {
frame 1 {
stop();
}
frame 10 {
stop();
}
}
button 2220 {
on (release) {
_root.processTalent('stunPunchT');
}
on (rollOver) {
_root.getTalentText('stunPunchT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2221 {
}
button 2225 {
on (release) {
_root.processTalent('powerSwing');
}
on (rollOver) {
_root.getTalentText('powerSwing');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2226 {
}
button 2227 {
on (release) {
_root.processTalent('quickSlashT');
}
on (rollOver) {
_root.getTalentText('quickSlashT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2228 {
}
button 2232 {
on (rollOver) {
_root.getHiddenTalentText('forceBlade');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2233 {
on (release) {
_root.processTalent('forceBlade');
}
on (rollOver) {
_root.getTalentText('forceBlade');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2234 {
frame 1 {
stop();
}
}
button 2235 {
on (rollOver) {
_root.getHiddenTalentText('impaleT');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2236 {
on (release) {
_root.processTalent('impaleT');
}
on (rollOver) {
_root.getTalentText('impaleT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2237 {
frame 1 {
stop();
}
}
button 2240 {
on (rollOver) {
_root.getHiddenTalentText('stoneBreaker');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2241 {
on (release) {
_root.processTalent('stoneBreaker');
}
on (rollOver) {
_root.getTalentText('stoneBreaker');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2242 {
frame 1 {
stop();
}
}
button 2245 {
on (rollOver) {
_root.getHiddenTalentText('medusaBlade');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2246 {
on (release) {
_root.processTalent('medusaBlade');
}
on (rollOver) {
_root.getTalentText('medusaBlade');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2247 {
frame 1 {
stop();
}
}
button 2248 {
on (rollOver) {
_root.getHiddenTalentText('tornadoT');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2249 {
on (release) {
_root.processTalent('tornadoT');
}
on (rollOver) {
_root.getTalentText('tornadoT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2250 {
frame 1 {
stop();
}
}
button 2253 {
on (rollOver) {
_root.getHiddenTalentText('deadEye');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2254 {
on (release) {
_root.processTalent('deadEye');
}
on (rollOver) {
_root.getTalentText('deadEye');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2255 {
frame 1 {
stop();
}
}
button 2256 {
on (rollOver) {
_root.getHiddenTalentText('whirlwindT');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2257 {
on (release) {
_root.processTalent('whirlwindT');
}
on (rollOver) {
_root.getTalentText('whirlwindT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2258 {
frame 1 {
stop();
}
}
button 2269 {
on (release) {
_root.processTalent('blackIceT');
}
on (rollOver) {
_root.getTalentText('blackIceT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2270 {
}
button 2273 {
on (release) {
_root.processTalent('focusedMind');
}
on (rollOver) {
_root.getTalentText('focusedMind');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2274 {
}
button 2277 {
on (rollOver) {
_root.getHiddenTalentText('shatter');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2278 {
on (release) {
_root.processTalent('shatter');
}
on (rollOver) {
_root.getTalentText('shatter');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2279 {
frame 1 {
stop();
}
}
button 2282 {
on (rollOver) {
_root.getHiddenTalentText('precision');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2283 {
on (release) {
_root.processTalent('precision');
}
on (rollOver) {
_root.getTalentText('precision');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2284 {
frame 1 {
stop();
}
}
button 2285 {
on (release) {
_root.processTalent('hellFireT');
}
on (rollOver) {
_root.getTalentText('hellFireT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2286 {
}
button 2287 {
on (rollOver) {
_root.getHiddenTalentText('deathBoltT');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2288 {
on (release) {
_root.processTalent('deathBoltT');
}
on (rollOver) {
_root.getTalentText('deathBoltT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2289 {
frame 1 {
stop();
}
}
button 2292 {
on (rollOver) {
_root.getHiddenTalentText('fireAndIce');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2293 {
on (release) {
_root.processTalent('fireAndIce');
}
on (rollOver) {
_root.getTalentText('fireAndIce');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2294 {
frame 1 {
stop();
}
}
button 2297 {
on (rollOver) {
_root.getHiddenTalentText('feedback');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2298 {
on (release) {
_root.processTalent('feedback');
}
on (rollOver) {
_root.getTalentText('feedback');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2299 {
frame 1 {
stop();
}
}
button 2300 {
on (rollOver) {
_root.getHiddenTalentText('brimstoneT');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2301 {
on (release) {
_root.processTalent('brimstoneT');
}
on (rollOver) {
_root.getTalentText('brimstoneT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2302 {
frame 1 {
stop();
}
}
button 2305 {
on (rollOver) {
_root.getHiddenTalentText('deadlyFocus');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2306 {
on (release) {
_root.processTalent('deadlyFocus');
}
on (rollOver) {
_root.getTalentText('deadlyFocus');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2307 {
frame 1 {
stop();
}
}
movieClip 2318 {
frame 1 {
stop();
}
frame 2 {
stunPunchTMC.stunPunchTBtn.useHandCursor = false;
quickSlashTMC.quickSlashTBtn.useHandCursor = false;
powerSwingMC.powerSwingBtn.useHandCursor = false;
}
frame 11 {
blackIceTMC.blackIceTBtn.useHandCursor = false;
focusedMindMC.focusedMindBtn.useHandCursor = false;
hellFireTMC.hellFireTBtn.useHandCursor = false;
}
}
movieClip 2319 {
}
movieClip 2322 {
}
button 2326 {
on (release) {
if (_root.characterScreen.dTalents.getDepth() == _root.bottomDepth) {
_root.characterScreen.oTalents.linkText.gotoAndStop(2);
_root.characterScreen.dTalents.linkText.gotoAndStop(1);
_root.characterScreen.dTalents.swapDepths(_root.characterScreen.oTalents);
}
}
}
movieClip 2327 {
frame 1 {
stop();
}
frame 2 {
dBtn.useHandCursor = false;
}
}
// unknown tag 88 length 215
// unknown tag 88 length 68
movieClip 2494 {
frame 1 {
stop();
}
}
button 2497 {
on (rollOver) {
_root.getHiddenTalentText('improvedBlock');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2498 {
on (release) {
_root.processTalent('improvedBlock');
}
on (rollOver) {
_root.getTalentText('improvedBlock');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2499 {
frame 1 {
stop();
}
}
button 2502 {
on (rollOver) {
_root.getHiddenTalentText('guardianSpirit');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2503 {
on (release) {
_root.processTalent('guardianSpirit');
}
on (rollOver) {
_root.getTalentText('guardianSpirit');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2504 {
frame 1 {
stop();
}
}
button 2507 {
on (release) {
_root.processTalent('rejuvinate');
}
on (rollOver) {
_root.getTalentText('rejuvinate');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2508 {
}
button 2511 {
on (rollOver) {
_root.getHiddenTalentText('shieldOfValor');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2512 {
on (release) {
_root.processTalent('shieldOfValor');
}
on (rollOver) {
_root.getTalentText('shieldOfValor');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2513 {
frame 1 {
stop();
}
}
button 2516 {
on (rollOver) {
_root.getHiddenTalentText('siphonLife');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2517 {
on (release) {
_root.processTalent('siphonLife');
}
on (rollOver) {
_root.getTalentText('siphonLife');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2518 {
frame 1 {
stop();
}
}
button 2521 {
on (rollOver) {
_root.getHiddenTalentText('lifeTap');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2522 {
on (release) {
_root.processTalent('lifeTap');
}
on (rollOver) {
_root.getTalentText('lifeTap');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2523 {
frame 1 {
stop();
}
}
button 2526 {
on (rollOver) {
_root.getHiddenTalentText('energize');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2527 {
on (release) {
_root.processTalent('energize');
}
on (rollOver) {
_root.getTalentText('energize');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2528 {
frame 1 {
stop();
}
}
button 2531 {
on (release) {
_root.processTalent('block');
}
on (rollOver) {
_root.getTalentText('block');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2532 {
}
button 2535 {
on (rollOver) {
_root.getHiddenTalentText('vitality');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2536 {
on (release) {
_root.processTalent('vitality');
}
on (rollOver) {
_root.getTalentText('vitality');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2537 {
frame 1 {
stop();
}
}
button 2540 {
on (release) {
_root.processTalent('stoneSkin');
}
on (rollOver) {
_root.getTalentText('stoneSkin');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2541 {
}
button 2554 {
on (release) {
_root.processTalent('glider');
}
on (rollOver) {
_root.getTalentText('glider');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2555 {
}
button 2557 {
on (rollOver) {
_root.getHiddenTalentText('stamina');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2558 {
on (release) {
_root.processTalent('stamina');
}
on (rollOver) {
_root.getTalentText('stamina');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2559 {
frame 1 {
stop();
}
}
button 2561 {
on (release) {
_root.processTalent('flowingThought');
}
on (rollOver) {
_root.getTalentText('flowingThought');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2562 {
}
button 2565 {
on (release) {
_root.processTalent('expansiveMind');
}
on (rollOver) {
_root.getTalentText('expansiveMind');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2566 {
}
button 2569 {
on (rollOver) {
_root.getHiddenTalentText('evasion');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2570 {
on (release) {
_root.processTalent('evasion');
}
on (rollOver) {
_root.getTalentText('evasion');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2571 {
frame 1 {
stop();
}
}
button 2572 {
on (rollOver) {
_root.getHiddenTalentText('energyShieldT');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2573 {
on (release) {
_root.processTalent('energyShieldT');
}
on (rollOver) {
_root.getTalentText('energyShieldT');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2574 {
frame 1 {
stop();
}
}
movieClip 2577 {
}
button 2578 {
on (rollOver) {
_root.getHiddenTalentText('drainSoul');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2579 {
on (release) {
_root.processTalent('drainSoul');
}
on (rollOver) {
_root.getTalentText('drainSoul');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2580 {
frame 1 {
stop();
}
}
button 2583 {
on (rollOver) {
_root.getHiddenTalentText('fly');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2584 {
on (release) {
_root.processTalent('fly');
}
on (rollOver) {
_root.getTalentText('fly');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2585 {
frame 1 {
stop();
}
}
button 2588 {
on (rollOver) {
_root.getHiddenTalentText('frostAura');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2589 {
on (release) {
_root.processTalent('frostAura');
}
on (rollOver) {
_root.getTalentText('frostAura');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2590 {
frame 1 {
stop();
}
}
button 2593 {
on (rollOver) {
_root.getHiddenTalentText('synergy');
}
on (rollOut) {
_root.resetTalentText();
}
}
button 2594 {
on (release) {
_root.processTalent('synergy');
}
on (rollOver) {
_root.getTalentText('synergy');
}
on (rollOut) {
_root.resetTalentText();
}
}
movieClip 2595 {
frame 1 {
stop();
}
}
movieClip 2606 {
frame 1 {
stop();
}
frame 2 {
blockMC.blockBtn.useHandCursor = false;
vitalityMC.vitalityBtn.useHandCursor = false;
stoneSkinMC.stoneSkinBtn.useHandCursor = false;
}
frame 8 {
gliderMC.gliderBtn.useHandCursor = false;
expansiveMindMC.expansiveMindBtn.useHandCursor = false;
flowingThoughtMC.flowingThoughtBtn.useHandCursor = false;
}
}
movieClip 2607 {
}
button 2608 {
on (release) {
_root.toggleCharacterScreen();
}
}
// unknown tag 88 length 62
movieClip 2642 {
frame 1 {
closeBtn.useHandCursor = false;
}
}
button 2649 {
on (release) {
_root.closeTutorials();
}
on (rollOver) {
_root.playSound('rollOver');
}
}
button 2652 {
on (release) {
_root.cancleTutorials();
}
on (rollOver) {
_root.playSound('rollOver');
}
}
movieClip 2653 {
}
movieClip 2671 {
frame 1 {
stop();
}
frame 2 {
closeBtn.useHandCursor = false;
tutBtn.useHandCursor = false;
}
frame 3 {
closeBtn.useHandCursor = false;
tutBtn.useHandCursor = false;
}
frame 4 {
closeBtn.useHandCursor = false;
tutBtn.useHandCursor = false;
}
frame 5 {
closeBtn.useHandCursor = false;
tutBtn.useHandCursor = false;
}
frame 6 {
closeBtn.useHandCursor = false;
tutBtn.useHandCursor = false;
}
frame 7 {
closeBtn.useHandCursor = false;
tutBtn.useHandCursor = false;
}
}
movieClip 2673 {
}
movieClip 2686 {
frame 1 {
stop();
}
}
movieClip 2689 {
frame 1 {
stop();
}
}
movieClip 2690 {
instance hpBar of movieClip 2673 {
onClipEvent (enterFrame) {
if (this._xscale < 0) {
this._xscale = 0;
}
}
}
}
button 2708 {
on (rollOver) {
_root.playSound('rollOver');
}
on (release) {
_root.playSound('click');
if (_root.area == 7) {
if (_root.hero == 'maxx') {
_root.princessEvent();
} else {
stopAllSounds();
_root.playSound('princessFree');
_root.attachMovie('fadeToBlack', 'fadeToBlack', _root.getNextHighestDepth());
_root.fadeToBlack.goal = 'victory';
}
} else {
_root.transitionWindow.gotoAndPlay('open');
}
}
}
movieClip 2709 {
frame 1 {
nextLevelBtn.useHandCursor = false;
}
}
frame 35 {
function myFirstItemHandler() {
getURL('http://www.axis-games.com/castlequest.php', '');
}
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem('(c)2009 - axis-games.com', myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
_root.menu = my_cm;
_root[hero].removeMovieClip();
_root.transitionWindow.removeMovieClip();
_root.tutorialWindow.removeMovieClip();
_root.respawnWindow.removeMovieClip();
_root.messageWindow.removeMovieClip();
_root.statsWindow.removeMovieClip();
_root.characterScreen.removeMovieClip();
_root.mapMenu.removeMovieClip();
_root.hotBar.removeMovieClip();
_root.characterBar.removeMovieClip();
_root.bossWindow.removeMovieClip();
_root.bgImage1.removeMovieClip();
_root.bgImage2.removeMovieClip();
_root.statsWindow.removeMovieClip();
Key.removeListener(keyListener);
_root.victoryText.gotoAndStop(_root.hero);
_root.mainMnu.useHandCursor = false;
_root.attachMovie('fadeToWhite', 'fadeToWhite', _root.getNextHighestDepth());
var time = int(timeTakenTot / 25);
_root.kongregateStats.submit('TimeToComplete', time);
var min = int(time / 60);
var sec = int(time - min * 60);
if (sec < 10) {
sec = '0' + sec;
}
_root.totalTime.text = min + ':' + sec;
_root.totalKills.text = _root.enemiesKilled;
_root.totalDeaths.text = _root.deathsTot;
_root.kongregateStats.submit('Deaths', _root.deathsTot);
_root.kongregateStats.submit('GameComplete', 1);
stop();
}
button 2713 {
on (release) {
_root.attachMovie('fadeToBlack', 'fadeToBlack', _root.getNextHighestDepth());
_root.fadeToBlack.goal = 'title';
}
}
// unknown tag 88 length 62
movieClip 2718 {
frame 1 {
stop();
}
}
frame 43 {
_root.mainMnu.useHandCursor = false;
_root.mapleBtn.useHandCursor = false;
_root.attachMovie('fadeToWhite', 'fadeToWhite', _root.getNextHighestDepth());
stop();
}
frame 51 {
trace('here');
stop();
}