mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-08-27 07:03:37 +01:00
Assorted items no longer have special snowflake attack() code that lets them bypass the base attack() proc stun/KO chances. This mostly affected guns of assorted varieties, and was done mainly due to the fact that the code was both outdated and based on the horribly overpowered revolver code (which got commented out ages ago). If you want specifics, the only way to protect yourself from the special snowflake code is to be an admin and manually set the bitflag on your headgear to include the "8" bitflag, which was the "protects your head" bitflag in ancientcode. This was even if the attack wasn't actually targeting the head. Aside from that, there was also the problem that this special snowflake code left targets incapacitated for FAR longer than the base attack() proc would (60 ticks of life() for the pre-nerf revolver, 10-120 ticks for the energy gun). And again, this was with no way to protect yourself aside from being an admin and modifying the vars on your headgear. Harmbatons, Harmtasers, and Death Nettles got to keep their snowflake code, but I modified it so you only get stunned if the attack makes it past any armor you're wearing. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1346 316c924e-a436-60f5-8080-3fe189b3f50e
112 lines
2.9 KiB
Plaintext
112 lines
2.9 KiB
Plaintext
/*
|
|
|
|
CONTAINS:
|
|
Plant-B-Gone
|
|
Nettle
|
|
Deathnettle
|
|
|
|
*/
|
|
|
|
|
|
// Plant-B-Gone
|
|
/obj/item/weapon/plantbgone/New()
|
|
var/datum/reagents/R = new/datum/reagents(100) // 100 units of solution
|
|
reagents = R
|
|
R.my_atom = src
|
|
R.add_reagent("plantbgone", 100)
|
|
|
|
/obj/item/weapon/plantbgone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
|
return
|
|
|
|
/obj/item/weapon/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob)
|
|
|
|
if (istype(A, /obj/item/weapon/storage/backpack ))
|
|
return
|
|
|
|
else if (locate (/obj/table, src.loc))
|
|
return
|
|
|
|
else if (src.reagents.total_volume < 1)
|
|
src.empty = 1
|
|
user << "\blue Add more Plant-B-Gone mixture!"
|
|
return
|
|
|
|
else
|
|
src.empty = 0
|
|
|
|
if (istype(A, /obj/machinery/hydroponics)) // We are targeting hydrotray
|
|
return
|
|
|
|
else if (istype(A, /obj/blob)) // blob damage in blob code
|
|
return
|
|
|
|
else
|
|
var/obj/decal/D = new/obj/decal/(get_turf(src)) // Targeting elsewhere
|
|
D.name = "chemicals"
|
|
D.icon = 'chemical.dmi'
|
|
D.icon_state = "weedpuff"
|
|
D.create_reagents(5)
|
|
src.reagents.trans_to(D, 5) // 5 units of solution used at a time => 20 uses
|
|
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
|
|
|
|
spawn(0)
|
|
for(var/i=0, i<3, i++) // Max range = 3 tiles
|
|
step_towards(D,A) // Moves towards target as normally (not thru walls)
|
|
D.reagents.reaction(get_turf(D))
|
|
for(var/atom/T in get_turf(D))
|
|
D.reagents.reaction(T)
|
|
sleep(4)
|
|
del(D)
|
|
|
|
return
|
|
|
|
/obj/item/weapon/plantbgone/examine()
|
|
set src in usr
|
|
usr << text("\icon[] [] units of Plant-B-Gone left!", src, src.reagents.total_volume)
|
|
..()
|
|
return
|
|
|
|
|
|
// Nettle
|
|
|
|
/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
|
|
if(!user.gloves)
|
|
user << "\red The nettle burns your bare hand!"
|
|
user.fireloss += force
|
|
|
|
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob)
|
|
if (force > 0)
|
|
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
|
|
else
|
|
usr << "All the leaves have fallen off the nettle from violent whacking."
|
|
del(src)
|
|
|
|
|
|
// Deathnettle
|
|
|
|
/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
|
|
if(!user.gloves)
|
|
user.fireloss += force
|
|
if(prob(50))
|
|
user.paralysis += 5
|
|
user << "\red You are stunned by the Deathnettle when you try picking it up!"
|
|
|
|
/obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob)
|
|
if(!..()) return
|
|
if(istype(M, /mob/living/carbon/human))
|
|
M << "\red You are stunned by the powerful acid of the Deathnettle!"
|
|
M.eye_blurry += 4
|
|
if(prob(20))
|
|
M.paralysis += 5
|
|
M.weakened += 2
|
|
M.drop_item()
|
|
|
|
|
|
/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob)
|
|
if (force > 0)
|
|
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
|
|
|
|
else
|
|
usr << "All the leaves have fallen off the deathnettle from violent whacking."
|
|
del(src)
|