Gargantua Blood Rush now removes bolas (#25989)

* gargantua bloodrush now clears legcuffs, slightly refactors removing restraints

* comment tweaks, prevents blood rush from being used when buckled.

* Update code/modules/mob/living/carbon/carbon_procs.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: chuga-git <98280110+chuga-git@users.noreply.github.com>

---------

Signed-off-by: chuga-git <98280110+chuga-git@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
chuga-git
2024-06-28 03:16:55 +00:00
committed by GitHub
co-authored by Contrabang
parent ac50079e5f
commit 43b7fa5ed9
5 changed files with 106 additions and 37 deletions
+1 -1
View File
@@ -354,7 +354,7 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/datum/disease/critical/crit in H.viruses) // cure all crit conditions
crit.cure()
H.uncuff()
H.clear_restraints()
H.Silence(6 SECONDS) //Prevent "HALP MAINT CULT" before you realise you're converted
if(H.reagents?.has_reagent("holywater"))
H.reagents.del_reagent("holywater") // Also prevent fill stomach with holy water and "forgot" about it after converting
@@ -166,11 +166,11 @@
H.Sleeping(16 SECONDS)
if(console && console.pad && console.pad.teleport_target)
H.forceMove(console.pad.teleport_target)
H.uncuff()
H.clear_restraints()
return
//Area not chosen / It's not safe area - teleport to arrivals
H.forceMove(pick(GLOB.latejoin))
H.uncuff()
H.clear_restraints()
return
/obj/machinery/abductor/experiment/attackby(obj/item/G, mob/user)
@@ -14,7 +14,7 @@
to_chat(imp_in, "You feel a faint click.")
if(iscarbon(imp_in))
var/mob/living/carbon/C_imp_in = imp_in
C_imp_in.uncuff()
C_imp_in.clear_restraints()
for(var/obj/item/grab/G in C_imp_in.grabbed_by)
var/mob/living/carbon/M = G.assailant
C_imp_in.visible_message("<span class='warning'>[C_imp_in] suddenly shocks [M] from their wrists and slips out of their grab!</span>")
@@ -92,18 +92,33 @@
/datum/spell/vampire/self/blood_rush
name = "Blood Rush (30)"
desc = "Infuse yourself with blood magic to boost your movement speed."
desc = "Infuse yourself with blood magic to boost your movement speed and break out of leg restraints."
gain_desc = "You have gained the ability to temporarily move at high speeds."
base_cooldown = 30 SECONDS
required_blood = 30
action_icon_state = "blood_rush"
/datum/spell/vampire/self/blood_rush/can_cast(mob/user, charge_check, show_message)
var/mob/living/L = user
// they're not getting anything out of this spell if they're stunned or buckled anyways, so we might as well stop them from wasting the blood
if(L.IsWeakened() || L.buckled)
to_chat(L, "<span class='warning'>You can't cast this spell while incapacitated!</span>")
return FALSE
return ..()
/datum/spell/vampire/self/blood_rush/cast(list/targets, mob/user)
var/mob/living/target = targets[1]
if(ishuman(target))
var/mob/living/carbon/human/H = target
to_chat(H, "<span class='notice'>You feel a rush of energy!</span>")
H.apply_status_effect(STATUS_EFFECT_BLOOD_RUSH)
if(!ishuman(target))
return
var/mob/living/carbon/human/H = target
to_chat(H, "<span class='notice'>You feel a rush of energy!</span>")
H.apply_status_effect(STATUS_EFFECT_BLOOD_RUSH)
H.clear_legcuffs(TRUE)
// note that this doesn't cancel the baton knockdown timer
H.SetKnockDown(0)
H.stand_up(TRUE)
/datum/spell/fireball/demonic_grasp
name = "Demonic Grasp (20)"
+82 -28
View File
@@ -1018,35 +1018,89 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
legcuffed,
back,
wear_mask)
/**
* Clears a carbon mob's handcuffs and legcuffs, dropping them to the ground.
*
* Arguments:
* * show_message - if TRUE, will display a visible message when restraints are removed. FALSE by default.
*
* Returns:
* * TRUE if handcuffs or legcuffs were removed, FALSE otherwise
*/
/mob/living/carbon/proc/clear_restraints(show_message = FALSE)
. = clear_handcuffs(show_message)
. |= clear_legcuffs(show_message)
/mob/living/carbon/proc/uncuff()
if(handcuffed)
var/obj/item/W = handcuffed
handcuffed = null
if(buckled && buckled.buckle_requires_restraints)
buckled.unbuckle_mob(src)
update_handcuffed()
if(client)
client.screen -= W
if(W)
W.forceMove(drop_location())
W.dropped(src)
if(W)
W.layer = initial(W.layer)
W.plane = initial(W.plane)
if(legcuffed)
var/obj/item/W = legcuffed
legcuffed = null
toggle_move_intent()
update_inv_legcuffed()
if(client)
client.screen -= W
if(W)
W.forceMove(drop_location())
W.dropped(src)
if(W)
W.layer = initial(W.layer)
W.plane = initial(W.plane)
/**
* Removes a carbon's handcuffs, dropping them to the ground. Calls update_handcuffed(). Unbuckles if handcuffs were necessary for the buckle (pipe buckling, etc.)
*
* Arguments:
* * show_message - if TRUE, will display a visible message when restraints are removed. FALSE by default.
*
* Returns:
* * TRUE if handcuffs existed and were successfully removed, FALSE otherwise
*/
/mob/living/carbon/proc/clear_handcuffs(show_message = FALSE)
if(!handcuffed)
return FALSE
var/obj/item/W = handcuffed
if(isnull(W))
return FALSE
handcuffed = null
if(buckled && buckled.buckle_requires_restraints)
buckled.unbuckle_mob(src)
update_handcuffed()
if(client)
client.screen -= W
if(show_message)
visible_message("<span class='warning'>[src] slips out of [W]!</span>")
W.forceMove(drop_location())
W.dropped(src)
if(W)
W.layer = initial(W.layer)
W.plane = initial(W.plane)
return TRUE
/**
* Removes a carbon's legcuffs, dropping them to the ground. Calls update_inv_legcuffed().
*
* Arguments:
* * show_message - if TRUE, will display a visible message when restraints are removed. FALSE by default.
*
* Returns:
* * TRUE if legcuffs existed and were successfully removed, FALSE otherwise
*/
/mob/living/carbon/proc/clear_legcuffs(show_message = FALSE)
if(!legcuffed)
return FALSE
var/obj/item/W = legcuffed
if(isnull(W))
return FALSE
legcuffed = null
toggle_move_intent()
update_inv_legcuffed()
if(client)
client.screen -= W
if(show_message)
visible_message("<span class='warning'>[W] falls off of [src]!</span>")
W.forceMove(drop_location())
W.dropped(src)
if(W)
W.layer = initial(W.layer)
W.plane = initial(W.plane)
return TRUE
/mob/living/carbon/proc/slip(description, knockdown, tilesSlipped, walkSafely, slipAny, slipVerb = "slip")