This commit is contained in:
silicons
2021-02-28 00:27:14 -07:00
parent e483ce8dfc
commit 70c828f74d
14 changed files with 35 additions and 33 deletions
+2
View File
@@ -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"
+2 -2
View File
@@ -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
-2
View File
@@ -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(
+5 -5
View File
@@ -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
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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(
+12 -6
View File
@@ -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
@@ -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(
@@ -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
@@ -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
@@ -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
@@ -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)
@@ -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
+2 -2
View File
@@ -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)