- Joined
- Jul 15, 2007
- Messages
- 36
Hi all
Once again, I am puzzled;
I am trying to run a function that takes a unit then damages it over time and reduces it's armour (or increases the damage delt)
i have tried:
I know I can do the DoT via timers, but what about the armour reduction / damage increase?
My attempt at using the dummy to do the work:
Cheers and Thank-you!
Once again, I am puzzled;
I am trying to run a function that takes a unit then damages it over time and reduces it's armour (or increases the damage delt)
i have tried:
- Custom ability based on beserk to do increase damage when hit - when i get a unit to order this on itself, it loses it's previous move order
- Custom ability based on Unholy Frenzy - can't get the unit to even cast it on itself, nor to get a dummy unit to cast it on the target unit
- My allowed targets on both is: enemy, air, ground.
I know I can do the DoT via timers, but what about the armour reduction / damage increase?
My attempt at using the dummy to do the work:
JASS:
function Scorched_Actions takes unit u, integer level returns nothing
local unit dummy = CreateUnit(Player(0), 'h005', GetUnitX(u), GetUnitY(u), 270)
if level == 1 then
call UnitAddAbility(dummy, 'A027')
call UnitAddAbility(dummy, 'A028')
call IssueTargetOrder(dummy, "berserk", u)
call IssueTargetOrder(dummy, "unholyfrenzy", u)
call UnitRemoveAbility(dummy, 'A027')
call UnitRemoveAbility(dummy, 'A028')
elseif level == 2 then
call UnitAddAbility(dummy, 'A029')
call UnitAddAbility(dummy, 'A02A')
call IssueTargetOrder(dummy, "berserk", u)
call IssueTargetOrder(dummy, "unholyfrenzy", u)
call UnitRemoveAbility(dummy, 'A029')
call UnitRemoveAbility(dummy, 'A02A')
elseif level == 3 then
call UnitAddAbility(dummy, 'A02B')
call UnitAddAbility(dummy, 'A02C')
call IssueTargetOrder(dummy, "berserk", u)
call IssueTargetOrder(dummy, "unholyfrenzy", u)
call UnitRemoveAbility(dummy, 'A02B')
call UnitRemoveAbility(dummy, 'A02C')
elseif level == 4 then
call UnitAddAbility(dummy, 'A02D')
call UnitAddAbility(dummy, 'A02E')
call IssueTargetOrder(dummy, "berserk", u)
call IssueTargetOrder(dummy, "unholyfrenzy", u)
call UnitRemoveAbility(dummy, 'A02D')
call UnitRemoveAbility(dummy, 'A02E')
elseif level == 5 then
call UnitAddAbility(dummy, 'A02F')
call UnitAddAbility(dummy, 'A02G')
call IssueTargetOrder(dummy, "berserk", u)
call IssueTargetOrder(dummy, "unholyfrenzy", u)
call UnitRemoveAbility(dummy, 'A02F')
call UnitRemoveAbility(dummy, 'A02G')
elseif level == 6 then
call UnitAddAbility(dummy, 'A02H')
call UnitAddAbility(dummy, 'A02I')
call IssueTargetOrder(dummy, "berserk", u)
call IssueTargetOrder(dummy, "unholyfrenzy", u)
call UnitRemoveAbility(dummy, 'A02H')
call UnitRemoveAbility(dummy, 'A02I')
endif
call TriggerSleepAction(0.2)
call KillUnit(dummy)
call RemoveUnit(dummy)
endfunction
Cheers and Thank-you!