Guest User

Untitled

a guest
Oct 24th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. proc/handle_mutations_and_radiation()
  2. if(getFireLoss())
  3. if((COLD_RESISTANCE in mutations))
  4. heal_organ_damage(0,3)
  5.  
  6. if(mHallucination in mutations)
  7. hallucination = 100
  8. halloss = 0
  9.  
  10. if(mSmallsize in mutations)
  11. if(!(pass_flags & PASSTABLE))
  12. pass_flags |= PASSTABLE
  13. else
  14. if(pass_flags & PASSTABLE)
  15. pass_flags &= ~PASSTABLE
  16.  
  17. // Make nanoregen heal youu, -3 all damage types
  18. if((NANOREGEN in augmentations) || (mRegen in mutations))
  19. var/healed = 0
  20. var/hptoreg = 0
  21. if(NANOREGEN in augmentations)
  22. hptoreg += 3
  23. if(mRegen in mutations)
  24. hptoreg += 2
  25. if(stat==UNCONSCIOUS) hptoreg/=2
  26. if(stat==DEAD) hptoreg=0
  27.  
  28. for(var/i=0, i<hptoreg, i++)
  29. var/list/damages = new/list()
  30. if(getToxLoss())
  31. damages+="tox"
  32. if(getOxyLoss())
  33. damages+="oxy"
  34. if(getCloneLoss())
  35. damages+="clone"
  36. if(getBruteLoss())
  37. damages+="brute"
  38. if(getFireLoss())
  39. damages+="burn"
  40. if(halloss != 0)
  41. damages+="hal"
  42.  
  43. if(damages.len)
  44. switch(pick(damages))
  45. if("tox")
  46. adjustToxLoss(-1)
  47. healed += 1
  48. if("oxy")
  49. adjustOxyLoss(-1)
  50. healed += 1
  51. if("clone")
  52. adjustCloneLoss(-1)
  53. healed += 1
  54. if("brute")
  55. heal_organ_damage(1,0)
  56. healed += 1
  57. if("burn")
  58. heal_organ_damage(0,1)
  59. healed += 1
  60. if("hal")
  61. if(halloss > 0)
  62. halloss -= 1
  63. if(halloss < 0)
  64. halloss = 0
  65. healed += 1
  66. else
  67. break
  68.  
  69. if(prob(healed))
  70. if(prob(5))
  71. src << "\blue You feel your wounds mending..."
  72.  
  73. if(!(/mob/living/carbon/human/proc/morph in src.verbs))
  74. if(mMorph in mutations)
  75. src.verbs += /mob/living/carbon/human/proc/morph
  76. else
  77. if(!(mMorph in mutations))
  78. src.verbs -= /mob/living/carbon/human/proc/morph
  79.  
  80. if(!(/mob/living/carbon/human/proc/remoteobserve in src.verbs))
  81. if(mRemote in mutations)
  82. src.verbs += /mob/living/carbon/human/proc/remoteobserve
  83. else
  84. if(!(mRemote in mutations))
  85. src.verbs -= /mob/living/carbon/human/proc/remoteobserve
  86.  
  87. if(!(/mob/living/carbon/human/proc/remotesay in src.verbs))
  88. if(mRemotetalk in mutations)
  89. src.verbs += /mob/living/carbon/human/proc/remotesay
  90. else
  91. if(!(mRemotetalk in mutations))
  92. src.verbs -= /mob/living/carbon/human/proc/remotesay
  93.  
  94. if ((HULK in mutations) && health <= 25)
  95. mutations.Remove(HULK)
  96. update_mutations() //update our mutation overlays
  97. src << "\red You suddenly feel very weak."
  98. Weaken(3)
  99. emote("collapse")
  100.  
  101. if (radiation)
  102. if (radiation > 100)
  103. radiation = 100
  104. Weaken(10)
  105. src << "\red You feel weak."
  106. emote("collapse")
  107.  
  108. if (radiation < 0)
  109. radiation = 0
  110.  
  111. else
  112. var/damage = 0
  113. radiation--
  114. switch(radiation)
  115. if(1 to 49)
  116. radiation--
  117. if(prob(25))
  118. adjustToxLoss(1)
  119. damage = 1
  120. updatehealth()
  121.  
  122. if(50 to 74)
  123. radiation -= 2
  124. damage = 1
  125. adjustToxLoss(1)
  126. if(prob(5))
  127. radiation -= 5
  128. Weaken(3)
  129. src << "\red You feel weak."
  130. emote("collapse")
  131. updatehealth()
  132.  
  133. if(75 to 100)
  134. radiation -= 3
  135. adjustToxLoss(2)
  136. damage = 1
  137. if(prob(1))
  138. src << "\red You mutate!"
  139. randmutg(src)
  140. domutcheck(src,null)
  141. emote("gasp")
  142. updatehealth()
  143.  
  144. if(damage && organs.len)
  145. var/datum/organ/external/O = pick(organs)
  146. if(istype(O)) O.add_autopsy_data("Radiation Poisoning", damage)
Advertisement
Add Comment
Please, Sign In to add comment