Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shoves v5 #6969

Merged
merged 7 commits into from Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions code/__DEFINES/combat.dm
Expand Up @@ -49,7 +49,6 @@
//Actual combat defines

//click cooldowns, in tenths of a second, used for various combat actions
#define CLICK_CD_DISARM 16 // Disarm actions have a longer cooldown before the next action can be taken
#define CLICK_CD_MELEE 8
#define CLICK_CD_THROW 4
#define CLICK_CD_RANGE 4
Expand Down Expand Up @@ -112,10 +111,12 @@
#define DEFAULT_MESSAGE_RANGE 7

//Shove knockdown lengths (deciseconds)
#define SHOVE_KNOCKDOWN_SOLID 45
#define SHOVE_KNOCKDOWN_SOLID 45 //half of this knockdown is also an immobilize
#define SHOVE_IMMOBILIZE_SOLID 20
#define SHOVE_KNOCKDOWN_HUMAN 30
#define SHOVE_KNOCKDOWN_TABLE 30
#define SHOVE_KNOCKDOWN_COLLATERAL 10
#define SHOVE_CHAIN_PARALYZE 6
//Shove slowdown
#define SHOVE_SLOWDOWN_LENGTH 30
#define SHOVE_SLOWDOWN_STRENGTH 0.85 //multiplier
Expand Down
11 changes: 7 additions & 4 deletions code/modules/mob/living/carbon/human/species.dm
Expand Up @@ -1454,7 +1454,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return

/datum/species/proc/disarm(mob/living/carbon/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
user.changeNext_move(CLICK_CD_DISARM)
if(HAS_TRAIT(target, TRAIT_ONEWAYROAD))
user.visible_message("<span class='userdanger'>Your wrist twists unnaturally as you attempt to shove [target]!</span>", "<span class='warning'>[user]'s wrist twists unnaturally away from [target]!</span>")
user.apply_damage(15, BRUTE, pick(list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)))
Expand Down Expand Up @@ -1503,10 +1502,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(target.IsKnockdown())
var/target_held_item = target.get_active_held_item()
if(target_held_item)
target.drop_all_held_items()
target.visible_message("<span class='danger'>[user.name] kicks \the [target_held_item] out of [target]'s hand!</span>",
"<span class='danger'>[user.name] kicks \the [target_held_item] out of your hand!</span>", null, COMBAT_MESSAGE_RANGE)
log_combat(user, target, "disarms [target_held_item]")
else
target.visible_message("<span class='danger'>[user.name] kicks [target.name] onto [target.p_their()] side!</span>",
"<span class='danger'>[user.name] kicks you onto your side!</span>", null, COMBAT_MESSAGE_RANGE)
log_combat(user, target, "kicks", "onto their side (paralyzing)")
Comment on lines 1504 to +1511
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should honestly just be the same message and log

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's extremely relevant to log whether a weapon was actually disarmed or it was just a stun. There were many many cases of "But they pulled out a weapon" that I had no logs to verify for because the supposed weapon was never logged anywhere since it wasn't used successfully.

Most noteworthy in a few ban bait cases where someone pulls out weapon acts like they will attack but doesn't actually, willingly gets disarmed and then claims the other person killed them for no reason.

Would request you get admin input on whether the difference should be logged for them or not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't log inactive held items though

target.Paralyze(SHOVE_CHAIN_PARALYZE) //duration slightly shorter than disarm cd
if(shove_blocked && !target.is_shove_knockdown_blocked() && !target.buckled)
var/directional_blocked = FALSE
if(shove_dir in GLOB.cardinals) //Directional checks to make sure that we're not shoving through a windoor or something like that
Expand All @@ -1522,12 +1525,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
break
if((!target_table && !target_collateral_human && !target_disposal_bin && !target_pool && !target.IsKnockdown()) || directional_blocked)
target.Knockdown(SHOVE_KNOCKDOWN_SOLID)
target.Immobilize(SHOVE_IMMOBILIZE_SOLID)
user.visible_message("<span class='danger'>[user.name] shoves [target.name], knocking [target.p_them()] down!</span>",
"<span class='danger'>You shove [target.name], knocking [target.p_them()] down!</span>", null, COMBAT_MESSAGE_RANGE)
log_combat(user, target, "shoved", "knocking them down")
else if(target_table)
target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
target.drop_all_held_items()
target.Paralyze(SHOVE_KNOCKDOWN_TABLE)
user.visible_message("<span class='danger'>[user.name] shoves [target.name] onto \the [target_table]!</span>",
"<span class='danger'>You shove [target.name] onto \the [target_table]!</span>", null, COMBAT_MESSAGE_RANGE)
target.throw_at(target_table, 1, 1, null, FALSE) //1 speed throws with no spin are basically just forcemoves with a hard collision check
Expand Down