diff --git a/assets/261.jpg b/assets/261.jpg new file mode 100644 index 0000000..9098816 Binary files /dev/null and b/assets/261.jpg differ diff --git a/entorno.wlk b/entorno.wlk index 2b13e0b..37e55c7 100644 --- a/entorno.wlk +++ b/entorno.wlk @@ -71,7 +71,7 @@ class Cinematica inherits Visual { } } -const derrota = new Visual (position = game.origin(), image = "celda_gris.png") +const derrota = new Visual (position = game.origin(), image = "261.jpg") const cartelAtaque = new Visual (position = new Position(x=17, y=20), image = "proto_cartel_ataque.png") @@ -100,13 +100,16 @@ class BossFight { } method habilitarAtaque() { - morcilla.posicionDeAtaque() - game.addVisual(cartelAtaque) - turnoMorcilla = true + if(!morcilla.derrotado()) + { + morcilla.posicionDeAtaque() + game.addVisual(cartelAtaque) + turnoMorcilla = true + } } method gestionarAtaque() { - if(jefeEnBatalla && turnoMorcilla){ + if(jefeEnBatalla && turnoMorcilla && !morcilla.derrotado()){ turnoMorcilla = false game.removeVisual(cartelAtaque) diff --git a/morcilla.wlk b/morcilla.wlk index 8a3bc5d..71c8f4c 100644 --- a/morcilla.wlk +++ b/morcilla.wlk @@ -5,7 +5,7 @@ import jefe.* object morcilla { var property position = new PositionMejorada(x=15, y=2) - method image() = "morcilla256.png" + var property image = "morcilla256.png" // ================================== MOVIMIENTO ================================== var saltando = false @@ -72,7 +72,7 @@ object morcilla { // ================================== BATALLA ================================== - var property vidas = 5 + var property vidas = 3 var inmunidadActiva = false var property puedeAtacar = false var derrotado = false @@ -112,7 +112,8 @@ object morcilla { method derrota() { derrotado = true - game.addVisual(derrota) + image = "261.jpg" + self.desactivarMovimiento() } method derrotado() = derrotado