Adding a chance for the improvised shotgun to explode (#498)

This commit is contained in:
Alberyk
2016-07-09 03:14:35 +03:00
committed by skull132
parent 30b6aff6cf
commit 5675dec18a
2 changed files with 47 additions and 0 deletions
@@ -17,6 +17,17 @@
origin_tech = "combat=2;materials=2"
handle_casings = CYCLE_CASINGS
load_method = SINGLE_CASING
/obj/item/weapon/gun/projectile/shotgun/improvised/special_check(var/mob/living/carbon/human/M)
if(prob(20 - (loaded.len * 10)))
M.visible_message("<span class='danger'>[M]'s weapon blows up, shattering into pieces!</span>","<span class='danger'>[src] blows up in your face!</span>", "You hear a loud bang!")
M.take_organ_damage(0,30)
M.drop_item()
new /obj/item/weapon/material/shard/shrapnel(get_turf(src))
qdel(src)
return 0
return 1
/obj/item/weapon/gun/projectile/shotgun/improvised/attackby(var/obj/item/A as obj, mob/user as mob)
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter))