Advertisement
Guest User

Untitled

a guest
Dec 9th, 2015
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. /*Note to self: Make Potions to heal non-legendaries.
  2. *Oh dear God, this is probably so snowflakey and shit.
  3. *Made by Spacemanspark
  4. */
  5.  
  6. /mob/living/simple_animal/pokemon
  7. name = "Pokemon"
  8. desc = "Gotta catch 'em all!"
  9. maxHealth = 100
  10. health = 100
  11. attacktext = "used Quick Attack on"
  12. var/legendary = 0 //Is this a legendary Pokemon? Ex. Mewtwo. If so, then it will have some buffs over normal Pokemon.
  13. var/evolve1 = 0 //Can this Pokemon evolve further via leveling normally? Ex. Charmander --> Charmeleon --> Charizard
  14. var/evolve2 = 0 //Can this Pokemon evolve further via other means, such as a stone? Ex. Pikachu --> Raichu.
  15. var/PowerPoints = 0 //How many attacks a Pokemon can do.
  16. harm_intent_damage = 5
  17. melee_damage_lower = 5
  18. melee_damage_upper = 5
  19. var/pokedex_entry = 0 //If you can't figure out what this is, you're not a true Pokemon Master.
  20. var/Pokelevel = 1 //The default level for all spawned Pokemon.
  21. var/exp = 7 //The ammount of experience one has to gain to get to the next level
  22. var/exp_initial = 7 //The initial amount of exp the Pokemon had to obtain to reach a new level.
  23. var/exp_total = 0 //Total number of experience the Pokemon has gained thus far.
  24.  
  25. /mob/living/simple_animal/pokemon/New()
  26. ..()
  27. if(legendary == 0) //Legendaries are unique (supposedly), so we won't give them a number.
  28. name = text("[initial(name)] ([rand(1, 1000)])")
  29. real_name = name
  30.  
  31. /mob/living/simple_animal/pokemon/proc/Faint()
  32. canmove = 0
  33. if(health >= 25)
  34. canmove = 1
  35. if(legendary == 1)
  36. health += 5
  37. return
  38.  
  39. /mob/living/simple_animal/pokemon/Life()
  40. ..()
  41. if (Pokelevel < 100 && health > 20) //Pokemon don't level up past 100, nor do they gain EXP while they have fainted or are ready to evolve.
  42. exp--
  43. exp_total++
  44.  
  45. if(exp <= 0 && Pokelevel < 100) //Leveling up.
  46. Pokelevel++
  47. exp_initial *= 1.6
  48. exp = exp_initial
  49. maxHealth += 5
  50. health += 5
  51. src << "You are now level [Pokelevel]!"
  52. playsound(src, 'sound/misc/Levelup.ogg', 10, 1)
  53. if(evolve1 == 1)
  54. src << "You feel ready to evolve!" //Lets the player know they can evolve. Reminds them every time they level up.
  55.  
  56. if(health < maxHealth) //Legendaries gain health on their own without the need for items.
  57. if(legendary == 1)
  58. health += 0.5
  59.  
  60. if(health <= 30)
  61. src << "\red You have fainted!"
  62. Faint()
  63.  
  64. /mob/living/simple_animal/pokemon/adjustBruteLoss()
  65. if(health < 20)
  66. return
  67. ..()
  68.  
  69. /mob/living/simple_animal/pokemon/adjustFireLoss()
  70. if(health < 20)
  71. return
  72. ..()
  73.  
  74. /mob/living/simple_animal/pokemon/Stat()
  75. ..()
  76. statpanel("Status")
  77.  
  78. if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
  79. if(ticker.mode:malf_mode_declared)
  80. stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
  81. if(emergency_shuttle)
  82. var/eta_status = emergency_shuttle.get_status_panel_eta()
  83. if(eta_status)
  84. stat(null, eta_status)
  85.  
  86. if(client.statpanel == "Status")
  87. stat(null, "HP: [health]/[maxHealth]")
  88. stat(null, "Level: [Pokelevel]")
  89. stat(null, "EXP to next level: [exp]")
  90. stat(null, "Total EXP: [exp_total]")
  91.  
  92. ///Pokeballs!///
  93. /obj/item/device/pokeball
  94. name = "Pokeball"
  95. icon = 'icons/mob/pokemon.dmi'
  96. icon_state = "pokeball"
  97. item_state = "pokeball"
  98. desc = "Used to capture Pokemon and force them to do your bidding."
  99. w_class = 1.0
  100. var/mob/captured = null
  101.  
  102. afterattack(var/atom/A, mob/user, prox_flag)
  103. if(!istype(A, /mob/living/simple_animal/pokemon))
  104. return ..()
  105. capture(A, user)
  106. return
  107.  
  108. /obj/item/device/pokeball/proc/capture(var/choice as text, var/mob/target, var/mob/U as mob)
  109. var/mob/living/simple_animal/pokemon/T = target
  110. if(captured)
  111. U << "\red <b>Captured failed!</b>: \black The Pokeball already has a Pokemon registered to it!"
  112. return
  113. else
  114. T.forceMove(src)
  115. T.canmove = 0
  116. T.faction |= "\ref[U]"
  117. T.name = "[U.real_name]'s [T.real_name]"
  118. T.cancel_camera()
  119. icon_state = "pokeball_c"
  120. name = "Pokeball: [T.real_name]"
  121. T << "You have been captured! You now obey [U.name], no matter their state."
  122. U << "\blue <b>Capture successful!</b>: \black [T.real_name] now obeys you!"
  123. captured = "[T.name]"
  124.  
  125. //Moves//
  126.  
  127.  
  128.  
  129. /////////////////////////////////The actual Pokemon//////////////////////////////
  130.  
  131. //Legendaries//
  132. /mob/living/simple_animal/pokemon/mewtwo
  133. name = "Mewtwo"
  134. desc = "It was created by a scientist after years of horrific gene splicing and DNA engineering experiments."
  135. icon = 'icons/mob/pokemon.dmi'
  136. icon_state = "mewtwo"
  137. icon_living = "mewtwo"
  138. icon_dead = "mewtwo"
  139. pokedex_entry = 150
  140. universal_speak = 1
  141. flying = 1
  142. attacktext = "used Psycho Cut on"
  143. maxHealth = 500
  144. health = 500
  145. unsuitable_atmos_damage = 0
  146. minbodytemp = 0
  147. maxbodytemp = INFINITY
  148. legendary = 1
  149. environment_smash = 3
  150. speed = -1
  151. force_threshold = 10
  152. harm_intent_damage = 20
  153. melee_damage_lower = 10
  154. melee_damage_upper = 10
  155. level = 70
  156. exp = 7000
  157. exp_initial = 7000
  158. PowerPoints = 10
  159.  
  160. /mob/living/simple_animal/pokemon/mewtwo/Process_Spacemove(var/movement_dir = 0)
  161. return 1
  162.  
  163.  
  164. //Non-legendaries//
  165. /mob/living/simple_animal/pokemon/raichu
  166. name = "Raichu"
  167. desc = "Its long tail serves as a ground to protect itself from its own high voltage power."
  168. icon = 'icons/mob/pokemon.dmi'
  169. icon_state = "raichu"
  170. icon_living = "raichu"
  171. icon_dead = "raichu"
  172. pokedex_entry = 26
  173. PowerPoints = 10
  174. environment_smash = 1
  175. speed = 0
  176. harm_intent_damage = 7
  177. melee_damage_lower = 8
  178. melee_damage_upper = 8
  179.  
  180.  
  181. /mob/living/simple_animal/pokemon/pikachu
  182. name = "Pikachu"
  183. desc = "It keeps its tail raised to monitor its surroundings. If you yank its tail, it will try to bite you."
  184. icon = 'icons/mob/pokemon.dmi'
  185. icon_state = "pikachu"
  186. icon_living = "pikachu"
  187. icon_dead = "pikachu"
  188. speak = list("Pika.", "Chu.", "Pika!", "Pika Pika!", "Pikachu!")
  189. pokedex_entry = 25
  190. PowerPoints = 5
  191.  
  192. /mob/living/simple_animal/pokemon/pikachu/Life() //Screw you too, Byond.
  193. ..()
  194. if(Pokelevel == 5)
  195. evolve1 = 1
  196.  
  197. /mob/living/simple_animal/pokemon/pikachu/verb/evolve()
  198. set category = "Pokemon"
  199. set name = "Evolve"
  200. set desc = "Evolve to your next stage."
  201.  
  202. if(evolve1 != 1)
  203. src << "<span class='warning'>You do not yet have enough experience...</span>"
  204. return
  205.  
  206. if(health <= 49)
  207. src << "<span class='warning'>You are too weak to evolve!</span>"
  208. return
  209.  
  210. src << "<span class='warning'>You evolved into a Raichu!</span>"
  211. var/mob/living/simple_animal/pokemon/raichu = new/mob/living/simple_animal/pokemon/raichu(get_turf(src.loc))
  212. mind.transfer_to(raichu)
  213. qdel(src)
  214. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement