NetherHawk
New Member
- Reaction score
- 26
Kuchiki Byakuya
Model credits go to : da1nonlyed
Spell Details: MUI
Uses: Jass
Requires: Jass New Gen Pack or JassHelper
How to install: Copy the triggers; Senbonzakura, Extras and ABC into your map. Copy the dummy unit and the ability and you are done.
Still a beta project. As i get more models that resemble byakuya's abilities i will continue to create more.
Attachment System : ABCv6.1 by Cohadar
========
Changelog
========
-changed attachment system to ABC v6.1, added grouputils to recycle groups
-configuration is now available, kindly give ideas on what parts of the spell you would like to edit.
-added some implementation notes in the trigger editor, please let me know if im being clear enough and how best to make it more user-friendly
Model credits go to : da1nonlyed
Spell Details: MUI
Uses: Jass
Requires: Jass New Gen Pack or JassHelper
How to install: Copy the triggers; Senbonzakura, Extras and ABC into your map. Copy the dummy unit and the ability and you are done.
Still a beta project. As i get more models that resemble byakuya's abilities i will continue to create more.
JASS:
scope Senbonzakura initializer Init
// Configuration Data
globals
private unit byakuya
private constant integer SabilID = 039;A000039; // The ability id of the Senbonzakura
private constant integer SpetalID = 039;h000039; // The unit id of the Petals
private constant real Sdist = 800. // Distance of the spell
private constant real Sspeed = 12. // Speed of the petals
private constant real Sdmg = 4. // Base Damage a petal does ( Total damage = Sdmg + Sdmgx )
private constant real Sdmgx = 1. // Increment of damage per level
private constant string Sfx = "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl" // Blood effect
private constant sound Ssd = gg_snd_Shikai // Shikai sound
endglobals
private struct petal
unit u
real a
real ds
unit array d[5]
real array ufh[5]
real array ax[5]
boolean array b[5]
boolean array bx[5]
integer ix
group g
method onDestroy takes nothing returns nothing
local integer i = 1
loop
exitwhen i > .ix
call KillUnit(.d<i>)
set .d<i> = null
set i = i + 1
endloop
call DestroyGroup(.g)
set .u = null
set .g = null
endmethod
endstruct
private function Senbonzakura_Conditions takes nothing returns boolean
return GetSpellAbilityId() == SabilID
endfunction
private function Senbonzakura_Filter takes nothing returns boolean
local unit f = GetFilterUnit()
if IsUnitEnemy(f,GetOwningPlayer(byakuya)) == true and IsUnitType(f,UNIT_TYPE_MAGIC_IMMUNE) == false and IsUnitType(f,UNIT_TYPE_STRUCTURE) == false and GetUnitState(f,UNIT_STATE_LIFE) > 0.5 then
call UnitDamageTarget(byakuya,f,Sdmg+(I2R(GetUnitAbilityLevel(byakuya,SabilID))*Sdmgx),true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget(Sfx,f,AttachBlood(GetRandomInt(0,11))))
endif
set f = null
return false
endfunction
private function Senbonzakura_Scatter takes nothing returns nothing
local timer t = GetExpiredTimer()
local petal data = GetTimeStructA(t)
local real x
local real y
local integer i = 1
if data.ds > 0 then
set data.ds = data.ds - Sspeed
loop
exitwhen i > data.ix
set x = GetUnitX(data.d<i>) + Sspeed*Cos(data.a+data.ax<i>)
set y = GetUnitY(data.d<i>) + Sspeed*Sin(data.a+data.ax<i>)
call SetUnitPosition(data.d<i>,x,y)
call SetUnitFlyHeight(data.d<i>,data.ufh<i>,0.)
call GroupEnumUnitsInRange(data.g,GetUnitX(data.d<i>),GetUnitY(data.d<i>),120.,Condition(function Senbonzakura_Filter))
if data.b<i> == true then
set data.ax<i> = data.ax<i> - (6*bj_DEGTORAD)
else
set data.ax<i> = data.ax<i> + (6*bj_DEGTORAD)
endif
if data.bx<i> == true then
set data.ufh<i> = data.ufh<i> + 10
else
set data.ufh<i> = data.ufh<i> - 10
endif
if data.ax<i> == -60*bj_DEGTORAD then
set data.b<i> = false
elseif data.ax<i> == 60*bj_DEGTORAD then
set data.b<i> = true
endif
if data.ufh<i> == 200 then
set data.bx<i> = false
elseif data.ufh<i> == 100 then
set data.bx<i> = true
endif
set i = i + 1
endloop
else
call PauseTimer(t)
call data.destroy()
call ClearTimeStructA(t)
call DestroyTimer(t)
endif
call SetTimeStructA(t,data)
//call DestroyEffect(AddSpecialEffect("SenbonzakuraPart.mdx",GetUnitX(d),GetUnitY(d)))
set t = null
endfunction
private function Senbonzakura_Actions takes nothing returns nothing
local petal data = petal.create()
local unit array dx
local integer i
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local timer t = CreateTimer()
local sound sd = Ssd
set data.u = GetTriggerUnit()
set data.ds = Sdist
set data.g = CreateGroup()
set data.a = Atan2(y-GetUnitY(data.u),x-GetUnitX(data.u))
set data.ix = 4
set byakuya = data.u
call StartSound(sd)
set i = 1
loop
exitwhen i > data.ix
set dx<i> = CreateUnit(GetOwningPlayer(data.u),SpetalID,GetUnitX(data.u),GetUnitY(data.u),data.a)
call UnitAddAbility(dx<i>,039;Amrf039;)
call UnitAddAbility(dx<i>,039;Aloc039;)
call UnitRemoveAbility(dx<i>,039;Amrf039;)
call SetUnitInvulnerable(dx<i>,true)
set i = i + 1
endloop
set i = 1
set x = GetUnitX(data.u) + 50*Cos(data.a)
set y = GetUnitY(data.u) + 50*Sin(data.a)
call SetUnitPosition(dx<i>,x,y)
call SetUnitFlyHeight(dx<i>,150.,0.)
set i = 2
set x = GetUnitX(data.u) + 50*Cos((data.a+(60*bj_DEGTORAD)))
set y = GetUnitY(data.u) + 50*Sin((data.a+(60*bj_DEGTORAD)))
call SetUnitPosition(dx<i>,x,y)
call SetUnitFlyHeight(dx<i>,100.,0.)
set i = 3
set x = GetUnitX(data.u) + 50*Cos((data.a-(60*bj_DEGTORAD)))
set y = GetUnitY(data.u) + 50*Sin((data.a-(60*bj_DEGTORAD)))
call SetUnitPosition(dx<i>,x,y)
call SetUnitFlyHeight(dx<i>,100.,0.)
set i = 4
set x = GetUnitX(data.u) + 50*Cos(data.a)
set y = GetUnitY(data.u) + 50*Sin(data.a)
call SetUnitPosition(dx<i>,x,y)
call SetUnitFlyHeight(dx<i>,50.,0.)
set i = 1
loop
exitwhen i > data.ix
set data.d<i> = dx<i>
set data.b<i> = true
set dx<i> = null
set i = i + 1
endloop
set data.ufh[1] = 150.
set data.ax[1] = 60.*bj_DEGTORAD
set data.bx[1] = true
set data.ufh[2] = 100.
set data.ax[2] = 0.*bj_DEGTORAD
set data.bx[2] = true
set data.ufh[3] = 100.
set data.ax[3] = 0.*bj_DEGTORAD
set data.bx[3] = false
set data.ufh[4] = 50.
set data.ax[4] = 60.*bj_DEGTORAD
set data.bx[4] = true
call SetTimeStructA(t,data)
call TimerStart(t,.03,true,function Senbonzakura_Scatter)
set t = null
set sd = null
endfunction
private function Init takes nothing returns nothing
local trigger tr = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(tr,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(tr, Condition(function Senbonzakura_Conditions))
call TriggerAddAction(tr,function Senbonzakura_Actions)
endfunction
endscope
</i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i>
Attachment System : ABCv6.1 by Cohadar
========
Changelog
========
-changed attachment system to ABC v6.1, added grouputils to recycle groups
-configuration is now available, kindly give ideas on what parts of the spell you would like to edit.
-added some implementation notes in the trigger editor, please let me know if im being clear enough and how best to make it more user-friendly