Name | Type | is_array | initial_value |
SW_Ability | abilcode | No | |
SW_AffectAir | boolean | Yes | |
SW_AffectAlly | boolean | Yes | |
SW_AffectEnemy | boolean | Yes | |
SW_AffectGround | boolean | Yes | |
SW_AffectStructure | boolean | Yes | |
SW_Angle | real | No | |
SW_AngleArray | real | Yes | |
SW_AreaCurrent | real | Yes | |
SW_AreaFinal | real | Yes | |
SW_AreaGrowth | real | Yes | |
SW_AreaInitial | real | Yes | |
SW_Attachment | string | No | |
SW_AttackType | attacktype | Yes | |
SW_Caster | unit | Yes | |
SW_Coordinates | location | Yes | |
SW_Damage | real | Yes | |
SW_DamageType | damagetype | Yes | |
SW_DamageX | real | Yes | |
SW_Distance | real | Yes | |
SW_DistanceConstnat | real | No | 33.33 |
SW_DistanceX | real | Yes | |
SW_ExtraEffect | trigger | Yes | |
SW_ExtraEffectCheck | boolean | Yes | |
SW_ExtraEffectTarget | trigger | Yes | |
SW_ExtraEffectTargetCheck | boolean | Yes | |
SW_FX_CurrentScale | real | Yes | |
SW_FX_Growth | real | Yes | |
SW_FXEndScale | real | Yes | |
SW_FXScale | real | Yes | |
SW_Group | group | No | |
SW_GroupDone | group | Yes | |
SW_Loop | integer | No | |
SW_LoopingSfx | boolean | Yes | |
SW_Lvl | integer | Yes | |
SW_Max | integer | No | |
SW_NextPoint | location | Yes | |
SW_OneInstance | boolean | Yes | |
SW_Point | location | Yes | |
SW_Speed | real | Yes | |
SW_SpeedX | real | Yes | |
SW_TargetUnit | unit | No | |
SW_Wave | effect | Yes | |
SW_WaveEffect | string | Yes | |
SW_WaveEffectEnd | string | Yes | |
SW_WaveEffectLoop | string | Yes | |
TempPoint | location | Yes |
library GetTerrainZ /* v1.0.0.0
********************************************************************
*
* function GetTerrainZ takes real x, real y returns real
*
********************************************************************/
globals
private constant location L = Location(0, 0)
endglobals
function GetTerrainZ takes real x, real y returns real
call MoveLocation(L, x, y)
return GetLocationZ(L)
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library DummyCaster /* v2.0.0.1
*************************************************************************************
*
* Dummy caster for casting spells
*
* Spells must have 0 cooldown, 92083 range, and cost 0 mana. Spells must be instant and
* can't share the same order as other spells on the dummy caster.
*
*************************************************************************************
*
* */uses/*
* */ optional UnitIndexer, /* hiveworkshop.com/forums/jass-functions-413/unit-indexer-172090/
*
************************************************************************************
* SETTINGS
*/
globals
constant integer UNITS_DUMMY_CASTER = 'h000'
/*************************************************************************************
*
* PLAYER_OWNER
*
* Owner of dummy caster
*
*************************************************************************************/
private constant player PLAYER_OWNER = Player(15)
endglobals
/*
************************************************************************************
*
* Dummy at position 32256,32256
*
* struct DummyCaster extends array
*
* method cast takes player castingPlayer, integer abilityLevel, integer order, real x, real y returns boolean
* - call DummyCaster[abilityId].cast(...)
* method castTarget takes player castingPlayer, integer abilityLevel, integer order, ,real dummycaster_px, real dummycaster_py widget t returns boolean
* - call DummyCaster[abilityId].castTarget(...)
* method castPoint takes player castingPlayer, integer abilityLevel, integer order, real dummycaster_px, real dummycaster_py, real x, real y returns boolean
* - call DummyCaster[abilityId].castPoint(...)
*
************************************************************************************/
globals
private unit u
endglobals
private module N
private static method onInit takes nothing returns nothing
static if LIBRARY_UnitIndexer then
set UnitIndexer.enabled=false
set u=CreateUnit(PLAYER_OWNER,UNITS_DUMMY_CASTER,0,0,0)
set UnitIndexer.enabled=true
else
set u=CreateUnit(PLAYER_OWNER,UNITS_DUMMY_CASTER,0,0,0)
endif
call SetUnitPosition(u,32256,32256)
endmethod
endmodule
struct DummyCaster extends array
implement N
private static method prep takes integer a, player p, integer l returns nothing
call UnitAddAbility(u, a)
if (1 < l) then
call SetUnitAbilityLevel(u, a, l)
endif
if (null != p) then
call SetUnitOwner(u, p, false)
endif
endmethod
private static method finish takes integer a returns nothing
call SetUnitOwner(u, PLAYER_OWNER, false)
call UnitRemoveAbility(u, a)
endmethod
method unit takes nothing returns unit
return u
endmethod
method cast takes player p, integer level, integer order, real x, real y returns boolean
local boolean b
call SetUnitX(u, x)
call SetUnitY(u, y)
call prep(this, p, level)
set b = IssueImmediateOrderById(u,order)
call finish(this)
call SetUnitPosition(u, 32256, 32256)
return b
endmethod
method castTarget takes player p, integer level, integer order, real dummycaster_px, real dummycaster_py, unit t returns boolean
local boolean b
call SetUnitX(u, dummycaster_px)
call SetUnitY(u, dummycaster_py)
call prep(this, p, level)
call UnitShareVision(t,p,true)
set b = IssueTargetOrderById(u,order,t)
call UnitShareVision(t,p,false)
call finish(this)
call SetUnitPosition(u, 32256, 32256)
return b
endmethod
method castPoint takes player p, integer level, integer order, real dummycaster_px, real dummycaster_py, real x, real y returns boolean
local boolean b
call SetUnitX(u, dummycaster_px)
call SetUnitY(u, dummycaster_py)
call prep(this, p, level)
set b = IssuePointOrderById(u,order,x,y)
call finish(this)
call SetUnitPosition(u, 32256, 32256)
return b
endmethod
endstruct
endlibrary