Frame 1
function mailTo(obj, item) {
getURL ("mailto:portuswebs@gmail.com", _blank);
}
stop();
var my_cm = new ContextMenu();
my_cm.builtInItems.save = false;
my_cm.builtInItems.zoom = false;
my_cm.builtInItems.play = false;
my_cm.builtInItems.loop = false;
my_cm.builtInItems.rewind = false;
my_cm.builtInItems.forward_back = false;
my_cm.builtInItems.print = false;
my_cm.builtInItems.quality = false;
my_cm.customItems.push(new ContextMenuItem("\u00A9 Daniel Zubiria", mailTo));
this.menu = my_cm;
_root.onEnterFrame = function () {
varCargado = getBytesLoaded();
varTotal = getBytesTotal();
varPorcentaje = Math.floor((varCargado / varTotal) * 100);
if (varCargado == varTotal) {
delete this.onEnterFrame;
_root.gotoAndStop("Cargado");
} else {
PreloadDecenas.gotoAndStop("_" + Math.floor(varPorcentaje / 10));
PreloadUnidades.gotoAndStop("_" + (varPorcentaje - (Math.floor(varPorcentaje / 10) * 10)));
}
};
Frame 2
var varMusic = true;
var varSounds = true;
var varQuality = true;
var var2Jugadores = false;
var varJugador1 = true;
Frame 3
play();
if (varSounds) {
var sndTit = new Sound();
sndTit.attachSound("sndTitulo");
sndTit.start();
}
Frame 85
stop();
retraso = 0;
Enter.onRelease = function () {
_root.gotoAndStop("MenuPrincipal");
};
_CLICK_ANYWHERE_TO_ENTER.onEnterFrame = function () {
switch (retraso++) {
case 30 :
this._visible = false;
break;
case 45 :
this._visible = true;
retraso = 0;
}
};
Frame 86
_1_PLAYER.onRelease = function () {
_root.gotoAndStop("EleccionJugador");
};
_2_PLAYERS.onRelease = function () {
var2Jugadores = true;
_root.gotoAndStop("EleccionJugador");
};
_OPTIONS.onRelease = function () {
_root.gotoAndStop("Opciones");
};
_HOW_TO_PLAY.onRelease = function () {
_root.gotoAndStop("HowToPlay");
};
Frame 87
if (varMusic) {
Musica.gotoAndStop("ON");
} else {
Musica.gotoAndStop("OFF");
}
if (varSounds) {
Sonidos.gotoAndStop("ON");
} else {
Sonidos.gotoAndStop("OFF");
}
if (varQuality) {
Calidad.gotoAndStop("HIGH");
_root._quality = "HIGH";
} else {
Calidad.gotoAndStop("LOW");
_root._quality = "LOW";
}
_BACK.onRelease = function () {
_root.gotoAndStop("MenuPrincipal");
};
Musica.onRelease = function () {
varMusic = !varMusic;
if (varMusic) {
this.gotoAndStop("ON");
} else {
this.gotoAndStop("OFF");
}
};
Sonidos.onRelease = function () {
varSounds = !varSounds;
if (varSounds) {
this.gotoAndStop("ON");
} else {
this.gotoAndStop("OFF");
}
};
Calidad.onRelease = function () {
varQuality = !varQuality;
if (varQuality) {
this.gotoAndStop("HIGH");
_root._quality = "HIGH";
} else {
this.gotoAndStop("LOW");
_root._quality = "LOW";
}
};
Frame 88
function Cambio1() {
varJugador1 = true;
Player1.onEnterFrame = function () {
if (this._x > 180) {
this._x = this._x - Math.ceil((this._x - 180) / 3);
}
};
Player2.onEnterFrame = function () {
if (this._x < 460) {
this._x = this._x + Math.ceil((460 - this._x) / 3);
}
};
}
function Cambio2() {
varJugador1 = false;
Player2.onEnterFrame = function () {
if (this._x > 180) {
this._x = this._x - Math.ceil((this._x - 180) / 3);
}
};
Player1.onEnterFrame = function () {
if (this._x < 460) {
this._x = this._x + Math.ceil((460 - this._x) / 3);
}
};
}
function Seleccionado() {
AnimSeleccion.play();
delete Tak.onRelease;
delete Mit.onRelease;
delete _root.onMouseMove;
}
if (var2Jugadores) {
Player2.gotoAndStop("Player2");
} else {
Player2.gotoAndStop("CPU");
}
this.onMouseMove = function () {
if ((_xmouse <= 320) && (varJugador1 == false)) {
Cambio1();
}
if ((_xmouse > 320) && (varJugador1 == true)) {
Cambio2();
}
};
Tak.onRelease = Seleccionado;
Mit.onRelease = Seleccionado;
Frame 89
function ComenzarCombate() {
function addMove(Tipo, Altura) {
if (ActiveMove < 4) {
if (ActivePlayer) {
_TAKI$S_TURN._visible = false;
} else {
_MITSURUGI$S_TURN._visible = false;
}
_GO\u00F1._visible = false;
var _local2 = 0;
switch (Tipo) {
case 1 :
_local2 = (Altura * 3) - 2;
_root["_MOVE_" + ActiveMove].gotoAndStop("Defensa");
break;
case 2 :
_local2 = (Altura * 3) - 1;
_root["_MOVE_" + ActiveMove].gotoAndStop("Contra");
break;
case 3 :
_local2 = Altura * 3;
_root["_MOVE_" + ActiveMove].gotoAndStop("Ataque");
break;
case 4 :
_local2 = 10;
_root["_MOVE_" + ActiveMove].gotoAndStop("Izquierda");
break;
case 5 :
_local2 = 11;
_root["_MOVE_" + ActiveMove].gotoAndStop("Derecha");
}
AsignarMovimiento(_local2);
_root[("Turno" + ActiveMove) + "Desactivado"]._visible = false;
_root["_MOVE_" + ActiveMove].onRelease = function () {
if (ActiveMove > 1) {
ActiveMove--;
AsignarMovimiento(0);
delete _root["_MOVE_" + ActiveMove].onRelease;
_root[("Turno" + ActiveMove) + "Desactivado"]._visible = true;
_root["_MOVE_" + ActiveMove].gotoAndStop("Nada");
MostrarOK();
}
};
ActiveMove++;
MostrarOK();
}
}
function AsignarMovimiento(M) {
if (ActivePlayer) {
ArrayTaki[ActiveMove] = M;
} else {
ArrayMitsurugi[ActiveMove] = M;
}
}
function MostrarOK() {
if (ActiveMove == 4) {
OKDesactivado._visible = false;
OK.onRelease = TerminarJugada;
} else {
OKDesactivado._visible = true;
delete OK.onRelease;
}
}
_HIGH_ATTACK.onRelease = function () {
addMove(3, 1);
};
_MEDIUM_ATTACK.onRelease = function () {
addMove(3, 2);
};
_LOW_ATTACK.onRelease = function () {
addMove(3, 3);
};
_HIGH_COUNTER_ATTACK.onRelease = function () {
addMove(2, 1);
};
_MEDIUM_COUNTER_ATTACK.onRelease = function () {
addMove(2, 2);
};
_LOW_COUNTER_ATTACK.onRelease = function () {
addMove(2, 3);
};
_HIGH_DEFENSE.onRelease = function () {
addMove(1, 1);
};
_MEDIUM_DEFENSE.onRelease = function () {
addMove(1, 2);
};
_LOW_DEFENSE.onRelease = function () {
addMove(1, 3);
};
_MOVE_LEFT.onRelease = function () {
addMove(4, 0);
};
_MOVE_RIGHT.onRelease = function () {
addMove(5, 0);
};
_TAKI_WINS._visible = false;
_MITSURUGI_WINS._visible = false;
_SHOW_TURN._visible = false;
_TIME_UP._visible = false;
_KO._visible = false;
_DRAW._visible = false;
Salir._visible = false;
_SHOW_TURN.onRelease = function () {
this._visible = false;
MostrarCombate();
};
Salir.onRelease = function () {
Salir.gotoAndPlay("2Titulo");
delete Salir.onRelease;
};
ComenzarTurno();
}
function ComenzarTurno() {
ContMove = 1;
_TAKI$S_TURN._visible = false;
_MITSURUGI$S_TURN._visible = false;
_GO\u00F1._visible = false;
TurnsLeft--;
ActualizarContador();
if (TurnsLeft > 0) {
ArrayTaki = [ArrayTaki[0], 0, 0, 0];
ArrayMitsurugi = [ArrayMitsurugi[0], 0, 0, 0];
AnimTaki = [ArrayTaki[0], 0, 0, 0];
AnimMitsurugi = [ArrayMitsurugi[0], 0, 0, 0];
ActivePlayer = true;
ComenzarJugada();
} else {
TerminarPelea();
}
}
function ActualizarContador() {
Decenas.gotoAndStop("_" + Math.floor(TurnsLeft / 10));
Unidades.gotoAndStop("_" + (TurnsLeft - (Math.floor(TurnsLeft / 10) * 10)));
}
function ComenzarJugada() {
Turno1Desactivado._visible = true;
Turno2Desactivado._visible = true;
Turno3Desactivado._visible = true;
OKDesactivado._visible = true;
TodosBotonesDesactivados._visible = false;
ActiveMove = 1;
ContMove = 1;
if (var2Jugadores) {
if (ActivePlayer) {
_TAKI$S_TURN._visible = true;
} else {
_MITSURUGI$S_TURN._visible = true;
}
_GO\u00F1._visible = true;
} else if (ActivePlayer) {
if (varJugador1) {
_TAKI$S_TURN._visible = true;
_GO\u00F1._visible = true;
} else {
CrearJugadaCPU();
TerminarJugada();
}
} else if (varJugador1) {
CrearJugadaCPU();
TerminarJugada();
} else {
_MITSURUGI$S_TURN._visible = true;
_GO\u00F1._visible = true;
}
}
function TerminarJugada() {
if (ActivePlayer) {
ActivePlayer = !ActivePlayer;
ComenzarJugada();
} else {
Turno1Desactivado._visible = true;
Turno2Desactivado._visible = true;
Turno3Desactivado._visible = true;
OKDesactivado._visible = true;
_SHOW_TURN._visible = true;
}
}
function CrearJugadaCPU(T, A) {
var _local1 = 0;
if (varJugador1) {
T = false;
if (VidaMitsurugi > VidaTaki) {
A = false;
} else {
A = true;
}
} else {
T = true;
if (VidaTaki > VidaMitsurugi) {
A = false;
} else {
A = true;
}
}
if (T) {
if (A) {
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 != 11) {
if ((ArrayMitsurugi[0] - ArrayTaki[0]) > 1) {
if ((Math.random() > 0.6) && (ArrayTaki[0] < 8)) {
_local1 = 11;
}
}
}
} while ((((_local1 == 4) || (_local1 == 7)) || (_local1 == 2)) || (_local1 == 10));
ArrayTaki[1] = _local1;
do {
_local1 = Math.floor(Math.random() * 11) + 1;
} while (((((_local1 == 5) || (_local1 == 8)) || (_local1 == 1)) || (_local1 == 10)) || (_local1 == 11));
ArrayTaki[2] = _local1;
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 != 11) {
if ((ArrayMitsurugi[0] - ArrayTaki[0]) > 1) {
if ((Math.random() > 0.8) && (ArrayTaki[0] != 8)) {
_local1 = 11;
}
}
}
} while ((((_local1 == 1) || (_local1 == 4)) || (_local1 == 7)) || (_local1 == 10));
ArrayTaki[3] = _local1;
} else {
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 == 10) {
if (ArrayTaki[0] < 2) {
_local1 = 11;
}
}
} while (((_local1 == 5) || (_local1 == 8)) || (_local1 == 11));
ArrayTaki[1] = _local1;
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 != 10) {
if ((Math.random() > 0.75) && (ArrayTaki[0] > 1)) {
_local1 = 10;
}
}
} while ((((_local1 == 2) || (_local1 == 5)) || (_local1 == 8)) || (_local1 == 11));
ArrayTaki[2] = _local1;
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 != 10) {
if ((Math.random() > 0.8) && (ArrayTaki[0] > 1)) {
_local1 = 10;
}
}
} while (((((_local1 == 1) || (_local1 == 2)) || (_local1 == 4)) || (_local1 == 7)) || (_local1 == 11));
ArrayTaki[3] = _local1;
}
} else if (A) {
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 != 10) {
if ((ArrayMitsurugi[0] - ArrayTaki[0]) > 1) {
if ((Math.random() > 0.55) && (ArrayMitsurugi[0] > 2)) {
_local1 = 10;
}
}
}
} while ((((_local1 == 1) || (_local1 == 4)) || (_local1 == 7)) || (_local1 == 11));
ArrayMitsurugi[1] = _local1;
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 == 10) {
if ((ArrayMitsurugi[0] - ArrayTaki[0]) < 2) {
_local1 = 11;
}
}
} while ((((_local1 == 2) || (_local1 == 5)) || (_local1 == 8)) || (_local1 == 11));
ArrayMitsurugi[2] = _local1;
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 != 10) {
if ((ArrayMitsurugi[0] - ArrayTaki[0]) > 1) {
if ((Math.random() > 0.85) && (ArrayMitsurugi[0] > 2)) {
_local1 = 10;
}
}
}
} while ((((_local1 == 1) || (_local1 == 4)) || (_local1 == 7)) || (_local1 == 11));
ArrayMitsurugi[3] = _local1;
} else {
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 != 11) {
if (ArrayMitsurugi[0] < 9) {
if ((Math.random() > 0.9) && (ArrayMitsurugi[0] < 9)) {
_local1 = 11;
}
}
}
} while ((((_local1 == 2) || (_local1 == 5)) || (_local1 == 8)) || (_local1 == 10));
ArrayMitsurugi[1] = _local1;
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 == 11) {
if (ArrayMitsurugi[0] > 8) {
_local1 = 10;
}
}
} while ((((_local1 == 1) || (_local1 == 4)) || (_local1 == 7)) || (_local1 == 10));
ArrayMitsurugi[2] = _local1;
do {
_local1 = Math.floor(Math.random() * 11) + 1;
if (_local1 != 11) {
if (ArrayMitsurugi[0] < 9) {
if ((Math.random() > 0.85) && (ArrayMitsurugi[0] < 9)) {
_local1 = 11;
}
}
}
} while ((((_local1 == 2) || (_local1 == 5)) || (_local1 == 8)) || (_local1 == 10));
ArrayMitsurugi[3] = _local1;
}
}
function MostrarCombate() {
TodosBotonesDesactivados._visible = true;
ContMove = 1;
if (EvaluarCombo()) {
AnimarMovimiento();
} else {
EvaluarMovimiento();
}
}
function EvaluarCombo() {
var _local1 = false;
if ((ArrayMitsurugi[0] - ArrayTaki[0]) == 1) {
if (((ArrayTaki[1] == 3) && (ArrayTaki[2] == 9)) && (ArrayTaki[3] == 6)) {
switch (ArrayMitsurugi[1]) {
case 9 :
case 5 :
case 8 :
case 7 :
case 10 :
case 11 :
_local1 = true;
ContMove = 3;
AnimTaki[ContMove] = 9;
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 30, 20);
}
}
if (((ArrayMitsurugi[1] == 6) && (ArrayMitsurugi[2] == 6)) && (ArrayMitsurugi[3] == 6)) {
switch (ArrayTaki[1]) {
case 3 :
case 2 :
case 8 :
case 1 :
case 10 :
case 11 :
_local1 = true;
ContMove = 3;
AnimMitsurugi[ContMove] = 9;
AnimTaki[ContMove] = 5;
ActualizarVida(true, 30, 20);
}
}
}
return(_local1);
}
function EvaluarMovimiento() {
switch (ArrayTaki[ContMove]) {
case 3 :
case 6 :
case 9 :
if (((ArrayMitsurugi[ContMove] == 3) || (ArrayMitsurugi[ContMove] == 6)) || (ArrayMitsurugi[ContMove] == 9)) {
AtaqueAtaque();
} else if (((ArrayMitsurugi[ContMove] == 2) || (ArrayMitsurugi[ContMove] == 5)) || (ArrayMitsurugi[ContMove] == 8)) {
AtaqueContra(true);
} else if (((ArrayMitsurugi[ContMove] == 1) || (ArrayMitsurugi[ContMove] == 4)) || (ArrayMitsurugi[ContMove] == 7)) {
AtaqueDefensa(true);
} else if ((ArrayMitsurugi[ContMove] == 10) || (ArrayMitsurugi[ContMove] == 11)) {
AtaqueMovimiento(true);
}
break;
case 2 :
case 5 :
case 8 :
if (((ArrayMitsurugi[ContMove] == 3) || (ArrayMitsurugi[ContMove] == 6)) || (ArrayMitsurugi[ContMove] == 9)) {
AtaqueContra(false);
} else if (((ArrayMitsurugi[ContMove] == 2) || (ArrayMitsurugi[ContMove] == 5)) || (ArrayMitsurugi[ContMove] == 8)) {
DefensaDefensa();
} else if (((ArrayMitsurugi[ContMove] == 1) || (ArrayMitsurugi[ContMove] == 4)) || (ArrayMitsurugi[ContMove] == 7)) {
DefensaDefensa();
} else if ((ArrayMitsurugi[ContMove] == 10) || (ArrayMitsurugi[ContMove] == 11)) {
DefensaMovimiento(true);
}
break;
case 1 :
case 4 :
case 7 :
if (((ArrayMitsurugi[ContMove] == 3) || (ArrayMitsurugi[ContMove] == 6)) || (ArrayMitsurugi[ContMove] == 9)) {
AtaqueDefensa(false);
} else if (((ArrayMitsurugi[ContMove] == 2) || (ArrayMitsurugi[ContMove] == 5)) || (ArrayMitsurugi[ContMove] == 8)) {
DefensaDefensa();
} else if (((ArrayMitsurugi[ContMove] == 1) || (ArrayMitsurugi[ContMove] == 4)) || (ArrayMitsurugi[ContMove] == 7)) {
DefensaDefensa();
} else if ((ArrayMitsurugi[ContMove] == 10) || (ArrayMitsurugi[ContMove] == 11)) {
DefensaMovimiento(true);
}
break;
case 10 :
case 11 :
if (((ArrayMitsurugi[ContMove] == 3) || (ArrayMitsurugi[ContMove] == 6)) || (ArrayMitsurugi[ContMove] == 9)) {
AtaqueMovimiento(false);
} else if (((ArrayMitsurugi[ContMove] == 2) || (ArrayMitsurugi[ContMove] == 5)) || (ArrayMitsurugi[ContMove] == 8)) {
DefensaMovimiento(false);
} else if (((ArrayMitsurugi[ContMove] == 1) || (ArrayMitsurugi[ContMove] == 4)) || (ArrayMitsurugi[ContMove] == 7)) {
DefensaMovimiento(false);
} else {
if (!((ArrayMitsurugi[ContMove] == 10) || (ArrayMitsurugi[ContMove] == 11))) {
break;
}
MovimientoMovimiento();
}
}
AnimarMovimiento();
}
function AtaqueAtaque() {
if ((ArrayMitsurugi[0] - ArrayTaki[0]) == 1) {
switch (ArrayTaki[ContMove]) {
case 3 :
if (ArrayMitsurugi[ContMove] == 9) {
AnimTaki[ContMove] = 2;
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 10, 5);
} else if (ArrayMitsurugi[ContMove] == 6) {
AnimTaki[ContMove] = 5;
ActualizarVida(true, 10, 5);
AnimMitsurugi[ContMove] = 3;
}
break;
case 6 :
if (ArrayMitsurugi[ContMove] == 3) {
AnimTaki[ContMove] = 3;
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 10, 5);
} else if (ArrayMitsurugi[ContMove] == 9) {
AnimTaki[ContMove] = 5;
ActualizarVida(true, 10, 5);
AnimMitsurugi[ContMove] = 4;
}
break;
case 9 :
if (ArrayMitsurugi[ContMove] == 6) {
AnimTaki[ContMove] = 4;
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 10, 5);
} else {
if (ArrayMitsurugi[ContMove] != 3) {
break;
}
AnimTaki[ContMove] = 5;
ActualizarVida(true, 10, 5);
AnimMitsurugi[ContMove] = 2;
}
}
if (DefensaTaki && (ArrayTaki[ContMove] == ArrayMitsurugi[ContMove])) {
switch (ArrayTaki[ContMove]) {
case 3 :
AnimTaki[ContMove] = 2;
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 10, 8);
break;
case 6 :
AnimTaki[ContMove] = 3;
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 10, 8);
break;
case 9 :
AnimTaki[ContMove] = 4;
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 10, 8);
}
} else if (DefensaMitsurugi && (ArrayTaki[ContMove] == ArrayMitsurugi[ContMove])) {
switch (ArrayMitsurugi[ContMove]) {
case 3 :
AnimMitsurugi[ContMove] = 2;
AnimTaki[ContMove] = 5;
ActualizarVida(true, 10, 8);
break;
case 6 :
AnimMitsurugi[ContMove] = 3;
AnimTaki[ContMove] = 5;
ActualizarVida(true, 10, 8);
break;
case 9 :
AnimMitsurugi[ContMove] = 4;
AnimTaki[ContMove] = 5;
ActualizarVida(true, 10, 8);
}
} else if (ArrayTaki[ContMove] == ArrayMitsurugi[ContMove]) {
switch (ArrayMitsurugi[ContMove]) {
case 3 :
AnimMitsurugi[ContMove] = 2;
AnimTaki[ContMove] = 2;
break;
case 6 :
AnimMitsurugi[ContMove] = 3;
AnimTaki[ContMove] = 3;
break;
case 9 :
AnimMitsurugi[ContMove] = 4;
AnimTaki[ContMove] = 4;
}
}
} else {
switch (ArrayTaki[ContMove]) {
case 3 :
AnimTaki[ContMove] = 2;
break;
case 6 :
AnimTaki[ContMove] = 3;
break;
case 9 :
AnimTaki[ContMove] = 4;
}
switch (ArrayMitsurugi[ContMove]) {
case 3 :
AnimMitsurugi[ContMove] = 2;
return;
case 6 :
AnimMitsurugi[ContMove] = 3;
return;
case 9 :
AnimMitsurugi[ContMove] = 4;
}
}
}
function AtaqueContra(B) {
if ((ArrayMitsurugi[0] - ArrayTaki[0]) == 1) {
if (B) {
if (ArrayTaki[ContMove] == (ArrayMitsurugi[ContMove] + 1)) {
AnimTaki[ContMove] = 5;
ActualizarVida(true, 15, (RojoTaki - VidaTaki) + 15);
switch (ArrayMitsurugi[ContMove]) {
case 2 :
AnimMitsurugi[ContMove] = 2;
break;
case 5 :
AnimMitsurugi[ContMove] = 3;
break;
case 8 :
AnimMitsurugi[ContMove] = 4;
}
} else {
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 10, 5);
switch (ArrayTaki[ContMove]) {
case 3 :
AnimTaki[ContMove] = 2;
break;
case 6 :
AnimTaki[ContMove] = 3;
break;
case 9 :
AnimTaki[ContMove] = 4;
}
}
} else if ((ArrayTaki[ContMove] + 1) != ArrayMitsurugi[ContMove]) {
AnimTaki[ContMove] = 5;
ActualizarVida(true, 10, 5);
switch (ArrayMitsurugi[ContMove]) {
case 3 :
AnimMitsurugi[ContMove] = 2;
break;
case 6 :
AnimMitsurugi[ContMove] = 3;
break;
case 9 :
AnimMitsurugi[ContMove] = 4;
}
} else {
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 15, (RojoMitsurugi - VidaMitsurugi) + 15);
switch (ArrayTaki[ContMove]) {
case 2 :
AnimTaki[ContMove] = 2;
break;
case 5 :
AnimTaki[ContMove] = 3;
break;
case 8 :
AnimTaki[ContMove] = 4;
}
}
} else {
switch (ArrayTaki[ContMove]) {
case 3 :
AnimTaki[ContMove] = 2;
break;
case 6 :
AnimTaki[ContMove] = 3;
break;
case 9 :
AnimTaki[ContMove] = 4;
break;
case 2 :
case 5 :
case 8 :
AnimTaki[ContMove] = 1;
}
switch (ArrayMitsurugi[ContMove]) {
case 3 :
AnimMitsurugi[ContMove] = 2;
break;
case 6 :
AnimMitsurugi[ContMove] = 3;
break;
case 9 :
AnimMitsurugi[ContMove] = 4;
break;
case 2 :
case 5 :
case 8 :
AnimMitsurugi[ContMove] = 1;
}
}
}
function AtaqueDefensa(B) {
if ((ArrayMitsurugi[0] - ArrayTaki[0]) == 1) {
if (B) {
switch (ArrayTaki[ContMove]) {
case 3 :
AnimTaki[ContMove] = 2;
if (ArrayMitsurugi[ContMove] == 7) {
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 8, 4);
} else {
AnimMitsurugi[ContMove] = 1;
ActualizarVida(false, 1, 0);
}
break;
case 6 :
AnimTaki[ContMove] = 3;
if (ArrayMitsurugi[ContMove] == 1) {
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 8, 4);
} else {
AnimMitsurugi[ContMove] = 1;
ActualizarVida(false, 1, 0);
}
break;
case 9 :
AnimTaki[ContMove] = 4;
if (ArrayMitsurugi[ContMove] == 4) {
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 8, 4);
} else {
AnimMitsurugi[ContMove] = 1;
ActualizarVida(false, 1, 0);
}
}
} else {
switch (ArrayMitsurugi[ContMove]) {
case 3 :
AnimMitsurugi[ContMove] = 2;
if (ArrayTaki[ContMove] == 7) {
AnimTaki[ContMove] = 5;
ActualizarVida(true, 8, 4);
} else {
AnimTaki[ContMove] = 1;
ActualizarVida(true, 1, 0);
}
break;
case 6 :
AnimMitsurugi[ContMove] = 3;
if (ArrayTaki[ContMove] == 1) {
AnimTaki[ContMove] = 5;
ActualizarVida(true, 8, 4);
} else {
AnimTaki[ContMove] = 1;
ActualizarVida(true, 1, 0);
}
break;
case 9 :
AnimMitsurugi[ContMove] = 4;
if (ArrayTaki[ContMove] == 4) {
AnimTaki[ContMove] = 5;
ActualizarVida(true, 8, 4);
} else {
AnimTaki[ContMove] = 1;
ActualizarVida(true, 1, 0);
}
}
}
} else {
switch (ArrayTaki[ContMove]) {
case 3 :
AnimTaki[ContMove] = 2;
break;
case 6 :
AnimTaki[ContMove] = 3;
break;
case 9 :
AnimTaki[ContMove] = 4;
break;
case 1 :
case 4 :
case 7 :
AnimTaki[ContMove] = 1;
}
switch (ArrayMitsurugi[ContMove]) {
case 3 :
AnimMitsurugi[ContMove] = 2;
break;
case 6 :
AnimMitsurugi[ContMove] = 3;
break;
case 9 :
AnimMitsurugi[ContMove] = 4;
break;
case 1 :
case 4 :
case 7 :
AnimMitsurugi[ContMove] = 1;
}
}
}
function DefensaDefensa() {
AnimTaki[ContMove] = 1;
AnimMitsurugi[ContMove] = 1;
}
function DefensaMovimiento(B) {
if (B) {
AnimTaki[ContMove] = 1;
switch (ArrayMitsurugi[ContMove]) {
case 10 :
if ((ArrayMitsurugi[0] > 2) && ((ArrayMitsurugi[0] - ArrayTaki[0]) > 1)) {
AnimMitsurugi[ContMove] = 7;
} else {
AnimMitsurugi[ContMove] = 0;
}
break;
case 11 :
if (ArrayMitsurugi[0] < 9) {
AnimMitsurugi[ContMove] = 8;
} else {
AnimMitsurugi[ContMove] = 0;
}
}
} else {
AnimMitsurugi[ContMove] = 1;
switch (ArrayTaki[ContMove]) {
case 10 :
if (ArrayTaki[0] > 1) {
AnimTaki[ContMove] = 7;
} else {
AnimTaki[ContMove] = 0;
}
break;
case 11 :
if ((ArrayTaki[0] < 8) && ((ArrayMitsurugi[0] - ArrayTaki[0]) > 1)) {
AnimTaki[ContMove] = 8;
} else {
AnimTaki[ContMove] = 0;
}
}
}
}
function AtaqueMovimiento(B) {
if (B) {
switch (ArrayTaki[ContMove]) {
case 3 :
AnimTaki[ContMove] = 2;
break;
case 6 :
AnimTaki[ContMove] = 3;
break;
case 9 :
AnimTaki[ContMove] = 4;
}
if ((ArrayMitsurugi[0] - ArrayTaki[0]) == 1) {
AnimMitsurugi[ContMove] = 5;
ActualizarVida(false, 10, 5);
} else {
switch (ArrayMitsurugi[ContMove]) {
case 10 :
if (ArrayMitsurugi[0] > 2) {
AnimMitsurugi[ContMove] = 7;
} else {
ArrayMitsurugi[ContMove] = 0;
}
break;
case 11 :
if (ArrayMitsurugi[0] < 9) {
AnimMitsurugi[ContMove] = 8;
} else {
ArrayMitsurugi[ContMove] = 0;
}
}
}
} else {
switch (ArrayMitsurugi[ContMove]) {
case 3 :
AnimMitsurugi[ContMove] = 2;
break;
case 6 :
AnimMitsurugi[ContMove] = 3;
break;
case 9 :
AnimMitsurugi[ContMove] = 4;
}
if ((ArrayMitsurugi[0] - ArrayTaki[0]) == 1) {
AnimTaki[ContMove] = 5;
ActualizarVida(true, 10, 5);
} else {
switch (ArrayTaki[ContMove]) {
case 10 :
if (ArrayTaki[0] > 1) {
AnimTaki[ContMove] = 7;
} else {
AnimTaki[ContMove] = 0;
}
break;
case 11 :
if (ArrayTaki[0] < 8) {
AnimTaki[ContMove] = 8;
} else {
AnimTaki[ContMove] = 0;
}
}
}
}
}
function MovimientoMovimiento() {
if (((ArrayTaki[ContMove] == ArrayMitsurugi[ContMove]) || ((ArrayMitsurugi[0] - ArrayTaki[0]) > 2)) || ((ArrayTaki[ContMove] == 10) && (ArrayMitsurugi[ContMove] == 11))) {
switch (ArrayTaki[ContMove]) {
case 10 :
if (ArrayTaki[0] > 1) {
AnimTaki[ContMove] = 7;
} else {
AnimTaki[ContMove] = 0;
}
break;
case 11 :
if (ArrayTaki[0] < 8) {
AnimTaki[ContMove] = 8;
} else {
AnimTaki[ContMove] = 0;
}
}
switch (ArrayMitsurugi[ContMove]) {
case 10 :
if (ArrayMitsurugi[0] > 2) {
AnimMitsurugi[ContMove] = 7;
} else {
AnimMitsurugi[ContMove] = 0;
}
break;
case 11 :
if (ArrayMitsurugi[0] < 9) {
AnimMitsurugi[ContMove] = 8;
} else {
AnimMitsurugi[ContMove] = 0;
}
}
} else if ((ArrayMitsurugi[0] - ArrayTaki[0]) > 1) {
if (VidaTaki > VidaMitsurugi) {
switch (ArrayTaki[ContMove]) {
case 10 :
AnimTaki[ContMove] = 7;
AnimMitsurugi[ContMove] = 0;
break;
case 11 :
AnimTaki[ContMove] = 8;
AnimMitsurugi[ContMove] = 0;
}
} else if (VidaTaki < VidaMitsurugi) {
switch (ArrayMitsurugi[ContMove]) {
case 10 :
AnimMitsurugi[ContMove] = 7;
AnimTaki[ContMove] = 0;
break;
case 11 :
AnimMitsurugi[ContMove] = 8;
AnimTaki[ContMove] = 0;
}
} else if (Math.random() > 0.5) {
switch (ArrayTaki[ContMove]) {
case 10 :
AnimTaki[ContMove] = 7;
AnimMitsurugi[ContMove] = 0;
break;
case 11 :
AnimTaki[ContMove] = 8;
AnimMitsurugi[ContMove] = 0;
}
} else {
switch (ArrayMitsurugi[ContMove]) {
case 10 :
AnimMitsurugi[ContMove] = 7;
AnimTaki[ContMove] = 0;
break;
case 11 :
AnimMitsurugi[ContMove] = 8;
AnimTaki[ContMove] = 0;
}
}
} else {
AnimMitsurugi[ContMove] = 0;
AnimTaki[ContMove] = 0;
}
}
function ActualizarVida(B, V, R) {
if (B) {
VidaTaki = VidaTaki - V;
RojoTaki = RojoTaki - R;
if (VidaTaki < 1) {
VidaTaki = 0;
RojoTaki = 0;
ArrayTaki[ContMove] = 6;
AnimTaki[ContMove] = 6;
}
} else {
VidaMitsurugi = VidaMitsurugi - V;
RojoMitsurugi = RojoMitsurugi - R;
if (VidaMitsurugi < 1) {
VidaMitsurugi = 0;
RojoMitsurugi = 0;
ArrayMitsurugi[ContMove] = 6;
AnimMitsurugi[ContMove] = 6;
}
}
}
function Aumentar1PuntoVida(B) {
if (B) {
if (RojoTaki > VidaTaki) {
VidaTaki++;
}
} else if (RojoMitsurugi > VidaMitsurugi) {
VidaMitsurugi++;
}
}
function AnimarMovimiento() {
switch (AnimTaki[ContMove]) {
case 0 :
Aumentar1PuntoVida(true);
Taki.gotoAndPlay("NoMove");
break;
case 1 :
Aumentar1PuntoVida(true);
Taki.gotoAndPlay("Guard");
CaraTaki.gotoAndStop("Defensa");
break;
case 2 :
Aumentar1PuntoVida(true);
Taki.gotoAndPlay("HighAttack");
CaraTaki.gotoAndStop("Ataque");
break;
case 3 :
Aumentar1PuntoVida(true);
Taki.gotoAndPlay("MediumAttack");
CaraTaki.gotoAndStop("Ataque");
break;
case 4 :
Aumentar1PuntoVida(true);
Taki.gotoAndPlay("LowAttack");
CaraTaki.gotoAndStop("Ataque");
break;
case 5 :
Taki.gotoAndPlay("Hit");
CaraTaki.gotoAndStop("Golpe");
break;
case 6 :
Taki.gotoAndPlay("Dead");
TerminarPelea();
break;
case 7 :
Aumentar1PuntoVida(true);
ArrayTaki[0] = ArrayTaki[0] - 1;
AnimTaki[0] = AnimTaki[0] - 1;
Taki.gotoAndPlay("Left");
break;
case 8 :
Aumentar1PuntoVida(true);
ArrayTaki[0] = ArrayTaki[0] + 1;
AnimTaki[0] = AnimTaki[0] + 1;
Taki.gotoAndPlay("Right");
break;
case 9 :
Aumentar1PuntoVida(true);
Aumentar1PuntoVida(true);
Aumentar1PuntoVida(true);
Taki.gotoAndPlay("Combo1");
}
switch (AnimMitsurugi[ContMove]) {
case 0 :
Aumentar1PuntoVida(false);
Mitsurugi.gotoAndPlay("NoMove");
break;
case 1 :
Aumentar1PuntoVida(false);
Mitsurugi.gotoAndPlay("Guard");
CaraMitsurugi.gotoAndStop("Defensa");
break;
case 2 :
Aumentar1PuntoVida(false);
Mitsurugi.gotoAndPlay("HighAttack");
CaraMitsurugi.gotoAndStop("Ataque");
break;
case 3 :
Aumentar1PuntoVida(false);
Mitsurugi.gotoAndPlay("MediumAttack");
CaraMitsurugi.gotoAndStop("Ataque");
break;
case 4 :
Aumentar1PuntoVida(false);
Mitsurugi.gotoAndPlay("LowAttack");
CaraMitsurugi.gotoAndStop("Ataque");
break;
case 5 :
Mitsurugi.gotoAndPlay("Hit");
CaraMitsurugi.gotoAndStop("Golpe");
break;
case 6 :
Mitsurugi.gotoAndPlay("Dead");
TerminarPelea();
break;
case 7 :
Aumentar1PuntoVida(false);
ArrayMitsurugi[0] = ArrayMitsurugi[0] - 1;
AnimMitsurugi[0] = AnimMitsurugi[0] - 1;
Mitsurugi.gotoAndPlay("Left");
break;
case 8 :
Aumentar1PuntoVida(false);
ArrayMitsurugi[0] = ArrayMitsurugi[0] + 1;
AnimMitsurugi[0] = AnimMitsurugi[0] + 1;
Mitsurugi.gotoAndPlay("Right");
break;
case 9 :
Aumentar1PuntoVida(false);
Aumentar1PuntoVida(false);
Aumentar1PuntoVida(false);
Mitsurugi.gotoAndPlay("Combo1");
}
MostrarVida();
}
function MostrarVida() {
if (VidaTaki < 100) {
TakiLifebar.Green._visible = false;
} else {
TakiLifebar.Green._visible = true;
}
TakiLifebar.Yellow._xscale = VidaTaki;
TakiLifebar.Red._xscale = RojoTaki;
if (VidaMitsurugi < 100) {
MitsurugiLifebar.Green._visible = false;
} else {
MitsurugiLifebar.Green._visible = true;
}
MitsurugiLifebar.Yellow._xscale = VidaMitsurugi;
MitsurugiLifebar.Red._xscale = RojoMitsurugi;
if (VidaTaki == 100) {
if (VidaMitsurugi == 100) {
CaraTaki.gotoAndStop("AmbosPerfect");
CaraMitsurugi.gotoAndStop("AmbosPerfect");
} else {
CaraTaki.gotoAndStop("Perfect");
if (VidaMitsurugi > 20) {
CaraMitsurugi.gotoAndStop("Normal");
} else {
CaraMitsurugi.gotoAndStop("Muerte");
}
}
} else if (VidaMitsurugi == 100) {
CaraMitsurugi.gotoAndStop("Perfect");
if (VidaTaki > 20) {
CaraTaki.gotoAndStop("Normal");
} else if (VidaTaki == 0) {
CaraTaki.gotoAndStop("KO");
} else {
CaraTaki.gotoAndStop("Muerte");
}
} else {
if (VidaTaki > 20) {
CaraTaki.gotoAndStop("Normal");
} else {
CaraTaki.gotoAndStop("Muerte");
}
if (VidaMitsurugi > 20) {
CaraMitsurugi.gotoAndStop("Normal");
} else if (VidaMitsurugi == 0) {
CaraMitsurugi.gotoAndStop("KO");
} else {
CaraMitsurugi.gotoAndStop("Muerte");
}
}
}
function ComprobarSiguienteMovimiento() {
if (SiguienteMovimiento) {
ContMove++;
if (ContMove > 3) {
ComenzarTurno();
} else {
EvaluarMovimiento();
}
}
SiguienteMovimiento = !SiguienteMovimiento;
}
function TerminarPelea() {
if (TurnsLeft < 1) {
_TIME_UP._visible = true;
} else {
_KO._visible = true;
}
if (VidaTaki > VidaMitsurugi) {
_TAKI_WINS._visible = true;
} else if (VidaMitsurugi > VidaTaki) {
_MITSURUGI_WINS._visible = true;
} else {
_DRAW._visible = true;
}
Salir._visible = true;
sndFightSong.stop();
}
if (varMusic) {
var sndFightSong = new Sound();
sndFightSong.attachSound("FightSong");
sndFightSong.start();
}
var ArrayTaki = new Array(3, 0, 0, 0);
var ArrayMitsurugi = new Array(7, 0, 0, 0);
var AnimTaki = new Array(3, 0, 0, 0);
var AnimMitsurugi = new Array(7, 0, 0, 0);
var DefensaTaki = false;
var DefensaMitsurugi = false;
var VidaTaki = 100;
var RojoTaki = 100;
var VidaMitsurugi = 100;
var RojoMitsurugi = 100;
var FinPelea = false;
var TurnsLeft = 31;
var ActivePlayer = true;
var ActiveMove = 1;
var ContMove = 1;
var SiguienteMovimiento = false;
ComenzarCombate();
Frame 90
Siguiente.onRelease = function () {
_root.nextFrame();
};
Frame 96
_root.gotoAndPlay("Titulo");
Frame 97
stop();
Start.onRelease = function () {
_root.gotoAndPlay("Intro");
};
Frame 98
Saltar.onRelease = function () {
_root.gotoAndPlay("FinIntro");
sndInt.stop();
};
var sndInt = new Sound();
sndInt.attachSound("sndIntro");
sndInt.start();
Frame 554
_root.gotoAndPlay("PrimeraVez");
Symbol 23 MovieClip Frame 1
max = length(this._name) + 1;
aux = 0;
while (aux < max) {
str = substring(this._name, aux, 1);
if (str != "_") {
this.attachMovie("Letra", "L" + aux, this.getNextHighestDepth(), {_x:(((-(max + 2)) / 2) * 8) + (aux * 8), _y:-4});
this["L" + aux].gotoAndStop("_" + str);
}
aux++;
}
Symbol 26 MovieClip Frame 1
stop();
Symbol 33 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 87
stop();
_root.gotoAndStop("Combate");
Symbol 118 MovieClip Frame 1
gotoAndPlay ("Stand");
Symbol 118 MovieClip Frame 37
_root.ComprobarSiguienteMovimiento();
Symbol 118 MovieClip Frame 50
gotoAndPlay ("Stand");
Symbol 118 MovieClip Frame 51
if (_root.varSounds) {
var THit = new Sound();
THit.attachSound("sndTHit" + (Math.floor(Math.random() * 2) + 1));
THit.start();
}
Symbol 118 MovieClip Frame 63
gotoAndPlay ("StandCode");
Symbol 118 MovieClip Frame 64
if (_root.varSounds) {
var TDie = new Sound();
TDie.attachSound("sndTDie");
TDie.start();
}
Symbol 118 MovieClip Frame 70
stop();
Symbol 118 MovieClip Frame 83
gotoAndPlay ("StandCode");
Symbol 118 MovieClip Frame 96
gotoAndPlay ("StandCode");
Symbol 118 MovieClip Frame 106
gotoAndPlay ("StandCode");
Symbol 118 MovieClip Frame 121
gotoAndPlay ("StandCode");
Symbol 118 MovieClip Frame 127
gotoAndPlay ("StandCode");
this._x = this._x - 60;
Symbol 118 MovieClip Frame 134
gotoAndPlay ("StandCode");
this._x = this._x + 60;
Symbol 118 MovieClip Frame 169
gotoAndPlay ("StandCode");
Symbol 194 MovieClip Frame 1
gotoAndPlay ("Stand");
Symbol 194 MovieClip Frame 37
_root.ComprobarSiguienteMovimiento();
Symbol 194 MovieClip Frame 50
gotoAndPlay ("Stand");
Symbol 194 MovieClip Frame 51
if (_root.varSounds) {
var MHit = new Sound();
MHit.attachSound("sndMHit" + (Math.floor(Math.random() * 3) + 1));
MHit.start();
}
Symbol 194 MovieClip Frame 63
gotoAndPlay ("StandCode");
Symbol 194 MovieClip Frame 64
if (_root.varSounds) {
var MDie = new Sound();
MDie.attachSound("sndMDie");
MDie.start();
}
Symbol 194 MovieClip Frame 70
stop();
Symbol 194 MovieClip Frame 83
gotoAndPlay ("StandCode");
Symbol 194 MovieClip Frame 102
gotoAndPlay ("StandCode");
Symbol 194 MovieClip Frame 117
gotoAndPlay ("StandCode");
Symbol 194 MovieClip Frame 135
gotoAndPlay ("StandCode");
Symbol 194 MovieClip Frame 142
gotoAndPlay ("StandCode");
this._x = this._x - 60;
Symbol 194 MovieClip Frame 149
gotoAndPlay ("StandCode");
this._x = this._x + 60;
Symbol 194 MovieClip Frame 180
gotoAndPlay ("StandCode");
Symbol 201 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 1
max = length(this._parent._name) + 1;
aux = 0;
while (aux < max) {
str = substring(this._parent._name, aux, 1);
if (str != "_") {
this.attachMovie("Letra", "L" + aux, this.getNextHighestDepth(), {_x:(((-(max + 2)) / 2) * 8) + (aux * 8), _y:-4});
this["L" + aux].gotoAndStop("_" + str);
}
aux++;
}
Symbol 215 MovieClip Frame 1
stop();
this.gotoAndStop(this._name);
Symbol 243 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 1
max = length(this._name) + 1;
aux = 0;
while (aux < max) {
str = substring(this._name, aux, 1);
if (str != "_") {
this.attachMovie("LetraGrande", "L" + aux, this.getNextHighestDepth(), {_x:(((-(max + 2)) / 2) * 15) + (aux * 15), _y:-7.5});
this["L" + aux].gotoAndStop("_" + str);
}
aux++;
}
Symbol 260 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 1
max = length(this._name) + 1;
aux = 0;
while (aux < max) {
str = substring(this._name, aux, 1);
if (str != "_") {
this.attachMovie("LetraGrande", "L" + aux, this.getNextHighestDepth(), {_x:(((-(max + 2)) / 2) * 15) + (aux * 15), _y:-7.5});
this["L" + aux].gotoAndStop("_" + str);
}
aux++;
}
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 97
_root.gotoAndPlay("PantallaTitulo");
Symbol 329 MovieClip Frame 104
stop();
Symbol 369 MovieClip Frame 133
stop();