Frame 1
function GoldG(Get) {
_root.Gold = _root.Gold + Math.round(Get * _root.BGold);
update();
}
function GoldL(Lose) {
_root.Gold = _root.Gold - Lose;
update();
}
function drop(onX, onY) {
if (random(100) >= 40) {
var _local2 = _root.attachMovie("Coin02", "Coin02" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local2._x = onX;
_local2._y = onY;
} else {
var _local2 = _root.attachMovie("Bombies", "Bombies" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local2._x = onX;
_local2._y = onY;
_local2.style = random(2) + 1;
}
}
function update() {
_root.Nave.updateBombs();
_root.CPanel.barSH.moves._xscale = (_root.Nave.curSH / _root.Nave.maxSH) * 100;
_root.CPanel.barHP.moves._xscale = (_root.Nave.curHP / _root.Nave.maxHP) * 100;
_root.CPanel.curTXT.text = _root.Nave.curHP;
_root.CPanel.maxTXT.text = _root.Nave.maxHP;
_root.CPanel.curSTXT.text = _root.Nave.curSH;
_root.CPanel.maxSTXT.text = _root.Nave.maxSH;
_root.CPanel.scoreTXT.text = _root.score;
_root.CPanel.GoldTXT.text = _root.Gold;
}
function PlaySound(thisone) {
if ((thisone == 1) && (sonidoOn == true)) {
sonidoX = new Sound(this);
sonidoX.attachSound("GetSound");
sonidoX.start(0, 0);
}
if ((thisone == 2) && (sonidoOn == true)) {
sonidoX = new Sound(this);
sonidoX.attachSound("BombSound");
sonidoX.start(0, 0);
}
if ((thisone == 3) && (sonidoOn == true)) {
sonidoX = new Sound(this);
sonidoX.attachSound("BulletSound");
sonidoX.start(0, 0);
}
}
function doSomething1() {
getURL ("http://www.furaffinity.net/user/shenhibiki", (window = blank));
}
function doSomething3() {
getURL ("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5864973", (window = blank));
}
speed = 1;
cadencia = 10;
damage = 3;
naveHP = 10;
naveSH = 5;
regHP = 0;
regSH = 1;
BType = 1;
BLevel = 1;
BSpeed = 1;
BGold = 1;
sonidoOn = true;
Gold = 0;
Stage.scaleMode = "noScale";
MENU = new ContextMenu();
MENU.builtInItems.play = false;
MENU.builtInItems.forward_back = false;
MENU.builtInItems.loop = false;
MENU.builtInItems.print = false;
MENU.builtInItems.rewind = false;
MENU.builtInItems.save = false;
MENU.builtInItems.zoom = false;
Functioned1 = new ContextMenuItem("Flash by Shen Hibiki", doSomething1);
Functioned3 = new ContextMenuItem("-DONATE?-", doSomething3);
Functioned3.separatorBefore = true;
MENU.customItems.push(Functioned1);
MENU.customItems.push(Functioned3);
_root.menu = MENU;
Frame 2
sonido = new Sound(this);
sonido.attachSound("MenuSound");
if (sonidoOn == false) {
sonido.setVolume(0);
TogSon.gotoAndStop(2);
}
sonido.start(0, 9999);
score = 0;
stop();
Frame 3
sonido = new Sound(this);
sonido.attachSound("SceneSound");
if (sonidoOn == false) {
sonido.setVolume(0);
TogSon.gotoAndStop(2);
}
sonido.start(0, 9999);
MenuPW._visible = false;
stop();
Symbol 8 MovieClip [Bala01] Frame 1
#initclip 30
Object.registerClass("Bala01", Bala01);
#endinitclip
Symbol 13 MovieClip [Enemy01] Frame 1
#initclip 16
Object.registerClass("Enemy01", Enemy01);
#endinitclip
Symbol 16 MovieClip [Bala02] Frame 1
#initclip 17
Object.registerClass("Bala02", Bala02);
#endinitclip
Symbol 19 MovieClip [Bala03] Frame 1
#initclip 18
Object.registerClass("Bala03", Bala03);
#endinitclip
Symbol 22 MovieClip [EBala02] Frame 1
#initclip 19
Object.registerClass("EBala02", EBala02);
#endinitclip
Symbol 23 MovieClip [EBala01] Frame 1
#initclip 20
Object.registerClass("EBala01", EBala01);
#endinitclip
Symbol 32 MovieClip [Enemy02] Frame 1
#initclip 21
Object.registerClass("Enemy02", Enemy02);
#endinitclip
Symbol 32 MovieClip [Enemy02] Frame 22
gotoAndPlay (7);
Symbol 39 MovieClip [Boom01] Frame 1
#initclip 22
Object.registerClass("Boom01", Boom01);
#endinitclip
Symbol 42 MovieClip [Coin02] Frame 1
#initclip 23
Object.registerClass("Coin02", Coin02);
#endinitclip
Symbol 45 MovieClip [Coin01] Frame 1
#initclip 24
Object.registerClass("Coin01", Coin01);
#endinitclip
Symbol 50 MovieClip [Bombies] Frame 1
#initclip 25
Object.registerClass("Bombies", Bombies);
#endinitclip
Symbol 55 MovieClip [Enemy03] Frame 1
#initclip 26
Object.registerClass("Enemy03", Enemy03);
#endinitclip
Symbol 59 MovieClip [Escena01] Frame 1
#initclip 27
Object.registerClass("Escena01", Escena01);
#endinitclip
Symbol 65 MovieClip Frame 1
stop();
Symbol 74 MovieClip [Nave] Frame 1
#initclip 28
Object.registerClass("Nave", Nave);
#endinitclip
Symbol 76 MovieClip [EnemyGenerator] Frame 1
#initclip 29
Object.registerClass("EnemyGenerator", EG);
#endinitclip
Symbol 95 MovieClip Frame 3
stop();
Symbol 99 Button
on (release) {
BNiv();
}
Symbol 101 Button
on (release) {
BCad();
}
Symbol 103 Button
on (release) {
BHP();
}
Symbol 105 Button
on (release) {
BSH();
}
Symbol 116 MovieClip Frame 2
function BHP() {
if (_root.Gold >= PHP) {
_root.GoldL(PHP);
_root.naveHP = _root.naveHP + 5;
_root.Nave.maxHP = _root.Nave.maxHP + 5;
_root.Nave.curHP = _root.Nave.curHP + 5;
Prices();
}
}
function BSH() {
if (_root.Gold >= PSH) {
_root.GoldL(PSH);
_root.naveSH = _root.naveSH + 1;
_root.Nave.maxSH = _root.Nave.maxSH + 1;
_root.Nave.curSH = _root.Nave.curSH + 1;
Prices();
}
}
function BNiv() {
if ((_root.Gold >= PNiv) && (_root.BLevel < 10)) {
_root.GoldL(PNiv);
_root.BLevel = _root.BLevel + 1;
PNiv = _root.BLevel * 10;
Prices();
}
}
function BCad() {
if ((_root.Gold >= PCad) && (_root.cadencia > 5)) {
_root.GoldL(PCad);
_root.cadencia = _root.cadencia - 0.5;
PCad = Math.round((11 - _root.cadencia) * 15);
Prices();
}
}
function Prices() {
PNivTxt.text = PNiv;
NivTxt.text = _root.BLevel;
PCadTxt.text = PCad;
CadTxt.text = _root.cadencia;
PHPTxt.text = PHP;
HPTxt.text = _root.naveHP;
PSHTxt.text = PSH;
SHTxt.text = _root.naveSH;
_root.update();
}
stop();
PNiv = _root.BLevel * 10;
PCad = Math.round((11 - _root.cadencia) * 15);
PHP = 50;
PSH = 25;
Prices();
Symbol 121 Button
on (release, keyPress "M") {
_root.sonidoOn = false;
_root.sonido.setVolume(0);
gotoAndStop (2);
}
on (keyPress "m") {
_root.sonidoOn = false;
_root.sonido.setVolume(0);
gotoAndStop (2);
}
Symbol 122 Button
on (release, keyPress "m") {
_root.sonidoOn = true;
_root.sonido.setVolume(100);
gotoAndStop (1);
}
on (keyPress "M") {
_root.sonidoOn = true;
_root.sonido.setVolume(100);
gotoAndStop (1);
}
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 2
stop();
Symbol 140 MovieClip [__Packages.Enemy01] Frame 0
class Enemy01 extends MovieClip
{
var speed, killed, HP, score, pausa, espera, shoot, _y, hitTest, _x, removeMovieClip;
function Enemy01 () {
super();
}
function onLoad() {
speed = 5;
killed = 0;
HP = 5;
score = 10;
pausa = 20;
espera = 100;
shoot = 0;
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + speed;
if ((_y >= espera) && (pausa >= 0)) {
speed = 0;
pausa = pausa - 1;
}
if ((pausa <= 0) && (shoot == 0)) {
EneShoot();
shoot = 1;
}
if ((shoot == 1) && (speed <= 9.5)) {
speed = speed + 0.5;
}
if (hitTest(_root.Nave.HitArea)) {
_root.Nave.damage(HP);
explode();
}
}
if (_y > 610) {
explode();
}
}
function EneShoot() {
var _local3 = _root.CapaJuego.attachMovie("EBala02", "EBala02" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_local3.slide = -1;
_local3 = _root.CapaJuego.attachMovie("EBala02", "EBala02" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_local3.slide = 0;
_local3 = _root.CapaJuego.attachMovie("EBala02", "EBala02" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_local3.slide = 1;
}
function explode() {
var _local3 = _root.attachMovie("Boom01", "Boom01" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.EG.VIVOS = _root.EG.VIVOS - 1;
removeMovieClip();
}
function damage(dam) {
HP = HP - dam;
if (HP <= 0) {
_root.score = _root.score + score;
if ((random(100) + 1) >= 80) {
_root.drop(_x, _y);
}
_root.Nave.update();
explode();
}
}
}
Symbol 141 MovieClip [__Packages.Bala02] Frame 0
class Bala02 extends MovieClip
{
var speed, removeMovieClip, _y, _x, slide, hitTest;
function Bala02 () {
super();
}
function onLoad() {
speed = 10 * _root.BSpeed;
}
function onEnterFrame() {
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y - speed;
_x = _x + slide;
if (_y < -10) {
removeMovieClip();
}
for (var _local3 in _root.EG.enemies) {
if (hitTest(_root.EG.enemies[_local3].HitArea)) {
removeMovieClip();
_root.EG.enemies[_local3].damage(_root.damage * 1.5);
}
}
}
}
}
Symbol 142 MovieClip [__Packages.Bala03] Frame 0
class Bala03 extends MovieClip
{
var speed, removeMovieClip, _y, _x, slide, hitTest;
function Bala03 () {
super();
}
function onLoad() {
speed = 10 * _root.BSpeed;
}
function onEnterFrame() {
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y - speed;
_x = _x + slide;
if (_y < -10) {
removeMovieClip();
}
for (var _local3 in _root.EG.enemies) {
if (hitTest(_root.EG.enemies[_local3].HitArea)) {
removeMovieClip();
_root.EG.enemies[_local3].damage(_root.damage * 2);
}
}
}
}
}
Symbol 143 MovieClip [__Packages.EBala02] Frame 0
class EBala02 extends MovieClip
{
var speed, _x, _y, removeMovieClip, slide, hitTest;
function EBala02 () {
super();
}
function onLoad() {
speed = 6;
}
function onEnterFrame() {
if (_root.Nave.CoinShower > 0) {
var _local3 = _root.CapaJuego.attachMovie("Coin01", "Coin01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
removeMovieClip();
}
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y + speed;
_x = _x + slide;
if (hitTest(_root.Nave)) {
_root.Nave.damage(2);
removeMovieClip();
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 144 MovieClip [__Packages.EBala01] Frame 0
class EBala01 extends MovieClip
{
var dir, _y, tarY, _x, tarX, removeMovieClip, hitTest;
function EBala01 () {
super();
}
function onLoad() {
dir = (Math.atan2(tarY - _y, tarX - _x) * 180) / Math.PI;
}
function onEnterFrame() {
if (_root.Nave.CoinShower > 0) {
var _local3 = _root.CapaJuego.attachMovie("Coin01", "Coin01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
removeMovieClip();
}
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_x = _x + (Math.cos((dir * Math.PI) / 180) * 7);
_y = _y + (Math.sin((dir * Math.PI) / 180) * 7);
if (hitTest(_root.Nave)) {
_root.Nave.damage(2);
removeMovieClip();
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 145 MovieClip [__Packages.Enemy02] Frame 0
class Enemy02 extends MovieClip
{
var speed, killed, cadencia, HP, score, _y, hitTest, _x, removeMovieClip;
function Enemy02 () {
super();
}
function onLoad() {
speed = 0;
killed = 0;
cadencia = 10;
HP = 7;
score = 15;
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + speed;
if (hitTest(_root.Nave.HitArea)) {
_root.Nave.damage(HP);
explode();
}
cadencia = cadencia - 1;
if ((cadencia <= 0) && (_root.Nave.alive == true)) {
var _local3 = _root.CapaJuego.attachMovie("EBala01", "EBala01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
cadencia = _root.cadencia;
_local3.tarX = _root.Nave._x;
_local3.tarY = _root.Nave._y;
cadencia = 40;
}
}
}
function explode() {
var _local3 = _root.attachMovie("Boom01", "Boom01" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.EG.VIVOS = _root.EG.VIVOS - 1;
removeMovieClip();
}
function damage(dam) {
HP = HP - dam;
if (HP <= 0) {
_root.score = _root.score + score;
if ((random(100) + 1) >= 60) {
_root.drop(_x, _y);
}
_root.Nave.update();
explode();
}
}
}
Symbol 146 MovieClip [__Packages.Boom01] Frame 0
class Boom01 extends MovieClip
{
var _totalframes, _currentframe, removeMovieClip;
function Boom01 () {
super();
}
function onEnterFrame() {
if (_currentframe == _totalframes) {
removeMovieClip();
}
}
}
Symbol 147 MovieClip [__Packages.Coin02] Frame 0
class Coin02 extends MovieClip
{
var removeMovieClip, _y, hitTest;
function Coin02 () {
super();
}
function onEnterFrame() {
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y + 3;
if (hitTest(_root.Nave.HitArea)) {
_root.GoldG(10);
removeMovieClip();
_root.PlaySound(1);
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 148 MovieClip [__Packages.Coin01] Frame 0
class Coin01 extends MovieClip
{
var _y, removeMovieClip, hitTest;
function Coin01 () {
super();
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + 3;
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (hitTest(_root.Nave.HitArea)) {
_root.GoldG(1);
removeMovieClip();
_root.PlaySound(1);
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 149 MovieClip [__Packages.Bombies] Frame 0
class Bombies extends MovieClip
{
var removeMovieClip, _y, gotoAndStop, style, hitTest;
function Bombies () {
super();
}
function onEnterFrame() {
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y + 3;
gotoAndStop(style + 1);
if (hitTest(_root.Nave.HitArea)) {
_root.Nave.PlusBomb(style);
removeMovieClip();
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 150 MovieClip [__Packages.Enemy03] Frame 0
class Enemy03 extends MovieClip
{
var speed, killed, HP, score, _y, hitTest, _x, removeMovieClip;
function Enemy03 () {
super();
}
function onLoad() {
speed = 5;
killed = 0;
HP = 3;
score = 5;
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + speed;
if (hitTest(_root.Nave.HitArea)) {
_root.Nave.damage(HP);
explode();
}
}
if (_y > 610) {
explode();
}
}
function explode() {
var _local3 = _root.attachMovie("Boom01", "Boom01" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.EG.VIVOS = _root.EG.VIVOS - 1;
removeMovieClip();
}
function damage(dam) {
HP = HP - dam;
if (HP <= 0) {
_root.score = _root.score + score;
if ((random(100) + 1) >= 90) {
_root.drop(_x, _y);
}
_root.Nave.update();
explode();
}
}
}
Symbol 151 MovieClip [__Packages.Escena01] Frame 0
class Escena01 extends MovieClip
{
var FRAMES;
function Escena01 () {
super();
}
function onLoad() {
FRAMES = 0;
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
FRAMES = FRAMES + 1;
}
if (FRAMES == 90) {
_root.EG.EnemyWave01(0);
}
if (FRAMES == 120) {
_root.EG.EnemyWave02(0);
}
if (FRAMES == 210) {
_root.EG.EnemyWave03(0);
}
if (FRAMES == 360) {
_root.EG.EnemyWave04(0);
_root.EG.EnemyWave1(0);
}
if (FRAMES == 450) {
_root.EG.EnemyWave01(0);
}
if (FRAMES == 480) {
_root.EG.EnemyWave04(0);
}
if (FRAMES == 520) {
_root.EG.EnemyWave02(0);
}
if (FRAMES == 550) {
_root.EG.EnemyWave05(0);
}
if (FRAMES == 600) {
_root.EG.EnemyWave01(0);
_root.EG.EnemyWave02(0);
}
if (FRAMES == 750) {
_root.EG.EnemyWave06(0);
_root.EG.EnemyWave03(0);
}
if (FRAMES == 900) {
_root.EG.EnemyWave01(0);
_root.EG.EnemyWave02(0);
}
if (FRAMES == 910) {
_root.EG.EnemyWave06(0);
_root.EG.EnemyWave04(0);
}
if (FRAMES == 920) {
_root.EG.EnemyWave05(0);
_root.EG.EnemyWave01(0);
}
if (FRAMES == 1000) {
_root.EG.EnemyWave01(0);
_root.EG.EnemyWave04(0);
}
if ((FRAMES >= 1100) && (_root.EG.VIVOS == 0)) {
_root.Win._visible = true;
}
}
}
Symbol 152 MovieClip [__Packages.Nave] Frame 0
class Nave extends MovieClip
{
var speed, mov_x, mov_y, wait, cadencia, _x, _y, CoinShower, maxHP, curHP, maxSH, curSH, regHP, regSH, bombs, alive, pausa, pausaW, _visible, gotoAndStop, Dwait;
function Nave () {
super();
}
function onLoad() {
speed = _root.speed;
mov_x = 0;
mov_y = 0;
wait = 0;
cadencia = 0;
_x = 200;
_y = 550;
CoinShower = 0;
maxHP = _root.naveHP;
curHP = maxHP;
maxSH = _root.naveSH;
curSH = maxSH;
regHP = 100;
regSH = 100;
bombs = [];
alive = true;
pausa = false;
pausaW = 0;
_visible = true;
_root.Paused._visible = false;
_root.Again._visible = false;
_root.Win._visible = false;
gotoAndStop(3);
update();
Dwait = 0;
}
function update() {
_root.update();
}
function onEnterFrame() {
pausaW = pausaW - 1;
CoinShower = CoinShower - 1;
if ((Key.isDown(80) && (pausaW <= 0)) && (alive == true)) {
if (pausa == false) {
pausa = true;
_root.Paused._visible = true;
_root.MenuPW._visible = true;
} else {
pausa = false;
_root.Paused._visible = false;
_root.MenuPW._visible = false;
}
pausaW = 10;
}
if (pausa == false) {
if (alive == true) {
if (Key.isDown(39) || (Key.isDown(68))) {
mov_x = mov_x + speed;
}
if (Key.isDown(37) || (Key.isDown(65))) {
mov_x = mov_x + (-speed);
}
if (Key.isDown(38) || (Key.isDown(87))) {
mov_y = mov_y + (-speed);
}
if (Key.isDown(40) || (Key.isDown(83))) {
mov_y = mov_y + speed;
}
_x = _x + mov_x;
_y = _y + mov_y;
mov_x = mov_x * 0.85;
mov_y = mov_y * 0.85;
if (mov_x > 15) {
mov_x = 15;
}
if (mov_y > 15) {
mov_y = 15;
}
if (mov_x > 3) {
gotoAndStop(2);
}
if (mov_x < -3) {
gotoAndStop(4);
}
if (mov_x > 6) {
gotoAndStop(1);
}
if (mov_x < -6) {
gotoAndStop(5);
}
if ((mov_x > -3) && (mov_x < 3)) {
gotoAndStop(3);
}
if ((mov_y >= -0.3) && (mov_y <= 0.3)) {
mov_y = 0;
}
if ((mov_x >= -0.3) && (mov_x <= 0.3)) {
mov_x = 0;
}
if (_x < 15) {
_x = 15;
}
if (_x > 385) {
_x = 385;
}
if (_y < 13) {
_y = 13;
}
if (_y > 583) {
_y = 583;
}
cadencia = cadencia - 1;
if (Key.isDown(32) && (cadencia <= 0)) {
cadencia = _root.cadencia;
_root.PlaySound(3);
if (_root.BType == 1) {
if (_root.BLevel == 1) {
B01(0, 0);
}
if (_root.BLevel == 2) {
B02(0, 0);
}
if (_root.BLevel == 3) {
B01(0.5, 0);
B01(-0.5, 0);
}
if (_root.BLevel == 4) {
B02(0.5, 0);
B02(-0.5, 0);
}
if (_root.BLevel == 5) {
B03(0.5, 0);
B03(-0.5, 0);
}
if (_root.BLevel == 6) {
B01(0.5, 3);
B02(0, 0);
B01(-0.5, 3);
}
if (_root.BLevel == 7) {
B01(0.5, 3);
B03(0, 0);
B01(-0.5, 3);
}
if (_root.BLevel == 8) {
B02(0.5, 3);
B02(0, 0);
B02(-0.5, 3);
}
if (_root.BLevel == 9) {
B02(0.5, 3);
B03(0, 0);
B02(-0.5, 3);
}
if (_root.BLevel == 10) {
B03(0.5, 3);
B03(0, 0);
B03(-0.5, 3);
}
}
}
if (curHP < maxHP) {
regHP = regHP - _root.regHP;
}
if (regHP <= 0) {
curHP = curHP + 1;
regHP = 100;
_root.update();
}
if (curSH < maxSH) {
regSH = regSH - _root.regSH;
}
if (regSH <= 0) {
curSH = curSH + 1;
regSH = 100;
_root.update();
}
Dwait = Dwait - 1;
if (Key.isDown(16) && (Dwait <= 0)) {
UseBomb();
Dwait = 10;
}
if (Key.isDown(17)) {
trace(_root.EG.VIVOS);
}
}
}
}
function Gold(Get) {
_root.Gold = _root.Gold + Math.round(Get * _root.BGold);
update();
trace(_root.Gold);
}
function damage(dam) {
dam = Math.round(dam);
if (dam >= curSH) {
dam = dam - curSH;
curSH = 0;
curHP = curHP - dam;
} else {
curSH = curSH - dam;
_root.Nave.escudo.play();
}
if (curHP <= 0) {
curHP = 0;
_x = -50;
_visible = false;
alive = false;
_root.Again._visible = true;
}
update();
_root.prepare();
}
function B01(slide, offset) {
var _local3 = _root.CapaJuego.attachMovie("Bala01", "Bala01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y - (15 - offset);
_local3.slide = slide;
}
function B02(slide, offset) {
var _local3 = _root.CapaJuego.attachMovie("Bala02", "Bala02" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y - (15 - offset);
_local3.slide = slide;
}
function B03(slide, offset) {
var _local3 = _root.CapaJuego.attachMovie("Bala03", "Bala03" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y - (15 - offset);
_local3.slide = slide;
}
function PlusBomb(style) {
if (bombs.length < 5) {
bombs[bombs.length] = style;
_root.Nave.gotBomb.play();
} else {
_root.score = _root.score + 50;
}
update();
}
function UseBomb() {
if (bombs.length > 0) {
if (bombs[bombs.length - 1] == 1) {
Bomba1();
}
if (bombs[bombs.length - 1] == 2) {
Bomba2();
}
bombs.pop();
update();
}
}
function updateBombs() {
if (bombs[0] != undefined) {
_root.CPanel.B1.gotoAndStop(bombs[0]);
} else {
_root.CPanel.B1.gotoAndStop(3);
}
if (bombs[1] != undefined) {
_root.CPanel.B2.gotoAndStop(bombs[1]);
} else {
_root.CPanel.B2.gotoAndStop(3);
}
if (bombs[2] != undefined) {
_root.CPanel.B3.gotoAndStop(bombs[2]);
} else {
_root.CPanel.B3.gotoAndStop(3);
}
if (bombs[3] != undefined) {
_root.CPanel.B4.gotoAndStop(bombs[3]);
} else {
_root.CPanel.B4.gotoAndStop(3);
}
if (bombs[4] != undefined) {
_root.CPanel.B5.gotoAndStop(bombs[4]);
} else {
_root.CPanel.B5.gotoAndStop(3);
}
}
function Bomba1() {
_root.Flash.play();
_root.PlaySound(2);
for (var _local2 in _root.EG.enemies) {
_root.EG.enemies[_local2].damage(50);
}
}
function Bomba2() {
_root.Flash.play();
_root.PlaySound(2);
CoinShower = 5;
}
}
Symbol 153 MovieClip [__Packages.EG] Frame 0
class EG extends MovieClip
{
var enemies, VIVOS;
function EG () {
super();
}
function onLoad() {
enemies = [];
VIVOS = 0;
}
function onEnterFrame() {
if (VIVOS == 0) {
enemies = [];
}
}
function Ene01(numX, numY) {
var _local3 = _root.CapaJuego.attachMovie("Enemy01", "Enemy01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = numX;
_local3._y = numY;
enemies.push(_local3);
VIVOS = VIVOS + 1;
}
function Ene02(numX, numY) {
var _local3 = _root.CapaJuego.attachMovie("Enemy02", "Enemy02" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = numX;
_local3._y = numY;
enemies.push(_local3);
VIVOS = VIVOS + 1;
}
function Ene03(numX, numY) {
var _local3 = _root.CapaJuego.attachMovie("Enemy03", "Enemy03" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = numX;
_local3._y = numY;
enemies.push(_local3);
VIVOS = VIVOS + 1;
}
function EnemyWave01(num) {
Ene03(120, -45);
Ene03(160, -30);
Ene03(200, -15);
Ene03(240, -30);
Ene03(280, -45);
}
function EnemyWave02(num) {
Ene01(50, -15);
Ene01(350, -15);
}
function EnemyWave03(num) {
Ene02(150, 50);
Ene02(200, 50);
Ene02(250, 50);
}
function EnemyWave04(num) {
Ene01(120, -45);
Ene01(160, -30);
Ene01(200, -15);
Ene01(240, -30);
Ene01(280, -45);
}
function EnemyWave05(num) {
Ene02(100, 90);
Ene02(200, 120);
Ene02(300, 90);
}
function EnemyWave06(num) {
Ene03(120, -15);
Ene03(200, -30);
Ene03(280, -15);
}
}
Symbol 154 MovieClip [__Packages.Bala01] Frame 0
class Bala01 extends MovieClip
{
var speed, removeMovieClip, _y, _x, slide, hitTest;
function Bala01 () {
super();
}
function onLoad() {
speed = 10 * _root.BSpeed;
}
function onEnterFrame() {
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y - speed;
_x = _x + slide;
if (_y < -10) {
removeMovieClip();
}
for (var _local3 in _root.EG.enemies) {
if (hitTest(_root.EG.enemies[_local3].HitArea)) {
removeMovieClip();
_root.EG.enemies[_local3].damage(_root.damage);
}
}
}
}
}
Symbol 126 Button
on (release) {
stopAllSounds();
play();
}
Symbol 130 MovieClip Frame 1
stop();
Symbol 133 Button
on (release) {
for (var i in _root.EG.enemies) {
_root.EG.enemies[i].explode();
}
MenuPW._visible = true;
stopAllSounds();
gotoAndPlay (2);
}
Symbol 138 Button
on (release) {
for (var i in _root.EG.enemies) {
_root.EG.enemies[i].explode();
}
MenuPW._visible = true;
stopAllSounds();
gotoAndPlay (2);
}