;==========================
; Helper states for Kikyo
;==========================
[Statedef 10000]
;Tag Select
ctrl = 1
anim = 9997 ;This Anim SHOULD BE BLANK
velset = 0,0

;This is to set the variable for the groove in which you are in
;(used for setting certain moves/skills/tech's to a certain groove)

[State 10000, VarSet]
type = ParentVarSet
trigger1 = Time = 0
var(47) = 0
;The main variable which will be set to 0
;0 = No Tag Partner.

[State 10000, Explod]
type = Explod
trigger1 = Time = 0
Anim = 10003 ;Choose the anim for the groove (
;see below image to know what to set it to)
pos = Ifelse(Teamside = 1,0, 0),0
;The position of the groove,change it according to where
;you want to put it)
postype = p1
ownpal = 1
bindtime = -1
pausemovetime = -1
supermove = 1
facing = Ifelse(Teamside = 1,1,-1)
ontop = 1
ID = 10000

;The sound that play's when you select the groove
[State 10000, PlaySnd]
type = PlaySnd
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
value = 5,0
volume = 255

;The sound that play's when you change the grooves.
[State 10000, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 6,0
volume = 255
channel = 6

;Remove Kagome Select Explod
[State 10000, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
ID = 10001

;Remove Inuyasha Select Explod
[State 10000, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
ID = 10002

;This will remove this explod when the groove is selected
[State 10000, RemoveExplod]
type = RemoveExplod
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
ID = 10000

;This will change the Helper Select to Kagome
[State 10000, ChangeState]
type = ChangeState
trigger1 = parent,command = "SelectRight"
trigger1 = time > 10
value = 10001

;This will change the Helper Select to Inuyasha
[State 10000, ChangeState]
type = ChangeState
trigger1 = parent,command = "SelectLeft"
trigger1 = time > 10
value = 10002

;This will destroy this invisible helper when the groove is selected
[State 10000, DestroySelf]
type = DestroySelf
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
;----------------------------------------
[Statedef 10001]
;Tag Select
ctrl = 1
anim = 9997 ;This Anim SHOULD BE BLANK
velset = 0,0

;This is to set the variable for the groove in which you are in
;(used for setting certain moves/skills/tech's to a certain groove)

[State 10001, VarSet]
type = ParentVarSet
trigger1 = Time = 0
var(47) = 1
;The main variable which will be set to 0
;1 = Kagome.

[State 10001, Explod]
type = Explod
trigger1 = Time = 0
Anim = 10004 ;Choose the anim for the groove (
;see below image to know what to set it to)
pos = Ifelse(Teamside = 1,0, 0),0
;The position of the groove,change it according to where
;you want to put it)
postype = p1
ownpal = 1
bindtime = -1
pausemovetime = -1
supermove = 1
facing = Ifelse(Teamside = 1,1,-1)
ontop = 1
ID = 10001

;The sound that play's when you select the groove
[State 10001, PlaySnd]
type = PlaySnd
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
value = 5,0
volume = 255

;The sound that play's when you change the grooves.
[State 10001, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 6,0
volume = 255
channel = 6

;Remove Kagome Select Explod
[State 10001, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
ID = 10000

;Remove Inuyasha Select Explod
[State 10001, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
ID = 10002

;This will remove this explod when the groove is selected
[State 10001, RemoveExplod]
type = RemoveExplod
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
ID = 10001

;This will change the Helper Select to Inuyasha
[State 10001, ChangeState]
type = ChangeState
trigger1 = parent,command = "SelectRight"
trigger1 = time > 10
value = 10002

;This will change the Helper Select to None
[State 10000, ChangeState]
type = ChangeState
trigger1 = parent,command = "SelectLeft"
trigger1 = time > 10
value = 10000

;This will destroy this invisible helper when the groove is selected
[State 10001, DestroySelf]
type = DestroySelf
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
;--------------------------------------------------
[Statedef 10002]
;Tag Select
ctrl = 1
anim = 9997 ;This Anim SHOULD BE BLANK
velset = 0,0

;This is to set the variable for the groove in which you are in
;(used for setting certain moves/skills/tech's to a certain groove)

[State 10002, VarSet]
type = ParentVarSet
trigger1 = Time = 0
var(47) = 2
;The main variable which will be set to 0
;2 = Inuyasha.

[State 10002, Explod]
type = Explod
trigger1 = Time = 0
Anim = 10005 ;Choose the anim for the groove (
;see below image to know what to set it to)
pos = Ifelse(Teamside = 1,0, 0),0
;The position of the groove,change it according to where
;you want to put it)
postype = p1
ownpal = 1
bindtime = -1
pausemovetime = -1
supermove = 1
facing = Ifelse(Teamside = 1,1,-1)
ontop = 1
ID = 10002

;The sound that play's when you select the groove
[State 10002, PlaySnd]
type = PlaySnd
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
value = 5,0
volume = 255

;The sound that play's when you change the grooves.
[State 10002, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 6,0
volume = 255
channel = 6

;Remove Kagome Select Explod
[State 10002, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
ID = 10001

;Remove Inuyasha Select Explod
[State 10002, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
ID = 10000

;This will remove this explod when the groove is selected
[State 10002, RemoveExplod]
type = RemoveExplod
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
ID = 10002

;This will change the Helper Select to Kagome
[State 10002, ChangeState]
type = ChangeState
trigger1 = parent,command = "SelectRight"
trigger1 = time > 10
value = 10000

;This will change the Helper Select to Inuyasha
[State 10002, ChangeState]
type = ChangeState
trigger1 = parent,command = "SelectLeft"
trigger1 = time > 10
value = 10001

;This will destroy this invisible helper when the groove is selected
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = roundstate > 1
trigger2 = parent,command = "a" || parent,command = "b" || parent,command = "c" || parent,command = "x" || parent,command = "y" || parent,command = "z"
;--------------------------------------------------
; Spawn Point for Soul Collectors (Purification)
[Statedef 1600]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 1502
ctrl = 0
sprpriority = 3

[State 1600, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1600, Projectile]
; Soul Collectors move out of the Spawn Point
; Normal version
type = Projectile
trigger1 = AnimElem = 3
projanim = 1501
projremove = 0
projhits = 1
projedgebound = 150
postype = p1
projremovetime = 30
priority = 5,hit
pausetime = 10,8
offset = 0,0
velocity = 0,0
sparkxy = 189,0
attr = S, SP
damage = 20,10
animtype = heavy
guardflag = MA
hitflag = MAF
hitsound = S1500, 1
guardsound = S6, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2, -2
air.velocity = -4, -2
guard.velocity = -4
air.hittime = 20
fall = 1
air.fall = 1
getpower = 20,10
givepower = 4, 2
projpriority = 31
projscale = 1,1

[State 1600, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------
; Spawn Point for Soul Collectors
; Combo version w/ Damage Dampening
[Statedef 1601]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 1502
ctrl = 0
sprpriority = 3

[State 1601, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1601, Projectile]
; Soul Collectors move out of the Spawn Point
; Combo version
type = Projectile
trigger1 = AnimElem = 3
projanim = 1501
projremove = 0
projhits = 1
projedgebound = 150
postype = p1
projremovetime = 30
priority = 5,hit
pausetime = 10,8
offset = 0,0
velocity = 0,0
sparkxy = 189,0
attr = S, SP
damage = 12,6
animtype = heavy
guardflag = MA
hitflag = MAF
hitsound = S1500, 1
guardsound = S6, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2, -2
air.velocity = -4, -2
guard.velocity = -4
air.hittime = 20
fall = 1
air.fall = 1
getpower = 20,10
givepower = 4, 2
projpriority = 31
projscale = 1,1

[State 1601, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------
; Kikyo's Curse Deflector
[Statedef 2100]
type    = S
movetype= A
physics = S
juggle  = 2
velset = 0,0
anim = 2001
ctrl = 0
sprpriority = 1

[State 2100, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2100, Stay In Place]
type = BindToRoot
trigger1 = 1
facing = 1
pos = 0,-54
time = 1

;[State 2100, NoPush]
; Kikyo Can't be pushed back when using
;type = PlayerPush
;trigger1 = 1
;value = 0

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time < 8
trigger2 = Time > 16
ignorehitpause = 1
scale = 1,1

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time = 8
ignorehitpause = 1
scale = 1.125,1.125

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time = 10
ignorehitpause = 1
scale = 1.25,1.25

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time = 12
ignorehitpause = 1
scale = 1.375,1.375

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time = 14
ignorehitpause = 1
scale = 1.5,1.5

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time = 16
ignorehitpause = 1
scale = 1.625,1.625

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time = 18
ignorehitpause = 1
scale = 1.75,1.75

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time = 20
ignorehitpause = 1
scale = 1.875,1.875

[State 2100, AngleDraw]
type = AngleDraw
trigger1 = Time = 22
ignorehitpause = 1
scale = 2.0,2.0

[State 2100, DestroySelf]
type = DestroySelf
trigger1 = Time >=28

;----------------------

[Statedef 183]
; Win Portrait
type = S
MoveType = I
Physics = S
sprpriority = 20
anim = 9997

[State 183, Round Aint Over Yet]
type = AssertSpecial
trigger1 = Time >= 0
trigger1 = Time <= 540
flag = RoundNotOver

[State 183, Background]
; Kikyo's "Limit Break"??
type = Explod
trigger1 = Time = 180
anim = 6666
id = 6666
postype = left
ontop = 1
pos = 0,0
sprpriority = -4
ownpal = 1
bindtime = -1
removetime = -1

[State 183, More Disabled Stuff]
type = AssertSpecial
trigger1 = Time >= 180 ; 3 seconds after Kikyo starts her win pose
flag = NoMusic
flag2 = NoFG
flag3 = NoBarDisplay

[State 183, Victory Music]
type = PlaySnd
trigger1 = Time = 180
value = 183,0

[State 183, Portrait comes in]
type = Explod
trigger1 = Time = 180
anim = 9998
pos = 0,0
postype = left
ontop = 1
sprpriority = -3

[State 183, Black Box comes in]
type = Explod
trigger1 = Time = 212
anim = 9999
pos = 0,0
postype = left
ontop = 1
sprpriority = -2

[State 183, Varset]
type = Varrandom
trigger1 = Time = 212
v = 4
range = 1,3

[State 183, Quote 1]
type = Explod
trigger1 = Time = 224
trigger1 = Var(4) = 1
anim = 10000
pos = 0,0
postype = left
ontop = 1
sprpriority = -1

[State 183, Quote 2]
type = Explod
trigger1 = Time = 224
trigger1 = Var(4) = 2
anim = 10001
pos = 0,0
postype = left
ontop = 1
sprpriority = -1

[State 183, Quote 3]
type = Explod
trigger1 = Time = 224
trigger1 = Var(4) = 3
anim = 10002
pos = 0,0
postype = left
ontop = 1
sprpriority = -1

;---------------------------
; Kagome's State
[Statedef 11000]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 11000
ctrl = 0
sprpriority = 3

[State 11000, Screenbound]
;Keeps Kagome on the screen to avoid a nasty glitch
type = Screenbound
trigger1 = 1
value = 0

[State 11000, Velset]
type = velset
trigger1 = animelem = 1
x = 5
y = 0

[State 11000, Velset]
type = velset
trigger1 = animelem = 7
x = 0
y = 0

[state 11000, Kagome's Initial Charge]
type = playsnd
trigger1 = animelem = 11
value = 11000, 0

[state 11000, Arrow release]
type = playsnd
trigger1 = animelem = 20
value = 11000, 1

[state 11000, Kagome's Arrow]
type = projectile
trigger1 = AnimElem = 20
projanim = 11001
projremove = 1
projhits = 1
projedgebound = 0
postype = p1
offset = 2,-70
pausetime = 0,8
velocity = 7.5,0
sparkxy = 23,0
attr = S, SP
damage = 87,0
animtype = heavy
guardflag = MA
hitflag = MAF;-
hitsound = S4000, 2
guardsound = S6, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -4, -2
air.velocity = -4, -1
guard.velocity = -4
air.hittime = 20
fall = 1
air.fall = 1
getpower = 0,0
givepower = 20, 15
projscale = 1,1
supermovetime = 193

[State 11000, Velset]
type = velset
trigger1 = animelem = 35
trigger2 = animelem = 37
x = -5
y = 0

[State 11000, Changestate]
type = changestate
trigger1 = animelem = 37
value = 11001

[Statedef 11001]
type    = S
movetype= I
physics = S
juggle  = 1
velset = -6,0
anim = 11002
sprpriority = 3

[State 11000, Velset]
type = velset
trigger1 = 1
x = -6
y = -1

[State 11001, Screenbound]
;Keeps Kagome on the screen to avoid a nasty glitch
type = Screenbound
trigger1 = 1
value = 0

[State 11001, Destroyself]
type = DestroySelf
;trigger1 = animelem = 37
trigger1 = backedgedist < 0
;trigger2 = time >= 125

;---------------------------
; Inuyasha's State
[Statedef 12000]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 12001
ctrl = 0
sprpriority = 3

[State 12000, Screenbound]
;Allows Inuyasha to go offscreen
type = Screenbound
trigger1 = 1
value = 0

[State 12000, Velset]
type = velset
trigger1 = anim = 12001
x = 6.5
y = 0

[State 12000, Velset]
type = velset
trigger1 = anim = 12001
trigger1 = P2BodyDist x <= 50
x = 0
y = 0

[State 12000, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 12001
trigger1 = P2BodyDist x <= 50
value = 12000

[state 12000, WIND SCAR!]
type = playsnd
trigger1 = anim = 12000
trigger1 = animelem = 5
value = 12000, 0

[state 12000, BOOM!]
type = playsnd
trigger1 = anim = 12000
trigger1 = animelem = 17
value = 12000, 1

[State 12000, WindScar]
type = Projectile
trigger1 = Anim = 12000
trigger1 = AnimElem = 16
projanim = 12002
projremove = 0
projremovetime = 20
projhits = 1
projedgebound = 0
postype = p1
offset = 30,-100
pausetime = 0,8
velocity = 0,0
sparkxy = 63,40
attr = S, SA
damage = 87,0
animtype = heavy
guardflag = MA
hitflag = MAF;-
hitsound = S4000, 2
guardsound = S6, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -4, -2
air.velocity = -4, -1
guard.velocity = -4
air.hittime = 20
fall = 1
air.fall = 1
getpower = 0,0
givepower = 20, 15
projscale = 1,1
supermovetime = 193

[State 12001, Debris]
type = Explod
trigger1 = AnimElem = 17
anim = 12003
ID = 12003
pos = 45,-71
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1
trans = addalpha
alpha = 192,192
supermovetime = 193

[State 12001, Velset]
type = velset
trigger1 = anim = 12000
trigger1 = animelem = 28
x = 7.0
y = -1

[State 12000, ChangeAnim]
type = ChangeState
trigger1 = anim = 12000
trigger1 = animtime = 0
value = 12001

[Statedef 12001]
type    = S
movetype= I
physics = S
juggle  = 1
velset = 7.0,0
anim = 12001
sprpriority = 3

[State 12001, Velset]
type = velset
trigger1 = 1
x = 7.0
y = -1

[State 12001, Screenbound]
type = Screenbound
trigger1 = 1
value = 0

[State 12001, Destroyself]
type = DestroySelf
;trigger1 = animelem = 37
trigger1 = frontedgedist < 0
;trigger2 = time >= 125
