Moderator
M
Moderator
|
DescriptionSends out a powerful wave of spiritual energy in the shape of a crescent moon. When the wave collides with an enemy unit, it pulls the unit along with it.
Level 1 - 75 damage on impact, 15 damage per second as wave pulls
Level 2 - 150 damage on impact, 30 damage per second as wave pulls
Level 3 - 225 damage on impact, 45 damage per second as wave pulls
Triggers
- GT Config
- Events
- Map initialization
- Conditions
- Actions
- -------- Change anything here with caution --------
- -------- -------------------- --------
- -------- -------------------- --------
- -------- Determines the activating spell --------
- -------- -------------------- --------
- Set GT_Ability = Getsuga Tensho
- -------- -------------------- --------
- -------- Determines the dummy unit for spell --------
- -------- -------------------- --------
- Set GT_Dummy = Dummy (Vexorian, Anitarf, Infrane)
- -------- -------------------- --------
- -------- Determines the area in which enemy units may be targets of the spell --------
- -------- -------------------- --------
- Set GT_AOE = 100.00
- -------- -------------------- --------
- -------- Determines the initial height of the missile --------
- -------- This is an addition to the caster's current flying height --------
- -------- -------------------- --------
- Set GT_FlyHeight = 100.00
- -------- -------------------- --------
- -------- Determines the attacktype of the damage dealt on targets --------
- -------- -------------------- --------
- Set GT_AttackType = Chaos
- -------- -------------------- --------
- -------- Determines the damagetype of the damage dealt on targets --------
- -------- Set this only to Universal(100% damage, ignores armor) or Normal (Reduction) --------
- -------- Unless a Damage Detection System is available --------
- -------- As the other types have no effect --------
- -------- -------------------- --------
- Set GT_DamageType = Universal
- -------- -------------------- --------
- -------- Determines the size of the missile --------
- -------- Works the same as in object editor --------
- -------- -------------------- --------
- Set GT_InitialSize = 1.25
- -------- -------------------- --------
- -------- Ability level influences the following variables --------
- -------- -------------------- -------------------- -------------------- --------
- -------- Determines the inital impact damage of the missile --------
- -------- -------------------- --------
- Set GT_InitialDamage = 75.00
- -------- -------------------- --------
- -------- Determines the inital speed of the missile --------
- -------- -------------------- --------
- Set GT_InitialSpeed = 18.00
- -------- -------------------- -------------------- --------
- -------- Determines how often missile increases in impact damage and speed --------
- -------- -------------------- --------
- Set GT_Interval = 1.00
- -------- -------------------- -------------------- --------
- -------- GT_Interval affects the following two variables --------
- -------- -------------------- --------
- -------- Determines how fast impact damage increases over time --------
- -------- -------------------- --------
- Set GT_DamageInc = 10.00
- -------- -------------------- --------
- -------- Determines how fast the speed of the missile increases over time --------
- -------- -------------------- --------
- Set GT_SpeedInc = 1.50
- -------- -------------------- -------------------- -------------------- --------
- -------- Determines the periodic time for the loop --------
- -------- -------------------- --------
- Custom script: set udg_GT_LoopTime = 0.031250000
- -------- -------------------- --------
- -------- Determines the damage targets take as they are pulled by the missile --------
- -------- Damages target per LoopTime --------
- -------- -------------------- --------
- Set GT_KB_Dmg = 15.00
- -------- -------------------- --------
- -------- Determines the model of the missile in game --------
- -------- -------------------- --------
- Set GT_Model = war3mapImported\Moon Missile.mdl
- -------- -------------------- --------
- -------- Determines the special effect that occurs when missile drags targets --------
- -------- -------------------- --------
- Set GT_KB_Effect = Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
- -------- -------------------- --------
- -------- Determines whether the missile will destroy trees or not --------
- -------- -------------------- --------
- Set GT_DestroyTrees = True
- -------- -------------------- --------
- -------- Determines the special effect when missile collides with an enemy unit --------
- -------- -------------------- --------
- Set GT_ImpactFX = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
- -------- -------------------- --------
- -------- Determines the special effect when missile collides with an enemy unit --------
- -------- When enemy unit is in water --------
- -------- -------------------- --------
- Set GT_ImpactFX_Water = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
- -------- -------------------- --------
- -------- Determines how far missile travels --------
- -------- -------------------- --------
- Set GT_Distance = 4000.00
- -------- -------------------- --------
- GT Cast
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to GT_Ability
- Actions
- -------- Calculate angle for missile movement --------
- Custom script: local unit u = GetTriggerUnit()
- Custom script: local real x = GetUnitX(u)
- Custom script: local real y = GetUnitY(u)
- Custom script: local real a = Atan2(GetSpellTargetY() - y, GetSpellTargetX() - x)
- -------- Create a dummy unit --------
- Custom script: set udg_GT_Missile = CreateUnit(GetTriggerPlayer(),udg_GT_Dummy,x,y,bj_RADTODEG *a)
- -------- Give missile an index --------
- Set GT_ID = (Custom value of GT_Missile)
- -------- Attach a model to missile --------
- Special Effect - Create a special effect attached to the chest of GT_Missile using GT_Model
- Set GT_DummyModel[GT_ID] = (Last created special effect)
- -------- Calculate missile speed --------
- Custom script: set udg_GT_Cos[udg_GT_ID] = Cos(a)
- Custom script: set udg_GT_Sin[udg_GT_ID] = Sin(a)
- -------- Setup missile owner --------
- Custom script: set udg_GT_Caster[udg_GT_ID] = u
- Set GT_Owner[GT_ID] = (Triggering player)
- -------- Setup other components of missile --------
- Animation - Change GT_Missile's size to ((GT_InitialSize x 100.00)%, 0.00%, 0.00%) of its original size
- Animation - Change GT_Missile flying height to ((Current flying height of GT_Caster[GT_ID]) + GT_FlyHeight) at 0.00
- Set GT_Damage[GT_ID] = GT_InitialDamage
- Set GT_Speed[GT_ID] = GT_InitialSpeed
- Custom script: set udg_GT_AbilityLevel[udg_GT_ID] = GetUnitAbilityLevel(u, udg_GT_Ability)
- Custom script: set udg_GT_Damage[udg_GT_ID] = udg_GT_InitialDamage*udg_GT_AbilityLevel[udg_GT_ID]
- Set GT_Duration[GT_ID] = GT_Distance
- -------- Represents GT_Interval --------
- Set GT_Period[GT_ID] = 0.00
- -------- Create group to collect potential targets --------
- Custom script: set udg_GT_KB_Group[udg_GT_ID] = CreateGroup()
- -------- Keep track of spell instances --------
- Set GT_Index = (GT_Index + 1)
- -------- Start looping trigger --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GT_Index Equal to 1
- Then - Actions
- Countdown Timer - Start GT_Timer as a Repeating timer that will expire in GT_LoopTime seconds
- Else - Actions
- Unit Group - Add GT_Missile to GT_MissileGroup
- -------- Clean reference leaks --------
- Custom script: set u = null
- GT Loop
- Events
- Time - GT_Timer expires
- Conditions
- Actions
- -------- Missile Movement --------
- Unit Group - Pick every unit in GT_MissileGroup and do (Actions)
- Loop - Actions
- Set GT_Missile = (Picked unit)
- -------- Get index of missile --------
- Set GT_ID = (Custom value of GT_Missile)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GT_Duration[GT_ID] Greater than 0.00
- (GT_Caster[GT_ID] is dead) Equal to False
- Then - Actions
- Set GT_Duration[GT_ID] = (GT_Duration[GT_ID] - GT_Speed[GT_ID])
- -------- Setup coordinates for missile movement --------
- Custom script: set udg_GT_MissileX = GetUnitX(udg_GT_Missile) + udg_GT_Speed[udg_GT_ID]*udg_GT_Cos[udg_GT_ID]
- Custom script: set udg_GT_MissileY = GetUnitY(udg_GT_Missile) + udg_GT_Speed[udg_GT_ID]*udg_GT_Sin[udg_GT_ID]
- -------- Are coordinates within map boundaries --------
- Custom script: if IsPointInMap(udg_GT_MissileX,udg_GT_MissileY) then
- Custom script: call SetUnitX(udg_GT_Missile, udg_GT_MissileX)
- Custom script: call SetUnitY(udg_GT_Missile, udg_GT_MissileY)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GT_Period[GT_ID] Less than or equal to 0.00
- Then - Actions
- Custom script: set udg_GT_Damage[udg_GT_ID] = udg_GT_Damage[udg_GT_ID] + udg_GT_DamageInc*udg_GT_AbilityLevel[udg_GT_ID]
- Custom script: set udg_GT_Speed[udg_GT_ID] = udg_GT_Speed[udg_GT_ID] + udg_GT_SpeedInc*udg_GT_AbilityLevel[udg_GT_ID]
- Set GT_Period[GT_ID] = GT_Interval
- Else - Actions
- Set GT_Period[GT_ID] = (GT_Period[GT_ID] - GT_LoopTime)
- -------- Destroy trees if enabled --------
- Set GT_TargetPoint = (Point(GT_MissileX, GT_MissileY))
- Destructible - Pick every destructible within GT_AOE of GT_TargetPoint and do (Actions)
- Loop - Actions
- Set Dest = (Picked destructible)
- Set TreeKill = GT_DestroyTrees
- Trigger - Run TreeKiller GUI <gen> (ignoring conditions)
- -------- Pick out potential targets --------
- Custom script: set bj_wantDestroyGroup = true
- Unit Group - Pick every unit in (Units within GT_AOE of GT_TargetPoint) and do (Actions)
- Loop - Actions
- Set GT_Target = (Picked unit)
- Set GT_TempLoc = (Position of GT_Target)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (GT_Target belongs to an enemy of GT_Owner[GT_ID]) Equal to True
- (GT_Target is dead) Equal to False
- (GT_Target is A structure) Equal to False
- (GT_Target is A flying unit) Equal to False
- (Distance between GT_TargetPoint and GT_TempLoc) Less than or equal to 100.00
- Then - Actions
- -------- Stun Target --------
- Set STE_TARGET = GT_Target
- Set STE_DURATION = GT_LoopTime
- Set STE_ADD_STUN = True
- Custom script: call TriggerEvaluate(udg_STE_TRIGGER)
- -------- Handles everything related to knockback --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (GT_Target is in GT_KB_Group[GT_ID]) Equal to False
- Then - Actions
- -------- Create Sfx on impact --------
- Custom script: set udg_GT_MissileX = GetUnitX(udg_GT_Target)
- Custom script: set udg_GT_MissileY = GetUnitY(udg_GT_Target)
- Custom script: if not IsTerrainPathable(GetUnitX(udg_GT_Target), GetUnitY(udg_GT_Target), PATHING_TYPE_FLOATABILITY) then
- Custom script: call DestroyEffect(AddSpecialEffect(udg_GT_ImpactFX_Water, udg_GT_MissileX, udg_GT_MissileY))
- Custom script: else
- Custom script: call DestroyEffect(AddSpecialEffect(udg_GT_ImpactFX, udg_GT_MissileX, udg_GT_MissileY))
- Custom script: endif
- -------- Damage target on impact --------
- Unit - Cause GT_Caster[GT_ID] to damage GT_Target, dealing GT_Damage[GT_ID] damage of attack type GT_AttackType and damage type GT_DamageType
- -------- Prevent damaging target twice on impact --------
- Unit Group - Add GT_Target to GT_KB_Group[GT_ID]
- Else - Actions
- -------- 33% chance to damage target while dragging it --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Random integer number between 0 and 2) Equal to 0
- Then - Actions
- Custom script: call UnitDamageTarget(udg_GT_Caster[udg_GT_ID], udg_GT_Target, udg_GT_KB_Dmg*udg_GT_AbilityLevel[udg_GT_ID], false, false, udg_GT_AttackType, udg_GT_DamageType, null)
- Special Effect - Create a special effect attached to the origin of GT_Target using GT_KB_Effect
- Special Effect - Destroy (Last created special effect)
- Else - Actions
- -------- Drag Target --------
- Custom script: call SetUnitX(udg_GT_Target, udg_GT_MissileX)
- Custom script: call SetUnitY(udg_GT_Target, udg_GT_MissileY)
- Else - Actions
- Custom script: call RemoveLocation(udg_GT_TempLoc)
- Custom script: call RemoveLocation(udg_GT_TargetPoint)
- Custom script: else
- Set GT_Duration[GT_ID] = 0.00
- Custom script: endif
- Else - Actions
- -------- Deindex spell instance --------
- Custom script: call DestroyGroup(udg_GT_KB_Group[udg_GT_ID])
- Special Effect - Destroy GT_DummyModel[GT_ID]
- Unit Group - Remove GT_Missile from GT_MissileGroup
- Unit - Remove GT_Missile from the game
- Set GT_Index = (GT_Index - 1)
- -------- Turn off looping trigger if number of spell instances equal 0 --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GT_Index Equal to 0
- Then - Actions
- Countdown Timer - Pause GT_Timer
- Else - Actions
Creditsemjlr3 - Test Map
Alima - World Bounds
Daffa the Mage - TreeKiller
BPower - Stun Engine
MoCo - FieldOfView
Bribe - Unit Indexer
Judash - Moon Missile
Changelog2.0
1. Hopefully fixed all issues related to knockback group
2. Removed update size feature
3. Changed how damage impact increases
4. Implemented suggestions from the first three posts. Thanks to those who gave suggestions.
5. Updated spell tooltip
2.5 - 3.0
1. Reverted how damage impact increases
2. Changed duration to depend on time. Time is easier to use than distance and will aid with implementing a new feature. Readded distance as a limit. Time is now a function of distance and speed. More on the new feature later.
3. Changed spell icon.
4. Fixed issues with knockback group.
5. Added more configurables.
6. Implemented other suggestions. Thanks to all who commented.
4.0 - 4.5
1. Restructured code as per IcemanBo's requests.
2. Removed time as a configurable.
1. Some minor changes here and there.
2. Reworked test map.
3. Redid config documentation.
4. Removed an unnecessary configurable.
5. Fixed the group array leak.
6. Added a distance check so that changing AOE would not make visuals fugly.