JASS:
function AUO takes unit IYE,unit m5 returns nothing
local real HGE='d'*GetUnitState(m5,UNIT_STATE_LIFE)/ GetUnitState(m5,UNIT_STATE_MAX_LIFE)
local integer AWO=2*GetUnitAbilityLevel(IYE,'A1A3')
local trigger t=CreateTrigger()
local integer K3V=GetHandleId(t)
if H3V(IYE)then
set AWO=AWO/2
set AWO=AWO*90
set HGE=GetUnitState(m5,UNIT_STATE_MAX_LIFE)-GetUnitState(m5,UNIT_STATE_LIFE)
set AWO=IMinBJ(AWO,R2I(HGE))
call G6V(IYE,AWO)
call HEV(IYE)
call DPV(t,'i',AWO)
call DFV(t,'u',IYE)
call TriggerRegisterTimerEvent(t,.35,false)
call TriggerAddCondition(t,Condition(function ATO))
else
call KYV(IYE,"ASO")
call TriggerRegisterTimerEvent(t,.35,false)
call TriggerAddCondition(t,Condition(function ASO))
call A7(K3V,"Source",IYE)
if IsUnitType(m5,UNIT_TYPE_HERO)==false then
set AWO=AWO/ 2
endif
if H3V(IYE)then
set AWO=AWO*4
endif
if HGE>80 then
call Q6V(IYE,AWO)
elseif HGE>60 then
call Q6V(IYE,AWO*2)
elseif HGE>40 then
call Q6V(IYE,AWO*2*2)
elseif HGE>20 then
call Q6V(IYE,AWO*2*2*2)
else
call Q6V(IYE,AWO*2*2*2*2)
I wonder if some one can help me,, I have a bug in this map well bugs and been fixing them.,,, i had alot but most are fixed. but the above is buggedfor some reason if u take this spell (spell id A1A3) on the hero ID EC77 then the spell does double damage, instead of 90 it does a maxmim of 180 but on all the other heros itsfine
now i want to add a code
GetUnitTypeId(IYE)=='EC77' then
set AWO=AWO*45 instead of 90 when its on a other hero
but I am not that sharp in jass any help