Fix cloning/telebaton

This commit is contained in:
Markolie
2014-11-21 04:31:38 +01:00
parent 421c461705
commit 6595b8c38e
2 changed files with 38 additions and 37 deletions
@@ -159,34 +159,31 @@
slot_flags = SLOT_BELT
w_class = 2
force = 3
var/cooldown = 0
var/on = 0
/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
on = !on
if(on)
user.visible_message("\red With a flick of their wrist, [user] extends their telescopic baton.",\
"\red You extend the baton.",\
"You hear an ominous click.")
user << "<span class ='warning'>You extend the baton.</span>"
icon_state = "telebaton_1"
item_state = "telebaton_1"
w_class = 3
force = 15//quite robust
attack_verb = list("smacked", "struck", "slapped")
item_state = "nullrod"
w_class = 4 //doesnt fit in backpack when its on for balance
force = 10 //seclite damage
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
user.visible_message("\blue [user] collapses their telescopic baton.",\
"\blue You collapse the baton.",\
"You hear a click.")
user << "<span class ='notice'>You collapse the baton.</span>"
icon_state = "telebaton_0"
item_state = "telebaton_0"
item_state = "telebaton_0" //no sprite in other words
slot_flags = SLOT_BELT
w_class = 2
force = 3//not so robust now
attack_verb = list("hit", "punched")
force = 3 //not so robust now
attack_verb = list("hit", "poked")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
if (!blood_DNA) return
if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
@@ -203,8 +200,9 @@
/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob)
if(on)
if ((M_CLUMSY in user.mutations) && prob(50))
user << "\red You club yourself over the head."
add_fingerprint(user)
if((M_CLUMSY in user.mutations) && prob(50))
user << "<span class ='danger'>You club yourself over the head.</span>"
user.Weaken(3 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -212,28 +210,32 @@
else
user.take_organ_damage(2*force)
return
if(isrobot(target))
..()
return
if(!isliving(target))
return
if (user.a_intent == "harm")
if(!..()) return
if(!isrobot(target))
playsound(src.loc, "swing_hit", 50, 1, -1)
target.Weaken(4)
if(!isrobot(target)) return
else
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1)
target.Weaken(2)
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [target.name] ([target.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
src.add_fingerprint(user)
target.visible_message("\red <B>[target] has been stunned with \the [src] by [user]!</B>")
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
if(cooldown <= 0)
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Weaken(3)
add_logs(user, target, "stunned", object="telescopic baton")
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[target] has been knocked down with \the [src] by [user]!</span>")
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
cooldown = 1
spawn(40)
cooldown = 0
return
else
return ..()
/*
*Energy Blade
*/