Name | Type | is_array | initial_value |
DamageBlockingAbility | abilcode | No | |
DamageEvent | real | No | |
DamageEventAmount | real | No | |
DamageEventExplodesUnit | boolean | No | |
DamageEventOverride | boolean | No | |
DamageEventPrevAmt | real | No | |
DamageEventSource | unit | No | |
DamageEventsWasted | integer | No | |
DamageEventTarget | unit | No | |
DamageEventTrigger | trigger | No | |
DamageEventType | integer | No | |
DamageModifierEvent | real | No | |
DamageTypeDOT | integer | No | |
DamageTypeRanged | integer | No | |
DamageTypeSpell | integer | No | |
DmgEvLife | real | No | |
DmgEvN | integer | No | |
DmgEvStack | unit | Yes | |
DmgEvTimer | timer | No | |
DmgTypPrev | integer | No | |
se | unit | No | |
TempUnit | unit | No | |
UDex | integer | No | |
UDexGen | integer | No | |
UDexNext | integer | Yes | |
UDexPrev | integer | Yes | |
UDexRecycle | integer | No | |
UDexUnits | unit | Yes | |
UDexWasted | integer | No | |
UnitDamageRegistered | boolean | Yes | |
UnitIndexerEnabled | boolean | No | |
UnitIndexEvent | real | No | |
UnitIndexLock | integer | Yes |
//TESH.scrollpos=6
//TESH.alwaysfold=0
REQUIREMENTS:
Object editor:
•Units: "Unit"
•Abilities: "Aspect of the Cheetah [Hero]" - "Aspect of the Cheetah [Unit]" - "Aspect of the Cheetah [Daze]"
•Buffs: "Aspect of the Cheetah [Invisible]" - "Aspect of the Cheetah [Buff]" - "Dazed"
Trigger editor:
•Folders: "Requirements" (Damage Engine and Unit Indexer) - "Ability" (AotC)
END OF REQUIREMENTS
To configure the spell you can change some values in the trigger and others in the object editor.
ALERT: You have to change some strings in the code for the correct work of the ability
SPECIAL THANKS TO:
TheHiveWorkShop: Magtheridon96
TheHiveWorkShop: Bribe
Created by KhaosMachine
//TESH.scrollpos=79
//TESH.alwaysfold=0
//CONFIGURABLES
function AotC_HeroAbility takes nothing returns integer
return 'A000'//Hero ability raw code
endfunction
function AotC_UnitAbility takes nothing returns integer
return 'A001'//Buff ability raw code
endfunction
function AotC_DazeAbility takes nothing returns integer
return 'A002'//Daze ability raw code
endfunction
function AotC_AbilityBuff takes nothing returns integer
return 'B000'//Buff ability raw code
endfunction
function AotC_UnitId takes nothing returns integer
return 'u000'//Caster unit rawcode
endfunction
function AotC_LearnSpellOrderId takes nothing returns integer
return 1093677104//Id of the order learn the ability
endfunction
function AotC_TurnOn takes nothing returns integer
return 852177//Id of the order "immolation"
endfunction
function AotC_TurnOff takes nothing returns integer
return 852178//Id of the order "unimmolation"
endfunction
function AotC_UnitAOrder takes nothing returns string
return "bloodlust"//Buff ability order
endfunction
function AotC_DazeOrder takes nothing returns string
return "slow"//Daze ability order
endfunction
function AotC_Preload takes nothing returns boolean
return true
endfunction
//END OF CONFIGURABLES
function AotC_Action2 takes nothing returns boolean
local unit c = GetTriggerUnit()
local unit u
local integer i
if GetUnitAbilityLevel(c, AotC_AbilityBuff()) > 0 then
set i = GetUnitAbilityLevel(c, AotC_HeroAbility())
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), AotC_UnitId(), GetUnitX(c), GetUnitY(c), 0)
call UnitAddAbility(u, AotC_DazeAbility())
call SetUnitAbilityLevel(c, AotC_DazeAbility(), i)
call IssueTargetOrder(u, AotC_DazeOrder(), c)
call UnitApplyTimedLife(u, 'BTLF', .5)
set u = null
endif
set c = null
return false
endfunction
function AotC_Action1 takes nothing returns boolean
local unit c = GetTriggerUnit()
local unit u
local integer i
if GetIssuedOrderId() == AotC_TurnOn() then
set i = GetUnitAbilityLevel(c, AotC_HeroAbility())
set u = CreateUnit(GetTriggerPlayer(), AotC_UnitId(), GetUnitX(c), GetUnitY(c), 0)
call UnitAddAbility(u, AotC_UnitAbility())
call SetUnitAbilityLevel(u, AotC_UnitAbility(), i)
call IssueTargetOrder(u, AotC_UnitAOrder(), c)
call UnitApplyTimedLife(u, 'BTLF', .5)
set u = null
elseif GetIssuedOrderId() == AotC_TurnOff() then
call UnitRemoveAbility(c, AotC_AbilityBuff())
elseif GetIssuedOrderId() == AotC_LearnSpellOrderId() and GetUnitAbilityLevel(c, AotC_AbilityBuff()) > 0 then
set i = GetUnitAbilityLevel(c, AotC_HeroAbility())
call UnitRemoveAbility(c, AotC_AbilityBuff())
set u = CreateUnit(GetTriggerPlayer(), AotC_UnitId(), GetUnitX(c), GetUnitY(c), 0)
call UnitAddAbility(u, AotC_UnitAbility())
call SetUnitAbilityLevel(u, AotC_UnitAbility(), i + 1)
call IssueTargetOrder(u, AotC_UnitAOrder(), c)
call UnitApplyTimedLife(u, 'BTLF', .5)
set u = null
endif
set c = null
set u = null
return false
endfunction
function InitTrig_AotC takes nothing returns nothing
local trigger t = CreateTrigger()
local unit u
if AotC_Preload() then
set u = CreateUnit(Player(0), AotC_UnitId(), 0, 0, 0)
call UnitAddAbility(u, AotC_UnitAbility())
call UnitAddAbility(u, AotC_DazeAbility())
call RemoveUnit(u)
endif
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t, Condition(function AotC_Action1))
set t = CreateTrigger()
call TriggerRegisterVariableEvent(t, "udg_DamageEvent", EQUAL, 1)
call TriggerAddCondition(t, Condition(function AotC_Action2))
set t = null
set u = null
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_MS_Actions takes nothing returns nothing
call BJDebugMsg("The current movement speed of " + GetUnitName(udg_se) + " is: " + I2S(R2I(GetUnitMoveSpeed(udg_se))))
endfunction
function InitTrig_MS takes nothing returns nothing
set gg_trg_MS = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_MS, Player(0), "-ms", true )
call TriggerAddAction( gg_trg_MS, function Trig_MS_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_SELECTED_Actions takes nothing returns nothing
set udg_se = GetTriggerUnit()
call BJDebugMsg(OrderId2String(GetUnitCurrentOrder(udg_se)))
endfunction
//===========================================================================
function InitTrig_SELECTED takes nothing returns nothing
set gg_trg_SELECTED = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_SELECTED, Player(0), true )
call TriggerAddAction( gg_trg_SELECTED, function Trig_SELECTED_Actions )
endfunction