~GaLs~
† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
- Reaction score
- 180
Black Hole..
The ultimate of the universe...
Came up on warcraft3...Yeah !! Thats me...i made it!!
Although this spell looks alike to dota Enigma's ultimate....but it is not...this is made by me by scratch.
Suck the nearby enemy (750 AOE) to the point being casted...
Dealing level of ability x 10 damage every second.
Jass Version:
*It is advise to use the Jass version as it is much more realistic because the speed of sliding in is not constant.
It depends on how far the enemy from the casted point, the nearer, sucks faster.
Download Here:
View attachment Black Hole.w3x
View attachment Black Hole +Jass v1.1.w3x
The ultimate of the universe...
Came up on warcraft3...Yeah !! Thats me...i made it!!
Although this spell looks alike to dota Enigma's ultimate....but it is not...this is made by me by scratch.
Suck the nearby enemy (750 AOE) to the point being casted...
Dealing level of ability x 10 damage every second.
Jass Version:
JASS:
scope BlackHoleJass
//===================================================================================
// BlackHole
// by kentchow75/~GaLs~
//===================================================================================
//
// Implemention Instruction
//
//--------------------------------------------------------------------------------
// -Object Needed to be copied from Object Editor to your map.
// [ Ability ]
// 1. Black Hole [E]
//
//--------------------------------------------------------------------------------
// -Trigger
// 1. Copy this whole trigger to your map.
// 2. Copy ABC to your map if you don't have one.
// 3. Copy RealXY to your map if you don't have one.
//--------------------------------------------------------------------------------
// -Requirements
// 1. Jass NewGen WorldEditor from <a href="http://www.wc3campaigns.net" target="_blank" class="link link--external" rel="nofollow ugc noopener">www.wc3campaigns.net</a>. ( v4d and above )
// 2. ABC system.
// 3. RealXY library.
//--------------------------------------------------------------------------------
//===================================================================================
// Implementation End
//===================================================================================
globals
//*******************************************************************************************
// Configuration (This is where you need to edit to make the spell works in your map)
//*******************************************************************************************
//<-------------------- Rawcode -------------------->//
private constant integer SPELL_ID = 039;A003039; //Rawcode of the Ability
//<-------------------- Rawcode End -------------------->//
//<-------------------- Radius -------------------->//
private constant real RADIUS = 750. //How far will this spell sucks enemy from the point being casted
//<-------------------- Radius End -------------------->//
//<-------------------- Period -------------------->//
private constant real PERIOD = 0.05 //How fast will the unit being suck (The lesser, the faster)
//<-------------------- Period End -------------------->//
//<-------------------- Effect String -------------------->//
private constant string UNIT_EFFECT = "Abilities\\Spells\\Other\\Incinerate\\IncinerateBuff.mdl"
//The effect that will be shown on the unit when the unit is being suck
private constant string LOC_EFFECT = "Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl"
//The effect that will shown in the target ground (Advise not to change it)
//<-------------------- Effect String -------------------->//
endglobals
//<-------------------- Damage Per Second -------------------->//
private constant function DPS takes integer level returns real
return 10. * level //The formula for counting how much damage to deal to the unit being suck per second
endfunction
//<-------------------- Damage Per Second End -------------------->//
//*******************************************************************************************
// Configuration End
//*******************************************************************************************
// -----------------------> Do not edit anything below this line. <-----------------------//
// -----------------------> Do not edit anything below this line. <-----------------------//
// -----------------------> Do not edit anything below this line. <-----------------------//
globals
private unit Caster
endglobals
private function GetDamageMiliSec takes real DamagePerSec returns real
return DamagePerSec * PERIOD
endfunction
struct BlackHole
unit caster
real cx
real cy
real tx
real ty
real DamagePerSecond
group victims = CreateGroup()
timer t = CreateTimer()
timer Efft = CreateTimer()
static method VictimsCond takes nothing returns boolean
local unit fil = GetFilterUnit()
local boolean b1 = GetUnitState(fil,UNIT_STATE_LIFE) > 0
local boolean b2 = IsUnitType(fil, UNIT_TYPE_STRUCTURE) == false
local boolean b3 = IsUnitType(fil, UNIT_TYPE_MAGIC_IMMUNE) == false
local boolean b4 = IsUnitAlly(fil,GetOwningPlayer(Caster)) == false
set fil = null
return b1 and b2 and b3 and b4
endmethod
static method tCallBack takes nothing returns nothing
local timer t = GetExpiredTimer()
local BlackHole bh = GetTimerStructA(t)
local unit enum
local real ex
local real ey
local real AngleToHole
local real movex
local real movey
local real range
if GetUnitCurrentOrder(bh.caster) == 852600 then
call GroupEnumUnitsInRange(bh.victims,bh.tx,bh.ty,RADIUS,Condition(function BlackHole.VictimsCond))
set enum = FirstOfGroup(bh.victims)
loop
exitwhen enum == null
set ex = GetWidgetX(enum)
set ey = GetWidgetY(enum)
set AngleToHole = AngleBetweenXY(ex,ey,bh.tx,bh.ty)
set range = DistanceBetweenXY(ex,ey,bh.tx,bh.ty)
set movex = OffsetX(ex,5+((RADIUS-(range))/25),AngleToHole)
set movey = OffsetY(ey,5+((RADIUS-(range))/25),AngleToHole)
call IssueImmediateOrder(enum,"stop")
if not IsTerrainPathable(movex, movey, PATHING_TYPE_WALKABILITY) then
call SetUnitX(enum,movex)
call SetUnitY(enum,movey)
endif
call UnitDamageTarget(bh.caster,enum,GetDamageMiliSec(bh.DamagePerSecond),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,null)
call DestroyEffect(AddSpecialEffectTarget(UNIT_EFFECT,enum,"origin"))
call GroupRemoveUnit(bh.victims,enum)
set enum = FirstOfGroup(bh.victims)
endloop
elseif GetUnitCurrentOrder(bh.caster) != 852600 then
call bh.destroy()
endif
set t = null
endmethod
static method EffCallBack takes nothing returns nothing
local timer t = GetExpiredTimer()
local BlackHole bh = GetTimerStructA(t)
call DestroyEffect(AddSpecialEffect(LOC_EFFECT,bh.tx,bh.ty))
set t = null
endmethod
static method create takes unit cast, real tarx, real tary returns BlackHole
local BlackHole bh = BlackHole.allocate()
set bh.caster = cast
set bh.cx = GetWidgetX(cast)
set bh.cy = GetWidgetY(cast)
set bh.tx = tarx
set bh.ty = tary
set bh.DamagePerSecond = DPS(GetUnitAbilityLevel(cast,SPELL_ID))
set Caster = cast
call SetTimerStructA(bh.t,bh)
call TimerStart(bh.t,PERIOD,true,function BlackHole.tCallBack)
call SetTimerStructA(bh.Efft,bh)
call TimerStart(bh.Efft,0.4,true,function BlackHole.EffCallBack)
return bh
endmethod
method onDestroy takes nothing returns nothing
call ClearTimerStructA(.t)
call ClearTimerStructA(.Efft)
call PauseTimer(.t)
call PauseTimer(.Efft)
call DestroyTimer(.t)
call DestroyTimer(.Efft)
call DestroyGroup(.victims)
endmethod
endstruct
private function Cond takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function Act takes nothing returns nothing
local location loc = GetSpellTargetLoc()
local BlackHole bh = BlackHole.create(GetSpellAbilityUnit(),GetLocationX(loc),GetLocationY(loc))
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_BlackHoleJass takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Cond))
call TriggerAddAction( t, function Act)
endfunction
endscope
//===========================================================================
*It is advise to use the Jass version as it is much more realistic because the speed of sliding in is not constant.
It depends on how far the enemy from the casted point, the nearer, sucks faster.
Download Here:
View attachment Black Hole.w3x
View attachment Black Hole +Jass v1.1.w3x