Name | Type | is_array | initial_value |
BPaint_AbilityLvl | integer | Yes | |
BPaint_ANIMATION_PUDDLE | string | No | |
BPaint_ANIMATION_RESET | string | No | |
BPaint_ANIMATION_START | string | No | |
BPaint_AOE | real | No | |
BPaint_AOE_PER_LEVEL | real | No | |
BPaint_AttackSpeed | integer | No | |
BPaint_BONUS_AS | integer | No | |
BPaint_BONUS_AS_PER_LEVEL | integer | No | |
BPaint_BONUS_DMG | integer | No | |
BPaint_BONUS_DMG_PER_LEVEL | integer | No | |
BPaint_BONUS_HP | integer | No | |
BPaint_BONUS_HP_PER_LEVEL | integer | No | |
BPaint_BONUS_MS | real | No | |
BPaint_BONUS_MS_PER_LEVEL | real | No | |
BPaint_BONUS_SIZE | real | No | |
BPaint_BONUS_SIZE_PER_LEVEL | real | No | |
BPaint_Caster | unit | Yes | |
BPaint_Counter | real | No | |
BPaint_CurrentColor | integer | Yes | |
BPaint_Damage | integer | No | |
BPaint_GOBLIN_COUNT | integer | No | |
BPaint_GOBLIN_COUNT_PER_LEVEL | integer | No | |
BPaint_GOBLIN_DURATION | real | No | |
BPaint_GOBLIN_DURATION_PER_LVL | real | No | |
BPaint_GoblinCount | integer | Yes | |
BPaint_GroupCount | integer | No | |
BPaint_HitPoints | integer | No | |
BPaint_KEY_ABILITY_LEVEL | integer | No | |
BPaint_KEY_CURRENT_SIZE | integer | No | |
BPaint_KEY_OWNER | integer | No | |
BPaint_KEY_PUDDLE_DURATION | integer | No | |
BPaint_KEY_PUDDLE_RADIUS | integer | No | |
BPaint_KEY_PUDDLE_SFX | integer | No | |
BPaint_KEY_PUDDLE_X | integer | No | |
BPaint_KEY_PUDDLE_Y | integer | No | |
BPaint_KEY_SPELL_ID | integer | No | |
BPaint_MaxIndex | integer | No | |
BPaint_MoveSpeed | real | No | |
BPaint_NodeNext | integer | Yes | |
BPaint_NodePrev | integer | Yes | |
BPaint_Owner | player | No | |
BPaint_PAINT_GOBLIN_UNIT_TYPE | unitcode | No | |
BPaint_PERIODIC_TIMER | real | No | |
BPaint_PUDDLE_DURATION | real | No | |
BPaint_PUDDLE_DURATION_PER_LVL | real | No | |
BPaint_PuddleGroup | group | No | |
BPaint_PuddleUnit | unit | No | |
BPaint_PuddleX | real | No | |
BPaint_PuddleY | real | No | |
BPaint_Radius | real | No | |
BPaint_RecycledSize | integer | No | |
BPaint_RecycledStack | integer | Yes | |
BPaint_SFX_PUDDLE | string | No | |
BPaint_SFX_PUDDLE_AP | string | No | |
BPaint_SFX_PUDDLE_DEATH_TIMER | real | No | |
BPaint_SFX_PUDDLE_SIZE | real | No | |
BPaint_Size | real | No | |
BPaint_SpellCount | integer | No | |
BPaint_SpellId | integer | No | |
BPaint_START_DMG | integer | No | |
BPaint_START_DMG_PER_LEVEL | integer | No | |
BPaint_START_HP | integer | No | |
BPaint_START_HP_PER_LEVEL | integer | No | |
BPaint_START_SIZE | real | No | |
BPaint_START_SIZE_PER_LEVEL | real | No | |
BPaint_TempInt | integer | No | |
BPaint_TempLoc | location | No | |
BPaint_TempReal1 | real | No | |
BPaint_TempReal2 | real | No | |
BPaint_TempUnit | unit | No | |
BPaint_TRIGGER_CREATE_POOL | trigger | No | |
BPaint_TRIGGER_DEATH | trigger | No | |
BPaint_TRIGGER_LOOP_POOL | trigger | No | |
BPaint_UnitId | integer | No | |
CP_HiddenItems | item | Yes | |
CP_HiddenItemsIndex | integer | No | |
CP_Item | item | No | |
CP_Point | location | No | |
CP_PointIsWalkable | boolean | No | |
CP_Rect | rect | No | |
CSS_Abilities | abilcode | Yes | |
CSS_Counter | integer | No | |
CSS_CustomSwitch | boolean | No | |
CSS_EventMainItem | item | No | |
CSS_EventMainItemStacked | item | Yes | |
CSS_EventSocketItem | item | No | |
CSS_EventSocketItemStacked | item | Yes | |
CSS_EventUnit | unit | No | |
CSS_EventUnitStacked | unit | Yes | |
CSS_GemBonusBoolean | boolean | No | |
CSS_GemLevel | integer | No | |
CSS_Hashtable | hashtable | No | |
CSS_Power | integer | Yes | |
CSS_PreloadBoolean | boolean | No | true |
CSS_SocketingEnabled | boolean | No | |
CSS_String | string | Yes | |
DemoMap_AttackLoc | location | Yes | |
DemoMap_FacingAngle | real | Yes | |
DemoMap_LeftSpawn | location | No | |
DemoMap_Owner | player | Yes | |
DemoMap_RightSpawn | location | No | |
DemoMap_SpawnLoc | location | Yes | |
DemoMap_TempInt | integer | No | |
DemoMap_TempUnit | unit | No | |
DemoMap_UnitGroup | group | No | |
DemoMap_UnitType | unitcode | Yes | |
Dummy_Angle | real | Yes | |
Dummy_Count | integer | Yes | |
Dummy_CountHead | integer | Yes | |
Dummy_CountNext | integer | Yes | |
Dummy_CountPrev | integer | Yes | |
Dummy_Hashtable | hashtable | No | |
Dummy_LastInstance | integer | No | |
Dummy_Lower | integer | No | |
Dummy_Next | integer | Yes | |
Dummy_Prev | integer | Yes | |
Dummy_Unit | unit | Yes | |
Dummy_UnitCount | integer | No | |
Dummy_Upper | integer | No | |
Dummy_X | real | No | |
Dummy_Y | real | No | |
EVENT_SOCKET_FINISH | real | No | |
IsUnitPreplaced | boolean | Yes | |
PBomb_ABILITY | abilcode | No | |
PBomb_AbilityLvl | integer | Yes | |
PBomb_Caster | unit | Yes | |
PBomb_Cos | real | Yes | |
PBomb_CurrentColor | integer | Yes | |
PBomb_DistanceTraveled | real | Yes | |
PBomb_DUMMY_UNIT_TYPE | unitcode | No | |
PBomb_DummyCaster | unit | No | |
PBomb_EndZ | real | Yes | |
PBomb_ERROR_MSG1 | string | No | |
PBomb_ERROR_MSG2 | string | No | |
PBomb_ERROR_MSG3 | string | No | |
PBomb_ERROR_SOUND | sound | No | |
PBomb_ErrorMsg | string | No | |
PBomb_Hash | hashtable | No | |
PBomb_Height | real | No | |
PBomb_InRangeGroup | group | No | |
PBomb_KEY_ACTIVE_COLOR_COUNT | integer | Yes | |
PBomb_KEY_CURRENT_COLOR | integer | No | |
PBomb_LocZ | location | No | |
PBomb_LoopInt | integer | No | |
PBomb_MAX_PUDDLES | integer | Yes | |
PBomb_MAX_PUDDLES_PER_LEVEL | integer | Yes | |
PBomb_MaxHeight | real | No | |
PBomb_MaxIndex | integer | No | |
PBomb_MIN_CAST_RANGE | real | No | |
PBomb_MissileSfx | effect | Yes | |
PBomb_MissileUnit | unit | Yes | |
PBomb_MoveRate | real | Yes | |
PBomb_NodeNext | integer | Yes | |
PBomb_NodePrev | integer | Yes | |
PBomb_ORDER_ID | string | No | |
PBomb_Owner | player | Yes | |
PBomb_PERIODIC_TIMER | real | No | |
PBomb_RecycledSize | integer | No | |
PBomb_RecycledStack | integer | Yes | |
PBomb_SFX_DEATH_TIMER | real | Yes | |
PBomb_SFX_MISSILE | string | Yes | |
PBomb_SFX_MISSILE_AP | string | Yes | |
PBomb_Sin | real | Yes | |
PBomb_SpellCount | integer | No | |
PBomb_SpellId | integer | No | |
PBomb_StartZ | real | Yes | |
PBomb_TempInt | integer | No | |
PBomb_TempLoc1 | location | No | |
PBomb_TempLoc2 | location | No | |
PBomb_TempPlayer | player | No | |
PBomb_TempReal1 | real | No | |
PBomb_TempReal2 | real | No | |
PBomb_TempUnit | unit | No | |
PBomb_TotalDistance | real | Yes | |
PBomb_TRAVEL_TIME | real | No | |
PBomb_TRAVEL_TIME_PER_LEVEL | real | No | |
PBomb_TRIGGER_CHECK_PATHING | trigger | No | |
PBomb_TRIGGER_INDEX_COLOR | trigger | Yes | |
PBomb_TRIGGER_LOOP | trigger | No | |
PBomb_TRIGGER_PLAY_ERROR | trigger | No | |
PBomb_UnitId | integer | No | |
RPaint_AOE | real | No | |
RPaint_AOE_PER_LEVEL | real | No | |
RPaint_ATTACK_TYPE | attacktype | No | |
RPaint_BubbleSfx | effect | Yes | |
RPaint_BubbleSizeSfx | real | No | |
RPaint_BubbleUnit | unit | Yes | |
RPaint_Caster | unit | Yes | |
RPaint_CurrentColor | integer | Yes | |
RPaint_CurrentSize | real | Yes | |
RPaint_Damage | real | Yes | |
RPaint_DAMAGE | real | No | |
RPaint_DAMAGE_PER_LEVEL | real | No | |
RPaint_DAMAGE_TYPE | damagetype | No | |
RPaint_GrowRate | real | Yes | |
RPaint_LoopInt | integer | No | |
RPaint_MaxIndex | integer | No | |
RPaint_NodeNext | integer | Yes | |
RPaint_NodePrev | integer | Yes | |
RPaint_Owner | player | Yes | |
RPaint_PERIODIC_TIMER | real | No | |
RPaint_POP_DELAY | real | No | |
RPaint_POP_DELAY_PER_LEVEL | real | No | |
RPaint_PuddleLoc | location | Yes | |
RPaint_PuddleSfx | effect | Yes | |
RPaint_PuddleUnit | unit | Yes | |
RPaint_PuddleX | real | Yes | |
RPaint_PuddleY | real | Yes | |
RPaint_Radius | real | Yes | |
RPaint_RecycledSize | integer | No | |
RPaint_RecycledStack | integer | Yes | |
RPaint_SFX_BUBBLE | string | No | |
RPaint_SFX_BUBBLE_AP | string | No | |
RPaint_SFX_BUBBLE_DEATH_TIMER | real | No | |
RPaint_SFX_BUBBLE_FINAL_SIZE | real | No | |
RPaint_SFX_BUBBLE_START_SIZE | real | No | |
RPaint_SFX_PUDDLE | string | No | |
RPaint_SFX_PUDDLE_AP | string | No | |
RPaint_SFX_PUDDLE_DEATH_TIMER | real | No | |
RPaint_SFX_PUDDLE_SIZE | real | No | |
RPaint_SpellCount | integer | No | |
RPaint_SpellId | integer | No | |
RPaint_TempInt | integer | No | |
RPaint_TempReal | real | No | |
RPaint_TempUnit | unit | No | |
RPaint_TRIGGER_LOOP | trigger | No | |
SPaint_ABILITY | abilcode | No | |
SPaint_CurrentColor | integer | No | |
SPaint_CurrentColorSfx | effect | No | |
SPaint_SFX_ABILITY | abilcode | Yes | |
SPaint_SFX_BUFF | buffcode | Yes | |
SPaint_SFX_CURRENT_COLOR | string | Yes | |
SPaint_SFX_CURRENT_COLOR_AP | string | Yes | |
SPaint_TempUnit | unit | No | |
SPaint_TOTAL_COLORS | integer | No | |
SPaint_TRIGGER_ADD | trigger | No | |
SPaint_UnitId | integer | No | |
UDex | integer | No | |
UDexGen | integer | No | |
UDexNext | integer | Yes | |
UDexPrev | integer | Yes | |
UDexRecycle | integer | No | |
UDexUnits | unit | Yes | |
UDexWasted | integer | No | |
UnitIndexerEnabled | boolean | No | |
UnitIndexEvent | real | No | |
YPaint_ABILITY_SLOW | abilcode | No | |
YPaint_ABILITY_SNARE | abilcode | No | |
YPaint_AbilityLvl | integer | Yes | |
YPaint_AOE | real | No | |
YPaint_AOE_PER_LEVEL | real | No | |
YPaint_BUFF_SLOW | buffcode | No | |
YPaint_BUFF_SNARE | buffcode | No | |
YPaint_Caster | unit | Yes | |
YPaint_Counter | real | Yes | |
YPaint_CurrentColor | integer | Yes | |
YPaint_FINAL_SLOW_FACTOR | real | No | |
YPaint_GroupCount | integer | No | |
YPaint_KEY_ABILITY_LVL | integer | No | |
YPaint_KEY_DURATION | integer | No | |
YPaint_KEY_SFX | integer | No | |
YPaint_LoopInt | integer | No | |
YPaint_MaxIndex | integer | No | |
YPaint_NodeNext | integer | Yes | |
YPaint_NodePrev | integer | Yes | |
YPaint_Owner | player | Yes | |
YPaint_PERIODIC_TIMER | real | No | |
YPaint_PUDDLE_DURATION | real | No | |
YPaint_PUDDLE_DURATION_PER_LVL | real | No | |
YPaint_PuddleSfx | effect | Yes | |
YPaint_PuddleUnit | unit | Yes | |
YPaint_PuddleX | real | Yes | |
YPaint_PuddleY | real | Yes | |
YPaint_Radius | real | Yes | |
YPaint_RecycledSize | integer | No | |
YPaint_RecycledStack | integer | Yes | |
YPaint_SFX_PUDDLE | string | No | |
YPaint_SFX_PUDDLE_AP | string | No | |
YPaint_SFX_PUDDLE_DEATH_TIMER | real | No | |
YPaint_SFX_PUDDLE_SIZE | real | No | |
YPaint_SFX_SLOW | string | No | |
YPaint_SFX_SLOW_AP | string | No | |
YPaint_SLOW_DURATION | real | No | |
YPaint_SLOW_DURATION_PER_LVL | real | No | |
YPaint_SlowCounter | real | No | |
YPaint_SlowedGroup | group | No | |
YPaint_SlowFactor | real | No | |
YPaint_SpellCount | integer | No | |
YPaint_SpellId | integer | No | |
YPaint_START_SLOW_FACTOR | real | No | |
YPaint_Target | unit | No | |
YPaint_TempReal | real | No | |
YPaint_TempUnit | unit | No | |
YPaint_TRIGGER_APPLY_SLOW | trigger | No | |
YPaint_TRIGGER_LOOP | trigger | No | |
YPaint_TRIGGER_LOOP_SLOW | trigger | No | |
YPaint_UnitId | integer | No |
//=============================================================
// How to Import:
//=============================================================
// 1. Copy the DummyRecycler Folder to your map.
//
// 2. Go to your map, before pasting make sure that you check the "Automatically
// create unknown variables while pasting trigger data" in File->Preferences
// of World Editor. After the variables are created, you can then delete the
// corresponding Variable Creator you copied.
//
// 3. Delete DummyRecycler Variable Creator and this trigger instruction.
// DummyRecycler v1.25
// by Flux
//
// A system that recycles dummy units while considering their facing angle.
// It can be used as attachment dummies for visual effects or as dummy caster.
//
// Why is recycling a unit important?
// Because creating a unit is is one of the slowest function in the game
// and there are reports that will always leave a permanent tiny bit of
// memory (0.04 KB).
// On average, retrieving a pending Dummy is approximately 4x faster compared
// to creating a new one and recycling a Dummy compared to removing it is
// approximately 1.3x faster.
// Furthermore, if you're using a lot of "Unit has entered map" events,
// using this system will even result to even more better performance
// because retrieving Dummy units does not cause that event to run.
//
//
// Features:
//
// -- Dummy Sharing
// When a Dummy List gets low on unit count, it will borrow Dummy Units
// from the Dummy List with the highest unit count. The transfer is not
// instant because the shared Dummy Unit has to turn to the appropriate
// angle of its new Dummy List before it can be recycled.
// See BORROW_REQUEST.
//
// -- Self-balancing recycling algorithm
// Recycled Dummy Units will be thrown to the List having the least number
// of Dummy Units.
//
// -- Recycling least used
// Allows recycling a Dummy from the Dummy List with the highest
// unit count. It is useful when the facing angle of the Dummy Unit
// does not matter.
// See GetRecycledDummyAnyAngle.
//
// -- Self-adaptation
// When there are no free Dummy Units from a Dummy List, it will end up creating
// a new unit instead but that unit will be permanently added as a Dummy
// Unit to be recycled increasing the overall total Dummy Unit count.
//
// -- Count control
// Allows limiting the overall number of Dummy Units.
// See MAX_DUMMY_COUNT.
//
// -- Delayed Recycle
// Allows recycling Dummy Units after some delay to allocate time for the
// death animation of Special Effects to be seen.
// See DummyAddRecycleTimer.
//
// ******************************************************************
// ***************************** API: *******************************
// ******************************************************************
//
// function GetRecycledDummy takes real x, real y, real z, real facing returns unit
// - Retrieve an unused Dummy Unit from the List.
// - The equivalent of CreateUnit.
// - To use as a Dummy Caster, follow it with PauseUnit(dummy, false).
//
// function GetRecycledDummyAnyAngle takes real x, real y, real z returns unit
// - Use this function if the facing angle of the Dummy doesn't matter to you.
// - It will return a unit from the list having the highest number of unused Dummy Units.
// - To use as a Dummy Caster, follow it with PauseUnit(dummy, false).
//
// function RecycleDummy takes unit u returns nothing
// - Recycle the Dummy unit for it to be used again later.
// - The equivalent of RemoveUnit.
//
// function DummyAddRecycleTimer takes unit u, real time returns nothing
// - Recycle the Dummy unit after a certain time.
// - Use this to allocate time for the the death animation of an effect attached to the
// Dummy Unit to finish..
// - The equivalent of UnitApplyTimedLife.
//
// function ShowDummy takes unit u, boolean flag returns nothing
// - Shows/hides Dummy Unit without conflicting with the Locust ability.
//
//--------------------
// CREDITS
//--------------------
// Bribe - for the MissileRecycler (vJASS) where I got this concept from
// http://www.hiveworkshop.com/forums/jass-resources-412/system-missilerecycler-206086/
// - for the optional Table
// http://www.hiveworkshop.com/forums/jass-resources-412/snippet-new-table-188084/
// Vexorian - for the Attachable and Pitch Animation Model (dummy.mdx)
// http://www.wc3c.net/showthread.php?t=101150
// Maker and IcemanBo - for the unit permanent 0.04 KB memory leak of units.
// http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/memory-leaks-263410/
// Nestharus - for the data structure
// http://www.hiveworkshop.com/forums/2809461-post7.html
// - for the optional WorldBounds
// http://githubusercontent.com/nestharus/JASS/master/jass/Systems/WorldBounds/script.j
// =============================================================== //
// ====================== CONFIGURATION ========================== //
// =============================================================== //
//The rawcode of the Dummy Unit
constant function Dummy_Rawcode takes nothing returns integer
return 'h001'
endfunction
//The owner of the Dummy Unit
constant function Dummy_Owner takes nothing returns player
return Player(14)
endfunction
//The number of indexed angle. The higher the value the:
// - Lesser the turning time for the Dummy Units.
// - Higher the total number of Dummy Units created at Map Initialization.
// Recommended Value: 10 (Max difference of 18 degrees)
constant function Dummy_Angles takes nothing returns integer
return 10
endfunction
//The number of Dummy units per Dummy_Angle. The higher the value the:
// - Higher the number of units that can be recycled per angle, when
// no more units are in queue, the system will resort to use CreateUnit.
// - Higher the total number of Dummy Units created at Map Initialization.
// Recommended Value: 3 to 5 (for less overhead in Map Loading Screen)
constant function Dummy_StoredUnits takes nothing returns integer
return 3
endfunction
//The maximum number of Dummy units that can exist. When the system resort
//to using CreateUnit, the unit will be permanently added to the Dummy
//List. To avoid spamming Dummy Units and having too much free Dummy
//Units to allocate, the maximum number of Dummy Units is capped.
// Recommended Value: 80 to 120
constant function Dummy_MaxCount takes nothing returns integer
return 100
endfunction
//When a certain angle have less than BORROW_REQUEST units in its list,
//it will start to borrow Dummy Units from the list with the highest
//Dummy Unit count.
// Recommended Value: Half of maximum Dummy_StoredUnits
constant function Dummy_BorrowRequest takes nothing returns integer
return 5
endfunction
//It will only return a Dummy if the current dummy is close
//to it's appropriate facing angle. This is to avoid returning
//a Dummy which is still turning to face it's list angle.
constant function Dummy_AngleTolerance takes nothing returns real
return 10.0
endfunction
//An additional option to automatically hide recycled dummy units in the
//corner of the map camera bounds
constant function Dummy_HideOnMapCorner takes nothing returns boolean
return true
endfunction
// =============================================================== //
// ==================== END CONFIGURATION ======================== //
// =============================================================== //
function Dummy_GetHead takes integer facing returns integer
if facing < 0 or facing >= 360 then
set facing = facing - (facing/360)*360
if facing < 0 then
set facing = facing + 360
endif
endif
return R2I((facing*Dummy_Angles()/360.0))
endfunction
function ShowDummy takes unit u, boolean flag returns nothing
if IsUnitHidden(u) == flag then
call ShowUnit(u, flag)
if flag and GetUnitTypeId(u) == Dummy_Rawcode() then
call UnitRemoveAbility(u, 'Aloc')
call UnitAddAbility(u, 'Aloc')
endif
endif
endfunction
function GetRecycledDummy takes real x, real y, real z, real facing returns unit
local integer head = Dummy_GetHead(R2I(facing + 180.0/Dummy_Angles()))
local integer this = udg_Dummy_Next[head]
local integer countHead
//If there are Dummy Units in the Queue List already facing the appropriate angle
if this != head and RAbsBJ(GetUnitFacing(udg_Dummy_Unit[this]) - udg_Dummy_Angle[head]) <= Dummy_AngleTolerance() then
//Remove from the Queue List
set udg_Dummy_Next[udg_Dummy_Prev[this]] = udg_Dummy_Next[this]
set udg_Dummy_Prev[udg_Dummy_Next[this]] = udg_Dummy_Prev[this]
//For double free protection
set udg_Dummy_Next[this] = -1
//Unit Properties
set bj_lastCreatedUnit = udg_Dummy_Unit[this]
call SetUnitX(bj_lastCreatedUnit, x)
call SetUnitY(bj_lastCreatedUnit, y)
call SetUnitFacing(bj_lastCreatedUnit, facing)
call SetUnitVertexColor(bj_lastCreatedUnit, 255, 255, 255, 255)
call SetUnitFlyHeight(bj_lastCreatedUnit, z, 0)
call ShowDummy(bj_lastCreatedUnit, true)
//------------------------------------------------
// Comment out resets you don't need
//------------------------------------------------
call SetUnitScale(bj_lastCreatedUnit, 1, 0, 0)
call SetUnitAnimationByIndex(bj_lastCreatedUnit, 90)
//Update Count and Bounds
set udg_Dummy_Count[head] = udg_Dummy_Count[head] - 1
//------------------------------------------------
// Unit Sharing
//------------------------------------------------
if udg_Dummy_Count[head] < Dummy_BorrowRequest() and udg_Dummy_Count[udg_Dummy_CountNext[udg_Dummy_CountHead[udg_Dummy_Upper]]] > udg_Dummy_Count[head] then
set udg_Dummy_Count[head] = udg_Dummy_Count[head] + 1
//Take an instance from the UpperBound list
set this = udg_Dummy_Next[udg_Dummy_CountNext[udg_Dummy_CountHead[udg_Dummy_Upper]]]
call SetUnitFacing(udg_Dummy_Unit[this], udg_Dummy_Angle[head])
//Remove
set udg_Dummy_Next[udg_Dummy_Prev[this]] = udg_Dummy_Next[this]
set udg_Dummy_Prev[udg_Dummy_Next[this]] = udg_Dummy_Prev[this]
//Add to the Current List
set udg_Dummy_Next[this] = head
set udg_Dummy_Prev[this] = udg_Dummy_Prev[head]
set udg_Dummy_Next[udg_Dummy_Prev[this]] = this
set udg_Dummy_Prev[udg_Dummy_Next[this]] = this
set head = udg_Dummy_CountNext[udg_Dummy_CountHead[udg_Dummy_Upper]]
set udg_Dummy_Count[head] = udg_Dummy_Count[head] - 1
endif
//---------------------------
//Update Count Lists
//---------------------------
//Remove from the current Count List
set udg_Dummy_CountNext[udg_Dummy_CountPrev[head]] = udg_Dummy_CountNext[head]
set udg_Dummy_CountPrev[udg_Dummy_CountNext[head]] = udg_Dummy_CountPrev[head]
//Add to the new Count List
set countHead = udg_Dummy_CountHead[udg_Dummy_Count[head]]
set udg_Dummy_CountNext[head] = countHead
set udg_Dummy_CountPrev[head] = udg_Dummy_CountPrev[countHead]
set udg_Dummy_CountNext[udg_Dummy_CountPrev[head]] = head
set udg_Dummy_CountPrev[udg_Dummy_CountNext[head]] = head
//---------------------------
// Update Bounds
//---------------------------
set countHead = udg_Dummy_CountHead[udg_Dummy_Upper]
if udg_Dummy_CountNext[countHead] == countHead then
set udg_Dummy_Upper = udg_Dummy_Upper - 1
endif
if udg_Dummy_Count[head] < udg_Dummy_Lower then
set udg_Dummy_Lower = udg_Dummy_Count[head]
endif
else
set bj_lastCreatedUnit = CreateUnit(Dummy_Owner(), Dummy_Rawcode(), x, y, facing)
call PauseUnit(bj_lastCreatedUnit, true)
call SetUnitFlyHeight(bj_lastCreatedUnit, z, 0)
if udg_Dummy_UnitCount < Dummy_MaxCount() then
set this = udg_Dummy_LastInstance
set udg_Dummy_Next[this] = -1
set udg_Dummy_Unit[this] = bj_lastCreatedUnit
call SaveInteger(udg_Dummy_Hashtable, GetHandleId(bj_lastCreatedUnit), 0, this)
set udg_Dummy_LastInstance = udg_Dummy_LastInstance + 1
endif
set udg_Dummy_UnitCount = udg_Dummy_UnitCount + 1
endif
return bj_lastCreatedUnit
endfunction
function GetRecycledDummyAnyAngle takes real x, real y, real z returns unit
return GetRecycledDummy(x, y, z, udg_Dummy_Angle[udg_Dummy_CountNext[udg_Dummy_CountHead[udg_Dummy_Upper]]])
endfunction
function RecycleDummy takes unit u returns nothing
local integer this = LoadInteger(udg_Dummy_Hashtable, GetHandleId(u), 0)
local integer head
local integer countHead
//If the unit is a legit Dummy Unit
if this > 0 and udg_Dummy_Next[this] == -1 then
//Find where to insert based on the list having the least number of units
set head = udg_Dummy_CountNext[udg_Dummy_CountHead[udg_Dummy_Lower]]
set udg_Dummy_Next[this] = head
set udg_Dummy_Prev[this] = udg_Dummy_Prev[head]
set udg_Dummy_Next[udg_Dummy_Prev[this]] = this
set udg_Dummy_Prev[udg_Dummy_Next[this]] = this
//Update Status
call SetUnitFacing(u, udg_Dummy_Angle[head])
call PauseUnit(u, true)
call SetUnitOwner(u, Dummy_Owner(), false)
if Dummy_HideOnMapCorner() then
call SetUnitX(u, udg_Dummy_X)
call SetUnitY(u, udg_Dummy_Y)
else
call SetUnitVertexColor(u, 0, 0, 0, 0)
endif
set udg_Dummy_Count[head] = udg_Dummy_Count[head] + 1
//---------------------------
// Update Count Lists
//---------------------------
//Remove
set udg_Dummy_CountNext[udg_Dummy_CountPrev[head]] = udg_Dummy_CountNext[head]
set udg_Dummy_CountPrev[udg_Dummy_CountNext[head]] = udg_Dummy_CountPrev[head]
//Add to the new Count List
set countHead = udg_Dummy_CountHead[udg_Dummy_Count[head]]
set udg_Dummy_CountNext[head] = countHead
set udg_Dummy_CountPrev[head] = udg_Dummy_CountPrev[countHead]
set udg_Dummy_CountNext[udg_Dummy_CountPrev[head]] = head
set udg_Dummy_CountPrev[udg_Dummy_CountNext[head]] = head
//---------------------------
// Update Bounds
//---------------------------
set countHead = udg_Dummy_CountHead[udg_Dummy_Lower]
if udg_Dummy_CountNext[countHead] == countHead then
set udg_Dummy_Lower = udg_Dummy_Lower + 1
endif
if udg_Dummy_Count[head] > udg_Dummy_Upper then
set udg_Dummy_Upper = udg_Dummy_Count[head]
endif
elseif this == 0 then
//User tries to recycle an invalid unit, remove the unit instead
call RemoveUnit(u)
endif
endfunction
function Dummy_TimerExpires takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
call RecycleDummy(LoadUnitHandle(udg_Dummy_Hashtable, id, 0))
call FlushChildHashtable(udg_Dummy_Hashtable, id)
call DestroyTimer(t)
set t = null
endfunction
function DummyAddRecycleTimer takes unit u, real time returns nothing
local timer t = CreateTimer()
call SaveUnitHandle(udg_Dummy_Hashtable, GetHandleId(t), 0, u)
call TimerStart(t, time, false, function Dummy_TimerExpires)
set t = null
endfunction
function InitTrig_DummyRecycler_JASS takes nothing returns nothing
local integer id = Dummy_Rawcode()
local player owner = Dummy_Owner()
local integer unitCount = Dummy_StoredUnits()
local real add = 360.0/Dummy_Angles()
local real angle = 0
local integer this = Dummy_Angles()
local integer head = 0
local integer countHead = JASS_MAX_ARRAY_SIZE - 1 //avoid allocation collision
local integer i = R2I(Dummy_MaxCount()/Dummy_Angles() + 0.5)
local rect r
set udg_Dummy_Hashtable = InitHashtable()
set udg_Dummy_Upper = unitCount
set udg_Dummy_Lower = unitCount
//Create Map Bounds
if Dummy_HideOnMapCorner() then
set r = GetWorldBounds()
set udg_Dummy_X = GetRectMaxX(r)
set udg_Dummy_Y = GetRectMaxY(r)
call RemoveRect(r)
set r = null
endif
//Initialize countHeads
loop
exitwhen i < 0
set udg_Dummy_CountNext[countHead] = countHead
set udg_Dummy_CountPrev[countHead] = countHead
set udg_Dummy_CountHead[i] = countHead
set countHead = countHead - 1
set i = i - 1
endloop
set countHead = udg_Dummy_CountHead[unitCount] //All heads will be inserted here initially
//Create the Dummy units
loop
exitwhen angle >= 360
//Initialize head
set udg_Dummy_Next[head] = head
set udg_Dummy_Prev[head] = head
set udg_Dummy_Count[head] = unitCount
set udg_Dummy_Angle[head] = angle
//Insert head in the Count List
set udg_Dummy_CountNext[head] = countHead
set udg_Dummy_CountPrev[head] = udg_Dummy_CountPrev[countHead]
set udg_Dummy_CountNext[udg_Dummy_CountPrev[head]] = head
set udg_Dummy_CountPrev[udg_Dummy_CountNext[head]] = head
set i = 0
loop
exitwhen i >= unitCount
//Queued Linked List
set udg_Dummy_Next[this] = head
set udg_Dummy_Prev[this] = udg_Dummy_Prev[head]
set udg_Dummy_Next[udg_Dummy_Prev[this]] = this
set udg_Dummy_Prev[udg_Dummy_Next[this]] = this
//The actual unit
set udg_Dummy_Unit[this] = CreateUnit(owner, id, udg_Dummy_X, udg_Dummy_Y, angle)
call PauseUnit(udg_Dummy_Unit[this], true)
call SaveInteger(udg_Dummy_Hashtable, GetHandleId(udg_Dummy_Unit[this]), 0, this)
set this = this + 1
set i = i + 1
endloop
set head = head + 1
set angle = angle + add
endloop
set udg_Dummy_LastInstance = this
set udg_Dummy_UnitCount = Dummy_Angles()*unitCount
endfunction
// runtextmacro DUMMY_DEBUG_TOOLS_JASS()
// Map header custom code
// SimError by Vexorian at wc3c.net
// Sim Error (modified)
function CSS_SimError takes string s returns nothing
local string msg = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00" + s + "|r"
local player ForPlayer = GetTriggerPlayer()
local sound error = CreateSoundFromLabel("InterfaceError", false, false, false, 10, 10)
if GetLocalPlayer() == ForPlayer then
call ClearTextMessages()
call DisplayTimedTextToPlayer(ForPlayer, 0.52, 0.96, 2.00, msg)
call StartSound(error)
endif
set ForPlayer = null
endfunction
function CSS_SimNotification takes string s returns nothing
local string msg = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cff32cd32" + s + "|r"
local player ForPlayer = GetTriggerPlayer()
local sound notify = CreateSoundFromLabel("ItemReward", false, false, false, 10, 10)
if GetLocalPlayer() == ForPlayer then
call ClearTextMessages()
call DisplayTimedTextToPlayer(ForPlayer, 0.52, 0.96, 2.00, msg)
call StartSound (notify)
endif
set ForPlayer = null
endfunction
// Bound Int by Magtheridon96 at hiveworkshop.com
// BoundInt
function BoundInt takes integer i, integer min, integer max returns integer
return IMaxBJ(IMinBJ(i, max), min)
endfunction
// Bonus Handling Code
function CSS_AddBonus takes unit u, integer amount, integer bonusType returns nothing
local integer max = udg_CSS_Power[17]
local integer min = -udg_CSS_Power[17]
local integer i = 16
local integer j = LoadInteger (udg_CSS_Hashtable, GetHandleId(u), bonusType)
if amount > max - 1 or amount < min then
call CSS_SimError ("Value too high or too low")
return
endif
if amount + j >= max or amount + j <= min then
call CSS_SimError ("Current value at maximum or minimum")
return
endif
set amount = amount + j
call BoundInt (amount, min, max - 1)
if bonusType < 0 or bonusType > 10 then
call CSS_SimError ("CSS Error: Invalid bonus type (" + I2S(bonusType) + ")")
return
elseif bonusType == 8 or bonusType == 9 then
if bonusType == 8 and amount*1. + GetUnitState(u, UNIT_STATE_MAX_LIFE) <= 0 then
call CSS_SimError ("Unit's current max life is lower than the negative bonus amount. Unable to subtract.")
return
elseif bonusType == 9 and amount*1. + GetUnitState(u, UNIT_STATE_MAX_MANA) <= 0 then
call CSS_SimError ("Unit's current max mana is lower than the negative bonus amount. Unable to subtract.")
return
endif
call SaveInteger(udg_CSS_Hashtable, GetHandleId(u), bonusType, amount)
if amount < 0 then
set amount = max + amount
else
call UnitRemoveAbility(u, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
endif
loop
if amount >= udg_CSS_Power[i] then
call UnitAddAbility(u, udg_CSS_Abilities[bonusType*18 + i])
call UnitMakeAbilityPermanent(u, true, udg_CSS_Abilities[bonusType*18 + i])
set amount = amount - udg_CSS_Power[i]
else
call UnitRemoveAbility(u, udg_CSS_Abilities[bonusType*18 + i])
endif
set i = i - 1
exitwhen i < 0
endloop
if LoadInteger(udg_CSS_Hashtable, GetHandleId(u), bonusType) < 0 then
call UnitAddAbility(u, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
call UnitMakeAbilityPermanent(u, true, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
endif
else
call SaveInteger(udg_CSS_Hashtable, GetHandleId(u), bonusType, amount)
if amount < 0 then
set amount = max + amount
call UnitAddAbility(u, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
call UnitMakeAbilityPermanent(u, true, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
else
call UnitRemoveAbility(u, udg_CSS_Abilities[(bonusType+1)*18 - 1])
endif
loop
if amount >= udg_CSS_Power[i] then
call UnitAddAbility(u, udg_CSS_Abilities[bonusType*18 + i])
call UnitMakeAbilityPermanent(u, true, udg_CSS_Abilities[bonusType*18 + i])
set amount = amount - udg_CSS_Power[i]
else
call UnitRemoveAbility(u, udg_CSS_Abilities[bonusType*18 + i])
endif
set i = i - 1
exitwhen i < 0
endloop
endif
endfunction
function InitTrig_CSS_Map_Header takes nothing returns nothing
endfunction
//************************************************************************************************************
//* *
//* CUSTOM STAT SYSTEM (CSS) *
//* *
//* Author: Doomlord *
//* Version: 1.5g *
//* *
//* Credits: *
//* + Earth-Fury: BonusMod binary algoritm; implementation macro. *
//* + Crigges: A great amount of help and support. *
//* + Geries: Help me with the item hashtable values cleanup. *
//* + rulerofiron99: Item Socketing method referenced from [GUI]Right Click Item Recipe v1.05. *
//* + Vexorian: CSS_SimError [url]http://www.wc3c.net/showthread.php?t=101260[/url] *
//* + Magtheridon96: [Snippet]BoundInt [url]http://www.hiveworkshop.com/forums/2294066-post804.html[/url] *
//* + WaterKnight: Help with the stack for custom Event Response. *
//* + PurgeandFire: Pinpoint a possible desync bug with the system. *
//* + Nestharus: Mentioning the possible negative life bug in his Bonus lib. *
//* *
//************************************************************************************************************
//**************************************************************************************
//* INTRODUCTION: *
//* *
//* An alternative to BonusMod for those who prefer a vanilla JASS approach. *
//* *
//* Just follow the API and you are pretty much done. *
//**************************************************************************************
//********************************************************************************************************
//* REQUIREMENTS: *
//* *
//* JNGP [url]http://www.hiveworkshop.com/forums/tools-560/jassnewgenpack-5d-227445[/url] (Recommended) *
//* OR: *
//* Your superhuman capability to transfer 198 abilities to your map. (Not Recommended) *
//********************************************************************************************************
//************************************************************************************************************************************************
//* INSTALLATION INSTRUCTION: *
//* *
//* Step 1: Copy the custom code for bonus handling to your map header. *
//* Step 2: Use JNGP to implement the system's abilities through macro. Instruction is included in the Implementation Macro trigger. *
//* Step 3: Copy the whole CSS folder to your map. Don't forget to turn on "Automatically create unknown variables while pasting trigger data". *
//* Step 4: Except for this trigger, delete every other useless elements. *
//* Step 5: Use this BonusMod alternative however you want. *
//* *
//************************************************************************************************************************************************
//**************************************************************************************
//* Bonus Types Identifier: *
//* *
//* Armor Bonus: 0 *
//* Attack Speed Bonus: 1 *
//* Damage Bonus: 2 *
//* Agility Bonus: 3 *
//* Intelligence Bonus: 4 *
//* Strength Bonus: 5 *
//* Life Regen Bonus: 6 *
//* Mana Regen Bonus: 7 *
//* Life Bonus: 8 *
//* Mana Bonus: 9 *
//* Sight Range Bonus: 10 *
//**************************************************************************************
//********************************************************************************
//* Generic Bonus APIs *
//* *
//* CSS_GetBonus takes unit u, integer bonusType returns integer *
//* CSS_AddBonus takes unit u, integer amount, integer bonusType returns nothing *
//* CSS_ClearBonus takes unit u, integer bonusType *
//********************************************************************************
// Clear bonus
function CSS_ClearBonus takes unit u, integer bonusType returns nothing
if bonusType > 10 or bonusType < 0 or GetUnitTypeId (u) == 0 or IsUnitType (u, UNIT_TYPE_DEAD) then
return
endif
call CSS_AddBonus (u, -LoadInteger (udg_CSS_Hashtable, GetHandleId (u), bonusType), bonusType)
endfunction
// Get current bonus
function CSS_GetBonus takes unit u, integer bonusType returns integer
if bonusType > 10 or bonusType < 0 or GetUnitTypeId (u) == 0 or IsUnitType (u, UNIT_TYPE_DEAD) then
return 0
endif
return LoadInteger (udg_CSS_Hashtable, GetHandleId (u), bonusType)
endfunction
// For preloading abilities
function CSS_Preload takes nothing returns nothing
local integer i = 0
local unit u = CreateUnit(Player(15), 'hfoo', 0, 0, 0.00)
loop
exitwhen i > 197
call UnitAddAbility(u, udg_CSS_Abilities[i])
set i = i + 1
endloop
call RemoveUnit(u)
set u = null
endfunction
//===========================================================================
function InitTrig_CSS_Standalone_Bonus takes nothing returns nothing
local integer i = 0
local integer a = 1
set udg_CSS_Abilities[0] = 'ZxA0'
set udg_CSS_Abilities[1] = 'ZxA1'
set udg_CSS_Abilities[2] = 'ZxA2'
set udg_CSS_Abilities[3] = 'ZxA3'
set udg_CSS_Abilities[4] = 'ZxA4'
set udg_CSS_Abilities[5] = 'ZxA5'
set udg_CSS_Abilities[6] = 'ZxA6'
set udg_CSS_Abilities[7] = 'ZxA7'
set udg_CSS_Abilities[8] = 'ZxA8'
set udg_CSS_Abilities[9] = 'ZxA9'
set udg_CSS_Abilities[10] = 'ZxAa'
set udg_CSS_Abilities[11] = 'ZxAb'
set udg_CSS_Abilities[12] = 'ZxAc'
set udg_CSS_Abilities[13] = 'ZxAd'
set udg_CSS_Abilities[14] = 'ZxAe'
set udg_CSS_Abilities[15] = 'ZxAf'
set udg_CSS_Abilities[16] = 'ZxAg'
set udg_CSS_Abilities[17] = 'ZxAh'
set udg_CSS_Abilities[18] = 'ZxI0'
set udg_CSS_Abilities[19] = 'ZxI1'
set udg_CSS_Abilities[20] = 'ZxI2'
set udg_CSS_Abilities[21] = 'ZxI3'
set udg_CSS_Abilities[22] = 'ZxI4'
set udg_CSS_Abilities[23] = 'ZxI5'
set udg_CSS_Abilities[24] = 'ZxI6'
set udg_CSS_Abilities[25] = 'ZxI7'
set udg_CSS_Abilities[26] = 'ZxI8'
set udg_CSS_Abilities[27] = 'ZxI9'
set udg_CSS_Abilities[28] = 'ZxIa'
set udg_CSS_Abilities[29] = 'ZxIb'
set udg_CSS_Abilities[30] = 'ZxIc'
set udg_CSS_Abilities[31] = 'ZxId'
set udg_CSS_Abilities[32] = 'ZxIe'
set udg_CSS_Abilities[33] = 'ZxIf'
set udg_CSS_Abilities[34] = 'ZxIg'
set udg_CSS_Abilities[35] = 'ZxIh'
set udg_CSS_Abilities[36] = 'ZxB0'
set udg_CSS_Abilities[37] = 'ZxB1'
set udg_CSS_Abilities[38] = 'ZxB2'
set udg_CSS_Abilities[39] = 'ZxB3'
set udg_CSS_Abilities[40] = 'ZxB4'
set udg_CSS_Abilities[41] = 'ZxB5'
set udg_CSS_Abilities[42] = 'ZxB6'
set udg_CSS_Abilities[43] = 'ZxB7'
set udg_CSS_Abilities[44] = 'ZxB8'
set udg_CSS_Abilities[45] = 'ZxB9'
set udg_CSS_Abilities[46] = 'ZxBa'
set udg_CSS_Abilities[47] = 'ZxBb'
set udg_CSS_Abilities[48] = 'ZxBc'
set udg_CSS_Abilities[49] = 'ZxBd'
set udg_CSS_Abilities[50] = 'ZxBe'
set udg_CSS_Abilities[51] = 'ZxBf'
set udg_CSS_Abilities[52] = 'ZxBg'
set udg_CSS_Abilities[53] = 'ZxBh'
set udg_CSS_Abilities[54] = 'ZxG0'
set udg_CSS_Abilities[55] = 'ZxG1'
set udg_CSS_Abilities[56] = 'ZxG2'
set udg_CSS_Abilities[57] = 'ZxG3'
set udg_CSS_Abilities[58] = 'ZxG4'
set udg_CSS_Abilities[59] = 'ZxG5'
set udg_CSS_Abilities[60] = 'ZxG6'
set udg_CSS_Abilities[61] = 'ZxG7'
set udg_CSS_Abilities[62] = 'ZxG8'
set udg_CSS_Abilities[63] = 'ZxG9'
set udg_CSS_Abilities[64] = 'ZxGa'
set udg_CSS_Abilities[65] = 'ZxGb'
set udg_CSS_Abilities[66] = 'ZxGc'
set udg_CSS_Abilities[67] = 'ZxGd'
set udg_CSS_Abilities[68] = 'ZxGe'
set udg_CSS_Abilities[69] = 'ZxGf'
set udg_CSS_Abilities[70] = 'ZxGg'
set udg_CSS_Abilities[71] = 'ZxGh'
set udg_CSS_Abilities[72] = 'ZxH0'
set udg_CSS_Abilities[73] = 'ZxH1'
set udg_CSS_Abilities[74] = 'ZxH2'
set udg_CSS_Abilities[75] = 'ZxH3'
set udg_CSS_Abilities[76] = 'ZxH4'
set udg_CSS_Abilities[77] = 'ZxH5'
set udg_CSS_Abilities[78] = 'ZxH6'
set udg_CSS_Abilities[79] = 'ZxH7'
set udg_CSS_Abilities[80] = 'ZxH8'
set udg_CSS_Abilities[81] = 'ZxH9'
set udg_CSS_Abilities[82] = 'ZxHa'
set udg_CSS_Abilities[83] = 'ZxHb'
set udg_CSS_Abilities[84] = 'ZxHc'
set udg_CSS_Abilities[85] = 'ZxHd'
set udg_CSS_Abilities[86] = 'ZxHe'
set udg_CSS_Abilities[87] = 'ZxHf'
set udg_CSS_Abilities[88] = 'ZxHg'
set udg_CSS_Abilities[89] = 'ZxHh'
set udg_CSS_Abilities[90] = 'ZxF0'
set udg_CSS_Abilities[91] = 'ZxF1'
set udg_CSS_Abilities[92] = 'ZxF2'
set udg_CSS_Abilities[93] = 'ZxF3'
set udg_CSS_Abilities[94] = 'ZxF4'
set udg_CSS_Abilities[95] = 'ZxF5'
set udg_CSS_Abilities[96] = 'ZxF6'
set udg_CSS_Abilities[97] = 'ZxF7'
set udg_CSS_Abilities[98] = 'ZxF8'
set udg_CSS_Abilities[99] = 'ZxF9'
set udg_CSS_Abilities[100] = 'ZxFa'
set udg_CSS_Abilities[101] = 'ZxFb'
set udg_CSS_Abilities[102] = 'ZxFc'
set udg_CSS_Abilities[103] = 'ZxFd'
set udg_CSS_Abilities[104] = 'ZxFe'
set udg_CSS_Abilities[105] = 'ZxFf'
set udg_CSS_Abilities[106] = 'ZxFg'
set udg_CSS_Abilities[107] = 'ZxFh'
set udg_CSS_Abilities[108] = 'ZxJ0'
set udg_CSS_Abilities[109] = 'ZxJ1'
set udg_CSS_Abilities[110] = 'ZxJ2'
set udg_CSS_Abilities[111] = 'ZxJ3'
set udg_CSS_Abilities[112] = 'ZxJ4'
set udg_CSS_Abilities[113] = 'ZxJ5'
set udg_CSS_Abilities[114] = 'ZxJ6'
set udg_CSS_Abilities[115] = 'ZxJ7'
set udg_CSS_Abilities[116] = 'ZxJ8'
set udg_CSS_Abilities[117] = 'ZxJ9'
set udg_CSS_Abilities[118] = 'ZxJa'
set udg_CSS_Abilities[119] = 'ZxJb'
set udg_CSS_Abilities[120] = 'ZxJc'
set udg_CSS_Abilities[121] = 'ZxJd'
set udg_CSS_Abilities[122] = 'ZxJe'
set udg_CSS_Abilities[123] = 'ZxJf'
set udg_CSS_Abilities[124] = 'ZxJg'
set udg_CSS_Abilities[125] = 'ZxJh'
set udg_CSS_Abilities[126] = 'ZxK0'
set udg_CSS_Abilities[127] = 'ZxK1'
set udg_CSS_Abilities[128] = 'ZxK2'
set udg_CSS_Abilities[129] = 'ZxK3'
set udg_CSS_Abilities[130] = 'ZxK4'
set udg_CSS_Abilities[131] = 'ZxK5'
set udg_CSS_Abilities[132] = 'ZxK6'
set udg_CSS_Abilities[133] = 'ZxK7'
set udg_CSS_Abilities[134] = 'ZxK8'
set udg_CSS_Abilities[135] = 'ZxK9'
set udg_CSS_Abilities[136] = 'ZxKa'
set udg_CSS_Abilities[137] = 'ZxKb'
set udg_CSS_Abilities[138] = 'ZxKc'
set udg_CSS_Abilities[139] = 'ZxKd'
set udg_CSS_Abilities[140] = 'ZxKe'
set udg_CSS_Abilities[141] = 'ZxKf'
set udg_CSS_Abilities[142] = 'ZxKg'
set udg_CSS_Abilities[143] = 'ZxKh'
set udg_CSS_Abilities[144] = 'ZxE0'
set udg_CSS_Abilities[145] = 'ZxE1'
set udg_CSS_Abilities[146] = 'ZxE2'
set udg_CSS_Abilities[147] = 'ZxE3'
set udg_CSS_Abilities[148] = 'ZxE4'
set udg_CSS_Abilities[149] = 'ZxE5'
set udg_CSS_Abilities[150] = 'ZxE6'
set udg_CSS_Abilities[151] = 'ZxE7'
set udg_CSS_Abilities[152] = 'ZxE8'
set udg_CSS_Abilities[153] = 'ZxE9'
set udg_CSS_Abilities[154] = 'ZxEa'
set udg_CSS_Abilities[155] = 'ZxEb'
set udg_CSS_Abilities[156] = 'ZxEc'
set udg_CSS_Abilities[157] = 'ZxEd'
set udg_CSS_Abilities[158] = 'ZxEe'
set udg_CSS_Abilities[159] = 'ZxEf'
set udg_CSS_Abilities[160] = 'ZxEg'
set udg_CSS_Abilities[161] = 'ZxEh'
set udg_CSS_Abilities[162] = 'ZxD0'
set udg_CSS_Abilities[163] = 'ZxD1'
set udg_CSS_Abilities[164] = 'ZxD2'
set udg_CSS_Abilities[165] = 'ZxD3'
set udg_CSS_Abilities[166] = 'ZxD4'
set udg_CSS_Abilities[167] = 'ZxD5'
set udg_CSS_Abilities[168] = 'ZxD6'
set udg_CSS_Abilities[169] = 'ZxD7'
set udg_CSS_Abilities[170] = 'ZxD8'
set udg_CSS_Abilities[171] = 'ZxD9'
set udg_CSS_Abilities[172] = 'ZxDa'
set udg_CSS_Abilities[173] = 'ZxDb'
set udg_CSS_Abilities[174] = 'ZxDc'
set udg_CSS_Abilities[175] = 'ZxDd'
set udg_CSS_Abilities[176] = 'ZxDe'
set udg_CSS_Abilities[177] = 'ZxDf'
set udg_CSS_Abilities[178] = 'ZxDg'
set udg_CSS_Abilities[179] = 'ZxDh'
set udg_CSS_Abilities[180] = 'ZxC0'
set udg_CSS_Abilities[181] = 'ZxC1'
set udg_CSS_Abilities[182] = 'ZxC2'
set udg_CSS_Abilities[183] = 'ZxC3'
set udg_CSS_Abilities[184] = 'ZxC4'
set udg_CSS_Abilities[185] = 'ZxC5'
set udg_CSS_Abilities[186] = 'ZxC6'
set udg_CSS_Abilities[187] = 'ZxC7'
set udg_CSS_Abilities[188] = 'ZxC8'
set udg_CSS_Abilities[189] = 'ZxC9'
set udg_CSS_Abilities[190] = 'ZxCa'
set udg_CSS_Abilities[191] = 'ZxCb'
set udg_CSS_Abilities[192] = 'ZxCc'
set udg_CSS_Abilities[193] = 'ZxCd'
set udg_CSS_Abilities[194] = 'ZxCe'
set udg_CSS_Abilities[195] = 'ZxCf'
set udg_CSS_Abilities[196] = 'ZxCg'
set udg_CSS_Abilities[197] = 'ZxCh'
loop
exitwhen i > 30
set udg_CSS_Power[i] = a
set a = a*2
set i = i + 1
endloop
set udg_CSS_Hashtable = InitHashtable()
if udg_CSS_PreloadBoolean then
call CSS_Preload()
endif
endfunction
// CSS Implementation Macro based on BonusMod's Implementation Macro
// Full credit goes to Earth-Fury
// The text below is extracted from BonusMod's
// About these macros:
//
// The first parameter is the rawcode for the ability. The convention used here by default is:
// Zx followed by an uppercase letter, unique to the bonus, followed by a 0-9-a-z representing
// the base of two the ability applys.
//
// The second parameter is the display value of the ability. This is so that they all line up
// neatly in the object editor.
//
// The third parameter is the actual value the bonus ability applys.
//
// Note that you should copy this in to its own trigger, save once, close the map and re-open
// it in the World Editor, then disable the trigger you copied this in to. If you do not
// disable the trigger, saving will take an insane ammount of time every time you save. If you
// make any changes below, you can simply enable the trigger again, save again, then disable
// the trigger again.
// CSS - Armor
//============================================================================================
//! textmacro ArmorAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AId1 $RAWCODE$ Idef 1 $VALUE$ anam "CSS - Armor ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNHumanArmorUpOne.blp
//! endtextmacro
//! runtextmacro ArmorAbility("ZxA0", "+00001", "1")
//! runtextmacro ArmorAbility("ZxA1", "+00002", "2")
//! runtextmacro ArmorAbility("ZxA2", "+00004", "4")
//! runtextmacro ArmorAbility("ZxA3", "+00008", "8")
//! runtextmacro ArmorAbility("ZxA4", "+00016", "16")
//! runtextmacro ArmorAbility("ZxA5", "+00032", "32")
//! runtextmacro ArmorAbility("ZxA6", "+00064", "64")
//! runtextmacro ArmorAbility("ZxA7", "+00128", "128")
//! runtextmacro ArmorAbility("ZxA8", "+00256", "256")
//! runtextmacro ArmorAbility("ZxA9", "+00512", "512")
//! runtextmacro ArmorAbility("ZxAa", "+01024", "1024")
//! runtextmacro ArmorAbility("ZxAb", "+02048", "2048")
//! runtextmacro ArmorAbility("ZxAc", "+04096", "4096")
//! runtextmacro ArmorAbility("ZxAd", "+08192", "8192")
//! runtextmacro ArmorAbility("ZxAe", "+16384", "16384")
//! runtextmacro ArmorAbility("ZxAf", "+32768", "32768")
//! runtextmacro ArmorAbility("ZxAg", "+65536", "65536")
//! runtextmacro ArmorAbility("ZxAh", "-131072", "-131072")
// CSS - Damage
//============================================================================================
//! textmacro DamageAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AItg $RAWCODE$ Iatt 1 $VALUE$ anam "CSS - Damage ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNClawsOfAttack.blp
//! endtextmacro
//! runtextmacro DamageAbility("ZxB0", "+00001", "1")
//! runtextmacro DamageAbility("ZxB1", "+00002", "2")
//! runtextmacro DamageAbility("ZxB2", "+00004", "4")
//! runtextmacro DamageAbility("ZxB3", "+00008", "8")
//! runtextmacro DamageAbility("ZxB4", "+00016", "16")
//! runtextmacro DamageAbility("ZxB5", "+00032", "32")
//! runtextmacro DamageAbility("ZxB6", "+00064", "64")
//! runtextmacro DamageAbility("ZxB7", "+00128", "128")
//! runtextmacro DamageAbility("ZxB8", "+00256", "256")
//! runtextmacro DamageAbility("ZxB9", "+00512", "512")
//! runtextmacro DamageAbility("ZxBa", "+01024", "1024")
//! runtextmacro DamageAbility("ZxBb", "+02048", "2048")
//! runtextmacro DamageAbility("ZxBc", "+04096", "4096")
//! runtextmacro DamageAbility("ZxBd", "+08192", "8192")
//! runtextmacro DamageAbility("ZxBe", "+16384", "16384")
//! runtextmacro DamageAbility("ZxBf", "+32768", "32768")
//! runtextmacro DamageAbility("ZxBg", "+65536", "65536")
//! runtextmacro DamageAbility("ZxBh", "-131072", "-131072")
// CSS - Sight Range
//============================================================================================
//! textmacro SightRangeAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AIsi $RAWCODE$ Isib 1 $VALUE$ anam "CSS - Sight Range ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNTelescope.blp
//! endtextmacro
//! runtextmacro SightRangeAbility("ZxC0", "+00001", "1")
//! runtextmacro SightRangeAbility("ZxC1", "+00002", "2")
//! runtextmacro SightRangeAbility("ZxC2", "+00004", "4")
//! runtextmacro SightRangeAbility("ZxC3", "+00008", "8")
//! runtextmacro SightRangeAbility("ZxC4", "+00016", "16")
//! runtextmacro SightRangeAbility("ZxC5", "+00032", "32")
//! runtextmacro SightRangeAbility("ZxC6", "+00064", "64")
//! runtextmacro SightRangeAbility("ZxC7", "+00128", "128")
//! runtextmacro SightRangeAbility("ZxC8", "+00256", "256")
//! runtextmacro SightRangeAbility("ZxC9", "+00512", "512")
//! runtextmacro SightRangeAbility("ZxCa", "+01024", "1024")
//! runtextmacro SightRangeAbility("ZxCb", "+02048", "2048")
//! runtextmacro SightRangeAbility("ZxCc", "+04096", "4096")
//! runtextmacro SightRangeAbility("ZxCd", "+08192", "8192")
//! runtextmacro SightRangeAbility("ZxCe", "+16384", "16384")
//! runtextmacro SightRangeAbility("ZxCf", "+32768", "32768")
//! runtextmacro SightRangeAbility("ZxCg", "+65536", "65536")
//! runtextmacro SightRangeAbility("ZxCh", "-131072", "-131072")
// CSS - Max Mana
//============================================================================================
//! textmacro MaxManaAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AImz $RAWCODE$ Iman 1 $VALUE$ anam "CSS - Max Mana ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNPendantOfMana.blp
//! endtextmacro
//! runtextmacro MaxManaAbility("ZxD0", "+00001", "1")
//! runtextmacro MaxManaAbility("ZxD1", "+00002", "2")
//! runtextmacro MaxManaAbility("ZxD2", "+00004", "4")
//! runtextmacro MaxManaAbility("ZxD3", "+00008", "8")
//! runtextmacro MaxManaAbility("ZxD4", "+00016", "16")
//! runtextmacro MaxManaAbility("ZxD5", "+00032", "32")
//! runtextmacro MaxManaAbility("ZxD6", "+00064", "64")
//! runtextmacro MaxManaAbility("ZxD7", "+00128", "128")
//! runtextmacro MaxManaAbility("ZxD8", "+00256", "256")
//! runtextmacro MaxManaAbility("ZxD9", "+00512", "512")
//! runtextmacro MaxManaAbility("ZxDa", "+01024", "1024")
//! runtextmacro MaxManaAbility("ZxDb", "+02048", "2048")
//! runtextmacro MaxManaAbility("ZxDc", "+04096", "4096")
//! runtextmacro MaxManaAbility("ZxDd", "+08192", "8192")
//! runtextmacro MaxManaAbility("ZxDe", "+16384", "16384")
//! runtextmacro MaxManaAbility("ZxDf", "+32768", "32768")
//! runtextmacro MaxManaAbility("ZxDg", "+65536", "65536")
//! runtextmacro MaxManaAbility("ZxDh", "-131072", "-131072")
// CSS - Max Life
//============================================================================================
//! textmacro MaxLifeAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AIlf $RAWCODE$ Ilif 1 $VALUE$ anam "CSS - Max Life ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNPeriapt1.blp
//! endtextmacro
//! runtextmacro MaxLifeAbility("ZxE0", "+00001", "1")
//! runtextmacro MaxLifeAbility("ZxE1", "+00002", "2")
//! runtextmacro MaxLifeAbility("ZxE2", "+00004", "4")
//! runtextmacro MaxLifeAbility("ZxE3", "+00008", "8")
//! runtextmacro MaxLifeAbility("ZxE4", "+00016", "16")
//! runtextmacro MaxLifeAbility("ZxE5", "+00032", "32")
//! runtextmacro MaxLifeAbility("ZxE6", "+00064", "64")
//! runtextmacro MaxLifeAbility("ZxE7", "+00128", "128")
//! runtextmacro MaxLifeAbility("ZxE8", "+00256", "256")
//! runtextmacro MaxLifeAbility("ZxE9", "+00512", "512")
//! runtextmacro MaxLifeAbility("ZxEa", "+01024", "1024")
//! runtextmacro MaxLifeAbility("ZxEb", "+02048", "2048")
//! runtextmacro MaxLifeAbility("ZxEc", "+04096", "4096")
//! runtextmacro MaxLifeAbility("ZxEd", "+08192", "8192")
//! runtextmacro MaxLifeAbility("ZxEe", "+16384", "16384")
//! runtextmacro MaxLifeAbility("ZxEf", "+32768", "32768")
//! runtextmacro MaxLifeAbility("ZxEg", "+65536", "65536")
//! runtextmacro MaxLifeAbility("ZxEh", "-131072", "-131072")
// CSS - Strength
//============================================================================================
//! textmacro HeroStrAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AIa1 $RAWCODE$ Iagi 1 0 Iint 1 0 Istr 1 $VALUE$ anam "CSS - Hero STR ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNGauntletsOfOgrePower.blp
//! endtextmacro
//! runtextmacro HeroStrAbility("ZxF0", "+00001", "1")
//! runtextmacro HeroStrAbility("ZxF1", "+00002", "2")
//! runtextmacro HeroStrAbility("ZxF2", "+00004", "4")
//! runtextmacro HeroStrAbility("ZxF3", "+00008", "8")
//! runtextmacro HeroStrAbility("ZxF4", "+00016", "16")
//! runtextmacro HeroStrAbility("ZxF5", "+00032", "32")
//! runtextmacro HeroStrAbility("ZxF6", "+00064", "64")
//! runtextmacro HeroStrAbility("ZxF7", "+00128", "128")
//! runtextmacro HeroStrAbility("ZxF8", "+00256", "256")
//! runtextmacro HeroStrAbility("ZxF9", "+00512", "512")
//! runtextmacro HeroStrAbility("ZxFa", "+01024", "1024")
//! runtextmacro HeroStrAbility("ZxFb", "+02048", "2048")
//! runtextmacro HeroStrAbility("ZxFc", "+04096", "4096")
//! runtextmacro HeroStrAbility("ZxFd", "+08192", "8192")
//! runtextmacro HeroStrAbility("ZxFe", "+16384", "16384")
//! runtextmacro HeroStrAbility("ZxFf", "+32768", "32768")
//! runtextmacro HeroStrAbility("ZxFg", "+65536", "65536")
//! runtextmacro HeroStrAbility("ZxFh", "-131072", "-131072")
// CSS - Agility
//============================================================================================
//! textmacro HeroAgiAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AIa1 $RAWCODE$ Iagi 1 $VALUE$ Iint 1 0 Istr 1 0 anam "CSS - Hero AGI ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNSlippersOfAgility.blp
//! endtextmacro
//! runtextmacro HeroAgiAbility("ZxG0", "+00001", "1")
//! runtextmacro HeroAgiAbility("ZxG1", "+00002", "2")
//! runtextmacro HeroAgiAbility("ZxG2", "+00004", "4")
//! runtextmacro HeroAgiAbility("ZxG3", "+00008", "8")
//! runtextmacro HeroAgiAbility("ZxG4", "+00016", "16")
//! runtextmacro HeroAgiAbility("ZxG5", "+00032", "32")
//! runtextmacro HeroAgiAbility("ZxG6", "+00064", "64")
//! runtextmacro HeroAgiAbility("ZxG7", "+00128", "128")
//! runtextmacro HeroAgiAbility("ZxG8", "+00256", "256")
//! runtextmacro HeroAgiAbility("ZxG9", "+00512", "512")
//! runtextmacro HeroAgiAbility("ZxGa", "+01024", "1024")
//! runtextmacro HeroAgiAbility("ZxGb", "+02048", "2048")
//! runtextmacro HeroAgiAbility("ZxGc", "+04096", "4096")
//! runtextmacro HeroAgiAbility("ZxGd", "+08192", "8192")
//! runtextmacro HeroAgiAbility("ZxGe", "+16384", "16384")
//! runtextmacro HeroAgiAbility("ZxGf", "+32768", "32768")
//! runtextmacro HeroAgiAbility("ZxGg", "+65536", "65536")
//! runtextmacro HeroAgiAbility("ZxGh", "-131072", "-131072")
// CSS - Intelligence
//============================================================================================
//! textmacro HeroIntAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AIa1 $RAWCODE$ Iagi 1 0 Iint 1 $VALUE$ Istr 1 0 anam "CSS - Hero INT ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNMantle.blp
//! endtextmacro
//! runtextmacro HeroIntAbility("ZxH0", "+00001", "1")
//! runtextmacro HeroIntAbility("ZxH1", "+00002", "2")
//! runtextmacro HeroIntAbility("ZxH2", "+00004", "4")
//! runtextmacro HeroIntAbility("ZxH3", "+00008", "8")
//! runtextmacro HeroIntAbility("ZxH4", "+00016", "16")
//! runtextmacro HeroIntAbility("ZxH5", "+00032", "32")
//! runtextmacro HeroIntAbility("ZxH6", "+00064", "64")
//! runtextmacro HeroIntAbility("ZxH7", "+00128", "128")
//! runtextmacro HeroIntAbility("ZxH8", "+00256", "256")
//! runtextmacro HeroIntAbility("ZxH9", "+00512", "512")
//! runtextmacro HeroIntAbility("ZxHa", "+01024", "1024")
//! runtextmacro HeroIntAbility("ZxHb", "+02048", "2048")
//! runtextmacro HeroIntAbility("ZxHc", "+04096", "4096")
//! runtextmacro HeroIntAbility("ZxHd", "+08192", "8192")
//! runtextmacro HeroIntAbility("ZxHe", "+16384", "16384")
//! runtextmacro HeroIntAbility("ZxHf", "+32768", "32768")
//! runtextmacro HeroIntAbility("ZxHg", "+65536", "65536")
//! runtextmacro HeroIntAbility("ZxHh", "-131072", "-131072")
// CSS - Attack Speed
//============================================================================================
//! textmacro AttackSpeedAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AIsx $RAWCODE$ Isx1 1 $VALUE$ anam "CSS - Attack Speed ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNGlove.blp
//! endtextmacro
//! runtextmacro AttackSpeedAbility("ZxI0", "+00001", "0.01")
//! runtextmacro AttackSpeedAbility("ZxI1", "+00002", "0.02")
//! runtextmacro AttackSpeedAbility("ZxI2", "+00004", "0.04")
//! runtextmacro AttackSpeedAbility("ZxI3", "+00008", "0.08")
//! runtextmacro AttackSpeedAbility("ZxI4", "+00016", "0.16")
//! runtextmacro AttackSpeedAbility("ZxI5", "+00032", "0.32")
//! runtextmacro AttackSpeedAbility("ZxI6", "+00064", "0.64")
//! runtextmacro AttackSpeedAbility("ZxI7", "+00128", "1.28")
//! runtextmacro AttackSpeedAbility("ZxI8", "+00256", "2.56")
//! runtextmacro AttackSpeedAbility("ZxI9", "+00512", "5.12")
//! runtextmacro AttackSpeedAbility("ZxIa", "+01024", "10.24")
//! runtextmacro AttackSpeedAbility("ZxIb", "+02048", "20.48")
//! runtextmacro AttackSpeedAbility("ZxIc", "+04096", "40.96")
//! runtextmacro AttackSpeedAbility("ZxId", "+08192", "81.92")
//! runtextmacro AttackSpeedAbility("ZxIe", "+16384", "163.84")
//! runtextmacro AttackSpeedAbility("ZxIf", "+32768", "327.68")
//! runtextmacro AttackSpeedAbility("ZxIg", "+65536", "655.36")
//! runtextmacro AttackSpeedAbility("ZxIh", "-131072", "-1310.72")
// CSS - Life Regeneration
//============================================================================================
//! textmacro LifeRegenAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a Arel $RAWCODE$ Ihpr 1 $VALUE$ anam "CSS - Life Regen ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNRingSkull.blp
//! endtextmacro
//! runtextmacro LifeRegenAbility("ZxJ0", "+00001", "1")
//! runtextmacro LifeRegenAbility("ZxJ1", "+00002", "2")
//! runtextmacro LifeRegenAbility("ZxJ2", "+00004", "4")
//! runtextmacro LifeRegenAbility("ZxJ3", "+00008", "8")
//! runtextmacro LifeRegenAbility("ZxJ4", "+00016", "16")
//! runtextmacro LifeRegenAbility("ZxJ5", "+00032", "32")
//! runtextmacro LifeRegenAbility("ZxJ6", "+00064", "64")
//! runtextmacro LifeRegenAbility("ZxJ7", "+00128", "128")
//! runtextmacro LifeRegenAbility("ZxJ8", "+00256", "256")
//! runtextmacro LifeRegenAbility("ZxJ9", "+00512", "512")
//! runtextmacro LifeRegenAbility("ZxJa", "+01024", "1024")
//! runtextmacro LifeRegenAbility("ZxJb", "+02048", "2048")
//! runtextmacro LifeRegenAbility("ZxJc", "+04096", "4096")
//! runtextmacro LifeRegenAbility("ZxJd", "+08192", "8192")
//! runtextmacro LifeRegenAbility("ZxJe", "+16384", "16384")
//! runtextmacro LifeRegenAbility("ZxJf", "+32768", "32768")
//! runtextmacro LifeRegenAbility("ZxJg", "+65536", "65536")
//! runtextmacro LifeRegenAbility("ZxJh", "-131072", "-131072")
// CSS - Mana Regeneration
//============================================================================================
//! textmacro ManaRegenAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a AIrm $RAWCODE$ Imrp 1 $VALUE$ anam "CSS - Mana Regen ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNSobiMask.blp
//! endtextmacro
//! runtextmacro ManaRegenAbility("ZxK0", "+00001", "0.01")
//! runtextmacro ManaRegenAbility("ZxK1", "+00002", "0.02")
//! runtextmacro ManaRegenAbility("ZxK2", "+00004", "0.04")
//! runtextmacro ManaRegenAbility("ZxK3", "+00008", "0.08")
//! runtextmacro ManaRegenAbility("ZxK4", "+00016", "0.16")
//! runtextmacro ManaRegenAbility("ZxK5", "+00032", "0.32")
//! runtextmacro ManaRegenAbility("ZxK6", "+00064", "0.64")
//! runtextmacro ManaRegenAbility("ZxK7", "+00128", "1.28")
//! runtextmacro ManaRegenAbility("ZxK8", "+00256", "2.56")
//! runtextmacro ManaRegenAbility("ZxK9", "+00512", "5.12")
//! runtextmacro ManaRegenAbility("ZxKa", "+01024", "10.24")
//! runtextmacro ManaRegenAbility("ZxKb", "+02048", "20.48")
//! runtextmacro ManaRegenAbility("ZxKc", "+04096", "40.96")
//! runtextmacro ManaRegenAbility("ZxKd", "+08192", "81.92")
//! runtextmacro ManaRegenAbility("ZxKe", "+16384", "163.84")
//! runtextmacro ManaRegenAbility("ZxKf", "+32768", "327.68")
//! runtextmacro ManaRegenAbility("ZxKg", "+65536", "655.36")
//! runtextmacro ManaRegenAbility("ZxKh", "-131072", "-1310.72")
// Don't let a //! external command be the last line in a trigger!
// A Code Patch for the Implementation Macro bug with Life Regen abilities found in v1.5i
// I am awfully sorry for this critical error and hope for your forgiveness.
// This patch will be run just like the Implementation Macro. Follow the exact same steps and
// you are done. Thank you and have a nice day.
// Doomlord
// CSS - Life Regeneration
//============================================================================================
//! textmacro LifeRegenAbility takes RAWCODE, DISPLAYVALUE, VALUE
//! external ObjectMerger w3a Arel $RAWCODE$ Ihpr 1 $VALUE$ anam "CSS - Life Regen ($DISPLAYVALUE$)" aite 0 ansf "" aart ReplaceableTextures\CommandButtons\BTNRingSkull.blp
//! endtextmacro
//! runtextmacro LifeRegenAbility("ZxJ0", "+00001", "1")
//! runtextmacro LifeRegenAbility("ZxJ1", "+00002", "2")
//! runtextmacro LifeRegenAbility("ZxJ2", "+00004", "4")
//! runtextmacro LifeRegenAbility("ZxJ3", "+00008", "8")
//! runtextmacro LifeRegenAbility("ZxJ4", "+00016", "16")
//! runtextmacro LifeRegenAbility("ZxJ5", "+00032", "32")
//! runtextmacro LifeRegenAbility("ZxJ6", "+00064", "64")
//! runtextmacro LifeRegenAbility("ZxJ7", "+00128", "128")
//! runtextmacro LifeRegenAbility("ZxJ8", "+00256", "256")
//! runtextmacro LifeRegenAbility("ZxJ9", "+00512", "512")
//! runtextmacro LifeRegenAbility("ZxJa", "+01024", "1024")
//! runtextmacro LifeRegenAbility("ZxJb", "+02048", "2048")
//! runtextmacro LifeRegenAbility("ZxJc", "+04096", "4096")
//! runtextmacro LifeRegenAbility("ZxJd", "+08192", "8192")
//! runtextmacro LifeRegenAbility("ZxJe", "+16384", "16384")
//! runtextmacro LifeRegenAbility("ZxJf", "+32768", "32768")
//! runtextmacro LifeRegenAbility("ZxJg", "+65536", "65536")
//! runtextmacro LifeRegenAbility("ZxJh", "-131072", "-131072")