mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 06:34:45 +01:00
Stops you from grabbing someone if you are horizontal (#22563)
* Gotcha! Oh wait- * Update code/modules/mob/living/living_defense.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Works for now, oculd use a cleanup later * Nice it works * Contra review --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
/datum/martial_art/drunk_brawling
|
||||
name = "Drunken Brawling"
|
||||
weight = 2
|
||||
can_horizontally_grab = FALSE
|
||||
|
||||
/datum/martial_art/drunk_brawling/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(prob(70))
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
combos = list(/datum/martial_combo/judo/discombobulate, /datum/martial_combo/judo/eyepoke, /datum/martial_combo/judo/judothrow, /datum/martial_combo/judo/armbar, /datum/martial_combo/judo/wheelthrow)
|
||||
weight = 5 //takes priority over boxing and drunkneness, less priority than krav or CQC/carp
|
||||
no_baton_reason = "<span class='warning'>The baton feels off balance in your hand due to your judo training!</span>"
|
||||
can_horizontally_grab = FALSE
|
||||
|
||||
//Corporate Judo Belt
|
||||
|
||||
@@ -58,6 +59,11 @@
|
||||
add_attack_logs(A, D, "Melee attacked with [src]")
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/judo/grab_act(mob/living/carbon/human/attacker, mob/living/carbon/human/defender)
|
||||
if(IS_HORIZONTAL(attacker))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/judo/explaination_header(user)
|
||||
to_chat(user, "<b><i>You recall the teachings of Corporate Judo.</i></b>")
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
var/datum/action/leg_sweep/legsweep = new/datum/action/leg_sweep()
|
||||
var/datum/action/lung_punch/lungpunch = new/datum/action/lung_punch()
|
||||
var/datum/action/neutral_stance/neutral = new/datum/action/neutral_stance()
|
||||
can_horizontally_grab = FALSE
|
||||
|
||||
/datum/action/neutral_stance
|
||||
name = "Neutral Stance - You relax, cancelling your last Krav Maga stance attack."
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
var/weight = 0
|
||||
/// Message displayed when someone uses a baton when its forbidden by a martial art
|
||||
var/no_baton_reason = "Your martial arts training prevents you from wielding batons."
|
||||
/// Whether or not you can grab someone while horizontal with this Martial Art
|
||||
var/can_horizontally_grab = TRUE
|
||||
|
||||
/datum/martial_art/New()
|
||||
. = ..()
|
||||
|
||||
@@ -268,6 +268,10 @@
|
||||
return FALSE
|
||||
if(user.pull_force < move_force)
|
||||
return FALSE
|
||||
// This if-statement checks if the user is horizontal, and if the user either has no martial art, or has judo, drunk fighting or krav, in which case it should also fail
|
||||
if(IS_HORIZONTAL(user) && (!user.mind.martial_art || !user.mind.martial_art.can_horizontally_grab))
|
||||
to_chat(user, "<span class='warning'>You fail to get a good grip on [src]!</span>")
|
||||
return
|
||||
|
||||
for(var/obj/item/grab/G in grabbed_by)
|
||||
if(G.assailant == user)
|
||||
|
||||
Reference in New Issue
Block a user