forked from Poojawa/Citadel-Station-13-5th-Port
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpokemon.dm
388 lines (342 loc) · 10.7 KB
/
pokemon.dm
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
//Sprites are trademarks of Gamefreak, Nintendo, The Pokemon Company, and Spike Chunsoft.
#define ispokemon(A) (istype(A, /mob/living/simple_animal/pokemon))
//POKEBALL
/obj/item/pokeball
name = "pokeball"
icon = 'icons/obj/pokeball.dmi'
icon_state = "pokeball"
force = 0
throwforce = 0
var/success_chance = 25
var/pokemon
/obj/item/pokeball/great
name = "great ball"
icon_state = "pokeball_great"
success_chance = 50
/obj/item/pokeball/ultra
icon_state = "pokeball_ultra"
name = "ultra ball"
success_chance = 75
/obj/item/pokeball/master
icon_state = "pokeball_master"
name = "master ball"
success_chance = 100
/* //WIP
/obj/item/pokeball/throw_impact(atom/hit_atom)
if(ispokemon(hit_atom))
var/mob/living/simple_animal/pokemon/pmon = hit_atom
var/initial_success_chance = success_chance
pmon.resize = 0.1
pmon.color = "RED"
pmon.canmove = 0
sleep(15)
if(pmon.pokeball == src)
pmon.loc = src
pokemon = pmon
return 1
if(pmon.pokeball && pmon.pokeball !=src)
return ..()
var/bonus_chance = ((pmon.maxHealth - pmon.health) / 2)
if(bonus_chance > 100)
bonus_chance = 100
success_chance = (success_chance + bonus_chance)
if(success_chance > 100)
success_chance = 100
if(success_chance < 0)//just in case
success_chance = 0
sleep(15)
if(prob(success_chance))
visible_message("<span class='warning'>[src] shakes...</span>")
else
escape()
sleep(15)
if(prob(success_chance))
visible_message("<span class='warning'>[src] shakes...</span>")
else
escape()
sleep(15)
if(prob(success_chance))
visible_message("<span class='warning'>[src] shakes...</span>")
else
escape()
else
..()
/obj/item/pokeball/proc/capture(mob/living/simple_animal/pokemon/pmon, mob/living/user)
/obj/item/pokeball/proc/escape(mob/living/simple_animal/pokemon/pmon, mob/living/user)
if(!pokemon)
return
pmon.resize = 10
pmon.color = null
pmon.canmove = 1
pmon.loc = src.loc
if(pmon.pokeball != src)
visible_message("<span class='warning'>[pmon] breaks free from [src]</span>")
PoolOrNew(/obj/effect/particle_effect/sparks, loc)
playsound(src.loc, "sparks", 50, 1)
qdel(src)
else
/obj/item/pokeball/proc/recall
/obj/item/pokeball/proc/release
*/
/mob/living/simple_animal/pokemon
name = "eevee"
icon_state = "eevee"
icon_living = "eevee"
icon_dead = "eevee_d"
desc = "Gotta catch 'em all!"
icon = 'icons/mob/pokemon.dmi'
var/pokeball
pixel_x = -16
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 5)
ventcrawler = 2
health = 100
maxHealth = 100
layer = 4
response_help = "pets"
wander = 1
turns_per_move = 2
pass_flags = PASSTABLE | PASSMOB
/mob/living/simple_animal/pokemon/proc/simple_lay_down()
set name = "Rest"
set category = "IC"
resting = !resting
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>"
update_canmove()
update_icon()
/mob/living/simple_animal/pokemon/proc/update_icon()
if(lying || resting || sleeping)
icon_state = "[icon_state]_rest"
else
icon_state = "[icon_living]"
/mob/living/simple_animal/pokemon/New()
..()
verbs += /mob/living/simple_animal/pokemon/proc/simple_lay_down
/*
/////TEMPLATE/////
/mob/living/simple_animal/pokemon/
name = ""
icon_state = ""
icon_living = ""
icon_dead = ""
*/
/mob/living/simple_animal/pokemon/leg
icon = 'icons/mob/legendary.dmi'
pixel_x = -32
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 12)
health = 200
maxHealth = 200
/mob/living/simple_animal/pokemon/leg/articuno
name = "Articuno"
icon_state = "articuno"
icon_living = "articuno"
icon_dead = "articuno_d"
flying = 1
/mob/living/simple_animal/pokemon/leg/rayquaza
name = "Rayquaza"
icon_state = "rayquaza"
icon_living = "rayquaza"
icon_dead = "rayquaza_d"
flying = 1
//ALPHABETICAL PLEASE
/mob/living/simple_animal/pokemon/absol
name = "absol"
icon_state = "absol"
icon_living = "absol"
icon_dead = "absol_d"
speak = list("Absol!", "Ab-Absol!")
/mob/living/simple_animal/pokemon/aggron
name = "aggron"
icon_state = "aggron"
icon_living = "aggron"
icon_dead = "aggron_d"
/mob/living/simple_animal/pokemon/ampharos
name = "ampharos"
icon_state = "ampharos"
icon_living = "ampharos"
icon_dead = "ampharos_d"
/mob/living/simple_animal/pokemon/bulbasaur
name = "bulbasaur"
icon_state = "bulbasaur"
icon_living = "bulbasaur"
icon_dead = "bulbasaur_d"
/mob/living/simple_animal/pokemon/charmander
name = "charmander"
icon_state = "charmander"
icon_living = "charmander"
icon_dead = "charmander_d"
/mob/living/simple_animal/pokemon/ditto
name = "ditto"
icon_state = "ditto"
icon_living = "ditto"
icon_dead = "ditto_d"
/mob/living/simple_animal/pokemon/dratini/dragonair
name = "dragonair"
desc = "A Dragonair stores an enormous amount of energy inside its body. It is said to alter the weather around it by loosing energy from the crystals on its neck and tail."
icon_state = "dragonair"
icon_living = "dragonair"
icon_dead = "dragonair_d"
/mob/living/simple_animal/pokemon/dratini/dragonair/dragonite
name = "dragonite"
desc = "It can circle the globe in just 16 hours. It is a kindhearted Pokémon that leads lost and foundering ships in a storm to the safety of land."
icon_state = "dragonite"
icon_living = "dragonite"
icon_dead = "dragonite_d"
/mob/living/simple_animal/pokemon/dratini
name = "dratini"
desc = "A Dratini continually molts and sloughs off its old skin. It does so because the life energy within its body steadily builds to reach uncontrollable levels."
icon_state = "dratini"
icon_living = "dratini"
icon_dead = "dratini_d"
/mob/living/simple_animal/pokemon/eevee
name = "eevee"
desc = "Eevee has an unstable genetic makeup that suddenly mutates due to its environment. Radiation from various stones causes this Pokémon to evolve."
icon_state = "eevee"
icon_living = "eevee"
icon_dead = "eevee_d"
speak = list("Eevee!", "Ee-Eevee!")
response_help = "pets"
response_harm = "hits"
/mob/living/simple_animal/pokemon/eevee/espeon
name = "espeon"
desc = "Espeon is extremely loyal to any trainer it considers to be worthy. It is said to have developed precognitive powers to protect its trainer from harm."
icon_state = "espeon"
icon_living = "espeon"
icon_dead = "espeon_d"
/mob/living/simple_animal/pokemon/flaaffy
name = "flaaffy"
icon_state = "flaaffy"
icon_living = "flaaffy"
icon_dead = "flaaffy_d"
/mob/living/simple_animal/pokemon/eevee/flareon
name = "flareon"
desc = "Flareon's fluffy fur releases heat into the air so that its body does not get excessively hot. Its body temperature can rise to a maximum of 1,650 degrees F."
icon_state = "flareon"
icon_living = "flareon"
icon_dead = "flareon_d"
speak = list("Flare!", "Flareon!")
/mob/living/simple_animal/pokemon/eevee/glaceon
name = "glaceon"
desc = "By controlling its body heat, it can freeze the atmosphere around it to make a diamond-dust flurry."
icon_state = "glaceon"
icon_living = "glaceon"
icon_dead = "glaceon_d"
speak = list("Glace!", "Glaceon!")
/mob/living/simple_animal/pokemon/eevee/jolteon
name = "jolteon"
desc = "Its cells generate weak power that is amplified by its fur's static electricity to drop thunderbolts. The bristling fur is made of electrically charged needles."
icon_state = "jolteon"
icon_living = "jolteon"
icon_dead = "jolteon_d"
speak = list("Jolt!", "Jolteon!")
var/charge_cooldown_time = 50
var/charge_cooldown = 0
/mob/living/simple_animal/pokemon/eevee/jolteon/attack_hand(mob/user)
..()
if(!stat)
electrocute_mob(user, get_area(src), src, 1)
/mob/living/simple_animal/pokemon/eevee/jolteon/attackby(obj/item/weapon/W, mob/user, params)
electrocute_mob(user, get_area(src), src, W.siemens_coefficient)
if(!stat && istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(charge_cooldown)
user << "<span class='red'>[src] is recharging!</span>"
return
if(C.charge == C.maxcharge)
user << "<span class='red'>[C] is already fully charged!</span>"
return
electrocute_mob(user, get_area(src), src, W.siemens_coefficient)
user << "<span class='green'>You charge [C] using [src].</span>"
C.give(100)
C.updateicon()
charge_cooldown = 1
spawn(charge_cooldown_time)
charge_cooldown = 0
return
..()
/mob/living/simple_animal/pokemon/larvitar
name = "larvitar"
desc = "It is born deep underground. It can't emerge until it has entirely consumed the soil around it."
icon_state = "larvitar"
icon_living = "larvitar"
icon_dead = "larvitar_d"
/mob/living/simple_animal/pokemon/leafeon
name = "leafeon"
icon_state = "leafeon"
icon_living = "leafeon"
icon_dead = "leafeon"
/mob/living/simple_animal/pokemon/mareep
name = "mareep"
icon_state = "mareep"
icon_living = "mareep"
icon_dead = "mareep_d"
/mob/living/simple_animal/pokemon/mew
name = "mew"
icon_state = "mew"
icon_living = "mew"
icon_dead = "mew_d"
/mob/living/simple_animal/pokemon/poochyena/mightyena
name = "mightyena"
icon_state = "mightyena"
icon_living = "mightyena"
icon_dead = "mightyena"
/mob/living/simple_animal/pokemon/miltank
name = "miltank"
icon_state = "miltank"
icon_living = "miltank"
icon_dead = "miltank_d"
var/obj/udder/udder = null
/mob/living/simple_animal/pokemon/miltank/New()
udder = new()
..()
/mob/living/simple_animal/pokemon/miltank/Destroy()
qdel(udder)
udder = null
return ..()
/mob/living/simple_animal/pokemon/miltank/attackby(obj/item/O, mob/user, params)
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
udder.milkAnimal(O, user)
else
..()
/mob/living/simple_animal/pokemon/miltank/Life()
. = ..()
if(stat == CONSCIOUS)
udder.generateMilk()
/mob/living/simple_animal/pokemon/rattata
name = "rattata"
icon_state = "rattata"
icon_living = "rattata"
icon_dead = "rattata_d"
/mob/living/simple_animal/pokemon/poochyena
name = "poochyena"
icon_state = "poochyena"
icon_living = "poochyena"
icon_dead = "poochyena_d"
/mob/living/simple_animal/pokemon/pikachu
name = "pikachu"
icon_state = "pikachu"
icon_living = "pikachu"
icon_dead = "pikachu_d"
/mob/living/simple_animal/pokemon/stunky
name = "stunky"
icon_state = "stunky"
icon_living = "stunky"
icon_dead = "stunky_d"
/mob/living/simple_animal/pokemon/eevee/sylveon
name = "Sylveon"
desc = "Sylveon, the Intertwining Pokémon. Sylveon affectionately wraps its ribbon-like feelers around its Trainer's arm as they walk together."
icon_state = "sylveon"
icon_living = "sylveon"
icon_dead = "sylveon_d"
speak = list("Sylveon!", "Syl!")
response_help = "pets"
response_harm = "hits"
/mob/living/simple_animal/pokemon/eevee/umbreon
name = "umbreon"
icon_state = "umbreon"
icon_dead = "umbreon_d"
icon_living = "umbreon"
/mob/living/simple_animal/pokemon/vulpix
name = "vulpix"
icon_state = "vulpix"
icon_living = "vulpix"
icon_dead = "vulpix_d"