//TESH.scrollpos=0
//TESH.alwaysfold=0
function TargetFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), bj_groupEnumOwningPlayer) and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false and (GetWidgetLife(GetFilterUnit())>0.405)
endfunction
function DamageEnemiesArea takes unit whichUnit, real radius, real x, real y, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType, string sfx returns nothing
local group g = CreateGroup()
local boolexpr b = Condition(function TargetFilter)
local real x1
local real y1
local unit t
set bj_groupEnumOwningPlayer = GetOwningPlayer(whichUnit)
call GroupEnumUnitsInRange(g, x, y, radius, b)
call DestroyBoolExpr(b)
loop
set t = FirstOfGroup(g)
exitwhen t == null
call GroupRemoveUnit(g,t)
set x1 = GetUnitX(t)
set y1 = GetUnitY(t)
call DestroyEffect(AddSpecialEffect(sfx, x1, y1))
call UnitDamageTarget(whichUnit,t,amount,attack, ranged,attackType,damageType,weaponType)
endloop
call DestroyGroup(g)
set g = null
set b = null
set x = 0.00
set y = 0.00
endfunction
Name | Type | is_array | initial_value |
DashCaster | unit | Yes | |
DashDamage | real | Yes | |
DashDistance | integer | Yes | |
DashGroup1 | group | No | |
DashGroup2 | group | No | |
DashGroup3 | group | No | |
DashInteger | integer | Yes | |
DashPoint3 | location | Yes | |
DashPoint4 | location | Yes | |
DashPoint5 | location | Yes | |
DashReal1 | real | Yes | |
DashReal2 | real | Yes | |
DashSpeed | real | Yes | |
DEBUG | boolean | No | |
DEBUG_Gold | integer | No | |
DEBUG_GoldN | integer | No | |
DefeatStrings | string | Yes | |
Distance | real | Yes | |
DP_Boolean | boolean | Yes | |
DP_Caster | unit | Yes | |
DP_Damage | real | Yes | |
DP_Dummy | unit | Yes | |
DP_Dummy2 | unit | Yes | |
DP_Duration | real | Yes | |
DP_Expired | real | Yes | |
DP_Group | group | Yes | |
DP_Index1 | integer | No | |
DP_Index2 | integer | No | |
DP_IndexLoop | integervar | No | |
DP_loop | integervar | No | |
DP_Player | player | Yes | |
DP_TargetPoint | location | Yes | |
DP_TempPoint | location | No | |
ESCaster | unit | No | |
ESCasterLoc | location | No | |
ESDummy | unit | Yes | |
ESDummyLoc | location | No | |
ESTimer | timer | No | |
ExtraStreak_Chcker | boolean | Yes | |
ExtraStreak_Kills | integer | Yes | |
ExtraStreak_Sounds | sound | Yes | |
ExtraStreak_Strings | string | Yes | |
ExtraStreak_Timer | integer | Yes | |
ExtraStreakInt | integervar | No | |
FSCaster | unit | Yes | |
FSCasterPoint | location | Yes | |
FSCount | integer | No | |
FSDistance | real | Yes | |
FSDummy | unit | Yes | |
FSDummyGroup | group | Yes | |
FSFace | real | Yes | |
FSFade | real | Yes | |
FSFadeC | real | Yes | |
FSFadeC2 | real | Yes | |
FSHas | boolean | Yes | |
FSIndex | integer | No | |
FSInteger | integervar | No | |
FSLastRecycled | integer | No | |
FSMax | integer | No | |
FSMaxDistance | real | Yes | |
FSMove | real | Yes | |
FSRecycledList | integer | Yes | |
FSTime | real | No | |
Hasis | hashtable | No | |
Heroes | unit | Yes | |
Laughattacker | unit | No | |
Laughdummy | unit | No | |
Laughpoint | location | No | |
Laughunit | unit | No | |
Leap_Angle | real | Yes | |
Leap_Caster | unit | No | |
Leap_CasterLoc | location | No | |
Leap_CountMaxSize | integer | No | |
Leap_Counts | integer | No | |
Leap_CustomValue | integer | No | |
Leap_Distance | real | Yes | |
Leap_DistanceTravel | real | Yes | |
Leap_MoveGroup | group | No | |
Leap_Movement | location | No | |
Leap_UnitGroup | group | No | |
NeutVar | location | No | |
Player_Colours | string | Yes | |
Player_Strings | string | Yes | |
Point | location | Yes | |
PWAngle | real | Yes | |
PWCaster | unit | Yes | |
PWCasterPoint | location | Yes | |
PWCount | integer | No | |
PWDamage | real | Yes | |
PWDistance | real | Yes | |
PWDMGGroup | group | Yes | |
PWHas | boolean | Yes | |
PWIndex | integer | No | |
PWInteger | integervar | No | |
PWLastRecycled | integer | No | |
PWMax | integer | No | |
PWMaxDistance | real | Yes | |
PWPhoenix | unit | Yes | |
PWRecycledList | integer | Yes | |
PWTargetPoint | location | Yes | |
r | real | No | |
randomintegerbangis | integer | No | |
randomintegerbutaw | integer | No | |
SBAngle | real | Yes | |
SBCaster | unit | Yes | |
SBCasterPoint | location | Yes | |
SBChannelGroup | group | Yes | |
SBCount | integer | No | |
SBDistance | real | Yes | |
SBDummyGroup | group | Yes | |
SBEffectDelayer | integer | Yes | |
SBHas | boolean | Yes | |
SBIndex | integer | No | |
SBInteger | integervar | No | |
SBLastRecycled | integer | No | |
SBLevel | integer | Yes | |
SBMax | integer | No | |
SBMaxDistance | real | Yes | |
SBRecycledList | integer | Yes | |
SBScale | real | Yes | |
SBTargetPoint | location | Yes | |
SBTempGroup | group | No | |
SBTempPoint | location | No | |
SBTempPoint2 | location | No | |
SBTimer | real | Yes | |
Score | integer | Yes | |
Sfx | effect | Yes | |
spe1 | effect | No | |
spe2 | effect | No | |
Streak_Kills | integer | Yes | |
Streak_Sounds | sound | Yes | |
Streak_Strings | string | Yes | |
telebangis1 | location | No | |
telebangis2 | location | No | |
telebangis3 | location | No | |
telebutaw1 | location | No | |
telebutaw2 | location | No | |
telebutaw3 | location | No | |
TempGroup | group | No | |
TempInt | integer | No | |
TempLoc | location | No | |
TempLoc43 | location | No | |
TempLoc44 | location | No | |
TempPoint | location | No | |
TempPoint2 | location | No | |
TempUnit | unit | No | |
tips | integer | No | |
UnitVarAttacked | unit | No | |
UnitVarAttacker | unit | No |
//TESH.scrollpos=54
//TESH.alwaysfold=0
//***************************************************************************************************
//* ===================
//* Runing Destruction
//* ===================
//* Made by Shdow89
//*
//*
//* How to implement:
//* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//* 1. Copy the spell "Runing Destruction" to your map, along with it's buff.
//*
//* 2. Make a global variable of the type hashtable and name it Hasis
//*
//* 3. Copy the costum script section and paste it in your map.
//*
//* 4. Copy this trigger and Paste it in your map. Or you can just copy the code
//* make a trigger with a name Runing Destruction, convert it to costum text(JASS) and paste the code.
//*
//* 5. Change the rawcode of the spell and buff in this code, to the ones in your map, and use the spell.
//* Go down through constants and change what you like.
//*
//* Choosable/Effects:
//* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//* Go down through constant function and change to what you like. Units affected are:
//* Enemy Units, Non-Magic immune, Non-Structures and living. This can be changed in the
//* costum script section of the map.
//*
//* Editor's Word:
//* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//* My third JASS spell. I'm really proud of this one xD, and I enjoyed making it.
//* Have fun and alter what you want, just remember to give credits :).
//*
//* Spells Action:
//* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//* The caster enters a destructive state. Whenever he's moving he deals damage to nearby
//* enemy units. Faster the caster is, more damage he will deal. In addition 1 % of caster's
//* movement speed is transfered into damage.
//*
//* Credits:
//* ¯¯¯¯¯¯¯¯
//* Daelin for his tutorial about DistanceBetweenPoints.
//* Deuterium for his continous comments and help :) (Hope you like this one :))
//* And you for dling the map :).
//*
//*
//*************************************************************************************************
constant function Runing_Destruction_ID takes nothing returns integer
return 'A00R' // Runing Destruction ability ID
endfunction
constant function Runing_Destruction_Buff_ID takes nothing returns integer
return 'B00B' // It's buff ID
endfunction
constant function Caster_SFX takes nothing returns string
return "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" // SFX for the caster
endfunction
constant function Target_SFX takes nothing returns string
return "Abilities\\Spells\\Other\\Volcano\\VolcanoMissile.mdl" // SFX for the target
endfunction
constant function Caster_SFX_Point takes nothing returns string
return "chest" // The attachment point for SFX for caster
endfunction
constant function Radius takes nothing returns real
return 400.00 // AOE of the spell
endfunction
constant function Timer_Loop takes nothing returns real
return 0.1 // How fast timer repeats
endfunction
constant function Damage_Per takes integer i returns real
return 0.2 * i // Damage, it's 20 % * level of the Runing Destruction
endfunction
constant function Speed_Damage takes nothing returns real
return 0.01 // extra damage from the movement speed it's 1 % now.
endfunction
//===========================================================================================
//Don't edit anything below this, if you are unsure.
//==============================================================================================
function Trig_Runing_Destruction_Conditions takes nothing returns boolean
return GetSpellAbilityId() == Runing_Destruction_ID()
endfunction
function Runing_Destruction_Effect takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit butters = LoadUnitHandle(udg_Hasis, GetHandleId(t), 1)
local real snail = GetUnitMoveSpeed(butters)*Speed_Damage()
local real damage = 0.00
local real x = LoadReal(udg_Hasis, GetHandleId(t), 2)
local real y = LoadReal(udg_Hasis, GetHandleId(t), 3)
local integer i = LoadInteger(udg_Hasis, GetHandleId(t), 4)
local real x1 = GetUnitX(butters)
local real y1 = GetUnitY(butters)
if (GetUnitAbilityLevel(butters, Runing_Destruction_Buff_ID()) > 0) then
if x != x1 or y != y1 then
set damage = Damage_Per(i) * SquareRoot((x1-x)*(x1-x) + (y1-y)*(y1-y)) + snail
call DestroyEffect(AddSpecialEffectTarget(Caster_SFX(), butters, Caster_SFX_Point()))
call DamageEnemiesArea (butters, Radius(), x1, y1, damage, true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS, Target_SFX())
endif
call SaveReal(udg_Hasis, GetHandleId(t), 2, x1)
call SaveReal(udg_Hasis, GetHandleId(t), 3, y1)
else
call PauseTimer(t)
call DestroyTimer(t)
set butters = null
endif
endfunction
function Trig_Runing_Destruction_Actions takes nothing returns nothing
local timer t = CreateTimer()
local unit cartman = GetTriggerUnit()
local integer i = GetUnitAbilityLevel(cartman, Runing_Destruction_ID())
local real x = GetUnitX(cartman)
local real y = GetUnitY(cartman)
call SaveUnitHandle(udg_Hasis, GetHandleId(t), 1, cartman)
call SaveReal(udg_Hasis, GetHandleId(t), 2, x)
call SaveReal(udg_Hasis, GetHandleId(t), 3, y)
call SaveInteger(udg_Hasis, GetHandleId(t), 4, i)
call TimerStart(t, Timer_Loop(), true, function Runing_Destruction_Effect)
set cartman = null
endfunction
//==================================================================================================
function InitTrig_Runing_Destruction takes nothing returns nothing
local trigger trig = CreateTrigger()
local integer guza
set guza = 0
loop
call TriggerRegisterPlayerUnitEvent(trig, Player(guza), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set guza = guza + 1
exitwhen guza == 16
endloop
call TriggerAddCondition(trig, Condition(function Trig_Runing_Destruction_Conditions))
call TriggerAddAction(trig, function Trig_Runing_Destruction_Actions)
call Preload(Caster_SFX())
call Preload(Target_SFX())
call PreloadStart()
set udg_Hasis = InitHashtable()
set trig = null
endfunction