- Joined
- Aug 1, 2007
- Messages
- 535
Alright so what is supossed to happen:
Hero uses spell, launches into air, sfx, everyone around him gets damaged and sent flying away looking toward the hero.
What does happen:
Hero uses spell, stays on ground, sfx, nothing, nope, nada
The Jass
Hero uses spell, launches into air, sfx, everyone around him gets damaged and sent flying away looking toward the hero.
What does happen:
Hero uses spell, stays on ground, sfx, nothing, nope, nada
The Jass
JASS:
scope Sharenzaki
globals
unit Cstr = GetSpellAbilityUnit()
group Targ
location Sot
real drag = 5
integer Dama = R2I(GetUnitStateSwap(UNIT_STATE_LIFE, Cstr))
integer damage = (((Dama + GetHeroStatBJ(bj_HEROSTAT_STR, GetLastCreatedUnit(), false)) / 2) * (GetUnitAbilityLevel(Cstr, 'A009' )))
endglobals
private function Trig_Sharenzaki_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A009' ) ) then
return false
endif
return true
endfunction
private function Trig_Sharenzaki_Func002001003001 takes nothing returns boolean
return ( GetUnitFlyHeight(GetFilterUnit()) <= 10 )
endfunction
private function Trig_Sharenzaki_Func002001003002 takes nothing returns boolean
return ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(Cstr)) == true )
endfunction
private function Trig_Sharenzaki_Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Sharenzaki_Func002001003001(), Trig_Sharenzaki_Func002001003002() )
endfunction
private function Trig_Sharenzaki_Func002A takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
call GroupAddUnitSimple( GetEnumUnit(), Targ )
endfunction
private function Trig_Sharenzaki_FuncCust takes nothing returns nothing
set Sot = PolarProjectionBJ(GetUnitLoc(Cstr), drag, AngleBetweenPoints(GetUnitLoc(Cstr), GetUnitLoc(GetEnumUnit())))
call SetUnitPositionLocFacingLocBJ(GetEnumUnit(), Sot, GetUnitLoc(Cstr))
endfunction
private function Trig_Sharenzaki_Func005A takes nothing returns nothing
call ForGroupBJ( Targ, function Trig_Sharenzaki_FuncCust)
endfunction
private function Trig_Sharenzaki_FuncCust02 takes nothing returns nothing
set drag = (drag - 0.1)
endfunction
private function Trig_Sharenzaki_FuncCust03 takes nothing returns nothing
call PauseUnitBJ( false, GetEnumUnit())
call UnitDamageTargetEx( Cstr, GetEnumUnit(), damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_ATTACK, true)
endfunction
private function Trig_Sharenzaki_Actions takes nothing returns nothing
local timer spud
local timer spt
local effect abba = AddSpecialEffectTargetUnitBJ( "weapon", Cstr, "Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl" )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(( 200.00 + ( I2R(GetUnitAbilityLevelSwapped('A009', Cstr)) * 50.00 ) ), GetUnitLoc(Cstr), Condition(function Trig_Sharenzaki_Func002001003)), function Trig_Sharenzaki_Func002A)
call GroupRemoveUnitSimple( Cstr, Targ )
call UnitAddAbilityBJ( 'Amrf', Cstr )
call SetUnitTimeScalePercent( Cstr, 50 )
call SetUnitFlyHeightBJ( Cstr, 1000, 2.00 )
call TriggerSleepAction(2.00)
call SetUnitFlyHeightBJ( Cstr, 0, 1.00 )
call TriggerSleepAction(1.00)
call TimerStart(spud, 0.02, true, function Trig_Sharenzaki_Func005A)
call TimerStart(spt, 0.02, true, function Trig_Sharenzaki_FuncCust02)
call TriggerSleepAction(1.00)
call DestroyTimer(spud)
call DestroyTimer(spt)
call ForGroupBJ(Targ, function Trig_Sharenzaki_FuncCust03)
call PauseUnitBJ( false, Cstr)
call DestroyEffectBJ(abba)
call SetUnitTimeScalePercent( Cstr, 100 )
call UnitRemoveAbilityBJ( 'Amrf', Cstr )
set abba = null
set spt = null
set spud = null
set Cstr = null
set Targ = null
set Sot = null
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local trigger trg = CreateTrigger()
call TriggerAddAction(trg, function Trig_Sharenzaki_Actions)
call TriggerAddCondition(trg, Condition(function Trig_Sharenzaki_Conditions))
call TriggerRegisterDamageEvent(trg)
set trg = null
endfunction
endscope