Frame 1
Stage.scaleMode = "showAll";
Mouse.show();
Stage.showMenu = false;
Mouse.show();
Instance of Symbol 72 MovieClip [duel] "duel" in Frame 2
on (press) {
}
Instance of Symbol 63 MovieClip [solo] "solo" in Frame 2
on (press) {
}
Instance of Symbol 192 MovieClip "TypeLight" in Frame 2
on (press) {
this.gotoAndStop("ON");
_root.TypeNormal.gotoAndStop("OFF");
_root.TypeHeavy.gotoAndStop("OFF");
_root.BallType = 3;
}
Instance of Symbol 195 MovieClip "TypeNormal" in Frame 2
on (press) {
this.gotoAndStop("ON");
_root.TypeLight.gotoAndStop("OFF");
_root.TypeHeavy.gotoAndStop("OFF");
_root.BallType = 2;
}
Instance of Symbol 198 MovieClip "TypeHeavy" in Frame 2
on (press) {
this.gotoAndStop("ON");
_root.TypeNormal.gotoAndStop("OFF");
_root.TypeLight.gotoAndStop("OFF");
_root.BallType = 1;
}
Instance of Symbol 201 MovieClip "practice" in Frame 2
on (press) {
this.gotoAndStop("ON");
_root.duel.gotoAndStop("OFF");
_root.solo.gotoAndStop("OFF");
_root.GameMode = 3;
}
Frame 20
Mouse.show();
MenuMusic = new Sound();
MenuMusic.attachSound("MenuBGM");
MenuMusic.start(0, 999);
if (_root.GameMode == 2) {
duel.gotoAndStop("ON");
practice.gotoAndStop("OFF");
} else if (_root.GameMode == 3) {
practice.gotoAndStop("ON");
duel.gotoAndStop("OFF");
}
if (_root.BallType == 3) {
TypeLight.gotoAndStop("ON");
TypeNormal.gotoAndStop("OFF");
TypeHeavy.gotoAndStop("OFF");
} else if (_root.BallType == 2) {
TypeLight.gotoAndStop("OFF");
TypeNormal.gotoAndStop("ON");
TypeHeavy.gotoAndStop("OFF");
} else if (_root.BallType == 1) {
TypeLight.gotoAndStop("OFF");
TypeNormal.gotoAndStop("OFF");
TypeHeavy.gotoAndStop("ON");
}
Instance of Symbol 402 MovieClip in Frame 20
on (release) {
getURL ("http://www.hallpass.com/", "_blank");
}
Instance of Symbol 405 MovieClip in Frame 20
on (release) {
getURL ("http://kynetik-27.newgrounds.com", "_blank");
}
Frame 80
PracticeMusic = new Sound();
PracticeMusic.attachSound("PracticeBGM");
PracticeMusic.start(0, 999);
PracticeMusic2 = new Sound();
PracticeMusic2.attachSound("BentoBGM");
PracticeMusic3 = new Sound();
PracticeMusic3.attachSound("Bento2BGM");
stop();
Frame 81
function init() {
Stage.showMenu = false;
Stage.scaleMode = "showAll";
Mouse.hide();
frictionAirX = 0.99;
frictionAirY = 0.8;
gravity = 1;
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
PlayerMass = 1;
Ball._xscale = 50;
Ball._yscale = 50;
if (BallType == 3) {
BallMass = 0.5;
} else if (BallType == 2) {
BallMass = 1;
} else if (BallType == 1) {
BallMass = 1.5;
}
BallSize = Ball._xscale;
ServeDistX = target._x - Ball._x;
ServeMovX = ServeDistX / 7;
ServeDistY = target._y - Ball._y;
ServeMovY = ServeDistY / 7;
BallVelX = 0;
BallVelY = -15;
BallWeight = BallMass * gravity;
BallAccel = BallForce / BallMass;
BallRestX = false;
BallRestY = false;
BallRest = false;
BallEnergy = 30;
BallTag = 1;
meleeflash._visible = false;
PlayerVelX = 0;
PlayerVelY = 0;
PlayerForce = 0;
PlayerWeight = PlayerMass * gravity;
PlayerRestX = true;
PlayerRestY = true;
PlayerRest = true;
PlayerHealth = 100;
PlayerStamina = 1;
PlayerPower = 100;
PlayerCombo = 0;
PlayerMaxCombo = 0;
ATTACK = false;
HURT = false;
HURTfront = false;
HURTback = false;
DEAD = false;
NEUTRAL = true;
CHARGE = false;
TELEPORT = false;
INVINCIBLE = false;
PlayerFacingL = false;
PlayerFacingR = true;
aura._alpha = 0;
spriteINVINC._visible = false;
EnemyHURT = false;
EnemyATTACK = false;
EnemyDEAD = false;
EnemyNEUTRAL = true;
EnemyHealth = 100;
TrainerATTACK = false;
TrainerNEUTRAL = true;
TrainerATTACK2 = false;
TrainerNEUTRAL2 = true;
StaminaHUD._height = 1;
PlayerHealthHUD._visible = true;
BallEnergyHUD._visible = true;
combodisplay._alpha = 0;
combodisplay2._visible = false;
GAMEOVER._visible = false;
GAMEOVER2._visible = false;
BallEnergyHUD.onEnterFrame = engineENERGY();
Ball.onEnterFrame = engineBALL;
Trainer.onEnterFrame = engineTRAINER;
Player.onEnterFrame = enginePLAYER;
Player.onMouseDown = enginePOWER;
Player.onMouseUp = engineATTACK;
DefendListener = new Object();
DefendListener.onKeyUp = engineDEFEND;
Key.addListener(DefendListener);
}
function engineBALL() {
var _local1 = this;
BallWeight = BallMass * gravity;
BallEnergy2 = Math.round(BallEnergy);
BallSize = Ball._xscale;
if ((BallVelX >= 1) or (BallVelX <= -1)) {
BallRestX = false;
} else {
BallRestX = true;
}
if ((BallVelY >= 1) or (BallVelY <= -1)) {
BallRestY = false;
} else {
BallRestY = true;
}
if ((BallRestX == true) && (BallRestY == true)) {
BallRest = true;
} else {
BallRest = false;
}
if (BallEnergy > 0) {
BallEnergy = BallEnergy - 0.05;
}
if (BallEnergy > 100) {
BallEnergy = 100;
}
if (BallEnergy < 0) {
BallEnergy = 0;
}
if (Ball._xscale > BallSize) {
Ball._xscale = Ball._xscale - 0.1;
Ball._yscale = Ball._yscale - 0.1;
}
if (!_local1.hitTest(ground)) {
if ((BallVelY < 20) && (!_local1.hitTest(ground))) {
BallVelY = BallVelY + BallWeight;
}
}
if (BallRestX == false) {
if (BallVelX != 0) {
BallVelX = BallVelX * frictionAirX;
}
if ((BallVelX < 1) && (BallVelX > -1)) {
BallVelX = 0;
BallRestX = true;
}
}
_local1._rotation = _local1._rotation + (BallVelX * 4);
if (_local1.hitTest(ground)) {
BallEnergy = BallEnergy * 0.95;
}
if (_local1.hitTest(ground) && (BallVelY > 0)) {
PlayerCombo = 0;
if (BallVelY >= 5) {
BallVelY = BallVelY * -0.75;
} else if (BallVelY < 5) {
BallVelY = -(Math.round(BallVelY) * 0.3);
}
if ((BallVelY < 1) && (BallVelY >= 0)) {
BallVelY = 0;
BallRestY = true;
}
}
if ((_local1.hitTest(ground) && (BallVelY > -1)) && (BallVelY < 0)) {
BallVelY = 0;
BallRestY = true;
}
if (_local1.hitTest(wallRIGHT) && (BallVelX > 0)) {
_local1._x = _local1._x - 1;
BallVelX = -BallVelX;
}
if (_local1.hitTest(wallLEFT) && (BallVelX < 0)) {
_local1._x = _local1._x + 1;
BallVelX = BallVelX * -1;
}
if (_local1.hitTest(wallTOP) && (BallVelY < 0)) {
_local1._y = _local1._y + 1;
BallVelY = BallVelY * -1;
}
if (BallVelX > 50) {
BallVelX = 49;
}
if (BallVelX < -50) {
BallVelX = -49;
}
if (BallVelY > 50) {
BallVelY = 49;
}
if (BallVelY < -50) {
BallVelY = -49;
}
_local1._x = _local1._x + BallVelX;
_local1._y = _local1._y + BallVelY;
BallShadow._x = _local1._x;
BallShadow._xscale = _local1._y / 3;
if (BallEnergy < 2) {
_local1.GotoAndStop("NORMAL");
}
if (BallTag == 1) {
if ((BallEnergy < 30) && (BallEnergy >= 2)) {
_local1.GotoAndStop("WARM1");
}
if ((BallEnergy < 90) && (BallEnergy >= 30)) {
_local1.GotoAndStop("HOT1");
}
if (BallEnergy >= 90) {
_local1.GotoAndStop("CHARGED1");
}
} else if (BallTag == 2) {
if ((BallEnergy < 30) && (BallEnergy >= 2)) {
_local1.GotoAndStop("WARM2");
}
if ((BallEnergy < 90) && (BallEnergy >= 30)) {
_local1.GotoAndStop("HOT2");
}
if (BallEnergy >= 90) {
_local1.GotoAndStop("CHARGED2");
}
}
}
function enginePLAYER() {
var _local1 = this;
Xdist = Math.round(target._x - Player._x);
Ydist = Math.round(target._y - Player._y);
PlayerWeight = PlayerMass * gravity;
hyp = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
PlayerHealth = Math.round(PlayerHealth);
aura._x = _local1._x;
aura._y = _local1._y;
TeleportSprite._x = _local1._x;
TeleportSprite._y = _local1._y;
if ((PlayerVelY != 0) && (PlayerVelX == 0)) {
TeleportSprite._rotation = 90;
} else if (PlayerVelY == 0) {
TeleportSprite._rotation = 0;
} else if ((PlayerVelY > 0) && (PlayerVelX != 0)) {
TeleportSprite._rotation = PlayerVelY + PlayerVelX;
} else if ((PlayerVelY < 0) && (PlayerVelX != 0)) {
TeleportSprite._rotation = PlayerVelY - PlayerVelX;
}
PowerBAR._height = PlayerForce;
if (PlayerForce >= 100) {
PowerBAR._height = 100;
}
if (ATTACK == true) {
TELEPORT = false;
PowerBAR._alpha = PowerBAR._alpha * 0.8;
}
if (CHARGE == true) {
ATTACK = false;
aura._rotation = AR;
if (PlayerVelY >= 0) {
AR = -(PlayerVelX * 4);
}
if ((PlayerVelY < 0) && (PlayerVelX != 0)) {
AR = -(PlayerVelX * 7);
}
if ((PlayerVelY < 0) && (PlayerVelX == 0)) {
AR = 180;
}
if (PlayerForce < PlayerStamina) {
if (INVINCIBLE == false) {
aura._alpha = aura._alpha + 3;
PlayerForce = PlayerForce + 3;
PlayerPower = PlayerPower - 1;
} else if (INVINCIBLE == true) {
aura._alpha = aura._alpha + 10;
PlayerForce = PlayerForce + 10;
PlayerPower = PlayerPower - 1;
}
}
} else {
aura._alpha = aura._alpha * 0.95;
}
if ((ATTACK == false) && (CHARGE == false)) {
PlayerForce = 0;
PlayerPower = 101;
}
if (((PlayerStamina < 100) && (DEAD == false)) && (INVINCIBLE == false)) {
PlayerStamina = PlayerStamina + 1;
} else if (((PlayerStamina < 100) && (DEAD == false)) && (INVINCIBLE == true)) {
PlayerStamina = PlayerStamina + 10;
}
StaminaBar._height = PlayerStamina;
if (PlayerStamina < 0) {
PlayerStamina = 0;
}
if (BallTag == 1) {
BallEnergyHUD.EnergyHUD._x = (-BallEnergy) / 2;
}
if (BallTag == 2) {
BallEnergyHUD.EnergyHUD._x = BallEnergy / 2;
}
if (BallTag == 0) {
BallEnergyHUD.EnergyHUD._x = 0;
}
if (PlayerMaxCombo < PlayerCombo) {
PlayerMaxCombo = PlayerCombo;
}
if (PlayerCombo >= 2) {
n = 0;
PlayerComboHUD = PlayerCombo;
combodisplay._alpha = 100;
combodisplay.gotoAndStop(1);
combodisplay2.textColor = 16777215 /* 0xFFFFFF */;
combodisplay2._visible = true;
} else {
n = n + 1;
combodisplay.gotoAndStop(2);
combodisplay2.textColor = 16711680 /* 0xFF0000 */;
if (n > 50) {
combodisplay2._visible = false;
combodisplay._alpha = combodisplay._alpha * 0.9;
}
}
if (PlayerHealthHUD._xscale > 0) {
PlayerHealthHUD._xscale = PlayerHealth / 2;
PlayerHealthHUD._yscale = PlayerHealthHUD._xscale;
}
if (PlayerHealth > 90) {
PlayerHealthHUD.gotoAndStop(1);
} else if ((PlayerHealth > 80) && (PlayerHealth <= 90)) {
PlayerHealthHUD.gotoAndStop(2);
} else if ((PlayerHealth > 70) && (PlayerHealth <= 80)) {
PlayerHealthHUD.gotoAndStop(3);
} else if ((PlayerHealth > 60) && (PlayerHealth <= 70)) {
PlayerHealthHUD.gotoAndStop(4);
} else if ((PlayerHealth > 50) && (PlayerHealth <= 60)) {
PlayerHealthHUD.gotoAndStop(5);
} else if ((PlayerHealth > 40) && (PlayerHealth <= 50)) {
PlayerHealthHUD.gotoAndStop(6);
} else if ((PlayerHealth > 30) && (PlayerHealth <= 40)) {
PlayerHealthHUD.gotoAndStop(7);
} else if ((PlayerHealth > 20) && (PlayerHealth <= 30)) {
PlayerHealthHUD.gotoAndStop(8);
} else if ((PlayerHealth > 10) && (PlayerHealth <= 20)) {
PlayerHealthHUD.gotoAndStop(9);
}
if ((PlayerVelX >= 1) || (PlayerVelX <= -1)) {
PlayerRestX = false;
}
if ((PlayerVelY >= 1) || (PlayerVelY <= -1)) {
PlayerRestY = false;
}
if ((PlayerRestX == true) && (PlayerRestY == true)) {
PlayerRest = true;
} else {
PlayerRest = false;
}
if ((PlayerRestY == false) && (EnemyDEAD == false)) {
if ((PlayerVelY < 30) && (!Player.hitTest(ground))) {
PlayerVelY = PlayerVelY + PlayerWeight;
}
}
if ((PlayerRestX == false) && (EnemyDEAD == false)) {
if (PlayerVelX != 0) {
PlayerVelX = PlayerVelX * 0.9;
}
if ((PlayerVelX < 1) && (PlayerVelX > -1)) {
PlayerVelX = 0;
PlayerRestX = true;
}
}
if (Player.hitTest(ground)) {
if (PlayerVelY > 0) {
PlayerVelY = 0;
_local1._y = 310;
PlayerRestY = true;
}
if (HURTback == true) {
_local1.gotoAndPlay("HITground");
} else if (HURTfront == true) {
_local1.gotoAndPlay("HITground2");
}
if (ATTACK == true) {
PlayerVelX = 0;
TELEPORT = false;
PowerBAR._alpha = PowerBAR._alpha * 0.8;
}
}
if (Player.hitTest(wallRIGHT) && (PlayerVelX > 1)) {
Player._x = Player._x - 1;
PlayerVelX = PlayerVelX * -0.5;
if (HURTfront == true) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
HURTfront = false;
} else if (HURTback == true) {
_local1.gotoAndPlay("HURTfront");
HURTback = false;
HURTfront = true;
}
}
if (Player.hitTest(wallMIDDLE) && (PlayerVelX > 1)) {
Player._x = Player._x - 1;
PlayerVelX = PlayerVelX * -0.5;
}
if (Player.hitTest(wallLEFT) && (PlayerVelX < 0)) {
Player._x = Player._x + 1;
PlayerVelX = PlayerVelX * -0.5;
if (HURTfront == true) {
_local1.gotoAndPlay(206);
HURTback = true;
HURTfront = false;
WallImpactSound = new Sound();
WallImpactSound.attachSound("wallIMPACT");
WallImpactSound.start();
} else if (HURTback == true) {
_local1.gotoAndPlay(239);
HURTback = false;
HURTfront = true;
}
}
if (Player.hitTest(wallTOP) && (PlayerVelY < 1)) {
Player._y = Player._y + 1;
PlayerVelY = PlayerVelY * -0.5;
}
if ((((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (Key.isDown(87))) && (!Key.isDown(65))) && (!Key.isDown(68))) {
if ((ATTACK == false) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYup");
}
if (_local1.hitTest(ground)) {
PlayerVelY = -5;
}
if ((_local1._y > wallTOP._y) && (PlayerVelY > -3)) {
PlayerVelY = PlayerVelY - 1.1;
}
}
if (((((!_local1.hitTest(ground)) && (HURT == false)) && (DEAD == false)) && (Key.isDown(83))) && (EnemyDEAD == false)) {
PlayerVelY = PlayerVelY + 1.5;
}
if (((((((((!_local1.hitTest(ground)) && (HURT == false)) && (DEAD == false)) && (ATTACK == false)) && (TELEPORT == false)) && (Key.isDown(83))) && (!Key.isDown(65))) && (!Key.isDown(68))) && (EnemyDEAD == false)) {
_local1.gotoAndPlay("FLYdown");
}
if ((((HURT == false) && (DEAD == false)) && (_local1._x < target._x)) && (EnemyDEAD == false)) {
if (Key.isDown(87)) {
PlayerVelY = PlayerVelY - 2;
}
if ((Key.isDown(65) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -20)) {
PlayerVelX = PlayerVelX - 5;
}
if ((Key.isDown(65) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if ((Key.isDown(68) && (_local1._x < 800)) && (PlayerVelX < 20)) {
PlayerVelX = PlayerVelX + 5;
}
if ((Key.isDown(68) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
} else if ((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (_local1._x != target._x)) {
if (Key.isDown(87)) {
PlayerVelY = PlayerVelY - 2;
}
if ((Key.isDown(65) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -20)) {
PlayerVelX = PlayerVelX - 5;
}
if ((Key.isDown(65) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
if ((Key.isDown(68) && (_local1._x < 800)) && (PlayerVelX < 20)) {
PlayerVelX = PlayerVelX + 5;
}
if ((Key.isDown(68) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
}
if ((((((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (!Key.isDown(68))) && (!Key.isDown(65))) && (!Key.isDown(87))) && (ATTACK == false)) && (TELEPORT == false)) {
NEUTRAL = true;
if ((!_local1.hitTest(ground)) && (!Key.isDown(83))) {
_local1.gotoAndPlay("FALL");
Player.onEnterFrame = enginePLAYER;
} else if (_local1.hitTest(ground)) {
_local1.gotoAndPlay("IDLE");
PlayerVelX = PlayerVelX * 0.7;
}
} else {
NEUTRAL = false;
}
if (((((_local1.HITBOX.hitTest(Ball) && (BallTag > 10)) && (ATTACK == false)) && (HURT == false)) && (BallEnergy >= 30)) && (INVINCIBLE == false)) {
HURT = true;
CHARGE = false;
aura._alpha = 0;
PlayerForce = 0;
target._visible = false;
PlayerCombo = 0;
PlayerHealth = PlayerHealth - BallEnergy;
PlayerVelX = PlayerVelX + (BallVelX / 2);
PlayerVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ChargeSound.stop("ChargePush");
ImpactSound = new Sound();
ImpactSound.attachSound("impactHURT");
PainSound = new Sound();
PainSound.attachSound("painHURT");
if (((PlayerFacingR == true) && (BallVelX > 0)) && (BallEnergy < 90)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if (((PlayerFacingL == true) && (BallVelX < 0)) && (BallEnergy < 90)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if (((PlayerFacingR == true) && (BallVelX < 0)) && (BallEnergy < 90)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if (((PlayerFacingL == true) && (BallVelX > 0)) && (BallEnergy < 90)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if (BallEnergy >= 90) {
GAMEOVER.gotoAndPlay(1);
_local1.gotoAndPlay("DIE");
Enemy.gotoAndPlay("I WIN");
bg.bg.gotoAndPlay(85);
Mouse.show();
Ball._visible = false;
BallShadow._visible = false;
PlayerShadow._visible = false;
BallEnergy = 0;
PlayerHealth = 0;
PlayerVelX = 0;
PlayerVelY = 0;
PlayerMass = 0;
}
if (((BallVelX == 0) && (BallVelY < 0)) && (BallEnergy < 90)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
} else if (((BallVelX == 0) && (BallVelY > 0)) && (BallEnergy < 90)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
}
if ((PlayerHealth < 1) && (DEAD == false)) {
GAMEOVER._visible = true;
GAMEOVER.play();
PlayerHealthHUD._visible = false;
DEAD = true;
bg.bg.play();
Bar._visible = false;
BallEnergyHUD._visible = false;
Mouse.show();
}
if (_local1.AttackBox.hitTest(Ball)) {
BallTag = 1;
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 1;
}
HIT = true;
}
if ((ATTACK == true) && (PlayerForce >= 25)) {
z = PlayerForce / 300;
xmov = Xdist * z;
ymov = Ydist * z;
BallVelX = BallVelX + xmov;
BallVelY = BallVelY + ymov;
ChargeRate = 3 * Difficulty;
BallEnergy = BallEnergy + ((PlayerForce / ChargeRate) * (PlayerCombo + 1));
}
if ((ATTACK == true) && (PlayerForce < 25)) {
z = PlayerForce / 100;
xmov = Xdist * z;
ymov = Ydist * z;
BallVelX = xmov;
BallVelY = ymov;
BallEnergy = BallEnergy + (PlayerForce / 5);
}
}
if (_local1.SHIELD.hitTest(Ball)) {
PlayerCombo = 0;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
if (hyp <= 70) {
meleeflash.gotoAndPlay("STALL");
} else if ((hyp <= 140) && (hyp > 70)) {
meleeflash.gotoAndPlay("KICK");
} else if ((hyp <= 210) && (hyp > 140)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (hyp > 210) {
meleeflash.gotoAndPlay("POWER");
}
if ((ATTACK == true) && (hyp >= 70)) {
xmov = Xdist / 7;
ymov = Ydist / 7;
BallVelX = xmov;
BallVelY = ymov;
BallEnergy = BallEnergy - PlayerForce;
}
}
if (_local1.SHIELD.hitTest(Trainer)) {
TrainerATTACK = true;
}
if ((((HURT == false) && (DEAD == false)) && (ATTACK == false)) && (EnemyDEAD == false)) {
startDrag ("/target", true);
Mouse.hide();
target._visible = true;
target._alpha = 100;
} else {
stopDrag();
Mouse.show();
target._alpha = 10;
}
if (PlayerForce <= 25) {
target.GotoAndStop("SOFT");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
target.GotoAndStop("MEDIUM");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
target.GotoAndStop("HARD");
}
if (PlayerForce >= 100) {
target.GotoAndStop("POWER");
}
Player._x = Player._x + PlayerVelX;
Player._y = Player._y + PlayerVelY;
if ((((_local1._x > target._x) && (HURT == false)) && (ATTACK == false)) && (DEAD == false)) {
_local1._xscale = -100;
PlayerFacingL = true;
PlayerFacingR = false;
} else if ((((_local1._x < target._x) && (HURT == false)) && (ATTACK == false)) && (DEAD == false)) {
_local1._xscale = 100;
PlayerFacingR = true;
PlayerFacingL = false;
}
PlayerShadow._x = Player._x;
PlayerShadow._xscale = Player._y / 2;
}
function enginePOWER() {
if ((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (PlayerForce <= PlayerEnergy)) {
CHARGE = true;
PowerBAR._alpha = 100;
PlayerForce = 0;
ChargeSound = new Sound();
ChargeSound.attachSound("ChargePush");
ChargeSound.start(1);
}
}
function engineATTACK() {
if (((HURT == false) && (DEAD == false)) && (ATTACK == false)) {
ATTACK = true;
CHARGE = false;
PlayerStamina = PlayerStamina - PlayerForce;
aura._alpha = aura._alpha * 0.5;
ChargeSound.stop("ChargePush");
if (target._y <= Player._y) {
if (PlayerForce <= 25) {
Player.GotoAndPlay("hitUP1");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
Player.GotoAndPlay("hitUP2");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
Player.GotoAndPlay("hitUP3");
}
if (PlayerForce >= 100) {
Player.GotoAndPlay("hitUP4");
}
}
if (target._y > Player._y) {
if (PlayerForce <= 25) {
Player.GotoAndPlay("hitDOWN1");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
Player.GotoAndPlay("hitDOWN2");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
Player.GotoAndPlay("hitDOWN3");
}
if (PlayerForce >= 100) {
Player.GotoAndPlay("hitDOWN4");
}
}
}
}
function engineDEFEND() {
if (((ATTACK == false) && (HURT == false)) && (DEAD == false)) {
if (Key.getCode() == 32) {
Player.gotoAndPlay("SHIELD");
ATTACK = true;
}
if (Key.getCode() == 16) {
Player.gotoAndPlay("TELEPORT");
TeleportSprite.gotoAndPlay("2");
TELEPORT = true;
TeleportSound = new Sound();
TeleportSound.attachSound("SuperSpeed");
TeleportSound.start();
}
}
}
function engineTRAINER() {
var _local1 = this;
TrainerAccel = random(5) + 20;
TrainerBallDistX = (Player._x - _local1._x) - 20;
TrainerBallDistY = (Player._y - _local1._y) - 20;
TrainerMovX = TrainerBallDistX / TrainerAccel;
TrainerMovY = TrainerBallDistY / TrainerAccel;
if ((TrainerATTACK == false) && (TrainerORBIT == false)) {
TrainerVelX = TrainerMovX;
TrainerVelY = TrainerMovY;
_local1._rotation = 0;
R = 0;
}
if ((TrainerATTACK == false) && (DEAD == false)) {
_local1._x = _local1._x + TrainerVelX;
_local1._y = _local1._y + TrainerVelY;
TrainerNEUTRAL = true;
_local1._rotation = _local1._rotation + R;
} else {
TrainerNEUTRAL == false;
}
if (TrainerATTACK == false) {
if (_local1._x > Player._x) {
_local1._xscale = 40;
} else if (_local1._x < Player._x) {
_local1._xscale = -40;
}
}
if (_local1.hitTest(ground) && (TrainerVelY > 0)) {
TrainerVelY = TrainerVelY * -1;
R = R * -1;
}
if (_local1.hitTest(wallRIGHT) && (TrainerVelX > 0)) {
_local1._x = _local1._x - 1;
R = R * -1;
TrainerVelX = -TrainerVelX;
}
if (_local1.hitTest(wallLEFT) && (TrainerVelX < 0)) {
_local1._x = _local1._x + 1;
TrainerVelX = TrainerVelX * -1;
R = R * -1;
}
if (_local1.hitTest(wallTOP) && (TrainerVelY < 0)) {
_local1._y = _local1._y + 1;
TrainerVelY = TrainerVelY * -1;
R = R * -1;
}
if (_local1.hitTest(Player.AttackBox) && (ATTACK == true)) {
TrainerORBIT = true;
R = R + PlayerForce;
Xdist = target._x - Player._x;
Ydist = target._y - Player._y;
xmov = Xdist / 7;
ymov = Ydist / 7;
TrainerVelX = TrainerVelX + xmov;
TrainerVelY = TrainerVelY + ymov;
}
if (TrainerORBIT == true) {
TrainerVelX = TrainerVelX * 0.95;
TrainerVelY = TrainerVelY * 0.95;
if ((((TrainerVelX < 1) && (TrainerVelX > -1)) && (TrainerVelY < 1)) && (TrainerVelY > -1)) {
TrainerORBIT = false;
}
}
if ((_local1.hitTest(Ball) && (DEAD == false)) && (EnemyDEAD == false)) {
ReflectSound = new Sound();
ReflectSound.attachSound("reflect");
ReflectSound.start();
TrainerChoice = random(101);
TrainerORBIT = false;
BallTag = 1;
PlayerCombo = PlayerCombo + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("POWER");
TrainerPower = random(5) + 10;
_local1.gotoAndPlay("ATTACK2");
TrainerATTACK = true;
TrainerPlayerDistX = Player._x - _local1._x;
TrainerForceX = TrainerPlayerDistX / TrainerPower;
TrainerForceY = -TrainerPower;
BallVelX = TrainerForceX;
BallVelY = BallVelY + TrainerForceY;
}
}
function engineENEMY() {
var _local1 = this;
EnemyAccel = random(5) + 20;
EnemyBallDistX = Ball._x - _local1._x;
EnemyBallDistY = Ball._y - _local1._y;
EnemyMovX = EnemyBallDistX / EnemyAccel;
EnemyMovY = EnemyBallDistY / EnemyAccel;
EnemyBallDistX2 = random(5) + 1;
EnemyBallDistY2 = random(5) + 1;
EnemyMovX2 = EnemyBallDistX2 - random(7);
EnemyMovY2 = EnemyBallDistY2 - random(7);
if (BallTag < 1) {
EnemyVelX = EnemyMovX;
EnemyVelY = EnemyMovY;
} else if (BallTag == 1) {
EnemyVelX = (EnemyMovX + EnemyMovX2) / 2;
EnemyVelY = (EnemyMovY + EnemyMovY2) / 2;
} else if ((BallTag > 1) && (EnemyAccel > 23)) {
EnemyVelX = EnemyMovX + EnemyMovX2;
EnemyVelY = EnemyMovY + EnemyMovY2;
}
if (((EnemyHURT == false) && (EnemyATTACK == false)) && (DEAD == false)) {
_local1._x = _local1._x + EnemyVelX;
_local1._y = _local1._y + EnemyVelY;
EnemyNEUTRAL = true;
} else {
EnemyNEUTRAL == false;
}
EnemyShadow._x = Enemy._x;
EnemyShadow._xscale = Enemy._y / 2;
if ((EnemyATTACK == false) && (EnemyHURT == false)) {
if (_local1._x > Player._x) {
_local1._xscale = 90;
} else if (_local1._x < Player._x) {
_local1._xscale = -90;
}
}
if (DEAD == false) {
if (_local1.hitTest(ground) && (EnemyVelY > 0)) {
EnemyVelY = EnemyVelY * -1;
_local1._y = _local1._y - 5;
}
if (_local1.hitTest(wallRIGHT) && (EnemyVelX > 0)) {
_local1._x = _local1._x - 5;
EnemyVelX = -EnemyVelX;
}
if (_local1.hitTest(wallLEFT) && (EnemyVelX < 0)) {
_local1._x = _local1._x + 5;
EnemyVelX = EnemyVelX * -1;
}
if (_local1.hitTest(wallTOP) && (EnemyVelY < 0)) {
_local1._y = _local1._y + 5;
EnemyVelY = EnemyVelY * -1;
}
}
EnemyHealthHUD._alpha = EnemyHealth;
if (((_local1.HITBOX.hitTest(Ball) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (EnemyDEAD == false)) {
EnemyChoice = random(101);
if (EnemyChoice >= 30) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("POWER");
HIT = true;
}
DoICombo = random(101);
if (DoICombo <= 50) {
BallTag = 2;
EnemyPower = random(5) + 20;
_local1.gotoAndPlay("ATTACK1");
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Player._x - _local1._x;
EnemyPlayerDistY = Player._y - _local1._y;
EnemyForceX = EnemyPlayerDistX / (Difficulty * 5);
EnemyForceY = EnemyPlayerDistY / (Difficulty * 5);
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
Ball._xscale = Ball._xscale + (EnemyPower / 3);
Ball._yscale = Ball._yscale + (EnemyPower / 3);
} else if (BallEnergy >= 90) {
BallTag = 2;
EnemyPower = random(5) + 20;
_local1.gotoAndPlay("ATTACK1");
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Player._x - Ball._x;
EnemyPlayerDistY = Player._y - Ball._y;
EnemyForceX = EnemyPlayerDistX / (Difficulty * 5);
EnemyForceY = EnemyPlayerDistY / (Difficulty * 5);
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
Ball._xscale = Ball._xscale + (EnemyPower / 3);
Ball._yscale = Ball._yscale + (EnemyPower / 3);
} else if ((DoICombo > 50) && (BallEnergy < 90)) {
BallTag = 2;
EnemyPower = random(10) + 10;
_local1.gotoAndPlay("ATTACK2");
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Trainer2._x - Ball._x;
EnemyForceX = EnemyPlayerDistX / EnemyPower;
EnemyForceY = -EnemyPower;
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
}
} else if (((EnemyChoice < 30) && (BallEnergy > 90)) && (BallTag == 1)) {
_local1.gotoAndPlay("DIE");
Player.gotoAndPlay("I WIN");
EnemyHURT = true;
bg.bg.gotoAndPlay(85);
EnemyHealth = EnemyHealth - 100;
BallEnergy = 0;
EnemyDEAD = true;
BallEnergyHUD._visible = false;
GAMEOVER2.gotoAndPlay(1);
GAMEOVER2._visible = true;
Ball._visible = false;
BallShadow._visible = false;
Mouse.show();
} else if ((((BallEnergy >= 30) && (BallEnergy < 90)) && (BallTag == 1)) && (EnemyChoice < 30)) {
_local1.gotoAndPlay("HURT");
EnemyHURT = true;
EnemyHealth = EnemyHealth - (BallEnergy * (PlayerCombo + 1));
PlayerCombo = PlayerCombo + 1;
BallEnergy = BallEnergy / 5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
if (EnemyHealth < 1) {
EnemyDEAD = true;
Mouse.show();
Player.gotoAndPlay("I WIN");
bg.bg.play();
Bar._visible = false;
BallEnergyHUD._visible = false;
GAMEOVER2._visible = true;
}
}
}
if (((_local1.HITBOX2.hitTest(Ball) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (EnemyDEAD == false)) {
EnemyChoice = random(101);
if (EnemyChoice >= 0) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("POWER");
HIT = true;
}
DoICombo = random(101);
if (DoICombo <= 101) {
BallTag = 2;
EnemyPower = random(10) + 20;
_local1.gotoAndPlay("ATTACK3");
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Player._x - Ball._x;
EnemyPlayerDistY = Player._y - Ball._y;
EnemyForceX = EnemyPlayerDistX / (Difficulty * 5);
EnemyForceY = EnemyPlayerDistY / (Difficulty * 3);
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
Ball._xscale = Ball._xscale + (EnemyPower / 3);
Ball._yscale = Ball._yscale + (EnemyPower / 3);
}
}
}
}
init();
stop();
Instance of Symbol 557 MovieClip "Ball" in Frame 81
onClipEvent (enterFrame) {
}
Instance of Symbol 1198 MovieClip "Player" in Frame 81
/* no clip actions */
Frame 114
Stage.scaleMode = "showAll";
Mouse.show();
bg.bg.gotoAndPlay(2);
Instance of Symbol 1600 MovieClip in Frame 115
/* no clip actions */
Frame 206
function init() {
Stage.showMenu = false;
Stage.scaleMode = "showAll";
Mouse.hide();
frictionAirX = 0.99;
frictionAirY = 0.8;
gravity = 1;
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
if (StageLevel > 1) {
EnemyDEAD = false;
FightSound = new Sound();
FightSound.attachSound("FIGHT!");
FightSound.start();
BallVelX = BallVelX / 10;
BallVelY = -30;
}
ServeDistX = target._x - Ball._x;
ServeMovX = ServeDistX / 7;
ServeDistY = target._y - Ball._y;
ServeMovY = ServeDistY / 7;
BallWeight = BallMass * gravity;
BallAccel = BallForce / BallMass;
BallRestX = false;
BallRestY = false;
BallRest = false;
BallEnergy = 30;
BallTag = 1;
meleeflash._visible = false;
WINCOUNT = 0;
LOSECOUNT = 0;
PlayerMass = PlayerMass * 0.9;
PlayerVelX = 0;
PlayerVelY = 0;
PlayerForce = 0;
PlayerWeight = PlayerMass * gravity;
PlayerRestX = true;
PlayerRestY = true;
PlayerRest = true;
PlayerHealth = 100;
PlayerStamina = 100;
PlayerPower = 100;
ATTACK = false;
HURT = false;
HURTfront = false;
HURTback = false;
DEAD = false;
NEUTRAL = true;
CHARGE = false;
TELEPORT = false;
INVINCIBLE = false;
PlayerFacingL = false;
PlayerFacingR = true;
aura._alpha = 0;
spriteINVINC._visible = false;
EnemyVelX = 0;
EnemyVelY = 0;
EnemyPower = 0;
EnemyMass = 1;
EnemyWeight = EnemyMass * gravity;
EnemyHealth = 100;
EnemyRestX = true;
EnemyRestY = true;
EnemyATTACK = false;
EnemyDEAD = false;
EnemyNEUTRAL = true;
EnemyCHARGE = false;
EnemyTELEPORT = false;
EnemyFacingL = true;
EnemyFacingR = false;
TrainerATTACK = false;
TrainerNEUTRAL = true;
TrainerATTACK2 = false;
TrainerNEUTRAL2 = true;
PlayerHealthHUD._visible = true;
BallEnergyHUD._visible = true;
EnemyHealthBall._alpha = 100;
combodisplay._alpha = 0;
combodisplay2._visible = false;
GAMEOVER._visible = false;
GAMEOVER2._visible = false;
pickupHEALTH._visible = false;
pickupINVINCIBILITY._visible = false;
INV = 0;
HPT = 0;
MusicSound = new Sound();
MusicSound.attachSound("bgmusic");
MusicSound.start(0, 9999);
BallEnergyHUD.onEnterFrame = engineENERGY();
Ball.onEnterFrame = engineBALL;
Trainer.onEnterFrame = engineTRAINER;
Player.onEnterFrame = enginePLAYER;
Player.onMouseDown = enginePOWER;
Player.onMouseUp = engineATTACK;
DefendListener = new Object();
DefendListener.onKeyUp = engineDEFEND;
Key.addListener(DefendListener);
Enemy.onEnterFrame = engineENEMY;
}
function engineBALL() {
var _local1 = this;
BallWeight = BallMass * gravity;
BallEnergy2 = Math.round(BallEnergy);
if ((BallVelX >= 1) or (BallVelX <= -1)) {
BallRestX = false;
} else {
BallRestX = true;
}
if ((BallVelY >= 1) or (BallVelY <= -1)) {
BallRestY = false;
} else {
BallRestY = true;
}
if ((BallRestX == true) && (BallRestY == true)) {
BallRest = true;
} else {
BallRest = false;
}
if (BallEnergy > 0) {
BallEnergy = BallEnergy - 0.1;
}
if (BallEnergy > 100) {
BallEnergy = 100;
}
if (BallEnergy < 0) {
BallEnergy = 0;
}
if (Ball._xscale > BallSize) {
Ball._xscale = Ball._xscale - 0.1;
Ball._yscale = Ball._yscale - 0.1;
}
if (!_local1.hitTest(ground)) {
if ((BallVelY < 20) && (!_local1.hitTest(ground))) {
BallVelY = BallVelY + BallWeight;
}
}
if (BallRestX == false) {
if (BallVelX != 0) {
BallVelX = BallVelX * frictionAirX;
}
if ((BallVelX < 1) && (BallVelX > -1)) {
BallVelX = 0;
BallRestX = true;
}
}
_local1._rotation = _local1._rotation + (BallVelX * 4);
if (_local1.hitTest(ground)) {
BallEnergy = BallEnergy * 0.95;
}
if (_local1.hitTest(ground) && (BallVelY > 0)) {
if (EnemyHURT == false) {
PlayerCombo = 0;
}
if (EnemyHURT == true) {
PlayerCombo = PlayerCombo - 1;
}
if (BallVelY >= 5) {
BallVelY = BallVelY * -0.75;
} else if (BallVelY < 5) {
BallVelY = -(Math.round(BallVelY) * 0.3);
}
if ((BallVelY < 1) && (BallVelY >= 0)) {
BallVelY = 0;
BallRestY = true;
}
}
if ((_local1.hitTest(ground) && (BallVelY > -1)) && (BallVelY < 0)) {
BallVelY = 0;
BallRestY = true;
}
if (_local1.hitTest(wallRIGHT) && (BallVelX > 0)) {
_local1._x = _local1._x - 1;
BallVelX = -BallVelX;
}
if (_local1.hitTest(wallLEFT) && (BallVelX < 0)) {
_local1._x = _local1._x + 1;
BallVelX = BallVelX * -1;
}
if (_local1.hitTest(wallTOP) && (BallVelY < 0)) {
_local1._y = _local1._y + 1;
BallVelY = BallVelY * -1;
}
if (BallVelX > 50) {
BallVelX = 49;
}
if (BallVelX < -50) {
BallVelX = -49;
}
if (BallVelY > 50) {
BallVelY = 49;
}
if (BallVelY < -50) {
BallVelY = -49;
}
_local1._x = _local1._x + BallVelX;
_local1._y = _local1._y + BallVelY;
BallShadow._x = _local1._x;
BallShadow._xscale = _local1._width + (_local1._y / 3);
if (BallEnergy < 2) {
_local1.GotoAndStop("NORMAL");
}
if (BallTag == 1) {
if ((BallEnergy < 30) && (BallEnergy >= 2)) {
_local1.GotoAndStop("WARM1");
}
if ((BallEnergy < 90) && (BallEnergy >= 30)) {
_local1.GotoAndStop("HOT1");
}
if (BallEnergy >= 90) {
_local1.GotoAndStop("CHARGED1");
}
} else if (BallTag == 2) {
if ((BallEnergy < 30) && (BallEnergy >= 2)) {
_local1.GotoAndStop("WARM2");
}
if ((BallEnergy < 90) && (BallEnergy >= 30)) {
_local1.GotoAndStop("HOT2");
}
if (BallEnergy >= 90) {
_local1.GotoAndStop("CHARGED2");
}
}
}
function enginePLAYER() {
var _local1 = this;
Xdist = Math.round(target._x - Player._x);
Ydist = Math.round(target._y - Player._y);
PlayerWeight = PlayerMass * gravity;
hyp = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
PlayerScore = Math.round(PlayerScore);
PlayerHealth = Math.round(PlayerHealth);
aura._x = _local1._x;
aura._y = _local1._y;
TeleportSprite._x = _local1._x;
TeleportSprite._y = _local1._y;
if ((PlayerVelY != 0) && (PlayerVelX == 0)) {
TeleportSprite._rotation = 90;
} else if (PlayerVelY == 0) {
TeleportSprite._rotation = 0;
} else if ((PlayerVelY > 0) && (PlayerVelX != 0)) {
TeleportSprite._rotation = PlayerVelY + PlayerVelX;
} else if ((PlayerVelY < 0) && (PlayerVelX != 0)) {
TeleportSprite._rotation = PlayerVelY - PlayerVelX;
}
PowerBAR._height = PlayerForce;
if (PlayerForce >= 100) {
PowerBAR._height = 100;
}
if (ATTACK == true) {
TELEPORT = false;
PowerBAR._alpha = PowerBAR._alpha * 0.8;
}
if (CHARGE == true) {
ATTACK = false;
aura._rotation = AR;
if (PlayerVelY >= 0) {
AR = -(PlayerVelX * 4);
}
if ((PlayerVelY < 0) && (PlayerVelX != 0)) {
AR = -(PlayerVelX * 7);
}
if ((PlayerVelY < 0) && (PlayerVelX == 0)) {
AR = 180;
}
if (PlayerForce < PlayerStamina) {
if (INVINCIBLE == false) {
aura._alpha = aura._alpha + 5;
PlayerForce = PlayerForce + 5;
PlayerPower = PlayerPower - 1;
} else if (INVINCIBLE == true) {
aura._alpha = aura._alpha + 10;
PlayerForce = PlayerForce + 10;
PlayerPower = PlayerPower - 1;
}
}
} else {
aura._alpha = aura._alpha * 0.95;
}
if ((ATTACK == false) && (CHARGE == false)) {
PlayerForce = 0;
PlayerPower = 101;
}
if (((PlayerStamina < 100) && (DEAD == false)) && (INVINCIBLE == false)) {
PlayerStamina = PlayerStamina + StageLevel;
} else if (((PlayerStamina < 100) && (DEAD == false)) && (INVINCIBLE == true)) {
PlayerStamina = PlayerStamina + 10;
}
StaminaBar._height = PlayerStamina;
if (PlayerStamina < 0) {
PlayerStamina = 0;
}
if (BallTag == 1) {
BallEnergyHUD.EnergyHUD._x = (-BallEnergy) / 2;
}
if (BallTag == 2) {
BallEnergyHUD.EnergyHUD._x = BallEnergy / 2;
}
if (BallTag == 0) {
BallEnergyHUD.EnergyHUD._x = 0;
}
if (PlayerMaxCombo < PlayerCombo) {
PlayerMaxCombo = PlayerCombo;
}
if (PlayerMaxCombo >= 2) {
MAXcomboDisplay._visible = true;
} else {
MAXcomboDisplay._visible = false;
}
if (PlayerCombo >= 2) {
n = 0;
PlayerComboHUD = PlayerCombo;
combodisplay._alpha = 100;
combodisplay.gotoAndStop(1);
combodisplay2.textColor = 16777215 /* 0xFFFFFF */;
combodisplay2._visible = true;
} else {
n = n + 1;
combodisplay.gotoAndStop(2);
combodisplay2.textColor = 16711680 /* 0xFF0000 */;
if (n > 50) {
combodisplay2._visible = false;
combodisplay._alpha = combodisplay._alpha * 0.9;
}
}
if (PlayerHealthHUD._xscale > 0) {
PlayerHealthHUD._xscale = PlayerHealth / 2;
PlayerHealthHUD._yscale = PlayerHealthHUD._xscale;
}
if (PlayerHealth > 90) {
PlayerHealthHUD.gotoAndStop(1);
} else if ((PlayerHealth > 80) && (PlayerHealth <= 90)) {
PlayerHealthHUD.gotoAndStop(2);
} else if ((PlayerHealth > 70) && (PlayerHealth <= 80)) {
PlayerHealthHUD.gotoAndStop(3);
} else if ((PlayerHealth > 60) && (PlayerHealth <= 70)) {
PlayerHealthHUD.gotoAndStop(4);
} else if ((PlayerHealth > 50) && (PlayerHealth <= 60)) {
PlayerHealthHUD.gotoAndStop(5);
} else if ((PlayerHealth > 40) && (PlayerHealth <= 50)) {
PlayerHealthHUD.gotoAndStop(6);
} else if ((PlayerHealth > 30) && (PlayerHealth <= 40)) {
PlayerHealthHUD.gotoAndStop(7);
} else if ((PlayerHealth > 20) && (PlayerHealth <= 30)) {
PlayerHealthHUD.gotoAndStop(8);
} else if ((PlayerHealth > 10) && (PlayerHealth <= 20)) {
PlayerHealthHUD.gotoAndStop(9);
}
ItemTime = random(1000);
spriteINVINC._x = Player._x + 10;
spriteINVINC._y = Player._y - 10;
if (((ItemTime >= 998) && (pickupINVINCIBILITY._visible == false)) && (INVINCIBLE == false)) {
pickupINVINCIBILITY._visible = true;
pickupINVINCIBILITY._x = random(700) + 100;
pickupINVINCIBILITY._y = random(200) + 100;
}
if (INVINCIBLE == true) {
invincTime = invincTime + 1;
}
if (pickupINVINCIBILITY._visible == true) {
INV = INV + 1;
if (INV > 100) {
pickupINVINCIBILITY._visible = false;
INV = 0;
}
}
if (invincTime > 150) {
INVINCIBLE = false;
invincTime = 0;
spriteINVINC._visible = false;
}
if ((_local1.hitTest(pickupINVINCIBILITY) && (pickupINVINCIBILITY._visible == true)) && (HURT == false)) {
INVINCIBLE = true;
invincTime = 0;
INV = 0;
spriteINVINC._visible = true;
pickupINVINCIBILITY._visible = false;
InvincSound = new Sound();
InvincSound.attachSound("speedup");
InvincSound.start(1);
}
if ((Trainer.hitTest(pickupINVINCIBILITY) && (pickupINVINCIBILITY._visible == true)) && (HURT == false)) {
INVINCIBLE = true;
invincTime = 0;
INV = 0;
spriteINVINC._visible = true;
pickupINVINCIBILITY._visible = false;
InvincSound = new Sound();
InvincSound.attachSound("speedup");
InvincSound.start(1);
}
Item2Time = random(1000);
if ((Item2Time >= 998) && (pickupHEALTH._visible == false)) {
pickupHEALTH._visible = true;
pickupHEALTH._x = random(700) + 100;
pickupHEALTH._y = random(200) + 100;
}
if (pickupHEALTH._visible == true) {
HPT = HPT + 1;
if (HPT > 150) {
pickupHEALTH._visible = false;
HPT = 0;
}
}
if (((_local1.hitTest(pickupHEALTH) && (pickupHEALTH._visible == true)) && (HURT == false)) && (PlayerHealth < 100)) {
PlayerHealth = 100;
HPT = 0;
pickupHEALTH._visible = false;
ReplenishSound = new Sound();
ReplenishSound.attachSound("HealthSound");
ReplenishSound.start();
}
if (((Trainer.hitTest(pickupHEALTH) && (pickupHEALTH._visible == true)) && (HURT == false)) && (PlayerHealth < 100)) {
PlayerHealth = 100;
HPT = 0;
pickupHEALTH._visible = false;
ReplenishSound = new Sound();
ReplenishSound.attachSound("HealthSound");
ReplenishSound.start();
}
if ((PlayerVelX >= 1) || (PlayerVelX <= -1)) {
PlayerRestX = false;
}
if ((PlayerVelY >= 1) || (PlayerVelY <= -1)) {
PlayerRestY = false;
}
if ((PlayerRestX == true) && (PlayerRestY == true)) {
PlayerRest = true;
} else {
PlayerRest = false;
}
if ((PlayerRestY == false) && (EnemyDEAD == false)) {
if ((PlayerVelY < 80) && (!Player.hitTest(ground))) {
PlayerVelY = PlayerVelY + PlayerWeight;
}
}
if ((PlayerRestX == false) && (EnemyDEAD == false)) {
if (PlayerVelX != 0) {
PlayerVelX = PlayerVelX * 0.9;
}
if ((PlayerVelX < 1) && (PlayerVelX > -1)) {
PlayerVelX = 0;
PlayerRestX = true;
}
}
if (Player.hitTest(ground)) {
if (PlayerVelY > 0) {
PlayerVelY = 0;
_local1._y = 310;
PlayerRestY = true;
}
if (HURTback == true) {
_local1.gotoAndPlay("HITground");
} else if (HURTfront == true) {
_local1.gotoAndPlay("HITground2");
}
if (ATTACK == true) {
PlayerVelX = 0;
TELEPORT = false;
PowerBAR._alpha = PowerBAR._alpha * 0.8;
}
}
if (Player.hitTest(wallRIGHT) && (PlayerVelX > 1)) {
Player._x = Player._x - 1;
PlayerVelX = PlayerVelX * -0.5;
if (HURTfront == true) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
HURTfront = false;
} else if (HURTback == true) {
_local1.gotoAndPlay("HURTfront");
HURTback = false;
HURTfront = true;
}
}
if (Player.hitTest(wallMIDDLE) && (PlayerVelX > 1)) {
Player._x = Player._x - 1;
PlayerVelX = PlayerVelX * -0.5;
}
if (Player.hitTest(wallLEFT) && (PlayerVelX < 0)) {
Player._x = Player._x + 1;
PlayerVelX = PlayerVelX * -0.5;
if (HURTfront == true) {
_local1.gotoAndPlay(206);
HURTback = true;
HURTfront = false;
WallImpactSound = new Sound();
WallImpactSound.attachSound("wallIMPACT");
WallImpactSound.start();
} else if (HURTback == true) {
_local1.gotoAndPlay(239);
HURTback = false;
HURTfront = true;
}
}
if (Player.hitTest(wallTOP) && (PlayerVelY < 1)) {
Player._y = Player._y + 1;
PlayerVelY = PlayerVelY * -0.5;
}
if ((((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (Key.isDown(87))) && (!Key.isDown(65))) && (!Key.isDown(68))) {
if ((ATTACK == false) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYup");
}
if (_local1.hitTest(ground)) {
PlayerVelY = -5;
}
if ((_local1._y > wallTOP._y) && (PlayerVelY > -3)) {
PlayerVelY = PlayerVelY - 1.1;
}
}
if (((((!_local1.hitTest(ground)) && (HURT == false)) && (DEAD == false)) && (Key.isDown(83))) && (EnemyDEAD == false)) {
PlayerVelY = PlayerVelY + 1.5;
}
if (((((((((!_local1.hitTest(ground)) && (HURT == false)) && (DEAD == false)) && (ATTACK == false)) && (TELEPORT == false)) && (Key.isDown(83))) && (!Key.isDown(65))) && (!Key.isDown(68))) && (EnemyDEAD == false)) {
_local1.gotoAndPlay("FLYdown");
}
if ((((HURT == false) && (DEAD == false)) && (_local1._x < target._x)) && (EnemyDEAD == false)) {
if (Key.isDown(87)) {
PlayerVelY = PlayerVelY - 2;
}
if ((Key.isDown(65) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -20)) {
PlayerVelX = PlayerVelX - 5;
}
if ((Key.isDown(65) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if ((Key.isDown(68) && (_local1._x < 800)) && (PlayerVelX < 20)) {
PlayerVelX = PlayerVelX + 5;
}
if ((Key.isDown(68) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
} else if ((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (_local1._x != target._x)) {
if (Key.isDown(87)) {
PlayerVelY = PlayerVelY - 2;
}
if ((Key.isDown(65) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -20)) {
PlayerVelX = PlayerVelX - 5;
}
if ((Key.isDown(65) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
if ((Key.isDown(68) && (_local1._x < 800)) && (PlayerVelX < 20)) {
PlayerVelX = PlayerVelX + 5;
}
if ((Key.isDown(68) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
}
if ((((((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (!Key.isDown(68))) && (!Key.isDown(65))) && (!Key.isDown(87))) && (ATTACK == false)) && (TELEPORT == false)) {
NEUTRAL = true;
if ((!_local1.hitTest(ground)) && (!Key.isDown(83))) {
_local1.gotoAndPlay("FALL");
Player.onEnterFrame = enginePLAYER;
} else if (_local1.hitTest(ground)) {
_local1.gotoAndPlay("IDLE");
PlayerVelX = PlayerVelX * 0.7;
}
} else {
NEUTRAL = false;
}
if (((((_local1.HITBOX.hitTest(Ball) && (BallTag > 1)) && (ATTACK == false)) && (HURT == false)) && (BallEnergy >= 30)) && (INVINCIBLE == false)) {
HURT = true;
CHARGE = false;
aura._alpha = 0;
PlayerForce = 0;
target._visible = false;
PlayerCombo = 0;
PlayerHealth = PlayerHealth - (BallEnergy / BallType);
PlayerVelX = PlayerVelX + (BallVelX / 2);
PlayerVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ChargeSound.stop("ChargePush");
ImpactSound = new Sound();
ImpactSound.attachSound("impactHURT");
PainSound = new Sound();
PainSound.attachSound("painHURT");
if ((PlayerFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if ((BallVelX == 0) && (BallVelY < 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
} else if ((BallVelX == 0) && (BallVelY > 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
}
if ((PlayerHealth < 1) && (DEAD == false)) {
GAMEOVER._visible = true;
GAMEOVER.play();
PlayerHealthHUD._visible = false;
DEAD = true;
Bar._visible = false;
BallEnergyHUD._visible = false;
Mouse.show();
}
if (_local1.AttackBox.hitTest(Ball)) {
BallTag = 1;
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 5;
}
HIT = true;
}
if ((ATTACK == true) && (PlayerForce >= 25)) {
z = PlayerForce / 300;
xmov = Xdist * z;
ymov = Ydist * z;
BallVelX = BallVelX + xmov;
BallVelY = BallVelY + ymov;
ChargeRate = 3 * Difficulty;
BallEnergy = BallEnergy + ((PlayerForce / ChargeRate) * (PlayerCombo + 1));
Ball._xscale = Ball._xscale + (PlayerForce / 10);
Ball._yscale = Ball._yscale + (PlayerForce / 10);
}
if ((ATTACK == true) && (PlayerForce < 25)) {
z = PlayerForce / 100;
xmov = Xdist * z;
ymov = Ydist * z;
BallVelX = xmov;
BallVelY = ymov;
BallEnergy = BallEnergy + (PlayerForce / 5);
Ball._xscale = Ball._xscale + (PlayerForce / 10);
Ball._yscale = Ball._yscale + (PlayerForce / 10);
}
}
if (_local1.SHIELD.hitTest(Ball)) {
PlayerCombo = 0;
PlayerScore = PlayerScore + (PlayerStamina / StageLevel);
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
if (hyp <= 70) {
meleeflash.gotoAndPlay("STALL");
} else if ((hyp <= 140) && (hyp > 70)) {
meleeflash.gotoAndPlay("KICK");
} else if ((hyp <= 210) && (hyp > 140)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (hyp > 210) {
meleeflash.gotoAndPlay("POWER");
}
if ((ATTACK == true) && (hyp >= 70)) {
xmov = Xdist / 7;
ymov = Ydist / 7;
BallVelX = xmov;
BallVelY = ymov;
BallEnergy = BallEnergy - (hyp / 7);
if (Ball._xscale > BallSize) {
Ball._xscale = Ball._xscale - (hyp / 30);
Ball._yscale = Ball._yscale - (hyp / 30);
}
}
}
if (_local1.SHIELD.hitTest(Trainer)) {
TrainerATTACK = true;
}
if ((_local1.AttackBox.hitTest(Enemy) && (PlayerForce > 25)) && (EnemyHURT == true)) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
meleeflash._visible = true;
meleeflash._x = AttackBox._x;
meleeflash._y = AttackBox._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 10;
}
HIT = true;
}
EnemyHURT = true;
EnemyHealth = EnemyHealth - (PlayerForce / 10);
xmov = Xdist / 7;
ymov = Ydist / 7;
EnemyVelX = xmov;
EnemyVelY = ymov;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
}
if ((((HURT == false) && (DEAD == false)) && (ATTACK == false)) && (EnemyDEAD == false)) {
startDrag ("/target", true);
Mouse.hide();
target._visible = true;
target._alpha = 100;
} else {
stopDrag();
Mouse.show();
target._alpha = 10;
}
if (PlayerForce <= 25) {
target.GotoAndStop("SOFT");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
target.GotoAndStop("MEDIUM");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
target.GotoAndStop("HARD");
}
if (PlayerForce >= 100) {
target.GotoAndStop("POWER");
}
Player._x = Player._x + PlayerVelX;
Player._y = Player._y + PlayerVelY;
if ((((_local1._x > target._x) && (HURT == false)) && (ATTACK == false)) && (DEAD == false)) {
_local1._xscale = -100;
PlayerFacingL = true;
PlayerFacingR = false;
} else if ((((_local1._x < target._x) && (HURT == false)) && (ATTACK == false)) && (DEAD == false)) {
_local1._xscale = 100;
PlayerFacingR = true;
PlayerFacingL = false;
}
PlayerShadow._x = Player._x;
PlayerShadow._xscale = Player._y / 2;
if (StageLevel == 1) {
Rank = "Noob";
} else if (StageLevel == 2) {
Rank = "Initiate";
} else if (StageLevel == 3) {
Rank = "Goon";
} else if (StageLevel == 4) {
Rank = "Thug";
} else if (StageLevel == 5) {
Rank = "Novice";
} else if (StageLevel == 6) {
Rank = "Average";
} else if (StageLevel == 7) {
Rank = "Adept";
} else if (StageLevel == 8) {
Rank = "Warrior";
} else if (StageLevel == 9) {
Rank = "Solid";
} else if (StageLevel == 10) {
Rank = "Liquid";
} else if (StageLevel == 11) {
Rank = "Professional";
} else if (StageLevel == 12) {
Rank = "Prodigy";
} else if (StageLevel == 13) {
Rank = "Monk";
} else if (StageLevel == 14) {
Rank = "Tengu";
} else if (StageLevel == 15) {
Rank = "Jedi";
} else if (StageLevel == 16) {
Rank = "Neo";
} else if (StageLevel == 17) {
Rank = "Dragon";
} else if (StageLevel == 18) {
Rank = "Master";
} else if (StageLevel == 19) {
Rank = "Saiyan";
} else if (StageLevel == 20) {
Rank = "Grand Master";
} else if (StageLevel == 21) {
Rank = "Super Saiyan";
} else if (StageLevel == 22) {
Rank = "Majin";
} else if (StageLevel == 23) {
Rank = "Otaku";
} else if (StageLevel == 24) {
Rank = "Akira";
} else if (StageLevel == 25) {
Rank = "Deity";
} else if (StageLevel == 26) {
Rank = "KYnetiK";
} else if (StageLevel >= 27) {
Rank = "Wastoid";
}
}
function enginePOWER() {
if ((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (PlayerForce <= PlayerEnergy)) {
CHARGE = true;
PowerBAR._alpha = 100;
PlayerForce = 0;
ChargeSound = new Sound();
ChargeSound.attachSound("ChargePush");
ChargeSound.start(1);
}
}
function engineATTACK() {
if ((((HURT == false) && (DEAD == false)) && (ATTACK == false)) && (EnemyDEAD == false)) {
ATTACK = true;
CHARGE = false;
PlayerStamina = PlayerStamina - PlayerForce;
aura._alpha = aura._alpha * 0.4;
ChargeSound.stop("ChargePush");
if (target._y <= Player._y) {
if (PlayerForce <= 25) {
Player.GotoAndPlay("hitUP1");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
Player.GotoAndPlay("hitUP2");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
Player.GotoAndPlay("hitUP3");
}
if (PlayerForce >= 100) {
Player.GotoAndPlay("hitUP4");
}
}
if (target._y > Player._y) {
if (PlayerForce <= 25) {
Player.GotoAndPlay("hitDOWN1");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
Player.GotoAndPlay("hitDOWN2");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
Player.GotoAndPlay("hitDOWN3");
}
if (PlayerForce >= 100) {
Player.GotoAndPlay("hitDOWN4");
}
}
}
}
function engineDEFEND() {
if ((((ATTACK == false) && (HURT == false)) && (DEAD == false)) && (EnemyDEAD == false)) {
if (Key.getCode() == 32) {
Player.gotoAndPlay("SHIELD");
ATTACK = true;
PlayerStamina = PlayerStamina / (StageLevel + 27);
}
if (Key.getCode() == 16) {
Player.gotoAndPlay("TELEPORT");
TeleportSprite.gotoAndPlay("2");
TELEPORT = true;
PlayerStamina = PlayerStamina / (StageLevel + 27);
PlayerScore = PlayerScore + (PlayerStamina * StageLevel);
TeleportSound = new Sound();
TeleportSound.attachSound("SuperSpeed");
TeleportSound.start();
}
}
}
function engineTRAINER() {
var _local1 = this;
TrainerAccel = random(5) + 20;
TrainerBallDistX = (Player._x - _local1._x) - 20;
TrainerBallDistY = (Player._y - _local1._y) - 20;
TrainerMovX = TrainerBallDistX / TrainerAccel;
TrainerMovY = TrainerBallDistY / TrainerAccel;
if ((ATTACK == false) && (TrainerORBIT == false)) {
TrainerVelX = TrainerMovX;
TrainerVelY = TrainerMovY;
_local1._rotation = 0;
R = 0;
}
if ((TrainerATTACK == false) && (DEAD == false)) {
_local1._x = _local1._x + TrainerVelX;
_local1._y = _local1._y + TrainerVelY;
TrainerNEUTRAL = true;
_local1._rotation = _local1._rotation + R;
} else {
TrainerNEUTRAL == false;
}
if (TrainerATTACK == false) {
if (_local1._x > Player._x) {
_local1._xscale = 40;
} else if (_local1._x < Player._x) {
_local1._xscale = -40;
}
}
if (_local1.hitTest(ground) && (TrainerVelY > 0)) {
TrainerVelY = TrainerVelY * -1;
R = R * -1;
}
if (_local1.hitTest(wallRIGHT) && (TrainerVelX > 0)) {
_local1._x = _local1._x - 1;
R = R * -1;
TrainerVelX = -TrainerVelX;
}
if (_local1.hitTest(wallLEFT) && (TrainerVelX < 0)) {
_local1._x = _local1._x + 1;
TrainerVelX = TrainerVelX * -1;
R = R * -1;
}
if (_local1.hitTest(wallTOP) && (TrainerVelY < 0)) {
_local1._y = _local1._y + 1;
TrainerVelY = TrainerVelY * -1;
R = R * -1;
}
if (_local1.hitTest(Player.AttackBox) && (ATTACK == true)) {
TrainerORBIT = true;
R = R + PlayerForce;
Xdist = target._x - Player._x;
Ydist = target._y - Player._y;
xmov = Xdist / 7;
ymov = Ydist / 7;
TrainerVelX = TrainerVelX + xmov;
TrainerVelY = TrainerVelY + ymov;
}
if (TrainerORBIT == true) {
TrainerVelX = TrainerVelX * 0.95;
TrainerVelY = TrainerVelY * 0.95;
if ((((TrainerVelX < 1) && (TrainerVelX > -1)) && (TrainerVelY < 1)) && (TrainerVelY > -1)) {
TrainerORBIT = false;
}
}
if (((_local1.hitTest(Ball) && (DEAD == false)) && (EnemyDEAD == false)) && (TrainerATTACK == false)) {
ReflectSound = new Sound();
ReflectSound.attachSound("reflect");
ReflectSound.start();
TrainerChoice = random(101);
TrainerORBIT = false;
BallTag = 1;
PlayerCombo = PlayerCombo + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("POWER");
TrainerPower = random(5) + 10;
_local1.gotoAndPlay("ATTACK2");
TrainerATTACK = true;
TrainerPlayerDistX = Player._x - _local1._x;
TrainerForceX = TrainerPlayerDistX / TrainerPower;
TrainerForceY = -TrainerPower;
BallVelX = TrainerForceX;
BallVelY = BallVelY + TrainerForceY;
}
}
function engineENEMY() {
var _local1 = this;
EnemyAccel = (random(7) + 20) / StageLevel;
EnemyBallDistX = Ball._x - _local1._x;
EnemyBallDistY = Ball._y - _local1._y;
EnemyMovX = EnemyBallDistX / EnemyAccel;
EnemyMovY = EnemyBallDistY / EnemyAccel;
EnemyBallDistX2 = random(5) + 1;
EnemyBallDistY2 = random(5) + 1;
EnemyMovX2 = EnemyBallDistX2 - random(7);
EnemyMovY2 = EnemyBallDistY2 - random(7);
if (((EnemyHURT == false) && (EnemyATTACK == false)) && (DEAD == false)) {
_local1._x = _local1._x + EnemyMovX;
_local1._y = _local1._y + EnemyMovY;
}
if (EnemyHURT == true) {
_local1._x = _local1._x + EnemyVelX;
_local1._y = _local1._y + EnemyVelY;
}
if (EnemyHURT == true) {
if (!_local1.hitTest(ground)) {
EnemyVelY = EnemyVelY + 1;
EnemyVelX = EnemyVelX * 0.95;
EnemyMovY = EnemyMovY + PlayerMass;
EnemyMovX = EnemyMovX * 0.95;
}
}
if (EnemyHURT == true) {
EnemyATTACK == false;
}
if (((Enemy.hitTest(Ball) && (BallEnergy >= 30)) && (BallTag == 1)) && (EnemyHURT == true)) {
EnemyHURT = true;
PlayerCombo = PlayerCombo + 1;
EnemyHealth = EnemyHealth - (BallEnergy / 3);
EnemyVelX = BallVelX / 2;
EnemyVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
}
if (((EnemyHURT == false) && (DEAD == false)) && (EnemyDEAD == false)) {
if (((((EnemyMovY < 0) && (EnemyMovX >= -1)) && (EnemyMovX <= 1)) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYup");
}
}
if (((((((((!_local1.hitTest(ground)) && (EnemyMovX >= -1)) && (EnemyMovX <= 1)) && (EnemyMovY > 0)) && (EnemyHURT == false)) && (DEAD == false)) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) && (EnemyDEAD == false)) {
_local1.gotoAndPlay("FALL");
}
if ((((EnemyHURT == false) && (DEAD == false)) && (_local1._x < Player._x)) && (EnemyDEAD == false)) {
if (((EnemyMovX < -1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if (((EnemyMovX > 1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
} else if ((((EnemyHURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (_local1._x > Player._x)) {
if (((EnemyMovX > 1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if (((EnemyMovX < -1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
}
EnemyShadow._x = Enemy._x;
EnemyShadow._xscale = Enemy._y / 2;
if ((EnemyATTACK == false) && (EnemyHURT == false)) {
if (_local1._x > Player._x) {
_local1._xscale = 90;
EnemyFacingL = true;
EnemyFacingR = false;
} else if (_local1._x < Player._x) {
_local1._xscale = -90;
EnemyFacingR = true;
EnemyFacingL = false;
}
}
if (DEAD == false) {
if (_local1.hitTest(ground)) {
if ((EnemyHURT == false) && (EnemyMovY > 0)) {
_local1._y = 310;
}
if ((EnemyHURT == true) && (EnemyVelY > 0)) {
_local1._y = 310;
}
if (EnemyHURTback == true) {
_local1.gotoAndPlay("HITground");
EnemyVelX = 0;
} else if (EnemyHURTfront == true) {
_local1.gotoAndPlay("HITground2");
EnemyVelX = 0;
}
}
if (_local1.hitTest(wallRIGHT)) {
Enemy._x = Enemy._x - 1;
EnemyVelX = EnemyVelX * -0.5;
if (EnemyHURTfront == true) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
EnemyHURTfront = false;
} else if (EnemyHURTback == true) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTback = false;
EnemyHURTfront = true;
}
}
if (_local1.hitTest(wallLEFT)) {
Enemy._x = Enemy._x + 1;
EnemyVelX = EnemyVelX * -0.5;
if (EnemyHURTfront == true) {
_local1.gotoAndPlay(206);
EnemyHURTback = true;
EnemyHURTfront = false;
WallImpactSound = new Sound();
WallImpactSound.attachSound("wallIMPACT");
WallImpactSound.start();
} else if (EnemyHURTback == true) {
_local1.gotoAndPlay(239);
EnemyHURTback = false;
EnemyHURTfront = true;
}
}
if (_local1.hitTest(wallTOP) && (EnemyVelY < 1)) {
Enemy._y = Enemy._y + 1;
EnemyVelY = EnemyVelY * -0.5;
}
}
EnemyHealthBall._xscale = EnemyHealth / 2;
EnemyHealthBall._yscale = EnemyHealthBall._xscale;
if (((_local1.HITBOX.hitTest(Ball) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (EnemyDEAD == false)) {
EnemyChoice = random(101);
if (EnemyChoice >= 30) {
PlayerCombo = 0;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("POWER");
DoICombo = random(101);
if (DoICombo <= 30) {
if (Player._y <= Enemy._y) {
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitUP1");
}
if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitUP2");
}
if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitUP3");
}
if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitUP4");
}
}
if (Player._y > Enemy._y) {
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitDOWN1");
}
if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitDOWN2");
}
if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitDOWN3");
}
if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitDOWN4");
}
}
BallTag = 2;
EnemyPower = random(5) + 20;
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Player._x - _local1._x;
EnemyPlayerDistY = Player._y - _local1._y;
EnemyForceX = EnemyPlayerDistX / (Difficulty * 5);
EnemyForceY = EnemyPlayerDistY / (Difficulty * 5);
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
Ball._xscale = Ball._xscale + (EnemyPower / 3);
Ball._yscale = Ball._yscale + (EnemyPower / 3);
} else if (DoICombo > 30) {
BallTag = 2;
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitUP4");
}
if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitUP3");
}
if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitUP2");
}
if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitUP1");
}
EnemyPower = random(10) + 10;
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Enemy._x - Ball._x;
EnemyForceX = EnemyPlayerDistX / EnemyPower;
EnemyForceY = -EnemyPower;
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
}
} else if (((BallEnergy >= 30) && (BallTag == 1)) && (EnemyChoice < 30)) {
EnemyHURT = true;
PlayerCombo = PlayerCombo + 1;
EnemyHealth = EnemyHealth - (BallEnergy / 3);
EnemyVelX = BallVelX / 2;
EnemyVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
}
}
if ((EnemyHealth < 1) && (EnemyDEAD == false)) {
EnemyDEAD = true;
EnemyHealthBall._alpha = 0;
Mouse.show();
PlayerScore = PlayerScore + (1000 * StageLevel);
Player.gotoAndPlay("I WIN");
GAMEOVER2._visible = true;
}
if (((_local1.HITBOX2.hitTest(Ball) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (EnemyDEAD == false)) {
EnemyChoice = random(101);
if (EnemyChoice >= 0) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("POWER");
HIT = true;
}
DoICombo = random(101);
if (DoICombo < 50) {
BallTag = 2;
EnemyPower = random(10) + 20;
_local1.gotoAndPlay("ATTACK3");
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Player._x - Ball._x;
EnemyPlayerDistY = Player._y - Ball._y;
EnemyForceX = EnemyPlayerDistX / (Difficulty * 5);
EnemyForceY = EnemyPlayerDistY / (Difficulty * 3);
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
Ball._xscale = Ball._xscale + (EnemyPower / 3);
Ball._yscale = Ball._yscale + (EnemyPower / 3);
} else if (DoICombo >= 50) {
BallTag = 2;
EnemyPower = random(10) + 20;
_local1.gotoAndPlay("ATTACK3");
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Enemy._x - Ball._x;
EnemyForceX = EnemyPlayerDistX / EnemyPower;
EnemyForceY = -EnemyPower;
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
Ball._xscale = Ball._xscale + (EnemyPower / 3);
Ball._yscale = Ball._yscale + (EnemyPower / 3);
}
}
}
}
PlayerScore = 0;
StageLevel = 1;
PlayerMass = 5;
Ball._xscale = 30;
Ball._yscale = 30;
BallVelX = 50;
BallVelY = -10;
PlayerCombo = 0;
PlayerMaxCombo = 0;
if (BallType == 3) {
BallMass = 0.5;
} else if (BallType == 2) {
BallMass = 1;
} else if (BallType == 1) {
BallMass = 1.5;
}
BallSize = Ball._xscale;
init();
stop();
Instance of Symbol 557 MovieClip "Ball" in Frame 206
onClipEvent (enterFrame) {
}
Instance of Symbol 1198 MovieClip "Player" in Frame 206
/* no clip actions */
Instance of Symbol 1898 MovieClip "Enemy" in Frame 206
/* no clip actions */
Frame 244
PracticeMusic = new Sound();
PracticeMusic.attachSound("PracticeBGM");
PracticeMusic.start(0, 999);
Frame 245
function init() {
Stage.showMenu = false;
Stage.scaleMode = "showAll";
Mouse.hide();
frictionAirX = 0.99;
frictionAirY = 0.8;
gravity = 1;
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
ServeDistX = target._x - Ball._x;
ServeMovX = ServeDistX / 7;
ServeDistY = target._y - Ball._y;
ServeMovY = ServeDistY / 7;
BallWeight = BallMass * gravity;
BallAccel = BallForce / BallMass;
BallRestX = false;
BallRestY = false;
BallRest = false;
BallEnergy = 30;
BallTag = 1;
meleeflash._visible = false;
WINCOUNT = 0;
LOSECOUNT = 0;
PlayerMass = 1;
PlayerVelX = 0;
PlayerVelY = 0;
PlayerForce = 0;
PlayerWeight = PlayerMass * gravity;
PlayerRestX = true;
PlayerRestY = true;
PlayerRest = true;
PlayerHealth = 100;
PlayerStamina = 100;
PlayerPower = 100;
TechMode = 0;
ATTACK = false;
HURT = false;
HURTfront = false;
HURTback = false;
DEAD = false;
NEUTRAL = true;
CHARGE = false;
TELEPORT = false;
INVINCIBLE = false;
Kame = false;
KameHame = false;
Spiritball = false;
PlayerFacingL = false;
PlayerFacingR = true;
aura._alpha = 0;
spriteINVINC._visible = false;
EnemyVelX = 0;
EnemyVelY = 0;
EnemyPower = 0;
EnemyMass = 1;
EnemyWeight = EnemyMass * gravity;
EnemyHealth = 100;
EnemyRestX = true;
EnemyRestY = true;
EnemyATTACK = false;
EnemyDEAD = false;
EnemyNEUTRAL = true;
EnemyCHARGE = false;
EnemyTELEPORT = false;
EnemyFacingL = true;
EnemyFacingR = false;
TrainerATTACK = false;
TrainerNEUTRAL = true;
TrainerATTACK2 = false;
TrainerNEUTRAL2 = true;
TrainerORBIT = false;
PlayerHealthHUD._visible = true;
BallEnergyHUD._visible = true;
EnemyHealthBall._alpha = 100;
combodisplay._alpha = 0;
combodisplay2._visible = false;
GAMEOVER._visible = false;
GAMEOVER2._visible = false;
pickupHEALTH._visible = false;
pickupINVINCIBILITY._visible = false;
INV = 0;
HPT = 0;
MusicSound = new Sound();
MusicSound.attachSound("bgmusic");
MusicSound.start(0, 9999);
BallEnergyHUD.onEnterFrame = engineENERGY();
Ball.onEnterFrame = engineBALL;
Trainer.onEnterFrame = engineTRAINER;
Player.onEnterFrame = enginePLAYER;
Player.onMouseDown = enginePOWER;
Player.onMouseUp = engineATTACK;
DefendListener.onKeyUp = engineDEFEND;
Enemy.onEnterFrame = engineENEMY;
}
function engineBALL() {
var _local1 = this;
BallWeight = BallMass * gravity;
BallEnergy2 = Math.round(BallEnergy);
if (Spiritball == false) {
if ((BallVelX >= 1) or (BallVelX <= -1)) {
BallRestX = false;
} else {
BallRestX = true;
}
if ((BallVelY >= 1) or (BallVelY <= -1)) {
BallRestY = false;
} else {
BallRestY = true;
}
if ((BallRestX == true) && (BallRestY == true)) {
BallRest = true;
} else {
BallRest = false;
}
}
if (BallEnergy > 0) {
BallEnergy = BallEnergy - 0.1;
}
if (BallEnergy > 100) {
BallEnergy = 100;
}
if (BallEnergy < 0) {
BallEnergy = 0;
}
if (Ball._xscale > BallSize) {
Ball._xscale = Ball._xscale - 0.1;
Ball._yscale = Ball._yscale - 0.1;
}
if (!_local1.hitTest(ground)) {
if (((BallVelY < 20) && (Spiritball == false)) && (!_local1.hitTest(ground))) {
BallVelY = BallVelY + BallWeight;
}
}
if ((BallRestX == false) && (Spiritball == false)) {
if (BallVelX != 0) {
BallVelX = BallVelX * frictionAirX;
}
if ((BallVelX < 1) && (BallVelX > -1)) {
BallVelX = 0;
BallRestX = true;
}
}
_local1._rotation = _local1._rotation + (BallVelX * 4);
if (_local1.hitTest(ground)) {
BallEnergy = BallEnergy * 0.95;
}
if (_local1.hitTest(ground) && (BallVelY > 0)) {
if (EnemyHURT == false) {
PlayerCombo = 0;
}
if (EnemyHURT == true) {
PlayerCombo = PlayerCombo - 1;
}
if (BallVelY >= 5) {
BallVelY = BallVelY * -0.75;
} else if (BallVelY < 5) {
BallVelY = -(Math.round(BallVelY) * 0.3);
}
if ((BallVelY < 1) && (BallVelY >= 0)) {
BallVelY = 0;
BallRestY = true;
}
}
if ((_local1.hitTest(ground) && (BallVelY > -1)) && (BallVelY < 0)) {
BallVelY = 0;
BallRestY = true;
}
if (_local1.hitTest(wallRIGHT) && (BallVelX > 0)) {
_local1._x = _local1._x - 1;
BallVelX = -BallVelX;
}
if (_local1.hitTest(wallLEFT) && (BallVelX < 0)) {
_local1._x = _local1._x + 1;
BallVelX = BallVelX * -1;
}
if (_local1.hitTest(wallTOP) && (BallVelY < 0)) {
_local1._y = _local1._y + 1;
BallVelY = BallVelY * -1;
}
if (BallVelX > 50) {
BallVelX = 49;
}
if (BallVelX < -50) {
BallVelX = -49;
}
if (BallVelY > 50) {
BallVelY = 49;
}
if (BallVelY < -50) {
BallVelY = -49;
}
_local1._x = _local1._x + BallVelX;
_local1._y = _local1._y + BallVelY;
BallShadow._x = _local1._x;
BallShadow._xscale = _local1._width + (_local1._y / 3);
if (Spiritball == true) {
SballDistX = target._x - _local1._x;
SballDistY = target._y - _local1._y;
BallVelX = BallVelX + (SballDistX / 30);
BallVelY = BallVelY + (SballDistY / 30);
}
if ((Spiritball == true) && (_local1.hitTest(target))) {
SballDistX = target._x - _local1._x;
SballDistY = target._y - _local1._y;
BallVelX = BallVelX * -0.5;
BallVelY = BallVelY * -0.5;
BallTag = 1;
BallEnergy = BallEnergy + 20;
}
if (_local1.hitTest(Player.BEAhitbox)) {
BallEnergy = BallEnergy + 50;
BallTag = 1;
BallVelX = BallVelX + (Xdist / 10);
BallVelY = BallVelY + (Ydist / 10);
}
if (BallEnergy < 2) {
_local1.GotoAndStop("NORMAL");
}
if (BallTag == 1) {
if ((BallEnergy < 30) && (BallEnergy >= 2)) {
_local1.GotoAndStop("WARM1");
}
if ((BallEnergy < 90) && (BallEnergy >= 30)) {
_local1.GotoAndStop("HOT1");
}
if (BallEnergy >= 90) {
_local1.GotoAndStop("CHARGED1");
}
} else if (BallTag == 2) {
if ((BallEnergy < 30) && (BallEnergy >= 2)) {
_local1.GotoAndStop("WARM2");
}
if ((BallEnergy < 90) && (BallEnergy >= 30)) {
_local1.GotoAndStop("HOT2");
}
if (BallEnergy >= 90) {
_local1.GotoAndStop("CHARGED2");
}
}
}
function enginePLAYER() {
var _local1 = this;
PlayerWeight = PlayerMass * gravity;
Xdist = _xmouse - Player._x;
Ydist = _ymouse - Player._y;
pi = 57.2957795130823;
angle = Math.atan2(Ydist, Xdist);
hyp = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
Sniperline._x = _local1._x;
Sniperline._y = _local1._y;
Sniperline._xscale = hyp;
Sniperline._alpha = (hyp / 700) * 100;
Sniperline._rotation = angle * pi;
if ((_local1.HITBOX.hitTest(Trainer) && (TechMode == 1)) && (TrainerORBIT == false)) {
}
if ((_local1.HITBOX.hitTest(Trainer) && (Trainer._visible == true)) && (TrainerORBIT == false)) {
_local1.gotoAndPlay("Catch");
ATTACK = true;
Trainer._visible = false;
}
if (Trainer._visible == false) {
Trainer._x = _local1._x;
Trainer._y = _local1._y;
}
if (TechMode == 0) {
TechLogo.gotoAndStop("Shield");
TechLogo._alpha = 100;
CurrentTech = "Shield";
}
if (TechMode == 1) {
TechLogo.gotoAndStop("ForceBlade");
TechLogo._alpha = 100;
CurrentTech = "Force Blade";
} else {
Trainer._visible = false;
}
if (TechMode == 2) {
if (PlayerCombo >= 5) {
TechLogo.gotoAndStop("Spiritball");
CurrentTech = "Spiritball";
TechLogo._alpha = 100;
} else {
TechLogo.gotoAndStop("Spiritball");
TechLogo._alpha = 50;
CurrentTech = "Spiritball (Combo 5)";
}
}
if (TechMode == 3) {
if (PlayerCombo >= 10) {
TechLogo.gotoAndStop("Superbeam");
TechLogo._alpha = 100;
CurrentTech = "Super Beam";
} else {
TechLogo.gotoAndStop("Superbeam");
TechLogo._alpha = 50;
CurrentTech = "Super Beam (Combo 10)";
}
}
if (((Kame == true) && (KameHame == false)) && (PlayerFacingL == true)) {
_local1._rotation = (angle * pi) + 180;
} else if (((Kame == true) && (KameHame == false)) && (PlayerFacingR == true)) {
_local1._rotation = angle * pi;
} else if (Kame == false) {
_local1._rotation = DefaultPlayerRot;
}
if ((Spiritball == true) && (PlayerFacingL == true)) {
_local1.arm._rotation = ((-angle) * pi) + 180;
} else if ((Spiritball == true) && (PlayerFacingR == true)) {
_local1.arm._rotation = angle * pi;
}
PlayerScore = Math.round(PlayerScore);
PlayerHealth = Math.round(PlayerHealth);
aura._x = _local1._x;
aura._y = _local1._y;
aura._alpha = aura._alpha * 0.99;
TeleportSprite._x = _local1._x;
TeleportSprite._y = _local1._y;
if ((PlayerVelY != 0) && (PlayerVelX == 0)) {
TeleportSprite._rotation = 90;
} else if (PlayerVelY == 0) {
TeleportSprite._rotation = 0;
} else if ((PlayerVelY > 0) && (PlayerVelX != 0)) {
TeleportSprite._rotation = PlayerVelY + PlayerVelX;
} else if ((PlayerVelY < 0) && (PlayerVelX != 0)) {
TeleportSprite._rotation = PlayerVelY - PlayerVelX;
}
PowerBAR._height = PlayerForce;
if (PlayerForce >= 100) {
PowerBAR._height = 100;
}
if (ATTACK == true) {
TELEPORT = false;
PowerBAR._alpha = PowerBAR._alpha * 0.8;
}
if (CHARGE == true) {
ATTACK = false;
aura._rotation = AR;
if (PlayerVelY >= 0) {
AR = -(PlayerVelX * 4);
}
if ((PlayerVelY < 0) && (PlayerVelX != 0)) {
AR = -(PlayerVelX * 7);
}
if ((PlayerVelY < 0) && (PlayerVelX == 0)) {
AR = 180;
}
if (PlayerForce < PlayerStamina) {
if (INVINCIBLE == false) {
aura._alpha = aura._alpha + 5;
PlayerForce = PlayerForce + 5;
PlayerPower = PlayerPower - 1;
} else if (INVINCIBLE == true) {
aura._alpha = aura._alpha + 10;
PlayerForce = PlayerForce + 10;
PlayerPower = PlayerPower - 1;
}
}
} else {
aura._alpha = aura._alpha * 0.95;
}
if ((ATTACK == false) && (CHARGE == false)) {
PlayerForce = 0;
PlayerPower = 101;
}
if (((PlayerStamina < 100) && (DEAD == false)) && (INVINCIBLE == false)) {
PlayerStamina = PlayerStamina + StageLevel;
} else if (((PlayerStamina < 100) && (DEAD == false)) && (INVINCIBLE == true)) {
PlayerStamina = PlayerStamina + 10;
}
StaminaBar._height = PlayerStamina;
if (PlayerStamina < 0) {
PlayerStamina = 0;
}
if (PlayerStamina > 100) {
PlayerStamina = 100;
}
if (BallTag == 1) {
BallEnergyHUD.EnergyHUD._x = (-BallEnergy) / 2;
}
if (BallTag == 2) {
BallEnergyHUD.EnergyHUD._x = BallEnergy / 2;
}
if (BallTag == 0) {
BallEnergyHUD.EnergyHUD._x = 0;
}
if (PlayerMaxCombo < PlayerCombo) {
PlayerMaxCombo = PlayerCombo;
}
if (PlayerMaxCombo >= 2) {
MAXcomboDisplay._visible = true;
} else {
MAXcomboDisplay._visible = false;
}
if (PlayerCombo >= 2) {
n = 0;
PlayerComboHUD = PlayerCombo;
combodisplay._alpha = 100;
combodisplay.gotoAndStop(1);
combodisplay2.textColor = 16777215 /* 0xFFFFFF */;
combodisplay2._visible = true;
} else {
n = n + 1;
combodisplay.gotoAndStop(2);
combodisplay2.textColor = 16711680 /* 0xFF0000 */;
if (n > 50) {
combodisplay2._visible = false;
combodisplay._alpha = combodisplay._alpha * 0.9;
}
}
if (PlayerHealthHUD._xscale > 0) {
PlayerHealthHUD._xscale = PlayerHealth / 2;
PlayerHealthHUD._yscale = PlayerHealthHUD._xscale;
}
if (PlayerHealth > 90) {
PlayerHealthHUD.gotoAndStop(1);
} else if ((PlayerHealth > 80) && (PlayerHealth <= 90)) {
PlayerHealthHUD.gotoAndStop(2);
} else if ((PlayerHealth > 70) && (PlayerHealth <= 80)) {
PlayerHealthHUD.gotoAndStop(3);
} else if ((PlayerHealth > 60) && (PlayerHealth <= 70)) {
PlayerHealthHUD.gotoAndStop(4);
} else if ((PlayerHealth > 50) && (PlayerHealth <= 60)) {
PlayerHealthHUD.gotoAndStop(5);
} else if ((PlayerHealth > 40) && (PlayerHealth <= 50)) {
PlayerHealthHUD.gotoAndStop(6);
} else if ((PlayerHealth > 30) && (PlayerHealth <= 40)) {
PlayerHealthHUD.gotoAndStop(7);
} else if ((PlayerHealth > 20) && (PlayerHealth <= 30)) {
PlayerHealthHUD.gotoAndStop(8);
} else if ((PlayerHealth > 10) && (PlayerHealth <= 20)) {
PlayerHealthHUD.gotoAndStop(9);
}
ItemTime = random(1000);
spriteINVINC._x = Player._x + 10;
spriteINVINC._y = Player._y - 10;
if (((ItemTime >= 998) && (pickupINVINCIBILITY._visible == false)) && (INVINCIBLE == false)) {
pickupINVINCIBILITY._visible = true;
pickupINVINCIBILITY._x = random(700) + 100;
pickupINVINCIBILITY._y = random(200) + 100;
}
if (INVINCIBLE == true) {
invincTime = invincTime + 1;
aura._visible = true;
} else {
aura._visible = false;
}
if (pickupINVINCIBILITY._visible == true) {
INV = INV + 1;
if (INV > 100) {
pickupINVINCIBILITY._visible = false;
INV = 0;
}
}
if (invincTime > 150) {
INVINCIBLE = false;
invincTime = 0;
spriteINVINC._visible = false;
}
if ((_local1.hitTest(pickupINVINCIBILITY) && (pickupINVINCIBILITY._visible == true)) && (HURT == false)) {
INVINCIBLE = true;
invincTime = 0;
INV = 0;
spriteINVINC._visible = true;
pickupINVINCIBILITY._visible = false;
InvincSound = new Sound();
InvincSound.attachSound("speedup");
InvincSound.start(1);
}
if ((Trainer.hitTest(pickupINVINCIBILITY) && (pickupINVINCIBILITY._visible == true)) && (HURT == false)) {
INVINCIBLE = true;
invincTime = 0;
INV = 0;
spriteINVINC._visible = true;
pickupINVINCIBILITY._visible = false;
InvincSound = new Sound();
InvincSound.attachSound("speedup");
InvincSound.start(1);
}
Item2Time = random(1000);
if ((Item2Time >= 998) && (pickupHEALTH._visible == false)) {
pickupHEALTH._visible = true;
pickupHEALTH._x = random(700) + 100;
pickupHEALTH._y = random(200) + 100;
}
if (pickupHEALTH._visible == true) {
HPT = HPT + 1;
if (HPT > 150) {
pickupHEALTH._visible = false;
HPT = 0;
}
}
if (((_local1.hitTest(pickupHEALTH) && (pickupHEALTH._visible == true)) && (HURT == false)) && (PlayerHealth < 100)) {
PlayerHealth = 100;
HPT = 0;
pickupHEALTH._visible = false;
ReplenishSound = new Sound();
ReplenishSound.attachSound("HealthSound");
ReplenishSound.start();
}
if (((Trainer.hitTest(pickupHEALTH) && (pickupHEALTH._visible == true)) && (HURT == false)) && (PlayerHealth < 100)) {
PlayerHealth = 100;
HPT = 0;
pickupHEALTH._visible = false;
ReplenishSound = new Sound();
ReplenishSound.attachSound("HealthSound");
ReplenishSound.start();
}
if ((PlayerVelX >= 1) || (PlayerVelX <= -1)) {
PlayerRestX = false;
}
if ((PlayerVelY >= 1) || (PlayerVelY <= -1)) {
PlayerRestY = false;
}
if ((PlayerRestX == true) && (PlayerRestY == true)) {
PlayerRest = true;
} else {
PlayerRest = false;
}
if ((((Kame == false) && (Spiritball == false)) && (PlayerRestY == false)) && (EnemyDEAD == false)) {
if ((PlayerVelY < 80) && (!Player.hitTest(ground))) {
PlayerVelY = PlayerVelY + PlayerWeight;
}
}
if ((PlayerRestX == false) && (EnemyDEAD == false)) {
if (PlayerVelX != 0) {
PlayerVelX = PlayerVelX * 0.9;
}
if ((PlayerVelX < 1) && (PlayerVelX > -1)) {
PlayerVelX = 0;
PlayerRestX = true;
}
}
if (Player.hitTest(ground)) {
if (PlayerVelY > 0) {
PlayerVelY = 0;
_local1._y = 310;
PlayerRestY = true;
}
if (HURTback == true) {
_local1.gotoAndPlay("HITground");
PlayerVelY = 0;
} else if (HURTfront == true) {
_local1.gotoAndPlay("HITground2");
PlayerVelY = 0;
}
if (ATTACK == true) {
PlayerVelX = 0;
TELEPORT = false;
PowerBAR._alpha = PowerBAR._alpha * 0.8;
}
}
if (Player.hitTest(wallRIGHT) && (PlayerVelX > 1)) {
Player._x = Player._x - 1;
PlayerVelX = PlayerVelX * -0.5;
if (HURTfront == true) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
HURTfront = false;
} else if (HURTback == true) {
_local1.gotoAndPlay("HURTfront");
HURTback = false;
HURTfront = true;
}
}
if (Player.hitTest(wallMIDDLE) && (PlayerVelX > 1)) {
Player._x = Player._x - 1;
PlayerVelX = PlayerVelX * -0.5;
}
if (Player.hitTest(wallLEFT) && (PlayerVelX < 0)) {
Player._x = Player._x + 1;
PlayerVelX = PlayerVelX * -0.5;
if (HURTfront == true) {
_local1.gotoAndPlay(206);
HURTback = true;
HURTfront = false;
WallImpactSound = new Sound();
WallImpactSound.attachSound("wallIMPACT");
WallImpactSound.start();
} else if (HURTback == true) {
_local1.gotoAndPlay(239);
HURTback = false;
HURTfront = true;
}
}
if (Player.hitTest(wallTOP) && (PlayerVelY < 1)) {
if (!_local1.BEAM.HitTest(wallTOP)) {
Player._y = Player._y + 1;
}
PlayerVelY = PlayerVelY * -0.5;
}
if ((((((((HURT == false) && (Spiritball == false)) && (Kame == false)) && (DEAD == false)) && (EnemyDEAD == false)) && (Key.isDown(87))) && (!Key.isDown(65))) && (!Key.isDown(68))) {
if ((ATTACK == false) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYup");
}
if (_local1.hitTest(ground)) {
PlayerVelY = -5;
}
if ((_local1._y > wallTOP._y) && (PlayerVelY > -3)) {
PlayerVelY = PlayerVelY - 1.1;
}
}
if (((((((!_local1.hitTest(ground)) && (HURT == false)) && (DEAD == false)) && (Key.isDown(83))) && (EnemyDEAD == false)) && (Kame == false)) && (Spiritball == false)) {
PlayerVelY = PlayerVelY + 1.5;
}
if (((((((((((!_local1.hitTest(ground)) && (Spiritball == false)) && (Kame == false)) && (HURT == false)) && (DEAD == false)) && (ATTACK == false)) && (TELEPORT == false)) && (Key.isDown(83))) && (!Key.isDown(65))) && (!Key.isDown(68))) && (EnemyDEAD == false)) {
_local1.gotoAndPlay("FLYdown");
}
if ((((((HURT == false) && (Spiritball == false)) && (Kame == false)) && (DEAD == false)) && (_local1._x < target._x)) && (EnemyDEAD == false)) {
if (Key.isDown(87)) {
PlayerVelY = PlayerVelY - 2;
}
if ((Key.isDown(65) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -20)) {
PlayerVelX = PlayerVelX - 5;
}
if ((Key.isDown(65) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if ((Key.isDown(68) && (_local1._x < 800)) && (PlayerVelX < 20)) {
PlayerVelX = PlayerVelX + 5;
}
if ((Key.isDown(68) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
} else if ((((((HURT == false) && (Spiritball == false)) && (Kame == false)) && (DEAD == false)) && (EnemyDEAD == false)) && (_local1._x != target._x)) {
if (Key.isDown(87)) {
PlayerVelY = PlayerVelY - 2;
}
if ((Key.isDown(65) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -20)) {
PlayerVelX = PlayerVelX - 5;
}
if ((Key.isDown(65) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
if ((Key.isDown(68) && (_local1._x < 800)) && (PlayerVelX < 20)) {
PlayerVelX = PlayerVelX + 5;
}
if ((Key.isDown(68) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
}
if ((((((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (!Key.isDown(68))) && (!Key.isDown(65))) && (!Key.isDown(87))) && (ATTACK == false)) && (TELEPORT == false)) {
NEUTRAL = true;
if ((!_local1.hitTest(ground)) && (!Key.isDown(83))) {
_local1.gotoAndPlay("FALL");
Player.onEnterFrame = enginePLAYER;
} else if (_local1.hitTest(ground)) {
_local1.gotoAndPlay("IDLE");
PlayerVelX = PlayerVelX * 0.7;
}
} else {
NEUTRAL = false;
}
if (((_local1.HITBOX.hitTest(Ball) && (BallTag > 1)) && (BallEnergy >= 30)) && (INVINCIBLE == false)) {
HURT = true;
ATTACK = false;
Kame = false;
KameHame = false;
Spiritball = false;
CHARGE = false;
aura._alpha = 0;
PlayerForce = 0;
target._visible = false;
PlayerCombo = 0;
PlayerHealth = PlayerHealth - (BallEnergy / BallType);
PlayerVelX = PlayerVelX + (BallVelX / 2);
PlayerVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ChargeSound.stop("ChargePush");
ImpactSound = new Sound();
ImpactSound.attachSound("impactHURT");
PainSound = new Sound();
PainSound.attachSound("painHURT");
if ((PlayerFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
if ((BallVelX == 0) && (BallVelY < 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
} else if ((BallVelX == 0) && (BallVelY > 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound.start();
PainSound.start();
}
}
if ((PlayerHealth < 1) && (DEAD == false)) {
GAMEOVER._visible = true;
GAMEOVER.play();
PlayerHealthHUD._visible = false;
DEAD = true;
Key.removeListener(DefendListener);
Bar._visible = false;
BallEnergyHUD._visible = false;
Mouse.show();
}
if (_local1.AttackBox.hitTest(Ball)) {
BallTag = 1;
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 5;
}
HIT = true;
}
if ((ATTACK == true) && (PlayerForce >= 25)) {
z = PlayerForce / 300;
xmov = Xdist * z;
ymov = Ydist * z;
BallVelX = BallVelX + xmov;
BallVelY = BallVelY + ymov;
ChargeRate = 3 * Difficulty;
BallEnergy = BallEnergy + ((PlayerForce / ChargeRate) * (PlayerCombo + 1));
Ball._xscale = Ball._xscale + (PlayerForce / 10);
Ball._yscale = Ball._yscale + (PlayerForce / 10);
}
if ((ATTACK == true) && (PlayerForce < 25)) {
z = PlayerForce / 100;
xmov = Xdist * z;
ymov = Ydist * z;
BallVelX = xmov;
BallVelY = ymov;
BallEnergy = BallEnergy + (PlayerForce / 5);
Ball._xscale = Ball._xscale + (PlayerForce / 10);
Ball._yscale = Ball._yscale + (PlayerForce / 10);
}
}
if (_local1.SHIELD.hitTest(Ball)) {
PlayerCombo = 0;
PlayerScore = PlayerScore + (PlayerStamina / StageLevel);
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
if (hyp <= 70) {
meleeflash.gotoAndPlay("STALL");
} else if ((hyp <= 140) && (hyp > 70)) {
meleeflash.gotoAndPlay("KICK");
} else if ((hyp <= 210) && (hyp > 140)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (hyp > 210) {
meleeflash.gotoAndPlay("POWER");
}
if ((ATTACK == true) && (hyp >= 70)) {
xmov = Xdist / 7;
ymov = Ydist / 7;
BallVelX = xmov;
BallVelY = ymov;
BallEnergy = BallEnergy - (hyp / 7);
if (Ball._xscale > BallSize) {
Ball._xscale = Ball._xscale - (hyp / 30);
Ball._yscale = Ball._yscale - (hyp / 30);
}
}
}
if ((_local1.AttackBox.hitTest(Enemy) && (PlayerForce > 25)) && (EnemyHURT == true)) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
meleeflash._visible = true;
meleeflash._x = AttackBox._x;
meleeflash._y = AttackBox._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 10;
}
HIT = true;
}
EnemyHURT = true;
EnemyHealth = EnemyHealth - (PlayerForce / 10);
xmov = Xdist / 7;
ymov = Ydist / 7;
EnemyVelX = xmov;
EnemyVelY = ymov;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
}
if (_local1.AttackBox.hitTest(Enemy) && (INVINCIBLE == true)) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
meleeflash._visible = true;
meleeflash._x = AttackBox._x;
meleeflash._y = AttackBox._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 10;
}
HIT = true;
}
EnemyHURT = true;
EnemyHealth = EnemyHealth - (PlayerForce / 10);
xmov = Xdist / 7;
ymov = Ydist / 7;
EnemyVelX = xmov;
EnemyVelY = ymov;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
}
if ((((((HURT == false) && (DEAD == false)) && (ATTACK == false)) && (EnemyDEAD == false)) || (Kame == true)) || (Spiritball == true)) {
startDrag ("/target", true);
Mouse.hide();
target._visible = true;
target._alpha = 100;
} else {
stopDrag();
Mouse.show();
target._alpha = 10;
}
if ((Spiritball == false) && (KameHame == false)) {
if (PlayerForce <= 25) {
target.GotoAndStop("SOFT");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
target.GotoAndStop("MEDIUM");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
target.GotoAndStop("HARD");
}
if (PlayerForce >= 100) {
target.GotoAndStop("POWER");
}
} else if ((Spiritball == true) || (KameHame == true)) {
target.GotoAndStop("POWER");
}
Player._x = Player._x + PlayerVelX;
Player._y = Player._y + PlayerVelY;
if ((((_local1._x > target._x) && (HURT == false)) && (ATTACK == false)) && (DEAD == false)) {
_local1._xscale = -100;
PlayerFacingL = true;
PlayerFacingR = false;
} else if ((((_local1._x < target._x) && (HURT == false)) && (ATTACK == false)) && (DEAD == false)) {
_local1._xscale = 100;
PlayerFacingR = true;
PlayerFacingL = false;
}
PlayerShadow._x = Player._x;
if (KameHame == false) {
PlayerShadow._xscale = Player._width + (Player._y / 2);
}
if (StageLevel == 1) {
Rank = "Noob";
} else if (StageLevel == 2) {
Rank = "Initiate";
} else if (StageLevel == 3) {
Rank = "Goon";
} else if (StageLevel == 4) {
Rank = "Thug";
} else if (StageLevel == 5) {
Rank = "Novice";
} else if (StageLevel == 6) {
Rank = "Average";
} else if (StageLevel == 7) {
Rank = "Adept";
} else if (StageLevel == 8) {
Rank = "Warrior";
} else if (StageLevel == 9) {
Rank = "Solid";
} else if (StageLevel == 10) {
Rank = "Liquid";
} else if (StageLevel == 11) {
Rank = "Professional";
} else if (StageLevel == 12) {
Rank = "Prodigy";
} else if (StageLevel == 13) {
Rank = "Monk";
} else if (StageLevel == 14) {
Rank = "Tengu";
} else if (StageLevel == 15) {
Rank = "Jedi";
} else if (StageLevel == 16) {
Rank = "Neo";
} else if (StageLevel == 17) {
Rank = "Dragon";
} else if (StageLevel == 18) {
Rank = "Master";
} else if (StageLevel == 19) {
Rank = "Saiyan";
} else if (StageLevel == 20) {
Rank = "Grand Master";
} else if (StageLevel == 21) {
Rank = "Super Saiyan";
} else if (StageLevel == 22) {
Rank = "Majin";
} else if (StageLevel == 23) {
Rank = "Otaku";
} else if (StageLevel == 24) {
Rank = "Akira";
} else if (StageLevel == 25) {
Rank = "Deity";
} else if (StageLevel == 26) {
Rank = "KYnetiK";
} else if (StageLevel >= 27) {
Rank = "Wastoid";
}
}
function enginePOWER() {
if ((((((HURT == false) && (Spiritball == false)) && (KameHame == false)) && (DEAD == false)) && (EnemyDEAD == false)) && (PlayerForce <= PlayerEnergy)) {
CHARGE = true;
Kame = false;
PowerBAR._alpha = 100;
PlayerForce = 0;
ChargeSound = new Sound();
ChargeSound.attachSound("ChargePush");
ChargeSound.start(1);
}
}
function engineATTACK() {
if (((((((HURT == false) && (Spiritball == false)) && (Kame == false)) && (KameHame == false)) && (DEAD == false)) && (ATTACK == false)) && (EnemyDEAD == false)) {
ATTACK = true;
CHARGE = false;
PlayerStamina = PlayerStamina - PlayerForce;
aura._alpha = aura._alpha * 0.4;
ChargeSound.stop("ChargePush");
if (target._y <= Player._y) {
if (PlayerForce <= 25) {
Player.GotoAndPlay("hitUP1");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
Player.GotoAndPlay("hitUP2");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
Player.GotoAndPlay("hitUP3");
}
if (PlayerForce >= 100) {
Player.GotoAndPlay("hitUP4");
}
}
if (target._y > Player._y) {
if (PlayerForce <= 25) {
Player.GotoAndPlay("hitDOWN1");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
Player.GotoAndPlay("hitDOWN2");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
Player.GotoAndPlay("hitDOWN3");
}
if (PlayerForce >= 100) {
Player.GotoAndPlay("hitDOWN4");
}
}
}
}
function engineDEFEND() {
if (((Key.getCode() == 81) && (DEAD == false)) && (EnemyDEAD == false)) {
TechMode = TechMode - 1;
if (TechMode < 0) {
TechMode = 3;
}
}
if (((Key.getCode() == 69) && (DEAD == false)) && (EnemyDEAD == false)) {
TechMode = TechMode + 1;
if (TechMode > 3) {
TechMode = 0;
}
}
if ((((ATTACK == false) && (HURT == false)) && (DEAD == false)) && (EnemyDEAD == false)) {
if ((((Key.getCode() == 32) && (TechMode == 3)) && (CHARGE == false)) && (PlayerCombo >= 10)) {
ATTACK = true;
Player.gotoAndPlay("Kamehameha");
Kame = true;
PlayerVelY = 0;
PlayerVelX = 0;
}
if ((((Key.getCode() == 32) && (TechMode == 2)) && (CHARGE == false)) && (PlayerCombo >= 5)) {
ATTACK = true;
Player.gotoAndPlay("Spiritball");
Spiritball = true;
PlayerVelY = 0;
PlayerVelX = 0;
}
if (((Key.getCode() == 32) && (TechMode == 1)) && (Trainer._visible == false)) {
TrainerORBIT = true;
ATTACK = true;
Player.gotoAndPlay("ForceBlade");
Trainer._visible = true;
TO = 0;
}
if ((Key.getCode() == 32) && (TechMode == 0)) {
Player.gotoAndPlay("SHIELD");
ATTACK = true;
PlayerStamina = PlayerStamina / 5;
}
if (Key.getCode() == 16) {
Player.gotoAndPlay("TELEPORT");
TeleportSprite.gotoAndPlay("2");
TELEPORT = true;
PlayerStamina = PlayerStamina / 3;
PlayerScore = PlayerScore + (PlayerStamina * StageLevel);
TeleportSound = new Sound();
TeleportSound.attachSound("SuperSpeed");
TeleportSound.start();
}
}
}
function engineTRAINER() {
var _local1 = this;
if (DEAD == false) {
_local1._x = _local1._x + TrainerVelX;
_local1._y = _local1._y + TrainerVelY;
TrainerNEUTRAL = true;
MydistX = _xmouse - _local1._x;
MydistY = _ymouse - _local1._y;
Mydir = Math.atan2(MydistY, MydistX);
_local1._rotation = Mydir * pi;
} else {
TrainerNEUTRAL == false;
}
if (_local1.hitTest(ground) && (TrainerVelY > 0)) {
TrainerVelY = TrainerVelY * -0.5;
}
if (_local1.hitTest(wallRIGHT) && (TrainerVelX > 0)) {
_local1._x = _local1._x - 1;
TrainerVelX = TrainerVelX * -0.5;
}
if (_local1.hitTest(wallLEFT) && (TrainerVelX < 0)) {
_local1._x = _local1._x + 1;
TrainerVelX = TrainerVelX * -0.5;
}
if (_local1.hitTest(wallTOP) && (TrainerVelY < 0)) {
_local1._y = _local1._y + 1;
TrainerVelY = TrainerVelY * -0.5;
}
if (TrainerORBIT == true) {
TO = TO + 1;
if (TO >= 15) {
TO = 0;
TrainerORBIT = false;
}
Txdist = target._x - _local1._x;
Tydist = target._y - _local1._y;
TrainerVelX = TrainerVelX + (Txdist / 50);
TrainerVelY = TrainerVelY + (Tydist / 50);
} else {
Txdist = Player._x - _local1._x;
Tydist = Player._y - _local1._y;
TrainerVelX = TrainerVelX + (Txdist / 50);
TrainerVelY = TrainerVelY + (Tydist / 50);
}
TrainerVelX = TrainerVelX * 0.9;
if ((((_local1.hitTest(Ball) && (_local1._visible == true)) && (DEAD == false)) && (EnemyDEAD == false)) && (TrainerATTACK == false)) {
ReflectSound = new Sound();
ReflectSound.attachSound("reflect");
ReflectSound.start();
TrainerORBIT = false;
TrainerVelX = 0;
TrainerVelY = 0;
BallTag = 1;
PlayerCombo = PlayerCombo + 1;
_local1.gotoAndPlay("ATTACK2");
TrainerATTACK = true;
TrainerPlayerDistX = Player._x - _local1._x;
TrainerForceX = TrainerPlayerDistX / 15;
TrainerForceY = -20;
BallVelX = TrainerForceX;
BallVelY = BallVelY + TrainerForceY;
}
}
function engineENEMY() {
var _local1 = this;
EnemyBallDistX2 = random(5) + 1;
EnemyBallDistY2 = random(5) + 1;
EnemyMovX2 = EnemyBallDistX2 - random(7);
EnemyMovY2 = EnemyBallDistY2 - random(7);
EnemyAccel = (random(7) + 20) / StageLevel;
if ((BallTag == 2) || (BallTag == 0)) {
EnemyBallDistX = Ball._x - _local1._x;
EnemyBallDistY = Ball._y - _local1._y;
EnemyMovX = (EnemyBallDistX / EnemyAccel) * 2;
EnemyMovY = (EnemyBallDistY / EnemyAccel) * 2;
}
if (BallTag == 1) {
EnemyBallDistX = Ball._x - _local1._x;
EnemyBallDistY = Ball._y - _local1._y;
EnemyMovX = (EnemyBallDistX / EnemyAccel) / 2;
EnemyMovY = (EnemyBallDistY / EnemyAccel) / 2;
}
if (((EnemyHURT == false) && (EnemyATTACK == false)) && (DEAD == false)) {
_local1._x = _local1._x + EnemyMovX;
_local1._y = _local1._y + EnemyMovY;
}
if (EnemyHURT == true) {
_local1._x = _local1._x + EnemyVelX;
_local1._y = _local1._y + EnemyVelY;
}
if (EnemyHURT == true) {
if (!_local1.hitTest(ground)) {
EnemyVelY = EnemyVelY + 1;
EnemyVelX = EnemyVelX * 0.95;
EnemyMovY = EnemyMovY + PlayerMass;
EnemyMovX = EnemyMovX * 0.95;
}
}
EnemyTeleportNOW = random(101);
if ((((((EnemyTeleport == false) && (EnemyTeleportNOW > 99)) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (DEAD == false)) && (EnemyDEAD == false)) {
Enemy.gotoAndPlay("TELEPORT");
EnemyTeleport = true;
}
if (EnemyHURT == true) {
EnemyATTACK == false;
}
if (Enemy.hitTest(Player.BEAhitbox)) {
EnemyHURT = true;
PlayerCombo = PlayerCombo + 1;
EnemyHealth = EnemyHealth - 1;
EnemyVelX = Xdist / 30;
EnemyVelY = Ydist / 30;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < _local1._x)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > _local1._x)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > _local1._x)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < _local1._x)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
}
if (((Enemy.hitTest(Ball) && (BallEnergy >= 30)) && (BallTag == 1)) && (EnemyHURT == true)) {
EnemyHURT = true;
PlayerCombo = PlayerCombo + 1;
EnemyHealth = EnemyHealth - (BallEnergy / 3);
EnemyVelX = BallVelX / 2;
EnemyVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
}
if (((EnemyHURT == false) && (DEAD == false)) && (EnemyDEAD == false)) {
if (((((EnemyMovY < 0) && (EnemyMovX >= -1)) && (EnemyMovX <= 1)) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYup");
}
}
if (((((((((!_local1.hitTest(ground)) && (EnemyMovX >= -1)) && (EnemyMovX <= 1)) && (EnemyMovY > 0)) && (EnemyHURT == false)) && (DEAD == false)) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) && (EnemyDEAD == false)) {
_local1.gotoAndPlay("FLYdown");
}
if ((((EnemyHURT == false) && (DEAD == false)) && (_local1._x < Player._x)) && (EnemyDEAD == false)) {
if (((EnemyMovX < -1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if (((EnemyMovX > 1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
} else if ((((EnemyHURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (_local1._x > Player._x)) {
if (((EnemyMovX > 1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if (((EnemyMovX < -1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
}
EnemyShadow._x = Enemy._x;
EnemyShadow._xscale = Enemy._width + (Enemy._y / 2);
if ((EnemyATTACK == false) && (EnemyHURT == false)) {
if (_local1._x > Player._x) {
_local1._xscale = 90;
EnemyFacingL = true;
EnemyFacingR = false;
} else if (_local1._x < Player._x) {
_local1._xscale = -90;
EnemyFacingR = true;
EnemyFacingL = false;
}
}
if (DEAD == false) {
if (_local1.hitTest(ground)) {
if ((EnemyHURT == false) && (EnemyMovY > 0)) {
_local1._y = 310;
}
if ((EnemyHURT == true) && (EnemyVelY > 0)) {
_local1._y = 310;
}
if (EnemyHURTback == true) {
_local1.gotoAndPlay("HITground");
EnemyVelX = 0;
} else if (EnemyHURTfront == true) {
_local1.gotoAndPlay("HITground2");
EnemyVelX = 0;
}
}
if (_local1.hitTest(wallRIGHT)) {
Enemy._x = Enemy._x - 1;
EnemyVelX = EnemyVelX * -0.5;
EnemyMovX = EnemyMovX * -1.1;
if ((EnemyHURTfront == true) && (EnemyVelX < -1)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
EnemyHURTfront = false;
} else if ((EnemyHURTback == true) && (EnemyVelX < -1)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTback = false;
EnemyHURTfront = true;
}
}
if (_local1.hitTest(wallLEFT)) {
Enemy._x = Enemy._x + 1;
EnemyVelX = EnemyVelX * -0.5;
EnemyMovX = EnemyMovX * -1.1;
if ((EnemyHURTfront == true) && (EnemyVelX > 1)) {
_local1.gotoAndPlay(206);
EnemyHURTback = true;
EnemyHURTfront = false;
WallImpactSound = new Sound();
WallImpactSound.attachSound("wallIMPACT");
WallImpactSound.start();
} else if ((EnemyHURTback == true) && (EnemyVelX > 1)) {
_local1.gotoAndPlay(239);
EnemyHURTback = false;
EnemyHURTfront = true;
}
}
if (_local1.hitTest(wallTOP) && (EnemyVelY < 1)) {
Enemy._y = Enemy._y + 1;
EnemyVelY = EnemyVelY * -0.5;
}
}
EnemyHealthBall._xscale = EnemyHealth / 2;
EnemyHealthBall._yscale = EnemyHealthBall._xscale;
if (((_local1.HITBOX.hitTest(Ball) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (EnemyDEAD == false)) {
EnemyChoice = random(101);
if (EnemyChoice >= 30) {
PlayerCombo = 0;
EnemyPower = random(24) + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("POWER");
DoICombo = random(101);
if (DoICombo <= 50) {
if (Player._y <= Enemy._y) {
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitUP4");
} else if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitUP3");
} else if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitUP2");
} else if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitUP1");
}
}
if (Player._y > Enemy._y) {
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitDOWN4");
} else if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitDOWN3");
} else if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitDOWN2");
} else if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitDOWN1");
}
}
BallTag = 2;
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Player._x - _local1._x;
EnemyPlayerDistY = Player._y - _local1._y;
EnemyForceX = EnemyPlayerDistX / EnemyPower;
EnemyForceY = EnemyPlayerDistY / EnemyPower;
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
Ball._xscale = Ball._xscale + (EnemyPower / 3);
Ball._yscale = Ball._yscale + (EnemyPower / 3);
} else if (DoICombo > 50) {
BallTag = 2;
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitUP1");
} else if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitUP2");
} else if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitUP3");
} else if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitUP4");
}
EnemyATTACK = true;
PlayerCombo = 0;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Enemy._x - Ball._x;
EnemyForceX = EnemyPlayerDistX / EnemyPower;
EnemyForceY = -EnemyPower;
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
}
} else if (((BallEnergy >= 30) && (BallTag == 1)) && (EnemyChoice < 30)) {
EnemyHURT = true;
PlayerCombo = PlayerCombo + 1;
EnemyHealth = EnemyHealth - (((PlayerCombo + 1) * BallEnergy) / 10);
EnemyVelX = BallVelX / 2;
EnemyVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
}
}
if ((EnemyHealth < 1) && (EnemyDEAD == false)) {
EnemyDEAD = true;
EnemyHealthBall._alpha = 0;
Mouse.show();
Kame = false;
KameHame = false;
Spiritball = false;
PlayerScore = PlayerScore + (1000 * StageLevel);
Player.gotoAndPlay("I WIN");
GAMEOVER2._visible = true;
}
}
PlayerScore = 0;
StageLevel = 1;
StageLevelE = 0;
PlayerMass = 1.7;
Ball._xscale = 50;
Ball._yscale = 50;
BallVelX = 0;
BallVelY = -25;
PlayerCombo = 0;
PlayerMaxCombo = 0;
DefendListener = new Object();
Key.addListener(DefendListener);
DefaultPlayerRot = Player._rotation;
DefaultBeamRot = Player._rotation;
Trainer._visible = false;
aura._visible = false;
if (BallType == 3) {
BallMass = 0.5;
} else if (BallType == 2) {
BallMass = 1;
} else if (BallType == 1) {
BallMass = 1.5;
}
BallSize = Ball._xscale;
init();
stop();
Instance of Symbol 557 MovieClip "Ball" in Frame 245
onClipEvent (enterFrame) {
}
Instance of Symbol 1198 MovieClip "Player" in Frame 245
/* no clip actions */
Instance of Symbol 1898 MovieClip "Enemy" in Frame 245
/* no clip actions */
Instance of Symbol 1198 MovieClip "Player" in Frame 267
/* no clip actions */
Instance of Symbol 1898 MovieClip "Enemy" in Frame 267
/* no clip actions */
Instance of Symbol 557 MovieClip "Ball" in Frame 267
onClipEvent (enterFrame) {
}
Frame 268
function init() {
Stage.showMenu = false;
Stage.scaleMode = "showAll";
Mouse.hide();
frictionAirX = 0.99;
frictionAirY = 0.8;
gravity = 1;
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
Cliff.gotoAndStop(1);
WALLDIE = false;
Cliff2.gotoAndStop(1);
WALLDIE2 = false;
tree.gotoAndStop(1);
TREEDIE = false;
ServeDistX = TargetReticle._x - Ball._x;
ServeMovX = ServeDistX / 7;
ServeDistY = TargetReticle._y - Ball._y;
ServeMovY = ServeDistY / 7;
Ball._x = 442;
Ball._y = 305;
BallVelX = 0;
BallVelY = -15;
BallWeight = BallMass * gravity;
BallAccel = BallForce / BallMass;
BallRestX = true;
BallRestY = false;
BallRest = false;
BallEnergy = 0;
BallTag = 1;
meleeflash._visible = false;
WINCOUNT = 0;
LOSECOUNT = 0;
PlayerMass = 1;
PlayerForce = 0;
PlayerWeight = PlayerMass * gravity;
PlayerRestX = true;
PlayerRestY = false;
PlayerRest = false;
PlayerHealth = 100;
PlayerStamina = 100;
PlayerPower = 100;
ATTACK = false;
HURT = false;
HURTfront = false;
HURTback = false;
RECOVER = false;
DEAD = false;
NEUTRAL = true;
CHARGE = false;
TELEPORT = false;
INVINCIBLE = false;
Kame = false;
KameHame = false;
Spiritball = false;
PlayerFacingL = false;
PlayerFacingR = true;
aura._alpha = 0;
spriteINVINC._visible = false;
EnemyVelX = 0;
EnemyVelY = 0;
EnemyPower = 0;
EnemyMass = 1;
EnemyWeight = EnemyMass * gravity;
EnemyHealth = 100;
EnemyRestX = true;
EnemyRestY = true;
EnemyATTACK = false;
EnemyDEAD = false;
EnemyNEUTRAL = true;
EnemyCHARGE = false;
EnemyTELEPORT = false;
EnemyFacingL = true;
EnemyFacingR = false;
TrainerATTACK = false;
TrainerNEUTRAL = true;
TrainerATTACK2 = false;
TrainerNEUTRAL2 = true;
TrainerORBIT = false;
ORB2VelX = 5;
ORB2VelY = 2;
PlayerHealthHUD._visible = true;
BallEnergyHUD._visible = true;
EnemyHealthBall._alpha = 100;
combodisplay._alpha = 0;
combodisplay2._visible = false;
GAMEOVER._visible = false;
GAMEOVER2._visible = false;
pickupHEALTH._visible = false;
pickupINVINCIBILITY._visible = false;
INV = 0;
HPT = 0;
LandSound = new Sound();
LandSound.attachSound("LandWav");
MusicSound = new Sound();
MusicSound.attachSound("bgmusic");
BallEnergyHUD.onEnterFrame = engineENERGY();
Ball.onEnterFrame = engineBALL;
Trainer.onEnterFrame = engineTRAINER;
Player.onEnterFrame = enginePLAYER;
Player.onMouseDown = enginePOWER;
Player.onMouseUp = engineATTACK;
if (TrainingMode == 0) {
ORB._visible = false;
Enemy._visible = false;
EnemyShadow._visible = false;
}
if (TrainingMode == 1) {
ORB.onEnterFrame = engineORB;
ORB._visible = true;
Enemy._visible = false;
EnemyShadow._visible = false;
}
DefendListener.onKeyUp = engineDEFEND;
if (TrainingMode == 2) {
Enemy.onEnterFrame = engineENEMY;
ORB._visible = false;
Enemy._visible = true;
EnemyShadow._visible = true;
}
}
function engineBALL() {
var _local1 = this;
BallWeight = BallMass * gravity;
BallEnergy2 = Math.round(BallEnergy);
if (Spiritball == false) {
if ((BallVelX >= 1) or (BallVelX <= -1)) {
BallRestX = false;
} else {
BallRestX = true;
}
if ((BallVelY >= 1) or (BallVelY <= -1)) {
BallRestY = false;
} else {
BallRestY = true;
}
if ((BallRestX == true) && (BallRestY == true)) {
BallRest = true;
} else {
BallRest = false;
}
}
BallEnergyBar._yscale = BallEnergy;
if (BallEnergy > 0) {
BallEnergy = BallEnergy - 0.1;
}
if (BallEnergy > 100) {
BallEnergy = 100;
BallEnergyBar._yscale = 100;
}
if (BallEnergy < 0) {
BallEnergy = 0;
}
if (!_local1.hitTest(ground)) {
if (((BallVelY < 20) && (Spiritball == false)) && (!_local1.hitTest(ground))) {
BallVelY = BallVelY + BallWeight;
}
}
if ((BallRestX == false) && (Spiritball == false)) {
if (BallVelX != 0) {
BallVelX = BallVelX * frictionAirX;
}
if ((BallVelX < 1) && (BallVelX > -1)) {
BallVelX = 0;
BallRestX = true;
}
}
_local1._rotation = _local1._rotation + (BallVelX * 4);
if (_local1.hitTest(ground)) {
BallEnergy = BallEnergy * 0.95;
}
if (_local1.hitTest(ground) && (BallVelY > 0)) {
if ((BallEnergy < 80) && (EnemyHURT == false)) {
PlayerCombo = 0;
}
if (BallVelY >= 5) {
BallVelY = BallVelY * -0.75;
} else if (BallVelY < 5) {
BallVelY = -(Math.round(BallVelY) * 0.3);
}
if ((BallVelY < 1) && (BallVelY >= 0)) {
BallVelY = 0;
BallRestY = true;
}
}
if ((_local1.hitTest(ground) && (BallVelY > -1)) && (BallVelY < 0)) {
BallVelY = 0;
BallRestY = true;
}
if (_local1.hitTest(wallRIGHT) && (BallVelX > 0)) {
_local1._x = _local1._x - 1;
BallVelX = -BallVelX;
BARRIER.gotoAndPlay("HITRIGHT");
}
if (_local1.hitTest(wallLEFT) && (BallVelX < 0)) {
_local1._x = _local1._x + 1;
BallVelX = BallVelX * -1;
BARRIER.gotoAndPlay("HITLEFT");
}
if (_local1.hitTest(wallTOP) && (BallVelY < 0)) {
_local1._y = _local1._y + 1;
BallVelY = BallVelY * -1;
BARRIER.gotoAndPlay("HITTOP");
}
if (BallVelX > 50) {
BallVelX = 49;
}
if (BallVelX < -50) {
BallVelX = -49;
}
if (BallVelY > 50) {
BallVelY = 49;
}
if (BallVelY < -50) {
BallVelY = -49;
}
_local1._x = _local1._x + BallVelX;
_local1._y = _local1._y + BallVelY;
BallShadow._x = _local1._x;
BallShadow._x = BallShadow._x + (-PlayerVelX);
BallShadow._y = ground._y;
BallHeight = wallTOP._y - ground._y;
BallShadow._xscale = (_local1._y - wallTOP._y) / 4;
if (Spiritball == true) {
if (!_local1.hitTest(TargetReticle)) {
SballDistX = TargetReticle._x - _local1._x;
SballDistY = TargetReticle._y - _local1._y;
}
BallVelX = BallVelX + (SballDistX / 50);
BallVelY = BallVelY + (SballDistY / 50);
bluey._visible = true;
bluey._x = _local1._x;
bluey._y = _local1._y;
bluey._rotation = bluey._rotation + random(360);
}
if (Spiritball == false) {
bluey._visible = false;
}
if ((Spiritball == true) && (_local1.hitTest(TargetReticle))) {
SballDistX = -(TargetReticle._x - _local1._x);
SballDistY = -(TargetReticle._y - _local1._y);
BallVelX = BallVelX / 1.1;
BallVelY = BallVelY / 1.1;
BallTag = 1;
BallEnergy = BallEnergy + 20;
}
if (_local1.hitTest(Player.BEAhitbox)) {
BallEnergy = BallEnergy + 50;
BallTag = 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("blue");
BallVelX = BallVelX + (Xdist / 10);
BallVelY = BallVelY + (Ydist / 10);
}
if (_local1.hitTest(Player.hurricane.ring)) {
PlayerCombo = PlayerCombo + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("blue");
BallEnergy = BallEnergy + 10;
BallTag = 1;
BallVelX = BallVelX + (random(20) - random(20));
BallVelY = BallVelY + (-random(20));
}
if (BallEnergy < 2) {
_local1.GotoAndStop("NORMAL");
BallEnergyBar.gotoAndStop("Ball0");
}
if (BallTag == 1) {
BallEnergyBar.gotoAndStop("Ball1");
if ((BallEnergy < 30) && (BallEnergy >= 2)) {
_local1.GotoAndStop("WARM1");
}
if ((BallEnergy < 90) && (BallEnergy >= 30)) {
_local1.GotoAndStop("HOT1");
}
if (BallEnergy >= 90) {
_local1.GotoAndStop("CHARGED1");
}
} else if (BallTag == 2) {
BallEnergyBar.gotoAndStop("Ball2");
if ((BallEnergy < 30) && (BallEnergy >= 2)) {
_local1.GotoAndStop("WARM2");
}
if ((BallEnergy < 90) && (BallEnergy >= 30)) {
_local1.GotoAndStop("HOT2");
}
if (BallEnergy >= 90) {
_local1.GotoAndStop("CHARGED2");
}
}
}
function enginePLAYER() {
var _local1 = this;
PlayerWeight = PlayerMass * gravity;
meleeflash._rotation = meleeflash._rotation + random(360);
_local1.ShieldSparks._rotation = _local1.ShieldSparks._rotation + random(360);
if (ATTACK == false) {
Xdist = _xmouse - Player._x;
Ydist = _ymouse - Player._y;
}
if ((ATTACK == true) && (Kame == true)) {
Xdist = _xmouse - Player._x;
Ydist = _ymouse - Player._y;
}
if ((ATTACK == true) && (Spiritball == true)) {
Xdist = _xmouse - Player._x;
Ydist = _ymouse - Player._y;
}
if ((ATTACK == true) && (HADOUKEN == true)) {
Xdist = _xmouse - Player._x;
Ydist = _ymouse - Player._y;
}
pi = 57.2957795130823;
angle = Math.atan2(Ydist, Xdist);
hyp = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
Sniperline._x = _local1._x;
Sniperline._y = _local1._y;
Sniperline._xscale = hyp;
Sniperline._alpha = (hyp / 200) * 100;
Sniperline._rotation = angle * pi;
MYANGLE = angle * pi;
EtoPdistX = Enemy._x - Player._x;
EtoPdistY = Enemy._y - Player._y;
EnemyAngle = Math.atan2(EtoPdistY, EtoPdistX);
EnemyHyp = Math.sqrt((EtoPdistX * EtoPdistX) + (EtoPdistY * EtoPdistY));
if (Enemy._visible == true) {
Sniperline2._visible = true;
} else {
Sniperline2._visible = false;
}
Sniperline2._x = _local1._x;
Sniperline2._y = _local1._y;
Sniperline2._xscale = EnemyHyp;
Sniperline2._alpha = (EnemyHyp / 200) * 100;
Sniperline2._rotation = EnemyAngle * pi;
EnemyAngle2 = (EnemyAngle * pi) + 180;
BtoPdistX = Ball._x - Player._x;
BtoPdistY = Ball._y - Player._y;
BallAngle = Math.atan2(BtoPdistY, BtoPdistX);
BallHyp = Math.sqrt((BtoPdistX * BtoPdistX) + (BtoPdistY * BtoPdistY));
if (Ball._visible == true) {
Sniperline3._visible = true;
} else {
Sniperline3._visible = false;
}
Sniperline3._x = _local1._x;
Sniperline3._y = _local1._y;
Sniperline3._xscale = BallHyp;
Sniperline3._alpha = (BallHyp / 200) * 100;
Sniperline3._rotation = BallAngle * pi;
if ((_local1.HITBOX.hitTest(Trainer) && (Trainer._visible == true)) && (TrainerORBIT == false)) {
_local1.gotoAndPlay("Catch");
Trainer.gotoAndPlay("ATTACK2");
ATTACK = true;
TrainerVelX = 0;
TrainerVelY = 0;
}
if (Trainer._visible == false) {
Trainer._x = _local1._x;
Trainer._y = _local1._y;
Trainer.gotoAndStop(1);
}
if (GodMode == false) {
if (TechMode == 0) {
TechLogo.gotoAndStop("Shield");
TechLogo._alpha = 100;
CurrentTech = "Negative Barrier";
DOSHIELD = false;
}
if (TechMode == 1) {
TechLogo.gotoAndStop("ForceBlade");
TechLogo._alpha = 100;
CurrentTech = "Force Blade";
DOSHIELD = false;
} else {
Trainer._visible = false;
}
if (TechMode == 4) {
if (MySuper >= 20) {
TechLogo.gotoAndStop("Spiritball");
CurrentTech = "Spiritball";
TechLogo._alpha = 100;
DOSHIELD = false;
} else if (MySuper < 20) {
TechLogo.gotoAndStop("NA");
CurrentTech = "(Super Cost 20)";
DOSHIELD = true;
}
}
if (TechMode == 5) {
if (MySuper >= 30) {
TechLogo.gotoAndStop("Superbeam");
TechLogo._alpha = 100;
CurrentTech = "Super Beam";
DOSHIELD = false;
} else if (MySuper < 30) {
TechLogo.gotoAndStop("NA");
CurrentTech = "(Super Cost 30)";
DOSHIELD = true;
}
}
if (TechMode == 3) {
if (MySuper >= 10) {
TechLogo.gotoAndStop("Cyclone");
TechLogo._alpha = 100;
CurrentTech = "Cyclone";
DOSHIELD = false;
} else if (MySuper < 10) {
TechLogo.gotoAndStop("NA");
CurrentTech = "(Super Cost 10)";
DOSHIELD = true;
}
}
if (TechMode == 2) {
if (MySuper >= 5) {
TechLogo.gotoAndStop("SpiritSword");
TechLogo._alpha = 100;
CurrentTech = "Spirit Sword";
DOSHIELD = false;
} else if (MySuper < 5) {
TechLogo.gotoAndStop("NA");
CurrentTech = "(Super Cost 5)";
DOSHIELD = true;
}
}
}
if (GodMode == true) {
if (TechMode == 0) {
TechLogo.gotoAndStop("Shield");
TechLogo._alpha = 100;
CurrentTech = "Negative Barrier";
DOSHIELD = false;
}
if (TechMode == 1) {
TechLogo.gotoAndStop("ForceBlade");
TechLogo._alpha = 100;
CurrentTech = "Force Blade";
DOSHIELD = false;
} else {
Trainer._visible = false;
}
if (TechMode == 4) {
TechLogo.gotoAndStop("Spiritball");
CurrentTech = "Spiritball";
TechLogo._alpha = 100;
DOSHIELD = false;
}
if (TechMode == 5) {
TechLogo.gotoAndStop("Superbeam");
TechLogo._alpha = 100;
CurrentTech = "Super Beam";
DOSHIELD = false;
}
if (TechMode == 3) {
TechLogo.gotoAndStop("Cyclone");
TechLogo._alpha = 100;
CurrentTech = "Cyclone";
DOSHIELD = false;
}
if (TechMode == 2) {
TechLogo.gotoAndStop("SpiritSword");
TechLogo._alpha = 100;
CurrentTech = "Spirit Sword";
DOSHIELD = false;
}
if (TechMode == 60) {
TechLogo.gotoAndStop("Hadouken");
TechLogo._alpha = 100;
CurrentTech = "Hadouken";
DOSHIELD = false;
}
}
if (((Kame == true) && (KameHame == false)) && (PlayerFacingL == true)) {
_local1._rotation = (angle * pi) + 180;
} else if (((Kame == true) && (KameHame == false)) && (PlayerFacingR == true)) {
_local1._rotation = angle * pi;
} else if ((Kame == false) && (SWORD == false)) {
_local1._rotation = DefaultPlayerRot;
}
if ((SWORD == true) && (PlayerFacingL == true)) {
_local1._rotation = (angle * pi) + 180;
} else if ((SWORD == true) && (PlayerFacingR == true)) {
_local1._rotation = angle * pi;
}
if ((Spiritball == true) && (PlayerFacingL == true)) {
_local1.arm._rotation = ((-angle) * pi) + 180;
} else if ((Spiritball == true) && (PlayerFacingR == true)) {
_local1.arm._rotation = angle * pi;
}
PlayerScore = Math.round(PlayerScore);
PlayerHealth = Math.round(PlayerHealth);
aura._x = _local1._x;
aura._y = _local1._y;
aura._alpha = aura._alpha * 0.99;
TeleportSprite._x = _local1._x;
TeleportSprite._y = _local1._y;
if ((PlayerVelY != 0) && (PlayerVelX == 0)) {
TeleportSprite._rotation = 90;
} else if (PlayerVelY == 0) {
TeleportSprite._rotation = 0;
} else if ((PlayerVelY > 0) && (PlayerVelX != 0)) {
TeleportSprite._rotation = PlayerVelY + PlayerVelX;
} else if ((PlayerVelY < 0) && (PlayerVelX != 0)) {
TeleportSprite._rotation = PlayerVelY - PlayerVelX;
}
PowerBAR._height = PlayerForce;
if (PlayerForce >= 100) {
PowerBAR._height = 100;
}
if (ATTACK == true) {
TELEPORT = false;
PowerBAR._alpha = PowerBAR._alpha * 0.8;
}
if (CHARGE == true) {
ATTACK = false;
if ((PlayerVelX < 25) && (PlayerVelX > -25)) {
aura._rotation = AR;
}
if (PlayerVelY >= 0) {
AR = -(PlayerVelX * 4);
}
if ((PlayerVelY < 0) && (PlayerVelX != 0)) {
AR = -(PlayerVelX * 7);
}
if ((PlayerVelY < 0) && (PlayerVelX == 0)) {
AR = 180;
}
if (PlayerForce < PlayerStamina) {
if (INVINCIBLE == false) {
PlayerForce = PlayerForce + 5;
PlayerPower = PlayerPower - 1;
} else if (INVINCIBLE == true) {
aura._alpha = aura._alpha + PlayerForce;
PlayerForce = PlayerForce + 10;
PlayerPower = PlayerPower - 1;
}
}
} else {
aura._alpha = aura._alpha * 0.95;
}
if ((ATTACK == false) && (CHARGE == false)) {
PlayerForce = 0;
PlayerPower = 101;
}
if ((((PlayerStamina < 100) && (HURT == false)) && (DEAD == false)) && (INVINCIBLE == false)) {
PlayerStamina = PlayerStamina + 2;
} else if ((((PlayerStamina < 100) && (HURT == true)) && (DEAD == false)) && (INVINCIBLE == false)) {
PlayerStamina = PlayerStamina + 1;
} else if (((PlayerStamina < 100) && (DEAD == false)) && (INVINCIBLE == true)) {
PlayerStamina = PlayerStamina + 10;
}
StaminaBar._height = PlayerStamina;
if (PlayerStamina < 0) {
PlayerStamina = 0;
}
if (PlayerStamina > 100) {
PlayerStamina = 100;
}
if (BallTag == 1) {
BallEnergyHUD.EnergyHUD._x = (-BallEnergy) / 2;
}
if (BallTag == 2) {
BallEnergyHUD.EnergyHUD._x = BallEnergy / 2;
}
if (BallTag == 0) {
BallEnergyHUD.EnergyHUD._x = 0;
}
if (PlayerMaxCombo < PlayerCombo) {
PlayerMaxCombo = PlayerCombo;
}
if (PlayerMaxCombo >= 2) {
MAXcomboDisplay._visible = true;
} else {
MAXcomboDisplay._visible = false;
}
if (PlayerCombo >= 2) {
n = 0;
PlayerComboHUD = PlayerCombo;
combodisplay._alpha = 100;
combodisplay.gotoAndStop(1);
combodisplay2.textColor = 65280;
combodisplay2._visible = true;
DispCoFe._visible = true;
if (PlayerCombo < 3) {
ComboFeedback = "";
} else if ((PlayerCombo >= 3) && (PlayerCombo < 5)) {
ComboFeedback = "GOOD!";
} else if ((PlayerCombo >= 5) && (PlayerCombo < 7)) {
ComboFeedback = "WELL DONE!";
} else if ((PlayerCombo >= 7) && (PlayerCombo < 10)) {
ComboFeedback = "GREAT!";
} else if ((PlayerCombo >= 10) && (PlayerCombo < 15)) {
ComboFeedback = "EXCELLENT!";
} else if ((PlayerCombo >= 15) && (PlayerCombo < 20)) {
ComboFeedback = "BRILLIANT!";
} else if ((PlayerCombo >= 20) && (PlayerCombo < 30)) {
ComboFeedback = "AWESOME!";
} else if ((PlayerCombo >= 30) && (PlayerCombo < 40)) {
ComboFeedback = "SUPERB!";
} else if ((PlayerCombo >= 40) && (PlayerCombo < 50)) {
ComboFeedback = "OUTSTANDING!";
} else if ((PlayerCombo >= 50) && (PlayerCombo < 60)) {
ComboFeedback = "SENSATIONAL!";
} else if ((PlayerCombo >= 60) && (PlayerCombo < 70)) {
ComboFeedback = "MANIACAL!";
} else if ((PlayerCombo >= 70) && (PlayerCombo < 80)) {
ComboFeedback = "INSANE!";
} else if ((PlayerCombo >= 80) && (PlayerCombo < 90)) {
ComboFeedback = "PHENOMENAL!";
} else if ((PlayerCombo >= 90) && (PlayerCombo < 100)) {
ComboFeedback = "HARDCORE!";
} else if (PlayerCombo >= 100) {
ComboFeedback = "GAMING GOD!";
}
} else {
n = n + 1;
ComboFeedback = "";
combodisplay.gotoAndStop(2);
combodisplay2.textColor = 16711680 /* 0xFF0000 */;
if (n > 50) {
combodisplay2._visible = false;
combodisplay._alpha = combodisplay._alpha * 0.9;
DispCoFe._visible = false;
}
}
if (SuperBar._yscale > 100) {
SuperBar._yscale = 100;
GodMode = true;
}
if (SuperBar._yscale < 100) {
GodMode = false;
}
if (SuperBar._yscale < 0) {
SuperBar._yscale = 0;
}
if (PlayerHealthHUD._xscale > 0) {
PlayerHealthHUD._xscale = PlayerHealth / 2;
PlayerHealthHUD._yscale = PlayerHealthHUD._xscale;
}
if ((PlayerHealth < 0) && (HURT == true)) {
PlayerHealth = 0;
}
ItemTime = random(1000);
spriteINVINC._x = Player._x;
spriteINVINC._y = Player._y;
if (((ItemTime >= 998) && (pickupINVINCIBILITY._visible == false)) && (INVINCIBLE == false)) {
pickupINVINCIBILITY._visible = true;
pickupINVINCIBILITY._x = random(300) + 300;
pickupINVINCIBILITY._y = random(100) + 100;
if (pickupINVINCIBILITY._x < wallLEFT._x) {
pickupINVINCIBILITY._x = wallLEFT._x + 100;
}
if (pickupINVINCIBILITY._x > wallRIGHT._x) {
pickupINVINCIBILITY._x = wallRIGHT._x - 100;
}
if (pickupINVINCIBILITY._y < wallTOP._y) {
pickupINVINCIBILITY._y = wallTOP._y + 100;
}
if (pickupINVINCIBILITY._y > ground._y) {
pickupINVINCIBILITY._y = ground._y - 100;
}
}
if (INVINCIBLE == true) {
invincTime = invincTime + 1;
spriteINVINC._rotation = spriteINVINC._rotation + PlayerVelX;
}
if (pickupINVINCIBILITY._visible == true) {
INV = INV + 1;
if (INV > 100) {
pickupINVINCIBILITY._visible = false;
INV = 0;
}
}
if (invincTime > 150) {
INVINCIBLE = false;
invincTime = 0;
aura._alpha = 0;
spriteINVINC._visible = false;
}
if ((_local1.hitTest(pickupINVINCIBILITY) && (pickupINVINCIBILITY._visible == true)) && (HURT == false)) {
INVINCIBLE = true;
_local1.gotoAndPlay("CONE");
ATTACK = true;
CHARGE = false;
invincTime = 0;
INV = 0;
spriteINVINC._visible = true;
pickupINVINCIBILITY._visible = false;
InvincSound = new Sound();
InvincSound.attachSound("speedup");
InvincSound.start(1);
}
if ((Trainer.hitTest(pickupINVINCIBILITY) && (pickupINVINCIBILITY._visible == true)) && (HURT == false)) {
INVINCIBLE = true;
invincTime = 0;
INV = 0;
_local1.gotoAndPlay("CONE");
ATTACK = true;
spriteINVINC._visible = true;
pickupINVINCIBILITY._visible = false;
InvincSound = new Sound();
InvincSound.attachSound("speedup");
InvincSound.start(1);
}
Item2Time = random(1000);
if ((Item2Time >= 998) && (pickupHEALTH._visible == false)) {
pickupHEALTH._visible = true;
pickupHEALTH._x = random(300) + 300;
pickupHEALTH._y = random(100) + 100;
if (pickupHEALTH._x < wallLEFT._x) {
pickupHEALTH._x = wallLEFT._x + 100;
}
if (pickupHEALTH._x > wallRIGHT._x) {
pickupHEALTH._x = wallRIGHT._x - 100;
}
if (pickupHEALTH._y < wallTOP._y) {
pickupHEALTH._y = wallTOP._y + 100;
}
if (pickupHEALTH._y > ground._y) {
pickupHEALTH._y = ground._y - 100;
}
}
if (pickupHEALTH._visible == true) {
HPT = HPT + 1;
if (HPT > 150) {
pickupHEALTH._visible = false;
HPT = 0;
}
}
if (((_local1.hitTest(pickupHEALTH) && (pickupHEALTH._visible == true)) && (HURT == false)) && (PlayerHealth < 100)) {
PlayerHealth = 100;
HPT = 0;
pickupHEALTH._visible = false;
ReplenishSound = new Sound();
ReplenishSound.attachSound("HealthSound");
ReplenishSound.start();
}
if ((((Trainer.hitTest(pickupHEALTH) && (Trainer._visible == true)) && (pickupHEALTH._visible == true)) && (HURT == false)) && (PlayerHealth < 100)) {
PlayerHealth = 100;
HPT = 0;
pickupHEALTH._visible = false;
ReplenishSound = new Sound();
ReplenishSound.attachSound("HealthSound");
ReplenishSound.start();
}
if ((PlayerVelX >= 1) || (PlayerVelX <= -1)) {
PlayerRestX = false;
}
if ((PlayerVelY >= 1) || (PlayerVelY <= -1)) {
PlayerRestY = false;
}
if ((PlayerRestX == true) && (PlayerRestY == true)) {
PlayerRest = true;
} else {
PlayerRest = false;
}
if ((((Kame == false) && (Spiritball == false)) && (PlayerRestY == false)) && (EnemyDEAD == false)) {
if (PlayerVelY < 20) {
if ((!Player.hitTest(ROOFtier)) && (!Player.hitTest(ground))) {
PlayerVelY = PlayerVelY + PlayerWeight;
}
}
}
if ((PlayerRestX == false) && (EnemyDEAD == false)) {
if ((PlayerVelX != 0) && (PlayerVelY != 0)) {
PlayerVelX = PlayerVelX * 0.9;
}
if ((PlayerVelX != 0) && (PlayerVelY == 0)) {
PlayerVelX = PlayerVelX * 0.85;
}
if ((PlayerVelX < 1) && (PlayerVelX > -1)) {
PlayerVelX = 0;
PlayerRestX = true;
}
}
if (Player.hitTest(ground)) {
if (PlayerVelY > 0) {
PlayerVelY = 0;
PlayerRestY = true;
if (((ATTACK == false) && (!Key.isDown(65))) && (!Key.isDown(68))) {
LandSound.start();
}
}
if ((RECOVER == true) && (Rx == 0)) {
ATTACK = false;
RECOVER = false;
}
if (HURTback == true) {
_local1.gotoAndPlay("HITground");
PlayerVelY = 0;
} else if (HURTfront == true) {
_local1.gotoAndPlay("HITground2");
PlayerVelY = 0;
}
if (ATTACK == true) {
PlayerVelX = 0;
TELEPORT = false;
PowerBAR._alpha = PowerBAR._alpha * 0.8;
}
}
if (Player.hitTest(wallRIGHT) && (PlayerVelX > 1)) {
PlayerVelX = PlayerVelX - 1;
PlayerVelX = PlayerVelX * -0.5;
BARRIER.gotoAndPlay("HITRIGHT");
if (HURTfront == true) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
HURTfront = false;
} else if (HURTback == true) {
_local1.gotoAndPlay("HURTfront");
HURTback = false;
HURTfront = true;
}
}
if (Player.hitTest(wallMIDDLE) && (PlayerVelX > 1)) {
PlayerVelY = PlayerVelY - 1;
PlayerVelX = PlayerVelX * -0.5;
}
if (Player.hitTest(wallLEFT) && (PlayerVelX < 0)) {
PlayerVelX = PlayerVelX + 1;
PlayerVelX = PlayerVelX * -0.5;
BARRIER.gotoAndPlay("HITLEFT");
if (HURTfront == true) {
_local1.gotoAndPlay(206);
HURTback = true;
HURTfront = false;
WallImpactSound = new Sound();
WallImpactSound.attachSound("wallIMPACT");
WallImpactSound.start();
} else if (HURTback == true) {
_local1.gotoAndPlay(239);
HURTback = false;
HURTfront = true;
}
}
if (Player.hitTest(wallTOP) && (PlayerVelY < 1)) {
if (!_local1.BEAM.HitTest(wallTOP)) {
PlayerVelY = PlayerVelY + 1;
}
PlayerVelY = 1;
BARRIER.gotoAndPlay("HITTOP");
}
FixTopDist = -(_local1._y - wallTOP._y);
if (_local1._y < wallTOP._y) {
BG._y = BG._y - FixTopDist;
Ball._y = Ball._y - FixTopDist;
Enemy._y = Enemy._y - FixTopDist;
ground._y = ground._y - FixTopDist;
wallTOP._y = wallTOP._y - FixTopDist;
wallLEFT._y = wallLEFT._y - FixTopDist;
wallRIGHT._y = wallRIGHT._y - FixTopDist;
pickupINVINCIBILITY._y = pickupINVINCIBILITY._y - FixTopDist;
pickupHEALTH._y = pickupHEALTH._y - FixTopDist;
meleeflash._y = meleeflash._y - FixTopDist;
Cliff._y = Cliff._y - FixTopDist;
Cliff2._y = Cliff2._y - FixTopDist;
Cliff3._y = Cliff3._y - FixTopDist;
tree._y = tree._y - FixTopDist;
ORB._y = ORB._y - FixTopDist;
stoner._y = stoner._y - FixTopDist;
cloud._y = cloud._y - FixTopDist;
bluey._y = bluey._y - FixTopDist;
BARRIER._y = BARRIER._y - FixTopDist;
}
FixGroundDist = _local1._y - ground._y;
if (_local1._y > ground._y) {
BG._y = BG._y + FixGroundDist;
Ball._y = Ball._y + FixGroundDist;
Enemy._y = Enemy._y + FixGroundDist;
ground._y = ground._y + FixGroundDist;
wallTOP._y = wallTOP._y + FixGroundDist;
wallLEFT._y = wallLEFT._y + FixGroundDist;
wallRIGHT._y = wallRIGHT._y + FixGroundDist;
pickupINVINCIBILITY._y = pickupINVINCIBILITY._y + FixGroundDist;
pickupHEALTH._y = pickupHEALTH._y + FixGroundDist;
meleeflash._y = meleeflash._y + FixGroundDist;
Cliff._y = Cliff._y + FixGroundDist;
Cliff2._y = Cliff2._y + FixGroundDist;
Cliff3._y = Cliff3._y + FixGroundDist;
tree._y = tree._y + FixGroundDist;
ORB._y = ORB._y + FixGroundDist;
stoner._y = stoner._y + FixGroundDist;
cloud._y = cloud._y + FixGroundDist;
bluey._y = bluey._y + FixGroundDist;
BARRIER._y = BARRIER._y + FixGroundDist;
}
FixGroundDist2 = -(ground._y - (Player._y + 20));
if (_local1.hitTest(ground) && (PlayerVelY >= 0)) {
BG._y = BG._y + FixGroundDist2;
Ball._y = Ball._y + FixGroundDist2;
Enemy._y = Enemy._y + FixGroundDist2;
ground._y = ground._y + FixGroundDist2;
wallTOP._y = wallTOP._y + FixGroundDist2;
wallLEFT._y = wallLEFT._y + FixGroundDist2;
wallRIGHT._y = wallRIGHT._y + FixGroundDist2;
pickupINVINCIBILITY._y = pickupINVINCIBILITY._y + FixGroundDist2;
pickupHEALTH._y = pickupHEALTH._y + FixGroundDist2;
meleeflash._y = meleeflash._y + FixGroundDist2;
Cliff._y = Cliff._y + FixGroundDist2;
Cliff2._y = Cliff2._y + FixGroundDist2;
Cliff3._y = Cliff3._y + FixGroundDist2;
tree._y = tree._y + FixGroundDist2;
ORB._y = ORB._y + FixGroundDist2;
stoner._y = stoner._y + FixGroundDist2;
cloud._y = cloud._y + FixGroundDist2;
bluey._y = bluey._y + FixGroundDist2;
BARRIER._y = BARRIER._y + FixGroundDist2;
}
FixLeftDist = -(_local1._x - wallLEFT._x);
if (_local1._x < wallLEFT._x) {
BG._x = BG._x - FixLeftDist;
Ball._x = Ball._x - FixLeftDist;
Enemy._x = Enemy._x - FixLeftDist;
ground._x = ground._x - FixLeftDist;
wallTOP._x = wallTOP._x - FixLeftDist;
wallLEFT._x = wallLEFT._x - FixLeftDist;
wallRIGHT._x = wallRIGHT._x - FixLeftDist;
pickupINVINCIBILITY._x = pickupINVINCIBILITY._x - FixLeftDist;
pickupHEALTH._x = pickupHEALTH._x - FixLeftDist;
meleeflash._x = meleeflash._x - FixLeftDist;
Cliff._x = Cliff._x - FixLeftDist;
Cliff2._x = Cliff2._x - FixLeftDist;
Cliff3._x = Cliff3._x - FixLeftDist;
tree._x = tree._x - FixLeftDist;
ORB._x = ORB._x - FixLeftDist;
stoner._x = stoner._x - FixLeftDist;
cloud._x = cloud._x - FixLeftDist;
bluey._x = bluey._x - FixLeftDist;
BARRIER._x = BARRIER._x - FixLeftDist;
}
FixRightDist = _local1._x - wallRIGHT._x;
if (_local1._x > wallRIGHT._x) {
BG._x = BG._x + FixRightDist;
Ball._x = Ball._x + FixRightDist;
Enemy._x = Enemy._x + FixRightDist;
ground._x = ground._x + FixRightDist;
wallTOP._x = wallTOP._x + FixRightDist;
wallLEFT._x = wallLEFT._x + FixRightDist;
wallRIGHT._x = wallRIGHT._x + FixRightDist;
pickupINVINCIBILITY._x = pickupINVINCIBILITY._x + FixRightDist;
pickupHEALTH._x = pickupHEALTH._x + FixRightDist;
meleeflash._x = meleeflash._x + FixRightDist;
Cliff._x = Cliff._x + FixRightDist;
Cliff2._x = Cliff2._x + FixRightDist;
Cliff3._x = Cliff3._x + FixRightDist;
tree._x = tree._x + FixRightDist;
ORB._x = ORB._x + FixRightDist;
stoner._x = stoner._x + FixRightDist;
cloud._x = cloud._x + FixRightDist;
bluey._x = bluey._x + FixRightDist;
BARRIER._x = BARRIER._x + FixRightDist;
}
if ((((((((HURT == false) && (Spiritball == false)) && (Kame == false)) && (DEAD == false)) && (EnemyDEAD == false)) && (Key.isDown(87))) && (!Key.isDown(65))) && (!Key.isDown(68))) {
if (((INVINCIBLE == false) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYup");
}
if (((INVINCIBLE == true) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("SWOOPup");
}
if (_local1.hitTest(ground)) {
if (INVINCIBLE == false) {
PlayerVelY = -10;
}
if ((INVINCIBLE == true) && (CONE == false)) {
PlayerVelY = -20;
}
}
if ((INVINCIBLE == false) && (_local1._y > wallTOP._y)) {
PlayerVelY = PlayerVelY - 1.1;
}
if ((((INVINCIBLE == true) && (CONE == false)) && (_local1._y > wallTOP._y)) && (PlayerVelY > -50)) {
PlayerVelY = -50;
PlayerStamina = PlayerStamina - 1;
}
}
if ((((((((!_local1.hitTest(ground)) && (INVINCIBLE == false)) && (HURT == false)) && (DEAD == false)) && (Key.isDown(83))) && (EnemyDEAD == false)) && (Kame == false)) && (Spiritball == false)) {
PlayerVelY = PlayerVelY + 1.5;
}
if (((((((((!_local1.hitTest(ground)) && (CONE == false)) && (INVINCIBLE == true)) && (HURT == false)) && (DEAD == false)) && (Key.isDown(83))) && (EnemyDEAD == false)) && (Kame == false)) && (Spiritball == false)) {
PlayerVelY = 50;
PlayerStamina = PlayerStamina - 1;
}
if ((((((((((((!_local1.hitTest(ground)) && (INVINCIBLE == false)) && (Spiritball == false)) && (Kame == false)) && (HURT == false)) && (DEAD == false)) && (ATTACK == false)) && (TELEPORT == false)) && (Key.isDown(83))) && (!Key.isDown(65))) && (!Key.isDown(68))) && (EnemyDEAD == false)) {
_local1.gotoAndPlay("FLYdown");
}
if ((((((((((((!_local1.hitTest(ground)) && (INVINCIBLE == true)) && (Spiritball == false)) && (Kame == false)) && (HURT == false)) && (DEAD == false)) && (ATTACK == false)) && (TELEPORT == false)) && (Key.isDown(83))) && (!Key.isDown(65))) && (!Key.isDown(68))) && (EnemyDEAD == false)) {
_local1.gotoAndPlay("SWOOPdown");
}
if ((((((HURT == false) && (Spiritball == false)) && (Kame == false)) && (DEAD == false)) && (_local1._x < TargetReticle._x)) && (EnemyDEAD == false)) {
if (Key.isDown(87)) {
PlayerVelY = PlayerVelY - 2;
}
if (((Key.isDown(65) && (INVINCIBLE == false)) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -25)) {
PlayerVelX = PlayerVelX - 5;
}
if ((((Key.isDown(65) && (CONE == false)) && (INVINCIBLE == true)) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -50)) {
PlayerVelX = -50;
PlayerStamina = PlayerStamina - 1;
if (!Key.isDown(87)) {
PlayerVelY = 0;
}
}
if (((((Key.isDown(65) && (INVINCIBLE == false)) && (!Key.isDown(87))) && (!Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if (((((Key.isDown(65) && (INVINCIBLE == true)) && (!Key.isDown(87))) && (!Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("SWOOPbackward");
}
if (((Key.isDown(65) && (Key.isDown(87))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("Somersault2");
}
if (((Key.isDown(65) && (Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("Somersault2");
}
if (((Key.isDown(68) && (INVINCIBLE == false)) && (_local1._x < wallRIGHT._x)) && (PlayerVelX < 25)) {
PlayerVelX = PlayerVelX + 5;
}
if ((((Key.isDown(68) && (CONE == false)) && (INVINCIBLE == true)) && (_local1._x < wallRIGHT._x)) && (PlayerVelX < 50)) {
PlayerVelX = 50;
PlayerStamina = PlayerStamina - 1;
if (!Key.isDown(87)) {
PlayerVelY = 0;
}
}
if (((((Key.isDown(68) && (INVINCIBLE == false)) && (!Key.isDown(87))) && (!Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
if (((((Key.isDown(68) && (INVINCIBLE == true)) && (!Key.isDown(87))) && (!Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("SWOOPforward");
}
if (((Key.isDown(68) && (Key.isDown(87))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("Somersault");
}
if (((Key.isDown(68) && (Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("Somersault");
}
} else if ((((((HURT == false) && (Spiritball == false)) && (Kame == false)) && (DEAD == false)) && (EnemyDEAD == false)) && (_local1._x > TargetReticle._x)) {
if (Key.isDown(87)) {
PlayerVelY = PlayerVelY - 2;
}
if (((Key.isDown(65) && (INVINCIBLE == false)) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -25)) {
PlayerVelX = PlayerVelX - 5;
}
if ((((Key.isDown(65) && (CONE == false)) && (INVINCIBLE == true)) && (_local1._x > wallLEFT._x)) && (PlayerVelX > -50)) {
PlayerVelX = -50;
PlayerStamina = PlayerStamina - 1;
if (!Key.isDown(87)) {
PlayerVelY = 0;
}
}
if (((((Key.isDown(65) && (INVINCIBLE == false)) && (!Key.isDown(87))) && (!Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
if (((((Key.isDown(65) && (INVINCIBLE == true)) && (!Key.isDown(87))) && (!Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("SWOOPforward");
}
if (((Key.isDown(65) && (Key.isDown(87))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("Somersault");
}
if (((Key.isDown(65) && (Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("Somersault");
}
if (((Key.isDown(68) && (INVINCIBLE == false)) && (_local1._x < wallRIGHT._x)) && (PlayerVelX < 25)) {
PlayerVelX = PlayerVelX + 5;
}
if ((((Key.isDown(68) && (CONE == false)) && (INVINCIBLE == true)) && (_local1._x < wallRIGHT._x)) && (PlayerVelX < 50)) {
PlayerVelX = 50;
PlayerStamina = PlayerStamina - 1;
if (!Key.isDown(87)) {
PlayerVelY = 0;
}
}
if (((((Key.isDown(68) && (INVINCIBLE == false)) && (!Key.isDown(87))) && (!Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if (((((Key.isDown(68) && (INVINCIBLE == true)) && (!Key.isDown(87))) && (!Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("SWOOPbackward");
}
if (((Key.isDown(68) && (Key.isDown(87))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("Somersault2");
}
if (((Key.isDown(68) && (Key.isDown(83))) && (ATTACK == false)) && (TELEPORT == false)) {
_local1.gotoAndPlay("Somersault2");
}
}
if (!_local1.hitTest(ground)) {
_local1._x = 438.6;
_local1._y = 209.8;
}
if ((((((((HURT == false) && (DEAD == false)) && (EnemyDEAD == false)) && (!Key.isDown(68))) && (!Key.isDown(65))) && (!Key.isDown(87))) && (ATTACK == false)) && (TELEPORT == false)) {
NEUTRAL = true;
if ((((!_local1.hitTest(ground)) && (!_local1.hitTest(ROOFtier))) && (!Key.isDown(83))) && (PlayerRestY == false)) {
_local1.gotoAndPlay("FALL");
Player.onEnterFrame = enginePLAYER;
} else if (_local1.hitTest(ground)) {
_local1.gotoAndPlay("IDLE");
PlayerVelX = PlayerVelX * 0.7;
} else if (_local1.hitTest(ROOFtier)) {
_local1.gotoAndPlay("IDLE");
PlayerVelX = PlayerVelX * 0.7;
}
} else {
NEUTRAL = false;
}
if (((_local1.HITBOX.hitTest(Ball) && (BallTag > 1)) && (BallEnergy >= 30)) && (INVINCIBLE == false)) {
HURT = true;
ATTACK = false;
TrainerORBIT = false;
Trainer.gotoAndPlay("ATTACK2");
Kame = false;
KameHame = false;
Spiritball = false;
CHARGE = false;
aura._alpha = 0;
PlayerForce = 0;
TargetReticle._visible = false;
PlayerCombo = 0;
PlayerHealth = PlayerHealth - (BallEnergy / 3);
PlayerVelX = BallVelX * 2;
PlayerVelY = -5 + (BallVelY / 2);
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ChargeSound.stop("ChargePush");
ImpactSound = new Sound();
ImpactSound.attachSound("impactHURT");
PainSound = new Sound();
PainSound.attachSound("painHURT");
if ((PlayerFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
HURTfront = false;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
HURTfront = false;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
HURTback = false;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
HURTback = false;
ImpactSound.start();
PainSound.start();
}
if ((BallVelX == 0) && (BallVelY < 0)) {
_local1.gotoAndPlay("HURTfront");
HURTfront = true;
BallEnergy = BallEnergy / 3;
HURTback = false;
ImpactSound.start();
PainSound.start();
} else if ((BallVelX == 0) && (BallVelY > 0)) {
_local1.gotoAndPlay("HURTback");
HURTback = true;
BallEnergy = BallEnergy / 3;
HURTfront = false;
ImpactSound.start();
PainSound.start();
}
}
if (((PlayerHealth < 1) && (TrainingMode > 1)) && (DEAD == false)) {
GAMEOVER._visible = true;
GAMEOVER.play();
PlayerHealthHUD._visible = false;
DEAD = true;
Key.removeListener(DefendListener);
Bar._visible = false;
BallEnergyHUD._visible = false;
Mouse.show();
}
if (((PlayerHealth < 1) && (TrainingMode == 1)) && (DEAD == false)) {
PlayerHealth = 100;
}
if (_local1.AttackBox.hitTest(Ball)) {
BallTag = 1;
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
SuperBar._yscale = SuperBar._yscale + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
BounceSound = new Sound();
BounceSound.attachSound("BallBounce");
BounceSound.start();
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash._x = meleeflash._x + (-PlayerVelX);
meleeflash._y = meleeflash._y + (-PlayerVelY);
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 5;
}
HIT = true;
}
if ((ATTACK == true) && (hyp >= 70)) {
if (PlayerForce >= 25) {
z = PlayerForce / 600;
} else if (PlayerForce < 25) {
z = PlayerForce / 200;
}
xmov = Xdist * z;
if ((Xdist > 0) && (PlayerVelX > 0)) {
xmov = xmov + PlayerVelX;
}
if ((Xdist < 0) && (PlayerVelX < 0)) {
xmov = xmov + PlayerVelX;
}
ymov = Ydist * z;
if ((Ydist > 0) && (PlayerVelY > 0)) {
ymov = ymov + PlayerVelY;
}
if ((Ydist < 0) && (PlayerVelY < 0)) {
ymov = ymov + PlayerVelY;
}
BallVelX = xmov;
BallVelY = ymov;
ChargeRate = 3 * Difficulty;
BallEnergy = BallEnergy + ((PlayerForce / ChargeRate) * (PlayerCombo + 1));
}
if ((ATTACK == true) && (hyp < 70)) {
if (PlayerForce >= 25) {
z = PlayerForce / 100;
} else if (PlayerForce < 25) {
z = PlayerForce / 80;
}
xmov = Xdist * z;
if ((Xdist > 0) && (PlayerVelX > 0)) {
xmov = xmov + PlayerVelX;
}
if ((Xdist < 0) && (PlayerVelX < 0)) {
xmov = xmov + PlayerVelX;
}
ymov = Ydist * z;
if ((Ydist > 0) && (PlayerVelY > 0)) {
ymov = ymov + PlayerVelY;
}
if ((Ydist < 0) && (PlayerVelY < 0)) {
ymov = ymov + PlayerVelY;
}
BallVelX = xmov;
BallVelY = ymov;
BallEnergy = BallEnergy + (PlayerForce / 5);
}
}
if (_local1.SHIELD.hitTest(Ball)) {
PlayerCombo = Math.round(PlayerCombo / 2);
PlayerScore = PlayerScore + (PlayerStamina / StageLevel);
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("blue");
if ((ATTACK == true) && (hyp >= 70)) {
xmov = Xdist / 7;
ymov = Ydist / 7;
BallVelX = xmov;
BallVelY = ymov;
BallEnergy = BallEnergy - (hyp / 7);
}
}
if (((_local1.AttackBox.hitTest(Enemy) && (PlayerForce > 25)) && (EnemyHURT == true)) && (TrainingMode == 2)) {
if (HIT == false) {
MeleeSound = new Sound();
MeleeSound.attachSound("meleeHIT");
MeleeSound.start();
PlayerCombo = PlayerCombo + 1;
SuperBar._yscale = SuperBar._yscale + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
meleeflash._visible = true;
meleeflash._x = Enemy._x;
meleeflash._y = Enemy._y;
meleeflash._x = meleeflash._x + (-PlayerVelX);
meleeflash._y = meleeflash._y + (-PlayerVelY);
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 5;
}
HIT = true;
}
EnemyHURT = true;
EnemyHealth = EnemyHealth - ((PlayerForce * PlayerCombo) / 100);
xmov = Xdist / 7;
ymov = Ydist / 7;
EnemyVelX = xmov;
EnemyVelY = ymov;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
}
if ((_local1.AttackBox.hitTest(Enemy) && (INVINCIBLE == true)) && (TrainingMode == 2)) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
SuperBar._yscale = SuperBar._yscale + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
meleeflash._visible = true;
meleeflash._x = Enemy._x;
meleeflash._y = Enemy._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 10;
}
HIT = true;
}
EnemyHURT = true;
EnemyHealth = EnemyHealth - (PlayerForce / 10);
xmov = Xdist / 7;
ymov = Ydist / 7;
EnemyVelX = xmov;
EnemyVelY = ymov;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
}
if (_local1.hurricane.ring.hitTest(Enemy) && (TrainingMode == 2)) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
SuperBar._yscale = SuperBar._yscale + 1;
PlayerScore = PlayerScore + (PlayerForce * PlayerCombo);
meleeflash._visible = true;
meleeflash._x = Enemy._x;
meleeflash._y = Enemy._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 10;
}
HIT = true;
}
EnemyHURT = true;
EnemyHealth = EnemyHealth - 5;
EnemyVelX = (-random(10)) + 10;
EnemyVelY = (-random(10)) + 10;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
}
if ((_local1.AttackBox.hitTest(Enemy) && (SWORD == true)) && (TrainingMode == 2)) {
if (HIT == false) {
PlayerCombo = PlayerCombo + 1;
SuperBar._yscale = SuperBar._yscale + 1;
PlayerScore = PlayerScore + (2 * (PlayerCombo + 1));
meleeflash._visible = true;
meleeflash._x = Enemy._x;
meleeflash._y = Enemy._y;
if (PlayerForce <= 25) {
meleeflash.gotoAndPlay("STALL");
} else if ((PlayerForce <= 50) && (PlayerForce > 25)) {
meleeflash.gotoAndPlay("KICK");
} else if ((PlayerForce < 100) && (PlayerForce > 50)) {
meleeflash.gotoAndPlay("PUNCH");
} else if (PlayerForce >= 100) {
meleeflash.gotoAndPlay("POWER");
}
if ((PlayerCombo > 1) && (PlayerHealth < 100)) {
PlayerHealth = PlayerHealth + 10;
}
HIT = true;
}
EnemyHURT = true;
EnemyHealth = EnemyHealth - (PlayerCombo + 1);
EnemyVelX = (Xdist / hyp) / 10;
EnemyVelY = (Ydist / hyp) / 10;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTback");
EnemyHURTback = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < Enemy._x)) {
Enemy.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
ImpactSound2.start();
PainSound2.start();
}
}
MySpeed = PlayerVelX + PlayerVelY;
if (MySpeed != 0) {
if ((_local1.hitTest(tree) && (HURT == true)) && (TREEDIE == false)) {
tree.gotoAndPlay("DIE");
TREEDIE = true;
}
if (_local1.hitTest(stoner) && (STONERATTACK == false)) {
stoner.gotoAndPlay("ATTACK");
STONERATTACK = true;
HURT = true;
PlayerHealth = PlayerHealth - 20;
PlayerVelX = 40;
PlayerVelY = -40;
ImpactSound = new Sound();
ImpactSound.attachSound("impactHURT");
PainSound = new Sound();
PainSound.attachSound("painHURT");
ImpactSound.start();
PainSound.start();
HURTback = true;
HURTfront = false;
_local1.gotoAndPlay("HURTback");
}
if ((_local1.hitTest(Cliff) && (HURT == true)) && (WALLDIE == false)) {
Cliff.gotoAndPlay("DIE");
WALLDIE = true;
}
if (((_local1.AttackBox.hitTest(Cliff) && (ATTACK == true)) && (PlayerForce >= 100)) && (WALLDIE == false)) {
Cliff.gotoAndPlay("DIE");
WALLDIE = true;
}
if ((_local1.hitTest(Cliff2) && (HURT == true)) && (WALLDIE2 == false)) {
Cliff2.gotoAndPlay("DIE");
WALLDIE2 = true;
}
if (((_local1.AttackBox.hitTest(Cliff2) && (ATTACK == true)) && (PlayerForce >= 100)) && (WALLDIE2 == false)) {
Cliff2.gotoAndPlay("DIE");
WALLDIE2 = true;
}
if ((_local1.hitTest(Cliff3) && (HURT == true)) && (WALLDIE3 == false)) {
Cliff3.gotoAndPlay("DIE");
WALLDIE3 = true;
}
if (((_local1.AttackBox.hitTest(Cliff3) && (ATTACK == true)) && (PlayerForce >= 100)) && (WALLDIE3 == false)) {
Cliff3.gotoAndPlay("DIE");
WALLDIE3 = true;
}
}
EnemySpeed = EnemyVelX + EnemyVelY;
if (EnemySpeed != 0) {
if ((Enemy.hitTest(tree) && (EnemyHURT == true)) && (TREEDIE == false)) {
tree.gotoAndPlay("DIE");
TREEDIE = true;
}
if ((Enemy.hitTest(Cliff) && (EnemyHURT == true)) && (WALLDIE == false)) {
Cliff.gotoAndPlay("DIE");
WALLDIE = true;
}
if ((Enemy.hitTest(Cliff2) && (EnemyHURT == true)) && (WALLDIE2 == false)) {
Cliff2.gotoAndPlay("DIE");
WALLDIE2 = true;
}
if ((Enemy.hitTest(Cliff3) && (EnemyHURT == true)) && (WALLDIE3 == false)) {
Cliff3.gotoAndPlay("DIE");
WALLDIE3 = true;
}
}
if ((((((HURT == false) && (DEAD == false)) && (ATTACK == false)) && (EnemyDEAD == false)) || (Kame == true)) || (Spiritball == true)) {
TargetReticle._x = _xmouse;
TargetReticle._y = _ymouse;
Mouse.hide();
TargetReticle._visible = true;
TargetReticle._alpha = 100;
} else {
Mouse.show();
TargetReticle._alpha = 10;
}
if ((Spiritball == false) && (KameHame == false)) {
if (PlayerForce <= 25) {
TargetReticle.GotoAndStop("SOFT");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
TargetReticle.GotoAndStop("MEDIUM");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
TargetReticle.GotoAndStop("HARD");
}
if (PlayerForce >= 100) {
TargetReticle.GotoAndStop("POWER");
}
} else if ((Spiritball == true) || (KameHame == true)) {
TargetReticle.GotoAndStop("POWER");
}
ConsoleMC._alpha = ConsoleMC._alpha * 0.95;
BG._x = BG._x + (-PlayerVelX);
BG._y = BG._y + (-PlayerVelY);
Ball._x = Ball._x + (-PlayerVelX);
Ball._y = Ball._y + (-PlayerVelY);
Enemy._x = Enemy._x + (-PlayerVelX);
Enemy._y = Enemy._y + (-PlayerVelY);
ground._x = ground._x + (-PlayerVelX);
wallTOP._x = wallTOP._x + (-PlayerVelX);
wallLEFT._x = wallLEFT._x + (-PlayerVelX);
wallRIGHT._x = wallRIGHT._x + (-PlayerVelX);
ground._y = ground._y + (-PlayerVelY);
wallTOP._y = wallTOP._y + (-PlayerVelY);
wallLEFT._y = wallLEFT._y + (-PlayerVelY);
wallRIGHT._y = wallRIGHT._y + (-PlayerVelY);
pickupINVINCIBILITY._x = pickupINVINCIBILITY._x + (-PlayerVelX);
pickupINVINCIBILITY._y = pickupINVINCIBILITY._y + (-PlayerVelY);
pickupHEALTH._x = pickupHEALTH._x + (-PlayerVelX);
pickupHEALTH._y = pickupHEALTH._y + (-PlayerVelY);
meleeflash._x = meleeflash._x + (-PlayerVelX);
meleeflash._y = meleeflash._y + (-PlayerVelY);
Cliff._x = Cliff._x + (-PlayerVelX);
Cliff._y = Cliff._y + (-PlayerVelY);
Cliff2._x = Cliff2._x + (-PlayerVelX);
Cliff2._y = Cliff2._y + (-PlayerVelY);
Cliff3._x = Cliff3._x + (-PlayerVelX);
Cliff3._y = Cliff3._y + (-PlayerVelY);
BARRIER._x = BARRIER._x + (-PlayerVelX);
BARRIER._y = BARRIER._y + (-PlayerVelY);
tree._x = tree._x + (-PlayerVelX);
tree._y = tree._y + (-PlayerVelY);
ORB._x = ORB._x + (-PlayerVelX);
ORB._y = ORB._y + (-PlayerVelY);
stoner._x = stoner._x + (-PlayerVelX);
stoner._y = stoner._y + (-PlayerVelY);
cloud._x = cloud._x + (-PlayerVelX);
cloud._y = cloud._y + (-PlayerVelY);
bluey._x = bluey._x + (-PlayerVelX);
bluey._y = bluey._y + (-PlayerVelY);
if ((((_local1._x > TargetReticle._x) && (HURT == false)) && (ATTACK == false)) && (DEAD == false)) {
_local1._xscale = -100;
PlayerFacingL = true;
PlayerFacingR = false;
} else if ((((_local1._x < TargetReticle._x) && (HURT == false)) && (ATTACK == false)) && (DEAD == false)) {
_local1._xscale = 100;
PlayerFacingR = true;
PlayerFacingL = false;
}
PlayerShadow._x = Player._x;
if (KameHame == false) {
PlayerShadow._xscale = Player._width + (Player._y / 2);
PlayerShadow._y = ground._y;
}
MySuper = SuperBar._yscale;
if (PlayerMaxCombo < 10) {
Rank = "Noob";
} else if (PlayerMaxCombo == 10) {
Rank = "Initiate";
} else if (PlayerMaxCombo == 15) {
Rank = "Goon";
} else if (PlayerMaxCombo == 20) {
Rank = "Thug";
} else if (PlayerMaxCombo == 25) {
Rank = "Novice";
} else if (PlayerMaxCombo == 30) {
Rank = "Average";
} else if (PlayerMaxCombo == 35) {
Rank = "Adept";
} else if (PlayerMaxCombo == 40) {
Rank = "Warrior";
} else if (PlayerMaxCombo == 45) {
Rank = "Solid";
} else if (PlayerMaxCombo == 50) {
Rank = "Liquid";
} else if (PlayerMaxCombo == 55) {
Rank = "Professional";
} else if (PlayerMaxCombo == 60) {
Rank = "Prodigy";
} else if (PlayerMaxCombo == 65) {
Rank = "Monk";
} else if (PlayerMaxCombo == 70) {
Rank = "Tengu";
} else if (PlayerMaxCombo == 75) {
Rank = "Jedi";
} else if (PlayerMaxCombo == 80) {
Rank = "Neo";
} else if (PlayerMaxCombo == 85) {
Rank = "Dragon";
} else if (PlayerMaxCombo == 90) {
Rank = "Master";
} else if (PlayerMaxCombo == 91) {
Rank = "Saiyan";
} else if (PlayerMaxCombo == 92) {
Rank = "Grand Master";
} else if (PlayerMaxCombo == 93) {
Rank = "Super Saiyan";
} else if (PlayerMaxCombo == 94) {
Rank = "Hyper Saiyan";
} else if (PlayerMaxCombo == 95) {
Rank = "Majin";
} else if (PlayerMaxCombo == 96) {
Rank = "Otaku";
} else if (PlayerMaxCombo == 97) {
Rank = "Akira";
} else if (PlayerMaxCombo == 98) {
Rank = "Deity";
} else if (PlayerMaxCombo == 99) {
Rank = "KYnetiK";
} else if (PlayerMaxCombo >= 100) {
Rank = "Wastoid";
}
ConsoleMC._alpha = ConsoleMC._alpha * 0.9;
if (HADOUKEN == true) {
PlayerVelY = 0;
PlayerVelX = 0;
if (PlayerFacingL == true) {
_local1._rotation = (angle * pi) + 180;
} else if (PlayerFacingR == true) {
_local1._rotation = angle * pi;
}
}
}
function enginePOWER() {
if (((((((HURT == false) && (SWORD == false)) && (Spiritball == false)) && (KameHame == false)) && (DEAD == false)) && (EnemyDEAD == false)) && (PlayerForce <= PlayerEnergy)) {
CHARGE = true;
Kame = false;
PowerBAR._alpha = 100;
PlayerForce = 0;
ChargeSound = new Sound();
ChargeSound.attachSound("ChargePush");
}
}
function engineATTACK() {
if ((((((((HURT == false) && (SWORD == false)) && (Spiritball == false)) && (Kame == false)) && (KameHame == false)) && (DEAD == false)) && (ATTACK == false)) && (EnemyDEAD == false)) {
ATTACK = true;
CHARGE = false;
PlayerStamina = PlayerStamina - PlayerForce;
aura._alpha = aura._alpha * 0.4;
ChargeSound.stop("ChargePush");
if (TargetReticle._y <= Player._y) {
if (PlayerForce <= 25) {
Player.GotoAndPlay("hitUP1");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
Player.GotoAndPlay("hitUP2");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
Player.GotoAndPlay("hitUP3");
}
if (PlayerForce >= 100) {
Player.GotoAndPlay("hitUP4");
}
}
if (TargetReticle._y > Player._y) {
if (PlayerForce <= 25) {
Player.GotoAndPlay("hitDOWN1");
}
if ((PlayerForce <= 50) && (PlayerForce > 25)) {
Player.GotoAndPlay("hitDOWN2");
}
if ((PlayerForce < 100) && (PlayerForce > 50)) {
Player.GotoAndPlay("hitDOWN3");
}
if (PlayerForce >= 100) {
Player.GotoAndPlay("hitDOWN4");
}
}
}
}
function engineDEFEND() {
if (Key.getCode() == 84) {
TrainingMode = TrainingMode + 1;
SuperBar._yscale = 0;
PlayerMaxCombo = PlayerMaxCombo - PlayerMaxCombo;
if (TrainingMode == 0) {
Console = "Solo";
}
if (TrainingMode == 1) {
ConsoleMC.Console = "Training Bot";
ConsoleMC.gotoAndPlay(1);
}
if (TrainingMode == 2) {
ConsoleMC.Console = "Combat";
ConsoleMC.gotoAndPlay(1);
}
if (TrainingMode > 2) {
TrainingMode = 0;
ConsoleMC.Console = "Solo";
ConsoleMC.gotoAndPlay(1);
}
init();
}
if (Key.getCode() == 77) {
MusicMode = MusicMode + 1;
if (MusicMode > 3) {
MusicMode = 0;
}
if (MusicMode == 1) {
PracticeMusic.start(0, 999);
PracticeMusic2.stop("BentoBGM");
ConsoleMC.Console = "BGM 1 by KYnetiK";
ConsoleMC.gotoAndPlay(1);
}
if (MusicMode == 2) {
PracticeMusic2.start(0, 999);
PracticeMusic.stop("PracticeBGM");
ConsoleMC.Console = "BGM 2 by Bento";
ConsoleMC.gotoAndPlay(1);
}
if (MusicMode == 3) {
PracticeMusic3.start(0, 999);
PracticeMusic.stop("BentoBGM");
ConsoleMC.Console = "BGM 3 by Bento";
ConsoleMC.gotoAndPlay(1);
}
if (MusicMode == 0) {
PracticeMusic.stop("PracticeBGM");
PracticeMusic2.stop("BentoBGM");
PracticeMusic3.stop("Bento2BGM");
ConsoleMC.Console = "BGM muted";
ConsoleMC.gotoAndPlay(1);
}
}
if (Key.getCode() == 71) {
MovieQuality = MovieQuality + 1;
if (MovieQuality > 3) {
MovieQuality = 0;
}
if (MovieQuality == 0) {
_quality = "BEST";
ConsoleMC.Console = "Quality set BEST";
ConsoleMC.gotoAndPlay(1);
}
if (MovieQuality == 1) {
_quality = "HIGH";
ConsoleMC.Console = "Quality set HIGH";
ConsoleMC.gotoAndPlay(1);
}
if (MovieQuality == 2) {
_quality = "MEDIUM";
ConsoleMC.Console = "Quality set MEDIUM";
ConsoleMC.gotoAndPlay(1);
}
if (MovieQuality == 3) {
_quality = "LOW";
ConsoleMC.Console = "Quality set LOW";
ConsoleMC.gotoAndPlay(1);
}
}
if (((Key.getCode() == 81) && (DEAD == false)) && (EnemyDEAD == false)) {
TechMode = TechMode - 1;
if (TechMode < 0) {
TechMode = 5;
}
}
if (((Key.getCode() == 69) && (DEAD == false)) && (EnemyDEAD == false)) {
TechMode = TechMode + 1;
if (TechMode > 5) {
TechMode = 0;
}
}
if (((Key.getCode() == 32) && (HURTfront == true)) && (PlayerStamina >= 50)) {
ATTACK = true;
RECOVER = true;
PlayerStamina = PlayerStamina * 0.5;
Player.gotoAndPlay("Recover");
HURTfront = false;
HURT = false;
}
if (((Key.getCode() == 32) && (HURTback == true)) && (PlayerStamina >= 50)) {
ATTACK = true;
RECOVER = true;
PlayerStamina = PlayerStamina * 0.5;
Player.gotoAndPlay("Recover2");
HURTback = false;
HURT = false;
}
if ((((ATTACK == false) && (HURT == false)) && (DEAD == false)) && (EnemyDEAD == false)) {
if (((((Key.getCode() == 32) && (TechMode == 5)) && (CHARGE == false)) && (MySuper >= 30)) && (GodMode == false)) {
ATTACK = true;
Player.gotoAndPlay("Kamehameha");
Kame = true;
PlayerVelY = 0;
PlayerVelX = 0;
SuperBar._yscale = SuperBar._yscale - 30;
}
if ((((Key.getCode() == 32) && (TechMode == 5)) && (CHARGE == false)) && (GodMode == true)) {
ATTACK = true;
Player.gotoAndPlay("Kamehameha");
Kame = true;
PlayerVelY = 0;
PlayerVelX = 0;
}
if (((((Key.getCode() == 32) && (TechMode == 4)) && (CHARGE == false)) && (MySuper >= 20)) && (GodMode == false)) {
ATTACK = true;
Player.gotoAndPlay("Spiritball");
Spiritball = true;
PlayerVelY = 0;
PlayerVelX = 0;
SuperBar._yscale = SuperBar._yscale - 20;
}
if ((((Key.getCode() == 32) && (TechMode == 4)) && (CHARGE == false)) && (GodMode == true)) {
ATTACK = true;
Player.gotoAndPlay("Spiritball");
Spiritball = true;
PlayerVelY = 0;
PlayerVelX = 0;
}
if (((((Key.getCode() == 32) && (TechMode == 3)) && (CHARGE == false)) && (MySuper >= 10)) && (GodMode == false)) {
ATTACK = true;
Player.gotoAndPlay("Flurry");
PlayerForce = 90;
SuperBar._yscale = SuperBar._yscale - 10;
}
if ((((Key.getCode() == 32) && (TechMode == 3)) && (CHARGE == false)) && (GodMode == true)) {
ATTACK = true;
Player.gotoAndPlay("Flurry");
PlayerForce = 90;
}
if (((((Key.getCode() == 32) && (TechMode == 2)) && (CHARGE == false)) && (MySuper >= 5)) && (GodMode == false)) {
ATTACK = true;
Player.gotoAndPlay("SpiritSword");
PlayerForce = 90;
if (Player.hitTest(ground)) {
Player._y = Player._y - 10;
}
SuperBar._yscale = SuperBar._yscale - 5;
}
if ((((Key.getCode() == 32) && (TechMode == 2)) && (CHARGE == false)) && (GodMode == true)) {
ATTACK = true;
Player.gotoAndPlay("SpiritSword");
PlayerForce = 90;
if (Player.hitTest(ground)) {
Player._y = Player._y - 10;
}
}
if (((Key.getCode() == 32) && (TechMode == 1)) && (Trainer._visible == false)) {
TrainerORBIT = true;
ATTACK = true;
Player.gotoAndPlay("ForceBlade");
Trainer._visible = true;
TO = 0;
if (GODMODE == false) {
}
Trainer.gotoAndStop(2);
}
if (((Key.getCode() == 32) && (TechMode == 0)) && (CHARGE == false)) {
Player.gotoAndPlay("SHIELD");
ATTACK = true;
PlayerStamina = PlayerStamina * 0.7;
this.ShieldSparks._rotation = this.ShieldSparks._rotation + random(360);
if (GODMODE == false) {
}
}
if ((((Key.getCode() == 32) && (TechMode != 0)) && (DOSHIELD == true)) && (CHARGE == false)) {
Player.gotoAndPlay("SHIELD");
ATTACK = true;
PlayerStamina = PlayerStamina * 0.7;
this.ShieldSparks._rotation = this.ShieldSparks._rotation + random(360);
if (GODMODE == false) {
}
}
if (((Key.getCode() == 32) && (TechMode == 6)) && (CHARGE == false)) {
HADOUKEN = true;
Player.gotoAndPlay("Hadouken");
ATTACK = true;
PlayerStamina = PlayerStamina * 0.7;
if (GODMODE == false) {
SuperBar._yscale = SuperBar._yscale - 5;
}
shotname = Number(shotname) + 1;
if (Number(shotname) >= 4) {
shotname = 1;
}
if (Number(shotname) < 4) {
shotname = Number(shotname) + 1;
duplicateMovieClip (_root.fireball, "hadouken" + shotname, shotname);
}
setProperty("hadouken" + shotname, _rotation , MYANGLE);
setProperty("hadouken" + shotname, _x , Number(Player._x));
setProperty("hadouken" + shotname, _y , Number(Player._y));
HDistX = _xmouse - Player._x;
HDistY = _ymouse - Player._y;
shotspeed = 5;
Hxmov = HDistX / shotspeed;
Hymov = HDistY / shotspeed;
}
if (Key.getCode() == 16) {
Player.gotoAndPlay("TELEPORT");
TeleportSprite.gotoAndPlay("2");
TELEPORT = true;
PlayerStamina = PlayerStamina / 3;
PlayerScore = PlayerScore + (PlayerStamina * StageLevel);
TeleportSound = new Sound();
TeleportSound.attachSound("SuperSpeed");
TeleportSound.start();
}
}
}
function engineTRAINER() {
var _local1 = this;
if (DEAD == false) {
_local1._x = _local1._x + TrainerVelX;
_local1._y = _local1._y + TrainerVelY;
TrainerNEUTRAL = true;
MydistX = _xmouse - _local1._x;
MydistY = _ymouse - _local1._y;
Mydir = Math.atan2(MydistY, MydistX);
_local1._rotation = Mydir * pi;
} else {
TrainerNEUTRAL == false;
}
if (_local1.hitTest(ground) && (TrainerVelY > 0)) {
TrainerVelY = TrainerVelY * -0.5;
}
if (_local1.hitTest(wallRIGHT) && (TrainerVelX > 0)) {
_local1._x = _local1._x - 1;
TrainerVelX = TrainerVelX * -0.5;
}
if (_local1.hitTest(wallLEFT) && (TrainerVelX < 0)) {
_local1._x = _local1._x + 1;
TrainerVelX = TrainerVelX * -0.5;
}
if (_local1.hitTest(wallTOP) && (TrainerVelY < 0)) {
_local1._y = _local1._y + 1;
TrainerVelY = TrainerVelY * -0.5;
}
if (TrainerORBIT == true) {
_local1._x = _local1._x + (-PlayerVelX);
_local1._y = _local1._y + (-PlayerVelY);
TO = TO + 1;
if (TO >= 25) {
TO = 0;
TrainerORBIT = false;
}
PlayerStamina = PlayerStamina * 0.92;
Txdist = TargetReticle._x - _local1._x;
Tydist = TargetReticle._y - _local1._y;
TrainerVelX = TrainerVelX + (Txdist / (hyp / 10));
TrainerVelY = TrainerVelY + (Tydist / (hyp / 10));
} else {
Txdist = Player._x - _local1._x;
Tydist = Player._y - _local1._y;
TrainerVelX = TrainerVelX + (Txdist / 50);
TrainerVelY = TrainerVelY + (Tydist / 50);
_local1._x = _local1._x + (-PlayerVelX);
_local1._y = _local1._y + (-PlayerVelY);
}
TrainerVelX = TrainerVelX * 0.8;
TrainerVelY = TrainerVelY * 0.8;
if ((((_local1.hitTest(Ball) && (_local1._visible == true)) && (DEAD == false)) && (EnemyDEAD == false)) && (TrainerATTACK == false)) {
ReflectSound = new Sound();
ReflectSound.attachSound("reflect");
ReflectSound.start();
TrainerORBIT = false;
TrainerVelX = 0;
TrainerVelY = 0;
BallTag = 1;
PlayerCombo = PlayerCombo + 1;
_local1.gotoAndPlay("ATTACK2");
TrainerATTACK = true;
TrainerPlayerDistX = Player._x - _local1._x;
TrainerForceX = TrainerPlayerDistX / 15;
TrainerForceY = -20;
BallVelX = TrainerForceX;
BallVelY = BallVelY + TrainerForceY;
}
}
function engineORB() {
var _local1 = this;
if (TrainingMode == 1) {
if (_local1._x > Player._x) {
_local1._xscale = 100;
} else if (_local1._x < Player._x) {
_local1._xscale = -100;
}
if (BallTag > -1) {
_local1._x = _local1._x + ORBvelX;
_local1._y = _local1._y + ORBvelY;
ORBtoBallDistX = Ball._x - _local1._x;
ORBtoBallDistY = Ball._y - _local1._y;
ORBvelX = ORBtoBallDistX / 30;
ORBvelY = ORBtoBallDistY / 30;
}
if (_local1.hitTest(Ball) && (!Ball.hitTest(Player))) {
_local1.gotoAndPlay("ATTACK1");
ORBtoPlayerDistX = Player._x - _local1._x;
ORBtoPlayerDistY = (Player._y - 50) - _local1._y;
BallTag = 2;
BallEnergy = BallEnergy + 10;
BallVelX = ORBtoPlayerDistX / 20;
BallVelY = ORBtoPlayerDistY / 10;
}
if (_local1.hitTest(ground) && (ORBvelY > 0)) {
if (ORBvelY >= 5) {
ORBvelY = ORBvelY * -1;
}
}
if (_local1.hitTest(wallRIGHT) && (ORBvelX > 0)) {
_local1._x = _local1._x - 1;
ORBvelX = ORBvelX * -1;
}
if (_local1.hitTest(wallLEFT) && (ORBvelX < 0)) {
_local1._x = _local1._x + 1;
ORBVelX = ORBVelX * -1;
}
if (_local1.hitTest(wallTOP) && (ORBvelY < 0)) {
_local1._y = _local1._y + 1;
ORBvelY = ORBvelY * -1;
}
}
}
function engineORB2() {
var _local1 = this;
if (_local1._x > Player._x) {
_local1._xscale = 100;
} else if (_local1._x < Player._x) {
_local1._xscale = -100;
}
_local1._x = _local1._x + ORB2velX;
_local1._y = _local1._y + ORB2velY;
if (_local1.hitTest(Ball) && (!Ball.hitTest(Player))) {
_local1.gotoAndPlay("ATTACK1");
ORB2toPlayerDistX = Player._x - _local1._x;
ORB2toPlayerDistY = (Player._y - 50) - _local1._y;
PlayerCombo = PlayerCombo + 1;
ORB2VelX = random(6) - random(6);
ORB2VelY = random(6) - random(6);
BallVelX = ORB2toPlayerDistX / 20;
BallVelY = (-ORB2toPlayerDistY) / 10;
}
if (_local1.hitTest(ground) && (ORB2velY > 0)) {
_local1._y = _local1._y - 1;
ORB2velY = ORB2velY * -1;
}
if (_local1.hitTest(wallRIGHT) && (ORB2velX > 0)) {
_local1._x = _local1._x - 1;
ORB2velX = ORB2velX * -1;
}
if (_local1.hitTest(wallLEFT) && (ORB2velX < 0)) {
_local1._x = _local1._x + 1;
ORB2VelX = ORB2VelX * -1;
}
if (_local1.hitTest(wallTOP) && (ORB2velY < 0)) {
_local1._y = _local1._y + 1;
ORB2velY = ORB2velY * -1;
}
}
function engineENEMY() {
var _local1 = this;
if (TrainingMode == 2) {
EnemyAccel = random(40) + 10;
if ((BallTag == 2) || (BallTag == 0)) {
if ((HURT == false) && (EnemyATTACK == false)) {
EnemyBallDistX = Ball._x - _local1._x;
EnemyBallDistY = Ball._y - _local1._y;
EnemyMovX = (EnemyBallDistX + EnemyBallDistX) / 10;
EnemyMovY = (EnemyBallDistY + EnemyBallDistY) / 10;
}
if ((((HURT == true) && (Player._y > 100)) && (!Player.hitTest(ground))) && (EnemyATTACK == false)) {
EnemyBallDistX = Player._x - _local1._x;
EnemyBallDistY = Player._y - _local1._y;
EnemyMovX = (EnemyBallDistX / EnemyAccel) * 4;
EnemyMovY = (EnemyBallDistY / EnemyAccel) * 4;
}
if (((HURT == true) && (Player._y < 100)) || (Player.hitTest(ground) && (EnemyATTACK == false))) {
EnemyBallDistX = Ball._x - _local1._x;
EnemyBallDistY = Ball._y - _local1._y;
EnemyMovX = (EnemyBallDistX / EnemyAccel) * 3;
EnemyMovY = (EnemyBallDistY / EnemyAccel) * 3;
}
}
if (((BallTag == 1) && (HURT == false)) && (EnemyATTACK == false)) {
EnemyBallDistX = Ball._x - _local1._x;
EnemyBallDistY = Ball._y - _local1._y;
EnemyMovX = EnemyBallDistX / EnemyAccel;
EnemyMovY = EnemyBallDistY / EnemyAccel;
}
if (((EnemyHURT == false) && (EnemyATTACK == false)) && (DEAD == false)) {
_local1._x = _local1._x + EnemyMovX;
_local1._y = _local1._y + EnemyMovY;
}
if (EnemyHURT == true) {
_local1._x = _local1._x + EnemyVelX;
_local1._y = _local1._y + EnemyVelY;
if (EnemyVelY > 15) {
EnemyVelY = 15;
}
}
if (EnemyHURT == true) {
if (!_local1.hitTest(ground)) {
EnemyVelY = EnemyVelY + 1;
EnemyVelX = EnemyVelX * 0.95;
EnemyMovY = EnemyMovY + PlayerMass;
EnemyMovX = EnemyMovX * 0.95;
}
}
if ((((_local1.hitTest(Player) && (Player._y > 100)) && (!Player.hitTest(ground))) && (HURT == true)) && (EnemyATTACK == false)) {
EnemyPower = random(16) + 4;
PlayerHealth = PlayerHealth - EnemyPower;
PlayerStamina = PlayerStamina - EnemyPower;
meleeflash._visible = true;
meleeflash._x = Player._x;
meleeflash._y = Player._y;
meleeflash.gotoAndPlay("POWER");
if (Player._x > Enemy._x) {
if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitUP4");
EnemyForceX = 30;
EnemyForceY = -20;
} else if ((EnemyPower <= 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitUP3");
EnemyForceX = 20;
EnemyForceY = -15;
} else if ((EnemyPower < 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitUP2");
EnemyForceX = 10;
EnemyForceY = -10;
} else if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitUP2");
EnemyForceX = 15;
EnemyForceY = -15;
}
}
if (Player._x <= Enemy._x) {
if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitUP4");
EnemyForceX = -30;
EnemyForceY = -20;
} else if ((EnemyPower <= 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitUP3");
EnemyForceX = -20;
EnemyForceY = -15;
} else if ((EnemyPower < 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitUP2");
EnemyForceX = -10;
EnemyForceY = -10;
} else if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitUP2");
EnemyForceX = -15;
EnemyForceY = -15;
}
}
HURT = true;
EnemyATTACK = true;
PlayerVelX = EnemyForceX;
PlayerVelY = EnemyForceY;
if ((PlayerFacingR == true) && (EnemyForceX >= 0)) {
Player.gotoAndPlay("HURTback");
HURTback = true;
HURTfront = false;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingL == true) && (EnemyForceX < 0)) {
Player.gotoAndPlay("HURTback");
HURTback = true;
HURTfront = false;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingR == true) && (EnemyForceX < 0)) {
Player.gotoAndPlay("HURTfront");
HURTfront = true;
HURTback = false;
ImpactSound.start();
PainSound.start();
}
if ((PlayerFacingL == true) && (EnemyForceX >= 0)) {
Player.gotoAndPlay("HURTfront");
HURTfront = true;
HURTback = false;
ImpactSound.start();
PainSound.start();
}
}
EnemyTeleportNOW = random(101);
if ((((((EnemyTeleport == false) && (EnemyTeleportNOW > 99)) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (DEAD == false)) && (EnemyDEAD == false)) {
Enemy.gotoAndPlay("TELEPORT");
EnemyTeleport = true;
}
EnemyHadoukenNOW = random(51);
if ((((((EnemyHadouken == false) && (EnemyHadoukenNOW > 149)) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (DEAD == false)) && (EnemyDEAD == false)) {
Enemy.gotoAndPlay("Hadouken");
if (_local1._x > Player._x) {
_local1._xscale = -90;
Enemy._rotation = -EnemyAngle2;
} else if (_local1._x < Player._x) {
_local1._xscale = 90;
Enemy._rotation = -EnemyAngle2;
}
shotname = Number(shotname) + 1;
if (Number(shotname) >= 4) {
shotname = 1;
}
if (Number(shotname) < 4) {
shotname = Number(shotname) + 1;
duplicateMovieClip (_root.fireball, "hadouken" + shotname, shotname);
}
setProperty("hadouken" + shotname, _rotation , EnemyAngle2);
setProperty("hadouken" + shotname, _x , Number(Enemy._x));
setProperty("hadouken" + shotname, _y , Number(Enemy._y));
HDistX = -(Enemy._x - Player._x);
HDistY = -(Enemy._y - Player._y);
shotspeed = 5;
Hxmov = HDistX / shotspeed;
Hymov = HDistY / shotspeed;
EnemyHadouken = true;
}
if (EnemyHURT == true) {
EnemyATTACK == false;
}
if (Enemy.hitTest(Player.BEAhitbox)) {
EnemyHURT = true;
EnemyHealth = EnemyHealth - (PlayerCombo + 1);
EnemyVelX = Xdist / 30;
EnemyVelY = Ydist / 30;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (Player._x < _local1._x)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x > _local1._x)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (Player._x > _local1._x)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (Player._x < _local1._x)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
}
if (((Enemy.hitTest(Ball) && (BallEnergy >= 30)) && (BallTag == 1)) && (EnemyHURT == true)) {
EnemyHURT = true;
PlayerCombo = PlayerCombo + 1;
SuperBar._yscale = SuperBar._yscale + 1;
EnemyHealth = EnemyHealth - (BallEnergy / 3);
EnemyVelX = BallVelX / 2;
EnemyVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
}
if ((((EnemyHURT == false) && (DEAD == false)) && (EnemyHadouken == false)) && (EnemyDEAD == false)) {
if (((((EnemyMovY < 0) && (EnemyMovX >= -1)) && (EnemyMovX <= 1)) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYup");
}
}
if ((((((((((!_local1.hitTest(ground)) && (EnemyMovX >= -1)) && (EnemyMovX <= 1)) && (EnemyMovY > 0)) && (EnemyHURT == false)) && (DEAD == false)) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) && (EnemyDEAD == false)) && (EnemyHadouken == false)) {
_local1.gotoAndPlay("FLYdown");
}
if ((((((EnemyATTACK == false) && (EnemyHadouken == false)) && (EnemyHURT == false)) && (DEAD == false)) && (EnemyFacingR == true)) && (EnemyDEAD == false)) {
if (((EnemyMovX < -1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if (((EnemyMovX > 1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
} else if ((((((EnemyATTACK == false) && (EnemyHadouken == false)) && (EnemyHURT == false)) && (DEAD == false)) && (EnemyDEAD == false)) && (EnemyFacingL == true)) {
if (((EnemyMovX > 1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYbackward");
}
if (((EnemyMovX < -1) && (EnemyATTACK == false)) && (EnemyTELEPORT == false)) {
_local1.gotoAndPlay("FLYforward");
}
}
EnemyShadow._x = Enemy._x;
EnemyShadow._x = EnemyShadow._x + (-PlayerVelX);
EnemyShadow._xscale = Enemy._width + (Enemy._y / 2);
EnemyShadow._y = ground._y;
if (((EnemyHURT == false) && (BallTag == 1)) && (EnemyHadouken == false)) {
if (_local1._x > Player._x) {
_local1._xscale = 90;
EnemyFacingL = true;
EnemyFacingR = false;
} else if (_local1._x < Player._x) {
_local1._xscale = -90;
EnemyFacingR = true;
EnemyFacingL = false;
}
}
if ((((EnemyHURT == false) && (BallTag != 1)) && (HURT == true)) && (EnemyHadouken == false)) {
if (_local1._x > Player._x) {
_local1._xscale = 90;
EnemyFacingL = true;
EnemyFacingR = false;
} else if (_local1._x < Player._x) {
_local1._xscale = -90;
EnemyFacingR = true;
EnemyFacingL = false;
}
}
if ((((EnemyHURT == false) && (BallTag != 1)) && (HURT == false)) && (EnemyHadouken == false)) {
if (_local1._x > Ball._x) {
_local1._xscale = 90;
EnemyFacingL = true;
EnemyFacingR = false;
} else if (_local1._x < Ball._x) {
_local1._xscale = -90;
EnemyFacingR = true;
EnemyFacingL = false;
}
}
if (DEAD == false) {
if (_local1.hitTest(ground)) {
EnemyVelY = 0;
if (EnemyHURTback == true) {
_local1.gotoAndPlay("HITground");
EnemyVelX = 0;
} else if (EnemyHURTfront == true) {
_local1.gotoAndPlay("HITground2");
EnemyVelX = 0;
}
}
if (_local1.hitTest(wallRIGHT)) {
Enemy._x = Enemy._x - 1;
BARRIER.gotoAndPlay("HITRIGHT");
EnemyVelX = EnemyVelX * -0.5;
EnemyMovX = EnemyMovX * -1.1;
if ((EnemyHURTfront == true) && (EnemyVelX < -1)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
EnemyHURTfront = false;
} else if ((EnemyHURTback == true) && (EnemyVelX < -1)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTback = false;
EnemyHURTfront = true;
}
}
if (_local1.hitTest(wallLEFT)) {
Enemy._x = Enemy._x + 1;
BARRIER.gotoAndPlay("HITLEFT");
EnemyVelX = EnemyVelX * -0.5;
EnemyMovX = EnemyMovX * -1.1;
if ((EnemyHURTfront == true) && (EnemyVelX > 1)) {
_local1.gotoAndPlay(206);
EnemyHURTback = true;
EnemyHURTfront = false;
WallImpactSound = new Sound();
WallImpactSound.attachSound("wallIMPACT");
WallImpactSound.start();
} else if ((EnemyHURTback == true) && (EnemyVelX > 1)) {
_local1.gotoAndPlay(239);
EnemyHURTback = false;
EnemyHURTfront = true;
}
}
if (_local1.hitTest(wallTOP) && (EnemyVelY < 0)) {
Enemy._y = Enemy._y + 1;
BARRIER.gotoAndPlay("HITTOP");
EnemyVelY = EnemyVelY * -1;
}
}
EnemyHealthBall._xscale = EnemyHealth / 2;
EnemyHealthBall._yscale = EnemyHealthBall._xscale;
if (((_local1.HITBOX.hitTest(Ball) && (EnemyHURT == false)) && (EnemyATTACK == false)) && (EnemyDEAD == false)) {
EnemyChoice = random(101);
if (EnemyChoice >= 30) {
EnemyPower = random(24) + 1;
meleeflash._visible = true;
meleeflash._x = Ball._x;
meleeflash._y = Ball._y;
meleeflash.gotoAndPlay("POWER");
DoICombo = random(101);
if (DoICombo <= 50) {
if (Player._y <= Enemy._y) {
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitUP4");
} else if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitUP3");
} else if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitUP2");
} else if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitUP1");
}
}
if (Player._y > Enemy._y) {
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitDOWN4");
} else if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitDOWN3");
} else if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitDOWN2");
} else if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitDOWN1");
}
}
BallTag = 2;
EnemyATTACK = true;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Player._x - _local1._x;
EnemyPlayerDistY = Player._y - _local1._y;
EnemyForceX = EnemyPlayerDistX / EnemyPower;
EnemyForceY = EnemyPlayerDistY / EnemyPower;
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
Ball._xscale = Ball._xscale + (EnemyPower / 3);
Ball._yscale = Ball._yscale + (EnemyPower / 3);
} else if (DoICombo > 50) {
BallTag = 2;
if (EnemyPower <= 5) {
_local1.GotoAndPlay("hitUP1");
} else if ((EnemyPower <= 10) && (EnemyPower > 5)) {
_local1.GotoAndPlay("hitUP2");
} else if ((EnemyPower < 15) && (EnemyPower > 10)) {
_local1.GotoAndPlay("hitUP3");
} else if (EnemyPower >= 15) {
_local1.GotoAndPlay("hitUP4");
}
EnemyATTACK = true;
BallEnergy = BallEnergy + EnemyPower;
EnemyPlayerDistX = Enemy._x - Ball._x;
EnemyForceX = EnemyPlayerDistX / EnemyPower;
EnemyForceY = -EnemyPower;
BallVelX = EnemyForceX;
BallVelY = EnemyForceY;
}
} else if (((BallEnergy >= 30) && (BallTag == 1)) && (EnemyChoice < 30)) {
EnemyHURT = true;
PlayerCombo = PlayerCombo + 1;
SuperBar._yscale = SuperBar._yscale + 1;
EnemyHealth = EnemyHealth - (((PlayerCombo + 1) * BallEnergy) / 100);
EnemyVelX = BallVelX / 2;
EnemyVelY = -5;
Ball._xscale = BallSize;
Ball._yscale = BallSize;
ImpactSound2 = new Sound();
ImpactSound2.attachSound("impactHURT");
PainSound2 = new Sound();
PainSound2.attachSound("painHURT");
if ((EnemyFacingR == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTback");
EnemyHURTback = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingR == true) && (BallVelX < 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
if ((EnemyFacingL == true) && (BallVelX > 0)) {
_local1.gotoAndPlay("HURTfront");
EnemyHURTfront = true;
BallEnergy = BallEnergy / 3;
ImpactSound2.start();
PainSound2.start();
}
}
}
if ((EnemyHealth < 1) && (EnemyDEAD == false)) {
EnemyDEAD = true;
EnemyHealthBall._alpha = 0;
Mouse.show();
Kame = false;
KameHame = false;
Spiritball = false;
PlayerScore = PlayerScore + (1000 * (StageLevel + 1));
Player.gotoAndPlay("I WIN");
GAMEOVER2._visible = true;
}
}
}
ConsoleMC.Console = "";
GodMode = false;
SuperBar._yscale = 0;
CONE = false;
TechMode = 0;
PlayerScore = 0;
TrainingMode = 0;
MovieQuality = 0;
MusicMode = 1;
StageLevel = 1;
StageLevelE = 0;
PlayerMass = 1.7;
Ball._xscale = 50;
Ball._yscale = 50;
BallVelX = 0;
BallVelY = -15;
PlayerCombo = 0;
PlayerMaxCombo = 0;
DispCoFe._visible = false;
combodisplay._alpha = 0;
combodisplay2._visible = false;
MAXcomboDisplay._visible = false;
DefendListener = new Object();
Key.addListener(DefendListener);
DefaultPlayerRot = Player._rotation;
DefaultBeamRot = Player._rotation;
Trainer._visible = false;
if (BallType == 3) {
BallMass = 0.5;
BallTMass = 0.5;
} else if (BallType == 2) {
BallMass = 1;
BallTMass = 1;
} else if (BallType == 1) {
BallMass = 2;
BallTMass = 2;
}
BallSize = Ball._xscale;
init();
stop();
Symbol 62 MovieClip [hadouken_mcR] Frame 1
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
if ((((Number(my_y) > Number(_root.ground._y)) or (Number(my_y) < Number(_root.wallTOP._y))) or (Number(my_x) > Number(_root.wallRIGHT._x))) or (Number(my_x) < Number(_root.wallLEFT._x))) {
gotoAndPlay ("HIT");
} else {
_x = (Number(my_x) + Number(_root.Hxmov));
_y = (Number(my_y) + Number(_root.Hymov));
}
Symbol 62 MovieClip [hadouken_mcR] Frame 2
gotoAndPlay (1);
Symbol 62 MovieClip [hadouken_mcR] Frame 23
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 62 MovieClip [hadouken_mcR] Frame 24
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 62 MovieClip [hadouken_mcR] Frame 25
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 62 MovieClip [hadouken_mcR] Frame 26
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 62 MovieClip [hadouken_mcR] Frame 27
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 62 MovieClip [hadouken_mcR] Frame 28
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 62 MovieClip [hadouken_mcR] Frame 29
removeMovieClip("");
Symbol 62 MovieClip [hadouken_mcR] Frame 35
stop();
Symbol 63 MovieClip [solo] Frame 1
stop();
Symbol 63 MovieClip [solo] Frame 5
stop();
Symbol 72 MovieClip [duel] Frame 1
stop();
Symbol 72 MovieClip [duel] Frame 5
stop();
Symbol 164 MovieClip Frame 7
stop();
Symbol 166 Button
on (release) {
_root.gotoAndStop("MAINMENU");
}
Symbol 186 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("LOADED");
}
Symbol 186 MovieClip Frame 2
gotoAndPlay (1);
Symbol 186 MovieClip Frame 3
_root.P.gotoAndPlay(12);
_root.GameMode = 3;
_root.BallType = 2;
_root.Difficulty = 2;
Symbol 192 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 5
stop();
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 5
stop();
Symbol 198 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 5
stop();
Symbol 201 MovieClip Frame 1
stop();
Symbol 201 MovieClip Frame 5
stop();
Symbol 204 Button
on (release) {
stopAllSounds();
if (_root.GameMode == 2) {
_root.gotoAndPlay("LEVEL1");
} else if (_root.GameMode == 3) {
_root.gotoAndPlay("TUTORIAL");
}
}
Symbol 241 MovieClip Frame 65
stop();
Symbol 281 MovieClip Frame 29
gotoAndPlay (26);
Symbol 399 MovieClip Frame 50
stop();
Symbol 516 MovieClip Frame 1
_root.HURT = false;
_root.HURTfront = false;
_root.HURTback = false;
Symbol 516 MovieClip Frame 10
gotoAndPlay ("IDLE");
Symbol 557 MovieClip Frame 1
_root.BallTag = 0;
stop();
Symbol 557 MovieClip Frame 81
stop();
Symbol 573 MovieClip Frame 1
stop();
Symbol 630 MovieClip Frame 1
stop();
_root.Player._visible = true;
_root.Player._alpha = 100;
Symbol 630 MovieClip Frame 4
_root.Player._visible = false;
_root.PlayerVelX = _root.PlayerVelX * 15;
_root.PlayerVelY = _root.PlayerVelY * 15;
Symbol 630 MovieClip Frame 5
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 630 MovieClip Frame 8
_root.Player._visible = true;
Symbol 630 MovieClip Frame 10
gotoAndStop (1);
Symbol 631 MovieClip Frame 1
_root.HURT = false;
_root.HURTfront = false;
_root.HURTback = false;
Symbol 638 MovieClip Frame 34
stop();
Symbol 760 Button
on (release) {
gotoAndPlay (9);
}
Symbol 768 Button
on (release) {
gotoAndPlay (16);
}
Symbol 1105 MovieClip Frame 1
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1105 MovieClip Frame 2
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1105 MovieClip Frame 3
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1105 MovieClip Frame 4
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1105 MovieClip Frame 5
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1105 MovieClip Frame 6
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1105 MovieClip Frame 7
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1105 MovieClip Frame 8
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 1
_root.HURT = false;
_root.HURTfront = false;
_root.HURTback = false;
_root.SWORD = false;
Symbol 1198 MovieClip Frame 10
gotoAndPlay ("IDLE");
Symbol 1198 MovieClip Frame 22
gotoAndPlay ("FLYforward");
Symbol 1198 MovieClip Frame 34
gotoAndPlay ("FLYbackward");
Symbol 1198 MovieClip Frame 46
gotoAndPlay ("FLYup");
Symbol 1198 MovieClip Frame 51
gotoAndPlay ("FALL");
Symbol 1198 MovieClip Frame 58
gotoAndPlay ("FLYdown");
Symbol 1198 MovieClip Frame 72
_root.ATTACK = false;
_root.TELEPORT = false;
_root.HIT = false;
Symbol 1198 MovieClip Frame 88
_root.ATTACK = false;
_root.HIT = false;
_root.TELEPORT = false;
Symbol 1198 MovieClip Frame 108
_root.ATTACK = false;
_root.HIT = false;
_root.TELEPORT = false;
Symbol 1198 MovieClip Frame 124
_root.ATTACK = false;
_root.HIT = false;
_root.TELEPORT = false;
Symbol 1198 MovieClip Frame 141
_root.ATTACK = false;
_root.HIT = false;
_root.TELEPORT = false;
Symbol 1198 MovieClip Frame 161
_root.ATTACK = false;
_root.HIT = false;
_root.TELEPORT = false;
Symbol 1198 MovieClip Frame 174
_root.ATTACK = false;
_root.HIT = false;
_root.TELEPORT = false;
Symbol 1198 MovieClip Frame 195
_root.ATTACK = false;
_root.HIT = false;
_root.TELEPORT = false;
Symbol 1198 MovieClip Frame 196
_root.ATTACK = false;
_root.HIT = false;
_root.TELEPORT = false;
gotoAndStop ("IDLE");
Symbol 1198 MovieClip Frame 205
_root.HURT = true;
_root.HURTback = true;
Symbol 1198 MovieClip Frame 233
stop();
Symbol 1198 MovieClip Frame 238
_root.HURT = true;
_root.HURTfront = true;
Symbol 1198 MovieClip Frame 266
stop();
Symbol 1198 MovieClip Frame 269
_root.HURTback = false;
Symbol 1198 MovieClip Frame 277
_root.PlayerVelX = 0;
_root.PlayerRestX = true;
if (_root.PlayerHealth <= 0) {
stop();
_root.DEAD = true;
}
Symbol 1198 MovieClip Frame 297
gotoAndStop ("IDLE");
Symbol 1198 MovieClip Frame 307
_root.HURTfront = false;
_root.HURTfront = false;
Symbol 1198 MovieClip Frame 315
_root.PlayerVelX = 0;
_root.PlayerRestX = true;
if (_root.PlayerHealth <= 0) {
stop();
_root.DEAD = true;
}
Symbol 1198 MovieClip Frame 321
gotoAndStop ("IDLE");
Symbol 1198 MovieClip Frame 356
stop();
Symbol 1198 MovieClip Frame 389
stop();
Symbol 1198 MovieClip Frame 399
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1198 MovieClip Frame 400
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1198 MovieClip Frame 401
if (this.hitTest(_root.Ball)) {
_root.PlayerCombo = _root.PlayerCombo + 1;
}
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1198 MovieClip Frame 402
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1198 MovieClip Frame 403
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1198 MovieClip Frame 404
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1198 MovieClip Frame 405
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1198 MovieClip Frame 406
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1198 MovieClip Frame 410
_root.ATTACK = false;
Symbol 1198 MovieClip Frame 412
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 445
gotoAndStop ("IDLE");
_root.init();
_root.PlayerHealth = 100;
_root.EnemyHealth = 100;
_root.EnemyDEAD = false;
_root.BallVelY = -30;
_root.Difficulty = _root.Difficulty * 0.9;
_root.PlayerVelY = 2;
_root.StageLevel = _root.StageLevel + 1;
Symbol 1198 MovieClip Frame 454
_root.TELEPORT = false;
Symbol 1198 MovieClip Frame 487
_root.KameHame = true;
Symbol 1198 MovieClip Frame 535
_root.Kame = false;
_root.KameHame = false;
_root.ATTACK = false;
Symbol 1198 MovieClip Frame 574
_root.Spiritball = true;
Symbol 1198 MovieClip Frame 639
_root.Spiritball = false;
_root.ATTACK = false;
Symbol 1198 MovieClip Frame 652
_root.ATTACK = false;
Symbol 1198 MovieClip Frame 663
_root.ATTACK = false;
Symbol 1198 MovieClip Frame 702
_root.Rx = 1;
Symbol 1198 MovieClip Frame 710
_root.Rx = 0;
Symbol 1198 MovieClip Frame 717
_root.ATTACK = false;
_root.RECOVER = false;
Symbol 1198 MovieClip Frame 718
_root.Rx = 1;
Symbol 1198 MovieClip Frame 725
_root.Rx = 0;
Symbol 1198 MovieClip Frame 733
_root.ATTACK = false;
_root.RECOVER = false;
Symbol 1198 MovieClip Frame 819
_root.ATTACK = false;
_root.PlayerForce = 0;
Symbol 1198 MovieClip Frame 821
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 822
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 823
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 824
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 825
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 826
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 827
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 828
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 829
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 830
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 831
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 832
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 833
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 834
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 835
_root.PlayerVelX = 0;
_root.PlayerVelY = _root.PlayerVelY - _root.PlayerWeight;
Symbol 1198 MovieClip Frame 836
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
if (_root.Player.hitTest(_root.ground)) {
_root.Player._y = _root.Player._y - 10;
}
Symbol 1198 MovieClip Frame 837
_root.PlayerVelX = _root.Xdist / 4;
_root.PlayerVelY = _root.Ydist / 4;
if (_root.Player.hitTest(_root.ground)) {
_root.Player._y = _root.Player._y - 1;
}
Symbol 1198 MovieClip Frame 838
_root.SWORD = true;
Symbol 1198 MovieClip Frame 843
_root.SWORD = false;
_root.PlayerVelX = _root.PlayerVelX * 0.5;
_root.PlayerVelY = _root.PlayerVelY * 0.5;
Symbol 1198 MovieClip Frame 844
_root.ATTACK = false;
Symbol 1198 MovieClip Frame 860
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
_root.CONE = true;
Symbol 1198 MovieClip Frame 861
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 862
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 863
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 864
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 865
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 866
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 867
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 868
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 869
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 870
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 871
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 872
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 873
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 874
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 875
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 876
_root.PlayerVelX = 0;
_root.PlayerVelY = 0;
Symbol 1198 MovieClip Frame 877
_root.ATTACK = false;
_root.CONE = false;
Symbol 1198 MovieClip Frame 922
_root.ATTACK = false;
_root.HADOUKEN = false;
Symbol 1198 MovieClip Frame 932
_root.ATTACK = false;
_root.HADOUKEN = false;
Symbol 1198 MovieClip Frame 962
gotoAndPlay ("SWOOPforward");
Symbol 1198 MovieClip Frame 974
gotoAndPlay ("SWOOPbackward");
Symbol 1198 MovieClip Frame 986
gotoAndPlay ("SWOOPup");
Symbol 1198 MovieClip Frame 993
gotoAndPlay ("SWOOPdown");
Symbol 1199 Button
on (release) {
gotoAndPlay (22);
}
Symbol 1203 Button
on (release) {
gotoAndPlay (28);
}
Symbol 1210 Button
on (release) {
gotoAndStop (35);
}
Symbol 1216 Button
on (release) {
gotoAndStop (37);
}
Symbol 1223 Button
on (release) {
gotoAndStop (39);
}
Symbol 1228 Button
on (release) {
gotoAndPlay (40);
}
Symbol 1236 Button
on (release) {
gotoAndPlay (46);
}
Symbol 1238 Button
on (release) {
gotoAndPlay (53);
}
Symbol 1246 Button
on (release) {
gotoAndStop (69);
}
Symbol 1261 MovieClip Frame 1
stop();
_root.TrainerATTACK = false;
_root.EnemyATTACK2 = false;
Symbol 1261 MovieClip Frame 20
gotoAndStop ("IDLE");
Symbol 1261 MovieClip Frame 27
_root.Trainer._x = _root.Player._x;
_root.Trainer._y = _root.Player._y;
_root.Trainer._visible = false;
Symbol 1261 MovieClip Frame 31
gotoAndStop ("IDLE");
Symbol 1262 Button
on (release) {
gotoAndPlay (62);
}
Symbol 1274 MovieClip Frame 3
_root.PlayerVelX = 0;
_root.PlayerVelY = -_root.gravity;
Symbol 1274 MovieClip Frame 5
if (this.hitTest(_root.Ball)) {
_root.PlayerCombo = _root.PlayerCombo + 1;
}
Symbol 1275 Button
on (release) {
gotoAndPlay (70);
}
Symbol 1282 Button
on (release) {
gotoAndStop (1);
}
Symbol 1284 MovieClip Frame 1
stop();
Instance of Symbol 516 MovieClip in Symbol 1284 MovieClip Frame 10
/* no clip actions */
Instance of Symbol 557 MovieClip "Ball" in Symbol 1284 MovieClip Frame 10
onClipEvent (enterFrame) {
}
Symbol 1284 MovieClip Frame 41
reticle.onEnterFrame = function () {
reticle._x = _xmouse;
reticle._y = _ymouse;
if (reticle._x > char._x) {
char._xscale = 190;
}
if (reticle._x < char._x) {
char._xscale = -190;
}
Xdist = reticle._x - char._x;
Ydist = reticle._y - char._y;
pi = 57.2957795130823;
angle = Math.atan2(Ydist, Xdist);
hyp = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
Sniperline._xscale = hyp;
Sniperline._alpha = (hyp / 500) * 100;
Sniperline._rotation = angle * pi;
};
Instance of Symbol 516 MovieClip "char" in Symbol 1284 MovieClip Frame 41
/* no clip actions */
Instance of Symbol 516 MovieClip in Symbol 1284 MovieClip Frame 104
/* no clip actions */
Symbol 1284 MovieClip Frame 109
stop();
Symbol 1284 MovieClip Frame 116
stop();
Instance of Symbol 516 MovieClip in Symbol 1284 MovieClip Frame 117
/* no clip actions */
Symbol 1284 MovieClip Frame 122
stop();
Instance of Symbol 516 MovieClip in Symbol 1284 MovieClip Frame 123
/* no clip actions */
Symbol 1284 MovieClip Frame 128
stop();
Symbol 1284 MovieClip Frame 134
stop();
Symbol 1284 MovieClip Frame 136
stop();
Symbol 1284 MovieClip Frame 138
stop();
Symbol 1284 MovieClip Frame 140
stop();
Symbol 1284 MovieClip Frame 146
stop();
Symbol 1284 MovieClip Frame 153
stop();
Symbol 1284 MovieClip Frame 160
stop();
Instance of Symbol 557 MovieClip "Ball" in Symbol 1284 MovieClip Frame 160
onClipEvent (enterFrame) {
}
Symbol 1284 MovieClip Frame 162
stop();
Symbol 1284 MovieClip Frame 170
stop();
Symbol 1284 MovieClip Frame 176
stop();
Instance of Symbol 516 MovieClip in Symbol 1284 MovieClip Frame 176
/* no clip actions */
Symbol 1291 Button
on (release) {
_root.gotoAndStop("MAINMENU");
_root.GAMEOVER2._visible = false;
}
Symbol 1292 MovieClip Frame 1
stop();
Symbol 1292 MovieClip Frame 20
stop();
Symbol 1300 MovieClip Frame 1
stop();
Symbol 1300 MovieClip Frame 2
_root.Enemy.gotoAndPlay("I WIN");
Symbol 1300 MovieClip Frame 46
stop();
Symbol 1301 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("MAINMENU");
}
Symbol 1304 Button
on (release) {
gotoAndStop ("PRACTICE");
}
Symbol 1307 Button
on (release) {
Tutorial.gotoAndStop("MOVEMENT");
}
Symbol 1310 Button
on (release) {
Tutorial.gotoAndStop("CONCEPT");
}
Symbol 1313 Button
on (release) {
Tutorial.gotoAndStop("MELEEATTACK");
}
Symbol 1316 Button
on (release) {
Tutorial.gotoAndStop("AIMING");
}
Symbol 1319 Button
on (release) {
Tutorial.gotoAndStop("SPECIALS");
}
Symbol 1322 Button
on (release) {
Tutorial.gotoAndStop("COMBOS");
}
Symbol 1325 Button
on (release) {
Tutorial.gotoAndStop("PLAYERHUD");
}
Symbol 1346 MovieClip Frame 1
stop();
Symbol 1349 MovieClip Frame 1
stop();
Symbol 1349 MovieClip Frame 12
gotoAndStop (1);
Symbol 1349 MovieClip Frame 24
gotoAndStop (1);
Symbol 1349 MovieClip Frame 36
gotoAndStop (1);
Symbol 1349 MovieClip Frame 48
gotoAndStop (1);
Symbol 1349 MovieClip Frame 60
gotoAndStop (1);
Symbol 1352 MovieClip Frame 1
play();
Symbol 1361 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("PRACTICE GAME");
}
Symbol 1474 MovieClip Frame 34
stop();
Symbol 1600 MovieClip Frame 1
_root.EnemyHURT = false;
_root.EnemyHURTfront = false;
_root.EnemyHURTback = false;
Symbol 1600 MovieClip Frame 10
gotoAndPlay ("IDLE");
Symbol 1600 MovieClip Frame 22
gotoAndPlay ("FLYforward");
Symbol 1600 MovieClip Frame 34
gotoAndPlay ("FLYbackward");
Symbol 1600 MovieClip Frame 46
gotoAndPlay ("FLYup");
Symbol 1600 MovieClip Frame 51
gotoAndPlay ("FALL");
Symbol 1600 MovieClip Frame 58
gotoAndPlay ("FLYdown");
Symbol 1600 MovieClip Frame 72
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1600 MovieClip Frame 88
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1600 MovieClip Frame 108
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1600 MovieClip Frame 124
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1600 MovieClip Frame 141
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1600 MovieClip Frame 164
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1600 MovieClip Frame 174
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1600 MovieClip Frame 196
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1600 MovieClip Frame 205
_root.EnemyHURT = true;
_root.EnemyHURTback = true;
_root.EnemyATTACK = false;
Symbol 1600 MovieClip Frame 233
stop();
Symbol 1600 MovieClip Frame 238
_root.EnemyHURT = true;
_root.EnemyHURTfront = true;
_root.EnemyATTACK = false;
Symbol 1600 MovieClip Frame 266
stop();
Symbol 1600 MovieClip Frame 269
_root.EnemyHURTback = false;
Symbol 1600 MovieClip Frame 277
if (_root.EnemyDEAD == true) {
stop();
}
if (_root.EnemyDEAD == false) {
play();
}
Symbol 1600 MovieClip Frame 297
gotoAndStop ("IDLE");
Symbol 1600 MovieClip Frame 307
_root.EnemyHURTfront = false;
Symbol 1600 MovieClip Frame 315
if (_root.EnemyDEAD == true) {
stop();
}
if (_root.EnemyDEAD == false) {
play();
}
Symbol 1600 MovieClip Frame 321
gotoAndStop ("IDLE");
Symbol 1600 MovieClip Frame 356
stop();
Symbol 1600 MovieClip Frame 389
stop();
Symbol 1600 MovieClip Frame 399
_root.EnemyVelX = 0;
_root.EnemyVelY = -_root.gravity;
Symbol 1600 MovieClip Frame 410
_root.EnemyATTACK = false;
Symbol 1600 MovieClip Frame 412
_root.EnemyVelX = 0;
_root.EnemyVelY = 0;
Symbol 1600 MovieClip Frame 445
stop();
Symbol 1600 MovieClip Frame 454
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 1
_root.EnemyHURT = false;
_root.EnemyHURTfront = false;
_root.EnemyHURTback = false;
_root.EnemyHadouken = false;
_root.EnemyATTACK = false;
Symbol 1898 MovieClip Frame 10
gotoAndPlay ("IDLE");
Symbol 1898 MovieClip Frame 22
gotoAndPlay ("FLYforward");
Symbol 1898 MovieClip Frame 34
gotoAndPlay ("FLYbackward");
Symbol 1898 MovieClip Frame 46
gotoAndPlay ("FLYup");
Symbol 1898 MovieClip Frame 51
gotoAndPlay ("FALL");
Symbol 1898 MovieClip Frame 58
gotoAndPlay ("FLYdown");
Symbol 1898 MovieClip Frame 72
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 88
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 108
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 124
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 141
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 164
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 174
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 196
_root.EnemyATTACK = false;
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 205
_root.EnemyHURT = true;
_root.EnemyHURTback = true;
_root.EnemyATTACK = false;
Symbol 1898 MovieClip Frame 233
stop();
Symbol 1898 MovieClip Frame 238
_root.EnemyHURT = true;
_root.EnemyHURTfront = true;
_root.EnemyATTACK = false;
Symbol 1898 MovieClip Frame 266
stop();
Symbol 1898 MovieClip Frame 269
_root.EnemyHURTback = false;
Symbol 1898 MovieClip Frame 276
if (_root.EnemyDEAD == true) {
gotoAndPlay (275);
}
Symbol 1898 MovieClip Frame 297
gotoAndStop ("IDLE");
Symbol 1898 MovieClip Frame 307
_root.EnemyHURTfront = false;
Symbol 1898 MovieClip Frame 315
if (_root.EnemyDEAD == true) {
gotoAndPlay (314);
}
Symbol 1898 MovieClip Frame 321
gotoAndStop ("IDLE");
Symbol 1898 MovieClip Frame 356
stop();
Symbol 1898 MovieClip Frame 389
stop();
Symbol 1898 MovieClip Frame 399
_root.EnemyVelX = 0;
_root.EnemyVelY = -_root.gravity;
Symbol 1898 MovieClip Frame 410
_root.EnemyATTACK = false;
Symbol 1898 MovieClip Frame 412
_root.EnemyVelX = 0;
_root.EnemyVelY = 0;
Symbol 1898 MovieClip Frame 445
stop();
Symbol 1898 MovieClip Frame 453
if (_root.BallTag < 2) {
_root.Enemy._x = random(700) + 100;
_root.Enemy._y = random(200) + 100;
}
if (_root.BallTag == 2) {
_root.Enemy._x = _root.Enemy._x + (_root.EnemyMovX * 5);
_root.Enemy._y = _root.Enemy._y + (_root.EnemyMovY * 5);
}
Symbol 1898 MovieClip Frame 454
_root.EnemyTELEPORT = false;
Symbol 1898 MovieClip Frame 461
_root.EnemyATTACK = true;
Symbol 1898 MovieClip Frame 466
_root.EnemyATTACK = false;
_root.EnemyHadouken = false;
_root.Enemy._rotation = 180;
gotoAndStop ("IDLE");
Symbol 2054 MovieClip Frame 1
stop();
Symbol 2054 MovieClip Frame 8
gotoAndStop (1);
Symbol 2054 MovieClip Frame 18
gotoAndStop (1);
Symbol 2054 MovieClip Frame 27
gotoAndStop (1);
Symbol 2086 MovieClip Frame 1
stop();
_root.WALLDIE2 = false;
Symbol 2086 MovieClip Frame 244
stop();
Symbol 2089 MovieClip Frame 1
stop();
_root.WALLDIE = false;
Symbol 2089 MovieClip Frame 244
stop();
Symbol 2091 MovieClip Frame 1
stop();
Symbol 2104 MovieClip Frame 1
stop();
_root.EnemyATTACK = false;
Symbol 2104 MovieClip Frame 20
gotoAndStop ("IDLE");
Symbol 2104 MovieClip Frame 31
gotoAndStop ("IDLE");
Symbol 2112 MovieClip Frame 1
stop();
_root.TREEDIE = false;
Symbol 2112 MovieClip Frame 10
_root.TREEDIE = true;
Symbol 2112 MovieClip Frame 60
stop();
Symbol 2113 Button
on (release) {
stopAllSounds();
Key.removeListener(DefendListener);
_quality = "BEST";
_root.gotoAndStop("MAINMENU");
}
Symbol 2114 Button
on (release) {
stopAllSounds();
Key.removeListener(DefendListener);
_root.gotoAndStop("TUTORIAL");
_quality = "BEST";
}
Symbol 2123 MovieClip Frame 1
stop();
_root.STONERATTACK = false;
Symbol 2123 MovieClip Frame 16
_root.STONERATTACK = true;
Symbol 2127 MovieClip Frame 1
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
if (this.hitTest(_root.Player) && (_root.HURT == false)) {
_root.HURT = true;
_root.HURTfront = true;
_root.PlayerHealth = _root.PlayerHealth - 20;
_root.Player.gotoAndPlay("HURTfront");
gotoAndPlay ("HIT");
}
if ((((Number(my_y) > Number(_root.ground._y)) or (Number(my_y) < Number(_root.wallTOP._y))) or (Number(my_x) > Number(_root.wallRIGHT._x))) or (Number(my_x) < Number(_root.wallLEFT._x))) {
gotoAndPlay ("HIT");
} else {
_x = (Number(my_x) + Number(_root.Hxmov));
_y = (Number(my_y) + Number(_root.Hymov));
}
Symbol 2127 MovieClip Frame 2
gotoAndPlay (1);
Symbol 2127 MovieClip Frame 23
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 2127 MovieClip Frame 24
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 2127 MovieClip Frame 25
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 2127 MovieClip Frame 26
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 2127 MovieClip Frame 27
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 2127 MovieClip Frame 28
my_x = _x;
my_y = _y;
my_x = my_x + (-_root.PlayerVelX);
my_y = my_y + (-_root.PlayerVelY);
Symbol 2127 MovieClip Frame 29
removeMovieClip("");
Symbol 2127 MovieClip Frame 35
stop();
Symbol 2144 MovieClip Frame 55
stop();
Symbol 2147 Button
on (release) {
FinalScore = _root.StageLevel * _root.PlayerMaxCombo;
postHPScore(HighScore, "");
}