;-----------------------------------------------------------
;噛み付き

[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
anim = 1006
ctrl = 0
sprpriority = 2

[State ,];補正リセット
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != H
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,GethitVar(hitcount) <= 0
trigger5 = EnemyNear,ctrl
fvar(6) = 1
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6) = 1)
value = 1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6) = 1)
value = 1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno=12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6)*1.3)
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.13
ignorehitpause = 1



[State 1000, 1]
type = varset
trigger1 = prevstateno != 1000
trigger1 = animelem = 1
var(2)=0

[State 1000, 1]
type = varset
trigger1 = prevstateno = 1000
trigger1 = animelem = 1
var(2)=var(2)+1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 8
value = 0, 4

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 9
value = 201,3

[State 1027, Spark];風
type = Explod
trigger1 = animelem = 9
anim = 10021
pos = 15,-50
postype = p1
scale = 0.3,0.3
sprpriority = 3
persistent = 0
ownpal = 1

[State 1027, Spark];風
type = Explod
trigger1 = animelem = 9
anim = 10021
vfacing = -1
pos = 15,-80
postype = p1
scale = 0.3,0.3
sprpriority = 3
persistent = 0
ownpal = 1


[State 1000, 4]
type = posadd
trigger1= var(2)>0
trigger1= AnimElem = 1
x = -20

[State 1000, 4]
type = velset
trigger1 = AnimElem = 5,>=0
trigger1 = AnimElem = 8,<0
x = 10
[State 1000, 4]
type = posadd
trigger1= AnimElem = 7
trigger2= AnimElem = 9
x = 5
[State 1000, 4]
type = velset
trigger1 = AnimElem = 10
x = 0
[State 1000, 4]
type = posadd
trigger1= AnimElem = 13
trigger2= AnimElem = 14
trigger3= AnimElem = 15
trigger4= AnimElem = 16
x = -5
[State 1000, 4]
type = posadd
trigger1= AnimElem = 17
x = -12
[State 1000, 4]
type = posadd
trigger1= Animtime = 0
x = -13

[State 1000, 6]
type = HitDef
trigger1 = (var(40)!=1)
trigger1 = AnimElem = 5
attr = S, SA
animtype  = Hard
damage    = 120,25+((palno=12)*35)
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
sparkno = S10000+random%4
hitsound   = S201,5
guard.sparkno = S10026
guardsound = S2,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 35
ground.velocity = -3
air.velocity = -2,-3
air.hittime = 100
getpower  = 120*(!var(16)),120*(!var(16))
givepower = 60,60


[State 1000, 6]
type = HitDef
trigger1 = (var(40)=1)
trigger1 = AnimElem = 5
attr = S, SA
animtype  = Hard
damage    = 120,25+((palno=12)*35)
priority  = 5
guardflag = MA
pausetime = 30,40
sparkxy = -10,-60
sparkno = S10008+random%4
hitsound   = S201,5
guard.sparkno = S10026
guardsound = S2,0
ground.type = Low
ground.slidetime = 35
ground.hittime  = 40
ground.velocity = 0.5
air.velocity =0.5,-6.5
air.hittime = 100
getpower  = 120*(!var(16)),120*(!var(16))
givepower = 60,60
envshake.time = 30
envshake.freq = 120
envshake.ampl = -4
air.fall = 1
fall.recover = 0
ID = 6600
;-----カウンター-----------------
[State 230, 音を鳴らす]
type = PlaySnd
trigger1 = numtarget(6600)
trigger1 = movehit
value = 200,1
freqmul = 1
ignorehitpause = 1
volume = 150
persistent = 0

[State 3000,00]
type = AllPalfx
trigger1 = numtarget(6600)
trigger1 = movehit
add = 100,100,100
mul = 150,150,150
sinadd = 10, 10, 10
time = 2
ignorehitpause = 1
persistent = 0

[State , Sound];カウンター
type = PlaySnd
trigger1 = numtarget(6600)
trigger1 = movehit
value = S1,111
persistent = 0
channel = 4
lowpriority = 4
ignorehitpause=1
volume = 200
;----------------------------

[State 200];補正
type = Varset
trigger1 = movecontact
fvar(6) = fvar(6)*0.9
persistent = 0
ignorehitpause = 1

[State 600,***];血
type = Explod
trigger1 = movehit
anim = 10013
pos = 35,-60
facing = -1
postype =p1
sprpriority = 5
bindtime = 1
scale = 0.2,0.5
pausemovetime = 0
ignorehitpause = 0
persistent = 0
ownpal = 1

[State 1000, 7]
type = ChangeState
trigger1 = movecontact
value = 1001
ctrl = 0

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

;------------------------------------------------------------------------
;噛み付きヒット

[Statedef 1001]
type    = S
movetype= A
physics = S
juggle  = 0
anim = 1010
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = varset
trigger1 = 1
var(2)=0

[State 1000, 4]
type = posAdd
trigger1 = AnimElem = 2
x = -15

[State 1000, 4]
type = veladd
trigger1 = AnimElem = 2,>=0
trigger1 = AnimElem = 4,<0
x = -3

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



;-----------------------------------------------------------
;跳び噛み付き

[Statedef 1005]
type    = C
movetype= A
physics = N
juggle  = 0
velset = 0,0
anim = 1007
ctrl = 0
sprpriority = 2

[State ,];補正リセット
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != H
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,GethitVar(hitcount) <= 0
trigger5 = EnemyNear,ctrl
fvar(6) = 1
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6) = 1)
value = 1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6) = 1)
value = 1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno=12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6)*1.3)
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.13
ignorehitpause = 1


[State ];無敵
type = NotHitBy 
trigger1 = time < 16
trigger1 = (palno = 12)
value = SCA


[State 1027, Spark];砂
type = Explod
trigger1 = animelem = 6
anim = 10018
facing = -1
pos = 0,0
postype = p1
scale = 0.3,0.6
sprpriority = 3
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1027, Spark];砂
type = Explod
trigger1 = animelem = 6
anim = 10018
pos = 0,0
postype = p1
scale = 0.3,0.6
sprpriority = 3
persistent = 0
ignorehitpause = 1
ownpal = 1


[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 7
value = 400,0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 8
value = 600,4
channel = 1
volume = 300

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 21
value = 201,3

[State 1027, Spark];風
type = Explod
trigger1 = movehit
anim = 10021
pos = 25,-60
postype = p1
scale = 0.3,0.3
sprpriority = 3
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1027, Spark];風
type = Explod
trigger1 = movehit
anim = 10021
vfacing = -1
pos = 25,-70
postype = p1
scale = 0.3,0.3
sprpriority = 3
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1000, 4]
type = posadd
trigger1 = AnimElem = 21
y = -20

[State 1000, 4]
type = StateTypeSet
trigger1 = AnimElem = 7
statetype = A


[State 1000, 4]
type = velset
trigger1 = AnimElem = 7
x = 4
y = -18

[State 1000, 4]
type = velset
trigger1 = AnimElem = 21
x = 7

[State 1000, 4]
type = veladd
trigger1 = AnimElem = 7,>=0
y = 1.8

[State 1000, 6] ;相手が遠い時
type = HitDef
trigger1 = AnimElem = 21
attr = S, SA
animtype  = Hard
damage    = 150,30
priority  = 5
guardflag = MA
pausetime = 10,10
sparkxy = -10,-40
sparkno = S10000+random%4
hitsound   = S201,5
guard.sparkno = S10027
guardsound = S2,1
ground.type = H
ground.slidetime = 24
ground.hittime  = 29
ground.velocity = -3
air.velocity = -2,-3
air.hittime = 100
getpower  = 150*(!var(16)),150*(!var(16))
givepower = 75,75

[State 200];補正
type = Varset
trigger1 = movecontact
fvar(6) = fvar(6)*0.9
persistent = 0
ignorehitpause = 1

[State 600,***];血
type = Explod
trigger1 = movehit
anim = 10013
pos = 35,-60
facing = -1
postype =p1
sprpriority = 5
bindtime = 1
scale = 0.2,0.5
pausemovetime = 0
ignorehitpause = 0
persistent = 0

[State 1000, 7]
type = ChangeState
trigger1 = vel Y > 0
trigger1 = pos Y >= 0
value = 1006
ctrl = 0

;-----------------------------------------------------------
;跳び噛み付き着地

[Statedef 1006]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
anim = 1008
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 0,3

[State 1027, Spark]
type = Explod
trigger1 = animelem = 1
anim = 10017
vfacing = -1
pos = 0,0
postype = p1
scale = 0.5,0.5
sprpriority = 3
persistent = 0

[State 1000, 4]
type = velset
trigger1 = AnimElem = 1
x = 2

[State 1000, 4]
type = posset
trigger1 = 1
y = 0

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



;---------------------------------------------------------------------------
;喰い付き

[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
anim = 1005
ctrl = 0
sprpriority = -1


[State ,];補正リセット
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != H
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,GethitVar(hitcount) <= 0
trigger5 = EnemyNear,ctrl
fvar(6) = 1
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6) = 1)
value = 1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6) = 1)
value = 1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno=12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))*1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.13
ignorehitpause = 1


[State ];無敵
type = NotHitBy 
trigger1 = time < 20
trigger1 = (palno = 12)
value = SCA

[State 1000, 1]
type = varset
trigger1 = prevstateno != 1010
trigger1 = animelem = 1
var(2)=0

[State 1000, 1]
type = varset
trigger1 = prevstateno = 1010
trigger1 = animelem = 1
var(2)=var(2)+1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 20
value = 0, 4

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 30
value = 201,3

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 15
value = 600, 4
channel = 1
volume = 300

[State 1000, 4]
type = velset
trigger1 = AnimElem = 24,>=0
trigger1 = AnimElem = 30,<0
x = 6

[State 1000, 4]
type = velset
trigger1 = AnimElem = 44,>=0
trigger1 = AnimElem = 58,<0
x = -1
[State 1000, 4]
type = velset
trigger1 = AnimElem = 58,>=0
x = -3

[State 1000, 4]
type = posadd
trigger1= var(2)>0
trigger1= AnimElem = 1
x = -20

[State 1027, Spark];風
type = Explod
trigger1 = animelem = 30
anim = 10021
pos = 25,-60
postype = p1
scale = 0.2,0.2
sprpriority = 3
persistent = 0
ownpal = 1

[State 1027, Spark];風
type = Explod
trigger1 = animelem = 30
anim = 10021
vfacing = -1
pos = 25,-70
postype = p1
scale = 0.2,0.2
sprpriority = 3
persistent = 0
ownpal = 1

[State 1000, 6]
type = HitDef
trigger1 = AnimElem = 32
attr = S, ST
animtype  = Hard
damage    = 50,10
priority  = 5
ID = 5656
hitflag = M-
guardflag = 
pausetime = 0,0
sparkxy = -20,-70
sparkno = S10000+random%4
hitsound   = S201,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -4,-2.5
getpower  = 50*(!var(16)),50*(!var(16))
givepower = 25,25
kill = 0

[State 1000, 7]
type = targetstate
triggerall = movehit
triggerall = target,movetype = H
triggerall = (target,stateno != 1012)
triggerall = (target,stateno != 1014)
triggerall = animelem = 36,<0
trigger1 = (command = "ha")||(command = "hb")
trigger1 = var(59)=0

trigger2 = var(59)=1                  ;ＡＩ起動時
trigger2 = (backedgebodydist < 70)||(target,life=[251,280])
value = 1012

[State 1000, 7]
type = targetstate
triggerall = movehit
triggerall = target,movetype = H
triggerall = (target,stateno != 1012)
triggerall = (target,stateno != 1014)
triggerall = animelem = 36,<0
trigger1 = var(59)=0

trigger2 = var(59)=1                  ;ＡＩ起動時
trigger2 = (backedgebodydist >= 70)||(target,life!=[251,280])
value = 1014

[State 1000, 7]
type = changestate
trigger1 = movehit
trigger1 = target,movetype = H
trigger1 = target,stateno = 1012
value = 1011


[State 1000, 7]
type = changestate
trigger1 = movehit
trigger1 = target,movetype = H
trigger1 = target,stateno = 1014
value = 1013


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


;---------------------------------------------------------------------------
;喰い付き〜喰いちぎる

[Statedef 1011]
type    = S
movetype= A
physics = S
juggle  = 0
anim = 1012
ctrl = 0
sprpriority = -1

[State ]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 15
value = 201,5

[State 600,***];血
type = Explod
trigger1 = animelem = 15
anim = 10014
pos = 10,-90
facing = -1
postype =p1
sprpriority = 2
bindtime = 1
scale = 0.5,0.5
pausemovetime = 0
ignorehitpause = 0
persistent = 0
ownpal = 1

[State 1027, Spark];風
type = Explod
trigger1 = animelem = 8
anim = 10020
pos = 30,-20
postype = p1
scale = 0.5,0.8
sprpriority = 3
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1000, 1]
type = SprPriority
trigger1 = animelem = 11
value = 3

[State 1000, 1]
type = targetlifeadd
trigger1 = animelem = 15
value = -(200+((palno=12)*60))*(const(data.attack)*0.01)

[State 1000, 1]
type = poweradd
trigger1 = animelem = 15
value = 200*(!var(16))
[State 1000, 1]
type = targetpoweradd
trigger1 = animelem = 15
value = 100

[State 1000, 1]
type = velset
trigger1 = time = 0
x = 3

[State 1000, 1]
type = velset
trigger1 = animelem = 34
x = 10

[State 1000, 1]
type = posset
trigger1 = animelem = 5,<0
x = (target,pos x+10)

[State 1000, 1]
type = posadd
trigger1 = animelem = 40
x = 20

[State 1000, 1]
type = turn
trigger1 = animtime = 0

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


;---------------------------------------------------------------------------
;喰い付き〜喰いちぎる相手

[Statedef 1012]
type    = S
movetype= H
physics = S
juggle  = 0
ctrl = 0
sprpriority = 1

[State ]
type = turn
trigger1 = time = 0
trigger1 = P2dist X < -20
ignorehitpause = 1

[State ]
type = changeanim2
trigger1 = anim != 1011
value = 1011

[State 1000, 1]
type = width
trigger1 = 1
edge = 50,50

[State 1021, Hit ground]
type = SelfState
trigger1 = AnimTime = 0
trigger1 = (life < 1)
value = 5100

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


;---------------------------------------------------------------------------
;喰い付き〜三連打

[Statedef 1013]
type    = S
movetype= A
physics = S
juggle  = 0
anim = 1013
ctrl = 0
sprpriority = -1

[State ]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze

[State 1000, 1]
type = velset
trigger1 = time = 0
x = 0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 13
value = 200,1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 52
trigger2 = animelem = 64
value = 200,0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 13
trigger2 = animelem = 52
trigger3 = animelem = 64
value = 200,3

[State ]
type = Envshake
trigger1 = animelem = 13
trigger2 = animelem = 52
trigger3 = animelem = 64
time = 15
freq = 120
ampl = -6

[State 600,***]
type = Explod
trigger1 = animelem = 13
trigger2 = animelem = 52
trigger3 = animelem = 64
anim = 10004
pos = 10,-90
facing = -1
postype =p1
sprpriority = 2
bindtime = 1
scale = 0.5,0.5
pausemovetime = 0
ignorehitpause = 0
ownpal = 1

[State 1000, 1]
type = targetlifeadd
trigger1 = animelem = 13
trigger2 = animelem = 52
trigger3 = animelem = 64
value = -(80+((palno=12)*24))*(const(data.attack)*0.01)

[State 1000, 1]
type = poweradd
trigger1 = animelem = 13
trigger2 = animelem = 52
trigger3 = animelem = 64
value = 80*(!var(16))

[State 1000, 1]
type = targetpoweradd
trigger1 = animelem = 13
trigger2 = animelem = 52
trigger3 = animelem = 64
value = 40

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 1
time = 1
ID = 5656
pos = 20,0

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 2
time = 1
ID = 5656
pos = 10,-20

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 14
time = 1
ID = 5656
pos = 15,-80

[State 1000, 1]
type = Targetvelset
trigger1 = animelem = 16
x=-0.5
y=-8

[State 1000, 1]
type = Targetvelset
trigger1 = animelem = 20
x=0
y=0

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 36
time = 1
ID = 5656
pos = 5,-100

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 39
time = 1
ID = 5656
pos = 10,-85

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 41
time = 1
ID = 5656
pos = 20,-82

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 43
time = 1
ID = 5656
pos = 25,-75

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 51
time = 1
ID = 5656
pos = 20,-78

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 52
time = 1
ID = 5656
pos = 7,-85

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 54
time = 1
ID = 5656
pos = 10,-80

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 58
time = 1
ID = 5656
pos = 25,-75

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 63
time = 1
ID = 5656
pos = 15,-80


[State 1000, 1]
type = TargetBind
trigger1 = animelem = 64
time = 1
ID = 5656
pos = 0,-75

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 65
time = 1
ID = 5656
pos = 10,-70

[State 1000, 1]
type = TargetBind
trigger1 = animelem = 66
time = 1
ID = 5656
pos = 20,0

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


;---------------------------------------------------------------------------
;喰い付き〜三連打相手

[Statedef 1014]
type    = S
movetype= H
physics = N
juggle  = 0
ctrl = 0
sprpriority = 1

[State ]
type = turn
trigger1 = time = 0
trigger1 = P2dist X < 0
ignorehitpause = 1

[State ]
type = changeanim2
trigger1 = anim != 1014
value = 1014

[State 1000, 1]
type = width
trigger1 = 1
edge = 20,20

[State 1000, 1]
type = velset
trigger1 = animelem = 11
x = -8

[State 1000, 1]
type = veladd
trigger1 = animelem = 10,>=0
x = 0.4

[State 1021, Hit ground]
type = SelfState
trigger1 = AnimTime = 0
trigger1 = (life < 1)
value = 5100

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











;------------------
; 飛んでいく相手のステート

[Statedef 1026]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = VelSet
trigger1 = Time = 0
x = -20
y = 0

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; 飛んでいった相手の壁に当たる状態のステート

[Statedef 1027]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State ]
type = Envshake
trigger1 = time = 0
time = 12
freq = 120
ampl = -6

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1028

;------------------
; 壁に当たった相手が落ちるステート

[Statedef 1028]
type    = A
movetype= H
physics = N

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -3

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.1

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] 
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] 
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100


;---------------------------------------------------------------------------
;アッパー改

[Statedef 1020]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
anim = 1002
ctrl = 0
sprpriority = 2

[State ,];補正リセット
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != H
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,GethitVar(hitcount) <= 0
trigger5 = EnemyNear,ctrl
fvar(6) = 1
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6) = 1)
value = 1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6) = 1)
value = 1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno=12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6)*1.3)
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.13
ignorehitpause = 1


[State 1008, 画像の色]
type = PalFX
triggerall = (Alive)
trigger1 = GetHitVar(hitshaketime)>0
time = GetHitVar(hitshaketime)
add = 120,150,160
sinadd = 22,5,90,3
pausemovetime = 99999999
IgnoreHitPause = 1

[State ,];アニメ
type = Varset
triggerall = var(11)=0
trigger1 = hitpausetime = 0
trigger1 = var(10)<24
var(10) = var(10)+1
ignorehitpause = 0

[State ]
type = changeanim
triggerall = hitpausetime = 0
triggerall = (Alive)
triggerall = GetHitVar(hitshaketime)=0
trigger1 = var(10)<=23
value = 1002
elem = (var(10))
IgnoreHitPause = 0

[State ]
type = HitOverride
trigger1 = var(10)<=23
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 1020

[State 1000, 1]
type = PlaySnd
trigger1 = var(11) > 0
value = 400,1
IgnoreHitPause = 1
persistent = 0

[State 1000, 4]
type = lifeadd
trigger1 = var(10)<=23
trigger1 = (palno != 12)
trigger1 = 1
value = -(gethitvar(damage))
persistent = 0

[State ]
type = changestate
trigger1 = life = 0
value = 5000

[State ];無敵
type = NotHitBy 
trigger1 = animelem = 23,<0
value = ,NT,ST,HT

[State 1000, 1]
type = PlaySnd
trigger1 = var(11) = 0
trigger1 = animelem = 12
value = 0, 4
freqmul = 0.8
volume = 150
persistent = 0

[State 1027, Spark];風
type = Explod
trigger1 = var(11) = 0
trigger1 = animelem = 17
anim = 10018
facing = -1
pos = 0,0
postype = p1
scale = 0.5,0.8
sprpriority = -1
persistent = 0
ownpal = 1

[State 1000, 4]
type = velset
trigger1 = var(11) = 0
trigger1 = AnimElem = 17,>=0
trigger1 = AnimElem = 19,<0
x = 6

[State 1000, 1]
type = PlaySnd
trigger1 = var(11) = 0
trigger1 = random < 350
trigger1 = animelem = 14
value = 600, 0
channel = 1
volume = 300

[State 1000, 6]
type = HitDef
trigger1 = time = 0
attr = S, SA
animtype  = Hard
damage    = 200,40
priority  = 5
guardflag = M
ID = 4747
pausetime = 20,20
sparkxy = -10,-60
sparkno = S10008+random%4
hitsound   = S300,3
guard.sparkno = S10027
guardsound = S2,1
ground.type = Low
ground.slidetime = 42
ground.hittime  = 100
ground.velocity = -20
air.velocity = -2,-3
ground.cornerpush.veloff = -11
guard.cornerpush.veloff = -11
envshake.time = 20
envshake.freq = 120
envshake.ampl = -6
getpower  = 200*(!var(16)),200*(!var(16))
givepower = 100,100
nochainID = 4747
persistent = 5

[State 200];補正
type = Varset
trigger1 = movehit
fvar(6) = fvar(6)*0.9
persistent = 0
ignorehitpause = 1

[State 210, Width];画面端の押し戻し判定
type = Width
trigger1 = moveguarded
edge = 100,0

[State 1000, 7]
type = targetstate
trigger1 = movehit
trigger1 = target,movetype = H
trigger1 = (target,stateno != 1021)
trigger1 = (target,stateno != [5100,5110])
trigger1 = animelem = 24,<0
value = 1021

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


;------------------
;アッパー吹き飛びステート

[Statedef 1021]
type    = A
movetype= H
physics = N

[State 1021, ]
type = changeanim2
trigger1 = time = 0
value = 1001

[State ]
type = turn
trigger1 = time = 0
trigger1 = P2dist X < 0
ignorehitpause = 1

[State 1021, Velocity]
type = VelSet
trigger1 = time = 0
trigger1 = anim = 1001
x = -3
y = -14.5

[State 200, 角度]
type = AngleDraw
trigger1 = 1
value = 45*time

[State 1021, Gravity]
type = VelAdd
trigger1 = time > 0
y = .5

[State 1021, No scroll];カメラ
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0

[State 1021, Hit ground]
type = SelfState
trigger1 = (time > 10)
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100









;---------------------------------------------------------------------------
;クラウチング〜タックル

[Statedef 1040]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = -1

[State ,];補正リセット
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != H
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,GethitVar(hitcount) <= 0
trigger5 = EnemyNear,ctrl
fvar(6) = 1
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6) = 1)
value = 1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6) = 1)
value = 1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno=12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))*1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.13
ignorehitpause = 1


[State 1008, 画像の色]
type = PalFX
triggerall = (Alive)
trigger1 = GetHitVar(hitshaketime)>0
time = GetHitVar(hitshaketime)
add = 120,150,160
sinadd = 22,5,90,3
pausemovetime = 99999999
IgnoreHitPause = 1

[State ,];アニメ
type = Varset
triggerall = anim != 1025
triggerall = var(11)=0
trigger1 = var(13)=1
trigger1 = hitpausetime = 0
var(12) = var(12)+1
ignorehitpause = 0

[State ]
type = changeanim
triggerall = anim != 1025
triggerall = hitpausetime = 0
triggerall = (Alive)
triggerall = GetHitVar(hitshaketime)=0
trigger1 = var(13)=1
value = 101
elem = (var(12))
IgnoreHitPause = 0

[State ]
type = HitOverride
trigger1 = anim = 101
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 1040


[State 1000, 7]
type = Changeanim
trigger1 = Anim = 1020
trigger1 = AnimTime = 0
trigger1 = var(13)=0
value = 101

[State ]
type = changeanim
triggerall = anim != 1020
triggerall = anim != 1025
trigger1 = anim != 101
value = 1020
IgnoreHitPause = 1

[State ];無敵
type = NotHitBy 
trigger1 = Anim = 101
value = ,NT,ST,HT

[State ];無敵
type = NotHitBy 
trigger1 = Anim = 1020
trigger1 = (palno = 12)
value = SCA,NA,SA,HA,NT,ST,HT,NP,SP,HP

[State 1000, 4]
type = lifeadd
trigger1 = (palno != 12)
trigger1 = Anim = 101
value = -(gethitvar(damage))
persistent = 0

[State ]
type = changestate
trigger1 = life = 0
value = 5000

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1020
trigger1 = animelem = 10
value = 800,0
freqmul = 0.7
persistent = 0

[State 1000, 1]
type = PlaySnd
triggerall = var(11) = 0
trigger1 = anim = 101
trigger1 = animelem = 1
value = 300,0
persistent = 0

[State 1000, 7]
type = Changeanim
triggerall = var(11) = 0
triggerall = Anim = 101
trigger1 = (P2bodydist x < 40)
trigger2 = (animelem = 200,>=0)
trigger3 = (time >= 200)
trigger4 = (animtime >= 300)
value = 1025

[State 1000, 4]
type = velset
trigger1 = var(11) = 0
trigger1 = Anim = 101
x = 13

[State 1027, Spark]
type = Explod
trigger1 = var(11) = 0
trigger1 = Anim = 101
anim = 10018
pos = -20,0
postype = p1
scale = 0.6,0.6
sprpriority = 3
persistent = 10
ignorehitpause = 1
ownpal = 1

[State 1000, 4]
type = velset
trigger1 = var(11) = 0
trigger1 = Anim = 1025
trigger1 = Animelem = 2,<=0
x = 12

[State 1000, 6]
type = HitDef
trigger1 = Anim = 1025
attr = S, ST
ID = 8080
animtype  = Hard
damage    = 50,10
priority  = 5
hitflag = M
guardflag = 
pausetime = 20,20
sparkxy = -10,-60
sparkno = S10008+random%4
hitsound   = S200,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 35
ground.velocity = -5
air.velocity = -2,-3
envshake.time = 20
envshake.freq = 120
envshake.ampl = -6
getpower = 50*(!var(16)),50*(!var(16))
givepower = 25,25

[State 1000, 7]
type = targetstate
trigger1 = movehit
trigger1 = target,movetype = H
trigger1 = (target,stateno != 1041)
trigger1 = (target,stateno != [5100,5110])
trigger1 = anim = 1025
value = 1041
ignorehitpause = 1

[State 1000, 7]
type = targetlifeadd
trigger1 = target,movetype = H
trigger1 = (target,stateno = 1041)
trigger1 = (animelem = 6)
value = -(50+((palno=12)*15))*(const(data.attack)*0.01)
ignorehitpause = 1
persistent = 0

[State 1000, 7]
type = poweradd
trigger1 = target,movetype = H
trigger1 = (target,stateno = 1041)
trigger1 = (animelem = 6)
trigger1 = (anim = 1025)
value = 50*(!var(16))
ignorehitpause = 1
persistent = 0

[State 1000, 7]
type = targetpoweradd
trigger1 = target,movetype = H
trigger1 = (target,stateno = 1041)
trigger1 = (animelem = 6)
trigger1 = (anim = 1025)
value = 25
ignorehitpause = 1
persistent = 0

[State ]
type = Envshake
trigger1 = target,movetype = H
trigger1 = (target,stateno = 1041)
trigger1 = (animelem = 6)
trigger1 = (anim = 1025)
time = 12
freq = 120
ampl = -6
persistent = 0

[State 3000, 1]
type = PlaySnd
trigger1 = target,movetype = H
trigger1 = (target,stateno = 1041)
trigger1 = (animelem = 6)
trigger1 = (anim = 1025)
value = 200,0
persistent = 0

[State 1027, Spark]
type = Explod
trigger1 = target,movetype = H
trigger1 = (target,stateno = 1041)
trigger1 = (animelem = 6)
trigger1 = (anim = 1025)
anim = 10017
pos = -20,0
postype = p2
scale = 0.6,0.6
sprpriority = 3
persistent = 0
ignorehitpause = 1
ownpal = 1
persistent = 0

[State 1000, 1]
type = TargetBind
trigger1 = anim = 1025
trigger1 = animelem = 10,<=0
time = 1
ID = 8080
pos = 10,0
ignorehitpause = 1

[State 1000, 4]
type = velset
trigger1 = var(11) = 0
trigger1 = Anim = 1025
trigger1 = animelem = 12
x = -9

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


;------------------
;タックル相手

[Statedef 1041]
type    = L
movetype= H
physics = N
anim = 5012

[State 1021, ]
type = changeanim2
trigger1 = time <= 30
value = 5012

[State 1000, 4]
type = velset
trigger1 = 1
x = 0

[State 805, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA,NA,NT,NP,SA,ST,SP,HA,HT,HP
time = 1

[State 1000, 1]
type = PlayerPush
trigger1 = 1
value = 0

[State 1000, 1]
type = SprPriority
trigger1 = time = 30
value = 2

[State 1021, ]
type = changeanim2
trigger1 = time > 30
trigger1 = (anim != 5140)
value = 5110

[State 1021, Velocity]
type = posSet
trigger1 = 0
y = 0

[State 1021, Hit ground]
type = SelfState
trigger1 = (time > 80)
trigger1 = (life < 1)
value = 5150

[State 1021, Hit ground]
type = SelfState
trigger1 = (time > 80)
value = 5120









;---------------------------------------------------------------------------
; ベストパンチ
; 
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2

[State ,];補正リセット
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != H
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,GethitVar(hitcount) <= 0
trigger5 = EnemyNear,ctrl
fvar(6) = 1
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6) = 1)
value = 1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6) = 1)
value = 1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno=12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6)*1.3)
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.13
ignorehitpause = 1



;++++++++++++++++++++++++++++++++++++++
[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 400,7

[State 背景黒]
type = BGPalFX
trigger1 = time = 0
time = 80
mul = 0,0,0
sinadd = 256,256,256,1
invertall = 0;ネガ
color = 256
pausemovetime = 999
supermovetime = 999

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 1
anim = 10023
pos = 0,-60
postype = p1
scale = 0.5,0.5
sprpriority = 3
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 1
anim = 10023
pos = 0,-60
postype = p1
scale = 0.5,0.5
sprpriority = -4
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 1
anim = 10019
pos = 0,-60
postype = p1
scale =1,1
sprpriority = -5
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 25, -57
anim = -1
sound = S400,6
time = 30
darken = 0
poweradd = -1000
persistent = 0
p2defmul = 1
movetime = 5

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 1,=1
pos = 0, -57
anim = -1
sound = -1
darken = 0
time = 50
p2defmul = 1
movetime = 45

;++++++++++++++++++++++++++++++++++
[State 40, 残像]
type = AfterImage
trigger1 = Time = 0
time = 30
palcontrast = 120,120,120
trans = add1

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2
;+++++++++++++++++++++++++++++++++++++++++++++++++


[State 3000, Super E]
type = NotHitBy
trigger1 = Time < 55
value2 = SCA,AA,AT,AP
time = 1

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

[State ]
type = Envshake
trigger1 = AnimElem = 4
time = 10
freq = 120
ampl = -6

[State 1027, Spark];爆風
type = Explod
trigger1 = AnimElem = 6
anim = 10024
pos = -20,0
postype = p1
scale = 0.5,0.5
sprpriority = -1
persistent = 0
supermovetime = 100
ownpal = 1

[State 1027, Spark];爆風
type = Explod
trigger1 = AnimElem = 6
anim = 10018
facing = -1
pos = -40,0
postype = p1
scale = 0.5,0.5
sprpriority = 3
persistent = 0
supermovetime = 100
ownpal = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 400,4

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 20
value = 400,5

[State 810, ];声
type = PlaySnd
trigger1 = animelem = 23
value = 600,6
channel = 1
volume = 300

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 8
x = 7

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 11,>=0
trigger1 = AnimElem = 12,<0
x = 2

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 15,>=0
trigger1 = AnimElem = 19,<0
x = 3

[State 3000, 4]
type = posadd
trigger1 = AnimElem = 15
x = 10

[State 3000, 6]
type = HitDef
trigger1 = AnimElem = 30
attr = S, HA
animtype  = Hard
damage    = 320/2*(fvar(6)+1),64
guardflag = MA
pausetime = 30,30
sparkno = S10008+random%4
sparkxy = -10,-75
hitsound   = S300,3
guard.sparkno = S10026
guardsound = S2,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 100
ground.velocity = -2,-16
guard.velocity = -12
air.velocity = -2,-15
airguard.velocity = -3,-3
yaccel = 0.6
fall.animtype = Hard
fall = 1
fall.recover = 0
envshake.time = 30
envshake.freq = 120
envshake.ampl = -6
getpower  = 0,0
givepower = 160,160


[State 1027, Spark];爆風
type = Explod
trigger1 = movehit
anim = 10016
pos = -10+(floor(p2bodydist X)),-80
postype = p2
scale = 0.5,0.5
sprpriority = 3
persistent = 0
ignorehitpause = 1
ownpal = 1


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



;------------------------------------------------------------
;アバラ折り

[Statedef 3010]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
velset = 0,0
anim = 1040
ctrl = 0
sprpriority = 2

[State ,];補正リセット
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != H
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,GethitVar(hitcount) <= 0
trigger5 = EnemyNear,ctrl
fvar(6) = 1
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6) = 1)
value = 1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6) = 1)
value = 1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno=12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6)*1.3)
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.13
ignorehitpause = 1

;++++++++++++++++++++++++++++++++++++++
[State 3000, Super E]
type = NotHitBy
trigger1 = Time < 16
value2 = SCA,AA,AT,AP
time = 1


[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 400,7

[State 背景黒]
type = BGPalFX
trigger1 = time = 0
time = 30
mul = 0,0,0
sinadd = 256,256,256,1
invertall = 0;ネガ
color = 256
pausemovetime = 999
supermovetime = 999

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 1
anim = 10023
pos = 0,-60
postype = p1
scale = 0.5,0.5
sprpriority = 3
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 1
anim = 10023
pos = 0,-60
postype = p1
scale = 0.5,0.5
sprpriority = -4
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 1
anim = 10019
pos = 0,-60
postype = p1
scale = 1,1
sprpriority = -5
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 25, -57
anim = -1
sound = S400,6
time = 30
darken = 0
poweradd = -1000
persistent = 0
p2defmul = 1
movetime = 10

;++++++++++++++++++++++++++++++++++

[State 1000, 4]
type = velset
trigger1 = AnimElem = 11,<0
x = 3

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 10
value = 0, 4



[State 1000, 6]
type = HitDef
trigger1 = AnimElem = 5,>=0
trigger1 = (p2stateno != [150,159])
trigger1 = (enemynear,anim != [150,159])
attr = S, ST
animtype  = Hard
damage    = 20,5
ID = 086
priority  = 5
hitflag = M
guardflag = 
guard.dist = 0
pausetime = 15,15
sparkno = S-1
sparkxy = -20,-60
hitsound   = S201,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -4,-2.5
envshake.time = 10
envshake.freq = 120
envshake.ampl = -5
p2stateno = 5000
getpower  = 0,0
givepower = 10,10

[State 1000, 7]
type = targetstate
trigger1 = movehit
trigger1 = (target,stateno != 3012)
value = 3012

[State 1000, 7]
type = ChangeState
trigger1 = (target,stateno = 3012)
value = 3011

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


;-----------------------------------------------------------
;アバラ折り・ヒット派生

[Statedef 3011]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
anim = 1041
sprpriority = 0

[State ]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze

[State 210, Width];画面端の押し戻し判定
type = Width
trigger1 = time = 0
edge = 60,60

[State 1000, 7]
type = TargetBind
trigger1 = time < 2
time = 1
ID = 086
pos = 65,-60

[State ]
type = Envshake
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
time = 3
freq = 120
ampl = -4

[State 1000, 7]
type = Targetlifeadd
triggerall = (fVar(6) = 1)
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
value = (-20-((palno=12)*6))*(fVar(6))*(const(data.attack)*0.01)

[State 1000, 7]
type = Targetlifeadd
triggerall = (fVar(6) <= 0.9)
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
value = (-20-((palno=12)*6))*(fVar(6)*0.8)*(const(data.attack)*0.01)

[State 1000, 7]
type = Targetpoweradd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
value = 10

[State 1000, 7]
type = hitadd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
trigger5 = animelem = 17
value = 1

[State 600,***];ＨＩＴ
type = Explod
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
anim = 10000+random%4
pos = 45+random%10,-50-time
postype =p1
sprpriority = 3
bindtime = -1
scale = 0.5,0.5
ownpal = 1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
value = 201,1
freqmul = 0.8

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 5
value = 500,1
freqmul = 0.8


[State 1000, 4]
type = velset
trigger1 = AnimElem = 7
x = -5

[State 1000, 4]
type = posadd
trigger1 = AnimElem = 14
trigger2 = AnimElem = 15
x = 15

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 17
value = 200,1

[State 810, ];声
type = PlaySnd
trigger1 = animelem = 17
value = 600,8
channel = 1
volume = 300

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 17
value = 200,3

[State ]
type = Envshake
trigger1 = animelem = 17
time = 30
freq = 120
ampl = -7

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 17,=1
value = 200,2

[State 1000, 1]
type = Pause
trigger1 = animelem = 17,=1
time = 20
movetime = 0

[State 600,***];波動
type = Explod
trigger1 = animelem = 17
anim = 10012
vfacing = -1
pos = 80,-80
postype =p1
sprpriority = 5
bindtime = -1
scale = 1,1
pausemovetime = 1
ownpal = 1

[State 600,***];hit
type = Explod
trigger1 = animelem = 17
anim = 10008
pos = 80,-75
postype =p1
sprpriority = 5
bindtime = -1
scale = 0.8,0.8
pausemovetime = 20
ownpal = 1

[State 1000, 7]
type = Targetlifeadd
triggerall = (fVar(6) = 1)
trigger1 = animelem = 17
value = (-200-((palno=12)*60))*(fVar(6))*(const(data.attack)*0.01)

[State 1000, 7]
type = Targetlifeadd
triggerall = (fVar(6) <= 0.9)
trigger1 = animelem = 17
value = (-200-((palno=12)*60))*(fVar(6)*0.8)*(const(data.attack)*0.01)

[State 1000, 7]
type = Targetpoweradd
trigger1 = animelem = 17
value = 100


[State 600,***];hit
type = Explod
trigger1 = animelem = 17,=2
anim = 10014
pos = 80,-75
facing = -1
postype =p1
sprpriority = 5
bindtime = -1
scale = 0.4,0.4
pausemovetime = 20
ownpal = 1


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



;---------------------------------------------------------------------------
;アバラ折り・相手喰らい

[Statedef 3012]
type    = S
movetype= H
physics = S
juggle  = 0
velset = 0,0
anim = 1042
sprpriority = 2

[State ]
type = turn
trigger1 = time = 0
trigger1 = P2dist X < 0
ignorehitpause = 1

[State 1000, 4]
type = changeanim2
trigger1 = time = 0
value = 1042

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




;---------------------------------------------------------------------------
;地上最強のファックユー

[Statedef 3030]
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
anim = 1149
sprpriority = 2

[State 1000, 7]
type = lifeadd
trigger1 = Time = 0
value = 1

[State 1000, 7]
type = velset
trigger1 = Time = 0
x = 0
y = -10

[State 1000, 7]
type = veladd
trigger1 = Time > 0
y = 0.4

[State ]
type = turn
trigger1 = time = 0
trigger1 = P2dist X < 0
ignorehitpause = 1

[State ]
type = Pause
trigger1 = (GameTime%2)=0
time = 1
movetime = 1


[State 1000, 7]
type = ChangeState
trigger1 = Time > 10
trigger1 = pos y >= 0
value = 3031
ctrl = 0

;---------------------------------------------------------------------------
;地上最強のファックユー

[Statedef 3031]
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
anim = 5101
sprpriority = 2

[State 3000, Super E]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AT,AP
time = 1

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 1000, 7]
type = velset
trigger1 = Time = 0
x = 0
y = -3

[State 1000, 7]
type = veladd
trigger1 = Time >= 0
y = 0.6

[State 1000, 7]
type = ChangeState
trigger1 = Time > 7
trigger1 = pos y >= 0
value = 3032
ctrl = 0

;---------------------------------------------------------------------------
;地上最強のファックユー

[Statedef 3032]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
anim = 1150
sprpriority = 2

[State 1000, 7]
type = velset
trigger1 = 1
x = 0
y = 0

[State 1000, 7]
type = posset
trigger1 = 1
y = 0

[State ,];補正リセット
type = Varset
trigger1 = moveguarded
trigger2 = EnemyNear,movetype != H
trigger3 = EnemyNear,statetype = L
trigger4 = EnemyNear,GethitVar(hitcount) <= 0
trigger5 = EnemyNear,ctrl
fvar(6) = 1
ignorehitpause = 1

[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6) = 1)
value = 1.3
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6) = 1)
value = 1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno=12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6)*1.3)
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.9)
value = (0.8 * fVar(6))
ignorehitpause = 1


[State , アタック]
type = AttackMulSet
trigger1 = (palno != 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.1
ignorehitpause = 1
[State , アタック]
type = AttackMulSet
trigger1 = (palno = 12)
trigger1 = (fVar(6)<= 0.1)
value = 0.13
ignorehitpause = 1

;++++++++++++++++++++++++++++++++++++++
[State 3000, Super E]
type = NotHitBy
trigger1 = Time < 20
value2 = SCA,AA,AT,AP
time = 1


[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 400,7

[State 背景黒]
type = BGPalFX
trigger1 = AnimElem = 2
time = 30
mul = 0,0,0
sinadd = 256,256,256,2
invertall = 0;ネガ
color = 256
pausemovetime = 999
supermovetime = 999

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 2
anim = 10023
pos = 0,-10
postype = p1
scale = 0.5,0.5
sprpriority = 3
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 2
anim = 10023
pos = 0,-10
postype = p1
scale = 0.5,0.5
sprpriority = -4
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 2
anim = 10019
pos = 0,-10
postype = p1
scale = 1,1
sprpriority = -5
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 2
anim = 10028
pos = 0,-80
postype = p1
scale = 0.5,0.5
sprpriority = 4
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = 25, -57
anim = -1
sound = S400,6
time = 30
darken = 0
poweradd = -1000
persistent = 0
p2defmul = 1
movetime = 0
;++++++++++++++++++++++++++++++++++

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 8
value = 400,3

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 11
value = 201,5

[State 3000, 6]
type = HitDef
trigger1 = AnimElem = 11
attr = C, HA
animtype  = Hard
damage    = 444,444
hitflag = M
guardflag = 
pausetime = 30,30
sparkno = S10008+random%4
sparkxy = -10,-40
hitsound   = S300,3
guard.sparkno = S10026
guardsound = S2,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 100
ground.velocity = -2,0
guard.velocity = -12
air.velocity = -2,-4
airguard.velocity = -3,-3
envshake.time = 30
envshake.freq = 120
envshake.ampl = -6
p2stateno = 3033
getpower  = 0,0
givepower = 222,222

[State 1000, 7]
type = lifeset
trigger1 = animtime = 0
trigger1 = roundstate = 2
value = 0

[State 1000, 7]
type = varset
trigger1 = 1
var(19) = 1

[State 1000, 7]
type = ChangeState
trigger1 = animtime = 0
value = 5150


;---------------------------------------------------------------------------
;相手やられ

[Statedef 3033]
type    = S
movetype= H
physics = S
juggle  = 0
velset = 0,0
anim = 1152
sprpriority = 2

[State 1000, 7]
type = changeanim2
trigger1 = time = 0
value = 1152

[State 1021, Hit ground]
type = SelfState
trigger1 = AnimTime = 0
trigger1 = (life < 1)
value = 5100

[State 1000, 7]
type = selfState
trigger1 = animtime = 0
value = 11
ctrl = 1




;---------------------------------------------------------------------------
;マックシング

[Statedef 3040]
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
anim = 1160
sprpriority = 2
ctrl = 0

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 400,7

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 2
anim = 10023
pos = 0,-70
postype = p1
scale = 0.5,0.5
sprpriority = 3
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 2
anim = 10023
pos = 0,-70
postype = p1
scale = 0.5,0.5
sprpriority = -4
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 2
anim = 10019
pos = 0,-70
postype = p1
scale = 1,1
sprpriority = -5
ignorehitpause = 1
supermovetime = 100
ownpal = 1

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = 25, -57
anim = -1
sound = S400,6
time = 399
darken = 10
poweradd = -3000
persistent = 0
p2defmul = 1
movetime = 399
;++++++++++++++++++++++++++++++++++

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1002,0
channel = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 38
trigger3 = AnimElem = 38,=120
value = 1003,0

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 38
value = 1004,0

[State ]
type = Envshake
trigger1 = animelem = 1
time = 250
freq = 120
ampl = -3

[State 1027, Spark]
type = Explod
trigger1 = animelem = 38,>=0
trigger1 = animelem = 39,<0
anim = 10013
pos = 75,-20
postype = p1
scale = 0.2,0.3
sprpriority = 3
supermovetime = 100
persistent = 10
ownpal = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 40,=20
value = 1005,0
channel = 1

[State 3000, 1]
type = varset
trigger1 = AnimElem = 49
var(15) = 500

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

;---------------------------------------------------------------------------
; ここから下に新しいステートを書くと分かりやすくていいと思います
;---------------------------------------------------------------------------

