-
Notifications
You must be signed in to change notification settings - Fork 0
/
objetos.wlk
137 lines (97 loc) · 2.31 KB
/
objetos.wlk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import wollok.game.*
import juego.*
/*object entrenador {
var property position = game.center()
method position() = position
method image() = "entrenador2.png"
const pokemon = pokemonNuestro
method iniciarPelea() {
game.onCollideDo(alf,{elemento => self.consultarPelea()})
game.onCollideDo(lucas,{elemento => self.consultarPelea()})
}
method consultarPelea() {
keyboard.e().onPressDo({juego.pelea()})
keyboard.q().onPressDo({juego.quitarPelea()})
game.say(alf,"Si queres pelear conmigo apreta la E")
}
}
*/
/*
object pokemonNuestro {
var property nombre = "Pikachu"
const tipo = "electrico"
var property vida = 100
const poderes = [impactrueno,placaje,mordisco,descanso]
method image() = "pikachu.png"
var property position = game.at(2, 10)
method recibirDanio(poder){
vida = 0.max(vida - poder.danioBase())
}
method atacarAOtroPokemon(poder,contrincante) {
if(contrincante.tipo() == "Electrico") contrincante.recibirDanio(poder) else contrincante
}
}
*/
// Poderes:
/*
object impactrueno {
const tipoAtaque = "electrico"
var property danioBase = 35
}
object mordisco {
const tipoAtaque = "Siniestro"
const danioBase = 15
}
object descanso {
const tipoAtaque = "normal"
const danioBase = 0
}
object lanzallamas {
const tipoAtaque = "fuego"
const danioBase = 35
}
object pistolaDeAgua {
const tipoAtaque = "agua"
const danioBase = 35
}
object placaje {
const tipoAtaque = "normal"
const danioBase = 20
}
object latigoCepa {
const tipoAtaque = "planta"
const danioBase = 35
}
*/
/*object alf {
const pokemon = pokemonAlf
method image() = "alf2.png"
var property position = game.at(4, 23)
}
object pokemonAlf {
var nombre = "wartortle"
const tipo = "agua"
var vida = 100
var poderes =[pistolaDeAgua,placaje,mordisco,descanso]
method image() = "squirtle.png"
var property position = game.at(23, 16)
}
object lucas {
const pokemon = pokemonLucas
}
object pokemonLucas {
var nombre = "charmeleon"
const tipo = "fuego"
var vida = 100
var poderes =[lanzallamas,mordisco,placaje,descanso]
}
object fede {
const pokemon = pokemonFede
}
object pokemonFede {
var nombre = "treecko"
const tipo = "planta"
var vida = 100
var poderes =[latigoCepa,placaje,mordisco,descanso]
}
*/