mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Final adjustments to icons, adds delay to pinning
This commit is contained in:
@@ -28,12 +28,14 @@
|
||||
// Knifing
|
||||
if(edge)
|
||||
for(var/obj/item/weapon/grab/G in M.grabbed_by)
|
||||
if(G.assailant == user && G.state >= GRAB_NECK)
|
||||
if(G.assailant == user && G.state >= GRAB_NECK && world.time >= (G.last_action + 20))
|
||||
//TODO: better alternative for applying damage multiple times? Nice knifing sound?
|
||||
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
|
||||
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
|
||||
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
|
||||
M.adjustOxyLoss(60) // Brain lacks oxygen immediately, pass out
|
||||
flick(G.hud.icon_state, G.hud)
|
||||
G.last_action = world.time
|
||||
user.visible_message("<span class='danger'>[user] slit [M]'s throat open with \the [name]!</span>")
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Knifed [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Got knifed by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
|
||||
|
||||
@@ -280,13 +280,14 @@
|
||||
if(!affecting)
|
||||
return
|
||||
|
||||
if(world.time < (last_action + 10))
|
||||
if(world.time < (last_action + 20))
|
||||
return
|
||||
|
||||
if(M == affecting)
|
||||
if(ishuman(M))
|
||||
last_action = world.time
|
||||
var/hit_zone = assailant.zone_sel.selecting
|
||||
flick(hud.icon_state, hud)
|
||||
switch(assailant.a_intent)
|
||||
if(I_HELP)
|
||||
if(force_down)
|
||||
@@ -345,26 +346,35 @@
|
||||
var/obj/item/clothing/hat = assailant.head
|
||||
if(istype(hat))
|
||||
damage += hat.force * 10
|
||||
affecting.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", affecting:run_armor_check(affecting, "melee"))
|
||||
var/armor = affecting:run_armor_check(affecting, "melee")
|
||||
affecting.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", armor)
|
||||
assailant.apply_damage(10*rand(90, 110)/100, BRUTE, "head", assailant:run_armor_check("head", "melee"))
|
||||
if(!armor && prob(damage))
|
||||
affecting.apply_effect(20, PARALYZE)
|
||||
affecting.visible_message("<span class='danger'>[affecting] has been knocked unconscious!</span>")
|
||||
playsound(assailant.loc, "swing_hit", 25, 1, -1)
|
||||
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Headbutted [affecting.name] ([affecting.ckey])</font>")
|
||||
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Headbutted by [assailant.name] ([assailant.ckey])</font>")
|
||||
msg_admin_attack("[key_name(assailant)] has headbutted [key_name(affecting)]")
|
||||
assailant.drop_from_inventory(src)
|
||||
src.loc = null
|
||||
qdel(src)
|
||||
return
|
||||
if(I_DISARM)
|
||||
if(state < GRAB_AGGRESSIVE)
|
||||
assailant << "<span class='warning'>You require a better grab to do this.</span>"
|
||||
return
|
||||
assailant << "<span class='warning'>You start forcing [affecting] to the ground.</span>"
|
||||
if(!force_down)
|
||||
assailant.visible_message("<span class='danger'>[assailant] is forcing [affecting] to the ground!</span>")
|
||||
force_down = 1
|
||||
affecting.Weaken(3)
|
||||
affecting.lying = 1
|
||||
step_to(assailant, affecting)
|
||||
assailant.set_dir(EAST) //face the victim
|
||||
affecting.set_dir(SOUTH) //face up
|
||||
return
|
||||
if(do_after(assailant, 20) && affecting)
|
||||
assailant.visible_message("<span class='danger'>[assailant] is forcing [affecting] to the ground!</span>")
|
||||
force_down = 1
|
||||
affecting.Weaken(3)
|
||||
affecting.lying = 1
|
||||
step_to(assailant, affecting)
|
||||
assailant.set_dir(EAST) //face the victim
|
||||
affecting.set_dir(SOUTH) //face up
|
||||
return
|
||||
else
|
||||
assailant << "<span class='warning'>You are already pinning [affecting] to the ground.</span>"
|
||||
return
|
||||
@@ -396,10 +406,12 @@
|
||||
|
||||
|
||||
/obj/item/weapon/grab/dropped()
|
||||
del(src)
|
||||
loc = null
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grab/Destroy()
|
||||
//make sure the grabbed_by list doesn't fill up with nulls
|
||||
animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING)
|
||||
affecting.layer = 4
|
||||
if(affecting)
|
||||
affecting.grabbed_by -= src
|
||||
affecting = null
|
||||
@@ -407,10 +419,6 @@
|
||||
if(assailant.client)
|
||||
assailant.client.screen -= hud
|
||||
assailant = null
|
||||
|
||||
animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING)
|
||||
affecting.layer = 4
|
||||
loc = null
|
||||
qdel(hud)
|
||||
hud = null
|
||||
..()
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 165 KiB |
Reference in New Issue
Block a user