mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
Fixes an issue with limited martial arts (#24187)
* GDNNNNNNNN * This too
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#define MARTIAL_COMBO_DONE_CLEAR_COMBOS 5 // If the combo should do a basic hit after it's done
|
||||
|
||||
#define MARTIAL_ARTS_CANNOT_USE -1
|
||||
#define MARTIAL_ARTS_ACT_SUCCESS 1
|
||||
|
||||
#define MARTIAL_COMBO_STEP_HARM "Harm"
|
||||
#define MARTIAL_COMBO_STEP_DISARM "Disarm"
|
||||
|
||||
@@ -97,19 +97,19 @@
|
||||
if(MARTIAL_COMBO_FAIL)
|
||||
current_combos -= MC
|
||||
if(MARTIAL_COMBO_DONE_NO_CLEAR)
|
||||
. = TRUE
|
||||
. = MARTIAL_ARTS_ACT_SUCCESS
|
||||
current_combos -= MC
|
||||
if(MARTIAL_COMBO_DONE)
|
||||
reset_combos()
|
||||
return TRUE
|
||||
return MARTIAL_ARTS_ACT_SUCCESS
|
||||
if(MARTIAL_COMBO_DONE_BASIC_HIT)
|
||||
basic_hit(user, target)
|
||||
reset_combos()
|
||||
return TRUE
|
||||
return MARTIAL_ARTS_ACT_SUCCESS
|
||||
if(MARTIAL_COMBO_DONE_CLEAR_COMBOS)
|
||||
combos.Cut()
|
||||
reset_combos()
|
||||
return TRUE
|
||||
return MARTIAL_ARTS_ACT_SUCCESS
|
||||
if(!LAZYLEN(current_combos))
|
||||
reset_combos()
|
||||
if(HAS_COMBOS && could_start_new_combo)
|
||||
|
||||
@@ -486,7 +486,7 @@
|
||||
return
|
||||
|
||||
/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(attacker_style && attacker_style.help_act(user, target))//adminfu only...
|
||||
if(attacker_style && attacker_style.help_act(user, target) == MARTIAL_ARTS_ACT_SUCCESS)//adminfu only...
|
||||
return TRUE
|
||||
if(target.on_fire)
|
||||
user.pat_out(target)
|
||||
@@ -500,7 +500,7 @@
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s grab attempt!</span>")
|
||||
return FALSE
|
||||
if(attacker_style && attacker_style.grab_act(user, target))
|
||||
if(attacker_style && attacker_style.grab_act(user, target) == MARTIAL_ARTS_ACT_SUCCESS)
|
||||
return TRUE
|
||||
else
|
||||
target.grabbedby(user)
|
||||
@@ -532,7 +532,7 @@
|
||||
return FALSE
|
||||
if(SEND_SIGNAL(target, COMSIG_HUMAN_ATTACKED, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return FALSE
|
||||
if(attacker_style && attacker_style.harm_act(user, target))
|
||||
if(attacker_style && attacker_style.harm_act(user, target) == MARTIAL_ARTS_ACT_SUCCESS)
|
||||
return TRUE
|
||||
else
|
||||
var/datum/unarmed_attack/attack = user.dna.species.unarmed
|
||||
@@ -587,7 +587,7 @@
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
playsound(target.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
return FALSE
|
||||
if(attacker_style && attacker_style.disarm_act(user, target))
|
||||
if(attacker_style && attacker_style.disarm_act(user, target) == MARTIAL_ARTS_ACT_SUCCESS)
|
||||
return TRUE
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
if(target.move_resist > user.pull_force)
|
||||
|
||||
Reference in New Issue
Block a user