;===========================================================================
; 超必
;===========================================================================

;---------------------------------------------------------------------------
;カットイン
;---------------------------------------------------------------------------

[Statedef 2000]
type    = A
movetype= A
physics = N
velset = 0,0;-34,0
juggle = 0
anim = 1;2000
ctrl = 0

[State a]
type = SelfState
triggerall = !IsHelper(2000)
trigger1 = sysfvar(2)!=gametime
value = 24640
ctrl = 1
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
value2 = S,NA
time = 9999999999999999999999999999999
ignorehitpause = 1
persistent = 1

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 22167
sprpriority = -3
postype = p1
pos = 0,-112
bindtime = 1
supermove = 1
ontop = 1
ownpal = 1

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 0
value = 2563,1

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 15
value = 2563,2

[State 2000, 6]
type = PlaySnd
trigger1 = time = 25
value = 2563,4

[State 2000, 6]
type = BindToRoot
trigger1 = 1
x = 0
y = 0

;[State 2000]
;type = VelAdd
;trigger1 = Time = [0, 15]
;x = 2

;[State 2000]
;type = VelAdd
;trigger1 = Time = [15, 20]
;x = 0.8

;[State 2000]
;type = VelAdd
;trigger1 = Time = [20, 50]
;x = -2

[State 2000]
type = DestroySelf
trigger1 = Time = 80

;---------------------------------------------------------------------------
;居合い
;---------------------------------------------------------------------------

[Statedef 3000]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 0
anim = 3000
ctrl = 0

;---------------------[超必殺技演出]

[State 3000]
type = SuperPause
trigger1 = time = 1
anim = s4500
pos = 10,-140
sound = s4,0
time = 100
movetime = 100
darken = 0
poweradd = -1000
anim = -1

[State 3000]
type = EnvColor
trigger1 = time = 1
persistent = 0
ignorehitpause = 1
time = 100
value = 0,0,0
under = 2

[State 3000, ヘルパーを出す]
type = Helper
triggerall = NumHelper(2300) = 0
trigger1 = Time = 1
name = "SuperArts"
stateno = 2000
ID = 2000
pos = 0,0
keyctrl = 0
postype = back
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 0
IgnoreHitPause = 1
Persistent = 0

[State 3000, 6];一瞬
type = PlaySnd
trigger1 = AnimElem = 1
value = 3000,0

[State 3000, 6];振り
type = PlaySnd
trigger1 = AnimElem = 5
value = 3000,2

[State 3000, 4];残像
type = AfterImage
trigger1 = animelem = 2
time = -1
trans = add1
timegap = 2
framegap = 2
length = 6
palbright = 6,6,6
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
ignorehitpause = 0

[state 3000]
type = changestate
trigger1 = AnimTime = 0
value = 3001

;---------------------------------------------------------------------------
; 光る
[Statedef 3001]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
velset = 0,0
anim = 3001
ctrl = 0

[State 3001, 4];残像消去
type = AfterImage
trigger1 = animtime = 0
time = 0

[State 3001, ヘルパーを出す]
type = Helper
trigger1 = Time = 0
name = "senko"
stateno = 3002
ID = 3002
pos = 30,0
keyctrl = 0
postype = p1
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 1
IgnoreHitPause = 1
Persistent = 0

[State 3001, ヘルパーを出す]
type = Helper
trigger1 = Time = 0
name = "senko"
stateno = 3002
ID = 3002
pos = -40,0
keyctrl = 0
postype = p1
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 1
IgnoreHitPause = 1
Persistent = 0

[State 3001, ヘルパーを出す]
type = Helper
trigger1 = Time = 0
name = "senko"
stateno = 3002
ID = 3002
pos = 100,0
keyctrl = 0
postype = p1
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 1
IgnoreHitPause = 1
Persistent = 0

[State 3001, ヘルパーを出す2]
type = Helper
trigger1 = Time = 0
name = "senko2"
stateno = 3003
ID = 3003
pos = 0,0
keyctrl = 0
postype = p1
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 1
IgnoreHitPause = 1
Persistent = 0

;---------------------[効果音]
[State 3000, 6];振り
type = PlaySnd
trigger1 = Time = 0
value = 0,3

;---------------------[効果音]
[State 3000, 6];おさめる
type = PlaySnd
trigger1 = AnimElem = 6
value = 3000,3

;---------------------[攻撃判定]
[State 3001];攻撃の指定
type = HitDef
triggerall = var(24)=0
trigger1 = Time = 0
attr = S, HA
animtype  = Back
damage    = 520,40
getpower = 0,0
hitflag = MAFLH
guardflag =
pausetime = 4,4
sparkno = s(Var(45))
sparkxy = 0,ceil(P2BodyDist Y - 70)
hitsound   = s1,4
guard.sparkno = s4000
guardsound = s1,5
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = 0,0
air.velocity = -1,20
fall = 1
air.fall = 1
fall.recover = 0
p2facing = 1

;---------------------[ステート移行]
[state 3001]
type = changestate
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 3002]
type     = A
movetype = I
physics  = N
ctrl     = 0
anim     = 3002

[State a]
type = SelfState
triggerall = !IsHelper(3002)
trigger1 = sysfvar(2)!=gametime
value = 24640
ctrl = 1
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
value2 = S,NA
time = 9999999999999999999999999999999
ignorehitpause = 1
persistent = 1

[State 3002]
type = AssertSpecial
trigger1 = AnimTime != 0
flag = noshadow


[State 3002]
type = PalFX
trigger1 = AnimElem = 4
Time = 80
add = 0,0,0
sinadd=-255,-255,-255,320
IgnoreHitPause = 1
Persistent = 4

[State 3002]
type = DestroySelf
trigger1 = AnimTime = 0

[Statedef 3003]
type     = A
movetype = I
physics  = N
ctrl     = 0
anim     = 3003

[State a]
type = SelfState
triggerall = !IsHelper(3003)
trigger1 = sysfvar(2)!=gametime
value = 24640
ctrl = 1
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
value2 = S,NA
time = 9999999999999999999999999999999
ignorehitpause = 1
persistent = 1

[State 3003]
type = AssertSpecial
trigger1 = AnimTime != 0
flag = noshadow


[State 3003]
type = PalFX
trigger1 = AnimElem = 1
Time = 40
add = 0,0,0
sinadd=-255,-255,-255,160
IgnoreHitPause = 1
Persistent = 4

[State 3003]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
;ホールピース
;---------------------------------------------------------------------------

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

[State 3200]
type = SuperPause
trigger1 = time = 1
anim = s4500
pos = 10,-140
sound = s4,0
time = 32
movetime = 32
darken = 0
poweradd = -3000
anim = -1

[State 3200]
type = EnvColor
trigger1 = time = 1
persistent = 0
ignorehitpause = 1
time = 3
value = 255,255,255
under = 2

[State 3200]
type = EnvColor
trigger1 = time = 4
persistent = 0
ignorehitpause = 1
time = 29;29
value = 0,0,0
under = 2

[state 3200]
type = varset
trigger1 = time = 0
v = 18
value = 1

[State 3200]
type = Helper
triggerall = NumHelper(2300) = 0
trigger1 = Time = 1
name = "SuperArts"
stateno = 2000
ID = 2000
pos = 0,0
keyctrl = 0
postype = back
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 0
IgnoreHitPause = 1
Persistent = 0

[State 3200, 見せてあげよう]
type = PlaySnd
trigger1 = Time = 32
value = 2200,0

[state 3200]
type = velset
trigger1 = animelem = 2
x = 11

[State 3200, 4]
type = AfterImage
trigger1 = animelem = 2
time = -1
trans = add1
timegap = 2
framegap = 2
length = 6
palbright = 6,6,6
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
ignorehitpause = 0

[State 3200]
type = HitDef
triggerall = var(24)=0
trigger1 = animelem = 2
attr = S, HA
animtype  = hard
damage    = 0,0
getpower = 0,0
hitflag = MAFLD
guardflag = M
pausetime = 4,4
sparkno = s(Var(43));7022
sparkxy = -10,-81
hitsound   = s1,9;s510,1
guard.sparkno = s4000
guardsound = s1,5;s122,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = 0,0
air.velocity = -1,-3
fall = 0
air.fall = 1
fall.recover = 0
kill = 0
p2facing = 1
p1stateno = 3202

[State 300]
type = ReversalDef
triggerall = var(24)=1
Trigger1 = Time = 0
reversal.attr = SCA,AA,AT,AP
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 3202       ;On success, KFM changes to state 810
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[state 3200]
type = changestate
trigger1 = time = 60
trigger2 = moveguarded
value = 3201

;---------------------------------------------------------------------------
;ダッシュ終了

[Statedef 3201]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 0
velset = 12,0
anim = 3201
sprpriority = 2
ctrl = 0

[State 3201, 4]
type = AfterImage
trigger1 = animtime = 0
time = 0

[state 3201]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ヒット

[Statedef 3202]
type    = S
movetype= A
physics = N
juggle  = 8
poweradd= 0
velset = 12,0
anim = 3202
sprpriority = 2
ctrl = 0

[State 3202, 2]
type = TargetBind
trigger1 = 1
pos = 79,-10

[state 3202]
type = targetstate
trigger1 = time = 0
value = 3210

[state 3202]
type = screenbound
trigger1 = time > 500
value = 1

[state 3202]
type = changestate
trigger1 = FrontEdgeBodyDist < 50
trigger2 = facing = 1
trigger2 = NumHelper(7000)
trigger2 = Helper(7000),Pos X - 80 < Pos X
trigger3 = facing = -1
trigger3 = NumHelper(7001)
trigger3 = Helper(7001),Pos X + 80 > Pos X
value = 3203

;---------------------------------------------------------------------------
;壁にあたる

[Statedef 3203]
type    = S
movetype= A
physics = N
juggle  = 8
poweradd= 0
velset = 0,0
anim = 3203
sprpriority = 2
ctrl = 0

[State 3203]
type = BGPalfx
trigger1 = 1
time = 3
mul = 0,0,0
under = 2

[State 3203]
type = AfterImage
trigger1 = animelem = 2
time = 0

[State 3203]
type = EnvShake
trigger1 = time = 0
time = 10
ampl = -5
freq = 95
phase = 95

[State 3203]
type = Explod
trigger1 = time = 0
anim = 7002
id = 3000
sprpriority = 2
postype = p1
pos = 62,-68
bindtime = 1
supermove = 0
under = 0

[state 3203]
type = playsnd
trigger1 = time = 0
value  = 6,0

[state 3203]
type = velset
trigger1 = animelem = 2
x = -8

[state 3203]
type = veladd
trigger1 = animelem = 2,>= 0
x = 0.2

[State 3203]
type = Width
trigger1 = time = 0
edge = 75,0

[State 3203]
type = TargetBind
trigger1 = time = 0
pos = 100,0

[state 3203]
type = targetstate
trigger1 = time = 0
value = 3211

[state 3203]
type = changestate
trigger1 = time = 64
value = 3204

;---------------------------------------------------------------------------
;準備

[Statedef 3204]
type    = S
movetype= A
physics = N
juggle  = 8
poweradd= 0
velset = 0,0
anim = 3204
sprpriority = 0
ctrl = 0

[State 3206]
type = PalFX
trigger1 = AnimElem = 10
time = 80
add = 0,0,0
sinadd = -255,-255,-255,320

[State 3204]
type = BGPalfx
trigger1 = 1
time = 3
mul = 0,0,0
under = 2

[state 3204, カーネルの真髄]
type = playsnd
trigger1 = animelem = 8
value  = 2200,1

[state 3204]
type = changestate
trigger1 = animelemtime(10) = 80
value = 3205

;---------------------------------------------------------------------------
; 投擲

[Statedef 3205]
type    = S
movetype= A
physics = N
juggle  = 8
poweradd= 0
velset = 0,0
anim = 3205
sprpriority = 0
ctrl = 0

[State 3205]
type = BGPalfx
trigger1 = 1
time = 3
mul = 0,0,0
under = 2

[State 3205]
type = Explod
trigger1 = animelem = 2
trigger2 = animelem = 6
trigger3 = animelem = 10
trigger4 = animelem = 14
trigger5 = animelem = 18
trigger6 = animelem = 22
anim = Var(44);7022
id = 3000
sprpriority = 2
postype = p1
pos = 180,-95
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 4
trigger2 = animelem = 8
trigger3 = animelem = 12
trigger4 = animelem = 16
trigger5 = animelem = 20
trigger6 = animtime = 0
trigger7 = animelem = 1
anim = Var(44);7022
id = 3000
sprpriority = 2
postype = p1
pos = 175,-45
bindtime = 1
supermove = 0
under = 0

[state 3205]
type = playsnd
trigger1 = animelem = 1
trigger2 = animelem = 5
trigger3 = animelem = 9
trigger4 = animelem = 13
trigger5 = animelem = 17
trigger6 = animelem = 21
trigger7 = animtime = 0
value  = 0,0

[state 3205]
type = playsnd
trigger1 = animelem = 1
trigger2 = animelem = 5
trigger3 = animelem = 9
trigger4 = animelem = 13
trigger5 = animelem = 17
trigger6 = animelem = 21
value  = 2200,2

[state 3205]
type = playsnd
trigger1 = animelem = 2
trigger2 = animelem = 6
trigger3 = animelem = 10
trigger4 = animelem = 14
trigger5 = animelem = 18
trigger6 = animelem = 22
value  = 1,0

[State 3205]
type = Explod
trigger1 = animelem = 1
trigger2 = animtime = 0
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 180,-65
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 2
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 197,-104
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 3
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 143,-12
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 4
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 187,-44
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 5
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 209,-38
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 6
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 98,-102
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 7
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 164,-25
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 8
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 121,-8
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 9
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 152,-71
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 10
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 172,-116
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 11
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 142,-91
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 12
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 90,-17
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 13
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 132,-43
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 14
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 174,-89
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 15
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 140,-15
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 16
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 214,-61
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 17
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 118,-34
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 18
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 162,-116
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 19
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 152,-42
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 20
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 107,-118
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 21
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 109,-1
bindtime = 1
supermove = 0
under = 0

[State 3205]
type = Explod
trigger1 = animelem = 22
anim = 3230
id = 3000
sprpriority = 2
postype = p1
pos = 130,-92
bindtime = 1
supermove = 0
under = 0


;---------------------[ヘルパー]
[state 3205]
type = Helper
trigger1 = time = 1
id = 3000
name = "chicken"
sprpriority = 2
pos = 180,-100
postype = p1
stateno = 3220
helpertype = normal
keyctrl = 0 
ownpal = 1

[state 3205]
type = Helper
trigger1 = time = 3
id = 3000
name = "chicken"
sprpriority = 2
pos = 190,-30
postype = p1
stateno = 3220
helpertype = normal
keyctrl = 0 
ownpal = 1

[state 3205]
type = Helper
trigger1 = time = 2
id = 3000
name = "chicken"
sprpriority = 2
pos = 170,-100
postype = p1
stateno = 3221
helpertype = normal
keyctrl = 0 
ownpal = 1

[state 3205]
type = Helper
trigger1 = time = 3
id = 3000
name = "chicken"
sprpriority = 2
pos = 180,-30
postype = p1
stateno = 3221
helpertype = normal
keyctrl = 0 
ownpal = 1

[state 3205]
type = targetstate
trigger1 = time = 2
value = 3212

[state 3205]
type = hitadd
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
trigger4 = animelem = 8
trigger5 = animelem = 10
trigger6 = animelem = 12
trigger7 = animelem = 14
trigger8 = animelem = 16
trigger9 = animelem = 18
trigger10= animelem = 20
trigger11= animelem = 22
value  = 1

[state 3205]
type = targetlifeadd
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
trigger4 = animelem = 8
trigger5 = animelem = 10
trigger6 = animelem = 12
trigger7 = animelem = 14
trigger8 = animelem = 16
trigger9 = animelem = 18
trigger10= animelem = 20
trigger11= animelem = 22
value  = ifelse((time/2)%2 = 0,-8,-10)
kill = 0

[state 3205]
type = changestate
trigger1 = time >= 203
value = 3206

;---------------------------------------------------------------------------
; 終わり

[Statedef 3206]
type    = S
movetype= A
physics = N
juggle  = 8
poweradd= 0
velset = 0,0
anim = 3206
ctrl = 0

[State 3206]
type = BGPalfx
trigger1 = time = 0
time = 1
mul = 0,0,0
under = 2

[State 3206]
type = PalFX
trigger1 = AnimElem = 1
time = 40
add = -255,-255,-255
sinadd = 255,255,255,160

[State 3206]
type = Explod
trigger1 = time = 0
anim = Var(44)
id = 3000
sprpriority = 2
postype = p1
pos = 180,-65
bindtime = 1
supermove = 0
under = 0

[state 3206]
type = playsnd
trigger1 = AnimElem = 1
value = 88,11
channel = 5

[state 3206]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3206]
type = null
trigger1 = animelem = 2
value = 2200,2

[state 3206]
type = Helper
trigger1 = time = 0
id = 3000
name = "chicken"
sprpriority = 2
pos = 180,-60
postype = p1
stateno = 3225
helpertype = normal
keyctrl = 0 
ownpal = 1

[state 3206]
type = targetstate
trigger1 = time = 12
value = 3213

[state 3206]
type = hitadd
trigger1 = time = 0
value  = 1

[state 3206]
type = targetlifeadd
trigger1 = time = 0
value  = -120

[state 3206]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;チキン1

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

[State 3220]
type = destroyself
trigger1 = root,stateno != 3205

;---------------------------------------------------------------------------
;チキン2

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

[state 3221]
type = changeanim
trigger1 = root,stateno != 3205
trigger1 = anim = 3221
value = 3223

[State 3221]
type = destroyself
trigger1 = animtime = 0
trigger1 = anim = 3223

;---------------------------------------------------------------------------
;チキン3

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

[state 3222]
type = changeanim
trigger1 = root,stateno != 3205
trigger1 = anim = 3222
value = 3224

[State 3222]
type = destroyself
trigger1 = animtime = 0
trigger1 = anim = 3224

;---------------------------------------------------------------------------
;チキン4
[Statedef 3225]
type = S
ctrl = 0
anim = 3225
velset = 0,0
movetype = A
physics = S
sprpriority = 2

[State 3225]
type = destroyself
trigger1 = animtime = 0


;---------------------------------------------------------------------------
;相手

[Statedef 3210]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 3210, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3211

[State 3210];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 1,0

;---------------------------------------------------------------------------
;叩きつけられる相手

[Statedef 3211]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 3211]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3211

[State 3211];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 0,0

;---------------------------------------------------------------------------
;チキンを投げつけられる相手

[Statedef 3212]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 3212, 1]
type = DefenceMulset
Trigger1 = 1
value = 1.0

[State 3212, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3212

[State 3212];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 0,0

;---------------------------------------------------------------------------
;相手終わり

[Statedef 3213]
type    = A
movetype= H
physics = N
velset = -6,-9.5
sprpriority = 1

[State 3213]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3213]
type = ChangeAnim
Trigger1 = Time = 0
value = 5050

[state 3213]
type = changeanim
trigger1 = time= 0
trigger1 = SelfAnimExist(5052) = 1
value = 5052

[state 3213]
type = changeanim
trigger1 = time= 18
trigger1 = SelfAnimExist(5062) = 1
value = 5062

[State 3213]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 3213]
type = VelAdd
Trigger1 = 1
y = .41

[State 3213] 
type = SelfState
triggerall = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
;ツイスター
;---------------------------------------------------------------------------

;投げ開始

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

[State 3300]
type = SuperPause
trigger1 = time = 0
anim = s4500
pos = 10,-140
sound = s4,0
time = 80
movetime = 1
darken = 0
poweradd = -1000
anim = -1

[State 3300]
type = EnvColor
trigger1 = time = 0
persistent = 0
ignorehitpause = 1
time = 80
value = 0,0,0
under = 2

[State 3300]
type = Helper
triggerall = NumHelper(2300) = 0
trigger1 = Time = 0
name = "SuperArts"
stateno = 2000
ID = 2000
pos = 0,0
keyctrl = 0
postype = back
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 0
IgnoreHitPause = 1
Persistent = 0

[State 3300, 1]
type = HitDef
triggerall = var(24)=0
Trigger1 = Time = 0
attr = S, HT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 3302       ;On success, KFM changes to state 810
p2stateno = 3310       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 300]
type = ReversalDef
triggerall = var(24)=1
Trigger1 = Time = 0
reversal.attr = SCA,AA,AT,AP
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 3302       ;On success, KFM changes to state 810
p2stateno = 3310       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 3300]
type = AfterImage
trigger1 = animelem = 2
time = -1
trans = add1
timegap = 2
framegap = 2
length = 6
palbright = 6,6,6
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
ignorehitpause = 0

[State 3300]
type = PlaySnd
trigger1 = Time = 0
value = s3300,0

[State 3300, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 3301

;---------------------------------------------------------------------------
;投げ失敗

[Statedef 3301]
type    = S
movetype= I
physics = N
anim = 3301
SprPriority = 0

[State 3000, 4]
type = AfterImage
trigger1 = Time = 0
time = 0

[State 3301]
type = ChangeState
Trigger1 = AnimTime = 0
ctrl = 1
value = 0

;---------------------------------------------------------------------------
;投げる

[Statedef 3302]
type    = S
movetype= A
physics = N
anim = 3302
SprPriority = 3

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
value = S1,9

[State 3302, Playerpush]
type = Playerpush
trigger1 = 1
value = 0

[State 3302, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = ceil(68*const(size.xscale)), ceil(-87*const(size.xscale))

[State 3302, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = ceil(40*const(size.xscale)), ceil(-48*const(size.xscale))

[State 3302, TargetBind]
type = SprPriority
trigger1 = AnimElem = 3
value = -1

[State 3302, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3
SprPriority = 56
pos = ceil(-60*const(size.xscale)), ceil(-15*const(size.yscale))

[State 3302, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 3303

;--------------------------------------------------------------------
跳ぶ

[Statedef 3303]
type    = A
movetype= A
physics = A
velset = 1.0,-20
anim = 3303

[State 3300]
type = PlaySnd
trigger1 = Time = 0
value = s3300,1

[State 5110, 6]
type = PlaySnd
trigger1 = Time%8 = 0
value = s0,1

[State 3303]
type = SprPriority
trigger1 = AnimElem = 1
value = 3

[State 3303, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = ceil(-20*const(size.xscale)), ceil(-80*const(size.xscale))

[State 3303, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = ceil(0*const(size.xscale)), ceil(-80*const(size.xscale))

[State 3303]
type = SprPriority
trigger1 = AnimElem = 3
value = -1

[State 3303, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3
SprPriority = 56
pos = ceil(20*const(size.xscale)), ceil(-80*const(size.yscale))

[State 3303, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4
SprPriority = 56
pos = ceil(0*const(size.xscale)), ceil(-80*const(size.yscale))

[State 3303]
type = ChangeState
trigger1 = Vel Y > 0
value = 3304

;---------------------------------------------------------------------------
落ちる

[Statedef 3304]
type    = A
movetype= A
physics = A
SprPriority = 3
anim = 3304

[State 3304, TargetBind]
type = TargetBind
trigger1 = 1
pos = ceil(0*const(size.xscale)), ceil(8*const(size.xscale))

[State 3304]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 3305

;---------------------------------------------------------------------------
激突

[Statedef 3305]
type    = S
movetype= I
physics = N
SprPriority = 3
velset = 0,0
anim = 3304

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

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
value = S6,0

[State -2, Poweradd]
type = TargetPoweradd
trigger1 = Time = 0
value = 60

[State -2, TargetLifeadd]
type = TargetLifeadd
trigger1 = Time = 0
value = -260

[State 3305]
type = PosSet
trigger1 = Time = 0
y = 0

[State 810, Envshake]
type = Envshake
trigger1 = Time = 0
time = 20
freq = 80
ampl = -8

[State 3304, TargetBind]
type = TargetBind
trigger1 = 1
pos = 0, 0

[State 3305]
type = ChangeState
trigger1 = Time = 20
value = 3306

;---------------------------------------------------------------------------
終わり

[Statedef 3306]
type    = S
movetype= I
physics = N
SprPriority = 0
velset = 0,0
anim = 3305

[State 3000, 4]
type = AfterImage
trigger1 = Time = 0
time = 0

[State 3306]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3306, TargetBind]
type = TargetBind
trigger1 = 1
pos = 1, 0

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

;------------------------------------------------------------------
; 相手
[Statedef 3310]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
SprPriority = 1

[State 3000, 4]
type = AfterImage
trigger1 = Time = 0
time = -1
trans = add1
timegap = 2
framegap = 2
length = 6
palbright = 6,6,6
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
ignorehitpause = 0

[State 802, 1]
type = ScreenBound
Trigger1 = 1
value = 1

[State 3310, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 3310

[State 3310, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 3311

;------------------------------------------------------------------
; 相手跳ぶ
[Statedef 3311]
type    = A
movetype= H
physics = N
SprPriority = 1

[State 5100, 2]
type = ChangeAnim2
trigger1 = time = 0
value = 3311

[State 5100, 12]
type = ChangeState
trigger1 = EnemyNear,Vel Y > 0
value = 3312

;---------------------------------------------------------------------------
; 相手落ちる
[Statedef 3312]
type    = A
movetype= H
physics = N

[State 3312, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 3312

[State 3312, 6]
type = ChangeState
trigger1 = EnemyNear,Vel Y > 0 && EnemyNear,Pos Y >= -10
value = 3313

;---------------------------------------------------------------------------
; 相手激突
[Statedef 3313]
type    = L
movetype= H
physics = N

[State 3000, 4]
type = AfterImage
trigger1 = Time = 0
time = 0

[State 3313, 6]
type = SelfState
trigger1 = Time = 20
value = 5110

;---------------------------------------------------------------------------
;プレッシャーフライヤー
;---------------------------------------------------------------------------

[Statedef 3400]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 0
anim = 10000
ctrl = 0

[State 3400]
type = SuperPause
trigger1 = time = 20
anim = s4500
pos = 10,-140
sound = s4,0
time = 50
movetime = 1
darken = 0
poweradd = -1000
anim = -1

[State 3400]
type = EnvColor
trigger1 = time = 20
persistent = 0
ignorehitpause = 1
time = 50
value = 0,0,0
under = 2

[State 3400]
type = Helper
triggerall = NumHelper(2300) = 0
trigger1 = Time = 20
name = "SuperArts"
stateno = 2000
ID = 2000
pos = 0,0
keyctrl = 0
postype = back
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 0
IgnoreHitPause = 1
Persistent = 0

[state 1200, 1]
type = Helper
trigger1 = Time = 34
ID = 3400
pos = ceil(P2Dist X), 0
postype = p1
stateno = 3401
helpertype = normal
name = "pressure fryer"
keyctrl = 1
ownpal = 1

[state 3400]
type = PlaySnd
trigger1 = Time = 0
value = s3,3

[state 3400]
type = changestate
trigger1 = AnimTime = 0
ctrl = 1
value = 0

;---------------------------------------------------------------------------
圧力釜

[Statedef 3401]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 3400
sprpriority = -10

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
value2 = S,NA
time = 9999999999999999999999999999999
ignorehitpause = 1
persistent = 1

[State 3401, Explod]
type = Explod
trigger1 = Time%8 = 0
anim = 4022
ID = 4022
pos = Random%128-64,-20
postype = P1
sprpriority = 3
ownpal = 1

[State 3401, 7]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3401, 8]
type = HitDef
triggerall = parent,var(24)=0
trigger1 = Time = 0
attr = C, HT
hitflag = MAF
guardflag = MA
getpower = 50,30
priority = 3, Miss
hitsound   = S800,0
guardsound = S6,0
Guard.pausetime = 0,80
ground.hittime  = 0
numhits = 0
sparkno = -1
p1stateno = 3402
p2stateno = 3410
fall = 1

[State 300]
type = ReversalDef
triggerall = var(24)=1
Trigger1 = Time = 0
reversal.attr = SCA,AA,AT,AP
getpower = 50,30
priority = 3, Miss
hitsound   = S800,0
guardsound = S6,0
Guard.pausetime = 0,80
ground.hittime  = 0
numhits = 0
sparkno = -1
p1stateno = 3402
p2stateno = 3410
fall = 1

[State 3401, 9]
type = Changestate
trigger1 = time >= 100
trigger2 = movecontact
value = 3404

;---------------------------------------------------------------------------
;圧力鍋　引きずり込む

[Statedef 3402]
type    = A
movetype= A
physics = N
anim = 3400
sprpriority = -10

[State 3402, 1] 
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3402, 2]
type = PlaySnd
trigger1 = time = 0
value = 1200,10

[state 3402, 1]
type = Helper
trigger1 = Time = 0
ID = 3404
pos = 0, -200
postype = p1
stateno = 3405
helpertype = normal
name = "futa"
keyctrl = 0
ownpal = 1

[State 3402, 3]
type = Targetbind
trigger1 = NumTarget
trigger1 = time < 99
pos = 0,0

[State 3402, 4]
type = PlaySnd
trigger1 = time = 105
value = 1200,15

[State 3402, 5]
type = TargetLifeadd
trigger1 = NumTarget
trigger1 = time = [30,99]
value = -4
absolute = 1

[State 3402,14]
type = Changestate
trigger1 = time = 100
value = 3403

;---------------------------------------------------------------------------
;鍋爆発

[Statedef 3403]
type    = A
movetype= I
physics = N
anim = 4300
sprpriority = 8

[State 3402, 8]
type = Hitadd
trigger1 = time = 0
value = 1

[State 3402, 9]
type = TargetLifeadd
trigger1 = time = 0
value = -450
absolute = 1

[State 3402,11]
type = EnvShake
trigger1 = time = 0
time = 24
freq = 120
ampl = -5

[State 3402,12]
type = TargetVelset
trigger1 = Numtarget
trigger1 = time = 0
y = -Const(size.yscale)*20

[State 3402,13]
type = Targetstate
trigger1 = Numtarget
trigger1 = time = 0
value = 3412

[State 3403, Explod]
type = Explod
trigger1 = Time%2 = 0
anim = 195
ID = 195
pos = Random%128-64,0
postype = P1
sprpriority = 3
ownpal = 1

[State 3403, Explod]
type = Explod
trigger1 = Time%4 = 0
anim = 195
ID = 195
pos = 0,0
postype = P2
sprpriority = 3
ownpal = 1

[State 3403, 1]
type = PlaySnd
trigger1 = Time = 0
value = s6,6

[State 3403, 1] 
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3403, 4]
type = Destroyself
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
;鍋消える

[Statedef 3404]
type    = A
movetype= I
physics = N
anim = 3400
sprpriority = -8

[State 3404, 1] 
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 3401, Explod]
type = Explod
trigger1 = Time%8 = 0
anim = 4022
ID = 4022
pos = Random%128-64,-20
postype = P1
sprpriority = 3
ownpal = 1

[State 3404, 4]
type = Destroyself
trigger1 = time >= 80

;---------------------------------------------------------------------
蓋

[Statedef 3405]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 3401
ctrl = 0
sprpriority = 8

[State 3405]
type = VelAdd
trigger1 = Time > 0
y = .35

[State 3405]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 3406

;---------------------------------------------------------------------------
;蓋着地

[Statedef 3406]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 3401
ctrl = 0
sprpriority = 8

[State 3406]
type = PlaySnd
trigger1 = Time = 0
value = s3400,0

[State 3406]
type = PlaySnd
trigger1 = Time = 0
value = s3400,0

[State 3406]
type = PalFX
trigger1 = Time = 0
time = 167
sinadd=128,0,0,668

[State 3406]
type = Posset
trigger1 = Time = 0
y = 0

[State 3406]
type = Velset
trigger1 = Time = 0
y = 0

[State 3406]
type = DestroySelf
trigger1 = Time = 67

;---------------------------------------------------------------------
;相手

[Statedef 3410]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = 0

[State 3410, 1]
type = Changeanim2
trigger1 = time = 0
value = 3402

[State 3410, 5]
type = PlaySnd
triggerall = !alive
trigger1 = time = [120,163]
trigger1 = time % 3 = 2
trigger2 = time = 186
value = 11,0
channel = 30

[State 3411, 0]
type = AngleDraw
trigger1 = time > 0
scale = 1.0-Time*0.01,1.0-Time*0.01

[State 3410, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 3411

;---------------------------------------------------------------------
;倒れている相手

[Statedef 3411]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = 0

[State 3412, 3]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 100

[State 3411, 0]
type = AngleDraw
trigger1 = time > 0
scale = .1, .1

[State 3411, 1]
type = Changeanim2
trigger1 = time = 0
value = 5110

;-----------------------
;吹っ飛ぶ相手
[Statedef 3412]
type    = A
movetype= H
physics = N
sprpriority = 3
anim = 5050

[State 3402, 3]
type = ScreenBound
trigger1 = time = 0
value = 1

[State 3406]
type = PalFX
trigger1 = Time = 0
time = 80
add = 150,0,-100
sinadd = 50,50,0,10
color = 0
invertall = 1

[State 3412, 1]
type = ChangeAnim
Trigger1 = time = 0
Trigger1 = SelfAnimExist(5051)
Trigger1 = anim != 5051
value = 5051

[State 3412, 2]
type = ChangeAnim
Trigger1 = Vel Y > -1
Trigger1 = SelfAnimExist(5061)
Trigger1 = anim != 5061
value = 5061

[State 3412, 3]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 1

[State 3412, 4]
type = Veladd
Trigger1 = 1
Y = 0.55

[State 3412, 5]
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = ifelse(Pos Y >= -20,5200,5210)

[State 3412, 6]
type = Selfstate
Trigger1 = Vel Y > 0
Trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
;カーネル３ダース
;---------------------------------------------------------------------------

;開始

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

[State 3500]
type = SuperPause
trigger1 = time = 0
anim = s4500
pos = 10,-140
sound = s4,0
time = 80
movetime = 1
darken = 0
poweradd = -2000
anim = -1

[State 3500]
type = EnvColor
trigger1 = time = 0
persistent = 0
ignorehitpause = 1
time = 80
value = 0,0,0
under = 2

[State 3500, ヘルパーを出す]
type = Helper
triggerall = NumHelper(2300) = 0
trigger1 = Time = 0
name = "SuperArts"
stateno = 2000
ID = 2000
pos = 0,0
keyctrl = 0
postype = back
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 0
IgnoreHitPause = 1
Persistent = 0

[State 3500, 4];残像
type = AfterImage
trigger1 = Time = 0
time = -1
trans = add1
timegap = 2
framegap = 2
length = 6
palbright = 6,6,6
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
ignorehitpause = 0

[State 3500, 4];残像
type = AfterImage
trigger1 = AnimTime = 0
time = 0

[State 3500, ヒット定義]
type = HitDef
id = 3500
triggerall = var(24)=0
trigger1 = Time = 0
attr             = S, HA
animtype         = Up
damage           = 40,4
getpower         = 30,10
hitflag		 = MA
guardflag        = MA
priority         = 5
pausetime        = 8,12
sparkno          = s(var(44))
sparkxy          = -10,-48
guard.sparkno    = s4000
hitsound         = s1,3
guardsound       = s1,5
ground.type      = Low
ground.slidetime = 16
ground.hittime   = 19
ground.velocity  = -2.4,-8
guard.velocity   = -7
air.velocity     = -2.4,0
airguard.velocity= -6,-4.5
p2stateno = 3510

[State 300]
type = ReversalDef
triggerall = var(24)=1
Trigger1 = Time = 0
reversal.attr = SCA,AA,AT,AP
animtype         = Up
damage           = 40,4
getpower         = 30,10
hitflag		 = MA
guardflag        = MA
priority         = 5
pausetime        = 8,12
sparkno          = s(var(44))
sparkxy          = -10,-48
guard.sparkno    = s4000
hitsound         = s1,3
guardsound       = s1,5
ground.type      = Low
ground.slidetime = 16
ground.hittime   = 19
ground.velocity  = -2.4,-8
guard.velocity   = -7
air.velocity     = -2.4,0
airguard.velocity= -6,-4.5
p2stateno = 3510

[State 3412, 3]
type = NotHitBy
trigger1 = MoveHit
value = SCA
time = 1

[State 3500]
type = ChangeState
trigger1 = (Time > 30)&&(MoveHit)
value = 3501

[State 3500]
type = PlaySnd
trigger1 = Time = 0
value = s3,4

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

;---------------------------------------------------------------------------
ヒット後

[Statedef 3501]
type    = S
movetype= A
physics = N
juggle  = 0
ctrl = 0
anim = 40
sprpriority = 2

[State 3412, 3]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 1

[State 3501]
type = ChangeState
trigger1 = AnimTime = 0
value = 3502
;---------------------------------------------------------------------------
飛び上がり

[Statedef 3502]
type    = A
movetype= A
physics = N
juggle  = 0
velset = -3,-20
ctrl = 0
anim = 41
sprpriority = 2

[State 3412, 3]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 1

[State 3502]
type = ScreenBound
trigger1 = Time = 0
value = 1

[State 3502]
type = ChangeState
trigger1 = Pos Y < -300
value = 3503

;---------------------------------------------------------------------------
空中停止、他メイン処理

[Statedef 3503]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3503, 3]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 1

[State 3505, 4];残像
type = AfterImage
trigger1 = Time = 0
time = 0

[state 3503]
type = AssertSpecial
trigger1 = Time >= 0
flag = invisible

[state 3503]
type = PosSet
trigger1 = Time = 1
x = Target(3500),Pos X
y = Target(3500),Pos Y

[state 3503]
type = VarSet
trigger1 = Time = 0
v = 20
value = ceil(Target(3500),Pos X)

[state 3503]
type = VarSet
trigger1 = Time = 0
v = 21
value = ceil(Target(3500),Pos Y)

[state 3503, 1]
type = Helper
trigger1 = Time = 350
ID = 3530
pos = ceil(Target(3500),Pos X - Pos X)*Facing - 200, ceil(Target(3500),Pos Y - Pos Y-200);
postype = p1
stateno = 3530
helpertype = normal
name = "colonel kick"
ownpal = 1

[state 3503, 1]
type = Helper
trigger1 = (Time%10 = 0) && (Time < 340)
ID = 3520
pos = ceil((Target(3500),Pos X - Pos X)*Facing + 200*cos(Random)), ceil(Target(3500),Pos Y - Pos Y + 200*sin(Random));
postype = p1
stateno = 3520
helpertype = normal
name = "doll"
ownpal = 1

[state 3503,2]
type = Explod
trigger1 = Var(22) > 0
anim = Var(44)
ID = Var(44)
pos = ceil(Target(3500),Pos X - Pos X)*Facing + Random%64-32,ceil(Target(3500),Pos Y - Pos Y) + Random%64-32
postype = P1
sprpriority = 3
ownpal = 1

[state 3503]
type = TargetBind
trigger1 = Time > 13
pos = (Var(20) - Pos X)*Facing + Random%6 - 3, Var(21) - Pos Y + Random%6 - 3

[state 3503,2]
type = PlaySnd
trigger1 = Var(22) > 0
trigger1 = HitCount != 35
value = s1,3

[state 3503,2]
type = PlaySnd
trigger1 = Var(22) > 0
trigger1 = HitCount = 35
value = s4,2

[state 3503,2]
type = HitAdd
trigger1 = Var(22) > 0
value = 1

[state 3503,2]
type = TargetLifeAdd
trigger1 = Var(22) > 0
kill = (HitCount = 35)
value = ifelse(HitCount = 35,-60,-8)

[state 3503,2]
type = VarSet
trigger1 = Var(22) > 0
v = 22
value = Var(22) - 1

[State 3503]
type = ChangeState
trigger1 = NumHelper(3530)
trigger1 = Helper(3530),StateNo = 3531
value = 3504

;---------------------------------------------------------------------------
ターゲットを吹っ飛ばして自分はヘルパーの位置に移動

[Statedef 3504]
type    = A
movetype= A
physics = N
juggle  = 0
ctrl = 0
sprpriority = 2

[State 3412, 3]
type = NotHitBy
Trigger1 = 1
value = SCA
time = 1

[state 3503]
type = AssertSpecial
trigger1 = Time >= 0
flag = invisible

[State 3504]
type = TargetState
trigger1 = Time = 0
trigger1 = NumHelper(3530)
value = 3512

[State 3504]
type = PosSet
trigger1 = NumHelper(3530)
trigger1 = Helper(3530),Pos Y > -10
x = Helper(3530),Pos X
y = 0

[State 3504]
type = ChangeState
trigger1 = NumHelper(3530)
trigger1 = Helper(3530),Pos Y > -10
trigger2 = time = 200
value = 52

;---------------------------------------------------------------------------
相手

[Statedef 3510]
type    = A
movetype= H
physics = N
juggle  = 0
velset = 0,-10
ctrl = 0
sprpriority = 2

[State 3510]
type = ChangeAnim2
trigger1 = Time = 0
value = 3510

[State 3510]
type = ChangeState
trigger1 = Pos Y < -150
value = 3511

;---------------------------------------------------------------------------
相手たこ殴り

[Statedef 3511]
type    = A
movetype= H
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3511]
type = Null
trigger1 = 1

;---------------------------------------------------------------------------
相手吹っ飛ぶ

[Statedef 3512]
type    = A
movetype= H
physics = N
juggle  = 0
velset = -16,16
ctrl = 0
sprpriority = 2

[State 3512]
type = Selfstate
trigger1 = Time = 0
value = 5050

;---------------------------------------------------------------------------
;飛来する人形
[Statedef 3520]
type     = A
movetype = I
physics  = N
ctrl     = 0
SprPriority = 2
anim = 3520

[State 3520, 1]
type = VelSet
trigger1 = time = 0
x = (Root,Var(20)-Pos X)*Facing/6
y = (Root,Var(21)-Pos Y)/6

[State 3520, 人形のヒットフラグ]
type = VarSet
trigger1 = Root,Var(20)-Pos X = [-20,20]
trigger1 = Root,Var(21)-Pos Y = [-20,20]
v = 22
value = Var(22) + 1

[State 3520, 人形のヒットフラグ]
type = ParentVarSet
trigger1 = Var(22) = 1
v = 22
value = Root,Var(22) + 1

[State 3520, 人形のヒットフラグ]
type = VarSet
trigger1 = Var(22) = 1
v = 22
value = 2

[State 3520]
type = AssertSpecial
trigger1 = Time >= 0
flag = noshadow
flag2 = noautoturn
IgnoreHitPause = 1
Persistent = 1

[State 3520]
type = AngleSet
trigger1 = Time = 0
trigger1 = Vel X != 0
value = 90-ceil(atan((Vel Y)/(Vel X))*180/Pi)

[State 3520]
type = AngleDraw
trigger1 = Time >= 0

[State 3520]
type = DestroySelf
trigger1 = Time = 100

;---------------------------------------------------------------------------
;飛来するカーネルおじさん
[Statedef 3530]
type     = A
movetype = I
physics  = N
ctrl     = 0
SprPriority = 2
anim = 3501

[State 3530, 1]
type = VelSet
trigger1 = time = 0
x = 15
y = 15

[State 3530, ヒットフラグ]
type = VarSet
trigger1 = (Root,Var(20)-Pos X)*Facing = [20,40]
trigger1 = Root,Var(21)-Pos Y = [20,40]
v = 22
value = Var(22) + 1

[State 3530, 親のヒットフラグ]
type = ParentVarSet
trigger1 = Var(22) = 1
v = 22
value = Root,Var(22) + 1

[State 3530]
type = ChangeState
trigger1 = Var(22) = 1
value = 3531

;---------------------------------------------------------------------------
;飛来するカーネルおじさん衝突後

[Statedef 3531]
type     = A
movetype = I
physics  = N
ctrl     = 0
velset	 = 0,0
SprPriority = 2
anim = 3502

[State 3531]
type = VelSet
trigger1 = time = 10
x = 15
y = 15

[State 3531]
type = AssertSpecial
trigger1 = Time >= 0
flag = noshadow
flag2 = noautoturn
IgnoreHitPause = 1
Persistent = 1

[State 3531]
type = DestroySelf
trigger1 = Time = 100
trigger2 = Root,StateNo = 52
;-------------------------------------------------------------------------------
[Statedef 32030]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 0
anim = 32030
ctrl = 0
poweradd=-3000

[State 3000, ヘルパーを出す]
type = Helper
triggerall = NumHelper(2300) = 0
trigger1 = Time = 1
name = "SuperArts"
stateno = 2000
ID = 2000
pos = 0,0
keyctrl = 0
postype = back
supermovetime = 99999999
pausemovetime = 99999999
ownpal = 0
IgnoreHitPause = 1
Persistent = 0

[State 1]
type = AssertSpecial
trigger1 = 1
flag = nofg
flag2 = nobg
flag3 = nobardisplay
ignorehitpause = 1
pausemovetime = 999
supermovetime = 999

[State 3040, 7]
type = BGPalfx
trigger1 = 1
ignorehitpause = 1
time = 2
add = -256,-256,-256
under = 2

[State 3040, 7]
type = EnvColor
trigger1 = 1
ignorehitpause = 1
value = 0,0,0
time = ifelse(time<=2,120,3)
under = 2

[State 3101, 超必殺技発動の時間停止]
type = SuperPause
trigger1 = time = 0
anim=-1
pos=9999999,0
poweradd = 0
time=40
movetime=40

[State 8000, 7]
type = changestate
trigger1=time>=40
trigger1=1
value=32033
;-------------------------------------------------------------------------------
[Statedef 32033]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 0
anim = 32031
ctrl = 0
poweradd=0

[State 191, 特殊効果]
type = AssertSpecial
trigger1 = roundstate = [0,1]
flag = Intro;イントロの状態

[State -3, ]
type = varset
trigger1=1
fv=1
value=1-((time-180)*0.036)

[State -3, ]
type = varset
trigger1=1
trigger1=fvar(1)<=0
fv=1
value=0.01

[State 22076]
type = AssertSpecial
trigger1 = 1
trigger1 = time < 210
flag= noBG
flag2= noFG
flag3= nobardisplay

[State 22076]
type = EnvShake
trigger1 = (GameTime%3) = 1
trigger1 = time >= 12
trigger1 = time < 210
time = 10
ampl = -7
freq = 95
phase = 95

[State 22076]
type = NotHitBy
trigger1 = time >= 12
value = SCA

[State 22076]
type = PlaySnd
trigger1 = time = 12
value = 4000, 7

[State 22076]
type = PlaySnd
trigger1 = time = 12
value = 3300, 1

[State 22076]
type = PlaySnd
trigger1 = time = 12
value = 4000, 8

[State 22076]
type = PlaySnd
trigger1 = time = 12
value = 4000, 9
volume = 150

[State 22076]
type = PlaySnd
trigger1 = time = 12
value = 4000, 10
volume = 150

[State 22076]
type = Projectile
triggerall = time >= 12
triggerall = time <= 200
trigger1 = (GameTime%3) = 1
attr = S, HA
projanim = 75152
projhitanim = -1
projid = 75152
projpriority = 999999999
projsprpriority = 999999999
projremove = 0
projremovetime = 5
postype = p1
offset=36,-88
velocity = 0
animtype  = diagup
damage  = 20,5
getpower = 0,0
givepower = 0,0
guardflag = M
hitflag = MAFD
pausetime = 0,12
sparkno = 7506
sparkxy = -15,-99999999999999999999999999999
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6,-6.5
air.velocity = -6,-6.8
fall = 1
fall.recover = 0
juggle = 0

[state 22076]
type = targetstate
triggerall = time >= 12
triggerall = time <= 200
trigger1 = palno=12
trigger2 = enemy,alive !=1
value = 9997

[State 22076]
type = Explod
triggerall = time >= 12
trigger1 = (Time%4) = 1
anim = 74000
id = 75150
sprpriority = 99
postype = p1
pos=36,-80
bindtime = 1
under = 0
ownpal = 1 ; = 1
persistent = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 22076]
type = Explod
triggerall = time >= 12
trigger1 = (Time%3) = 1
anim = 74001
id = 75150
sprpriority = 9
postype = p1
pos=36,-80
bindtime = 1
under = 0
ownpal = 1 ; = 1
persistent = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 22076]
type = Envcolor
trigger1 = time >= 12
trigger1 = time < 210
trigger1 = (GameTime%5) = 1
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 5
supermove = 1

[state 22076]
type = modifyexplod
trigger1 = time >= 180
id=75150
scale=fvar(1),fvar(1)

[state 22076]
type = removeexplod
trigger1 = time >= 210
id=75150

[state 22076]
type = changestate
trigger1 = time >= 244
value = 0
ctrl=1
