From 70c828f74d26789c02b1456e0a87eb0e76c8741d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 28 Feb 2021 00:27:14 -0700 Subject: [PATCH] changes --- code/__DEFINES/combat/block.dm | 2 ++ code/datums/martial/sleeping_carp.dm | 4 ++-- code/game/objects/items/dualsaber.dm | 2 -- code/game/objects/items/electrostaff.dm | 10 +++++----- code/game/objects/items/melee/energy.dm | 6 +++--- code/game/objects/items/melee/misc.dm | 4 ++-- code/game/objects/items/weaponry.dm | 18 ++++++++++++------ .../objects/structures/beds_chairs/chair.dm | 2 +- .../clock_weapons/ratvarian_spear.dm | 2 +- .../mob/living/carbon/human/human_defines.dm | 2 +- .../modules/mob/living/carbon/human/species.dm | 8 ++------ code/modules/mob/living/living_active_parry.dm | 2 +- .../mob/living/living_blocking_parrying.dm | 2 +- code/modules/smithing/finished_items.dm | 4 ++-- 14 files changed, 35 insertions(+), 33 deletions(-) diff --git a/code/__DEFINES/combat/block.dm b/code/__DEFINES/combat/block.dm index bc85947d71..9be4aaa2bf 100644 --- a/code/__DEFINES/combat/block.dm +++ b/code/__DEFINES/combat/block.dm @@ -63,6 +63,8 @@ #define BLOCK_RETURN_MITIGATION_PERCENT "partial_mitigation" /// Used internally by run_parry proc, use on an on_active_parry() proc to override parrying efficiency. #define BLOCK_RETURN_OVERRIDE_PARRY_EFFICIENCY "override_parry_efficiency" +/// Used internally by run_parry proc, use on an on_active_parry() proc to prevent counterattacks +#define BLOCK_RETURN_FORCE_NO_PARRY_COUNTERATTACK "no_parry_counterattack" /// Always set to 100 by run_block() if BLOCK_SUCCESS is in return value. Otherwise, defaults to mitigation percent if not set. Used by projectile/proc/on_hit(). #define BLOCK_RETURN_PROJECTILE_BLOCK_PERCENTAGE "projectile_block_percentage" diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 5881c76827..e926da78d0 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -144,8 +144,8 @@ parry_time_active_visual_override = 3 parry_time_spindown_visual_override = 12 parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK //can attack while - parry_time_perfect = 2.5 // first ds isn't perfect - parry_time_perfect_leeway = 1.5 + parry_time_perfect = 2.5 + parry_time_perfect_leeway = 2.5 parry_imperfect_falloff_percent = 5 parry_efficiency_to_counterattack = 100 parry_efficiency_considered_successful = 65 // VERY generous diff --git a/code/game/objects/items/dualsaber.dm b/code/game/objects/items/dualsaber.dm index 3d62a98ddf..86522b9587 100644 --- a/code/game/objects/items/dualsaber.dm +++ b/code/game/objects/items/dualsaber.dm @@ -69,7 +69,6 @@ parry_time_perfect = 2 // first ds isn't perfect parry_time_perfect_leeway = 1 parry_imperfect_falloff_percent = 10 - parry_efficiency_to_counterattack = 100 parry_efficiency_considered_successful = 25 // VERY generous parry_failed_stagger_duration = 3 SECONDS parry_failed_clickcd_duration = CLICK_CD_MELEE @@ -369,7 +368,6 @@ parry_time_perfect = 1 parry_time_perfect_leeway = 1 parry_imperfect_falloff_percent = 7.5 - parry_efficiency_to_counterattack = 100 parry_efficiency_considered_successful = 80 parry_efficiency_perfect = 120 parry_efficiency_perfect_override = list( diff --git a/code/game/objects/items/electrostaff.dm b/code/game/objects/items/electrostaff.dm index 31aaff12b5..71cebc38c6 100644 --- a/code/game/objects/items/electrostaff.dm +++ b/code/game/objects/items/electrostaff.dm @@ -45,15 +45,15 @@ // no attacking while blocking block_lock_attacking = TRUE - parry_time_windup = 1 - parry_time_active = 5 + parry_time_windup = 0 + parry_time_active = 7 parry_time_spindown = 0 parry_time_spindown_visual_override = 1 parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK | PARRY_LOCK_ATTACKING // no attacking while parrying parry_time_perfect = 0 parry_time_perfect_leeway = 0.5 - parry_efficiency_perfect = 100 - parry_imperfect_falloff_percent = 1 + parry_efficiency_perfect = 85 + parry_imperfect_falloff_percent = 10 parry_imperfect_falloff_percent_override = list( TEXT_ATTACK_TYPE_PROJECTILE = 45 // really crappy vs projectiles ) @@ -61,7 +61,7 @@ TEXT_ATTACK_TYPE_PROJECTILE = 1 // extremely harsh window for projectiles ) // not extremely punishing to fail, but no spamming the parry. - parry_cooldown = 2.5 SECONDS + parry_cooldown = 1.5 SECONDS parry_failed_stagger_duration = 1.5 SECONDS parry_failed_clickcd_duration = 1 SECONDS diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 55546a7f9c..f1201dca4f 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -121,7 +121,7 @@ parry_time_perfect = 2.5 // first ds isn't perfect parry_time_perfect_leeway = 1.5 parry_imperfect_falloff_percent = 5 - parry_efficiency_to_counterattack = 100 + parry_efficiency_to_counterattack = INFINITY parry_efficiency_considered_successful = 65 // VERY generous parry_efficiency_perfect = 100 parry_failed_stagger_duration = 4 SECONDS @@ -149,8 +149,8 @@ /obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) . = ..() - if(parry_efficiency >= 80) // perfect parry - block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER + if(parry_efficiency >= 100) // perfect parry + block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT . |= BLOCK_SHOULD_REDIRECT /obj/item/melee/transforming/energy/sword/cyborg diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 15d10c4d11..d2dea3c502 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -81,7 +81,7 @@ parry_imperfect_falloff_percent = 30 parry_efficiency_perfect = 100 parry_failed_stagger_duration = 3 SECONDS - parry_failed_clickcd_duration = 2 SECONDS + parry_failed_clickcd_duration = 1 SECONDS /obj/item/melee/sabre/Initialize() . = ..() @@ -192,7 +192,7 @@ TEXT_ATTACK_TYPE_PROJECTILE = 50 // useless after 3rd decisecond ) parry_imperfect_falloff_percent = 30 - parry_efficiency_to_counterattack = 100 + parry_efficiency_to_counterattack = INFINITY parry_efficiency_considered_successful = 1 parry_efficiency_perfect = 100 parry_data = list( diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 554ea81974..a826900871 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -315,6 +315,12 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 bare_wound_bonus = 0 wound_bonus = 0 +/obj/item/melee/bokken/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) + . = ..() + if(!istype(object, /obj/item/melee/bokken)) + // no counterattack. + block_return[BLOCK_RETURN_FORCE_NO_PARRY_COUNTERATTACK] = TRUE + /datum/block_parry_data/bokken // fucked up parry data, emphasizing quicker, shorter parries parry_stamina_cost = 10 // be wise about when you parry, though, else you won't be able to fight enough to make it count parry_time_windup = 0 @@ -417,7 +423,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 desc = "A misnomer of sorts, this is effectively a blunt katana made from steelwood, a dense organic wood derived from steelcaps. Why steelwood? Druids can use it. Duh." icon_state = "bokken_steel" item_state = "bokken_steel" - force = 12 + force = 12 stamina_damage_increment = 3 /obj/item/melee/bokken/waki @@ -427,7 +433,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 item_state = "wakibokken" slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_NORMAL - force = 6 + force = 6 stamina_damage_increment = 4 block_parry_data = /datum/block_parry_data/bokken/waki default_parry_data = /datum/block_parry_data/bokken/waki @@ -442,7 +448,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 parry_time_perfect_leeway = 1 parry_imperfect_falloff_percent = 7.5 parry_efficiency_to_counterattack = 120 - parry_efficiency_considered_successful = 65 + parry_efficiency_considered_successful = 65 parry_efficiency_perfect = 120 parry_efficiency_perfect_override = list( TEXT_ATTACK_TYPE_PROJECTILE = 30, @@ -455,10 +461,10 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /datum/block_parry_data/bokken/waki/quick_parry //For the parry spammer in you parry_stamina_cost = 2 // Slam that parry button parry_time_active = 2.5 - parry_time_perfect = 1 + parry_time_perfect = 1 parry_time_perfect_leeway = 1 parry_failed_stagger_duration = 1 SECONDS - parry_failed_clickcd_duration = 1 SECONDS + parry_failed_clickcd_duration = 1 SECONDS /datum/block_parry_data/bokken/waki/quick_parry/proj parry_efficiency_perfect_override = list() @@ -468,7 +474,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 desc = "A misnomer of sorts, this is effectively a blunt wakizashi made from steelwood, a dense organic wood derived from steelcaps. Why steelwood? Druids can use it. Duh." icon_state = "wakibokken_steel" item_state = "wakibokken_steel" - force = 8 + force = 8 stamina_damage_increment = 2 /obj/item/melee/bokken/debug diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index 76ab086eb2..89f018f291 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -348,7 +348,7 @@ parry_time_perfect = 1.5 parry_time_perfect_leeway = 1 parry_imperfect_falloff_percent = 7.5 - parry_efficiency_to_counterattack = 100 + parry_efficiency_to_counterattack = INFINITY parry_efficiency_considered_successful = 50 parry_efficiency_perfect = 120 parry_efficiency_perfect_override = list( diff --git a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm index aa69478217..d0f63ac887 100644 --- a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm +++ b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm @@ -90,7 +90,7 @@ parry_time_perfect = 2 parry_efficiency_perfect = 110 //Very low leeway for counterattacks... parry_efficiency_considered_successful = 0.8 - parry_efficiency_to_counterattack = 1 + parry_efficiency_to_counterattack = 110 parry_cooldown = 15 //But also very low cooldown.. parry_failed_stagger_duration = 2 SECONDS //And relatively small penalties for failing. parry_failed_clickcd_duration = 1 SECONDS diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 66d3154ee3..10abc87237 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -140,7 +140,7 @@ ) parry_efficiency_considered_successful = 0.01 - parry_efficiency_to_counterattack = 0.01 + parry_efficiency_to_counterattack = INFINITY // no counterattacks parry_max_attacks = INFINITY parry_failed_cooldown_duration = 1.5 SECONDS parry_failed_stagger_duration = 1 SECONDS diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 8bae43848d..7851631b33 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1559,12 +1559,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) else user.do_attack_animation(target, ATTACK_EFFECT_DISARM) - if(HAS_TRAIT(user, TRAIT_PUGILIST))//CITADEL CHANGE - makes disarmspam cause staminaloss, pugilists can do it almost effortlessly - if(!user.UseStaminaBuffer(1, warn = TRUE)) - return - else - if(!user.UseStaminaBuffer(1, warn = TRUE)) - return + if(!user.UseStaminaBuffer(1, warn = TRUE)) + return if(attacker_style && attacker_style.disarm_act(user,target)) return TRUE diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index 10f8aaf2f4..513fe43747 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -281,7 +281,7 @@ pacifist_counter_check = (!active_parry_item.force || active_parry_item.damtype == STAMINA) else pacifist_counter_check = FALSE //Both martial and unarmed counter attacks generally are harmful, so no need to have the same line twice. - if(efficiency >= data.parry_efficiency_to_counterattack && pacifist_counter_check) + if(efficiency >= data.parry_efficiency_to_counterattack && pacifist_counter_check && !return_list[BLOCK_RETURN_FORCE_NO_PARRY_COUNTERATTACK]) effect_text = run_parry_countereffects(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency) if(data.parry_flags & PARRY_DEFAULT_HANDLE_FEEDBACK) handle_parry_feedback(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, effect_text) diff --git a/code/modules/mob/living/living_blocking_parrying.dm b/code/modules/mob/living/living_blocking_parrying.dm index 9e974177e5..d1ccf7f0c4 100644 --- a/code/modules/mob/living/living_blocking_parrying.dm +++ b/code/modules/mob/living/living_blocking_parrying.dm @@ -139,7 +139,7 @@ GLOBAL_LIST_EMPTY(block_parry_data) /// Efficiency must be at least this to be considered successful var/parry_efficiency_considered_successful = 0.1 /// Efficiency must be at least this to run automatic counterattack - var/parry_efficiency_to_counterattack = 0.1 + var/parry_efficiency_to_counterattack = INFINITY /// Maximum attacks to parry successfully or unsuccessfully (but not efficiency < 0) during active period, hitting this immediately ends the sequence. var/parry_max_attacks = INFINITY /// Visual icon state override for parrying diff --git a/code/modules/smithing/finished_items.dm b/code/modules/smithing/finished_items.dm index 20eaee8a08..06953f462c 100644 --- a/code/modules/smithing/finished_items.dm +++ b/code/modules/smithing/finished_items.dm @@ -209,7 +209,7 @@ parry_time_perfect = 2 parry_time_perfect_leeway = 0.75 parry_imperfect_falloff_percent = 7.5 - parry_efficiency_to_counterattack = 100 + parry_efficiency_to_counterattack = INFINITY parry_efficiency_considered_successful = 80 parry_efficiency_perfect = 120 parry_failed_stagger_duration = 3 SECONDS @@ -270,7 +270,7 @@ parry_time_windup = 0 parry_time_spindown = 0 parry_imperfect_falloff_percent = 0 - parry_efficiency_to_counterattack = 100 + parry_efficiency_to_counterattack = INFINITY parry_efficiency_considered_successful = 120 parry_efficiency_perfect = 120 parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 4)