Make grab upgrade faster. Passive -> Aggressive is instantaneous (unless you count the 1 second click cooldown, same as between two melee attacks). Upgrading to neck grab or kill grab now takes 3 seconds instead of 4.

This commit is contained in:
phil235
2016-05-29 17:14:05 +02:00
parent 442c8bb1fa
commit aab577aae7
2 changed files with 34 additions and 29 deletions
+2 -1
View File
@@ -323,7 +323,7 @@
add_to_streak("G",D)
if(check_streak(A,D))
return 1
if(A.grab_state > GRAB_AGGRESSIVE)
if(A.grab_state >= GRAB_AGGRESSIVE)
D.grabbedby(A, 1)
else
A.start_pulling(D, 1)
@@ -331,6 +331,7 @@
D.drop_r_hand()
D.drop_l_hand()
D.stop_pulling()
add_logs(A, D, "grabbed", addition="aggressively")
A.grab_state = GRAB_AGGRESSIVE //Instant aggressive grab
return 1
+32 -28
View File
@@ -225,34 +225,38 @@
if(user.grab_state < GRAB_KILL)
user.changeNext_move(CLICK_CD_GRABBING)
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
var/old_grab_state = user.grab_state
var/grab_upgrade_time = 40
visible_message("<span class='danger'>[user] starts to tighten \his grip on [src]!</span>", \
"<span class='userdanger'>[user] starts to tighten \his grip on you!</span>")
if(do_mob(user, src, grab_upgrade_time))
if(user.pulling && user.pulling == src && user.grab_state == old_grab_state && user.a_intent == "grab")
user.grab_state++
switch(user.grab_state)
if(GRAB_AGGRESSIVE)
add_logs(user, src, "grabbed", addition="aggressively")
visible_message("<span class='danger'>[user] has grabbed [src] aggressively!</span>", \
"<span class='userdanger'>[user] has grabbed [src] aggressively!</span>")
drop_r_hand()
drop_l_hand()
stop_pulling()
if(GRAB_NECK)
visible_message("<span class='danger'>[user] has grabbed [src] by the neck!</span>",\
"<span class='userdanger'>[user] has grabbed you by the neck!</span>")
update_canmove() //we fall down
if(!buckled && !density)
Move(user.loc)
if(GRAB_KILL)
visible_message("<span class='danger'>[user] is strangling [src]!</span>", \
"<span class='userdanger'>[user] is strangling you!</span>")
update_canmove() //we fall down
if(!buckled && !density)
Move(user.loc)
return 1
if(user.grab_state) //only the first upgrade is instantaneous
var/old_grab_state = user.grab_state
var/grab_upgrade_time = 30
visible_message("<span class='danger'>[user] starts to tighten \his grip on [src]!</span>", \
"<span class='userdanger'>[user] starts to tighten \his grip on you!</span>")
if(!do_mob(user, src, grab_upgrade_time))
return 0
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state || user.a_intent != "grab")
return 0
user.grab_state++
switch(user.grab_state)
if(GRAB_AGGRESSIVE)
add_logs(user, src, "grabbed", addition="aggressively")
visible_message("<span class='danger'>[user] has grabbed [src] aggressively!</span>", \
"<span class='userdanger'>[user] has grabbed [src] aggressively!</span>")
drop_r_hand()
drop_l_hand()
stop_pulling()
if(GRAB_NECK)
visible_message("<span class='danger'>[user] has grabbed [src] by the neck!</span>",\
"<span class='userdanger'>[user] has grabbed you by the neck!</span>")
update_canmove() //we fall down
if(!buckled && !density)
Move(user.loc)
if(GRAB_KILL)
visible_message("<span class='danger'>[user] is strangling [src]!</span>", \
"<span class='userdanger'>[user] is strangling you!</span>")
update_canmove() //we fall down
if(!buckled && !density)
Move(user.loc)
return 1
/mob/living/attack_slime(mob/living/simple_animal/slime/M)