mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-06 14:19:43 +00:00
135 lines
4.8 KiB
Plaintext
135 lines
4.8 KiB
Plaintext
/* Weapons
|
|
* Contains:
|
|
* Banhammer
|
|
* Sword
|
|
* Classic Baton
|
|
*/
|
|
|
|
/*
|
|
* Banhammer
|
|
*/
|
|
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
|
|
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]</b></font>"
|
|
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
|
|
|
|
/*
|
|
* Classic Baton
|
|
*/
|
|
/obj/item/weapon/melee/classic_baton
|
|
name = "police baton"
|
|
desc = "A wooden truncheon for beating criminal scum."
|
|
icon = 'icons/obj/weapons.dmi'
|
|
icon_state = "baton"
|
|
item_state = "classic_baton"
|
|
slot_flags = SLOT_BELT
|
|
force = 10
|
|
|
|
/obj/item/weapon/melee/classic_baton/attack(mob/M as mob, mob/living/user as mob)
|
|
if ((CLUMSY in user.mutations) && prob(50))
|
|
user << "<span class='warning'>You club yourself over the head.</span>"
|
|
user.Weaken(3 * force)
|
|
if(ishuman(user))
|
|
var/mob/living/carbon/human/H = user
|
|
H.apply_damage(2*force, BRUTE, "head")
|
|
else
|
|
user.take_organ_damage(2*force)
|
|
return
|
|
/*this is already called in ..()
|
|
src.add_fingerprint(user)
|
|
M.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 [M.name] ([M.ckey])</font>")
|
|
|
|
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
|
*/
|
|
if (user.a_intent == I_HURT)
|
|
if(!..()) return
|
|
//playsound(src.loc, "swing_hit", 50, 1, -1)
|
|
if (M.stuttering < 8 && (!(HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
|
M.stuttering = 8
|
|
M.Stun(8)
|
|
M.Weaken(8)
|
|
for(var/mob/O in viewers(M))
|
|
if (O.client) O.show_message("<span class='danger'>\The [M] has been beaten with \the [src] by [user]!</span>", 1, "<span class='warning'>You hear someone fall</span>", 2)
|
|
else
|
|
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1)
|
|
M.Stun(5)
|
|
M.Weaken(5)
|
|
M.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 [M.name] ([M.ckey])</font>")
|
|
msg_admin_attack("[key_name(user)] attacked [key_name(user)] with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
|
src.add_fingerprint(user)
|
|
|
|
for(var/mob/O in viewers(M))
|
|
if (O.client) O.show_message("<span class='danger'>\The [M] has been stunned with \the [src] by [user]!</span>", 1, "<span class='warning'>You hear someone fall</span>", 2)
|
|
|
|
//Telescopic baton
|
|
/obj/item/weapon/melee/telebaton
|
|
name = "telescopic baton"
|
|
desc = "A compact yet rebalanced personal defense weapon. Can be concealed when folded."
|
|
icon = 'icons/obj/weapons.dmi'
|
|
icon_state = "telebaton0"
|
|
item_state = "telebaton0"
|
|
slot_flags = SLOT_BELT
|
|
w_class = 2
|
|
force = 3
|
|
var/on = 0
|
|
|
|
|
|
/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
|
|
on = !on
|
|
if(on)
|
|
user.visible_message("<span class='warning'>With a flick of their wrist, [user] extends their telescopic baton.</span>",\
|
|
"<span class='warning'>You extend the baton.</span>",\
|
|
"You hear an ominous click.")
|
|
icon_state = "telebaton1"
|
|
item_state = "telebaton1"
|
|
w_class = 3
|
|
force = 15//quite robust
|
|
attack_verb = list("smacked", "struck", "slapped")
|
|
else
|
|
user.visible_message("<span class='notice'>\The [user] collapses their telescopic baton.</span>",\
|
|
"<span class='notice'>You collapse the baton.</span>",\
|
|
"You hear a click.")
|
|
icon_state = "telebaton0"
|
|
item_state = "telebaton0"
|
|
w_class = 2
|
|
force = 3//not so robust now
|
|
attack_verb = list("hit", "punched")
|
|
|
|
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)
|
|
add_fingerprint(user)
|
|
|
|
if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
|
|
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
|
|
|
|
var/icon/I = new /icon(src.icon, src.icon_state)
|
|
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
|
|
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY)
|
|
blood_overlay = I
|
|
|
|
overlays += blood_overlay
|
|
|
|
return
|
|
|
|
/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob)
|
|
if(on)
|
|
if ((CLUMSY in user.mutations) && prob(50))
|
|
user << "<span class='warning'>You club yourself over the head.</span>"
|
|
user.Weaken(3 * force)
|
|
if(ishuman(user))
|
|
var/mob/living/carbon/human/H = user
|
|
H.apply_damage(2*force, BRUTE, "head")
|
|
else
|
|
user.take_organ_damage(2*force)
|
|
return
|
|
if(..())
|
|
//playsound(src.loc, "swing_hit", 50, 1, -1)
|
|
return
|
|
else
|
|
return ..()
|