Guest User

Untitled

a guest
Apr 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. /*
  2.  
  3. CONTAINS:
  4. Plant-B-Gone
  5. Nettle
  6. Deathnettle
  7.  
  8. */
  9.  
  10.  
  11. // Plant-B-Gone
  12. /obj/item/weapon/plantbgone/New()
  13. var/datum/reagents/R = new/datum/reagents(100) // 100 units of solution
  14. reagents = R
  15. R.my_atom = src
  16. R.add_reagent("plantbgone", 100)
  17.  
  18. /obj/item/weapon/plantbgone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
  19. return
  20.  
  21. /obj/item/weapon/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob)
  22.  
  23. if (istype(A, /obj/item/weapon/storage/backpack ))
  24. return
  25.  
  26. else if (locate (/obj/structure/table, src.loc))
  27. return
  28.  
  29. else if (src.reagents.total_volume < 1)
  30. src.empty = 1
  31. user << "\blue Add more Plant-B-Gone mixture!"
  32. return
  33.  
  34. else
  35. src.empty = 0
  36.  
  37. if (istype(A, /obj/machinery/hydroponics)) // We are targeting hydrotray
  38. return
  39.  
  40. else if (istype(A, /obj/effect/blob)) // blob damage in blob code
  41. return
  42.  
  43. else
  44. var/obj/effect/decal/D = new/obj/effect/decal/(get_turf(src)) // Targeting elsewhere
  45. D.name = "chemicals"
  46. D.icon = 'chemical.dmi'
  47. D.icon_state = "weedpuff"
  48. D.create_reagents(5)
  49. src.reagents.trans_to(D, 5) // 5 units of solution used at a time => 20 uses
  50. playsound(src.loc, 'spray3.ogg', 50, 1, -6)
  51.  
  52. spawn(0)
  53. for(var/i=0, i<3, i++) // Max range = 3 tiles
  54. step_towards(D,A) // Moves towards target as normally (not thru walls)
  55. D.reagents.reaction(get_turf(D))
  56. for(var/atom/T in get_turf(D))
  57. D.reagents.reaction(T)
  58. sleep(4)
  59. del(D)
  60.  
  61. return
  62.  
  63. /obj/item/weapon/plantbgone/examine()
  64. set src in usr
  65. usr << text("\icon[] [] units of Plant-B-Gone left!", src, src.reagents.total_volume)
  66. ..()
  67. return
  68.  
  69. // Sunflower
  70. /obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
  71. M << "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
  72. user << "<font color='green'> Your sunflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
  73.  
  74. // Nettle
  75.  
  76. /obj/item/weapon/grown/nettle/New()
  77. ..()
  78. if (potency > 0)
  79. force = min(potency * 2, 40)
  80. else
  81. force = 10 // Admin spawned
  82.  
  83. /obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
  84. if(!user.gloves)
  85. user << "\red The nettle burns your bare hand!"
  86. if(istype(user, /mob/living/carbon/human))
  87. var/organ = ((user.hand ? "l_":"r_") + "arm")
  88. var/datum/organ/external/affecting = user.get_organ(organ)
  89. affecting.take_damage(0,force)
  90. else
  91. user.take_organ_damage(0,force)
  92.  
  93. /obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob)
  94. /obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob)
  95. if(istype(A, /mob/living))
  96. force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
  97.  
  98. if (force > 0)
  99. usr << "All the leaves have fallen off the nettle from violent whacking."
  100. del(src)
  101.  
  102.  
  103. // Deathnettle
  104.  
  105. /obj/item/weapon/grown/deathnettle/New()
  106. ..()
  107. if (potency > 0)
  108. force = min(potency * 3, 125)
  109. else
  110. force = 20 // Admin spawned
  111.  
  112. /obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
  113. if(!user.gloves)
  114. if(istype(user, /mob/living/carbon/human))
  115. var/organ = ((user.hand ? "l_":"r_") + "arm")
  116. var/datum/organ/external/affecting = user.get_organ(organ)
  117. affecting.take_damage(0,force)
  118. else
  119. user.take_organ_damage(0,force)
  120. if(prob(50))
  121. user.paralysis += 5
  122. user << "\red You are stunned by the Deathnettle when you try picking it up!"
  123.  
  124. /obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob)
  125. if(!..()) return
  126. if(istype(M, /mob/living))
  127. M << "\red You are stunned by the powerful acid of the Deathnettle!"
  128. M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had the [src.name] used on them by [user.name] ([user.ckey])</font>")
  129. user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] on [M.name] ([M.ckey])</font>")
  130.  
  131. M.eye_blurry += force/7
  132. if(prob(20))
  133. M.paralysis += force/6
  134. M.weakened += force/15
  135. M.drop_item()
  136.  
  137. /obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob)
  138. if(istype(A, /mob/living))
  139. force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
  140.  
  141. if (force > 0)
  142. usr << "All the leaves have fallen off the deathnettle from violent whacking."
  143. del(src)
Add Comment
Please, Sign In to add comment