This commit is contained in:
silicons
2021-05-12 04:23:53 -07:00
parent d547aa7ff1
commit a60f801f69
3 changed files with 4 additions and 5 deletions
@@ -231,7 +231,7 @@
if(!islist(determined))
return FALSE
var/datum/block_parry_data/data = return_block_parry_datum(determined[2])
if(!data.parry_automatic_enabled)
if(!data.parry_automatic_enabled || (last_autoparry > (world.time + data.autoparry_cooldown_absolute)))
return FALSE
// before doing anything, check if the user moused over them properly
if(!client)
@@ -249,6 +249,7 @@
// first, check cooldowns
// now, depending on if we're doing a single simulation or a full sequence
last_autoparry = world.time
if(data.autoparry_sequence_simulation)
// for full sequence simulation
initiate_parry_sequence(TRUE, determined)
@@ -189,10 +189,6 @@ GLOBAL_LIST_EMPTY(block_parry_data)
/// Autoparry : Simulate a parry sequence starting at a certain tick, or simply simulate a single attack parry?
var/autoparry_sequence_simulation = FALSE
// Single attack simulation:
/// Parry cooldown to inflict on single-attack autoparry
var/autoparry_single_parry_cooldown = 3 SECONDS
/// Clickdelay to inflict on single-attack autoparry
var/autoparry_single_click_cooldown = 0
/// Single attack autoparry - efficiency
var/autoparry_single_efficiency = 75
/// Single attack autoparry - efficiency overrides by attack type, see above
@@ -50,6 +50,8 @@
var/obj/effect/abstract/parry/parry_visual_effect
/// world.time of last parry end
var/parry_end_time_last = 0
/// Last autoparry
var/last_autoparry = 0
/// Successful parries within the current parry cycle. It's a list of efficiency percentages.
var/list/successful_parries
/// Current parry counterattacks. Makes sure we can only counterattack someone once per parry.