I use the following modifier in one of my item's modifier block:
As you can see, it is part of a reimplementation of Battle Fury. Note that this modifier does not have "Attributes" "MODIFIER_ATTRIBUTE_MULTIPLE", so the idea is that regardless of how many Battle Furys the player has, only one "item_battle_fury_rook_modifier_cleave" modifier will be on the player, so the function "item_battle_fury_rook_on_attack_landed" will only be called once every time an attack lands (and not six times if the player has six Battle Furys).
However, as you can see from the WebM I took at http://a.pomf.se/dfwnkj.webm, when the player has multiple Battle Furys, dropping any one on the ground will result in this modifier being completely removed, even if there are still other Battle Furys in the player's inventory. Picking a Battle Fury back up (or buying a new one) restores the modifier.
This has to be a bug; the expected behavior is that one "item_battle_fury_rook_modifier_cleave" modifier would remain applied to the hero so long as they have one or more Battle Furys in their inventory.
Thank you for reading!
Code:
"item_battle_fury_rook_modifier_cleave" { "Passive" "1" "IsHidden" "0" "IsBuff" "0" "IsDebuff" "0" "IsPurgable" "0" "OnAttackLanded" { "RunScript" { "ScriptFile" "custom_scripted_abilities.lua" "Function" "item_battle_fury_rook_on_attack_landed" "CleaveDamagePercentMelee" "%cleave_damage_percent_melee" "CleaveDamagePercentRanged" "%cleave_damage_percent_ranged" "CleaveRadius" "%cleave_radius" "AttackDamage" "%attack_damage" //The damage passed in here is before reductions. } } }
However, as you can see from the WebM I took at http://a.pomf.se/dfwnkj.webm, when the player has multiple Battle Furys, dropping any one on the ground will result in this modifier being completely removed, even if there are still other Battle Furys in the player's inventory. Picking a Battle Fury back up (or buying a new one) restores the modifier.
This has to be a bug; the expected behavior is that one "item_battle_fury_rook_modifier_cleave" modifier would remain applied to the hero so long as they have one or more Battle Furys in their inventory.
Thank you for reading!