Name | Type | is_array | initial_value |
Casting_unit | unit | No | |
Distance | real | No | |
handlevars | gamecache | No | |
hook_point | unit | No | |
hook_range | integer | No | |
hookunit_drag_back | unit | No | |
out_of_range | location | No | |
pointoftarget | location | No | |
preyNumber | real | No | 7.00 |
Spin_group | group | No | |
target | unit | No | |
tmrGameTimer | timer | No | |
tmrwGameTimerWindow | timerdialog | No | |
true_false | boolean | No | |
unit | unit | No | |
zz_ActionAndTrig | trigger | No | |
zz_AdjustCam | boolean | Yes | |
zz_ai_only_mode | button | No | |
zz_AllItems | item | Yes | |
zz_AllUnits | unit | Yes | |
zz_Anfangsfarbe | integer | Yes | |
zz_AnyDamageTrig | trigger | No | |
zz_AnzahlVoter | integer | No | |
zz_ATLastSound | sound | Yes | |
zz_AttackDiceUpgr | integer | Yes | |
zz_AttackRateUpgr | integer | Yes | |
zz_ATToBeSkipped | boolean | Yes | |
zz_BnsBit | integer | Yes | |
zz_CamAlreadyOff | boolean | Yes | |
zz_CamAngle | real | Yes | |
zz_CameraSettingVal | real | Yes | |
zz_CamFollowUnit | unit | Yes | |
zz_CamOffset | real | Yes | |
zz_CamPid | integer | Yes | |
zz_CamPidIndex | integer | No | |
zz_CamRoll | real | Yes | |
zz_CamRotation | real | Yes | |
zz_CamSysPlayer | player | No | |
zz_CamSysT | real | No | |
zz_CamSysTime | real | No | |
zz_CamZOffset | real | Yes | |
zz_cdlg_button | button | Yes | |
zz_cdlg_dialog | dialog | Yes | |
zz_cdlg_length | integer | No | |
zz_cdlg_number | integer | Yes | |
zz_chat_no_ally | string | No | |
zz_CheckLocation | location | No | |
zz_ClosestDestructable | destructable | No | |
zz_ClosestDistance | real | No | |
zz_ClosestItem | item | No | |
zz_CodeIdA | string | Yes | |
zz_CodeIdB | string | Yes | |
zz_CodeRow | string | No | |
zz_CodeRows | integer | Yes | |
zz_color_board | leaderboard | No | |
zz_command_dlg1 | string | Yes | |
zz_command_dlg2 | string | Yes | |
zz_command_dlg3 | string | Yes | |
zz_command_hotkey1 | integer | Yes | |
zz_command_hotkey2 | integer | Yes | |
zz_command_hotkey3 | integer | Yes | |
zz_command_key1 | string | Yes | |
zz_command_key2 | string | Yes | |
zz_command_key3 | string | Yes | |
zz_command_language | string | No | |
zz_command_length | integer | No | |
zz_command_msg | string | Yes | |
zz_command_number | integer | Yes | |
zz_command_par1 | integer | Yes | |
zz_command_par2 | integer | Yes | |
zz_command_par3 | integer | Yes | |
zz_command_prefix | string | No | |
zz_commanded_player | player | No | |
zz_commander_mode | button | No | |
zz_commanding_player | player | No | |
zz_Comp | boolean | No | |
zz_current_command | integer | No | |
zz_current_number_par | integer | No | |
zz_current_player_par | integer | No | |
zz_CurrentlySelectedHero | unit | Yes | |
zz_CustomBooleanValue | boolean | Yes | |
zz_CustomRealValue | real | Yes | |
zz_CustomStringValue | string | Yes | |
zz_DamageTaken | real | No | |
zz_debug_BlackMaskTrig | trigger | No | |
zz_debugCamAoaTrig | trigger | No | |
zz_debugCamDistTrig | trigger | No | |
zz_debugCamFarzTrig | trigger | No | |
zz_debugCamFovTrig | trigger | No | |
zz_debugCamInfoTrig | trigger | No | |
zz_debugCamResetTrig | trigger | No | |
zz_debugCamRollTrig | trigger | No | |
zz_debugCamRotTrig | trigger | No | |
zz_debugCloneTrig | trigger | No | |
zz_debugDemoTrig | trigger | No | |
zz_debugDifficultyTrig | trigger | No | |
zz_debugDispelTrig | trigger | No | |
zz_debugFingerOfDeathEnabled | boolean | Yes | |
zz_debugFingerOfDeathTrig | trigger | Yes | |
zz_debugGimmeTrig | trigger | No | |
zz_debugGotoUnits | integer | No | |
zz_debugGotoUnitTrig | trigger | No | |
zz_debugGotoUnitX | real | No | |
zz_debugGotoUnitY | real | No | |
zz_debugGotoXTrig | trigger | No | |
zz_debugGotoXYTrig | trigger | No | |
zz_debugGotoYTrig | trigger | No | |
zz_debugTeleportTrig | trigger | No | |
zz_debugToolOfDeathTrig | trigger | Yes | |
zz_debugUnitInfoTrig | trigger | No | |
zz_DefendCaster | sound | No | |
zz_DetectRandom | real | No | |
zz_DetectSelected | real | No | |
zz_deutsch_button | button | No | |
zz_dialog_in_use | boolean | No | |
zz_DialogAktion | string | Yes | |
zz_DialogButton | button | Yes | |
zz_DialogFolge | trigger | Yes | |
zz_DialogShortcut | integer | Yes | |
zz_DialogSpieler | dialog | Yes | |
zz_DivineShield | sound | No | |
zz_dlg_dialog | dialog | Yes | |
zz_dlg_length | integer | No | |
zz_dlg_string | string | Yes | |
zz_dlgbutton_ai_only | string | No | |
zz_dlgbutton_all | string | No | |
zz_dlgbutton_cancel | string | No | |
zz_dlgbutton_commander | string | No | |
zz_dlgbutton_gold | string | No | |
zz_dlgbutton_lumber | string | No | |
zz_dlgbutton_no_human | string | No | |
zz_dlgbutton_tribute | string | No | |
zz_dlghdr_choose_ally | string | No | |
zz_dlghdr_choose_number | string | No | |
zz_dlghdr_choose_player | string | No | |
zz_dlghdr_game_type | string | No | |
zz_dlghdr_root | string | No | |
zz_dlghdr_tribute_amount | string | No | |
zz_dlghdr_tribute_type | string | No | |
zz_Empty0p5 | sound | No | |
zz_Empty1 | sound | No | |
zz_Empty10 | sound | No | |
zz_Empty11 | sound | No | |
zz_Empty12 | sound | No | |
zz_Empty14 | sound | No | |
zz_Empty16 | sound | No | |
zz_Empty18 | sound | No | |
zz_Empty1p5 | sound | No | |
zz_Empty2 | sound | No | |
zz_Empty20 | sound | No | |
zz_Empty22 | sound | No | |
zz_Empty24 | sound | No | |
zz_Empty26 | sound | No | |
zz_Empty28 | sound | No | |
zz_Empty2p5 | sound | No | |
zz_Empty3 | sound | No | |
zz_Empty30 | sound | No | |
zz_Empty32 | sound | No | |
zz_Empty4 | sound | No | |
zz_Empty5 | sound | No | |
zz_Empty6 | sound | No | |
zz_Empty7 | sound | No | |
zz_Empty8 | sound | No | |
zz_Empty9 | sound | No | |
zz_EngineTimerDialogs | timerdialog | Yes | |
zz_EngineTimers | timer | Yes | |
zz_english_button | button | No | |
zz_EnumItemType | integer | No | |
zz_EnumItemTypeT | itemtype | No | |
zz_ErweckteIndex | integer | No | |
zz_ErweckteKreaturen | unit | Yes | |
zz_Farbinterval | real | Yes | |
zz_ForRectItem | boolean | No | |
zz_french_button | button | No | |
zz_game_start_dialog | dialog | No | |
zz_game_start_trigger | trigger | No | |
zz_GewitterBlitze | integer | No | |
zz_GewitterCenter | location | No | |
zz_GlowEffect | effect | Yes | |
zz_GlowEffectPlus | effect | Yes | |
zz_heap_array_0 | integer | Yes | |
zz_heap_array_1 | integer | Yes | |
zz_heap_array_2 | integer | Yes | |
zz_heap_array_begin | integer | No | |
zz_heap_array_end | integer | No | |
zz_heap_arraycount | integer | No | |
zz_heap_descriptor_alloccursor | integer | No | |
zz_heap_descriptor_array_0 | integer | Yes | |
zz_heap_descriptor_array_1 | integer | Yes | |
zz_heap_descriptor_arraycount | integer | No | |
zz_heap_descriptor_begin | integer | No | |
zz_heap_descriptor_end | integer | No | |
zz_heap_descriptor_first | integer | No | |
zz_heap_descriptor_last | integer | No | |
zz_heap_descriptor_record_size | integer | No | |
zz_HeroChoice | trigger | No | |
zz_HeroDiedMsg | trigger | No | |
zz_HeroSkill1 | integer | Yes | |
zz_HeroSkill2 | integer | Yes | |
zz_HeroSkill3 | integer | Yes | |
zz_HeroSkill4 | integer | Yes | |
zz_HeroSkill5 | integer | Yes | |
zz_IsAlreadyPathing | boolean | Yes | |
zz_ItemIndex | integer | No | |
zz_language_dialog | dialog | No | |
zz_language_trigger | trigger | No | |
zz_LastClickedButtonNr | integer | Yes | |
zz_LastCreatedMovingSFX | integer | No | |
zz_LastCreatedMultiboardItem | multiboarditem | No | |
zz_LastMidiSound | sound | No | |
zz_LastMultipleChoice | integer | Yes | |
zz_LifeRegenUpgr | integer | Yes | |
zz_ManaRegenUpgr | integer | Yes | |
zz_MissileLength | integer | No | |
zz_MissileModel | string | Yes | |
zz_MissileOrder | string | Yes | |
zz_MissileUnitType | integer | Yes | |
zz_MJAuswahl | boolean | Yes | |
zz_MJAuswahleinheit | unit | Yes | |
zz_MJLastSound | sound | Yes | |
zz_MJPlayerPointer | integer | No | |
zz_MJSelected | group | Yes | |
zz_MJTrig1 | trigger | Yes | |
zz_MJTrig2 | trigger | Yes | |
zz_ModuloHex | integer | No | |
zz_MoveRateUpgr | integer | Yes | |
zz_MovForward | trigger | No | |
zz_MovingSFX | effect | Yes | |
zz_MovingSFXAbstand | real | Yes | |
zz_MovingSFXCenter | location | Yes | |
zz_MovingSFXCounter | integer | Yes | |
zz_MovingSFXKilled | boolean | Yes | |
zz_MovingSFXLength | integer | No | |
zz_MovingSFXLoop | boolean | Yes | |
zz_MovingSFXNach | rect | Yes | |
zz_MovingSFXNr | integer | Yes | |
zz_MovingSFXPath | string | Yes | |
zz_MovingSFXRadius | real | Yes | |
zz_MovingSFXStartAngle | real | Yes | |
zz_MovingSFXTrigger | trigger | Yes | |
zz_MovingSFXType | integer | Yes | |
zz_MovingSFXUnit | unit | Yes | |
zz_MovingSFXVor | rect | Yes | |
zz_MovingSFXWait | real | Yes | |
zz_MovLeft | integer | Yes | |
zz_MovMoving | boolean | Yes | |
zz_MovRight | integer | Yes | |
zz_MovSidewards | trigger | No | |
zz_MovUnit | unit | Yes | |
zz_ndbn_button | button | Yes | |
zz_ndbn_length | integer | No | |
zz_no_human_mode | button | No | |
zz_NoBuildIndex | integer | No | |
zz_NoBuildRects | rect | Yes | |
zz_NoBuildTrig | trigger | No | |
zz_number_dialog | dialog | No | |
zz_observer_god | boolean | No | |
zz_parsed_command | string | Yes | |
zz_pcbn_button | button | Yes | |
zz_pcbn_length | integer | No | |
zz_pcbn_number | integer | Yes | |
zz_player_dialog | dialog | No | |
zz_PlayerLeftMsg | trigger | No | |
zz_PortaleffektA | effect | Yes | |
zz_PortaleffektB | effect | No | |
zz_PortaltriggerA | trigger | No | |
zz_PortaltriggerB | trigger | No | |
zz_PressDown | trigger | No | |
zz_PressLeft | trigger | No | |
zz_PressRight | trigger | No | |
zz_PressUp | trigger | No | |
zz_PrevCam | camerasetup | Yes | |
zz_RangeUpgr | integer | Yes | |
zz_RegrowingTrees | trigger | No | |
zz_ReleaseLeft | trigger | No | |
zz_ReleaseRight | trigger | No | |
zz_ReleaseUp | trigger | No | |
zz_root_dialog | dialog | No | |
zz_SaveLoadSettings | boolean | Yes | |
zz_sdbn_button | button | Yes | |
zz_sdbn_length | integer | No | |
zz_sdbn_number | integer | Yes | |
zz_SEAnzahl | integer | No | |
zz_SECaster | unit | No | |
zz_SECastingType | integer | Yes | |
zz_SEFunc | string | Yes | |
zz_SEId | integer | Yes | |
zz_SEIndex | integer | No | |
zz_SELastOrder | string | No | |
zz_SelectableHeros | group | No | |
zz_SEMana | real | Yes | |
zz_SEOrder | string | Yes | |
zz_SERange | real | Yes | |
zz_SETarget | unit | No | |
zz_SETX | real | No | |
zz_SETY | real | No | |
zz_ShortcutId | string | Yes | |
zz_start_dialog | dialog | No | |
zz_StimmeAbgegeben | boolean | Yes | |
zz_Stimmen | integer | Yes | |
zz_StimmenAbgabe | trigger | No | |
zz_StimmenAbgegeben | integer | No | |
zz_StringIdent | string | No | |
zz_swedish_button | button | No | |
zz_TargetDistance | real | Yes | |
zz_TargetUpgr | integer | Yes | |
zz_TimerCounter | integer | No | |
zz_TPCenter | rect | No | |
zz_TPCondition | triggercondition | Yes | |
zz_TPEingang | rect | Yes | |
zz_TPNextTown | rect | No | |
zz_TPOpen | boolean | Yes | |
zz_TPPointer | integer | No | |
zz_TPRestrictGroup | group | No | |
zz_TPRestrictType | integer | No | |
zz_TPWatchersA | real | No | |
zz_TPWatchersB | real | No | |
zz_tribute_amount | string | No | |
zz_tribute_dlg | dialog | No | |
zz_tribute_dlg_button | button | Yes | |
zz_tribute_dlg_length | integer | No | |
zz_tribute_g | button | No | |
zz_tribute_l | button | No | |
zz_tribute_type | string | No | |
zz_TrigAlways | trigger | No | |
zz_UnfertigeGebaeude | unit | Yes | |
zz_UnfertigeGebIndex | integer | No | |
zz_UnfertigeUpgrades | unit | Yes | |
zz_UnfertigeUpgradesIndex | integer | No | |
zz_UnitIndex | integer | No | |
zz_UseAngle | boolean | Yes | |
zz_UseDistance | boolean | Yes | |
zz_UseOffset | boolean | Yes | |
zz_UseRoll | boolean | Yes | |
zz_UseRotation | boolean | Yes | |
zz_UseZOffset | boolean | Yes | |
zz_VotingAuswahl | string | Yes | |
zz_VotingBoard | leaderboard | Yes | |
zz_VotingErgebnis | string | No | |
zz_VotingFolge | string | Yes | |
zz_VotingGeheim | boolean | No | |
zz_VotingTimer | timerdialog | No | |
zz_XAcquiredItem | item | Yes | |
zz_XBuiltConstruction | unit | Yes | |
zz_XDroppedItem | item | Yes | |
zz_XLearnedSkill | integer | Yes | |
zz_XResearchedUpgrade | integer | Yes | |
zz_XSoldItem | item | Yes | |
zz_XSoldUnit | unit | Yes | |
zz_XSummonedUnit | unit | Yes | |
zz_XTrainedUnit | unit | Yes |
//***************************************************************************
//* *
//* Stomp *
//* *
//* By Blade.dk *
//* *
//* http://www.wc3jass.com/viewforum.php?f=23 *
//* *
//***************************************************************************
//===========================================================================
//Stomp Spell Configuration Section.
constant function StompSpellId takes nothing returns integer
return 'A001' // The rawcode of the Stomp spell.
endfunction
constant function StompDamage takes real level returns real
return 100*level // The damage dealt when the units hits the ground.
endfunction
constant function StompArea takes real level returns real
return 350.00+50.00*level // The spells area of effect.
endfunction
constant function StompHitAllies takes nothing returns boolean
return false // If this is true the spell will affect both allied and enemy units. Otherwise it will affect only enemies.
endfunction
constant function StompDisablePathing takes nothing returns boolean
return false // If this is true the units will be able to pass through units in their way, while being in the air. That looks best, but can cause problems because the units can land at very strange places, even outside the playable map area.
endfunction
constant function StompFlyHeightChangeAllowerId takes nothing returns integer
return 'Amrf' // The rawcode of any "Fly Height Trick". If you haven't changed Medivh's Crow Form spell, just leave this as it is now, and it shouldn't cause problems. However if you've changed that spell, copy/paste it, reset the new one, and put its rawcode here.
endfunction
//===========================================================================
//The spell itself. Don't touch it unless you know exactly what you're doing.
function Trig_Stomp_Conditions takes nothing returns boolean
return GetSpellAbilityId() == StompSpellId()
endfunction
function StompConditions takes nothing returns boolean
if (StompHitAllies()) then
return (not(IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL))) and (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0) and (GetFilterUnit() != GetTriggerUnit()) and (not(GetHandleBoolean(GetFilterUnit(), "Stomp")))
endif
return (not(IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL))) and (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0) and (IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(GetTriggerUnit()))) and (not(GetHandleBoolean(GetFilterUnit(), "Stomp")))
endfunction
function StompMove takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit e = GetEnumUnit()
local unit c = GetHandleUnit(t, "caster")
local group g = GetHandleGroup(t, "group")
local location l = Location(GetHandleReal(t, "X"), GetHandleReal(t, "Y"))
local location current = GetUnitLoc(e)
local location new = PolarProjectionBJ(l, DistanceBetweenPoints(l, current)+18, AngleBetweenPoints(l, current))
call SetUnitPositionLoc(e, new)
if (GetHandleBoolean(t, "half")) then
call SetUnitFlyHeight(e, 0, 1800)
endif
if (GetHandleBoolean(t, "end")) then
call SetUnitInvulnerable(e, false)
call UnitDamageTarget(c, e, StompDamage(GetHandleInt(t, "level")), true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS) // Just if someone should doubt, ATTACK_TYPE_NORMAL is attack type spells in GUI.
call SetHandleBoolean(e, "Stomp", false)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl", new))
if (StompDisablePathing()) then
call SetUnitPathing(e, true)
endif
endif
set t = null
set e = null
set c = null
set g = null
call RemoveLocation(l)
set l = null
call RemoveLocation(new)
set new = null
call RemoveLocation(current)
set current = null
endfunction
function StompLoop takes nothing returns nothing
local timer t = GetExpiredTimer()
local group g = GetHandleGroup(t, "group")
call SetHandleReal(t, "timeelapsed", GetHandleReal(t, "timeelapsed")+0.05)
if (GetHandleReal(t, "timeelapsed") > 0.6) then
call SetHandleBoolean(t, "half", true)
endif
if (GetHandleReal(t, "timeelapsed") > 0.9) then
call SetHandleBoolean(t, "end", true)
endif
call ForGroup(g, function StompMove)
if (GetHandleBoolean(t, "end")) then
call FlushHandleLocals(t)
call DestroyTimer(t)
call DestroyGroup(g)
endif
set t = null
set g = null
endfunction
function StompStart takes nothing returns nothing
local unit e = GetEnumUnit()
local unit c = GetTriggerUnit()
call UnitAddAbility(e, StompFlyHeightChangeAllowerId())
call UnitRemoveAbility(e, StompFlyHeightChangeAllowerId())
call SetUnitFlyHeight(e, 99999999, 1000)
if (StompDisablePathing()) then
call SetUnitPathing(e, false)
endif
call SetUnitInvulnerable(e, true) // Makes the units invulnerable while they're in the air. If they were vulnerabe, they could get attacked, and if they died their corpse would stay in the air, which looks very ugly.
call SetHandleBoolean(e, "Stomp", true) // A boolean used so units won't be affected by multiple stomps, that would drew them in different directions which would suck.
set e = null
set c = null
endfunction
function Trig_Stomp_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local location l = GetUnitLoc(c)
local boolexpr be = Condition(function StompConditions)
local integer level = GetUnitAbilityLevel(c, GetSpellAbilityId())
local group g = GetUnitsInRangeOfLocMatching(StompArea(level), l, be)
local timer t = CreateTimer()
call SetHandleReal(t, "X", GetLocationX(l))
call SetHandleReal(t, "Y", GetLocationY(l))
call SetHandleInt(t, "level", level)
call SetHandleHandle(t, "caster", c)
call SetHandleHandle(t, "group", g)
call ForGroup(g, function StompStart)
call TimerStart(t, 0.05, true, function StompLoop) // Some might call it dumb using 0.05, but it ain't. If you used 0.01 the chance for lag would be 5 times greater, and the difference can't be seen with the human eye.
set c = null // (continued comment) And as there can be many units caught in the AoE it could be really laggy, especially on Battle.net.
call RemoveLocation(l)
set l = null
call DestroyBoolExpr(be)
set be = null
set g = null
set t = null
endfunction
//===========================================================================
function InitTrig_Stomp takes nothing returns nothing
set gg_trg_Stomp = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stomp, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Stomp, Condition( function Trig_Stomp_Conditions ) )
call TriggerAddAction( gg_trg_Stomp, function Trig_Stomp_Actions )
endfunction