Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 21 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
# (reemplazar nombre de juego acá)
# (Pokewollok)

UTN - Facultad Regional Buenos Aires - Materia Paradigmas de Programación

## Equipo de desarrollo:

- completar...
- completar...
- Nazareno Gago
- Mateo Castro
- Junior Rodriguez


## Capturas

![pepita](assets/golondrina.png)

![captura1](https://github.com/pdepjm/2024-o-tpjuego-laalmironeta/blob/main/assets/capturaFinal.png "Logo Title Text 1")
![captura2](https://github.com/pdepjm/2024-o-tpjuego-laalmironeta/blob/main/assets/capturaPeleaFinal.png "Logo Title Text 1")
## Reglas de Juego / Instrucciones

(completar...)
El juego trata de que tenes que combatir a otros maestros pokemones.
Contamos con un pokemon (Pikachu) el cual se enfrentara a los contrincantes.

## Controles:

- `W` para...
- `e` para combatir con Lucas
- `z` para combatir con Alf
- `y` para combatir con Ivo
- `f` para seleccionar ataque Impactrueno
- `g` para seleccionar ataque Placaje
- `h` para seleccionar ataque Mordisco
- `j` para seleccionar ataque descanso
- flechas para mover al maestro pokemon.

Binary file added assets/Bulbasaur.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/alfredo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ataquesPikachu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ataquesPikachuFinal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/barraAtaquePikachu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/captura1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/captura2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/capturaFinal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/capturaPeleaFinal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/charmander.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/charmander5.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/dialogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/escenario.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/escenario2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/escenario3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/escenario4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/escenario5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/escenarioFinal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/escenarioFinal2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fondoPelea6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/golondrina.png
Binary file not shown.
Binary file added assets/ivan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ivoo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/lucasS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/mapa2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/mapa3.jpg
Binary file added assets/menu.jpg
Binary file added assets/musicaBatalla.mp3
Binary file not shown.
Binary file added assets/pikachu.gif
Binary file added assets/pikachu.png
Binary file added assets/pikachu1.gif
Binary file added assets/pikachu2.gif
Binary file added assets/pikachu4.gif
Binary file added assets/pikachu5.gif
Binary file added assets/protagonista.png
Binary file added assets/puebloNuevo.png
Binary file added assets/sonidoElectrico.mp3
Binary file not shown.
Binary file added assets/sonidoLatigo.mp3
Binary file not shown.
Binary file added assets/sonidoMordido.mp3
Binary file not shown.
Binary file added assets/sonidoPlacaje.mp3
Binary file not shown.
Binary file added assets/sonidoPokebola.mp3
Binary file not shown.
Binary file added assets/squirtle.gif
Binary file added assets/squirtle.png
Binary file added assets/squirtle2.gif
Binary file added assets/squirtle3.gif
29 changes: 29 additions & 0 deletions juego.wlk
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import wollok.game.*
import objetos.*
import modelos.*

object juego {

method iniciar() {
self.hacerConfiguracionInicial()
game.addVisualCharacter(naza)
game.addVisual(alf)
game.addVisual(lucas)
game.addVisual(ivo)
naza.dialogos()
naza.pelearConAlf()
naza.pelearConLucas()
naza.pelearConIvo()
}

method hacerConfiguracionInicial() {
game.title("PokeWollok")
game.width(15)
game.height(11)
game.boardGround("mapa3.jpg")
}


}


15 changes: 4 additions & 11 deletions main.wpgm
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import wollok.game.*

import pepita.*
import juego.*
import objetos.*

program PepitaGame {
game.title("Pepita")
game.height(10)
game.width(10)
game.cellSize(100)

game.addVisual(pepita)

keyboard.w().onPressDo({ pepita.fly(1) })

juego.iniciar()
game.start()

}
281 changes: 281 additions & 0 deletions modelos.wlk
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
import juego.*

class Pokemon {
const property tipoPokemon
var property hp
const property ataques
const property imagenPokemon
var property position

method image() = imagenPokemon

method text() = "La vida es de " + hp

method ataqueRandom() = ataques.anyOne()

method esDebil(tipo) = tipoPokemon.esDebilA(tipo)

method perdio() = self.hp() <= 0


}


object fuego {
method esDebilA(tipo) = tipo == agua

}
object agua {
method esDebilA(tipo) = tipo == planta or tipo == electrico
}

object planta {
method esDebilA(tipo) = tipo == fuego

}

object electrico {

method esDebilA(tipo) = false

}

object normal{

method esDebilA(tipo) = false
}

object siniestro {
method esDebilA(tipo) = false

}


class Ataque {
var property tipoAtaque
var property poderAtaque
var property sonidoAtaque

method play() {
game.sound(sonidoAtaque).play()
}

method saberMulti(poke) = if(poke.esDebil(tipoAtaque)) 2 else 1



method danioReal(poke) = poderAtaque * self.saberMulti(poke)


}

class Entrenador {
const property pokemonEntrenador
const property imagenEntrenador
var property position
method image() = imagenEntrenador

}

class Protagonista inherits Entrenador {


method mover() {
position = game.at(11,1)
}

method dialogos(){
game.onCollideDo(alf,{elemento => self.consultarAlf()})
game.onCollideDo(lucas,{elemento => self.consultarLucas()})
game.onCollideDo(ivo,{elemento => self.consultarIvo()})
}

method pelearConAlf() {
game.onCollideDo(alf, {elemento => batalla.inicializarPeleaAlf()})
}



method pelearConLucas() {
game.onCollideDo(lucas, {elemento => batalla.inicializarPeleaLucas()})
}

method pelearConIvo() {
game.onCollideDo(ivo, {elemento => batalla.inicializarPeleaIvo()})
}



method consultarAlf() {
game.say(alf,"Si me queres enfrentar, preparate para conocer la muerte apretando la Z")
}
method consultarLucas() {
game.say(lucas,"Es hora de darte catedra de esto, toca la E si te animas")
}

method consultarIvo() {
game.say(ivo,"Hoy soy el ayudante de la muerte, toca Y")
}


}


object fondoPelea {
var property position = game.origin()
method image() = "escenarioFinal2.jpg"
}
object barraMenu {
var property position = game.at(1,1)
method image() = "barraAtaquePikachu.png"
}

object pokebola {
method play() {
game.sound("sonidoPokebola.mp3").play()
}




}
object batalla {
var nosotros = naza
var rival = alf
var property pokemon1 = pikachu
var property pokemon2 = rival.pokemonEntrenador()
var property turnoAtacante = true
var property sonido = game.sound("musicaBatalla.mp3")


method inicializarPeleaLucas() { if(!self.batallaFinalizada())
keyboard.e().onPressDo({ self.setearLucas() self.pelear()})
}
method inicializarPeleaAlf() { if(!self.batallaFinalizada())
keyboard.z().onPressDo({ self.setearAlf() self.pelear()})
}
method inicializarPeleaIvo() { if(!self.batallaFinalizada())
keyboard.y().onPressDo({ self.setearIvo() self.pelear()})
}



method setearLucas(){
rival = lucas
nosotros = naza
pokemon1 = naza.pokemonEntrenador()
pokemon2 = charmander

}

method setearAlf(){
rival = alf
nosotros = naza
pokemon1 = naza.pokemonEntrenador()
pokemon2 = squirtle
}

method setearIvo(){
rival = ivo
nosotros = naza
pokemon1 = naza.pokemonEntrenador()
pokemon2 = bulbasaur
}



method pelear() {
if(!self.batallaFinalizada())
game.addVisual(fondoPelea)
game.addVisual(pokemon2)
game.addVisual(pokemon1)
game.addVisual(barraMenu)
self.elegirAtaque()
pokebola.play()
sonido.play()
sonido.shouldLoop(true)
}




method quitarPelea() {
game.removeVisual(fondoPelea)
game.removeVisual(pokemon2)
game.removeVisual(pokemon1)
game.removeVisual(barraMenu)
sonido.stop()
naza.mover()
game.removeVisual(rival)
pokemon1.hp(320)
pokemon2.hp(320)

}

method ataca1(ataque) { if(self.turnoAtacante()) pokemon2.hp(pokemon2.hp() - ataque.danioReal(pokemon2)) ataque.play()

}




method ataca2() {
if(!self.turnoAtacante()) pokemon1.hp(pokemon1.hp() - (pokemon2.ataqueRandom()).poderAtaque()) (pokemon2.ataqueRandom()).play()
}



method alternarTurno(){
if(turnoAtacante) turnoAtacante = false else turnoAtacante = true
}



method elegirAtaque() {
keyboard.f().onPressDo({self.ataca1(impactrueno)
self.alternarTurno()
self.ataca2()
self.alternarTurno()
if(self.batallaFinalizada()) self.quitarPelea()})
keyboard.g().onPressDo({self.ataca1(placaje)
placaje.play()
self.alternarTurno()
self.ataca2()
self.alternarTurno()
if (self.batallaFinalizada()) self.quitarPelea()})
keyboard.h().onPressDo({self.ataca1(mordisco)
mordisco.play()
self.alternarTurno()
self.ataca2()
self.alternarTurno()
if (self.batallaFinalizada()) self.quitarPelea()})
keyboard.j().onPressDo({self.ataca1(descanso)
descanso.play()
self.alternarTurno()
self.ataca2()
self.alternarTurno()
if (self.batallaFinalizada()) self.quitarPelea()})
}



method batallaFinalizada() = pokemon1.perdio() or pokemon2.perdio()
}

const pikachu = new Pokemon(tipoPokemon = electrico,hp = 320,ataques = [impactrueno,placaje,mordisco,descanso],imagenPokemon = "pikachu5.gif", position = game.at(2,2))
const bulbasaur = new Pokemon(tipoPokemon = planta,hp = 320,ataques = [latigoCepa,placaje,mordisco,descanso],imagenPokemon = "Bulbasaur.gif", position = game.at(11,5))
const charmander = new Pokemon(tipoPokemon = fuego,hp = 320,ataques = [lanzaLLamas,placaje,mordisco,descanso],imagenPokemon = "charmander5.gif",position = game.at(11, 5))
const squirtle = new Pokemon(tipoPokemon = agua ,hp = 320,ataques = [pistolaDeAgua,placaje,mordisco,descanso],imagenPokemon = "squirtle.gif",position = game.at(11, 5))

const impactrueno = new Ataque(tipoAtaque = electrico,poderAtaque = 15,sonidoAtaque = "sonidoElectrico.mp3")
const placaje = new Ataque(tipoAtaque = "normal",poderAtaque = 10, sonidoAtaque = "sonidoPlacaje.mp3")
const mordisco = new Ataque(tipoAtaque = "siniestro",poderAtaque = 12,sonidoAtaque = "sonidoMordido.mp3")
const descanso = new Ataque(tipoAtaque = "normal",poderAtaque = 1, sonidoAtaque ="")
const latigoCepa = new Ataque(tipoAtaque = planta,poderAtaque = 15, sonidoAtaque = "sonidoLatigo.mp3")
const lanzaLLamas = new Ataque(tipoAtaque = fuego,poderAtaque = 15, sonidoAtaque ="")
const pistolaDeAgua = new Ataque(tipoAtaque = agua,poderAtaque = 15, sonidoAtaque ="")

const naza = new Protagonista(pokemonEntrenador = pikachu, imagenEntrenador= "protagonista.png", position = game.at(11,1))
const alf = new Entrenador(pokemonEntrenador = squirtle, imagenEntrenador= "alfredo.png", position = game.at(8, 7))
const lucas = new Entrenador(pokemonEntrenador = charmander, imagenEntrenador = "lucasS.png", position= game.at(13, 7))
const ivo = new Entrenador(pokemonEntrenador = bulbasaur, imagenEntrenador = "ivan.png", position = game.at(3,3))
Loading