From b74d465b6c6703f166c9fd3845b87493df81cb5c Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sat, 30 May 2020 01:22:09 -0700 Subject: [PATCH] fix --- code/game/objects/items/melee/energy.dm | 21 ++++++++++++++++++- .../antagonists/clockcult/clock_structure.dm | 2 +- .../modules/mob/living/living_active_parry.dm | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index e4cfeab20f..7707192578 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -105,9 +105,28 @@ sharpness = IS_SHARP embedding = list("embed_chance" = 75, "embedded_impact_pain_multiplier" = 10) armour_penetration = 35 - block_chance = 50 + item_flags = NEEDS_PERMIT | ITEM_CAN_PARRY + block_parry_data = /datum/block_parry_data/energy_sword var/list/possible_colors = list("red" = LIGHT_COLOR_RED, "blue" = LIGHT_COLOR_LIGHT_CYAN, "green" = LIGHT_COLOR_GREEN, "purple" = LIGHT_COLOR_LAVENDER) +/datum/block_parry_data/energy_sword + parry_time_windup = 0 + parry_time_active = 20 + parry_time_spindown = 0 + // we want to signal to players the most dangerous phase, the time when automatic counterattack is a thing. + parry_time_windup_visual_override = 1 + parry_time_active_visual_override = 3 + parry_time_spindown_visual_override = 12 + parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK // esword users can attack while parrying. + parry_time_perfect = 2.5 // first ds isn't perfect + parry_time_perfect_leeway = 1.5 + parry_imperfect_falloff_percent = 10 + parry_efficiency_to_counterattack = 100 + parry_efficiency_considered_successful = 65 // VERY generous + parry_efficiency_perfect = 100 + parry_failed_stagger_duration = 2 SECONDS + parry_cooldown = 2 SECONDS + /obj/item/melee/transforming/energy/sword/Initialize(mapload) . = ..() set_sword_color() diff --git a/code/modules/antagonists/clockcult/clock_structure.dm b/code/modules/antagonists/clockcult/clock_structure.dm index 13da9c5a42..2464015b6b 100644 --- a/code/modules/antagonists/clockcult/clock_structure.dm +++ b/code/modules/antagonists/clockcult/clock_structure.dm @@ -101,7 +101,7 @@ return 1 return ..() -/obj/structure/destructible/clockwork/attacked_by(obj/item/I, mob/living/user) +/obj/structure/destructible/clockwork/attacked_by(obj/item/I, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) if(is_servant_of_ratvar(user) && immune_to_servant_attacks) return FALSE return ..() diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index 21289e58d6..a9bb68b5db 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -66,6 +66,8 @@ /mob/living/proc/end_parry_sequence() if(!parrying) return + REMOVE_TRAIT(src, TRAIT_MOBILITY_NOUSE, ACTIVE_PARRY_TRAIT) + REMOVE_TRAIT(src, TRAIT_SPRINT_LOCKED, ACTIVE_PARRY_TRAIT) if(parry_visual_effect) QDEL_NULL(parry_visual_effect) var/datum/block_parry_data/data = get_parry_data()