- Joined
- Jan 23, 2011
- Messages
- 351
I imagine this is a common ocurrence, but i'd still like some clarification as to why this happens
These are the 2 bugged abilities, and the bugged system is this:
[vJASS] - [System] Illusion
These are the 2 bugged abilities, and the bugged system is this:
[vJASS] - [System] Illusion
JASS:
scope Doppelwalk initializer Init
globals
private constant integer DUMMY_ID = 'dumy'
private constant integer SPELL_ID = 'A000'
private constant real ILLU_DUR = 8.00
private constant real ILLU_DMG_TAKEN = 4.00
private constant real ILLU_DMG_DONE = 0.25
endglobals
//========================Conditions=============================
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function onEffect takes nothing returns boolean
local unit u = GetTriggerUnit()
local Illusion illu = Illusion.create(GetTriggerPlayer(), u, GetUnitX(u), GetUnitY(u))
local real a = GetUnitFacing(u)*bj_DEGTORAD
local real dx= GetUnitX(u) +256*Cos(a)
local real dy= GetUnitY(u) +256*Sin(a)
set illu.duration = ILLU_DUR
set illu.damageTaken = ILLU_DMG_TAKEN
set illu.damageGiven = ILLU_DMG_DONE
call IssuePointOrder(illu.unit,"move", dx, dy)
set u = null
return false
endfunction
//==================================================================================================================
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
//==========================================================
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition( t , Condition(function Conditions ))
call TriggerAddAction( t , function onEffect )
set t = null
//===========================================================
endfunction
//=====
endscope
JASS:
scope Doppelwalk initializer Init
globals
private constant integer DUMMY_ID = 'dumy'
private constant integer SPELL_ID = 'A000'
private constant real ILLU_DUR = 8.00
private constant real ILLU_DMG_TAKEN = 4.00
private constant real ILLU_DMG_DONE = 0.25
endglobals
//========================Conditions=============================
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function onEffect takes nothing returns boolean
local unit u = GetTriggerUnit()
local Illusion illu = Illusion.create(GetTriggerPlayer(), u, GetUnitX(u), GetUnitY(u))
local real a = GetUnitFacing(u)*bj_DEGTORAD
local real dx= GetUnitX(u) +256*Cos(a)
local real dy= GetUnitY(u) +256*Sin(a)
set illu.duration = ILLU_DUR
set illu.damageTaken = ILLU_DMG_TAKEN
set illu.damageGiven = ILLU_DMG_DONE
call IssuePointOrder(illu.unit,"move", dx, dy)
set u = null
return false
endfunction
//==================================================================================================================
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
//==========================================================
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition( t , Condition(function Conditions ))
call TriggerAddAction( t , function onEffect )
set t = null
//===========================================================
endfunction
//=====
endscope