block_parry_data ![code/modules/mob/living/living_blocking_parrying.dm 21](git.png)
Carries data like list data that would be a waste of memory if we initialized the list on every /item as we can cache datums easier.
Vars | |
autoparry_cooldown_absolute | Hard autoparry cooldown |
---|---|
autoparry_mouse_delay_maximum | ADVANCED - Autoparry requirement for time since last moused over for a specific object |
autoparry_sequence_simulation | Autoparry : Simulate a parry sequence starting at a certain tick, or simply simulate a single attack parry? |
autoparry_sequence_start_time | Decisecond of sequence to start on. -1 to start to 0th tick of active parry window. |
autoparry_single_efficiency | Single attack autoparry - efficiency |
autoparry_single_efficiency_override | Single attack autoparry - efficiency overrides by attack type, see above |
block_active_priority | The priority we get in mob/do_run_block() while we're being used to parry. |
block_automatic_directions | Directions that you can autoblock in. Null to default to normal directions. |
block_automatic_enabled | Can this item automatically block? |
block_automatic_mitigation_multiplier | Effectiveness multiplier for automated block. Only applies to efficiency, absorption and limits stay the same! |
block_automatic_stamina_multiplier | Stamina cost multiplier for automated block |
block_damage_absorption | Amount of "free" damage blocking absorbs |
block_damage_absorption_override | Override absorption, list("[ATTACK_TYPE_DEFINE]" = absorption), see [block_damage_absorption] |
block_damage_limit | Upper bound of damage block, anything above this will go right through. |
block_damage_limit_override | Override upper bound of damage block, list("[ATTACK_TYPE_DEFINE]" = absorption), see [block_damage_limit] |
block_damage_multiplier | Ratio of damage to allow through above absorption and below limit. Multiplied by damage to determine how much to let through. Lower is better. |
block_damage_multiplier_override | Override damage overrun efficiency, list("[ATTACK_TYPE_DEFINE]" = absorption), see [block_damage_efficiency] |
block_end_click_cd_add | Clickdelay added to user after block ends |
block_lock_attacking | Disallow attacking during block |
block_lock_sprinting | Disallow sprinting during block |
block_no_stambuffer_regeneration | Prevent stamina buffer regeneration while block? |
block_no_stamina_regeneration | Prevent stamina regeneration while block? |
block_projectile_mitigation | The blocked variable of on_hit() on projectiles is impacted by this. Higher is better, 0 to 100, percentage. |
block_resting_attack_types_anydir | Bitfield for attack types that we can block while down. This will work in any direction. |
block_resting_attack_types_directional | Bitfield for attack types that we can block while down but only in our normal directions. |
block_resting_stamina_penalty_multiplier | Multiplier to stamina damage taken for attacks blocked while downed. |
block_resting_stamina_penalty_multiplier_override | Override list for multiplier to stamina damage taken for attacks blocked while down. list("[ATTACK_TYPE_DEFINE]" = multiplier_number) |
block_slowdown | Our slowdown added while blocking |
block_sounds | Sounds for blocking |
block_stamina_buffer_ratio | Ratio of stamina incurred by chest (so after [block_stamina_limb_ratio] runs) that is buffered. |
block_stamina_cost_per_second | Stamina dealt directly via UseStaminaBuffer() per SECOND of block. |
block_stamina_efficiency | Default damage-to-stamina coefficient, higher is better. This is based on amount of damage BLOCKED, not initial damage, to prevent damage from "double dipping". |
block_stamina_efficiency_override | Override damage-to-stamina coefficient, see [block_efficiency], this should be list("[ATTACK_TYPE_DEFINE]" = coefficient_number) |
block_stamina_limb_ratio | Ratio of stamina incurred by blocking that goes to the arm holding the object instead of the chest. Has no effect if this is not held in hand. |
block_start_delay | Windup before we have our blocking active. |
can_block_attack_types | Attacks we can block |
can_block_directions | //////// BLOCKING //////////// NOTE: FOR ATTACK_TYPE_DEFINE, you MUST wrap it in "[DEFINE_HERE]"! The defines are bitflags, and therefore, NUMBERS! See defines. Point of reference is someone facing north. |
parry_allow_repeated_counterattacks | Allow multiple counterattacks per parry sequence. Bad idea. |
parry_attack_types | Attack types we can block |
parry_automatic_enabled | Can this data automatically parry? This is off by default because this is something that requires thought to balance. |
parry_cooldown | Parrying cooldown, separate of clickdelay. It must be this much deciseconds since their last parry for them to parry with this object. |
parry_data | Parry effect data. |
parry_effect_icon_state | Visual icon state override for parrying |
parry_efficiency_considered_successful | Efficiency must be at least this to be considered successful |
parry_efficiency_perfect | Efficiency in percent on perfect parry. |
parry_efficiency_perfect_override | Override for attack types, list("[ATTACK_TYPE_DEFINE]" = perecntage) for perfect efficiency. |
parry_efficiency_to_counterattack | Efficiency must be at least this to run automatic counterattack |
parry_failed_clickcd_duration | Clickdelay duration post-parry if you fail to parry an attack |
parry_failed_cooldown_duration | Parry cooldown post-parry if failed. This is ADDED to parry_cooldown!!! |
parry_failed_stagger_duration | Stagger duration post-parry if you fail to parry an attack |
parry_flags | Parry flags |
parry_imperfect_falloff_percent | Parry "efficiency" falloff in percent per decisecond once perfect window is over. |
parry_imperfect_falloff_percent_override | [parry_imperfect_falloff_percent] override for attack types, list("[ATTACK_TYPE_DEFINE]" = deciseconds) |
parry_max_attacks | Maximum attacks to parry successfully or unsuccessfully (but not efficiency < 0) during active period, hitting this immediately ends the sequence. |
parry_respect_clickdelay | //////// PARRYING //////////// Priority for mob/do_run_block() while we're being used to parry. Parry doesn't work if you aren't able to otherwise attack due to clickdelay |
parry_sounds | Sounds for parrying |
parry_stamina_cost | Parry stamina cost |
parry_start_sound | Parry start sound |
parry_time_active | Main parry window in deciseconds. This is between [parry_time_windup] and [parry_time_spindown] |
parry_time_active_visual_override | If set, overrides visual duration of active period |
parry_time_perfect | Perfect parry window in deciseconds from the start of the main window. 3 with main 5 = perfect on third decisecond of main window. |
parry_time_perfect_leeway | Time on both sides of perfect parry that still counts as part of the perfect window. |
parry_time_perfect_leeway_override | [parry_time_perfect_leeway] override for attack types, list("[ATTACK_TYPE_DEFINE]" = deciseconds) |
parry_time_spindown | Parry spindown duration in deciseconds. main stage end to this is the spindown stage, afterwards the parry fully ends. |
parry_time_spindown_visual_override | If set, overrides visual duration of spindown |
parry_time_windup | Parry windup duration in deciseconds. 0 to this is windup, afterwards is main stage. |
parry_time_windup_visual_override | If set, overrides visual duration of windup |
perfect_parry_block_return_flags | Flags added to return value |
perfect_parry_block_return_list | List appended to block return |
Procs | |
attack_type_list_scan | Quirky proc to get average of flags in list that are in attack_type because why is attack_type a flag. |
get_parry_efficiency | Gets the percentage efficiency of our parry. |
render_html_readout | Generates a HTML render of this datum for self-documentation Maybe make this tgui-next someday haha god this is ugly as sin. Does NOT include the popout or title or anything. Just the variables and explanations.. |
Var Details
autoparry_cooldown_absolute ![code/modules/mob/living/living_blocking_parrying.dm 188](git.png)
Hard autoparry cooldown
autoparry_mouse_delay_maximum ![code/modules/mob/living/living_blocking_parrying.dm 202](git.png)
ADVANCED - Autoparry requirement for time since last moused over for a specific object
autoparry_sequence_simulation ![code/modules/mob/living/living_blocking_parrying.dm 190](git.png)
Autoparry : Simulate a parry sequence starting at a certain tick, or simply simulate a single attack parry?
autoparry_sequence_start_time ![code/modules/mob/living/living_blocking_parrying.dm 198](git.png)
Decisecond of sequence to start on. -1 to start to 0th tick of active parry window.
autoparry_single_efficiency ![code/modules/mob/living/living_blocking_parrying.dm 193](git.png)
Single attack autoparry - efficiency
autoparry_single_efficiency_override ![code/modules/mob/living/living_blocking_parrying.dm 195](git.png)
Single attack autoparry - efficiency overrides by attack type, see above
block_active_priority ![code/modules/mob/living/living_blocking_parrying.dm 39](git.png)
The priority we get in mob/do_run_block() while we're being used to parry.
block_automatic_directions ![code/modules/mob/living/living_blocking_parrying.dm 101](git.png)
Directions that you can autoblock in. Null to default to normal directions.
block_automatic_enabled ![code/modules/mob/living/living_blocking_parrying.dm 99](git.png)
Can this item automatically block?
block_automatic_mitigation_multiplier ![code/modules/mob/living/living_blocking_parrying.dm 103](git.png)
Effectiveness multiplier for automated block. Only applies to efficiency, absorption and limits stay the same!
block_automatic_stamina_multiplier ![code/modules/mob/living/living_blocking_parrying.dm 105](git.png)
Stamina cost multiplier for automated block
block_damage_absorption ![code/modules/mob/living/living_blocking_parrying.dm 44](git.png)
Amount of "free" damage blocking absorbs
block_damage_absorption_override ![code/modules/mob/living/living_blocking_parrying.dm 46](git.png)
Override absorption, list("[ATTACK_TYPE_DEFINE]" = absorption), see [block_damage_absorption]
block_damage_limit ![code/modules/mob/living/living_blocking_parrying.dm 54](git.png)
Upper bound of damage block, anything above this will go right through.
block_damage_limit_override ![code/modules/mob/living/living_blocking_parrying.dm 56](git.png)
Override upper bound of damage block, list("[ATTACK_TYPE_DEFINE]" = absorption), see [block_damage_limit]
block_damage_multiplier ![code/modules/mob/living/living_blocking_parrying.dm 49](git.png)
Ratio of damage to allow through above absorption and below limit. Multiplied by damage to determine how much to let through. Lower is better.
block_damage_multiplier_override ![code/modules/mob/living/living_blocking_parrying.dm 51](git.png)
Override damage overrun efficiency, list("[ATTACK_TYPE_DEFINE]" = absorption), see [block_damage_efficiency]
block_end_click_cd_add ![code/modules/mob/living/living_blocking_parrying.dm 33](git.png)
Clickdelay added to user after block ends
block_lock_attacking ![code/modules/mob/living/living_blocking_parrying.dm 35](git.png)
Disallow attacking during block
block_lock_sprinting ![code/modules/mob/living/living_blocking_parrying.dm 37](git.png)
Disallow sprinting during block
block_no_stambuffer_regeneration ![code/modules/mob/living/living_blocking_parrying.dm 80](git.png)
Prevent stamina buffer regeneration while block?
block_no_stamina_regeneration ![code/modules/mob/living/living_blocking_parrying.dm 82](git.png)
Prevent stamina regeneration while block?
block_projectile_mitigation ![code/modules/mob/living/living_blocking_parrying.dm 59](git.png)
The blocked variable of on_hit() on projectiles is impacted by this. Higher is better, 0 to 100, percentage.
block_resting_attack_types_anydir ![code/modules/mob/living/living_blocking_parrying.dm 85](git.png)
Bitfield for attack types that we can block while down. This will work in any direction.
block_resting_attack_types_directional ![code/modules/mob/living/living_blocking_parrying.dm 87](git.png)
Bitfield for attack types that we can block while down but only in our normal directions.
block_resting_stamina_penalty_multiplier ![code/modules/mob/living/living_blocking_parrying.dm 89](git.png)
Multiplier to stamina damage taken for attacks blocked while downed.
block_resting_stamina_penalty_multiplier_override ![code/modules/mob/living/living_blocking_parrying.dm 91](git.png)
Override list for multiplier to stamina damage taken for attacks blocked while down. list("[ATTACK_TYPE_DEFINE]" = multiplier_number)
block_slowdown ![code/modules/mob/living/living_blocking_parrying.dm 31](git.png)
Our slowdown added while blocking
block_sounds ![code/modules/mob/living/living_blocking_parrying.dm 94](git.png)
Sounds for blocking
block_stamina_buffer_ratio ![code/modules/mob/living/living_blocking_parrying.dm 75](git.png)
Ratio of stamina incurred by chest (so after [block_stamina_limb_ratio] runs) that is buffered.
block_stamina_cost_per_second ![code/modules/mob/living/living_blocking_parrying.dm 78](git.png)
Stamina dealt directly via UseStaminaBuffer() per SECOND of block.
block_stamina_efficiency ![code/modules/mob/living/living_blocking_parrying.dm 69](git.png)
Default damage-to-stamina coefficient, higher is better. This is based on amount of damage BLOCKED, not initial damage, to prevent damage from "double dipping".
block_stamina_efficiency_override ![code/modules/mob/living/living_blocking_parrying.dm 71](git.png)
Override damage-to-stamina coefficient, see [block_efficiency], this should be list("[ATTACK_TYPE_DEFINE]" = coefficient_number)
block_stamina_limb_ratio ![code/modules/mob/living/living_blocking_parrying.dm 73](git.png)
Ratio of stamina incurred by blocking that goes to the arm holding the object instead of the chest. Has no effect if this is not held in hand.
block_start_delay ![code/modules/mob/living/living_blocking_parrying.dm 41](git.png)
Windup before we have our blocking active.
can_block_attack_types ![code/modules/mob/living/living_blocking_parrying.dm 29](git.png)
Attacks we can block
can_block_directions ![code/modules/mob/living/living_blocking_parrying.dm 27](git.png)
//////// BLOCKING //////////// NOTE: FOR ATTACK_TYPE_DEFINE, you MUST wrap it in "[DEFINE_HERE]"! The defines are bitflags, and therefore, NUMBERS! See defines. Point of reference is someone facing north.
parry_allow_repeated_counterattacks ![code/modules/mob/living/living_blocking_parrying.dm 181](git.png)
Allow multiple counterattacks per parry sequence. Bad idea.
parry_attack_types ![code/modules/mob/living/living_blocking_parrying.dm 115](git.png)
Attack types we can block
parry_automatic_enabled ![code/modules/mob/living/living_blocking_parrying.dm 186](git.png)
Can this data automatically parry? This is off by default because this is something that requires thought to balance.
parry_cooldown ![code/modules/mob/living/living_blocking_parrying.dm 159](git.png)
Parrying cooldown, separate of clickdelay. It must be this much deciseconds since their last parry for them to parry with this object.
parry_data ![code/modules/mob/living/living_blocking_parrying.dm 147](git.png)
Parry effect data.
parry_effect_icon_state ![code/modules/mob/living/living_blocking_parrying.dm 157](git.png)
Visual icon state override for parrying
parry_efficiency_considered_successful ![code/modules/mob/living/living_blocking_parrying.dm 151](git.png)
Efficiency must be at least this to be considered successful
parry_efficiency_perfect ![code/modules/mob/living/living_blocking_parrying.dm 143](git.png)
Efficiency in percent on perfect parry.
parry_efficiency_perfect_override ![code/modules/mob/living/living_blocking_parrying.dm 145](git.png)
Override for attack types, list("[ATTACK_TYPE_DEFINE]" = perecntage) for perfect efficiency.
parry_efficiency_to_counterattack ![code/modules/mob/living/living_blocking_parrying.dm 153](git.png)
Efficiency must be at least this to run automatic counterattack
parry_failed_clickcd_duration ![code/modules/mob/living/living_blocking_parrying.dm 167](git.png)
Clickdelay duration post-parry if you fail to parry an attack
parry_failed_cooldown_duration ![code/modules/mob/living/living_blocking_parrying.dm 169](git.png)
Parry cooldown post-parry if failed. This is ADDED to parry_cooldown!!!
parry_failed_stagger_duration ![code/modules/mob/living/living_blocking_parrying.dm 165](git.png)
Stagger duration post-parry if you fail to parry an attack
parry_flags ![code/modules/mob/living/living_blocking_parrying.dm 117](git.png)
Parry flags
parry_imperfect_falloff_percent ![code/modules/mob/living/living_blocking_parrying.dm 139](git.png)
Parry "efficiency" falloff in percent per decisecond once perfect window is over.
parry_imperfect_falloff_percent_override ![code/modules/mob/living/living_blocking_parrying.dm 141](git.png)
[parry_imperfect_falloff_percent] override for attack types, list("[ATTACK_TYPE_DEFINE]" = deciseconds)
parry_max_attacks ![code/modules/mob/living/living_blocking_parrying.dm 155](git.png)
Maximum attacks to parry successfully or unsuccessfully (but not efficiency < 0) during active period, hitting this immediately ends the sequence.
parry_respect_clickdelay ![code/modules/mob/living/living_blocking_parrying.dm 111](git.png)
//////// PARRYING //////////// Priority for mob/do_run_block() while we're being used to parry. Parry doesn't work if you aren't able to otherwise attack due to clickdelay
parry_sounds ![code/modules/mob/living/living_blocking_parrying.dm 163](git.png)
Sounds for parrying
parry_stamina_cost ![code/modules/mob/living/living_blocking_parrying.dm 113](git.png)
Parry stamina cost
parry_start_sound ![code/modules/mob/living/living_blocking_parrying.dm 161](git.png)
Parry start sound
parry_time_active ![code/modules/mob/living/living_blocking_parrying.dm 124](git.png)
Main parry window in deciseconds. This is between [parry_time_windup] and [parry_time_spindown]
parry_time_active_visual_override ![code/modules/mob/living/living_blocking_parrying.dm 129](git.png)
If set, overrides visual duration of active period
parry_time_perfect ![code/modules/mob/living/living_blocking_parrying.dm 133](git.png)
Perfect parry window in deciseconds from the start of the main window. 3 with main 5 = perfect on third decisecond of main window.
parry_time_perfect_leeway ![code/modules/mob/living/living_blocking_parrying.dm 135](git.png)
Time on both sides of perfect parry that still counts as part of the perfect window.
parry_time_perfect_leeway_override ![code/modules/mob/living/living_blocking_parrying.dm 137](git.png)
[parry_time_perfect_leeway] override for attack types, list("[ATTACK_TYPE_DEFINE]" = deciseconds)
parry_time_spindown ![code/modules/mob/living/living_blocking_parrying.dm 122](git.png)
Parry spindown duration in deciseconds. main stage end to this is the spindown stage, afterwards the parry fully ends.
parry_time_spindown_visual_override ![code/modules/mob/living/living_blocking_parrying.dm 131](git.png)
If set, overrides visual duration of spindown
parry_time_windup ![code/modules/mob/living/living_blocking_parrying.dm 120](git.png)
Parry windup duration in deciseconds. 0 to this is windup, afterwards is main stage.
parry_time_windup_visual_override ![code/modules/mob/living/living_blocking_parrying.dm 127](git.png)
If set, overrides visual duration of windup
perfect_parry_block_return_flags ![code/modules/mob/living/living_blocking_parrying.dm 173](git.png)
Flags added to return value
perfect_parry_block_return_list ![code/modules/mob/living/living_blocking_parrying.dm 177](git.png)
List appended to block return
Proc Details
attack_type_list_scan
Quirky proc to get average of flags in list that are in attack_type because why is attack_type a flag.
get_parry_efficiency
Gets the percentage efficiency of our parry.
Returns a percentage in normal 0 to 100 scale, but not clamped to just 0 to 100. This is a proc to allow for overriding. @params
- attack_type - int, bitfield of the attack type(s)
- parry_time - deciseconds since start of the parry.
render_html_readout
Generates a HTML render of this datum for self-documentation Maybe make this tgui-next someday haha god this is ugly as sin. Does NOT include the popout or title or anything. Just the variables and explanations..