Files
Paradise/code/game/objects/items/weapons/teleprod.dm
T
d05cc7c5cb Migrates /obj/item/melee/baton to the new Attack Chain, Adds Universal Poking (#28241)
* Update stunbaton.dm

* Update stunbaton.dm

* update

* Update stunbaton.dm

* Update code/game/objects/items/weapons/stunbaton.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* update based on review

* Create test_attack_chain_stunbaton.dm

* update

---------

Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
2025-02-18 11:11:13 +00:00

30 lines
988 B
Plaintext

/obj/item/melee/baton/cattleprod/teleprod
name = "teleprod"
desc = "A prod with a bluespace crystal on the end. The crystal doesn't look too fun to touch."
lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons_righthand.dmi'
icon_state = "teleprod_nocell"
base_icon = "teleprod"
origin_tech = "combat=2;bluespace=4;materials=3"
/obj/item/melee/baton/cattleprod/teleprod/pre_attack(atom/A, mob/living/user, params)
if(..())
return FINISH_ATTACK
if(!turned_on)
return FINISH_ATTACK
if(!ismob(A))
return
var/mob/living/carbon/M
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
user.visible_message(
"<span class='danger'>[user] accidentally hits [user.p_themselves()] with [src]!</span>",
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>"
)
deductcharge(hitcost)
do_teleport(user, get_turf(user), 50)//honk honk
else if(isliving(M) && !M.anchored)
do_teleport(M, get_turf(M), 15)