From 1a800cc470e3e8e469549e1abdfba708e6d96be8 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 7 Jun 2021 19:40:16 -0700 Subject: [PATCH] modifications --- code/__HELPERS/yelling.dm | 6 ++++-- code/game/objects/items/dualsaber.dm | 2 -- code/game/objects/items/electrostaff.dm | 1 - code/game/objects/items/melee/energy.dm | 3 +++ code/game/objects/items/melee/misc.dm | 1 - code/game/objects/items/shields.dm | 7 +++++-- code/game/objects/items/weaponry.dm | 2 -- .../clock_weapons/ratvarian_spear.dm | 1 - code/modules/clothing/gloves/miscellaneous.dm | 5 ++--- .../mining/equipment/kinetic_crusher.dm | 1 - code/modules/mob/living/living_active_parry.dm | 18 ++++++++++-------- .../mob/living/living_blocking_parrying.dm | 6 +++--- code/modules/smithing/finished_items.dm | 3 ++- 13 files changed, 29 insertions(+), 27 deletions(-) diff --git a/code/__HELPERS/yelling.dm b/code/__HELPERS/yelling.dm index 6fc9cd7846..6987aef262 100644 --- a/code/__HELPERS/yelling.dm +++ b/code/__HELPERS/yelling.dm @@ -16,8 +16,10 @@ // blatantly copied from wave explosion code // check explosion2.dm for what this does and how it works. /datum/yelling_wavefill/proc/do_run(atom/source, dist) - var/list/edges = list(source = (NORTH|SOUTH|EAST|WEST)) - var/list/powers = list(source = dist) + var/list/edges = list() + edges[source] = (NORTH|SOUTH|EAST|WEST) + var/list/powers = list() + powers[source] = dist var/list/processed_last = list() var/turf/T var/turf/expanding diff --git a/code/game/objects/items/dualsaber.dm b/code/game/objects/items/dualsaber.dm index 5ae79b3c3a..eea189c3be 100644 --- a/code/game/objects/items/dualsaber.dm +++ b/code/game/objects/items/dualsaber.dm @@ -71,7 +71,6 @@ parry_imperfect_falloff_percent = 10 parry_efficiency_considered_successful = 25 // VERY generous parry_failed_stagger_duration = 3 SECONDS - parry_failed_clickcd_duration = CLICK_CD_MELEE /obj/item/dualsaber/directional_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction) if((attack_type & ATTACK_TYPE_PROJECTILE) && is_energy_reflectable_projectile(object)) @@ -374,7 +373,6 @@ TEXT_ATTACK_TYPE_PROJECTILE = 30, ) parry_failed_stagger_duration = 3 SECONDS - parry_failed_clickcd_duration = 2 SECONDS /obj/item/dualsaber/hypereutactic/chaplain/ComponentInitialize() . = ..() diff --git a/code/game/objects/items/electrostaff.dm b/code/game/objects/items/electrostaff.dm index 2828841b22..9bb12d18b8 100644 --- a/code/game/objects/items/electrostaff.dm +++ b/code/game/objects/items/electrostaff.dm @@ -62,7 +62,6 @@ ) // not extremely punishing to fail, but no spamming the parry. parry_failed_stagger_duration = 1.5 SECONDS - parry_failed_clickcd_duration = 1 SECONDS /obj/item/electrostaff/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index f1201dca4f..1be570b62b 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -126,6 +126,9 @@ parry_efficiency_perfect = 100 parry_failed_stagger_duration = 4 SECONDS parry_cooldown = 0.5 SECONDS + parry_automatic_enabled = TRUE + autoparry_single_efficiency = 65 + autoparry_cooldown_absolute = 3 SECONDS /obj/item/melee/transforming/energy/sword/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index a981ad98a0..6278eb5f36 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -194,7 +194,6 @@ parry_efficiency_perfect = 100 parry_stamina_cost = 5 parry_failed_stagger_duration = 2 SECONDS - parry_failed_clickcd_duration = CLICK_CD_RANGE parry_cooldown = 0 /obj/item/melee/rapier/active_parry_reflex_counter(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list, parry_efficiency, list/effect_text) diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index d5b3674564..9aed545509 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -34,6 +34,10 @@ block_damage_absorption = 5 block_resting_stamina_penalty_multiplier = 2 block_projectile_mitigation = 75 + block_damage_absorption_override = list( + TEXT_ATTACK_TYPE_TACKLE = INFINITY, + TEXT_ATTACK_TYPE_THROWN = 10 + ) /obj/item/shield/examine(mob/user) . = ..() @@ -374,11 +378,10 @@ /obj/item/shield/riot/flash/on_shield_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) . = ..() - if (. && !embedded_flash.crit_fail) + if (. && damage && !embedded_flash.crit_fail) embedded_flash.activate() update_icon() - /obj/item/shield/riot/flash/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/assembly/flash/handheld)) var/obj/item/assembly/flash/handheld/flash = W diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 4ee9427ec8..37bdc33659 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -364,7 +364,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 parry_time_perfect = 2.5 // however... parry_time_perfect_leeway = 2 // the entire time, the parry is perfect parry_failed_stagger_duration = 1 SECONDS - parry_failed_clickcd_duration = 1 SECONDS // more forgiving punishments for missed parries // still, don't fucking miss your parries or you're down stamina and staggered to shit /datum/block_parry_data/bokken/quick_parry/proj @@ -481,7 +480,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 parry_time_perfect = 1 parry_time_perfect_leeway = 1 parry_failed_stagger_duration = 1 SECONDS - parry_failed_clickcd_duration = 1 SECONDS /datum/block_parry_data/bokken/waki/quick_parry/proj 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 d0f63ac887..b702b19566 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 @@ -93,4 +93,3 @@ 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/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index a337439931..d96ded67d2 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -224,10 +224,9 @@ parry_efficiency_considered_successful = 0.01 parry_efficiency_to_counterattack = INFINITY // no auto counter parry_max_attacks = INFINITY - parry_failed_cooldown_duration = 2.25 SECONDS - parry_failed_stagger_duration = 2.25 SECONDS + parry_failed_cooldown_duration = 1.5 SECONDS + parry_failed_stagger_duration = 1.5 SECONDS parry_cooldown = 0 - parry_failed_clickcd_duration = 0 /obj/item/clothing/gloves/fingerless/pugilist/mauler name = "mauler gauntlets" diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 859ea58d26..ddec9232ce 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -196,7 +196,6 @@ parry_imperfect_falloff_percent = 20 parry_efficiency_to_counterattack = 100 // perfect parry or you're cringe parry_failed_stagger_duration = 1.5 SECONDS // a good time to reconsider your actions... - parry_failed_clickcd_duration = 1.5 SECONDS // or your failures /obj/item/kinetic_crusher/glaive/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 you're dumb enough to go for a parry... var/turf/proj_turf = owner.loc // destabilizer bolt, ignoring cooldown diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index b0e1f7d9ef..a673b81203 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -238,12 +238,13 @@ // before doing anything, check if the user moused over them properly if(!client) return BLOCK_NONE - var/found = FALSE - for(var/i in client.moused_over_objects) - if(i == object) - if((client.moused_over_objects[i] + (data.autoparry_mouse_delay_maximum SECONDS)) >= world.time) - found = TRUE - break + var/found = attacker == client.mouseObject + if(!found) + for(var/i in client.moused_over_objects) + if(i == object) + if((client.moused_over_objects[i] + (data.autoparry_mouse_delay_maximum)) >= world.time) + found = TRUE + break if(!found) return BLOCK_NONE @@ -267,7 +268,7 @@ if(isnull(efficiency)) efficiency = data.autoparry_single_efficiency var/method = determined[1] - switch(parrying) + switch(method) if(ITEM_PARRY) var/obj/item/I = determined[3] . = I.on_active_parry(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, null, TRUE) @@ -347,7 +348,8 @@ // If they're not currently parrying, attempt auto parry if(stage == NOT_PARRYING) if(!allow_auto || SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) - return attempt_auto_parry(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list) + return BLOCK_NONE + return attempt_auto_parry(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list) else return BLOCK_NONE var/datum/block_parry_data/data = get_parry_data() diff --git a/code/modules/mob/living/living_blocking_parrying.dm b/code/modules/mob/living/living_blocking_parrying.dm index d32ef5a2ac..3a828e0c81 100644 --- a/code/modules/mob/living/living_blocking_parrying.dm +++ b/code/modules/mob/living/living_blocking_parrying.dm @@ -108,7 +108,7 @@ GLOBAL_LIST_EMPTY(block_parry_data) /// Priority for [mob/do_run_block()] while we're being used to parry. // None - Parry is always highest priority! /// Parry doesn't work if you aren't able to otherwise attack due to clickdelay - var/parry_respect_clickdelay = TRUE + var/parry_respect_clickdelay = FALSE /// Parry stamina cost var/parry_stamina_cost = 5 /// Attack types we can block @@ -164,7 +164,7 @@ GLOBAL_LIST_EMPTY(block_parry_data) /// Stagger duration post-parry if you fail to parry an attack var/parry_failed_stagger_duration = 3.5 SECONDS /// Clickdelay duration post-parry if you fail to parry an attack - var/parry_failed_clickcd_duration = 2 SECONDS + var/parry_failed_clickcd_duration = 0 SECONDS /// Parry cooldown post-parry if failed. This is ADDED to parry_cooldown!!! var/parry_failed_cooldown_duration = 0 SECONDS @@ -199,7 +199,7 @@ GLOBAL_LIST_EMPTY(block_parry_data) // Clickdelay/cooldown settings not included, as well as whether or not to lock attack/sprinting/etc. They will be pulled from the above. /// ADVANCED - Autoparry requirement for time since last moused over for a specific object - var/autoparry_mouse_delay_maximum = 0.5 + var/autoparry_mouse_delay_maximum = 0.5 SECONDS /** * Quirky proc to get average of flags in list that are in attack_type because why is attack_type a flag. diff --git a/code/modules/smithing/finished_items.dm b/code/modules/smithing/finished_items.dm index 06953f462c..27be8c034d 100644 --- a/code/modules/smithing/finished_items.dm +++ b/code/modules/smithing/finished_items.dm @@ -266,7 +266,6 @@ parry_time_perfect = 2 parry_time_perfect_leeway = 2 parry_failed_stagger_duration = 3 SECONDS - parry_failed_clickcd_duration = 3 SECONDS parry_time_windup = 0 parry_time_spindown = 0 parry_imperfect_falloff_percent = 0 @@ -274,6 +273,8 @@ parry_efficiency_considered_successful = 120 parry_efficiency_perfect = 120 parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 4) + parry_automatic_enabled = TRUE + autoparry_single_efficiency = 75 //unique hammers /obj/item/melee/smith/hammer/toolbox