call DisableTrigger( GetTriggeringTrigger())
call UnitDamageTarget( u , t , DMG(GetUnitAbilityLevel(u, ID)) , IS_RANGED , IS_MEELE , AtkType , DmgType , WepType )
call EnableTrigger( GetTriggeringTrigger())
Quick question, little learning experience for me. What does this part do? (explain in details please:thup
JASS:call DisableTrigger( GetTriggeringTrigger()) call UnitDamageTarget( u , t , DMG(GetUnitAbilityLevel(u, ID)) , IS_RANGED , IS_MEELE , AtkType , DmgType , WepType ) call EnableTrigger( GetTriggeringTrigger())
Also, how is this static if offtopic. It's a suggestion to improve your code yet you are dismissing it as offtopic.
Lets see what can happen if you remove those lines:
Event: Target takes damage from SomeOne
Action: Damage Target
You damaged to the target, and that will fire the event again, so trigger will run over and over instantly.If you are lucky, you won't get fatal error at first time
Shortly, you must disable trigger before deal damage.
set t = null at the end of Init function.
PLEASE SOME CRITISM!
I want a reason that this shouldnt be approved.
The Blademaster is so quickly with his attack, so he can move incredibly fast behind the target, dealing damage.
The Blademaster is adept at the art of swordsmanship, he can quickly move behind a target, dealing additional damage.
private function Cons takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit() , GetOwningPlayer(GetEventDamageSource())) and /*
*/ GetRandomInt(0, 100) <= CHANC(GetUnitAbilityLevel(GetEventDamageSource(), ID)) and /*
*/ not IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) and /*
*/ GetUnitAbilityLevel(GetEventDamageSource() , ID) > 0
endfunction