;_/_/_/_/CPU_/_/_/_/
;---------------------------------------------------------------------------
;棫偪忬懺(俠俹倀)
[Statedef 3]
type    = S
physics = S
anim = 0
sprpriority = 0
velset = 0,0
ctrl =0

[State 13, 1]
type =Turn
trigger1 = P2Dist X<0

[State 13, 1]
type = ChangeState
trigger1 = roundstate!=2
value = 0
ctrl = 1

[State 13, 1]
type = ChangeState
trigger1 = ((AnimElemTime(1) = [10,16]) && random <100) || ((AnimElemTime(1) = [66,70]) && random <50) || AnimElemTime(1) = 108
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;偟傖偑傒忬懺(俠俹倀)
[Statedef 13]
type    = C
physics = C
anim = 10
sprpriority = 0
velset = 0,0
ctrl =0

[State 13, 1]
type = ChangeAnim
trigger1 = P2Dist X<0
value = 6

[State 13, 1]
type = Turn
trigger1 = P2Dist X<0

[State 10, 1]
type = VelMul
trigger1 = Anim=10
x = .75

[State 13, 1]
type = ChangeAnim
trigger1 = AnimTime=0
value = 11

[State 13, 1]
type = ChangeState
trigger1 = roundstate!=2
value = 11
ctrl = 1

[State 13, 1]
type = ChangeState
trigger1 = p2statetype=A && enemynear,time>12
value = 0
ctrl = 1
;----------------------------------------------------------------------

-----
;曕偒乮慜乯乮CPU乯
[Statedef 21]
type    = S
physics = N
sprpriority = 0
ctrl = 0

[State 20, 1]
type = VelSet
trigger1 = time>=2
x = const(velocity.walk.fwd.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20
value = 20

[State 20, 4]
type = changestate
trigger1 = P2dist x <= 0
value = 11
ctrl = 1

[State 20, 4]
type = changestate
trigger1 = P2BodyDist X>40 && time>=4
trigger1 = var(42)
trigger2 = P2BodyDist X>40 && time>=4 && ((P2BodyDist X<=80&&random<350) || (random<200 && P2BodyDist X =[80,120]) || (random<120 && P2BodyDist X >120))
trigger3 = P2bodydist X>140 && (enemynear,numproj>0||((enemynear,hitdefattr!=SCA,AA,AT,AP)&&inguarddist&&P2movetype!=A))||(P2movetype=A&&enemynear,time>26)
value = 13
;----------------------------------------------------------------------

-----
;曕偒乮屻乯乮CPU乯
[Statedef 22]
type    = S
physics = N
sprpriority = 0
ctrl = 0

[State 20, 1]
type = VelSet
trigger1 = time>=2
x = const(velocity.walk.back.x)

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21
value = 21

[State 20, 4]
type = changestate
trigger1 = P2dist x <= 0
trigger2 = time>=8 && random<=350
value = 11
ctrl = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;曕偒(Walk)
[Statedef 20]
type    = S
physics = S
sprpriority = 0
ctrl = 1

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd" && time>=2
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback" && time>=2
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20; && Anim != 5
;trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21; && Anim != 5
;trigger2 = Anim = 5 && AnimTime = 0
value = 21
;---------------------------------------------------------------------

;---------------------------------------------------------------------
;僀儞僩儘
[Statedef 190]
type = S
movetype = I
physics = S
ctrl =0
velset = 0,0
anim = 190

[State 190,Intro]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 190,Intro]
type = PlaySnd
trigger1 = AnimElem=5
value = 190,random%3
channel = 1

[State 190,Intro]
type = PlaySnd
trigger1 = AnimElem=8
value = 2,12

[State 190,Exit]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------
;挧敪
[Statedef 195]
type = S
movetype = I
physics = S
ctrl =0
velset = 0,0
anim = 195

;LV2僉儍儞僙儖捛寕梡
[State -3]
type = varSet
trigger1 = !var(19) && (PrevStateNo=[3000,3999]) && time=0 && !var(21)
var(19)=1
ignorehitpause=1

[State 190,Intro]
type = PlaySnd
trigger1 = AnimElem=5
value = 190,1+random%2
channel = 1

[State 190,Intro]
type = PlaySnd
trigger1 = AnimElem=8
value = 2,12

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

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;帪娫愗傟晧偗
[Statedef 170]
type = S
movetype = I
velset = 0,0
ctrl = 0
anim = 170

[State 190,1]
type = AssertSpecial
trigger1 = Time=[0,200]
flag = RoundNotOver

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;帪娫愗傟堷偒暘偗
[Statedef 175]
type = S
movetype = I
velset = 0,0
ctrl = 0
anim = 170

[State 190,1]
type = AssertSpecial
trigger1 = Time=[0,200]
flag = RoundNotOver

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;彑棙億乕僘
[Statedef 180]
type = S
movetype = I
velset = 0,0
ctrl = 0

[state 180]
type = varset
trigger1 = time=0
var(2)=0

[State 180,11]
type = ChangeState
trigger1 = Time=0
value = 181+random%2

;彑棙億乕僘1
[Statedef 181]
type = S
movetype = I
velset = 0,0
ctrl = 0
anim = 181

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem=5
value = 180, 0
channel = 1

[State 190,1]
type = AssertSpecial
trigger1 = Time=[0,200]
flag = RoundNotOver

;彑棙億乕僘2
[Statedef 182]
type = S
movetype = I
velset = 0,0
ctrl = 0
anim = 182

[State 190,1]
type = AssertSpecial
trigger1 = Time=[0,200]
flag = RoundNotOver

;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
;棫偪庛僷儞僠
[Statedef 200]
type = S
movetype =A 
physics = S
juggle = 15
ctrl = 0
velset = 0,0
anim = 200

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2, 10

;惡乮庛峌寕乯/ Voice(Light Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(5)=0 && random%4=0
value = 10,(random%8>=4)
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6 && !movecontact && !movereversed
trigger3 = AnimElem = 7 && !movecontact && !movereversed
attr = S, NA
damage    = ifelse(ceil(ifelse((AnimElem = 5),21,42)*fvar(7))<7,7,ceil(ifelse((AnimElem = 5),21,42)*fvar(7)))
animtype = Light
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(8/ifelse(var(21),2,1)),floor(7/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),ifelse((AnimElem=7),-18,-100)
hitsound = S1, 10
guardsound = S0, 0
ground.type = High
ground.slidetime = 10+var(14)*2
ground.hittime = 10+var(14)*2
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -4.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
yaccel = .5
air.cornerpush.veloff = 0
getpower = 4*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=5),3,6)*1.0/2)))<0,0,-8.65/ifelse(var(21),2,1))
priority = 3,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,20-(var(21)>0)*4),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))


[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = ifelse((AnimElem=7),-18,-100)

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

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=10,=1
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(6)<0,3,6)
ignorehitpause=1

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

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;棫偪拞僷儞僠
[Statedef 210]
type = S
movetype =A 
physics = S
juggle = 15
ctrl = 0
velset = 0,0
anim = 210
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2, 11

;惡乮拞峌寕乯/ Voice(Medium Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(5)=0 && random%3=0
value = 10,(random%6>=3)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem=5
trigger2 = AnimElem=6 && !movecontact && !movereversed
attr = S, NA
damage    = ifelse(ceil(ifelse((AnimElem=5),49,91)*fvar(7))<7,7,ceil(ifelse((AnimElem=5),49,91)*fvar(7)))
animtype = Medium
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(10/ifelse(var(21),2,1)),floor(9/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-70
hitsound = S1, 11
guardsound = S0, 0
ground.type = High
ground.slidetime = 14+var(14)*3
ground.hittime = 14+var(14)*3
ground.velocity = -7.65/ifelse(var(21),2,1)
guard.velocity = -7.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
yaccel = .5
air.cornerpush.veloff = 0
getpower = ifelse(var(16),4,8)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
ground.cornerpush.veloff = -15.0/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=5),7,13)*1.0/2)))<0,0,-15.0/ifelse(var(21),2,1))
priority = 4,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,26-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -70

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=10,=3
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(6)<0,7,13)
ignorehitpause=1

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

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;棫偪嫮僷儞僠
[Statedef 220]
type = S
movetype =A 
physics = S
juggle = 15
ctrl = 0
velset = 0,0
anim = 220
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 2, 12

;惡乮嫮峌寕乯/ Voice(High Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(3)=0 && random%2=0
value = 10,(random%4>1)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem=3
trigger2 = AnimElem=4 && !movecontact && !movereversed
attr = S, NA
damage    = ifelse(ceil(ifelse((AnimElem=3),35,70)*fvar(7))<7,7,ceil(ifelse((AnimElem=3),35,70)*fvar(7)))
animtype = Hard
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(12/ifelse(var(21),2,1)),floor(11/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-28
hitsound = S1, 12
guardsound = S0, 0
ground.type = Low
ground.slidetime = 17+var(14)*4
ground.hittime = 17+var(14)*4
ground.velocity = -10.65/ifelse(var(21),2,1)
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -3.0,-7.0
air.cornerpush.veloff = 0
yaccel = .5
fall.recover= 0
air.recover=0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 5,Hit
ground.cornerpush.veloff = -22.0/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=3),5,10)*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,31-(var(21)>0)*6),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -28

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=9,=2
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(4)<0,5,10)
ignorehitpause=1

[state 220]
type = Changestate
triggerall = AnimElemTime(5)>=0 && AnimElemTime(8)<0
trigger1 = command="z" && !fvar(38)
trigger2 = var(54)%5<2 && random%6=0 && fvar(38) && P2bodydist X<130 && !(var(21)&&var(16)>1)
trigger3 = fvar(32)=4&&fvar(38)
value = 700

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

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;棫偪庛僉僢僋
[Statedef 230]
type = S
movetype =A 
physics = S
juggle = 15
ctrl = 0
velset = 0,0
anim = 230

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 3

;惡乮庛峌寕乯/ Voice(Light Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(1)=0 && random%4=0
value = 10,(random%8>=4)
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage    = ifelse(ceil(28*fvar(7))<7,7,ceil(28*fvar(7)))
animtype = Light
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(8/ifelse(var(21),2,1)),floor(7/ifelse(var(21),2,1))
sparkno = s7100+(random%8)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-50
hitsound = S1, 3
guardsound = S0, 0
ground.type = Low
ground.slidetime = 10+var(14)*2
ground.hittime = 10+var(14)*2
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -4.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(4*1.0/2)))<0,0,-8.65/ifelse(var(21),2,1))
yaccel = .5
fall.recover= 0
air.recover=0
getpower = 4*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 3,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,20-(var(21)>0)*4),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -50

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=5,=2
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = 4
ignorehitpause=1

[State 250,Exit]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;棫偪拞僉僢僋
[Statedef 240]
type = S
movetype =A 
physics = S
juggle = 15
ctrl = 0
velset = 0,0
anim = 240
poweradd = 1*var(5)

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

;惡乮拞峌寕乯/ Voice(Medium Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(4)=0 && random%3=0
value = 10,(random%6>=3)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5 && !movecontact && !movereversed
attr = S, NA
damage    = ifelse(ceil(84*fvar(7))<7,7,ceil(84*fvar(7)))
animtype = Medium
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(10/ifelse(var(21),2,1)),floor(9/ifelse(var(21),2,1))
sparkno = s7100+(random%8)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),ifelse((AnimElem=4),-58,-98)
hitsound = S1, 4
guardsound = S0, 0
ground.type = Low
ground.slidetime = 14+var(14)*3
ground.hittime = 14+var(14)*3
ground.velocity = -7.65/ifelse(var(21),2,1)
guard.velocity = -7.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = -15.0/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(12*1.0/2)))<0,0,-15.0/ifelse(var(21),2,1))
yaccel = .5
fall.recover= 0
air.recover=0
getpower = ifelse(var(16),4,8)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 4,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,26-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = ifelse((AnimElem=4),-58,-98)

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

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=10,=3
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = 12
ignorehitpause=1

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

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;棫偪嫮僉僢僋
[Statedef 250]
type = S
movetype =A 
physics = S
juggle = 15
ctrl = 0
velset = 0,0
anim = 250
poweradd = 1*var(5)

[State 2400]
type = ChangeState
trigger1 = PrevStateNo=2400 && time=1
value = 2400

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

;惡乮嫮峌寕乯/ Voice(High Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(5)=0 && random%2=0
value = 10,(random%4>1)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 7 && !movecontact && !movereversed
trigger3 = AnimElem = 8 && !movecontact && !movereversed
attr = S, NA
damage    = ifelse(ceil(112*fvar(7))<7,7,ceil(112*fvar(7)))
animtype = hard
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(12/ifelse(var(21),2,1)),floor(11/ifelse(var(21),2,1))
sparkno = s7100+(random%8)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),ifelse((AnimElem=8),-30,-80)
hitsound = S1, 5
guardsound = S0, 0
ground.type = High
ground.slidetime = 17+var(14)*4
ground.hittime = 17+var(14)*4
ground.velocity = -10.65/ifelse(var(21),2,1)
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = -22.0/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(16*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
yaccel = .5
fall.recover= 0
air.recover=0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 5,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,31-(var(21)>0)*6),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = ifelse((AnimElem=8),-30,-80)

[State 200,StateTypeSet]
type = PosAdd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8
x = 20

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=9,=6
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = 16
ignorehitpause=1

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

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;偟傖偑傒庛僷儞僠
[Statedef 400]
type = C
movetype =A 
physics = C
juggle = 15
ctrl = 0
velset = 0,0
anim = 400

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 2, 10

;惡乮庛峌寕乯/ Voice(Light Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(6)=0 && random%4=0
value = 10,(random%8>=4)
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 6
attr = C, NA
damage    = ifelse(ceil(63*fvar(7))<7,7,ceil(63*fvar(7)))
animtype = Light
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(8/ifelse(var(21),2,1)),floor(7/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-6
hitsound = S1, 10
guardsound = S0, 0
ground.type = Low
ground.slidetime = 10+var(14)*2
ground.hittime = 10+var(14)*2
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -4.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(9*1.0/2)))<0,0,-8.65/ifelse(var(21),2,1))
yaccel = .5
fall.recover= 0
air.recover=0
getpower = 4*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 3,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,20-(var(21)>0)*4),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -6

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=8,=4
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = 9
ignorehitpause=1

[State 260,Exit]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;偟傖偑傒拞僷儞僠
[Statedef 410]
type = C
movetype =A 
physics = C
juggle = 15
ctrl = 0
velset = 0,0
anim = 410
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2, 11

;惡乮拞峌寕乯/ Voice(Medium Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(5)=0 && random%3=0
value = 10,(random%6>=3)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6 && !movecontact && !movereversed
attr = C, NA
damage    = ifelse(ceil(ifelse((AnimElem = 5),42,77)*fvar(7))<7,7,ceil(ifelse((AnimElem = 5),42,77)*fvar(7)))
animtype = Medium
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(10/ifelse(var(21),2,1)),floor(9/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-42
hitsound = S1, 11
guardsound = S0, 0
ground.type = Low
ground.slidetime = 14+var(14)*3
ground.hittime = 14+var(14)*3
ground.velocity = -7.65/ifelse(var(21),2,1)
guard.velocity = -7.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = -15.0/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=5),6,11)*1.0/2)))<0,0,-15.0/ifelse(var(21),2,1))
yaccel = .5
fall.recover= 0
air.recover=0
getpower = ifelse(var(16),4,8)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 4,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,26-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -42

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=10,=2
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(6)<0,6,11)
ignorehitpause=1

[State 260,Exit]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;偟傖偑傒嫮僷儞僠
[Statedef 420]
type = C
movetype =A 
physics = C
juggle = 15
ctrl = 0
velset = 0,0
anim = 420
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 12

;惡乮嫮峌寕乯/ Voice(High Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(1)=0 && random%2=0
value = 10,(random%4>1)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3 && !movecontact && !movereversed
trigger3 = AnimElem = 4 && !movecontact && !movereversed
trigger4 = AnimElem = 5 && !movecontact && !movereversed
attr = C, NA
damage    = ifelse(ceil(ifelse((AnimElem = 2),84,91)*fvar(7))<7,7,ceil(ifelse((AnimElem = 2),84,91)*fvar(7)))
animtype = Hard
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(12/ifelse(var(21),2,1)),floor(11/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),ifelse((AnimElem = 2),-15,ifelse((AnimElem=3),-76,ifelse((AnimElem=4),-144,-178)))
hitsound = S1, 12
guardsound = S0, 0
ground.type = Low
ground.slidetime = 17+var(14)*4
ground.hittime = 17+var(14)*4
ground.velocity = -10.65/ifelse(var(21),2,1)
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -2.5,-9.5
air.cornerpush.veloff = 0
ground.cornerpush.veloff = -22.0/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=2),12,13)*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
yaccel = .5
fall.recover= 0
air.recover=0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 5,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,31-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = ifelse((AnimElem = 2),-15,ifelse((AnimElem=3),-76,ifelse((AnimElem=4),-144,-178)))

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=12,=4
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(3)<0,12,13)
ignorehitpause=1

[State 260,Exit]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;偟傖偑傒庛僉僢僋
[Statedef 430]
type = C
movetype =A 
physics = C
juggle = 15
ctrl = 0
velset = 0,0
anim = 430

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

;惡乮庛峌寕乯/ Voice(Light Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(5)=0 && random%4=0
value = 10,(random%8>=4)
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6 && !movecontact && !movereversed
attr = C, NA
damage    = ifelse(ceil(ifelse((AnimElem = 5),21,42)*fvar(7))<7,7,ceil(ifelse((AnimElem = 5),21,42)*fvar(7)))
animtype = Light
air.animtype = up
guardflag = L
hitflag = MAF
pausetime = floor(8/ifelse(var(21),2,1)),floor(7/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-17
hitsound = S1, 10
guardsound = S0, 0
ground.type = Low
ground.slidetime = 10+var(14)*2
ground.hittime = 10+var(14)*2
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -4.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=5),3,6)*1.0/2)))<0,0,-8.65/ifelse(var(21),2,1))
yaccel = .5
fall.recover= 0
air.recover=0
getpower = 4*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 3,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,20-(var(21)>0)*4),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -17

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=10,=2
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(6)<0,2,4)
ignorehitpause=1

[State 260,Exit]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;偟傖偑傒拞僉僢僋
[Statedef 440]
type = C
movetype = A
physics = C
juggle = 15
ctrl = 0
velset = 0,0
anim = 440
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2, 11

;惡乮拞峌寕乯/ Voice(Medium Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(5)=0 && random%3=0
value = 10,(random%6>=3)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6 && !movecontact && !movereversed
attr = C, NA
damage    = ifelse(ceil(ifelse((AnimElem=5),35,70)*fvar(7))<7,7,ceil(ifelse((AnimElem=5),35,70)*fvar(7)))
animtype = Medium
air.animtype = up
guardflag = L
hitflag = MAF
pausetime = floor(10/ifelse(var(21),2,1)),floor(9/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-50
hitsound = S1, 11
guardsound = S0, 0
ground.type = Low
ground.slidetime = 14+var(14)*3
ground.hittime = 14+var(14)*3
ground.velocity = -7.65/ifelse(var(21),2,1)
guard.velocity = -7.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = -15.0/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=5),5,10)*1.0/2)))<0,0,-15.0/ifelse(var(21),2,1))
yaccel = .5
fall.recover = !var(20)
air.recover = 0
getpower = ifelse(var(16),4,8)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 4,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,26-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -50

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 10
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=10,=4
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(6)<0,5,10)
ignorehitpause=1

[State 260,Exit]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;偟傖偑傒嫮僉僢僋
[Statedef 450]
type = C
movetype = A
physics = C
juggle = 15
ctrl = 0
velset = 0,0
anim = 450
poweradd = 1*var(5)

[State 2400]
type = ChangeState
trigger1 = PrevStateNo=2400 && time=1
value = 2400

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 12

;惡乮嫮峌寕乯/ Voice(High Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(3)=0 && random%2=0
value = 10,(random%4>1)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5 && !movecontact && !movereversed
attr = C, NA
damage    = ifelse(ceil(ifelse((AnimElem=4),49,98)*fvar(7))<7,7,ceil(ifelse((AnimElem=4),49,98)*fvar(7)))
animtype = hard
air.animtype = up
guardflag = L
hitflag = MAF
pausetime = floor(12/ifelse(var(21),2,1)),floor(11/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),0
hitsound = S1, 12
guardsound = S0, 0
ground.type = Trip
ground.slidetime = 17+var(14)*4
ground.hittime = 17+var(14)*4
ground.velocity = -1,-6.5
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -1,-6.5
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=4),7,14)*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
yaccel = .5
fall = 1
air.fall = 1
fall.recover= 0
air.recover=0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
guard.cornerpush.veloff = -21+(((var(21))*21.0)/2)
priority = 5,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,31-(var(21)>0)*6),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = 0

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=9,=3
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(5)<0,7,14)
ignorehitpause=1

[state 220]
type = Changestate
trigger1 = AnimElemTime(6)>=0 && AnimElemTime(8)<0
trigger1 = command="c"
value = 710

[State 260,Exit]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僕儍儞僾庛僷儞僠
[Statedef 600]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 600
juggle  = 15

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 2, 10

;惡乮庛峌寕乯/ Voice(Light Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(6)=0 && random%4=0
value = 10,(random%8>=4)
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 7 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(ifelse((AnimElem = 6),21,42)*fvar(7))<7,7,ceil(ifelse((AnimElem = 6),21,42)*fvar(7)))
animtype = Light
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = floor(7/ifelse(var(21),2,1)),floor(7/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-95
hitsound = S1, 10
guardsound = S0, 0
ground.type = High
ground.slidetime = 10+var(14)*2
ground.hittime  = 10+var(14)*2
guard.slidetime  = 11
guard.hittime  = 11
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -4.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
airguard.velocity = -4.0
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=6),3,6)*1.0/2)))<0,0,-8.65/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = 4*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 3,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,19-(var(21)>0)*4),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -95

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

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(5)<0,3,7)
ignorehitpause=1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僕儍儞僾拞僷儞僠
[Statedef 610]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 610
juggle  = 15
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 11

;惡乮拞峌寕乯/ Voice(Medium Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(4)=0 && random%3=0
value = 10,(random%6>=3)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(ifelse((AnimElem = 4),42,77)*fvar(7))<7,7,ceil(ifelse((AnimElem = 4),42,77)*fvar(7)))
animtype = Medium
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = floor(9/ifelse(var(21),2,1)),floor(9/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-95
hitsound = S1, 11
guardsound = S0, 0
ground.type = High
ground.slidetime = 11+var(14)*3
ground.hittime = 11+var(14)*3
guard.slidetime  = 15
guard.hittime  = 15
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -8.25+(((var(21))*8.25)/2)
air.velocity = -5.0,-6.0
airguard.velocity = -4.5
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=4),6,11)*1.0/2)))<0,0,-15.0/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = ifelse(var(16),4,8)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 4,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,22-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -95

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(5)<0,6,11)
ignorehitpause=1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僕儍儞僾嫮僷儞僠
[Statedef 620]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 620
juggle  = 15
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 12

;惡乮嫮峌寕乯/ Voice(High Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(4)=0 && random%2=0
value = 10,(random%4>1)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(ifelse((AnimElem = 4),49,98)*fvar(7))<7,7,ceil(ifelse((AnimElem = 4),49,98)*fvar(7)))
animtype = Heavy
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = floor(11/ifelse(var(21),2,1)),floor(11/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-65
hitsound = S1, 12
guardsound = S0, 0
ground.type = High
ground.slidetime = 11+var(14)*4
ground.hittime = 11+var(14)*4
guard.slidetime  = 18
guard.hittime  = 18
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
airguard.velocity = -5.0
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=4),7,14)*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 5,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,24-(var(21)>0)*6),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -65

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(5)<0,7,14)
ignorehitpause=1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僕儍儞僾庛僉僢僋
[Statedef 630]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 630
juggle  = 15

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 10

;惡乮庛峌寕乯/ Voice(Light Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(4)=0 && random%4=0
value = 10,(random%8>=4)
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(ifelse((AnimElem = 4),28,49)*fvar(7))<7,7,ceil(ifelse((AnimElem = 4),28,49)*fvar(7)))
animtype = Light
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = floor(7/ifelse(var(21),2,1)),floor(7/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-21
hitsound = S1, 10
guardsound = S0, 0
ground.type = High
ground.slidetime = 10+var(14)*2
ground.hittime = 10+var(14)*2
guard.slidetime  = 11
guard.hittime  = 11
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -4.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
airguard.velocity = -4.0
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=4),4,7)*1.0/2)))<0,0,-8.65/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = 4*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 3,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,19-(var(21)>0)*4),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -21

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(5)<0,4,7)
ignorehitpause=1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僕儍儞僾拞僉僢僋
[Statedef 640]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 640
juggle  = 15
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 11

;惡乮拞峌寕乯/ Voice(Medium Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(4)=0 && random%3=0
value = 10,(random%6>=3)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(ifelse((AnimElem = 4),35,70)*fvar(7))<7,7,ceil(ifelse((AnimElem = 4),35,70)*fvar(7)))
animtype = Medium
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = floor(9/ifelse(var(21),2,1)),floor(9/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-40
hitsound = S1, 11
guardsound = S0, 0
ground.type = High
ground.slidetime = 11+var(14)*3
ground.hittime = 11+var(14)*3
guard.slidetime  = 15
guard.hittime  = 15
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -8.25+(((var(21))*8.25)/2)
air.velocity = -5.0,-6.0
airguard.velocity = -4.5
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=4),5,10)*1.0/2)))<0,0,-15.0/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = ifelse(var(16),4,8)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 4,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,22-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -40

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(5)<0,5,10)
ignorehitpause=1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僕儍儞僾嫮僉僢僋
[Statedef 650]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 650
juggle  = 15
poweradd = 1*var(5)

[State 2400]
type = ChangeState
trigger1 = PrevStateNo=2450 && time=1
value = 2450

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 12

;惡乮嫮峌寕乯/ Voice(High Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(4)=0 && random%2=0
value = 10,(random%4>1)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5 && !movecontact && !movereversed
trigger3 = AnimElem = 6 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(ifelse((AnimElem = 4),49,98)*fvar(7))<7,7,ceil(ifelse((AnimElem = 4),49,98)*fvar(7)))
animtype = Heavy
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = floor(11/ifelse(var(21),2,1)),floor(11/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),ifelse((AnimElem = 4),-175,-52)
hitsound = S1, 12
guardsound = S0, 0
ground.type = High
ground.slidetime = 11+var(14)*4
ground.hittime = 11+var(14)*4
guard.slidetime  = 18
guard.hittime  = 18
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
airguard.velocity = -5.0
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=4),7,14)*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 5,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,24-(var(21)>0)*6),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = ifelse((AnimElem = 4),-175,-52)

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(5)<0,7,14)
ignorehitpause=1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;儘傾儕僶乕僗
[Statedef 700]
type = S
movetype = A
physics = S
juggle = 15
ctrl = 0
velset = 0,0
anim = 700
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 2, 12

[State 420,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = 700, 0
channel = 1

[State 220,Hitdef]
type = HitDef
triggerall = !var(18)||var(56)
trigger1 = AnimElem = 6
trigger2 = AnimElem = 7 && !movecontact && !movereversed
attr = S, NA
damage    = ifelse(ceil(ifelse((AnimElem = 6),21,42)*fvar(7))<7,7,ceil(ifelse((AnimElem = 6),21,42)*fvar(7)))
animtype = Hard
air.animtype = up
guardflag = M
hitflag = MAF
pausetime = floor(12/ifelse(var(21),2,1)),floor(11/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-78
hitsound = S1, 12
guardsound = S0, 0
ground.type = Low
ground.slidetime = 17+var(14)*4
ground.hittime = 17+var(14)*4
ground.velocity = -10.65/ifelse(var(21),2,1)
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -3.0,-7.0
air.cornerpush.veloff = 0
yaccel = .5
fall.recover= 0
air.recover=0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 5,Hit
ground.cornerpush.veloff = -22.0/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=6),3,6)*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,31-(var(21)>0)*6),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -78

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

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=11,=4
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21)
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(7)<0,3,6)
ignorehitpause=1

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

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;儕僾儔僀僶僗僞乕
[Statedef 710]
type = C
movetype = A
physics = C
juggle = 15
ctrl = 0
velset = 0,0
anim = 710
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2, 12

[State 420,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 700, 1
channel = 1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6 && !movecontact && !movereversed
attr = C, NA
damage    = ifelse(ceil(ifelse((AnimElem = 5),49,98)*fvar(7))<7,7,ceil(ifelse((AnimElem = 5),49,98)*fvar(7)))
animtype = hard
air.animtype = up
guardflag = L
hitflag = MAF
pausetime = floor(12/ifelse(var(21),2,1)),floor(11/ifelse(var(21),2,1))
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-9
hitsound = S1, 12
guardsound = S0, 0
ground.type = Trip
ground.slidetime = 17+var(14)*4
ground.hittime = 17+var(14)*4
ground.velocity = -1,-6.5
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -1,-6.5
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
air.fall = 1
fall.recover= 0
air.recover=0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=5),7,14)*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
priority = 5,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,31-(var(21)>0)*6),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -9

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 200,Exit]
type = CtrlSet
trigger1 = AnimElem=10,=3
value = 1

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21)
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(6)<0,7,14)
ignorehitpause=1

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

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僼僃僀僗傾億儘儞
[Statedef 720]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 720
juggle  = 15
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2, 11

;惡乮拞峌寕乯/ Voice(Medium Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(4)=0 && random%3=0
value = 10,(random%6>=3)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(ifelse((AnimElem = 5),56,119)*fvar(7))<7,7,ceil(ifelse((AnimElem = 5),56,119)*fvar(7)))
animtype = Medium
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = ceil(12-((var(21)>0)*12)/2),ceil(12-((var(21)>0)*12)/2)
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-216
hitsound = S1, 11
guardsound = S0, 0
ground.type = High
ground.slidetime = 11+var(14)*3
ground.hittime = 11+var(14)*3
guard.slidetime  = 15
guard.hittime  = 15
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -8.25+(((var(21))*8.25)/2)
air.velocity = -5.0,-6.0
airguard.velocity = -4.5
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(ifelse((AnimElem=5),8,17)*1.0/2)))<0,0,-15.0/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = ifelse(var(16),4,8)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 4,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,22-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -216

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = ifelse(AnimElemTime(6)<0,8,17)
ignorehitpause=1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僀僇儘僗僟僀僽
[Statedef 730]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 730
juggle  = 15
poweradd = 1*var(5)

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

;惡乮拞峌寕乯/ Voice(Medium Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(8)=0 && random%3=0
value = 10,(random%6>=3)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 8
trigger2 = AnimElem = 9 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(77*fvar(7))<7,7,ceil(77*fvar(7)))
animtype = Medium
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = ceil(12-((var(21)>0)*12)/2),ceil(12-((var(21)>0)*12)/2)
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),-23
hitsound = S1, 11
guardsound = S0, 0
ground.type = High
ground.slidetime = 11+var(14)*3
ground.hittime = 11+var(14)*3
guard.slidetime  = 15
guard.hittime  = 15
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -8.25+(((var(21))*8.25)/2)
air.velocity = -5.0,-6.0
airguard.velocity = -4.5
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(11*1.0/2)))<0,0,-15.0/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = ifelse(var(16),4,8)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 4,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,22-(var(21)>0)*5),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = -23

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 10
movetype = I

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = 11
ignorehitpause=1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僆儕僆儞償傽乕儖僩
[Statedef 740]
type = A
movetype =A 
physics = A
ctrl = 0
anim = 740
juggle  = 15
poweradd = 1*var(5)

[State 1000,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2, 12

;惡乮嫮峌寕乯/ Voice(High Attack)
[State 200,Exit]
type = PlaySnd
trigger1 = AnimElemTime(5)=0 && random%2=0
value = 10,(random%4>1)+1
channel=1

[State 220,Hitdef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6 && !movecontact && !movereversed
trigger3 = AnimElem = 7 && !movecontact && !movereversed
attr = A, NA
damage    = ifelse(ceil(91*fvar(7))<7,7,ceil(91*fvar(7)))
animtype = Heavy
air.animtype = up
guardflag = HA
hitflag = MAF
pausetime = ceil(14-((var(21)>0)*14)/2),ceil(14-((var(21)>0)*14)/2)
sparkno = s7110+(random%64)
guard.sparkno = s7000
sparkxy = ifelse((Abs(P2bodydist X)-10)<20,-20,-10),ifelse((AnimElem = 5),-135,ifelse((AnimElem = 6),-40,-30))
hitsound = S1, 12
guardsound = S0, 0
ground.type = High
ground.slidetime = 11+var(14)*4
ground.hittime = 11+var(14)*4
guard.slidetime  = 18
guard.hittime  = 18
ground.velocity = -4.65/ifelse(var(21),2,1)
guard.velocity = -10.65/ifelse(var(21),2,1)
air.velocity = -5.0,-6.0
airguard.velocity = -5.0
air.hittime = 13
yaccel = .5
fall.recover= 0
air.recover=0
ground.cornerpush.veloff = -8.65/ifelse(var(21),2,1)
guard.cornerpush.veloff = ifelse((fvar(23)-ifelse(var(21),1,ceil(13*1.0/2)))<0,0,-22.0/ifelse(var(21),2,1))
air.cornerpush.veloff = 0
getpower = ifelse(var(16),4,12)*var(5),2*var(5)
givepower = 2*var(6),2*var(6)
priority = 5,Hit
palfx.color = ifelse(fvar(1)=21,176,ifelse((fvar(1)=[11,12]),64,ifelse(fvar(1),60,255)))
palfx.mul = ifelse(fvar(1)=21,128,ifelse((fvar(1)=[11,12]),90,128)),ifelse((fvar(1)=[11,12]),50,128),ifelse(fvar(1)=21,184,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),192,128)))
palfx.time = ifelse(fvar(1),ifelse(P2statetype=A,40,24-(var(21)>0)*6),ifelse(var(14),10,0))
palfx.add = ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),100,ifelse(fvar(1),104,255))),ifelse(fvar(1)=21,200,ifelse((fvar(1)=[11,12]),40,ifelse(fvar(1),104,255))),ifelse((fvar(1)=[11,12]),50,ifelse(fvar(1)&&fvar(1)!=21,172,255))

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(40) = ifelse((Abs(P2bodydist X)-10)<20,-20,-10)

[State 200,VarSet]
type = VarSet
trigger1 = 1
var(41) = ifelse((AnimElem = 5),-135,ifelse((AnimElem = 6),-40,-30))

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9
movetype = I

[State -2]
type = varAdd
trigger1 = numtarget && movehit=1 && !var(21) && (Prevstateno!=[200,799])
trigger1 = (target,stateno=840||(target,stateno=[5000,5999])) && target,time=1 && movehit
var(15) = 13
ignorehitpause=1

;---------------------------------------------------------------------------
;俹捠忢搳偘(儚僀儖僪僗儔儉)
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800

[State 801, Bind 1]
type = varset
trigger1 = AnimElem = 2
var(1) = ceil(Pos X)

[State 820,Varset]
type = varset
trigger1 = AnimElem = 2
var(2) = facing

[State 800, 1]
type = HitDef
trigger1 = P2MoveType!=H && !var(21)
trigger1 = P2StateNo!=[150,155]
trigger1 = P2StateNo!=40
trigger1 = AnimElem = 2
trigger1 = P2bodydist X<=26
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse ((command="holdback"&&!fvar(38))||(backedgebodydist <=120&&fvar(38)), -1, 1)
p2facing = 1
p1stateno = 811
p2stateno = 816
guard.dist = 0
numhits = 0
getpower = 8*var(5)

[State 800, 1]
type = HitDef
trigger1 = var(21)
trigger1 = P2StateNo!=[150,155]
trigger1 = P2StateNo!=40
trigger1 = AnimElem = 2
trigger1 = P2bodydist X<=26
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse ((command="holdback"&&!fvar(38))||(backedgebodydist <=120&&fvar(38)), -1, 1)
p2facing = 1
p1stateno = 811
p2stateno = 816
guard.dist = 0
numhits = 0
getpower = 8*var(5)

[State 800, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 5000, 1
channel = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;俹搳偘摦嶌
[Statedef 811]
type    = S
movetype= A
physics = N
anim = 811

[State 820,VarSet]
type = Varset
trigger1 = time=0||time=7
var(7) = 0

[State 820,VarSet]
type = Varset
triggerall = Time<=6 && var(25)
trigger1 = (target,command="holdfwd" || target,command="holdback") && (target,command="c"||target,command="z")
trigger2  =  fvar(38) = 1
var(7)=1

[State 820,VarSet]
type = Varset
triggerall = Time<=6 && var(25)
triggerall = target,command="ax"
trigger1 = target,name="Q"|| (target,name="ryu"&&(target,authorname="Umihei"||target,name="GM")) || target,name="urien" || target,name="Necro" || target,name="Gill" || target,name="Oro"
trigger2 = (target,name="ken"&&target,name="GM") || target,name="alex" || target,name="hugo" || target,name="SF3 Chun Li" || target,name="SF3Gouki" || target,name="dudly" || target,name="twelve"
trigger3 = target,name="Yang" || target,name="Yun" || target,name="makoto" || target,name="ibuki" || target,name="sean" || target,name="remy" || target,name="Street Fighter 3 Remy" || target,name="Elena"
trigger4 = (target,fvar(39)=2&&target,authorname="rei")
trigger5 = target,name="hauzer"|| target,name="mukuro" || target,name="kenji" || target,name="nool" || target,name="hydron" || target,name="leo"
var(7)=1

[State 820,VarSet]
type = ChangeState
triggerall = (Time=[1,6]) && var(25)
trigger1 = var(7)
value = 831

[State 806, Effect]
type = ScreenBound
trigger1 = Animelemtime(6)<0
value = 1

[State 806, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 800, 1

[State 801, Effect]
type = PlaySnd
trigger1 = AnimElem=5
value = 10, 1
channel = 1

[State 801, Effect]
type = PlaySnd
trigger1 = AnimElem=6
value = 5100, 0

[State 801, Effect]
type = PlaySnd
trigger1 = AnimElem=6
value = 1, 5

[State 806, State End1]
type = Turn
trigger1 = AnimElem=2
trigger2 = AnimTime=0

[State 100, Explod]
type = Explod
trigger1 = AnimElem=6
Anim = 7910
pos = -20, 0
postype = p1
ownpal = 1
bindtime = 1
pausemovetime = -1
supermove = 1
ignorehitpause = 1
sprpriority = -2
scale = 1,1

[State 100, Explod]
type = Explod
trigger1 = AnimElem=6
Anim = 7930
pos = -20, 10
postype = p1
ownpal = 1
bindtime = 1
pausemovetime = -1
supermove = 1
ignorehitpause = 1
sprpriority = -2
scale = .5,.5

[state 810]
type = Width
trigger1 = AnimElem=1
edge = 55,55

[State 806, Hurt1]
type = Sprpriority
trigger1 = AnimElem=5
value = 1

[state 810]
type = targetbind
trigger1 = AnimElem=1
pos = 54,0

[state 810]
type = targetbind
trigger1 = AnimElem=2
pos = 41,-164

[state 810]
type = targetbind
trigger1 = AnimElem=3
pos = 36,-161

[state 810]
type = targetbind
trigger1 = AnimElem=4
pos = 56,-159

[state 810]
type = targetbind
trigger1 = AnimElem=5
pos = 70,-138

[state 810]
type = targetbind
trigger1 = AnimElem=6
pos = 10,-12

[State 806, Hurt1]
type = TargetLifeAdd
trigger1 = AnimElem=6
value = -ceil(140*fvar(7))

[State 806, HitAdd]
type = HitAdd
trigger1 = AnimElem=6
value = 1

[State 806, Hurt1]
type = VarAdd
trigger1 = AnimElem=6
var(16) = 1

[State 806, Hurt1]
type = TargetPowerAdd
trigger1 = AnimElem=6
value = 2*var(6)

[State 801, Throw 11]
type = TargetState
trigger1 = AnimElem = 6
value = 817

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

;---------------------------------------------------------------------------
;憡庤
[Statedef 816]
type    = A
movetype= H
physics = N
velset = 0,0

[state 816]
type = ScreenBound
trigger1 = 1
value = 1

[state 816]
type = changeanim2
trigger1 = time=0
value = 816

[State 806, Hurt1]
type = Sprpriority
trigger1 = AnimElem=4
value = 2

[state 816]
type = selfstate
trigger1 = time=120
value = 5000

;---------------------------------------------------------------------------
;憡庤悂偒旘傃
[Statedef 817]
type    = A
movetype= H
physics = N
velset = 0,0

[State 806, Hurt1]
type = Sprpriority
trigger1 = 1
value = 2

[state 816]
type = EnvShake
trigger1 = Time=0
time = 15
ampl = 4

[state 816]
type = ScreenBound
trigger1 = 1
value = 1

[state 816]
type = changeanim2
trigger1 = time=0
value = 817

[state 816]
type = velset
trigger1 = Time=4
x = -4.0
y = -6.0

[state 816]
type = veladd
trigger1 = Time>=4
y = .5

[state 816]
type = selfstate
trigger1 = Vel Y>0 && Pos Y>=-12
value = 5110

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


;---------------------------------------------------------------------------
;俲捠忢搳偘(儚僀儖僪僗儔儉)
[Statedef 820]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 820

[State 801, Bind 1]
type = varset
trigger1 = AnimElem = 2
var(1) = ceil(Pos X)

[State 820,Varset]
type = varset
trigger1 = AnimElem = 2
var(2) = facing

[State 800, 1]
type = HitDef
trigger1 = P2MoveType!=H
trigger1 = P2StateNo!=[150,155]
trigger1 = P2StateNo!=40
trigger1 = AnimElem = 2
trigger1 = P2bodydist X<=26
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse ((command="holdback"&&!fvar(38))||(backedgebodydist <=120&&fvar(38)), -1, 1)
p2facing = 1
p1stateno = 821
p2stateno = 826
guard.dist = 0
getpower = 8*var(5)
numhits = 0

[State 800, 1]
type = HitDef
trigger1 = var(21)
trigger1 = P2StateNo!=[150,155]
trigger1 = P2StateNo!=40
trigger1 = AnimElem = 2
trigger1 = P2bodydist X<=26
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse ((command="holdback"&&!fvar(38))||(backedgebodydist <=120&&fvar(38)), -1, 1)
p2facing = 1
p1stateno = 821
p2stateno = 826
guard.dist = 0
getpower = 8*var(5)
numhits = 0

[State 800, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 5000, 1
channel = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;俲搳偘摦嶌
[Statedef 821]
type    = S
movetype= A
physics = N
anim = 811

[State 820,VarSet]
type = Varset
trigger1 = time=0||time=3
var(7) = 0

[State 820,VarSet]
type = Varset
triggerall = Time<=2 && var(25)
trigger1 = (target,command="holdfwd" || target,command="holdback") && (target,command="c"||target,command="z")
trigger2  =  fvar(38) = 1
var(7)=1

[State 820,VarSet]
type = Varset
triggerall = Time<=2 && var(25)
triggerall = target,command="ax"
trigger1 = target,name="Q"|| (target,name="ryu"&&(target,authorname="Umihei"||target,name="GM")) || target,name="urien" || target,name="Necro" || target,name="Gill" || target,name="Oro"
trigger2 = (target,name="ken"&&target,name="GM") || target,name="alex" || target,name="hugo" || target,name="SF3 Chun Li" || target,name="SF3Gouki" || target,name="dudly" || target,name="twelve"
trigger3 = target,name="Yang" || target,name="Yun" || target,name="makoto" || target,name="ibuki" || target,name="sean" || target,name="remy" || target,name="Street Fighter 3 Remy" || target,name="Elena"
trigger4 = (target,fvar(39)=2&&target,authorname="rei")
trigger5 = target,name="hauzer"|| target,name="mukuro" || target,name="kenji" || target,name="nool" || target,name="hydron" || target,name="leo"
var(7)=1

[State 820,VarSet]
type = ChangeState
triggerall = (Time=[1,2]) && var(25)
trigger1 = var(7)
value = 831

[State 806, Effect]
type = ScreenBound
trigger1 = Animelemtime(6)<0
value = 1

[State 806, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 800, 1

[State 801, Effect]
type = PlaySnd
trigger1 = AnimElem=5
value = 10, 1
channel = 1

[State 801, Effect]
type = PlaySnd
trigger1 = AnimElem=6
value = 5100, 0

[State 801, Effect]
type = PlaySnd
trigger1 = AnimElem=6
value = 1, 5

[State 806, State End1]
type = Turn
trigger1 = AnimElem=2
trigger2 = AnimTime=0

[State 100, Explod]
type = Explod
trigger1 = AnimElem=6
Anim = 7910
pos = 20, 0
postype = p1
ownpal = 1
bindtime = 1
pausemovetime = -1
supermove = 1
ignorehitpause = 1
sprpriority = -2
scale = 1,1

[State 100, Explod]
type = Explod
trigger1 = AnimElem=6
Anim = 7930
pos = 20, 10
postype = p1
ownpal = 1
bindtime = 1
pausemovetime = -1
supermove = 1
ignorehitpause = 1
sprpriority = -2
scale = .5,.5

[state 810]
type = Width
trigger1 = AnimElem=1
edge = 55,55

[State 806, Hurt1]
type = Sprpriority
trigger1 = AnimElem=5
value = 1

[state 810]
type = targetbind
trigger1 = AnimElem=1
pos = 54,0

[state 810]
type = targetbind
trigger1 = AnimElem=2
pos = 41,-164

[state 810]
type = targetbind
trigger1 = AnimElem=3
pos = 36,-161

[state 810]
type = targetbind
trigger1 = AnimElem=4
pos = 56,-159

[state 810]
type = targetbind
trigger1 = AnimElem=5
pos = 70,-138

[state 810]
type = targetbind
trigger1 = AnimElem=6
pos = 10,-12

[State 806, Hurt1]
type = TargetLifeAdd
trigger1 = AnimElem=6
value = -ceil(154*fvar(7))

[State 806, HitAdd]
type = HitAdd
trigger1 = AnimElem=6
value = 1

[State 806, Hurt1]
type = VarAdd
trigger1 = AnimElem=6
var(16) = 1

[State 806, Hurt1]
type = TargetPowerAdd
trigger1 = AnimElem=6
value = 2*var(6)

[State 801, Throw 11]
type = TargetState
trigger1 = AnimElem = 6
value = 827

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

;---------------------------------------------------------------------------
;憡庤
[Statedef 826]
type    = A
movetype= H
physics = N
velset = 0,0

[state 816]
type = ScreenBound
trigger1 = 1
value = 1

[state 816]
type = changeanim2
trigger1 = time=0
value = 816

[State 806, Hurt1]
type = Sprpriority
trigger1 = AnimElem=4
value = 2

[state 816]
type = selfstate
trigger1 = time=120
value = 5000

;---------------------------------------------------------------------------
;憡庤悂偒旘傃
[Statedef 827]
type    = A
movetype= H
physics = N
velset = 0,0

[State 806, Hurt1]
type = Sprpriority
trigger1 = 1
value = 2

[state 816]
type = EnvShake
trigger1 = Time=0
time = 15
ampl = 4

[state 816]
type = ScreenBound
trigger1 = 1
value = 1

[state 816]
type = changeanim2
trigger1 = time=0
value = 817

[state 816]
type = velset
trigger1 = Time=4
x = -4.0
y = -6.0

[state 816]
type = veladd
trigger1 = Time>=4
y = .5

[state 816]
type = selfstate
trigger1 = Vel Y>0 && Pos Y>=-12
value = 5110

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

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

;~~~~~~搳偘敳偗~~~~
;帺暘懁===
[statedef 831]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0
anim = 5940

[state 831]
type = NotHitBy
trigger1 = 1
value = SCA

[state 831]
type = PlayerPush
trigger1 = 1
value = 0

[state 831]
type = PlaySND
trigger1 = time=0
value = 830,0

[state 831]
type = PlaySND
trigger1 = time=0
value = 5910,1
channel = 1

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 7940
id = 7940
pos = 0, -60
postype = p1
ownpal = 1
bindtime = 1
scale = 1,1
sprpriority = 4

[State 820,VarSet]
type = Varset
trigger1 = time=0
var(7) = 0

[State 801, Bind 1]
type = posset
trigger1 = time=0
x = var(1)
y = 0

[state 831]
type = Turn
trigger1 = time=0&&facing!=var(2)

[state 831]
type = TargetFacing
trigger1 = time=0
value = -1

[state 831]
type = VelSet
trigger1 = (time=[2,20])
x = ifelse(enemynear,backedgebodydist<=5,-3.125,-2.125)

[state 831]
type = null;TargetVelSet
trigger1 = (time=[2,20])
x = ifelse(backedgebodydist<=5,-2.75,-2.0)

[State 801, Bind 1]
type = TargetState
trigger1 = time=0
value = 836

[state 831]
type = TargetBind
trigger1 = time=0
pos = 0,0

[state 831]
type = ChangeState
trigger1 = time=30
value =0
ctrl = 1

;憡庤懁===
[statedef 836]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0

[state 831]
type = NotHitBy
trigger1 = 1
value = SCA

[state 831]
type = PlayerPush
trigger1 = 1
value = 0

[state 831]
type = ChangeAnim
trigger1 = (time=[0,1])&&!selfanimexist(5940)
value = 120

[state 831]
type = ChangeAnim
trigger1 = time=2&&!selfanimexist(5940)
value = 5002

[state 831]
type = ChangeAnim
trigger1 = time=2&&selfanimexist(5940)
value = 5940+(SelfAnimExist(5945)&&(authorname="rei"||authorname="gal129"))*5

[state 831]
type = ChangeAnim
trigger1 = animtime=0
value = anim
elem = AnimElemNo(0)

[state 831]
type = PlaySND
trigger1 = time=0&&(authorname="rei"||authorname="gal129")&&fvar(39)=1
value = 5910,1
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="rei"&&name="cvsbalrog"
value = 5000,2
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="rei"&&name="cvsurien"
value = 5950,0
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="warusaki3"&&fvar(39)=1
value = 5940,0
channel = 1

[state 831]
type = VelSet
trigger1 = (time=[2,20])
x = ifelse(enemynear,backedgebodydist<=5,-3.875,-2.125)

[state 831]
type = SelfState
trigger1 = time=29
value =0
ctrl = 1

;---------------------------------------------------------------------------
;婥愨壒
[Statedef 15390]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[State 1000, Spark]
type = Explod
trigger1 = enemynear,hitshakeover
Anim = 7950+(enemynear,facing=-1)*5
id = 7950
pos = 0, enemynear,const(size.head.pos.y)-5
postype = p2
sprpriority = 5
ownpal = 1
bindtime = -1
removetime=-1
ignorehitpause = 1
scale = .5,.5
facing = ifelse(enemynear,facing=-1,-1,1)
persistent=0

[State 1000, Spark]
type = Explod
trigger1 = enemynear,hitshakeover
Anim = 7951+(enemynear,facing=-1)*5
id = 7950
pos = 0, enemynear,const(size.head.pos.y)-5
postype = p2
sprpriority = -5
ownpal = 1
bindtime = -1
removetime=-1
ignorehitpause = 1
scale = .5,.5
facing = ifelse(enemynear,facing=-1,-1,1)
persistent=0

[State -2]
type = PlaySnd
trigger1 = P2stateno=15320 && !(authorname="rei"||authorname="gal129")
value = 5100,0
persistent=0

[State -2]
type = PlaySnd
trigger1 = P2stateno=15340 && !(authorname="rei"||authorname="gal129")
value = 5100,1
persistent=0

[State -3,Varset]
type = varSet
trigger1 = time=0
var(8)=ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(20),ifelse(enemynear,authorname="H乭",enemynear,var(30),ifelse((enemynear,authorname="rei"||enemynear,authorname="gal129"),enemynear,var(59),3)))

;婥愨懴媣抣憹壛
[State 3001, Super]
type = parentvaradd
trigger1 = time=0 && (root,fvar(25)-floor(root,fvar(25)))<.997
fvar(25) = .003

[State -2]
type = PlaySnd
trigger1 = P2stateno=15300 && (var(8)<=2||var(8)=6)
value = 5300,0
persistent=35
channel = 9

[State -2]
type = PlaySnd
trigger1 = P2stateno=15300 && (var(8)=[3,5])
value = 5300,1
persistent=0

[State 1000, Spark]
type = RemoveExplod
trigger1 = P2stateno!=[15300,15340]
id = 7950

[State 5300,PlaySnd]
type = StopSnd
trigger1 = P2stateno!=[15300,15340]
channel = 9

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = P2stateno!=[15300,15340]

;---------------------------------------------------------------------------
;婥愨僸僢僩悢
[Statedef 15395]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[State 4110, DestroySelf]
type = varset
trigger1 = Time=0
var(16) = root,var(16)

[State 4110, DestroySelf]
type = parentvarset
trigger1 = 1
var(16) = var(16)
ignorehitpause=1

[State 4110, DestroySelf]
type = parentvaradd
trigger1 = root,movehit=1
var(16) = 1
ignorehitpause=1

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = (P2stateno!=[15300,15340]) && !((P2stateno=[5300,5350])&&(enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
ignorehitpause=1

;---------------------------------------------------------------------------
;姶揹張棟
[Statedef 8900]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[state -2]
type = Explod
trigger1 = !NumExplod(8900)
Anim = 8900+random%3
id = 8900
name = "electric"
pos = enemynear,const(size.mid.pos.x)-15, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = !NumExplod(8901)
Anim = 8900+random%3
id = 8901
name = "electric"
pos = enemynear,const(size.head.pos.x)-20, enemynear,const(size.head.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = !NumExplod(8902)
Anim = 8900+random%3
id = 8902
name = "electric"
pos = enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = !NumExplod(8903)
Anim = 8900+random%3
id = 8903
name = "electric"
pos = enemynear,const(size.mid.pos.x)+10, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
trigger2 = root,fvar(1)=2
id = 8900

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
trigger2 = root,fvar(1)=2
id = 8901

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
trigger2 = root,fvar(1)=2
id = 8902

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
trigger2 = root,fvar(1)=2
id = 8903

[State -2]
type = ChangeState
trigger1 = root,fvar(1)=2
value = 8905

[State -2]
type = DestroySelf
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
;---------------------------------------------------------------------------
;姶揹張棟乮嬻拞乯
[Statedef 8905]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[state -2]
type = Explod
trigger1 = !NumExplod(8900)
Anim = 8900+random%3
id = 8900
name = "electric"
pos = enemynear,const(size.mid.pos.x)+35, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = !NumExplod(8901)
Anim = 8900+random%3
id = 8901
name = "electric"
pos = enemynear,const(size.head.pos.x)-20, enemynear,const(size.head.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = !NumExplod(8902)
Anim = 8900+random%3
id = 8902
name = "electric"
pos = enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = !NumExplod(8903)
Anim = 8900+random%3
id = 8903
name = "electric"
pos = enemynear,const(size.mid.pos.x)+10, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
id = 8900

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
id = 8901

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
id = 8902

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
id = 8903

[State -2]
type = DestroySelf
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])

;---------------------------------------------------------------------------
;擱從張棟
[Statedef 8910]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[state -2]
type = Explod
trigger1 = NumExplod(8910)<=1
Anim = 8910
id = 8910
name = "fire"
pos = enemynear,const(size.mid.pos.x)-25, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = NumExplod(8910)<=1
Anim = 8910
id = 8910
name = "fire"
pos = enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = NumExplod(8915)<=1
Anim = 8915
id = 8915
name = "fire"
pos = enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = NumExplod(8915)<=1
Anim = 8915
id = 8915
name = "fire"
pos = enemynear,const(size.head.pos.x)-20, enemynear,const(size.head.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

;===============
;End
[state -2]
type = Explod
triggerall = NumExplod(8916)<=1
trigger1 = !root,numtarget
trigger2 = enemynear,statetype=L
Anim = 8911
id = 8911
name = "fire"
pos = enemynear,const(size.mid.pos.x)-25, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
triggerall = NumExplod(8916)<=1
trigger1 = !root,numtarget
trigger2 = enemynear,statetype=L
Anim = 8911
id = 8911
name = "fire"
pos =  enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
triggerall = NumExplod(8916)<=1
trigger1 = !root,numtarget
trigger2 = enemynear,statetype=L
Anim = 8916
id = 8916
name = "fire"
pos = enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
triggerall = NumExplod(8916)<=1
trigger1 = !root,numtarget
trigger2 = enemynear,statetype=L
Anim = 8916
id = 8916
name = "fire"
pos = enemynear,const(size.head.pos.x)-20, enemynear,const(size.head.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[1,2])
trigger2 = !root,numtarget
trigger3 = enemynear,statetype=L
trigger4 = root,fvar(1)=12
id = 8910

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
trigger2 = root,fvar(1)=12
id = 8911

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
trigger2 = !root,numtarget
trigger3 = enemynear,statetype=L
trigger4 = root,fvar(1)=12
id = 8915

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
trigger2 = root,fvar(1)=12
id = 8916

[State -2]
type = ChangeState
trigger1 = root,fvar(1)=12
value = 8915

[State -2]
type = DestroySelf
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
;---------------------------------------------------------------------------
;擱從張棟乮嬻拞乯
[Statedef 8915]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[state -2]
type = Explod
trigger1 = NumExplod(8910)<=1
Anim = 8910
id = 8910
name = "fire"
pos = enemynear,const(size.mid.pos.x)+15, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = NumExplod(8910)<=1
Anim = 8910
id = 8910
name = "fire"
pos = enemynear,const(size.mid.pos.x)+35, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = NumExplod(8915)<=1
Anim = 8915
id = 8915
name = "fire"
pos = enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
trigger1 = NumExplod(8915)<=1
Anim = 8915
id = 8915
name = "fire"
pos = enemynear,const(size.head.pos.x)-20, enemynear,const(size.head.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

;===============
;End
[state -2]
type = Explod
triggerall = NumExplod(8916)<=1
trigger1 = !root,numtarget
trigger2 = enemynear,statetype=L
Anim = 8911
id = 8911
name = "fire"
pos = enemynear,const(size.mid.pos.x)+15, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
triggerall = NumExplod(8916)<=1
trigger1 = !root,numtarget
trigger2 = enemynear,statetype=L
Anim = 8911
id = 8911
name = "fire"
pos = enemynear,const(size.mid.pos.x)+35, enemynear,const(size.mid.pos.y)+30
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
triggerall = NumExplod(8916)<=1
trigger1 = !root,numtarget
trigger2 = enemynear,statetype=L
Anim = 8916
id = 8916
name = "fire"
pos = enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[state -2]
type = Explod
triggerall = NumExplod(8916)<=1
trigger1 = !root,numtarget
trigger2 = enemynear,statetype=L
Anim = 8916
id = 8916
name = "fire"
pos = enemynear,const(size.head.pos.x)-20, enemynear,const(size.head.pos.y)
postype = p2
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

[State -2]
type = varset
trigger1 = !var(1) && enemynear,statetype=L
var(1)=1

[State -2]
type = varadd
trigger1 = var(1)
var(1)=1

[State -2]
type = parentvarset
trigger1 = var(1)>=6
fvar(1)=0

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
trigger2 = !root,numtarget
trigger3 = enemynear,statetype=L
id = 8910

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
id = 8911

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
trigger2 = !root,numtarget
trigger3 = enemynear,statetype=L
id = 8915

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
id = 8916

[State -2]
type = DestroySelf
trigger1 = !root,fvar(1)||(root,fvar(1)!=[11,12])
;---------------------------------------------------------------------------
;昘張棟
[Statedef 8950]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[state -2]
type = Explod
trigger1 = !NumExplod(8950) && time=0
Anim = 8950
id = 8950
name = "ice"
pos = enemynear,const(size.mid.pos.x), enemynear,const(size.mid.pos.y)
postype = p2
ownpal = 0
bindtime = -1
removetime = -1
sprpriority = 2
scale = .5,.5

;===============
[State -2]
type = ModifyExplod
trigger1 = Time<=10
id = 8950
scale = .5+(Time)*.05,.5+(Time)*.05
ignorehitpause=1

[State 4000, PalFX]
type = null;PalFX
trigger1 = time=11
time = 10
add = -ceil(-(Time-10)*25),-ceil(-(Time-10)*25),-ceil(-(Time-10)*25)
;mul = (20-Time)*.05,(20-Time)*.05,(20-Time)*.05
ignorehitpause=1

[State -2]
type = RemoveExplod
trigger1 = !root,fvar(1)
trigger2 = !root,numtarget
trigger3 = enemynear,statetype=L
trigger4 = time=20
id = 8950

[State -2]
type = DestroySelf
trigger1 = !root,fvar(1)
;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 840]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1000, 0]
type = HitFallSet
trigger1 = time = 0
value = 0

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 841

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 841]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 845 ;HITA_RECOV

[State 5030, 4]
type = SelfState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 842 ;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 842]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 845 ;HITA_RECOV

[State 5035, 4]
type = SelfState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL
;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 845]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = SelfState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = null;CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 4]
type = NotHitBy
trigger1 = HitOver
value = SCA,AA

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

;---------------------------------------------------------------------------
;嶍傝KO
[Statedef 5950]
type = S
movetype = H
physics = S
ctrl = 0
velset = 0,0
sprpriority = -3

[State 860, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 190, 4]
type = ChangeAnim
trigger1 = !HitOver
trigger2 = time<30
value = 5950
elem=1

[State 190, 4]
type = null;ChangeAnim
trigger1 = HitOver
value = 5950
elem=2
persistent = 0

[State 1100, ChangeState]
type = ChangeState
trigger1 = AnimElem=10
value = 5150

;---------------------------------------------------------------------------
;憡庤懁僈乕僪僋儔僢僔儏梡
[Statedef 15900]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=220,5,ifelse(root,stateno=210,7,ifelse(root,stateno=200,3,var(0))))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=250,16,ifelse(root,stateno=240,12,ifelse(root,stateno=230,4,var(0))))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=420,12,ifelse(root,stateno=410,6,ifelse(root,stateno=400,9,var(0))))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=450,7,ifelse(root,stateno=440,5,ifelse(root,stateno=430,3,var(0))))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=620,7,ifelse(root,stateno=610,6,ifelse(root,stateno=600,3,var(0))))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=650,7,ifelse(root,stateno=640,5,ifelse(root,stateno=630,4,var(0))))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=710,7,ifelse(root,stateno=700,3,var(0)))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=740,13,ifelse(root,stateno=730,11,ifelse(root,stateno=720,8,var(0))))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=930,12,ifelse(root,stateno=920,12,var(0)))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse((root,stateno=[1410,1420]),8,ifelse(root,stateno=1400,6,ifelse(root,stateno=1200,8,ifelse(root,stateno=1100,10,ifelse((root,stateno=[1000,1099]),4,var(0))))))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse((root,stateno=[3000,3099]),1,var(0))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,var(56),1,var(0))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(ceil(root,fvar(13))%64>31&&(root,stateno=[600,799])&&(root,prevstateno=[600,799])&&root,statetype=A,1,var(0))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(ceil(root,fvar(13))%32>15&&(root,stateno=[200,799])&&(root,prevstateno=[200,799])&&root,statetype!=A,1,var(0))

[state 15910]
type = varset
trigger1 = time=0
var(0) = ifelse(root,stateno=2000,0,var(0))

[state 15910]
type = varset
trigger1 = time=0
var(1) = ifelse(root,stateno=3150,3100+root,var(1)*10,ifelse(root,stateno=3050,3000+root,var(1)*10,root,stateno))

;僈乕僪夞悢
[state 15910]
type = varadd
trigger1 = time=0&&prevstateno=15905
var(2) = 1

[state 15910]
type = parentvarset
trigger1 = roundstate<2
trigger1 = (enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1
fvar(23) = ifelse(enemynear,fvar(37)=1,48-(ceil(enemynear,fvar(13))%2>0)*10-(ceil(enemynear,fvar(13))%4>1)*5,ifelse(enemynear,var(59)=2,38,ifelse(enemynear,var(59)=5,43,48)))

[state 15910]
type = parentvarset
trigger1 = roundstate<2
trigger1 = enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1
fvar(23) = ifelse(enemynear,var(20)=6,33,ifelse(enemynear,var(20)=2,38,ifelse(enemynear,var(20)=5,43,48)))

[state 15910]
type = parentvarset
trigger1 = roundstate<2
trigger1 = enemynear,authorname="H乭"&&enemynear,fvar(39)=1
fvar(23) = ifelse(enemynear,var(43),48-(floor(enemynear,var(50)/10%10)=1)*10-(floor(enemynear,var(50)/100%10)=1)*5,ifelse(enemynear,var(30)=3,38,ifelse(enemynear,var(30)=6,43,48)))

[state 15910]
type = parentvarset
trigger1 = roundstate<2
trigger1 = ((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")
fvar(23) = ifelse(enemynear,var(20)=0,48-(enemynear,var(8)=2)*10-(enemynear,var(7)=2)*5,ifelse(enemynear,var(20)=3,38,ifelse(enemynear,var(20)=6,43,48)))

[state 15910]
type = parentvarset
trigger1 = roundstate<2
trigger1 = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
trigger1 = !(enemynear,authorname="H乭"&&enemynear,fvar(39)=1)
trigger1 = !(enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1)
trigger1 = !((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")
fvar(23) = 48

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "Guard Clash = %f decrease point = %d stateno=%d guard count=%d"
params = root,fvar(23), var(0), var(1), var(2)
ignorehitpause =1

[state 15910]
type = DestroySelf
trigger1 = (root,numhelper(15901)||root,numhelper(15902)||root,numhelper(15903)||root,numhelper(15904))&&time>0&&roundstate>=2
trigger2 = (root,stateno=[0,119])&&time>0&&roundstate>=2
trigger3 = ((var(1)=[800,899])||(var(1)=[900,910])||(var(1)=[940,999])) && time>0

[state 15910]
type = ChangeState
trigger1 = root,numhelper(15905)&&time>0
value = 15905

[state 15910]
type = ChangeState
trigger1 = root,stateno!=var(1) && time>0 && roundstate>=2 && (var(1)!=[3000,3020]) && (var(1)!=[3100,3120])
trigger2 = (((var(1)=[3000,3020])&&root,stateno!=3050)||((var(1)=[3100,3120])&&root,stateno!=3150)) && time>0 && roundstate>=2
value = 15900

;---------------------------------------------------------------------------
;憡庤懁僈乕僪僋儔僢僔儏梡乮搑拞偱峌寕椡曄傢傞応崌乯
[Statedef 15901]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8050

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=200
var(0) = ifelse(root,animelemtime(6)>=0,6,3)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=210
var(0) = ifelse(root,animelemtime(6)>=0,13,7)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=220
var(0) = ifelse(root,animelemtime(4)>=0,10,5)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=410
var(0) = ifelse(root,animelemtime(6)>=0,11,6)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=420
var(0) = ifelse(root,animelemtime(3)>=0,13,12)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=430
var(0) = ifelse(root,animelemtime(6)>=0,6,3)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=440
var(0) = ifelse(root,animelemtime(6)>=0,10,5)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=450
var(0) = ifelse(root,animelemtime(5)>=0,14,7)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=600
var(0) = ifelse(root,animelemtime(7)>=0,6,3)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=610
var(0) = ifelse(root,animelemtime(5)>=0,11,6)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=620
var(0) = ifelse(root,animelemtime(5)>=0,14,7)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=630
var(0) = ifelse(root,animelemtime(5)>=0,7,4)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=640
var(0) = ifelse(root,animelemtime(5)>=0,10,5)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=650
var(0) = ifelse(root,animelemtime(5)>=0,14,7)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=700
var(0) = ifelse(root,animelemtime(7)>=0,6,3)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=710
var(0) = ifelse(root,animelemtime(6)>=0,14,7)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=720
var(0) = ifelse(root,animelemtime(6)>=0,17,8)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=920
var(0) = ifelse(root,animelemtime(6)>=0,12,6)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=1400
var(0) = ifelse(root,animelemtime(11)>=0,8,6)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=1410
var(0) = ifelse(root,animelemtime(11)>=0,10,8)

[state 15910]
type = varset
trigger1 = time=0&&root,stateno=1420
var(0) = ifelse(root,animelemtime(12)>=0,10,8)

[state 15910]
type = varset
trigger1 = time=0
var(1) = root,stateno

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "Guard Clash = %f decrease point = %d"
params = root,fvar(23), var(0)
ignorehitpause =1

[state 15910]
type = ChangeState
trigger1 = root,numhelper(15905)
value = 15905

[state 15910]
type = ChangeState
trigger1 = root,stateno!=var(1) && time>0 && roundstate>=2
value = 15901

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

;憡庤懁僈乕僪僋儔僢僔儏尭彮
[Statedef 15905]
type    = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
anim = 15910

[state 15910]
type = PosSet
trigger1 = time=0
x = ceil(enemynear,pos X)

[state 15910]
type = varset
trigger1 = time=0
var(3) = 0

[state 15910]
type = varset
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = ifelse((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1,(enemynear,prevstateno!=[4100,4120]),1)
var(3) = 1

;僈乕僪岠壥壒
[State -2,PlaySnd]
type = PlaySnd
trigger1 = time=0&&roundstate=2
trigger1 = (enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1&&(enemynear,prevstateno!=[4100,4120])
trigger1 = root,fvar(23)<ceil((ifelse(enemynear,fvar(37)=1,48-(ceil(enemynear,fvar(13))%2>0)*10-(ceil(enemynear,fvar(13))%4>1)*5,ifelse(enemynear,var(59)=2,38,ifelse(enemynear,var(59)=5,43,48)))-var(0))*1.0/3)
value = 0,1

;僈乕僪岠壥壒
[State -2,PlaySnd]
type = PlaySnd
trigger1 = time=0&&roundstate=2
trigger1 = enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1
trigger1 = root,fvar(23)<ceil((ifelse(enemynear,var(20)=6,33,ifelse(enemynear,var(20)=2,38,ifelse(enemynear,var(20)=5,43,48)))-var(0))*1.0/3)
value = 0,1

;僈乕僪岠壥壒
[State -2,PlaySnd]
type = PlaySnd
trigger1 = time=0&&roundstate=2
trigger1 = enemynear,authorname="H乭"&&enemynear,fvar(39)=1
trigger1 = root,fvar(23)<ceil((ifelse(enemynear,var(43),48-(floor(enemynear,var(50)/10%10)=1)*10-(floor(enemynear,var(50)/100%10)=1)*5,ifelse(enemynear,var(30)=3,38,ifelse(enemynear,var(30)=6,43,48)))-var(0))*1.0/3)
value = 0,1

;僈乕僪岠壥壒
[State -2,PlaySnd]
type = PlaySnd
trigger1 = time=0&&roundstate=2
trigger1 = ((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")
trigger1 = root,fvar(23)<ceil((ifelse(enemynear,var(20)=0,48-(enemynear,var(8)=2)*10-(enemynear,var(7)=2)*5,ifelse(enemynear,var(20)=3,38,ifelse(enemynear,var(20)=6,43,48)))-var(0))*1.0/3)
value = 0,1

;僈乕僪岠壥壒
[State -2,PlaySnd]
type = PlaySnd
trigger1 = time=0&&roundstate=2
trigger1 = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
trigger1 = !(enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1)
trigger1 = !(enemynear,authorname="H乭"&&enemynear,fvar(39)=1)
trigger1 = !((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")
trigger1 = root,fvar(23)<((48-var(0))*1.0/3)
value = 0,1

;岠壥壒
[State -2,PlaySnd]
type = PlaySnd
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
value = 5910,0

;僄僼僃僋僩
[State 6100, Explod]
type = Explod
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
anim = 7700
id = 7700
postype = P1
pos = 0,-65
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
sprpriority = 5
scale = .5,.5

[State 200,HitDef]
type = HitDef
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2&&P2statetype=S
trigger1 = ifelse((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1,(enemynear,prevstateno!=[4100,4120]),1)
attr = S,NT
getpower = 0,0
givepower = 0,0
hitflag = MAF
priority = 9, Hit
pausetime = 16-ifelse(root,hitpausetime>=16,1,root,hitpausetime),15-ifelse(root,hitpausetime>=15,0,root,hitpausetime)
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
ground.type = High
ground.velocity = 0
guard.velocity = 0
air.velocity = 0,0
yaccel = .4
air.hittime=13
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall.recover=0
air.recover=0
p2stateno=15915

[State 200,HitDef]
type = HitDef
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2&&P2statetype=C
trigger1 = ifelse((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1,(enemynear,prevstateno!=[4100,4120]),1)
attr = S,NT
getpower = 0,0
givepower = 0,0
hitflag = MAF
priority = 9, Hit
pausetime = 16-ifelse(root,hitpausetime>=16,1,root,hitpausetime),15-ifelse(root,hitpausetime>=15,0,root,hitpausetime)
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
ground.type = High
ground.velocity = 0
guard.velocity = 0
air.velocity = 0,0
yaccel = .4
air.hittime=13
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall.recover=0
air.recover=0
p2stateno=15925

[State 200,HitDef]
type = HitDef
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2&&P2statetype=A
trigger1 = ifelse((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1,(enemynear,prevstateno!=[4100,4120]),1)
attr = S,NT
getpower = 0,0
givepower = 0,0
hitflag = MAF
priority = 9, Hit
pausetime = 16-ifelse(root,hitpausetime>=16,1,root,hitpausetime),15-ifelse(root,hitpausetime>=15,0,root,hitpausetime)
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
ground.type = High
ground.velocity = 0
guard.velocity = 0
air.velocity = 0,0
yaccel = .4
air.hittime=13
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall.recover=0
air.recover=0
p2stateno=15935

[state 15910]
type = Pause
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
time = 16-ifelse(root,hitpausetime>=16,1,root,hitpausetime)
movetime = 16-ifelse(root,hitpausetime>=16,1,root,hitpausetime)



[state 15910]
type = parentvarset
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = (enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1&&(enemynear,prevstateno!=[4100,4120])
fvar(23) = ifelse(enemynear,fvar(37)=1,48-(ceil(enemynear,fvar(13))%2>0)*10-(ceil(enemynear,fvar(13))%4>1)*5,ifelse(enemynear,var(59)=2,38,ifelse(enemynear,var(59)=5,43,48)))

[state 15910]
type = parentvarset
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1
fvar(23) = ifelse(enemynear,var(20)=6,33,ifelse(enemynear,var(20)=2,38,ifelse(enemynear,var(20)=5,43,48)))

[state 15910]
type = parentvarset
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = enemynear,authorname="H乭"&&enemynear,fvar(39)=1
fvar(23) = ifelse(enemynear,var(43),48-(floor(enemynear,var(50)/10%10)=1)*10-(floor(enemynear,var(50)/100%10)=1)*5,ifelse(enemynear,var(30)=3,38,ifelse(enemynear,var(30)=6,43,48)))

[state 15910]
type = parentvarset
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = ((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")
fvar(23) = ifelse(enemynear,var(20)=0,48-(enemynear,var(8)=2)*10-(enemynear,var(7)=2)*5,ifelse(enemynear,var(20)=3,38,ifelse(enemynear,var(20)=6,43,48)))

[state 15910]
type = parentvarset
trigger1 = time=0&&(root,fvar(23)-ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2)))<0&&roundstate=2
trigger1 = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
trigger1 = !(enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1)
trigger1 = !(enemynear,authorname="H乭"&&enemynear,fvar(39)=1)
trigger1 = !((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")
fvar(23) = 48

[state 15910]
type = parentvaradd
trigger1 = time=0&&!var(3)
trigger1 = ifelse((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1,(enemynear,prevstateno!=[4100,4120]),1)
fvar(23) = -ceil(ifelse(P2statetype=A,1.5,1.0)*(var(0)*1.0/2))

[state 15910]
type = ChangeState
triggerall = IsHelper(15900)
trigger1 = time>0&&(var(1)=[1000,1099])
trigger2 = time>0&&(var(1)=[1400,1420])
trigger3 = time>0 && var(2)<ifelse(var(1)=3020,12,ifelse(var(1)=3010,10,8))&&(var(1)=[3000,3099])
value = 15900

[state 15910]
type = DestroySelf
trigger1 = time>0

;---------------------------------------------------------------------------
;憡庤懁僈乕僪僋儔僢僔儏乮棫偪乯
[Statedef 15910]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0

[state 15910]
type = ChangeAnim
trigger1 = time=0
value = 5002

[state 15910]
type = ChangeAnim
trigger1 = time>0&&animtime=-1&(anim=[5000,5029])
value = anim
elem = AnimElemNo(0)

[state 15910]
type = ChangeAnim
trigger1 = time=37
value = 5007

[state 15910]
type = ChangeAnim
trigger1 = time=0
trigger1 = SelfAnimExist(5910)
value = 5910

[state 15910]
type = ChangeAnim
trigger1 = time=37
trigger1 = SelfAnimExist(5911)
value = 5911

[state 831]
type = PlaySND
trigger1 = time=0&&(authorname="rei"||authorname="gal129")&&fvar(39)=1
value = 5910,1
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="rei"&&name="cvsbalrog"
value = 5000,2
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="rei"&&name="cvsurien"
value = 5950,0
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="warusaki3"&&fvar(39)=1
value = 5940,0
channel = 1

[state 15910]
type = SelfState
trigger1 = time=48
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;憡庤懁僈乕僪僋儔僢僔儏乮棫偪奐巒乯
[Statedef 15915]
type = S
movetype=I
physics = N
ctrl = 0
velset = 0,0
anim = 150

[state 15910]
type = SelfState
trigger1 = (authorname="rei"||authorname="gal129")&&fvar(39)=1
value = 5910

[state 15910]
type = ChangeState
trigger1 = !enemynear,hitpausetime
value = 15910
;---------------------------------------------------------------------------
;憡庤懁僈乕僪僋儔僢僔儏乮孅乯
[Statedef 15920]
type    = C
movetype = I
physics = N
ctrl = 0
velset = 0,0

[state 15910]
type = PosSet
trigger1 = time=0
y = 0

[state 15910]
type = ChangeAnim
trigger1 = time=0
value = 5022

[state 15910]
type = ChangeAnim
trigger1 = time>0&&animtime=-1&(anim=[5000,5029])
value = anim
elem = AnimElemNo(0)

[state 15910]
type = ChangeAnim
trigger1 = time=37
value = 5027

[state 15910]
type = ChangeAnim
trigger1 = time=0
trigger1 = SelfAnimExist(5920)
value = 5920

[state 15910]
type = ChangeAnim
trigger1 = time=37
trigger1 = SelfAnimExist(5921)
value = 5921

[state 831]
type = PlaySND
trigger1 = time=0&&(authorname="rei"||authorname="gal129")&&fvar(39)=1&&prevstateno!=15930
value = 5910,1
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="rei"&&name="cvsbalrog"&&prevstateno!=15930
value = 5000,2
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="rei"&&name="cvsurien"&&prevstateno!=15930
value = 5950,0
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="warusaki3"&&fvar(39)=1&&prevstateno!=15930
value = 5940,0
channel = 1

[state 15910]
type = SelfState
trigger1 = time=48
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;憡庤懁僈乕僪僋儔僢僔儏乮孅奐巒乯
[Statedef 15925]
type    = C
movetype = H
physics = N
ctrl = 0
velset = 0,0
anim = 151

[state 15910]
type = SelfState
trigger1 = (authorname="rei"||authorname="gal129")&&fvar(39)=1
value = 5920

[state 15910]
type = ChangeState
trigger1 = !enemynear,hitpausetime
value = 15920
;---------------------------------------------------------------------------
;憡庤懁僈乕僪僋儔僢僔儏乮嬻拞乯
[Statedef 15930]
type    = A
movetype = I
physics = N
ctrl = 0
velset = 0,0

[state 15910]
type = ChangeAnim
trigger1 = time=0
value = 5002

[state 15910]
type = ChangeAnim
trigger1 = time>0&&animtime=-1&(anim=[5000,5029])
value = anim
elem = AnimElemNo(0)

[state 15910]
type = ChangeAnim
trigger1 = time=0
trigger1 = SelfAnimExist(5930)
value = 5930

[state 831]
type = PlaySND
trigger1 = time=0&&(authorname="rei"||authorname="gal129")&&fvar(39)=1
value = 5910,1
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="rei"&&name="cvsbalrog"
value = 5000,2
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="rei"&&name="cvsurien"
value = 5950,0
channel = 1

[state 831]
type = PlaySND
trigger1 = time=0&&authorname="warusaki3"&&fvar(39)=1
value = 5940,0
channel = 1

[state 15910]
type = VelAdd
trigger1 = 1
y = .5

[state 15910]
type = ChangeState
trigger1 = time>0 && vel Y>0 && Pos Y>=0
value = 15920

;---------------------------------------------------------------------------
;憡庤懁僈乕僪僋儔僢僔儏乮嬻拞奐巒乯
[Statedef 15935]
type    = A
movetype = H
physics = N
ctrl = 0
velset = 0,0
anim = 152

[state 15910]
type = SelfState
trigger1 = (authorname="rei"||authorname="gal129")&&fvar(39)=1
value = 5930

[state 15910]
type = ChangeState
trigger1 = !enemynear,hitpausetime
value = 15930
;---------------------------------------------------------------------------
;帺暘懁僈乕僪僋儔僢僔儏梡乮憡庤懁偺僸僢僩僶僢僋柍岠壔乯
[Statedef 15940]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 15920

[state 15940]
type = NotHitBy
trigger1 = 1
value = SCA

[state 15940]
type = PlayerPush
trigger1 = 1
value = 1

[state 15940]
type = PosSet
trigger1 = time=0
x = floor(enemynear,pos x)

[state 15940]
type = PosAdd
trigger1 = time=0
x = -enemynear,const(size.ground.back)-const(size.ground.front)

[state 15940]
type = VelSet
trigger1 = var(2)
x = ifelse(ifelse(facing=-1,enemynear,screenpos x<var(1),enemynear,screenpos x>var(1)),0,abs(enemynear,pos x-var(0)))

[state 15940]
type = varset
trigger1 = 1
var(0) = floor(enemynear,pos x)

[state 15940]
type = varset
trigger1 = 1
var(1) = floor(enemynear,screenpos x)

[state 15940]
type = varadd
trigger1 = var(2)
var(2) = 1

[state 15940]
type = varset
trigger1 = !enemynear,hitpausetime&&!var(2)
var(2) = 1

[state 15940]
type = PosAdd
trigger1 = var(2)=1
x = 8
persistent=0

[state 15940]
type = PosAdd
trigger1 = var(2)=10
x = 10

[state 15940]
type = destroyself
trigger1 = var(2)>10
trigger2 = var(2)&&enemynear,hitpausetime
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
[Statedef -2]

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "NumExplod = %d  Numhelper = %d  P2bodydist X = %d  P2bodydist Y = %d Dizzies = %d"
params = NumExplod, Numhelper, ceil(P2bodydist X), ceil(P2bodydist Y), var(15)
ignorehitpause =1

;捠忢媄栠傝摦嶌梡
[State 200,Exit]
type = ChangeState
trigger1 = Statetype!=A&&(stateno=[200,799])&&AnimTime = 0&&ctrl
value = ifelse(statetype=C,11,0)
ctrl = 1

;挼傃偙傒僸僢僩敾掕
[State -2, jump_hit]
type = VarSet
trigger1 = (fvar(36)>20||fvar(36)<-26) && p2movetype!=H && (stateno!=[200,499])&&stateno!=230
fvar(36)=0

[State -2, jump_hit]
type = VarSet
triggerall = Vel Y>0 && Pos Y >-60 && !fvar(36)
trigger1 = Statetype=A && movehit=1 && var(7)!=2
fvar(36)=1

[State -2, jump_hit]
type = VarSet
triggerall = Vel Y>0 && Pos Y >-80 && !fvar(36)
trigger1 = Statetype=A && moveguarded=1
trigger2 = stateno=400 && movecontact=1
fvar(36)=-1

[State -2, jump_hit]
type = VarAdd
trigger1 = fvar(36)
fvar(36)=ifelse(fvar(36)<0,-1,1)
ignorehitpause=0

;戝僕儍儞僾張棟
[State -2, crouch]
type = VarSet
trigger1 = (stateno!=0 && (stateno!=[10,12]) && stateno!=40) || (command!="holddown" && (stateno=0 || (stateno=[10,12]) || stateno=40) && time>6) && fvar(2)
fvar(2)=0
ignorehitpause=1

[State -2, crouch]
type = VarSet
trigger1 = command="holddown" && !fvar(38)
fvar(2)=fvar(2)+1
ignorehitpause=1

;憡庤偺儕乕僠敾暿
[State -2, are_you_dhalsim]
type = varset
trigger1 =  enemynear,roundsexisted<=0 && roundstate=0
fvar(34)=0

[State -2, are_you_dhalsim]
type = varset
triggerall = !fvar(34)||(fvar(34)<ceil(P2Bodydist X)&&P2bodydist X>0)
trigger1 = (StateNo=5000||StateNo=5010||StateNo=5020||stateno=150||stateno=152||stateno=154) && time=0 && (prevstateno!=[200,1999])
trigger1 = P2movetype=A && enemynear,time<28
fvar(34)=ceil(P2bodydist X)

;僕儍儞僾倃懍搙
[State -2, jump_x]
type = VelSet
triggerall = Vel X >0 && (Vel Y=[0,const(movement.yaccel)])
trigger1 = Statetype=A && (StateNo=[50,799]) && movetype!=H
x = ifelse(var(7)<=2,const(velocity.jump.fwd.x),const(velocity.runjump.fwd.x))*0.8

[State -2, jump_x]
type = VelSet
triggerall = Vel X <0 && (Vel Y=[0,const(movement.yaccel)])
trigger1 = Statetype=A && (StateNo=[50,799]) && movetype!=H
x = ifelse(var(7)<=2,const(velocity.jump.back.x),const(velocity.runjump.back.x))*0.8

;傔偔傝梡
[State -2, jump_x]
type = PlayerPush
triggerall = Vel X && Vel Y>0 && P2bodydist X<0 && Abs(P2bodydist Y)<45
trigger1 = Statetype=A && (StateNo=[50,799]) && movetype!=H
value = 1

[State -2, jump_x]
type = PlayerPush
triggerall = Vel X && Vel Y>0 && P2bodydist X<0 && Abs(P2bodydist Y)>=45
trigger1 = Statetype=A && (StateNo=[50,799]) && movetype!=H
value = 0
;============================
;EX-Groove

;OPTION
[State -3, Super]
type = Helper
triggerall = !NumHelper(9999)
trigger1 = roundstate=0
id = 9999
name = "option"
pos = 0,250
postype = P1
stateno = 9999
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 9999]
type = varset
trigger1 = fvar(37) && roundsexisted<=0
var(59)=ceil(fvar(12))

[State 9999]
type = LifeAdd
triggerall = fvar(37) && movetype=H && (stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080||stateno=150||stateno=152||stateno=154) && (var(12)-Life)>0
trigger1 = fvar(26)<2000 && Life>(var(12)-Life)
value = ceil((var(12)-Life)*.00005*Abs(2000-fvar(26)))

[State 9999]
type = LifeAdd
triggerall = fvar(37) && movetype=H && (stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080||stateno=150||stateno=152||stateno=154) && time=0
trigger1 = fvar(26)>4000
value = -ceil(gethitvar(damage)*.0003*Abs(4000-fvar(26)))

[State 9999]
type = LifeAdd
triggerall = fvar(37) && (var(12)-Life)>0 && movetype=H && (stateno!=[5000,5099]) && (stateno!=[150,155])
trigger1 = fvar(26)>4000
trigger2 = fvar(26)<2000
value = ifelse(fvar(26)<2000,ceil((var(12)-Life)*.00005*Abs(2000-fvar(26))),-ceil((var(12)-Life)*.0003*Abs(4000-fvar(26))))
;==========groove select=============
;僙儗僋僩梡
[state -2]
type = varrandom
triggerall = time = 0
triggerall = roundstate = 0
trigger1 = roundsexisted <= 0
v = 1
range = 0,99

;僌儖乕償僙儗僋僩
[State -2, groove]
type = VarSet
triggerall = time = 0
triggerall = roundstate = 0
trigger1 = roundsexisted <= 0
var(59) = ifelse((var(1)%10=[0,2]) && var(1)<75,4,ifelse((var(1)%10=[3,6]),0,ifelse((var(1)%10=7 && var(1)<50),2,ifelse(var(1)%10=7 && var(1)>=50,5,ifelse((var(1)%10=[0,2]) && var(1)>=749,3,1)))))

[State -3,EX]
type = varSet
triggerall = time = 0
triggerall = roundstate = 0
trigger1 = roundsexisted <= 0
fvar(37)=var(1)%6=0

;僌儖乕償慖戰夋柺
[state 190, groove]
type = helper
triggerall = time = 0
triggerall = roundstate = 0 && roundsexisted <= 0
triggerall = !NumHelper(8100)
trigger1 = !numpartner
trigger2 = numpartner
trigger2 = !(partner,authorname="warusaki3"&&partner,fvar(39)=1)
trigger2 = !(partner,authorname="Mouser"&&partner,name="Hibiki Takane")
trigger2 = !(ID-partner,ID>0 && partner,authorname="rei"&&partner,fvar(39)=1)
trigger2 = !(ID-partner,ID>0 && partner,authorname="gal129"&&partner,fvar(39)=1)
ID = 8100
stateno = 8100+ifelse(fvar(37)=1,60,var(59)*10)
postype = p1
pos = 0,-180
name = "groove"
ontop = 1
bindtime = -1
scale = 1,1

[state 190, groove]
type = helper
triggerall = time = 0
triggerall = roundstate = 0 && roundsexisted <= 0
triggerall = !NumHelper(8000)
trigger1 = !numpartner
trigger2 = numpartner
trigger2 = !(partner,authorname="warusaki3"&&partner,fvar(39)=1)
trigger2 = !(partner,authorname="Mouser"&&partner,name="Hibiki Takane")
trigger2 = !(ID-partner,ID>0 && partner,authorname="rei"&&partner,fvar(39)=1)
trigger2 = !(ID-partner,ID>0 && partner,authorname="gal129"&&partner,fvar(39)=1)
ID = 8000
stateno = 8000
postype = p1
pos = 0,-140
name = "groove"
ontop = 1
bindtime = -1
scale = 1,1

;------------------僠乕儉儌乕僪梡僌儖乕償愝掕--------------
[State -3,Varset]
type = varSet
triggerall = roundstate=2 && numpartner;仼昁恵乮擖傟側偄偲僄儔乕偑弌傞乯
trigger1 = partner,authorname="warusaki3"&&partner,fvar(39)=1
trigger2 = partner,authorname="Mouser"&&partner,name="Hibiki Takane"
var(59)=partner,var(20)

[State -3,EX]
type = varSet
triggerall = roundstate=2 && numpartner
trigger1 = partner,authorname="warusaki3"&&partner,fvar(39)=1
trigger2 = partner,authorname="Mouser"&&partner,name="Hibiki Takane"
fvar(37)=(partner,var(20)!=[0,5])

[State -3,Varset]
type = varSet
trigger1 = roundstate=2 && numpartner
trigger1 = (ID-partner,ID)>0;仼帺暘偑P3,P4偺応崌
trigger1 = (partner,authorname="rei"||partner,authorname="gal129")&&partner,fvar(39)=1
var(59)=partner,var(59)

[State -3,EX]
type = varSet
triggerall = roundstate=2 && numpartner
trigger1 = (ID-partner,ID)>0;仼帺暘偑P3,P4偺応崌
trigger1 = (partner,authorname="rei"||partner,authorname="gal129")&&partner,fvar(39)=1
fvar(37)=((partner,var(59)!=[0,5])||partner,fvar(37)=1)

;僌儖乕償僎乕僕昞帵
[State 3001, Super]
type = Helper
triggerall = !NumHelper(8200)
triggerall = ifelse(NumHelper(8100),roundstate > 1,ifelse(fvar(37)=1,roundstate>0,1))
trigger1 = !numpartner
trigger2 = numpartner
trigger2 = !(partner,authorname="warusaki3"&&partner,fvar(39)=1)
trigger2 = !(partner,authorname="Mouser"&&partner,name="Hibiki Takane")
trigger2 = !(ID-partner,ID>0 && partner,authorname="rei"&&partner,fvar(39)=1)
trigger2 = !(ID-partner,ID>0 && partner,authorname="gal129"&&partner,fvar(39)=1)
id = 8200
name = "gauge"
pos = 0,250
postype = P1
stateno = 8200+var(59)*10+(var(59)=6)*5
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
facing = facing*ifelse(teamside=1,1,-1)
pausemovetime = 99999
supermovetime = 99999
scale = 1,1

;僈乕僪僋儔僢僔儏僎乕僕昞帵
[State 3001, Super]
type = Helper
triggerall = fvar(20)!=.1&&fvar(20)!=1.1&&!enemynear,numpartner&&!((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
trigger1 = !NumHelper(8400)
id = 8400
name = "guard_gauge"
pos = 0,250
postype = P1
stateno = 8400
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = facing*ifelse(teamside=1,1,-1)
pausemovetime = 99999
supermovetime = 99999

;僈乕僪僋儔僢僔儏僎乕僕昞帵乮憡庤懁乯
[State 3001, Super]
type = Helper
triggerall = fvar(20)!=.1&&fvar(20)!=1.1&&!enemynear,numpartner
trigger1 = !NumHelper(8450)
id = 8450
name = "guard_gauge"
pos = 0,250
postype = P1
stateno = 8450
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = facing*ifelse(teamside=1,-1,1)
pausemovetime = 99999
supermovetime = 99999

;僈乕僪僋儔僢僔儏丒婥愨ON/OFF愝掕夋柺
[state 190, groove]
type = helper
triggerall = roundstate=1&&command="s"
triggerall = !NumHelper(8099)
triggerall = numenemy
triggerall = !(enemy,authorname="rei"&&enemy,fvar(39)=1)
triggerall = !(enemy,authorname="gal129"&&enemy,fvar(39)=1)
trigger1 = !numpartner
trigger2 = numpartner
trigger2 = !(ID-partner,ID>0 && partner,authorname="rei"&&partner,fvar(39)=1)
trigger2 = !(ID-partner,ID>0 && partner,authorname="gal129"&&partner,fvar(39)=1)
ID = 8099
stateno = 8099
postype = p1
pos = 0,-180
name = "on/off"
ontop = 1
bindtime = -1

;=======儃乕僫僗儊僢僙乕僕===========
;侾抜栚桳柍
[State 8500,VelSet]
type = varset
trigger1 = !numHelper(8500)&&!numHelper(8501)&&!numHelper(8502)&&!numHelper(8503)&&!numHelper(8504)&&!numHelper(8505)&&!numHelper(8506)&&!numHelper(8507)&&!numHelper(8508)
var(52)=0

;俀抜栚桳柍
[State 8500,VelSet]
type = varset
trigger1 = !numHelper(8510)&&!numHelper(8511)&&!numHelper(8512)&&!numHelper(8513)&&!numHelper(8514)&&!numHelper(8515)&&!numHelper(8516)&&!numHelper(8517)&&!numHelper(8518)
var(53)=0

[State -2,Varset]
type = VarSet
trigger1 = roundstate=0
var(26)=0

[State -2,Varset]
type = varset
trigger1 = movetype=H && (StateNo!=[120,155]) && (StateNo!=[4100,4120]) && (var(12)-Life)>0
var(26)=-1
ignorehitpause=1

[State -2,Varset]
type = VarSet
triggerall = !var(26)
trigger1 = ((movehit||projhit=1)&&(stateno!=[800,899]))||(stateno=811&&AnimElem = 6)||(stateno=821&&AnimElem = 6)
var(26)=1
ignorehitpause=1

;儃乕僫僗儊僢僙乕僕(First Attack)
[State 3001, Super]
type = Helper
triggerall = !NumHelper(8502)&&!NumHelper(8512)&&!NumHelper(8522)
trigger1 = var(26)=1
id = ifelse(!var(52),8502,ifelse(!var(53),8512,8522))
name = "first_attack"
pos = 0,-200
postype = p1
stateno = ifelse(!var(52),8502,ifelse(!var(53),8512,8522))
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = 1
pausemovetime = 99999
supermovetime = 99999

;儃乕僫僗儊僢僙乕僕(Blocking or JustDefence)
[State 3001, Super]
type = Helper
triggerall = (!NumHelper(8500) && !NumHelper(8510) && !NumHelper(8520))
trigger1 = (StateNo=[4000,4020]) && movetype=I
trigger2 = var(49);var(11)&&(stateno=150||stateno=152||stateno=4120)
id = ifelse(!var(52),8500,ifelse(!var(53),8510,8520))
name = "Blocking/JustDefence"
pos = 0,-200
postype = P1
stateno = ifelse(!var(52),8500,ifelse(!var(53),8510,8520))
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = 1
pausemovetime = 99999
supermovetime = 99999

[State 6100, Explod]
type = Helper
trigger1 = !NumHelper(7550) && (movehit||projhit=1) && (StateNo!=[800,899]) && enemy,movetype=H && var(14) && (stateno!=[1300,1399]) && (stateno!=[3100,3199])
stateNo = 7550
id = 7550
name = "conter_hit"
helpertype = normal
postype = P2
pos = ceil(enemy,const(size.ground.front))+var(40),ceil((Pos Y-enemynear,Pos Y)+var(41)*const(size.yscale))
keyctrl = 0
ownpal = 1
pausemovetime = 9999
Supermovetime = 9999
ignorehitpause = 1

;儃乕僫僗儊僢僙乕僕(Counter Hit)
[State 3001, Super]
type = Helper
triggerall = var(14) && (movehit||projhit=1) && (StateNo!=[800,899]) && enemy,movetype=H && (stateno!=[1300,1399]) && (stateno!=[3100,3199])
trigger1 = !NumHelper(8501)
trigger2 = NumHelper(8501) && !NumHelper(8511)
trigger3 = NumHelper(8501) && NumHelper(8511) && !NumHelper(8521)
id = ifelse(!NumHelper(8502)&&!var(52),8501,ifelse(!NumHelper(8512)&&!var(53),8511,8521))
name = "message_counter_hit"
pos = 0,-200
postype = p1
stateno = ifelse(!NumHelper(8502)&&!var(52),8501,ifelse(!NumHelper(8512)&&!var(53),8511,8521))
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = 1
pausemovetime = 99999
supermovetime = 99999

;僇僂儞僞乕僸僢僩敾掕
[State -2]
type = varSet
trigger1 = P2movetype=A && (stateno!=[800,899]) && (stateno!=[1300,1399]) && (stateno!=[3100,3199])
var(14)=1

;僇僂儞僞乕僸僢僩敾掕
[State -2]
type = varSet
trigger1 = P2movetype!=A && var(14)
var(14)=0

;儃乕僫僗儊僢僙乕僕(Guard Cancel)
[State 3001, Super]
type = Helper
triggerall = (!NumHelper(8503)||(NumHelper(8503) && !NumHelper(8513))||(NumHelper(8503) && NumHelper(8513) && !NumHelper(8523)))
trigger1 = (StateNo=[2000,2200]) && Time=1 && (prevstateno=[150,153])
id = ifelse(!var(52),8503,ifelse(!var(53),8513,8523))
name = "guard_cancel"
pos = 0,-200
postype = p1
stateno = ifelse(!var(52),8503,ifelse(!var(53),8513,8523))
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = 1
pausemovetime = 99999
supermovetime = 99999

;===============儕僶乕僒儖丒僽儘僢僉儞僌僐儅儞僪庴晅
;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
trigger1 = !var(59) && Power>=1000 && (command="hercules_x" || command="hercules_y" || command="hercules_z")
var(24)= ifelse(command="hercules_z"&&Power>=3000,3020,ifelse(Power>=2000 &&(command="hercules_y"||(Power <3000 && command="hercules_z")),3010,3000))

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
trigger1 = (var(59)=1||var(59)=3||var(59)=4) && (Power>=1000||(var(59)=3&&(100*life/const(data.life))<=30)) && (command="hercules_x" || command="hercules_y" || command="hercules_z")
var(24)= ifelse(((var(22)&&var(59)=4)||(var(59)=3&&(100*life/const(data.life))<=30)),3020,3000)

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
trigger1 = ((var(59)=2 && Power>=3000)||(var(59)=5&&var(22))) && (command="hercules_x" || command="hercules_y" || command="hercules_z")
var(24)= 3020

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
trigger1 = !var(59) && Power>=1000 && (command="giga_x" || command="giga_y" || command="giga_z")
var(24)= ifelse(command="giga_z"&&Power>=3000,3120,ifelse(Power>=2000 &&(command="giga_y"||(Power <3000 && command="giga_z")),3110,3100))

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
trigger1 = (var(59)=1||var(59)=3||var(59)=4) && (Power>=1000||(var(59)=3&&(100*life/const(data.life))<=30)) && (command="giga_x" || command="giga_y" || command="giga_z")
var(24)= ifelse(((var(22)&&var(59)=4)||(var(59)=3&&(100*life/const(data.life))<=30)),3120,3100)

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
trigger1 = ((var(59)=2 && Power>=3000)||(var(59)=5&&var(22))) && (command="giga_x" || command="giga_y" || command="giga_z")
var(24)= 3120

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
var(24)= ifelse(command="gaia_z",1320,ifelse(command="gaia_y",1310,ifelse(command="gaia_x",1300,var(24))))

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
var(24)= ifelse(command="mars_z",1420,ifelse(command="mars_y",1410,ifelse(command="mars_x",1400,var(24))))

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
var(24)= ifelse(command="tackle_z",1020,ifelse(command="tackle_y",1010,ifelse(command="tackle_x",1000,var(24))))

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
trigger1 = var(59)=1||var(59)=3||var(59)=4
var(24)= ifelse(command="cz",2400,var(24))

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
trigger1 = (!fvar(37)&&var(59)!=2&&var(59)!=5)||(fvar(37)&&(ceil(fvar(14))%32>15||ceil(fvar(14))%64>31))
var(24)= ifelse(command="ax",900,var(24))

;僐儅儞僪庴晅
[State -2]
type = VarSet
trigger1 = !var(24) && (((StateNo=151 || StateNo=153) && (Time >= (GetHitVar(ctrltime)))) || (Anim=5120 && AnimTime=0)||(stateno=[4000,4010]))
var(24)= ifelse(command="s",195,var(24))

[State -2]
type = VarSet
trigger1 = (ctrl && time=2) || (StateNo=[195,3999]) || (StateNo=[5000,5110])
var(24)= 0

[State -2,VarSet]
type = VarSet
trigger1 = !var(27) && ((PrevStateNo=151 ||PrevStateNo=153 || PrevStateNo=155 || ((PrevStateNo=[5000,5110])&&(stateno!=[4000,4020])) || (PrevStateNo=[5129,5999])) || Anim=5120)
var(27)=1

[State -2,VarSet]
type = VarSet
trigger1 = (StateNo=[200,899]) || (ctrl && time>=2) || (movetype=H&&!ctrl)
var(27)=0-(ctrl)

;儃乕僫僗儊僢僙乕僕(Reversal)
[State 3001, Super]
type = Helper
triggerall = (!NumHelper(8504)||(NumHelper(8504) && !NumHelper(8514))||(NumHelper(8504) && NumHelper(8514) && !NumHelper(8524)))
trigger1 = var(27)=1 && (stateno=195||(StateNo=[900,3999])) && movetype!=H
id = ifelse(!var(52),8504,ifelse(!var(53),8514,8524))
name = "reversal"
pos = 0,-200
postype = p1
stateno = ifelse(!var(52),8504,ifelse(!var(53),8514,8524))
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = 1
pausemovetime = 99999
supermovetime = 99999

;儃乕僫僗儊僢僙乕僕(Tech Bonus)
[State 3001, Super]
type = Helper
;triggerall = (!NumHelper(8505)||(NumHelper(8505) && !NumHelper(8515))||(NumHelper(8505) && NumHelper(8515) && !NumHelper(8525)))
trigger1 = StateNo=831 && Time=1 && movetype=I
trigger2 = Stateno=5201 && Time=1
id = ifelse(!var(52),8505,ifelse(!var(53),8515,8525))
name = "tech_bonus"
pos = 0,-200
postype = p1
stateno = ifelse(!var(52),8505,ifelse(!var(53),8515,8525))
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = 1
pausemovetime = 99999
supermovetime = 99999

[state -2]
type = varset
trigger1 = ((P2stateno=[3000,3999])||(enemynear,hitdefattr=SCA,HA,HT,HP))&&P2movetype=A
fvar(17) = -2

[state -2]
type = varset
trigger1 = ((P2stateno=[1000,2999])||(enemynear,hitdefattr=SCA,SA,ST,SP))&&P2movetype=A
fvar(17) = -1

[state -2]
type = varset
trigger1 = (P2stateno!=[1000,2999])&&(enemynear,hitdefattr!=SCA,SA,ST,SP)&&P2movetype!=H&&fvar(17)=-1
trigger2 = (P2stateno!=[3000,3999])&&(enemynear,hitdefattr!=SCA,HA,HT,HP)&&P2movetype!=H&&fvar(17)=-2
trigger3 = (P2stateno=[0,49])
fvar(17) = 0

;儃乕僫僗儊僢僙乕僕(Finish)
[State 3001, Super]
type = Helper
triggerall = !NumHelper(8506)&&!NumHelper(8516)&&!NumHelper(8526)
triggerall = roundstate=3 && win && !wintime
trigger1 = (stateno!=[1000,1999]) && (stateno!=[3000,3999])
trigger2 = var(56) && var(59)=1; && !var(21)
trigger3 = (stateno=[1000,1999]) && !var(56) && !var(21)
trigger4 = (stateno=[3000,3999]) && !var(56) && !var(21)
id = ifelse(!var(52),8506,ifelse(!var(53),8516,8526))
name = "finish"
pos = 0,-200
postype = p1
stateno = ifelse(!var(52),8506,ifelse(!var(53),8516,8526))
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = 1
pausemovetime = 99999
supermovetime = 99999

;儃乕僫僗儊僢僙乕僕(Guard Clash)
[State 3001, Super]
type = Helper
triggerall = (!NumHelper(8507)||(NumHelper(8507) && !NumHelper(8517))||(NumHelper(8507) && NumHelper(8517) && !NumHelper(8527)))
trigger1 = (stateno=5910||stateno=5920||stateno=5930)&&time=1;var(31)<=-1
trigger2 = (P2stateno=15915||P2stateno=15925||P2stateno=15935)&&P2movetype=I&&enemynear,time=1
id = ifelse(!var(52),8507,ifelse(!var(53),8517,8527))
name = "guard_clash"
pos = 0,-200
postype = p1
stateno = ifelse(!var(52),8507,ifelse(!var(53),8517,8527))
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = 1
pausemovetime = 99999
supermovetime = 99999

;儃乕僫僗儊僢僙乕僕(Hit Count)
[State 3001, Super]
type = Helper
triggerall = var(16)=2&&var(58)!=var(16)
trigger1 = !NumHelper(8508)
trigger2 = (NumHelper(8508)=[1,2])
trigger2 = (Helper(8508),stateno=[8518,8528])
id = 8508
name = "hit count"
pos = 0,-200
postype = p1
stateno = 8508
helpertype = normal
keyctrl = 0
ownpal = 1
facing = 1
pausemovetime = 99999
supermovetime = 99999

[state -2]
type = varset
trigger1 = 1
var(58)=var(16)

;========================幚嫷=========
;~~First Attack(Special moves)~~
[State -2,PlaySnd]
type = PlaySnd
trigger1 = !numExplod(9000)&&numExplod(9003)&&(((stateno=[1000,3999])&&movehit=1)||projhit=1)
value = 9000,3
ignorehitpause=1

[State -3]
type = Explod
trigger1 = !NumExplod(9000)&&numExplod(9003)&&(((stateno=[1000,3999])&&movehit=1)||projhit=1)
anim = 8050
id = 9000
postype = P1
pos = 0,-150
removetime = 190
ignorehitpause=1
pausemovetime=9999
supermovetime=9999

[State -3]
type = RemoveExplod
trigger1 = numExplod(9003)&&(((p2stateno=[1000,3999])&&enemynear,movehit=1)||enemynear,projhit=1)
id = 9003

;~~~堦掕帪娫First Attack傪庢傜側偐偭偨応崌~~
[State -3]
type = Explod
trigger1 = roundstate=2&&!numexplod(9000)&&!numexplod(9001)&&!numexplod(9003)&&!numexplod(9004)&&!numexplod(9005)&&!var(26)
anim = 8050
id = 9003
postype = P1
pos = 0,-150
removetime = 360
ignorehitpause=1

[State -3]
type = Explod
trigger1 = roundstate=2&&!numexplod(9000)&&!numexplod(9001)&&!numexplod(9004)&&!numexplod(9005)&&!var(26)
anim = 8050
id = 9004
postype = P1
pos = 0,-150
removetime = 361
ignorehitpause=1

[State -2,PlaySnd]
type = PlaySnd
trigger1 = roundstate=2&&!numExplod(9000)&&!numexplod(9001)&&!numExplod(9003)&&!numExplod(9005)&&!var(26)
value = 9000,1

[State -3]
type = Explod
trigger1 = roundstate=2&&!numExplod(9000)&&!numexplod(9001)&&!numExplod(9003)&&!numExplod(9005)&&!var(26)
anim = 8050
id = 9000
postype = P1
pos = 0,-150
removetime = 190
ignorehitpause=1
pausemovetime=9999
supermovetime=9999

[State -3]
type = Explod
trigger1 = roundstate=2&&!numExplod(9000)&&!numexplod(9001)&&!numExplod(9003)&&!numExplod(9005)&&!var(26)
anim = 8050
id = 9005
postype = P1
pos = 0,-150
removetime = -1

;~~~Combo~~~
[State -2,PlaySnd]
type = PlaySnd
trigger1 = !numexplod(9000)&&!numExplod(9001)&&!numExplod(9002)&&(var(16)-fvar(18))>=0&&var(16)>=5
value = 9000,2
ignorehitpause=1

[State -3]
type = Explod
trigger1 = !numexplod(9000)&&!numExplod(9001)&&!NumExplod(9002)&&(var(16)-fvar(18))>=0&&var(16)>=5
anim = 8050
id = 9001
postype = P1
pos = 0,-150
removetime = 190
ignorehitpause=1
pausemovetime=9999
supermovetime=9999

[State -2,StopSnd]
type = VarAdd
trigger1 = (var(16)-fvar(18))>=0
fvar(18) = 1
ignorehitpause=1

[State -2,StopSnd]
type = VarSet
trigger1 = roundstate=0
fvar(18)=5
ignorehitpause=1

;~~~Big Damage~~~
[State -2,PlaySnd]
type = PlaySnd
trigger1 = !numexplod(9000)&&!numexplod(9001)&&!numExplod(9002)&&(fvar(19)-P2Life)>252
value = 9000,0
ignorehitpause=1

[State -3]
type = Explod
trigger1 = !numexplod(9000)&&!numexplod(9001)&&!NumExplod(9002)&&(fvar(19)-P2Life)>252
anim = 8050
id = 9002
postype = P1
pos = 0,-150
removetime = 190
ignorehitpause=1
pausemovetime=9999
supermovetime=9999

[State -2,StopSnd]
type = VarSet
trigger1 = (fvar(19)-P2Life)>252 || (P2Life-fvar(19))>0 || (P2movetype!=H&&!(P2movetype=I&&(P2stateno=5300||P2stateno=15300||P2stateno=15340)))
fvar(19)=P2Life
ignorehitpause=1

;==============

;惡拞巭
[State -2,StopSnd]
type = StopSnd
trigger1 = Anim!=950
channel = 10

;惡拞巭
[State -2,StopSnd]
type = StopSnd
trigger1 = Anim!=950
channel = 11

;惡拞巭
[State -2,StopSnd]
type = StopSnd
trigger1 = movetype=H && (prevstateno!=[4100,4120]) && (stateno!=[4100,4120]) && !ctrl && (stateno!=[0,40])
channel = 1

;僈乕僪岠壥壒
[State -2,PlaySnd]
type =PlaySnd
triggerall = Alive && var(31)<15 && !var(11)
triggerall = Time=0 && (StateNo=150||StateNo=152||StateNo=154)
trigger1 = 1
value = 0,1
ingorehitpause=1

;怘傜偄惡
[State -2,PlaySnd]
type =PlaySnd
triggerall = Life>0 && ifelse(GethitVar(animtype)=0&&(stateno=[5000,5099]),random%4=0,ifelse(GethitVar(animtype)=1,random%3=0,Random%2=0))&&!((stateno!=[5000,5099])&&(var(12)-Life)<70)
trigger1 = movetype=H&&(var(12)-Life)>0&&(stateno!=[150,155])&&stateno!=4120
value = 5000,(GethitVar(animtype)=1)+(GethitVar(animtype)>=2||(stateno!=[5000,5999]))*2
channel = 12
ingorehitpause=1

;扏偒偮偗
[State -2,PlaySnd]
type = PlaySnd
trigger1 = Anim=5950 && AnimElem=10;扏偒偮偗
value = 5100,1

;傗傜傟惡
[State -2,PlaySnd]
type =PlaySnd
triggerall = Alive && Random%2=0
trigger1 = Time=1 && StateNo=5110 && prevstateno!=5120
value = 5000,0
channel = 12

[State -2,KO]
type = Varset
trigger1 = alive && var(4)
ignorehitpause = 1
var(4) = 0

[State -2,KO]
type = VarAdd
trigger1 = !alive
;ignorehitpause = 1
var(4) = 1-(var(4)<0)*2

;KO帪傗傜傟惡
[State -2,PlaySnd]
type = PlaySnd
triggerall = !alive && roundstate<=3
trigger1 = var(4)=ifelse(roundstate=3,12,24) || var(4)=ifelse(roundstate=3,-2,-12)
value = 5500+(Anim=5950||(var(4)<0&&Pos Y>=0))*450,0

;嶍傝KO
[State -3]
type = varset
trigger1 = !Alive
trigger1 = prevstateno=120||prevstateno=140 || (prevstateno = [130,132]) || prevstateno = [150,155]
trigger1 = (Stateno = [5000,5050]) && ((enemynear,hitdefattr=SCA,SA,SP,ST)||(enemynear,hitdefattr=SCA,HA,HP,HT)||fvar(10))
var(4) = -1

;嶍傝KO
[State -3]
type = changeState
trigger1 = !Alive
trigger1 = ((prevstateno=120||prevstateno=140)&&Pos Y>=0) || (prevstateno = [130,131]) || prevstateno = [150,153]
trigger1 = (Stateno = [5000,5050]) && ((enemynear,hitdefattr=SCA,SA,SP,ST)||(enemynear,hitdefattr=SCA,HA,HP,HT)||fvar(10))
value = 5950
;========================
;旘傃摴嬶懚嵼敾掕
[State -2, varset]
type = varset
trigger1 = enemynear,numproj=0 && movetype!=H && (stateno!=[4000,4020])
fvar(10) = 0

;僗僷僐儞旘傃摴嬶
[State -2, varset]
type = varset
trigger1 = (enemynear,StateNo=[3000,4999]) && enemynear,numproj=0
fvar(10) = -2

;僗僷僐儞旘傃摴嬶
[State -2, varset]
type = varset
trigger1 = fvar(10)=-2 && (enemynear,StateNo=[3000,4999]) && enemynear,numproj>0
fvar(10) = 2

;僗僷僐儞旘傃摴嬶
[State -2, varset]
type = varset
trigger1 = (enemynear,StateNo=[1000,1999]) && enemynear,numproj=0
fvar(10) = -1

;旘傃摴嬶
[State -2, varset]
type = varset
trigger1 = fvar(10)=-1 && (enemynear,StateNo=[1000,1999]) && enemynear,numproj>0
fvar(10) = 1


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

;=================
;巆憸彍嫀
[State -2,AfterImageTime]
type = AfterImageTime
triggerall = (!var(21) && (StateNo!=[2400,2450])) || (roundState>2 && StateNo=0)
trigger1 = movetype=H && stateno!=40 && stateno!=5110
trigger2 = (StateNo=[0,49]) || (stateno=50&&Vel Y>=0) || stateno=52
trigger3 = StateNo=[100,199]
trigger4 = StateNo=[200,899]
trigger5 = StateNo=[1000,1999]
trigger6 = StateNo=[2000,2999]
time = 0

;僆儕僐儞巆憸彍嫀
[State -2,AfterImageTime]
type = AfterImageTime
trigger1 = movetype=H && stateno!=40 && var(21) && var(59)=1
time = 0

[State -2]
type = PowerSet
trigger1 = movetype=H && stateno!=40 && var(21) && roundState=2 && var(59)=1
value=ifelse(fvar(22),0,ceil(Power/2))
ignorehitpause =1

[State -2]
type = PowerAdd
trigger1 = var(21) && roundState=2 && var(59)=1
value=-8-(Gametime%2=0)
ignorehitpause = 1

;僆儕僐儞
[State -2]
type = VarAdd
trigger1 = var(56)>0 && var(21) && var(59)=1
var(56)=-1
ignorehitpause = 1

;僆儕僐儞
[State -2]
type = VarSet
trigger1 = !var(56) && roundstate=3 && var(21)
trigger2 = roundstate=4 && var(21)
trigger3 = !var(56) && var(21) && roundState=2 && var(59)=1 && var(16)
var(56)=-1
ignorehitpause = 1

;僆儕僐儞
[State -2]
type = VarSet
trigger1 = var(56)=-1 && var(21) && roundState=2 && var(59)=1 && (stateno!=[3000,3999]); && !var(16)
trigger2 = var(56)>0 && !var(21) && (stateno=[0,40]) && var(59)=1
var(56)=0
ignorehitpause = 1

[State -2, 1]
type = PowerSet
trigger1 = (roundState=0 || ((StateNo=[3000,3999])&&time=1)) && (var(21)||var(56)) && var(59)=1
trigger2 = !var(56) && var(21)
value = 0

[State -2, 1]
type = VarSet
trigger1 = ((var(56)<=0&&roundstate=2) || (movetype=H && stateno!=40) || ((StateNo=[3000,3999])&&roundstate=2)) && var(59)=1 && var(21)
var(21) = 0

[State -2, 1]
type = VarSet
triggerall = var(56) && roundstate<=2
trigger1 = (roundState=0 || ((ctrl||(stateno=[0,22]))&&!var(16)) || (movetype=H && stateno!=40) ||Lose) && !var(21) && var(59)=1
trigger2 = var(59)!=1
var(56) = 0

;=====S僌儖僎乕僕MAX======
[State -2,varset]
type = Powerset
trigger1 = var(59)=3 && var(22) && Power>=1000 && stateno!=5150
value = 1000+((100*Life/const(data.life))<=30)*2000
ignorehitpause=1

[State -2,varset]
type = varset
trigger1 = var(59)=3 && Power>=1000 && numhelper(8200) && roundstate<=2 && !var(23)
var(22)=1
ignorehitpause=1

[State 930,varset]
type = varset
trigger1 = var(59)=3 && var(22) && !var(23) && Power>=1000
var(23)=797+1
ignorehitpause = 1

;俽僌儖MAX巆傝帪娫
[State 2500,varAdd]
type = varAdd
trigger1 = var(59)=3 && var(23) && roundstate<=2
var(23)=-1
ignorehitpause = 1

[State -2,varset]
type = Powerset
trigger1 = var(59)=3 && ((!var(22) && var(23)) || (var(22) && !var(23)))&&roundstate>=2
value = 0
ignorehitpause=1

[State -2, 1]
type = VarSet
trigger1 = var(59)=3 && (power=0 || !var(23) || roundState=0 || ((StateNo=[2000,2200])&&time=1) || ((StateNo=[3000,3999])&&time=1&&movetype=A) || stateno=5150)
var(22) = 0
ignorehitpause=1

[State -2, 1]
type = VarSet
trigger1 = var(59)=3 && (power=0 || !var(22) || roundState=0 || ((StateNo=[2000,2200])&&time=1) || ((StateNo=[3000,3999])&&time=1&&movetype=A) || stateno=5150)
var(23) = 0
ignorehitpause=1

;======僷儚乕MAX=======
[State -2, 1]
type = VarSet
trigger1 = var(59)=4 && (!var(23) || roundState<2 || ((StateNo=[3000,3999])&&time=1&&movetype=A) || stateno=5150)
var(22) = 0
ignorehitpause=1

[State -2, 1]
type = VarSet
trigger1 = var(59)=4 && (!var(23) || roundState<2 || ((StateNo=[3000,3999])&&time=1&&movetype=A) || stateno=5150)
var(23) = 0
ignorehitpause=1

[State 2500,varAdd]
type = varAdd
trigger1 = var(59)=4 && var(23) && var(22) && roundstate=2
var(23)=-1
ignorehitpause = 1

;僷儚乕MAX拞揰柵
[State -2, 1]
type = palfx
trigger1 = var(59)=4 && var(22) && gametime%6=0 && roundstate!=4
time = 3
add = 64,64,0
ignorehitpause = 1

;=======搟傝=======
[State 1000, Spark]
type = varadd
trigger1 = roundstate>=2 && var(23)<0 && stateno!=5150
var(23)= 1

[State 1000, Spark]
type = varset
trigger1 = roundstate<2
var(23)=-2

[State -3,PowerSet]
type = PowerSet
trigger1 = var(59)=5 && roundstate>=2 && var(57)>=72 && var(23)>=0
value = 3000

[State -2, 1]
type = VarSet
trigger1 = var(59)=5 && (Power>=3000||var(57)>=72) && roundstate>=2 && var(23)>=0 && stateno!=5150
var(22) = 1

;搟傝僎乕僕
[State -2, 1]
type = VarSet
trigger1 = var(59)=5 && !var(23) && var(22) && (Power>=3000||var(57)>=72) && roundstate>=2
var(23) = 864+1

[state -2,playsnd]
type = PlaySnd
trigger1 = var(59)=5 && var(23)=865 && !numexplod(7630)
value = 8050,0

[State 1000, Spark]
type = Explod
trigger1 = var(59)=5 && var(23)=865 && !numexplod(7630)
Anim = 7630
id = 7630
pos = 0, -60
postype = p1
ownpal = 1
bindtime = 1
pausemovetime = -1
supermove = 1
ignorehitpause = 1
sprpriority = -4
scale = .5,.5

;搟傝僎乕僕MAX巆傝帪娫
[State 2500,varAdd]
type = varAdd
trigger1 = var(59)=5 && var(23)>0 && var(22) && (roundstate=2||var(23)=865)
var(23)=-1
ignorehitpause = 1

[State -2,Varset]
type = varSet
trigger1 = var(59)=5 && (var(22) || (roundsexisted<=0&&roundstate<2) || (Lose&&roundstate=4) || DrawGame || stateno=5150)
var(57)=0

[State -3,PowerSet]
type = PowerSet
trigger1 = var(59)=5 && ((!var(22) && var(23)>0) || (var(22) && !var(23))) && roundstate=2
value = 0
ignorehitpause=1

[State -2, 1]
type = VarSet
trigger1 = var(59)=5 && (!var(23) || roundState<2 || ((StateNo=[3000,3999])&&time=1&&movetype=A) || roundstate=4 || (Power<3000&&roundstate<3) || stateno=5150)
var(22) = 0
ignorehitpause=1

[State -2, 1]
type = VarSet
trigger1 = var(59)=5 && !var(22) && var(23)>0 && (roundState<2 || roundState=3 || ctrl || (roundstate=2&&(stateno!=[3000,3999])) || stateno=5150)
var(23) = 0
ignorehitpause=1

;搟傝僎乕僕MAX拞揰柵
[State -2, 1]
type = palfx
trigger1 = var(59)=5 && var(23)>0 && Power>=3000 && roundstate!=4
time = 1
mul = 255,floor(144-112*Abs(sin(gametime*.01*Pi))),floor(144-112*Abs(sin(gametime*.01*Pi)))
ignorehitpause = 1
persistent = 0

[State -2,Varset]
type = varAdd
trigger1 = var(59)=5 && movetype=H && (StateNo!=[120,155]) && (var(12)-Life)>0 && !var(22) && !var(23) && roundstate=2
var(57)= ceil(ifelse((100*Life/const(data.life))<=25,1.35,ifelse((100*Life/const(data.life))<=50,1.2,1))*(floor((var(12)-Life)/7)+ifelse(fvar(22),0,2)))
ignorehitpause=1

[State -2,Varset]
type = varSet
trigger1 = var(59)=5 && var(57)>72
var(57)= 72
ignorehitpause=1

[State -2,mask1]
type = LifeAdd
trigger1 = var(22) && var(59)=5 && Life>ceil(var(12)-Life) && movetype=H && !fvar(22)
value = ifelse((ceil(var(12)-Life)=[7,10]),ceil(var(12)-Life)-7,ceil((var(12)-Life)*0.225))
ignorehitpause=1

;搟傝僎乕僕憹壛
[State -2,Varset]
type = varSet
trigger1 = 1
var(12) = Life
ignorehitpause=1

;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

;^^^^^^^^^^^^^^Blocking^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

;僽儘僢僉儞僌乮慜乯嵞擖椡庴晅
[State -2]
type = varSet
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0))
trigger1 = var(34)=3 || var(36)>=18
var(34)=0
ignorehitpause = 1

;僽儘僢僉儞僌庴晅帪娫乮慜乯
[State -2]
type = VarAdd
trigger1 = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0))
var(36)=1
ignorehitpause = 1

;僽儘僢僉儞僌乮擖椡奐巒乯
[State -2]
type = varSet
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && !var(34)
trigger1 = command="fwd" && !fvar(38)
trigger2 = Random <= 400 && ifelse(fvar(33)=1,var(54)%3=0,var(54)%7=0) && !(P2BodyDist X >120 && enemynear,numproj>0) && (statetype!=L || (stateno=5120 && time>22)) && statetype!=A && fvar(38) && var(36)
trigger3 = Random <= 650 && ifelse(P2BodyDist X <50,var(54)%5<=2,var(54)%3<=1) && P2BodyDist X <90 && enemynear,Pos Y <-30 && enemynear,Pos Y >-40 && statetype!=A && fvar(38) && var(36)
trigger4 = Random <= ifelse(stateno=4030,400,350) && fvar(38) && Pos Y <ifelse(stateno=4030,0,-40) && vel Y>0 && var(36) && ifelse(stateno=4030,1,time%3=0)
trigger5 = Random <= 650 && fvar(38) && enemynear,Pos Y<-45 && Pos Y <-45 && (vel Y>0||Vel X<=0) && var(36) && ifelse(stateno=4030,time%5<2,time%3=0)
trigger6 = stateno=4030 && time%5=1 && random<=700 && fvar(38)
var(36)=0
ignorehitpause = 1

;僽儘僢僉儞僌乮慜乯
[State -2]
type = varSet
trigger1 = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && !var(34) && command="fwd" && !fvar(38)
var(34)=1
ignorehitpause = 1

;僽儘僢僉儞僌乮庴晅帪娫墑挿/CPU乯
[State -2]
type = varSet
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0))
trigger1 = var(34)=1 && command!="holdfwd" && command!="holddown" && command!="holdup" && command!="holdback" && var(36)<=5 && !fvar(38)
trigger2 = fvar(38) && var(36)=0
var(34)=2
ignorehitpause = 1

;僽儘僢僉儞僌乮棫偪乯
[State -2]
type = HitOverride
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && statetype!=A && (ctrl||Stateno=3||stateno=13||stateno=21||stateno=22)
trigger1 = (var(36)=[5,8]) && var(34)=2 && !fvar(38)
trigger2 = (var(36)=[1,4]) && var(34)=1 && !fvar(38)
trigger3 = var(34)=2 && (var(36)=[1,8]) && fvar(38)
trigger4 = Random <= 750 && P2BodyDist X >120 && enemynear,numproj>0 && !((stateno=[20,22]) && Vel X>0) && (var(34)=[0,2]) && fvar(38)
slot = 0
stateno = 4000
attr = SA, AA, AP
time = 1

;僽儘僢僉儞僌乮棫偪丒懳孅俹峌寕乯
[State -2]
type = HitOverride
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && var(34) && statetype != A && (ctrl||Stateno=3||stateno=13||stateno=21||stateno=22)
triggerall = (enemynear,stateno=[400,429])
trigger1 = (var(36)=[5,8]) && var(34)=2 && !fvar(38)
trigger2 = (var(36)=[1,4]) && var(34)=1 && !fvar(38)
trigger3 = var(34)=2 && (var(36)=[1,8]) && fvar(38)
slot = 1
stateno = 4000
attr = C, AA
time = 1

;僽儘僢僉儞僌乮嬻拞乯
[State -2]
type = HitOverride
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && StateType=A && ctrl && var(7)!=1 && var(7)!=3
trigger1 = (var(36)=[5,7]) && var(34)=2 && !fvar(38)
trigger2 = (var(36)=[1,4]) && var(34)=1 && !fvar(38)
trigger3 = var(34)=2 && (var(36)=[1,6]) && fvar(38)
trigger4 = Random <= 750 && P2BodyDist X >120 && enemynear,numproj>0 && (var(34)=[0,2]) && fvar(38)
slot = 0
stateno = 4020
attr = SCA, AA, AP
time = 1
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

;僽儘僢僉儞僌乮壓乯嵞擖椡庴晅
[State -2]
type = varSet
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0))
trigger1 = var(35)=3 || var(37)>=18
var(35)=0
ignorehitpause = 1

;僽儘僢僉儞僌庴晅帪娫乮壓乯
[State -2]
type = varAdd
trigger1 = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0))
var(37)=1
ignorehitpause = 1

;僽儘僢僉儞僌擖椡奐巒
[State -2]
type = varSet
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && !var(35)
trigger1 = command="down" && command != "holdfwd"&& Command != "holdback" && !fvar(38)
trigger2 = Random <= 400 && ifelse(fvar(33)=1||stateno=5120,var(54)%5<=1,var(54)%7=1) && !(P2BodyDist X >120 && enemynear,numproj>0) && (statetype!=L || (stateno=5120 && time>22)) && fvar(38) && var(37)
var(37)=0
ignorehitpause = 1

;僽儘僢僉儞僌乮壓乯
[State -2]
type = varSet
trigger1 = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && !var(35) && command="down" && command != "holdfwd"&& Command != "holdback" && !fvar(38)
var(35)=1
ignorehitpause = 1

;僽儘僢僉儞僌乮庴晅帪娫墑挿/CPU乯
[State -2]
type = varSet
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0))
trigger1 = var(35)=1 && command!="holdfwd" && command!="holddown" && command!="holdup" && command!="holdback" && var(37)<=5
trigger2 = fvar(38) && var(37)=0
var(35)=2
ignorehitpause = 1

;僽儘僢僉儞僌乮孅乯
[State -2]
type = HitOverride
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && var(35) && statetype != A && (ctrl||Stateno=3||stateno=13||stateno=21||stateno=22)
trigger1 = (var(37)=[5,8]) && var(35)=2 && !fvar(38)
trigger2 = (var(37)=[1,4]) && var(35)=1 && !fvar(38)
trigger3 = (var(37)=[1,8]) && var(35)=2 && fvar(38)
slot = 0
stateno = 4010
attr = C, AA, AP
time = 1

;僽儘僢僉儞僌乮孅丒庛峌寕乯
[State -2]
type = HitOverride
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && var(35) && statetype != A && (ctrl||Stateno=3||stateno=13||stateno=21||stateno=22)
triggerall = ((enemynear,stateno=[200,209])||(enemynear,stateno=[230,239]))
trigger1 = (var(37)=[5,8]) && var(35)=2 && !fvar(38)
trigger2 = (var(37)=[1,4]) && var(35)=1 && !fvar(38)
trigger3 = (var(37)=[1,8]) && var(35)=2 && fvar(38)
slot = 0
stateno = 4010
attr = S, AA
time = 1

;僽儘僢僉儞僌乮孅乛懳忋徃宯昁嶦媄(CVS僉儍儔)乯
[State -2]
type = HitOverride
triggerall = ((var(59)=2 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%2>0)) && var(35) && statetype != A && (ctrl||Stateno=3||stateno=13||stateno=21||stateno=22)
triggerall = ((var(37)=[5-(fvar(38)*4),8]) && var(35)=2) || ((var(37)=[1,4]) && var(35)=1)
trigger1 = enemynear,StateNo=1100&&(enemynear,name="cvsken"||enemynear,name="cvsgouki"||enemynear,name="cvsdan"||enemynear,name="cvsguile"||enemynear,name="cvssakura")
trigger2 = enemynear,StateNo=1100&&(enemynear,name="cvshaohmaru"||enemynear,name="cvsrugal"||enemynear,name="cvsg_rugal"||enemynear,name="cvslilith"||enemynear,name="cvsryo"||enemynear,name="cvsterry"||enemynear,name="cvsyuri")
trigger3 = enemynear,stateno=1300 && (enemynear,name="cvsathena" || enemynear,name="cvsbenimaru")
trigger4 = (enemynear,stateno=[1700,1720]) && enemynear,name="cvsbalrog"
trigger5 = (enemynear,stateno=[1300,1320]) && enemynear,name="cvsblanka"
trigger6 = (enemynear,stateno=1200||enemynear,stateno=1210||enemynear,stateno=1220) && enemynear,name="cvsiori"
trigger7 = (enemynear,stateno=1150||enemynear,stateno=3150)&&enemynear,name="cvsguile"&&enemynear,authorname="rei"
trigger8 = enemynear,stateno=3100&&((enemynear,name="cvsryu"&&enemynear,authorname="Warusaki3")||enemynear,name="cvscammy"||enemynear,name="cvsdan"||enemynear,name="cvsken"||enemynear,name="cvsguile"||enemynear,name="cvsgouki")
trigger9 = (enemynear,stateno=1000||enemynear,stateno=3001) && (enemynear,name="cvscammy"||enemynear,name="cvsjuni")
trigger10 = enemynear,stateno=3100&&(enemynear,name="cvsrugal"||enemynear,name="cvsg_rugal"||(enemynear,name="cvsyuri"&&enemynear,authorname="Warusaki3"))
trigger11 = enemynear,stateno=3000 && enemynear,name="cvsken"
trigger12 = ((((enemynear,stateno=[1200,1220]) || (enemynear,stateno=[1500,1520]))&&enemynear,authorname="gal129" && enemynear,name="cvskim") || (enemynear,authorname="Byakko" && enemynear,name="cvs2kim"&&(enemynear,stateno=1100||enemynear,stateno=1200)))
trigger13 = enemynear,stateno=1800 && enemynear,name="cvskyo"&&enemynear,authorname="Warusaki3"
trigger14 = (enemynear,stateno=1100||enemynear,stateno=1150||enemynear,stateno=3200||enemynear,stateno=3210||enemynear,stateno=3220) && enemynear,name="cvskyosuke"
trigger15 = (enemynear,stateno=1100||enemynear,stateno=1110||enemynear,stateno=3100)&&enemynear,name="Morrigan Aensland" && enemynear,authorname="Phantom.of.the.Server"
trigger16 = (enemynear,stateno=3200||enemynear,stateno=3400) && enemynear,name="cvssakura"&&enemynear,authorname="Warusaki3"
trigger17 = enemynear,stateno=1400 && enemynear,name="cvsrock"
trigger18 = (enemynear,stateno=3200||enemynear,stateno=3400) && enemynear,name="cvssakura"&&enemynear,authorname="Warusaki3"
trigger19 = enemynear,stateno=1200 && enemynear,name="cvsyun"
trigger20 = (enemynear,stateno=1101 && enemynear,name="cvsyuri"&&enemynear,authorname="Warusaki3") || (((enemynear,stateno=[1400,1425])||(enemynear,stateno=[2100,2120])) && enemynear,authorname="Tukemon")
trigger21 = (enemynear,stateno=1100||enemynear,stateno=3500) && enemynear,name="cvsryu"&&enemynear,authorname="Warusaki3"
trigger22 = ((enemynear,stateno=[1100,1120])||enemynear,stateno=2500) && enemynear,name="cvsryu"&&enemynear,authorname="Tukemon"
slot = 0
stateno = 4010
attr = SA, SA,HA
time = 1

[state -1]
type = Assertspecial
triggerall = fvar(38)
trigger1 = (var(36)=[1,12])
trigger2 = (var(37)=[1,12])
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;^^^^^^^^^^^^^^Just Defence^^^^^^^^^^^^^^^^^

;僕儍僗僩僨傿僼僃儞僗偟偨帪偱側偄偙偲傪敾抐
[State -2]
type = varSet
triggerall = ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
trigger1 = var(11) && var(49)
var(49)=0
ignoerhitpause=1

[State -2,JustDefence]
type = VarSet
trigger1 = var(11) && (StateNo=150 || StateNo=152 || StateNo=154 || StateNo=4120) && time=0
var(11) = 0
ignorehitpause = 1

;僕儍僗僩僨傿僼僃儞僗峝捈帪娫
[State 180, 1]
type = VarAdd
trigger1 = var(11) && (StateNo=151 || StateNo=153 || StateNo=4120)
var(11) = -1

[State -2,JustDefence]
type = VarSet
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=1 && var(49)=1&&((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
var(11) = ifelse(GetHitVar(hittime)>0,GetHitVar(hittime),GetHitVar(ctrltime))+(enemy,numproj=0&&fvar(10)>0)*3
ignorehitpause = 1

;嶍傝僟儊乕僕
[State -2,JustDefence]
type = VarSet
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154 || StateNo=4120) && (PrevStateNo!=[4100,4120]) && time=0;gethitvar(damage)>0
var(20) = gethitvar(damage)
ignorehitpause = 1

[State -2,JustDefence]
type = VarSet
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0 && (PrevStateNo!=[4100,4120])
trigger2 = movetype!=H || (stateno=[0,40])
ignorehitpause = 1
var(38) = Life

;僕儍僗僩僨傿僼僃儞僗擖椡
[State -2, 47]
type = VarAdd
trigger1 = ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
var(51) = 1
ignorehitpause = 1

;僕儍僗僩僨傿僼僃儞僗嵞擖椡庴晅
[State -2]
type = varSet
triggerall = ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && (command!="holdback"&&!fvar(38)||fvar(38))
trigger1 = (var(49)=1 || var(51)>12)
trigger2 = var(50)=-1&&(StateNo!=[150,155]) && StateNo!=4120
var(50)=0
ignorehitpause = 1

;僕儍僗僩僨傿僼僃儞僗(楢懕僈乕僪拞柍岠)
[State 180, 1]
type = Varset
triggerall = var(50)!=-1
triggerall = ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
trigger1 = (((StateNo=150||stateno=152||Stateno=154) && time>=1) || ((Stateno=151||stateno=153)||stateno=155) || StateNo=4120)&&!var(11)
var(50) = -1
ignorehitpause=1


;僐儅儞僪庴晅
[State -2, 46]
type = VarSet
triggerall = ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && !var(50)
trigger1 = command = "back" && command!="holddown" && command!="holdup" && !fvar(38)
trigger2 = command = "backdown" && !fvar(38)
var(51) = 0

;僐儅儞僪庴晅(CPU/抧忋)
[State -2, 46]
type = VarSet
triggerall = ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && !var(50)
trigger1 = Random <= 400 && ifelse(fvar(33)=1,var(54)%3=0,var(54)%6=0) && !(P2BodyDist X >120 && enemy,numproj>0) && (statetype!=L || (stateno=5120 && time>24))  && statetype!=A && fvar(38)
trigger2 = Random <= 500 && ifelse(P2BodyDist X <50,var(54)%5<=2,var(54)%3=0) && P2BodyDist X <80 && enemynear,Pos Y <-40 && enemynear,Pos Y >-45 && statetype!=A && fvar(38)
trigger3 = (stateno=[200,799]) && (stateno!=[200,205])&&(stateno!=[230,235]) && stateno!=400&&stateno!=430 && animtime>-2
trigger4 = var(11) && (stateno=151||stateno=153) && (time=[2,5]) && random<=250
trigger5 = (P2movetype!=A||(P2movetype=A&&enemynear,time>(24+floor(P2bodydist X-120)/8))) && enemynear,numproj>0 && inguarddist && P2bodydist X>120 && random<=250
var(51) = 0

;僐儅儞僪庴晅(CPU/嬻拞)
[State -2, 46]
type = VarSet
triggerall = ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && !var(50) && statetype=A
trigger1 = Random <= ifelse(stateno=4130,500,350) && Pos Y <-40 && vel Y>0 && ifelse(stateno=4130,1,time%3=0) && fvar(38)
trigger2 = Random <= 650 && enemynear,Pos Y<-45 && Pos Y <-45 && (vel Y>0||Vel X<=0) && ifelse(stateno=4130,1,time%3=0) && Vel Y>0 && fvar(38)
trigger3 = stateno=4130 && time%5=1 && random<=700 && fvar(38)
var(51) = 0

;僕儍僗僩僨傿僼僃儞僗擖椡
[State -2]
type = varSet
triggerall = ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && !var(50)
trigger1 = command = "back" && command!="holddown" && command!="holdup" && !fvar(38)
trigger2 = command = "backdown" && !fvar(38)
trigger3 = var(51)=0 && fvar(38)
var(50)=1

;庴偗晅偗帪娫愗傟
[State -2]
type = varSet
triggerall = !fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && var(50)=1
trigger1 = command != "holdback" || command="holdup"
var(50)=2

;忋抜僕儍僗僩僨傿僼僃儞僗堏峴
[State -2, 3] 
type = ChangeState
triggerall = !fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
triggerall = stateno = 150
triggerall = Time = 0
trigger1 = var(51) <= 6 && var(50)=1
value = 4100

;忋抜僕儍僗僩僨傿僼僃儞僗堏峴(CPU)
[State -2, 3] 
type = ChangeState
triggerall = fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
triggerall = stateno = 150
triggerall = Time = 0
trigger1 = var(51) <= 6 && var(50)=1
trigger2 = Random <= 850 && P2BodyDist X >120 && (enemy,numproj>0||P2movetype!=A)
value = 4100

;忋抜僕儍僗僩僨傿僼僃儞僗堏峴
[State -2, 3] 
type = HitOverride
triggerall = !fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
triggerall = Life<44 && ctrl && command!="holddown" && (Anim=[120,140]); && (stateno!=[120,140])
trigger1 = var(51) <= 6 && var(50)=1
slot = 0
stateno = 4100
attr = SCA, AA,AP
time = 1

;忋抜僕儍僗僩僨傿僼僃儞僗堏峴(CPU)
[State -2, 3] 
type = HitOverride
triggerall = fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
triggerall = Life<44 && (ctrl||(stateno=[0,22])) && (Anim=[120,140]); && (stateno!=[120,140])
trigger1 = var(51) <= 6 && var(50)=1
trigger2 = Random <= 850 && P2BodyDist X >120 && (enemy,numproj>0||P2movetype!=A)
slot = 0
stateno = 4100
attr = SCA, AA,AP
time = 1

;壓抜僕儍僗僩僨傿僼僃儞僗堏峴
[State -2, 3]
type = ChangeState
triggerall = !fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && var(50)
triggerall = stateno = 152
triggerall = Time = 0
trigger1 = var(51) <= 6 && var(50)=1
value = 4110

;壓抜僕儍僗僩僨傿僼僃儞僗堏峴
[State -2, 3]
type = ChangeState
triggerall = fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && var(50)
triggerall = stateno = 152
triggerall = Time = 0
trigger1 = var(51) <= 6 && var(50)=1
trigger2 = Random <= 850 && P2BodyDist X >120 && (enemy,numproj>0||P2movetype!=A)
value = 4110

;壓抜僕儍僗僩僨傿僼僃儞僗堏峴
[State -2, 3] 
type = HitOverride
triggerall = !fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
triggerall = Life<44 && ctrl && command="holddown" && (Anim=[120,140]); && (stateno!=[120,140])
trigger1 = var(51) <= 6 && !fvar(38) && var(50)=1
slot = 0
stateno = 4110
attr = SCA, AA
time = 1

;壓抜僕儍僗僩僨傿僼僃儞僗堏峴(CPU)
[State -2, 3] 
type = HitOverride
triggerall = fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1))
triggerall = Life<44 && (ctrl||(stateno=[0,22])) && (Anim=[120,140]); && (stateno!=[120,140])
trigger1 = var(51) <= 6 && var(50)=1
trigger2 = Random <= 850 && P2BodyDist X >120 && (enemy,numproj>0||P2movetype!=A)
slot = 0
stateno = 4110
attr = SCA, AA
time = 1

;嬻拞僕儍僗僩僨傿僼僃儞僗堏峴
[State -2]
type = HitOverride
triggerall = !fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && StateType=A && var(7)!=1 && var(7)!=3
triggerall = (ctrl || (StateNo=[4120,4130]))
trigger1 = var(51) <= 6 && var(50)=1
slot = 0
stateno = 4120
attr = SCA, AA, AP
time = 1

;嬻拞僕儍僗僩僨傿僼僃儞僗堏峴(CPU)
[State -2]
type = HitOverride
triggerall = fvar(38) && ((var(59)=5 && !fvar(37))||(fvar(37)&&ceil(fvar(13))%4>1)) && StateType=A && var(7)!=1 && var(7)!=3
triggerall = (ctrl || (StateNo=[4120,4130]))
trigger1 = var(51) <= 6  && var(50)=1
trigger2 = Random <= 850 && P2BodyDist X >120 && (enemy,numproj>0||P2movetype!=A)
slot = 0
stateno = 4120
attr = SCA, AA, AP
time = 1

;^^^^^^^^^^^^^^^^^^^^^^^^^^^
;^^^^^^^^婥愨(Dizzy)^^^^^^^^
[State 5300,PlaySnd]
type = PlaySnd
trigger1 = (var(59)!=[3,5]) && stateno=5300 && (time=1||time%35=0)
value = 5300,0
channel = 9

[State 5300,PlaySnd]
type = StopSnd
trigger1 = (var(59)!=[3,5]) && stateno!=5300
channel = 9

;婥愨
[State 5300,varset]
type = varSet
trigger1 = var(29)=0 && (StateNo!=[5300,5340]) && ((var(30)=2&&!(movetype=H&&(stateno!=[0,49])))||var(30)!=2)
trigger2 = var(30)<=0 && (stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080) && time=0
var(30)=0

[State 5300,varset]
type = varAdd
trigger1 = var(30)<=0
var(30)=-1

[State -2, 1]
type = ChangeState
trigger1 = var(30)=1 && (StateNo=5000 || StateNo=5010 || StateNo=5020 || StateNo=5070||stateno=5080) && Alive
value = 5310
ignorehitpause=1

;婥愨
[State -2, 1]
type = varset
trigger1 = var(29)>=(70+floor(fvar(25))) && (StateNo!=[5300,5340]) && (var(30)!=[1,2])
var(30) = 1
ignorehitpause=1

;婥愨抣
[State -2, 1]
type = varSet
trigger1 = roundstate=0 || var(29)<=0 || (var(30)=2 && stateNo!=5300) || (var(30)!=2 && Anim=5300)
trigger2 = var(30)<=-144
trigger3 = enemynear,numpartner||((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1&&stateno!=5300)||fvar(20)=1||fvar(20)=1.1
var(29) = 0
ignorehitpause=1

;婥愨抣憹壛
[State -2, 1]
type = VarAdd
triggerall = movetype=H && time=0 && (StateNo!=[120,155]) && (enemynear,StateNo!=[3000,4999]) && !(enemynear,HitDefattr=SCA,HA,HT,HP) && (stateno=[5000,5199]) && fvar(10)!=2
trigger1 = !((enemynear,prevstateno=[200,999])&&(P2stateno=[200,999])&&(gethitvar(damage)>=49||P2statetype=A))
trigger1 = !(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1&&enemynear,var(16))
trigger1 = !(enemynear,authorname="H乭"&&enemynear,fvar(39)=1&&enemynear,var(47))
trigger1 = !(((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")&&enemynear,var(30))
trigger1 = !(enemynear,name="cvstodo"&&enemynear,stateno=1201&&enemynear,authorname="warusaki3")
var(29) = floor(GetHitvar(damage)/7)
ignorehitpause=1

[State 1000, Spark]
type = RemoveExplod
trigger1 = Stateno!=[5300,5350]
id = 7950
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;憡庤懁僈乕僪僋儔僢僔儏
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僈乕僪僋儔僢僔儏尭彮抣敾暿
[State 100, Helper]
type = Helper
triggerall = fvar(20)!=.1&&fvar(20)!=1.1&&!enemynear,numpartner && !numhelper(15900)
trigger1 = (stateno=195||(stateno=[200,799])||(stateno=[920,930])||(stateno=[1000,2099])||(stateno=[3000,3999])) && time=1
trigger2 = roundstate=0
id = 15900
stateno=15900
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1
pausemovetime=99999

;僈乕僪僋儔僢僔儏尭彮抣敾暿
[State 100, Helper]
type = Helper
triggerall = moveguarded=1&&!numhelper(15905)
triggerall = fvar(20)!=.1&&fvar(20)!=1.1&&!enemynear,numpartner
trigger1 = numtarget && !((stateno=[3010,3020])&&time=57&&hitpausetime<13&&(var(1)=2||(var(1)=1&&!fvar(11))))
trigger1 = target,time=0 && (target,stateno=150||target,stateno=152||target,stateno=154)
trigger2 = !numtarget && movetype=H
id = 15905+(projguardede=1)*4
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1
pausemovetime=99999

[State -2, 1]
type = varSet
trigger1 = (fvar(24)=-1 && fvar(16)<=-86) || fvar(24)=1 || (P2StateNo=[5000,5099]) || (P2StateNo=[5171,5999]) || fvar(24)=-2
trigger2 = ((P2stateno=[150,155])&&ifelse((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1,(enemynear,prevstateno!=[4100,4120])&&!enemynear,var(11),1))
fvar(16) = 0
ignorehitpause=1

[State -2, 1]
type = varset
trigger1 = (P2StateNo!=[15910,15935]) && fvar(16)<=-86 && !fvar(24) || fvar(24)=-2
trigger2 = !(((stateno=[2000,2200])&&time<7)||((stateno=[3100,3120])&&(time=[3,53+var(1)*2-fvar(11)]))||((stateno=[3000,3020])&&(time=[4,54+var(1)*2-fvar(11)])))&&fvar(24)=-3
fvar(24) = -1
ignorehitpause=1

[State -2, 1]
type = varset
trigger1 = (((stateno=[2000,2200])&&time<7)||((stateno=[3100,3120])&&(time=[3,53+var(1)*2-fvar(11)]))||((stateno=[3000,3020])&&(time=[4,54+var(1)*2-fvar(11)]))) && fvar(24)=-1
fvar(24)=-3

[State -2, 1]
type = varAdd
triggerall = (P2StateNo!=[15910,15935]) && !fvar(24)
triggerall = !(((stateno=[2000,2200])&&time<7)||((stateno=[3100,3120])&&(time=[3,53+var(1)*2-fvar(11)]))||((stateno=[3000,3020])&&(time=[4,54+var(1)*2-fvar(11)])))
trigger1 = (enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1
trigger1 = fvar(23)<ifelse(enemynear,fvar(37),48-ifelse(ceil(enemynear,fvar(13))%2>0,10,ifelse(ceil(enemynear,fvar(13))%4>1,5,0)),ifelse(enemynear,var(59)=2,38,ifelse(enemynear,var(59)=5,43,48)))
trigger2 = enemynear,authorname="H乭"&&enemynear,fvar(39)=1
trigger2 = fvar(23)<ifelse(enemynear,var(43),48-(floor(enemynear,var(50)/10%10)=1)*10-(floor(enemynear,var(50)/100%10)=1)*5,ifelse(enemynear,var(30)=3,38,ifelse(enemynear,var(30)=6,43,48)))
trigger3 = enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1
trigger3 = fvar(23)<ifelse(enemynear,var(20)=6,33,ifelse(enemynear,var(20)=2,38,ifelse(enemynear,var(20)=5,43,48)))
trigger4 = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
trigger4 = !(enemynear,authorname="H乭"&&enemynear,fvar(39)=1)
trigger4 = !(enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1)
trigger4 = fvar(23)<48
fvar(16) = -1
ignorehitpause=1

[State -2, 1]
type = varAdd
triggerall = !(((stateno=[2000,2200])&&time<7)||((stateno=[3100,3120])&&(time=[3,53+var(1)*2-fvar(11)]))||((stateno=[3000,3020])&&(time=[4,54+var(1)*2-fvar(11)])))
trigger1 = (P2StateNo!=[5910,5931]) && fvar(24)=-1 && fvar(16)>=0
fvar(16) = 1
ignorehitpause=1

[state varset]
type = varset
trigger1 = fvar(20)=.1||fvar(20)=1.1||enemynear,numpartner
fvar(23)=100

[State -2, 1]
type = varset
trigger1 = ((P2StateNo=[5000,5099]) || (P2StateNo=[5171,5999]))
trigger2 = ((P2stateno=[150,155])&&ifelse((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1,(enemynear,prevstateno!=[4100,4120])&&!enemynear,var(11),1))
fvar(24) = 0
ignorehitpause=1

;-------------------
;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varAdd
triggerall = P2stateno!=5150
triggerall = (enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1
trigger1 = !((!enemynear,fvar(37)&&(enemynear,var(59)=2||enemynear,var(59)=5)) && !(enemynear,fvar(37)&&(ceil(enemynear,fvar(13))%2>0||ceil(enemynear,fvar(13))%4>1))) && ceil(fvar(16))%26=0
trigger1 = !(enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog")
trigger1 = (fvar(23)=[24,48-1]) && fvar(24)=-1
trigger2 = !((!enemynear,fvar(37)&&(enemynear,var(59)=2||enemynear,var(59)=5)) && !(enemynear,fvar(37)&&(ceil(enemynear,fvar(13))%2>0||ceil(enemynear,fvar(13))%4>1))) && ceil(fvar(16))%26=0
trigger2 = enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog"
trigger2 = (fvar(23)=[16,48-1]) && fvar(24)=-1
trigger3 = ((!enemynear,fvar(37)&&(enemynear,var(59)=2 || enemynear,var(59)=5)) || (enemynear,fvar(37)&&(ceil(enemynear,fvar(13))%2>0||ceil(enemynear,fvar(13))%4>1))) && ceil(fvar(16))%26=0
trigger3 = fvar(23)<ifelse(enemynear,fvar(37),48-(ceil(enemynear,fvar(13))%2>0)*10-(ceil(enemynear,fvar(13))%4>1)*5,ifelse(enemynear,var(59)=2,38,ifelse(enemynear,var(59)=5,43,48))) && fvar(24)=-1
fvar(23) = 1
ignorehitpause=1


;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varAdd
triggerall = P2stateno!=5150
triggerall = enemynear,authorname="H乭"&&enemynear,fvar(39)=1
trigger1 = !(enemynear,var(30)=3||enemynear,var(30)=6||(enemynear,var(43)&&(floor(enemynear,var(50)/10%10)=1||floor(enemynear,var(50)/100%10)=1))) && ceil(fvar(16))%26=0
trigger1 = !(enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog")
trigger1 = (fvar(23)=[24,48-1]) && fvar(24)=-1
trigger2 = !(enemynear,var(30)=3||enemynear,var(30)=6||(enemynear,var(43)&&(floor(enemynear,var(50)/10%10)=1||floor(enemynear,var(50)/100%10)=1))) && ceil(fvar(16))%26=0
trigger2 = enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog"
trigger2 = (fvar(23)=[16,48-1]) && fvar(24)=-1
trigger3 = (enemynear,var(30)=3||enemynear,var(30)=6||(enemynear,var(43)&&(floor(enemynear,var(50)/10%10)=1||floor(enemynear,var(50)/100%10)=1))) && ceil(fvar(16))%26=0
trigger3 = fvar(23)<ifelse(enemynear,var(43),48-(floor(enemynear,var(50)/10%10)=1)*10-(floor(enemynear,var(50)/100%10)=1)*5,ifelse(enemynear,var(30)=3,38,ifelse(enemynear,var(30)=6,43,48))) && fvar(24)=-1
fvar(23) = 1
ignorehitpause=1

;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varAdd
triggerall = P2stateno!=5150
triggerall = enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1
trigger1 = !(enemynear,var(20)=2||(enemynear,var(20)=[5,6])) && ceil(fvar(16))%26=0
trigger1 = !(enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog")
trigger1 = (fvar(23)=[24,48-1]) && fvar(24)=-1
trigger2 = !(enemynear,var(20)=2||(enemynear,var(20)=[5,6])) && ceil(fvar(16))%26=0
trigger2 = enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog"
trigger2 = (fvar(23)=[16,48-1]) && fvar(24)=-1
trigger3 = (enemynear,var(20)=2||(enemynear,var(20)=[5,6])) && ceil(fvar(16))%26=0
trigger3 = fvar(23)<ifelse(enemynear,var(20)=6,33,ifelse(enemynear,var(20)=2,38,ifelse(enemynear,var(20)=5,43,48))) && fvar(24)=-1
fvar(23) = 1
ignorehitpause=1

;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varAdd
triggerall = P2stateno!=5150
triggerall = ((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")
trigger1 = !(enemynear,var(20)=3||enemynear,var(20)=6||(enemynear,var(20)=0&&(enemynear,var(7)=2||enemynear,var(8)=2))) && ceil(fvar(16))%26=0
trigger1 = !(enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog")
trigger1 = (fvar(23)=[24,48-1]) && fvar(24)=-1
trigger2 = !(enemynear,var(20)=3||enemynear,var(20)=6||(enemynear,var(20)=0&&(enemynear,var(7)=2||enemynear,var(8)=2))) && ceil(fvar(16))%26=0
trigger2 = enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog"
trigger2 = (fvar(23)=[16,48-1]) && fvar(24)=-1
trigger3 = (enemynear,var(20)=3||enemynear,var(20)=6||(enemynear,var(20)=0&&(enemynear,var(7)=2||enemynear,var(8)=2))) && ceil(fvar(16))%26=0
trigger3 = fvar(23)<ifelse(enemynear,var(20)=0,48-(enemynear,var(8)=2)*10-(enemynear,var(7)=2)*5,ifelse(enemynear,var(20)=3,38,ifelse(enemynear,var(20)=6,43,48))) && fvar(24)=-1
fvar(23) = 1
ignorehitpause=1


;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varAdd
triggerall = P2stateno!=5150
triggerall = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
triggerall = !(enemynear,authorname="H乭"&&enemynear,fvar(39)=1)
triggerall = !(enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1)
triggerall = !(enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog")
trigger1 = ceil(fvar(16))%26=0
trigger1 = (fvar(23)=[24,48-1]) && fvar(24)=-1
fvar(23) = 1
ignorehitpause=1


;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varAdd
triggerall = P2stateno!=5150
triggerall = !((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
triggerall = !(enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1)
triggerall = enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog"
trigger1 = ceil(fvar(16))%26=0
trigger1 = (fvar(23)=[16,48]) && fvar(24)=-1
fvar(23) = 1
ignorehitpause=1

;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varset
triggerall = P2stateno!=5150
triggerall = (enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1
trigger1 = ((!enemynear,fvar(37)&&(enemynear,var(59)=2||enemynear,var(59)=5)) && !(enemynear,fvar(37)&&(ceil(enemynear,fvar(13))%2>0||ceil(enemynear,fvar(13))%4>1))) && fvar(24)=-1 && ceil(fvar(16))%26=0
fvar(24) = -2
ignorehitpause=1

;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varset
triggerall = P2stateno!=5150
triggerall = enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1
trigger1 = (enemynear,var(20)=2||(enemynear,var(20)=[5,6])) && fvar(24)=-1 && ceil(fvar(16))%26=0
fvar(24) = -2
ignorehitpause=1

;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varset
triggerall = P2stateno!=5150
triggerall = enemynear,authorname="H乭"&&enemynear,fvar(39)=1
trigger1 = (enemynear,var(30)=3||enemynear,var(30)=6||(enemynear,var(43)&&(floor(enemynear,var(50)/10%10)=1||floor(enemynear,var(50)/100%10)=1))) && fvar(24)=-1 && ceil(fvar(16))%26=0
fvar(24) = -2
ignorehitpause=1

;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varset
triggerall = P2stateno!=5150
triggerall = ((enemynear,authorname="N64Mario"&&enemynear,name="zero")||enemynear,authorname="Jesuszilla"||enemynear,authorname=".\/.")
trigger1 = (enemynear,var(20)=3||enemynear,var(20)=6||(enemynear,var(20)=0&&(enemynear,var(7)=2||enemynear,var(8)=2))) && fvar(24)=-1 && ceil(fvar(16))%26=0
fvar(23) = 1
ignorehitpause=1

;夞暅懍搙乮懍偄乯
[State -2, 1]
type = varSet
triggerall =enemynear,name="cvsryu"||enemynear,name="cvsken"||enemynear,name="cvsguile"||enemynear,name="cvsdhalsim"||enemynear,name="cvshonda"||enemynear,name="cvsblanka"||enemynear,name="cvsbison"||enemynear,name="cvssagat"||enemynear,name="cvsdan"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-1
trigger1 = ceil(fvar(16))%22=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%21=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%20=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%19=0 && (fvar(23)=[18,19])
trigger5 = ceil(fvar(16))%18=0 && (fvar(23)=[16,17])
trigger6 = ceil(fvar(16))%17=0 && (fvar(23)=[14,15])
trigger7 = ceil(fvar(16))%16=0 && fvar(23)=13
trigger8 = ceil(fvar(16))%15=0 && fvar(23)=12
trigger9 = ceil(fvar(16))%14=0 && fvar(23)=11
trigger10 = ceil(fvar(16))%13=0 && fvar(23)=10
trigger11 = ceil(fvar(16))%12=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%11=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%10=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%8=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%7=0 && (fvar(23)=[4,5])
trigger16 = ceil(fvar(16))%6=0 && fvar(23)=3
trigger17 = ceil(fvar(16))%5=0 && (fvar(23)=[0,2])
fvar(24) = -2
ignorehitpause=1

;夞暅懍搙乮懍偄乯
[State -2, 1]
type = varAdd
triggerall =enemynear,name="cvsryu"||enemynear,name="cvsken"||enemynear,name="cvsguile"||enemynear,name="cvsdhalsim"||enemynear,name="cvshonda"||enemynear,name="cvsblanka"||enemynear,name="cvsbison"||enemynear,name="cvssagat"||enemynear,name="cvsdan"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-2
trigger1 = ceil(fvar(16))%22=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%21=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%20=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%19=0 && (fvar(23)=[18,19])
trigger5 = ceil(fvar(16))%18=0 && (fvar(23)=[16,17])
trigger6 = ceil(fvar(16))%17=0 && (fvar(23)=[14,15])
trigger7 = ceil(fvar(16))%16=0 && fvar(23)=13
trigger8 = ceil(fvar(16))%15=0 && fvar(23)=12
trigger9 = ceil(fvar(16))%14=0 && fvar(23)=11
trigger10 = ceil(fvar(16))%13=0 && fvar(23)=10
trigger11 = ceil(fvar(16))%12=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%11=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%10=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%8=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%7=0 && (fvar(23)=[4,5])
trigger16 = ceil(fvar(16))%6=0 && fvar(23)=3
trigger17 = ceil(fvar(16))%5=0 && (fvar(23)=[0,2])
fvar(23) = 1
ignorehitpause=1

;夞暅懍搙乮懍偄乯
[State -2, 1]
type = varSet
triggerall =enemynear,name="cvsmorrigan"||enemynear,name="cvseagle"||enemynear,name="cvsmaki"||enemynear,name="cvskyosuke"||enemynear,name="cvsyun"||enemynear,name="cvsrolento"||enemynear,name="cvsgouki"||enemynear,name="cvsbenimaru"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-1
trigger1 = ceil(fvar(16))%22=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%21=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%20=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%19=0 && (fvar(23)=[18,19])
trigger5 = ceil(fvar(16))%18=0 && (fvar(23)=[16,17])
trigger6 = ceil(fvar(16))%17=0 && (fvar(23)=[14,15])
trigger7 = ceil(fvar(16))%16=0 && fvar(23)=13
trigger8 = ceil(fvar(16))%15=0 && fvar(23)=12
trigger9 = ceil(fvar(16))%14=0 && fvar(23)=11
trigger10 = ceil(fvar(16))%13=0 && fvar(23)=10
trigger11 = ceil(fvar(16))%12=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%11=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%10=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%8=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%7=0 && (fvar(23)=[4,5])
trigger16 = ceil(fvar(16))%6=0 && fvar(23)=3
trigger17 = ceil(fvar(16))%5=0 && (fvar(23)=[0,2])
fvar(24) = -2
ignorehitpause=1

;夞暅懍搙乮懍偄乯
[State -2, 1]
type = varAdd
triggerall =enemynear,name="cvsmorrigan"||enemynear,name="cvseagle"||enemynear,name="cvsmaki"||enemynear,name="cvskyosuke"||enemynear,name="cvsyun"||enemynear,name="cvsrolento"||enemynear,name="cvsgouki"||enemynear,name="cvsbenimaru"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-2
trigger1 = ceil(fvar(16))%22=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%21=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%20=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%19=0 && (fvar(23)=[18,19])
trigger5 = ceil(fvar(16))%18=0 && (fvar(23)=[16,17])
trigger6 = ceil(fvar(16))%17=0 && (fvar(23)=[14,15])
trigger7 = ceil(fvar(16))%16=0 && fvar(23)=13
trigger8 = ceil(fvar(16))%15=0 && fvar(23)=12
trigger9 = ceil(fvar(16))%14=0 && fvar(23)=11
trigger10 = ceil(fvar(16))%13=0 && fvar(23)=10
trigger11 = ceil(fvar(16))%12=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%11=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%10=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%8=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%7=0 && (fvar(23)=[4,5])
trigger16 = ceil(fvar(16))%6=0 && fvar(23)=3
trigger17 = ceil(fvar(16))%5=0 && (fvar(23)=[0,2])
fvar(23) = 1
ignorehitpause=1

;夞暅懍搙乮懍偄乯
[State -2, 1]
type = varSet
triggerall =enemynear,name="cvskyo"||enemynear,name="cvsiori"||enemynear,name="cvsyuri"||enemynear,name="cvsking"||enemynear,name="cvsnakoruru"||enemynear,name="cvsjoe"||enemynear,name="cvstodo"||enemynear,name="cvsathena"||enemynear,name="cvsrock"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-1
trigger1 = ceil(fvar(16))%22=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%21=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%20=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%19=0 && (fvar(23)=[18,19])
trigger5 = ceil(fvar(16))%18=0 && (fvar(23)=[16,17])
trigger6 = ceil(fvar(16))%17=0 && (fvar(23)=[14,15])
trigger7 = ceil(fvar(16))%16=0 && fvar(23)=13
trigger8 = ceil(fvar(16))%15=0 && fvar(23)=12
trigger9 = ceil(fvar(16))%14=0 && fvar(23)=11
trigger10 = ceil(fvar(16))%13=0 && fvar(23)=10
trigger11 = ceil(fvar(16))%12=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%11=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%10=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%8=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%7=0 && (fvar(23)=[4,5])
trigger16 = ceil(fvar(16))%6=0 && fvar(23)=3
trigger17 = ceil(fvar(16))%5=0 && (fvar(23)=[0,2])
fvar(24) = -2
ignorehitpause=1

;夞暅懍搙乮懍偄乯
[State -2, 1]
type = varAdd
triggerall =enemynear,name="cvskyo"||enemynear,name="cvsiori"||enemynear,name="cvsyuri"||enemynear,name="cvsking"||enemynear,name="cvsnakoruru"||enemynear,name="cvsjoe"||enemynear,name="cvstodo"||enemynear,name="cvsathena"||enemynear,name="cvsrock"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-2
trigger1 = ceil(fvar(16))%22=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%21=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%20=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%19=0 && (fvar(23)=[18,19])
trigger5 = ceil(fvar(16))%18=0 && (fvar(23)=[16,17])
trigger6 = ceil(fvar(16))%17=0 && (fvar(23)=[14,15])
trigger7 = ceil(fvar(16))%16=0 && fvar(23)=13
trigger8 = ceil(fvar(16))%15=0 && fvar(23)=12
trigger9 = ceil(fvar(16))%14=0 && fvar(23)=11
trigger10 = ceil(fvar(16))%13=0 && fvar(23)=10
trigger11 = ceil(fvar(16))%12=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%11=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%10=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%8=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%7=0 && (fvar(23)=[4,5])
trigger16 = ceil(fvar(16))%6=0 && fvar(23)=3
trigger17 = ceil(fvar(16))%5=0 && (fvar(23)=[0,2])
fvar(23) = 1
ignorehitpause=1


;夞暅懍搙乮懍偄乯
[State -2, 1]
type = varSet
triggerall =enemynear,name="cvshaohmaru"||enemynear,name="cvshibiki"||enemynear,name="cvschang"||enemynear,name="cvsryu_ex"||enemynear,name="cvsken_ex"||enemynear,name="cvsgouki_ex"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-1
trigger1 = ceil(fvar(16))%22=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%21=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%20=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%19=0 && (fvar(23)=[18,19])
trigger5 = ceil(fvar(16))%18=0 && (fvar(23)=[16,17])
trigger6 = ceil(fvar(16))%17=0 && (fvar(23)=[14,15])
trigger7 = ceil(fvar(16))%16=0 && fvar(23)=13
trigger8 = ceil(fvar(16))%15=0 && fvar(23)=12
trigger9 = ceil(fvar(16))%14=0 && fvar(23)=11
trigger10 = ceil(fvar(16))%13=0 && fvar(23)=10
trigger11 = ceil(fvar(16))%12=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%11=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%10=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%8=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%7=0 && (fvar(23)=[4,5])
trigger16 = ceil(fvar(16))%6=0 && fvar(23)=3
trigger17 = ceil(fvar(16))%5=0 && (fvar(23)=[0,2])
fvar(24) = -2
ignorehitpause=1

;夞暅懍搙乮懍偄乯
[State -2, 1]
type = varAdd
triggerall =enemynear,name="cvshaohmaru"||enemynear,name="cvshibiki"||enemynear,name="cvschang"||enemynear,name="cvsryu_ex"||enemynear,name="cvsken_ex"||enemynear,name="cvsgouki_ex"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-2
trigger1 = ceil(fvar(16))%22=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%21=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%20=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%19=0 && (fvar(23)=[18,19])
trigger5 = ceil(fvar(16))%18=0 && (fvar(23)=[16,17])
trigger6 = ceil(fvar(16))%17=0 && (fvar(23)=[14,15])
trigger7 = ceil(fvar(16))%16=0 && fvar(23)=13
trigger8 = ceil(fvar(16))%15=0 && fvar(23)=12
trigger9 = ceil(fvar(16))%14=0 && fvar(23)=11
trigger10 = ceil(fvar(16))%13=0 && fvar(23)=10
trigger11 = ceil(fvar(16))%12=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%11=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%10=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%8=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%7=0 && (fvar(23)=[4,5])
trigger16 = ceil(fvar(16))%6=0 && fvar(23)=3
trigger17 = ceil(fvar(16))%5=0 && (fvar(23)=[0,2])
fvar(23) = 1
ignorehitpause=1

;夞暅懍搙乮晛捠乯
[State -2, 1]
type = varSet
triggerall=!(enemynear,name="cvsryu"||enemynear,name="cvsken"||enemynear,name="cvsguile"||enemynear,name="cvsdhalsim"||enemynear,name="cvshonda"||enemynear,name="cvsblanka"||enemynear,name="cvsbison"||enemynear,name="cvssagat"||enemynear,name="cvsdan")
triggerall =!(enemynear,name="cvsmorrigan"||enemynear,name="cvseagle"||enemynear,name="cvsmaki"||enemynear,name="cvskyosuke"||enemynear,name="cvsyun"||enemynear,name="cvsrolento"||enemynear,name="cvsgouki"||enemynear,name="cvsbenimaru")
triggerall =!(enemynear,name="cvskyo"||enemynear,name="cvsiori"||enemynear,name="cvsyuri"||enemynear,name="cvsking"||enemynear,name="cvsnakoruru"||enemynear,name="cvsjoe"||enemynear,name="cvstodo"||enemynear,name="cvsathena"||enemynear,name="cvsrock")
triggerall =!(enemynear,name="cvshaohmaru"||enemynear,name="cvshibiki"||enemynear,name="cvschang"||enemynear,name="cvsryu_ex"||enemynear,name="cvsken_ex"||enemynear,name="cvsgouki_ex")
triggerall = !(enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog")
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-1
trigger1 = ceil(fvar(16))%26=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%25=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%24=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%23=0 && fvar(23)=19
trigger5 = ceil(fvar(16))%22=0 && fvar(23)=18
trigger6 = ceil(fvar(16))%21=0 && fvar(23)=17
trigger7 = ceil(fvar(16))%20=0 && fvar(23)=16
trigger8 = ceil(fvar(16))%19=0 && (fvar(23)=[14,15])
trigger9 = ceil(fvar(16))%18=0 && (fvar(23)=[12,13])
trigger10 = ceil(fvar(16))%17=0 && (fvar(23)=[10,11])
trigger11 = ceil(fvar(16))%16=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%15=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%14=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%13=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%11=0 && fvar(23)=5
trigger16 = ceil(fvar(16))%10=0 && fvar(23)=4
trigger17 = ceil(fvar(16))%8=0 && fvar(23)=3
trigger18 = ceil(fvar(16))%7=0 && fvar(23)=2
trigger19 = ceil(fvar(16))%6=0 && fvar(23)=1
trigger20 = ceil(fvar(16))%5=0 && fvar(23)=0
fvar(24) = -2
ignorehitpause=1

;夞暅懍搙乮晛捠乯
[State -2, 1]
type = varAdd
triggerall=!(enemynear,name="cvsryu"||enemynear,name="cvsken"||enemynear,name="cvsguile"||enemynear,name="cvsdhalsim"||enemynear,name="cvshonda"||enemynear,name="cvsblanka"||enemynear,name="cvsbison"||enemynear,name="cvssagat"||enemynear,name="cvsdan")
triggerall =!(enemynear,name="cvsmorrigan"||enemynear,name="cvseagle"||enemynear,name="cvsmaki"||enemynear,name="cvskyosuke"||enemynear,name="cvsyun"||enemynear,name="cvsrolento"||enemynear,name="cvsgouki"||enemynear,name="cvsbenimaru")
triggerall =!(enemynear,name="cvskyo"||enemynear,name="cvsiori"||enemynear,name="cvsyuri"||enemynear,name="cvsking"||enemynear,name="cvsnakoruru"||enemynear,name="cvsjoe"||enemynear,name="cvstodo"||enemynear,name="cvsathena"||enemynear,name="cvsrock")
triggerall =!(enemynear,name="cvshaohmaru"||enemynear,name="cvshibiki"||enemynear,name="cvschang"||enemynear,name="cvsryu_ex"||enemynear,name="cvsken_ex"||enemynear,name="cvsgouki_ex")
triggerall = !(enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog")
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-2
trigger1 = ceil(fvar(16))%26=0 && fvar(23)=23
trigger2 = ceil(fvar(16))%25=0 && (fvar(23)=[21,22])
trigger3 = ceil(fvar(16))%24=0 && fvar(23)=20
trigger4 = ceil(fvar(16))%23=0 && fvar(23)=19
trigger5 = ceil(fvar(16))%22=0 && fvar(23)=18
trigger6 = ceil(fvar(16))%21=0 && fvar(23)=17
trigger7 = ceil(fvar(16))%20=0 && fvar(23)=16
trigger8 = ceil(fvar(16))%19=0 && (fvar(23)=[14,15])
trigger9 = ceil(fvar(16))%18=0 && (fvar(23)=[12,13])
trigger10 = ceil(fvar(16))%17=0 && (fvar(23)=[10,11])
trigger11 = ceil(fvar(16))%16=0 && fvar(23)=9
trigger12 = ceil(fvar(16))%15=0 && fvar(23)=8
trigger13 = ceil(fvar(16))%14=0 && fvar(23)=7
trigger14 = ceil(fvar(16))%13=0 && fvar(23)=6
trigger15 = ceil(fvar(16))%11=0 && fvar(23)=5
trigger16 = ceil(fvar(16))%10=0 && fvar(23)=4
trigger17 = ceil(fvar(16))%8=0 && fvar(23)=3
trigger18 = ceil(fvar(16))%7=0 && fvar(23)=2
trigger19 = ceil(fvar(16))%6=0 && fvar(23)=1
trigger20 = ceil(fvar(16))%5=0 && fvar(23)=0
fvar(23) = 1
ignorehitpause=1

;夞暅懍搙乮抶乯
[State -2, 1]
type = varSet
triggerall = enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-1
trigger1 = ceil(fvar(16))%25=0 && fvar(23)=15
trigger2 = ceil(fvar(16))%24=0 && fvar(23)=14
trigger3 = ceil(fvar(16))%23=0 && fvar(23)=13
trigger4 = ceil(fvar(16))%22=0 && fvar(23)=12
trigger5 = ceil(fvar(16))%21=0 && fvar(23)=11
trigger6 = ceil(fvar(16))%20=0 && fvar(23)=10
trigger7 = ceil(fvar(16))%19=0 && fvar(23)=9
trigger8 = ceil(fvar(16))%18=0 && fvar(23)=8
trigger9 = ceil(fvar(16))%17=0 && fvar(23)=7
trigger10 = ceil(fvar(16))%16=0 && fvar(23)=6
trigger11 = ceil(fvar(16))%15=0 && fvar(23)=5
trigger12 = ceil(fvar(16))%14=0 && fvar(23)=4
trigger13 = ceil(fvar(16))%13=0 && fvar(23)=3
trigger14 = ceil(fvar(16))%11=0 && fvar(23)=2
trigger15 = ceil(fvar(16))%9=0 && fvar(23)=1
trigger16 = ceil(fvar(16))%5=0 && fvar(23)=0
fvar(24) = -2
ignorehitpause=1

;夞暅懍搙乮抶乯
[State -2, 1]
type = varAdd
triggerall = enemynear,name="cvszangief"||enemynear,name="cvsraiden"||enemynear,name="cvsbalrog"
triggerall = P2stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && fvar(24)=-2
trigger1 = ceil(fvar(16))%25=0 && fvar(23)=15
trigger2 = ceil(fvar(16))%24=0 && fvar(23)=14
trigger3 = ceil(fvar(16))%23=0 && fvar(23)=13
trigger4 = ceil(fvar(16))%22=0 && fvar(23)=12
trigger5 = ceil(fvar(16))%21=0 && fvar(23)=11
trigger6 = ceil(fvar(16))%20=0 && fvar(23)=10
trigger7 = ceil(fvar(16))%19=0 && fvar(23)=9
trigger8 = ceil(fvar(16))%18=0 && fvar(23)=8
trigger9 = ceil(fvar(16))%17=0 && fvar(23)=7
trigger10 = ceil(fvar(16))%16=0 && fvar(23)=6
trigger11 = ceil(fvar(16))%15=0 && fvar(23)=5
trigger12 = ceil(fvar(16))%14=0 && fvar(23)=4
trigger13 = ceil(fvar(16))%13=0 && fvar(23)=3
trigger14 = ceil(fvar(16))%11=0 && fvar(23)=2
trigger15 = ceil(fvar(16))%9=0 && fvar(23)=1
trigger16 = ceil(fvar(16))%5=0 && fvar(23)=0
fvar(23) = 1
ignorehitpause=1
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;僈乕僪僋儔僢僔儏
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;俀僸僢僩偺捠忢媄敾暿
[State -2, 1]
type = varset
trigger1 = (StateNo!=[150,155]) && (StateNo!=[4100,4120])
var(10) = -1

[State -2, 2]
type = varset
trigger1 = var(10)<0 && (StateNo=150 || StateNo=152 || stateNo=154) && time=1
var(10) = enemynear,StateNo
ignorehitpause=1

[State -2, 1]
type = varset
trigger1 = (StateNo!=[150,155]) && (StateNo!=[4100,4120])
var(9) = enemynear,Time

[State -2, 2]
type = varset
trigger1 = var(10)>0 && (StateNo=150 || StateNo=152 || stateNo=154) && time=0
var(10) = var(10)-(enemynear,StateNo)
ignorehitpause=1

[State -2, 2]
type = varset
trigger1 = var(10)=0 && enemynear,Time<=var(9)
var(10) = -1
ignorehitpause=1
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僈乕僪僋儔僢僔儏懴媣抣
[State -2, 1]
type = varSet
trigger1 = roundstate<2 || (roundstate=2 && var(31)>ifelse(fvar(37),48-(ceil(fvar(13))%2>0)*10-(ceil(fvar(13))%4>1)*5,ifelse(var(59)=2,38,ifelse(var(59)=5,43,48)))) || var(32)=1
var(31) = ifelse(fvar(37),48-(ceil(fvar(13))%2>0)*10-(ceil(fvar(13))%4>1)*5,ifelse(var(59)=2,38,ifelse(var(59)=5,43,48)))

[State -2, 1]
type = varSet
triggerall = var(33)
trigger1 = (var(32)=-1 && var(33)<=-86) || var(32)=1 || ((StateNo=[150,155])&&!var(11)) || (StateNo=[5000,5099]) || (StateNo=[5171,5999]) || var(32)=-2
var(33) = 0
ignorehitpause=1

[State -2, 1]
type = varset
trigger1 = (StateNo!=[5910,5931]) && var(33)<=-86 && !var(32) || var(32)=-2
var(32) = -1
ignorehitpause=1

[State -2, 1]
type = varAdd
trigger1 = (StateNo!=[5910,5931]) && !var(32) && var(31)<ifelse(fvar(37),48-ifelse(ceil(fvar(13))%2>0,10,ifelse(ceil(fvar(13))%4>1,5,0)),ifelse(var(59)=2,38,ifelse(var(59)=5,43,48)))
var(33) = -1
ignorehitpause=1

[State -2, 1]
type = varAdd
trigger1 = (StateNo!=[5910,5931]) && var(32)=-1 && var(33)>=0
var(33) = 1
ignorehitpause=1

;僈乕僪僋儔僢僔儏懴媣抣尭彮
[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = GetHitvar(damage)>0
trigger1 = (enemynear,StateNo=[3000,3999]) || (enemynear,hitdefattr=SCA,HA,HT,HP) ||fvar(10)=2
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = -1

;Decrease amout of Guard Clash(enemy custom combo)
;僈乕僪僋儔僢僔儏懴媣抣尭彮(憡庤僆儕僐儞帪丒僠僃乕儞僐儞儃帪)
[State -2, 1]
type = VarAdd
triggerall = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
triggerall = !(enemynear,name="cvsrolento"&&(enemynear,StateNo=[1050,1070])&&!gethitvar(damage))
trigger1 = enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1&&enemynear,var(18)
trigger2 = enemynear,authorname="H乭" && enemynear,var(30)=2 && enemynear,fvar(8)
trigger3 = (enemynear,authorname="rei"||enemynear,authorname="gal129") && enemynear,var(56)
trigger4 = (enemynear,prevstateno=[200,999])&&(P2StateNo=[200,999])&&(gethitvar(ctrltime)>12||P2statetype=A)
var(31) = -1

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = GetHitvar(damage)>0 && (!(enemynear,name="cvssakura"&&enemynear,StateNo=1100)&&!(enemynear,name="cvsbalrog"&&(enemynear,StateNo=1040)))
trigger1 = (enemynear,name!="cvstodo" || (enemynear,name="cvstodo"&&(enemynear,StateNo!=[1000,1250])))
trigger1 = !(enemynear,name="cvsblanka"&&(enemynear,stateno=[1010,1020])) && !(enemynear,name="cvsvega"&&enemynear,StateNo=1000)
trigger1 = !(enemynear,name="cvschang"&&(enemynear,StateNo=[1000,1020])) && !(enemynear,name="cvsrolento"&&(enemynear,StateNo=[1050,1070]))
trigger1 = !(((enemynear,name="cvsRaiden"||(enemynear,name="Raiden"&&enemynear,authorname="H乭"))&&enemynear,StateNo=1501&&gethitvar(damage)>=30))
trigger1 = !(enemynear,name="cvsnool"&&(enemynear,stateNo=[1410,1420]))
trigger1 = (enemynear,StateNo!=[200,799])&&(enemynear,StateNo!=[3000,3999])&& fvar(10)!=2 && !(enemynear,hitdefattr=SCA,HA,HT,HP)
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = -ceil((ifelse((GetHitVar(damage)<8),5,ifelse(GetHitvar(damage)>=18,18,(6*GetHitvar(damage)/7)))/2)*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = GetHitvar(damage)>0&&enemynear,name="cvsblanka"
trigger1 = enemynear,StateNo=[1010,1020]
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = -ceil((ifelse(enemynear,stateno=1010,4,2))*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = GetHitvar(damage)>0&&enemynear,name="cvstodo"
trigger1 = enemynear,StateNo=[1050,1250]
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = -ceil((4/2)*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = !enemynear,var(21)
trigger1 = GetHitvar(damage)>0 && ((enemynear,name="cvssakura"&&enemynear,StateNo=1100)||(enemynear,name="cvsbalrog"&&(enemynear,StateNo=1040)))
var(31) = -ceil((ifelse((GetHitVar(damage)<8),2,(6*GetHitvar(damage)/7))/2)*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = !enemynear,var(21)
trigger1 = GetHitvar(damage)>0 && ((enemynear,name="cvsvega"&&enemynear,StateNo=1000)||(enemynear,name="cvsrolento"&&(enemynear,StateNo=[1050,1070])))
var(31) = -ceil(3*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = !enemynear,var(21)
trigger1 = GetHitvar(damage)>0 && enemynear,name="cvschang"
trigger1 = enemynear,StateNo=[1000,1199]
var(31) = -ceil(2*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = enemynear,fvar(8)<=0
trigger1 = GetHitvar(damage)>0 && (((enemynear,name="cvsRaiden"||(enemynear,name="Raiden"&&enemynear,authorname="H乭"))&&enemynear,StateNo=1501&&gethitvar(damage)>=30))
var(31) = -ceil(20*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = !enemynear,var(21)
trigger1 = GetHitvar(damage)>0 && (enemynear,name="cvsnool"&&(enemynear,StateNo=[1410,1420]))
var(31) = -ceil(ifelse(enemynear,stateno=1420,3,4)*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = (GetHitvar(ctrltime)>=17&&statetype=A)||(abs(gethitvar(xvel))>8.25&&statetype!=A)
trigger1 = (P2StateNo=[200,999])&&(enemynear,prevstateno!=[200,999])
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = ceil((ifelse(var(10)=0,ifelse(abs(P2BodyDist X) >35,6,7),0)/2)*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = (GetHitvar(ctrltime)>=17&&statetype=A)||(abs(gethitvar(xvel))>8.25&&statetype!=A)
trigger1 = (P2StateNo=[200,999])&&(enemynear,prevstateno!=[200,999])
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = -ceil((ifelse(var(10)=0,ifelse(abs(P2BodyDist X) >35,6,7),ifelse(abs(P2BodyDist X) >35,12,14))/2)*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = ((GetHitvar(ctrltime)=[13,16])&&statetype=A)||((((gethitvar(xvel)=[6.75,8.25])||(gethitvar(xvel)=[-8.25,-6.25])))&&statetype!=A)
trigger1 = (P2StateNo=[200,999])&&(enemynear,prevstateno!=[200,999])
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = ceil((ifelse(var(10)=0,8,0)/2)*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = ((GetHitvar(ctrltime)=[13,16])&&statetype=A)||((((gethitvar(xvel)=[6.75,8.25])||(gethitvar(xvel)=[-8.25,-6.25])))&&statetype!=A)
trigger1 = (P2StateNo=[200,999])&&(enemynear,prevstateno!=[200,999])
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = -ceil((8/2)*ifelse(StateNo=154,1.5,1))

[State -2, 1]
type = VarAdd
trigger1 = (StateNo=150 || StateNo=152 || StateNo=154) && time=0
trigger1 = (GetHitvar(ctrltime)<=12&&statetype=A)||(abs(gethitvar(xvel))<6.75&&statetype!=A)
trigger1 = (P2StateNo=[200,999])&&!((gethitvar(ctrltime)>12||P2statetype=A)&&(enemynear,prevstateno=[200,999]))
trigger1 = ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(18)=0,ifelse(enemynear,authorname="H乭",((enemynear,var(30)=2 && enemynear,fvar(8)<=0) || enemynear,var(30)!=2),1))
trigger1 = ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",((enemynear,var(21)=0 && enemynear,var(59)=1)||enemynear,var(59)!=1),1)
var(31) = -ceil((4/2)*ifelse(StateNo=154,1.5,1))

[state varset]
type = varset
trigger1 = fvar(20)=.1||fvar(20)=1.1||enemynear,numpartner||((enemynear,authorname="rei"||enemynear,authorname="gal129")&&enemynear,fvar(39)=1)
var(31)=100

;夋柺抂僸僢僩僶僢僋柍岠壔僿儖僷乕
[State -2, 1]
type = Helper
trigger1 = var(31)<=-1 && (StateNo=150 || StateNo=152 || StateNo=154)&&backedgebodydist<=5
id = 15940
stateno=15940
name="guard_clash"
pos = 0,0
postype = p2
ignorehitpause = 1
persistent = 1

;僈乕僪僋儔僢僔儏(hitpause屻)
[State -2, 1]
type = ChangeState
trigger1 = var(31)<=-1 && (StateNo=150 || StateNo=152 || StateNo=154)
value = ifelse(StateNo=154,5930,ifelse(StateNo=152,5920,5910))
ignorehitpause = 0
persistent = 1

[State -2, 1]
type = varset
trigger1 = (StateNo!=[5910,5931]) && ((StateNo=[5000,5099]) || (StateNo=[5171,5999]) || ((StateNo=[150,155])&&!var(11)))
var(32) = 0
ignorehitpause=1
;-------------------
;僈乕僪僋儔僢僔儏抣夞暅
[State -2, 1]
type = varAdd
triggerall = stateno!=5150
trigger1 = !((!fvar(37)&&(var(59)=2||var(59)=5)) && !(fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && var(33)%26=0
trigger1 = (var(31)=[16,ifelse(fvar(37),48-(ceil(fvar(13))%2>0)*10-(ceil(fvar(13))%4>1)*5,ifelse(var(59)=2,38,ifelse(var(59)=5,43,48)))-1]) && var(32)=-1
trigger2 = ((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && var(33)%26=0
trigger2 = var(31)<ifelse(fvar(37),48-(ceil(fvar(13))%2>0)*10-(ceil(fvar(13))%4>1)*5,ifelse(var(59)=2,38,ifelse(var(59)=5,43,48))) && var(32)=-1
var(31) = 1
ignorehitpause=1

[State -2, 1]
type = varSet
triggerall = stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && var(32)=-1
trigger1 =  var(33)%26=0 && var(31)=23
trigger2 =  var(33)%25=0 && (var(31)=[21,22])
trigger3 = var(33)%24=0 && var(31)=20
trigger4 = var(33)%23=0 && var(31)=19
trigger5 = var(33)%22=0 && var(31)=18
trigger6 = var(33)%21=0 && var(31)=17
trigger7 = var(33)%20=0 && var(31)=16
trigger8 = var(33)%19=0 && (var(31)=[14,15])
trigger9 = var(33)%18=0 && (var(31)=[12,13])
trigger10 = var(33)%17=0 && (var(31)=[10,11])
trigger11 = var(33)%16=0 && var(31)=9
trigger12 = var(33)%15=0 && var(31)=8
trigger13 = var(33)%14=0 && var(31)=7
trigger14 = var(33)%13=0 && var(31)=6
trigger15 = var(33)%11=0 && var(31)=5
trigger16 = var(33)%10=0 && var(31)=4
trigger17 = var(33)%8=0 && var(31)=3
trigger18 = var(33)%7=0 && var(31)=2
trigger19 = var(33)%6=0 && var(31)=1
trigger20 = var(33)%5=0 && var(31)=0
var(32) = -2
ignorehitpause=1

[State -2, 1]
type = varAdd
triggerall = stateno!=5150
triggerall = !((!fvar(37)&&(var(59)=2 || var(59)=5)) || (fvar(37)&&(ceil(fvar(13))%2>0||ceil(fvar(13))%4>1))) && var(32)=-2
trigger1 =  var(33)%26=0 && var(31)=23
trigger2 =  var(33)%25=0 && (var(31)=[21,22])
trigger3 = var(33)%24=0 && var(31)=20
trigger4 = var(33)%23=0 && var(31)=19
trigger5 = var(33)%22=0 && var(31)=18
trigger6 = var(33)%21=0 && var(31)=17
trigger7 = var(33)%20=0 && var(31)=16
trigger8 = var(33)%19=0 && (var(31)=[14,15])
trigger9 = var(33)%18=0 && (var(31)=[12,13])
trigger10 = var(33)%17=0 && (var(31)=[10,11])
trigger11 = var(33)%16=0 && var(31)=9
trigger12 = var(33)%15=0 && var(31)=8
trigger13 = var(33)%14=0 && var(31)=7
trigger14 = var(33)%13=0 && var(31)=6
trigger15 = var(33)%11=0 && var(31)=5
trigger16 = var(33)%10=0 && var(31)=4
trigger17 = var(33)%8=0 && var(31)=3
trigger18 = var(33)%7=0 && var(31)=2
trigger19 = var(33)%6=0 && var(31)=1
trigger20 = var(33)%5=0 && var(31)=0
var(31) = 1
ignorehitpause=1

;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
;====僟儊乕僕曗惓====
;~~~~~~~~~~~~~~~~~~~~
[State -2,Damage]
type = VarSet
trigger1 = (100*enemy,Life/enemy,const(data.life))>30
fvar(4) = ifelse(((100*Life/const(data.life))=[16,30]),1.05,ifelse((100*Life/const(data.life))<16,1.10,1))

[State -2,Damage]
type = VarSet
trigger1 = (100*enemy,Life/enemy,const(data.life))=[16,30]
fvar(4) = .9+ifelse(((100*Life/const(data.life))=[16,30]),0.05,ifelse((100*Life/const(data.life))<16,0.10,0))

[State -2,Damage]
type = VarSet
trigger1 = (100*enemy,Life/enemy,const(data.life))<16
fvar(4) = .75+ifelse(((100*Life/const(data.life))=[16,30]),0.05,ifelse((100*Life/const(data.life))<16,0.10,0))


;僸僢僩悢梡
[State -2, HitCount]
type = VarSet
trigger1 = !numtarget && !numhelper(15395)
var(16) = 0
ignorehitpause = 1

[State -2, HitCount]
type = VarAdd
triggerall = numtarget
triggerall = (target,StateNo=5000 || target,StateNo=5010 || target,StateNo=5020 || target,StateNo=5070||target,stateno=5080) && target,Time=0
trigger1 = movehit=1
trigger2 = projHit = 1
var(16) = 1
ignorehitpause = 1

;僐儞儃悢偵傛傞僟儊乕僕曗惓乮捠忢帪乯
[State -3, VarSet]
type = VarSet
trigger1 = !var(56)
fvar(6) = ifelse(var(16)>=5 && (stateno=[200,1999]),1.00*(24-(var(16)-4))/24,1.00)
ignorehitpause = 1

;僐儞儃悢偵傛傞僟儊乕僕曗惓乮僆儕僕僫儖僐儞儃拞乯
[State -3, VarSet]
type = VarSet
trigger1 = 1
fvar(3) = ifelse(var(56),ifelse(StateNo>=3000,0.8,ifelse(var(16)>=9,0.001,ifelse(var(16)<9,0.72*(9-var(16))/10,.072))),1.00)
ignorehitpause = 1

;僆儕僐儞拞僈乕僪晄壜
[State -3, No Guard]
type = assertspecial
trigger1 = var(21)
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard

;C僌儖乕償
[State -3,Varset]
type = varSet
trigger1 = !var(59)
fvar(3)=ifelse(Power>=1000,ifelse(Power>=3000,1.05,ifelse(Power>=2000,1.02,1.01)),1.00)

;P僌儖乕償
[State -3,Varset]
type = varSet
trigger1 = var(59)=2
fvar(3)=1.00

;S僌儖乕償
[State -3,Varset]
type = varSet
trigger1 = var(59)=3
fvar(3)=ifelse(fvar(22)&&(100*Life/const(data.life)>30)&&!var(1)&&(stateno=[3000,3999]),1.3,ifelse(var(23),1.15,1.00))

;N僌儖乕償
[State -2,Varset]
type = varSet
trigger1 = var(59)=4
fvar(3)=ifelse(var(23),1.20,1.00)

;K僌儖乕償
[State -2,Varset]
type = varSet
trigger1 = var(59)=5
fvar(3)=ifelse(var(22),ifelse((StateNo=[3000,3999]),1.10,ifelse((StateNo=[1000,1999]),1.30,1.35)),1.00)

;峌寕椡曗惓
[State -2,Varset]
type = varSet
trigger1 = 1
fvar(7)=ifelse(fvar(3),fvar(3),1)*ifelse(fvar(4),fvar(4),1)*ifelse(fvar(6),fvar(6),1)*(1+var(14)*.2)*ifelse(fvar(37)&&fvar(26)<2000,1+Abs(2000-fvar(26))*0.0001,1)

;(fall.defence.up)
[State -2,Varset]
type = attackmulset
trigger1 = numtarget
trigger1 = target,statetype=A && target,hitfall=1 && var(56) && (target,prevstateno=[5070,5071])
value = ifelse(target,const(data.fall.defence_mul)=0,1.00,1.00/target,const(data.fall.defence_mul))

[State -2,Varset]
type = attackmulset
trigger1 = numtarget
trigger1 = (target,statetype!=A || target,hitfall=0)
trigger2 = !numtarget
trigger3 = var(56)<=0
value = 1.00
;=======================================
;=====================================
;--------------------------

;僎乕僕
[State -3,Varset]
type = varSet
trigger1 = !var(59)
var(5)=ifelse(random<859,ceil(17.86),floor(17.86))

[State -3,Varset]
type = varSet
trigger1 = var(59)=1 && !var(21)
var(5)=ifelse(random<829,ceil(20.83),floor(20.83))

[State -3,Varset]
type = varSet
trigger1 = var(59)=2
var(5)=ifelse(random<629,ceil(15.63),floor(15.63))

[State -3,Varset]
type = varSet
trigger1 = var(59)=3 || (var(59)=1 && var(21)) || (var(59)=4 && var(22)) || var(59)=5
var(5)=0

[State -3,Powerset]
type = PowerSet
trigger1 = var(59)=4 && var(22) && (StateNo!=[3000,3999]) && power<3000 && (Power>var(28)||var(23)<=1)
value = var(28)

[State -3,Varset]
type = varSet
trigger1 = var(59)=4
var(5)=ifelse(var(22),0,ifelse(random<889,ceil(13.89),floor(13.89)))

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;僎乕僕乮憡庤梡乯
[State -3,Varset]
type = varSet
trigger1 = roundstate=2
var(8)=ifelse(enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1,enemynear,var(20),ifelse(enemynear,authorname="H乭",enemynear,var(30)-ifelse(enemynear,var(30)>0,1,0),0))

[State -3,Varset]
type = varSet
trigger1 = roundstate=2
var(8)=ifelse(enemynear,authorname="rei"||enemynear,authorname="gal129",enemynear,var(59),0)

[State -3,Varset]
type = varSet
trigger1 = roundstate=2 && var(8)>5
var(8)=0

[State -3,Varset]
type = varSet
trigger1 = !var(8)
var(6)=ifelse(random<859,ceil(17.86),floor(17.86))

[State -3,Varset]
type = varSet
trigger1 = var(8)=1
var(6)=ifelse(random<829,ceil(20.83),floor(20.83))

[State -3,Varset]
type = varSet
trigger1 = var(8)=2
var(6)=ifelse(random<629,ceil(15.63),floor(15.63))

[State -3,Varset]
type = varSet
trigger1 = var(8)=4
var(6)=ifelse(random<889,ceil(13.89),floor(13.89))

[State -3,Varset]
type = varSet
triggerall = var(8)=4
trigger1 = enemynear,var(15)&&enemynear,authorname="Warusaki3"&&enemynear,fvar(39)=1
trigger2 = enemynear,fvar(8)&&enemynear,authorname="H乭"
var(6)=0

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

;搳偘敳偗壜擻偐敾掕
[State -3]
type = varset
trigger1 = (enemynear,stateno=[800,899]) && Time>10
trigger2 = enemynear,movetype=H && (enemynear,stateno!=[800,849])
trigger3 = enemynear,stateno>=800 && enemynear,movetype!=H
var(25) = 0

;搳偘敳偗壜擻偐敾掕
[State -3]
type = varset
trigger1 = enemynear,ctrl=1 || (enemynear,stateno=[200,799]) || (enemynear,stateno=52)
var(25) = 1

;僠乕儉儌乕僪僀儞僩儘敾掕乮帺暘岎戙乯
[State -3, Turns Mode Intro]
type = ChangeState
trigger1 = roundsexisted <= 0
trigger1 = roundstate = 0
trigger1 = time = 0
value = 190

;儔僂儞僪奐巒慜偺壒妝嶍彍
[State -2]
type = AssertSpecial
trigger1 = roundstate<2 && roundno=1
flag = NoMusic

;嬻拞僈乕僪柍偟
[State -2, AssertSpecial]
type = AssertSpecial
triggerall = !fvar(37)
trigger1 = var(59)=[1,5]
flag = NoAirGuard

;嬻拞僈乕僪柍偟
[State -2, AssertSpecial]
type = AssertSpecial
triggerall = fvar(37)
trigger1 = ceil(fvar(14))%2048<1024
trigger2 = var(7)=1
flag = NoAirGuard

;僸僢僩丒僈乕僪拞敾掕
[State -3]
type = varSet
trigger1 = enemynear,Movetype=H && movecontact
var(13)=(movehit)+(moveguarded)*2

[State -3]
type = varSet
trigger1 = (enemynear,Movetype!=H||enemynear,statetype=L) && var(13); && time=1
var(13)=0

;=======Lv.2僉儍儞僙儖捛寕梡=======
[State -3,varset]
type = varSet
trigger1 = var(19)=-1||(var(19)=-2&&(ctrl||(stateno=[0,50])||movetype=H))
var(19)=0
ignorehitpause = 1

[State -3,varset]
type = varSet
trigger1 = (var(19)=-2&&((time=1&&!(ctrl||(stateno=[0,50])||movetype=H))))
var(19)=1
ignorehitpause = 1

[State -3,varset]
type = varSet
triggerall = var(19)>1
trigger1 = movehit=1 || projhit=1
trigger2 = enemynear,MoveType!=H
var(19)=ifelse(var(19)=2&&!((stateno=[1000,1020])&&var(2)),-2,-1)
ignorehitpause = 0

[State -3,varset]
type = varSet
trigger1 = var(19)=-2&&(stateno=[1000,1020])&&(command="recovery"||command="ab"||command="bc"||command="ac")&&AnimElemTime(3)>=0&&AnimElemTime(7)<0&&!var(2)
var(19)=1

;Lv.2僉儍儞僙儖捛寕梡
[State -3, PowerReset]
type = VarAdd
trigger1 = (var(19)=1&&time>1&&!((stateno=[1000,1020])&&!var(2)&&AnimElemTime(3)>=0&&AnimElemTime(7)<0&&(command="recovery"||command="ab"||command="bc"||command="ac")))||(var(19)=2&&(ctrl||(stateno=[0,50])||movetype=H))
var(19) = 1

[State -3,assertspecial]
type = assertspecial
trigger1 = var(19)>0 || var(56)>0
flag = nojugglecheck

;嬻拞僐儞儃惂尷悢
[State -2,air_combo]
type = varset
trigger1 = !numtarget
trigger2 = numtarget
trigger2 = target,statetype!=A
trigger3 = var(19)=1
var(18) = 0
ignorehitpause=1

[State -2,air_combo]
type = varadd
triggerall = numtarget
trigger1 = (target,statetype=A||target,hitfall=1) && target,time=0

trigger1 = (target,Stateno=5000||target,Stateno=5010||target,Stateno=5020||target,Stateno=5070||target,Stateno=5080) || target,stateno=840
trigger1 = movehit=1
var(18) = 1
ignorehitpause=1

[State -2,air_combo]
type = varadd
triggerall = numtarget
trigger1 = (target,statetype=A||target,hitfall=1) && target,time=0

trigger1 = (target,Stateno=5000||target,Stateno=5010||target,Stateno=5020||target,Stateno=5070||target,Stateno=5080) || target,stateno=840
trigger1 = projhit=1
var(18) = 1
ignorehitpause=1

[State -3,varset]
type = AssertSpecial
triggerall = P2MoveType=H && P2StateType=A && !var(19) && var(56)<=0 && !var(21)
trigger1 = StateNo=3020 && AnimElemtime(63)>=0 && var(18)<2
flag = nojugglecheck

;嬻拞悂偒旘傃暅婣拞偺憡庤偵捛寕晄壜偵
[State -2, target]
type = Targetstate
triggerall = numtarget
triggerall = (target,stateno!=[840,845]) && (target,stateno!=[5300,5350]) && (target,stateno!=[15300,15350])
triggerall = !((target,authorname="rei"||target,authorname="gal129")&&(target,fvar(39)=[1,3]))
triggerall = stateno!=710 && stateno!=450 && (stateno=[200,799]) && movehit && !var(21)
trigger1 = target,statetype=A && target,time=1 && target,alive
value = 840
ignorehitpause=1

;^^^^^^^^^^^^^^^

;嫮惂掆巭帪娫拞偼僈乕僪晄壜偵愝掕
[State -3,varset]
type = varset
trigger1 = var(56)<348 && (StateNo!=[2400,2450]) && (StateNo!=[3000,3999])
var(39)=0

;嫮惂掆巭帪娫拞偼僈乕僪晄壜偵愝掕
[State -3,varset]
type = varset
triggerall = var(39)!=1
triggerall = (P2StateNo=[120,155])
trigger1 = (StateNo=[2400,2450]) && time<5
trigger2 = (stateno=[3000,3099]) && time<5
var(39) = 1

;嫮惂掆巭帪娫拞偼僈乕僪晄壜偵愝掕
[State -3,varset]
type = AssertSpecial
triggerall = !var(39)
trigger1 = var(21) && var(59)=1 && var(56)>=348
trigger2 = (StateNo=[3010,3090]) && var(1) && ifelse(fvar(11),ifelse(var(1)=1,AnimElemTime(4)<=51,AnimElemTime(5)<=2),ifelse(var(1)=1,AnimElemTime(4)<=52,AnimElemTime(5)<=3))
flag = unguardable
;^^^^^^^^^^^^^^^
;夋柺抂偺憡庤偺棤懁偵夞傝偙傒偵偔偔偡傞
[State -2,width]
type = Width
trigger1 = 1
edge = 2,0

[state -2,recovery]
type = varset
trigger1 = !((stateno=[2400,2450])&&(stateno=[3000,3999])&&movetype!=H)&&(movetype!=H||((stateno=5000||stateno=5010||stateno=5020)&Time=0))
fvar(11) = 0

[state -2,recovery]
type = varset
trigger1 = movetype=H && (stateno!=[0,40]) && ((gethitvar(hittime)>0&&gethitvar(yvel)>=0)||(p2stateno=[3000,4999])||(enemynear,hitdefattr=SCA,HA,HP,HT))
fvar(11) = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僈乕僪悢梡
[State -2, VarSet]
type = VarSet
trigger1 = (P2stateno!=[150,155])
fvar(8) = 0
ignorehitpause = 1

[State -2, VarAdd]
type = VarSet
triggerall = (P2StateNo=[150,155]) && enemynear,Time=0
trigger1 = moveguarded=1
fvar(8) = fvar(8)+1
ignorehitpause = 1

[State -2, VarAdd]
type = VarSet
triggerall = (P2StateNo=[150,155]) && enemynear,Time=0
trigger1 = projguarded=1
fvar(8) = fvar(8)+1
ignorehitpause = 1

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;僕儍儞僾拞偵怘傜偭偨偐
[State -3,VarAdd]
type = VarSet
trigger1 = !var(55) && Statetype=A && (StateNo=50 || (StateNo=[600,699]))
var(55) = 1

[State -3,VarAdd]
type = VarAdd
trigger1 = var(55) && StateNo=52 && time=0
var(55) = -1

;夞傝崬傒拞偵怘傜偭偨偐
[State -3,VarAdd]
type = VarAdd
trigger1 = StateNo=900 && time=1
var(55) = 10

[State -3,VarAdd]
type = VarAdd
trigger1 = StateNo=900 && AnimTime=0
var(55) = -10

;旔偗拞偵怘傜偭偨偐
[State -3,VarAdd]
type = VarAdd
trigger1 = StateNo=910 && time=1
var(55) = 10

[State -3,VarAdd]
type = VarAdd
trigger1 = StateNo=910 && AnimTime=0
var(55) = -10

;|||||||||||||||||憡庤偺寗敾暿|||||||||||||||
;徃棾宯媄嬻怳傝敾暿
[State -3,VarAdd]
type = VarSet
trigger1 = (enemynear,ctrl=1 || enemynear,movetype=H) && fvar(32)=1
fvar(32) = 0

[State -3,VarSet]
type = VarSet
trigger1 = enemynear,ctrl=0 && enemynear,movetype!=H && (Enemynear,StateNo!=[600,799]) && enemynear,Vel X<4 && fvar(32)=0 && enemynear,time>=18 && P2statetype=A
fvar(32) = 1

;憡庤偑嬻怳傝偟偨偐
[State 20, 4]
type = varset
trigger1 = (stateno=[0,39])&&time>=1&&fvar(32)>=10
fvar(32)=0

[State 20, 4]
type = varadd
trigger1 = fvar(32)>10&&(stateno!=[200,799])
fvar(32)=-1

[State 20, 4]
type = varset
trigger1 = ((P2stateno=[200,999])||var(54)%2=0) && P2Statetype!=A && enemynear,time>=18 && (enemynear,animtime=[-9,-4]) && !enemynear,ctrl
trigger1 = (stateno!=[150,155]) && (stateno!=[5000,5099]) && statetype!=L && !fvar(32) && enemynear,Vel X<4
fvar(32)=10-enemynear,animtime

[State 20, 4]
type = varSet
trigger1 = (enemynear,statetype!=A || enemynear,movetype=H)&&fvar(32)=3
fvar(32)=0

[State 20, 4]
type = varSet
trigger1 = enemynear,stateno=50 && enemynear,time=1 && (enemynear,const(velocity.jump.y)*.85<enemynear,Vel Y)
fvar(32)=3

[State 20, 4]
type = varSet
trigger1 = (stateno=[0,39])&&time>=1&&fvar(32)=4
fvar(32)=0

[State 20, 4]
type = varset
trigger1 = (stateno=[4000,4020])
fvar(32)=4

[State 20, 4]
type = varSet
trigger1 = (stateno=[0,39])&&time>=1&&(P2stateno!=[5910,5929])&&(P2stateno!=[15910,15929])&&fvar(32)=5
fvar(32)=0

[State 20, 4]
type = varset
trigger1 = (P2stateno=[5910,5929])||(P2stateno=[15910,15929])
fvar(32)=5

;婲偒忋偑傝丒僈乕僪敾掕
[State 20, 4]
type = varset
trigger1 = fvar(33)=1 && stateno!=5120 && (fvar(30)>12||stateno>200)
trigger2 = (fvar(33)=2||fvar(33)=4) && (stateno!=[150,155]) && (fvar(30)>12||stateno>200)
trigger3 = fvar(33)=3 && (stateno!=[5000,5029]) && (fvar(30)>14||stateno>200)
fvar(33)=0

[State 20, 4]
type = varSet
trigger1 = stateno=5120 && AnimTime=0
fvar(33)=1

[State 20, 4]
type = varset
trigger1 = (stateno=151||stateno=153||stateno=155) && HitOver
fvar(33)=2

[State 20, 4]
type = varset
trigger1 = (stateno=[5000,5029]) && HitOver
fvar(33)=3

[State 20, 4]
type = varset
trigger1 = (stateno=151||stateno=153||stateno=155) && (var(11)=[1,5])
fvar(33)=4

[State 20, 4]
type = varset
trigger1 = !fvar(33)
fvar(30)=0

[State 20, 4]
type = varAdd
trigger1 = fvar(33)
fvar(30)=1
ignorehitpause=0

;搳偘柍岠帪娫
[State 151, Lo to Hi]
type = statetypeSet
trigger1 = (fvar(33)=[1,4]) && fvar(30)<=5 && (Stateno!=[200,899]) && (Stateno!=[1000,1099]) && (Stateno!=[3000,3999])
movetype=H

[State 151, Lo to Hi]
type = statetypeSet
trigger1 = ((fvar(33)!=[1,3])||((fvar(33)=[1,4]) &&fvar(30)>5)) && (ctrl||stateno=13||(stateno=[21,22]))
movetype=I

;S僌儖旔偗楢敪杊巭(option梡)
[State 20, 4]
type = varset
trigger1 = fvar(31) && stateno!=910 && fvar(22)=1
fvar(22)=5+2
ignorehitpause=1

[State 20, 4]
type = varset
trigger1 = fvar(22)>1
fvar(22)=fvar(22)-1
ignorehitpause=1

[State 20, 4]
type = varset
trigger1 = roundstate<2 && fvar(22)
fvar(22)=1

[State 20, 4]
type = varset
trigger1 = stateno!=910 && fvar(22)=1
fvar(31)=0

[State 20, 4]
type = varset
trigger1 = stateno=910 && fvar(22)
fvar(31)=1

;僈乕僪偡傋偒忬嫷敾暿
[state -1]
type = varset
trigger1 = (stateno=[200,3999])
trigger2 = !(enemynear,movetype=A&&(p2stateno=[2000,4999])&&enemynear,time>50&&P2bodydist X<140)&&var(42)=1
var(42) = 0

;懳挻昁嶦媄
[state -1]
type = varset
trigger1 = (enemynear,movetype=A&&(p2stateno=[2000,4999])&&enemynear,time>50&&P2bodydist X<140)
var(42) = 1

;懳撍恑媄
[state -1]
type = varset
trigger1 = enemynear,Movetype = A && (P2BodyDist X>=20||fvar(33)=1)&&P2bodydist X<140 && enemynear,vel X>=3 && enemynear,time>24 && (P2stateno!=[0,199]) && (stateno!=[150,155])
var(42) = -10

[state -1]
type = varadd
trigger1 = var(42)<0
var(42) = 1

;僔僗僥儉敾暿
[State 20, 4]
type = varset
trigger1 = 1
fvar(39)=1;(CVS2)



;=========婥愨梡=======
[State -2]
type = targetState
triggerall = numtarget
triggerall = target,alive
triggerall = !((target,stateno=[5300,5350]) && (target,authorname="rei"||target,authorname="gal129")&&target,fvar(39)=1)
trigger1 = var(15)>=(80+(fvar(25)-floor(fvar(25)))*1000) && (target,const(data.life)>1056||target,name="cvshonda")
trigger2 = var(15)>=(70+(fvar(25)-floor(fvar(25)))*1000) && (target,name="cvsvice"||target,name="cvsking"||(target,const(data.life)=[972,1056]))
trigger3 = var(15)>=(60+(fvar(25)-floor(fvar(25)))*1000) && ((target,const(data.life)<972&&target,name!="cvsvice"&&target,name!="cvsking")||target,name="cvsrolento"||target,name="cvsdhalsim")
value = 15310
ignorehitpause=1

;婥愨壒
[State 3001, Super]
type = Helper
triggerall = !NumHelper(15390)
trigger1 = numtarget
trigger1 = target,stateno=15310 && target,alive
id = 15390
name = "dizzy_sound"
pos = 0,250
postype = P1
stateno = 15390
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = ifelse(teamside=1,1,-1)
pausemovetime = 99999
supermovetime = 99999

;婥愨傑偱偺僸僢僩悢
[State 3001, Super]
type = Helper
triggerall = !NumHelper(15395)
trigger1 = numtarget
trigger1 = (target,stateno=15310||(target,stateno=5310&&(target,authorname="rei"||target,authorname="gal129")&&target,fvar(39)=1)) && target,alive
id = 15395
name = "dizzy_count"
pos = 0,250
postype = P1
stateno = 15395
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = ifelse(teamside=1,1,-1)
pausemovetime = 99999
supermovetime = 99999

[State -2]
type = varset
trigger1 = numtarget
trigger1 = target,stateno=15310
trigger2 = var(46)>=144
trigger3 = P2stateno=5310
trigger4 = var(46)=-1
trigger5 = enemy,numpartner||fvar(20)=1||fvar(20)=1.1
var(15) = 0

[State -2]
type = varset
trigger1 = var(46)>=144
trigger2 = numtarget
trigger2 = (target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080) && target,time=1 && var(46)!=-1
;trigger2 = (P2stateno=5000||P2stateno=5010||P2stateno=5020||P2stateno=5070||P2stateno=5080) && enemynear,time=1 && var(46)!=-1
trigger3 = !numtarget&&p2movetype!=H && var(46)=-1
trigger4 = numtarget
trigger4 = P2stateno=840 && target,time=1
trigger5 = projcontact=1 && var(46)!=-1
var(46) = 0
ignorehitpause=1

[State -2]
type = varAdd
trigger1 = var(15)>0 && var(46)>=0 && !(((stateno=[2000,2200])&&time<7)||((stateno=[3100,3120])&&(time=[3,53+var(1)*2-fvar(11)]))||((stateno=[3000,3020])&&(time=[4,54+var(1)*2-fvar(11)])))
trigger1 = !(P2stateno=5110&&enemynear,time>32)
var(46) = 1
ignorehitpause=1

[State -2]
type = varset
trigger1 = P2stateno=15300 && var(46)!=-1
var(46) = -1

[State -2]
type = HitAdd
trigger1 = var(46)=-1 && Numhelper(15395) && (movehit || projhit=1 || var(44)=1)
value = var(16)-1+(stateno=811||stateno=821||stateno=1351||stateno=3151)
ignorehitpause=1

;==巃傞宯峌寕傪僈乕僪偝偣偨偲偒===============
;搧(CVS/Capcom)
[State 20, 4]
type = VarSet
triggerall = numtarget && moveguarded=1 && !var(47)
trigger1 = target,name="cvshaohmaru"||target,name="haohmaru"
trigger2 = target,name="cvsnakoruru"||target,name="nakoruru"
trigger3 = target,name="sodom"
trigger4 = target,name="bishamon"
trigger5 = target,name="donovan"
trigger6 = target,name="gigi"
var(47)=1
ignorehitpause=1

;搧(SNK)
[State 20, 4]
type = VarSet
triggerall = numtarget && moveguarded=1 && !var(47)
trigger1 = target,name="hanzo"
trigger2 = target,name="jubei"
trigger3 = target,name="shiki"
trigger4 = target,name="setsuna"
var(47)=1
ignorehitpause=1

;搧(Sammy)
[State 20, 4]
type = VarSet
triggerall = numtarget && moveguarded=1 && !var(47)
trigger1 = target,name="ky"||target,name="Ky Kiske"
trigger2 = target,name="Sol"||target,name="Sol=Badguy"
trigger3 = target,name="faust"
trigger4 = target,name="baiken"
trigger5 = target,name="ROBO-Ky"||target,name="ROBO-Ky嘦"
var(47)=1
ignorehitpause=1


;嬥懏惢昳(朹側偳)(CVS/Capcom)
[State 20, 4]
type = VarSet
triggerall = numtarget && moveguarded=1 && !var(47)
trigger1 = target,name="cvsrolento"||target,name="Rolento Schugerg"
trigger2 = target,name="cvsmaki"||target,name="Genryusai Maki"
trigger3 = target,name="cvseagle"||target,name="cvs2eagle"
trigger4 = target,name="leo"||target,name="cvsleo";弬(Shield)
trigger5 = target,name="nool"||target,name="hydron"||target,name="cvsnool"
trigger6 = target,name="jihad"||target,name="blade"
trigger7 = target,name="kongou"
var(47)=2
ignorehitpause=1

;嬥懏惢昳(朹側偳)(SNK)
[State 20, 4]
type = VarSet
triggerall = numtarget && moveguarded=1 && !var(47)
trigger1 = target,name="billy"
trigger2 = target,name="Mr.Big"
var(47)=2
ignorehitpause=1

;嬥懏惢昳(朹側偳)(Sammy)
[State 20, 4]
type = VarSet
triggerall = numtarget && moveguarded=1 && !var(47)
trigger1 = target,name="a.b.a."
var(47)=2
ignorehitpause=1


;栘惢昳(朹側偳)
[State 20, 4]
type = VarSet
triggerall = numtarget && moveguarded=1 && !var(47)
trigger1 = target,name="Hibiki Takane"||target,name="cvshibiki"||target,name="hibiki"
trigger2 = target,name="cvskuroko"
var(47)=3
ignorehitpause=1

[State 20, 4]
type = PlaySnd
triggerall = var(47)>0 && moveguarded=1
trigger1 = Stateno=[200,229]
trigger2 = Stateno=[400,929]
trigger3 = (stateno=[1100,2099])
trigger4 = (stateno=[3000,3099]) && AnimElemTime(15)>=0
value = 4,ifelse(var(47)=3,6,ifelse(var(47)=2,3,0))+random%2
ignorehitpause=1

[State 20, 4]
type = PlaySnd
triggerall = var(47)=2 && moveguarded=1
trigger1 = Stateno=[200,229]
trigger2 = Stateno=[400,929]
trigger3 = (stateno=[1100,2099])
value = 4,10+random%2
ignorehitpause=1
channel = 21

[State 20, 4]
type = VarSet
triggerall = var(47)>0
trigger1 = moveguarded=1
var(47)=-1
ignorehitpause=1

[State 20, 4]
type = VarSet
trigger1 = var(47)>0
trigger2 = var(47)=-1 && (!moveguarded||moveguarded>1)
var(47)=0
ignorehitpause=1

;===姶揹丒昘寢丒擱從張棟===
[state -2]
type = varset
trigger1 = !numtarget
trigger2 = numtarget
trigger2 = target,statetype=L
fvar(1) = 0

