- Joined
- Mar 2, 2013
- Messages
- 127
I looked at the code, did the math and it looks fine but for some reason it does a lot more damage than its supposed to. like 30* more(guess)
Heres what its supposed to do.
================================
Twin Sacred Return Shield. Orihime creates a barrier which reflects some damage back to enemies. Target unit reflects XX% of the damage they take in an AoE of 300. Lasts 5 seconds.
================================
Level 1 - 10% damage reflection.
Level 2 - 15% damage reflection.
Level 3 - 20% damage reflection.
Cooldown: 100/90/80
Here is the code.
Heres what its supposed to do.
================================
Twin Sacred Return Shield. Orihime creates a barrier which reflects some damage back to enemies. Target unit reflects XX% of the damage they take in an AoE of 300. Lasts 5 seconds.
================================
Level 1 - 10% damage reflection.
Level 2 - 15% damage reflection.
Level 3 - 20% damage reflection.
Cooldown: 100/90/80
Here is the code.
-
Soten Kisshun Set Up
-
Events
- Unit - A unit enters (Current camera bounds)
-
Conditions
- ((Triggering unit) is A Hero) Equal to (==) True
-
Actions
- Trigger - Add to Soten Kisshun Effect <gen> the event (Unit - (Triggering unit) Takes damage)
-
Events
JASS:
function Trig_Soten_Kisshun_Effect_Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(), 'B02K') > 0
endfunction
function Trig_Soten_Kisshun_Effect_Func003002003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Soten_Kisshun_Effect_Func004A takes nothing returns nothing
call SpellConstantDamage( udg_Orihime, GetEnumUnit(), udg_Temp_Real )
endfunction
function Trig_Soten_Kisshun_Effect_Actions takes nothing returns nothing
local group g
if (GetEventDamage() < 0.99) then // Safe action
return
endif
if (IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)==true) then
return
endif
set udg_SotenLocation = GetUnitLoc(udg_Orihime)
set udg_Temp_Real = ( 0.05 + ( 0.05 * I2R(GetUnitAbilityLevel(udg_Orihime,'A0B3')) ) ) * GetEventDamage()
set g = GetUnitsInRangeOfLocMatching(300.00, udg_SotenLocation, Condition(function Trig_Soten_Kisshun_Effect_Func003002003))
call ForGroup( g, function Trig_Soten_Kisshun_Effect_Func004A )
call RemoveLocation(udg_SotenLocation)
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Soten_Kisshun_Effect takes nothing returns nothing
set gg_trg_Soten_Kisshun_Effect = CreateTrigger( )
call TriggerAddCondition( gg_trg_Soten_Kisshun_Effect, Condition( function Trig_Soten_Kisshun_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Soten_Kisshun_Effect, function Trig_Soten_Kisshun_Effect_Actions )
endfunction