tuantai120
Cool Member
- Reaction score
- 1
An Ultimate Spell of Trunks from DBZ Budokai Project .
Type : vJass - MUI - leakless
Trunks slashes the opponent multiple times, chopping them up into bits. Finally, Future Trunks draws his hand back and brings it forward to fire a yellow energy wave at the opponent, inflicting a high amount of damage .
It requires JNGP 1.5d and Jasshelper
Thanks valkemiere for helping me
Credit to people who made these models which i used in my map
Screenshot :
Code :
Type : vJass - MUI - leakless
Trunks slashes the opponent multiple times, chopping them up into bits. Finally, Future Trunks draws his hand back and brings it forward to fire a yellow energy wave at the opponent, inflicting a high amount of damage .
It requires JNGP 1.5d and Jasshelper
Thanks valkemiere for helping me
Credit to people who made these models which i used in my map
Screenshot :
Code :
JASS:
// HOW TO IMPORT THIS SPELL :
// COPY TRIGGER BURNINGSLASH AND SYSTEM FOLDER
// COPY THE ABILITY "BURNING SLASH" AND COPY THE DUMMIES "BURNING SLASH" INTO YOUR MAP
// THEN CHANGE THE RAW CODE TO THE ABILITY AND THE DUMMIES THAT YOU'VE COPIED
// YOU NEED INSTALL JASSNEWGENPACK 1.5D AND JASSHELPER
// THIS SPELL REQUIRES TIMERUTILS AND XYLIBRARY
// CREDIT TO PEOPLE WHO MADE THESE MODELS THAT I'M USING IN BURNING SLASH MAP
scope burningslash initializer Init
globals
private constant integer Slash = 039;A000039;
private constant integer slash1 = 039;h000039;
private constant integer slash2 = 039;h001039;
private constant integer slash3 = 039;h002039;
private constant integer slash4 = 039;h003039;
private constant string a1 = "attack"
private constant string a2 = "spell slam swim"
private constant string SFX = "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdx"
private constant string SFX2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdx"
private constant string SFX3 = "RandomSlash.mdl"
private constant real Period = 0.04
private integer TEMPINT
endglobals
private struct bs
unit trunks
unit target
real angle
real damage
real time
effect e
integer random
integer tick
integer lvl
endstruct
private struct bs2
unit trunks
unit target
unit s2
unit s3
real angle
real damage
group g
integer tick
integer lvl
endstruct
private function SlashC takes nothing returns boolean
return GetSpellAbilityId() == Slash
endfunction
private function SlashD takes integer lvl returns real
return lvl * 16.
endfunction
private function SlashF takes nothing returns boolean
local unit f = GetFilterUnit()
local bs2 data = TEMPINT
local boolean ok = false
if not IsUnitType( f, UNIT_TYPE_DEAD ) /*
*/and IsUnitType( f, UNIT_TYPE_GROUND ) /*
*/and not IsUnitType( f, UNIT_TYPE_MAGIC_IMMUNE ) /*
*/and not IsUnitType( f, UNIT_TYPE_STRUCTURE ) /*
*/and IsUnitVisible( f, GetOwningPlayer( data.trunks ) ) /*
*/and not IsUnitInGroup(f,data.g) /*
*/and IsUnitEnemy( f, GetOwningPlayer( data.trunks ) ) then
set ok = true
endif
set f = null
return ok
endfunction
private function SlashK takes nothing returns nothing
local timer ti2 = GetExpiredTimer()
local bs2 data = GetTimerData(ti2)
local unit s2
local unit s4
local real x = GetUnitX(data.s2)
local real y = GetUnitY(data.s2)
local real xx = GetPPX(x,80,data.angle)
local real yy = GetPPY(y,80,data.angle)
call SetUnitX(data.s2,xx)
call SetUnitY(data.s2,yy)
set s2 = CreateUnit(GetOwningPlayer(data.trunks),slash2,x,y,data.angle)
call SetUnitZ(s2,150)
call SetUnitScale(s2,3,3,3)
call SetUnitPathing(s2,false)
call UnitApplyTimedLife(s2,039;BLTF039;,2)
set s4 = CreateUnit(GetOwningPlayer(data.trunks),slash4,x,y,data.angle)
call SetUnitScale(s4,3,3,3)
call SetUnitPathing(s4,false)
call UnitApplyTimedLife(s4,039;BLTF039;,2)
call UnitDamageTarget(data.trunks,data.target,40 * data.lvl,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null)
set TEMPINT = data
call GroupAddUnit(data.g,data.target)
set data.tick = data.tick - 1
if data.tick <= 0 or IsUnitType(data.trunks,UNIT_TYPE_DEAD) or IsUnitType(data.target,UNIT_TYPE_DEAD) then
call KillUnit(data.s2)
call KillUnit(data.s3)
call ShowUnit(data.s3,false)
call PauseUnit(data.trunks,false)
call PauseUnit(data.target,false)
call DestroyGroup(data.g)
call ReleaseTimer(ti2)
call data.destroy()
endif
set s2 = null
set s4 = null
endfunction
private function SlashT takes nothing returns nothing
local timer ti = GetExpiredTimer()
local timer ti2
local bs d = GetTimerData(ti)
local bs2 data
local real x = GetUnitX(d.target)
local real y = GetUnitY(d.target)
local unit s1
local unit s2
local unit s3
set s1 = CreateUnit(GetOwningPlayer(d.trunks),slash1,x,y,GetRandomReal(0,360))
call UnitApplyTimedLife(s1,039;BLTF039;,1.)
call SetUnitScale(s1,GetRandomReal(0.1,1.3),GetRandomReal(0.1,1.3),GetRandomReal(0.1,1.3))
call SetUnitZ(s1,GetRandomReal(0,100))
call DestroyEffect(AddSpecialEffectTarget(SFX3,s1,"chest"))
call SetUnitAnimation(d.target,"death")
call DestroyEffect(AddSpecialEffectTarget(SFX2,d.target,"chest"))
call UnitDamageTarget(d.trunks,d.target,d.damage,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null)
set d.random = GetRandomInt(1,3) + 1
if d.random == 1 then
call SetUnitAnimation(d.trunks,a1)
else
if d.random == 2 then
call SetUnitAnimation(d.trunks,a2)
else
if d.random == 3 then
call SetUnitAnimation(d.trunks,a1)
endif
endif
endif
set d.time = d.time + Period
if d.time >= 3 then
set s2 = CreateUnit(GetOwningPlayer(d.trunks),slash2,GetUnitX(d.target),GetUnitY(d.target),d.angle)
set s3 = CreateUnit(GetOwningPlayer(d.trunks),slash3,GetUnitX(d.target),GetUnitY(d.target),d.angle-180)
call SetUnitZ(s2,150)
call SetUnitZ(s3,200)
call SetUnitPathing(s2,false)
call SetUnitPathing(s3,false)
call SetUnitScale(s2,3,3,3)
call SetUnitScale(s3,3,3,3)
call SetUnitAnimation(d.trunks,"spell")
call SetUnitTimeScale(d.trunks,1)
call DestroyEffect(d.e)
set data = bs2.create()
set data.trunks = d.trunks
set data.target = d.target
set data.s2 = s2
set data.s3 = s3
set data.angle = d.angle
set data.tick = d.tick
set data.lvl = d.lvl
set data.damage = d.damage
set data.g = CreateGroup()
set ti2 = NewTimer()
call SetTimerData(ti2,data)
call TimerStart(ti2,Period,true,function SlashK)
call ReleaseTimer(ti)
call d.destroy()
endif
if IsUnitType(d.trunks,UNIT_TYPE_DEAD) or IsUnitType(d.target,UNIT_TYPE_DEAD) then
call PauseUnit(d.trunks,false)
call PauseUnit(d.target,false)
call SetUnitTimeScale(d.trunks,1)
call DestroyEffect(d.e)
call ReleaseTimer(ti)
call d.destroy()
endif
set s1 = null
set s2 = null
set s3 = null
endfunction
private function SlashA takes nothing returns nothing
local timer ti
local bs d
local unit c = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local real cx = GetUnitX(c)
local real cy = GetUnitY(c)
local real tx = GetUnitX(target)
local real ty = GetUnitY(target)
call PauseUnit(c,true)
call PauseUnit(target,true)
call SetUnitTimeScale(c,3)
set d = bs.create()
set d.trunks = c
set d.target = target
set d.angle = AngleXY(cx,cy,tx,ty)
set d.time = 0
set d.random = 0
set d.tick = 25
set d.e = AddSpecialEffectTarget(SFX,c,"weapon")
set d.lvl = GetUnitAbilityLevel(d.trunks,Slash)
set d.damage = SlashD(d.lvl)
set ti = NewTimer()
call SetTimerData(ti,d)
call TimerStart(ti,Period,true,function SlashT)
set c = null
set target = null
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(t,function SlashA)
call TriggerAddCondition(t,Condition(function SlashC))
endfunction
endscope