more handling

This commit is contained in:
kevinz000
2020-05-30 01:59:58 -07:00
parent 1214c99a34
commit 519552cb78
3 changed files with 33 additions and 16 deletions
@@ -1,9 +1,4 @@
// Active directional block system. Shared code is in [living_blocking_parrying.dm]
/mob/living/on_item_dropped(obj/item/I)
if(I == active_block_item)
stop_active_blocking()
return ..()
/mob/living/proc/stop_active_blocking(was_forced = FALSE)
if(!(combat_flags & (COMBAT_FLAG_ACTIVE_BLOCK_STARTING | COMBAT_FLAG_ACTIVE_BLOCKING)))
return FALSE
@@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(block_parry_data)
/// Override absorption, list("[ATTACK_TYPE_DEFINE]" = absorption), see [block_damage_absorption]
var/list/block_damage_absorption_override
/// Ratio of damage block above absorption amount, coefficient, lower is better, this is multiplied by damage to determine how much is blocked.
/// Ratio of damage to allow through above absorption and below limit. Multiplied by damage to determine how much to let through. Lower is better.
var/block_damage_multiplier = 0.5
/// Override damage overrun efficiency, list("[ATTACK_TYPE_DEFINE]" = absorption), see [block_damage_efficiency]
var/list/block_damage_multiplier_override
@@ -170,3 +170,10 @@ GLOBAL_LIST_EMPTY(block_parry_data)
if(!CHECK_MOBILITY(src, MOBILITY_USE))
to_chat(src, "<span class='warning'>Your parry is interrupted!</span>")
end_parry_sequence()
/mob/living/on_item_dropped(obj/item/I)
if(I == active_block_item)
stop_active_blocking()
if(I == active_parry_item))
end_parry_sequence()
return ..()