

;---------------------------------------------------------------------
; 基本設定
[Data]
life = 1000
attack = 100
defence = 102
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 100
IntPersistIndex = 0
FloatPersistIndex = 0

[Size]
xscale = 1           ; 水平サイズ倍率
yscale = 1           ; 垂直サイズ倍率
ground.back = 18     ; キャラ幅（地上、後ろ側）
ground.front = 18    ; キャラ幅（地上、前側）
air.back = 10        ; キャラ幅（空中、後ろ側）
air.front = 15       ; キャラ幅（空中、前側）
z.width = 10         ; キャラ幅（ｚ軸）
height = 50	     ; キャラの高さ（ジャンプで飛び越せる高さ）
attack.width = 4,4   ;Default attack width: back, front
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too   
head.pos = -3,-98    ; 頭部座標
mid.pos = 0,-70     ; 体中心部座標
shadowoffset = 0     ; キャラの影・オフセット値

[Velocity]
walk.fwd  = 3.73      ;前進の速度
walk.back = -3.73     ;後退の速度
run.fwd  = 6.43, 0       ;前ダッシュの速度（ホップする時はyを-にする）
run.back = -6.1 , 0     ;後ダッシュの速度（ホップする時はyを-にする）
jump.neu = 0,-10.5      ;垂直ジャンプの速度
jump.back = -4.17       ;後ジャンプの速度
jump.fwd = 3.57         ;前ジャンプの速度
runjump.back = -5.93,-9.4;後ダッシュしながらのジャンプ速度(オプション)
runjump.fwd = 5.00,-9.4   ;前ダッシュしながらのジャンプ速度(オプション)
airjump.neu = 0,-6.5  ;２段ジャンプ以降の垂直ジャンプの速度(オプション)
airjump.back = -2.8 ;２段ジャンプ以降の後ジャンプの速度(オプション)
airjump.fwd = 2.8    ;２段ジャンプ以降の前ジャンプの速度

[Movement]
airjump.num = 0      ;空中でジャンプする回数
airjump.height = 28  ;空中でジャンプする最低限の高さ
yaccel = .47         ;重力
stand.friction = .85  ;立ち状態の摩擦係数
crouch.friction = .82 ;屈み状態の摩擦係数）

;===============================================================================
; Definition of the Basic Action
;===============================================================================

;-------------------------------------------------------------------------------
; 
;-------------------------------------------------------------------------------
; 
[Statedef 570]
type    = S
movetype= A
physics = S
anim = 570
juggle  = 7
velset = 0,0
ctrl = 0
poweradd = 55
facep2 = 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 200, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 200, 1

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 2
channel = 2


[State 3000]
type = velset
trigger1 = (Animelemtime(3) = 1)
x = 4.3



[State 3000]
type = velset
trigger1 = (Animelemtime(5) = 1)
x = 0



[State 1130,HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype = Hard
damage    = 55
getpower = 55
guardflag = M
hitflag = MAF
pausetime = 11,13
sparkno = S2020
guard.sparkno = S2070
sparkxy = 0,-85
hitsound = S3,5
guardsound = S4,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -9
air.velocity = -3.5,-6
yaccel = .45
air.cornerpush.veloff = 0
air.hittime = 13
air.fall = 1
fall.recovertime = 38



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

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

;-------------------------------------------------------------------------------
; ダッシュ
[Statedef 100]
type    = S
movetype = I
physics = N
anim = 100
ctrl = 1

[State 100,0]
type = VelSet
trigger1 = AnimElem = 1
x = Const(velocity.run.fwd.x)


[State 105,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5, 0

[State 100,4]
type = ChangeState
trigger1 = Command != "holdfwd" && Time >= 10
value = 101
ctrl = 1

[State 100,5]
type = ChangeState
trigger1 = Command = "holdupfwd"
value = 40

[State 100,6]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

;------------------------ 停止
[Statedef 101]
type = S
movetype = I
physics = S
anim = 101
velset = 0, 0

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

;---------------------------------------------------------------------
; バックステップ
;------------------------ 開始
[Statedef 105]
type = S
movetype = I
physics = S
anim = 105
ctrl = 1
velset = 0, 0



[State 105,VelSet]
type = VelSet
trigger1 = AnimElemtime(1) >0
x = Const(velocity.run.back.x)


[State 100,6]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 105,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5, 0



[State 100,4]
type = ChangeState
trigger1 = Command != "holdback" && Time >= 10
value = 101
ctrl = 1

[State 100,5]
type = ChangeState
trigger1 = Command = "holdupback"
value = 40

;===============================================================================
; Definition of the Win/Lose/Intro Pause
;===============================================================================
;-----------------------------------------------------------------
;立ちブロッキング

[Statedef 4040]
type = S
physics = S
movetype = I
velset = 0,0
anim = 4400
ctrl = 0

[State 4040, 1]
type = pause
trigger1 = time = 1
time = 14
movetime = 14



[State 4020, 3]
type = playsnd
trigger1 = time = 0
value = 6,2

[State 4020, 4]
type = playsnd
trigger1 = time = 0
value = 360,0

[State 4040, 5]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 4040, 6]
type = poweradd
trigger1 = time = 0
value = 90

[State 4040, 7]
type = PalFX
trigger1 = animelemtime(3) >= 0
trigger1 = animelemtime(4) < 0
time = 1
add = 75,75,250

;-----------------------------------------------------------
;AI用ChangeState書き込み場所



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

[State 4040, 8]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;--------------------------------------------------------------------
;しゃがみブロッキング

[Statedef 4010]
type = C
movetype = I
physics = C
anim = 4401
velset = 0,0
ctrl = 0

[State 4010, 1]
type = pause
trigger1 = time = 1
time = 14
movetime = 14




[State 4020, 3]
type = playsnd
trigger1 = time = 0
value = 6,2

[State 4020, 4]
type = playsnd
trigger1 = time = 0
value = 360,0

[State 4010, 5]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 4040, 6]
type = poweradd
trigger1 = time = 0
value = 90

[State 4010, 7]
type = PalFX
trigger1 = animelemtime(3) >= 0
trigger1 = animelemtime(4) < 0
time = 1
add = 75,75,250

;-----------------------------------------------------------
;AI用ChangeState書き込み場所



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

[State 4010, 8]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1

;--------------------------------------------------------------------
;空中ブロッキング

[Statedef 4020]
type = A
physics = N
movetype = I
anim = 4402
velset = 0,0
ctrl = 0

[State 4010, 1]
type = pause
trigger1 = time = 1
time = 14
movetime = 14



[State 4020, 3]
type = playsnd
trigger1 = time = 0
value = 6,2

[State 4020, 4]
type = playsnd
trigger1 = time = 0
value = 360,0

[State 4020, 5]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 4040, 6]
type = poweradd
trigger1 = time = 0
value = 90

[State 4020, 7]
type = PalFX
trigger1 = animelemtime(3) >= 0
trigger1 = animelemtime(4) < 0
time = 1
add = 75,75,250

;-----------------------------------------------------------
;AI用ChangeState書き込み場所







;-----------------------------------------------
[State 4020, 8]
type = ChangeState
trigger1 = animtime = 0
value = 4030

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

[Statedef 4030]
type = A
physics = N
velset = 0,-4
anim = 4403
ctrl = 1

[State 4030, 1]
type = Gravity
trigger1 = 1

[State 4030, 2]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52

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

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


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


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

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


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

;-------------------------------------------------------------------------------
; 時間切れ負け
[Statedef 170]
type = S
ctrl = 0
anim = 175
velset = 0,0

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


[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5300, 0


[State 170, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

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

;-------------------------------------------------------------------------------
; 時間切れ引き分け
[Statedef 175]
type = S
ctrl = 0
velset = 0,0

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

[State 175, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay



[State 175, ChangeState]
type = ChangeState
trigger1 = Time = 0
value = 170

;-------------------------------------------------------------------------------
; 勝利
[Statedef 180]
type = S


[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = Anim = 181
flag = noBG
flag2 = noFG
flag3 = nomusic

[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = Anim = 181
flag = nobardisplay


[State 180,ChangeState]
type = ChangeState
trigger1 = Anim !=181
trigger1 = random = [0,500] 
value = 182

[State 180,ChangeState]
type = ChangeState
trigger1 = Anim !=181
trigger1 = random = [501,900]
value = 183

[State 180, ChangeState]
type = ChangeState
trigger1 = Anim !=181
trigger1 = random = [901,1000]
value = 181

;---------------------------------------------------------------------
; Win pose 
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 180, 0


[State 1200,helper]
type = helper
trigger1 = time = 0
name = "juni"
id = 10180
pos = -30,0
postype = p1
stateno = 60182
helpertype = normal
keyctrl = 0
ownpal = 0
persistent = 0
size.xscale = 0.83
size.yscale = 1



[State 1200,helper]
type = helper
trigger1 = time = 0
name = "juli"
id = 10180
pos = 30,0
postype = p1
stateno = 60183
helpertype = normal
keyctrl = 0
ownpal = 0
persistent = 0
size.xscale = 0.83
size.yscale = 1




[State 181, end]
type = AssertSpecial
trigger1 = time < 200
flag = RoundNotOver

[State 185, 5]
type = ChangeState
trigger1 = MatchOver && Time = 190
value = 188



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


;---------------------------------------------------------------------
; Win pose 
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 180, 1

[STate 1750]
type=VelSet
trigger1 = AnimElemtime(2) >2 
y=-1

[STate 1750]
type=VelSet
trigger1 = AnimElemtime(3) >0 
y=-.7

[STate 1750]
type=VelSet
trigger1 = AnimElemtime(7) >0 
y=.7


[State 181, end]
type = AssertSpecial
trigger1 = time < 200
flag = RoundNotOver


[State 185, 5]
type = ChangeState
trigger1 = MatchOver && Time = 190
value = 188

;---------------------------------------------------------------------
; Win pose 
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 8
value = 180,3

[State 1531, 5]
type = EnvColor
trigger1 = gametime%2 = 1 && time = [0,12]
value = 255,255,255
time = 1

[State 1200,helper]
type = helper
trigger1 = time = 0
name = "juni"
id = 10180
pos = 0,0
postype = p1
stateno = 60184
helpertype = normal
keyctrl = 0
ownpal = 0
persistent = 0
size.xscale = 0.83
size.yscale = 1



[State 1200,helper]
type = helper
trigger1 = time = 0
name = "juli"
id = 10180
pos = 10,0
postype = p1
stateno = 60185
helpertype = normal
keyctrl = 0
ownpal = 0
persistent = 0
size.xscale = 0.83
size.yscale = 1




[State 181, end]
type = AssertSpecial
trigger1 = time < 200
flag = RoundNotOver

[State 185, 5]
type = ChangeState
trigger1 = MatchOver && Time = 190
value = 188



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

[Statedef 188]
type = S
ctrl = 0
velset = 0,0,0

[State 9999,];なくてもいいかも知れない
type = null;ChangeAnim
trigger1 = 1
value = anim


[state 189, 1]
type = assertspecial
trigger1 = time = [0,300]
flag  = NoFG                
flag2 = NoBarDisplay

[State 189, 0]
type = AssertSpecial
trigger1 = time = [0,300]        
flag = roundnotover     


[State 221, Effect]
type = PlaySnd
trigger1 = time = 0
value = 188,0

[State 1860, Explod]
type = Explod
trigger1 = time = 0
anim = 4444
removetime = 502
postype = left
sprpriority = 9
owntop = 1
ownpal = 1
scale=0.25,0.25
id=4444


;---------------------------------------------------------------------------
;------------------------ ユーニ
[Statedef 60184]
type = A
movetype = A
physics = N
ctrl = 0
Anim = 60184
velset = 0,0

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 10180,5

;------------------------ ユーリ
[Statedef 60185]
type = A
movetype = A
physics = N
ctrl = 0
Anim = 60185
velset = 0,0

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 1
value = 2

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 10180,5

;---------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;------------------------ ユーニ
[Statedef 60182]
type = A
movetype = A
physics = N
ctrl = 0
Anim = 60181
velset = 0,0

[State 440, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = 35

[State 440, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 0




[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem =7
value = 10180,0





[State 1100, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1600, 0









;---------------------------------------------------------------------
;------------------------ ユーリ
[Statedef 60183]
type = A
movetype = A
physics = N
ctrl = 0
Anim = 60182
velset = 0,0



[State 440, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = -36

[State 440, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 0




[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 7
value = 10180,0





[State 1100, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1600, 0









;---------------------------------------------------------------------
;---------------------------------------------------------------------
;  イントロ
;------------------------プレイントロ
[Statedef 190]
type = S
ctrl = 0
velset = 0,0



;vs悪党
[State 180,ChangeState]
type = ChangeState
trigger1 = p2name = "Rugal.B" ||  p4name = "Rugal.B"
trigger2 = (p2name = "Krauser" | p4name = "Krauser")
trigger3 = p2name = "gouki" | p4name = "gouki"
trigger4 = p2name = "svcgouki" | p4name = "svcgouki"
trigger5 = p2name = "Tin's S_Gouki" | p4name = "Tin's S_Gouki"
trigger6 = P2name="cvsgeese" || P4name="cvsgeese" 
trigger7 = P2name="cvsg_rugal" || P4name="cvsg_rugal"  || P2name="cvsrugal" || P4name="cvsrugal"

trigger8 = p2name = "cvsgeese" || p4name = "cvsgeese"
trigger9 = p2name = "cvsgeese_normal" || p4name = "cvsgeese_normal"
trigger10 = p2name = "cvsgeese_ex" || p4name = "cvsgeese_ex"
trigger11 = p2name = "Geese Howard" || p4name = "Geese Howard"
trigger12 = p2name = "DGeese" || p4name = "DGeese"
trigger13 = p2name = "Aof_Geese" || p4name = "Aof_Geese"
trigger14 = p2name = "Geese" || p4name = "Geese"
value = 194

[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 0 && (Random < 450) 
value = 192

[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 0 && (Random < 230) 
value = 193


[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 0
value = 191


;------------------------プレイントロ
[Statedef 194]
type = S
ctrl = 0
velset = 0,0
anim = 194

[State 810, 1]
type = PlaySnd
trigger1 = time = 281
trigger2 = time = 293
trigger3 = time = 306
trigger4 = time = 319
value = 6,2
volume =-250



[State 1020, 4]
type = EnvShake
trigger1 = animelemtime(2) >= 0
trigger1 = animelemtime(4) < 13
trigger1 = GameTime % 2 = 0

time = 5
ampl = -12
freq = 95
phase = 95

[State 810, 1]
type = Explod
trigger1 = animelemtime(2) >= 0
trigger1 = animelemtime(4) < 13
trigger1 = numexplod(10004)  = 0
anim           = 6004
id             = 10004
pos            = 37,-100
postype        = p1
bindtime       = -1
ownpal         = 1
sprpriority    = 5
persistent     = 1
ignorehitpause = 1
scale          = 1,1

[State 810, 1]
type = RemoveExplod
trigger1 = animelemtime(4) >= 13
persistent = 0
ignorehitpause = 1
id = 10004

[State 1100, Effect]
type = PlaySnd
trigger1 = time = 0
value = 194, 0

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;------------------------
;-------------------------------------------------------------------------------
;---------------------------------------------------------------------
;  イントロ
;------------------------プレイントロ
[Statedef 192]
type = S
ctrl = 0
velset = 0,0
anim = 192




[State 1100, Effect]
type = PlaySnd

trigger1 = time = 1
value = 190, 1



[State 1200,helper]
type = helper
trigger1 = time = 0
name = "juni"
id = 10180
pos = 30,0
postype = p1
stateno = 60180
helpertype = normal
keyctrl = 0
ownpal = 0
persistent = 0
size.xscale = 0.833
size.yscale = 1

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

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

[Statedef 193]
type = S
ctrl = 0
velset = 0,0
anim = 192



[State 1200,helper]
type = helper
trigger1 = time = 0
name = "juni"
id = 10180
pos = 30,0
postype = p1
stateno = 60180
helpertype = normal
keyctrl = 0
ownpal = 0
persistent = 0
size.xscale = 0.833
size.yscale = 1

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0


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

;-------------------------------------------------------------------------------
;------------------------ ユーニ
[Statedef 60180]
type = A
movetype = A
physics = N
ctrl = 0
Anim = 60180
velset = 0,0


[State 440, VelSet]
type = VelSet
trigger1 = AnimElem = 8
x = -16




[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 4
value = 10180,1





[State 1100, Effect]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1600, 0









[State 1001, End]
type = Destroyself
trigger1 = AnimTime = 0



;---------------------------------------------------------------------
;  イントロ
;------------------------プレイントロ
[Statedef 191]
type = S
ctrl = 0
velset = 0,0
anim = 191

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 190, 0


[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0


;-------------------------------------------------------------------------------
; 挑発
[Statedef 195]
type = S
movetype = I
physics = S
anim = 195
velset = 0, 0
ctrl = 1

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 195, 0



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

;===============================================================================
; Definition of the Basic Arts
;===============================================================================

;-------------------------------------------------------------------------------
; 近／遠距離・立ち弱パンチ
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 8
anim = 200
velset = 0,0
ctrl = 0
poweradd =20

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 0
channel = 2


[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 200, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 200, 1


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

[State 200,HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype = Light
damage    = 20
getpower = 20
guardflag = M
hitflag = MAF
pausetime = 7,8
sparkno = S2000
guard.sparkno = S2050
sparkxy = -10,-90
hitsound = S3, 0
guardsound = S4, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5

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

;-------------------------------------------------------------------------------
; 遠距離・立ち強パンチ
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 8
anim = 210
poweradd= 65
ctrl = 0
velset = 0,0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 210, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 210, 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = 5
trigger1 = AnimElem = 1
value = 200, 1



[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 4
channel = 2

[State 210,HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Hard
damage    = 65
getpower = 65
guardflag = M
hitflag = MAF
pausetime = 10,12
sparkno = S2010
guard.sparkno = S2060
sparkxy = -15,-70
hitsound = S3, 2
guardsound = S4, 0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -7
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5

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

;-------------------------------------------------------------------------------
; 近距離・立ち強パンチ
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 8
anim = 220
poweradd= 60
ctrl = 0
velset = 0,0,0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 210, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 210, 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = 5
trigger1 = AnimElem = 1
value = 200, 0


[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 4
channel = 2


[State 220,HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Hard
damage    = 65
getpower = 65
guardflag = M
hitflag = MAF
pausetime = 9,12
sparkno = S2010
guard.sparkno = S2060
sparkxy = 0,-70
hitsound = S3, 2
guardsound = S4, 0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -8
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5

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

;-------------------------------------------------------------------------------
; 近／遠距離・立ち弱キック
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 8
anim = 230
poweradd= 20
ctrl = 0
velset = 0,0,0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 200, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 200, 1



[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 1
channel = 2

[State 230,HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype = Light
damage   = 20
getpower = 20
guardflag = M
hitflag = MAF
pausetime = 7,8
sparkno = S2000
guard.sparkno = S2050
sparkxy = -10,-40
hitsound = S3, 1
guardsound = S4, 0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5

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

;-------------------------------------------------------------------------------
; 遠距離・立ち強キック
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 8
anim = 240
poweradd= 60
ctrl = 0
velset = 0,0


[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 210, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 210, 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = 5
trigger1 = AnimElem = 1
value = 220, 0

[State 105,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 99, 4

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 2, 4
channel = 2

[State 240,HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Hard
damage    = 70
getpower = 70
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkno = S2010
guard.sparkno = S2060
sparkxy = -20,-85
hitsound = S3, 3
guardsound = S4, 0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -8
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5

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

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

;-------------------------------------------------------------------------------
; しゃがみ弱パンチ
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 8
anim = 400
poweradd= 20
ctrl = 0
velset = 0,0




[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 200, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 200, 1




[State 105,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 99, 20

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 0
channel = 2

[State 400,HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
animtype  = Light
damage    = 20
getpower = 25
hitflag = MA
guardflag = M
pausetime = 9,9
sparkno = S2000
guard.sparkno = S2050
sparkxy = 0,-40
hitsound = S3, 0
guardsound = S4, 0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5

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

;-------------------------------------------------------------------------------
; しゃがみ強パンチ
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 8
anim = 410
poweradd= 60
ctrl = 0
velset = 0,0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 210, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 210, 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = 5
trigger1 = AnimElem = 1
value = 220, 1




[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 2, 6
channel = 2



[State 410,HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
animtype  = Hard
damage    = 65
getpower = 65
hitflag = MA
guardflag = M
pausetime = 12,12
sparkno = S2010
guard.sparkno = S2060
sparkxy = 0,-45
hitsound = S3, 2
guardsound = S4, 0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -8
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5



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

;-------------------------------------------------------------------------------
; しゃがみ弱キック
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 8
anim = 430
poweradd= 20
ctrl = 0
velset = 0, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 200, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 200, 1



[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 1
channel = 2

[State 430,HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
animtype = Light
damage    = 20
getpower = 20
hitflag = MA
guardflag = L
pausetime = 9,9
sparkno = S2000
guard.sparkno = S2050
sparkxy = -10,-5
hitsound = S3, 1
guardsound = S4, 0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5

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

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; しゃがみ強キック
[Statedef 440]
type    = C
movetype= A
physics = N
juggle  = 8
anim = 440
velset = 0,0
ctrl = 0
poweradd = 60

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 210, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 210, 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = 5
trigger1 = AnimElem = 1
value = 220, 1

[State 440,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3,=3
value =440, 0 

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 75
getpower = 60
animtype = Hard
hitflag = MA
guardflag = L
pausetime = 11,13
guard.pausetime = 12,12
sparkno = S2010
guard.sparkno = S2060
sparkxy = 0,-15
hitsound = S3, 3
guardsound = S4, 1
ground.type = Trip
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -2.25,-7.5
air.hittime = 13
air.velocity = -2.25,-7.5
guard.velocity = -9
air.cornerpush.veloff = 0
fall = 1
fall.recover = 0
yaccel = .55
air.juggle = 8

[State 440, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 16

[State 440, VelMul]
type = VelMul
trigger1 = AnimElem = 3,> 3
x = .80

[State 440, VelSet]
type = VelSet
trigger1 = AnimElem = 4
x = 0



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

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; 垂直／斜めジャンプ弱パンチ
[Statedef 600]
type    = A
movetype= A
physics = A
anim = 600
juggle  = 8
poweradd= 20
ctrl = 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 200, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 200, 1




[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 0
channel = 2

[State 600,HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Light
damage    = 20
getpower = 20
guardflag = HA
pausetime = 10,12
sparkno = S2000
guard.sparkno = S2050
sparkxy = 0,-60
hitsound = S3, 0
guardsound = S4, 0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5.0
ground.cornerpush.veloff = -8.0
air.cornerpush.veloff = 0
air.velocity = -3.5,-6
air.hittime = 13
yaccel = .5

;-------------------------------------------------------------------------------
; 垂直／斜めジャンプ強パンチ
[Statedef 610]
type    = A
movetype= A
physics = A
anim = 610
juggle  = 8
poweradd= 60
ctrl = 0


[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 210, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 210, 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = 5
trigger1 = AnimElem = 1
value = 200, 1

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2203, 0
channel = 2


[State 610,HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = light
damage    = 60
getpower = 60
guardflag = HA
priority = 3
pausetime = 10,12
sparkno = S2410
guard.sparkno = S2060
sparkxy = 0,-25
hitsound = S3, 4
guardsound = S4, 0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
ground.cornerpush.veloff = -8.0
air.cornerpush.veloff = 0
air.velocity = -3.5,-6
air.hittime = 13
yaccel = .5

;-------------------------------------------------------------------------------
; 垂直／斜めジャンプ弱キック
[Statedef 630]
type    = A
movetype= A
physics = A
anim = 630
juggle  = 8
poweradd= 20
ctrl = 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 200, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 200, 1



[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 3
channel = 2

[State 630,HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Light
damage    = 20
getpower = 20
guardflag = HA
priority = 3
pausetime = 10,12
sparkno = S2000
guard.sparkno = S2050
sparkxy = 0,-40
hitsound = S3, 1
guardsound = S4, 0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
ground.cornerpush.veloff = -8.0
air.cornerpush.veloff = 0
air.velocity = -3.5,-6
air.hittime = 13
yaccel = .5

;-------------------------------------------------------------------------------
; 垂直／斜めジャンプ強キック
[Statedef 640]
type    = A
movetype= A
physics = A
anim = 640
juggle  = 8
poweradd= 60
ctrl = 0



[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 210, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 210, 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = 5
trigger1 = AnimElem = 1
value = 220, 0

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 4
channel = 2

[State 640,HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Hard
damage    = 60
getpower = 60
guardflag = HA
priority = 3
pausetime = 10,12
sparkno = S2010
guard.sparkno = S2060
sparkxy = 0,-25
hitsound = S3, 3
guardsound = S4, 0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4
ground.cornerpush.veloff = -8.0
air.cornerpush.veloff = 0
air.velocity = -3.5,-6
air.hittime = 13
yaccel = .5

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

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

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

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

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

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

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


; アット ザ ウェイストランド（空中で↓＋B）
[Statedef 720]
type    = A
movetype= A
physics = A
anim = 720
juggle  = 10
poweradd= 57
ctrl = 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [1,2]
trigger1 = AnimElem = 1
value = 210, 0

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = [3,4]
trigger1 = AnimElem = 1
value = 210, 1

[State 105,PlaySnd]
type = PlaySnd
triggerall = var(20) = 5
trigger1 = AnimElem = 1
value = 220, 1

[State 221, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 2, 5
channel = 2

[State 720,HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Hard
damage    = 57
getpower = 57
guardflag = HA
pausetime = 10,12
sparkno = S2010
guard.sparkno = S2060
sparkxy = -10,-20
hitsound = S3, 3
guardsound = S4, 0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -7.0
ground.cornerpush.veloff = -8.0
air.velocity = -3.5,-6
air.hittime = 13
air.cornerpush.veloff = 0
yaccel = .5

;===============================================================================
; Definition of the Basic Throws
;===============================================================================

;-------------------------------------------------------------------------------
; デスタワー
[Statedef 800]
type = S
movetype = A
physics = S
ctrl = 0
anim = 800
velset = 0, 0

[State 4150,0]
type = NotHitBy
trigger1 = AnimElem = 2,< 0
value = SCA

[State 800,HitDef]
type = Hitdef
trigger1 = Time = 0 
trigger1 = P2MoveType != H
attr = S, NT
priority = 3,Miss
getpower = 0
hitflag = M-
numhits = 0
sparkno = -1
p1facing = 1
p2facing = 1
p1stateno = 810
p2stateno = 820
p2getp1state = 1
hitsound = -1


[State 800,ChangeState]
type = ChangeState
trigger1 = AnimElem = 2
value = 220
ctrl = 0


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

;-------------------------------------------------------------------------------
; デスタワー（成功）
[Statedef 810]
type = S
movetype = A
physics = N
anim = 810
velset = 0, 0
poweradd = 0
sprpriority = 3

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



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



[State 4150,0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 2
value = 1

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 3
value = 3

[State 810,AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 193, 1]
type = Explod
trigger1 = AnimElem = 2,=0
anim = 2150
pos = 35,-80
bindtime = 1
sprpriority = 0
ownpal = 1
postype= P1
id=2150

[State 105,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 18
value = 210, 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5,=0
value = 0,9

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 18,=0
value = 0,10

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6,=2 || AnimElem = 13,=1
value = 3,3

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

[State 193, 1]
type = Explod
trigger1 = AnimElem = 7,=0 || AnimElem = 14,=0
anim = 2010
pos = ifelse((AnimElem = 7,=0),90,40),ifelse((AnimElem = 7,=0),-60,-150)
bindtime = 1
sprpriority = 5
ownpal = 1
id=2010

[State 810,TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = 28,0

[State 810,TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = 40,0

[State 810,Width]
type = Width
triggerall = AnimElem = 2
trigger1 = FrontEdgeDist < 65
edge = 65,0

[State 810,TargetBind]
type = TargetBind
trigger1 = AnimElem = 14
pos = 15,-125

[State 810,TargetBind]
type = TargetBind
trigger1 = AnimElem = 18
pos = 0,-130

[State 810,Width]
type = Width
triggerall = AnimElem = 19
trigger1 = BackEdgeDist < 65
edge = -20,65

[State 810,TargetBind]
type = TargetBind
trigger1 = AnimElem = 19
pos = -55,-105

[State 810,TargetBind]
type = TargetBind
trigger1 = AnimElem = 20
pos = -70,-90

[State 810,TargetBind]
type = TargetState
trigger1 = AnimElem = 20
value = 821

[State 810,TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 7,=1 || AnimElem = 14,=1 || AnimElem = 20,=0
value = -32
kill = IfElse((AnimElem = 20,=0),1,0)

[State 860, Turn]
type = Turn
trigger1 = AnimTime = 0

[State 3005, Envcolor]
type = Envcolor
trigger1 = AnimElem = 7,=1 || AnimElem = 14,=1
value = 255, 255, 255
ignorehitpause = 1
time = 1
under = 1

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

;-------------------------------------------------------------------------------
; デスタワー（投げられ側）
;------------------------ 1
[Statedef 820]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 1

[State 52, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

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

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

;------------------------ 2
[Statedef 821]
type = A
movetype = H
physics = N
velset = 5.5,-4
anim = 5050
ctrl = 0
sprpriority = 3

[State 810,AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= 1
trigger1 = SelfAnimExist(anim+10)
value = 5060
persistent = 0

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

[State 1509, veladd]
type = veladd
trigger1 = 1
y = .47

[State 1509, SelfState]
type = SelfState
trigger1 = Pos Y >= -15 && Vel Y > 0
value = 5100
;****************************
[Statedef 830]
type     = S
movetype = A
physics  = S
juggle   = 0
ctrl     = 0
anim     = 830

[State -2, 0]
type = VarSet
trigger1 = time = 0
persistent = 0
ignorehitpause = 1
v = 24
value = 0

[State 800, 1]
type = VelSet
trigger1 = time         = 0
trigger1 = prevstateno != 100
x = 0

[State 800, 0]
type = AttackDist
trigger1 = 1
value = 0

[State 800, 2]
type = HitDef
trigger1 = animelem = 3
attr                     = S, NT
damage                   = 0
hitflag                  = M-
priority                 = 1, Miss
pausetime                = 0, 0
sparkno                  = -1
hitsound                 = s0, 0
ground.hittime           = 10
fall.recover             = 0
getpower                 = 0, 0
givepower                = 0, 0
p1facing                 = 1
p2facing                 = 1
p1stateno                = 840
p2stateno                = 850
p1sprpriority            = 1
numhits                  = 0
palfx.time               = 4
palfx.add                = 256,-64,-64
palfx.mul                = 200,200,200
palfx.color              = 0

[State 800, 3]
type = ChangeState
Trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;投げ成功
[Statedef 840]
type     = S
movetype = A
physics  = S
juggle   = 0
ctrl     = 0
anim     = 840



[State 810, 0]
type = AttackDist
trigger1 = 1
value = 0

[State 810, 1]
type = Width
trigger1 = 1
edge = 30

[State 810, 1]
type = TargetFacing
trigger1 = enemynear,facing = facing
value = -1

[State 810, 1]
type = TargetBind
trigger1 = animelemtime(2) < 0
pos = 28, 0

[State 810, 1]
type = PlaySnd
trigger1 = time = 1
trigger2 = time = 13
trigger3 = time = 26
trigger4 = time = 39
value = 6,2

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

[State 810, 1]
type = Explod
trigger1 = animelemtime(2) < 0
trigger1 = numexplod(10004)  = 0
anim           = 6004
id             = 10004
pos            = -7,-90
postype        = p2
bindtime       = -1
ownpal         = 1
sprpriority    = 5
persistent     = 1
ignorehitpause = 1
scale          = 1,1

[State 810, 1]
type = RemoveExplod
trigger1 = animelem = 2
persistent = 0
ignorehitpause = 1
id = 10004

[State 810, 1]
type = Explod
trigger1 = animelem = 2
anim           = 6005
id             = 10005
pos            = 0,-85
postype        = p2
bindtime       = -1

[State 810, 1]
type = Explod
trigger1 = animelem = 2
anim           = 3100
id             = 10005
pos            = 15,-85
postype        = p1
bindtime       = -1

[State 810, 2]
type = PlaySnd
trigger1 = animelem = 2
value = 1600,4

[State 810, 2]
type = HitAdd
trigger1 = time = 1
trigger2 = time = 13
trigger3 = time = 26
trigger4 = time = 39
value = 1

[State 810, 2]
type = TargetLifeAdd
trigger1 = time = 1
trigger2 = time = 13
trigger3 = time = 26
trigger4 = time = 39
value = -25

[State -2, combo1]
type = VarAdd
trigger1 = time = 1
trigger2 = time = 13
trigger3 = time = 26
trigger4 = time = 39
persistent = 0
ignorehitpause = 1
v = 1
value = 1

[State 810, 2]
type = PlaySnd
trigger1 = animelem = 2
value = 1,8

[State 810, 2]
type = TargetLifeAdd
trigger1 = animelem = 2
value = -5

[State 810, 2]
type = TargetVelSet
trigger1 = animelem = 2
x = -1
y = -17

[State 810, 3]
type = TargetState
trigger1 = animelemtime(2)    < 0
trigger1 = enemynear,stateno != 850
value = 850

[State 810, 3]
type = TargetState
trigger1 = animelem = 2
value = 851

[State 810, 3]
type = ChangeState
Trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;投げ_相手
[Statedef 850]
type     = A
movetype = H
physics  = N
velset   = 0,0
ctrl     = 0

[State 820, 0]
type = NotHitBy
trigger1 = 1
value = , AT
time = 1

[State 820, 0]
type = ChangeAnim2
trigger1 = 1
value = 850

[State 820, 1]
type = Palfx
trigger1 = time = 0
time = 150
add = -256,-256,-256
sinadd = 224,224,32,9

[State 820, 3]
type = ChangeState
trigger1 = time = 60
value = 851
ctrl = 0

;---------------------------------------------------------------------------
;投げ_吹き飛び動作
[Statedef 851]
type     = A
movetype = H
physics  = N
ctrl     = 0

[State 821, 0]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 821, 0]
type = ChangeAnim
trigger1 = time = 0
trigger1 = selfanimexist(5035)
value = 5035

[State 821, 1]
type = HitFallSet
trigger1 = 1
value = 1

[State 821, 1]
type = VelAdd
trigger1 = 1
y = const(movement.yaccel)

[State 821, 3]
type = ChangeState
triggerall = hitfall
trigger1   = hitover
trigger2   = animtime  = 0
trigger3   = vel y     > 0
trigger3   = pos y    >= 10
trigger4   = time      = 0
trigger4   = anim     != 5035
value = 852
ctrl = 0

[State 821, 3]
type = SelfState
trigger1 = time  >= 1
trigger1 = vel y  > 0
trigger1 = pos y >= 0
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
;投げ_吹き飛び動作継続
[Statedef 852]
type     = A
movetype = H
physics  = N
ctrl     = 0

[State 822, 0]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 822, 0]
type = ChangeAnim
trigger1 = animtime  = 0
trigger1 = anim      = 5035
trigger2 = time      = 0
trigger2 = anim     != 5035
value = 5050

[State 822, 1]
type = HitFallSet
trigger1 = 1
value = 1

[State 822, 1]
type = VelAdd
trigger1 = 1
y = const(movement.yaccel)

[State 822, 0]
type = NotHitBy
trigger1 = time  >= 1
trigger1 = vel y >= 0
trigger1 = pos y  > 0
value = SCA
time = const(data.liedown.time)

[State 822, 3]
type = SelfState
trigger1 = time  >= 1
trigger1 = vel y  > 0
trigger1 = pos y >= 0
value = 5100
ctrl = 0

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

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


;--------KOF98 forward
[Statedef 361]
type = S
physics = S
anim = 361
sprpriority = -1
poweradd = 0
velset = 0,0
ctrl = 0

[State 360, push]
type = PlayerPush
trigger1 = 1
value = 0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 360,1

[State 350, hit]
type = HitBy
trigger1 = 1
value =  , AT

[State 350, hit]
type = NotHitBy
trigger1 = 1
value = , AA, AP

[State 350, snd]
type = Poweradd
trigger1 = prevstateno = 150 || prevstateno = 151
trigger1 = AnimElem = 1
value = -1000

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
trigger1 = animelem = 7, < 0
time = 2

[State 9520, 51]
type = EnvColor
trigger1 = animelem = 1
trigger1 = prevstateno = 150 || prevstateno = 151
value = 200,200,200
time = 3

[State 705, 1]
type = velset
trigger1 = Time = [9,25]
x = 5

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

;--------KOF98 backward
[Statedef 360]
type = S
physics = S
anim = 360
poweradd = 0
sprpriority = -1
velset = 0,0
ctrl = 0

[State 1002, pos]
type = Posset
trigger1 = time = 0
y = 0

[State 360, push]
type = PlayerPush
trigger1 = 1
value = 0

[State 350, hit]
type = HitBy
trigger1 = 1
value =  , AT

[State 350, hit]
type = NotHitBy
trigger1 = 1
value = , AA, AP

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 360,1

[State 350, snd]
type = Poweradd
trigger1 = prevstateno = 150 || prevstateno = 151
trigger1 = AnimElem = 1
value = -1000

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
trigger1 = animelem = 7, < 0
time = 2

[State 9520, 51]
type = EnvColor
trigger1 = animelem = 1
trigger1 = prevstateno = 150 || prevstateno = 151
value = 200,200,200
time = 3

[State 705, 1]
type = velset
trigger1 = Time = [9,25]
x = -5

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

[Statedef 362]
type = S
physics = S
anim = 47
poweradd = 0
sprpriority = -1
velset = 0,0
ctrl = 0

[State 1002, pos]
type = Posset
trigger1 = time = 0
y = 0

[State 360, push]
type = PlayerPush
trigger1 = 1
value = 0

[State 350, hit]
type = HitBy
trigger1 = 1
value =  , AT

[State 350, hit]
type = NotHitBy
trigger1 = 1
value = , AA, AP



[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 360,2







[State 705, 1]
type = velset
trigger1 = Time = [0,25]
x = -5

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


;===========================================================================
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 1] ;Clear all non-permanent int variables
type = VarRangeSet
trigger1 = MatchNo = 0
trigger1 = roundno = 1
first = 0
last = 49
value = 0

[State 5900, 1] ;Clear all non-permanent int variables
type = VarRangeSet
trigger1 = MatchNo != 0
trigger1 = roundno = 1
first = 0
last = 50
value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = roundno = 1
fvalue = 0

;===========================================================================
; ↑変更不可
;===========================================================================

;===========================================================================
; ↓変更不可
;===========================================================================

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

;===========================================================================
;---------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1
velset = 0,0

[State 40, 2]
type = Turn
trigger1 = NumEnemy && Time = 0 && (PrevStateNo != [100,101]) && (PrevStateNo != [110,111]) && PrevStateNo != 4100
trigger1 = (enemynear,Pos X - Pos X) * facing < 0

[State 40, 1]
type = VarSet
trigger1 = Time = 0
var(32) = 0

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

;------------------------ 小ジャンプ
[State 40,VelSet]
type = VelSet
triggerall = AnimTime = 0
trigger1 = PrevStateNo != 100 && PrevStateNo != 110 && PrevStateNo != 4100 && Command != "holdup" && (var(31) = 0 || var(31) > 0 && sysvar(1) = 0)
x = ifelse(sysvar(1)=0,0,ifelse(sysvar(1)=1,const(velocity.jump.fwd.x),const(velocity.jump.back.x)))
y = floor(Const(velocity.jump.y)*.7)

[State 40, VarSet(12)]
type = VarSet
triggerall = AnimTime = 0 && var(32) = 0
trigger1 = PrevStateNo != 100 && PrevStateNo != 110 && PrevStateNo != 4100 && Command != "holdup" && (var(31) = 0 || var(31) > 0 && sysvar(1) = 0)
var(32) = 2

;------------------------ 中ジャンプ
[State 40,VelSet]
type = VelSet
triggerall = AnimTime = 0 && Command != "holdup"
trigger1 = PrevStateNo != 100 && PrevStateNo != 110 && PrevStateNo != 4100 && var(31) > 0 && sysvar(1) != 0
trigger2 = (PrevStateNo = 100 || PrevStateNo = 110 || PrevStateNo = 4100) && sysvar(1) = 1
x = ifelse(sysvar(1)=1,const(velocity.runjump.fwd.x),const(velocity.runjump.back.x))
y = floor(Const(velocity.jump.y)*.7)

[State 40, VarSet(12)]
type = VarSet
triggerall = AnimTime = 0 && var(32) = 0 && Command != "holdup"
trigger1 = PrevStateNo != 100 && PrevStateNo != 110 && PrevStateNo != 4100 && var(31) > 0 && sysvar(1) != 0
trigger2 = (PrevStateNo = 100 || PrevStateNo = 110 || PrevStateNo != 4100) && sysvar(1) = 1
var(32) = 3

;------------------------ 大ジャンプ
[State 40,VelSet]
type = VelSet
triggerall = AnimTime = 0 && Command = "holdup"
trigger1 = PrevStateNo != 100 && PrevStateNo != 110 && PrevStateNo != 4100 && var(31) > 0 && sysvar(1) != 0
trigger2 = (PrevStateNo = 100 || PrevStateNo = 110 || PrevStateNo = 4100) && sysvar(1) = 1
x = ifelse(sysvar(1)=1,const(velocity.runjump.fwd.x),const(velocity.runjump.back.x))
y = Const(velocity.runjump.y)

[State 40, VarSet(12)]
type = VarSet
triggerall = AnimTime = 0 && var(32) = 0
trigger1 = PrevStateNo != 100 && PrevStateNo != 110 && PrevStateNo != 4100 && Command = "holdup" && var(31) > 0 && sysvar(1) != 0
trigger2 = (PrevStateNo = 100 || PrevStateNo = 110 || PrevStateNo = 4100) && sysvar(1) = 1
var(32) = 4

;------------------------ ノーマルジャンプ
[State 40,VelSet]
type = VelSet
triggerall = AnimTime = 0
trigger1 = PrevStateNo != 100 && PrevStateNo != 110 && PrevStateNo != 4100 && Command = "holdup" && (var(31) = 0 || (var(31) > 0 && sysvar(1) = 0))
x = ifelse(sysvar(1)=0,0,ifelse(sysvar(1)=1,const(velocity.jump.fwd.x),const(velocity.jump.back.x)))
y = Const(velocity.jump.y)

[State 40, VarSet(12)]
type = VarSet
triggerall = AnimTime = 0 && var(32) = 0
trigger1 = PrevStateNo != 100 && PrevStateNo != 110 && PrevStateNo != 4100 && Command = "holdup" && (var(31) = 0 || (var(31) > 0 && sysvar(1) = 0))
var(32) = 1

[State 45, PlaySnd]
type = PlaySND
trigger1 = AnimTime = 0
value = 1,ifelse(var(32) >= 3,3,2)

[State 40,9]
type = AfterImage
trigger1 = AnimTime = 0 && var(32) >= 3
time = 10
length = 6
TimeGap  = 2
FrameGap = 2
palbright = 0,0,0
palcontrast = 255,255,255
paladd = 0,0,0
palmul = 1,1,1

[State 4600,10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 45, PlaySnd]
type = PlaySND
trigger1 = Time = 0 && PrevStateNo = 53
value = 5,10

[State 50, 1]
type = VarSet
trigger1 = Time = 0
var(31) = 0

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0 && var(32) != [2,3]
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0 && var(32) = [2,3]
value = ifelse((vel x)>0, 52,51)

[State 50, 3]
type = ChangeAnim
trigger1 = var(32) != [2,3]
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 50, 3]
type = ChangeAnim
trigger1 = var(32) = [2,3]
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 2)
persistent = 0
value = Anim + 2

;---------------------------------------------------------------------------
; 着地
[Statedef 52]
type    = S
physics = S
anim = 47
ctrl = 0
velset = 0, 0

[State 52, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State -2,4]
type = PlaySnd
trigger1 = Time = 1
value = 1,4

[State 52, CtrlSet]
type = CtrlSet
trigger1 = Time = 1
value = 1

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

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

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

[State 5071, 2] ;Acceleration
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 25
type = ChangeState
value = 5100

;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

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

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

[State -2, 8]
type = ChangeState
trigger1 = alive
trigger1 = AnimTime = 0
trigger1 = var(36) >= 20
value = 5320
ctrl = 0

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

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = PrevStateNo != 5950
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
triggerall = PrevStateNo != 5950
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
triggerall = PrevStateNo != 5950
trigger1 = MatchOver = 1
trigger1 = Anim != 5960
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
triggerall = PrevStateNo != 5950
trigger1 = Time = 0
trigger1 = Anim != 5960
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 5]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = PrevStateNo = 5950
value = 5950
elem = 4

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 8]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

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


;---------------------------------------------------------------------------
; 気絶
;------------------- 1
[Statedef 5300]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5310)
value = 5310

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5310)
value = 5030

[State 5000, 4]
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5310

[State 5300, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;------------------- 2
[Statedef 5310]
type    = A
movetype= H
physics = N
velset = -12,-8

[State 5050, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != 5310
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5050
trigger1 = Vel Y >= 1
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .925

[State 3005, Pause]
type = Pause
trigger1 = Time <= 5
time = 1

[State 5050, 3]
type = VelAdd
trigger1 = 1
y = .6

[State 5300, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5050, 6]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;HIT_BOUNCE

;------------------- 3
[Statedef 5320]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 5300
velset = 0,0

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

[State -3,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 5300, 0

[State 5300, VarSet]
type = VarSet
trigger1 = Time = 0
var(36) = 0

[State 5300, VarSet]
type = VarSet
trigger1 = Time = 0
var(38) = 240

[State 5300, Varadd]
type = Varadd
trigger1 = Time > 0 && command = "s"
var(38) = -1

[State 10000, ChangeAnim]
type = ChangeAnim
trigger1 = AnimTime = -1
value = anim
elem = 1

[State 10000, ChangeAnim]
type = ChangeAnim
trigger1 = AnimTime < -1
trigger1 = command = "s"
value = anim
elem = AnimElemNo(0)+1

[State 5300, Varadd]
type = Varadd
trigger1 = Time > 0
var(38) = -1

[State 5300, End]
type = ChangeState
trigger1 = Time > 0 && var(38) <= 0
value = 0
ctrl = 1

;---------------------------------------------------------------------
; 削られKO
;------------------------ 
[Statedef 5950]
type = S
movetype = H
physics = S
ctrl = 0
velset = 0, 0

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

[State 154, 1]
type = ChangeAnim
trigger1 = HitOver!
value = ifelse(PrevStateNo = 152,151,150)

[State 151, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 154, 1]
type = ChangeAnim
trigger1 = HitOver && anim != 5950
value = 5950

[State -3,PlaySnd]
type = PlaySnd
trigger1 = anim = 5950
trigger1 = AnimElem = 1,=0
value = 5950, 0

[State 105,End]
type = ChangeState
trigger1 = anim = 5950 && AnimElem = 4
value = 5150
ctrl = 0


;---------------------------------------------------------------------
; ダウン回避
[Statedef 5201]
type = S
movetype = I
physics = N
anim = 5200
velset = -4.0, 0
ctrl = 0

[State 5201,PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5201,VelMul]
type = VelMul
trigger1 = Time >= 15
x = .95

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

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



;=====================================================================
; Stuff to do
;=====================================================================
[Statedef -2]
;---------------------------------------------------------------------
;------------------------Stand and blocks explods

[State -2, prout]
type = Explod
trigger1 = NumExplod(0) = 0
trigger1 = anim = 0
anim = 6000
id = 0
postype = p1
pos = 2,-10
facing = 1
removetime = -1
bindtime = -1
sprpriority = 2

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 0
id = 0

[State -2, prout]
type = Explod
trigger1 = NumExplod(20) = 0
trigger1 = anim = 20
anim = 6000
id = 20
postype = p1
pos = 2,-10
facing = 1
removetime = -1
bindtime = -1
sprpriority = 2

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 20
id = 20

[State -2, prout]
type = Explod
trigger1 = NumExplod(21) = 0
trigger1 = anim = 21
anim = 6000
id = 21
postype = p1
pos = 2,-10
facing = 1
removetime = -1
bindtime = -1
sprpriority = 2

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 21
id = 21

[State -2, prout]
type = Explod
trigger1 = NumExplod(11) = 0
trigger1 = anim = 11
anim = 6000
id = 11
postype = p1
pos = 2,-10
facing = 1
removetime = -1
bindtime = -1
sprpriority = 2

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 11
id = 11

[State -2, prout]
type = Explod
trigger1 = NumExplod(120) = 0
trigger1 = anim = 120
anim = 6001
id = 120
postype = p1
pos = 15,-65
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 120
id = 120

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 181
id = 3660


[State -2, prout]
type = Explod
triggerall = NumExplod(130) = 0
trigger1 = anim = 130
trigger2 = anim = 150
anim = 6002
id = 130
postype = p1
pos = 15,-65
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 130 && anim != 150
id = 130

[State -2, prout]
type = Explod
trigger1 = NumExplod(140) = 0
trigger1 = anim = 140
anim = 6003
id = 140
postype = p1
pos = 15,-65
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 140
id = 140

[State -2, prout]
type = Explod
trigger1 = NumExplod(121) = 0
trigger1 = anim = 121
anim = 6001
id = 121
postype = p1
pos = 20,-38
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 121
id = 121

[State -2, prout]
type = Explod
triggerall = NumExplod(131) = 0
trigger1 = anim = 131
trigger2 = anim = 151
anim = 6002
id = 131
postype = p1
pos = 20,-38
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 131 && anim != 151
id = 131

[State -2, prout]
type = Explod
trigger1 = NumExplod(141) = 0
trigger1 = anim = 141
anim = 3037
id = 141
postype = p1
pos = 20,-38
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 141
id = 141

[State -2, prout]
type = Explod
trigger1 = NumExplod(122) = 0
trigger1 = anim = 122
anim = 6001
id = 122
postype = p1
pos = 19,-50
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 122
id = 122

[State -2, prout]
type = Explod
triggerall = NumExplod(132) = 0
trigger1 = anim = 132
trigger2 = anim = 152
anim = 6002
id = 132
postype = p1
pos = 19,-50
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 132 && anim != 152
id = 132

[State -2, prout]
type = Explod
trigger1 = NumExplod(142) = 0
trigger1 = anim = 142
anim = 6003
id = 142
postype = p1
pos = 19,-50
facing = 1
removetime = -1
bindtime = -1
sprpriority = 4

[State -2, prout]
type = RemoveExplod
trigger1 = anim != 142
id = 142
;-------------------------------------
; 特殊ジャンプ管理
[State -2,VarSet]
type = VarSet
trigger1 = Command = "holddown"
var(31) = 10

[State -2,VarSet]
type = Varadd
trigger1 = var(31) > 0 && StateNo != 40 && Command != "holddown"
var(31) = -1

[State -2,VarSet]
type = VarSet
trigger1 = MoveType = H
var(31) = 0




;---------------------------------------------------------------------
; 気絶処理
[State -2, Varadd]
type = Varadd
triggerall = var(37) > 0
trigger1 = stateno != [150,155)
trigger1 = stateno != [5000,5899]
ignorehitpause = 1
var(37) = -1

[State -2,varset]
type = varset
trigger1 = stateno = [150,155)
trigger2 = stateno = [5000,5900)
var(37) = 126
ignorehitpause = 1

[State -2, 6]
type = Varadd
trigger1 = Time = 1
trigger1 = GetHitVar(hitcount) = 1
trigger1 = stateno = 5000 || stateno = 5010 || stateno = 5020
ignorehitpause = 1
var(36) = GetHitVar(animtype)+1

[State -2,varset]
type = varset
trigger1 = var(37) = 0
var(36) = 0

[State -1, Stand_NotHitBy]
type = NotHitBy
trigger1 = alive
trigger1 = var(36) >= 30
trigger1 = stateno = [5000,5299]
value = SCA
time = 1

[State -2, 8]
type = ChangeState
trigger1 = alive
trigger1 = var(36) >= 30 && (stateno = 5000 || stateno = 5010 || stateno = 5020)
value = 5300
ignorehitpause = 1
ctrl = 0

;---------------------------------------------------------------------
; 削られＫＯ
[State 150, 2]
type = ChangeState
trigger1 = Life <= 0 && SelfAnimExist(5950)
trigger1 = StateNo = 5000 || StateNo = 5010
trigger1 = PrevStateNo = 130 || PrevStateNo = 131
value = 5950

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

;---------------------------------------------------------------------------
[State -2]
type = varset
trigger1 = !var(30)
var(30) = floor(LifeMax/(100))

;---------------------------------------------------------------------------
;ブロッキング関係

[State -2, 1]
type = varset
trigger1 = time = 1
trigger1 = stateno = [4010,4020]
trigger2 = time = 1
trigger2 = stateno = 4040
trigger3 = var(31) >= 20
var(33) = 0

[State -2, 2]
type = varset
trigger1 = time = 1
trigger1 = stateno = [4010,4020]
trigger2 = time = 1
trigger2 = stateno = 4040
trigger3 = var(31) >= 20
var(31) = 0

[State -2, 3]
type = varadd
trigger1 = var(31)
var(31) = 1
ignorehitpause = 1

[State -2, 4]
type = varset
triggerall = !var(59)
triggerall = !var(31)
trigger1 = command = "fwd"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
var(31) = 1

[State -2, 5]
type = varset
triggerall = !var(59)
trigger1 = command != "holdfwd"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdback"
trigger1 = var(31) = [1,4]
var(33) = 1

[State -2, 6]
type = varset
trigger1 = time = 1
trigger1 = stateno = [4010,4020]
trigger2 = time = 1
trigger2 = stateno = 4040
trigger3 = var(32) >= 20
var(34) = 0

[State -2, 7]
type = varset
trigger1 = time = 1
trigger1 = stateno = [4010,4020]
trigger2 = time = 1
trigger2 = stateno = 4040
trigger3 = var(32) >= 20
var(32) = 0

[State -2, 8]
type = varadd
trigger1 = var(32)
var(32) = 1
ignorehitpause = 1

[State -2, 9]
type = varset
triggerall = !var(59)
triggerall = !var(32)
trigger1 = command = "down"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
var(32) = 1

[State -2, 10]
type = varset
triggerall = !var(59)
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = var(32) = [1,4]
var(34) = 1

;立ちブロッキング
[State -2, 11] 
type = hitoverride
triggerall = !Var(59)
triggerall = statetype != A
triggerall = ctrl
trigger1 = !var(59)
trigger1 = var(31) = [1,4]
trigger2 = !var(59)
trigger2 = var(31) = [5,8]
trigger2 = var(33)
slot = 0
stateno = 4040
attr = SA, AA, AP
time = 1

;屈ブロッキング
[State -2, 12]
type = hitoverride
triggerall = !Var(59)
triggerall = statetype = C 
triggerall = ctrl
trigger1 = !var(59)
trigger1 = var(32) = [1,4]
trigger2 = !var(59)
trigger2 = var(32) = [5,8]
trigger2 = var(34)
slot = 0
stateno = 4010
attr = C, AA, AP
time = 1

;空中ブロッキング
[State -2, 13]
type = hitoverride
triggerall = !Var(59)
triggerall = statetype = A
triggerall = ctrl
trigger1 = !var(59)
trigger1 = var(31) = [1,4]
trigger2 = !var(59)
trigger2 = var(31) = [5,8]
trigger2 = var(33)
slot = 0
stateno = 4020
attr = SCA, AA, AP
time = 1

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


;=====================================================================
; Stuff to do
;=====================================================================

[Statedef -3]
;---------------------------------------------------------------------------
;デバッグ用
[State -2,debug]
type = displaytoclipboard
trigger1 = 1
text = "NumTarget = %d  Fvar(3) = %f var(7) = %d var(8) = %d ScreenPos Y = %d"
params = NumTarget,FVar(3),Var(7),var(8),floor(240-ScreenPos Y)
ignorehitpause = 1

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

[State -3]
type = varrandom
trigger1 = 1
v = 20
range = 1,5
ignorehitpause = 1





[State -3, Light Hit Sound]
type = PlaySnd
triggerall = time = 1
triggerall = alive
triggerall = var(20) = [1,2]
trigger1 = stateno = 5001 && anim = 5000
trigger2 = stateno = 5001 && anim = 5010
trigger3 = stateno = 5011 && anim = 5020
trigger4 = stateno = 5020 && anim = 5010
trigger5 = stateno = 5020 && anim = 5000
trigger6 = stateno = 5081 && anim = 5080
trigger7 = stateno = 5020 && anim = 5011
trigger8 = stateno = 5020 && anim = 5001
trigger9 = stateno = 5030 && anim = 5052
channel = 2
value = 5000,0
lowpriority = 1

[State -3, Light Hit Sound]
type = PlaySnd
triggerall = time = 1
triggerall = alive
triggerall = var(20) = [3,5]
trigger1 = stateno = 5001 && anim = 5000
trigger2 = stateno = 5001 && anim = 5010
trigger3 = stateno = 5011 && anim = 5020
trigger4 = stateno = 5020 && anim = 5010
trigger5 = stateno = 5020 && anim = 5000
trigger6 = stateno = 5081 && anim = 5080
trigger7 = stateno = 5011 && anim = 5021
trigger8 = stateno = 5030 && anim = 5050
trigger9 = stateno = 5030 && anim = 5052
channel = 2
value = 5000,1
lowpriority = 1

[State -3, Light Hit Sound]
type = PlaySnd
triggerall = time = 1
triggerall = alive
triggerall = var(20) = 3
trigger1 = stateno = 5001 && anim = 5002
trigger2 = stateno = 5001 && anim = 5012
trigger3 = stateno = 5011 && anim = 5022
trigger4 = stateno = 5020 && anim = 5012
trigger5 = stateno = 5020 && anim = 5002
channel = 2
value = 5000,2

[State -3, Light Hit Sound]
type = PlaySnd
triggerall = time = 1
triggerall = alive
triggerall = var(20) = 4
trigger1 = stateno = 5001 && anim = 5001
trigger2 = stateno = 5001 && anim = 5011
trigger3 = stateno = 5001 && anim = 5002
trigger4 = stateno = 5001 && anim = 5012
trigger5 = stateno = 5011 && anim = 5022
trigger6 = stateno = 5020 && anim = 5012
trigger7 = stateno = 5020 && anim = 5002
channel = 2
value = 5000,3

[State -3, Light Hit Sound]
type = PlaySnd
triggerall = time = 1
triggerall = alive
trigger1 = stateno = 5030 && anim = 5051
trigger2 = stateno = 5071 && anim = 5070
trigger3 = stateno = 5100 && anim = 5100
trigger4 = stateno = 5100 && anim = 5101
trigger5 = stateno = 5100 && anim = 5102
channel = 2
value = 5000,3


[State -2]
type = helper
trigger1 = palno = [7,12]
;trigger1 = AnimElemTime(4) = 0
trigger1 = NumHelper(20000) = 0
name = "Balrog"
id = 20000
pos = -30,0
postype = p1
stateno = 20000
helpertype = Normal
keyctrl = 1
size.xscale = 1
size.yscale = 1
sprpriority = -2
ownpal = 1
;supermovetime = 999999999999999999
;pausemovetime = 999999999999999999

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




;================================================================
;AIじゃないのなにか
;-----------------------------------------



[State -2,12]
type = VarSet
triggerall = !ishelper
triggerall = movetype !=H
trigger1 = command = "CPU_1"
trigger2 = command = "CPU_2"
trigger3 = command = "CPU_3"
trigger4 = command = "CPU_4"
trigger5 = command = "CPU_5"
trigger6 = command = "CPU_6"
trigger7 = command = "CPU_7"
trigger8 = command = "CPU_8"
trigger9 = command = "CPU_9"
trigger10 = command = "CPU_10"
trigger11 = command = "CPU_11"
trigger12 = command = "CPU_12"
trigger13 = command = "CPU_13"
trigger14 = command = "CPU_14"
trigger15 = command = "CPU_15"
trigger16 = command = "CPU_16"
trigger17 = command = "CPU_17"
trigger18 = command = "CPU_18"
trigger19 = command = "CPU_19"
trigger20 = command = "CPU_20"
trigger21 = command = "CPU_21"
trigger22 = command = "CPU_22"

persistent = 1
v = 59
value = 1
;---------------------------------------------------------------------------
;AI値記憶
[State -3,AI-log]
type = VarSet
triggerall = var(59)
trigger1 = win = 1
trigger2 = lose = 1
trigger3 = !alive
var(58) = var(59)
;--------------------------------------------------------------------
[State -3,AI-off]
type = VarSet
trigger1 = !alive
trigger2 = win || lose
var(59) = 0
;===================================================================
;---------------------------------------------------------------------

[State -1,ブロ]
Type=VarSet
trigger1=1
v=34
value=10;←ここを弄るとブロ率が変わります（１〜１０）

;AI 立ちブロッキング
[State -1, 11] 
type = hitoverride
triggerall = var(59)
triggerall = ctrl || stateno = 19 || stateno = 104 || stateno = 21 || stateno = 120 || stateno = [130,131]
triggerall = statetype != A
trigger1 = random <= 100*Var(34)
slot = 0
stateno = 4040
attr = SA, AA, AP
time = 1

;AI 屈ブロッキング
[State -1, 12]
type = hitoverride
triggerall = var(59)
triggerall = ctrl || stateno = 19 || stateno = 104 || stateno = 21 || stateno = 120 || stateno = [130,131]
triggerall = statetype != A
trigger1 = random <= 100*Var(34)
slot = 1
stateno = 4010
attr = C, AA, AP
time = 1

;AI 空中ブロッキング
[State -1, 13]
type = hitoverride
triggerall = var(59)
triggerall = statetype = A
triggerall = (stateno = [40,51]) || stateno = 132
trigger1 = random <= 100*Var(34)
slot = 2
stateno = 4020
attr = SCA, AA, AP
time = 1


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

[State -1]
type = ChangeState
value = 2450
triggerall = NumHelper(20000) = 0
triggerall = NumHelper(30000) = 0
triggerall = NumHelper(10000) = 0
triggerall= var(59)=1 
triggerall = power >= 3000
triggerall = Ctrl || (stateno = 100) || (stateno = 20)  
trigger1 = enemynear,pos y = [-150,-1]
trigger1 = random <= 300
trigger1 = P2movetype != H
trigger2 = Enemy,NumHelper > 0 || Enemy,NumProj > 0 || Enemy,vel X > 10
trigger2 = EnemyNear,HitDefAttr = SC,NP,SP,HP
trigger2 = random <= 500
;---------------------------------------------------------------------
;=====================================================================
;---------------------------------------------------------------------

[State -1]
type = ChangeState
value = 2458
triggerall = NumHelper(20000) = 0
triggerall = NumHelper(30000) = 0
triggerall = NumHelper(10000) = 0
triggerall= var(59)=1 
triggerall = power >= 3000
triggerall= StateType = A 
trigger1 = Ctrl =1
trigger1 = enemynear,pos y = [-150,-1]
trigger1 = random <= 300
trigger1 = P2movetype != H
trigger2 = Enemy,NumHelper > 0 || Enemy,NumProj > 0 || Enemy,vel X > 10
trigger2 = EnemyNear,HitDefAttr = SC,NP,SP,HP
trigger2 = random <= 500
;---------------------------------------------------------------------


;波動
[State -1,hadou]
type = ChangeState
triggerall = power >= 1000 && random <= 400
triggerall = var(59)=1 && roundstate=2 && statetype !=a
triggerall = !inguarddist && stateno!=0
triggerall = NumHelper(1710) = 0 
triggerall = Ctrl || (stateno = 100) || (stateno = 20)  
trigger1 = p2statetype =A && p2movetype=H
trigger2 = p2statetype =L
trigger3 = P2BodyDist X >30
trigger3 = p2statetype !=A
value = 2350

;波動
[State -1,hadou]
type = ChangeState
triggerall = power >= 2000 && random <= 400
triggerall = var(59)=1 && roundstate=2 && statetype !=a
triggerall = !inguarddist && stateno!=0
triggerall = NumHelper(1710) = 0 
triggerall = Ctrl || (stateno = 100) || (stateno = 20)  
trigger1 = p2statetype =A && p2movetype=H
trigger2 = p2statetype =L
trigger3 = P2BodyDist X >30
trigger3 = p2statetype !=A
value = 2360

；ダブル
[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=A
triggerall = (p2statetype!=L) 
triggerall = power >= 3000
trigger1 = ctrl || (stateno = 100) || (stateno = 20) 
trigger1 = (p2statetype!=A)
trigger1 = (p2movetype=A)
trigger1 = p2bodydist X = [-5,50]
value = 2200
；ダブル
[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=A
triggerall = (p2statetype!=L) 
triggerall = power >= 2000
trigger1 = ctrl || (stateno = 100) || (stateno = 20) 
trigger1 = (p2statetype!=A)
trigger1 = (p2movetype=A)
trigger1 = p2bodydist X = [-5,50]
value = 2100
；ダブル
[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=A
triggerall = (p2statetype!=L) 
triggerall = power >= 1000
trigger1 = ctrl || (stateno = 100) || (stateno = 20) 
trigger1 = (p2statetype!=A)
trigger1 = (p2movetype=A)
trigger1 = p2bodydist X = [-5,50]
value = 2000

；ファイナル
[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=A
triggerall = (p2statetype!=L) && power>=3000 && random <150
triggerall =  Life <= 474
triggerall = ctrl || (stateno = 100) || (stateno = 20) 
trigger1 = (p2statetype=A)
trigger1 = (p2movetype!=H)
;trigger2 = (p2movetype=A)
;trigger3 = p2life<100
;trigger1 = p2bodydist Y > 0
value = 2500



；投げ
[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=A
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L) 
trigger1 = ctrl || (stateno = 100) || (stateno = 20) 
trigger1 = (p2statetype!=A)
trigger1 = p2bodydist X = [-5,10]
trigger1 = (p2movetype!=H)
value = 830
[State -1, Back Step]
type = ChangeState
value = 361
triggerall = var(59) = 1 && RoundState = 2
triggerall = statetype != A && ctrl
;triggerall = (p2movetype=A)
triggerall = (backedgedist<=50)
triggerall = Ctrl || (stateno = 100) || (stateno = 20) || stateno = 0
triggerall = P2BodyDist X = [-5,30]
Trigger1 = Facing = -1
Trigger1 = enemynear(0),Facing = 1 
Trigger2 = Facing = 1 
Trigger2 = enemynear(0),Facing = -1
[State -1, Back Step]
type = ChangeState
value = 360
triggerall = var(59) = 1 && RoundState = 2
triggerall = statetype != A && ctrl
triggerall = (p2movetype=A)
triggerall = (backedgedist>=50)
triggerall = Ctrl || (stateno = 100) || (stateno = 20) || stateno = 0
triggerall = P2BodyDist X = [-5,70]
Trigger1 = Facing = -1
Trigger1 = enemynear(0),Facing = 1 
Trigger2 = Facing = 1 
Trigger2 = enemynear(0),Facing = -1
[State -1, Back Step]
type = ChangeState
value = 361
triggerall = var(59) = 1 && RoundState = 2
triggerall = statetype != A && ctrl && p2statetype=A
triggerall = (p2movetype=A)
triggerall = Ctrl || (stateno = 100) || (stateno = 20) || stateno = 0
triggerall = P2BodyDist X = [-20,30]
Trigger1 = Facing = -1
Trigger1 = enemynear(0),Facing = 1 
Trigger2 = Facing = 1 
Trigger2 = enemynear(0),Facing = -1
[State -1, Back Step]
type = ChangeState
value = 361
triggerall = var(59) = 1 && RoundState = 2
triggerall = statetype != A && ctrl && p2statetype=L
triggerall = (backedgedist<=50)
triggerall = Ctrl || (stateno = 100) || (stateno = 20) || stateno = 0
trigger1 = P2BodyDist X = [-5,20]
[State -1, Back Step]
type = ChangeState
value = 360
triggerall = var(59) = 1 && RoundState = 2
triggerall = statetype != A && ctrl && stateno!=0
triggerall = (p2movetype=A)
triggerall = (backedgedist>=50)
triggerall = Ctrl || (stateno = 100) || (stateno = 20) || stateno = 0
triggerall = P2BodyDist X = [30,150]
trigger1 = random<=700
[State -1, Guard(AI)]
Type = ChangeState
Value = 120
triggerall = var(59)=1 && roundstate = 2
TriggerAll = Ctrl||(StateNo=[20,22])||(StateNo=100&&Time>12)
TriggerAll = StateNo!=[120,155]
Trigger1 = P2StateType!=A
Trigger1 = P2Dist X>=0
Trigger1 = InGuardDist
Trigger1 = !EnemyNear,hitdefattr=SCA,NT,ST,HT
Trigger2 = !EnemyNear,hitdefattr=SCA,NT,ST,HT
Trigger2 = P2MoveType=A
Trigger2 = P2Dist X<0
Trigger3 = Enemy,NumHelper>0||Enemy,NumProj>0
Trigger3 = InGuardDist
[State -1, Back Step]
type = ChangeState
value = 360
triggerall = var(59) = 1 && RoundState = 2
triggerall = statetype != A && ctrl
trigger1 = P2BodyDist X <= 60
trigger1 = p2statetype = L 
trigger2 = frontedgebodydist <= 60
trigger2 = p2statetype = L
trigger3 = P2BodyDist X <= 50
trigger3 = p2statetype = A && p2movetype=H 

[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a && p2statetype !=a
triggerall = (p2statetype!=L)
triggerall = power>=3000
trigger1 = Ctrl || (stateno = 240) 
trigger1 = movehit
value = 2200
[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a  && p2statetype !=a
triggerall = (p2statetype!=L)
triggerall = power>=2000
trigger1 = Ctrl || (stateno = 240) 
trigger1 = movehit
value = 2100
[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a && p2statetype !=a
triggerall = (p2statetype!=L)
triggerall = power>=1000
trigger1 = Ctrl || (stateno = 240) 
trigger1 = movehit
value = 2000



[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a
triggerall = (p2statetype!=L)
trigger1 = Ctrl || (stateno = 230) 
trigger1 = P2BodyDist X > 30
trigger1 = movecontact
value = 240




;波動
[State -1,hadou]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a
triggerall = !inguarddist && stateno!=0
;triggerall = random <= 400
triggerall = Ctrl || (stateno = 100) || (stateno = 20)  
trigger1 = p2statetype != A && p2movetype=H
trigger2 = p2statetype =L
trigger3 = P2BodyDist X >30
trigger3 = p2statetype !=A
value = 1010



;立ち小パン
[State -1,kopann]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a
triggerall = (p2statetype!=L)
triggerall = !inguarddist
trigger1 = Ctrl || (stateno = 100) || (stateno = 20)  
trigger1 = P2BodyDist X = [-5,30]
trigger1 = p2statetype != A
trigger2 = Ctrl || (stateno = 230) 
trigger2 = movecontact
trigger2 = time > 2
trigger2 = P2BodyDist X = [-5,30]
value = 230

;対空
[State -1,syouryuu]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a
triggerall = (p2statetype!=L)
triggerall = !inguarddist
trigger1 = Ctrl || (stateno = 100) || (stateno = 20)  
;trigger1 = P2BodyDist X = [-5,100]
trigger1 = p2statetype = A
trigger1 = p2movetype = H
value = 1200

;対空
[State -1,syouryuu]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a
triggerall = (p2statetype!=L)
triggerall = !inguarddist
trigger1 = Ctrl || (stateno = 100) || (stateno = 20)  
trigger1 = P2BodyDist X = [-5,20]
trigger1 = P2BodyDist Y < -20
trigger1 = p2statetype = A
trigger1 = p2movetype != H
value = 410
;立ち小パン
[State -1]
type = ChangeState
triggerall = var(59)=1 && roundstate=2 && statetype !=a
triggerall = (p2statetype=L)
Triggerall = !InGuardDist
Triggerall = power<3000
;triggerall = (p2stateno!=[5120,5130])
trigger1 = Ctrl || (stateno = 100) || (stateno = 20) || stateno = 0
value = 230


[State -1, Walk]
type = ChangeState
value = 20
triggerall = var(59)=1 && RoundState = 2
triggerall = !inguarddist
trigger1 = statetype != A
trigger1 = ctrl && stateno != 20
trigger1 = random <= 100
[State -1]
type = ChangeState
value = 0
triggerall = var(59) = 1 && RoundState = 2
trigger1 = stateno=40
ctrl=1

---------
;元の体ではサイコパワー耐えられない
[State -2, 1]
type = lifeadd
triggerall = RoundState = 2
triggerall = ctrl
trigger1= (GameTime% 3 )=0
value = -1
;ignorehitpause = 1