Frame 1
Stage.showMenu = false;
_focusrect = false;
stop();
Instance of Symbol 122 MovieClip "ControlHS" in Frame 3
onClipEvent (load) {
function getScores() {
if (G_TestHighScore == true) {
}
if (gProxyObj == undefined) {
if (G_TestHighScore == true) {
}
listScores();
} else {
if (G_TestHighScore == true) {
}
gProxyObj.getScores(cbFunc2);
}
}
function submitScore(theScore) {
if (G_TestHighScore == true) {
}
gProxyObj.submitScore(theScore, cbFunc);
}
function initHiScores() {
if (G_TestHighScore == true) {
}
gProxyObj.setGame_Id("cs_meanwar");
}
function getScoreString() {
var _local5 = "Oops! The high score list isn't available right now!";
var _local8 = 35;
if (gProxyObj != undefined) {
var _local7 = gProxyObj.getScoreCount();
if (_local7 > 0) {
var _local1;
var _local6;
var _local3;
var _local4;
_local5 = "";
_local1 = 0;
while (_local1 < _local7) {
_local6 = gProxyObj.getScoreItem(_local1);
_local3 = _local6[0];
_local4 = fStyleNumber(_local6[1]);
spaceNb = ((_local8 - _local3.length) - _local4.length) - 4;
spaceTXT = "";
var _local2 = 0;
while (_local2 < spaceNb) {
spaceTXT = spaceTXT + " ";
_local2++;
}
if (_local1 < 9) {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
} else if (_local1 < 99) {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
} else {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
}
_local1++;
}
} else {
_local5 = "Whoops, the high scores seem to have escaped!";
}
}
if (G_TestHighScore == true) {
}
return(_local5);
}
function listScores() {
if (G_TestHighScore == true) {
}
_parent.txt_highScore.text = getScoreString();
}
function cbFunc(thisBool) {
if (thisBool) {
listScores();
} else {
if (G_TestHighScore == true) {
}
_parent.txt_highScore.text = "Oops! The high score list isn\u2019t available right now!";
}
}
function cbFunc2(thisBool) {
if (thisBool) {
listScores();
} else {
_parent.txt_highScore.text = "Oops! The high score list isn\u2019t available right now!";
}
}
function fStyleNumber(_nNumber, _nMinimumChar) {
_sNumber = String(_nNumber);
_sNewString = "";
_nlength = _sNumber.length;
_nlength = _nlength / 3;
if (_nlength <= 1) {
_sNewNumber = _sNumber;
if (_sNewNumber.length < _nMinimumChar) {
_sNewNumber = "0" + _sNewNumber;
}
return(_sNewNumber);
}
_nLoop = _nlength;
while (_nLoop > 1) {
_sNewString = (" " + _sNumber.substr(-3)) + _sNewString;
_sNumber = _sNumber.substr(0, -3);
_nLoop--;
}
_sNewNumber = _sNumber + _sNewString;
if (_sNewNumber.length < _nMinimumChar) {
_sNewNumber = "0" + _sNewNumber;
}
return(_sNewNumber);
}
_global.HS = this;
var G_ShowHighScore = true;
var G_TestHighScore = false;
if (G_TestHighScore == true) {
gProxyObj.setServer("www.nick-q.mtvi.com");
gProxyObj.setScreenName("DanQuiTest");
gProxyObj.setIsLoggedIn(true);
}
}
Instance of Symbol 125 MovieClip "Sounds" in Frame 3
onClipEvent (load) {
function ToMute() {
_global.Muted = true;
this.onEnterFrame = function () {
if (SetVolumePack > 0) {
SetVolumePack = SetVolumePack - 5;
Packaging.setVolume(SetVolumePack);
}
if (SetVolumeInG > 0) {
SetVolumeInG = SetVolumeInG - 5;
InGame.setVolume(SetVolumeInG);
}
if ((SetVolumePack == 0) && (SetVolumeInG == 0)) {
delete onEnterFrame;
}
};
}
function UnMute() {
_global.Muted = false;
this.onEnterFrame = function () {
if ((SetVolumePack < 60) && (musicIn == "Packaging")) {
SetVolumePack = SetVolumePack + 5;
Packaging.setVolume(SetVolumePack);
}
if ((SetVolumeInG < 60) && (musicIn == "InGame")) {
SetVolumeInG = SetVolumeInG + 5;
InGame.setVolume(SetVolumeInG);
}
if ((SetVolumePack == 60) || (SetVolumeInG == 60)) {
delete onEnterFrame;
}
};
}
function SwitchToPack() {
musicIn = "Packaging";
this.onEnterFrame = function () {
if (_global.Muted) {
delete onEnterFrame;
} else {
if (SetVolumePack < 60) {
SetVolumePack = SetVolumePack + 5;
Packaging.setVolume(SetVolumePack);
}
if (SetVolumeInG > 0) {
SetVolumeInG = SetVolumeInG - 5;
InGame.setVolume(SetVolumeInG);
}
if ((SetVolumePack == 60) && (SetVolumeInG == 0)) {
delete onEnterFrame;
}
}
};
}
function SwitchToInGame() {
musicIn = "InGame";
this.onEnterFrame = function () {
if (_global.Muted) {
delete onEnterFrame;
} else {
if (SetVolumeInG < 60) {
SetVolumeInG = SetVolumeInG + 5;
InGame.setVolume(SetVolumeInG);
}
if (SetVolumePack > 0) {
SetVolumePack = SetVolumePack - 5;
Packaging.setVolume(SetVolumePack);
}
if ((SetVolumeInG == 60) && (SetVolumePack == 0)) {
delete onEnterFrame;
}
}
};
}
function PlayASound(WitchSound) {
if (!_global.Muted) {
if (WitchSound == "ballon") {
if (random(100) < 50) {
ballon1.start(0, 1);
} else {
ballon2.start(0, 1);
}
} else if (WitchSound == "Beigne") {
if (random(100) < 50) {
Beigne1.start(0, 1);
} else {
Beigne2.start(0, 1);
}
} else if (WitchSound == "BoutonOver") {
BoutonOver.start(0, 1);
} else if (WitchSound == "BoutonPress") {
BoutonPress.start(0, 1);
} else if (WitchSound == "Objet") {
Objet.start(0, 1);
} else if (WitchSound == "Smack") {
if (random(100) < 50) {
Smack1.start(0, 1);
} else {
Smack2.start(0, 1);
}
} else if (WitchSound == "Paper") {
Paper.start(0, 1);
} else if (WitchSound == "Pistolet") {
Pistolet.start(0, 1);
} else if (WitchSound == "Craque") {
Craque.start(0, 1);
} else if (WitchSound == "colonePlace") {
colonePlace.start(0, 1);
} else if (WitchSound == "Jump") {
Jump.start(0, 1);
} else if (WitchSound == "Splash") {
Splash.start(0, 1);
} else if (WitchSound == "SwingL") {
if (random(100) < 50) {
SwingL1.start(0, 1);
} else {
SwingL2.start(0, 1);
}
} else if (WitchSound == "Swing") {
Swing.start(0, 1);
} else if (WitchSound == "Fall") {
Fall.start(0, 1);
} else if (WitchSound == "Crono") {
Crono.start(0, 1);
} else if (WitchSound == "Throw") {
Throw.start(0, 1);
} else if (WitchSound == "Paperfall") {
Paperfall.start(0, 1);
} else if (WitchSound == "ColoneBreak") {
ColoneBreak.start(0, 1);
}
}
}
_global.Sounds = this;
_global.Muted = false;
var SetVolumeInG;
var SetVolumePack;
var musicIn;
this.createEmptyMovieClip("Packaging", 1);
Packaging = new Sound("Packaging");
Packaging.attachSound("Packaging");
this.createEmptyMovieClip("InGame", 2);
InGame = new Sound("InGame");
InGame.attachSound("InGame");
Packaging.start(0, 1000000);
InGame.start(0, 1000000);
SetVolumePack = 60;
SetVolumeInG = 0;
musicIn = "Packaging";
Packaging.setVolume(SetVolumePack);
InGame.setVolume(SetVolumeInG);
this.createEmptyMovieClip("ballon1", 3);
ballon1 = new Sound("ballon1");
ballon1.attachSound("ballon1");
this.createEmptyMovieClip("ballon2", 4);
ballon2 = new Sound("ballon2");
ballon2.attachSound("ballon2");
this.createEmptyMovieClip("Beigne1", 5);
Beigne1 = new Sound("Beigne1");
Beigne1.attachSound("Beigne1");
this.createEmptyMovieClip("Beigne2", 6);
Beigne2 = new Sound("Beigne2");
Beigne2.attachSound("Beigne2");
this.createEmptyMovieClip("BoutonPress", 7);
BoutonPress = new Sound("BoutonPress");
BoutonPress.attachSound("BoutonPress");
this.createEmptyMovieClip("BoutonOver", 8);
BoutonOver = new Sound("BoutonOver");
BoutonOver.attachSound("BoutonOver");
this.createEmptyMovieClip("Objet", 9);
Objet = new Sound("Objet");
Objet.attachSound("Objet");
this.createEmptyMovieClip("Smack1", 10);
Smack1 = new Sound("Smack1");
Smack1.attachSound("Smack1");
this.createEmptyMovieClip("Smack2", 11);
Smack2 = new Sound("Smack2");
Smack2.attachSound("Smack2");
this.createEmptyMovieClip("Paper", 12);
Paper = new Sound("Paper");
Paper.attachSound("Paper");
this.createEmptyMovieClip("Pistolet", 13);
Pistolet = new Sound("Pistolet");
Pistolet.attachSound("Pistolet");
this.createEmptyMovieClip("Craque", 14);
Craque = new Sound("Craque");
Craque.attachSound("Craque");
this.createEmptyMovieClip("colonePlace", 15);
colonePlace = new Sound("colonePlace");
colonePlace.attachSound("colonePlace");
this.createEmptyMovieClip("Jump", 16);
Jump = new Sound("Jump");
Jump.attachSound("Jump");
this.createEmptyMovieClip("Splash", 17);
Splash = new Sound("Splash");
Splash.attachSound("Splash");
this.createEmptyMovieClip("SwingL1", 18);
SwingL1 = new Sound("SwingL1");
SwingL1.attachSound("SwingL1");
this.createEmptyMovieClip("SwingL2", 19);
SwingL2 = new Sound("SwingL2");
SwingL2.attachSound("SwingL2");
this.createEmptyMovieClip("Swing", 20);
Swing = new Sound("Swing");
Swing.attachSound("Swing");
this.createEmptyMovieClip("Fall", 21);
Fall = new Sound("Fall");
Fall.attachSound("Fall");
this.createEmptyMovieClip("Crono", 22);
Crono = new Sound("Crono");
Crono.attachSound("Crono");
this.createEmptyMovieClip("Throw", 23);
Throw = new Sound("Throw");
Throw.attachSound("Throw");
this.createEmptyMovieClip("Paperfall", 24);
Paperfall = new Sound("Paperfall");
Paperfall.attachSound("Paperfall");
this.createEmptyMovieClip("ColoneBreak", 25);
ColoneBreak = new Sound("ColoneBreak");
ColoneBreak.attachSound("ColoneBreak");
}
onClipEvent (mouseMove) {
_global.Moving = true;
}
Frame 9
Krakenfor1 = 1;
Krakenfor2 = 1;
Krakenfor3 = 1;
Shelterfor1 = 3;
Shelterfor2 = 2;
Shelterfor3 = 1;
Ballonfor1 = 500;
Ballonfor2 = 500;
Ballonfor3 = 500;
Paperfor1 = 4;
Paperfor2 = 3;
Paperfor3 = 2;
Soakerfor1 = 4;
Soakerfor2 = 3;
Soakerfor3 = 3;
Donutfor1 = 500;
Donutfor2 = 500;
Donutfor3 = 500;
_global.Sounds.SwitchToPack();
Frame 10
function adapt(Value) {
if (Value >= 1000) {
Thousand = Math.floor(Value / 1000);
Unite = Value - (Thousand * 1000);
if (Unite == 0) {
Unite = "000";
} else if (Unite < 10) {
Unite = "00" + Unite;
} else if (Unite < 100) {
Unite = "0" + Unite;
}
return((Thousand + ",") + Unite);
}
if (Value == 0) {
Value = "000";
} else if (Value < 10) {
Value = "00" + Value;
} else if (Value < 100) {
Value = "0" + Value;
}
return(Value);
}
_global.Submited = false;
_global.G_score = 0;
stop();
Frame 37
nLevel = 1;
_global.NextStep = "level1";
Frame 44
nLevel = random(3) + 1;
_global.NextStep = String("level" + nLevel);
Frame 51
_global.Sounds.SwitchToInGame();
Instance of Symbol 825 MovieClip [__BattleZone] "Battle" in Frame 51
onClipEvent (load) {
function LoseLife() {
if ((_global.C.G_turn == 1) && (this.player1.LifeRemain > 0)) {
_global.G_score = _global.G_score + 500;
updateScore();
}
nbrDead++;
if ((_global.numberPlayer == 3) && (nbrDead == 1)) {
if (_global.HumanPlayer1 && (this.player1.LifeRemain > 0)) {
} else if (_global.HumanPlayer2 && (this.player2.LifeRemain > 0)) {
} else if (_global.HumanPlayer3 && (this.player3.LifeRemain > 0)) {
} else {
_global.Interface.LoseDone = true;
}
}
}
function initDone() {
_global.C.cam.Find(_global.ComedienTurn, true);
}
function CamOver() {
checkIdle = true;
_global.Paused = false;
if (_global["HumanPlayer" + G_turn] == true) {
_global.Moving = false;
_global.Interface.playerTurn();
} else {
_global.AI.etat = "wait";
}
}
function changeComedien(ForMe) {
_global.ComedienTurn = this[ForMe];
}
function EndTurn() {
if (_global.ComedienTurn.etat == "Flying") {
_global.ComedienTurn.Cats.gotoAndStop("Flyfall");
} else if (_global.ComedienTurn.etat == "idle") {
_global.ComedienTurn.Cats.gotoAndStop("Idle");
}
}
function WinnerFound() {
if (((_global.numberPlayer == 3) && (!_global.HumanPlayer2)) && (!_global.HumanPlayer3)) {
_parent.nLevel++;
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
if (_parent.nLevel < 4) {
_global.NextStep = String("level" + _parent.nLevel);
} else {
_global.NextStep = String("Win-0" + _global.ComedienTurn._currentframe);
}
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String("Lose-0" + _global.ComedienTurn._currentframe);
} else if (this.player3.LifeRemain > 0) {
_global.ComedienTurn = this.player3;
_global.NextStep = String("Lose-0" + _global.ComedienTurn._currentframe);
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
} else if (_global.numberPlayer == 2) {
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
_global.NextStep = String((("Win-0" + _global.ComedienTurn._currentframe) + "on") + this.player2._currentframe);
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String((("Win-0" + _global.ComedienTurn._currentframe) + "on") + this.player1._currentframe);
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
} else {
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
} else if (this.player3.LifeRemain > 0) {
_global.ComedienTurn = this.player3;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
}
}
function LooserFound() {
if (random(100) < 50) {
winnerside = this.player2._currentframe;
} else {
winnerside = this.player3._currentframe;
}
_global.NextStep = String("Lose-0" + winnerside);
_global.C.cam.Find(_global.C.player1, false);
_global.ActionIncoming = true;
}
function WaitWinner() {
nPass++;
if (nPass == 60) {
initialyse();
_global.C._parent.Transition.play();
}
}
function fPause() {
if (_global.Paused == true) {
_global.Paused = false;
i = 1;
while (i < 4) {
if ((((_global.C["player" + i].Cats._currentframe != 30) && (_global.C["player" + i].Cats._currentframe != 50)) && (_global.C["player" + i].Cats._currentframe != 80)) && (_global.C["player" + i].Cats._currentframe != 70)) {
_global.C["player" + i].Cats.anim.play();
} else if (_global.C["player" + i].Cats._currentframe == 30) {
if (_global.C["player" + i].Cats.anim._currentframe != 8) {
_global.C["player" + i].Cats.anim.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 50) {
if (_global.C["player" + i].Cats.anim._currentframe != 4) {
_global.C["player" + i].Cats.anim.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 80) {
if (_global.C["player" + i].Cats.anim.Gun._currentframe != 1) {
_global.C["player" + i].Cats.anim.Gun.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 70) {
if (_global.C["player" + i].Cats.anim._currentframe != 70) {
_global.C["player" + i].Cats.anim.play();
}
}
_global.C["player" + i].Waiting.engrenage1.play();
_global.C["player" + i].Waiting.engrenage2.play();
_global.C["player" + i].Waiting.engrenage3.play();
_global.C["player" + i].Cats.anim.eye1.play();
_global.C["player" + i].Cats.anim.eye2.play();
if (_global.C["player" + i].Cats.anim.Gun.splash._currentframe != 1) {
_global.C["player" + i].Cats.anim.Gun.splash.play();
}
if (_global.C["player" + i].Cats.anim.DamageShown._currentframe != 50) {
_global.C["player" + i].Cats.anim.DamageShown.play();
}
_global.C["player" + i].Cats.anim.Gun.splash.flow1.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow2.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow3.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow4.play();
_global.C.weapon.Kraken["player" + i].cats.movie.play();
_global.C["player" + i].Cats.anim.movie.play();
_global.C["player" + i].Cats.anim.animset.set1.play();
_global.C["player" + i].Cats.anim.animset.set2.play();
_global.C["player" + i].Cats.anim.set1.play();
_global.C["player" + i].Cats.anim.set2.play();
_global.C["player" + i].Cats.anim.set3.play();
i++;
}
if ((_global.C.weapon.Kraken._currentframe != 1) && (_global.C.weapon.Kraken._currentframe != 31)) {
_global.C.weapon.Kraken.play();
}
_global.Interface.noBtsmall._y = -345;
_global.Interface.Pause.pauseMc.gotoAndPlay("return");
_global.Interface.Winnername.winner.play();
_global.Interface.Playername.player.play();
_global.Interface.noBt._y = 90;
_global.C.weapon.Kraken.anim.play();
_global.C.weapon.donut.anim.play();
_global.C.weapon.donut.anim.splash1.play();
_global.C.weapon.donut.anim.splash2.play();
_global.C.weapon.paper.anim.play();
_global.C.CrossControl.Aim.btn_mire.mireAnim.play();
_global.C.CrossControl.Aim.mire.play();
_global.Interface.TimeOver.TimeUp.play();
} else {
_global.Paused = true;
i = 1;
while (i < 4) {
_global.C["player" + i].Waiting.engrenage1.stop();
_global.C["player" + i].Waiting.engrenage2.stop();
_global.C["player" + i].Waiting.engrenage3.stop();
_global.C["player" + i].Cats.anim.stop();
_global.C["player" + i].Cats.anim.Gun.stop();
_global.C["player" + i].Cats.anim.eye1.stop();
_global.C["player" + i].Cats.anim.eye2.stop();
_global.C["player" + i].Cats.anim.Gun.Watersplash.stop();
_global.C["player" + i].Cats.anim.Gun.splash.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow1.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow2.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow3.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow4.stop();
_global.C["player" + i].Cats.anim.animset.set1.stop();
_global.C["player" + i].Cats.anim.animset.set2.stop();
_global.C["player" + i].Cats.anim.set1.stop();
_global.C["player" + i].Cats.anim.set2.stop();
_global.C["player" + i].Cats.anim.set3.stop();
_global.C["player" + i].Cats.anim.movie.stop();
_global.C["player" + i].Cats.anim.DamageShown.stop();
_global.C.weapon.Kraken["player" + i].cats.movie.stop();
i++;
}
_global.Interface.noBtsmall._y = -290;
_global.Interface.Pause.gotoAndStop(2);
_global.Interface.Pause.pauseMc.gotoAndPlay("pause");
_global.Interface.Winnername.winner.stop();
_global.Interface.Playername.player.stop();
_global.Interface.TimeOver.TimeUp.stop();
_global.Interface.noBt._y = -20;
_global.C.weapon.Kraken.anim.stop();
_global.C.weapon.Kraken.stop();
_global.C.weapon.donut.anim.stop();
_global.C.weapon.donut.anim.splash1.stop();
_global.C.weapon.donut.anim.splash2.stop();
_global.C.weapon.paper.anim.stop();
_global.C.CrossControl.Aim.btn_mire.mireAnim.stop();
_global.C.CrossControl.Aim.mire.stop();
}
}
function updateScore() {
_global.Interface.ScoreSection.Score_txt.text = adapt(_global.G_score);
}
function adapt(Value) {
if (Value >= 1000) {
Thousand = Math.floor(Value / 1000);
Unite = Value - (Thousand * 1000);
if (Unite == 0) {
Unite = "000";
} else if (Unite < 10) {
Unite = "00" + Unite;
} else if (Unite < 100) {
Unite = "0" + Unite;
}
return((Thousand + ",") + Unite);
}
if (Value == 0) {
Value = "000";
} else if (Value < 10) {
Value = "00" + Value;
} else if (Value < 100) {
Value = "0" + Value;
}
return(Value);
}
function Initialize() {
aInterface = new Array();
nPassTime = 0;
}
function AnalyseRows(me) {
me.Analizer._x = (nPassTime * 6) + 3;
i = 95;
while (i > 0) {
me.Analizer._y = (i * 6) + 3;
totalval = me.Analizer.getBounds(_global.C._parent);
totalvalX = (totalval.xMax + totalval.xMin) / 2;
totalvalY = (totalval.yMax + totalval.yMin) / 2;
if (!me.Level1.hitTest(totalvalX, totalvalY, true)) {
aInterface[nPassTime] = 95 - i;
i = 0;
}
i--;
}
me.nextFrame();
}
function EndRow(me) {
if (nPassTime < 299) {
nPassTime++;
me.prevFrame();
} else {
me.play();
}
}
_global.C = this;
_global.ComedienTurn = this.player1;
_global.Paused = false;
_global.AlreadyPaused = false;
_global.Micelanious = "";
_global.Artefact = "";
_global.Artefact1 = "";
_global.Artefact2 = "";
_global.Artefact3 = "";
_global.ActionIncoming = false;
var G_player1 = player1;
var G_player2 = player2;
var G_player3 = player3;
var G_turn = 1;
var checkIdle = false;
var nPass = 0;
var nbrDead = 0;
var winnerside = 0;
this.onEnterFrame = function () {
if (!_global.Paused) {
G_player1.EnterFrame();
G_player2.EnterFrame();
G_player3.EnterFrame();
_global.Artefact.Action();
_global.Artefact1.Action();
_global.Artefact2.Action();
_global.Artefact3.Action();
_global.Micelanious.EnterFrame();
_global.Interface.checkTimer();
if (_global.Interface.EndStage) {
WaitWinner();
}
}
};
_global.C.map = this;
nPassTime = 0;
aInterface = new Array();
}
Instance of Symbol 829 MovieClip in Frame 51
onClipEvent (load) {
function FromIdle(me) {
this[etat](me);
}
function wait(me) {
nPass = 0;
wPass = 0;
waitTime = 35 + random(80);
etat = "waiting";
}
function waiting(me) {
wPass++;
if (wPass == 20) {
me.Waiting._y = -80;
me.Waiting._visible = true;
}
if (wPass > waitTime) {
etat = "calculate";
}
}
function calculate(me) {
nPass++;
if (nPass == 1) {
movingStarted = false;
distance1 = 0;
distance2 = 0;
ArcWay1 = 0;
ArcWay2 = 0;
CalcDistance(me, me._x);
}
if (nPass == 2) {
cats1Height = Math.abs(Math.round((600 - _global.C.player1._y) / 6) - 3);
cats2Height = Math.abs(Math.round((600 - _global.C.player2._y) / 6) - 3);
cats3Height = Math.abs(Math.round((600 - _global.C.player3._y) / 6) - 3);
cats1Position = Math.round(_global.C.player1._x / 6);
cats2Position = Math.round(_global.C.player2._x / 6);
cats3Position = Math.round(_global.C.player3._x / 6);
if (String(me._name) == "player2") {
Enemy1 = _global.C.player1;
Enemy2 = _global.C.player3;
findArc(cats2Position, cats1Position, "ArcWay1", me, Enemy1);
findArc(cats2Position, cats3Position, "ArcWay2", me, Enemy2);
}
if (String(me._name) == "player3") {
Enemy1 = _global.C.player1;
Enemy2 = _global.C.player2;
findArc(cats3Position, cats1Position, "ArcWay1", me, Enemy1);
findArc(cats3Position, cats2Position, "ArcWay2", me, Enemy2);
}
}
if (nPass == 3) {
CaracHidden = CheckHidden(me);
}
if (nPass == 4) {
AngleEnemy1 = CheckLine(me, Enemy1);
}
if (nPass == 5) {
AngleEnemy2 = CheckLine(me, Enemy2);
}
if (nPass == 6) {
WhatToDo(me);
}
if (nPass == 7) {
me.Waiting._visible = false;
me.Waiting._y = 0;
}
if (nPass == 8) {
this[myAttack](me);
}
if (nPass == 9) {
etat = NextEtat;
}
if (nPass == 20) {
me.etat = "Shoot";
this[myAttack + "Final"](me);
etat = "end";
}
}
function CalcDistance(me, myPos) {
if (String(me._name) == "player2") {
distance1 = Math.abs(myPos - _global.C.player1._x);
distance2 = Math.abs(myPos - _global.C.player3._x);
} else if (String(me._name) == "player3") {
distance1 = Math.abs(myPos - _global.C.player1._x);
distance2 = Math.abs(myPos - _global.C.player2._x);
}
}
function end(me) {
}
function WhatToDo(me) {
ChanceHit = 10 + (_global.C._parent.nLevel * 20);
CalcDistance(me, me._x);
if (distance1 < distance2) {
ChanceHit = ChanceHit + 5;
} else {
ChanceHit = ChanceHit - 5;
}
if (AngleEnemy1 != "obstruct") {
ChanceHit = ChanceHit + 5;
}
if (AngleEnemy2 != "obstruct") {
ChanceHit = ChanceHit - 5;
}
if (ArcWay1 <= ArcWay2) {
ChanceHit = ChanceHit + 5;
} else {
ChanceHit = ChanceHit - 5;
}
if (Enemy1.LifeRemain <= Enemy2.LifeRemain) {
ChanceHit = ChanceHit - 10;
}
if ((random(100) < ChanceHit) && (Enemy1.etat != "dead")) {
ArcWayChoose = ArcWay1;
EnemyChoose = Enemy1;
AngleEnemyChoose = AngleEnemy1;
DistEnemyChoose = distance1;
} else if (Enemy2.etat != "dead") {
ArcWayChoose = ArcWay2;
EnemyChoose = Enemy2;
AngleEnemyChoose = AngleEnemy2;
DistEnemyChoose = distance2;
} else {
ArcWayChoose = ArcWay1;
EnemyChoose = Enemy1;
AngleEnemyChoose = AngleEnemy1;
}
RandNbr = random(100);
if (!CaracHidden) {
me.TimeUnder = 5;
} else {
me.TimeUnder++;
}
if (RandNbr >= 80) {
if (me.TimeUnder < 5) {
RandNbr = random(80);
} else if ((RandNbr < 90) && (_global.ComedienTurn.nbreBallon > 0)) {
attaque = "Ballon";
} else if (_global.ComedienTurn.nbreShelter > 0) {
me.TimeUnder = 0;
attaque = "Shelters";
} else {
RandNbr = random(80);
}
}
if (RandNbr < 80) {
if (((RandNbr < 15) && (_global.ComedienTurn.LifeRemain <= 25)) && (_global.ComedienTurn.nbreKraken > 0)) {
attaque = "Kracken";
} else if (((RandNbr < 20) && (AngleEnemyChoose != "obstruct")) && (_global.ComedienTurn.nbreSoaker > 0)) {
attaque = "soaker";
} else if (((_global.ComedienTurn.nbreDonut > 0) && (ArcWayChoose < 60)) && (DistEnemyChoose < 1200)) {
attaque = "Donut";
} else if ((_global.ComedienTurn.nbrePaper > 0) && (!CaracHidden)) {
attaque = "paper";
} else if ((random(100) < 50) && (_global.ComedienTurn.nbreDonut > 0)) {
attaque = "Donut";
} else if (_global.ComedienTurn.nbreBallon > 0) {
attaque = "Ballon";
} else if (_global.ComedienTurn.nbreDonut > 0) {
attaque = "Donut";
} else {
nPass--;
}
}
if ((distance1 < 130) || (distance2 < 130)) {
attaque = "Ballon";
}
if (((attaque == "Ballon") && (me.Balloned < 3)) && (_global.ComedienTurn.nbreDonut > 0)) {
attaque = "Donut";
}
if (me.ShootMiss > 2) {
attaque = "Ballon";
}
me.Balloned++;
if (attaque == "soaker") {
me.ShootMiss = 0;
_global.ComedienTurn.nbreSoaker--;
_global.TheAttak = 4;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "soaker";
arcUsed = AngleEnemyChoose;
NextEtat = "SetAngle";
} else if (attaque == "Donut") {
_global.ComedienTurn.nbreDonut--;
_global.TheAttak = 1;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "Donut";
arcUsed = ArcWayChoose;
NextEtat = "SetArrow";
} else if (attaque == "paper") {
me.ShootMiss = 0;
_global.ComedienTurn.nbrePaper--;
_global.TheAttak = 3;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "paper";
arcUsed = AngleEnemyChoose;
NextEtat = "SetPaper";
} else if (attaque == "Kracken") {
me.ShootMiss = 0;
_global.TheAttak = 2;
myAttack = "Kraken";
NextEtat = "SetKraken";
} else if (attaque == "Shelters") {
me.ShootMiss = 0;
myAttack = "Shelters";
NextEtat = "SetShelters";
} else if (attaque == "Ballon") {
me.ShootMiss = 0;
_global.ComedienTurn.nbreBallon--;
me.Balloned = 0;
myAttack = "Imove";
NextEtat = "SetMove";
}
_global.Interface.MatchInterface();
}
function findArc(theCatposs, enemyCats, Answer, cats1, cats2) {
DistanceOfP = Math.abs(theCatposs - enemyCats);
i = 0;
while (i <= DistanceOfP) {
distanceWidth = i;
if ((theCatposs - enemyCats) < 0) {
distanceHeight = _global.C.map.aInterface[theCatposs + i] - _global.C.map.aInterface[theCatposs];
if ((distanceHeight < 15) && (i < 8)) {
distanceHeight = distanceHeight - 5;
}
} else {
distanceHeight = (_global.C.map.aInterface[theCatposs - i] - 5) - _global.C.map.aInterface[theCatposs];
}
if (distanceHeight <= 0) {
distanceHeight = 0;
} else {
distanceHeight++;
}
angleRot = Math.atan2(distanceHeight, distanceWidth);
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
if (Answer == "ArcWay1") {
if (angleRot > ArcWay1) {
ArcWay1 = angleRot;
}
}
if (Answer == "ArcWay2") {
if (angleRot > ArcWay2) {
ArcWay2 = angleRot + 2;
}
}
i++;
}
if (cats1._y > cats2._y) {
angleRot = Math.atan2(Math.abs(cats1._y - cats2._y), Math.abs(cats1._x - cats2._x));
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
if (Answer == "ArcWay1") {
if (angleRot > ArcWay1) {
ArcWay1 = angleRot;
}
}
if (Answer == "ArcWay2") {
if (angleRot > ArcWay2) {
ArcWay2 = angleRot + 2;
}
}
}
}
function CheckHidden(cats) {
StartX = _global.C.CheckLine._x;
StartY = _global.C.CheckLine._y;
_global.C.CheckLine._xscale = 300;
_global.C.CheckLine._x = cats._x;
_global.C.CheckLine._y = cats._y - (cats._height / 2);
_global.C.CheckLine._rotation = 90;
i = 1;
while (i < 30) {
detectCoord = _global.C.CheckLine["Hit" + i].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
if (_global.C.Shelters.hitTest(detectCoordX, detectCoordY, true)) {
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(true);
}
i++;
}
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(false);
}
function CheckLine(cats1, cats2) {
angleRot = Math.atan2(cats1._y - cats2._y, cats1._x - cats2._x);
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
StartX = _global.C.CheckLine._x;
StartY = _global.C.CheckLine._y;
_global.C.CheckLine._xscale = Math.sqrt(((cats1._y - cats2._y) * (cats1._y - cats2._y)) + ((cats1._x - cats2._x) * (cats1._x - cats2._x)));
if (_global.C.CheckLine._xscale > 800) {
_global.C.CheckLine._xscale = 100;
return("obstruct");
}
_global.C.CheckLine._x = cats1._x;
_global.C.CheckLine._y = cats1._y - (cats1._height / 2);
_global.C.CheckLine._rotation = angleRot;
i = 1;
while (i < 30) {
detectCoord = _global.C.CheckLine["Hit" + i].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
if (_global.C.Level.hitTest(detectCoordX, detectCoordY, true)) {
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return("obstruct");
}
i++;
}
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(angleRot);
}
function Donut() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
if (arcUsed > 45) {
angleUsed = arcUsed;
Modifier = 5;
} else {
if (user._y >= cible._y) {
Modifier = (Math.abs(user._x - cible._x) / 40) + (Math.abs(user._y - cible._y) / 20);
if (Modifier > 20) {
Modifier = 20;
}
} else {
if (arcUsed != 0) {
Modifier = (Math.abs(user._x - cible._x) / 35) - ((cible._y - user._y) / 25);
} else {
Modifier = (Math.abs(user._x - cible._x) / 15) - ((cible._y - user._y) / 10);
}
if (Modifier > 20) {
Modifier = 20;
} else if (Modifier < -15) {
Modifier = -15;
}
}
angleUsed = arcUsed + Modifier;
}
Power = ((Math.abs(user._x - cible._x) / 8) - ((cible._y - user._y) / 6)) + (angleUsed / 4);
if (angleUsed < 15) {
Power = Power + angleUsed;
}
ModifierRate = Math.round(Math.abs((user._x - cible._x) / 25));
Power = Power + (random(ModifierRate) - (ModifierRate / 2));
angleUsed = angleUsed + random(ModifierRate / 2);
if (angleUsed > 85) {
angleUsed = 85;
}
if (Power > 150) {
Power = 150;
} else if (Power < 5) {
Power = 5;
}
if (attackReverse) {
angleUsed = 360 - angleUsed;
} else {
angleUsed = angleUsed + 180;
}
}
function paper() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.C.CrossControl.Aim._x = user._x - (user._width / 2);
_global.C.CrossControl.Aim._y = user._y - (user._height / 2);
TargetedX = cible._x - (cible._width / 2);
TargetedY = cible._y;
}
function soaker() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("AttackGun");
}
function Kraken() {
_global.Micelanious = _global.C.weapon.Kraken;
_global.Micelanious.etat = "ShowPeople";
}
function Imove(me) {
depart = _global.C["player" + _global.C.G_turn]._x;
if (depart < 900) {
newPlace = "right";
select = random(730) + 985;
} else {
newPlace = "left";
select = random(730) + 85;
}
CalcDistance(me, select);
if ((distance1 < 145) || (distance2 < 145)) {
nPass--;
} else {
MaxPass = 1;
count = 0;
FinishMove = false;
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("StartFly");
}
}
function Shelters() {
_global.Interface.Level++;
duplicateMovieClip (_global.C.Shelters.Constructor, String("Shelter" + _global.Interface.Level), _global.Interface.Level);
duplicateMovieClip (_global.C.RopeSys.Corde, String("Corde" + _global.Interface.Level), _global.Interface.Level - 1000);
}
function DonutFinal() {
_global.C.weapon.donut.setDonutValue(Power, angleUsed);
_global.C["player" + _global.C.G_turn].etat = "Shoot";
_global.Micelanious = _global.C.weapon.donut;
_global.ActionIncoming = true;
}
function KrakenFinal() {
_global.Micelanious.shootAttak();
}
function soakerFinal() {
_global.C["player" + _global.C.G_turn].etat = "idle";
_global.Micelanious = _global.C["player" + _global.C.G_turn].Cats.anim.Gun;
_global.Micelanious.LaunchAttack();
_global.ActionIncoming = true;
}
function paperFinal() {
_global.Micelanious = _global.C.weapon.paper;
_global.ActionIncoming = true;
_global.C.CrossControl.Aim.CamFollow.gotoAndStop("choose");
}
function SetMove(me) {
if (oldX == me._x) {
count++;
MoveUp(me);
if (count > 45) {
newSelect(me);
}
} else {
count = 0;
UnMoveY(me);
}
if (newPlace == "right") {
if (select > me._x) {
oldX = me._x;
MoveRight(me);
} else {
UnMoveX(me);
FinishMove = true;
}
} else if (select < me._x) {
oldX = me._x;
MoveLeft(me);
} else {
UnMoveX(me);
FinishMove = true;
}
if (FinishMove && (me.BallXSpeed == 0)) {
etat = "end";
_global.Interface.SkipTurn();
me.Cats.gotoAndStop("Flyfall");
}
}
function newSelect(me) {
depart = _global.C["player" + _global.C.G_turn]._x;
OldSelect = select;
OldNewPlace = newPlace;
if (newPlace == "right") {
newPlace = "left";
select = me._x - random(me._x - 85);
} else {
newPlace = "right";
select = 1715 - random(1715 - me._x);
}
CalcDistance(me, select);
if ((distance1 < 145) || (distance2 < 145)) {
select = OldSelect;
newPlace = OldNewPlace;
} else {
count = 0;
MaxPass++;
}
if (MaxPass == 4) {
etat = "end";
_global.Interface.SkipTurn();
me.Cats.gotoAndStop("Flyfall");
}
}
function MoveUp(me) {
me.BallYSpeed = me.BallYSpeed - (me.nGravity / 2);
if (me.BallYSpeed < (me.BallMax * -1)) {
me.BallYSpeed = me.BallMax * -1;
}
}
function MoveDown(me) {
me.BallYSpeed = me.BallYSpeed + (me.nGravity / 2);
if (me.BallYSpeed > me.BallMax) {
me.BallYSpeed = me.BallMax;
}
}
function UnMoveY(me) {
if (me.BallYSpeed > 0.5) {
me.BallYSpeed = me.BallYSpeed - (me.nGravity / 4);
} else if (me.BallYSpeed < 0.5) {
me.BallYSpeed = me.BallYSpeed + (me.nGravity / 4);
} else {
me.BallYSpeed = 0;
}
}
function MoveRight(me) {
me.BallXSpeed = me.BallXSpeed + (me.nGravity / 2);
if (me.BallXSpeed > me.BallMax) {
me.BallXSpeed = me.BallMax;
}
}
function MoveLeft(me) {
me.BallXSpeed = me.BallXSpeed - (me.nGravity / 2);
if (me.BallXSpeed < (me.BallMax * -1)) {
me.BallXSpeed = me.BallMax * -1;
}
}
function UnMoveX(me) {
if (me.BallXSpeed > 0.5) {
me.BallXSpeed = me.BallXSpeed - (me.nGravity / 10);
} else if (me.BallXSpeed < -0.5) {
me.BallXSpeed = me.BallXSpeed + (me.nGravity / 10);
} else {
me.BallXSpeed = 0;
}
}
function SetArrow(me) {
if (!movingStarted) {
Angle = angleUsed;
if (attackReverse) {
Angle = 360 - Angle;
} else {
Angle = Angle - 180;
}
if (Angle < 90) {
Angle = 45 + (Angle / 2);
} else if (Angle < 180) {
Angle = 45 + ((180 - Angle) / 2);
} else if (Angle < 270) {
Angle = 45 - ((Angle - 180) / 2);
} else if (Angle < 360) {
Angle = 45 - ((360 - Angle) / 2);
}
Angle = Math.round(Angle);
movingStarted = true;
}
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = true;
if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe == Angle) {
if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual._currentframe < Math.round((Power * 40) / 150)) {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
} else {
etat = "calculate";
}
} else if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe < Angle) {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.nextFrame();
} else {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.prevFrame();
}
}
function SetAngle(me) {
if (!movingStarted) {
Angle = arcUsed;
if (Angle < 90) {
Angle = 45 + (Angle / 2);
} else if (Angle < 180) {
Angle = 45 + ((180 - Angle) / 2);
} else if (Angle < 270) {
Angle = 45 - ((Angle - 180) / 2);
} else if (Angle < 360) {
Angle = 45 - ((360 - Angle) / 2);
}
Angle = Math.round(Angle);
movingStarted = true;
}
if (_global.C["player" + _global.C.G_turn].Cats.anim._currentframe == Angle) {
etat = "calculate";
} else if (_global.C["player" + _global.C.G_turn].Cats.anim._currentframe < Angle) {
_global.C["player" + _global.C.G_turn].Cats.anim.nextFrame();
} else {
_global.C["player" + _global.C.G_turn].Cats.anim.prevFrame();
}
}
function SetPaper(me) {
if (!movingStarted) {
PersoCoord = _global.C.CrossControl.Aim.CamFollow.getBounds(_global.C._parent);
PersoCoordX = (PersoCoord.xMax + PersoCoord.xMin) / 2;
PersoCoordY = (PersoCoord.yMax + PersoCoord.yMin) / 2;
Targeted = cible.getBounds(_global.C._parent);
TargetedX = (Targeted.xMax + Targeted.xMin) / 2;
TargetedY = (Targeted.yMax + Targeted.yMax) / 2;
DistaceX = PersoCoordX - TargetedX;
DistaceY = PersoCoordY - TargetedY;
panPass = 0;
movingStarted = true;
}
_global.C.CrossControl.Aim._x = _global.C.CrossControl.Aim._x - ((DistaceX * moveArray[panPass]) / 100);
_global.C.CrossControl.Aim._y = _global.C.CrossControl.Aim._y - ((DistaceY * moveArray[panPass]) / 100);
panPass++;
if (panPass > moveArray.length) {
etat = "calculate";
}
_global.C.cam.Follow(_global.C.CrossControl.Aim, 0, 0);
}
function SetKraken(me) {
if (!movingStarted) {
b = 0;
nmax = 65 + random(60);
movingStarted = true;
}
b++;
if (b == nmax) {
etat = "calculate";
}
}
function SetShelters(me) {
if (!movingStarted) {
startY = _global.Micelanious._y;
b = 0;
way = "top";
timeMove = 0;
timeToMove = 3;
movingStarted = true;
event1 = false;
event2 = false;
}
b++;
_global.C.cam.Follow(_global.Micelanious, 0, 0);
if ((b > 10) && (_global.Micelanious._rotation != 90)) {
_global.Micelanious.UpSideDown();
b = 0;
} else if (_global.Micelanious._rotation == 90) {
event1 = true;
}
if (_global.Micelanious._y > (startY - 100)) {
_global.Micelanious._y = _global.Micelanious._y - 5;
} else {
event2 = true;
}
if ((event1 && (event2)) && (_global.Micelanious.CheckPlace() == true)) {
_global.Micelanious.PlaceMicelanious();
} else if (event1 && (event2)) {
timeMove++;
if (way == "top") {
_global.Micelanious._y = _global.Micelanious._y - 5;
} else if (way == "bottom") {
_global.Micelanious._y = _global.Micelanious._y + 5;
} else if (way == "left") {
_global.Micelanious._x = _global.Micelanious._x - 5;
} else if (way == "right") {
_global.Micelanious._x = _global.Micelanious._x + 5;
}
if (timeMove == timeToMove) {
if (way == "top") {
way = "right";
} else if (way == "bottom") {
way = "left";
} else if (way == "left") {
way = "top";
} else if (way == "right") {
way = "bottom";
}
timeToMove = timeToMove + 2;
timeMove = 0;
}
}
}
_global.AI = this;
nPass = 0;
wPass = 0;
movingStarted = false;
angleUsed = 0;
waitTime = 0;
distance1 = 0;
distance2 = 0;
ArcWay1 = 0;
ArcWay2 = 0;
TargetedX = 0;
TargetedY = 0;
cats1Height = 0;
cats2Height = 0;
cats3Height = 0;
cats1Position = 0;
cats2Position = 0;
cats3Position = 0;
ChanceHit = 0;
Enemy1 = 0;
Enemy2 = 0;
AngleEnemy1 = 0;
AngleEnemy2 = 0;
MaxPass = 0;
user = 0;
cible = 0;
DistEnemyChoose = 0;
attaque = "";
myAttack = "";
arcUsed = "";
NextEtat = "";
PassMove = "";
etat = "wait";
StageWidth = 600;
StageHeight = 300;
moveArray = new Array();
moveArray = [14, 12, 11, 10, 9, 7, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0.5, 0.5, 0.3, 0.2, 0.2, 0.1, 0.1, 0.1];
}
Instance of Symbol 832 MovieClip [_contButton] in Frame 51
onClipEvent (load) {
function KeyPressed() {
if (Key.getCode() == 32) {
KeySpace = true;
}
if (Key.getCode() == 37) {
KeyLeft = true;
}
if (Key.getCode() == 38) {
KeyUp = true;
}
if (Key.getCode() == 39) {
KeyRight = true;
}
if (Key.getCode() == 40) {
KeyDown = true;
}
}
function KeyReleased() {
if (Key.getCode() == 32) {
KeySpace = false;
}
if (Key.getCode() == 37) {
KeyLeft = false;
}
if (Key.getCode() == 38) {
KeyUp = false;
}
if (Key.getCode() == 39) {
KeyRight = false;
}
if (Key.getCode() == 40) {
KeyDown = false;
}
}
_global.Keys = this;
KeySpace = false;
KeyUp = false;
KeyDown = false;
KeyLeft = false;
KeyRight = false;
}
onClipEvent (keyDown) {
KeyPressed();
}
onClipEvent (keyUp) {
KeyReleased();
}
Instance of Symbol 839 MovieClip in Frame 51
onClipEvent (load) {
function Find(me, MovePoss) {
PersoCoord = me.CamFollow.getBounds(_global.C._parent);
PersoCoordX = (PersoCoord.xMax + PersoCoord.xMin) / 2;
PersoCoordY = (PersoCoord.yMax + PersoCoord.yMin) / 2;
DistanceX = (StageWidth / 2) - PersoCoordX;
DistanceY = (StageHeight / 2) - PersoCoordY;
nPass = 0;
MovePossible = MovePoss;
_global.Artefact = this;
}
function Action() {
_global.C._x = _global.C._x + ((DistanceX * moveArray[nPass]) / 100);
_global.C._y = _global.C._y + ((DistanceY * moveArray[nPass]) / 100);
nPass++;
CheckDespassX();
CheckDespassY();
if (nPass > moveArray.length) {
if (MovePossible) {
_global.C.CamOver();
}
_global.Artefact = "";
}
}
function Follow(me, ModifierX, ModifierY) {
PersoCoord = me.CamFollow.getBounds(_global.C._parent);
PersoCoordX = ((PersoCoord.xMax + PersoCoord.xMin) / 2) + ModifierX;
PersoCoordY = ((PersoCoord.yMax + PersoCoord.yMin) / 2) + ModifierY;
DistaceX = (StageWidth / 2) - PersoCoordX;
DistaceY = (StageHeight / 2) - PersoCoordY;
_global.C._x = _global.C._x + DistaceX;
_global.C._y = _global.C._y + DistaceY;
if ((ModifierX == 0) && (ModifierY == 0)) {
CheckDespassX();
CheckDespassY();
} else {
if (CheckDespassX() != 0) {
_global.C["player" + _global.C.G_turn].nHorizontal = _global.C["player" + _global.C.G_turn].nHorizontal + modificationX;
}
if (CheckDespassY() != 0) {
_global.C["player" + _global.C.G_turn].nVertical = _global.C["player" + _global.C.G_turn].nVertical + modificationY;
}
}
}
function CheckDespassX() {
if ((_global.C._x + (StageWidth * 3)) < StageWidth) {
modificationX = _global.C._x - (StageWidth - (StageWidth * 3));
_global.C._x = StageWidth - (StageWidth * 3);
return(modificationX);
}
if (_global.C._x > 0) {
modificationX = _global.C._x;
_global.C._x = 0;
return(modificationX);
}
return(0);
}
function CheckDespassY() {
if (_global.C._y > 0) {
modificationY = _global.C._y;
_global.C._y = 0;
return(modificationY);
}
if ((_global.C._y + (StageHeight * 2)) < StageHeight) {
modificationY = _global.C._y - (StageHeight - (StageHeight * 2));
_global.C._y = StageHeight - (StageHeight * 2);
return(modificationY);
}
return(0);
}
_global.C.cam = this;
nPass = 0;
moveArray = new Array();
moveArray = [14, 12, 11, 10, 9, 7, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0.5, 0.5, 0.3, 0.2, 0.2, 0.1, 0.1, 0.1];
StageWidth = 600;
StageHeight = 300;
}
Instance of Symbol 986 MovieClip in Frame 51
onClipEvent (load) {
function NoAction() {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
Ballon_mc.btn_Ballon.enabled = false;
if (deplaceDmg._currentframe != 1) {
deplaceDmg.gotoAndPlay("Baisse");
}
Shelter_mc.btn_Shelter.enabled = false;
if (SheltersDmg._currentframe != 1) {
SheltersDmg.gotoAndPlay("Baisse");
}
Paper_mc.btn_paper.enabled = false;
if (paperDmg._currentframe != 1) {
paperDmg.gotoAndPlay("Baisse");
}
Donut_mc.btn_donut.enabled = false;
if (donutDmg._currentframe != 1) {
donutDmg.gotoAndPlay("Baisse");
}
Soaker_mc.btn_soaker.enabled = false;
if (soakerDmg._currentframe != 1) {
soakerDmg.gotoAndPlay("Baisse");
}
Kracken_mc.btn_Kraken.enabled = false;
if (KrakenDmg._currentframe != 1) {
KrakenDmg.gotoAndPlay("Baisse");
}
}
function playerTurn() {
Ballon_mc.btn_Ballon.enabled = true;
Shelter_mc.btn_Shelter.enabled = true;
Paper_mc.btn_paper.enabled = true;
Donut_mc.btn_donut.enabled = true;
Soaker_mc.btn_soaker.enabled = true;
Kracken_mc.btn_Kraken.enabled = true;
}
function SkipTurn() {
_global.Artefact = "";
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
_global.ActionIncoming = true;
_global.C.checkIdle = false;
_global.Micelanious.ForceSpace();
btn_skip.enabled = false;
NoAction();
CancelAction();
_global.C.EndTurn();
nPass = 0;
this.onEnterFrame = function () {
if (!_global.Paused) {
nPass++;
if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead < (_global.numberPlayer - 1))) {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
if (_global.C["player" + _global.C.G_turn].etat == "dead") {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
}
if (!EndStage) {
MatchInterface();
NoAction();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
DeadTime = 1.5;
_global.ActionIncoming = false;
timeSpend = -29;
this.Time_txt.text = turnTime;
this.OTime_txt.text = turnTime;
_global.C.changeComedien(String("player" + _global.C.G_turn));
_global.C.cam.Find(_global.ComedienTurn, true);
delete onEnterFrame;
}
} else if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead == (_global.numberPlayer - 1))) {
EndStage = true;
_global.C.WinnerFound();
} else if ((nPass == Math.floor(DeadTime * 30)) && (LoseDone)) {
EndStage = true;
_global.C.LooserFound();
}
}
};
}
function deplace() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].nbreBallon--;
MatchInterface();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("StartFly");
}
}
function checkTimer() {
if (!_global.ActionIncoming) {
timeSpend++;
secRemain = Math.floor(((turnTime * 30) - timeSpend) / 30);
if (secRemain < 0) {
if (secRemain > -10) {
this.TimeOver.gotoAndStop(2);
SkipTurn();
timeSpend = 30000;
}
} else if (secRemain < 10) {
if (secRemain == 9) {
this.TimeOver.gotoAndStop(3);
}
BlinkPass++;
if (BlinkPass == 5) {
if (this.Time_txt._visible == true) {
_global.Sounds.PlayASound("Crono");
BlinkPass = 0;
this.Time_txt._visible = false;
this.OTime_txt._visible = false;
} else {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
}
}
this.Time_txt.text = "0" + secRemain;
this.OTime_txt.text = "0" + secRemain;
} else {
this.Time_txt.text = secRemain;
this.OTime_txt.text = secRemain;
}
}
}
function Shelters() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
Level++;
_global.C["player" + _global.C.G_turn].ClickDone(true);
duplicateMovieClip (_global.C.Shelters.Constructor, String("Shelter" + Level), Level);
duplicateMovieClip (_global.C.RopeSys.Corde, String("Corde" + Level), Level - 1000);
}
}
function paper() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 3;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowMouse";
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = false;
}
}
function donut() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 1;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.C["player" + _global.C.G_turn].Cats.Arrow._visible = true;
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowRayon";
}
}
function soaker() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 4;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("AttackGun");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowLine";
}
}
function Krakenn() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 2;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
_global.Micelanious = _global.C.weapon.Kraken;
_global.Micelanious.etat = "ShowPeople";
}
}
function MatchInterface() {
Kraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
OKraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
if ((_global.C["player" + _global.C.G_turn].LifeRemain > 25) || (_global.C["player" + _global.C.G_turn].nbreKraken < 1)) {
Kracken_mc.gotoAndStop(2);
} else {
Kracken_mc.gotoAndStop(1);
}
shelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
Oshelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
if (_global.C["player" + _global.C.G_turn].nbreShelter < 1) {
Shelter_mc.gotoAndStop(2);
} else {
Shelter_mc.gotoAndStop(1);
}
paper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
Opaper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
if (_global.C["player" + _global.C.G_turn].nbrePaper < 1) {
Paper_mc.gotoAndStop(2);
} else {
Paper_mc.gotoAndStop(1);
}
ballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
Oballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
if (_global.C["player" + _global.C.G_turn].nbreBallon < 1) {
Ballon_mc.gotoAndStop(2);
} else {
Ballon_mc.gotoAndStop(1);
}
soaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
Osoaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
if (_global.C["player" + _global.C.G_turn].nbreSoaker < 1) {
Soaker_mc.gotoAndStop(2);
} else {
Soaker_mc.gotoAndStop(1);
}
Donut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
ODonut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
if (_global.C["player" + _global.C.G_turn].nbreDonut < 1) {
Donut_mc.gotoAndStop(2);
} else {
Donut_mc.gotoAndStop(1);
}
}
_global.Interface = this;
btn_skip.enabled = false;
DeadTime = 1.5;
turnTime = 30;
timeSpend = 0;
Level = 0;
EndStage = false;
LoseDone = false;
BlinkPass = 0;
NoAction();
MatchInterface();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
_global.C.updateScore();
}
Frame 53
_global.Sounds.SwitchToInGame();
Instance of Symbol 992 MovieClip "Battle2" in Frame 53
onClipEvent (load) {
function LoseLife() {
if ((_global.C.G_turn == 1) && (this.player1.LifeRemain > 0)) {
_global.G_score = _global.G_score + 500;
updateScore();
}
nbrDead++;
if ((_global.numberPlayer == 3) && (nbrDead == 1)) {
if (_global.HumanPlayer1 && (this.player1.LifeRemain > 0)) {
} else if (_global.HumanPlayer2 && (this.player2.LifeRemain > 0)) {
} else if (_global.HumanPlayer3 && (this.player3.LifeRemain > 0)) {
} else {
_global.Interface.LoseDone = true;
}
}
}
function initDone() {
_global.C.cam.Find(_global.ComedienTurn, true);
}
function CamOver() {
checkIdle = true;
_global.Paused = false;
if (_global["HumanPlayer" + G_turn] == true) {
_global.Moving = false;
_global.Interface.playerTurn();
} else {
_global.AI.etat = "wait";
}
}
function changeComedien(ForMe) {
_global.ComedienTurn = this[ForMe];
}
function EndTurn() {
if (_global.ComedienTurn.etat == "Flying") {
_global.ComedienTurn.Cats.gotoAndStop("Flyfall");
} else if (_global.ComedienTurn.etat == "idle") {
_global.ComedienTurn.Cats.gotoAndStop("Idle");
}
}
function WinnerFound() {
if (((_global.numberPlayer == 3) && (!_global.HumanPlayer2)) && (!_global.HumanPlayer3)) {
_parent.nLevel++;
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
if (_parent.nLevel < 4) {
_global.NextStep = String("level" + _parent.nLevel);
} else {
_global.NextStep = String("Win-0" + _global.ComedienTurn._currentframe);
}
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String("Lose-0" + _global.ComedienTurn._currentframe);
} else if (this.player3.LifeRemain > 0) {
_global.ComedienTurn = this.player3;
_global.NextStep = String("Lose-0" + _global.ComedienTurn._currentframe);
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
} else if (_global.numberPlayer == 2) {
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
_global.NextStep = String((("Win-0" + _global.ComedienTurn._currentframe) + "on") + this.player2._currentframe);
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String((("Win-0" + _global.ComedienTurn._currentframe) + "on") + this.player1._currentframe);
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
} else {
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
} else if (this.player3.LifeRemain > 0) {
_global.ComedienTurn = this.player3;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
}
}
function LooserFound() {
if (random(100) < 50) {
winnerside = this.player2._currentframe;
} else {
winnerside = this.player3._currentframe;
}
_global.NextStep = String("Lose-0" + winnerside);
_global.C.cam.Find(_global.C.player1, false);
_global.ActionIncoming = true;
}
function WaitWinner() {
nPass++;
if (nPass == 60) {
initialyse();
_global.C._parent.Transition.play();
}
}
function fPause() {
if (_global.Paused == true) {
_global.Paused = false;
i = 1;
while (i < 4) {
if ((((_global.C["player" + i].Cats._currentframe != 30) && (_global.C["player" + i].Cats._currentframe != 50)) && (_global.C["player" + i].Cats._currentframe != 80)) && (_global.C["player" + i].Cats._currentframe != 70)) {
_global.C["player" + i].Cats.anim.play();
} else if (_global.C["player" + i].Cats._currentframe == 30) {
if (_global.C["player" + i].Cats.anim._currentframe != 8) {
_global.C["player" + i].Cats.anim.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 50) {
if (_global.C["player" + i].Cats.anim._currentframe != 4) {
_global.C["player" + i].Cats.anim.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 80) {
if (_global.C["player" + i].Cats.anim.Gun._currentframe != 1) {
_global.C["player" + i].Cats.anim.Gun.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 70) {
if (_global.C["player" + i].Cats.anim._currentframe != 70) {
_global.C["player" + i].Cats.anim.play();
}
}
_global.C["player" + i].Waiting.engrenage1.play();
_global.C["player" + i].Waiting.engrenage2.play();
_global.C["player" + i].Waiting.engrenage3.play();
_global.C["player" + i].Cats.anim.eye1.play();
_global.C["player" + i].Cats.anim.eye2.play();
if (_global.C["player" + i].Cats.anim.Gun.splash._currentframe != 1) {
_global.C["player" + i].Cats.anim.Gun.splash.play();
}
if (_global.C["player" + i].Cats.anim.DamageShown._currentframe != 50) {
_global.C["player" + i].Cats.anim.DamageShown.play();
}
_global.C["player" + i].Cats.anim.Gun.splash.flow1.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow2.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow3.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow4.play();
_global.C.weapon.Kraken["player" + i].cats.movie.play();
_global.C["player" + i].Cats.anim.movie.play();
_global.C["player" + i].Cats.anim.animset.set1.play();
_global.C["player" + i].Cats.anim.animset.set2.play();
_global.C["player" + i].Cats.anim.set1.play();
_global.C["player" + i].Cats.anim.set2.play();
_global.C["player" + i].Cats.anim.set3.play();
i++;
}
if ((_global.C.weapon.Kraken._currentframe != 1) && (_global.C.weapon.Kraken._currentframe != 31)) {
_global.C.weapon.Kraken.play();
}
_global.Interface.noBtsmall._y = -345;
_global.Interface.Pause.pauseMc.gotoAndPlay("return");
_global.Interface.Winnername.winner.play();
_global.Interface.Playername.player.play();
_global.Interface.noBt._y = 90;
_global.C.weapon.Kraken.anim.play();
_global.C.weapon.donut.anim.play();
_global.C.weapon.donut.anim.splash1.play();
_global.C.weapon.donut.anim.splash2.play();
_global.C.weapon.paper.anim.play();
_global.C.CrossControl.Aim.btn_mire.mireAnim.play();
_global.C.CrossControl.Aim.mire.play();
_global.Interface.TimeOver.TimeUp.play();
} else {
_global.Paused = true;
i = 1;
while (i < 4) {
_global.C["player" + i].Waiting.engrenage1.stop();
_global.C["player" + i].Waiting.engrenage2.stop();
_global.C["player" + i].Waiting.engrenage3.stop();
_global.C["player" + i].Cats.anim.stop();
_global.C["player" + i].Cats.anim.Gun.stop();
_global.C["player" + i].Cats.anim.eye1.stop();
_global.C["player" + i].Cats.anim.eye2.stop();
_global.C["player" + i].Cats.anim.Gun.Watersplash.stop();
_global.C["player" + i].Cats.anim.Gun.splash.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow1.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow2.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow3.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow4.stop();
_global.C["player" + i].Cats.anim.animset.set1.stop();
_global.C["player" + i].Cats.anim.animset.set2.stop();
_global.C["player" + i].Cats.anim.set1.stop();
_global.C["player" + i].Cats.anim.set2.stop();
_global.C["player" + i].Cats.anim.set3.stop();
_global.C["player" + i].Cats.anim.movie.stop();
_global.C["player" + i].Cats.anim.DamageShown.stop();
_global.C.weapon.Kraken["player" + i].cats.movie.stop();
i++;
}
_global.Interface.noBtsmall._y = -290;
_global.Interface.Pause.gotoAndStop(2);
_global.Interface.Pause.pauseMc.gotoAndPlay("pause");
_global.Interface.Winnername.winner.stop();
_global.Interface.Playername.player.stop();
_global.Interface.TimeOver.TimeUp.stop();
_global.Interface.noBt._y = -20;
_global.C.weapon.Kraken.anim.stop();
_global.C.weapon.Kraken.stop();
_global.C.weapon.donut.anim.stop();
_global.C.weapon.donut.anim.splash1.stop();
_global.C.weapon.donut.anim.splash2.stop();
_global.C.weapon.paper.anim.stop();
_global.C.CrossControl.Aim.btn_mire.mireAnim.stop();
_global.C.CrossControl.Aim.mire.stop();
}
}
function updateScore() {
_global.Interface.ScoreSection.Score_txt.text = adapt(_global.G_score);
}
function adapt(Value) {
if (Value >= 1000) {
Thousand = Math.floor(Value / 1000);
Unite = Value - (Thousand * 1000);
if (Unite == 0) {
Unite = "000";
} else if (Unite < 10) {
Unite = "00" + Unite;
} else if (Unite < 100) {
Unite = "0" + Unite;
}
return((Thousand + ",") + Unite);
}
if (Value == 0) {
Value = "000";
} else if (Value < 10) {
Value = "00" + Value;
} else if (Value < 100) {
Value = "0" + Value;
}
return(Value);
}
function Initialize() {
aInterface = new Array();
nPassTime = 0;
}
function AnalyseRows(me) {
me.Analizer._x = (nPassTime * 6) + 3;
i = 95;
while (i > 0) {
me.Analizer._y = (i * 6) + 3;
totalval = me.Analizer.getBounds(_global.C._parent);
totalvalX = (totalval.xMax + totalval.xMin) / 2;
totalvalY = (totalval.yMax + totalval.yMin) / 2;
if (!me.Level1.hitTest(totalvalX, totalvalY, true)) {
aInterface[nPassTime] = 95 - i;
i = 0;
}
i--;
}
me.nextFrame();
}
function EndRow(me) {
if (nPassTime < 299) {
nPassTime++;
me.prevFrame();
} else {
me.play();
}
}
_global.C = this;
_global.ComedienTurn = this.player1;
_global.Paused = false;
_global.AlreadyPaused = false;
_global.Micelanious = "";
_global.Artefact = "";
_global.Artefact1 = "";
_global.Artefact2 = "";
_global.Artefact3 = "";
_global.ActionIncoming = false;
var G_player1 = player1;
var G_player2 = player2;
var G_player3 = player3;
var G_turn = 1;
var checkIdle = false;
var nPass = 0;
var nbrDead = 0;
var winnerside = 0;
this.onEnterFrame = function () {
if (!_global.Paused) {
G_player1.EnterFrame();
G_player2.EnterFrame();
G_player3.EnterFrame();
_global.Artefact.Action();
_global.Artefact1.Action();
_global.Artefact2.Action();
_global.Artefact3.Action();
_global.Micelanious.EnterFrame();
_global.Interface.checkTimer();
if (_global.Interface.EndStage) {
WaitWinner();
}
}
};
_global.C.map = this;
nPassTime = 0;
aInterface = new Array();
}
Instance of Symbol 829 MovieClip in Frame 53
onClipEvent (load) {
function FromIdle(me) {
this[etat](me);
}
function wait(me) {
nPass = 0;
wPass = 0;
waitTime = 35 + random(80);
etat = "waiting";
}
function waiting(me) {
wPass++;
if (wPass == 20) {
me.Waiting._y = -80;
me.Waiting._visible = true;
}
if (wPass > waitTime) {
etat = "calculate";
}
}
function calculate(me) {
nPass++;
if (nPass == 1) {
movingStarted = false;
distance1 = 0;
distance2 = 0;
ArcWay1 = 0;
ArcWay2 = 0;
CalcDistance(me, me._x);
}
if (nPass == 2) {
cats1Height = Math.abs(Math.round((600 - _global.C.player1._y) / 6) - 3);
cats2Height = Math.abs(Math.round((600 - _global.C.player2._y) / 6) - 3);
cats3Height = Math.abs(Math.round((600 - _global.C.player3._y) / 6) - 3);
cats1Position = Math.round(_global.C.player1._x / 6);
cats2Position = Math.round(_global.C.player2._x / 6);
cats3Position = Math.round(_global.C.player3._x / 6);
if (String(me._name) == "player2") {
Enemy1 = _global.C.player1;
Enemy2 = _global.C.player3;
findArc(cats2Position, cats1Position, "ArcWay1", me, Enemy1);
findArc(cats2Position, cats3Position, "ArcWay2", me, Enemy2);
}
if (String(me._name) == "player3") {
Enemy1 = _global.C.player1;
Enemy2 = _global.C.player2;
findArc(cats3Position, cats1Position, "ArcWay1", me, Enemy1);
findArc(cats3Position, cats2Position, "ArcWay2", me, Enemy2);
}
}
if (nPass == 3) {
CaracHidden = CheckHidden(me);
}
if (nPass == 4) {
AngleEnemy1 = CheckLine(me, Enemy1);
}
if (nPass == 5) {
AngleEnemy2 = CheckLine(me, Enemy2);
}
if (nPass == 6) {
WhatToDo(me);
}
if (nPass == 7) {
me.Waiting._visible = false;
me.Waiting._y = 0;
}
if (nPass == 8) {
this[myAttack](me);
}
if (nPass == 9) {
etat = NextEtat;
}
if (nPass == 20) {
me.etat = "Shoot";
this[myAttack + "Final"](me);
etat = "end";
}
}
function CalcDistance(me, myPos) {
if (String(me._name) == "player2") {
distance1 = Math.abs(myPos - _global.C.player1._x);
distance2 = Math.abs(myPos - _global.C.player3._x);
} else if (String(me._name) == "player3") {
distance1 = Math.abs(myPos - _global.C.player1._x);
distance2 = Math.abs(myPos - _global.C.player2._x);
}
}
function end(me) {
}
function WhatToDo(me) {
ChanceHit = 10 + (_global.C._parent.nLevel * 20);
CalcDistance(me, me._x);
if (distance1 < distance2) {
ChanceHit = ChanceHit + 5;
} else {
ChanceHit = ChanceHit - 5;
}
if (AngleEnemy1 != "obstruct") {
ChanceHit = ChanceHit + 5;
}
if (AngleEnemy2 != "obstruct") {
ChanceHit = ChanceHit - 5;
}
if (ArcWay1 <= ArcWay2) {
ChanceHit = ChanceHit + 5;
} else {
ChanceHit = ChanceHit - 5;
}
if (Enemy1.LifeRemain <= Enemy2.LifeRemain) {
ChanceHit = ChanceHit - 10;
}
if ((random(100) < ChanceHit) && (Enemy1.etat != "dead")) {
ArcWayChoose = ArcWay1;
EnemyChoose = Enemy1;
AngleEnemyChoose = AngleEnemy1;
DistEnemyChoose = distance1;
} else if (Enemy2.etat != "dead") {
ArcWayChoose = ArcWay2;
EnemyChoose = Enemy2;
AngleEnemyChoose = AngleEnemy2;
DistEnemyChoose = distance2;
} else {
ArcWayChoose = ArcWay1;
EnemyChoose = Enemy1;
AngleEnemyChoose = AngleEnemy1;
}
RandNbr = random(100);
if (!CaracHidden) {
me.TimeUnder = 5;
} else {
me.TimeUnder++;
}
if (RandNbr >= 80) {
if (me.TimeUnder < 5) {
RandNbr = random(80);
} else if ((RandNbr < 90) && (_global.ComedienTurn.nbreBallon > 0)) {
attaque = "Ballon";
} else if (_global.ComedienTurn.nbreShelter > 0) {
me.TimeUnder = 0;
attaque = "Shelters";
} else {
RandNbr = random(80);
}
}
if (RandNbr < 80) {
if (((RandNbr < 15) && (_global.ComedienTurn.LifeRemain <= 25)) && (_global.ComedienTurn.nbreKraken > 0)) {
attaque = "Kracken";
} else if (((RandNbr < 20) && (AngleEnemyChoose != "obstruct")) && (_global.ComedienTurn.nbreSoaker > 0)) {
attaque = "soaker";
} else if (((_global.ComedienTurn.nbreDonut > 0) && (ArcWayChoose < 60)) && (DistEnemyChoose < 1200)) {
attaque = "Donut";
} else if ((_global.ComedienTurn.nbrePaper > 0) && (!CaracHidden)) {
attaque = "paper";
} else if ((random(100) < 50) && (_global.ComedienTurn.nbreDonut > 0)) {
attaque = "Donut";
} else if (_global.ComedienTurn.nbreBallon > 0) {
attaque = "Ballon";
} else if (_global.ComedienTurn.nbreDonut > 0) {
attaque = "Donut";
} else {
nPass--;
}
}
if ((distance1 < 130) || (distance2 < 130)) {
attaque = "Ballon";
}
if (((attaque == "Ballon") && (me.Balloned < 3)) && (_global.ComedienTurn.nbreDonut > 0)) {
attaque = "Donut";
}
if (me.ShootMiss > 2) {
attaque = "Ballon";
}
me.Balloned++;
if (attaque == "soaker") {
me.ShootMiss = 0;
_global.ComedienTurn.nbreSoaker--;
_global.TheAttak = 4;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "soaker";
arcUsed = AngleEnemyChoose;
NextEtat = "SetAngle";
} else if (attaque == "Donut") {
_global.ComedienTurn.nbreDonut--;
_global.TheAttak = 1;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "Donut";
arcUsed = ArcWayChoose;
NextEtat = "SetArrow";
} else if (attaque == "paper") {
me.ShootMiss = 0;
_global.ComedienTurn.nbrePaper--;
_global.TheAttak = 3;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "paper";
arcUsed = AngleEnemyChoose;
NextEtat = "SetPaper";
} else if (attaque == "Kracken") {
me.ShootMiss = 0;
_global.TheAttak = 2;
myAttack = "Kraken";
NextEtat = "SetKraken";
} else if (attaque == "Shelters") {
me.ShootMiss = 0;
myAttack = "Shelters";
NextEtat = "SetShelters";
} else if (attaque == "Ballon") {
me.ShootMiss = 0;
_global.ComedienTurn.nbreBallon--;
me.Balloned = 0;
myAttack = "Imove";
NextEtat = "SetMove";
}
_global.Interface.MatchInterface();
}
function findArc(theCatposs, enemyCats, Answer, cats1, cats2) {
DistanceOfP = Math.abs(theCatposs - enemyCats);
i = 0;
while (i <= DistanceOfP) {
distanceWidth = i;
if ((theCatposs - enemyCats) < 0) {
distanceHeight = _global.C.map.aInterface[theCatposs + i] - _global.C.map.aInterface[theCatposs];
if ((distanceHeight < 15) && (i < 8)) {
distanceHeight = distanceHeight - 5;
}
} else {
distanceHeight = (_global.C.map.aInterface[theCatposs - i] - 5) - _global.C.map.aInterface[theCatposs];
}
if (distanceHeight <= 0) {
distanceHeight = 0;
} else {
distanceHeight++;
}
angleRot = Math.atan2(distanceHeight, distanceWidth);
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
if (Answer == "ArcWay1") {
if (angleRot > ArcWay1) {
ArcWay1 = angleRot;
}
}
if (Answer == "ArcWay2") {
if (angleRot > ArcWay2) {
ArcWay2 = angleRot + 2;
}
}
i++;
}
if (cats1._y > cats2._y) {
angleRot = Math.atan2(Math.abs(cats1._y - cats2._y), Math.abs(cats1._x - cats2._x));
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
if (Answer == "ArcWay1") {
if (angleRot > ArcWay1) {
ArcWay1 = angleRot;
}
}
if (Answer == "ArcWay2") {
if (angleRot > ArcWay2) {
ArcWay2 = angleRot + 2;
}
}
}
}
function CheckHidden(cats) {
StartX = _global.C.CheckLine._x;
StartY = _global.C.CheckLine._y;
_global.C.CheckLine._xscale = 300;
_global.C.CheckLine._x = cats._x;
_global.C.CheckLine._y = cats._y - (cats._height / 2);
_global.C.CheckLine._rotation = 90;
i = 1;
while (i < 30) {
detectCoord = _global.C.CheckLine["Hit" + i].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
if (_global.C.Shelters.hitTest(detectCoordX, detectCoordY, true)) {
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(true);
}
i++;
}
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(false);
}
function CheckLine(cats1, cats2) {
angleRot = Math.atan2(cats1._y - cats2._y, cats1._x - cats2._x);
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
StartX = _global.C.CheckLine._x;
StartY = _global.C.CheckLine._y;
_global.C.CheckLine._xscale = Math.sqrt(((cats1._y - cats2._y) * (cats1._y - cats2._y)) + ((cats1._x - cats2._x) * (cats1._x - cats2._x)));
if (_global.C.CheckLine._xscale > 800) {
_global.C.CheckLine._xscale = 100;
return("obstruct");
}
_global.C.CheckLine._x = cats1._x;
_global.C.CheckLine._y = cats1._y - (cats1._height / 2);
_global.C.CheckLine._rotation = angleRot;
i = 1;
while (i < 30) {
detectCoord = _global.C.CheckLine["Hit" + i].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
if (_global.C.Level.hitTest(detectCoordX, detectCoordY, true)) {
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return("obstruct");
}
i++;
}
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(angleRot);
}
function Donut() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
if (arcUsed > 45) {
angleUsed = arcUsed;
Modifier = 5;
} else {
if (user._y >= cible._y) {
Modifier = (Math.abs(user._x - cible._x) / 40) + (Math.abs(user._y - cible._y) / 20);
if (Modifier > 20) {
Modifier = 20;
}
} else {
if (arcUsed != 0) {
Modifier = (Math.abs(user._x - cible._x) / 35) - ((cible._y - user._y) / 25);
} else {
Modifier = (Math.abs(user._x - cible._x) / 15) - ((cible._y - user._y) / 10);
}
if (Modifier > 20) {
Modifier = 20;
} else if (Modifier < -15) {
Modifier = -15;
}
}
angleUsed = arcUsed + Modifier;
}
Power = ((Math.abs(user._x - cible._x) / 8) - ((cible._y - user._y) / 6)) + (angleUsed / 4);
if (angleUsed < 15) {
Power = Power + angleUsed;
}
ModifierRate = Math.round(Math.abs((user._x - cible._x) / 25));
Power = Power + (random(ModifierRate) - (ModifierRate / 2));
angleUsed = angleUsed + random(ModifierRate / 2);
if (angleUsed > 85) {
angleUsed = 85;
}
if (Power > 150) {
Power = 150;
} else if (Power < 5) {
Power = 5;
}
if (attackReverse) {
angleUsed = 360 - angleUsed;
} else {
angleUsed = angleUsed + 180;
}
}
function paper() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.C.CrossControl.Aim._x = user._x - (user._width / 2);
_global.C.CrossControl.Aim._y = user._y - (user._height / 2);
TargetedX = cible._x - (cible._width / 2);
TargetedY = cible._y;
}
function soaker() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("AttackGun");
}
function Kraken() {
_global.Micelanious = _global.C.weapon.Kraken;
_global.Micelanious.etat = "ShowPeople";
}
function Imove(me) {
depart = _global.C["player" + _global.C.G_turn]._x;
if (depart < 900) {
newPlace = "right";
select = random(730) + 985;
} else {
newPlace = "left";
select = random(730) + 85;
}
CalcDistance(me, select);
if ((distance1 < 145) || (distance2 < 145)) {
nPass--;
} else {
MaxPass = 1;
count = 0;
FinishMove = false;
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("StartFly");
}
}
function Shelters() {
_global.Interface.Level++;
duplicateMovieClip (_global.C.Shelters.Constructor, String("Shelter" + _global.Interface.Level), _global.Interface.Level);
duplicateMovieClip (_global.C.RopeSys.Corde, String("Corde" + _global.Interface.Level), _global.Interface.Level - 1000);
}
function DonutFinal() {
_global.C.weapon.donut.setDonutValue(Power, angleUsed);
_global.C["player" + _global.C.G_turn].etat = "Shoot";
_global.Micelanious = _global.C.weapon.donut;
_global.ActionIncoming = true;
}
function KrakenFinal() {
_global.Micelanious.shootAttak();
}
function soakerFinal() {
_global.C["player" + _global.C.G_turn].etat = "idle";
_global.Micelanious = _global.C["player" + _global.C.G_turn].Cats.anim.Gun;
_global.Micelanious.LaunchAttack();
_global.ActionIncoming = true;
}
function paperFinal() {
_global.Micelanious = _global.C.weapon.paper;
_global.ActionIncoming = true;
_global.C.CrossControl.Aim.CamFollow.gotoAndStop("choose");
}
function SetMove(me) {
if (oldX == me._x) {
count++;
MoveUp(me);
if (count > 45) {
newSelect(me);
}
} else {
count = 0;
UnMoveY(me);
}
if (newPlace == "right") {
if (select > me._x) {
oldX = me._x;
MoveRight(me);
} else {
UnMoveX(me);
FinishMove = true;
}
} else if (select < me._x) {
oldX = me._x;
MoveLeft(me);
} else {
UnMoveX(me);
FinishMove = true;
}
if (FinishMove && (me.BallXSpeed == 0)) {
etat = "end";
_global.Interface.SkipTurn();
me.Cats.gotoAndStop("Flyfall");
}
}
function newSelect(me) {
depart = _global.C["player" + _global.C.G_turn]._x;
OldSelect = select;
OldNewPlace = newPlace;
if (newPlace == "right") {
newPlace = "left";
select = me._x - random(me._x - 85);
} else {
newPlace = "right";
select = 1715 - random(1715 - me._x);
}
CalcDistance(me, select);
if ((distance1 < 145) || (distance2 < 145)) {
select = OldSelect;
newPlace = OldNewPlace;
} else {
count = 0;
MaxPass++;
}
if (MaxPass == 4) {
etat = "end";
_global.Interface.SkipTurn();
me.Cats.gotoAndStop("Flyfall");
}
}
function MoveUp(me) {
me.BallYSpeed = me.BallYSpeed - (me.nGravity / 2);
if (me.BallYSpeed < (me.BallMax * -1)) {
me.BallYSpeed = me.BallMax * -1;
}
}
function MoveDown(me) {
me.BallYSpeed = me.BallYSpeed + (me.nGravity / 2);
if (me.BallYSpeed > me.BallMax) {
me.BallYSpeed = me.BallMax;
}
}
function UnMoveY(me) {
if (me.BallYSpeed > 0.5) {
me.BallYSpeed = me.BallYSpeed - (me.nGravity / 4);
} else if (me.BallYSpeed < 0.5) {
me.BallYSpeed = me.BallYSpeed + (me.nGravity / 4);
} else {
me.BallYSpeed = 0;
}
}
function MoveRight(me) {
me.BallXSpeed = me.BallXSpeed + (me.nGravity / 2);
if (me.BallXSpeed > me.BallMax) {
me.BallXSpeed = me.BallMax;
}
}
function MoveLeft(me) {
me.BallXSpeed = me.BallXSpeed - (me.nGravity / 2);
if (me.BallXSpeed < (me.BallMax * -1)) {
me.BallXSpeed = me.BallMax * -1;
}
}
function UnMoveX(me) {
if (me.BallXSpeed > 0.5) {
me.BallXSpeed = me.BallXSpeed - (me.nGravity / 10);
} else if (me.BallXSpeed < -0.5) {
me.BallXSpeed = me.BallXSpeed + (me.nGravity / 10);
} else {
me.BallXSpeed = 0;
}
}
function SetArrow(me) {
if (!movingStarted) {
Angle = angleUsed;
if (attackReverse) {
Angle = 360 - Angle;
} else {
Angle = Angle - 180;
}
if (Angle < 90) {
Angle = 45 + (Angle / 2);
} else if (Angle < 180) {
Angle = 45 + ((180 - Angle) / 2);
} else if (Angle < 270) {
Angle = 45 - ((Angle - 180) / 2);
} else if (Angle < 360) {
Angle = 45 - ((360 - Angle) / 2);
}
Angle = Math.round(Angle);
movingStarted = true;
}
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = true;
if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe == Angle) {
if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual._currentframe < Math.round((Power * 40) / 150)) {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
} else {
etat = "calculate";
}
} else if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe < Angle) {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.nextFrame();
} else {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.prevFrame();
}
}
function SetAngle(me) {
if (!movingStarted) {
Angle = arcUsed;
if (Angle < 90) {
Angle = 45 + (Angle / 2);
} else if (Angle < 180) {
Angle = 45 + ((180 - Angle) / 2);
} else if (Angle < 270) {
Angle = 45 - ((Angle - 180) / 2);
} else if (Angle < 360) {
Angle = 45 - ((360 - Angle) / 2);
}
Angle = Math.round(Angle);
movingStarted = true;
}
if (_global.C["player" + _global.C.G_turn].Cats.anim._currentframe == Angle) {
etat = "calculate";
} else if (_global.C["player" + _global.C.G_turn].Cats.anim._currentframe < Angle) {
_global.C["player" + _global.C.G_turn].Cats.anim.nextFrame();
} else {
_global.C["player" + _global.C.G_turn].Cats.anim.prevFrame();
}
}
function SetPaper(me) {
if (!movingStarted) {
PersoCoord = _global.C.CrossControl.Aim.CamFollow.getBounds(_global.C._parent);
PersoCoordX = (PersoCoord.xMax + PersoCoord.xMin) / 2;
PersoCoordY = (PersoCoord.yMax + PersoCoord.yMin) / 2;
Targeted = cible.getBounds(_global.C._parent);
TargetedX = (Targeted.xMax + Targeted.xMin) / 2;
TargetedY = (Targeted.yMax + Targeted.yMax) / 2;
DistaceX = PersoCoordX - TargetedX;
DistaceY = PersoCoordY - TargetedY;
panPass = 0;
movingStarted = true;
}
_global.C.CrossControl.Aim._x = _global.C.CrossControl.Aim._x - ((DistaceX * moveArray[panPass]) / 100);
_global.C.CrossControl.Aim._y = _global.C.CrossControl.Aim._y - ((DistaceY * moveArray[panPass]) / 100);
panPass++;
if (panPass > moveArray.length) {
etat = "calculate";
}
_global.C.cam.Follow(_global.C.CrossControl.Aim, 0, 0);
}
function SetKraken(me) {
if (!movingStarted) {
b = 0;
nmax = 65 + random(60);
movingStarted = true;
}
b++;
if (b == nmax) {
etat = "calculate";
}
}
function SetShelters(me) {
if (!movingStarted) {
startY = _global.Micelanious._y;
b = 0;
way = "top";
timeMove = 0;
timeToMove = 3;
movingStarted = true;
event1 = false;
event2 = false;
}
b++;
_global.C.cam.Follow(_global.Micelanious, 0, 0);
if ((b > 10) && (_global.Micelanious._rotation != 90)) {
_global.Micelanious.UpSideDown();
b = 0;
} else if (_global.Micelanious._rotation == 90) {
event1 = true;
}
if (_global.Micelanious._y > (startY - 100)) {
_global.Micelanious._y = _global.Micelanious._y - 5;
} else {
event2 = true;
}
if ((event1 && (event2)) && (_global.Micelanious.CheckPlace() == true)) {
_global.Micelanious.PlaceMicelanious();
} else if (event1 && (event2)) {
timeMove++;
if (way == "top") {
_global.Micelanious._y = _global.Micelanious._y - 5;
} else if (way == "bottom") {
_global.Micelanious._y = _global.Micelanious._y + 5;
} else if (way == "left") {
_global.Micelanious._x = _global.Micelanious._x - 5;
} else if (way == "right") {
_global.Micelanious._x = _global.Micelanious._x + 5;
}
if (timeMove == timeToMove) {
if (way == "top") {
way = "right";
} else if (way == "bottom") {
way = "left";
} else if (way == "left") {
way = "top";
} else if (way == "right") {
way = "bottom";
}
timeToMove = timeToMove + 2;
timeMove = 0;
}
}
}
_global.AI = this;
nPass = 0;
wPass = 0;
movingStarted = false;
angleUsed = 0;
waitTime = 0;
distance1 = 0;
distance2 = 0;
ArcWay1 = 0;
ArcWay2 = 0;
TargetedX = 0;
TargetedY = 0;
cats1Height = 0;
cats2Height = 0;
cats3Height = 0;
cats1Position = 0;
cats2Position = 0;
cats3Position = 0;
ChanceHit = 0;
Enemy1 = 0;
Enemy2 = 0;
AngleEnemy1 = 0;
AngleEnemy2 = 0;
MaxPass = 0;
user = 0;
cible = 0;
DistEnemyChoose = 0;
attaque = "";
myAttack = "";
arcUsed = "";
NextEtat = "";
PassMove = "";
etat = "wait";
StageWidth = 600;
StageHeight = 300;
moveArray = new Array();
moveArray = [14, 12, 11, 10, 9, 7, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0.5, 0.5, 0.3, 0.2, 0.2, 0.1, 0.1, 0.1];
}
Instance of Symbol 986 MovieClip in Frame 53
onClipEvent (load) {
function NoAction() {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
Ballon_mc.btn_Ballon.enabled = false;
if (deplaceDmg._currentframe != 1) {
deplaceDmg.gotoAndPlay("Baisse");
}
Shelter_mc.btn_Shelter.enabled = false;
if (SheltersDmg._currentframe != 1) {
SheltersDmg.gotoAndPlay("Baisse");
}
Paper_mc.btn_paper.enabled = false;
if (paperDmg._currentframe != 1) {
paperDmg.gotoAndPlay("Baisse");
}
Donut_mc.btn_donut.enabled = false;
if (donutDmg._currentframe != 1) {
donutDmg.gotoAndPlay("Baisse");
}
Soaker_mc.btn_soaker.enabled = false;
if (soakerDmg._currentframe != 1) {
soakerDmg.gotoAndPlay("Baisse");
}
Kracken_mc.btn_Kraken.enabled = false;
if (KrakenDmg._currentframe != 1) {
KrakenDmg.gotoAndPlay("Baisse");
}
}
function playerTurn() {
Ballon_mc.btn_Ballon.enabled = true;
Shelter_mc.btn_Shelter.enabled = true;
Paper_mc.btn_paper.enabled = true;
Donut_mc.btn_donut.enabled = true;
Soaker_mc.btn_soaker.enabled = true;
Kracken_mc.btn_Kraken.enabled = true;
}
function SkipTurn() {
_global.Artefact = "";
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
_global.ActionIncoming = true;
_global.C.checkIdle = false;
_global.Micelanious.ForceSpace();
btn_skip.enabled = false;
NoAction();
CancelAction();
_global.C.EndTurn();
nPass = 0;
this.onEnterFrame = function () {
if (!_global.Paused) {
nPass++;
if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead < (_global.numberPlayer - 1))) {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
if (_global.C["player" + _global.C.G_turn].etat == "dead") {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
}
if (!EndStage) {
MatchInterface();
NoAction();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
DeadTime = 1.5;
_global.ActionIncoming = false;
timeSpend = -29;
this.Time_txt.text = turnTime;
this.OTime_txt.text = turnTime;
_global.C.changeComedien(String("player" + _global.C.G_turn));
_global.C.cam.Find(_global.ComedienTurn, true);
delete onEnterFrame;
}
} else if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead == (_global.numberPlayer - 1))) {
EndStage = true;
_global.C.WinnerFound();
} else if ((nPass == Math.floor(DeadTime * 30)) && (LoseDone)) {
EndStage = true;
_global.C.LooserFound();
}
}
};
}
function deplace() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].nbreBallon--;
MatchInterface();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("StartFly");
}
}
function checkTimer() {
if (!_global.ActionIncoming) {
timeSpend++;
secRemain = Math.floor(((turnTime * 30) - timeSpend) / 30);
if (secRemain < 0) {
if (secRemain > -10) {
this.TimeOver.gotoAndStop(2);
SkipTurn();
timeSpend = 30000;
}
} else if (secRemain < 10) {
if (secRemain == 9) {
this.TimeOver.gotoAndStop(3);
}
BlinkPass++;
if (BlinkPass == 5) {
if (this.Time_txt._visible == true) {
_global.Sounds.PlayASound("Crono");
BlinkPass = 0;
this.Time_txt._visible = false;
this.OTime_txt._visible = false;
} else {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
}
}
this.Time_txt.text = "0" + secRemain;
this.OTime_txt.text = "0" + secRemain;
} else {
this.Time_txt.text = secRemain;
this.OTime_txt.text = secRemain;
}
}
}
function Shelters() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
Level++;
_global.C["player" + _global.C.G_turn].ClickDone(true);
duplicateMovieClip (_global.C.Shelters.Constructor, String("Shelter" + Level), Level);
duplicateMovieClip (_global.C.RopeSys.Corde, String("Corde" + Level), Level - 1000);
}
}
function paper() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 3;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowMouse";
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = false;
}
}
function donut() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 1;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.C["player" + _global.C.G_turn].Cats.Arrow._visible = true;
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowRayon";
}
}
function soaker() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 4;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("AttackGun");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowLine";
}
}
function Krakenn() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 2;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
_global.Micelanious = _global.C.weapon.Kraken;
_global.Micelanious.etat = "ShowPeople";
}
}
function MatchInterface() {
Kraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
OKraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
if ((_global.C["player" + _global.C.G_turn].LifeRemain > 25) || (_global.C["player" + _global.C.G_turn].nbreKraken < 1)) {
Kracken_mc.gotoAndStop(2);
} else {
Kracken_mc.gotoAndStop(1);
}
shelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
Oshelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
if (_global.C["player" + _global.C.G_turn].nbreShelter < 1) {
Shelter_mc.gotoAndStop(2);
} else {
Shelter_mc.gotoAndStop(1);
}
paper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
Opaper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
if (_global.C["player" + _global.C.G_turn].nbrePaper < 1) {
Paper_mc.gotoAndStop(2);
} else {
Paper_mc.gotoAndStop(1);
}
ballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
Oballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
if (_global.C["player" + _global.C.G_turn].nbreBallon < 1) {
Ballon_mc.gotoAndStop(2);
} else {
Ballon_mc.gotoAndStop(1);
}
soaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
Osoaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
if (_global.C["player" + _global.C.G_turn].nbreSoaker < 1) {
Soaker_mc.gotoAndStop(2);
} else {
Soaker_mc.gotoAndStop(1);
}
Donut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
ODonut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
if (_global.C["player" + _global.C.G_turn].nbreDonut < 1) {
Donut_mc.gotoAndStop(2);
} else {
Donut_mc.gotoAndStop(1);
}
}
_global.Interface = this;
btn_skip.enabled = false;
DeadTime = 1.5;
turnTime = 30;
timeSpend = 0;
Level = 0;
EndStage = false;
LoseDone = false;
BlinkPass = 0;
NoAction();
MatchInterface();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
_global.C.updateScore();
}
Instance of Symbol 832 MovieClip [_contButton] in Frame 53
onClipEvent (load) {
function KeyPressed() {
if (Key.getCode() == 32) {
KeySpace = true;
}
if (Key.getCode() == 37) {
KeyLeft = true;
}
if (Key.getCode() == 38) {
KeyUp = true;
}
if (Key.getCode() == 39) {
KeyRight = true;
}
if (Key.getCode() == 40) {
KeyDown = true;
}
}
function KeyReleased() {
if (Key.getCode() == 32) {
KeySpace = false;
}
if (Key.getCode() == 37) {
KeyLeft = false;
}
if (Key.getCode() == 38) {
KeyUp = false;
}
if (Key.getCode() == 39) {
KeyRight = false;
}
if (Key.getCode() == 40) {
KeyDown = false;
}
}
_global.Keys = this;
KeySpace = false;
KeyUp = false;
KeyDown = false;
KeyLeft = false;
KeyRight = false;
}
onClipEvent (keyDown) {
KeyPressed();
}
onClipEvent (keyUp) {
KeyReleased();
}
Instance of Symbol 839 MovieClip in Frame 53
onClipEvent (load) {
function Find(me, MovePoss) {
PersoCoord = me.CamFollow.getBounds(_global.C._parent);
PersoCoordX = (PersoCoord.xMax + PersoCoord.xMin) / 2;
PersoCoordY = (PersoCoord.yMax + PersoCoord.yMin) / 2;
DistanceX = (StageWidth / 2) - PersoCoordX;
DistanceY = (StageHeight / 2) - PersoCoordY;
nPass = 0;
MovePossible = MovePoss;
_global.Artefact = this;
}
function Action() {
_global.C._x = _global.C._x + ((DistanceX * moveArray[nPass]) / 100);
_global.C._y = _global.C._y + ((DistanceY * moveArray[nPass]) / 100);
nPass++;
CheckDespassX();
CheckDespassY();
if (nPass > moveArray.length) {
if (MovePossible) {
_global.C.CamOver();
}
_global.Artefact = "";
}
}
function Follow(me, ModifierX, ModifierY) {
PersoCoord = me.CamFollow.getBounds(_global.C._parent);
PersoCoordX = ((PersoCoord.xMax + PersoCoord.xMin) / 2) + ModifierX;
PersoCoordY = ((PersoCoord.yMax + PersoCoord.yMin) / 2) + ModifierY;
DistaceX = (StageWidth / 2) - PersoCoordX;
DistaceY = (StageHeight / 2) - PersoCoordY;
_global.C._x = _global.C._x + DistaceX;
_global.C._y = _global.C._y + DistaceY;
if ((ModifierX == 0) && (ModifierY == 0)) {
CheckDespassX();
CheckDespassY();
} else {
if (CheckDespassX() != 0) {
_global.C["player" + _global.C.G_turn].nHorizontal = _global.C["player" + _global.C.G_turn].nHorizontal + modificationX;
}
if (CheckDespassY() != 0) {
_global.C["player" + _global.C.G_turn].nVertical = _global.C["player" + _global.C.G_turn].nVertical + modificationY;
}
}
}
function CheckDespassX() {
if ((_global.C._x + (StageWidth * 3)) < StageWidth) {
modificationX = _global.C._x - (StageWidth - (StageWidth * 3));
_global.C._x = StageWidth - (StageWidth * 3);
return(modificationX);
}
if (_global.C._x > 0) {
modificationX = _global.C._x;
_global.C._x = 0;
return(modificationX);
}
return(0);
}
function CheckDespassY() {
if (_global.C._y > 0) {
modificationY = _global.C._y;
_global.C._y = 0;
return(modificationY);
}
if ((_global.C._y + (StageHeight * 2)) < StageHeight) {
modificationY = _global.C._y - (StageHeight - (StageHeight * 2));
_global.C._y = StageHeight - (StageHeight * 2);
return(modificationY);
}
return(0);
}
_global.C.cam = this;
nPass = 0;
moveArray = new Array();
moveArray = [14, 12, 11, 10, 9, 7, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0.5, 0.5, 0.3, 0.2, 0.2, 0.1, 0.1, 0.1];
StageWidth = 600;
StageHeight = 300;
}
Instance of Symbol 986 MovieClip in Frame 53
onClipEvent (load) {
function NoAction() {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
Ballon_mc.btn_Ballon.enabled = false;
if (deplaceDmg._currentframe != 1) {
deplaceDmg.gotoAndPlay("Baisse");
}
Shelter_mc.btn_Shelter.enabled = false;
if (SheltersDmg._currentframe != 1) {
SheltersDmg.gotoAndPlay("Baisse");
}
Paper_mc.btn_paper.enabled = false;
if (paperDmg._currentframe != 1) {
paperDmg.gotoAndPlay("Baisse");
}
Donut_mc.btn_donut.enabled = false;
if (donutDmg._currentframe != 1) {
donutDmg.gotoAndPlay("Baisse");
}
Soaker_mc.btn_soaker.enabled = false;
if (soakerDmg._currentframe != 1) {
soakerDmg.gotoAndPlay("Baisse");
}
Kracken_mc.btn_Kraken.enabled = false;
if (KrakenDmg._currentframe != 1) {
KrakenDmg.gotoAndPlay("Baisse");
}
}
function playerTurn() {
Ballon_mc.btn_Ballon.enabled = true;
Shelter_mc.btn_Shelter.enabled = true;
Paper_mc.btn_paper.enabled = true;
Donut_mc.btn_donut.enabled = true;
Soaker_mc.btn_soaker.enabled = true;
Kracken_mc.btn_Kraken.enabled = true;
}
function SkipTurn() {
_global.Artefact = "";
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
_global.ActionIncoming = true;
_global.C.checkIdle = false;
_global.Micelanious.ForceSpace();
btn_skip.enabled = false;
NoAction();
CancelAction();
_global.C.EndTurn();
nPass = 0;
this.onEnterFrame = function () {
if (!_global.Paused) {
nPass++;
if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead < (_global.numberPlayer - 1))) {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
if (_global.C["player" + _global.C.G_turn].etat == "dead") {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
}
if (!EndStage) {
MatchInterface();
NoAction();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
DeadTime = 1.5;
_global.ActionIncoming = false;
timeSpend = -29;
this.Time_txt.text = turnTime;
this.OTime_txt.text = turnTime;
_global.C.changeComedien(String("player" + _global.C.G_turn));
_global.C.cam.Find(_global.ComedienTurn, true);
delete onEnterFrame;
}
} else if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead == (_global.numberPlayer - 1))) {
EndStage = true;
_global.C.WinnerFound();
} else if ((nPass == Math.floor(DeadTime * 30)) && (LoseDone)) {
EndStage = true;
_global.C.LooserFound();
}
}
};
}
function deplace() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].nbreBallon--;
MatchInterface();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("StartFly");
}
}
function checkTimer() {
if (!_global.ActionIncoming) {
timeSpend++;
secRemain = Math.floor(((turnTime * 30) - timeSpend) / 30);
if (secRemain < 0) {
if (secRemain > -10) {
this.TimeOver.gotoAndStop(2);
SkipTurn();
timeSpend = 30000;
}
} else if (secRemain < 10) {
if (secRemain == 9) {
this.TimeOver.gotoAndStop(3);
}
BlinkPass++;
if (BlinkPass == 5) {
if (this.Time_txt._visible == true) {
_global.Sounds.PlayASound("Crono");
BlinkPass = 0;
this.Time_txt._visible = false;
this.OTime_txt._visible = false;
} else {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
}
}
this.Time_txt.text = "0" + secRemain;
this.OTime_txt.text = "0" + secRemain;
} else {
this.Time_txt.text = secRemain;
this.OTime_txt.text = secRemain;
}
}
}
function Shelters() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
Level++;
_global.C["player" + _global.C.G_turn].ClickDone(true);
duplicateMovieClip (_global.C.Shelters.Constructor, String("Shelter" + Level), Level);
duplicateMovieClip (_global.C.RopeSys.Corde, String("Corde" + Level), Level - 1000);
}
}
function paper() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 3;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowMouse";
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = false;
}
}
function donut() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 1;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.C["player" + _global.C.G_turn].Cats.Arrow._visible = true;
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowRayon";
}
}
function soaker() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 4;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("AttackGun");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowLine";
}
}
function Krakenn() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 2;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
_global.Micelanious = _global.C.weapon.Kraken;
_global.Micelanious.etat = "ShowPeople";
}
}
function MatchInterface() {
Kraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
OKraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
if ((_global.C["player" + _global.C.G_turn].LifeRemain > 25) || (_global.C["player" + _global.C.G_turn].nbreKraken < 1)) {
Kracken_mc.gotoAndStop(2);
} else {
Kracken_mc.gotoAndStop(1);
}
shelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
Oshelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
if (_global.C["player" + _global.C.G_turn].nbreShelter < 1) {
Shelter_mc.gotoAndStop(2);
} else {
Shelter_mc.gotoAndStop(1);
}
paper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
Opaper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
if (_global.C["player" + _global.C.G_turn].nbrePaper < 1) {
Paper_mc.gotoAndStop(2);
} else {
Paper_mc.gotoAndStop(1);
}
ballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
Oballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
if (_global.C["player" + _global.C.G_turn].nbreBallon < 1) {
Ballon_mc.gotoAndStop(2);
} else {
Ballon_mc.gotoAndStop(1);
}
soaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
Osoaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
if (_global.C["player" + _global.C.G_turn].nbreSoaker < 1) {
Soaker_mc.gotoAndStop(2);
} else {
Soaker_mc.gotoAndStop(1);
}
Donut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
ODonut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
if (_global.C["player" + _global.C.G_turn].nbreDonut < 1) {
Donut_mc.gotoAndStop(2);
} else {
Donut_mc.gotoAndStop(1);
}
}
_global.Interface = this;
btn_skip.enabled = false;
DeadTime = 1.5;
turnTime = 30;
timeSpend = 0;
Level = 0;
EndStage = false;
LoseDone = false;
BlinkPass = 0;
NoAction();
MatchInterface();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
_global.C.updateScore();
}
Frame 55
_global.Sounds.SwitchToInGame();
Instance of Symbol 999 MovieClip "Battle3" in Frame 55
onClipEvent (load) {
function LoseLife() {
if ((_global.C.G_turn == 1) && (this.player1.LifeRemain > 0)) {
_global.G_score = _global.G_score + 500;
updateScore();
}
nbrDead++;
if ((_global.numberPlayer == 3) && (nbrDead == 1)) {
if (_global.HumanPlayer1 && (this.player1.LifeRemain > 0)) {
} else if (_global.HumanPlayer2 && (this.player2.LifeRemain > 0)) {
} else if (_global.HumanPlayer3 && (this.player3.LifeRemain > 0)) {
} else {
_global.Interface.LoseDone = true;
}
}
}
function initDone() {
_global.C.cam.Find(_global.ComedienTurn, true);
}
function CamOver() {
checkIdle = true;
_global.Paused = false;
if (_global["HumanPlayer" + G_turn] == true) {
_global.Moving = false;
_global.Interface.playerTurn();
} else {
_global.AI.etat = "wait";
}
}
function changeComedien(ForMe) {
_global.ComedienTurn = this[ForMe];
}
function EndTurn() {
if (_global.ComedienTurn.etat == "Flying") {
_global.ComedienTurn.Cats.gotoAndStop("Flyfall");
} else if (_global.ComedienTurn.etat == "idle") {
_global.ComedienTurn.Cats.gotoAndStop("Idle");
}
}
function WinnerFound() {
if (((_global.numberPlayer == 3) && (!_global.HumanPlayer2)) && (!_global.HumanPlayer3)) {
_parent.nLevel++;
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
if (_parent.nLevel < 4) {
_global.NextStep = String("level" + _parent.nLevel);
} else {
_global.NextStep = String("Win-0" + _global.ComedienTurn._currentframe);
}
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String("Lose-0" + _global.ComedienTurn._currentframe);
} else if (this.player3.LifeRemain > 0) {
_global.ComedienTurn = this.player3;
_global.NextStep = String("Lose-0" + _global.ComedienTurn._currentframe);
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
} else if (_global.numberPlayer == 2) {
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
_global.NextStep = String((("Win-0" + _global.ComedienTurn._currentframe) + "on") + this.player2._currentframe);
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String((("Win-0" + _global.ComedienTurn._currentframe) + "on") + this.player1._currentframe);
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
} else {
if (this.player1.LifeRemain > 0) {
_global.ComedienTurn = this.player1;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
} else if (this.player2.LifeRemain > 0) {
_global.ComedienTurn = this.player2;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
} else if (this.player3.LifeRemain > 0) {
_global.ComedienTurn = this.player3;
_global.NextStep = String(("Win-0" + _global.ComedienTurn._currentframe) + "multi3");
}
_global.ActionIncoming = true;
_global.C.cam.Find(_global.ComedienTurn, false);
_global.Interface.Winnername.gotoAndStop(_global.ComedienTurn._currentframe + 1);
}
}
function LooserFound() {
if (random(100) < 50) {
winnerside = this.player2._currentframe;
} else {
winnerside = this.player3._currentframe;
}
_global.NextStep = String("Lose-0" + winnerside);
_global.C.cam.Find(_global.C.player1, false);
_global.ActionIncoming = true;
}
function WaitWinner() {
nPass++;
if (nPass == 60) {
initialyse();
_global.C._parent.Transition.play();
}
}
function fPause() {
if (_global.Paused == true) {
_global.Paused = false;
i = 1;
while (i < 4) {
if ((((_global.C["player" + i].Cats._currentframe != 30) && (_global.C["player" + i].Cats._currentframe != 50)) && (_global.C["player" + i].Cats._currentframe != 80)) && (_global.C["player" + i].Cats._currentframe != 70)) {
_global.C["player" + i].Cats.anim.play();
} else if (_global.C["player" + i].Cats._currentframe == 30) {
if (_global.C["player" + i].Cats.anim._currentframe != 8) {
_global.C["player" + i].Cats.anim.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 50) {
if (_global.C["player" + i].Cats.anim._currentframe != 4) {
_global.C["player" + i].Cats.anim.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 80) {
if (_global.C["player" + i].Cats.anim.Gun._currentframe != 1) {
_global.C["player" + i].Cats.anim.Gun.play();
}
} else if (_global.C["player" + i].Cats._currentframe == 70) {
if (_global.C["player" + i].Cats.anim._currentframe != 70) {
_global.C["player" + i].Cats.anim.play();
}
}
_global.C["player" + i].Waiting.engrenage1.play();
_global.C["player" + i].Waiting.engrenage2.play();
_global.C["player" + i].Waiting.engrenage3.play();
_global.C["player" + i].Cats.anim.eye1.play();
_global.C["player" + i].Cats.anim.eye2.play();
if (_global.C["player" + i].Cats.anim.Gun.splash._currentframe != 1) {
_global.C["player" + i].Cats.anim.Gun.splash.play();
}
if (_global.C["player" + i].Cats.anim.DamageShown._currentframe != 50) {
_global.C["player" + i].Cats.anim.DamageShown.play();
}
_global.C["player" + i].Cats.anim.Gun.splash.flow1.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow2.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow3.play();
_global.C["player" + i].Cats.anim.Gun.splash.flow4.play();
_global.C.weapon.Kraken["player" + i].cats.movie.play();
_global.C["player" + i].Cats.anim.movie.play();
_global.C["player" + i].Cats.anim.animset.set1.play();
_global.C["player" + i].Cats.anim.animset.set2.play();
_global.C["player" + i].Cats.anim.set1.play();
_global.C["player" + i].Cats.anim.set2.play();
_global.C["player" + i].Cats.anim.set3.play();
i++;
}
if ((_global.C.weapon.Kraken._currentframe != 1) && (_global.C.weapon.Kraken._currentframe != 31)) {
_global.C.weapon.Kraken.play();
}
_global.Interface.noBtsmall._y = -345;
_global.Interface.Pause.pauseMc.gotoAndPlay("return");
_global.Interface.Winnername.winner.play();
_global.Interface.Playername.player.play();
_global.Interface.noBt._y = 90;
_global.C.weapon.Kraken.anim.play();
_global.C.weapon.donut.anim.play();
_global.C.weapon.donut.anim.splash1.play();
_global.C.weapon.donut.anim.splash2.play();
_global.C.weapon.paper.anim.play();
_global.C.CrossControl.Aim.btn_mire.mireAnim.play();
_global.C.CrossControl.Aim.mire.play();
_global.Interface.TimeOver.TimeUp.play();
} else {
_global.Paused = true;
i = 1;
while (i < 4) {
_global.C["player" + i].Waiting.engrenage1.stop();
_global.C["player" + i].Waiting.engrenage2.stop();
_global.C["player" + i].Waiting.engrenage3.stop();
_global.C["player" + i].Cats.anim.stop();
_global.C["player" + i].Cats.anim.Gun.stop();
_global.C["player" + i].Cats.anim.eye1.stop();
_global.C["player" + i].Cats.anim.eye2.stop();
_global.C["player" + i].Cats.anim.Gun.Watersplash.stop();
_global.C["player" + i].Cats.anim.Gun.splash.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow1.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow2.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow3.stop();
_global.C["player" + i].Cats.anim.Gun.splash.flow4.stop();
_global.C["player" + i].Cats.anim.animset.set1.stop();
_global.C["player" + i].Cats.anim.animset.set2.stop();
_global.C["player" + i].Cats.anim.set1.stop();
_global.C["player" + i].Cats.anim.set2.stop();
_global.C["player" + i].Cats.anim.set3.stop();
_global.C["player" + i].Cats.anim.movie.stop();
_global.C["player" + i].Cats.anim.DamageShown.stop();
_global.C.weapon.Kraken["player" + i].cats.movie.stop();
i++;
}
_global.Interface.noBtsmall._y = -290;
_global.Interface.Pause.gotoAndStop(2);
_global.Interface.Pause.pauseMc.gotoAndPlay("pause");
_global.Interface.Winnername.winner.stop();
_global.Interface.Playername.player.stop();
_global.Interface.TimeOver.TimeUp.stop();
_global.Interface.noBt._y = -20;
_global.C.weapon.Kraken.anim.stop();
_global.C.weapon.Kraken.stop();
_global.C.weapon.donut.anim.stop();
_global.C.weapon.donut.anim.splash1.stop();
_global.C.weapon.donut.anim.splash2.stop();
_global.C.weapon.paper.anim.stop();
_global.C.CrossControl.Aim.btn_mire.mireAnim.stop();
_global.C.CrossControl.Aim.mire.stop();
}
}
function updateScore() {
_global.Interface.ScoreSection.Score_txt.text = adapt(_global.G_score);
}
function adapt(Value) {
if (Value >= 1000) {
Thousand = Math.floor(Value / 1000);
Unite = Value - (Thousand * 1000);
if (Unite == 0) {
Unite = "000";
} else if (Unite < 10) {
Unite = "00" + Unite;
} else if (Unite < 100) {
Unite = "0" + Unite;
}
return((Thousand + ",") + Unite);
}
if (Value == 0) {
Value = "000";
} else if (Value < 10) {
Value = "00" + Value;
} else if (Value < 100) {
Value = "0" + Value;
}
return(Value);
}
function Initialize() {
aInterface = new Array();
nPassTime = 0;
}
function AnalyseRows(me) {
me.Analizer._x = (nPassTime * 6) + 3;
i = 95;
while (i > 0) {
me.Analizer._y = (i * 6) + 3;
totalval = me.Analizer.getBounds(_global.C._parent);
totalvalX = (totalval.xMax + totalval.xMin) / 2;
totalvalY = (totalval.yMax + totalval.yMin) / 2;
if (!me.Level1.hitTest(totalvalX, totalvalY, true)) {
aInterface[nPassTime] = 95 - i;
i = 0;
}
i--;
}
me.nextFrame();
}
function EndRow(me) {
if (nPassTime < 299) {
nPassTime++;
me.prevFrame();
} else {
me.play();
}
}
_global.C = this;
_global.ComedienTurn = this.player1;
_global.Paused = false;
_global.AlreadyPaused = false;
_global.Micelanious = "";
_global.Artefact = "";
_global.Artefact1 = "";
_global.Artefact2 = "";
_global.Artefact3 = "";
_global.ActionIncoming = false;
var G_player1 = player1;
var G_player2 = player2;
var G_player3 = player3;
var G_turn = 1;
var checkIdle = false;
var nPass = 0;
var nbrDead = 0;
var winnerside = 0;
this.onEnterFrame = function () {
if (!_global.Paused) {
G_player1.EnterFrame();
G_player2.EnterFrame();
G_player3.EnterFrame();
_global.Artefact.Action();
_global.Artefact1.Action();
_global.Artefact2.Action();
_global.Artefact3.Action();
_global.Micelanious.EnterFrame();
_global.Interface.checkTimer();
if (_global.Interface.EndStage) {
WaitWinner();
}
}
};
_global.C.map = this;
nPassTime = 0;
aInterface = new Array();
}
Instance of Symbol 829 MovieClip in Frame 55
onClipEvent (load) {
function FromIdle(me) {
this[etat](me);
}
function wait(me) {
nPass = 0;
wPass = 0;
waitTime = 35 + random(80);
etat = "waiting";
}
function waiting(me) {
wPass++;
if (wPass == 20) {
me.Waiting._y = -80;
me.Waiting._visible = true;
}
if (wPass > waitTime) {
etat = "calculate";
}
}
function calculate(me) {
nPass++;
if (nPass == 1) {
movingStarted = false;
distance1 = 0;
distance2 = 0;
ArcWay1 = 0;
ArcWay2 = 0;
CalcDistance(me, me._x);
}
if (nPass == 2) {
cats1Height = Math.abs(Math.round((600 - _global.C.player1._y) / 6) - 3);
cats2Height = Math.abs(Math.round((600 - _global.C.player2._y) / 6) - 3);
cats3Height = Math.abs(Math.round((600 - _global.C.player3._y) / 6) - 3);
cats1Position = Math.round(_global.C.player1._x / 6);
cats2Position = Math.round(_global.C.player2._x / 6);
cats3Position = Math.round(_global.C.player3._x / 6);
if (String(me._name) == "player2") {
Enemy1 = _global.C.player1;
Enemy2 = _global.C.player3;
findArc(cats2Position, cats1Position, "ArcWay1", me, Enemy1);
findArc(cats2Position, cats3Position, "ArcWay2", me, Enemy2);
}
if (String(me._name) == "player3") {
Enemy1 = _global.C.player1;
Enemy2 = _global.C.player2;
findArc(cats3Position, cats1Position, "ArcWay1", me, Enemy1);
findArc(cats3Position, cats2Position, "ArcWay2", me, Enemy2);
}
}
if (nPass == 3) {
CaracHidden = CheckHidden(me);
}
if (nPass == 4) {
AngleEnemy1 = CheckLine(me, Enemy1);
}
if (nPass == 5) {
AngleEnemy2 = CheckLine(me, Enemy2);
}
if (nPass == 6) {
WhatToDo(me);
}
if (nPass == 7) {
me.Waiting._visible = false;
me.Waiting._y = 0;
}
if (nPass == 8) {
this[myAttack](me);
}
if (nPass == 9) {
etat = NextEtat;
}
if (nPass == 20) {
me.etat = "Shoot";
this[myAttack + "Final"](me);
etat = "end";
}
}
function CalcDistance(me, myPos) {
if (String(me._name) == "player2") {
distance1 = Math.abs(myPos - _global.C.player1._x);
distance2 = Math.abs(myPos - _global.C.player3._x);
} else if (String(me._name) == "player3") {
distance1 = Math.abs(myPos - _global.C.player1._x);
distance2 = Math.abs(myPos - _global.C.player2._x);
}
}
function end(me) {
}
function WhatToDo(me) {
ChanceHit = 10 + (_global.C._parent.nLevel * 20);
CalcDistance(me, me._x);
if (distance1 < distance2) {
ChanceHit = ChanceHit + 5;
} else {
ChanceHit = ChanceHit - 5;
}
if (AngleEnemy1 != "obstruct") {
ChanceHit = ChanceHit + 5;
}
if (AngleEnemy2 != "obstruct") {
ChanceHit = ChanceHit - 5;
}
if (ArcWay1 <= ArcWay2) {
ChanceHit = ChanceHit + 5;
} else {
ChanceHit = ChanceHit - 5;
}
if (Enemy1.LifeRemain <= Enemy2.LifeRemain) {
ChanceHit = ChanceHit - 10;
}
if ((random(100) < ChanceHit) && (Enemy1.etat != "dead")) {
ArcWayChoose = ArcWay1;
EnemyChoose = Enemy1;
AngleEnemyChoose = AngleEnemy1;
DistEnemyChoose = distance1;
} else if (Enemy2.etat != "dead") {
ArcWayChoose = ArcWay2;
EnemyChoose = Enemy2;
AngleEnemyChoose = AngleEnemy2;
DistEnemyChoose = distance2;
} else {
ArcWayChoose = ArcWay1;
EnemyChoose = Enemy1;
AngleEnemyChoose = AngleEnemy1;
}
RandNbr = random(100);
if (!CaracHidden) {
me.TimeUnder = 5;
} else {
me.TimeUnder++;
}
if (RandNbr >= 80) {
if (me.TimeUnder < 5) {
RandNbr = random(80);
} else if ((RandNbr < 90) && (_global.ComedienTurn.nbreBallon > 0)) {
attaque = "Ballon";
} else if (_global.ComedienTurn.nbreShelter > 0) {
me.TimeUnder = 0;
attaque = "Shelters";
} else {
RandNbr = random(80);
}
}
if (RandNbr < 80) {
if (((RandNbr < 15) && (_global.ComedienTurn.LifeRemain <= 25)) && (_global.ComedienTurn.nbreKraken > 0)) {
attaque = "Kracken";
} else if (((RandNbr < 20) && (AngleEnemyChoose != "obstruct")) && (_global.ComedienTurn.nbreSoaker > 0)) {
attaque = "soaker";
} else if (((_global.ComedienTurn.nbreDonut > 0) && (ArcWayChoose < 60)) && (DistEnemyChoose < 1200)) {
attaque = "Donut";
} else if ((_global.ComedienTurn.nbrePaper > 0) && (!CaracHidden)) {
attaque = "paper";
} else if ((random(100) < 50) && (_global.ComedienTurn.nbreDonut > 0)) {
attaque = "Donut";
} else if (_global.ComedienTurn.nbreBallon > 0) {
attaque = "Ballon";
} else if (_global.ComedienTurn.nbreDonut > 0) {
attaque = "Donut";
} else {
nPass--;
}
}
if ((distance1 < 130) || (distance2 < 130)) {
attaque = "Ballon";
}
if (((attaque == "Ballon") && (me.Balloned < 3)) && (_global.ComedienTurn.nbreDonut > 0)) {
attaque = "Donut";
}
if (me.ShootMiss > 2) {
attaque = "Ballon";
}
me.Balloned++;
if (attaque == "soaker") {
me.ShootMiss = 0;
_global.ComedienTurn.nbreSoaker--;
_global.TheAttak = 4;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "soaker";
arcUsed = AngleEnemyChoose;
NextEtat = "SetAngle";
} else if (attaque == "Donut") {
_global.ComedienTurn.nbreDonut--;
_global.TheAttak = 1;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "Donut";
arcUsed = ArcWayChoose;
NextEtat = "SetArrow";
} else if (attaque == "paper") {
me.ShootMiss = 0;
_global.ComedienTurn.nbrePaper--;
_global.TheAttak = 3;
user = _global.ComedienTurn;
cible = EnemyChoose;
myAttack = "paper";
arcUsed = AngleEnemyChoose;
NextEtat = "SetPaper";
} else if (attaque == "Kracken") {
me.ShootMiss = 0;
_global.TheAttak = 2;
myAttack = "Kraken";
NextEtat = "SetKraken";
} else if (attaque == "Shelters") {
me.ShootMiss = 0;
myAttack = "Shelters";
NextEtat = "SetShelters";
} else if (attaque == "Ballon") {
me.ShootMiss = 0;
_global.ComedienTurn.nbreBallon--;
me.Balloned = 0;
myAttack = "Imove";
NextEtat = "SetMove";
}
_global.Interface.MatchInterface();
}
function findArc(theCatposs, enemyCats, Answer, cats1, cats2) {
DistanceOfP = Math.abs(theCatposs - enemyCats);
i = 0;
while (i <= DistanceOfP) {
distanceWidth = i;
if ((theCatposs - enemyCats) < 0) {
distanceHeight = _global.C.map.aInterface[theCatposs + i] - _global.C.map.aInterface[theCatposs];
if ((distanceHeight < 15) && (i < 8)) {
distanceHeight = distanceHeight - 5;
}
} else {
distanceHeight = (_global.C.map.aInterface[theCatposs - i] - 5) - _global.C.map.aInterface[theCatposs];
}
if (distanceHeight <= 0) {
distanceHeight = 0;
} else {
distanceHeight++;
}
angleRot = Math.atan2(distanceHeight, distanceWidth);
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
if (Answer == "ArcWay1") {
if (angleRot > ArcWay1) {
ArcWay1 = angleRot;
}
}
if (Answer == "ArcWay2") {
if (angleRot > ArcWay2) {
ArcWay2 = angleRot + 2;
}
}
i++;
}
if (cats1._y > cats2._y) {
angleRot = Math.atan2(Math.abs(cats1._y - cats2._y), Math.abs(cats1._x - cats2._x));
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
if (Answer == "ArcWay1") {
if (angleRot > ArcWay1) {
ArcWay1 = angleRot;
}
}
if (Answer == "ArcWay2") {
if (angleRot > ArcWay2) {
ArcWay2 = angleRot + 2;
}
}
}
}
function CheckHidden(cats) {
StartX = _global.C.CheckLine._x;
StartY = _global.C.CheckLine._y;
_global.C.CheckLine._xscale = 300;
_global.C.CheckLine._x = cats._x;
_global.C.CheckLine._y = cats._y - (cats._height / 2);
_global.C.CheckLine._rotation = 90;
i = 1;
while (i < 30) {
detectCoord = _global.C.CheckLine["Hit" + i].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
if (_global.C.Shelters.hitTest(detectCoordX, detectCoordY, true)) {
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(true);
}
i++;
}
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(false);
}
function CheckLine(cats1, cats2) {
angleRot = Math.atan2(cats1._y - cats2._y, cats1._x - cats2._x);
angleRot = (angleRot * 180) / Math.PI;
if (angleRot < 0) {
angleRot = angleRot * -1;
angleTemp = 180 - angleRot;
angleRot = 180 + angleTemp;
}
StartX = _global.C.CheckLine._x;
StartY = _global.C.CheckLine._y;
_global.C.CheckLine._xscale = Math.sqrt(((cats1._y - cats2._y) * (cats1._y - cats2._y)) + ((cats1._x - cats2._x) * (cats1._x - cats2._x)));
if (_global.C.CheckLine._xscale > 800) {
_global.C.CheckLine._xscale = 100;
return("obstruct");
}
_global.C.CheckLine._x = cats1._x;
_global.C.CheckLine._y = cats1._y - (cats1._height / 2);
_global.C.CheckLine._rotation = angleRot;
i = 1;
while (i < 30) {
detectCoord = _global.C.CheckLine["Hit" + i].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
if (_global.C.Level.hitTest(detectCoordX, detectCoordY, true)) {
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return("obstruct");
}
i++;
}
_global.C.CheckLine._x = StartX;
_global.C.CheckLine._y = StartY;
_global.C.CheckLine._rotation = 0;
_global.C.CheckLine._xscale = 100;
return(angleRot);
}
function Donut() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
if (arcUsed > 45) {
angleUsed = arcUsed;
Modifier = 5;
} else {
if (user._y >= cible._y) {
Modifier = (Math.abs(user._x - cible._x) / 40) + (Math.abs(user._y - cible._y) / 20);
if (Modifier > 20) {
Modifier = 20;
}
} else {
if (arcUsed != 0) {
Modifier = (Math.abs(user._x - cible._x) / 35) - ((cible._y - user._y) / 25);
} else {
Modifier = (Math.abs(user._x - cible._x) / 15) - ((cible._y - user._y) / 10);
}
if (Modifier > 20) {
Modifier = 20;
} else if (Modifier < -15) {
Modifier = -15;
}
}
angleUsed = arcUsed + Modifier;
}
Power = ((Math.abs(user._x - cible._x) / 8) - ((cible._y - user._y) / 6)) + (angleUsed / 4);
if (angleUsed < 15) {
Power = Power + angleUsed;
}
ModifierRate = Math.round(Math.abs((user._x - cible._x) / 25));
Power = Power + (random(ModifierRate) - (ModifierRate / 2));
angleUsed = angleUsed + random(ModifierRate / 2);
if (angleUsed > 85) {
angleUsed = 85;
}
if (Power > 150) {
Power = 150;
} else if (Power < 5) {
Power = 5;
}
if (attackReverse) {
angleUsed = 360 - angleUsed;
} else {
angleUsed = angleUsed + 180;
}
}
function paper() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.C.CrossControl.Aim._x = user._x - (user._width / 2);
_global.C.CrossControl.Aim._y = user._y - (user._height / 2);
TargetedX = cible._x - (cible._width / 2);
TargetedY = cible._y;
}
function soaker() {
if (user._x < cible._x) {
user._xscale = 100;
user.LifeBar._xscale = 100;
attackReverse = true;
} else {
user._xscale = -100;
user.LifeBar._xscale = -100;
attackReverse = false;
}
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("AttackGun");
}
function Kraken() {
_global.Micelanious = _global.C.weapon.Kraken;
_global.Micelanious.etat = "ShowPeople";
}
function Imove(me) {
depart = _global.C["player" + _global.C.G_turn]._x;
if (depart < 900) {
newPlace = "right";
select = random(730) + 985;
} else {
newPlace = "left";
select = random(730) + 85;
}
CalcDistance(me, select);
if ((distance1 < 145) || (distance2 < 145)) {
nPass--;
} else {
MaxPass = 1;
count = 0;
FinishMove = false;
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("StartFly");
}
}
function Shelters() {
_global.Interface.Level++;
duplicateMovieClip (_global.C.Shelters.Constructor, String("Shelter" + _global.Interface.Level), _global.Interface.Level);
duplicateMovieClip (_global.C.RopeSys.Corde, String("Corde" + _global.Interface.Level), _global.Interface.Level - 1000);
}
function DonutFinal() {
_global.C.weapon.donut.setDonutValue(Power, angleUsed);
_global.C["player" + _global.C.G_turn].etat = "Shoot";
_global.Micelanious = _global.C.weapon.donut;
_global.ActionIncoming = true;
}
function KrakenFinal() {
_global.Micelanious.shootAttak();
}
function soakerFinal() {
_global.C["player" + _global.C.G_turn].etat = "idle";
_global.Micelanious = _global.C["player" + _global.C.G_turn].Cats.anim.Gun;
_global.Micelanious.LaunchAttack();
_global.ActionIncoming = true;
}
function paperFinal() {
_global.Micelanious = _global.C.weapon.paper;
_global.ActionIncoming = true;
_global.C.CrossControl.Aim.CamFollow.gotoAndStop("choose");
}
function SetMove(me) {
if (oldX == me._x) {
count++;
MoveUp(me);
if (count > 45) {
newSelect(me);
}
} else {
count = 0;
UnMoveY(me);
}
if (newPlace == "right") {
if (select > me._x) {
oldX = me._x;
MoveRight(me);
} else {
UnMoveX(me);
FinishMove = true;
}
} else if (select < me._x) {
oldX = me._x;
MoveLeft(me);
} else {
UnMoveX(me);
FinishMove = true;
}
if (FinishMove && (me.BallXSpeed == 0)) {
etat = "end";
_global.Interface.SkipTurn();
me.Cats.gotoAndStop("Flyfall");
}
}
function newSelect(me) {
depart = _global.C["player" + _global.C.G_turn]._x;
OldSelect = select;
OldNewPlace = newPlace;
if (newPlace == "right") {
newPlace = "left";
select = me._x - random(me._x - 85);
} else {
newPlace = "right";
select = 1715 - random(1715 - me._x);
}
CalcDistance(me, select);
if ((distance1 < 145) || (distance2 < 145)) {
select = OldSelect;
newPlace = OldNewPlace;
} else {
count = 0;
MaxPass++;
}
if (MaxPass == 4) {
etat = "end";
_global.Interface.SkipTurn();
me.Cats.gotoAndStop("Flyfall");
}
}
function MoveUp(me) {
me.BallYSpeed = me.BallYSpeed - (me.nGravity / 2);
if (me.BallYSpeed < (me.BallMax * -1)) {
me.BallYSpeed = me.BallMax * -1;
}
}
function MoveDown(me) {
me.BallYSpeed = me.BallYSpeed + (me.nGravity / 2);
if (me.BallYSpeed > me.BallMax) {
me.BallYSpeed = me.BallMax;
}
}
function UnMoveY(me) {
if (me.BallYSpeed > 0.5) {
me.BallYSpeed = me.BallYSpeed - (me.nGravity / 4);
} else if (me.BallYSpeed < 0.5) {
me.BallYSpeed = me.BallYSpeed + (me.nGravity / 4);
} else {
me.BallYSpeed = 0;
}
}
function MoveRight(me) {
me.BallXSpeed = me.BallXSpeed + (me.nGravity / 2);
if (me.BallXSpeed > me.BallMax) {
me.BallXSpeed = me.BallMax;
}
}
function MoveLeft(me) {
me.BallXSpeed = me.BallXSpeed - (me.nGravity / 2);
if (me.BallXSpeed < (me.BallMax * -1)) {
me.BallXSpeed = me.BallMax * -1;
}
}
function UnMoveX(me) {
if (me.BallXSpeed > 0.5) {
me.BallXSpeed = me.BallXSpeed - (me.nGravity / 10);
} else if (me.BallXSpeed < -0.5) {
me.BallXSpeed = me.BallXSpeed + (me.nGravity / 10);
} else {
me.BallXSpeed = 0;
}
}
function SetArrow(me) {
if (!movingStarted) {
Angle = angleUsed;
if (attackReverse) {
Angle = 360 - Angle;
} else {
Angle = Angle - 180;
}
if (Angle < 90) {
Angle = 45 + (Angle / 2);
} else if (Angle < 180) {
Angle = 45 + ((180 - Angle) / 2);
} else if (Angle < 270) {
Angle = 45 - ((Angle - 180) / 2);
} else if (Angle < 360) {
Angle = 45 - ((360 - Angle) / 2);
}
Angle = Math.round(Angle);
movingStarted = true;
}
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = true;
if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe == Angle) {
if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual._currentframe < Math.round((Power * 40) / 150)) {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.nextFrame();
} else {
etat = "calculate";
}
} else if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe < Angle) {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.nextFrame();
} else {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.prevFrame();
}
}
function SetAngle(me) {
if (!movingStarted) {
Angle = arcUsed;
if (Angle < 90) {
Angle = 45 + (Angle / 2);
} else if (Angle < 180) {
Angle = 45 + ((180 - Angle) / 2);
} else if (Angle < 270) {
Angle = 45 - ((Angle - 180) / 2);
} else if (Angle < 360) {
Angle = 45 - ((360 - Angle) / 2);
}
Angle = Math.round(Angle);
movingStarted = true;
}
if (_global.C["player" + _global.C.G_turn].Cats.anim._currentframe == Angle) {
etat = "calculate";
} else if (_global.C["player" + _global.C.G_turn].Cats.anim._currentframe < Angle) {
_global.C["player" + _global.C.G_turn].Cats.anim.nextFrame();
} else {
_global.C["player" + _global.C.G_turn].Cats.anim.prevFrame();
}
}
function SetPaper(me) {
if (!movingStarted) {
PersoCoord = _global.C.CrossControl.Aim.CamFollow.getBounds(_global.C._parent);
PersoCoordX = (PersoCoord.xMax + PersoCoord.xMin) / 2;
PersoCoordY = (PersoCoord.yMax + PersoCoord.yMin) / 2;
Targeted = cible.getBounds(_global.C._parent);
TargetedX = (Targeted.xMax + Targeted.xMin) / 2;
TargetedY = (Targeted.yMax + Targeted.yMax) / 2;
DistaceX = PersoCoordX - TargetedX;
DistaceY = PersoCoordY - TargetedY;
panPass = 0;
movingStarted = true;
}
_global.C.CrossControl.Aim._x = _global.C.CrossControl.Aim._x - ((DistaceX * moveArray[panPass]) / 100);
_global.C.CrossControl.Aim._y = _global.C.CrossControl.Aim._y - ((DistaceY * moveArray[panPass]) / 100);
panPass++;
if (panPass > moveArray.length) {
etat = "calculate";
}
_global.C.cam.Follow(_global.C.CrossControl.Aim, 0, 0);
}
function SetKraken(me) {
if (!movingStarted) {
b = 0;
nmax = 65 + random(60);
movingStarted = true;
}
b++;
if (b == nmax) {
etat = "calculate";
}
}
function SetShelters(me) {
if (!movingStarted) {
startY = _global.Micelanious._y;
b = 0;
way = "top";
timeMove = 0;
timeToMove = 3;
movingStarted = true;
event1 = false;
event2 = false;
}
b++;
_global.C.cam.Follow(_global.Micelanious, 0, 0);
if ((b > 10) && (_global.Micelanious._rotation != 90)) {
_global.Micelanious.UpSideDown();
b = 0;
} else if (_global.Micelanious._rotation == 90) {
event1 = true;
}
if (_global.Micelanious._y > (startY - 100)) {
_global.Micelanious._y = _global.Micelanious._y - 5;
} else {
event2 = true;
}
if ((event1 && (event2)) && (_global.Micelanious.CheckPlace() == true)) {
_global.Micelanious.PlaceMicelanious();
} else if (event1 && (event2)) {
timeMove++;
if (way == "top") {
_global.Micelanious._y = _global.Micelanious._y - 5;
} else if (way == "bottom") {
_global.Micelanious._y = _global.Micelanious._y + 5;
} else if (way == "left") {
_global.Micelanious._x = _global.Micelanious._x - 5;
} else if (way == "right") {
_global.Micelanious._x = _global.Micelanious._x + 5;
}
if (timeMove == timeToMove) {
if (way == "top") {
way = "right";
} else if (way == "bottom") {
way = "left";
} else if (way == "left") {
way = "top";
} else if (way == "right") {
way = "bottom";
}
timeToMove = timeToMove + 2;
timeMove = 0;
}
}
}
_global.AI = this;
nPass = 0;
wPass = 0;
movingStarted = false;
angleUsed = 0;
waitTime = 0;
distance1 = 0;
distance2 = 0;
ArcWay1 = 0;
ArcWay2 = 0;
TargetedX = 0;
TargetedY = 0;
cats1Height = 0;
cats2Height = 0;
cats3Height = 0;
cats1Position = 0;
cats2Position = 0;
cats3Position = 0;
ChanceHit = 0;
Enemy1 = 0;
Enemy2 = 0;
AngleEnemy1 = 0;
AngleEnemy2 = 0;
MaxPass = 0;
user = 0;
cible = 0;
DistEnemyChoose = 0;
attaque = "";
myAttack = "";
arcUsed = "";
NextEtat = "";
PassMove = "";
etat = "wait";
StageWidth = 600;
StageHeight = 300;
moveArray = new Array();
moveArray = [14, 12, 11, 10, 9, 7, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0.5, 0.5, 0.3, 0.2, 0.2, 0.1, 0.1, 0.1];
}
Instance of Symbol 986 MovieClip in Frame 55
onClipEvent (load) {
function NoAction() {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
Ballon_mc.btn_Ballon.enabled = false;
if (deplaceDmg._currentframe != 1) {
deplaceDmg.gotoAndPlay("Baisse");
}
Shelter_mc.btn_Shelter.enabled = false;
if (SheltersDmg._currentframe != 1) {
SheltersDmg.gotoAndPlay("Baisse");
}
Paper_mc.btn_paper.enabled = false;
if (paperDmg._currentframe != 1) {
paperDmg.gotoAndPlay("Baisse");
}
Donut_mc.btn_donut.enabled = false;
if (donutDmg._currentframe != 1) {
donutDmg.gotoAndPlay("Baisse");
}
Soaker_mc.btn_soaker.enabled = false;
if (soakerDmg._currentframe != 1) {
soakerDmg.gotoAndPlay("Baisse");
}
Kracken_mc.btn_Kraken.enabled = false;
if (KrakenDmg._currentframe != 1) {
KrakenDmg.gotoAndPlay("Baisse");
}
}
function playerTurn() {
Ballon_mc.btn_Ballon.enabled = true;
Shelter_mc.btn_Shelter.enabled = true;
Paper_mc.btn_paper.enabled = true;
Donut_mc.btn_donut.enabled = true;
Soaker_mc.btn_soaker.enabled = true;
Kracken_mc.btn_Kraken.enabled = true;
}
function SkipTurn() {
_global.Artefact = "";
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
_global.ActionIncoming = true;
_global.C.checkIdle = false;
_global.Micelanious.ForceSpace();
btn_skip.enabled = false;
NoAction();
CancelAction();
_global.C.EndTurn();
nPass = 0;
this.onEnterFrame = function () {
if (!_global.Paused) {
nPass++;
if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead < (_global.numberPlayer - 1))) {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
if (_global.C["player" + _global.C.G_turn].etat == "dead") {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
}
if (!EndStage) {
MatchInterface();
NoAction();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
DeadTime = 1.5;
_global.ActionIncoming = false;
timeSpend = -29;
this.Time_txt.text = turnTime;
this.OTime_txt.text = turnTime;
_global.C.changeComedien(String("player" + _global.C.G_turn));
_global.C.cam.Find(_global.ComedienTurn, true);
delete onEnterFrame;
}
} else if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead == (_global.numberPlayer - 1))) {
EndStage = true;
_global.C.WinnerFound();
} else if ((nPass == Math.floor(DeadTime * 30)) && (LoseDone)) {
EndStage = true;
_global.C.LooserFound();
}
}
};
}
function deplace() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].nbreBallon--;
MatchInterface();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("StartFly");
}
}
function checkTimer() {
if (!_global.ActionIncoming) {
timeSpend++;
secRemain = Math.floor(((turnTime * 30) - timeSpend) / 30);
if (secRemain < 0) {
if (secRemain > -10) {
this.TimeOver.gotoAndStop(2);
SkipTurn();
timeSpend = 30000;
}
} else if (secRemain < 10) {
if (secRemain == 9) {
this.TimeOver.gotoAndStop(3);
}
BlinkPass++;
if (BlinkPass == 5) {
if (this.Time_txt._visible == true) {
_global.Sounds.PlayASound("Crono");
BlinkPass = 0;
this.Time_txt._visible = false;
this.OTime_txt._visible = false;
} else {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
}
}
this.Time_txt.text = "0" + secRemain;
this.OTime_txt.text = "0" + secRemain;
} else {
this.Time_txt.text = secRemain;
this.OTime_txt.text = secRemain;
}
}
}
function Shelters() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
Level++;
_global.C["player" + _global.C.G_turn].ClickDone(true);
duplicateMovieClip (_global.C.Shelters.Constructor, String("Shelter" + Level), Level);
duplicateMovieClip (_global.C.RopeSys.Corde, String("Corde" + Level), Level - 1000);
}
}
function paper() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 3;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowMouse";
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = false;
}
}
function donut() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 1;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.C["player" + _global.C.G_turn].Cats.Arrow._visible = true;
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowRayon";
}
}
function soaker() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 4;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("AttackGun");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowLine";
}
}
function Krakenn() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 2;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
_global.Micelanious = _global.C.weapon.Kraken;
_global.Micelanious.etat = "ShowPeople";
}
}
function MatchInterface() {
Kraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
OKraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
if ((_global.C["player" + _global.C.G_turn].LifeRemain > 25) || (_global.C["player" + _global.C.G_turn].nbreKraken < 1)) {
Kracken_mc.gotoAndStop(2);
} else {
Kracken_mc.gotoAndStop(1);
}
shelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
Oshelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
if (_global.C["player" + _global.C.G_turn].nbreShelter < 1) {
Shelter_mc.gotoAndStop(2);
} else {
Shelter_mc.gotoAndStop(1);
}
paper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
Opaper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
if (_global.C["player" + _global.C.G_turn].nbrePaper < 1) {
Paper_mc.gotoAndStop(2);
} else {
Paper_mc.gotoAndStop(1);
}
ballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
Oballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
if (_global.C["player" + _global.C.G_turn].nbreBallon < 1) {
Ballon_mc.gotoAndStop(2);
} else {
Ballon_mc.gotoAndStop(1);
}
soaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
Osoaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
if (_global.C["player" + _global.C.G_turn].nbreSoaker < 1) {
Soaker_mc.gotoAndStop(2);
} else {
Soaker_mc.gotoAndStop(1);
}
Donut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
ODonut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
if (_global.C["player" + _global.C.G_turn].nbreDonut < 1) {
Donut_mc.gotoAndStop(2);
} else {
Donut_mc.gotoAndStop(1);
}
}
_global.Interface = this;
btn_skip.enabled = false;
DeadTime = 1.5;
turnTime = 30;
timeSpend = 0;
Level = 0;
EndStage = false;
LoseDone = false;
BlinkPass = 0;
NoAction();
MatchInterface();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
_global.C.updateScore();
}
Instance of Symbol 832 MovieClip [_contButton] in Frame 55
onClipEvent (load) {
function KeyPressed() {
if (Key.getCode() == 32) {
KeySpace = true;
}
if (Key.getCode() == 37) {
KeyLeft = true;
}
if (Key.getCode() == 38) {
KeyUp = true;
}
if (Key.getCode() == 39) {
KeyRight = true;
}
if (Key.getCode() == 40) {
KeyDown = true;
}
}
function KeyReleased() {
if (Key.getCode() == 32) {
KeySpace = false;
}
if (Key.getCode() == 37) {
KeyLeft = false;
}
if (Key.getCode() == 38) {
KeyUp = false;
}
if (Key.getCode() == 39) {
KeyRight = false;
}
if (Key.getCode() == 40) {
KeyDown = false;
}
}
_global.Keys = this;
KeySpace = false;
KeyUp = false;
KeyDown = false;
KeyLeft = false;
KeyRight = false;
}
onClipEvent (keyDown) {
KeyPressed();
}
onClipEvent (keyUp) {
KeyReleased();
}
Instance of Symbol 839 MovieClip in Frame 55
onClipEvent (load) {
function Find(me, MovePoss) {
PersoCoord = me.CamFollow.getBounds(_global.C._parent);
PersoCoordX = (PersoCoord.xMax + PersoCoord.xMin) / 2;
PersoCoordY = (PersoCoord.yMax + PersoCoord.yMin) / 2;
DistanceX = (StageWidth / 2) - PersoCoordX;
DistanceY = (StageHeight / 2) - PersoCoordY;
nPass = 0;
MovePossible = MovePoss;
_global.Artefact = this;
}
function Action() {
_global.C._x = _global.C._x + ((DistanceX * moveArray[nPass]) / 100);
_global.C._y = _global.C._y + ((DistanceY * moveArray[nPass]) / 100);
nPass++;
CheckDespassX();
CheckDespassY();
if (nPass > moveArray.length) {
if (MovePossible) {
_global.C.CamOver();
}
_global.Artefact = "";
}
}
function Follow(me, ModifierX, ModifierY) {
PersoCoord = me.CamFollow.getBounds(_global.C._parent);
PersoCoordX = ((PersoCoord.xMax + PersoCoord.xMin) / 2) + ModifierX;
PersoCoordY = ((PersoCoord.yMax + PersoCoord.yMin) / 2) + ModifierY;
DistaceX = (StageWidth / 2) - PersoCoordX;
DistaceY = (StageHeight / 2) - PersoCoordY;
_global.C._x = _global.C._x + DistaceX;
_global.C._y = _global.C._y + DistaceY;
if ((ModifierX == 0) && (ModifierY == 0)) {
CheckDespassX();
CheckDespassY();
} else {
if (CheckDespassX() != 0) {
_global.C["player" + _global.C.G_turn].nHorizontal = _global.C["player" + _global.C.G_turn].nHorizontal + modificationX;
}
if (CheckDespassY() != 0) {
_global.C["player" + _global.C.G_turn].nVertical = _global.C["player" + _global.C.G_turn].nVertical + modificationY;
}
}
}
function CheckDespassX() {
if ((_global.C._x + (StageWidth * 3)) < StageWidth) {
modificationX = _global.C._x - (StageWidth - (StageWidth * 3));
_global.C._x = StageWidth - (StageWidth * 3);
return(modificationX);
}
if (_global.C._x > 0) {
modificationX = _global.C._x;
_global.C._x = 0;
return(modificationX);
}
return(0);
}
function CheckDespassY() {
if (_global.C._y > 0) {
modificationY = _global.C._y;
_global.C._y = 0;
return(modificationY);
}
if ((_global.C._y + (StageHeight * 2)) < StageHeight) {
modificationY = _global.C._y - (StageHeight - (StageHeight * 2));
_global.C._y = StageHeight - (StageHeight * 2);
return(modificationY);
}
return(0);
}
_global.C.cam = this;
nPass = 0;
moveArray = new Array();
moveArray = [14, 12, 11, 10, 9, 7, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0.5, 0.5, 0.3, 0.2, 0.2, 0.1, 0.1, 0.1];
StageWidth = 600;
StageHeight = 300;
}
Instance of Symbol 986 MovieClip in Frame 55
onClipEvent (load) {
function NoAction() {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
Ballon_mc.btn_Ballon.enabled = false;
if (deplaceDmg._currentframe != 1) {
deplaceDmg.gotoAndPlay("Baisse");
}
Shelter_mc.btn_Shelter.enabled = false;
if (SheltersDmg._currentframe != 1) {
SheltersDmg.gotoAndPlay("Baisse");
}
Paper_mc.btn_paper.enabled = false;
if (paperDmg._currentframe != 1) {
paperDmg.gotoAndPlay("Baisse");
}
Donut_mc.btn_donut.enabled = false;
if (donutDmg._currentframe != 1) {
donutDmg.gotoAndPlay("Baisse");
}
Soaker_mc.btn_soaker.enabled = false;
if (soakerDmg._currentframe != 1) {
soakerDmg.gotoAndPlay("Baisse");
}
Kracken_mc.btn_Kraken.enabled = false;
if (KrakenDmg._currentframe != 1) {
KrakenDmg.gotoAndPlay("Baisse");
}
}
function playerTurn() {
Ballon_mc.btn_Ballon.enabled = true;
Shelter_mc.btn_Shelter.enabled = true;
Paper_mc.btn_paper.enabled = true;
Donut_mc.btn_donut.enabled = true;
Soaker_mc.btn_soaker.enabled = true;
Kracken_mc.btn_Kraken.enabled = true;
}
function SkipTurn() {
_global.Artefact = "";
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
_global.ActionIncoming = true;
_global.C.checkIdle = false;
_global.Micelanious.ForceSpace();
btn_skip.enabled = false;
NoAction();
CancelAction();
_global.C.EndTurn();
nPass = 0;
this.onEnterFrame = function () {
if (!_global.Paused) {
nPass++;
if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead < (_global.numberPlayer - 1))) {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
if (_global.C["player" + _global.C.G_turn].etat == "dead") {
_global.C.G_turn++;
if (_global.C.G_turn == 4) {
_global.C.G_turn = 1;
}
}
if (!EndStage) {
MatchInterface();
NoAction();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
DeadTime = 1.5;
_global.ActionIncoming = false;
timeSpend = -29;
this.Time_txt.text = turnTime;
this.OTime_txt.text = turnTime;
_global.C.changeComedien(String("player" + _global.C.G_turn));
_global.C.cam.Find(_global.ComedienTurn, true);
delete onEnterFrame;
}
} else if (((!LoseDone) && (nPass == Math.floor(DeadTime * 30))) && (_global.C.nbrDead == (_global.numberPlayer - 1))) {
EndStage = true;
_global.C.WinnerFound();
} else if ((nPass == Math.floor(DeadTime * 30)) && (LoseDone)) {
EndStage = true;
_global.C.LooserFound();
}
}
};
}
function deplace() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].nbreBallon--;
MatchInterface();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("StartFly");
}
}
function checkTimer() {
if (!_global.ActionIncoming) {
timeSpend++;
secRemain = Math.floor(((turnTime * 30) - timeSpend) / 30);
if (secRemain < 0) {
if (secRemain > -10) {
this.TimeOver.gotoAndStop(2);
SkipTurn();
timeSpend = 30000;
}
} else if (secRemain < 10) {
if (secRemain == 9) {
this.TimeOver.gotoAndStop(3);
}
BlinkPass++;
if (BlinkPass == 5) {
if (this.Time_txt._visible == true) {
_global.Sounds.PlayASound("Crono");
BlinkPass = 0;
this.Time_txt._visible = false;
this.OTime_txt._visible = false;
} else {
BlinkPass = 0;
this.Time_txt._visible = true;
this.OTime_txt._visible = true;
}
}
this.Time_txt.text = "0" + secRemain;
this.OTime_txt.text = "0" + secRemain;
} else {
this.Time_txt.text = secRemain;
this.OTime_txt.text = secRemain;
}
}
}
function Shelters() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
Level++;
_global.C["player" + _global.C.G_turn].ClickDone(true);
duplicateMovieClip (_global.C.Shelters.Constructor, String("Shelter" + Level), Level);
duplicateMovieClip (_global.C.RopeSys.Corde, String("Corde" + Level), Level - 1000);
}
}
function paper() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 3;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowMouse";
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = false;
}
}
function donut() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 1;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Attack");
_global.C["player" + _global.C.G_turn].Cats.Arrow._visible = true;
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowRayon";
}
}
function soaker() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 4;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("AttackGun");
_global.Micelanious = _global.C.CrossControl.Aim;
_global.Micelanious.etat = "FollowLine";
}
}
function Krakenn() {
if (_global.C["player" + _global.C.G_turn].etat == "idle") {
_global.TheAttak = 2;
_global.Micelanious.ClearAction();
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.C["player" + _global.C.G_turn].Cats.gotoAndStop("Idle");
_global.Micelanious = _global.C.weapon.Kraken;
_global.Micelanious.etat = "ShowPeople";
}
}
function MatchInterface() {
Kraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
OKraken_txt.text = _global.C["player" + _global.C.G_turn].nbreKraken;
if ((_global.C["player" + _global.C.G_turn].LifeRemain > 25) || (_global.C["player" + _global.C.G_turn].nbreKraken < 1)) {
Kracken_mc.gotoAndStop(2);
} else {
Kracken_mc.gotoAndStop(1);
}
shelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
Oshelter_txt.text = _global.C["player" + _global.C.G_turn].nbreShelter;
if (_global.C["player" + _global.C.G_turn].nbreShelter < 1) {
Shelter_mc.gotoAndStop(2);
} else {
Shelter_mc.gotoAndStop(1);
}
paper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
Opaper_txt.text = _global.C["player" + _global.C.G_turn].nbrePaper;
if (_global.C["player" + _global.C.G_turn].nbrePaper < 1) {
Paper_mc.gotoAndStop(2);
} else {
Paper_mc.gotoAndStop(1);
}
ballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
Oballon_txt.text = _global.C["player" + _global.C.G_turn].nbreBallon;
if (_global.C["player" + _global.C.G_turn].nbreBallon < 1) {
Ballon_mc.gotoAndStop(2);
} else {
Ballon_mc.gotoAndStop(1);
}
soaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
Osoaker_txt.text = _global.C["player" + _global.C.G_turn].nbreSoaker;
if (_global.C["player" + _global.C.G_turn].nbreSoaker < 1) {
Soaker_mc.gotoAndStop(2);
} else {
Soaker_mc.gotoAndStop(1);
}
Donut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
ODonut_txt.text = _global.C["player" + _global.C.G_turn].nbreDonut;
if (_global.C["player" + _global.C.G_turn].nbreDonut < 1) {
Donut_mc.gotoAndStop(2);
} else {
Donut_mc.gotoAndStop(1);
}
}
_global.Interface = this;
btn_skip.enabled = false;
DeadTime = 1.5;
turnTime = 30;
timeSpend = 0;
Level = 0;
EndStage = false;
LoseDone = false;
BlinkPass = 0;
NoAction();
MatchInterface();
playerFace.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe);
Playername.gotoAndStop(_global.C["player" + _global.C.G_turn]._currentframe + 1);
_global.C.updateScore();
}
Frame 57
_global.Sounds.SwitchToPack();
Score_txt.text = adapt(_global.G_score);
OScore_txt.text = adapt(_global.G_score);
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
btn_submit_score._visible = true;
} else {
btn_submit_score._visible = false;
}
if (_global.HS.G_ShowHighScore == false) {
btn_submit_score._visible = false;
btn_view_score._visible = false;
}
Frame 59
_global.Sounds.SwitchToPack();
Frame 61
_global.Sounds.SwitchToPack();
Frame 63
_global.Sounds.SwitchToPack();
Frame 65
_global.Sounds.SwitchToPack();
Score_txt.text = adapt(_global.G_score);
OScore_txt.text = adapt(_global.G_score);
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
btn_submit_score._visible = true;
} else {
btn_submit_score._visible = false;
}
if (_global.HS.G_ShowHighScore == false) {
btn_submit_score._visible = false;
btn_view_score._visible = false;
}
Frame 67
_global.Sounds.SwitchToPack();
Score_txt.text = adapt(_global.G_score);
OScore_txt.text = adapt(_global.G_score);
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
btn_submit_score._visible = true;
} else {
btn_submit_score._visible = false;
}
if (_global.HS.G_ShowHighScore == false) {
btn_submit_score._visible = false;
btn_view_score._visible = false;
}
Frame 69
_global.Sounds.SwitchToPack();
Frame 71
_global.Sounds.SwitchToPack();
Frame 73
_global.Sounds.SwitchToPack();
Frame 75
_global.Sounds.SwitchToPack();
Score_txt.text = adapt(_global.G_score);
OScore_txt.text = adapt(_global.G_score);
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
btn_submit_score._visible = true;
} else {
btn_submit_score._visible = false;
}
if (_global.HS.G_ShowHighScore == false) {
btn_submit_score._visible = false;
btn_view_score._visible = false;
}
Frame 77
_global.Sounds.SwitchToPack();
Score_txt.text = adapt(_global.G_score);
OScore_txt.text = adapt(_global.G_score);
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
btn_submit_score._visible = true;
} else {
btn_submit_score._visible = false;
}
if (_global.HS.G_ShowHighScore == false) {
btn_submit_score._visible = false;
btn_view_score._visible = false;
}
Frame 79
_global.Sounds.SwitchToPack();
Frame 81
_global.Sounds.SwitchToPack();
Frame 83
_global.Sounds.SwitchToPack();
Frame 85
_global.Sounds.SwitchToPack();
Score_txt.text = adapt(_global.G_score);
OScore_txt.text = adapt(_global.G_score);
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
btn_submit_score._visible = true;
} else {
btn_submit_score._visible = false;
}
if (_global.HS.G_ShowHighScore == false) {
btn_submit_score._visible = false;
btn_view_score._visible = false;
}
Frame 87
Score_txt.text = adapt(_global.G_score);
OScore_txt.text = adapt(_global.G_score);
if (gProxyObj.getIsLoggedIn()) {
btn_submit_score._visible = true;
} else {
btn_submit_score._visible = false;
}
if (_global.Submited) {
_global.HS.submitScore(_global.G_score);
btn_submit_score._visible = false;
} else {
_global.HS.getScores();
}
Instance of Symbol 1096 MovieClip in Frame 87
onClipEvent (load) {
gotoAndStop(_global.player1Cats);
}
Instance of Symbol 1099 MovieClip "ControlScroll" in Frame 87
onClipEvent (load) {
scrollUp = false;
scrollDown = false;
}
onClipEvent (enterFrame) {
if (scrollUp == true) {
_parent.txt_highScore.scroll--;
} else if (scrollDown == true) {
_parent.txt_highScore.scroll++;
}
}
Instance of Symbol 35 MovieClip in Symbol 91 MovieClip Frame 1
onClipEvent (enterFrame) {
BytesTotal = _parent._parent.getBytesTotal();
BytesLoaded = _parent._parent.getBytesLoaded();
this.gotoAndStop(Math.round((BytesLoaded / BytesTotal) * 100));
if (BytesLoaded == BytesTotal) {
_parent._parent.gotoAndPlay("Loaded");
}
}
Symbol 1107 MovieClip [__Packages.Shelter] Frame 0
class Shelter extends MovieClip
{
var _name, etat, HitLife, _x, _y, StopTurn, stop, _parent, ObjectCoord, getBounds, ObjectCoordY, distance, gotoAndStop, removeMovieClip, Corde, _rotation, i, detectCoord, detectCoordX, detectCoordY;
function Shelter () {
super();
if (_name == "Constructor") {
etat = "invincible";
} else {
HitLife = 2;
_global.Micelanious = this;
etat = "underConstruction";
if (_global["HumanPlayer" + _global.C.G_turn] != true) {
_x = _global.C["player" + _global.C.G_turn]._x;
_y = _global.C["player" + _global.C.G_turn]._y - (_global.C["player" + _global.C.G_turn]._height / 2);
}
StopTurn = 0;
}
stop();
}
function EnterFrame() {
this[etat]();
}
function underConstruction() {
if (_global["HumanPlayer" + _global.C.G_turn] == true) {
_x = _parent._xmouse;
_y = _parent._ymouse;
ObjectCoord = getBounds(_global.C._parent);
ObjectCoordY = ObjectCoord.yMax;
if (ObjectCoordY > 200) {
distance = ObjectCoordY - 200;
_y = _y - distance;
}
CheckPlace();
if (_global.Keys.KeySpace && (CheckPlace())) {
(gotoAndStop("idle"));// not popped
PlaceMicelanious();
}
if (StopTurn > 10) {
if (_global.Keys.KeyRight) {
StopTurn = 0;
UpSideDown();
}
if (_global.Keys.KeyLeft) {
StopTurn = 0;
DownSideUp();
}
} else {
StopTurn++;
}
_global.MicelaniousCorde._x = _x;
_global.MicelaniousCorde._y = _y;
} else {
CheckPlace();
_global.MicelaniousCorde._x = _x;
_global.MicelaniousCorde._y = _y;
}
}
function PlaceMicelanious() {
_global.C["player" + _global.C.G_turn].nbreShelter--;
_global.Interface.MatchInterface();
_global.Micelanious.gotoAndStop("idle");
_global.C["player" + _global.C.G_turn].etat = "idle";
_global.Micelanious = "";
_global.Interface.SkipTurn();
}
function ForceSpace() {
_global.C["player" + _global.C.G_turn].etat = "idle";
if (!CheckPlace()) {
_global.MicelaniousCorde.remove();
(removeMovieClip());// not popped
} else {
_global.Micelanious.gotoAndStop("idle");
}
_global.Micelanious = "";
}
function UpSideDown() {
Corde._rotation = Corde._rotation - 45;
_rotation = _rotation + 45;
}
function DownSideUp() {
Corde._rotation = Corde._rotation + 45;
_rotation = _rotation - 45;
}
function CheckPlace() {
i = 1;
while (i < 11) {
detectCoord = this["hitPoint" + i].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
if (_global.C.Level.hitTest(detectCoordX, detectCoordY, true)) {
gotoAndStop("wrong");
return(false);
}
var _local3 = 0;
while (_local3 < _global.Interface.Level) {
if (_global.C.Shelters["Shelter" + _local3].hitTest(detectCoordX, detectCoordY, true)) {
gotoAndStop("wrong");
return(false);
}
_local3++;
}
i++;
}
if ((Math.abs(_x - _global.C.player1._x) < 125) && (Math.abs(_y - _global.C.player1._y) < 125)) {
gotoAndStop("wrong");
return(false);
}
if ((Math.abs(_x - _global.C.player2._x) < 125) && (Math.abs(_y - _global.C.player2._y) < 125)) {
gotoAndStop("wrong");
return(false);
}
if ((Math.abs(_x - _global.C.player3._x) < 125) && (Math.abs(_y - _global.C.player3._y) < 125)) {
gotoAndStop("wrong");
return(false);
}
gotoAndStop("place");
return(true);
}
function Hitted() {
if (HitLife == 2) {
HitLife = 1;
gotoAndStop("hit1");
} else {
_global.Sounds.PlayASound("ColoneBreak");
if (_rotation == 0) {
gotoAndStop("n");
} else if (_rotation == 45) {
gotoAndStop("ne");
} else if (_rotation == 90) {
gotoAndStop("e");
} else if (_rotation == 135) {
gotoAndStop("se");
} else if (_rotation == 180) {
gotoAndStop("s");
} else if (_rotation == -135) {
gotoAndStop("sw");
} else if (_rotation == -90) {
gotoAndStop("w");
} else if (_rotation == -45) {
gotoAndStop("nw");
}
}
}
function Destroy() {
_global.C.player1.etat = "Falling";
_global.C.player2.etat = "Falling";
if (_global.numberPlayer == 3) {
_global.C.player3.etat = "Falling";
}
(removeMovieClip());// not popped
}
function ClearAction() {
_global.MicelaniousCorde.removing();
(removeMovieClip());// not popped
}
}
Symbol 1108 MovieClip [__Packages.WeaponShot] Frame 0
class WeaponShot extends MovieClip
{
var StartX, _x, StartY, _y, gotoAndStop, pass, ScaledWath, waterFlow, difference, _name, _rotation, TargetX, DistanceX, Shoot, _yscale, Beforedetect, splash, _height, play, _currentframe, CamFollow, angleRotx, Power, angleRoty, UpGravity, chute, rebonds, detectCoord, detectCoordX, detectCoordY, stop;
function WeaponShot () {
super();
StartX = _x;
StartY = _y;
gotoAndStop("idle");
}
function EnterFrame() {
this[etat]();
}
function idle() {
}
function GoWater() {
pass++;
waterFlow._xscale = ScaledWath * (1 - (pass / 8));
waterFlow._x = waterFlow._x - (difference / 8);
if (pass == 8) {
etat = "idle";
}
}
function LaunchAttack() {
if (String(_name) == "paper") {
_global.Sounds.PlayASound("Paper");
_x = _global.C["player" + _global.C.G_turn]._x - (_global.C["player" + _global.C.G_turn]._width / 2);
_y = _global.C["player" + _global.C.G_turn]._y - _global.C["player" + _global.C.G_turn]._height;
_rotation = -90;
TargetX = (_global.C.CrossControl.Aim._x + (_global.C.CrossControl.Aim._width / 2)) - 15;
DistanceX = TargetX - _x;
etat = "Launched";
Shoot = 24;
if (_x > TargetX) {
_yscale = -100;
}
Beforedetect = 0;
} else if (String(_name) == "donut") {
_x = _global.C["player" + _global.C.G_turn]._x - (_global.C["player" + _global.C.G_turn]._width / 2);
_y = _global.C["player" + _global.C.G_turn]._y - (_global.C["player" + _global.C.G_turn]._height / 2);
Beforedetect = 0;
etat = "Throwed";
} else {
Beforedetect = 10;
splash._visible = false;
etat = "soaked";
}
}
function Launched() {
_global.C.cam.Follow(this, 0, 0);
if ((Shoot > 0) && (Shoot < 15)) {
DistanceX = (TargetX - _x) - (_height / 2);
_x = _x + (DistanceX / Shoot);
} else if ((Shoot > -0.3) && (Shoot < 0.3)) {
_global.Sounds.PlayASound("Paperfall");
_rotation = 90;
_x = TargetX - (_height / 2);
}
_y = _y - Shoot;
if (Shoot > 11) {
Shoot = Shoot - 0.3;
} else if (Shoot > -15) {
Shoot = Shoot - 1.2;
}
if (CheckObject(10)) {
itted();
}
Beforedetect++;
}
function soaked() {
play();
if (_currentframe > 15) {
splash._visible = true;
splash._x = CamFollow._x;
splash._y = CamFollow._y;
if (CheckObjectWater(15)) {
ittedWater();
} else {
_global.C.cam.Follow(this, 0, 0);
}
}
}
function Throwed() {
_global.C.cam.Follow(this, 0, 0);
_x = _x + ((Power / 5) * Math.cos(angleRotx * (Math.PI/180)));
if (((UpGravity / 5) * Math.sin(angleRoty * (Math.PI/180))) < -2) {
_y = _y + ((UpGravity / 5) * Math.sin(angleRoty * (Math.PI/180)));
} else {
if (chute == 0) {
chute = (UpGravity / 5) * Math.sin(angleRoty * (Math.PI/180));
}
_y = _y + chute;
if (chute < 24) {
chute++;
}
}
UpGravity = UpGravity - 4;
if (CheckDonut(8)) {
itted();
}
Beforedetect++;
}
function setDonutValue(force, angle) {
rebonds = 0;
force = (force / 2) + 60;
chute = 0;
UpGravity = force;
Power = force;
angleRotx = angle;
angleRoty = angle;
_global.HitShelters = false;
}
function CheckObject(hitLife) {
detectCoord = CamFollow.getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
if (_y > 550) {
return(true);
}
var _local3 = 0;
while (_local3 <= _global.Interface.Level) {
if (_global.C.Shelters["Shelter" + _local3].hitTest(detectCoordX, detectCoordY, true)) {
_global.C.Shelters["Shelter" + _local3].Hitted();
return(true);
}
_local3++;
}
if (_global.C.Level.hitTest(detectCoordX, detectCoordY, true) && (Beforedetect > 1)) {
return(true);
}
if (_global.C.player1.hitTest(CamFollow)) {
if ((_global.C.player1 == _global.ComedienTurn) && (Beforedetect > 6)) {
TouchPlayer(1, hitLife);
return(true);
}
if ((_global.C.player1 != _global.ComedienTurn) && (_global.C.player1.etat != "dead")) {
TouchPlayer(1, hitLife);
return(true);
}
} else if (_global.C.player2.hitTest(CamFollow)) {
if ((_global.C.player2 == _global.ComedienTurn) && (Beforedetect > 6)) {
TouchPlayer(2, hitLife);
return(true);
}
if ((_global.C.player2 != _global.ComedienTurn) && (_global.C.player2.etat != "dead")) {
TouchPlayer(2, hitLife);
return(true);
}
} else if (_global.C.player3.hitTest(CamFollow)) {
if ((_global.C.player3 == _global.ComedienTurn) && (Beforedetect > 6)) {
TouchPlayer(3, hitLife);
return(true);
}
if ((_global.C.player3 != _global.ComedienTurn) && (_global.C.player3.etat != "dead")) {
TouchPlayer(3, hitLife);
return(true);
}
}
return(false);
}
function CheckDonut(hitLife) {
if (_y > 550) {
_global.HitShelters = false;
return(true);
}
var _local4 = 1;
while (_local4 < 4) {
detectCoord = this["wall" + _local4].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
var _local3 = 0;
while (_local3 <= _global.Interface.Level) {
if (_global.C.Shelters["Shelter" + _local3].hitTest(detectCoordX, detectCoordY, true)) {
_global.ComedienTurn.ShootMiss++;
_global.C.Shelters["Shelter" + _local3].Hitted();
_global.HitShelters = true;
return(true);
}
_local3++;
}
if (_global.C.Level.hitTest(detectCoordX, detectCoordY, true) && (Beforedetect > 1)) {
if ((rebonds < 3) && (Beforedetect > 5)) {
Power = Power / 1.1;
if (_local4 == 1) {
difference = angleRotx - 270;
angleRotx = angleRotx + (difference * 2);
} else if (_local4 == 2) {
difference = angleRotx - 270;
angleRotx = angleRotx - (difference * 2);
} else if (_local4 == 3) {
UpGravity = Power;
chute = 0;
}
_x = _x + ((Power / 5) * Math.cos(angleRotx * (Math.PI/180)));
if (((UpGravity / 5) * Math.sin(angleRoty * (Math.PI/180))) < -2) {
_y = _y + ((UpGravity / 5) * Math.sin(angleRoty * (Math.PI/180)));
} else {
if (chute == 0) {
chute = (UpGravity / 5) * Math.sin(angleRoty * (Math.PI/180));
}
_y = _y + chute;
if (chute < 24) {
chute++;
}
}
rebonds++;
} else {
_global.ComedienTurn.ShootMiss++;
_global.HitShelters = false;
return(true);
}
}
if (_global.C.player1.hitTest(CamFollow)) {
if ((_global.C.player1 == _global.ComedienTurn) && (Beforedetect > 6)) {
TouchPlayer(1, hitLife);
_global.HitShelters = false;
return(true);
}
if ((_global.C.player1 != _global.ComedienTurn) && (_global.C.player1.etat != "dead")) {
_global.ComedienTurn.ShootMiss = 0;
TouchPlayer(1, hitLife);
_global.HitShelters = false;
return(true);
}
} else if (_global.C.player2.hitTest(CamFollow)) {
if ((_global.C.player2 == _global.ComedienTurn) && (Beforedetect > 6)) {
TouchPlayer(2, hitLife);
_global.HitShelters = false;
return(true);
}
if ((_global.C.player2 != _global.ComedienTurn) && (_global.C.player2.etat != "dead")) {
_global.ComedienTurn.ShootMiss = 0;
TouchPlayer(2, hitLife);
_global.HitShelters = false;
return(true);
}
} else if (_global.C.player3.hitTest(CamFollow)) {
if ((_global.C.player3 == _global.ComedienTurn) && (Beforedetect > 6)) {
TouchPlayer(3, hitLife);
_global.HitShelters = false;
return(true);
}
if ((_global.C.player3 != _global.ComedienTurn) && (_global.C.player3.etat != "dead")) {
_global.ComedienTurn.ShootMiss = 0;
TouchPlayer(3, hitLife);
_global.HitShelters = false;
return(true);
}
}
_local4++;
}
return(false);
}
function CheckObjectWater(hitLife) {
var _local4 = 6;
while (_local4 > 0) {
detectCoord = this["Camhit" + _local4].getBounds(_global.C._parent);
detectCoordX = detectCoord.xMax;
detectCoordY = detectCoord.yMax;
var _local3 = 0;
while (_local3 <= _global.Interface.Level) {
if (_global.C.Shelters["Shelter" + _local3].hitTest(detectCoordX, detectCoordY, true)) {
_global.C.Shelters["Shelter" + _local3].Hitted();
return(true);
}
_local3++;
}
if (_global.C.Level.hitTest(detectCoordX, detectCoordY, true)) {
return(true);
}
if (_global.C.player1.hitTest(this["Camhit" + _local4])) {
if ((_global.C.player1.etat != "dead") && (_global.C.G_turn != 1)) {
TouchPlayer(1, hitLife);
return(true);
}
}
if (_global.C.player2.hitTest(this["Camhit" + _local4])) {
if ((_global.C.player2.etat != "dead") && (_global.C.G_turn != 2)) {
TouchPlayer(2, hitLife);
return(true);
}
}
if (_global.C.player3.hitTest(this["Camhit" + _local4])) {
if ((_global.C.player3.etat != "dead") && (_global.C.G_turn != 3)) {
TouchPlayer(3, hitLife);
return(true);
}
}
_local4--;
}
return(false);
}
function itted() {
etat = "idle";
gotoAndStop("destroy");
}
function ittedWater() {
pass = 0;
ScaledWath = waterFlow._xscale;
difference = waterFlow._x - CamFollow._x;
etat = "GoWater";
stop();
splash.gotoAndPlay("splashing");
}
function stopWater() {
etat = "idle";
_global.Micelanious = "";
_global.Interface.SkipTurn();
_global.C.CrossControl.Aim.EndAction();
}
function Replace() {
gotoAndStop("idle");
_x = StartX;
_y = StartY;
_global.Micelanious = "";
_global.Interface.SkipTurn();
_global.C.CrossControl.Aim.EndAction();
}
function TouchPlayer(NoPlayer, hitLife) {
if (hitLife == 8) {
var _local5 = (Power - 60) * 2;
hitLife = ((_local5 / 135) * 10) + 5;
if (hitLife < 5) {
hitLife = 5;
} else if (hitLife > 15) {
hitLife = 15;
}
} else if (hitLife == 15) {
hitLife = (((40 - _currentframe) / 25) * 10) + 10;
if (hitLife < 10) {
hitLife = 10;
} else if (hitLife > 20) {
hitLife = 20;
}
}
hitLife = Math.floor(hitLife);
if ((_global.C.G_turn == 1) && (NoPlayer != 1)) {
_global.G_score = _global.G_score + (hitLife * 10);
_global.C.updateScore();
}
if (_global.C["player" + NoPlayer].etat == "idle") {
_global.Interface.DeadTime = 2.5;
_global.C["player" + NoPlayer].LifeRemain = _global.C["player" + NoPlayer].LifeRemain - hitLife;
_global.C["player" + NoPlayer].ClickDone(false);
if (_global.C["player" + NoPlayer].LifeRemain <= 0) {
_global.C.LoseLife();
_global.C["player" + NoPlayer].LifeRemain = 0;
_global.C["player" + NoPlayer].etat = "dead";
_global.C["player" + NoPlayer].Cats.gotoAndStop("Die");
} else {
_global.C["player" + NoPlayer].etat = "hurt";
_global.C["player" + NoPlayer].Cats.gotoAndStop("Hurt");
}
}
}
function donutExplode(me) {
if (me.hitTest(_global.C.player1)) {
if (_global.C.player1.etat != "hurt") {
if ((_global.HitShelters == true) && (_global.C.player1 != _global.ComedienTurn)) {
} else {
TouchPlayer(1, 5);
}
}
}
if (me.hitTest(_global.C.player2)) {
if (_global.C.player2.etat != "hurt") {
if ((_global.HitShelters == true) && (_global.C.player2 != _global.ComedienTurn)) {
} else {
TouchPlayer(2, 5);
}
}
}
if (me.hitTest(_global.C.player3)) {
if (_global.C.player3.etat != "hurt") {
if ((_global.HitShelters == true) && (_global.C.player3 != _global.ComedienTurn)) {
} else {
TouchPlayer(3, 5);
}
}
}
}
var etat = "idle";
}
Symbol 1109 MovieClip [__Packages.LifeBar] Frame 0
class LifeBar extends MovieClip
{
var _parent, nPass, Damage, LifeBar;
function LifeBar () {
super();
}
function CalculateDamage() {
_parent.ClickDone(false);
nPass = 0;
Damage = 0;
LifeBar._xscale = _parent.OldLife;
if (_global.Artefact1 == "") {
_global.Artefact1 = this;
} else if (_global.Artefact2 == "") {
_global.Artefact2 = this;
} else if (_global.Artefact3 == "") {
_global.Artefact3 = this;
}
}
function Action() {
if ((nPass > 0) && (nPass < 10)) {
Damage = Damage + ((_parent.OldLife - _parent.LifeRemain) / 9);
_parent.Cats.anim.DamageShown.damageAnim.Damage.text = Math.round(Damage);
_parent.Cats.anim.DamageShown.damageAnim.FDamage.text = Math.round(Damage);
_parent.Cats.anim.DamageShown.damageAnim.BDamage.text = Math.round(Damage);
LifeBar._xscale = LifeBar._xscale - ((_parent.OldLife - _parent.LifeRemain) / 9);
} else if (nPass == 10) {
_parent.OldLife = _parent.LifeRemain;
if (_global.Artefact1 == this) {
_global.Artefact1 = "";
} else if (_global.Artefact2 == this) {
_global.Artefact2 = "";
} else if (_global.Artefact3 == this) {
_global.Artefact3 = "";
}
}
nPass++;
}
}
Symbol 1110 MovieClip [__Packages.Cats] Frame 0
class Cats extends MovieClip
{
var nbreKraken, _parent, nbreShelter, nbreBallon, nbrePaper, nbreSoaker, nbreDonut, _name, etat, LifeRemain, OldLife, gotoAndStop, _x, _y, _xscale, LifeBar, Cats, mineHeight, nPosition, highestPos, hitTest, PersoCoord, PersoCoordX, PersoCoordXmax, PersoCoordXmin, PersoCoordY, PersoCoordYmax, PersoCoordYmin;
function Cats () {
super();
nbreKraken = _parent._parent["Krakenfor" + _parent._parent.nLevel];
nbreShelter = _parent._parent["Shelterfor" + _parent._parent.nLevel];
nbreBallon = _parent._parent["Ballonfor" + _parent._parent.nLevel];
nbrePaper = _parent._parent["Paperfor" + _parent._parent.nLevel];
nbreSoaker = _parent._parent["Soakerfor" + _parent._parent.nLevel];
nbreDonut = _parent._parent["Donutfor" + _parent._parent.nLevel];
if ((String(_name) == "player3") && (_global.numberPlayer == 2)) {
etat = "dead";
LifeRemain = 0;
OldLife = 0;
_global.C.nbrDead++;
} else {
etat = "Falling";
LifeRemain = 100;
OldLife = 100;
var _local4 = 1;
while (_local4 < 4) {
if (String(_name) == String("player" + _local4)) {
gotoAndStop(_global[("player" + _local4) + "Cats"]);
}
_local4++;
}
while (myPlace == 0) {
myPlace = random(6) + 1;
if (String(_name) != "player1") {
if (myPlace == _parent.player1.myPlace) {
myPlace = 0;
}
}
if (String(_name) != "player2") {
if (myPlace == _parent.player2.myPlace) {
myPlace = 0;
}
}
if (String(_name) != "player3") {
if (myPlace == _parent.player3.myPlace) {
myPlace = 0;
}
}
}
_x = _parent["place" + myPlace]._x;
_y = _parent["place" + myPlace]._y;
}
}
function EnterFrame() {
this[etat]();
}
function idle() {
if (_global["HumanPlayer" + _global.C.G_turn] == true) {
if (((_global.ComedienTurn == this) && (_global.C.checkIdle)) && (_global.Moving)) {
waitTime++;
if ((((_global.C._parent._xmouse > 450) && (_global.C._parent._ymouse < 225)) && (_global.C._parent._ymouse > 32)) && (_global.C._parent._xmouse < 600)) {
waitTime = 0;
nHorizontal = nHorizontal + ((_global.C._parent._xmouse - 450) / 5);
} else if ((((_global.C._parent._xmouse < 150) && (_global.C._parent._ymouse < 225)) && (_global.C._parent._ymouse > 32)) && (_global.C._parent._xmouse > 0)) {
waitTime = 0;
nHorizontal = nHorizontal - ((150 - _global.C._parent._xmouse) / 5);
}
if ((((_global.C._parent._ymouse < 55) && (_global.C._parent._ymouse > 0)) && (_global.C._parent._xmouse > 0)) && (_global.C._parent._xmouse < 600)) {
if ((_global.C._parent._ymouse < 32) && (_global.C._parent._xmouse > 432)) {
waitTime = 1;
} else if ((_global.C._parent._ymouse < 32) && (_global.C._parent._xmouse < 155)) {
waitTime = 1;
} else {
waitTime = 0;
nVertical = nVertical - ((55 - _global.C._parent._ymouse) / 5);
}
} else if ((((_global.C._parent._ymouse > 175) && (_global.C._parent._ymouse < 225)) && (_global.C._parent._xmouse > 0)) && (_global.C._parent._xmouse < 600)) {
waitTime = 0;
nVertical = nVertical + ((_global.C._parent._ymouse - 175) / 5);
} else if (((((_global.C._parent._ymouse > 225) && (nHorizontal != 0)) && (nVertical != 0)) && (_global.C._parent._xmouse > 0)) && (_global.C._parent._xmouse < 600)) {
if (_global.Micelanious == "") {
ClickDone(true);
}
waitTime = 1;
}
if (waitTime == 0) {
_global.C.cam.Follow(this, nHorizontal, nVertical);
} else if (waitTime >= 75) {
if (_global.Micelanious == "") {
ClickDone(true);
}
}
} else {
waitTime = 0;
nVertical = 0;
nHorizontal = 0;
}
} else if (_global.ComedienTurn == this) {
_global.AI.FromIdle(this);
}
}
function ClickDone(continuePoss) {
waitTime = 0;
nVertical = 0;
nHorizontal = 0;
_global.C.checkIdle = false;
_global.C.cam.Find(this, continuePoss);
}
function Flying() {
if (_xscale == -100) {
_xscale = 100;
LifeBar._xscale = 100;
}
_global.C.cam.Follow(this, 0, 0);
if (_global["HumanPlayer" + _global.C.G_turn] == true) {
if (_global.Keys.KeyUp) {
BallYSpeed = BallYSpeed - (nGravity / 2);
if (BallYSpeed < (BallMax * -1)) {
BallYSpeed = BallMax * -1;
}
} else if (_global.Keys.KeyDown) {
BallYSpeed = BallYSpeed + (nGravity / 2);
if (BallYSpeed > BallMax) {
BallYSpeed = BallMax;
}
} else if (BallYSpeed > 0.5) {
BallYSpeed = BallYSpeed - (nGravity / 4);
} else if (BallYSpeed < 0.5) {
BallYSpeed = BallYSpeed + (nGravity / 4);
} else {
BallYSpeed = 0;
}
if (_global.Keys.KeyLeft) {
BallXSpeed = BallXSpeed - (nGravity / 2);
if (BallXSpeed < (BallMax * -1)) {
BallXSpeed = BallMax * -1;
}
} else if (_global.Keys.KeyRight) {
BallXSpeed = BallXSpeed + (nGravity / 2);
if (BallXSpeed > BallMax) {
BallXSpeed = BallMax;
}
} else if (BallXSpeed > 0.5) {
BallXSpeed = BallXSpeed - (nGravity / 10);
} else if (BallXSpeed < -0.5) {
BallXSpeed = BallXSpeed + (nGravity / 10);
} else {
BallXSpeed = 0;
}
} else {
_global.AI.FromIdle(this);
}
if (BallYSpeed < 0) {
if (checkFlying(0, -2, Cats.HitTop)) {
_y = _y + BallYSpeed;
}
} else if (checkFlying(0, 0, Cats.HitBottom)) {
_y = _y + BallYSpeed;
} else {
BallYSpeed = 0;
}
if (BallXSpeed > 0) {
if (checkFlying(4, -1, Cats.HitRight)) {
_x = _x + BallXSpeed;
} else {
BallXSpeed = 0;
}
} else if (checkFlying(-4, -1, Cats.HitLeft)) {
_x = _x + BallXSpeed;
} else {
BallXSpeed = 0;
}
if (_x < MaxLeft) {
_x = MaxLeft;
BallXSpeed = 0;
} else if (_x > MaxRight) {
_x = MaxRight;
BallXSpeed = 0;
}
if (_y < MaxHeight) {
_y = MaxHeight;
BallYSpeed = 0;
}
if (_global.Keys.KeySpace && (_global["HumanPlayer" + _global.C.G_turn] == true)) {
_global.Interface.SkipTurn();
Cats.gotoAndStop("Flyfall");
}
}
function Shoot() {
etat = "idle";
ClickDone(false);
Cats.anim.gotoAndPlay(5);
}
function Falling() {
AdjustTurnFace();
DetectPlayerUnder();
if ((checkFalling() == false) && (nChute > 0)) {
AjustGround();
} else if (checkFalling()) {
if (nChute > 5) {
Cats.gotoAndStop("Fall");
}
nChute = nChute + nGravity;
if (nChute > nMaxFall) {
nChute = nMaxFall;
}
_y = _y + nChute;
if (nChute > 5) {
_global.C.cam.Follow(this, 0, 0);
}
} else if (LifeRemain <= 0) {
etat = "dead";
Cats.gotoAndStop("Die");
Cats.anim.gotoAndStop(70);
} else {
etat = "idle";
Cats.gotoAndStop("Idle");
}
}
function AdjustTurnFace() {
if ((_parent.player1._x < _parent.player2._x) && (_parent.player1._x < _parent.player3._x)) {
_parent.player1._xscale = 100;
_parent.player1.LifeBar._xscale = 100;
} else if ((_parent.player1._x > _parent.player2._x) && (_parent.player1._x > _parent.player3._x)) {
_parent.player1._xscale = -100;
_parent.player1.LifeBar._xscale = -100;
}
if ((_parent.player2._x < _parent.player1._x) && (_parent.player2._x < _parent.player3._x)) {
_parent.player2._xscale = 100;
_parent.player2.LifeBar._xscale = 100;
} else if ((_parent.player2._x > _parent.player1._x) && (_parent.player2._x > _parent.player3._x)) {
_parent.player2._xscale = -100;
_parent.player2.LifeBar._xscale = -100;
}
if ((_parent.player3._x < _parent.player2._x) && (_parent.player3._x < _parent.player1._x)) {
_parent.player3._xscale = 100;
_parent.player3.LifeBar._xscale = 100;
} else if ((_parent.player3._x > _parent.player2._x) && (_parent.player3._x > _parent.player1._x)) {
_parent.player3._xscale = -100;
_parent.player3.LifeBar._xscale = -100;
}
}
function DetectPlayerUnder() {
if (String(_name) != "player1") {
if (((Math.abs(_x - _parent.player1._x) < 90) && (Math.abs(_y - _parent.player1._y) < 90)) && (_parent.player1.etat != "Dead")) {
MoveMe(this, _parent.player1);
}
}
if (String(_name) != "player2") {
if (((Math.abs(_x - _parent.player2._x) < 90) && (Math.abs(_y - _parent.player2._y) < 90)) && (_parent.player2.etat != "Dead")) {
MoveMe(this, _parent.player2);
}
}
if (String(_name) != "player3") {
if (((Math.abs(_x - _parent.player3._x) < 90) && (Math.abs(_y - _parent.player3._y) < 90)) && (_parent.player3.etat != "Dead")) {
MoveMe(this, _parent.player3);
}
}
}
function MoveMe(cats1, cats2) {
mineHeight = Math.abs(Math.round((600 - _y) / 6) - 3);
nPosition = Math.round(_x / 6);
highestPos = _global.C.map.aInterface[nPosition];
if (cats2._x > (MaxRight - 100)) {
if (highestPos >= _global.C.map.aInterface[nPosition - 5]) {
cats1._x = cats1._x - 6;
}
} else if (cats2._x < (MaxLeft + 100)) {
if (highestPos >= _global.C.map.aInterface[nPosition + 5]) {
cats1._x = cats1._x + 6;
}
} else if (cats1._x > cats2._x) {
if (highestPos >= _global.C.map.aInterface[nPosition + 5]) {
cats1._x = cats1._x + 6;
}
} else if (highestPos >= _global.C.map.aInterface[nPosition - 5]) {
cats1._x = cats1._x - 6;
}
}
function checkFalling() {
mineHeight = Math.abs(Math.round((600 - _y) / 6) - 3);
nPosition = Math.round(_x / 6);
highestPos = _global.C.map.aInterface[nPosition];
if (_global.C.map.aInterface[nPosition + 2] > highestPos) {
highestPos = _global.C.map.aInterface[nPosition + 2];
} else if (_global.C.map.aInterface[nPosition - 2] > highestPos) {
highestPos = _global.C.map.aInterface[nPosition - 2];
}
if (hitTest(_parent.statue1) && (_parent.statue1._currentframe == 1)) {
if (_global.C.G_turn == 1) {
_global.G_score = _global.G_score + 300;
_global.C.updateScore();
}
_parent.statue1.gotoAndStop("taken");
}
if (hitTest(_parent.statue2) && (_parent.statue2._currentframe == 1)) {
if (_global.C.G_turn == 1) {
_global.G_score = _global.G_score + 200;
_global.C.updateScore();
}
_parent.statue2.gotoAndStop("taken");
}
if (hitTest(_parent.statue3) && (_parent.statue3._currentframe == 1)) {
if (_global.C.G_turn == 1) {
_global.G_score = _global.G_score + 100;
_global.C.updateScore();
}
_parent.statue3.gotoAndStop("taken");
}
if (mineHeight > highestPos) {
PersoCoord = Cats.getBounds(_global.C._parent);
PersoCoordX = (PersoCoord.xMax + PersoCoord.xMin) / 2;
PersoCoordXmax = PersoCoord.xMax - 10;
PersoCoordXmin = PersoCoord.xMin + 10;
PersoCoordY = PersoCoord.yMax;
if (((!_parent.Shelters.hitTest(PersoCoordXmax, PersoCoordY, true)) && (!_parent.Shelters.hitTest(PersoCoordXmin, PersoCoordY, true))) && (!_parent.Shelters.hitTest(PersoCoordX, PersoCoordY, true))) {
return(true);
}
return(false);
}
return(false);
}
function checkFlying(ModifierX, ModifierY, Bloc) {
mineHeight = Math.abs((Math.round((600 - _y) / 6) - 3) - ModifierY);
nPosition = Math.round(_x / 6);
if ((Bloc.modification == "y") || (Bloc == Cats.HitBottom)) {
if (String(_name) != "player1") {
if (Bloc.hitTest(_parent.player1)) {
return(false);
}
}
if (String(_name) != "player2") {
if (Bloc.hitTest(_parent.player2)) {
return(false);
}
}
if (String(_name) != "player3") {
if (Bloc.hitTest(_parent.player3)) {
return(false);
}
}
if (Bloc.hitTest(_parent.statue1) && (_parent.statue1._currentframe == 1)) {
if (_global.C.G_turn == 1) {
_global.G_score = _global.G_score + 300;
_global.C.updateScore();
}
_parent.statue1.gotoAndStop("taken");
}
if (Bloc.hitTest(_parent.statue2) && (_parent.statue2._currentframe == 1)) {
if (_global.C.G_turn == 1) {
_global.G_score = _global.G_score + 200;
_global.C.updateScore();
}
_parent.statue2.gotoAndStop("taken");
}
if (Bloc.hitTest(_parent.statue3) && (_parent.statue3._currentframe == 1)) {
if (_global.C.G_turn == 1) {
_global.G_score = _global.G_score + 100;
_global.C.updateScore();
}
_parent.statue3.gotoAndStop("taken");
}
}
if (Bloc.modification == "y") {
highestPos = _global.C.map.aInterface[nPosition + ModifierX];
} else {
highestPos = _global.C.map.aInterface[nPosition];
if (_global.C.map.aInterface[nPosition + 2] > highestPos) {
highestPos = _global.C.map.aInterface[nPosition + 2];
} else if (_global.C.map.aInterface[nPosition - 2] > highestPos) {
highestPos = _global.C.map.aInterface[nPosition - 2];
}
}
if (mineHeight > highestPos) {
PersoCoord = Bloc.getBounds(_global.C._parent);
PersoCoordX = (PersoCoord.xMax + PersoCoord.xMin) / 2;
PersoCoordY = (PersoCoord.yMax + PersoCoord.yMin) / 2;
if (Bloc.modification == "x") {
PersoCoordXmax = PersoCoord.xMax - Bloc.nNumber;
PersoCoordXmin = PersoCoord.xMin + Bloc.nNumber;
if (((!_parent.Shelters.hitTest(PersoCoordXmax, PersoCoordY, true)) && (!_parent.Shelters.hitTest(PersoCoordXmin, PersoCoordY, true))) && (!_parent.Shelters.hitTest(PersoCoordX, PersoCoordY, true))) {
return(true);
}
return(false);
}
PersoCoordYmax = PersoCoord.yMax - Bloc.nNumber;
PersoCoordYmin = PersoCoord.yMin + Bloc.nNumber;
if (((!_parent.Shelters.hitTest(PersoCoordX, PersoCoordYmax, true)) && (!_parent.Shelters.hitTest(PersoCoordX, PersoCoordYmin, true))) && (!_parent.Shelters.hitTest(PersoCoordX, PersoCoordY, true))) {
return(true);
}
return(false);
}
return(false);
}
function AjustGround() {
if ((nChute > 0) && (nChute < 3)) {
if (LifeRemain <= 0) {
etat = "dead";
Cats.gotoAndStop("Die");
Cats.anim.gotoAndStop(70);
} else {
etat = "idle";
nChute = 0;
if (Cats.anim._currentframe < 9) {
Cats.anim.gotoAndPlay(9);
}
}
} else {
if (Cats.anim._currentframe < 9) {
Cats.anim.gotoAndPlay(9);
}
nChute = nChute + nGravity;
nChute = nChute * (-(nGravity / 4));
if (nChute > nMaxFall) {
nChute = nMaxFall;
}
_y = _y + nChute;
if (_global.ComedienTurn == _name) {
_global.C.cam.Follow(this, 0, 0);
}
}
}
function Hurted() {
if (checkFalling()) {
etat = "Falling";
} else {
etat = "idle";
}
Cats.gotoAndStop("Idle");
}
function dead() {
}
var nChute = 0;
var nGravity = 1.4;
var nMaxFall = 16;
var BallYSpeed = 0;
var BallXSpeed = 0;
var BallMax = 5;
var MaxLeft = 50;
var MaxRight = 1750;
var MaxHeight = 20;
var nVertical = 0;
var nHorizontal = 0;
var waitTime = 0;
var myPlace = 0;
var Balloned = 1;
}
Symbol 1111 MovieClip [__Packages.AimTarget] Frame 0
class AimTarget extends MovieClip
{
var etat, StartX, _x, StartY, _y, gotoAndStop, _width, _parent, _height, Power, stadeUp, angleRot;
function AimTarget () {
super();
etat = "idle";
StartX = _x;
StartY = _y;
gotoAndStop("Idle");
}
function EnterFrame() {
this[etat]();
}
function idle() {
}
function FollowMouse() {
_x = _parent._xmouse - (_width / 2);
_y = _parent._ymouse - (_height / 2);
if (_x < _global.ComedienTurn._x) {
_global.ComedienTurn._xscale = -100;
_global.ComedienTurn.LifeBar._xscale = -100;
} else {
_global.ComedienTurn._xscale = 100;
_global.ComedienTurn.LifeBar._xscale = 100;
}
if (_global.Keys.KeySpace) {
shootPaper();
}
}
function FollowRayon() {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = true;
if (_global.Keys.KeyUp) {
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.nextFrame();
} else if (_global.Keys.KeyDown) {
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.prevFrame();
}
if (_global.Keys.KeyRight) {
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.ComedienTurn._xscale = 100;
_global.ComedienTurn.LifeBar._xscale = 100;
} else if (_global.Keys.KeyLeft) {
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.ComedienTurn._xscale = -100;
_global.ComedienTurn.LifeBar._xscale = -100;
}
if (_global.Keys.KeySpace) {
Power = 0;
stadeUp = true;
etat = "ShootDonut";
_global.Interface.NoAction();
}
}
function FollowLine() {
if (_global.Keys.KeyUp) {
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.anim.nextFrame();
} else if (_global.Keys.KeyDown) {
_global.C["player" + _global.C.G_turn].ClickDone(true);
_global.C["player" + _global.C.G_turn].Cats.anim.prevFrame();
}
if (_global.Keys.KeyRight) {
_global.ComedienTurn._xscale = 100;
_global.ComedienTurn.LifeBar._xscale = 100;
} else if (_global.Keys.KeyLeft) {
_global.ComedienTurn._xscale = -100;
_global.ComedienTurn.LifeBar._xscale = -100;
}
if (_global.Keys.KeySpace) {
ShootSoakers();
}
}
function ShootDonut() {
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._visible = true;
_global.C["player" + _global.C.G_turn].ClickDone(false);
if (stadeUp) {
Power = Power + 5;
if (Power == 150) {
stadeUp = false;
}
} else {
Power = Power - 5;
if (Power == 20) {
stadeUp = true;
}
}
_global.C["player" + _global.C.G_turn].Cats.anim.Arrow.Fleche.visual.gotoAndStop(Math.round((Power * 40) / 150));
if (!_global.Keys.KeySpace) {
if (_global.C["player" + _global.C.G_turn]._xscale == 100) {
if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe > 45) {
angleRot = 90 - (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe * 2);
} else {
angleRot = 90 - (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe * 2);
}
} else if (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe > 45) {
angleRot = (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe * 2) + 90;
} else {
angleRot = (_global.C["player" + _global.C.G_turn].Cats.anim.Arrow._currentframe * 2) + 90;
}
_global.C["player" + _global.C.G_turn].nbreDonut--;
_global.Interface.MatchInterface();
_global.C.weapon.donut.setDonutValue(Power, angleRot);
_global.C["player" + _global.C.G_turn].etat = "Shoot";
_global.Micelanious = _global.C.weapon.donut;
_global.ActionIncoming = true;
}
}
function ShootSoakers() {
_global.C["player" + _global.C.G_turn].nbreSoaker--;
_global.Interface.MatchInterface();
_global.Interface.NoAction();
_global.C["player" + _global.C.G_turn].etat = "idle";
_global.C["player" + _global.C.G_turn].ClickDone(false);
_global.Micelanious = _global.C["player" + _global.C.G_turn].Cats.anim.Gun;
_global.Micelanious.LaunchAttack();
_global.ActionIncoming = true;
}
function shootPaper() {
_global.C["player" + _global.C.G_turn].nbrePaper--;
_global.Interface.MatchInterface();
_global.Interface.NoAction();
_global.C["player" + _global.C.G_turn].etat = "Shoot";
_global.Micelanious = _global.C.weapon.paper;
_global.ActionIncoming = true;
etat = "idle";
gotoAndStop("choose");
}
function EndAction() {
_x = StartX;
_y = StartY;
gotoAndStop("Idle");
}
function ForceSpace() {
_global.Micelanious = "";
_x = StartX;
_y = StartY;
}
function ClearAction() {
_global.Micelanious = "";
_x = StartX;
_y = StartY;
}
}
Symbol 1112 MovieClip [__Packages.Kraken] Frame 0
class Kraken extends MovieClip
{
var StartX, _x, StartY, _y, etat, gotoAndStop, player1, player2, player3, catsHighlight, Passcats, nPass, play, TimeSpend;
function Kraken () {
super();
StartX = _x;
StartY = _y;
}
function EnterFrame() {
this[etat]();
}
function idle() {
}
function ShowPeople() {
gotoAndStop("Select");
player1.gotoAndStop(_global.player1Cats);
player2.gotoAndStop(_global.player2Cats);
player3.gotoAndStop(_global.player3Cats);
player1._visible = false;
player2._visible = false;
player3._visible = false;
if (_global.C.player1.LifeRemain <= 0) {
player1.cats.gotoAndStop(2);
}
if (_global.C.player2.LifeRemain <= 0) {
player2.cats.gotoAndStop(2);
}
if (_global.C.player3.LifeRemain <= 0) {
player3.cats.gotoAndStop(2);
}
_x = (-_global.C._x) + 250;
_y = (-_global.C._y) + 100;
etat = "choose";
catsHighlight = 1;
Passcats = 0;
nPass = 1;
}
function choose() {
follow();
nPass++;
if (nPass > 3) {
nPass = 1;
catsHighlight++;
Passcats++;
if (catsHighlight == (_global.numberPlayer + 1)) {
catsHighlight = 1;
}
if (Passcats == (_global.numberPlayer + 1)) {
Passcats = 1;
}
if (_global.C["player" + catsHighlight].etat == "dead") {
catsHighlight++;
if (catsHighlight == (_global.numberPlayer + 1)) {
catsHighlight = 1;
}
if (_global.C["player" + catsHighlight].etat == "dead") {
catsHighlight++;
if (catsHighlight == (_global.numberPlayer + 1)) {
catsHighlight = 1;
}
}
}
if ((_global.C["player" + Passcats].etat == "dead") || (Passcats == catsHighlight)) {
Passcats++;
if (Passcats == (_global.numberPlayer + 1)) {
Passcats = 1;
}
if ((_global.C["player" + Passcats].etat == "dead") || (Passcats == catsHighlight)) {
Passcats++;
if (Passcats == (_global.numberPlayer + 1)) {
Passcats = 1;
}
}
}
this["player" + Passcats]._visible = false;
this["player" + catsHighlight]._visible = true;
}
if (_global.Keys.KeySpace) {
if (_global["HumanPlayer" + _global.C.G_turn] == true) {
shootAttak();
}
}
}
function shootAttak() {
_global.C["player" + _global.C.G_turn].nbreKraken--;
_global.Interface.MatchInterface();
_global.Interface.NoAction();
if (_global.C["player" + catsHighlight].etat != "dead") {
_global.ActionIncoming = true;
etat = "idle";
play();
} else {
TimeSpend = 0;
etat = "spare";
}
}
function KyckPlayer() {
etat = "focusInto";
_global.C["player" + catsHighlight].ClickDone(false);
}
function spare() {
TimeSpend++;
if (TimeSpend > 30) {
EndAction();
}
}
function follow() {
_x = (-_global.C._x) + 250;
_y = (-_global.C._y) + 100;
}
function focusInto() {
_x = _global.C["player" + catsHighlight]._x;
_y = _global.C["player" + catsHighlight]._y - 75;
}
function HurtTime() {
if (_global.C["player" + catsHighlight].etat == "idle") {
_global.Interface.DeadTime = 2.5;
_global.C["player" + catsHighlight].LifeRemain = _global.C["player" + catsHighlight].LifeRemain - 50;
_global.C["player" + catsHighlight].ClickDone(false);
if (_global.C["player" + catsHighlight].LifeRemain <= 0) {
_global.C.LoseLife();
_global.C["player" + catsHighlight].LifeRemain = 0;
_global.C["player" + catsHighlight].etat = "dead";
_global.C["player" + catsHighlight].Cats.gotoAndStop("Die");
} else {
_global.C["player" + catsHighlight].etat = "hurt";
_global.C["player" + catsHighlight].Cats.gotoAndStop("Hurt");
}
}
}
function EndAction() {
gotoAndStop("Select");
_x = StartX;
_y = StartY;
_global.Micelanious = "";
_global.Interface.SkipTurn();
}
function ClearAction() {
gotoAndStop("Select");
_x = StartX;
_y = StartY;
_global.Micelanious = "";
}
function ForceSpace() {
gotoAndStop("Select");
_x = StartX;
_y = StartY;
_global.Micelanious = "";
}
}
Symbol 1113 MovieClip [__Packages.Rope] Frame 0
class Rope extends MovieClip
{
var _name, gotoAndStop, removeMovieClip;
function Rope () {
super();
if (_name == "Corde") {
} else {
_global.MicelaniousCorde = this;
}
}
function removing() {
(gotoAndStop(2));// not popped
(removeMovieClip());// not popped
}
}
Symbol 125 MovieClip Frame 1
stop();
Symbol 230 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("Instruction");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 234 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("Mode");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 253 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_parent._currentframe == 20) {
_parent.gotoAndStop("Mode");
} else {
if (!_global.AlreadyPaused) {
_global.C.fPause();
}
_parent.prevFrame();
}
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 257 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
nextFrame();
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 258 Button
on (release) {
_parent.gotoAndStop("Title");
}
Symbol 259 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_parent._currentframe == 20) {
_parent.gotoAndStop("Mode");
} else {
if (!_global.AlreadyPaused) {
_global.C.fPause();
}
_parent.prevFrame();
}
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 260 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
prevFrame();
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 312 MovieClip Frame 1
stop();
if (_parent._currentframe != 20) {
BackMenu._visible = false;
}
Symbol 316 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("Title");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 319 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_global.HumanPlayer1 = true;
_global.HumanPlayer2 = false;
_global.HumanPlayer3 = false;
_global.numberPlayer = 3;
gotoAndStop ("single");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 322 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_global.HumanPlayer1 = true;
_global.HumanPlayer2 = true;
_global.HumanPlayer3 = false;
_global.numberPlayer = 2;
gotoAndStop ("multi");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 325 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_global.HumanPlayer1 = true;
_global.HumanPlayer2 = true;
_global.HumanPlayer3 = true;
_global.numberPlayer = 3;
gotoAndStop ("multi");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 329 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("Mode");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 341 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp1");
_parent.Blik.gotoAndStop("choose1p");
_parent.waffle.gotoAndStop("choose1p");
_global.player1Cats = 1;
if (random(100) < 50) {
_global.player2Cats = 2;
_global.player3Cats = 3;
} else {
_global.player2Cats = 3;
_global.player3Cats = 2;
}
_parent.CatFight.gotoAndStop(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 346 MovieClip Frame 1
stop();
Symbol 356 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp1");
_parent.Gordon.gotoAndStop("choose1p");
_parent.waffle.gotoAndStop("choose1p");
_global.player1Cats = 2;
if (random(100) < 50) {
_global.player2Cats = 1;
_global.player3Cats = 3;
} else {
_global.player2Cats = 3;
_global.player3Cats = 1;
}
_parent.CatFight.gotoAndStop(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 359 MovieClip Frame 1
stop();
Symbol 375 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp1");
_parent.Gordon.gotoAndStop("choose1p");
_parent.Blik.gotoAndStop("choose1p");
_global.player1Cats = 3;
if (random(100) < 50) {
_global.player2Cats = 2;
_global.player3Cats = 1;
} else {
_global.player2Cats = 1;
_global.player3Cats = 2;
}
_parent.CatFight.gotoAndStop(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 378 MovieClip Frame 1
stop();
Symbol 382 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_parent.Transition.gotoAndPlay(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 383 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 3
_global.Sounds.PlayASound("ballon");
Symbol 390 MovieClip Frame 1
stop();
Symbol 390 MovieClip Frame 2
noHand.useHandCursor = false;
Symbol 390 MovieClip Frame 58
_parent.gotoAndStop(String(_global.NextStep));
Symbol 391 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (((Gordon._currentframe == 1) && (Blik._currentframe == 1)) && (waffle._currentframe == 1)) {
gotoAndStop ("Mode");
} else if (((Gordon._currentframe == 11) && (Blik._currentframe != 31)) && (waffle._currentframe != 31)) {
Gordon.gotoAndStop(1);
Blik.gotoAndStop(1);
waffle.gotoAndStop(1);
} else if (((Gordon._currentframe != 31) && (Blik._currentframe == 11)) && (waffle._currentframe != 31)) {
Gordon.gotoAndStop(1);
Blik.gotoAndStop(1);
waffle.gotoAndStop(1);
} else if (((Gordon._currentframe != 31) && (Blik._currentframe != 31)) && (waffle._currentframe == 11)) {
Gordon.gotoAndStop(1);
Blik.gotoAndStop(1);
waffle.gotoAndStop(1);
} else if (Gordon._currentframe == 31) {
Gordon.gotoAndStop(21);
if (Blik._currentframe == 11) {
waffle.gotoAndStop(21);
} else {
Blik.gotoAndStop(21);
}
} else if (Blik._currentframe == 31) {
Blik.gotoAndStop(21);
if (Gordon._currentframe == 11) {
waffle.gotoAndStop(21);
} else {
Gordon.gotoAndStop(21);
}
} else if (waffle._currentframe == 31) {
waffle.gotoAndStop(21);
if (Blik._currentframe == 11) {
Gordon.gotoAndStop(21);
} else {
Blik.gotoAndStop(21);
}
}
CatFight.gotoAndStop(1);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 395 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp1");
_parent.Blik.gotoAndStop("choosep2");
_parent.waffle.gotoAndStop("choosep2");
_global.player1Cats = 1;
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 396 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp2");
if (_parent.waffle._currentframe == 21) {
if (_global.numberPlayer != 2) {
_parent.waffle.gotoAndStop("selectedp3");
} else {
_parent.waffle.gotoAndStop("Unused");
}
_global.player3Cats = 3;
} else if (_parent.Blik._currentframe == 21) {
if (_global.numberPlayer != 2) {
_parent.Blik.gotoAndStop("selectedp3");
} else {
_parent.Blik.gotoAndStop("Unused");
}
_global.player3Cats = 2;
}
_global.player2Cats = 1;
_parent.CatFight.gotoAndStop(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 397 MovieClip Frame 1
stop();
Symbol 398 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp1");
_parent.Gordon.gotoAndStop("choosep2");
_parent.waffle.gotoAndStop("choosep2");
_global.player1Cats = 2;
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 399 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp2");
if (_parent.Gordon._currentframe == 21) {
if (_global.numberPlayer != 2) {
_parent.Gordon.gotoAndStop("selectedp3");
} else {
_parent.Gordon.gotoAndStop("Unused");
}
_global.player3Cats = 1;
} else if (_parent.waffle._currentframe == 21) {
if (_global.numberPlayer != 2) {
_parent.waffle.gotoAndStop("selectedp3");
} else {
_parent.waffle.gotoAndStop("Unused");
}
_global.player3Cats = 3;
}
_global.player2Cats = 2;
_parent.CatFight.gotoAndStop(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 400 MovieClip Frame 1
stop();
Symbol 401 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp1");
_parent.Gordon.gotoAndStop("choosep2");
_parent.Blik.gotoAndStop("choosep2");
_global.player1Cats = 3;
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 402 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("selectedp2");
if (_parent.Gordon._currentframe == 21) {
if (_global.numberPlayer != 2) {
_parent.Gordon.gotoAndStop("selectedp3");
} else {
_parent.Gordon.gotoAndStop("Unused");
}
_global.player3Cats = 1;
} else if (_parent.Blik._currentframe == 21) {
if (_global.numberPlayer != 2) {
_parent.Blik.gotoAndStop("selectedp3");
} else {
_parent.Blik.gotoAndStop("Unused");
}
_global.player3Cats = 2;
}
_global.player2Cats = 3;
_parent.CatFight.gotoAndStop(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 403 MovieClip Frame 1
stop();
Symbol 409 MovieClip Frame 1
_global.C.map.Initialize();
aInterface = new Array();
nPassTime = 0;
Symbol 409 MovieClip Frame 2
_global.C.map.AnalyseRows(this);
Symbol 409 MovieClip Frame 3
_global.C.map.EndRow(this);
Symbol 409 MovieClip Frame 10
stop();
_global.C.initDone();
Symbol 413 MovieClip [CS_corde0] Frame 1
#initclip 18
Object.registerClass("CS_corde0", Rope);
#endinitclip
stop();
Symbol 421 MovieClip Frame 1
this._visible = false;
Symbol 433 MovieClip Frame 2
_global.Sounds.PlayASound("Craque");
Symbol 433 MovieClip Frame 21
stop();
Symbol 437 MovieClip Frame 17
_parent.Destroy();
stop();
Symbol 438 MovieClip Frame 17
_parent.Destroy();
stop();
Symbol 439 MovieClip Frame 17
_parent.Destroy();
stop();
Symbol 440 MovieClip Frame 17
_parent.Destroy();
stop();
Symbol 441 MovieClip Frame 17
_parent.Destroy();
stop();
Symbol 442 MovieClip Frame 17
_parent.Destroy();
stop();
Symbol 443 MovieClip Frame 17
_parent.Destroy();
stop();
Symbol 444 MovieClip Frame 17
_parent.Destroy();
stop();
Symbol 445 MovieClip [shelterConstruc] Frame 1
#initclip 8
Object.registerClass("shelterConstruc", Shelter);
#endinitclip
Symbol 445 MovieClip [shelterConstruc] Frame 6
_global.Sounds.PlayASound("colonePlace");
Symbol 463 MovieClip Frame 50
stop();
Instance of Symbol 463 MovieClip "DamageShown" in Symbol 466 MovieClip Frame 4
onClipEvent (load) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 466 MovieClip Frame 27
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 6
_global.Sounds.PlayASound("Objet");
stop();
Symbol 477 MovieClip Frame 50
stop();
Instance of Symbol 477 MovieClip "DamageShown" in Symbol 478 MovieClip Frame 5
onClipEvent (load) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 478 MovieClip Frame 27
stop();
Symbol 479 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 6
_global.Sounds.PlayASound("Objet");
stop();
Symbol 489 MovieClip Frame 50
stop();
Instance of Symbol 489 MovieClip "DamageShown" in Symbol 490 MovieClip Frame 5
onClipEvent (load) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 490 MovieClip Frame 27
stop();
Symbol 491 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 6
_global.Sounds.PlayASound("Objet");
stop();
Symbol 514 MovieClip Frame 22
_global.Sounds.PlayASound("Jump");
Symbol 514 MovieClip Frame 31
_parent._parent.etat = "Flying";
_parent._parent.BallYSpeed = 0;
_parent._parent.BallXSpeed = 0;
_parent.gotoAndStop("Fly");
stop();
Symbol 516 MovieClip Frame 1
this._visible = false;
Symbol 518 MovieClip Frame 1
_parent._parent.etat = "idle";
_global.Sounds.PlayASound("ballon");
Symbol 518 MovieClip Frame 4
_parent._parent.etat = "Falling";
_parent.gotoAndStop("Fall");
stop();
Symbol 527 MovieClip Frame 1
_parent._visible = false;
Symbol 556 MovieClip Frame 1
gotoAndStop(_global.TheAttak);
Symbol 557 MovieClip Frame 38
stop();
Symbol 563 MovieClip Frame 38
stop();
Symbol 564 MovieClip Frame 1
stop();
Instance of Symbol 557 MovieClip in Symbol 564 MovieClip Frame 2
onClipEvent (load) {
if (_parent._parent._parent._parent._xscale == -100) {
this._xscale = -200;
}
}
Instance of Symbol 563 MovieClip in Symbol 564 MovieClip Frame 3
onClipEvent (enterFrame) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -200;
} else if (_parent._parent._parent._xscale == 100) {
this._xscale = 200;
}
}
Symbol 566 MovieClip Frame 8
stop();
Symbol 566 MovieClip Frame 9
_global.Sounds.PlayASound("Fall");
Symbol 566 MovieClip Frame 22
_parent.gotoAndStop("Idle");
stop();
Symbol 567 MovieClip Frame 21
stop();
Symbol 578 MovieClip Frame 1
stop();
Symbol 580 MovieClip Frame 1
stop();
this._visible = false;
Symbol 594 MovieClip Frame 4
stop();
Instance of Symbol 580 MovieClip "Arrow" in Symbol 594 MovieClip Frame 4
onClipEvent (load) {
this.gotoAndStop(45);
}
Symbol 594 MovieClip Frame 5
play();
_global.Sounds.PlayASound("Throw");
Symbol 594 MovieClip Frame 24
_global.Micelanious.LaunchAttack();
Symbol 594 MovieClip Frame 60
_parent.gotoAndStop("Idle");
Symbol 607 MovieClip Frame 50
stop();
Symbol 608 MovieClip Frame 1
_global.Sounds.PlayASound("Smack");
Instance of Symbol 564 MovieClip in Symbol 608 MovieClip Frame 1
onClipEvent (load) {
if (_global.Muted) {
this.gotoAndStop("Damage");
}
}
Instance of Symbol 607 MovieClip "DamageShown" in Symbol 608 MovieClip Frame 15
onClipEvent (enterFrame) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 608 MovieClip Frame 20
_parent._parent.LifeBar.CalculateDamage();
Symbol 608 MovieClip Frame 70
_parent._parent.etat = "Hurted";
Symbol 624 MovieClip Frame 1
_global.Sounds.PlayASound("Smack");
Instance of Symbol 564 MovieClip in Symbol 624 MovieClip Frame 1
onClipEvent (load) {
if (_global.Muted) {
this.gotoAndStop("Damage");
}
}
Instance of Symbol 607 MovieClip "DamageShown" in Symbol 624 MovieClip Frame 15
onClipEvent (enterFrame) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 624 MovieClip Frame 20
_parent._parent.LifeBar.CalculateDamage();
Symbol 624 MovieClip Frame 70
stop();
Symbol 651 MovieClip Frame 11
_global.Micelanious.Replace();
stop();
Symbol 652 MovieClip Frame 1
this._visible = false;
stop();
Symbol 652 MovieClip Frame 2
_global.Sounds.PlayASound("Splash");
Symbol 652 MovieClip Frame 11
_global.Micelanious.stopWater();
Symbol 658 MovieClip [cs_Gor_Giun01] Frame 1
#initclip 9
Object.registerClass("cs_Gor_Giun01", WeaponShot);
#endinitclip
stop();
Symbol 658 MovieClip [cs_Gor_Giun01] Frame 2
play();
Symbol 658 MovieClip [cs_Gor_Giun01] Frame 15
Symbol 658 MovieClip [cs_Gor_Giun01] Frame 16
Symbol 658 MovieClip [cs_Gor_Giun01] Frame 75
_global.Micelanious.ittedWater();
splash._visible = false;
Symbol 659 MovieClip Frame 1
stop();
Symbol 660 MovieClip Frame 1
stop();
Instance of Symbol 516 MovieClip "HitTop" in Symbol 660 MovieClip Frame 20
onClipEvent (load) {
modification = "x";
nNumber = 10;
}
Instance of Symbol 516 MovieClip "HitBottom" in Symbol 660 MovieClip Frame 20
onClipEvent (load) {
modification = "x";
nNumber = 0;
}
Instance of Symbol 516 MovieClip "HitLeft" in Symbol 660 MovieClip Frame 20
onClipEvent (load) {
modification = "y";
nNumber = 10;
}
Instance of Symbol 516 MovieClip "HitRight" in Symbol 660 MovieClip Frame 20
onClipEvent (load) {
modification = "y";
nNumber = 10;
}
Instance of Symbol 564 MovieClip in Symbol 660 MovieClip Frame 25
onClipEvent (load) {
if (_global.Muted && (_parent._currentframe == 25)) {
this.gotoAndStop("PoP");
}
}
Instance of Symbol 659 MovieClip "anim" in Symbol 660 MovieClip Frame 80
onClipEvent (load) {
this.gotoAndStop(45);
}
Symbol 663 MovieClip [Life] Frame 1
#initclip 10
Object.registerClass("Life", LifeBar);
#endinitclip
Symbol 687 MovieClip Frame 14
_global.Sounds.PlayASound("Jump");
Symbol 687 MovieClip Frame 23
_parent._parent.etat = "Flying";
_parent._parent.BallYSpeed = 0;
_parent._parent.BallXSpeed = 0;
_parent.gotoAndStop("Fly");
stop();
Symbol 691 MovieClip Frame 1
_parent._parent.etat = "idle";
_global.Sounds.PlayASound("ballon");
Symbol 691 MovieClip Frame 4
_parent._parent.etat = "Falling";
_parent.gotoAndStop("Fall");
stop();
Symbol 692 MovieClip Frame 8
stop();
Symbol 692 MovieClip Frame 9
_global.Sounds.PlayASound("Fall");
Symbol 692 MovieClip Frame 22
_parent.gotoAndStop("Idle");
stop();
Symbol 693 MovieClip Frame 30
stop();
Symbol 698 MovieClip Frame 4
stop();
Instance of Symbol 580 MovieClip "Arrow" in Symbol 698 MovieClip Frame 4
onClipEvent (load) {
this.gotoAndStop(45);
}
Symbol 698 MovieClip Frame 5
play();
_global.Sounds.PlayASound("Throw");
Symbol 698 MovieClip Frame 18
_global.Micelanious.LaunchAttack();
Instance of Symbol 564 MovieClip in Symbol 698 MovieClip Frame 20
onClipEvent (load) {
if (_global.Muted) {
this.gotoAndStop("Throw");
}
}
Symbol 698 MovieClip Frame 60
_parent.gotoAndStop("Idle");
Symbol 704 MovieClip Frame 1
_global.Sounds.PlayASound("Smack");
Instance of Symbol 564 MovieClip in Symbol 704 MovieClip Frame 1
onClipEvent (load) {
if (_global.Muted) {
this.gotoAndStop("Damage");
}
}
Instance of Symbol 607 MovieClip "DamageShown" in Symbol 704 MovieClip Frame 15
onClipEvent (enterFrame) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 704 MovieClip Frame 20
_parent._parent.LifeBar.CalculateDamage();
Symbol 704 MovieClip Frame 70
_parent._parent.etat = "Hurted";
Symbol 709 MovieClip Frame 1
_global.Sounds.PlayASound("Smack");
Instance of Symbol 564 MovieClip in Symbol 709 MovieClip Frame 1
onClipEvent (load) {
if (_global.Muted) {
this.gotoAndStop("Damage");
}
}
Instance of Symbol 607 MovieClip "DamageShown" in Symbol 709 MovieClip Frame 15
onClipEvent (enterFrame) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 709 MovieClip Frame 20
_parent._parent.LifeBar.CalculateDamage();
Symbol 709 MovieClip Frame 70
stop();
Symbol 712 MovieClip [cs_Blik_Gun01] Frame 1
#initclip 11
Object.registerClass("cs_Blik_Gun01", WeaponShot);
#endinitclip
stop();
Symbol 712 MovieClip [cs_Blik_Gun01] Frame 2
play();
Symbol 712 MovieClip [cs_Blik_Gun01] Frame 15
_global.Sounds.PlayASound("Pistolet");
Symbol 712 MovieClip [cs_Blik_Gun01] Frame 75
_global.Micelanious.ittedWater();
splash._visible = false;
Symbol 714 MovieClip Frame 1
stop();
Instance of Symbol 516 MovieClip "HitTop" in Symbol 714 MovieClip Frame 20
onClipEvent (load) {
modification = "x";
nNumber = 5;
}
Instance of Symbol 516 MovieClip "HitBottom" in Symbol 714 MovieClip Frame 20
onClipEvent (load) {
modification = "x";
nNumber = 0;
}
Instance of Symbol 516 MovieClip "HitLeft" in Symbol 714 MovieClip Frame 20
onClipEvent (load) {
modification = "y";
nNumber = 5;
}
Instance of Symbol 516 MovieClip "HitRight" in Symbol 714 MovieClip Frame 20
onClipEvent (load) {
modification = "y";
nNumber = 5;
}
Instance of Symbol 564 MovieClip in Symbol 714 MovieClip Frame 25
onClipEvent (load) {
if (_global.Muted && (_parent._currentframe == 25)) {
this.gotoAndStop("PoP");
}
}
Instance of Symbol 713 MovieClip "anim" in Symbol 714 MovieClip Frame 80
onClipEvent (load) {
this.gotoAndStop(45);
}
Symbol 730 MovieClip Frame 10
stop();
Symbol 733 MovieClip Frame 17
_global.Sounds.PlayASound("Jump");
Symbol 733 MovieClip Frame 35
_parent._parent.etat = "Flying";
_parent._parent.BallYSpeed = 0;
_parent._parent.BallXSpeed = 0;
_parent.gotoAndStop("Fly");
stop();
Symbol 736 MovieClip Frame 1
_parent._parent.etat = "idle";
_global.Sounds.PlayASound("ballon");
Symbol 736 MovieClip Frame 4
_parent._parent.etat = "Falling";
_parent.gotoAndStop("Fall");
stop();
Symbol 738 MovieClip Frame 8
stop();
Symbol 738 MovieClip Frame 9
_global.Sounds.PlayASound("Fall");
Symbol 738 MovieClip Frame 22
_parent.gotoAndStop("Idle");
stop();
Symbol 743 MovieClip Frame 4
stop();
Instance of Symbol 580 MovieClip "Arrow" in Symbol 743 MovieClip Frame 4
onClipEvent (load) {
this.gotoAndStop(45);
}
Symbol 743 MovieClip Frame 5
play();
_global.Sounds.PlayASound("Throw");
Instance of Symbol 564 MovieClip in Symbol 743 MovieClip Frame 20
onClipEvent (load) {
if (_global.Muted) {
this.gotoAndStop("Throw");
}
}
Symbol 743 MovieClip Frame 21
_global.Micelanious.LaunchAttack();
Symbol 743 MovieClip Frame 60
_parent.gotoAndStop("Idle");
Symbol 744 MovieClip Frame 26
stop();
Symbol 753 MovieClip Frame 1
_global.Sounds.PlayASound("Smack");
Instance of Symbol 564 MovieClip in Symbol 753 MovieClip Frame 1
onClipEvent (load) {
if (_global.Muted) {
this.gotoAndStop("Damage");
}
}
Instance of Symbol 607 MovieClip "DamageShown" in Symbol 753 MovieClip Frame 15
onClipEvent (enterFrame) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 753 MovieClip Frame 20
_parent._parent.LifeBar.CalculateDamage();
Symbol 753 MovieClip Frame 70
stop();
Symbol 754 MovieClip [cs_Waf_AttGun_Gun01] Frame 1
#initclip 12
Object.registerClass("cs_Waf_AttGun_Gun01", WeaponShot);
#endinitclip
stop();
Symbol 754 MovieClip [cs_Waf_AttGun_Gun01] Frame 2
play();
Symbol 754 MovieClip [cs_Waf_AttGun_Gun01] Frame 15
_global.Sounds.PlayASound("Pistolet");
Symbol 754 MovieClip [cs_Waf_AttGun_Gun01] Frame 75
_global.Micelanious.ittedWater();
splash._visible = false;
Symbol 756 MovieClip Frame 1
_global.Sounds.PlayASound("Smack");
Instance of Symbol 564 MovieClip in Symbol 756 MovieClip Frame 1
onClipEvent (load) {
if (_global.Muted) {
this.gotoAndStop("Damage");
}
}
Instance of Symbol 607 MovieClip "DamageShown" in Symbol 756 MovieClip Frame 15
onClipEvent (enterFrame) {
if (_parent._parent._parent._xscale == -100) {
this._xscale = -100;
}
}
Symbol 756 MovieClip Frame 20
_parent._parent.LifeBar.CalculateDamage();
Symbol 756 MovieClip Frame 70
_parent._parent.etat = "Hurted";
Symbol 757 MovieClip Frame 1
stop();
Instance of Symbol 516 MovieClip "HitTop" in Symbol 757 MovieClip Frame 20
onClipEvent (load) {
modification = "x";
nNumber = 0;
}
Instance of Symbol 516 MovieClip "HitBottom" in Symbol 757 MovieClip Frame 20
onClipEvent (load) {
modification = "x";
nNumber = 0;
}
Instance of Symbol 516 MovieClip "HitLeft" in Symbol 757 MovieClip Frame 20
onClipEvent (load) {
modification = "y";
nNumber = 5;
}
Instance of Symbol 516 MovieClip "HitRight" in Symbol 757 MovieClip Frame 20
onClipEvent (load) {
modification = "y";
nNumber = 5;
}
Instance of Symbol 564 MovieClip in Symbol 757 MovieClip Frame 25
onClipEvent (load) {
if (_global.Muted && (_parent._currentframe == 25)) {
this.gotoAndStop("PoP");
}
}
Instance of Symbol 755 MovieClip "anim" in Symbol 757 MovieClip Frame 80
onClipEvent (load) {
this.gotoAndStop(45);
}
Symbol 758 MovieClip [Player] Frame 1
#initclip 13
Object.registerClass("Player", Cats);
#endinitclip
stop();
Instance of Symbol 667 MovieClip "Waiting" in Symbol 758 MovieClip [Player] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 765 MovieClip [cross] Frame 1
#initclip 14
Object.registerClass("cross", AimTarget);
#endinitclip
stop();
Instance of Symbol 764 MovieClip "btn_mire" in Symbol 765 MovieClip [cross] Frame 1
on (release) {
if (_global["HumanPlayer" + _global.C.G_turn] == true) {
_global.Micelanious.shootPaper();
}
}
Symbol 770 MovieClip Frame 1
_global.Sounds.PlayASound("BoutonPress");
Symbol 770 MovieClip Frame 18
_global.Micelanious.Replace();
Symbol 772 MovieClip [PaperThrow] Frame 1
#initclip 15
Object.registerClass("PaperThrow", WeaponShot);
#endinitclip
stop();
Instance of Symbol 777 MovieClip in Symbol 778 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
_parent._parent.donutExplode(this);
}
Symbol 779 MovieClip [DonutThrow] Frame 1
#initclip 16
Object.registerClass("DonutThrow", WeaponShot);
#endinitclip
stop();
Symbol 779 MovieClip [DonutThrow] Frame 6
_global.Sounds.PlayASound("Beigne");
Symbol 779 MovieClip [DonutThrow] Frame 25
_global.Micelanious.Replace();
Symbol 782 MovieClip Frame 1
stop();
Symbol 783 MovieClip Frame 1
stop();
Symbol 784 MovieClip Frame 1
stop();
Symbol 785 MovieClip Frame 1
stop();
Symbol 820 MovieClip Frame 14
_global.Sounds.PlayASound("SwingL");
Symbol 820 MovieClip Frame 31
_global.Sounds.PlayASound("SwingL");
Symbol 820 MovieClip Frame 50
_global.Sounds.PlayASound("SwingL");
Symbol 820 MovieClip Frame 64
_global.Sounds.PlayASound("SwingL");
Symbol 820 MovieClip Frame 88
_global.Sounds.PlayASound("Swing");
Symbol 820 MovieClip Frame 100
_parent.HurtTime();
Symbol 820 MovieClip Frame 131
_parent.EndAction();
Symbol 821 MovieClip [Krake] Frame 1
#initclip 17
Object.registerClass("Krake", Kraken);
#endinitclip
stop();
Symbol 821 MovieClip [Krake] Frame 31
KyckPlayer();
stop();
Instance of Symbol 467 MovieClip "statue1" in Symbol 825 MovieClip [__BattleZone] Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Instance of Symbol 479 MovieClip "statue2" in Symbol 825 MovieClip [__BattleZone] Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Instance of Symbol 491 MovieClip "statue3" in Symbol 825 MovieClip [__BattleZone] Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Symbol 836 Button
on (keyPress "<Left>") {
return(undefined);
}
on (keyPress "<Right>") {
return(undefined);
}
on (keyPress "<Up>") {
return(undefined);
}
on (keyPress "<Down>") {
return(undefined);
}
Symbol 846 MovieClip Frame 1
stop();
Symbol 846 MovieClip Frame 12
stop();
Symbol 852 MovieClip Frame 1
stop();
Symbol 852 MovieClip Frame 12
stop();
Symbol 857 MovieClip Frame 1
stop();
Symbol 857 MovieClip Frame 12
stop();
Symbol 863 MovieClip Frame 1
stop();
Symbol 863 MovieClip Frame 12
stop();
Symbol 868 MovieClip Frame 1
stop();
Symbol 868 MovieClip Frame 12
stop();
Symbol 874 MovieClip Frame 1
stop();
Symbol 874 MovieClip Frame 12
stop();
Symbol 882 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_global.Paused == true) {
_global.AlreadyPaused = true;
} else {
_global.AlreadyPaused = false;
_global.C.fPause();
}
nextFrame();
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 886 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_global.C.fPause();
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 893 MovieClip Frame 1
stop();
Symbol 900 MovieClip Frame 50
_parent.gotoAndStop(1);
Symbol 904 MovieClip Frame 50
_parent.gotoAndStop(1);
Symbol 909 MovieClip Frame 50
_parent.gotoAndStop(1);
Symbol 910 MovieClip Frame 1
stop();
Symbol 918 MovieClip Frame 50
_parent.gotoAndStop(1);
Symbol 922 MovieClip Frame 46
_parent.gotoAndStop(1);
Symbol 926 MovieClip Frame 46
_parent.gotoAndStop(1);
Symbol 927 MovieClip Frame 1
stop();
Symbol 935 MovieClip Frame 46
_parent.gotoAndStop(1);
Symbol 939 MovieClip Frame 50
_parent.gotoAndStop(1);
Symbol 940 MovieClip Frame 1
stop();
Symbol 960 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_global.Sounds.ToMute();
gotoAndStop (2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 964 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_global.Sounds.UnMute();
gotoAndStop (1);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 969 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_global.C["player" + _global.C.G_turn].nbreKraken > 0) {
_parent.Krakenn();
}
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
_parent.KrakenDmg.gotoAndPlay("Monte");
}
on (rollOut) {
if (_parent.KrakenDmg._currentframe > 3) {
_parent.KrakenDmg.gotoAndPlay("Baisse");
} else {
_parent.KrakenDmg.gotoAndStop(1);
}
}
Symbol 970 MovieClip Frame 1
stop();
Symbol 971 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_global.C["player" + _global.C.G_turn].nbreDonut > 0) {
_parent.donut();
}
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
_parent.donutDmg.gotoAndPlay("Monte");
}
on (rollOut) {
if (_parent.donutDmg._currentframe > 3) {
_parent.donutDmg.gotoAndPlay("Baisse");
} else {
_parent.donutDmg.gotoAndStop(1);
}
}
Symbol 972 MovieClip Frame 1
stop();
Symbol 973 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_global.C["player" + _global.C.G_turn].nbreShelter > 0) {
_parent.Shelters();
}
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
_parent.SheltersDmg.gotoAndPlay("Monte");
}
on (rollOut) {
if (_parent.SheltersDmg._currentframe > 3) {
_parent.SheltersDmg.gotoAndPlay("Baisse");
} else {
_parent.SheltersDmg.gotoAndStop(1);
}
}
Symbol 974 MovieClip Frame 1
stop();
Symbol 975 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_global.C["player" + _global.C.G_turn].nbreBallon > 0) {
_parent.deplace();
}
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
_parent.deplaceDmg.gotoAndPlay("Monte");
}
on (rollOut) {
if (_parent.deplaceDmg._currentframe > 3) {
_parent.deplaceDmg.gotoAndPlay("Baisse");
} else {
_parent.deplaceDmg.gotoAndStop(1);
}
}
Symbol 976 MovieClip Frame 1
stop();
Symbol 977 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_global.C["player" + _global.C.G_turn].nbrePaper > 0) {
_parent.paper();
}
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
_parent.paperDmg.gotoAndPlay("Monte");
}
on (rollOut) {
if (_parent.paperDmg._currentframe > 3) {
_parent.paperDmg.gotoAndPlay("Baisse");
} else {
_parent.paperDmg.gotoAndStop(1);
}
}
Symbol 978 MovieClip Frame 1
stop();
Symbol 979 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
if (_global.C["player" + _global.C.G_turn].nbreSoaker > 0) {
_parent.soaker();
}
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
_parent.soakerDmg.gotoAndPlay("Monte");
}
on (rollOut) {
if (_parent.soakerDmg._currentframe > 3) {
_parent.soakerDmg.gotoAndPlay("Baisse");
} else {
_parent.soakerDmg.gotoAndStop(1);
}
}
Symbol 980 MovieClip Frame 1
stop();
Symbol 984 MovieClip Frame 2
if (_global.Muted) {
iDoMute = false;
} else {
iDoMute = true;
_global.Sounds.ToMute();
}
Symbol 984 MovieClip Frame 29
stop();
Symbol 984 MovieClip Frame 31
if (iDoMute) {
_global.Sounds.UnMute();
}
Symbol 984 MovieClip Frame 46
_parent.gotoAndStop(1);
Symbol 985 MovieClip Frame 1
stop();
Symbol 986 MovieClip Frame 1
noBt.useHandCursor = false;
noBtsmall.useHandCursor = false;
stop();
Instance of Symbol 947 MovieClip "ScoreSection" in Symbol 986 MovieClip Frame 1
onClipEvent (load) {
pass = 0;
if (_global.HumanPlayer1) {
pass++;
}
if (_global.HumanPlayer2) {
pass++;
}
if (_global.HumanPlayer3) {
pass++;
}
if (pass >= 2) {
this._visible = false;
}
}
Instance of Symbol 965 MovieClip "MuteSymbol" in Symbol 986 MovieClip Frame 1
onClipEvent (load) {
if (_global.Muted) {
gotoAndStop (2);
} else {
stop();
}
}
Symbol 986 MovieClip Frame 2
noHand.useHandCursor = false;
Symbol 989 MovieClip Frame 1
_global.C.map.Initialize();
aInterface = new Array();
nPassTime = 0;
Symbol 989 MovieClip Frame 2
_global.C.map.AnalyseRows(this);
Symbol 989 MovieClip Frame 3
_global.C.map.EndRow(this);
Symbol 989 MovieClip Frame 10
stop();
_global.C.initDone();
Instance of Symbol 467 MovieClip "statue1" in Symbol 992 MovieClip Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Instance of Symbol 479 MovieClip "statue2" in Symbol 992 MovieClip Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Instance of Symbol 491 MovieClip "statue3" in Symbol 992 MovieClip Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Symbol 996 MovieClip Frame 1
_global.C.map.Initialize();
aInterface = new Array();
nPassTime = 0;
Symbol 996 MovieClip Frame 2
_global.C.map.AnalyseRows(this);
Symbol 996 MovieClip Frame 3
_global.C.map.EndRow(this);
Symbol 996 MovieClip Frame 10
stop();
_global.C.initDone();
Instance of Symbol 467 MovieClip "statue1" in Symbol 999 MovieClip Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Instance of Symbol 479 MovieClip "statue2" in Symbol 999 MovieClip Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Instance of Symbol 491 MovieClip "statue3" in Symbol 999 MovieClip Frame 1
onClipEvent (load) {
if (_global.HumanPlayer2 == true) {
this._visible = false;
this.gotoAndStop(13);
}
}
Symbol 1011 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("Title");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1014 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_global.Submited = true;
gotoAndStop ("ScoreSubmit");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1036 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("ScoreSubmit");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1037 Button
on (release) {
_global.NextStep = String("level" + nLevel);
Transition.gotoAndPlay(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1040 Button
on (release) {
if (nLevel == 1) {
if (random(100) < 50) {
nLevel = 2;
} else {
nLevel = 3;
}
} else if (nLevel == 2) {
if (random(100) < 50) {
nLevel = 1;
} else {
nLevel = 3;
}
} else if (random(100) < 50) {
nLevel = 1;
} else {
nLevel = 2;
}
_global.NextStep = String("level" + nLevel);
Transition.gotoAndPlay(2);
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1043 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("Title");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1051 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("Title");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1091 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
_global.HS.submitScore(_global.G_score);
btn_submit_score._visible = false;
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1094 Button
on (press) {
_global.Sounds.PlayASound("BoutonPress");
ControlScroll.scrollUp = true;
}
on (release, releaseOutside) {
ControlScroll.scrollUp = false;
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1095 Button
on (press) {
_global.Sounds.PlayASound("BoutonPress");
ControlScroll.scrollDown = true;
}
on (release, releaseOutside) {
ControlScroll.scrollDown = false;
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}
Symbol 1106 Button
on (release) {
_global.Sounds.PlayASound("BoutonPress");
gotoAndStop ("Title");
}
on (rollOver) {
_global.Sounds.PlayASound("BoutonOver");
}