;===================================================================== 
; Definition of the Special Arts
;=====================================================================

;-------------------------------------------------------------------------------
; 花蝶扇
;------------------------弱
[Statedef 1000]
type = S
movetype = A
physics = S
anim = 1000
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0
var(20) = 100
[State -2,VarSet]
type = VarSet
trigger1 = Time = 0
var(21) = 100

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,11
channel = 0

[State 1200,helper]
type = helper
trigger1 = AnimElem = 5,=0
name = "Kacho Sen"
id = 1050
pos = 58,-78
postype = p1
stateno = 1050
helpertype = normal
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
scale = const(size.xscale),const(size.yscale)

[State 1000,ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------------中
[Statedef 1010]
type = S
movetype = A
physics = S
anim = 1000
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0
var(20) = 100
[State -2,VarSet]
type = VarSet
trigger1 = Time = 0
var(21) = 100

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,11
channel = 0

[State 1200,helper]
type = helper
trigger1 = AnimElem = 5,=0
name = "Kacho Sen"
id = 1060
pos = 58,-78
postype = p1
stateno = 1050
helpertype = normal
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
scale = const(size.xscale),const(size.yscale)

[State 1000,ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------------強
[Statedef 1020]
type = S
movetype = A
physics = S
anim = 1000
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0
var(20) = 100
[State -2,VarSet]
type = VarSet
trigger1 = Time = 0
var(21) = 100

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,11
channel = 0

[State 1200,helper]
type = helper
trigger1 = AnimElem = 5,=0
name = "Kacho Sen"
id = 1070
pos = 58,-78
postype = p1
stateno = 1050
helpertype = normal
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 0
scale = const(size.xscale),const(size.yscale)

[State 1000,ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 花蝶扇（飛び道具）
[Statedef 1050]
type = A
movetype = I
physics = N
ctrl = 0
anim = 1050
velset = IfElse((IsHelper(1070)=1),5,IfElse((IsHelper(1060)=1),4.25,3.5)),0
SprPriority = 3

[State 1200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 2, 0

[State 1050, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1050, VarSet]
type = VarSet
trigger1 = 1
var(34) = parent,var(34)
ignorehitpause = 1

[State 1050, VarSet]
type = VarSet
trigger1 = 1
var(46) = parent,var(46)
ignorehitpause = 1

[State 1050, VarSet]
type = VarSet
trigger1 = 1
var(47) = parent,var(47)
ignorehitpause = 1

[State 1050, VarSet]
type = VarSet
trigger1 = 1
var(0) = floor(IfElse((IsHelper(1070)=1),70,IfElse((IsHelper(1060)=1),63,56))*root,fvar(10))
ignorehitpause = 1

[State 1050, ParentVarAdd]
type = ParentVarAdd
trigger1 = root,projhittime(1050) = 1
var(25) = 1
persistent = 0

[State 1050, VarSet]
type = VarSet
trigger1 = root,projhittime(1050) = 1
var(1) = 4
persistent = 0

[State 1050,Projectile]
type = Projectile
trigger1 = Root,var(25) = 0
trigger1 = time = 1
attr = A, SP
projid = 1050
projanim = 1055
projhitanim = -1
Projremanim = -1
Projcancelanim = -1
velocity = IfElse((IsHelper(1070)=1),5,IfElse((IsHelper(1060)=1),4.25,3.5)),0
projshadow = -1,-1,-1
damage    = ceil(ifelse(var(0)<7,7,var(0))),ceil(ifelse((var(0)/8)<7,7,(var(0)/8)))
animtype = Hard
air.animtype = Back
getpower = floor(IfElse((Root,var(41)>1),72,143)*(fvar(5))),floor(36*(fvar(5)))
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S5,10
guardsound = S6,1
pausetime = 4,Ceil(9*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = 0, 0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10
air.velocity = -4.5,-7
yaccel = .5
air.fall = 1
fall.recover = !var(47)
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
palfx.time = 15*var(34)
palfx.add = 255,255,255
palfx.mul = 130,130,130
envshake.time = 10
envshake.ampl = 2
forcestand = 1
persistent = 0

[State 1050,Projectile]
type = Projectile
trigger1 = Root,var(25) > 0
trigger1 = time = 1
attr = A, SP
projid = 1050
projanim = 1055
projhitanim = -1
Projremanim = -1
Projcancelanim = -1
velocity = IfElse((IsHelper(1070)=1),5,IfElse((IsHelper(1060)=1),4.25,3.5)),0
projshadow = -1,-1,-1
damage    = ceil(ifelse(var(0)<7,7,var(0))),ceil(ifelse((var(0)/8)<7,7,(var(0)/8)))
animtype = Hard
air.animtype = Back
getpower = floor(IfElse((Root,var(41)>1),72,143)*(fvar(5))),floor(36*(fvar(5)))
givepower = 35, 35
guardflag = MA
hitflag = MA
hitsound = S5,10
guardsound = S6,1
pausetime = 4,Ceil(9*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = 0, 0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10
air.velocity = -4.5,-7
yaccel = .5
air.fall = 1
fall.recover = !var(47)
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
palfx.time = 15*var(34)
palfx.add = 255,255,255
palfx.mul = 130,130,130
envshake.time = 10
envshake.ampl = 2
forcestand = 1
persistent = 0

[State 1050, COUNTER HIT EFFECT]
type = helper
triggerall = var(46)
trigger1 = root,projhittime(1050) = 1
id = 8130
name = "COUNTER HIT EFFECT"
pos = 0,0
postype = P1
stateno = 8130
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
size.xscale = 0.5
size.yscale = 0.5

[State -2,攻撃種類判別]
type = ParentVarSet
trigger1 = root,projhittime(1050) = 1
fvar(11) = 1
ignorehitpause = 1

[State 1050, VarSet]
type = VarSet
trigger1 = var(1) = 4
ignorehitpause = 1
var(1) = 0

[State 1050, VarSet]
type = VarSet
trigger1 = root,ProjContactTime(1050) = 1
ignorehitpause = 1
var(1) = 1

[State 1050, VarSet]
type = VarAdd
trigger1 = var(1)
ignorehitpause = 1
var(1) = 1

[State 1050, PosFreeze]
type = PosFreeze
trigger1 = var(1)
value = 1
ignorehitpause = 1
persistent = 1

[State 1050, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40 && !var(1)

[State 1050, ChangeState]
type = ChangeState
triggerall = time > 1
trigger1 = !root,NumProjID(1050)
value = 1060

;------------------------消滅
[Statedef 1060]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 1060

[State 1060, COUNTER HIT EFFECT]
type = helper
triggerall = !NumHelper(8130)
triggerall = var(46)
trigger1 = root,projhittime(1050) = 1
id = 8130
name = "COUNTER HIT EFFECT"
pos = 0,0
postype = P1
stateno = 8130
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
size.xscale = 0.5
size.yscale = 0.5

[State 1050, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1050, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

;-------------------------------------------------------------------------------
; 龍炎舞
;------------------------弱
[Statedef 1100]
type = S
movetype = A
physics = S
anim = 1100
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(20) = -25
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(21) = -55
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = 1
var(12) = ceil(77*fvar(10))
ignorehitpause = 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,12
channel = 0

[State 1200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5,=1
value = 2, 1

[State 193, 1]
type = Explod
trigger1 = AnimElem = 5,=1
anim = 1150
id = 1150
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1

[State 3000,Projectile]
type = Projectile
trigger1 = AnimElem = 5,=1
projanim = 1155
ProjHitAnim = -1
projid = 1150
offset = 0,0
attr = S, SP
damage = 0
guardflag = M
hitflag = P
projremovetime = 21

[State 1321, HitDef]
type = HitDef
triggerall = var(25) < 1
trigger1 = !MoveContact
trigger1 = !MoveReversed
trigger1 = AnimElem = 6 || AnimElem = 7
trigger1 = NumProjid(1150)
attr = S, SA
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
animtype = back
getpower = floor(IfElse(var(41)>1,72,143)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S5,11
guardsound = S6,0
pausetime = 4,Ceil(12*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.5,-7
air.velocity = -4.5,-7
guard.velocity = -10
yaccel = .5
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
palfx.time = 44
palfx.add = 159,8,15
palfx.mul = 100, 20, 25
palfx.color = 100
id = 1100
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State 1000, 0]
type = RemoveExplod
trigger1 = NumProjid(1150)!
id = 1150

[State 1205, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2 || AnimElem = 3
x = 4

[State 1205, PosAdd]
type = PosAdd
trigger1 = AnimElem = 4 || AnimElem = 5 || AnimElem = 6 || AnimElem = 7
x = 5

[State 420,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 8
movetype = I

[State 1000,ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------------中
[Statedef 1110]
type = S
movetype = A
physics = S
anim = 1100
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(20) = -25
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(21) = -55
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = 1
var(12) = ceil(84*fvar(10))
ignorehitpause = 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,12
channel = 0

[State 1200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5,=1
value = 2, 1

[State 193, 1]
type = Explod
trigger1 = AnimElem = 5,=1
anim = 1150
id = 1150
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1

[State 3000,Projectile]
type = Projectile
trigger1 = AnimElem = 5,=1
projanim = 1155
ProjHitAnim = -1
projid = 1150
offset = 0,0
attr = S, SP
damage = 0
guardflag = M
hitflag = P
projremovetime = 21

[State 1321, HitDef]
type = HitDef
triggerall = var(25) < 1
trigger1 = !MoveContact
trigger1 = !MoveReversed
trigger1 = AnimElem = 6 || AnimElem = 7
trigger1 = NumProjid(1150)
attr = S, SA
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
animtype = back
getpower = floor(IfElse(var(41)>1,72,143)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S5,11
guardsound = S6,0
pausetime = 4,Ceil(12*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.5,-7
air.velocity = -4.5,-7
guard.velocity = -10
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
palfx.time = 44
palfx.add = 159,8,15
palfx.mul = 100, 20, 25
palfx.color = 100
id = 1100
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State 1000, 0]
type = RemoveExplod
trigger1 = NumProjid(1150)!
id = 1150

[State 1205, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 3

[State 1205, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3 || AnimElem = 4 || AnimElem = 5 || AnimElem = 6 || AnimElem = 7
x = 5

[State 420,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 8
movetype = I

[State 1000,ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------------強
[Statedef 1120]
type = S
movetype = A
physics = S
anim = 1120
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,12
channel = 0

[State -2,varSet]
type = varSet
trigger1 = Time = 0 || AnimElem=6
var(20) = -10-(AnimElem=6)*15
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0 || AnimElem=6
var(21) = -75+(AnimElem=6)*20
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = AnimElem = 7,<0
var(12) = ceil(21*fvar(10))
ignorehitpause = 1

[State 220,HitDef]
type = HitDef
triggerall = var(25) < 1
trigger1 = AnimElem = 3
attr = S, SA
animtype = Hard
air.animtype = Back
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
getpower = floor(IfElse(var(41)>1,72,214)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = M
hitflag = MAF
pausetime = Ceil(13*IfElse(var(47),.5,1)),Ceil(13*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
hitsound = S5, 2
guardsound = S6, 0
ground.type = High
ground.slidetime = 17
ground.hittime  = 17+var(34)*3
ground.velocity = -4
air.velocity = -4.5,-7
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
palfx.time = 15*var(34)
palfx.add = 255,255,255
palfx.mul = 130,130,130
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
trigger1 = AnimElem = 6,<0

[State 1200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6,=1
value = 2, 1

[State 193, 1]
type = Explod
trigger1 = AnimElem = 6,=1
anim = 1150
id = 1150
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1

[State 3000,Projectile]
type = Projectile
trigger1 = AnimElem = 6,=1
projanim = 1155
ProjHitAnim = -1
projid = 1150
offset = 0,0
attr = S, SP
damage = 0
guardflag = M
hitflag = P
projremovetime = 21

[State -2,varSet]
type = varSet
trigger1 = AnimElem = 7,=>0
var(12) = ceil(84*fvar(10))
ignorehitpause = 1

[State 1321, HitDef]
type = HitDef
triggerall = var(25) < 1
trigger1 = !MoveContact
trigger1 = !MoveReversed
trigger1 = AnimElem = 7 || AnimElem = 8
trigger1 = NumProjid(1150)
attr = S, SA
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
animtype = back
getpower = floor(IfElse(var(41)>1,72,143)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S5,11
guardsound = S6,0
pausetime = 4,Ceil(12*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.5,-7
air.velocity = -4.5,-7
guard.velocity = -10
yaccel = .5
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
palfx.time = 44
palfx.add = 159,8,15
palfx.mul = 100, 20, 25
palfx.color = 100
id = 1100
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State 1000, 0]
type = RemoveExplod
trigger1 = NumProjid(1150)!
id = 1150

[State 1205, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 3

[State 1205, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3 || AnimElem = 4 || AnimElem = 5 || AnimElem = 6 || AnimElem = 7 || AnimElem = 8
x = 5

[State 420,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 8
movetype = I

[State 1000,ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
; 必殺忍蜂
;------------------------
[Statedef 1200]
type = S
movetype = A
physics = S
anim = 1200
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State 40, 1]
type = varSet
trigger1 = Time = 0
var(10) = IfElse((Command = "Deadly Ninja Bees_c"),2,IfElse((Command = "Deadly Ninja Bees_b"),1,0))

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,13
channel = 0

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 3.8

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 1205, PosAdd]
type = PosAdd
trigger1 = AnimElem = 6,=1
x = 8

[State 105,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = A
physics = N

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3,3

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 3,1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(20) = -10
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(21) = -35
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = AnimElem = 7,<0
var(12) = ceil(21*fvar(10))
ignorehitpause = 1

[State 220,HitDef]
type = HitDef
triggerall = var(25) < 1
trigger1 = AnimElem = 3
attr = A, SA
animtype = Hard
air.animtype = Back
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
getpower = floor(IfElse(var(41)>1,72,214)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = MA
hitflag = MAF
pausetime = Ceil(13*IfElse(var(47),.5,1)),Ceil(13*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
hitsound = S5, 2
guardsound = S6, 0
ground.type = High
ground.slidetime = 17
ground.hittime  = 17+var(34)*3
ground.velocity = -4
air.velocity = -4.5,-7
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
palfx.time = 15*var(34)
palfx.add = 255,255,255
palfx.mul = 130,130,130
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
trigger1 = AnimElem = 6,<0

[State -2,varSet]
type = varSet
trigger1 = AnimElem = 4,>=0
var(21) = -75

[State -2,varSet]
type = varSet
trigger1 = AnimElem = 7,=>0
var(12) = ceil((63+var(10)*7)*fvar(10))
ignorehitpause = 1

[State 1321, HitDef]
type = HitDef
triggerall = var(25) < 1
trigger1 = !MoveContact
trigger1 = !MoveReversed
trigger1 = AnimElem = 7 || AnimElem = 8 || AnimElem = 9
attr = A, SA
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
animtype = back
getpower = floor(IfElse(var(41)>1,72,143)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S5,2
guardsound = S6,0
pausetime = Ceil(11*IfElse(var(47),.5,1)),Ceil(11*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.5,-7
air.velocity = -4.5,-7
guard.velocity = -10
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
palfx.time = 15*var(34)
palfx.add = 255,255,255
palfx.mul = 130,130,130
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 7
x = 6.4
y = -4.5

[State 105,VelAdd]
type = VelAdd
trigger1 = AnimElem = 7,> 0
y = .35

[State 105,End]
type = ChangeState
trigger1 = AnimElem = 7, > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1201

;------------------------ 着地
[Statedef 1201]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1201
velset = 0, 0

[State 1205, PosSet]
type = PosSet
trigger1 = Time = 0
Y = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 3,3

[State 1205, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
; ムササビの舞（地上）
;------------------------弱
[Statedef 1300]
type = A
movetype = A
physics = N
anim = 1300
ctrl = 0
velset = -7,-14
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State 40, 1]
type = varSet
trigger1 = Time = 0
var(10) = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 3,1

[State 1201,ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1213,VelAdd]
type = VelAdd
trigger1 = 1
y = .7

[State 105,End]
type = ChangeState
trigger1 = AnimElemNo(0) = 5
trigger1 = Backedgebodydist <= 10
value = 1305

[State 105,End]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1301

;------------------------中
[Statedef 1310]
type = A
movetype = A
physics = N
anim = 1300
ctrl = 0
velset = -7,-14
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State 40, 1]
type = varSet
trigger1 = Time = 0
var(10) = 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 3,1

[State 1201,ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1213,VelAdd]
type = VelAdd
trigger1 = 1
y = .7

[State 105,End]
type = ChangeState
trigger1 = AnimElemNo(0) = 5
trigger1 = Backedgebodydist <= 10
value = 1305

[State 105,End]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1301

;------------------------強
[Statedef 1320]
type = A
movetype = A
physics = N
anim = 1300
ctrl = 0
velset = -7,-14
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State 40, 1]
type = varSet
trigger1 = Time = 0
var(10) = 2

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 3,1

[State 1201,ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1213,VelAdd]
type = VelAdd
trigger1 = 1
y = .7

[State 105,End]
type = ChangeState
trigger1 = AnimElemNo(0) = 5
trigger1 = Backedgebodydist <= 10
value = 1305

[State 105,End]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1301

;------------------------ 失敗着地
[Statedef 1301]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1301
velset = 0, 0

[State 1205, PosSet]
type = PosSet
trigger1 = Time = 0
Y = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 3,3

[State 1205, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------- 画面はし張り付き
[Statedef 1305]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 1305

[State 820, screenbound]
type = screenbound
Trigger1 = 1
value = 1
movecamera = 0,1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 0,14
channel = 0

[State 1202,ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1355

;------------------------ 着地
[Statedef 1306]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1306
velset = 0, 0

[State 1205, PosSet]
type = PosSet
trigger1 = Time = 0
Y = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 3,3

[State 1205, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
; ムササビの舞（空中）
;------------------------
[Statedef 1350]
type = A
movetype = A
physics = N
anim = 1350
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State 40, 1]
type = varSet
trigger1 = Time = 0
var(10) = IfElse((Command = "Ryu En Bu_z"),2,IfElse((Command = "Ryu En Bu_y"),1,0))

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,14
channel = 0

[State 105,End]
type = ChangeState
trigger1 = AnimTime = 0
value = 1355

;------------------- 攻撃
[Statedef 1355]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1355

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(20) = 0
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(21) = -15
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = 1
var(12) = ceil(IfElse(PrevStateNo=1350,77,84)+var(10)*7)
ignorehitpause = 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 3,8

[State 1321, HitDef]
type = HitDef
triggerall = var(25) < 1
trigger1 = Time = 0
attr = A, SA
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
animtype = Back
getpower = floor(IfElse(var(41)>1,72,143)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S5,2
guardsound = S6,0
pausetime = Ceil(11*IfElse(var(47),.5,1)),Ceil(11*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4.5,-7
air.velocity = -4.5,-7
guard.velocity = -10
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = !var(47)
palfx.time = 15*var(34)
palfx.add = 255,255,255
palfx.mul = 130,130,130
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State 105,VelSet]
type = VelSet
trigger1 = Time = 0
x = IfElse(var(10)=2,12,IfElse(var(10)=1,9,6))
y = 5+var(10)*.5

[State 1203,ChangeState]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = IfElse(PrevStateNo = 1300,1306,1356)

;------------------------ 着地
[Statedef 1356]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1356
velset = 0, 0

[State 1205, PosSet]
type = PosSet
trigger1 = Time = 0
Y = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 3,3

[State 1205, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
; 陽炎の舞
;------------------------弱
[Statedef 1400]
type = S
movetype = A
physics = S
anim = 1400
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(20) = -25
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(21) = -55
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(12) = ceil(ifelse((84*fvar(10))<7,7,(84*fvar(10))))
ignorehitpause = 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,15
channel = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2,2

[State 193, 1]
type = Explod
trigger1 = NumExplod(1405)!
trigger1 = AnimElem = 7
anim = 1405
id = 1405
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1
removeTime = -1

[State 193, 1]
type = Explod
trigger1 = NumExplod(1407)!
trigger1 = AnimElem = 7
anim = 1407
id = 1407
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = -1
ownpal = 1
removeongethit = 1
removeTime = -1

[State 1321, HitDef]
type = HitDef
triggerall = var(25) < 1
trigger1 = Time = 0
attr = S, SP
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
animtype = back
getpower = floor(IfElse(var(41)>1,72,143)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S5,11
guardsound = S6,0
pausetime = Ceil(6*IfElse(var(47),.5,1)),Ceil(7*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-8
air.velocity = -4,-8
guard.velocity = -10
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
palfx.time = 44
palfx.add = 159,8,15
palfx.mul = 100, 20, 25
palfx.color = 100
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State 440,StateTypeSet]
type = StateTypeSet
trigger1 = UniqHitCount > 0
movetype = I

[State 1000,ChangeState]
type = ChangeState
trigger1 = Time >= 52
value = 1401

;------------------------中
[Statedef 1410]
type = S
movetype = A
physics = S
anim = 1410
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(20) = -25
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(21) = -55
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = 1
var(12) = Ceil(IfElse(UniqHitCount=0,56,42)*fvar(10))
ignorehitpause = 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,15
channel = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2,2

[State 193, 1]
type = Explod
trigger1 = NumExplod(1405)!
trigger1 = AnimElem = 7
anim = 1405
id = 1405
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1
removeTime = -1

[State 193, 1]
type = Explod
trigger1 = NumExplod(1407)!
trigger1 = AnimElem = 7
anim = 1407
id = 1407
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = -1
ownpal = 1
removeongethit = 1
removeTime = -1

[State 1321, HitDef]
type = HitDef
triggerall = var(25) < 2
trigger1 = Time %3 = 0
attr = S, SP
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
animtype = back
getpower = floor(IfElse(var(41)>1,72,143)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S5,11
guardsound = S6,0
pausetime = Ceil(6*IfElse(var(47),.5,1)),Ceil(7*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-8
air.velocity = -4,-8
guard.velocity = -10
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
palfx.time = 44
palfx.add = 159,8,15
palfx.mul = 100, 20, 25
palfx.color = 100
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State 440,StateTypeSet]
type = StateTypeSet
trigger1 = UniqHitCount > 1
movetype = I

[State 1000,ChangeState]
type = ChangeState
trigger1 = Time >= 66
value = 1401

;------------------------強
[Statedef 1420]
type = S
movetype = A
physics = S
anim = 1410
ctrl = 0
velset = 0,0
poweradd = floor(72*fvar(5))

[State -2,VarSet]
type = VarSet
trigger1 = Time = 0 && var(22)=-1
var(25) = 0

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(20) = -25
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = Time = 0
var(21) = -55
ignorehitpause = 1

[State -2,varSet]
type = varSet
trigger1 = 1
var(12) = Ceil(IfElse(UniqHitCount=0,42,IfElse(UniqHitCount=1,30,28))*fvar(10))
ignorehitpause = 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,15
channel = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2,2

[State 193, 1]
type = Explod
trigger1 = NumExplod(1405)!
trigger1 = AnimElem = 7
anim = 1405
id = 1405
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1
removeTime = -1

[State 193, 1]
type = Explod
trigger1 = NumExplod(1407)!
trigger1 = AnimElem = 7
anim = 1407
id = 1407
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = -1
ownpal = 1
removeongethit = 1
removeTime = -1

[State 1321, HitDef]
type = HitDef
triggerall = var(25) < 3
trigger1 = Time %3 = 0
attr = S, SP
damage    = ceil(ifelse(var(12)<7,7,var(12))),ceil(ifelse((var(12)/8)<7,7,(var(12)/8)))
animtype = back
getpower = floor(IfElse(var(41)>1,72,143)*fvar(5)),floor(36*fvar(5))
givepower = 35, 35
guardflag = M
hitflag = MAF
hitsound = S5,11
guardsound = S6,0
pausetime = Ceil(6*IfElse(var(47),.5,1)),Ceil(7*IfElse(var(47),.5,1))
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = var(20),var(21)
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-8
air.velocity = -4,-8
guard.velocity = -10
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
palfx.time = 44
palfx.add = 159,8,15
palfx.mul = 100, 20, 25
palfx.color = 100
envshake.time = 10
envshake.ampl = 2
forcestand = 1

[State 440,StateTypeSet]
type = StateTypeSet
trigger1 = UniqHitCount > 2
movetype = I

[State 1000,ChangeState]
type = ChangeState
trigger1 = Time >= 79
value = 1401

;------------------------ 終了
[Statedef 1401]
type = S
movetype = I
physics = S
ctrl = 0
anim = IfElse(PrevStateNo=1400,1401,IfElse(PrevStateNo=1410,1411,1421))
velset = 0, 0

[State 1000, 0]
type = RemoveExplod
trigger1 = NumExplod(1405)
id = 1405

[State 1000, 0]
type = RemoveExplod
trigger1 = NumExplod(1407)
id = 1407

[State 193, 1]
type = Explod
trigger1 = Time = 0
trigger1 = NumExplod(1406)!
anim = 1406
id = 1406
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = 2
ownpal = 1
removeongethit = 1

[State 193, 1]
type = Explod
trigger1 = Time = 0
trigger1 = NumExplod(1408)!
anim = 1408
id = 1408
pos = 0,0
scale = 0.5,0.5
bindtime = -1
sprpriority = 0
ownpal = 1
removeongethit = 1

[State 1205, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

 
