-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
201 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,161 @@ | ||
class Papa{ //nota de nico: es una nuez >:( | ||
const position | ||
|
||
const property tipo = "papa" | ||
var property vida=300 | ||
method position() = position | ||
var property imagen = "magoPiedra.png" | ||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
method queSoy()="planta" | ||
|
||
// No realiza ninguna accion, es un "escudo" asi que deberia tener mucha vida | ||
} | ||
|
||
class Guisante{ | ||
const position | ||
const property tipo = "guisante" | ||
var property vida=100 | ||
method position() = position | ||
var property imagen = "magoFuego.png" | ||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
method queSoy()="planta" | ||
|
||
// Dispara proyectiles normales | ||
class Papa { | ||
//nota de nico: es una nuez >:( | ||
const position | ||
const property tipo = "papa" | ||
var property vida = 300 | ||
var property imagen = "magoPiedra.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
|
||
method queSoy() = "planta" | ||
} | ||
|
||
class Patapum{ | ||
const position | ||
const property tipo = "patapum" | ||
var property vida=1 | ||
method position() = position | ||
var property imagen = "magoEnojado.png" //hacer mago musulman | ||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
method queSoy()="planta" | ||
|
||
// Cuando colisiona deberia explotar y matar a los zombies que esten colisionando con el | ||
|
||
class Guisante { | ||
const position | ||
const property tipo = "guisante" | ||
var property vida = 100 | ||
var property imagen = "magoFuego.png" | ||
|
||
method position() = position | ||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
|
||
method queSoy() = "planta" | ||
} | ||
|
||
class Cactus{ | ||
const position | ||
const property tipo = "cactus" | ||
var property vida=100 | ||
method position() = position | ||
var property imagen = "magoHielo.png" | ||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
method queSoy()="planta" | ||
|
||
//Dispara proyectiles perforantes (no hacer la mecanica del cactus que sube y baja) | ||
class Patapum { | ||
const position | ||
const property tipo = "patapum" | ||
var property vida = 1 | ||
var property imagen = "magoEnojado.png" //hacer mago musulman | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
|
||
method queSoy() = "planta" | ||
} | ||
|
||
class Girasol{ | ||
const position | ||
const property tipo = "girasol" | ||
var property vida=100 | ||
method position() = position | ||
var property imagen = "magoHealer.png" | ||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
method queSoy()="planta" | ||
class Cactus { | ||
const position | ||
const property tipo = "cactus" | ||
var property vida = 100 | ||
var property imagen = "magoHielo.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
|
||
method queSoy() = "planta" | ||
} | ||
|
||
//Aumenta la generacion de soles x segundo | ||
class Girasol { | ||
const position | ||
const property tipo = "girasol" | ||
var property vida = 100 | ||
var property imagen = "magoHealer.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
|
||
method queSoy() = "planta" | ||
} | ||
|
||
class ZapalloEnojado{ | ||
const position | ||
const property tipo = "zapallo enojado" | ||
var property vida=1 | ||
method position() = position | ||
var property imagen = "magoEnojado.png" | ||
method image() = imagen | ||
class ZapalloEnojado { | ||
const position | ||
const property tipo = "zapallo enojado" | ||
var property vida = 1 | ||
var property imagen = "magoEnojado.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
|
||
method queSoy() = "planta" | ||
} | ||
|
||
method recibeDanio(danio) { | ||
self.vida(self.vida() - danio) | ||
} | ||
method queSoy()="planta" | ||
object papaTienda { | ||
const position = game.at(0, 5) | ||
var property imagen = "magoPiedra.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method generarPlanta(posicionPlanta) = new Papa(position = posicionPlanta) | ||
} | ||
|
||
//OH NO ES EL LANZACOHETES DAVE! HAGAN ALGO CON ESE SUJETO!!! Tranquilos... yo me encargo. Soy el Zapallo Enojado >:) | ||
object guisanteTienda { | ||
const position = game.at(1, 5) | ||
var property imagen = "magoFuego.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method generarPlanta(posicionPlanta) = new Guisante(position = posicionPlanta) | ||
} | ||
|
||
object papaTienda { | ||
const position = game.at(0,5) | ||
method position() = position | ||
var property imagen = "magoPiedra.png" | ||
method image() = imagen | ||
object girasolTienda { | ||
const position = game.at(2, 5) | ||
var property imagen = "magoHealer.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method generarPlanta(posicionPlanta) = new Girasol(position = posicionPlanta) | ||
} | ||
|
||
method generarPlanta(posicionPlanta){ | ||
return (new Papa(position = posicionPlanta)) | ||
} | ||
object cactusTienda { | ||
const position = game.at(3, 5) | ||
var property imagen = "magoHielo.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method generarPlanta(posicionPlanta) = new Cactus(position = posicionPlanta) | ||
} | ||
|
||
object zapalloEnojadoTienda { | ||
const position = game.at(4, 5) | ||
var property imagen = "magoEnojado.png" | ||
|
||
method position() = position | ||
|
||
method image() = imagen | ||
|
||
method generarPlanta(posicionPlanta) = new ZapalloEnojado( | ||
position = posicionPlanta | ||
) | ||
} | ||
|
||
const pepe = new Guisante (position=game.at(0,0)) | ||
const pepe = new Guisante(position = game.at(0, 0)) |