STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228080
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5120

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/96368267?noj=FRM96368267-1DC" width="1" height="1"></div>

Bionic Otter Warrior Libuse.swf

This is the info page for
Flash #145657

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
frame 1 { function gotoDA() { getURL('http://drjavi.deviantart.com/', ''); } function gotoKong() { getURL('http://www.kongregate.com/accounts/DrJavi', ''); } this.loader.loadClip(); this.onEnterFrame = function () { this.loader.barraloader._xscale = 100 * this.getBytesLoaded() / this.getBytesTotal(); Basico.setText(this.loader.porcentaje, '' + Math.floor(this.loader.barraloader._xscale) + '%'); if (this.loader.barraloader._xscale >= 100) { this.gotoAndPlay('splash'); delete this.onEnterFrame; } }; var kongregate = _global.kongregate; kongregate.services.connect(); menu = new ContextMenu(); menu.hideBuiltInItems(); menu.customItems.push(new ContextMenuItem('DeviantArt', gotoDA)); menu.customItems.push(new ContextMenuItem('Kongregate', gotoKong)); _root.menu = menu; this.stop(); } movieClip 6 { } movieClip 8 { } movieClip 368 __Packages.Basico { #initclip if (!_global.Basico) { var v1 = function () {}; _global.Basico = v1; var v2 = v1.prototype; v1.inicio = function () { Basico.formato.bold = true; Basico.formato.font = '_typewriter'; }; v1.enum = function (cadena) { var v2 = cadena.split(','); var v1 = 0; while (v1 < v2.length) { eval('_global.' + v2[v1]) = v1; ++v1; } }; v1.setText = function (campo, texto) { campo.text = texto; campo.setTextFormat(Basico.formato); }; v1.cuadrado = function (a) { return a * a; }; v1.dentro = function (obj1, obj2, w, h) { return Math.abs(obj1._x - obj2._x) < w && Math.abs(obj1._y - obj2._y) < h; }; v1.mahalanobis = function (a, b) { return Math.max(Math.abs(a._x - b._x), Math.abs(a._y - b._y)); }; v1.euclidea = function (a, b) { return Math.sqrt(Basico.cuadrado(a._x - b._x) + Basico.cuadrado(a._y - b._y)); }; v1.randomF = function (min, max) { return min + Math.random() * (max - min); }; v1.randomI = function (min, max) { return min + Math.round(Math.random() * (max - min)); }; v1.randomB = function (prob) { return Math.random() < prob; }; v1.cos = function (x) { return Math.cos(x * Basico.ANG2RAD); }; v1.sen = function (x) { return Math.sin(x * Basico.ANG2RAD); }; v1.minmax = function (x, min, max) { return Math.min(max, Math.max(min, x)); }; v1.adapta360 = function (a, r) { return r - a > 180 ? a + 360 : (a - r > 180 ? a - 360 : a); }; v1.escala = function (obj, sc) { obj._xscale = sc; obj._yscale = sc; }; v1.posicion = function (obj, x, y) { obj._x = x; obj._y = y; }; v1.centrar = function (obj, cnt) { obj._x = cnt._x; obj._y = cnt._y; }; v1.extremo = function (obj, base, angulo, longitud) { obj._x = base._x + longitud * Math.cos(angulo); obj._y = base._y + longitud * Math.sin(angulo); }; v1.direccion = function (a, b) { return Math.atan2(a._y - b._y, a._x - b._x); }; v1.fuera = function (obj) { return obj._x - obj._width > Basico.WIDTH || obj._x + obj._width < 0 || obj._y - obj._height > Basico.HEIGHT || obj._y + obj._height < 0; }; v1.mouseListener = function (obj) { obj.onMouseDown = function () { Basico.mouse = true; }; obj.onMouseUp = function () { Basico.mouse = false; }; Mouse.addListener(obj); }; v1.formato = new TextFormat(); v1.HEIGHT = 500; v1.WIDTH = 700; v1.ANG2RAD = 0.0174532925199433; v1.RAD2ANG = 57.29577951308232; ASSetPropFlags(_global.Basico.prototype, null, 1); } #endinitclip } movieClip 369 __Packages.Replicante { #initclip if (!_global.Replicante) { var v1 = function (objeto, firerate) { this._base = objeto; this._parentname = (this._base._parent == _root) ? '' : this._base._parent._name + '.'; this._n = 0; this.objeto = new Array(); }; _global.Replicante = v1; var v2 = v1.prototype; v1.array = function () { var v3 = new Array(); var v2 = 0; while (v2 < arguments.length) { v3.push(new Replicante(arguments[v2])); ++v2; } return v3; }; v2.crear = function () { var i; var j; var k; i = arguments.shift(); var j = 0; while (j < i) { k = '_' + this._base._name + this._n++; duplicateMovieClip(this._base, k, this._base._parent.getNextHighestDepth()); this.objeto.push(eval(this._parentname + k)); this._base.inicio(this.objeto[this.objeto.length - 1], arguments); ++j; } }; v2.acciones = function () { var v2 = 0; while (v2 < this.objeto.length) { if (this.objeto[v2]._x == undefined || this.objeto[v2].accion()) { removeMovieClip(this.objeto[v2]); this.objeto.splice(v2--, 1); } ++v2; } }; v1.accionesArray = function (objetos) { var v1 = 0; while (v1 < objetos.length) { objetos[v1].acciones(); ++v1; } }; v2.impacto = function (obj) { var v2 = 0; while (v2 < this.objeto.length) { if (obj.inside(this.objeto[v2])) { obj.hit(this.objeto[v2]); this.objeto[v2].fin(); this.objeto.splice(v2--, 1); } ++v2; } }; v2.barrido = function (malos) { var v3; var v2; var v5 = this.objeto.length; v3 = 0; while (v3 < malos.length) { v2 = 0; while (v2 < malos[v3].objeto.length) { this.impacto(malos[v3].objeto[v2]); ++v2; } ++v3; } return v5 - this.objeto.length; }; v1.cercano = function (malos, obj, n) { var v2; var v1; var v7 = 0; var v6 = new Array(Replicante.total(malos)); v2 = 0; while (v2 < malos.length) { v1 = 0; while (v1 < malos[v2].objeto.length) { v6[v7++] = {'o': malos[v2].objeto[v1], 'd': Basico.euclidea(malos[v2].objeto[v1], obj)}; ++v1; } ++v2; } v6.sortOn('d', Array.NUMERIC); return v6.length > n ? v6.slice(0, n) : v6; }; v2.empBalas = function (obj, radio) { var v2 = 0; while (v2 < this.objeto.length) { if (Basico.euclidea(this.objeto[v2], obj) < radio) { this.objeto[v2].fin(); this.objeto.splice(v2--, 1); } ++v2; } }; v1.total = function (obj) { var v1; var v3 = 0; v1 = 0; while (v1 < obj.length) { v3 += obj[v1].objeto.length; ++v1; } return v3; }; v1.killAll = function (obj) { var v2; var v1; v2 = 0; while (v2 < obj.length) { v1 = 0; while (v1 < obj[v2].objeto.length) { removeMovieClip(obj[v2].objeto[v1]); ++v1; } obj[v2].objeto = new Array(); ++v2; } }; ASSetPropFlags(_global.Replicante.prototype, null, 1); } #endinitclip } movieClip 370 __Packages.Oleada { #initclip if (!_global.Oleada) { var v1 = function () { this.vector = new Array(); }; _global.Oleada = v1; var v2 = v1.prototype; v2.uno = function (tipo, x0, y0, dir) { this.vector.push({'t': tipo, 'd': dir, 'x': x0, 'y': y0}); }; v2.rectangulo = function (tipo, nx, ny, x0, y0, xf, yf, dir) { var v6; var v2; v6 = 0; while (v6 < nx) { v2 = 0; while (v2 < ny) { this.vector.push({'t': tipo, 'd': dir, 'x': nx > 1 ? x0 + (xf - x0) * v6 / (nx - 1) : x0, 'y': ny > 1 ? y0 + (yf - y0) * v2 / (ny - 1) : y0}); ++v2; } ++v6; } }; v2.triangulo = function (tipo, x0, y0, n, l, dir) { var v2; var v3; var v8; var v9; v8 = l / Math.max(1, n - 1); v9 = v8 * 0.866; v2 = 0; while (v2 < n) { v3 = 0; while (v3 <= v2) { this.vector.push({'t': tipo, 'd': dir, 'x': x0 + v2 * v9, 'y': y0 + v8 * (v3 - v2 / 2)}); ++v3; } ++v2; } }; v2.anillo = function (tipo, x0, y0, n, r, dir) { var v2; var v3 = 6.283185307179586 / n; v2 = 0; while (v2 < n) { this.vector.push({'t': tipo, 'd': dir, 'x': x0 + r * Math.sin(v2 * v3), 'y': y0 + r * Math.cos(v2 * v3)}); ++v2; } }; v2.nube = function (tipo, n, d, dir) { var v3 = 0; while (v3 < n) { this.vector.push({'t': tipo, 'd': dir, 'x': Math.random() * d, 'y': 250 + (Math.random() - 0.5) * d}); ++v3; } }; v2.circulo = function (a, b, x0, y0, n, r, dir) { var v2; var v3 = 6.283185307179586 / n; v2 = 0; while (v2 < n) { this.vector.push({'t': v2 % 2 ? b : a, 'd': dir, 'x': x0 + r * Math.sin(v2 * v3), 'y': y0 + r * Math.cos(v2 * v3)}); ++v2; } }; v2.enjambre = function (a, b, c, x0, y0, n, r, dir) { this.anillo(a, x0, y0, 2 * n, r, dir); this.anillo(b, x0, y0, n, r / 2, dir); this.vector.push({'t': c, 'd': dir, 'x': x0, 'y': y0}); }; v2.formacion = function (a, b, c, x0, y0, l, dir) { var v2; var v3; var v16; var v8; v8 = l * 0.866; v2 = 0; while (v2 < 4) { v3 = 0; while (v3 <= v2) { this.vector.push({'t': (v2 == 2 && v3 == 1) ? c : (v2 % 2 ? b : a), 'd': dir, 'x': x0 + v2 * v8, 'y': y0 + l * (v3 - v2 / 2)}); ++v3; } ++v2; } }; v2.cast = function (enemigos) { var v2 = 0; while (v2 < this.vector.length) { enemigos[this.vector[v2].t].crear(1, this.vector[v2].x, this.vector[v2].y, this.vector[v2].d); ++v2; } }; v1.oleadas = function (n) { var v2 = new Array(n); var v1 = 0; while (v1 < n) { v2[v1] = new Oleada(); ++v1; } return v2; }; v2.mensaje = function (who, what) { this.vector.push({'t': -1}, who, what); }; v2.esMensaje = function () { return this.vector[0].t < 0; }; ASSetPropFlags(_global.Oleada.prototype, null, 1); } #endinitclip } movieClip 371 __Packages.Contador { #initclip if (!_global.Contador) { var v1 = function (rate) { this.fijar(rate); }; _global.Contador = v1; var v2 = v1.prototype; v2.getRate = function () { return this.T; }; v2.fijar = function (rate) { this.t = 0; this.T = rate; }; v2.listo = function () { if (this.T < 0) { return false; } else { if (this.t >= this.T) { this.t = 0; return true; } else { ++this.t; return false; } } }; v2.setT = function (m) { this.t = m; }; v2.ahora = function () { this.t = this.T; }; ASSetPropFlags(_global.Contador.prototype, null, 1); } #endinitclip } frame 2 { _global.fichero = SharedObject.getLocal('libusedata'); _global._saveData = function () { function zs(i) { return 3 * (5 * _global.curr[i] + _global.curr[i + 1] + 1) + _global.curr[i + 2] + 1; } _global.fichero.data.level = (((zs(0) * 60 + zs(3)) * 60 + zs(6)) * 60 + zs(9)) * 8 + _global.maxlevel - 1; _global.fichero.data.money = _global.MONEY; _global.fichero.data.sonido = _global.vol_mus * 101 + _global.vol_son; _global.fichero.data.calidad = _global.calidad; _global.fichero.flush(); var v2 = 0; i = 0; while (i < 12) { v2 += _global.curr[i] + _global.curr[i + 1] + 1 + _global.curr[i + 2] + 1; i += 3; } _global.kongregate.stats.submit('level', _global.maxlevel - 1); _global.kongregate.stats.submit('money', _global.MONEY); _global.kongregate.stats.submit('upgrades', v2); }; _global._loadData = function () { function uz(i, n, c) { var v2 = Math.floor(c / n); _global.curr[i + 2] = v2 % 3 - 1; _global.curr[i + 1] = Math.floor(v2 / 3) % 5 - 1; if (i <= 0) { _global.curr[i] = Math.floor(v2 / 15) % 10; return v2; } _global.curr[i] = Math.floor(v2 / 15) % 4; return v2; } _global.MONEY = _global.fichero.data.money; _global.vol_son = _global.fichero.data.sonido % 101; _global.vol_mus = Math.floor(_global.fichero.data.sonido / 101); _global.calidad = _global.fichero.data.calidad; var v3 = _global.fichero.data.level; _global.maxlevel = v3 % 8 + 1; _global.curr = new Array(12); uz(0, 60, uz(3, 60, uz(6, 60, uz(9, 8, v3)))); }; _global._resetData = function () { _global.fichero.data.level = 0; _global.fichero.data.money = 0; _global.fichero.data.sonido = 5100; _global.fichero.data.calidad = 2; _global._loadData(); }; if (_global.fichero.data.level == null) { _global._resetData(); } else { _global._loadData(); } stop(); } movieClip 12 { frame 1 { stop(); } } movieClip 15 { frame 1 { function rotar(rot, fuerza) { _rotation = rot * fuerza + 45 * (1 - fuerza); } stop(); } } movieClip 17 { } movieClip 18 { frame 1 { function showHP(p) { verde._xscale = Math.max(0, 100 * p); } stop(); } } movieClip 20 { } movieClip 22 { frame 1 { function getFx() { return _x - Math.cos(Math.PI * _rotation / 180) * 20; } function getFy() { return _y - Math.sin(Math.PI * _rotation / 180) * 20; } function mover(posx, posy, fx, fy) { var v3 = posx - _x + fx; var v2 = posy - _y + fy; _rotation = _rotation * 0.5; var v4 = Math.min(Math.sqrt(v3 * v3 + v2 * v2), 20) / 20; var v1 = 180 * Math.atan2(v2, v3) / Math.PI; if (v1 - _rotation > 180) { v1 -= 360; } if (_rotation - v1 > 180) { v1 += 360; } _rotation = v1 * v4 + _rotation * (1 - v4) + (Math.random() - 0.5) * 4; _x = posx; _y = posy; } stop(); } } movieClip 24 { } movieClip 27 { frame 1 { function getFx(t) { return _x - Basico.cos(_rotation) * t; } function getFy(t) { return _y - Basico.sen(_rotation) * t; } function mover(posx, posy, fx, fy, a0) { var v3 = posx - _x + fx; var v2 = posy - _y + fy; _rotation = (_rotation + a0) * 0.5; var v4 = Math.min(Math.sqrt(v3 * v3 + v2 * v2), 10) / 50; var v1 = Math.atan2(v2, v3) * Basico.RAD2ANG; if (v1 - _rotation > 180) { v1 -= 360; } if (_rotation - v1 > 180) { v1 += 360; } _rotation = v1 * v4 + _rotation * (1 - v4); _x = posx; _y = posy; } stop(); } } movieClip 30 { frame 1 { function rotar(alfa, fuerza) { _rotation = _rotation / 2; var v1 = alfa + 45; if (v1 > 90) { v1 = 180 - v1; } else { if (v1 < -90) { v1 = -180 - v1; } } if (v1 - _rotation > 180) { v1 -= 360; } else { if (_rotation - v1 > 180) { v1 += 360; } } _rotation = v1 * fuerza + _rotation * (1 - fuerza); } stop(); } } movieClip 34 { frame 1 { stop(); } } movieClip 36 { frame 1 { stop(); } } movieClip 37 { frame 1 { function inicio(obj, args) { obj._avante = true; obj.cntbalas = new Contador(5); obj.cntmisil = new Contador(20); obj.cntestad = new Contador(200); obj._estado = 0; Basico.posicion(obj.cabeza, 0, 0); Basico.posicion(obj.arma, -5, 5); Basico.posicion(obj.alaf, 0, 0); Basico.posicion(obj.alat, 0, 0); Basico.posicion(obj.cuerpo, 0, 0); Basico.posicion(obj.barra, 0, -5.4); _global.inicio_basico(obj, args, 7500); } function inside(obj) { return Math.abs(_x - obj._x) < 20 && Math.abs(_y - obj._y) < 40; } function accion() { if (_hp > 0) { barra.showHP(_hp / _HP); if (cntestad.listo()) { _estado = !_estado; } if (_avante && _root.libuse._x < _x - 10 || !_avante && _root.libuse._x > _x + 10) { _avante = !_avante; var v5 = _avante ? 1 : 2; cuerpo.gotoAndStop(v5); ptras.gotoAndStop(v5); pfron.gotoAndStop(v5); c1.gotoAndStop(v5); c2.gotoAndStop(v5); c3.gotoAndStop(v5); pierna.gotoAndStop(v5); alat._xscale = _avante ? 100 : -100; alaf._xscale = alat._xscale; arma._xscale = alat._xscale; cabeza._xscale = alat._xscale; } nx = _x; ny = _y; _x = 0.9 * _x + 0.1 * (700 - _parent._xmouse); _y = 0.9 * _y + 0.1 * (_estado ? _parent._ymouse : 500 - _parent._ymouse); nx = _x - nx; ny = _y - ny; b0.mover(0, 0, nx, ny); b1.mover(b0.getFx(), b0.getFy(), nx, ny); b2.mover(b1.getFx(), b1.getFy(), nx, ny); b3.mover(b2.getFx(), b2.getFy(), nx, ny); fuerza = Math.min(Math.max(Math.abs(nx), Math.abs(ny)), 25) / 50; cuerpo.rotar(Math.atan2(ny, nx) * Basico.RAD2ANG, fuerza); if (!_avante) { cuerpo._rotation -= 15; } alfa = (cuerpo._rotation + 135) * Basico.ANG2RAD; cosa = Math.cos(alfa); sena = Math.sin(alfa); if (_avante) { pierna._rotation = Math.abs(cuerpo._rotation) + 45; Basico.extremo(pfron, pierna, pierna._rotation * Basico.ANG2RAD, 25); c1.mover(cosa * 35, sena * 35, nx, ny, -15); c2.mover(c1.getFx(20), c1.getFy(20), nx, ny, 0); c3.mover(c2.getFx(15), c2.getFy(15), nx, ny, 15); ptras._rotation = Math.max(0, 2 * cuerpo._rotation) * fuerza + 45; pfron._rotation = 2 * ptras._rotation; alaf._yscale = 100 + cuerpo._rotation; arma._rotation = Basico.direccion(_root.libuse, this) * Basico.RAD2ANG; } else { pierna._rotation = Math.abs(cuerpo._rotation) - 45; Basico.extremo(pfron, pierna, pierna._rotation * Basico.ANG2RAD, -25); c1.mover(cosa * 35, sena * 35, -nx, -ny, 15); c2.mover(c1.getFx(-20), c1.getFy(-20), -nx, -ny, 0); c3.mover(c2.getFx(-15), c2.getFy(-15), -nx, -ny, -15); ptras._rotation = Math.min(0, 2 * cuerpo._rotation) * fuerza - 15; pfron._rotation = 0.75 * ptras._rotation; alaf._yscale = 128 + cuerpo._rotation; arma._rotation = Basico.direccion(this, _root.libuse) * Basico.RAD2ANG; } alat._yscale = 200 - alaf._yscale; Basico.posicion(pierna, cosa * 35, sena * 35); Basico.posicion(ptras, cosa * 60, sena * 60); if (cntbalas.listo()) { na = Basico.direccion(_root.libuse, this); nc = Math.cos(na); ns = Math.sin(na); nx = _x + arma._x + (35 * nc - 10 * ns); ny = _y + arma._y + (_avante ? 35 * ns + 10 * nc : 35 * ns - 10 * nc); _global.elements[_global.ROJA].crear(1, nx, ny, na, 10); } if (cntmisil.listo()) { _global.elements[_global.MISILM].crear(1, _x, _y + arma._y + 10, _avante ? 0 : Math.PI, 50); } return false; } else { if (_estado < 100) { _global.elements[_global.EXPLOSION].crear(1, _x + Basico.randomI(-50, 50), _y + Basico.randomI(-50, 50), Basico.randomI(50, 150)); ++_estado; return false; } else { _global.muerte_basica(this, 99); return true; } } } function hit(bala) { _global.hit_basico(this, bala); } stop(); } } movieClip 39 { frame 1 { function inicio(obj, args) { obj._estado = 0; obj._contador = new Contador(200); obj._disparo = new Contador(50); obj._malos = new Contador(400); obj._malos.ahora(); obj._t = 0; _global.inicio_basico(obj, args, 500); } function inside(obj) { return Basico.dentro(this, obj, 50, 50); } function accion() { _t += 0.05; _rotation = 5 * Math.sin(_t); if (_hp <= 0) { if (_estado < 100) { _global.elements[_global.EXPLOSION].crear(1, _x + Basico.randomI(-50, 50), _y + Basico.randomI(-50, 50), Basico.randomI(50, 150)); ++_estado; return false; } else { _global.muerte_basica(this, 99); return true; } barra.showHP(_hp / _HP); return false; } if (_dir) { if (_x > 600) { _x = 0.9 * _x + 60; } } else { if (_x < 100) { _x = 0.9 * _x + 10; } } _y = 250 + 150 * Math.sin(_t / 3); if (_malos.listo()) { var v4 = -200; while (v4 <= 200) { _global.enemigos[_global.SCOUT0].crear(1, Math.abs(v4), 250 + v4, _dir); v4 += 50; } } if (!_estado && _contador.listo()) { _estado = Basico.randomI(1, 3); _t2 = 0; barra.showHP(_hp / _HP); return false; } if (_estado == 1) { if (_t2 == 400) { _estado = 0; } else { ++_t2; _global.elements[_global.ROJA].crear(1, _dir ? _x - 50 : _x + 50, _y, _dir ? Math.PI : 0, 1); } barra.showHP(_hp / _HP); return false; } if (_estado == 2) { if (_t2 == 100) { _estado = 0; } else { if (_t2 % 5 == 0) { _global.elements[_global.ROJA].crear(1, _dir ? _x - 50 : _x + 50, _y, Basico.direccion(_root.libuse, this), 1); } } ++_t2; barra.showHP(_hp / _HP); return false; } if (_estado == 3) { v4 = -Math.PI; while (v4 < Math.PI) { _global.elements[_global.ROJA].crear(1, _x + 50 * Math.cos(v4), _y + 50 * Math.sin(v4), v4, 1); v4 += 0.3926990816987241; } _estado = 0; barra.showHP(_hp / _HP); return false; } if (_disparo.listo()) { _global.elements[_global.ROJA].crear(1, _dir ? _x - 50 : _x + 50, _y, _dir ? Math.PI : 0, 1); } barra.showHP(_hp / _HP); return false; } function hit(bala) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } stop(); } } movieClip 41 { frame 1 { function inicio(obj, args) { obj._t = 0; _global.inicio_basico(obj, args, 10); } function inside(obj) { return Basico.dentro(this, obj, 18, 18); } function accion() { if (_global.muerte_basica(this, 5)) { return true; } _t += 0.05; _rotation = 5 * Math.sin(_t); if (!_dir) { _x = _x + 1; _x; return _global.vida_basica(this); } _x = _x - 1; _x; return _global.vida_basica(this); } function hit(bala) { _global.hit_basico(this, bala); } _global.inicio_basico = function (obj, a, hp) { obj._INERCIA = 0.5; obj._y = a[1]; obj._dir = (a[2] == undefined) ? true : a[2]; obj._x = obj._dir ? Basico.WIDTH + a[0] : -a[0]; if (!obj._dir) { obj._xscale = -100; } obj._HP = hp; obj._hp = hp; }; _global.vida_basica = function (obj) { obj.barra.showHP(obj._hp / obj._HP); if (obj._dir ? obj._x < -obj._width : obj._x > Basico.WIDTH + obj._width) { removeMovieClip(obj); return true; } else { return false; } }; _global.hit_basico = function (obj, bala) { obj._hp -= bala._POWER; obj._x += obj._INERCIA * bala._vx; obj._y += obj._INERCIA * bala._vy; _global.sonidos[_global.S_HIT].start(); }; _global.muerte_basica = function (obj) { function hp2cash(hp) { return Math.round(Math.pow(10, (7 * Math.log(hp) * Math.LOG10E - 4) / 3)); } if (obj._hp > 0) { return false; } darPremios(obj._x, obj._y, hp2cash(obj._HP) - 1); darPremios(obj._x, obj._y, 1); _global.elements[_global.EXPLOSION].crear(1, obj._x, obj._y, 100); removeMovieClip(obj); return true; }; stop(); } } movieClip 43 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(50); obj._t = 0; _global.inicio_basico(obj, args, 15); } function inside(obj) { return Basico.dentro(this, obj, 18, 18); } function accion() { if (_global.muerte_basica(this, 10)) { return true; } _t += 0.05; _rotation = 5 * Math.sin(_t); _dir ? _x; if (_contador.listo()) { _global.elements[_global.ROJA].crear(1, _x, _y, _dir ? Math.PI : 0, 10); } return _global.vida_basica(this); } function hit(bala) { _global.hit_basico(this, bala); } stop(); } } movieClip 45 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(50); obj._t = 0; _global.inicio_basico(obj, args, 75); } function inside(obj) { return Basico.dentro(this, obj, 18, 18); } function accion() { if (_global.muerte_basica(this, 20)) { return true; } _t += 0.05; _rotation = 5 * Math.sin(_t); _dir ? _x; if (_contador.listo()) { _global.elements[_global.ROJA].crear(1, _x, _y, Basico.direccion(_root.libuse, this), 20); } return _global.vida_basica(this); } function hit(bala) { _global.hit_basico(this, bala); } stop(); } } movieClip 48 { } movieClip 49 { frame 1 { function inicio(obj, args) { obj._abierto = false; obj._estado = 0; obj._angulo = 0; obj._t = 0; obj._puerta = 0; obj._gotoX = 2; obj._gotoY = 1; obj._posX = new Array(150, 350, 550); obj._posY = new Array(150, 250, 350); obj._COS = 0.8660254037844387; obj._SEN = -0.4999999999999999; _global.inicio_basico(obj, args, 2000); Basico.posicion(obj.puertaI, 0, 0); Basico.posicion(obj.puertaD, 0, 0); Basico.posicion(obj.puertaB, 0, 0); } function inside(obj) { return Basico.dentro(this, obj, 50, 50); } function puertas(abrir) { if (_puerta == abrir ? 25 : 0) { return true; Basico.posicion(puertaD, _puerta * _COS, _puerta * _SEN); Basico.posicion(puertaI, -puertaD._x, puertaD._y); Basico.posicion(puertaB, 0, _puerta); puertaB._yscale = 100 - _puerta; puertaD._yscale = puertaB._yscale; puertaI._yscale = puertaB._yscale; return false; } if (abrir) { ++_puerta; Basico.posicion(puertaD, _puerta * _COS, _puerta * _SEN); Basico.posicion(puertaI, -puertaD._x, puertaD._y); Basico.posicion(puertaB, 0, _puerta); puertaB._yscale = 100 - _puerta; puertaD._yscale = puertaB._yscale; puertaI._yscale = puertaB._yscale; return false; } --_puerta; Basico.posicion(puertaD, _puerta * _COS, _puerta * _SEN); Basico.posicion(puertaI, -puertaD._x, puertaD._y); Basico.posicion(puertaB, 0, _puerta); puertaB._yscale = 100 - _puerta; puertaD._yscale = puertaB._yscale; puertaI._yscale = puertaB._yscale; return false; } function accion() { _t += 0.05; _rotation = 5 * Math.sin(_t); if (_hp <= 0) { if (_estado < 100) { _global.elements[_global.EXPLOSION].crear(1, _x + Basico.randomI(-50, 50), _y + Basico.randomI(-50, 50), Basico.randomI(50, 150)); ++_estado; return false; } else { _global.muerte_basica(this, 999); return true; } barra.showHP(_hp / _HP); return false; } if (_estado == 0) { if (_global.goto(this, _posX[_gotoX], _posY[_gotoY])) { ++_estado; } barra.showHP(_hp / _HP); return false; } if (_estado == 1) { if (puertas(true)) { _abierto = true; _angulo = 0; _ang0 = Basico.direccion(this, _root.libuse); _estado = Basico.randomI(3, 5); } barra.showHP(_hp / _HP); return false; } if (_estado == 2) { if (puertas(false)) { _gotoX = Basico.randomI(0, 2); _gotoY = Basico.randomI(0, 2); _estado = 0; } barra.showHP(_hp / _HP); return false; } if (_estado == 3 && _angulo < 150) { _ang0 = Basico.direccion(_root.libuse, this); _global.elements[_global.ROJA].crear(1, _x, _y, _ang0, 1); _global.elements[_global.ROJA].crear(1, _x + 10 * Math.sin(_ang0), _y - 10 * Math.cos(_ang0), _ang0, 1); _global.elements[_global.ROJA].crear(1, _x - 10 * Math.sin(_ang0), _y + 10 * Math.cos(_ang0), _ang0, 1); ++_angulo; barra.showHP(_hp / _HP); return false; } if (_estado == 4 && _angulo < 120) { if (_angulo == 0 || _angulo == 40 || _angulo == 80) { var v4 = -Math.PI; while (v4 < Math.PI) { _global.elements[_global.MISILM].crear(1, _x + 50 * Math.cos(v4), _y + 50 * Math.sin(v4), v4, 50); v4 += 0.5235987755982988; } } else { if (_angulo == 20 || _angulo == 60 || _angulo == 100) { var v4 = -2.879793265790644; while (v4 < Math.PI) { _global.elements[_global.MISILM].crear(1, _x + 50 * Math.cos(v4), _y + 50 * Math.sin(v4), v4, 50); v4 += 0.5235987755982988; } } } ++_angulo; barra.showHP(_hp / _HP); return false; } if (_estado == 5 && _angulo < 360) { _global.elements[_global.ROJA].crear(1, _x, _y, _angulo * Basico.ANG2RAD + _ang0, 10); _global.elements[_global.ROJA].crear(1, _x, _y, (_angulo + 120) * Basico.ANG2RAD + _ang0, 10); _global.elements[_global.ROJA].crear(1, _x, _y, (_angulo + 240) * Basico.ANG2RAD + _ang0, 10); ++_angulo; barra.showHP(_hp / _HP); return false; } _angulo = 0; _estado = 2; _abierto = false; barra.showHP(_hp / _HP); return false; } function hit(bala) { if (_abierto) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } else { _global.rebota_basico(bala, Basico.direccion(bala, this)); } } stop(); } } movieClip 51 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(50); obj._t = 0; _global.inicio_basico(obj, args, 50); } function inside(obj) { return Basico.dentro(this, obj, 22, 22); } function accion() { if (_global.muerte_basica(this, 10)) { return true; } _t += 0.05; _rotation = 5 * Math.sin(_t); _dir ? _x; if (_contador.listo()) { _global.elements[_global.ROJA].crear(1, _x, _y, _dir ? Math.PI : 0, 10); } return _global.vida_basica(this); } function hit(bala) { if (_dir == Math.abs(180 - Math.abs(bala._rotation + _rotation)) > 90) { _x = _x + _INERCIA * bala._vx; _y = _y + _INERCIA * bala._vy; _global.rebota_basico(bala, Basico.direccion(bala, this)); } else { _global.hit_basico(this, bala); } } _global.rebota_basico = function (bala, normal) { if (bala._bala) { var v2 = bala._rotation * Basico.ANG2RAD; if (v2 - normal > Math.PI) { v2 -= 6.283185307179586; } else { if (normal - v2 > Math.PI) { v2 += 6.283185307179586; } } _global.elements[_global.AZUL].crear(1, bala._x, bala._y, Math.PI + 2 * normal - v2, 0, true); } }; stop(); } } movieClip 53 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(50); obj._t = 0; _global.inicio_basico(obj, args, 50); } function inside(obj) { return Basico.dentro(this, obj, 22, 22); } function accion() { if (_global.muerte_basica(this, 10)) { return true; } _t += 0.05; _rotation = 5 * Math.sin(_t); _dir ? _x; if (_contador.listo()) { _global.elements[_global.ROJA].crear(1, _x, _y, Basico.direccion(_root.libuse, this), 10); } return _global.vida_basica(this); } function hit(bala) { if (_dir == Math.abs(180 - Math.abs(bala._rotation + _rotation)) > 90) { _x = _x + _INERCIA * bala._vx; _y = _y + _INERCIA * bala._vy; _global.rebota_basico(bala, Basico.direccion(bala, this)); } else { _global.hit_basico(this, bala); } } stop(); } } movieClip 55 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(50); obj._t = 0; _global.inicio_basico(obj, args, 300); } function inside(obj) { return Basico.dentro(this, obj, 22, 22); } function accion() { if (_global.muerte_basica(this, 10)) { return true; } _t += 0.05; _rotation = 5 * Math.sin(_t); _dir ? _x; if (_contador.listo()) { _global.elements[_global.MISILM].crear(1, _x, _y, Basico.direccion(_root.libuse, this), 10); } return _global.vida_basica(this); } function hit(bala) { if (_dir == Math.abs(180 - Math.abs(bala._rotation + _rotation)) > 90) { _global.rebota_basico(bala, Basico.direccion(bala, this)); _x = _x + _INERCIA * bala._vx; _y = _y + _INERCIA * bala._vy; } else { _global.hit_basico(this, bala); } } stop(); } } movieClip 57 { frame 1 { function inicio(obj, args) { obj._estado = 0; obj._contador = new Contador(100); obj._malos = new Contador(100); obj._t = 0; obj._osc = 0; _global.inicio_basico(obj, args, 1000); } function inside(obj) { return Basico.dentro(this, obj, 35, 35); } function accion() { _xscale = _dir ? 100 : -100; _osc += 0.1; _x = _x * 0.9 + 0.1 * (_dir ? 600 : 100) + Math.sin(_osc); _y = 250 + 150 * Math.sin(_osc * 0.2); if (_hp <= 0) { if (_estado < 100) { _global.elements[_global.EXPLOSION].crear(1, _x + Basico.randomI(-50, 50), _y + Basico.randomI(-50, 50), Basico.randomI(50, 150)); ++_estado; return false; } else { _global.muerte_basica(this, 99); return true; } barra.showHP(_hp / _HP); return false; } if (_dir && _root.libuse._x > 600 || !_dir && _root.libuse._x < 100) { _dir = !_dir; barra.showHP(_hp / _HP); return false; } if (!_estado) { if (_contador.listo()) { _global.enemigos[_global.DRONE0].crear(1, 50, Basico.randomI(100, 400), _dir); _estado = Basico.randomI(1, 3); _t = 0; } barra.showHP(_hp / _HP); return false; } switch (_estado) { barra.showHP(_hp / _HP); return false; case 1: if (_t++ < 150) { _global.elements[_global.MISILM].crear(1, _x, _y - 5 - 10 * (_t % 3), _dir ? Math.PI : 0, 50); } else { _estado = 0; } barra.showHP(_hp / _HP); return false; case 2: if (_t++ < 150) { _global.elements[_global.ROJA].crear(1, _x, _y + 5, _dir ? Math.PI : 0, 1); _global.elements[_global.ROJA].crear(1, _x, _y + 5, 0.5235987755982988 + (_dir ? Math.PI : 0), 1); _global.elements[_global.ROJA].crear(1, _x, _y + 5, -0.5235987755982988 + (_dir ? Math.PI : 0), 1); } else { _estado = 0; } barra.showHP(_hp / _HP); return false; case 3: if (_t++ < 150) { _global.elements[_global.ROJA].crear(1, _x, _y + 5, _dir ? Math.PI : 0, 1); _global.elements[_global.ROJA].crear(1, _x, _y + 5 + 40 * Math.sin(Math.PI * _t / 15), _dir ? Math.PI : 0, 1); _global.elements[_global.ROJA].crear(1, _x, _y + 5 - 40 * Math.sin(Math.PI * _t / 15), _dir ? Math.PI : 0, 1); } else { _estado = 0; } barra.showHP(_hp / _HP); return false; } barra.showHP(_hp / _HP); return false; } function hit(bala) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } stop(); } } movieClip 59 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(50); obj._espera = new Contador(500); obj._estado = 0; obj._t = 0; _global.inicio_goto(obj, args, 20); } function inside(obj) { return Math.abs(_x - obj._x) < 15 && Math.abs(_y - obj._y) < 23; } function accion() { if (_global.muerte_basica(this, 15)) { return true; _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } if (_estado == 0) { if (_global.goto(this, _tx, _y)) { ++_estado; } _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } if (_estado == 1) { if (_espera.listo()) { ++_estado; _vx = 1; } else { if (Math.abs(_x - _tx) > 1) { _x = (_x + _tx) / 2; } if (_contador.listo()) { _global.elements[_global.ROJA].crear(1, _dir ? _x - 40 : _x + 40, _y + 10, _dir ? Math.PI : 0, 10); } } _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } _x = _dir ? _x - _vx : _x + _vx; _vx += 0.5; _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } function hit(bala) { _global.hit_basico(this, bala); } _global.inicio_goto = function (obj, a, hp) { obj._INERCIA = 0.5; obj._y = a[1]; obj._dir = (a[2] == undefined) ? true : a[2]; obj._tx = obj._dir ? Basico.WIDTH - a[0] : a[0]; obj._x = obj._dir ? Basico.WIDTH + 50 : -50; if (!obj._dir) { obj._xscale = -100; } obj._HP = hp; obj._hp = hp; }; _global.goto = function (obj, x, y) { if (Math.max(Math.abs(obj._x - x), Math.abs(obj._y - y)) > 1) { obj._x = 0.9 * obj._x + 0.1 * x; obj._y = 0.9 * obj._y + 0.1 * y; return false; } else { obj._x = x; obj._y = y; return true; } }; stop(); } } movieClip 61 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(50); obj._espera = new Contador(500); obj._estado = 0; obj._t = 0; _global.inicio_goto(obj, args, 25); } function inside(obj) { return Math.abs(_x - obj._x) < 15 && Math.abs(_y - obj._y) < 23; } function accion() { _xscale = _root.libuse._x < _x ? 100 : -100; if (_global.muerte_basica(this, 15)) { return true; _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } if (_estado == 0 || _estado == 2) { if (_global.goto(this, _tx, _y)) { ++_estado; } _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } if (_estado == 1 || _estado == 3) { if (_espera.listo()) { ++_estado; if (_estado == 4) { obj._dir = !obj._dir; } _tx = Basico.WIDTH - _tx; _vx = 1; } else { if (Math.abs(_x - _tx) > 1) { _x = (_x + _tx) / 2; } if (_contador.listo()) { _global.elements[_global.ROJA].crear(1, _xscale > 0 ? _x - 40 : _x + 40, _y + 10, Basico.direccion(_root.libuse, this), 10); } } _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } _x = _dir ? _x - _vx : _x + _vx; _vx += 0.5; _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } function hit(bala) { _global.hit_basico(this, bala); } stop(); } } movieClip 63 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(25); obj._espera = new Contador(500); obj._estado = 0; obj._bala = true; obj._t = 0; _global.inicio_goto(obj, args, 150); } function inside(obj) { return Math.abs(_x - obj._x) < 15 && Math.abs(_y - obj._y) < 23; } function accion() { _xscale = _root.libuse._x < _x ? 100 : -100; if (_global.muerte_basica(this, 15)) { return true; _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } if (_estado == 0 || _estado == 2 || _estado == 4) { if (_global.goto(this, _tx, _y)) { ++_estado; } _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } if (_estado == 1 || _estado == 3 || _estado == 5) { if (_espera.listo()) { ++_estado; _tx = Basico.WIDTH - _tx; _vx = 1; } else { if (Math.abs(_x - _tx) > 1) { _x = (_x + _tx) / 2; } if (_contador.listo()) { _global.elements[_bala ? _global.ROJA : _global.MISILM].crear(1, _xscale > 0 ? _x - 40 : _x + 40, _y + 10, Basico.direccion(_root.libuse, this), 10); _bala = !_bala; } } _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } _x = _dir ? _x - _vx : _x + _vx; _vx += 0.5; _t += 0.1; _y = _y + 0.5 * Math.cos(_t); return _global.vida_basica(this); } function hit(bala) { _global.hit_basico(this, bala); } stop(); } } movieClip 65 { frame 1 { function inicio(obj, args) { obj._HP = 2000; obj._hp = obj._HP; obj._dir = (args[0] == undefined) ? true : args[0]; if (obj._dir) { obj._y = 150; } else { obj._y = Basico.HEIGHT - 150; obj._yscale = -100; } obj._x = Basico.WIDTH + 235; obj._contador = new Contador(150); obj._estado = 0; obj._balas = 0; obj._peq = 50; obj._gran = -1; _global.enemigos[_global.NAVEB1].crear(1, obj); _global.enemigos[_global.NAVEB2].crear(1, obj); } function inside(obj) { return Basico.dentro(this, obj, 30, 20); } function navedisp(estado, balas, x, y) { if (estado == 0) { _global.elements[_global.ROJA].crear(1, x, y, Math.atan2(_root.libuse._y - y, _root.libuse._x - x), 1); } else { if (estado == 1) { _global.elements[_global.ROJA].crear(1, x, y, ((_dir ? 30 : 180) + _balas) * Basico.ANG2RAD, 1); } else { _global.elements[_global.ROJA].crear(1, x, y, ((_dir ? 150 : -30) - _balas) * Basico.ANG2RAD, 1); } } } function accion() { if (_x > 200) { _x = _x - 1; } if (_hp <= 0) { if (_peq) { _global.elements[_global.EXPLOSION].crear(1, Basico.randomI(_x - 30, _x + 30), Basico.randomI(_y - 20, _y + 20), Basico.randomI(50, 100)); --_peq; } else { if (_gran < 0 && !_hijo1._peq && !_hijo2._peq) { _gran = 100; } } if (_gran > 0) { _global.elements[_global.EXPLOSION].crear(1, Basico.randomI(_x - 200, _x + 200), _dir ? Basico.randomI(0, _y) : Basico.randomI(_y, Basico.HEIGHT), Basico.randomI(100, 200)); --_gran; if (_gran) { return false; } else { _global.muerte_basica(this, 9999); return true; } } } if (_balas) { navedisp(_estado, --_balas, _x + 30, _dir ? _y - 70 : _y + 70); barra.showHP(_hp / _HP); return false; } if (_x < Basico.WIDTH && _contador.listo()) { _estado = (_estado + 1) % 3; _balas = 121; } barra.showHP(_hp / _HP); return false; } function hit(bala) { if (_hp > 0) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } } stop(); } } movieClip 67 { frame 1 { function inicio(obj, args) { obj._padre = args[0]; obj._padre._hijo1 = obj; obj._HP = obj._padre._HP; obj._hp = obj._HP; obj._dir = obj._padre._dir; obj._y = obj._padre._y; obj._yscale = obj._padre._yscale; obj._x = obj._padre._x + 200; obj._peq = 50; } function inside(obj) { return Basico.dentro(this, obj, 30, 20); } function accion() { _x = _padre._x + 200; if (_hp <= 0) { if (_peq) { _global.elements[_global.EXPLOSION].crear(1, Basico.randomI(_x - 30, _x + 30), Basico.randomI(_y - 20, _y + 20), Basico.randomI(50, 100)); --_peq; } if (_padre._gran > 1) { _global.elements[_global.EXPLOSION].crear(1, Basico.randomI(_x - 200, _x + 200), _dir ? Basico.randomI(0, _y) : Basico.randomI(_y, Basico.HEIGHT), Basico.randomI(100, 200)); return false; } else { if (_padre._gran == 1) { _global.muerte_basica(this, 9999); return true; } } } if (_padre._balas) { _padre.navedisp(_padre._estado, _padre._balas, _x + 30, _dir ? _y - 70 : _y + 70); } barra.showHP(_hp / _HP); return false; } function hit(bala) { if (_hp > 0) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } } stop(); } } movieClip 69 { frame 1 { function inicio(obj, args) { obj._padre = args[0]; obj._padre._hijo2 = obj; obj._HP = obj._padre._HP; obj._hp = obj._HP; obj._dir = obj._padre._dir; obj._y = obj._padre._y; obj._yscale = obj._padre._yscale; obj._x = obj._padre._x + 400; obj._peq = 50; } function inside(obj) { return Basico.dentro(this, obj, 30, 20); } function accion() { _x = _padre._x + 400; if (_hp <= 0) { if (_peq) { _global.elements[_global.EXPLOSION].crear(1, Basico.randomI(_x - 30, _x + 30), Basico.randomI(_y - 20, _y + 20), Basico.randomI(50, 100)); --_peq; } if (_padre._gran > 1) { _global.elements[_global.EXPLOSION].crear(1, Basico.randomI(_x - 200, _x + 200), _dir ? Basico.randomI(0, _y) : Basico.randomI(_y, Basico.HEIGHT), Basico.randomI(100, 200)); return false; } else { if (_padre._gran == 1) { _global.muerte_basica(this, 9999); return true; } } } if (_padre._balas) { _padre.navedisp(_padre._estado, _padre._balas, _x + 30, _dir ? _y - 70 : _y + 70); } barra.showHP(_hp / _HP); return false; } function hit(bala) { if (_hp > 0) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } } stop(); } } movieClip 71 { frame 1 { function primera(x, y) { _t += 0.1; vx = Math.min(50, Math.max(-50, px - x - 5 - 3 * Math.sin(_t / 3))) / 50; vy = Math.min(50, Math.max(-50, y - py - 10 * Math.cos(_t))) / 50; px = x; py = y; transform.matrix = new flash.geom.Matrix(1, 0, vx, 1 - vy - Math.abs(vx), 0, 18); } function siguiente(padre, xscale) { _t = padre._t - 1.047197551196598; nx = padre._x + 24 * xscale * padre.transform.matrix.c; ny = padre._y + 30 * padre.transform.matrix.d; vx = padre.vx + Math.min(50, Math.max(-50, px - nx - 5 - 3 * Math.sin(_t / 3))) / 50; vy = padre.vy + Math.min(50, Math.max(-50, ny - py - 10 * Math.cos(_t))) / 50; px = nx; py = ny; transform.matrix = new flash.geom.Matrix(xscale, 0, vx, 1 - vy - Math.abs(vx), nx, ny); } _t = 0; stop(); } } movieClip 73 { } movieClip 74 { frame 1 { function inicio(obj, args) { obj._estado = 0; obj._angulo = 0; obj._t = 0; obj._a = 0; obj._gotoX = 2; obj._gotoY = 1; obj._posX = new Array(150, 350, 550); obj._posY = new Array(150, 250, 350); _global.inicio_basico(obj, args, 50000); } function inside(obj) { return Basico.dentro(this, obj, 18, 18); } function capa() { capa0.primera(_x, _y); capa1.siguiente(capa0, 1.1); capa2.siguiente(capa1, 1.21); capa3.siguiente(capa2, 1.331); } function accion() { _x = _x * 0.9 + 0.1 * _posX[_gotoX]; _a += 0.02; cabeza._rotation = 5 * Math.cos(_a); cabeza._xscale = _root.libuse._x < _x ? 100 : -100; cabeza.barra.showHP(_hp / _HP); if (_hp <= 0) { if (_estado < 100) { _global.elements[_global.EXPLOSION].crear(1, _x + Basico.randomI(-50, 50), _y + Basico.randomI(-50, 50), Basico.randomI(50, 150)); ++_estado; return false; } else { _global.muerte_basica(this, 999); return true; } capa(); return false; } if (_estado == 0) { if (_global.goto(this, _posX[_gotoX], _posY[_gotoY])) { _t = 0; _estado = Basico.randomI(1, 7); } capa(); return false; } if (++_t >= 300) { _gotoX = Basico.randomI(0, 2); _gotoY = Basico.randomI(0, 2); _estado = 0; capa(); return false; } switch (_estado) { capa(); return false; case 1: _global.elements[_global.MISILM].crear(1, _x, _y, 1.036725575684632 * _t, 50); capa(); return false; case 2: _global.elements[_global.ROJA].crear(1, _x, _y, 6.251769380643689 * _t, 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (0.4 + 1.99 * _t), 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (0.8 + 1.99 * _t), 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (1.2 + 1.99 * _t), 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (1.6 + 1.99 * _t), 1); capa(); return false; case 3: _ph = Math.floor(_t / 50) % 2 ? 0 : 0.333; _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (_ph + 1.99 * _t), 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (_ph + 0.6667 + 1.99 * _t), 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (_ph + 1.3333 + 1.99 * _t), 1); capa(); return false; case 4: if (_t % 5 == 0) { _global.elements[_global.MISILM].crear(1, _x, _y, Basico.randomF(-Math.PI, Math.PI), 50); } capa(); return false; case 5: if (_t % 30 == 0) { _ph = Basico.direccion(_root.libuse, this); var v4 = 0; while (v4 < 2) { _global.elements[_global.MISILM].crear(1, _x + 40 * Math.cos(v4 * Math.PI), _y + 40 * Math.sin(v4 * Math.PI), _ph, 50); v4 += 0.125; } } capa(); return false; case 6: _ph = 0.3333 * Math.cos(_t / 20); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * _ph, 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (_ph + 0.5), 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (_ph + 1), 1); _global.elements[_global.ROJA].crear(1, _x, _y, Math.PI * (_ph + 1.5), 1); capa(); return false; case 7: if (_t % 30 != 0) break; var v4 = 0; while (v4 < 20) { _tmpx = _posX[_gotoX] + Basico.randomI(-100, 100); _tmpy = _posY[_gotoY] + Basico.randomI(-100, 100); _global.elements[_global.MISILM].crear(1, _tmpx, _tmpy, Math.atan2(_root.libuse._y - _tmpy, _root.libuse._x - _tmpx), 50); ++v4; } } capa(); return false; } function hit(bala) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } stop(); } } movieClip 76 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(60); obj._t = 0; obj._ty = args[1]; obj._dir = (args[2] == undefined) ? true : args[2]; obj._x0 = obj._dir ? Basico.WIDTH + args[0] : -args[0]; obj._dx = 0; obj._HP = 100; obj._hp = obj._HP; } function inside(obj) { return Basico.dentro(this, obj, 20, 20); } function accion() { if (_global.muerte_basica(this, 10)) { return true; } _dir ? _dx-- : _dx++; _x = _dx + _x0; _y = _ty + 50 * Math.sin(_dx * Math.PI * 5 / Basico.WIDTH); if (_t > 0) { _global.elements[_global.ROJA].crear(1, _x, _y, _root.libuse._x < _x ? Math.PI : 0, 10); --_t; } if (_contador.listo()) { _t = 10; } return _global.vida_basica(this); } function hit(bala) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } stop(); } } movieClip 78 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(60); obj._t = 0; obj._ty = args[1]; obj._dir = (args[2] == undefined) ? true : args[2]; obj._tx = obj._dir ? Basico.WIDTH + args[0] : -args[0]; obj._HP = 200; obj._hp = obj._HP; } function inside(obj) { return Basico.dentro(this, obj, 20, 20); } function accion() { if (_global.muerte_basica(this, 10)) { return true; } _dir ? _tx-- : _tx++; _px = 18.84955592153876 * _tx / Basico.WIDTH; _x = _tx + 160 * Math.sin(_px); _y = _ty + 80 * Math.cos(_px); if (_t > 0) { _global.elements[_global.ROJA].crear(1, _x, _y, _root.libuse._x < _x ? Math.PI : 0, 10); --_t; } if (_contador.listo()) { _t = 10; } return _global.vida_basica(this); } function hit(bala) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } stop(); } } movieClip 80 { frame 1 { function inicio(obj, args) { obj._contador = new Contador(60); obj._t = 0; obj._ty = args[1]; obj._dir = (args[2] == undefined) ? true : args[2]; obj._tx = obj._dir ? Basico.WIDTH + args[0] : -args[0]; obj._HP = 450; obj._hp = obj._HP; } function inside(obj) { return Basico.dentro(this, obj, 20, 20); } function accion() { if (_global.muerte_basica(this, 10)) { return true; } _dir ? _tx-- : _tx++; _px = 18.84955592153876 * _tx / Basico.WIDTH; _x = _tx + 160 * Math.sin(_px); _y = _ty - 80 * Math.cos(_px); if (_t > 0) { _global.elements[_global.ROJA].crear(1, _x, _y, Basico.direccion(_root.libuse, this), 10); --_t; } if (_contador.listo()) { _global.elements[_global.MISILM].crear(1, _x, _y, _root.libuse._x < _x ? Math.PI : 0, 50); _t = 10; } return _global.vida_basica(this); } function hit(bala) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } stop(); } } movieClip 82 { frame 1 { function teleport() { _xscale = _xscale + (_dir ? -20 : 20); _yscale = 200 - Math.abs(_xscale); _alpha = Math.abs(_xscale); if (_xscale == 0) { _x = _dir ? 100 : 600; } if (Math.abs(_xscale) >= 100) { _dir = !_dir; return true; } else { return false; } } function inicio(obj, args) { obj._estado = -1; obj._ataque = new Contador(200); obj._balas = new Contador(25); obj._malos = new Contador(500); obj._canon = 0; obj._t = 0; obj._ty = 0; obj._dir = true; obj._HP = 15000; obj._hp = obj._HP; } function inside(obj) { return Basico.dentro(this, obj, 70, 80); } function accion() { if (_hp <= 0) { if (_estado < 100) { _global.elements[_global.EXPLOSION].crear(1, _x + Basico.randomI(-50, 50), _y + Basico.randomI(-50, 50), Basico.randomI(50, 150)); ++_estado; return false; } else { _global.muerte_basica(this, 99); return true; } barra.showHP(_hp / _HP); return false; } _y = 250 + 100 * Math.sin(_ty++ / 50); if (_estado >= 0) { if (Math.abs(_root.libuse._y - _y) < 100 && (_x > 350 && _root.libuse._x > _x || _x < 350 && _root.libuse._x < _x)) { _estado = -1; } else { if (_malos.listo()) { _global.enemigos[_global.ROTOR1].crear(1, 50, _y, _dir); } } } switch (_estado) { barra.showHP(_hp / _HP); return false; case -1: if (teleport()) { _ataque.ahora(); _estado = 0; } barra.showHP(_hp / _HP); return false; case 0: if (_balas.listo()) { _canon = (_canon + 1) % 3; _global.elements[_global.ROJA].crear(1, _x, _y + 60 * (_canon - 1), _dir ? Math.PI : 0, 10); } if (_ataque.listo()) { _t = 0; _estado = Basico.randomI(1, 5); } barra.showHP(_hp / _HP); return false; case 1: if (_t++ < 200) { _global.elements[_global.ROJA].crear(1, _x, _y + 60, Math.PI * (_dir ? 0.9 : 0.1), 1); _global.elements[_global.ROJA].crear(1, _x, _y, _dir ? Math.PI : 0, 1); _global.elements[_global.ROJA].crear(1, _x, _y - 60, Math.PI * (_dir ? 1.1 : -0.1), 1); } else { _estado = 0; } barra.showHP(_hp / _HP); return false; case 2: if (_t++ < 200) { if (_t % 10 == 0) { _global.elements[_global.MISILM].crear(1, _x, _y + 60, Math.atan2(_root.libuse._y - _y - 60, _root.libuse._x - _x), 1); _global.elements[_global.MISILM].crear(1, _x, _y, Math.atan2(_root.libuse._y - _y, _root.libuse._x - _x), 1); _global.elements[_global.MISILM].crear(1, _x, _y - 60, Math.atan2(_root.libuse._y - _y + 60, _root.libuse._x - _x), 1); } } else { _estado = 0; } barra.showHP(_hp / _HP); return false; case 3: if (_t++ < 200) { _a = Basico.direccion(_root.libuse, this); _global.elements[_global.ROJA].crear(1, _x, _y + 60, _a, 1); _global.elements[_global.ROJA].crear(1, _x, _y, _a, 1); _global.elements[_global.ROJA].crear(1, _x, _y - 60, _a, 1); } else { _estado = 0; } barra.showHP(_hp / _HP); return false; case 4: if (_t++ < 200) { _ty += (200 - _t) * _t / 1000; _global.elements[_global.ROJA].crear(1, _x, _y + 60, _dir ? Math.PI : 0, 1); _global.elements[_global.ROJA].crear(1, _x, _y, _dir ? Math.PI : 0, 1); _global.elements[_global.ROJA].crear(1, _x, _y - 60, _dir ? Math.PI : 0, 1); } else { _estado = 0; } barra.showHP(_hp / _HP); return false; case 5: if (_t++ < 200) { _ty += (200 - _t) * _t / 1000; if (_t % 5 == 0) { _global.elements[_global.MISILM].crear(1, _x, _y + Basico.randomI(-1, 1) * 60, _dir ? Math.PI : 0, 50); } } else { _estado = 0; } barra.showHP(_hp / _HP); return false; } barra.showHP(_hp / _HP); return false; } function hit(bala) { _global.sonidos[_global.S_HIT].start(); _hp -= bala._POWER; } stop(); } } movieClip 83 { frame 1 { _global.enemigos = Replicante.array(_scout0, _scout1, _scout2, _drone0, _drone1, _drone2, _shield0, _shield1, _shield2, _rotor0, _rotor1, _rotor2, _scoutb, _droneb, _shieldb, _naveb, _libuseb, _aeriab, _finalb, _naveb1, _naveb2); Basico.enum('SCOUT0,SCOUT1,SCOUT2,DRONE0,DRONE1,DRONE2,SHIELD0,SHIELD1,SHIELD2,ROTOR0,ROTOR1,ROTOR2,SCOUTB,DRONEB,SHIELDB,NAVEB,LIBUSEB,AERIAB,FINALB,NAVEB1,NAVEB2'); Basico.enum('RAWHEAD,KROLIKOVA,LEOCADIA,MCAERIA1,MCAERIA2,LIBUSE'); _global.bosswave = new Array(0, 22, 18, 17, 20, 20, 17, 19); _global.cargar_nivel = function (nivel) { var v1; switch (nivel) { return v1; case 0: v1 = Oleada.oleadas(24); v1[0].mensaje(RAWHEAD, 'Good, the flight device is operative and shows no sign of malfunction.\nHow does it feel, miss Vltava?'); v1[1].mensaje(LIBUSE, 'Like a dream, doktor. Soft, silent and obedient.'); v1[2].mensaje(RAWHEAD, 'Excellent. Feel free to test it above the city, it has plenty of fuel. Just be careful not to damage it.'); v1[3].mensaje(RAWHEAD, 'Hold on, I detect an unidentified device straight ahead. Approach carefully. Use your weapons if needed.'); v1[4].uno(SCOUT0, 0, 250); v1[5].mensaje(RAWHEAD, 'Libuše! Are you alright?'); v1[6].mensaje(LIBUSE, 'Just fine, doktor. Whatever that thing was, it seemed harmless. Here come more!'); v1[7].triangulo(SCOUT0, 0, 250, 2, 50); v1[8].mensaje(RAWHEAD, 'This is disturbing, no other tests are scheduled in this airpace area. Miss Vltava, I must report this to the government.'); v1[9].mensaje(RAWHEAD, 'Please, destroy as many as you can and collect their pieces, I may be able to use them to improve your weapons. Rawhead out.'); v1[10].triangulo(SCOUT0, 0, 325, 2, 50); v1[10].triangulo(SCOUT0, 0, 175, 2, 50); v1[11].rectangulo(SCOUT0, 3, 3, 0, 350, 200, 150); v1[11].rectangulo(SCOUT0, 2, 2, 50, 300, 150, 200); v1[12].uno(SCOUT0, 0, 350); v1[12].uno(SCOUT1, 0, 250); v1[12].uno(SCOUT0, 0, 150); v1[13].rectangulo(SCOUT1, 1, 4, 0, 325, 0, 175); v1[14].anillo(SCOUT0, 75, 250, 6, 75); v1[14].uno(SCOUT1, 75, 250); v1[15].nube(SCOUT0, 20, 400); v1[16].circulo(SCOUT0, SCOUT1, 75, 250, 8, 75); v1[17].rectangulo(SCOUT0, 1, 5, 0, 50, 0, 450); v1[17].rectangulo(SCOUT1, 1, 4, 0, 100, 0, 400); v1[18].enjambre(SCOUT0, SCOUT1, SCOUT0, 150, 250, 6, 150); v1[19].formacion(SCOUT0, SCOUT0, SCOUT1, 0, 250, 75); v1[20].formacion(SCOUT1, SCOUT1, SCOUT0, 0, 250, 75, false); v1[21].nube(SCOUT0, 10, 400); v1[21].nube(SCOUT1, 5, 400); v1[21].nube(SCOUT0, 10, 400, false); v1[21].nube(SCOUT1, 5, 400, false); v1[22].uno(SCOUTB, 0, 250); v1[23].mensaje(LIBUSE, 'Finally, all down! I better return to base, doktor Rawhead surely can put all these robots bits to good use.'); return v1; case 1: v1 = Oleada.oleadas(19); v1[0].mensaje(KROLIKOVA, 'Attention all civilian defense units. A direct attack against our city has been confirmed.'); v1[1].mensaje(KROLIKOVA, 'The identity of the attacker is still unknown and under investigation. Proceed to suppress the threat.'); v1[2].mensaje(KROLIKOVA, 'The glorious nation of Polis Prima counts on you, brave agents. Prime Minister Krolikova out.'); v1[3].mensaje(LIBUSE, 'Roger that, miss Krolikova! I won\'t let you down! I\'ll clean the outskirts of the city.'); v1[4].rectangulo(DRONE0, 1, 3, 50, 350, 50, 150); v1[5].enjambre(SCOUT0, SCOUT1, SCOUT0, 150, 250, 6, 150); v1[6].rectangulo(DRONE0, 2, 3, 50, 150, 100, 350); v1[6].rectangulo(SCOUT1, 2, 4, 50, 100, 100, 400); v1[7].triangulo(DRONE0, 150, 350, 3, 100); v1[7].triangulo(DRONE0, 150, 150, 3, 100, false); v1[8].rectangulo(DRONE0, 1, 2, 50, 300, 50, 350); v1[8].uno(DRONE1, 50, 250); v1[8].rectangulo(DRONE0, 1, 2, 50, 150, 50, 200); v1[9].anillo(DRONE0, 125, 250, 6, 75); v1[9].uno(DRONE1, 125, 250); v1[10].triangulo(SCOUT1, 0, 250, 5, 250); v1[11].rectangulo(DRONE1, 2, 3, 50, 275, 100, 375); v1[11].rectangulo(DRONE0, 2, 3, 50, 125, 100, 225); v1[12].formacion(DRONE0, DRONE0, DRONE1, 50, 250, 75); v1[13].nube(SCOUT1, 20, 400); v1[14].anillo(DRONE0, 100, 150, 6, 50); v1[14].anillo(DRONE0, 100, 350, 6, 50); v1[15].rectangulo(DRONE1, 1, 7, 50, 100, 50, 400); v1[15].rectangulo(DRONE1, 1, 7, 50, 100, 50, 400, false); v1[16].nube(DRONE0, 20, 400); v1[17].anillo(DRONE1, 350, 255, 8, 100); v1[17].anillo(DRONE1, 350, 255, 4, 50); v1[18].uno(DRONEB, 100, 250); return v1; case 2: v1 = Oleada.oleadas(18); v1[0].mensaje(RAWHEAD, 'Great job, Ms Vltava. Please, follow the trail of these robots to locate their origin. They seem to come from the West.'); v1[1].rectangulo(SCOUT0, 1, 2, 0, 300, 0, 350); v1[1].rectangulo(SCOUT0, 1, 2, 0, 150, 0, 200); v1[1].uno(SHIELD0, 0, 250); v1[2].triangulo(SHIELD0, 0, 250, 3, 100); v1[3].rectangulo(DRONE0, 1, 7, 50, 100, 50, 400); v1[3].rectangulo(SCOUT0, 1, 7, 50, 100, 50, 400); v1[4].rectangulo(DRONE1, 1, 7, 50, 100, 50, 400); v1[4].rectangulo(SCOUT1, 1, 7, 50, 100, 50, 400); v1[5].rectangulo(SHIELD0, 1, 4, 50, 75, 50, 375); v1[5].rectangulo(SHIELD0, 1, 4, 50, 125, 50, 425, false); v1[6].rectangulo(SCOUT1, 1, 2, 0, 300, 0, 350); v1[6].rectangulo(SCOUT1, 1, 2, 0, 150, 0, 200); v1[6].uno(SHIELD1, 0, 250); v1[7].triangulo(SHIELD1, 0, 250, 3, 100); v1[8].nube(SHIELD0, 10, 400); v1[8].nube(SCOUT1, 10, 400); v1[9].enjambre(SCOUT0, SHIELD0, SCOUT1, 150, 250, 8, 150); v1[10].enjambre(SCOUT1, SHIELD1, SHIELD0, 100, 250, 6, 100, false); v1[11].mensaje(LEOCADIA, 'ur doin a gr8 job, Libuše, no giev upz nao, also plz bring us moar robut bitz so we can maeks betta weponz 4u, kthxbai ^_^'); v1[12].mensaje(LIBUSE, 'I\'m on it, Leo. Thanks for your support.'); v1[13].formacion(SCOUT1, SHIELD0, SHIELD1, 50, 250, 75); v1[14].triangulo(SHIELD1, 50, 250, 5, 250); v1[15].triangulo(DRONE0, 50, 250, 5, 250, false); v1[16].rectangulo(SCOUT1, 3, 3, 50, 150, 250, 350); v1[16].rectangulo(SHIELD0, 3, 2, 50, 200, 250, 300); v1[16].rectangulo(SHIELD0, 2, 3, 100, 150, 200, 350); v1[16].rectangulo(SCOUT1, 2, 2, 100, 200, 200, 300); v1[17].uno(SHIELDB, 0, 250); return v1; case 3: v1 = Oleada.oleadas(21); v1[0].mensaje(MCAERIA1, 'Is this thing on? Great.\nI am Sergeant Maxwell F. McAeria of the Imperial Air Force. We bring you freedom and democracy.'); v1[1].mensaje(MCAERIA1, 'Upon its destruction, the Glorious Empire of America has decided to colonize your pitiful land. The Empire will be reborn!'); v1[2].mensaje(MCAERIA1, 'Make no further attempt to hinder our progress. Resistance is futile and plainly antidemocratic. McAeria out.'); v1[3].mensaje(LIBUSE, 'Antidemocratic? What? But Polis Prima is a dictatorship.'); v1[4].rectangulo(SCOUT0, 1, 2, 0, 350, 0, 400); v1[4].uno(ROTOR0, 0, 250); v1[4].rectangulo(SCOUT0, 1, 2, 0, 100, 0, 150); v1[5].triangulo(ROTOR0, 0, 250, 3, 150); v1[6].rectangulo(SCOUT0, 1, 2, 0, 100, 0, 400); v1[6].rectangulo(SCOUT1, 1, 2, 0, 175, 0, 325); v1[6].uno(SCOUT2, 0, 250); v1[7].formacion(SCOUT0, SCOUT1, SCOUT2, 50, 250, 75); v1[8].nube(SCOUT2, 10, 400); v1[8].nube(SCOUT2, 10, 400, false); v1[9].rectangulo(ROTOR0, 3, 3, 0, 300, 100, 400); v1[9].rectangulo(ROTOR0, 3, 3, 0, 100, 100, 200, false); v1[10].rectangulo(DRONE1, 7, 1, 50, 450, 650, 450); v1[10].rectangulo(SCOUT1, 2, 2, 0, 100, 200, 250); v1[10].rectangulo(SCOUT1, 2, 2, 0, 175, 200, 325, false); v1[11].formacion(ROTOR0, SCOUT2, ROTOR0, 50, 250, 75); v1[12].formacion(ROTOR0, SCOUT2, ROTOR0, 50, 250, 75, false); v1[13].mensaje(MCAERIA1, 'Maybe the message didn\'t quite make it through. You see, we\'re conquering your city. We need the land.'); v1[14].uno(SCOUTB, 100, 250); v1[15].anillo(DRONE1, 100, 150, 6, 50); v1[15].anillo(DRONE1, 100, 350, 6, 50); v1[15].anillo(DRONE1, 200, 250, 6, 50); v1[16].rectangulo(ROTOR0, 2, 4, 0, 250, 50, 400); v1[16].rectangulo(ROTOR0, 2, 4, 0, 100, 50, 250, false); v1[17].uno(SCOUTB, 100, 250); v1[17].uno(SCOUTB, 100, 250, false); v1[18].nube(ROTOR0, 10, 300); v1[19].mensaje(MCAERIA1, 'Alright, I guess we\'ll need to be more assertive.\nDeploy the big guns!'); v1[20].uno(NAVEB); return v1; case 4: v1 = Oleada.oleadas(21); v1[0].mensaje(KROLIKOVA, 'The identity of the attacker has been revealed. Apparently a small fraction of the American Empire survived the Extinction.'); v1[1].mensaje(KROLIKOVA, 'Agent Vltava, keep following the attackers to their origin and destroy their source once and for all.'); v1[2].mensaje(LIBUSE, 'Roger that, Ms Krolikova! You can count on me!'); v1[3].rectangulo(DRONE0, 1, 2, 50, 100, 50, 400); v1[3].rectangulo(DRONE1, 1, 2, 75, 175, 75, 325); v1[3].uno(DRONE2, 100, 250); v1[4].rectangulo(DRONE2, 1, 5, 50, 150, 50, 350, false); v1[5].rectangulo(ROTOR1, 3, 1, 0, 250, 100, 250); v1[6].rectangulo(ROTOR1, 1, 3, 0, 200, 0, 300, false); v1[7].uno(DRONEB, 200, 250, false); v1[8].formacion(DRONE1, DRONE0, DRONE2, 50, 250, 75); v1[9].triangulo(DRONE2, 50, 250, 4, 225); v1[10].rectangulo(ROTOR1, 3, 3, 0, 200, 20, 300); v1[11].circulo(DRONE1, DRONE2, 75, 175, 6, 50); v1[11].circulo(DRONE1, DRONE2, 75, 325, 6, 50); v1[12].mensaje(MCAERIA1, 'Miss? Yes, you. Whoever you are. Please, stop destroying our robots. We need them to conquer your city.'); v1[13].rectangulo(ROTOR0, 1, 2, 0, 150, 0, 350); v1[13].uno(ROTOR1, 0, 250); v1[14].nube(ROTOR1, 8, 200); v1[15].nube(SCOUT0, 40, 400); v1[16].enjambre(DRONE2, DRONE1, DRONE0, 175, 250, 6, 150); v1[17].rectangulo(DRONE2, 1, 5, 50, 150, 50, 350); v1[17].rectangulo(DRONE2, 1, 5, 50, 150, 50, 350, false); v1[18].mensaje(MCAERIA1, 'Sigh, how annoying. You see, miss, we\'ve been monitoring your advances and we\'re quite disappointed in your behavior.'); v1[19].mensaje(MCAERIA1, 'But we\'ve still learned a few things from your techniques. Let me show you what we\'ve got.'); v1[20].uno(LIBUSEB); return v1; case 5: v1 = Oleada.oleadas(19); v1[0].mensaje(RAWHEAD, 'The enemy headquarter is at hand! Don\'t fall back now, Ms Vltava!'); v1[1].rectangulo(SHIELD0, 1, 2, 50, 100, 50, 400); v1[1].rectangulo(SHIELD1, 1, 2, 75, 175, 75, 325); v1[1].uno(SHIELD2, 100, 250); v1[2].rectangulo(ROTOR2, 3, 1, 0, 250, 100, 250); v1[3].rectangulo(SHIELD2, 1, 7, 0, 100, 0, 400); v1[3].rectangulo(SHIELD2, 1, 7, 0, 100, 0, 400, false); v1[4].enjambre(DRONE2, DRONE1, DRONE0, 175, 250, 6, 150); v1[5].enjambre(SHIELD2, SHIELD1, SHIELD0, 175, 250, 6, 150); v1[6].mensaje(MCAERIA1, 'Excuse me, excuse me, miss? Shouldn\'t you be dead by now? How are you still getting closer?'); v1[7].uno(ROTOR0, 0, 250); v1[7].uno(ROTOR1, 0, 250); v1[7].uno(ROTOR2, 0, 250); v1[8].rectangulo(ROTOR0, 2, 1, 0, 250, 50, 250, false); v1[8].rectangulo(ROTOR1, 2, 1, 0, 250, 10, 250, false); v1[8].rectangulo(ROTOR2, 2, 1, 0, 250, 10, 250, false); v1[9].enjambre(SCOUT0, SCOUT1, SCOUT2, 100, 300, 4, 100); v1[9].enjambre(SHIELD0, SHIELD1, SHIELD2, 100, 200, 4, 100, false); v1[10].enjambre(DRONE0, DRONE1, DRONE2, 150, 250, 4, 100); v1[10].uno(ROTOR0, 0, 250, false); v1[10].uno(ROTOR1, 0, 250, false); v1[10].uno(ROTOR2, 0, 250, false); v1[11].nube(SCOUT0, 1, 400); v1[11].nube(SCOUT1, 1, 400); v1[11].nube(SCOUT2, 1, 400); v1[11].nube(DRONE0, 1, 300); v1[11].nube(DRONE1, 1, 300); v1[11].nube(DRONE2, 1, 300); v1[11].nube(SHIELD0, 1, 400); v1[11].nube(SHIELD1, 1, 400); v1[11].nube(SHIELD2, 1, 400); v1[11].nube(ROTOR0, 1, 200); v1[11].nube(ROTOR1, 1, 200); v1[11].nube(ROTOR2, 1, 200); v1[12].uno(NAVEB); v1[12].uno(NAVEB, false); v1[13].formacion(ROTOR1, ROTOR0, ROTOR2, 50, 250, 50); v1[14].rectangulo(ROTOR1, 1, 2, 10, 200, 10, 300); v1[14].rectangulo(ROTOR1, 2, 1, 0, 250, 20, 250); v1[14].rectangulo(ROTOR1, 1, 2, 10, 200, 10, 300, false); v1[14].rectangulo(ROTOR1, 2, 1, 0, 250, 20, 250, false); v1[15].rectangulo(ROTOR1, 2, 1, 0, 250, 20, 250); v1[15].rectangulo(ROTOR2, 2, 1, 10, 250, 30, 250); v1[15].uno(ROTOR0, 0, 250); v1[15].enjambre(SHIELD0, SHIELD1, SHIELD2, 100, 250, 2, 100); v1[16].mensaje(MCAERIA1, 'Dammit, do I have to take this matter into my own hands? Very well. You asked for it.'); v1[17].uno(AERIAB); v1[18].mensaje(MCAERIA2, 'God damned woman, what have you done!? This is not the end, you hear me!? You haven\'t seen the last of me!'); return v1; case 6: v1 = Oleada.oleadas(25); v1[0].mensaje(MCAERIA2, 'That woman has broken into the perimeter! Shoot her down! Shoot her down immediately!'); v1[1].uno(SCOUTB, 100, 250); v1[1].uno(SCOUTB, 100, 250, false); v1[2].rectangulo(ROTOR1, 3, 1, 0, 250, 100, 250); v1[2].rectangulo(ROTOR2, 3, 1, 0, 250, 100, 250); v1[3].uno(DRONEB, 0, 0); v1[4].nube(SHIELD2, 10, 300); v1[5].uno(ROTOR0, 0, 250); v1[5].uno(ROTOR1, 0, 250); v1[5].uno(ROTOR2, 0, 250); v1[5].uno(ROTOR0, 0, 250, false); v1[5].uno(ROTOR1, 0, 250, false); v1[5].uno(ROTOR2, 0, 250, false); v1[6].rectangulo(DRONE2, 7, 1, 50, 450, 650, 450); v1[6].rectangulo(ROTOR2, 1, 3, 0, 200, 0, 300); v1[7].uno(SHIELDB, 0, 250); v1[8].enjambre(SCOUT2, SCOUT1, SCOUT0, 100, 300, 4, 100); v1[8].enjambre(SHIELD2, SHIELD1, SHIELD0, 100, 200, 4, 100, false); v1[9].enjambre(DRONE2, DRONE1, DRONE0, 150, 250, 4, 100); v1[9].uno(ROTOR0, 0, 250, false); v1[9].uno(ROTOR1, 0, 250, false); v1[9].uno(ROTOR2, 0, 250, false); v1[10].formacion(ROTOR1, ROTOR2, ROTOR2, 50, 250, 50); v1[11].mensaje(MCAERIA2, 'She\'s too close! Too close!'); v1[12].uno(LIBUSEB); v1[13].nube(SCOUT0, 2, 400); v1[13].nube(SCOUT1, 2, 400); v1[13].nube(SCOUT2, 2, 400); v1[13].nube(DRONE0, 2, 300); v1[13].nube(DRONE1, 2, 300); v1[13].nube(DRONE2, 2, 300); v1[13].nube(SHIELD0, 2, 400); v1[13].nube(SHIELD1, 2, 400); v1[13].nube(SHIELD2, 2, 400); v1[13].nube(ROTOR0, 2, 200); v1[13].nube(ROTOR1, 2, 200); v1[13].nube(ROTOR2, 2, 200); v1[14].rectangulo(ROTOR2, 1, 2, 10, 200, 10, 300); v1[14].rectangulo(ROTOR2, 2, 1, 0, 250, 20, 250); v1[14].rectangulo(ROTOR2, 1, 2, 10, 200, 10, 300, false); v1[14].rectangulo(ROTOR2, 2, 1, 0, 250, 20, 250, false); v1[15].uno(AERIAB); v1[16].enjambre(DRONE2, DRONE2, DRONE2, 350, 255, 8, 100); v1[17].mensaje(MCAERIA2, 'Deploy the last resort! I want that blue bint out of my airspace now!'); v1[18].mensaje(MCAERIA2, 'I don\'t care it isn\'t finished yet, rookie! Deploy the damn thing right now!'); v1[19].uno(FINALB); v1[20].mensaje(MCAERIA2, 'Noooooo! Our glorious nation! Our precious weapons!'); v1[21].mensaje(LIBUSE, 'That will teach you! Never mess with Polis Prima again!'); v1[22].mensaje(RAWHEAD, 'Yes! Wonderful, I knew you could do it! The menace is over!'); v1[23].mensaje(LEOCADIA, 'u did awsum, Libuše! we shud nao has party 4 u!'); v1[24].mensaje(KROLIKOVA, 'Excellent work, agent Vltava. Return now to the city, this calls for a celebration.'); } return v1; }; stop(); } } movieClip 85 { frame 1 { function inicio(obj, args) { obj._x = args[0]; obj._y = args[1]; obj._rotation = args[2] * Basico.RAD2ANG; obj._POWER = args[3]; obj._vx = 10 * Math.cos(args[2]); obj._vy = 10 * Math.sin(args[2]); obj._bala = true; _global.sonidos[args.length < 5 ? _global.S_LASER : _global.S_REBOTE].start(); } function accion() { _x = _x + _vx; _y = _y + _vy; if (Basico.fuera(this)) { removeMovieClip(this); return true; } else { return false; } } function fin() { removeMovieClip(this); } stop(); } } movieClip 101 { frame 1 { function inicio(obj, args) { obj._x = args[0]; obj._y = args[1]; Basico.escala(obj, args[2]); _global.sonidos[_global.S_EXPL].start(); } function accion() { if (_currentframe == 12) { removeMovieClip(this); return true; } else { nextFrame(); return false; } } stop(); } } movieClip 103 { frame 1 { function inicio(obj, args) { obj._x = args[0]; obj._y = args[1]; Basico.escala(obj, args[2]); obj.val = args[3]; obj._vx = Basico.randomF(-3, 3); obj._vy = Basico.randomF(-5, 2); obj._rotation = Basico.randomF(-90, 90); } function accion() { var v4 = Basico.euclidea(this, _root.libuse); if (v4 < _global.RADIO) { _x = _x * 0.9 + 0.1 * _root.libuse._x; _y = _y * 0.9 + 0.1 * _root.libuse._y; if (v4 < 20) { _global.MONEY += val; _root.dinero.update(); _global.sonidos[_global.S_TINK].start(); removeMovieClip(this); return true; } else { return false; } } else { _x = _x + _vx; _y = _y + (_vy + 1); _vx *= 0.95; _vy *= 0.95; if (_y > 520) { removeMovieClip(this); return true; } else { return false; } } } stop(); } } movieClip 105 { frame 1 { function inicio(obj, args) { obj._x = args[0]; obj._y = args[1]; obj._rotation = args[2] * Basico.RAD2ANG; obj._POWER = args[3]; _global.sonidos[_global.S_MISIL].start(); } function accion() { if (_global.GIROM) { j = Replicante.cercano(_global.enemigos, this, 1); a = Basico.direccion(j.length > 0 ? j[0].o : _root.libuse, this) * Basico.RAD2ANG; _rotation = _rotation + Basico.minmax(Basico.adapta360(a, _rotation) - _rotation, -3, 3); } _x = _x + _v * Basico.cos(_rotation); _y = _y + _v * Basico.sen(_rotation); --_timer; if (!_timer) { _global.elements[_global.EXPLOSION].crear(1, _x, _y, 50); removeMovieClip(this); return true; } if (!Basico.fuera(this)) { return false; } removeMovieClip(this); return true; } function fin() { _global.elements[_global.EXPLOSION].crear(1, _x, _y, 50); var v3 = 0; while (v3 < _global.SPLAS) { _global.elements[_global.VERDE].crear(1, _x, _y, 6.283185307179586 * v3 / _global.SPLAS, _global.BALAS); ++v3; } removeMovieClip(this); } _v = 3; _timer = 1000; stop(); } } movieClip 107 { frame 1 { function inicio(obj, args) { obj._x = args[0]; obj._y = args[1]; obj._rotation = args[2] * Basico.RAD2ANG; obj._POWER = 50; obj._vx = Math.cos(args[2]); obj._vy = Math.sin(args[2]); obj._a = 0; _global.sonidos[_global.S_MISIL].start(); } function accion() { _x = _x + _vx * _a; _y = _y + _vy * _a; _a += 0.25; if (!Basico.fuera(this)) { return false; } removeMovieClip(this); return true; } function fin() { _global.elements[_global.EXPLOSION].crear(1, _x, _y, 100); removeMovieClip(this); } stop(); } } movieClip 108 { frame 1 { _global.elements = Replicante.array(_roja, _verde, _azul, _misil, _misilm, _premio, _explosion); Basico.enum('ROJA,VERDE,AZUL,MISL,MISILM,PREMIO,EXPLOSION'); stop(); } } movieClip 110 { frame 1 { function inicio() { _x = _root.libuse._x; _y = _root.libuse._y; _global.EMP = 0; } function hurt(obj) { if (Math.abs(Basico.euclidea(this, obj) - _global.EMP) < 10) { obj._hp -= _POWER; } } function hurtR(obj) { var v2; var v1; v2 = 0; while (v2 < obj.length) { v1 = 0; while (v1 < obj[v2].objeto.length) { hurt(obj[v2].objeto[v1]); ++v1; } ++v2; } } function accion() { if (_global.EMP < 0) { } else { if (_global.EMP > 860) { Basico.escala(this, 0); _global.EMP = -1; } else { _global.EMP += 10; Basico.escala(this, _global.EMP); } } } _POWER = 200; } } movieClip 115 { } movieClip 120 { frame 1 { stop(); } } movieClip 121 { frame 1 { function update() { var v1 = String(Math.min(999999999, MONEY)); var v2 = ''; while (v1.length > 3) { v2 = ',' + v1.slice(-3) + v2; v1 = v1.slice(0, -3); } Basico.setText(texto, v1 + v2); } function setval() { if (_global.BOMBA >= _global.BBMAX) { barra.nextFrame(); } else { barra.barra._xscale = 100 * _global.BOMBA / _global.BBMAX; } } function reset() { barra.prevFrame(); barra.barra._xscale = 0; } var formato = new TextFormat(); formato.bold = true; formato.font = '_typewriter'; update(); barra.barra._xscale = 0; stop(); } } movieClip 124 { frame 1 { stop(); } } movieClip 126 { frame 1 { stop(); } } movieClip 127 { frame 1 { function build(bloques) { if (N == undefined) { N = 0; } while (N < bloques) { duplicateMovieClip(block, '__HP' + N, this.getNextHighestDepth()); b = eval('__HP' + N); b.swapDepths(fin); b._x = 24 + N * 32; ++N; } fin._x = 24 + N * 32; barra._xscale = 320 * (N + 1); barra.showHP(1); } stop(); } } movieClip 143 { frame 1 { stop(); } frame 100 { _parent.terminarTodo = true; stop(); } frame 200 { _parent.terminarTodo = true; stop(); } } button 150 { on (release) { stopAllSounds(); _parent.play(); } } movieClip 151 { frame 1 { gotoAndPlay(2); } frame 2 { var miau = new Sound(this); miau.attachSound('miaumiau'); miau.setVolume(_global.vol_son); miau.start(); } frame 160 { _parent.play(); } } movieClip 168 { frame 17 { stop(); } } frame 3 { this.createEmptyMovieClip('sonidoMC', getNextHighestDepth()); this.createEmptyMovieClip('musicaMC', getNextHighestDepth()); _global.setVolumen = function () { _global.sonidos[0].setVolume(_global.vol_son); _global.musicas[0].setVolume(_global.vol_mus); }; Basico.enum('S_LASER,S_AY,S_EXPL,S_RAYO,S_HIT,S_REBOTE,S_MISIL,S_TINK'); var nson = new Array('s_laser', 's_ay', 's_expl', 's_rayo', 's_hit', 's_rebote', 's_misil', 's_tink'); _global.sonidos = new Array(nson.length); var i = 0; while (i < nson.length) { _global.sonidos[i] = new Sound(sonidoMC); p; _global.sonidos[i].attachSound(nson[i]); ++i; } Basico.enum('M_COMM,M_DUBS,M_FISH,M_HAZA,M_LIGH,M_MAGM,M_NEVE'); _global.musicIndex = new Array(_global.M_LIGH, _global.M_COMM, _global.M_DUBS, _global.M_FISH, _global.M_COMM, _global.M_DUBS, _global.M_FISH, _global.M_HAZA, _global.M_MAGM, _global.M_NEVE); var nmus = new Array('m_comm', 'm_dubs', 'm_fish', 'm_haza', 'm_ligh', 'm_magm', 'm_neve'); _global.musicas = new Array(nmus.length); var i = 0; while (i < nmus.length) { _global.musicas[i] = new Sound(musicaMC); _global.musicas[i].attachSound(nmus[i]); ++i; } _global.empiezaMusica = function (level) { stopAllSounds(); _global.musicas[_global.musicIndex[level]].start((level == 8) ? 20 : 0, 99); }; _global.setCalidad = function () { _quality = (_global.calidad == 1) ? 'low' : ((_global.calidad == 2) ? 'medium' : 'high'); }; _global.setVolumen(); Basico.inicio(); Basico.mouseListener(_root); _global.level = 1; _global.defaultmessage = 'Trade robot bits for updates'; _global.maxv = new Array(9, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1); _global.mult = new Array(16, 200, 5000000, 1000, 10000, 4000000, 1, 50000, 50000000, 50000, 10000, 8000000); _global.prod = new Array(5, 5, 1, 10, 10, 1, 100, 10, 1, 10, 20, 1); _global.descripcion = new Array('Purchase energy pack', 'Upgrade healing system', 'Electromagnetic pulse', 'Improve basic damage', 'Improve basic firerate', 'Basic spreading system', 'Increase attraction radius', 'Electrify attractor', 'Triple electric damage', 'Missiles', 'Splash damage to missiles', 'Homing missiles'); _global.nombreNivel = new Array('Polis Prima', 'Outskirts', 'Atlantic Ocean', 'Atlantic Airspace', 'American Jungle', 'American Ruins', 'American Headquarters'); _global.HEIGHT = 500; _global.WIDTH = 700; _global.BBMAX = 100; _global.EMP = -1; _global._wave = 0; _global.cntbalas = new Contador(6); _global.cntmisil = new Contador(50); _global.cntcurar = new Contador(-1); _global.cntwaves = new Contador(100); _global.cntPEM = new Contador(12); _global.cntwaves.ahora(); _global._pause = 0; _global.actualizarDatos = function () { _root.salud.build(curr[0]); _global.SALUD = 100 * (curr[0] + 1); _global.HP = SALUD; _global.cntcurar.fijar(curr[1] > 0 ? 5 * Math.pow(2, 3 - curr[1]) : -1); _global.BOMBA = curr[2] - 1; _global.BALAS = Math.pow(2, curr[3]); _global.cntbalas.fijar(curr[4] > 0 ? Math.pow(2, 3 - curr[4]) : 6); _global.SPRED = curr[5] - 1; _global.RADIO = curr[6] > 0 ? 50 * Math.pow(2, curr[6]) : 50; _global.RAYOS = Math.max(0, curr[7]); _global.NRAYS = curr[8] > 0 ? 3 : 1; _global.MISIL = curr[9] > 0 ? 10 * Math.pow(2, curr[9]) : 0; _global.SPLAS = curr[10] > 0 ? Math.pow(2, curr[10] + 2) : 0; _global.GIROM = curr[11] > 0; var i; var j; i = 0; while (i < 5) { j = 0; while (j < 3) { (eval('tienda.mejora' + i + j)).setDatos(); ++j; } ++i; } _global.MONEY = Math.min(999999999, _global.MONEY); _global._saveData(); }; _global.darPremios = function (x, y, p) { var v2 = 1; var v4 = 100; while (p > 0) { _global.elements[_global.PREMIO].crear(p % 10, x, y, v4, v2); p = Math.floor(p / 10); v2 *= 10; v4 += 100; } }; _global.mensajedentro = false; _global.mensajefuera = false; _global.crearOleada = function () { if (_global.cntwaves.listo()) { if (_global._wave == _global.bosswave[_global.level]) { _global.empiezaMusica(8); } else { if (_global._wave == _global.bosswave[_global.level] + 1) { _global.empiezaMusica(_global.level); } } if (_global._wave >= _global.database.length) { levelfin.play(); if (_global.level == _global.maxlevel) { ++_global.maxlevel; } } else { if (_global.database[_global._wave].esMensaje()) { _global.mensajedentro = true; _global.mensajefuera = false; mensaje.abrir(_global.database[_global._wave]); _global.cntwaves.ahora(); } else { _global.database[_global._wave].cast(enemigos); } } ++_global._wave; } }; actualizarDatos(); _global.musicas[_global.M_NEVE].start(0, 99); stop(); } movieClip 176 { } movieClip 180 { frame 1 { _global.sonidos[_global.S_TINK].start(); } frame 10 { stop(); } } button 183 { on (release) { _global.empiezaMusica(0); play(); } } frame 4 { _quality = 'high'; mensaje._visible = false; dinero.update(); _global._wave = 0; terminarTodo = false; tienda.inicio(); salud.build(curr[0]); _global._saveData(); stop(); } movieClip 188 { } button 191 { on (release) { accion(); } on (rollOver) { Basico.setText(_parent.descr, _global.descripcion[_i]); } on (rollOut) { Basico.setText(_parent.descr, _global.defaultmessage); } } movieClip 193 { frame 1 { function getPrecio() { return prod[_i] > 1 ? mult[_i] * Math.pow(prod[_i], curr[_i] + 1) : mult[_i] * (curr[_i] + 1); } function setDatos() { if (curr[_i] < 0) { boton.enabled = false; puerta._x = 4; Basico.setText(campo, '---'); } else { if (curr[_i] < maxv[_i]) { puerta._x = 44; precio = getPrecio(); boton.enabled = precio <= _global.MONEY; campo.textColor = boton.enabled ? 16777215 : 16711680; if (precio >= 1000) { if (precio >= 1000000) { Basico.setText(campo, '' + precio / 1000000 + 'M'); } else { Basico.setText(campo, '' + precio / 1000 + 'K'); } } else { Basico.setText(campo, precio); } barra.verde._xscale = Math.max(0, 100 * curr[_i] / maxv[_i]); return true; } else { boton.enabled = false; puerta._x = 44; curr[_i] = maxv[_i]; Basico.setText(campo, '---'); barra.verde._xscale = 100; return false; } } } function accion() { var v3 = getPrecio(); if (_global.MONEY >= v3) { _global.MONEY -= v3; _root.dinero.update(); ++curr[_i]; if (_j > 0 && _j < 3 && _k == 0 && curr[_i + 3] < 0) { ++curr[_i + 3]; } if (_k < 2 && curr[_i + 1] < 0) { ++curr[_i + 1]; } actualizarDatos(); } } barra.verde._xscale = 0; _j = Number(_name.charAt(6)); _k = Number(_name.charAt(7)); _i = _j * 3 + _k; setDatos(); stop(); } } movieClip 195 { frame 1 { Basico.setText(descr, _global.defaultmessage); stop(); } } button 200 { on (release) { _global.level = i; _global.database = _global.cargar_nivel(i - 1); _parent.mensaje._visible = false; _global.empiezaMusica(i); _global.setCalidad(); _parent.play(); } on (rollOver) { Basico.setText(_parent.tienda.descr, 'Play level ' + i + ': ' + _global.nombreNivel[i - 1]); } on (rollOut) { Basico.setText(_parent.tienda.descr, _global.defaultmessage); } } movieClip 201 { frame 1 { i = Math.round((_x + 6) / 86); if (_global.maxlevel >= i) { gotoAndStop(2); } else { stop(); } } } movieClip 204 { frame 1 { stop(); } } movieClip 206 { frame 1 { stop(); } } movieClip 208 { frame 1 { stop(); } } movieClip 211 { frame 1 { function rotar(rot, fuerza) { _rotation = rot * fuerza + 45 * (1 - fuerza); } stop(); } } movieClip 213 { frame 1 { stop(); } } movieClip 215 { frame 1 { stop(); } } movieClip 217 { frame 1 { function getFx() { return _x - Math.cos(Math.PI * _rotation / 180) * 20; } function getFy() { return _y - Math.sin(Math.PI * _rotation / 180) * 20; } function mover(posx, posy, fx, fy) { var v3 = posx - _x + fx; var v2 = posy - _y + fy; _rotation = _rotation * 0.5; var v4 = Math.min(Math.sqrt(v3 * v3 + v2 * v2), 20) / 20; var v1 = 180 * Math.atan2(v2, v3) / Math.PI; if (v1 - _rotation > 180) { v1 -= 360; } if (_rotation - v1 > 180) { v1 += 360; } _rotation = v1 * v4 + _rotation * (1 - v4) + (Math.random() - 0.5) * 4; _x = posx; _y = posy; } stop(); } } movieClip 219 { frame 1 { stop(); } } movieClip 221 { frame 1 { stop(); } } movieClip 223 { frame 1 { stop(); } } movieClip 225 { frame 1 { stop(); } } movieClip 226 { frame 33 { gotoAndPlay(1); } } button 227 { on (release) { resetBlock._y = 150; } on (rollOver) { Basico.setText(tienda.descr, 'Reset all data'); } on (rollOut) { Basico.setText(tienda.descr, _global.defaultmessage); } } button 230 { on (rollOver) { Basico.setText(_parent.tienda.descr, 'Sound volume: ' + _global.vol_son); } on (rollOut) { Basico.setText(_parent.tienda.descr, _global.defaultmessage); } on (press, dragOver) { dragging = 2; play(); startDrag(bson, true, 0, 0, 100, 0); } on (release, releaseOutside) { stopDrag(); dragging = 0; bson._x = Math.round(bson._x); _global.vol_son = bson._x; _global.setVolumen(); _global.sonidos[_global.S_TINK].start(); _global.fichero.data.sonido = _global.vol_mus * 101 + _global.vol_son; } } button 231 { on (rollOver) { Basico.setText(_parent.tienda.descr, 'Music volume: ' + _global.vol_mus); } on (rollOut) { Basico.setText(_parent.tienda.descr, _global.defaultmessage); } on (press, dragOver) { dragging = 1; play(); startDrag(bmus, true, 0, -20, 100, -20); } on (release, releaseOutside) { stopDrag(); dragging = 0; bmus._x = Math.round(bmus._x); _global.vol_mus = bmus._x; _global.setVolumen(); _global.fichero.data.sonido = _global.vol_mus * 101 + _global.vol_son; } } movieClip 232 { frame 1 { bmus._x = _global.vol_mus; bson._x = _global.vol_son; dragging = 0; } frame 2 { if (dragging == 1) { _global.vol_mus = Math.round(bmus._x); _global.setVolumen(); Basico.setText(_parent.tienda.descr, 'Music volume: ' + _global.vol_mus); } else { if (dragging == 2) { _global.vol_son = Math.round(bson._x); Basico.setText(_parent.tienda.descr, 'Sound volume: ' + _global.vol_son); } else { stop(); } } } frame 3 { gotoAndPlay(2); } } button 237 { on (release) { _global._resetData(); _global.setVolumen(); _y = 700; _parent.gotoAndPlay('reset'); } } button 238 { on (release) { _y = 700; } } movieClip 239 { frame 1 { stop(); } } movieClip 246 { } movieClip 248 { } movieClip 251 { frame 1 { function rotar(alfa, fuerza) { _rotation = _rotation / 2; var v1 = alfa + 45; if (v1 > 90) { v1 = 180 - v1; } else { if (v1 < -90) { v1 = -180 - v1; } } if (v1 - _rotation > 180) { v1 -= 360; } else { if (_rotation - v1 > 180) { v1 += 360; } } _rotation = v1 * fuerza + _rotation * (1 - fuerza); } stop(); } } movieClip 254 { frame 1 { function getFx(t) { return _x - Basico.cos(_rotation) * t; } function getFy(t) { return _y - Basico.sen(_rotation) * t; } function mover(posx, posy, fx, fy, a0) { var v3 = posx - _x + fx; var v2 = posy - _y + fy; _rotation = (_rotation + a0) * 0.5; var v4 = Math.min(Math.sqrt(v3 * v3 + v2 * v2), 10) / 50; var v1 = Math.atan2(v2, v3) * Basico.RAD2ANG; if (v1 - _rotation > 180) { v1 -= 360; } if (_rotation - v1 > 180) { v1 += 360; } _rotation = v1 * v4 + _rotation * (1 - v4); _x = posx; _y = posy; } stop(); } } movieClip 256 { frame 1 { stop(); } } movieClip 259 { frame 1 { stop(); } } movieClip 261 { frame 1 { stop(); } } movieClip 270 { frame 1 { estado = 0; stop(); } } frame 5 { if (Key.isDown(80)) { if (_global._pause == 0 || _global._pause == 2) { Mouse.show(); pausetext._visible = true; ++_global._pause; } } else { if (_global._pause == 1 || _global._pause == 3) { ++_global._pause; if (_global._pause == 4) { Mouse.hide(); pausetext._visible = false; _global._pause = 0; } } else { if (_global._pause == 0) { if (terminarTodo) { Basico.escala(emp, 0); _global.EMP = -1; Replicante.killAll(_global.elements); Replicante.killAll(_global.enemigos); libuse._x = -110; libuse._y = 200; Mouse.show(); levelfin.gotoAndStop(1); _global._wave = 0; _global.HP = _global.SALUD; if (_global.BOMBA >= _global.BBMAX) { _global.BOMBA = 0; dinero.reset(); } else { if (_global.BOMBA > 0) { _global.BOMBA = 0; dinero.setval(); } } if (libuse._viva && _global.level == 7) { _global.empiezaMusica(9); gotoAndPlay('fin'); } else { _global.empiezaMusica(0); gotoAndPlay('menu'); } } else { if (_global.EMP > -1) { emp.accion(); emp.hurtR(_global.enemigos); _global.elements[_global.ROJA].empBalas(emp, _global.EMP); } else { if (_global.BOMBA >= _global.BBMAX) { if (Key.isDown(32)) { _global.BOMBA = 0; emp.inicio(); dinero.reset(); } } else { if (_global.BOMBA > -1 && !mensaje._visible) { if (_global.cntPEM.listo()) { ++_global.BOMBA; dinero.setval(); } } } } Replicante.accionesArray(_global.elements); _global.elements[_global.ROJA].impacto(libuse); _global.elements[_global.MISILM].impacto(libuse); if (Replicante.total(enemigos) > 0) { _global.elements[_global.VERDE].barrido(enemigos); _global.elements[_global.MISL].barrido(_global.enemigos); Replicante.accionesArray(_global.enemigos); } else { if (!mensaje._visible && libuse._viva) { crearOleada(); } } libuse.accion(mensaje._visible); fondo.accion(); n1.accion(); n2.accion(); n3.accion(); } if (Basico.mouse) { if (!(_global.mensajedentro || _global.mensajefuera)) { _global.mensajefuera = true; } } else { if (_global.mensajedentro) { _global.mensajedentro = false; } else { if (_global.mensajefuera) { _global.mensajefuera = false; mensaje._visible = false; crearOleada(); } } } } } } } movieClip 278 { frame 1 { gotoAndStop(_global.level); } } movieClip 285 { frame 1 { gotoAndStop(_global.level); } } movieClip 292 { frame 1 { gotoAndStop(_global.level); } } movieClip 299 { frame 1 { gotoAndStop(_global.level); } } movieClip 300 { frame 1 { function accion() { dy = Math.cos(_t++ / 10); hy = 25; vx = 5; f1a._x -= vx; if (f1a._x < -1000) { f1a._x += 1000; } f1b._x = f1a._x + 1000; f1b._y = dy + hy; f1a._y = f1b._y; f2a._x -= 2 * vx; if (f2a._x < -1000) { f2a._x += 1000; } f2b._y = 2 * dy + hy; f2a._y = f2b._y; f2b._x = f2a._x + 1000; f3a._x -= 4 * vx; if (f3a._x < -1000) { f3a._x += 1000; } f3b._y = 4 * dy + hy; f3a._y = f3b._y; f3b._x = f3a._x + 1000; } _t = 0; stop(); } } movieClip 302 { frame 1 { function accion() { if (_x < -_xscale) { _xscale = 200 + Math.random() * 300; _yscale = (Math.random() + 1) * _xscale; _x = WIDTH; _y = 200 + Math.random() * (300 - _yscale); } else { _x = _x - _xscale / 100; } } stop(); } } movieClip 306 { } movieClip 308 { } movieClip 310 { frame 1 { stop(); } } movieClip 312 { frame 1 { stop(); } } movieClip 313 { frame 1 { cuerpo.gotoAndStop(2); pierna2.gotoAndStop(2); pierna1.gotoAndStop(2); } frame 100 { stop(); } } movieClip 314 { frame 1 { function inside(obj) { return Math.abs(_x - obj._x) < 20 && Math.abs(_y - obj._y) < 40; } function accion(mensaje) { if (_viva) { if (!mensaje && _global.cntcurar.listo() && _global.HP < _global.SALUD) { ++_global.HP; } _root.salud.barra.showHP(_global.HP / _global.SALUD); Mouse.hide(); if (mensaje && !_avante || !mensaje && _avante == Basico.mouse) { _avante = mensaje ? true : !Basico.mouse; var frame = _avante ? 1 : 2; cuerpo.gotoAndStop(frame); ptras.gotoAndStop(frame); pfron.gotoAndStop(frame); c1.gotoAndStop(frame); c2.gotoAndStop(frame); c3.gotoAndStop(frame); pierna.gotoAndStop(frame); alat._xscale = _avante ? 100 : -100; alaf._xscale = alat._xscale; arma._xscale = alat._xscale; cabeza._xscale = alat._xscale; } nx = _x; ny = _y; _x = (_x + Basico.minmax(_parent._xmouse, 0, 700)) / 2; _y = (_y + Basico.minmax(_parent._ymouse, 0, 500)) / 2; nx = _x - nx; ny = _y - ny; b0.mover(0, 0, nx, ny); b1.mover(b0.getFx(), b0.getFy(), nx, ny); b2.mover(b1.getFx(), b1.getFy(), nx, ny); b3.mover(b2.getFx(), b2.getFy(), nx, ny); fuerza = Math.min(Math.max(Math.abs(nx), Math.abs(ny)), 25) / 50; cuerpo.rotar(Math.atan2(ny, nx) * Basico.RAD2ANG, fuerza); if (!_avante) { cuerpo._rotation -= 15; } alfa = (cuerpo._rotation + 135) * Basico.ANG2RAD; cosa = Math.cos(alfa); sena = Math.sin(alfa); if (_avante) { pierna._rotation = Math.abs(cuerpo._rotation) + 45; Basico.extremo(pfron, pierna, pierna._rotation * Basico.ANG2RAD, 25); c1.mover(cosa * 35, sena * 35, nx, ny, -15); c2.mover(c1.getFx(20), c1.getFy(20), nx, ny, 0); c3.mover(c2.getFx(15), c2.getFy(15), nx, ny, 15); ptras._rotation = Math.max(0, 2 * cuerpo._rotation) * fuerza + 45; pfron._rotation = 2 * ptras._rotation; alaf._yscale = 100 + cuerpo._rotation; } else { pierna._rotation = Math.abs(cuerpo._rotation) - 45; Basico.extremo(pfron, pierna, pierna._rotation * Basico.ANG2RAD, -25); c1.mover(cosa * 35, sena * 35, -nx, -ny, 15); c2.mover(c1.getFx(-20), c1.getFy(-20), -nx, -ny, 0); c3.mover(c2.getFx(-15), c2.getFy(-15), -nx, -ny, -15); ptras._rotation = Math.min(0, 2 * cuerpo._rotation) * fuerza - 15; pfron._rotation = 0.75 * ptras._rotation; alaf._yscale = 128 + cuerpo._rotation; } alat._yscale = 200 - alaf._yscale; Basico.posicion(pierna, cosa * 35, sena * 35); Basico.posicion(ptras, cosa * 60, sena * 60); nx = _avante ? _x + 35 : _x - 35; ny = _y + 10; na = _avante ? 0 : Math.PI; Basico.escala(area, RADIO > 50 ? RADIO : 0); if (!mensaje) { if (_global.cntbalas.listo()) { _global.elements[_global.VERDE].crear(1, nx, ny, na, _global.BALAS); if (_global.SPRED > -1) { k = Math.PI * Math.sin(_global.SPRED++ / 4) / 8; _global.elements[_global.VERDE].crear(1, nx, ny, na + k, _global.BALAS); _global.elements[_global.VERDE].crear(1, nx, ny, na - k, _global.BALAS); if (_global.SPRED >= 12) { _global.SPRED = 0; } } } if (_global.MISIL > 0 && _global.cntmisil.listo()) { _global.elements[_global.MISL].crear(1, nx, ny, na, _global.MISIL); } j = 0; if (_global.RAYOS > 0) { i = Replicante.cercano(_global.enemigos, this, _global.NRAYS); while (j < i.length) { if (i[j].d < RADIO) { _global.sonidos[_global.S_RAYO].start(); rayo = eval('rayo' + j); rayo._xscale = i[j].d; rayo._rotation = Basico.direccion(i[j].o, this) * Basico.RAD2ANG; i[j].o._hp -= _global.RAYOS; } else { break; } ++j; } } while (j < 4) { eval('rayo' + j + '._xscale') = 0; ++j; } } else { j = 0; while (j < 4) { eval('rayo' + j + '._xscale') = 0; ++j; } } } else { if (_t == 0) { _global.elements[_global.EXPLOSION].crear(1, Basico.randomF(_x - 20, _x + 20), Basico.randomF(_y - 20, _y + 20), Basico.randomF(50, 100)); _t = Basico.randomI(5, 15); } --_t; b0.mover(0, 0, 0, _vy); b1.mover(b0.getFx(), b0.getFy(), 0, _vy); b2.mover(b1.getFx(), b1.getFy(), 0, _vy); b3.mover(b2.getFx(), b2.getFy(), 0, _vy); _y = _y + _vy; _vy += 0.25; _rotation = _rotation * 0.96; if (_y - 500 > Basico.HEIGHT && !terminar) { terminar = true; _parent.levelfin.gotoAndPlay('fail'); } } } function hit(bala) { if (_global.HP <= 0) { return undefined; } _global.sonidos[_global.S_AY].start(); _global.HP -= bala._POWER; _x = _x + _INERCIA * bala._vx; _y = _y + _INERCIA * bala._vy; if (_global.HP <= 0) { _viva = false; _global.HP = 0; _root.salud.barra.showHP(0); _vy = -5; _t = 10; _rotation = 150; _global.elements[_global.EXPLOSION].crear(1, _x, _y, 100); Mouse.show(); nextFrame(); } } _INERCIA = 0.5; _avante = true; _viva = true; terminar = false; Basico.posicion(cabeza, 0, 0); Basico.posicion(arma, 0, 0); Basico.posicion(alaf, 0, 0); Basico.posicion(alat, 0, 0); Basico.posicion(cuerpo, 0, 0); stop(); } } movieClip 329 { frame 1 { function abrir(datos) { nuevo(datos.vector[1], datos.vector[2]); } function nuevo(who, what) { if (_currentframe != who + 2) { gotoAndStop(who + 2); } Basico.setText(texto, '- ' + nombre[who] + ':\n' + what); _visible = true; } var nombre = new Array('Dr. Javalier Rawhead', 'PM Irina Krolikova', 'Leocadia Shfooflupuff', 'Sgt. Maxwell F. McAeria', 'Sgt. Maxwell F. McAeria', 'Libuše Vltava'); _visible = false; stop(); } } button 332 { on (press, dragOver) { dragging = 2; play(); startDrag(bson, true, 0, 0, 100, 0); } on (release, releaseOutside) { stopDrag(); dragging = 0; bson._x = Math.round(bson._x); _global.vol_son = bson._x; _global.setVolumen(); _global.sonidos[_global.S_TINK].start(); } } button 333 { on (press, dragOver) { dragging = 1; play(); startDrag(bmus, true, 0, -20, 100, -20); } on (release, releaseOutside) { stopDrag(); dragging = 0; bmus._x = Math.round(bmus._x); _global.vol_mus = bmus._x; _global.setVolumen(); } } button 336 { on (release) { _global.calidad = 1; setCalidad(); } } button 337 { on (release) { _global.calidad = 2; setCalidad(); } } button 338 { on (release) { _global.calidad = 3; setCalidad(); } } movieClip 339 { frame 1 { bmus._x = _global.vol_mus; bson._x = _global.vol_son; dragging = 0; } frame 2 { if (dragging == 1) { _global.vol_mus = Math.round(bmus._x); _global.setVolumen(); } else { if (dragging == 2) { _global.vol_son = Math.round(bson._x); } else { stop(); } } } frame 3 { gotoAndPlay(2); } } button 342 { on (release) { _global._pause = 3; } } button 343 { on (release) { gotoAndStop(2); } } button 345 { on (release) { gotoAndStop(1); _global._pause = 3; } } button 346 { on (release) { _parent.terminarTodo = true; _global._pause = 3; gotoAndStop(1); } } movieClip 347 { frame 1 { _visible = false; stop(); } } frame 6 { gotoAndPlay(_currentframe - 1); } frame 7 { px = libuse._x; py = libuse._y; libuse.accion(true); m0 = m1; m1 = m2; m2 = m3; m3 = m4; m4 = m5; m5 = m6; m6 = m7; m7 = m8; m8 = m9; m9 = new flash.geom.Matrix((50 + libuse._x - px) / 100, (libuse._y - py) / 100, 0, 1, libuse._x, libuse._y + 10); b9.transform.matrix = m0; b8.transform.matrix = m1; b7.transform.matrix = m2; b6.transform.matrix = m3; b5.transform.matrix = m4; b4.transform.matrix = m5; b3.transform.matrix = m6; b2.transform.matrix = m7; b1.transform.matrix = m8; b0.transform.matrix = m9; b9._x -= 460; b8._x -= 410; b7._x -= 360; b6._x -= 310; b5._x -= 260; b4._x -= 210; b3._x -= 160; b2._x -= 110; b1._x -= 60; b0._x -= 10; fondo.accion(); fuegos.acciones(); } movieClip 349 { } movieClip 354 { frame 1 { stop(); } frame 4 { stop(); } } movieClip 355 { frame 1 { function init(chispa) { chispa.vy = Basico.randomI(20, 30); chispa._y = 500; chispa._x = Basico.randomI(20, 680); chispa.vx = Math.random() * (350 - chispa._x) / 100; chispa.wait = Basico.randomI(0, 150); } function accion(chispa) { if (chispa.wait > 0) { --chispa.wait; } else { if (chispa._currentframe == 1) { if (chispa.vy > 0) { chispa._x += chispa.vx; chispa._y -= chispa.vy; --chispa.vy; } else { chispa.gotoAndPlay(2); } } else { if (chispa._alpha > 0) { ++chispa._xscale; ++chispa._yscale; --chispa._alpha; ++chispa._y; } else { chispa._xscale = 100; chispa._yscale = 100; chispa._alpha = 100; chispa.gotoAndStop(1); init(chispa); } } } } function acciones() { accion(fuego0); accion(fuego1); accion(fuego2); accion(fuego3); } init(fuego0); init(fuego1); init(fuego2); init(fuego3); stop(); } } movieClip 357 { frame 1 { stop(); } } movieClip 359 { frame 1 { stop(); } } movieClip 361 { frame 1 { stop(); } } movieClip 362 { frame 1 { function accion() { dy = Math.cos(_t++ / 10); hy = 25; vx = 5; f1a._x -= vx; if (f1a._x < -1000) { f1a._x += 1000; } f1b._x = f1a._x + 1000; f1b._y = dy + hy; f1a._y = f1b._y; f2a._x -= 2 * vx; if (f2a._x < -1000) { f2a._x += 1000; } f2b._y = 2 * dy + hy; f2a._y = f2b._y; f2b._x = f2a._x + 1000; f3a._x -= 4 * vx; if (f3a._x < -1000) { f3a._x += 1000; } f3b._y = 4 * dy + hy; f3a._y = f3b._y; f3b._x = f3a._x + 1000; } _t = 0; stop(); } } movieClip 367 { frame 1 { stop(); } } frame 8 { if (Basico.mouse) { Mouse.show(); _global.empiezaMusica(0); gotoAndPlay('menu'); } else { gotoAndPlay(_currentframe - 1); } } frame 9 { actualizarDatos(); gotoAndPlay('menu'); }




http://swfchan.com/30/145657/info.shtml
Created: 26/10 -2018 12:44:19 Last modified: 26/10 -2018 12:44:19 Server time: 01/05 -2024 23:13:54