;---------------------------------------------------------------------------
; 基本データ
;---------------------------------------------------------------------------
[Data]
life              = 1000   ;ライフ（体力ゲージ）最大値
power             = 3000   ;パワーゲージ最大値（オプション・デフォルトは3000=Lv.3）
attack            = 100    ;攻撃力（デフォルトは１００％）
defence           = 100    ;防御力（デフォルトは１００％）
fall.defence_up   = 50     ;横に倒れている時に一時的に加える防御力（％）
liedown.time      = 16;60     ;横に倒れている時間（フレーム）
airjuggle         = 15     ;ジャグルポイント限界値（「小ネタ.txt」参照）
sparkno           = 2      ;デフォルトのヒットスパーク（fightfxから）
guard.sparkno     = 40     ;デフォルトのガードスパーク（fightfxから）
KO.echo           = 0      ;ＫＯ時の音声（11,0）にエコーを掛けるか否か（0=掛けない,1=掛ける）
volume            = 255    ;キャラの標準の音量（最小-255・最大255）
IntPersistIndex   = 0     ;次のラウンドへ持ち越せる「Var」のアドレスの範囲を決める（※１）
FloatPersistIndex = 0     ;次のラウンドへ持ち越せる「FVar」のアドレスの範囲を決める（※１）

;---------------------------------------------------------------------------
; サイズ
;---------------------------------------------------------------------------
[Size]
xscale           = 1       ;キャラの横の大きさ（絶対値・float）
yscale           = 1       ;キャラの縦の大きさ（絶対値・float）
ground.back      = 16         ;地上にいる時の「後方の物理的な幅」
ground.front     = 16         ;地上にいる時の「前方の物理的な幅」
air.back         = 15         ;空中にいる時の「後方の物理的な幅」
air.front        = 15         ;空中にいる時の「前方の物理的な幅」
height           = 65      ;キャラの物理的な高さ（高いほど相手は飛び越しにくくなる）
attack.dist      = 150     ;相手がガード態勢に入る最低の距離
proj.attack.dist = 90      ;自分の「Projectile」に対して相手がガード態勢に入る最低の距離
proj.doscale     = 1       ;xscaleとyscaleを「Projectile」にも影響させるか否か（0=させない・1=させる）
head.pos         = 10,-93 ;-87  ;キャラの標準の頭の座標（Bind系で適用される）
mid.pos          = -3,-57 ;-52  ;キャラの標準の体中心の座標（Bind系で適用される）
shadowoffset     = 0       ;影のＹ軸方向の位置座標
draw.offset      = 0,0     ;キャラの表示座標（Ｘ軸,Ｙ軸）

;---------------------------------------------------------------------------
; 移動速度
;---------------------------------------------------------------------------
[Velocity]
walk.fwd     = 3.365         ;前進速度（Ｘ軸・[Statedef 20]に適用される）
walk.back    = -2.22        ;後退速度（Ｘ軸・[Statedef 20]に適用される）
run.fwd      = 4.6,0       ;前方に走る速度（Ｘ軸,Ｙ軸・[Statedef 100]に適用される）
run.back     = -4.5,-3.8   ;後方に走る速度（Ｘ軸,Ｙ軸・[Statedef 105]に適用される）
jump.neu     = 0,-10.25     ;垂直ジャンプの速度（Ｘ軸,Ｙ軸・[Statedef 40]に適用される）
jump.back    = -3.8       ;後方ジャンプの速度（Ｘ軸・[Statedef 40]に適用される）
jump.fwd     = 3.36         ;前方ジャンプの速度（Ｘ軸・[Statedef 40]に適用される）
runjump.back = -2.55,-8.1  ;後方に走ってからのジャンプ速度（Ｘ軸,Ｙ軸・[Statedef 40]に適用される）
runjump.fwd  = 4,-8.1      ;前方に走ってからのジャンプ速度（Ｘ軸,Ｙ軸・[Statedef 40]に適用される）
airjump.neu  = 0,-8.1      ;空中垂直ジャンプ速度（Ｘ軸,Ｙ軸・[Statedef 45]に適用される）
airjump.back = -2.55       ;空中後方ジャンプ速度（Ｘ軸・[Statedef 45]に適用される）
airjump.fwd  = 2.5         ;空中前方ジャンプ速度（Ｘ軸・[Statedef 45]に適用される）

;---------------------------------------------------------------------------
; 運動関係
;---------------------------------------------------------------------------
[Movement]
airjump.num     = 0        ;空中ジャンプが出来る回数
airjump.height  = 35       ;空中ジャンプが出来る最低の高度（Ｙ軸）
yaccel          = .587      ;Ｙ軸加速度（重力）
stand.friction  = .85      ;立っている時の摩擦係数（ステートのPhysicsが「S」の時）
crouch.friction = .82      ;しゃがんでいる時の摩擦係数（ステートのPhysicsが「C」の時）

;===========================================================================
[Quotes]
victory1 = A weakling like yourself doesn't deserve fists to fight with
victory2 = Fade to nothingness! You weakness disgust me!
victory3 = If you are merciless, your soul will be slaughtered!
victory4 = It's time for you to experience a million deaths in an instant!
victory5 = Shall I dismember you to demonstrate your weakness?
victory6 = To challenge me is to respect chaos, and to respect death!
victory7 = You are permanently crippled! Accept your defeat!
;===========================================================================
; 基本行動
;===========================================================================
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0
velset = 0,0

[State 0, 2]
type = ChangeAnim
triggerall = !var(13) || var(13) && roundstate != 2
triggerall = Anim != 180
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 2]
type = ChangeAnim
triggerall = roundstate = 2
triggerall = var(13)
trigger1 = Anim != 20
value = 20

[State 20, 1]
type = VelSet
triggerall = roundstate = 2
trigger1 = var(13)
x = 6.63/const(movement.stand.friction)

[State -1]
Type = ChangeState
Triggerall = var(13)
Trigger1 = Command = "holddown"
value = 10

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

[State -2]
type = VarSet
triggerall = Var(59)
triggerall = Var(40)
trigger1 = var(40) >= 28 + 4*random%4
trigger2 = var(40) >= 50
trigger3 = var(40) >= 25
trigger3 = P2bodydist X >= 160
var(40) = 0

[State -2]
type = VarAdd
triggerall = Var(59)
trigger1 = Var(40)
var(40) = 1

[State -2]
type = VarSet
triggerall = Var(59)
triggerall = Var(12)
triggerall = !Var(40)
triggerall = time = 0
triggerall = prevstateno = [21,22]
trigger1 = random <= 350
trigger1 = P2bodydist X = [ceil(90*const(size.xscale)),170]

trigger2 = enemynear,alive = 1 && (P2StateType = L || P2stateno = 5120)
trigger2 = P2bodydist X = [128,140]
trigger2 = var(43) != 4
trigger2 = (100*life/const(data.life)) >= 28
trigger2 = var(58)%2 = 0
var(40) = 1

;ガード
[State -3]
Type = ChangeState
Value = 120
TriggerAll = Var(59)
triggerall = roundstate = 2
TriggerAll = Ctrl
TriggerAll = statetype != A
Trigger1 = var(55) >= 7
Trigger1 = P2Dist X >= 0
Trigger1 = EnemyNear,HitDefAttr = ,AA,AP
Trigger1 = Random = [0,350]
Trigger2 = EnemyNear,HitDefAttr = ,AA,AP
Trigger2 = P2MoveType = A
Trigger2 = P2Dist X < 0
Trigger3 = Enemy,NumHelper > 0 || Enemy,NumProj > 0
Trigger3 = var(55) >= 7
Trigger3 = Random = [0,350]
Trigger4 = var(55) >= 7
Trigger4 = Var(40)

;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C
;anim = 10

[State 10]
type = ChangeAnim
trigger1 = !var(59)
trigger1 = time = 0
value = 10

[State -1]
Type = ChangeState
Triggerall = var(59)
Trigger1 = time = 0
value = 0
Ctrl = 1

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

[State 10, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0
Ctrl = 1

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11

[State -1]
Type = ChangeState
Triggerall = var(13)
Trigger1 = Command != "holddown"
value = 12

[State 20, 4]
type = changestate
triggerall = var(59)
trigger1 = !inguarddist
trigger1 = time > 6 && random <= 500
trigger2 = roundstate >= 3
value = 12

;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)/const(movement.stand.friction)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)/const(movement.stand.friction)

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

[State 20, 4]
type = ChangeAnim
triggerall = !var(59)
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State -1]
Type = ChangeState
Trigger1 = var(59)
value = 0
Ctrl = 1

[State 20, 4]
type = changestate
trigger1 = roundstate != 2
value = 0

;---------------------------------------------------------------------------
;歩き（AI,fwd）
[Statedef 21]
type    = S
physics = N
ctrl = 0
velset = 0,0

[State 20, 1]
type = Turn
trigger1 = P2dist X < 0

[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)/const(movement.stand.friction)

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

[State 20, 4]
type = changestate
trigger1 = time > 6
trigger1 = var(7) != [1,2]
trigger1 = var(58)%3 = 2
trigger1 = P2bodydist x <= 27
trigger2 = inguarddist
trigger3 = roundstate != 2
trigger4 = time > 16 ; var(12) != 20 && 
trigger4 = var(7) != [1,2]
trigger4 = random >= 950
trigger5 = P2bodydist x <= 2
trigger6 = !var(8) && var(58)%2 = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;歩き（AI,back）
[Statedef 22]
type    = S
physics = N
ctrl = 0
velset = 0,0

[State 20, 1]
type = Turn
trigger1 = P2dist X < 0

[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.back.x)/const(movement.stand.friction)

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

[State 20, 4]
type = changestate
trigger1 = time > 6
trigger1 = BackEdgebodyDist < 5
trigger2 = roundstate != 2
trigger3 = time > 16
trigger3 = random >= 950
trigger4 = inguarddist
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;歩き,non stop（AI,fwd）
[Statedef 23]
type    = S
physics = N
ctrl = 0
velset = 0,0

[State 20, 1]
type = Turn
trigger1 = P2dist X < 0

[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)/const(movement.stand.friction)

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

[State 20, 4]
type = changestate
trigger1 = var(7)
trigger1 = P2bodydist x >= 38
trigger1 = P2bodydist y >= -10
trigger2 = P2stateno = [5071,5120]
trigger3 = enemynear,alive = 1
trigger3 = P2statetype = L
trigger4 = !var(8)
value = 22

[State 20, 4]
type = changestate
trigger1 = !var(7) && P2bodydist x <= 10
trigger2 = inguarddist
trigger3 = roundstate != 2
trigger4 = var(8) = 1 && var(7) = [1,2]
trigger4 = P2bodydist x <= 2
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
;anim = 40
ctrl = 0

[State 10]
type = ChangeAnim
trigger1 = !var(59)
trigger1 = time = 0
value = 40

[State -1]
Type = ChangeState
Trigger1 = var(59)
value = 0
Ctrl = 1

[State -1]
Type = ChangeState
Trigger1 = var(13)
value = 0
Ctrl = 0

[State 40]
type = HitBy
trigger1 = 1
value = SCA, NA,SA,HA,NP,SP,HP

[State 40, 1]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
sysvar(1) = 0

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

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

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Jump Start(AI,up or fwd)
[Statedef 41]
type    = S
physics = S
anim = 40
ctrl = 0

[State 40]
type = HitBy
trigger1 = 1
value = SCA, NA,SA,HA,NP,SP,HP

[State 40, 2]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
sysvar(1) = 1

[State 40, 1]
type = VarSet
triggerall = var(59)
triggerall = !var(12)
triggerall = Time = 0
trigger1 = P2bodydist x = [127,140]
trigger1 = P2bodydist Y = [-20,-1]
trigger1 = enemynear,vel X = [2,4]
trigger1 = enemynear,vel Y < 0
trigger2 = P2bodydist x = [70,100]
trigger2 = P2stateno = 5120
sysvar(1) = 0

[State 40, 1]
type = VarSet
triggerall = var(59)
triggerall = var(12)
triggerall = Time = 0
trigger1 = P2bodydist x >= 170
trigger1 = random <= 400
trigger2 = P2bodydist x = [127,140]
trigger2 = P2bodydist Y = [-20,-1]
trigger2 = enemynear,vel X = [2,4]
trigger2 = enemynear,vel Y < 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
triggerall = var(59)
triggerall = var(12)
triggerall = Time = 0
trigger1 = !InGuardDist
trigger1 = !var(42) || var(42) >= 5
trigger1 = NumProj || (enemynear,stateno = [120,155]) || !enemynear,ctrl 
trigger1 = (P2bodydist X >= 220 && !enemynear,ctrl) || P2bodydist X >= 191 && (NumProj || (enemynear,stateno = [120,155]))
trigger1 = enemynear,vel X <= 2
trigger1 = P2StateType != L
trigger1 = P2stateno != 5120
trigger1 = P2stateno != 5201
sysvar(1) = 1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Jump Start(AI,back)
[Statedef 42]
type    = S
physics = S
anim = 40
ctrl = 0

[State 40]
type = HitBy
trigger1 = 1
value = SCA, NA,SA,HA,NP,SP,HP

[State 40, 3]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;ジャンプ
[Statedef 50]
type    = A
physics = A

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

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

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

[State 50, 4]
type = ChangeState
trigger1 = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

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

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

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

[State 52, 2]
type = CtrlSet
trigger1 = time = ifelse((prevstateno = 1400||(prevstateno = [350,410])),2,1)
value = 1

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

;---------------------------------------------------------------------------
;前方転身
[Statedef 90]
type    = S
physics = N
ctrl = 0
velset = 0,0

[State 90]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(command = "zenten1", 0, ifelse(command = "zenten2", 1, 2))

[State 90]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = ifelse(P2bodydist X >= 140, 1, 0)  ;random%3

[State 90]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 90, ifelse(var(6) = 1, 91, 92))

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

;98,ec(16) 70
;98,1c(24) 109
;98,4c(34) 149

[State 90]
type = VelSet
trigger1 = Time = 0
x = ifelse(!var(6), 4.37, ifelse(var(6) = 1, 4.38, 4.5))

[State 90]
type = Width
trigger1 = 1
edge = 5,0

[State 90]
type = PlayerPush
trigger1 = 1
value = 0

[State 170]
type = NotHitBy
trigger1 = anim = 90
trigger1 = animelemtime(3) >= 0 && animelemtime(5) < 0
trigger2 = anim = 91
trigger2 = animelemtime(3) >= 0 && animelemtime(9) < 0
trigger3 = anim = 92
trigger3 = animelemtime(3) >= 0 && animelemtime(13) < 0
value = ,AP
time = 1

[State 120, 2]
type = StateTypeSet
trigger1 = animelemtime(3) = 0 
statetype = A

[State 90]
type = VelSet
trigger1 = AnimTime = -2
x = 0

[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = AnimTime = -2
statetype = C
physics = C


[State 130]
type = Turn
trigger1 = !var(13)
trigger1 = AnimTime = 0
trigger1 = P2Dist X < -1

[State 90]
type = Changestate
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; GUARD (start)
[Statedef 120]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged

[State 120, 0]
type = ChangeState
trigger1 = time = 0
trigger1 = statetype != A
trigger1 = var(13)
value = 0
ctrl = 0

[State -1, AI]
Type = null;ChangeState
Value = 41
TriggerAll = Var(59)
TriggerAll = StateType != A
TriggerAll = var(58)%3 = 1
Trigger1 = P2MoveType = A
Trigger1 = EnemyNear,HitDefAttr = SC, AT
Trigger1 = enemynear,time >= 18
Trigger1 = Time = 0

[State 120, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 120 + (statetype = C) + (statetype = A)*2

[State 120, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 120, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 120, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 120, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = !var(59)
trigger1 = command = "holddown"
trigger2 = var(59)
trigger2 = P2statetype = C
trigger3 = var(59)
trigger3 = P2bodydist x >= 80 && P2statetype != A
trigger4 = var(59)
trigger4 = P2statetype != A
trigger4 = prevstateno != [120,153]
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = !var(59)
trigger1 = command != "holddown"
trigger2 = var(59)
trigger2 = P2statetype = S
trigger2 = P2bodydist x <= 80
trigger2 = enemynear,vel X <= 4
trigger2 = (var(59) = [3,4]) || (var(59)=[1,2])&&var(58)%4=2 ||var(54) <= 12+(var(59)*2)&&enemynear,time>=8
trigger3 = var(59)
trigger3 = P2statetype = A
trigger3 = P2bodydist x <= 160
statetype = S
physics = S

[State 120, 1]
type = VelSet
trigger1 = time = 0
trigger1 = prevstateno = [21,23]
trigger1 = statetype != A
x = 0

[State 120, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 130 + (statetype = C) + (statetype = A)*2

[State 120, Stop Guarding]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; STAND GUARD (guarding)
[Statedef 130]
type    = S
physics = S

[State 120, 1]
type = VarSet
trigger1 = time = 0
var(9) = 0

[State -1, AI]
Type = null;ChangeState
Value = 41
TriggerAll = Var(59)
TriggerAll = StateType != A
TriggerAll = var(58)%3 = 1
Trigger1 = P2MoveType = A
Trigger1 = EnemyNear,HitDefAttr = SC, AT
Trigger1 = enemynear,time >= 18
Trigger1 = random <= 350

[State 130, 1]
type = ChangeAnim
trigger1 = Anim != 130
value = 130

[State 1035, 2]
type = ReversalDef
triggerall = var(59)
triggerall = time >= ifelse(var(12),1,3)
triggerall = Anim = [130,131]
Triggerall = P2MoveType = A
Triggerall = enemynear,hitdefattr = SCA,NA,SA,AT
triggerall = random >= 770
triggerall = var(9) := 1
trigger1 = enemynear,time >= 6
trigger2 = var(46) >= 12 
attr = S, SA
reversal.attr = SCA,AA,AT
pausetime = 1,1
sparkno = -1
hitsound = -1
sprpriority = -1
persistent = 0
;p1stateno = 1000
numhits = 0
getpower = 0,0

[State -1, AI]
Type = ChangeState
Value = 1000
trigger1 = var(59)
trigger1 = var(9)
Trigger1 = numtarget

[State 130, 1]
type = null;ChangeAnim
trigger1 = Anim != [130,131]
trigger1 = Anim != 21
value = 21

[State -1]
Type = null;VelSet
Trigger1 = Anim = 21
X = Const(velocity.walk.back.x)

[State 20, 1]
type = VelSet
trigger1 = time = 0
trigger1 = prevstateno = [21,23]
trigger1 = statetype != A
x = 0

[State 130, Hi to Lo]
type = ChangeState
triggerall = statetype = S
trigger1 = !var(59)
trigger1 = command = "holddown"
trigger2 = var(59)
trigger2 = P2statetype = C
trigger3 = var(59)
trigger3 = P2bodydist x > 75 && P2statetype != A
value = 131

[State 130, Stop Guarding]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback"
trigger2 = !var(59) || (var(59) && !(P2movetype = A && (var(54) = [1,11])) )
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; CROUCH GUARD (guarding)
[Statedef 131]
type    = C
physics = C

[State 120, 1]
type = VarSet
trigger1 = time = 0
var(9) = 0

[State -1, AI]
Type = null;ChangeState
Value = 41
TriggerAll = Var(59)
TriggerAll = StateType != A
TriggerAll = var(58)%3 = 1
Trigger1 = P2MoveType = A
Trigger1 = EnemyNear,HitDefAttr = SC, AT
Trigger1 = enemynear,time >= 18
Trigger1 = random <= 350

[State 131, 1]
type = ChangeAnim
trigger1 = Anim != 131
value = 131

[State 1035, 2]
type = ReversalDef
triggerall = var(59)
triggerall = time >= ifelse(var(12),1,3)
triggerall = Anim = [130,131]
Triggerall = P2MoveType = A
Triggerall = enemynear,hitdefattr = SCA,NA,SA,AT
triggerall = random >= 770
triggerall = var(9) := 1
trigger1 = enemynear,time >= 6
trigger2 = var(46) >= 12 
attr = S, SA
reversal.attr = SCA,AA,AT
pausetime = 1,1
sparkno = -1
hitsound = -1
sprpriority = -1
persistent = 0
;p1stateno = 1000
numhits = 0
getpower = 0,0

[State -1, AI]
Type = ChangeState
Value = 1000
trigger1 = var(59)
trigger1 = var(9)
Trigger1 = numtarget

[State 20, 1]
type = VelSet
trigger1 = time = 0
trigger1 = prevstateno = [21,23]
trigger1 = statetype != A
x = 0

[State 131, Lo to Hi]
type = ChangeState
triggerall = statetype = C
trigger1 = !var(59)
trigger1 = command != "holddown"
trigger2 = var(59)
trigger2 = P2statetype = S
trigger2 = P2bodydist x <= 65
trigger2 = enemynear,vel X <= 4
trigger2 = (var(59) = [3,4]) || (var(59)=[1,2])&&var(58)%4=2||var(54) <= 12+(var(59)*2)&&enemynear,time>=8
trigger3 = var(59)
trigger3 = P2statetype = A
trigger3 = P2bodydist x <= 160
value = 130

[State 131, Stop Guarding]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback"
trigger2 = !var(59) || (var(59) && !(P2movetype = A && (var(54) = [1,11])) )
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; AIR GUARD (guarding)
[Statedef 132]
type    = A
physics = N

[State 132, 1]
type = ChangeAnim
trigger1 = Anim != 132
value = 132

[State 132, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 132, 3]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 132, 4]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 132, 5]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 132, 6]
type = ChangeState
triggerall = sysvar(0)
triggerall = inguarddist
trigger1 = !var(59)
trigger1 = command = "holdback"
trigger2 = var(59)
value = 130

[State 132, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

[State 132, Stop Guarding]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback" || !inguarddist
value = 140

;---------------------------------------------------------------------------
; GUARD (end)
[Statedef 140]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged
ctrl = 1

[State 140, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 140 + (statetype = C) + (statetype = A)*2

[State 140, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 140, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 140, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 140, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = !var(59)
trigger1 = command = "holddown"
trigger2 = var(59)
trigger2 = P2statetype = C
trigger3 = var(59)
trigger3 = P2bodydist x > 75 && P2statetype != A
statetype = C
physics = C

[State 140, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = !var(59)
trigger1 = command != "holddown"
trigger2 = var(59)
trigger2 = P2statetype = S
trigger2 = P2bodydist x <= 80
trigger2 = (var(59) = [3,4]) || (var(59)=[1,2])&&var(58)%4=2||var(54) <= 12+(var(59)*2)&&enemynear,time>=8
trigger2 = enemynear,vel X <= 4
trigger3 = var(59)
trigger3 = P2statetype = A
trigger3 = P2bodydist x <= 160
statetype = S
physics = S

;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 2]
type = ChangeState
trigger1 = !var(59)
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 150, 2]
type = ChangeState
trigger1 = var(59)
trigger1 = HitShakeOver
value = 151 + 2*(P2statetype = C || P2bodydist x > 100)

[State 150, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 75 && P2statetype != A
statetype = C
physics = C

[State 150, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 50
trigger2 = (var(59) = [3,4]) || (var(59)=[1,2])&&var(58)%4=2||var(54) <= 12+(var(59)*2)&&enemynear,time>=8
trigger2 = enemynear,vel X <= 4
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 160
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 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 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 151, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 75 && P2statetype != A
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 50
trigger2 = (var(59) = [3,4]) || (var(59)=[1,2])&&var(58)%4=2||var(54) <= 12+(var(59)*2)&&enemynear,time>=8
trigger2 = enemynear,vel X <= 4
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 160
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1

;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152, 3]
type = ChangeState
trigger1 = !var(59)
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 152, 3]
type = ChangeState
trigger1 = var(59)
trigger1 = HitShakeOver
value = 153;1 + 2*(P2statetype = C || P2bodydist x > 100)

[State 152, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 75 && P2statetype != A
statetype = C
physics = C

[State 152, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 50
trigger2 = (var(59) = [3,4]) || (var(59)=[1,2])&&var(58)%4=2||var(54) <= 12+(var(59)*2)&&enemynear,time>=8
trigger2 = enemynear,vel X <= 4
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 160
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

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

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

[State 153, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 153, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 75 && P2statetype != A
statetype = C
physics = C

[State 153, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 50
trigger2 = (var(59) = [3,4]) || (var(59)=[1,2])&&var(58)%4=2||var(54) <= 12+(var(59)*2)&&enemynear,time>=8
trigger2 = enemynear,vel X <= 4
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 160
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl = 1

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N
anim = 152

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

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 155, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
triggerall = sysvar(0)
triggerall = inguarddist
trigger1 = !var(59)
trigger1 = command = "holdback"
trigger2 = var(59)
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
velset = 0,0

[State 170]
type = ChangeAnim
trigger1 = Time = 0
value = 171 - facing

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

;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175]
type = S
ctrl = 0
velset = 0,0

[State 175, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 171 - facing

[State 175, 1] ; If no anim, use go to lose state.
type = null;ChangeState
trigger1 = Time = 0
trigger1 = !SelfAnimExist(175)
value = 170

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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;勝利ポーズ分岐
[Statedef 180]
type = S
ctrl = 0
velset = 0,0

[State 180]
type = ChangeState
trigger1 = Time = 0
value = 183-random%3

;---------------------------------------------------------------------------
;勝利ポーズ1
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 182]
type = Width
trigger1 = 1
edge = 30,0

[State 182]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,4
channel = 0

[State 181, 1]
type = AssertSpecial
trigger1 = Time = [0,171] ;58 ;104
flag = RoundNotOver

[State 181]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 180]
type = ChangeState
trigger1 = !NumPartner
trigger1 = MatchOver
trigger1 = Time = 170
value = 185

;---------------------------------------------------------------------------
;勝利ポーズ2
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 182]
type = Width
trigger1 = 1
edge = 20,0

[State 182]
type = PlaySnd
trigger1 = AnimElem = 5
value = 100,1
channel = 0

[State 182]
type = PlaySnd
trigger1 = AnimElem = 5
value = 4,10

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElemTime(5) = 1
time = 22
ampl = 3
freq = 80

[State 181, 1]
type = AssertSpecial
trigger1 = Time = [0,171] ;58 ;104
flag = RoundNotOver

[State 181]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 180]
type = ChangeState
trigger1 = !NumPartner
trigger1 = MatchOver
trigger1 = Time = 170
value = 185

;---------------------------------------------------------------------------
;勝利ポーズ3
[Statedef 183]
type = S
ctrl = 0
velset = 0,0
anim = ifelse(facing = 1, 182, 183)

[State 182]
type = Width
trigger1 = 1
edge = 30,0

[State 182]
type = PlaySnd
trigger1 = random <= 700
trigger1 = AnimElem = 3
value = 100,6
channel = 0

[State 181, 1]
type = AssertSpecial
trigger1 = Time = [0,151] ;58 ;104
flag = RoundNotOver

[State 181]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 180]
type = ChangeState
trigger1 = !NumPartner
trigger1 = MatchOver
trigger1 = Time = 150
value = 185

;---------------------------------------------------------------------------
;勝利画面
[Statedef 185]
type = S
ctrl = 0
velset = 0,0

[State 180]
type = ChangeAnim
trigger1 = Time = 1
value = 8990

[State 181, 1]
type = AssertSpecial
trigger1 = Time <= 292
flag = RoundNotOver
supermovetime = 9999

[State 182]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
supermovetime = 9999

[State 310]
type = AssertSpecial
trigger1 = 1
flag = NoBarDisplay
flag2 = NoMusic
supermovetime = 9999

[state 190]
type = helper
trigger1 = time = 0
ID = 186
stateno = 186
postype = p1
pos = 0,0
name = "win_message"
;bindtime = -1
supermovetime = 9999999

[State 182]
type = PlaySnd
trigger1 = time = 2
value = 300,20

[State 3000]
type = SuperPause
trigger1 = Time = 0
time = 999
movetime = 999
anim = -1
sound = -1
pos = 0,0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State 300]
type = Explod
trigger1 = teamside = 1
trigger1 = Time = 2
id = 8500
pos = 0,0
postype = Left
anim = 8500
ownpal = 1
removetime = -1
bindtime = -1
sprpriority = 4
supermovetime = 9999

[State 300]
type = Explod
trigger1 = teamside = 1
trigger1 = Time = 33
id = 8501
pos = 0,0
postype = Left
anim = 8501
ownpal = 1
bindtime = -1
removetime = -1
sprpriority = 5
supermovetime = 9999

[State 300]
type = Explod
trigger1 = teamside = 2
trigger1 = Time = 2
id = 8500
pos = 0,0
postype = Right
anim = 8500
;scale = const(size.xscale),const(size.yscale)
ownpal = 1
facing = -1
bindtime = -1
;removetime = -1
sprpriority = 4
supermovetime = 9999

[State 300]
type = Explod
trigger1 = teamside = 2
trigger1 = Time = 33
id = 8501
pos = 0,0
postype = Right
anim = 8501
;scale = const(size.xscale),const(size.yscale)
ownpal = 1
facing = -1
bindtime = -1
;removetime = -1
sprpriority = 5
supermovetime = 9999

[State 300]
type = Explod
trigger1 = Time = 2
id = 8505
pos = 0,0
postype = Left
anim = 8505
scale = const(size.xscale),const(size.yscale)
ownpal = 1
bindtime = -1
;removetime = -1
ontop = 1  ;sprpriority = 5
supermovetime = 9999

[State 300]
type = Explod
trigger1 = Time = 33
id = 8506
pos = 0,0
postype = Left
anim = 8506
scale = const(size.xscale),const(size.yscale)
ownpal = 1
bindtime = -1
;removetime = -1
ontop = 1
supermovetime = 9999

[State 220]
type = null;VarSet
trigger1 = var(11) = -1
trigger1 = Time = 30
var(11) = 0+random%24

;---------------------------------------------------------------------------
;勝利画面(ヘルパー)
[Statedef 186]
type = S
ctrl = 0
anim = 8990

[State 220]
type = VarSet
trigger1 = root,var(11) = -1
trigger1 = Time = 1
var(11) = 0+random%24

[State 220]
type = VarSet
trigger1 = root,var(11) != -1
trigger1 = Time = 1
var(11) = root,var(11)

[State 300]
type = Explod
trigger1 = var(11) != 4
trigger1 = Time >= 49
id = 8510
pos = -23,13 ;-32,13
postype = Left
anim = 8510+var(11)
ownpal = 1
bindtime = -1
;removetime = -1
ontop = 1
supermovetime = 9999

[State 300]
type = Explod
trigger1 = var(11) = 4
trigger1 = Time >= 49
id = 8510
pos = -23,13
postype = Left
anim = 8514
scale = 0.95,1
ownpal = 1
bindtime = -1
;removetime = -1
ontop = 1
supermovetime = 9999

[State 300]
type = Explod
trigger1 = var(11) != 4
trigger1 = Time >= 49
trigger1 = NumExplod(8510) <= 1
id = 8520
pos = -23,13 ;-32,13
postype = Left
anim = 8510+var(11)
ownpal = 1
bindtime = -1
;removetime = -1
ontop = 1
supermovetime = 9999

[State 300]
type = Explod
trigger1 = var(11) = 4
trigger1 = Time >= 49
trigger1 = NumExplod(8510) <= 1
id = 8520
pos = -23,13
postype = Left
anim = 8514
scale = 0.95,1
ownpal = 1
bindtime = -1
;removetime = -1
ontop = 1
supermovetime = 9999

[State 300]
type = null;Explod
trigger1 = var(12)
trigger1 = Time = 50
id = 8510
pos = -32,13
postype = Left
anim = 8534
;scale = const(size.xscale),const(size.yscale)
ownpal = 1
bindtime = -1
removetime = -1
ontop = 1
supermovetime = 9999

;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 1]
type = null;ChangeAnim
trigger1 = SelfAnimExist(190)
value = 190

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = ifelse(!var(12),191,192)

;---------------------------------------------------------------------------
;イントロ（normal）
[Statedef 191]
type = S
physics = S
ctrl = 0
anim = 190
velset = 0,0
sprpriority = 0

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

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

[State 3000]
type = PlaySnd
trigger1 = AnimElemTime(5) = 1
value = 100,1
channel = 0

[State 3000]
type = PlaySnd
trigger1 = AnimElemTime(5) = 1
value = 4,10

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElem = 6
time = 16
ampl = 3
freq = 80

[State 110]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;イントロ2
[Statedef 192]
type    = S
physics = S
ctrl = 0
anim = 191
velset = 0,0
sprpriority = 0

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

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

[State 3000]
type = PlaySnd
trigger1 = AnimElemTime(5) = 1
value = 100,5
channel = 0

[State 3000]
type = PlaySnd
trigger1 = AnimElemTime(5) = 1
value = 4,10

[State 300]
type = Explod
trigger1 = AnimElemTime(5) = 1
id = 192
name = "metsu"
pos = ifelse(facing = 1, 0, -18),0
postype = P1
anim = 192
facing = ifelse(facing = 1, 1, -1)
scale = const(size.xscale) ,const(size.yscale)
ownpal = 1
bindtime = -1
sprpriority = 1

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElemTime(5) = 1
time = 18
ampl = 4
freq = 80

[State 110]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;vs真豪鬼モードイントロ(ヘルパー)
[Statedef 193]
type = S
ctrl = 0
anim = 8990

[State 600, 4]
type = Varset
trigger1 = time = 0
var(2) = 0

[State 600, 4]
type = VarAdd
trigger1 = time > 1
trigger1 = var(2)
var(2) = 1

[State 600, 4]
type = Varset
trigger1 = time > 510
trigger1 = !NumExplod(8560)
trigger2 = roundstate = 2
var(2) = 1

[State 190, 2]
type = AssertSpecial
trigger1 = time = [0,280]
flag = noFG
flag2 = noBG

[State 190, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

[State 190, 2]
type = AssertSpecial
trigger1 = time >= 500
trigger1 = var(1)
trigger2 = time = [0,335]
flag = nobardisplay

[State 600, 4]
type = Pause
trigger1 = roundstate = [0,1]
trigger1 = time = 0
time = 354
movetime = 354

[State 3000,1]
type = PlaySnd
trigger1 = time = 240
value = 300,22
channel = 1

[State 3000,1]
type = StopSnd
trigger1 = time >= 507
trigger1 = NumExplod(8560)
channel = 1

[State 120]
type = Explod
trigger1 = Time = 0
anim = 8545
id = 8545
pos = 0,0
postype = Left
sprpriority = 3
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
removetime = 280
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = Time = 0
anim = 8540
id = 8540
pos = 0,0
postype = Left
sprpriority = 4
bindtime = -1
ownpal = 1
scale = 0.836, 1.072
removetime = 280
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = Time = 0
anim = 8550
id = 8550
pos = 0,0
postype = Left
sprpriority = 5
bindtime = -1
ownpal = 1
scale = 0.836, 1.072
removetime = 280
pausemovetime = 99999999
supermovetime = 99999999

;
[State 120]
type = Explod
trigger1 = Time = 240
anim = 8555
id = 8555
pos = 0,0
postype = Left
bindtime = -1
ownpal = 1
ontop = 1
scale = 0.836, 1.072
;removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999


;------507
[State 120]
type = Explod
trigger1 = time >= 507
trigger1 = roundstate = 1
trigger1 = root,stateno = 0
trigger1 = enemynear,stateno = 0
trigger1 = !NumExplod(8560)
anim = ifelse(facing = 1,8561,8560)
id = 8560
pos = 0,0
postype = Left
bindtime = -1
ownpal = 1
ontop = 1
scale = 0.832, 1.072
;removetime = -1 ;97
persistent = 0

[State 120]
type = Explod
trigger1 = time >= 507
trigger1 = var(1) = 1
trigger1 = !NumExplod(8556)
anim = 8556
id = 8556
pos = 0,0
postype = Left
bindtime = -1
ownpal = 1
sprpriority = 5
scale = 0.835, 1.072
persistent = 0

[State 600, 4]
type = Varset
trigger1 = time =1
var(1) = 0

[State 600, 4]
type = VarAdd
trigger1 = time >= 507
trigger1 = NumExplod(8560)
trigger1 = var(1)
var(1) = 1

[State 600, 4]
type = Varset
trigger1 = time >= 507
trigger1 = NumExplod(8560)
trigger1 = !var(1)
var(1) = 1

[State 3000,00]
type = BGPalfx
trigger1 = time >= 507
trigger1 = roundstate = 1
trigger1 = root,stateno = 0
trigger1 = enemynear,stateno = 0
;add = 200,50,50
;sinadd = 10, 10, 10
mul = 170,170,170
time = 2
invertall = 0
color = 256
persistent = 1

[State 120]
type = Explod
trigger1 = !NumExplod(8565)
trigger1 = time >= 507
trigger1 = roundstate = 1
trigger1 = root,stateno = 0
trigger1 = enemynear,stateno = 0
trigger1 = NumExplod(8560)
trigger1 = var(1) = 221
anim = 8565
id = 8565
pos = 0,120  ;ifelse(root,facing = 1,0,79),120
postype = Back
;facing = ifelse(root,facing = 1,1,-1)
bindtime = -1
ownpal = 0
ontop = 1
scale = 0.833, 1.072
pausemovetime = 99999999
supermovetime = 99999999
persistent = 0

[State 110]
type = ChangeState
trigger1 = roundstate = 2
trigger2 = Var(1) > 5
trigger2 = time > 510
trigger2 = !numexplod(8560)
value = 194

;---------------------------------------------------------------------------
;vs真豪鬼モードイントロ(ヘルパー)
[Statedef 194]
type = S
ctrl = 0
anim = 8990


[State 5101, 3]
type = StopSnd
trigger1 = time = 1
channel = 1


[State 902]
type = DestroySelf
trigger1 = time > 5

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

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

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

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

[State -2]
type = Explod
trigger1 = var(3) = 1
anim = 8070
id = 8070
pos = 0,enemynear,Const(size.head.pos.y)
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -2
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = helper
triggerall = !NumHelper(7010)
triggerall = numenemy = 1
trigger1 = movehit = 1
helpertype = normal
name = "burn_blue"
stateno = 7010
ID = 7010
pos = 0,0
postype = P2
keyctrl = 0
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 620, 1]
type = Hitdef
trigger1 = AnimElem = 5
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = 7 ;8f
pausetime = ifelse(!var(13),9,0),10
guard.pausetime = ifelse(!var(13),10,0),11
sparkno = S8050
guard.sparkno = S8100
sparkxy = -4, -15
hitsound = S1, 2
guardsound = S3, 0
ground.type = High
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = -4.5,-6.5
guard.velocity = -10
air.velocity =  -4.5,-6.5
airguard.velocity = -5.8,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -18
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),167,0),ifelse(!var(13),83,0); 08,04
givepower = 42,21 ;02,
persistent = 0
fall = 1
air.fall = 1
fall.recover = 0
air.recover = 0
yaccel = .55
palfx.color = 0
palfx.add = -134,-20,100 ;100,-20,-134
palfx.sinadd = 3,0,0,20 ;20,0,0,3
palfx.time = 38

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElem = 6
time = 14
ampl = 3
freq = 80

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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;立ち弱パンチ
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 8
velset = ifelse(!var(13), 0, 6.63/const(movement.stand.friction)),0
anim = 200 + var(12)/2
ctrl = 0

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

[State 22]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 200, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ifelse(!var(14),35,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94)))  ; 8b
pausetime = ifelse(var(13),0,9),9
sparkno = S8000
guard.sparkno = S8100
sparkxy = -5, -75
hitsound = S1, 0+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
air.type = High
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
ground.velocity = ifelse((var(15)=[1,4]),-4.8,-5*const(size.xscale)),ifelse((var(15)=[1,4]),-7,0)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8, -7
airguard.velocity = -4,-1
ground.cornerpush.veloff = ifelse(var(13),-1,-8.4*const(size.xscale))
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
nochainID = var(8)
fall = ifelse((var(15)=[1,4]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
persistent = 0
yaccel = .5

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

;---------------------------------------------------------------------------
;立ち中パンチ
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 8
velset = ifelse(!var(13), 0, 6.63/const(movement.stand.friction)),0
ctrl = 0
anim = 210 + var(12)/2
poweradd = ifelse(!var(13),21,0)

[State 22]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 20]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 221, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(13),90,ifelse(!var(14),56,ceil(var(14)*6.94)))  ;83
pausetime = ifelse(var(13),0,10),10
sparkno = S8010
guard.sparkno = S8100
sparkxy = -14, -67
hitsound = S1, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = Low
ground.slidetime = 14
ground.hittime = 14
air.hittime = 19
guard.ctrltime = 14
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-9*const(size.xscale)),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -9*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = ifelse(var(13),-1,-12*const(size.xscale))
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 221, 1]
type = Hitdef
triggerall = var(3) != [1,2]
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(13),90,ifelse(!var(14),56,ceil(var(14)*6.94)))
pausetime = ifelse(var(13),0,10),10
sparkno = S8010
guard.sparkno = S8100
sparkxy = -13, -88
hitsound = S1, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
air.type = low
ground.slidetime = 14
ground.hittime = 14
air.hittime = 19
guard.ctrltime = 14
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-9*const(size.xscale)),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -9*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = ifelse(var(13),-1,-12*const(size.xscale))
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,  
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;立ち強パンチ
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = ifelse(!var(13), 0, 6.63/const(movement.stand.friction)),0
anim = 220
poweradd = ifelse(!var(13),42,0)

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 210]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

[State 220, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),139,ifelse(!var(14),62,ceil(var(14)*6.94))) ;7c
pausetime = ifelse(var(13),0,11),11
sparkno = S8020
guard.sparkno = S8100
sparkxy = -8, -79
hitsound = S1, 2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
air.type = High
ground.slidetime = 17
ground.hittime = 17
air.hittime = 19
guard.ctrltime = 16
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-11),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -11
air.velocity = -4.8,-7
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = ifelse(!var(13),-20,-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),146,0),ifelse(!var(13),62,0) ;5,4 ;02+07,02+03
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;立ち弱キック
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = ifelse(!var(13), 0, 6.63/const(movement.stand.friction)),0
anim = 250+ var(12)/2

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

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

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 230, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ifelse(!var(14),35,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94)))  ;8b
pausetime = ifelse(!var(13),8,0),8
sparkno = S8000
guard.sparkno = S8100
sparkxy = -15, -40
hitsound = S2, 0+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 9
ground.hittime = 9
air.hittime = 19
guard.ctrltime = 9
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-5*const(size.xscale)),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4,-1
ground.cornerpush.veloff = ifelse(!var(13),-8.4*const(size.xscale),-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;立ち中キック
[Statedef 260]
type    = S
movetype= A
physics = S
juggle  = 8
velset = ifelse(!var(13), 0, 6.63/const(movement.stand.friction)),0
ctrl = 0
anim = 260+ var(12)/2
poweradd = ifelse(!var(13),21,0)

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

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

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 250, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),83,ifelse(!var(14),56,ceil(var(14)*6.94))) ;84-7b
pausetime = ifelse(!var(13),9,0),9
guard.pausetime = ifelse(!var(13),11,0),11
sparkno = S8010
guard.sparkno = S8100
sparkxy = -6, -84
hitsound = S2, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
air.type = High
ground.slidetime = 14
ground.hittime = 14
air.hittime = 19
guard.ctrltime = 21
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-9*const(size.xscale)),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -9*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = ifelse(!var(13),-12,-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 250, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),62,ifelse(!var(14),42,ceil(var(14)*6.94)))
pausetime = ifelse(!var(13),9,0),9
guard.pausetime = ifelse(!var(13),11,0),11
sparkno = S8010
guard.sparkno = S8100
sparkxy = -5, -78
hitsound = S2, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
air.type = High
ground.slidetime = 14
ground.hittime = 14
air.hittime = 19
guard.ctrltime = 13
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-9*const(size.xscale)),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -9*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = ifelse(!var(13),-12,-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse((var(13)||movecontact),0,104), ifelse((var(13)||movecontact),0,42); z,01+05,01+02
givepower = ifelse(movecontact,0,62), ifelse(movecontact,0,31) ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;立ち強キック
[Statedef 270]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = ifelse(!var(13), 0, 6.63/const(movement.stand.friction)),0
poweradd = ifelse(!var(13),42,0)
anim = 270+ var(12)/2

[State 22]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 240]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 250, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),111,ifelse(!var(14),62,ceil(var(14)*6.94))) ; 111 ;80
pausetime = ifelse(!var(13),11,0),11
guard.pausetime = ifelse(!var(13),12,0),12
sparkno = S8020
guard.sparkno = S8100
sparkxy = -5, -78
hitsound = S2, 2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
air.type = High
ground.slidetime = 17
ground.hittime = 17
air.hittime = 19
guard.ctrltime = 15
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-11),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -11
air.velocity = -4.8,-7
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = ifelse(!var(13),-22,-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),146,0),ifelse(!var(13),62,0) ;5,4 ;02+07,02+03
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;しゃがみ弱パンチ
[Statedef 300]
type    = C
movetype= A
physics = C
juggle  = 8
velset = 0,0
anim = 300 + var(12)/10
ctrl = 0

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 400]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 400, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MAF
guardflag = M
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ifelse(!var(14),35,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94))) ;35 ;8b
pausetime = ifelse(!var(13),8,0),8
sparkno = S8000
guard.sparkno = S8100
sparkxy = -15, -49
hitsound = S1, 0+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
ground.velocity = ifelse((var(15)=[1,4]),-4.8,-5*const(size.xscale)),ifelse((var(15)=[1,4]),-7,0)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4,-1
ground.cornerpush.veloff = ifelse(!var(13),-8.4*const(size.xscale),-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,4]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;しゃがみ中パンチ
[Statedef 305]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 305 + var(12)/10
poweradd = ifelse(!var(13),21,0)

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

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

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 410, 2]
type = Hitdef
trigger1 = AnimElem = 3
attr = C, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(13),90,ifelse(!var(14),56,ceil(var(14)*6.94))) ; 90 ;83
pausetime = ifelse(!var(13),9,0),9
sparkno = S8010
guard.sparkno = S8100
sparkxy = -15, -47
hitsound = S1, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 13
ground.hittime = 13
air.hittime = 19
guard.ctrltime = 13
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-8.8*const(size.xscale)),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -8.8*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = ifelse(!var(13),-16*const(size.xscale),-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;しゃがみ強パンチ
[Statedef 310]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = ifelse(!var(13), 0, 3),0
anim = 310 + var(12)/10
poweradd = ifelse(!var(13),42,0)

[State 22]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 410]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 420, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = up
fall.animtype = up
priority = 5,Hit
damage = ifelse(!var(13),111,ifelse(!var(14),62,ceil(var(14)*6.94))) ;111 ;80
pausetime = ifelse(!var(13),11,0),11
sparkno = S8020
guard.sparkno = S8100
sparkxy = -9, -59
hitsound = S1, 2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 17
ground.hittime = 17
air.hittime = 19
guard.ctrltime = 16
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-11),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -11
air.velocity = -4.8,-7
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = ifelse(!var(13),-22,-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),146,0),ifelse(!var(13),62,0) ;5,4 ;02+07,02+03
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 420, 1]
type = Hitdef
triggerall = var(3) != [1,2]
trigger1 = AnimElem = 3
attr = C, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = up
fall.animtype = up
priority = 5,Hit
damage = ifelse(!var(13),111,ifelse(!var(14),62,ceil(var(14)*6.94))) ;111 ;80
pausetime = ifelse(!var(13),11,0),11
sparkno = S8020
guard.sparkno = S8100
sparkxy = -12, -88
hitsound = S1, 2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 17
ground.hittime = 17
air.hittime = 19
guard.ctrltime = 16
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-11),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -11
air.velocity = -4.8,-7
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = ifelse(!var(13),-22,-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),146,0),ifelse(!var(13),62,0) ;5,4 ;02+07,02+03
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;しゃがみ弱キック
[Statedef 320]
type    = C
movetype= A
physics = C
juggle  = 8
velset = 0,0
ctrl = 0
anim = 320 + var(12)/10

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 43]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 430, 2]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MF
guardflag = L
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ifelse(!var(14),35,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94))) ;35;8b ;8b
pausetime = ifelse(!var(13),8,0),8
sparkno = S8000
guard.sparkno = S8100
sparkxy = -15, -17
hitsound = S2, 0+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
ground.velocity = ifelse((var(15)=[1,5]),-4.8,-5*const(size.xscale)),ifelse((var(15)=[1,5]),-7,0)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4,-1
ground.cornerpush.veloff = ifelse(!var(13),-8.6*const(size.xscale),-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
fall = ifelse((var(15)=[1,5]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;しゃがみ中キック
[Statedef 325]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = ifelse(!var(13), 0, 3),0
anim = 325 + var(12)/10
poweradd = ifelse(!var(13),21,0)

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 430]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 440, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = C, NA
hitflag = MF
guardflag = L
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),83,ifelse(!var(14),56,ceil(var(14)*6.94))) ;83 ;84
pausetime = ifelse(!var(13),9,0),9
sparkno = S8010
guard.sparkno = S8100
sparkxy = -17, -19
hitsound = S2, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 13
ground.hittime = 13
air.hittime = 19
guard.ctrltime = 13
ground.velocity = ifelse((var(15)=[1,6]),-4.8,-9*const(size.xscale)),ifelse((var(15)=[1,6]),-7,0)
guard.velocity = -9*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = ifelse(!var(13),-16*const(size.xscale),-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
fall = ifelse((var(15)=[1,6]),1,0)
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;しゃがみ強キック
[Statedef 330]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 330 + var(12)/10
poweradd = ifelse(!var(13),42,0)

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

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

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 450, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MAF
guardflag = L
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),111,ifelse(!var(14),62,ceil(var(14)*6.94))) ;111 ;80
pausetime = ifelse(!var(13),11,0),11
sparkno = S8020
guard.sparkno = S8100
sparkxy = -9, -15
hitsound = S2, 2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Trip
air.type = High
ground.slidetime = 16
guard.slidetime = 16
ground.hittime = 19
air.hittime = 19
guard.ctrltime = 16
ground.velocity = -1.3, -6.5
guard.velocity = -11
air.velocity = -1.3, -6.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = ifelse(!var(13),-22,-1)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),146,0),ifelse(!var(13),62,0) ;5,4 ;02+07,02+03
givepower = 62,31 ;03,
yaccel = .5
nochainID = var(8)
air.fall = 1
fall = 1
fall.recover = 0
air.recover = 0

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

;---------------------------------------------------------------------------
;ジャンプ弱パンチ
[Statedef 350]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 350 + var(12)/10

[State 300]
type = Width
trigger1 = 1
edge = 5,0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 600]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 0

[State 600, 2]
type = Hitdef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ifelse(!var(14),49,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94)));89
pausetime = ifelse(!var(13),7,0),7
guard.pausetime = ifelse(!var(13),10,0),10
sparkno = S8000
guard.sparkno = S8100
sparkxy = -14, -43
hitsound = S1, 0+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
ground.slidetime = 9
ground.hittime = 9
air.hittime = 19
guard.ctrltime = 9
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
airguard.cornerpush.veloff = -1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;ジャンプ中パンチ
[Statedef 355]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 355 + var(12)/10
poweradd = ifelse(!var(13),21,0)

;41
;-40,45

[State 600]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 610, 2]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(13),83,ifelse(!var(14),56,ceil(var(14)*6.94))) ;84
pausetime = ifelse(!var(13),8,0),9
guard.pausetime = ifelse(!var(13),9,0),10
sparkno = S8010
guard.sparkno = S8100
sparkxy = -12, -47
hitsound = S1, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
airguard.cornerpush.veloff = -1
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0) ; z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;ジャンプ強パンチ
[Statedef 360]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 360 + var(12)/10
poweradd = ifelse(!var(13),42,0)

[State 610]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 620, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),111,ifelse(!var(14),62,ceil(var(14)*6.94))) ;80
pausetime = ifelse(!var(13),10,0),11
guard.pausetime = ifelse(!var(13),8,0),9
sparkno = S8020
guard.sparkno = S8100
sparkxy = -14, -40
hitsound = S1, 2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
airguard.cornerpush.veloff = -1
getpower = ifelse(!var(13),146,0),ifelse(!var(13),62,0) ;5,4 ;02+07,02+03
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;垂直ジャンプ弱キック
[Statedef 365]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 365 + var(12)/10

[State 630]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 0

[State 630, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Light
air.animtype = up
fall.animtype = up
priority = 3,Hit
damage = ifelse(!var(14),62,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94))) ;87
pausetime = ifelse(!var(13),7,0),8
sparkno = S8000
guard.sparkno = S8100
sparkxy = -10, -48
hitsound = S2, 0+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
airguard.cornerpush.veloff = -1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;垂直ジャンプ中キック
[Statedef 370]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 370 + var(12)/10
poweradd = ifelse(!var(13),21,0)

[State 640]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 640, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Medium
air.animtype = up
fall.animtype = up
priority = 4,Hit
damage = ifelse(!var(13),83,ifelse(!var(14),56,ceil(var(14)*6.94))) ;84
pausetime = ifelse(!var(13),9,0),10
guard.pausetime = ifelse(!var(13),11,0),12
sparkno = S8010
guard.sparkno = S8100
sparkxy = -10, -47
hitsound = S2, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
ground.slidetime = 11
ground.hittime = 11
air.hittime = 19
guard.ctrltime = 10
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
airguard.cornerpush.veloff = -1
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0) ; z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;垂直ジャンプ強キック
[Statedef 375]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 375 + var(12)/10
poweradd = ifelse(!var(13),42,0)

[State 640]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 650, 1]
type = Hitdef
trigger1 = AnimElem = 4
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),111,ifelse(!var(14),62,ceil(var(14)*6.94))) ;80
pausetime = ifelse(!var(13),10,0),11
sparkno = S8020
guard.sparkno = S8100
sparkxy = -15, -54
hitsound = S2,2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
ground.slidetime = 11
ground.hittime = 11
air.hittime = 19
guard.ctrltime = 10
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -20*const(size.xscale)
air.cornerpush.veloff = -6*const(size.xscale)
airguard.cornerpush.veloff = -6*const(size.xscale)
getpower = ifelse(!var(13),146,0),ifelse(!var(13),62,0) ;5,4 ;02+07,02+03
givepower = 62,31 ;03,
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;斜めジャンプ弱キック
[Statedef 400]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 400 + var(12)/10

[State 630]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 630, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ifelse(!var(14),56,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94))) ;88
pausetime = ifelse(!var(13),7,0),8
sparkno = S8000
guard.sparkno = S8100
sparkxy = -10, -45
hitsound = S2, 0+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
ground.slidetime = 9
ground.hittime = 9
air.hittime = 19
guard.ctrltime = 9
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
airguard.cornerpush.veloff = -1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;斜めジャンプ中キック
[Statedef 405]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 405 + var(12)/10
poweradd = ifelse(!var(13),21,0)

[State 640]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 640, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(13),69,ifelse(!var(14),56,ceil(var(14)*6.94))) ;86
pausetime = ifelse(!var(13),9,0),10
sparkno = S8010
guard.sparkno = S8100
sparkxy = -7, -49
hitsound = S2, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
ground.slidetime = 11
ground.hittime = 11
air.hittime = 19
guard.ctrltime = 10
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
airguard.cornerpush.veloff = -1
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;斜めジャンプ強キック
[Statedef 410]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 410 + var(12)/10
poweradd = ifelse(!var(13),42,0)

[State 640]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 650, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ifelse(!var(13),90,ifelse(!var(14),62,ceil(var(14)*6.94))) ;83
pausetime = ifelse(!var(13),10,0),11
sparkno = S8020
guard.sparkno = S8100
sparkxy = -15, -59
hitsound = S2, 2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
airguard.ctrltime = 15
air.velocity = -4.8,-7
airguard.velocity = -4.8,-1.6
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
airguard.cornerpush.veloff = -1
getpower = ifelse(!var(13),146,0),ifelse(!var(13),62,0)
givepower = 0,0 ;03
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;天魔空刃脚
[Statedef 450]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
anim = 450
poweradd = ifelse(!var(13),17,0)

[State 300]
type = Width
trigger1 = 1
edge = ceil(20*const(size.xscale)),0

[State 810]
type = VelSet
trigger1 = time = 0
x = 4.55
y = 6.5

;ef,2b 50
;6b,28(12)

[State 601]
type = PlaySnd
trigger1 = AnimElem = 2
value = 100,0
channel = 0

[State 640]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,1

[State 640, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(13),69,ifelse(!var(14),56,ceil(var(14)*6.94))) ;82
pausetime = ifelse(!var(13),8,0),9
sparkno = S8010
guard.sparkno = S8100
sparkxy = -10, -10
hitsound = S2, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
ground.slidetime = 11
ground.hittime = 11
air.hittime = 19
guard.ctrltime = 12
ground.velocity = -5.1
guard.velocity = -5.33
air.velocity = -6.4, -4.8
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = -1;-5.6
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02 ;06,03
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
yaccel = .5
nochainID = var(8)

[State 640, 1]
type = Hitdef
trigger1 = var(3) != [1,2]
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(13),69,ifelse(!var(14),56,ceil(var(14)*6.94))) ;82
pausetime = ifelse(!var(13),8,0),9
sparkno = S8010
guard.sparkno = S8100
sparkxy = -10, -10
hitsound = S2, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = High
ground.slidetime = 11
ground.hittime = 11
air.hittime = 19
guard.ctrltime = 12
ground.velocity = -5.1
guard.velocity = -5.33
air.velocity = -6.4, -4.8
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = -1;-5.6
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0) ; z,01+05,01+02 ;06,03
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
yaccel = .5
nochainID = var(8)

[State 210, 7]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 455
ctrl = 1

;---------------------------------------------------------------------------
;天魔空刃脚(着地)
[Statedef 455]
type    = S
movetype = I
physics = S
velset = 0,0
anim = 0

[State 220]
type = PosSet
trigger1 = time = 0
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = time = 0
value = 4,0

[State 210, 7]
type = ChangeState
trigger1 = time = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;頭蓋破殺
[Statedef 460]
type    = S
movetype = A
physics = S
juggle = 8
velset = 0,0
ctrl = 0
anim = 460
poweradd = ifelse(!var(13),21,0)

[State 300]
type = Width
trigger1 = 1
edge = 5,0

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,0
channel = 0 

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 100,2
channel = 0 

[State 210]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 1

;20,30(7) 13

[State 100]
type = StateTypeSet
trigger1 = AnimElem = 4
physics = N

[State 810]
type = VelSet
trigger1 = AnimElem = 4
x = 1.9

[State 100]
type = StateTypeSet
trigger1 = AnimElem = 6
physics = S

[State 810]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElemTime(8) = 5
movetype = I

[State 210, 1]
type = Hitdef
trigger1 = AnimElem = 6
attr = S, NA
hitflag = MAF
guardflag = H
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = 97 ; 82-7d
pausetime = ifelse(!var(13),9,0),10
;guard.pausetime = 
sparkno = S8010
guard.sparkno = S8100
sparkxy = -5, -79
hitsound = S1, 1
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 14
ground.hittime = 14
air.hittime = 14
guard.ctrltime = 15
ground.velocity = -11
guard.velocity = -11
air.velocity = -4, -5.25
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = ifelse(!var(13),-14,-1)
air.cornerpush.veloff = -2
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),60,0),ifelse(!var(13),30,0); 01+ 04-06
givepower = 35, 35;0303
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 210, 1]
type = Hitdef
trigger1 = AnimElem = 7
attr = S, NA
hitflag = MAF
guardflag = H
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(14),35,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94)))
pausetime = ifelse(!var(13),9,0),10
;guard.pausetime =
sparkno = S8010
guard.sparkno = S8100
sparkxy = -15, -38
hitsound = S1, 1
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 14
ground.hittime = 14
air.hittime = 14
guard.ctrltime = 14
ground.velocity = -12
guard.velocity = -12
air.velocity = -4, -5.25
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = ifelse(!var(13),-16,-1)
air.cornerpush.veloff = -4
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),60,0),ifelse(!var(13),30,0)
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

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

;---------------------------------------------------------------------------
;旋風脚
[Statedef 470]
type    = A
movetype = A
physics = N
juggle = 8
velset = 0,0
ctrl = 0
anim = 470
poweradd = ifelse(!var(13),21,0) ;01

[State 300]
type = Width
trigger1 = 1
edge = 5,0

[State 220]
type = PosSet
trigger1 = time = 0
y = 0

[State 810]
type = VelSet
trigger1 = time = 0
x = 3.5
y = -5

[State 810]
type = VelAdd
trigger1 = time > 1
y = .6

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 100,0
channel = 0 

[State 210, 1]
type = Hitdef
trigger1 = AnimElem = 6
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ifelse(!var(14),40,ceil(ifelse(var(14)>=4, (var(14)-3)*6.94, 6.94))); 85
pausetime = ifelse(!var(13),10,0),11
sparkno = S8010
guard.sparkno = S8100
sparkxy = -8, -60
hitsound = S2, 1+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Low
air.type = High
ground.slidetime = 10
ground.hittime = 10
air.hittime = 20
guard.ctrltime = 9
airguard.ctrltime = 15
ground.velocity = -5*const(size.xscale)
guard.velocity = -5*const(size.xscale)
air.velocity = -4, -5.25
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = ifelse(!var(13),-11.2*const(size.xscale),0)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
air.fall = 1
fall.recover = 0
air.recover = 0
nochainID = var(8)
yaccel = .5

[State 210, 7]
type = ChangeState
triggerall = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 475

;---------------------------------------------------------------------------
;旋風脚(着地)
[Statedef 475]
type = S
movetype = I
physics = S
juggle = 8
velset = 0,0
ctrl = 0
anim = 475

[State 220]
type = PosSet
trigger1 = time = 0
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = time = 0
value = 4,0

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

;---------------------------------------------------------------------------
;zeroカウンター(stand)
[Statedef 600]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
juggle  = 8
anim = 600
poweradd = -1500

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

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 17

[State 300]
type = Explod
trigger1 = time = 4
id = 7950
pos = ceil(34*const(size.xscale)),ceil(-75*const(size.yscale))
postype = P1
anim = 7950
ownpal = 1
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
pausemovetime = 9999

[State 52]
type = PlaySnd
trigger1 = time = 2
value = 300,10

[State 120]
type = pause
trigger1 = time = 0
time = 17
movetime = 17
pausebg = 0

[State 1000]
type = Width
trigger1 = 1
edge = 20,0

[State 190, 4]
type = ChangeAnim
trigger1 = anim = 600
trigger1 = animtime = 0
value = 1020

[state 30]
type = StatetypeSet
triggerall = anim = 1020
trigger1 = AnimElemTime(3) = 1
value = A
physics = N

[State 105, 1]
type = statetypeset
triggerall = anim = 1020
trigger1 = AnimElem = 5
movetype = I

[State 52]
type = PlaySnd
triggerall = anim = 1020
trigger1 =  AnimElem = 1
value = 100,1
persistent = 0

[State 110]
type = VelSet
triggerall = anim = 1020
trigger1 = AnimElemTime(3) = 1
x = 7.5
y = -12.6

[State 110]
type = Veladd
triggerall = anim = 1020
trigger1 = AnimElemTime(3) >= 1
y = .64

[State 110]
type = VelMul
triggerall = anim = 1020
trigger1 = AnimElemTime(3) >= 2
x = .9

[State 110]
type = Velset
triggerall = anim = 1020
trigger1 = AnimElemTime(3) = 13
x = 0

[State 1000]
type = HitDef
triggerall = anim = 1020
trigger1 = AnimElemTime(1) = 1
attr = S, SA
animtype  = Heavy
air.animtype  = Back
damage = 69,14
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 11,11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -3, -55
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = 0 ;,-10.4
guard.velocity = -9.8
air.velocity = -2.2,-10.4
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
nochainID = var(8)
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .57
persistent = 0
getpower = 0,0
givepower = 62,31
;envshake.time = 8
;envshake.ampl = 2
forcestand = 1

[State 1000]
type = HitDef
triggerall = anim = 1020
trigger1 = AnimElem = 2
attr = S, SA
animtype  = Heavy
air.animtype  = Back
damage= 56,14
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 11,11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -5, -55
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = 0 ;,-10.4
guard.velocity = -9.8
air.velocity = -2.2,-10.4
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
nochainID = var(8)
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .57
persistent = 0
getpower = 0,0
givepower = 62,31
;envshake.time = 8
;envshake.ampl = 2
forcestand = 1

[State 1000]
type = HitDef
triggerall = anim = 1020
trigger1 = AnimElem = 3
attr = S, SA
animtype  = Heavy
air.animtype  = Back
damage= 21,14
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = S8050
guard.sparkno = S8110
sparkxy = 5, -91
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -2.2,-10.4
guard.velocity = -9.8
air.velocity = -2.2,-10.4
airguard.velocity = -5.8,-3
ground.cornerpush.veloff = -0
air.cornerpush.veloff = 0
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .57
persistent = 0
getpower = 0,0
givepower = 62,31
;envshake.time = 8
;envshake.ampl = 2
forcestand = 1

[State 901]
type = TargetState
triggerall = anim = 1020
trigger1 = NumTarget
trigger1 = AnimElemTime(3) >= 0
trigger1 = movehit = 1
value = 2010
persistent = 0
ignorehitpause = 1

[State 70]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1005

;---------------------------------------------------------------------------
;zeroカウンター(crouch)
[Statedef 605]
type    = C
movetype = A
physics = C
velset = 0,0
ctrl = 0
juggle  = 8
anim = 600
poweradd = -1500

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

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 22

[State 300]
type = Explod
trigger1 = time = 4
id = 7950
pos = ceil(34*const(size.xscale)),ceil(-75*const(size.yscale))
postype = P1
anim = 7950
ownpal = 1
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
pausemovetime = 9999

[State 52]
type = PlaySnd
trigger1 = time = 1
value = 300,10

[State 120]
type = pause
trigger1 = time = 0
time = 22
movetime = 22
pausebg = 0

[State 1000]
type = Width
trigger1 = 1
edge = 20,0

[State 190, 4]
type = ChangeAnim
trigger1 = anim = 600
trigger1 = animtime = 0
value = 605

[State 105, 1]
type = statetypeset
triggerall = anim = 605
trigger1 = AnimElem = 7
movetype = I

[State 450, 1]
type = Hitdef
triggerall = anim = 605
trigger1 = AnimElem = 4
attr = C, NA
hitflag = MAF
guardflag = L
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = 111 ; 81
pausetime = 11,11
sparkno = S8020
guard.sparkno = S8100
sparkxy = -9, -15
hitsound = S2, 2+(roundstate = 3)*10
guardsound = S3, 0
ground.type = Trip
air.type = High
ground.slidetime = 16
guard.slidetime = 16
ground.hittime = 19
air.hittime = 19
guard.ctrltime = 16
ground.velocity = -1.3, -6.5
guard.velocity = -11
air.velocity = -1.3, -6.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -22
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0,0
givepower = 62,31 ;03,
nochainID = var(8)
yaccel = .5
air.fall = 1
fall = 1
fall.recover = 0
air.recover = 0

[State 901]
type = TargetState
triggerall = anim = 605
trigger1 = NumTarget
trigger1 = AnimElemTime(4) >= 0
trigger1 = movehit = 1
value = 2010
persistent = 0
ignorehitpause = 1

[State 440]
type = ChangeState
triggerall = anim = 605
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;オリコン発動(stand)
[Statedef 620]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 620

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

[State 170, 1]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0
value = SCA
time = 1

[State -2]
type = VarSet
trigger1 = AnimElem = 2
var(13) = 1

[State -2]
type = VarSet
trigger1 = AnimElem = 2
var(15) = ceil(58+(3000*power/powermax-1000)*0.037)

[State 105, 1]
type = statetypeset
trigger1 = AnimElemTime(1) = 2
movetype = A

[State 90]
type = HitDef
triggerall = P2StateType != A
triggerall = P2StateNo != [120,155]
triggerall = AnimElemTime(1) = 2
trigger1 = P2MoveType = I
trigger2 = !enemynear,ctrl
trigger2 = enemynear,hitdefattr != SCA,HA,HT,HP
attr = S, NA
hitflag = M-
priority = 3, Miss
sparkno = -1
p2stateno = 621
guard.dist = 0
numhits = 0

[State 3000]
type = SuperPause
trigger1 = AnimElem = 2
time = 23
movetime = 23
anim = -1
sound = -1
pos = 0,0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 2
movetype = I

[State -2]
type = helper
trigger1 = time = 4
helpertype = normal
name = "oricon_timebar"
stateno = 8040
ID = 8040
pos = 0,0
postype = P1
keyctrl = 0
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = helper
trigger1 = time = 4
helpertype = normal
name = "oricon"
stateno = 8030
ID = 8030
pos = 0,0
postype = P1
keyctrl = 0
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = helper
trigger1 = time = 5
helpertype = normal
name = "oricon_playerpush"
stateno = 8045
ID = 8045
pos = 0,0
postype = P1
keyctrl = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 300]
type = Explod
trigger1 = AnimElemTime(5) = 1
id = 621
name = "metsu"
pos = ifelse(facing = 1, 0, -18),0
postype = P1
anim = 621
facing = ifelse(facing = 1, 1, -1)
scale = const(size.xscale) ,const(size.yscale)
ownpal = 1
bindtime = -1
supermovetime = 99999999
sprpriority = 1

[State 200]
type = AfterImage
trigger1 = AnimTime = 0
time = 999
trans = none
length = 23
framegap = 6
palcolor = 0
;palinvertall = 0
palbright = 1,1,1
palpostbright = 48,-10,120
palcontrast = 128,1,142
PalAdd = -16,1,1
PalMul = 1, 1, .85
;palpostbright = 1,1,120
;palcontrast = 104,172,142
;PalAdd = -16,-16,1
;PalMul = 1, 1, .85

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

;---------------------------------------------------------------------------
;オリコン発動（相手）
[Statedef 621]
type    = S
movetype = H
physics = S
velset = 0,0
sprpriority = -1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 622

[State 903, 2]
type = SelfState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;オリコン発動(air)
[Statedef 625]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 625

[State 1735]
type = PosFreeze
trigger1 = time <= 28

[State 1735]
type = VelAdd
trigger1 = time >= 28
y = .53

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

[State -2]
type = VarSet
trigger1 = time = 2
var(13) = 1

[State -2]
type = VarSet
trigger1 = time = 2
var(15) = ceil(58+(3000*power/powermax-1000)*0.037)

[State 3000]
type = SuperPause
trigger1 = time = 3
time = 24
movetime = 24
anim = -1
sound = -1
pos = 0,0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State -2]
type = helper
trigger1 = time = 4
helpertype = normal
name = "oricon_timebar"
stateno = 8040
ID = 8040
pos = 0,0
postype = P1
keyctrl = 0
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = helper
trigger1 = time = 4
helpertype = normal
name = "oricon"
stateno = 8030
ID = 8030
pos = 0,0
postype = P1
keyctrl = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 200]
type = AfterImage
trigger1 = Time = 27
time = 999
trans = none
length = 23
framegap = 6
palcolor = 0
;palinvertall = 0
palbright = 1,1,1
palpostbright = 48,-10,120
palcontrast = 128,1,142
PalAdd = -16,1,1
PalMul = 1, 1, .85
;palpostbright = 1,1,120
;palcontrast = 104,172,142
;PalAdd = -16,-16,1
;PalMul = 1, 1, .85

[State -2]
type = helper
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
helpertype = normal
name = "oricon_playerpush"
stateno = 8045
ID = 8045
pos = 0,0
postype = P1
keyctrl = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 440]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
;投げ（掴みモーション）
[Statedef 900]
type    = S
movetype = A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
;anim = ifelse(Command = "y"||(var(59)&&(random%4=0)),902,ifelse(Command = "z"||(var(59)&&(random%4=1)),903,ifelse(Command = "b"||(var(59)&&(random%4=2)),904,905)))

[State 820]
type = ChangeAnim
trigger1 = !var(59)
trigger1 = Time = 0
value = ifelse(Command = "y"||var(11)=5,900,ifelse(Command = "z"||var(11)=6,901,ifelse(Command = "b"||var(11)=2,902,903)))

[State 820]
type = ChangeAnim
trigger1 = var(59)
trigger1 = Time = 0
value = 900 + random%4

[State 10000, 1]
type = VarSet
trigger1 = Time = 0
var(5) = 0

[State 900, 1]
type = HitDef
triggerall = anim = [900,901]
triggerall = P2bodydist X = [-14,29]
triggerall = P2MoveType != H
triggerall = P2StateNo != [150,155]
trigger1 = AnimElem = 1
attr = S, NT
hitflag = M-
priority = 3, Miss
sparkno = -1
p1facing = ifelse(command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 902
p2stateno = 906
guard.dist = 0
numhits = 0

[State 900, 1]
type = HitDef
triggerall = anim = [902,903]
triggerall = P2bodydist X = [-14,29]
triggerall = P2MoveType != H
triggerall = P2StateNo != [150,155]
trigger1 = AnimElem = 1
attr = S, NT
hitflag = M-
priority = 3, Miss
sparkno = -1
p1facing = ifelse(command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = ifelse(anim = 902,911,921)
p2stateno = ifelse(anim = 902,916,926)
guard.dist = 0
numhits = 0

[State 900, 2]
type = ChangeState
Trigger1 = anim = 900
Trigger1 = AnimTime = 0
value = 210

[State 900, 2]
type = ChangeState
Trigger1 = anim = 901
Trigger1 = AnimTime = 0
value = 220

[State 900, 2]
type = ChangeState
Trigger1 = anim = 902
Trigger1 = AnimTime = 0
value = 260

[State 900, 2]
type = ChangeState
Trigger1 = anim = 903
Trigger1 = AnimTime = 0
value = 270

;---------------------------------------------------------------------------
;背負い投げ
[Statedef 902]
type    = S
movetype = A
physics = N
velset = 0,0
poweradd = 62

[State 90]
type = TargetState
trigger1 = Time = 0
value = 905

[State 820]
type = ChangeAnim
trigger1 = Time = 0
value = 910
persistent = 0

[State 100]
type = VarSet
trigger1 = Time = 0
var(5) = 0

[State 100]
type = VarSet
triggerall = !var(5) && time < 6
trigger1 = (enemynear,Command = "holdfwd") || (enemynear,Command = "holdback")
trigger1 = (enemynear,Command = "x") || (enemynear,Command = "y") || (enemynear,Command = "z") || (enemynear,Command = "a") || (enemynear,Command = "b") || (enemynear,Command = "c")
trigger2 = (enemynear,Command = "x") && (enemynear,Command = "a")
var(5) = 1

[State 1201, 2]
type = Playerpush
trigger1 = 1
value = 0

[State 3001]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
edge = 10,40

[State 3001]
type = Width
trigger1 = animelemtime(2) >= 0 && animelemtime(4) < 0
edge = 10,0

[State 3001]
type = Width
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
edge = 60,0

[State 3001]
type = Width
trigger1 = animelemtime(5) >= 0
edge = 90,0

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

[State 901]
type = PlaySnd
trigger1 = AnimElem = 6
value = 100,2
channel = 0

[State 901,1]
type = targetBind
trigger1 = animelem = 1
pos = ceil(-48*const(size.xscale)),0;-27,0
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 2
pos = ceil(-40*const(size.xscale)),ceil(-60*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 3
pos = ceil(-7*const(size.xscale)), ceil(-80*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 4
pos = ceil(39*const(size.xscale)), ceil(-72*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElem = 5
pos = ceil(84*const(size.xscale)), ceil(-72*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElemTime(6) = 0
pos = ceil(100*const(size.xscale)), ceil(-74*const(size.yscale))
postype = P1
time = 1

[State 901]
type = TargetLifeAdd
trigger1 = AnimElemTime(6) = 0
value = ifelse(var(10),-153,-188)

[State 901]
type = TargetPowerAdd
trigger1 = AnimElemTime(6) = 0
value = 62

[State 901]
type = TargetState
triggerall = var(5) = 1
trigger1 = AnimElemTime(6) = 1
value = 930

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

;---------------------------------------------------------------------------
;背負い投げ（相手）
[Statedef 905]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = -1

[State 1201]
type = screenbound
trigger1 = AnimElemTime(6) <= 1
value = 1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 915

[State 903]
type = VelSet
trigger1 = AnimElemTime(6) = 1
x = -5.2
y = -5.2


[State 903]
type = veladd
trigger1 = AnimElemTime(6) >= 2
y = .51

[State 1300]
type = Turn
trigger1 = AnimElemTime(6) > 2
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -15

[State 903, 2]
type = SelfState
trigger1 = AnimElemTime(6) > 5
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -15
value = 5100

;---------------------------------------------------------------------------
;背負い投げ（相手）2
[Statedef 906]
type    = A
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 120]
type = selfstate
trigger1 = Time > 5
value = 5100

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

;---------------------------------------------------------------------------
;巴投げ
[Statedef 911]
type    = S
movetype = A
physics = N
velset = 0,0
poweradd = 62

[State 901]
type = TargetState
trigger1 = Time = 0
value = 915

[State 820]
type = ChangeAnim
trigger1 = Time = 0
value = 920
persistent = 0

[State 100]
type = VarSet
trigger1 = Time = 0
var(5) = 0

[State 100]
type = VarSet
triggerall = !var(5) && time < 6
trigger1 = (enemynear,Command = "holdfwd") || (enemynear,Command = "holdback")
trigger1 = (enemynear,Command = "x") || (enemynear,Command = "y") || (enemynear,Command = "z") || (enemynear,Command = "a") || (enemynear,Command = "b") || (enemynear,Command = "c")
trigger2 = (enemynear,Command = "x") && (enemynear,Command = "a")
var(5) = 1

[State 1201, 2]
type = Playerpush
trigger1 = 1
value = 0

[State 3001]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(3) < 0
edge = 10,40

[State 3001]
type = Width
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
edge = 50,0

[State 300]
type = Width
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
edge = 90,0

[State 100]
type = Width
trigger1 = AnimElemTime(5) >= 0
edge = 110,0

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

[State 90]
type = PlaySnd
trigger1 = AnimElem = 6
value = 100, 0
channel = 0

[State 901,1]
type = targetBind
trigger1 = animelem = 1
pos = ceil(-48*const(size.xscale)),0
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 2
pos = ceil(-28*const(size.xscale)),ceil(-49*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 3
pos = ceil(71*const(size.xscale)),ceil(-53*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElem = 4
pos = ceil(108*const(size.xscale)),ceil(-57*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElemTime(5) = 0
pos = ceil(130*const(size.xscale)), ceil(-73*const(size.yscale))
postype = P1
time = 1

[State 901]
type = TargetLifeAdd
trigger1 = AnimElemTime(5) = 0
value = ifelse(var(10),-153,-188)

[State 901]
type = TargetPowerAdd
trigger1 = AnimElemTime(5) = 0
value = 62

[State 901]
type = TargetState
triggerall = var(5) = 1
trigger1 = AnimElemTime(5) = 1
value = 930

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

;---------------------------------------------------------------------------
;巴投げ（相手）
[Statedef 915]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = -1

[State 120]
type = screenbound
trigger1 = AnimElemTime(5) <= 0
value = 1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 925

[State 903]
type = VelSet
trigger1 = AnimElemTime(5) = 1
x = -4.6
y = -5

;5f

[State 903]
type = veladd
trigger1 = AnimElemTime(5) >= 2
y = .51

[State 130]
type = Turn
trigger1 = AnimElemTime(5) > 2
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -15

[State 903, 2]
type = SelfState
trigger1 = AnimElemTime(5) > 5
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -15
value = 5100

;---------------------------------------------------------------------------
;巴投げ（相手）2
[Statedef 916]
type    = A
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 120]
type = selfstate
trigger1 = Time > 5
value = 5100

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

;---------------------------------------------------------------------------
;地獄車
[Statedef 921]
type    = S
movetype = A
physics = N
velset = 0,0
poweradd = 62

[State 901]
type = TargetState
trigger1 = Time = 0
value = 925

[State 820]
type = ChangeAnim
trigger1 = Time = 0
value = 930
persistent = 0

[State 100]
type = VarSet
trigger1 = Time = 0
var(5) = 0

[State 100]
type = VarSet
triggerall = !var(5) && time < 6
trigger1 = (enemynear,Command = "holdfwd") || (enemynear,Command = "holdback")
trigger1 = (enemynear,Command = "x") || (enemynear,Command = "y") || (enemynear,Command = "z") || (enemynear,Command = "a") || (enemynear,Command = "b") || (enemynear,Command = "c")
trigger2 = (enemynear,Command = "x") && (enemynear,Command = "a")
var(5) = 1

[State 1201, 2]
type = Playerpush
trigger1 = 1
value = 0

;49,F3(30) 141
;38(13) 28(25)

[State 100]
type = StateTypeSet
trigger1 = AnimElemTime(3) = 2
StateTypeSet = A

[State 100]
type = VelSet
trigger1 = AnimElemTime(3) = 2
x = 4.7 ;6.15*const(size.xscale)
y = -1.317

[State 100]
type = VelSet
trigger1 = AnimElemTime(5) = 2 
y = 1.3

[State 100]
type = StateTypeSet
trigger1 = AnimElemTime(9) = 0
StateTypeSet = S

[State 100]
type = PosSet
trigger1 = AnimElemTime(9) = 0
y = 0

[State 100]
type = VelSet
trigger1 = AnimElemTime(9) = 0
y = 0

[State 100]
type = VelSet
trigger1 = AnimElemTime(11) = 0
x = 0

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElemTime(12) = 0
time = 15
ampl = 4
freq = 80

[State 3001]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(3) < 0
edge = 10,40

[State 3001]
type = Width
trigger1 = animelemtime(3) >= 0 && animelemtime(11) < 0
edge = 30,0

[State 3001]
type = Width
trigger1 = animelemtime(11) >= 0 && animelemtime(12) < 0
edge = 50,0

[State 300]
type = Width
trigger1 = animelemtime(12) >= 0 && animelemtime(13) < 0
edge = 90,0

[State 100]
type = Width
trigger1 = AnimElemTime(13) >= 0
edge = 110,0

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

[State 90]
type = PlaySnd
trigger1 = AnimElem = 13
value = 100, 0
channel = 0

[State 901,1]
type = targetBind
trigger1 = animelem = 1
pos = ceil(-48*const(size.xscale)),0
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 2
pos = ceil(-28*const(size.xscale)),ceil(-49*const(size.yscale))
postype = P1
time = -1

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

[State 901,1]
type = targetBind
trigger1 = animelem = 3
trigger2 = animelem = 7
pos = 0,ceil(-45*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 4
trigger2 = animelem = 8
pos = ceil(5*const(size.xscale)),ceil(-24*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 5
trigger2 = animelem = 9
pos = ceil(-9*const(size.xscale)),ceil(-24*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 6
trigger2 = animelem = 10
pos = ceil(-10*const(size.xscale)),ceil(-40*const(size.yscale))
postype = P1
time = -1

;--------------
[State 901,1]
type = targetBind
trigger1 = animelem = 11
pos = ceil(71*const(size.xscale)),ceil(-53*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElem = 12
pos = ceil(108*const(size.xscale)),ceil(-57*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElemTime(13) = 0
pos = ceil(130*const(size.xscale)), ceil(-73*const(size.yscale))
postype = P1
time = 1

[State 901]
type = TargetLifeAdd
trigger1 = AnimElemTime(13) = 0
value = ifelse(var(10),-153,-188)

[State 901]
type = TargetPowerAdd
trigger1 = AnimElemTime(13) = 0
value = 62

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElemTime(13) >= 0
trigger1 = roundstate = 3
time = 0
ampl = 4
freq = 80

[State 901]
type = TargetState
triggerall = var(5) = 1
trigger1 = AnimElemTime(13) = 1
value = 930

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

;---------------------------------------------------------------------------
;地獄車（相手）
[Statedef 925]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = -1

[State 120]
type = screenbound
trigger1 = AnimElemTime(13) <= 0
value = 1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 935

[State 903]
type = VelSet
trigger1 = AnimElemTime(13) = 1
x = -4.6
y = -5

;5f

[State 903]
type = veladd
trigger1 = AnimElemTime(13) >= 2
y = .51

[State 130]
type = Turn
trigger1 = AnimElemTime(13) > 2
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -15

[State 903, 2]
type = SelfState
trigger1 = AnimElemTime(13) > 5
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -15
value = 5100

;---------------------------------------------------------------------------
;地獄車（相手）2
[Statedef 926]
type    = A
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 120]
type = selfstate
trigger1 = Time > 5
value = 5100

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

;---------------------------------------------------------------------------
;投げ抜け（相手）
[Statedef 930]
type    = A
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 940

[State 903]
type = posadd
trigger1 = time = 0
x = 20
y = 40

[State 903]
type = VelSet
trigger1 = time = 0
x = -2.5
y = -8

[State 903]
type = veladd
trigger1 = time >= 1
y = .49

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

[State 903, 2]
type = SelfState
trigger1 = alive = 0
trigger1 = anim = 940
trigger1 = animtime = 0
value = 5050

[State 902, 1]
type = ChangeAnim
trigger1 = anim = 940
trigger1 = animtime = 0
value = 5040

[State 903, 2]
type = SelfState
trigger1 = time > 5
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
;豪昇龍拳
[Statedef 1000]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
juggle  = 8
poweradd = ifelse(!var(13),187,0) ;z,09 0a 0b 0c

[State 1100]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "shoryu1", 0, ifelse(Command = "shoryu2", 1, 2))

[State 1000]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = ifelse(P2bodydist y <-120,2,ifelse(var(58)%2=0,0,2))

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
triggerall = !var(12)
trigger1 = enemynear,ctrl = 0
trigger1 = P2bodydist X = [2,20]
trigger1 = var(58)%2 = 0
trigger2 = var(13)
var(6) = 2

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
trigger1 = numtarget
trigger2 = enemynear,animtime >= -4
trigger3 = P2bodydist X <= 5 || P2bodydist X >= 30
trigger4 = var(9) && Prevstateno = [130,131]
var(6) = 0

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
triggerall = var(12) && var(48) = 1
trigger1 = numtarget
trigger1 = P2bodydist X = [-5,20]
trigger1 = P2statetype != A
trigger1 = prevstateno = 305 || prevstateno = 325
var(6) = 2

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

[State 1000]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 1000, ifelse(var(6) = 1, 1010, 1020))

[State 1000]
type = Width
trigger1 = 1
edge = 20,0

[State 120, 1]
type = VarSet
trigger1 = time = 2
var(9) = 0

[state 30]
type = StatetypeSet
trigger1 = AnimElemTime(3) = 1
value = A
physics = N

[State 50]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 100,1
channel = 0

[State 52]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 0,3
channel = 11

[State 50]
type = StopSnd
trigger1 = movecontact
value = 0,2
channel = 11

[State 170, 1]
type = NotHitBy
trigger1 = AnimElemTime(3) <= ifelse(!var(12),2,7)
value = SCA

[State 1000]
type = VelSet
trigger1 = AnimElemTime(3) = 1
x = ifelse(!var(6), 3, ifelse(var(6) = 1, 5.25, 7.5))
y = ifelse(!var(6), -7.5, ifelse(var(6) = 1, -9.6, -12.6))

[State 1000]
type = Veladd
trigger1 = AnimElemTime(3) >= 1
y = ifelse(!var(6), .65, ifelse(var(6) = 1, .64, .64))

[State 1000]
type = VelMul
trigger1 = AnimElemTime(3) >= 1+var(6)
x = .9

[State 1000]
type = Velset
trigger1 = !Var(6)
trigger1 = AnimElemTime(3) = 9
trigger2 = Var(6) = 1
trigger2 = AnimElemTime(3) = 11
trigger3 = Var(6) = 2
trigger3 = AnimElemTime(3) = 13
x = 0

[State 1000]
type = HitDef
trigger1 = !var(7)
trigger1 = AnimElemTime(1) = 1
attr = S, SA
animtype  = Heavy
air.animtype  = Back
damage = ifelse(var(6)=2,76,69),14 ;75-68-5c ,89-87 -imp
;z, 82 86-7e 85-7b-73(201) ,8e 8e-8c 8f-8d-8b
;;8b-81-79
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ifelse(!var(13),11,0),11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -3, -55
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = ifelse(!var(13),-2.2,0),ifelse((!var(13)||var(6)=1),-10.4,ifelse(!var(6),-9,-11.8))
guard.velocity = -9.8
air.velocity = ifelse(!var(13),-2.2,0),ifelse((!var(13)||var(6)=1),-10.4,ifelse(!var(6),-9,-11.8))
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .57
persistent = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0)
givepower = 62,31
;envshake.time = 8
;envshake.ampl = 2
forcestand = 1

[State 1000]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA
animtype  = Heavy
air.animtype  = Back
damage= ifelse(!var(6), 97, ifelse(var(6)=1,56,69)),14
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ifelse(!var(13),11,0),11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -5, -55
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = ifelse(!var(13),-2.2,0),ifelse((!var(13)||var(6)=1),-10.4,ifelse(!var(6),-9,-11.8))
guard.velocity = -9.8
air.velocity = ifelse(!var(13),-2.2,0),ifelse((!var(13)||var(6)=1),-10.4,ifelse(!var(6),-9,-11.8))
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .57
persistent = 0
getpower = ifelse(!var(13),21,0),ifelse(!var(13),11,0)
givepower = 62,31
;envshake.time = 8
;envshake.ampl = 2
forcestand = 1

[State 1000]
type = HitDef
trigger1 = !var(6)
trigger1 = var(3) != [1,2]
trigger1 = AnimElem = 3
trigger2 = var(6)
trigger2 = AnimElem = 3
attr = S, SA
animtype  = Heavy
air.animtype  = Back
damage= ifelse(!var(6), 97, ifelse(var(6)=1,56,56)),14
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),11,0),11
sparkno = S8050
guard.sparkno = S8110
sparkxy = 5, -91
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = ifelse(!var(13),-2.2,0),ifelse((!var(13)||var(6)=1),-10.4,ifelse(!var(6),-9,-11.8))
guard.velocity = -9.8
air.velocity = ifelse(!var(13),-2.2,0),ifelse((!var(13)||var(6)=1),-10.4,ifelse(!var(6),-9,-11.8))
airguard.velocity = -5.8,-3
ground.cornerpush.veloff = -0
air.cornerpush.veloff = 0
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .57
persistent = 0
getpower = ifelse(!var(13),21,0),ifelse(!var(13),11,0)
givepower = 62,31
;envshake.time = 8
;envshake.ampl = 2
forcestand = 1

[State 70]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1005

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

[State 50]
type = PlaySnd
trigger1 = time = 0
value = 4, 0

[State 80]
type = PosSet
trigger1 = time = 0
y = 0

[State 90]
type = Changestate
trigger1 = Animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;竜巻
[Statedef 1100]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
juggle  = 8
poweradd = ifelse(!var(13),125,0) ;z,06-08-0a-
;07-08-09-0a-0b-

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

[State 170, 1]
type = NotHitBy
trigger1 = AnimElemTime(1) < 3
value = SCA

[State 110]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "tatsumaki1", 0, ifelse(Command = "tatsumaki2", 1, 2))

[State 1000]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = ifelse(numtarget&&random<=250,0,1+random%2)

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
trigger1 = prevstateno = 330
trigger2 = P2bodydist X >= ceil(28*const(size.xscale))
var(6) = 1+random%2

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
trigger1 = projhittime(1500) = [1,20]
var(6) = 2

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 1100, ifelse(var(6) = 1, 1110, 1120))

[State 902, 1]
type = null;ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 1160, ifelse(var(6) = 1, 1170, 1180))

[State 1000]
type = Width
trigger1 = !var(6)
trigger2 = var(13)
edge = ceil(25*const(size.xscale)), 0

[State 1100]
type = PlaySnd
trigger1 = var(6) != 2
trigger1 = AnimElem = 7
trigger2 = var(6) = 2
trigger2 = AnimElem = 8
trigger3 = var(6) = 1
trigger3 = AnimElem = 11
trigger4 = var(6) = 2
trigger4 = AnimElem = 12 || AnimElem = 15 || AnimElem = 19
value = 0,3
channel = 7
persistent = 1

[State 1000, 0]
type = StopSnd
trigger1 = movecontact
trigger1 = hitpausetime
channel = 7
ignorehitpause = 1
persistent = 1

[State 1100]
type = PlaySnd
trigger1 = time = 0
value = 100,1
channel = 0

;9b,e1(22) 58
;9e,08(28) 87
;a0,54(37) 149

[State 1100]
type = VelSet
trigger1 = AnimElem = 1
x = ifelse(!var(6), 2.7, ifelse(var(6)=1, 3.3, 4.2))
y = -5.7

[State 1100]
type = VelMul
trigger1 = !var(6) && AnimElemTime(9) >= 0
trigger2 = var(6) = 1 && AnimElemTime(13) >= 0
trigger3 = var(6) = 2 && AnimElemTime(19) >= 0
x = .96

[State 1100]
type = VelSet
trigger1 = !var(6)
trigger1 = AnimElem = 4
trigger2 = var(6)
trigger2 = AnimElem = 5
y = 0

[State 1100]
type = Veladd
trigger1 = AnimElemTime(4) < 0
trigger2 = !var(6) && AnimElemTime(9) >= 0
trigger3 = var(6) = 1 && AnimElemTime(13) >= 0
trigger4 = var(6) = 2 && AnimElemTime(19) >= 0
y = .58

[State 1100]
type = HitDef
trigger1 = AnimElem = 2
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage = 97-var(13)*41,14 ; 85,8E,8c
;z, 84 82-7b 82-7a, 8e 8e-8d
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),9
guard.pausetime = ifelse(!var(13),10,0),10
sparkno = S8050
guard.sparkno = S8110
sparkxy = -10, -48
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -1.2,ifelse(!var(13),-8,-6.5)
guard.velocity = -12 ;*const(size.xscale)
air.velocity = -1.2,ifelse(!var(13),-8,-6.5)
airguard.velocity = -5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -16.5*const(size.xscale)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -16.5*const(size.xscale)
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
;air.recover = 0
yaccel = .55
persistent = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
forcestand = 1

[State 1100]
type = HitDef
trigger1 = !var(6)
trigger1 = AnimElem = 4
trigger2 = var(6)
trigger2 = AnimElem = 6
trigger3 = var(6) = 1
trigger3 = AnimElem = 9
trigger4 = var(6) = 2
trigger4 = AnimElem = 10
trigger5 = AnimElem = 14
trigger6 = AnimElem = 17
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage = ifelse(!var(6),83-var(13)*21,49-var(13)*14),14 
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),9;11
guard.pausetime = ifelse(!var(13),10,0),11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -2, -63
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -1.2,ifelse(!var(13),-7.2,-6.5)
guard.velocity = -11 ;-10
air.velocity = -1.2,ifelse(!var(13),-7.5,-6.5)
airguard.velocity = -5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -8
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -8
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
;air.recover = 0
yaccel = .55
persistent = 1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
forcestand = 1

[State 1100]
type = HitDef
trigger1 = var(6) =! 2
trigger1 = AnimElem = 7
trigger2 = var(6) = 2
trigger2 = AnimElem = 8
trigger3 = var(6) = 1
trigger3 = AnimElem = 11
trigger4 = var(6) = 2
trigger4 = AnimElem = 12
trigger5 = AnimElem = 15
trigger6 = AnimElem = 19
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage = 49-var(13)*14,14 ;ifelse(!var(6),83,49),14
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),9 ;11
guard.pausetime = ifelse(!var(13),10,0),11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -2, -63
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = 1.2,ifelse(!var(13),-7.2,-6.5)
guard.velocity = 11 ;10
air.velocity = 1.2,ifelse(!var(13),-7.5,-6.5)
airguard.velocity = 5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
;air.recover = 0
yaccel = .55
persistent = 1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
forcestand = 1

[State 110]
type = ChangeState
trigger1 = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1105

;---------------------------------------------------------------------------
;（着地)
[Statedef 1105]
type    = S
physics = S
ctrl = 0
anim = 1105
velset = 0,0

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

[State 50]
type = PlaySnd
trigger1 = Time = 0
value = 4, 0
channel = 20

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

;---------------------------------------------------------------------------
;竜巻(真)
[Statedef 1110]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
juggle  = 8
poweradd = ifelse(!var(13),125,0) ;z,06-08-0a-
;07-08-09-0a-0b-

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

[State 170, 1]
type = NotHitBy
trigger1 = AnimElemTime(1) < 3
value = SCA

[State 110]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "tatsumaki1", 0, ifelse(Command = "tatsumaki2", 1, 2))

[State 1000]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = ifelse(numtarget&&random<=250,0,1+random%2)

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
trigger1 = prevstateno = 330
trigger2 = P2bodydist X >= 19
trigger3 = numtarget && target,const(size.head.pos.y) >= -85
var(6) = 1+random%2

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
trigger1 = P2stateno = 5120
var(6) = ifelse((random%3 =[0,1])&&(enemynear,animtime = [-27,-23]),0,1)

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 1160, ifelse(var(6) = 1, 1170, 1180))

[State 1000]
type = Width
trigger1 = !var(6)
trigger2 = var(13)
edge = ceil(25*const(size.xscale)), 0

[State 1100]
type = PlaySnd
trigger1 = !var(6) && AnimElem = 6 || var(6)=1 && AnimElem = 7 || var(6)=2 && AnimElem = 8
trigger2 = var(6) = 1
trigger2 = AnimElem = 11
trigger3 = var(6) = 2
trigger3 = AnimElem = 12
trigger4 = var(6) = 2
trigger4 = AnimElem = 15 || AnimElem = 19
value = 0,3
channel = 7
persistent = 1

[State 1000, 0]
type = StopSnd
trigger1 = movecontact
trigger1 = hitpausetime
channel = 7
ignorehitpause = 1
persistent = 1

[State 1100]
type = PlaySnd
trigger1 = time = 0
value = 100,1
channel = 0

;9b,e1(22) 58
;9e,08(28) 87 9b,
;a0,54(37) 149 9b,53(40)
[State 1100]
type = VelSet
trigger1 = AnimElem = 1
x = ifelse(!var(6), 2.8, ifelse(var(6)=1, 3.3, 4.1))
y = -5.7

[State 1100]
type = VelMul
trigger1 = !var(6) && AnimElemTime(8) >= 0
trigger2 = var(6) = 1 && AnimElemTime(13) >= 0
trigger3 = var(6) = 2 && AnimElemTime(21) >= 0
x = .96

[State 1100]
type = VelSet
trigger1 = !var(6)
trigger1 = AnimElem = 5
trigger2 = var(6)
trigger2 = AnimElem = 6
y = 0

[State 1100]
type = Veladd
trigger1 = AnimElemTime(5) < 0
trigger2 = !var(6) && AnimElemTime(8) >= 0
trigger3 = var(6) = 1 && AnimElemTime(13) >= 0
trigger4 = var(6) = 2 && AnimElemTime(21) >= 0
y = .58

[State 1100]
type = HitDef
trigger1 = AnimElem = 2
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage = 97-var(13)*41,14 ; 85,8E,8c
;z, 84 82-7b 82-7a(153), 8e 8e-8d
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),10 ;10
guard.pausetime = ifelse(!var(13),10,0),10
sparkno = S8050
guard.sparkno = S8110
sparkxy = -10, -48
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -1.2,ifelse(!var(13),-7,-6)
guard.velocity = -12 ;*const(size.xscale)
air.velocity = -1.2,ifelse(!var(13),-7,-6)
airguard.velocity = -5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -16.5*const(size.xscale)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -16.5*const(size.xscale)
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
;air.recover = 0
yaccel = .55
persistent = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
forcestand = 1

[State 1100]
type = HitDef
trigger1 = !var(6)
trigger1 = AnimElem = 5
trigger2 = var(6)
trigger2 = AnimElem = 6
trigger3 = var(6) = 1
trigger3 = AnimElem = 9
trigger4 = var(6) = 2
trigger4 = AnimElem = 10
trigger5 = AnimElem = 14
trigger6 = AnimElem = 17
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage = ifelse(!var(6),83-var(13)*21,49-var(13)*14),14
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),10;11
guard.pausetime = ifelse(!var(13),10,0),11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -2, -63
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -1.2,ifelse(!var(13),-7.2,-6)
guard.velocity = -11 ;-10
air.velocity = -1.2,ifelse(!var(13),-7.5,-6)
airguard.velocity = -5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -8
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -8
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
;air.recover = 0
yaccel = .55
persistent = 1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
forcestand = 1

[State 1100]
type = HitDef
trigger1 = !var(6) && AnimElem = 6 || var(6)=1 && AnimElem = 7 || var(6)=2 && AnimElem = 8
trigger2 = var(6) = 1
trigger2 = AnimElem = 11
trigger3 = var(6) = 2
trigger3 = AnimElem = 12
trigger4 = var(6) = 2
trigger4 = AnimElem = 15 || AnimElem = 19
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage = 49-var(13)*14,14 ;ifelse(!var(6),83,49),14
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),10 ;11
guard.pausetime = ifelse(!var(13),10,0),11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -2, -63
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = 1.2,ifelse(!var(13),-7.2,-6)
guard.velocity = 11 ;10
air.velocity = 1.2,ifelse(!var(13),-7.5,-6)
airguard.velocity = 5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
;air.recover = 0
yaccel = .55
persistent = 1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
forcestand = 1

[State 110]
type = ChangeState
trigger1 = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1115

;---------------------------------------------------------------------------
;（着地)
[Statedef 1115]
type    = S
physics = S
ctrl = 0
anim = 1115
velset = 0,0

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

[State 50]
type = PlaySnd
trigger1 = Time = 0
value = 4, 0
channel = 20

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

;---------------------------------------------------------------------------
;豪波動拳
[Statedef 1200]
type    = S
movetype = A
physics = S
velset = 0,0
ctrl = 0
anim = ifelse(var(13),1215,1200 + var(12))
poweradd = ifelse(!var(13),83,0) ;z,04-08
;04-06

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 1000]
type = Width
trigger1 = 1
edge = ceil(50*const(size.xscale)), 0

[State 1000]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "hadou1", 0, ifelse(Command = "hadou2", 1, 2))

[State 1000]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = 1+random%2

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
trigger1 = numtarget
trigger2 = P2BodyDist X = [0,120]
var(6) = 2

[State 1000]
type = PlaySnd
trigger1 = AnimElemTime(4) = 1
value = 100, 0
channel = 0

[State 1000]
type = PlaySnd
trigger1 = AnimElem = 4
value = 150,0

[State -3]
type = Helper
trigger1 = AnimElem = 4
id = 6100
name = "hadouken"
pos = ceil(93*const(size.xscale)),ceil(-56*const(size.yscale))
postype = P1
stateno = 6100
helpertype = normal
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause = 1
persistent = 0

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

;---------------------------------------------------------------------------
;豪波動拳（飛び道具）
[Statedef 6100]
type    = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
anim = ifelse((root,var(13)),8990,6100+(10*random%2))
sprpriority = 4

[State 300]
type = VarSet
trigger1 = time = 0
var(6) = parent,var(6)

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(12) = parent,var(12)

[State 300]
type = VarSet
trigger1 = time = 0
var(13) = parent,var(13)

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = time = 0
var(10) = parent,var(10)

[State 1005]
type = varadd
trigger1 = time && var(1) < 25
var(1) = 1

[State 1000, 3]
type = AttackMulSet
trigger1 = var(10) = 1
trigger1 = time  < 10
value = 1.26

[State 1000, 3]
type = AttackMulSet
trigger1 = var(10) = 1
trigger1  = Time = ifelse(!var(6),15,ifelse(var(6)=1,14,13))
value = 1

[State 110]
type = VelSet
trigger1 = time = 1
x = ifelse(!var(6),3.32,ifelse(var(6)=1,4.15,5.38))

[State 100]
type = Projectile
trigger1 = time = 1
projanim = ifelse(!var(13),6050,6010)
Projhitanim = ifelse(!var(13),-1,6150)
Projremanim = -1
projcancelanim = ifelse(!var(13),-1,6150)
projremovetime = ifelse(!var(6),13,ifelse(var(6)=1,12,11))
projedgebound = 40
projstagebound = 40
offset = 0, 0
projpriority = 1
projsprpriority = 4
projshadow = -1
velocity = vel X, vel Y
ProjID = 1000
attr = S, SP
damage= ifelse(!var(13),97,28),ifelse(!var(13),14,7) ;82,8e
;8c,88,84,80
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 0,7
sparkno = S8050
guard.sparkno = S8110
sparkxy = 6, 20
hitsound = -1 ;S1,ifelse(!var(13),3,5)
guardsound = -1 ;S3,1
ground.type = High
ground.slidetime = 16
ground.hittime = 16
air.hittime = 19
guard.ctrltime = 15
ground.velocity = -1.08 ,-7.54 ;-4.5, -6
guard.velocity = -11
air.velocity = -1.08 ,-7.54 ;-4.5, -6
airguard.velocity = -5.7,-1
air.juggle = 8
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0) ;04,02
givepower = 62,31 ;03,
yaccel = .58 ;.5

[State 100]
type = Projectile
trigger1  = Time = ifelse(!var(6),15,ifelse(var(6)=1,14,13))
projanim = ifelse(!var(13),6050,6011)
Projhitanim = ifelse(!var(13),-1,6150)
Projremanim = ifelse(!var(13),-1,6150)
projcancelanim = ifelse(!var(13),-1,6150)
projedgebound = 40
projstagebound = 40
offset = 0, 0
projpriority = 1
projsprpriority = 4
velocity = vel X, vel Y
ProjID = 1000
attr = S, SP
damage= ifelse(!var(13),97,28),ifelse(!var(13),14,7) ;82,8e
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 0,7
sparkno = S8050
guard.sparkno = S8110
sparkxy = 6, 20
hitsound = -1 ;S1,ifelse(!var(13),3,5)
guardsound = -1 ;S3,1
ground.type = High
ground.slidetime = 17
ground.hittime = 17
air.hittime = 19
guard.ctrltime = 16
ground.velocity = -11
guard.velocity = -11
air.velocity = -1.08 ,-7.54 ; -4, -5.5
airguard.velocity = -5.7,-1.5
air.juggle = 8
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0) ;04,02
givepower = 62,31 ;03,
;forcestand = 1
yaccel = .58

[State 300]
type = VarSet
trigger1 = root,ProjContactTime(1000) = 1
ignorehitpause = 1
var(2) = 1

[State 411]
type = null;DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -45 && !var(2)

[State 900, 4]
type = ChangeState
triggerall = time > 1
trigger1 = !root,NumProjID(1000)
trigger2 = var(13)
trigger2 = FrontEdgeDist <= -45
value = 6150

;---------------------------------------------------------------------------
;豪波動拳（飛び道具）（消滅）
[Statedef 6150]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8990

[State 300]
type = VarSet
trigger1 = time = 0
var(2) = 0

[State 300]
type = Explod
trigger1 = !var(13)
trigger1 = time = 0
id = 6150
name = "disappear"
pos = 0,0
postype = P1
anim = 6150
ownpal = 1
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
persistent = 0
pausemovetime = 99999999999999

[State -2]
type = Explod
trigger1 = !root,var(13)
trigger1 = root,projhittime(1000) = [1,4]
trigger1 = !NumExplod(8070)
trigger1 =  p2movetype = H
anim = 8070
id = 8070
pos = 0,enemynear,Const(size.head.pos.y)
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -2
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 411]
type = RemoveExplod
trigger1 = FrontEdgeDist <= -45 && !var(2)
id = 6150

[State 411]
type = null;PosAdd
trigger1 = time = 1
trigger1 = P2dist X < -22
x = P2dist X + 22

[State 410]
type = DestroySelf
trigger1 = time >= 1
trigger1 = !NumExplod(6150)
pausemovetime = 9999

;---------------------------------------------------------------------------
;灼熱豪波動
[Statedef 1300]
type    = S
movetype = A
physics = S
velset = 0,0
ctrl = 0
anim = ifelse(var(13),1315,1300 + var(12))
poweradd = ifelse(!var(13),83,0)
;z 04 09 ,06

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

[State 1000]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "shakunetsu1", 0, ifelse(Command = "shakunetsu2", 1, 2))

[State 1000]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = ifelse(numtarget,2,1+random%2)

[State 1000]
type = Width
trigger1 = 1
edge = ceil(50*const(size.xscale)), 0

[State 1000]
type = PlaySnd
trigger1 = anim = 1300
trigger1 = AnimElem = 11
trigger2 = anim = 1310 || anim = 1315
trigger2 = AnimElem = 10
value = 100, 1
channel = 0

[State 1000]
type = PlaySnd
trigger1 = anim = 1300
trigger1 = AnimElem = 11
trigger2 = anim = 1310 || anim = 1315
trigger2 = AnimElem = 10
value = 150,0

[State -3]
type = Helper
trigger1 = anim = 1300
trigger1 = AnimElem = 11
trigger2 = anim = 1310 || anim = 1315
trigger2 = AnimElem = 10
id = 6200
name = "shakunetsu"
pos = ceil(93*const(size.xscale)),ceil(-56*const(size.yscale))
postype = P1
stateno = 6200
helpertype = normal
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause = 1
persistent = 0

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

;---------------------------------------------------------------------------
;灼熱波動拳（飛び道具）
[Statedef 6200]
type    = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
anim = ifelse(!root,var(13),6200,8990) ;+(parent,var(6))*10
sprpriority = 4

[State 9000]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(6) = parent,var(6)

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(12) = parent,var(12)

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(10) = parent,var(10)

[State 1000, 3]
type = AttackMulSet
trigger1 = var(10) = 1
trigger1 = time  < 10
value = 1.5

[State 1000, 3]
type = AttackMulSet
trigger1 = var(12) && !var(10)
trigger1 = time  < 10
value = 1.144

[State 1000, 3]
type = AttackMulSet
trigger1  = Time = ifelse(!var(6),15,ifelse(var(6)=1,14,13))
value = 1

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(13) = parent,var(13)

[State 110]
type = VelSet
trigger1 = time = 1
x = ifelse(!var(6),3.58,ifelse(var(6)=1,4.34,5.18))

[State 1000]
type = Projectile
trigger1 = time = 1
projanim = ifelse(!var(13),6050,6015)
Projhitanim = ifelse(!var(13),-1,6150)
Projremanim = ifelse(!var(13),-1,6150)
projcancelanim = ifelse(!var(13),-1,6150)
offset = 0, 0
projpriority = 1
projsprpriority = 4
projedgebound = 40
projstagebound = 40
;projmisstime = 1
projhits = 1+var(6)
ProjID = 1100
velocity = vel X, vel Y
attr = S, SP
damage = ifelse(!Var(6),(83-var(13)*48),ifelse(var(6)=1,(44-var(13)*16),(44-var(13)*19))),ifelse(!var(13),14,7)
;z, 84 85-81 85-81-7D , 8e 8e-8d 8d-8c-8b
;8b 88 85
;35 56 76
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 4,7
sparkno = -1
guard.sparkno = -1 ;S8110
sparkxy = 0, 0
hitsound = -1;S1,2
guardsound = -1;S3,0
ground.type = High
ground.slidetime = 16
ground.hittime = 16
air.hittime = 19
guard.ctrltime = 15
ground.velocity = -1.08 ,-7.54
guard.velocity = -11
air.velocity = -1.08 ,-7.54
airguard.velocity = -5.7,-1.5
air.juggle = 8
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
getpower = ifelse(var(13),0,ifelse(!Var(6),104,ifelse(var(6)=1,52,35))),ifelse(var(13),0,ifelse(!Var(6),42,ifelse(var(6)=1,21,14))) ;104,42
givepower = 62,31 ;03,
palfx.color = 0
palfx.add = 100,-20,-134
palfx.sinadd = 20,0,0,3
palfx.time = ifelse(p2statetype = A ,45,36)
yaccel = .58
nochainID = root,var(8)
Persistent = 0

[State 300]
type = Explod
triggerall = !root,var(13)
trigger1 = var(6)
trigger1 = root,projContacttime(1100) = 1
id = 1100
name = "projhit_s"
pos = P2bodydist X+8 ,10
postype = P1
anim = ifelse((root,projhittime(1100) = 1),8050,8110)
random = 5,20
scale = const(size.xscale),const(size.yscale)
ownpal = 1
ontop = 1
ignorehitpause = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State -2]
type = Explod
triggerall = !root,var(13)
trigger1 = var(6)
trigger1 = root,projhittime(1100) = 1
trigger1 =  p2movetype = H
anim = 8070
id = 8070
pos = 0,(enemynear,Const(size.head.pos.y))
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -2
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 300]
type = VarSet
trigger1 = var(1) = 5 ;ifelse(var(12)=20,5,8)
ignorehitpause = 1
var(1) = 0

[State 300]
type = VarSet
trigger1 = root,ProjContacttime(1100) = 1
ignorehitpause = 1
var(1) = 1

[State 300]
type = VarAdd
trigger1 = var(1)
ignorehitpause = 1
var(1) = 1

[State 411]
type = PosFreeze
triggerall = time > 1
trigger1 = var(1)
trigger2 = root,ProjContact1100 = 1
trigger2 = P2dist X < -10
value = 1
ignorehitpause = 1

[State 411]
type = null;DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -45 && !var(1)

[State 900, 4]
type = ChangeState
triggerall = time > 1
trigger1 = !root,NumProjID(1100)
trigger2 = var(13)
trigger2 = FrontEdgeDist <= -45
value = 6205

;---------------------------------------------------------------------------
;灼熱波動拳（飛び道具）（消滅）
[Statedef 6205]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8990

[State 300]
type = VarSet
trigger1 = var(1)
var(1) = 0

[State 300]
type = Explod
trigger1 = !var(13)
trigger1 = time = 0
id = 6150
name = "disappear"
pos = 0,0
postype = P1
anim = 6150
scale = const(size.xscale),const(size.yscale)
ownpal = 1
sprpriority = 4
persistent = 0
pausemovetime = 99999999999999

[State 300]
type = Explod
triggerall = !root,var(13)
triggerall = root,projContacttime(1100) = [1,4]
trigger1 = !var(6)
trigger1 = !NumExplod(1100)
id = 1100
name = "projhit_s"
pos = P2bodydist X+8 ,20
postype = P1
anim = ifelse((root,projhittime(1100)),8050,8110)
;random = 10,20
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = Explod
triggerall = !root,var(13)
triggerall = root,projhittime(1100) = [1,4]
trigger1 = !var(6)
trigger1 = !NumExplod(8070)
trigger1 =  p2movetype = H
anim = 8070
id = 8070
pos = 0,(enemynear,Const(size.head.pos.y))
postype = P2
bindtime = -1
sprpriority = -2
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 9000]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 411]
type = RemoveExplod
trigger1 = FrontEdgeDist <= -45 && !var(1)
id = 6150

[State 411]
type = DestroySelf
trigger1 = time >= 1
trigger1 = !NumExplod(6150)

;---------------------------------------------------------------------------
;斬空波動拳
[Statedef 1400]
type    = A
movetype = A
physics = N
ctrl = 0
anim = 1400 + Var(12)
poweradd = ifelse(!var(13),62,0) ; z 03 05,04

[State 1000]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "hadou1", 0, ifelse(Command = "hadou2", 1, 2))

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = !var(12)
trigger1 = Time = 0
var(6) = ifelse(vel X <= 0, random%3,0)

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = var(12)
trigger1 = Time = 0
trigger1 = p2bodydist x <= 140
var(6) = ifelse(vel X >0,0,1)

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = var(12)
trigger1 = Time = 0
trigger1 = p2bodydist x > 140
var(6) = ifelse(p2bodydist x >= 176,2,ifelse((p2bodydist x >= 160&&vel X < 0),2,1))

[State 1000]
type = VarSet
triggerall = var(59)
triggerall = var(12)
triggerall = P2StateType != L
triggerall = P2stateno != 5120
triggerall = P2stateno != 5201
trigger1 = Time = 0
trigger1 = P2bodydist X = [155,195]
trigger1 = vel Y = [-2.5,1.9]
var(6) = 1

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 1000]
type = PlaySnd
trigger1 = !var(12)
trigger1 = AnimElem = 3
trigger2 = var(12)
trigger2 = AnimElem = 2 || AnimElem = 4
value = 100,0
channel = 0

[State 1000]
type = PlaySnd
trigger1 = !var(12)
trigger1 = AnimElem = 3
trigger2 = var(12)
trigger2 = AnimElem = 2 || AnimElem = 4
value = 150, 0
channel = 8

[State -3]
type = Helper
trigger1 = !var(12)
trigger1 = AnimElemTime(2) = 3 ;AnimElem = 3 ;; 
trigger2 = var(12)
trigger2 = AnimElemTime(3) = 3
id = 6300
name = "zanku_1"
pos = ceil(71*const(size.xscale)),ceil(-42*const(size.yscale)) ;-65
postype = P1
stateno = 6300
helpertype = normal
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause = 1
persistent = 0

[State -3]
type = Helper
trigger1 = var(12)
trigger1 = AnimElemTime(1) = 2
id = 6301
name = "zanku_2"
pos = ceil(70*const(size.xscale)),ceil(-42*const(size.yscale))
postype = P1
stateno = 6301
helpertype = normal
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause = 1
persistent = 0

[State 1000]
type = ChangeState
trigger1 = !var(12)
trigger1 = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1405

[State 1000]
type = ChangeState
trigger1 = var(12)
trigger1 = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;斬空波動拳（着地）
[Statedef 1405]
type    = C
physics = C
ctrl = 0
anim = 1405
velset = 0,0

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

[State 52]
type = PlaySnd
trigger1 = Time = 0
value = 4, 0
channel = 20

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

;---------------------------------------------------------------------------
;斬空波動拳（飛び道具）1
[Statedef 6300]
type    = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
anim = ifelse(!root,var(13),6300,8990)
sprpriority = 4

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(6) = parent,var(6)

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(12) = parent,var(12)

[State 300]
type = VarSet
trigger1 = time = 0
var(13) = parent,var(13)

[State 1000,6]
type = BindToRoot
trigger1 = time = 0
time = 2
pos = ceil(71*const(size.xscale)),ceil(-42*const(size.yscale)) ;-65

;db,2b(24) 2.732
;99,39  4.28

;dc,27(20) 3.07 dc,1e 3.37
;8d,28 5.4      98,4b 5.14

;dd,2a(16) 3.94
;97,3f 6.42

[State 100]
type = VelSet
trigger1 = !parent,Var(12)
trigger1 = Time = 1
x = ifelse(!var(6), 2.732, ifelse(var(6) = 1, 3.37, 3.94))
y = ifelse(!var(6), 4.28, ifelse(var(6) = 1, 5.14, 6.42))

[State 100]
type = VelSet
trigger1 = parent,Var(12)
trigger1 = Time = 1
x = ifelse(!var(6), 3.2, ifelse(var(6) = 1, 3.7, 4.8));3.3 3.8 4.9
y = ifelse(!var(6), 2.48, ifelse(var(6) = 1, 2.38, 2.65))

[State 1000]
type = Projectile
triggerall = root,movetype != H
trigger1 = time = 1
projanim = ifelse(!var(13),6060,6065)
Projhitanim = ifelse(!var(13),-1,6350)
offset = 0, 0
projpriority = 1
projsprpriority = 4
projedgebound = 40
projstagebound = 40
velocity = vel X, vel Y
ProjID = 1200
attr = S, SP
damage= ifelse(!var(13),62,49),ifelse(!var(13),14,7) ; 89 ,8e  s.g 85-7c
;z, 87,8e
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 0,7
sparkno = S8050
guard.sparkno = S8110
sparkxy = 6, 20
hitsound = -1;S1,2
guardsound = -1;S3,0
ground.type = High
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
ground.velocity = -10
guard.velocity = -10
air.velocity = -1.08 ,-7.54 ;-4, -5.5
airguard.velocity = -5.7,-1.6
air.juggle = 8
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0)
givepower = 62,31 ;03,
yaccel = .58

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

[State 411]
type = null;DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -45 && !var(1)
;trigger1 = Pos Y <= -10

[State 900, 4]
type = ChangeState
triggerall = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
trigger2 = var(13) && FrontEdgeDist <= -45
value = 6306

[State 900, 4]
type = ChangeState
triggerall = time > 1
trigger1 = !root,NumProjID(1200)
value = 6305

;---------------------------------------------------------------------------
;斬空波動拳（飛び道具）2
[Statedef 6301]
type    = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
anim = ifelse(!root,var(13),6300,8990)
sprpriority = 4

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(6) = parent,var(6)

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(12) = parent,var(12)

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(13) = parent,var(13)

[State 1000]
type = BindToRoot
trigger1 = time = 0
time = 2
pos = ceil(70*const(size.xscale)),ceil(-42*const(size.yscale))

[State 100]
type = null;VelSet
trigger1 = parent,Var(12) != 20
trigger1 = Time = 1
x = ifelse(!var(6), 3.5, ifelse(var(6) = 1, 4.8, 6.3))
y = ifelse(!var(6), 1.522, ifelse(var(6) = 1, 2.087, 2.74))

[State 100]
type = VelSet
trigger1 = parent,Var(12)
trigger1 = Time = 2
x = ifelse(!var(6), 3.32, ifelse(var(6) = 1, 3.873, 4.98))
y = ifelse(!var(6), 1.7, ifelse(var(6) = 1, 1.7, 1.71))

[State 1000]
type = Projectile
triggerall = root,movetype != H
trigger1 = time = 2
projanim = ifelse(!var(13),6060,6065)
Projhitanim = ifelse(!var(13),-1,6350)
projedgebound = 40
projstagebound = 40
Projhitanim = -1
offset = 0, 0
projpriority = 1
projsprpriority = 4
velocity = vel X, vel Y
ProjID = 1201
attr = S, SP
damage= ifelse(!var(13),62,49),ifelse(!var(13),14,7) ; 89 ,8e  s.g 85-7c
;z, 87,8e
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 0,7
sparkno = S8050
guard.sparkno = S8110
sparkxy = 6, 20
hitsound = -1;S1,2
guardsound = -1;S3,0
ground.type = High
ground.slidetime = 10
ground.hittime = 10
air.hittime = 19
guard.ctrltime = 9
ground.velocity = -10
guard.velocity = -10
air.velocity = -4, -5.5
airguard.velocity = -5.7,-1.6
air.juggle = 8
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0)
givepower = 62,31 ;03,
yaccel = .58

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

[State 4110]
type = null;DestroySelf
triggerall = time > 2
trigger1 = FrontEdgeDist <= -45 && !var(1)
;trigger1 = Pos Y <= -10

[State 900, 4]
type = ChangeState
triggerall = time > 2
trigger1 = Pos Y >= 0 && Vel Y > 0
trigger2 = var(13) && FrontEdgeDist <= -45
value = 6306

[State 900, 4]
type = ChangeState
triggerall = time > 2
trigger1 = !root,NumProjID(1201)
value = 6305

;---------------------------------------------------------------------------
;斬空波動拳（飛び道具）（消滅）hit
[Statedef 6305]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8990

[State 300]
type = VarSet
trigger1 = time = 0
var(1) = 0

[State 300]
type = Explod
trigger1 = !var(13)
trigger1 = time = 0
id = 6350
name = "disappear"
pos = 0,0
postype = P1
anim = 6350
scale = const(size.xscale),const(size.yscale)
ownpal = 1
sprpriority = 4
persistent = 0
pausemovetime = 99999999999999

[State -2]
type = Explod
trigger1 = !root,var(13)
trigger1 = (root,projhittime(1200) = [1,4]) || (root,projhittime(1201) = [1,4])
trigger1 = p2movetype = H
trigger1 = !numexplod(8070)
anim = 8070
id = 8070
pos = 0,enemynear,Const(size.head.pos.y)
postype = P2
bindtime = -1
sprpriority = -2
scale = const(size.xscale),const(size.yscale)
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 120]
type = RemoveExplod
trigger1 = FrontEdgeDist <= -50
id = 6350

[State 411]
type = DestroySelf
triggerall = time >= 1
trigger1 = !NumExplod(6350)
trigger2 = FrontEdgeDist <= -50

;---------------------------------------------------------------------------
;斬空波動拳（飛び道具）（消滅）2
[Statedef 6306]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = ifelse(!var(13),6350,8990)

[State 300]
type = VarSet
trigger1 = time = 0
var(1) = 0

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 300]
type = null;Explod
trigger1 = time = 0
id = 6350
name = "disappear"
pos = 0,0
postype = P1
anim = 6350
scale = const(size.xscale),const(size.yscale)
ownpal = 1
sprpriority = 4
pausemovetime = 99999999999999

[State -2]
type = null;Explod
trigger1 = root,projhittime(1201) = [1,4]
trigger1 = !numexplod(8070)
trigger1 = !var(5)
trigger1 = var(5) := 1
anim = 8070
id = 8070
pos = 0,enemynear,Const(size.head.pos.y)
postype = P2
bindtime = -1
sprpriority = -2
scale = const(size.xscale),const(size.yscale)
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 411]
type = DestroySelf
trigger1 = anim = 6350
trigger1 = animtime = 0
trigger2 = anim = 8990
trigger2 = time >= 1

;------------------------------------------------------------------------------------------
;空中竜巻斬空脚
[Statedef 1500]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
poweradd = ifelse(!var(13),125,0)

[State 110]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "tatsumaki1", 0, ifelse(Command = "tatsumaki2", 1, 2))

[State 1000]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = 1+random%2

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 1500, ifelse(var(6) = 1, 1510, 1520))

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),ceil(15*const(size.xscale))

[State 1100]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,0
channel = 0

[State 1100]
type = PlaySnd
trigger1 = var(6) != 2
trigger1 = AnimElem = 3
trigger2 = var(6) = 1
trigger2 = AnimElem = 8
trigger3 = var(6) = 2
trigger3 = AnimElem = 4 || AnimElem = 8 || AnimElem = 12 || AnimElem = 15
value = 0,3
channel = 7

[State 1000, 0]
type = StopSnd
trigger1 = movecontact
trigger1 = hitpausetime
channel = 7
ignorehitpause = 1
persistent = 1

[State 30]
type = VarSet
trigger1 = time = 0
var(5) = ifelse(Vel Y < 0,1,2)

[State 1050]
type = VelAdd
trigger1 = AnimElem = 1
trigger1 = Vel X > 0
x = ifelse(!var(6), 1.19, ifelse(var(6) = 1, 1.99, 2.24))

[State 1050]
type = VelAdd
trigger1 = AnimElem = 1
trigger1 = Vel X < 0
x = ifelse(!var(6), -1.35, ifelse(var(6) = 1, -1.9, -2.8))

[State 1050]
type = VelAdd
trigger1 = AnimElem = 1
trigger1 = Vel X = 0
x = 1.7

[State 1310, 3]
type = VelAdd
trigger1 = Time >= 1
y = ifelse(var(5)=2, .35, .47)

[State 105, 1]
type = statetypeset
trigger1 = !var(6)
trigger1 = AnimElem = 5
trigger2 = var(6) = 1
trigger2 = AnimElem = 9
trigger3 = var(6) = 2
trigger3 = AnimElem = 17
movetype = I

[State 1100]
type = HitDef
trigger1 = !var(6)
trigger1 = AnimElemtime(1) = 1
trigger2 = var(6)
trigger2 = AnimElem = 2
trigger3 = var(6) = 1
trigger3 = AnimElem = 5
trigger4 = var(6) = 2
trigger4 = AnimElem = 6 || AnimElem = 10 || AnimElem = 14
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage= 76-Var(13)*27,14-var(13)*7 ;89
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),11
guard.pausetime = ifelse(!var(13),9,0),10
sparkno = S8050
guard.sparkno = S8110
sparkxy = -2, -63
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -1.2,ifelse(!var(13),-7.5,-6.5)
guard.velocity = -12*const(size.xscale)
air.velocity = -1.2,ifelse(!var(13),-7.5,-6.5)
airguard.velocity = -5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -16.5*const(size.xscale)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -16.5*const(size.xscale)
;envshake.time = 10
;envshake.ampl = 3
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .55
persistent = 1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
;forcestand = 1

[State 1100]
type = HitDef
trigger1 = var(6) != 2
trigger1 = AnimElem = 3
trigger2 = var(6) = 1
trigger2 = AnimElem = 8
trigger3 = var(6) = 2
trigger3 = AnimElem = 4 || AnimElem = 8 || AnimElem = 12 || AnimElem = 15
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage= 76-Var(13)*27,14-var(13)*7
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),11
guard.pausetime = ifelse(!var(13),9,0),10
sparkno = S8050
guard.sparkno = S8110
sparkxy = -2, -63
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = 1.2,ifelse(!var(13),-7.5,-6.5)
guard.velocity = 12*const(size.xscale)
air.velocity = 1.2,ifelse(!var(13),-7.5,-6.5)
airguard.velocity = 5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;envshake.time = 10
;envshake.ampl = 3
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .55
persistent = 1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
;forcestand = 1

[State 1100]
type = ChangeState
trigger1 = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1505

;---------------------------------------------------------------------------
;空中竜巻斬空脚（着地）
[Statedef 1505]
type    = S
physics = S
ctrl = 0
anim = 1530
velset = 0,0

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

[State 52]
type = PlaySnd
trigger1 = Time = 0
value = 4, 0
channel = 20

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

;------------------------------------------------------------------------------------------
;空中竜巻斬空脚(真)
[Statedef 1510]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
poweradd = ifelse(!var(13),125,0)

[State 110]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "tatsumaki1", 0, ifelse(Command = "tatsumaki2", 1, 2))

[State 1000]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = 1+random%2

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 1550, ifelse(var(6) = 1, 1560, 1570))

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),ceil(15*const(size.xscale))

[State 1100]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,0
channel = 0

[State 1100]
type = PlaySnd
trigger1 = var(6) != 1
trigger1 = AnimElem = 3
trigger2 = var(6) = 1
trigger2 = AnimElem = 4
trigger3 = var(6)
trigger3 = AnimElem = 7
trigger4 = var(6) = 2
trigger4 = AnimElem = 11 || AnimElem = 15
value = 0,3
channel = 7

[State 1000, 0]
type = StopSnd
trigger1 = movecontact
trigger1 = hitpausetime
channel = 7
ignorehitpause = 1
persistent = 1

[State 30]
type = VarSet
trigger1 = time = 0
var(5) = ifelse(Vel Y < 0,1,2)

[State 1050]
type = VelAdd
trigger1 = AnimElem = 1
trigger1 = Vel X > 0
x = ifelse(!var(6), 1.19, ifelse(var(6) = 1, 1.99, 2.24))

[State 1050]
type = VelAdd
trigger1 = AnimElem = 1
trigger1 = Vel X < 0
x = ifelse(!var(6), -1.35, ifelse(var(6) = 1, -1.9, -2.8))

[State 1050]
type = VelAdd
trigger1 = AnimElem = 1
trigger1 = Vel X = 0
x = 1.7

[State 1310, 3]
type = VelAdd
trigger1 = Time >= 1
y = ifelse(var(5)=2, .35, .47)

[State 105, 1]
type = statetypeset
trigger1 = !var(6)
trigger1 = AnimElem = 6
trigger2 = var(6) = 1
trigger2 = AnimElem = 10
trigger3 = var(6) = 2
trigger3 = AnimElem = 18
movetype = I

[State 1100]
type = HitDef
trigger1 = !var(6)
trigger1 = AnimElemtime(1) = 1
trigger2 = var(6)
trigger2 = AnimElem = 2
trigger3 = var(6) = 1
trigger3 = AnimElem = 6
trigger4 = var(6) = 2
trigger4 = AnimElem = 5 || AnimElem = 9 || AnimElem = 13
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage= 76-Var(13)*27,14-var(13)*7 ;89
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),11
guard.pausetime = ifelse(!var(13),9,0),10
sparkno = S8050
guard.sparkno = S8110
sparkxy = -2, -63
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -1.2,ifelse(!var(13),-7.5,-6.5)
guard.velocity = -12*const(size.xscale)
air.velocity = -1.2,ifelse(!var(13),-7.5,-6.5)
airguard.velocity = -5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -16.5*const(size.xscale)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -16.5*const(size.xscale)
;envshake.time = 10
;envshake.ampl = 3
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .55
persistent = 1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
;forcestand = 1

[State 1100]
type = HitDef
trigger1 = var(6) != 1
trigger1 = AnimElem = 3
trigger2 = var(6) = 1
trigger2 = AnimElem = 4
trigger3 = var(6)
trigger3 = AnimElem = 7
trigger4 = var(6) = 2
trigger4 = AnimElem = 11 || AnimElem = 15
attr = A, SA
animtype  = Heavy
air.animtype  = Back
damage= 76-Var(13)*27,14-var(13)*7
priority  = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ifelse(!var(13),10,0),11
guard.pausetime = ifelse(!var(13),9,0),10
sparkno = S8050
guard.sparkno = S8110
sparkxy = -2, -63
hitsound   = S2,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = 1.2,ifelse(!var(13),-7.5,-6.5)
guard.velocity = 12*const(size.xscale)
air.velocity = 1.2,ifelse(!var(13),-7.5,-6.5)
airguard.velocity = 5.7,-1.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;envshake.time = 10
;envshake.ampl = 3
nochainID = var(8)
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .55
persistent = 1
getpower = ifelse(!var(13),42,0),ifelse(!var(13),21,0) ;02,01
givepower = 62,31 ;03,
;forcestand = 1

[State 1100]
type = ChangeState
trigger1 = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1515

;---------------------------------------------------------------------------
;空中竜巻斬空脚（着地）
[Statedef 1515]
type    = S
physics = S
ctrl = 0
anim = 1575
velset = 0,0

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

[State 52]
type = PlaySnd
trigger1 = Time = 0
value = 4, 0
channel = 20

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

;---------------------------------------------------------------------------
;阿修羅旋空
[Statedef 1600]
type    = S
movetype= A
physics = N
anim = 1600
ctrl = 0
velset = 0,0
poweradd = ifelse(!var(13),42,0)

[State 1100]
type = VarSet
triggerall = !var(59)
trigger1 = time = 0
var(6) = ifelse(Command = "ashura_P_F", 0, ifelse(Command = "ashura_P_B", 1, ifelse(Command = "ashura_K_F", 2, 3)))

[State 1100]
type = null;VarSet
triggerall = var(59)
trigger1 = time = 0
var(6) = 1+2*random%2

[State 1100]
type = VarSet
triggerall = var(59)
trigger1 = time = 0
var(6) = 3

[State 1100]
type = VelAdd
trigger1 = time = [1,3]
trigger2 = time = [12,14]
x = 1.6

[State 1100]
type = VelAdd
trigger1 = time = [4,11]
x = -1.2

[State 1020]
type = AfterImage
trigger1 = !var(13)
trigger1 = Time = 1
time = 999
palpostbright= 0,0,0
PalBright   =  1,1,1 
PalContrast =  188, 240, 240
PalAdd      = 0,0,0
PalMul      = .75,.75,.75
;Trans = Add
;TimeGap  = 2
FrameGap = ifelse((var(6)=[0,1]), 4, 5)
length = ifelse((var(6)=[0,1]), 15, 19)

[State 300]
type = PlaySnd
trigger1 = time = 2
value = 100,1
channel = 0

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

[State 120]
type = ChangeState
Trigger1 = animtime = 0
value = 1602

;---------------------------------------------------------------------------
;阿修羅旋空(AI,fwd)
[Statedef 1601]
type    = S
movetype= A
physics = N
anim = 1600
ctrl = 0
velset = 0,0
poweradd = ifelse(!var(13),42,0)

[State 1100]
type = VarSet
triggerall = var(59)
trigger1 = time = 0
var(6) = 2

[State 1100]
type = VarSet
triggerall = var(59)
triggerall = time = 0
trigger1 = p2bodydist X = [180,239]
trigger1 = enemynear,animtime <= -40
	trigger1 = random <= 700
trigger2 = p2bodydist X = [175,210]
	trigger2 = random <= 180
trigger3 = p2bodydist X >= 165
trigger3 = !numproj
trigger3 = P2StateType = A
	trigger3 = random <= 350
trigger4 = p2bodydist X = [135,170]
trigger4 = !numproj
trigger4 = enemynear,ctrl = 0
	trigger4 = random >= 800
trigger5 = (var(45) = [1200,1400])
trigger5 = var(42) = [1,12]
trigger5 = P2bodydist X = [175,239]
	trigger5 = random <= 450
var(6) = 0

[State 1100]
type = VarSet
triggerall = var(59)
triggerall = !var(12)
trigger1 = time = 0
trigger1 = enemynear,BackEdgebodyDist > 40
trigger1 = random <= 350
var(6) = 0

[State 1100]
type = VelAdd
trigger1 = time = [1,3]
trigger2 = time = [12,14]
x = 1.6

[State 1100]
type = VelAdd
trigger1 = time = [4,11]
x = -1.2

[State 1020]
type = AfterImage
trigger1 = !var(13)
trigger1 = Time = 1
time = 999
palpostbright= 0,0,0
PalBright   =  1,1,1 
PalContrast =  188, 240, 240
PalAdd      = 0,0,0
PalMul      = .75,.75,.75
;Trans = Add
;TimeGap  = 2
FrameGap = ifelse((var(6)=[0,1]), 4, 5)
length = ifelse((var(6)=[0,1]), 15, 19)

[State 300]
type = PlaySnd
trigger1 = time = 2
value = 100,1
channel = 0

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

[State 120]
type = ChangeState
Trigger1 = animtime = 0
value = 1602

;---------------------------------------------------------------------------
;阿修羅閃空（移動）
[Statedef 1602]
type = S
movetype = I
physics = N
anim = 1602
ctrl = 0
juggle = 0

;9b,aa,b2,3b(24) 132 ;9.55,-0.34
;1e,29,34,4a,6c(36) 276

[State 130]
type = VelSet
trigger1 = Time = 0
x = ifelse(!var(6), 13.6, ifelse(var(6) = 1, -13.6, ifelse(var(6) = 2, 9.55, -9.55)))
y = 0

[State 130]
type = VelAdd
trigger1 = Var(6) = [2,3]
trigger1 = AnimElemTime(1) > 0
x = ifelse(Vel X > 0, -.34, .34)

[State 130]
type = VelAdd
trigger1 = Var(6) = [0,1]
trigger1 = AnimElemTime(1) > 0
x = ifelse(Vel X > 0, -.32, .32)

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

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

[State 130]
type = PlayerPush
trigger1 = 1
value = 0

[State 130]
type = Turn
trigger1 = !var(13)
trigger1 = P2Dist X < -5

[State 120]
type = ChangeState
Trigger1 = (Time = 32 && var(6) = [0,1]) || (Time = 22 && var(6) = [2,3])
Trigger2 = frontedgedist <= 1 && animelemtime(1) > 1
Trigger3 = backedgedist <= 1 && animelemtime(1) > 1
value = 1605

;---------------------------------------------------------------------------
;阿修羅閃空（停止）
[Statedef 1605]
type = S
movetype = A
physics = S
anim = 1605
juggle = 0
velset = 0,0
ctrl = 0

[State 1020]
type = AfterImage
trigger1 = !var(13)
trigger1 = Time = 0
time = 0
;PalBright   =  30, 30,  0
;PalContrast =  70, 70, 20
;PalAdd      = -10,-10,-10
;PalMul      = .85,.85,.50
;Trans = Add
;TimeGap  = 3
FrameGap = 3
length = 11

[State 120]
type = ChangeState
Trigger1 = var(12)
Trigger1 = time = 1
Trigger2 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;百鬼襲
[Statedef 1700]
type = A
physics = S
movetype = A
anim = 1700
ctrl = 0
velset = 0,0
poweradd = ifelse(!var(13),70,0) ;01

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 1201]
type = null;screenbound
trigger1 =  P2Dist Y >= 40
value = 1
movecamera = 1,0 

[State 220]
type = PosSet
trigger1 = time = 0
y = 0

[State 1100]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "hyakki1", 0, ifelse(Command = "hyakki2", 1, 2))

[State 1100]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = 2

[State 1100]
type = StateTypeSet
trigger1 = AnimElem = 2
StateType = A
physics = N

[State 1300]
type = Velset
trigger1 = animelem = 1
x = ifelse(!var(6), 2.55, ifelse(var(6) = 1, 4.3, 6.2))
y = -9

[State 1100]
type = PosAdd
trigger1 = animelem = 5
y = -40
persistent = 0

[State 1100]
type = Veladd
trigger1 = animelemtime(2) > 0
y = .58;.55

[State 1100]
type = VarSet
trigger1 = 1
var(5) = animelemno(0) - 5

[State 1400, 8]
type = ChangeState
triggerall = !var(59)
triggerall = !var(13)
triggerall = Time > 14
triggerall = p2bodydist X < 10
triggerall = (Command = "x" || Command = "y" || Command = "z")
trigger1 = p2bodydist Y < 75 || p2bodydist Y < -1*enemynear,Const(size.head.pos.y)
trigger1 = P2StateType != A
trigger2 = (p2bodydist Y = [56,115]) || (p2bodydist Y = [enemynear,Const(size.head.pos.y)-15,enemynear,Const(size.head.pos.y)+15])
trigger2 = P2StateType = A
value = 1715

[State 1400, 8]
type = ChangeState
triggerall = !var(59)
triggerall = !var(13)
triggerall = Time > 14
triggerall = p2bodydist X < 10
triggerall = (Command = "a" || Command = "b" || Command = "c")
trigger1 = p2bodydist Y < 45 || p2bodydist Y < -1*enemynear,Const(size.mid.pos.y)
trigger1 = P2StateType != A
trigger2 = (p2bodydist Y = [-40,55]) || (p2bodydist Y = [enemynear,Const(size.mid.pos.y)-15,enemynear,Const(size.mid.pos.y)+15])
trigger2 = P2StateType = A
value = 1716

[State 1400, 8]
type = ChangeState
triggerall = var(59)
triggerall = !var(13)
triggerall = Time > 14
triggerall = p2bodydist Y < 75 || p2bodydist Y < -1*enemynear,Const(size.head.pos.y)
trigger1 = p2bodydist X < 14
value = 1715

[State 1400, 8]
type = ChangeState
triggerall = var(59)
triggerall = !var(13)
triggerall = Time > 14
triggerall = p2bodydist X < 10
trigger1 = p2bodydist Y < 45 || p2bodydist Y < -1*enemynear,Const(size.mid.pos.y)
trigger1 = P2StateType != A
trigger2 = (p2bodydist Y = [-25,50]) || p2bodydist Y < -1*enemynear,Const(size.mid.pos.y)
trigger2 = P2StateType = A
value = 1716

[State 1300]
type = changestate
trigger1 = time > 14 && (command = "x" || command = "y" || command = "z")
value = 1705

[State 1300]
type = changestate
trigger1 = time > 14 && (command = "a" || command = "b" || command = "c")
value = 1710

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

;---------------------------------------------------------------------------
;百鬼豪斬
[Statedef 1701]
type = C
movetype = A
physics = N
juggle = 8
anim = 1701+Var(6)
ctrl = 0

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 1301]
type = playsnd
trigger1 = animelem = 1
value = 4,40+(roundstate = 3)*5

[State 220]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 220]
type = VelSet
trigger1 = Time = 0
y = 0

[State 220]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 220]
type = VelMul
trigger1 = 1
x = 0.88

[State 440, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, SA
hitflag = MAF
guardflag = L
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = 70 ;87 ,8e
pausetime = ifelse(!var(13),9,0),9
sparkno = S8050
guard.sparkno = S8110
sparkxy = -20, -9
hitsound = S2,1
guardsound = S3, 1
ground.type = Trip
air.type = High
ground.slidetime = 14
ground.hittime  = 14
guard.ctrltime = 14
ground.velocity = -4.5,-6.5
guard.velocity = -10*const(size.xscale)
air.velocity = -4.5,-6.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -14*const(size.xscale)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0) ;05 ,03
givepower = 62,31 ;03,
persistent = 0
nochainID = var(8)
yaccel = .55
fall = 1
air.fall = 1
fall.recover = 0
air.recover = 0

[State -2]
type = Explod
trigger1 = var(3) = 1
anim = 8070
id = 1701
pos = 0,enemynear,Const(size.head.pos.y)
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -2
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 130]
type = statetypeset
trigger1 = animelemtime(3) >= 0
movetype = I

[State 1305]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;百鬼豪砕(投げモーション)
[Statedef 1715]
type = A
movetype = A
physics = N
juggle = 8
anim = 1715 + var(5)
ctrl = 0

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 1100]
type = Veladd
trigger1 = 1
y = .58

[State 1301]
type = hitdef
triggerall = P2MoveType != H
triggerall = P2StateNo != [150,155]
trigger1 = AnimElem = 1
attr = A,ST
hitflag = MA-
priority = 4, Miss
sparkno = -1
sprpriority = 1
guard.dist = 0
fall = 1
air.fall = 1
fall.recover = 0
air.recover = 0
numhits = 0
p1facing = 1
p2facing = 1
p1stateno = 1720
p2stateno = 1727

[State 1305]
type = changestate
trigger1 = animtime = 0
value = 1705

;---------------------------------------------------------------------------
;百鬼豪砕(投げモーション)
[Statedef 1716]
type = A
movetype = A
physics = N
juggle = 8
anim = 1715 + var(5)
ctrl = 0

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 1100]
type = Veladd
trigger1 = 1
y = .58

[State 1301]
type = hitdef
triggerall = P2MoveType != H
triggerall = P2StateNo != [150,155]
trigger1 = AnimElem = 1
attr = A,ST
hitflag = MA-
priority = 4, Miss
sparkno = -1
sprpriority = 1
guard.dist = 0
fall = 1
air.fall = 1
fall.recover = 0
air.recover = 0
numhits = 0
p1facing = 1
p2facing = 1
p1stateno = 1730
p2stateno = 1737

[State 1305]
type = changestate
trigger1 = animtime = 0
value = 1710

;---------------------------------------------------------------------------
;百鬼豪衝
[Statedef 1705]
type = A
movetype = A
physics = N
juggle = 8
anim = 1705
ctrl = 0

[State 1303]
type = gravity
trigger1 = 1

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 1301]
type = playsnd
trigger1 = animelemtime(2) = 0
value = 100,3
channel = 0

[State -2]
type = Explod
trigger1 = var(3) = 1
anim = 8070
id = 8070
pos = 0,enemynear,Const(size.head.pos.y)
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -2
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 620, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = A, SA
hitflag = MAF
guardflag = MA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = 77 ;86,8e
pausetime = ifelse(!var(13),9,0),10
guard.pausetime = ifelse(!var(13),10,0),11
sparkno = S8050
guard.sparkno = S8110
sparkxy = -10, -38
hitsound = S1, 2
guardsound = S3, 1
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
guard.ctrltime = 17
ground.velocity = -4.5,-6.5 ;-1.5,10 ;-4,-5.5;
guard.velocity = -11*const(size.xscale)
air.velocity =  -4.5,-6.5 ;-7,8 ;-4,-5.5;
airguard.velocity = -5.8,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -12*const(size.xscale)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,
persistent = 0
fall = 1
air.fall = 1
fall.recover = 0
air.recover = 0
yaccel = .55

[State 1100]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1706

;---------------------------------------------------------------------------
;百鬼豪衝（着地）
[Statedef 1706]
type    = C
physics = C
ctrl = 0
anim = 1706
velset = 0,0

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

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

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

;---------------------------------------------------------------------------
;百鬼豪尖
[Statedef 1710]
type = A
movetype = A
physics = N
juggle = 8
anim = 1710
ctrl = 0

[State 1303]
type = gravity
trigger1 = 1

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 1303]
type = playsnd
trigger1 = animelem = 3
value = 100,2
channel = 0

[State -2]
type = Explod
trigger1 = var(3) = 1
anim = 8070
id = 8070
pos = 0,enemynear,Const(size.head.pos.y)
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -2
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 620, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, SA
hitflag = MAF
guardflag = MA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = 84,8 ;85 ,8e
pausetime = ifelse(!var(13),9,0),9
sparkno = S8050
guard.sparkno = S8110
sparkxy = -10, -43
hitsound = S2, 3
guardsound = S3, 1
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -4.5,-6.5;-1.5,10
guard.velocity = -11*const(size.xscale)
air.velocity =  -4.5,-6.5;-7,10
airguard.velocity = -5.8,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -12*const(size.xscale)
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(!var(13),104,0),ifelse(!var(13),42,0); z,01+05,01+02
givepower = 62,31 ;03,
nochainID = var(8)
persistent = 0
fall = 1
air.fall = 1
fall.recover = 0
air.recover = 0
yaccel = .55

[State 1303]
type = changestate
trigger1 = pos y >= 8 && vel y > 0
value = 1711

;---------------------------------------------------------------------------
;百鬼豪尖（着地）
[Statedef 1711]
type = C
movetype = I
anim = 1711
physics = C
ctrl = 0

[State 1304]
type = posset
trigger1 = Time = 0
y = 0

[State 220]
type = VelSet
trigger1 = Time = 0
y = 0

[State 220]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 220]
type = VelMul
trigger1 = 1
x = 0.92

[State 1000]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 1301]
type = playsnd
trigger1 = animelem = 1
value = 4,40+(roundstate = 3)*5

[State 1304]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;百鬼豪砕
[Statedef 1720]
type    = A
movetype = A
physics = N
velset = 0,0
poweradd = 56 ;08

[State 3001]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 901]
type = TargetState
trigger1 = Time = 0
value = 1725

[State 820]
type = ChangeAnim
trigger1 = Time = 0
value = 1720
persistent = 0

[State 1735]
type = PosFreeze
trigger1 = AnimElemTime(2) < 1

;75,b9(25)
;5b,74(8) 81

[State 1100]
type = VelSet
trigger1 = AnimElemTime(2) = 1
x = 2.267
y = -5.2

[State 1100]
type = Veladd
trigger1 = AnimElemTime(2) > 1
y = .58

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

[State 901,1]
type = BindToTarget
trigger1 = AnimElem = 1
pos = ceil(5*const(size.xscale)),ceil(35*const(size.yscale)),Head
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElem = 2
pos = ceil(-14*const(size.xscale)), ceil(-40*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElem = 3
pos = ceil(-43*const(size.xscale)), ceil(-56*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = AnimElem = 4
pos = ceil(26*const(size.xscale)), ceil(-80*const(size.yscale))
postype = P1
time = -1

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

;---------------------------------------------------------------------------
;百鬼豪砕（叩きつけ）
[Statedef 1721]
type    = S
movetype = A
physics = N
velset = 0,0
anim = 1721

[State 901]
type = TargetState
trigger1 = Time = 0
value = 1726

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

[State 1000]
type = Explod
trigger1 = AnimElem = 2
Anim = 8020
pos = 21, -44
postype = p1
ownpal = 1
sprpriority = 5
;pausemovetime = -1
supermovetime = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 1
pos = ceil(32*const(size.xscale)),ceil(-54*const(size.xscale))
postype = P1
time = 20

[State 901,1]
type = targetBind
trigger1 = animelem = 2
pos = ceil(32*const(size.xscale)),ceil(-38*const(size.xscale))
postype = P1
time = 14

[State 620]
type = PlaySnd
trigger1 = animelem = 2
value = 4,15

[State 620]
type = PlaySnd
trigger1 = animelem = 2
value = 100,2

[State 901]
type = TargetLifeAdd
trigger1 = AnimElem = 2
value = -153

[State 901]
type = TargetPowerAdd
trigger1 = AnimElem = 2
value = 62

[State 903]
type = EnvShake
trigger1 = AnimElem = 2
time = 12
ampl = 5

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

;---------------------------------------------------------------------------
;百鬼豪砕（相手）
[Statedef 1725]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = -1

[State 1201]
type = screenbound
trigger1 = 1
value = 1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 1725

[State 3001]
type = sprpriority
trigger1 = AnimElem = 4
value = 2

;---------------------------------------------------------------------------
;百鬼豪砕（相手）2
[Statedef 1726]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = 2

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 1726

[State 903]
type = VelSet
trigger1 = AnimElemTime(3) = 1
x = -4.2
y = -6

[State 903]
type = veladd
trigger1 = AnimElemTime(3) >= 2
y = .505

[State 903]
type = null;EnvShake
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 10

[State 903, 2]
type = SelfState
trigger1 = time >= 25 ;AnimElemTime(2) > 30
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100


;---------------------------------------------------------------------------
;百鬼豪砕（相手）3
[Statedef 1727]
type    = S
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 1205]
type = selfstate
trigger1 = Time > 7
value = 5100

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

;---------------------------------------------------------------------------
;百鬼豪墜
[Statedef 1730]
type    = A
movetype = A
physics = N
velset = 0,0
poweradd = 56 ;08

[State 3001]
type = Width
trigger1 = 1
edge = ceil(25*const(size.xscale)),0

[State 901]
type = TargetState
trigger1 = Time = 0
value = 1735

[State 820]
type = ChangeAnim
trigger1 = Time = 0
value = 1730
persistent = 0

[State 1735]
type = null;pause
trigger1 = time = 0
time = 50

;86,97,0d 97 85,34  8d,49
;51,30,ce(44) 169

;
;ce,28(18)

[State 1100]
type = PosSet
trigger1 = AnimElem = 2
trigger1 = Pos y >= -50
y = -2

[State 1100]
type = PosAdd
trigger1 = AnimElem = 2
x = 14

[State 1100]
type = VelSet
trigger1 = AnimElemTime(2) = 1
x = 2.21 ;6.664
y = ifelse(Pos y <= -50, -4,-7.5)

[State 1100]
type = VelMul
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(18) < 0
y = .91

[State 1100]
type = VelMul
trigger1 = AnimElemTime(7) >= 1 && AnimElemTime(18) < 0
x = .9

[State 1100]
type = VelSet
trigger1 = AnimElem = 18
x = 0
y = 0

[State 1100]
type = Veladd
trigger1 = AnimElemTime(18) >= 1
y = 1 ;.93

[State 620]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,1
channel = 0

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

[State 901,1]
type = BindToTarget
trigger1 = AnimElem = 1
pos = ceil(35*const(size.xscale)),ceil(15*const(size.yscale)),Mid
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 2
pos = ceil(-28*const(size.xscale)),ceil(-49*const(size.yscale))
postype = P1
time = -1

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

[State 901,1]
type = targetBind
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 11
trigger4 = animelem = 15
trigger5 = animelem = 17
pos = 0,ceil(-45*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 4
trigger2 = animelem = 8
trigger3 = animelem = 12
trigger4 = animelem = 16
trigger5 = animelem = 18
pos = ceil(5*const(size.xscale)),ceil(-24*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 5
trigger2 = animelem = 9
trigger3 = animelem = 13
pos = ceil(-9*const(size.xscale)),ceil(-24*const(size.yscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 6
trigger2 = animelem = 10
trigger3 = animelem = 14
pos = ceil(-10*const(size.xscale)),ceil(-40*const(size.yscale))
postype = P1
time = -1

[State 1100]
type = ChangeState
trigger1 = Pos Y >= -25 && Vel Y > 0
value = 1731

;---------------------------------------------------------------------------
;百鬼豪墜（叩きつけ）
[Statedef 1731]
type    = S
movetype = A
physics = S
velset = 0,0
anim = 1731

[State 901]
type = TargetState
trigger1 = Time = 0
value = 1736

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

[State -2]
type = null;helper
trigger1 = time = 0
helpertype = normal
name = "test"
stateno = 0
ID = 10010
pos = 0,0
postype = P1
keyctrl = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 1000]
type = Explod
trigger1 = time = 1
Anim = 6710
id = 6710
pos = 0,0
postype = p1
bindtime = 1
ownpal = 1
sprpriority = 4

[State 1000]
type = Explod
trigger1 = time = 2
Anim = 6715
id = 6715
pos = 0,0
postype = p1
bindtime = 1
ownpal = 1
sprpriority = -4

[State 901,1]
type = targetBind
trigger1 = animelem = 1
pos = ceil(13*const(size.xscale)),ceil(-7*const(size.xscale))
postype = P1
time = -1

[State 901,1]
type = targetBind
trigger1 = animelem = 2
pos = ceil(40*const(size.xscale)),ceil(-12*const(size.xscale))
postype = P1
time = 1

[State 620]
type = PlaySnd
trigger1 = animelem = 1
value = 4,15

[State 620]
type = PlaySnd
trigger1 = animelem = 1
value = 100,3
channel = 0

[State 901]
type = TargetLifeAdd
trigger1 = AnimElem = 2
value = -153 ;7a

[State 901]
type = TargetPowerAdd
trigger1 = AnimElem = 2
value = 42 ;02

[State 903]
type = EnvShake
trigger1 = AnimElem = 1
time = 10
freq = 80
ampl = 5

;30,c2(33) 122
;28,76(16) 83.46

[State 1100]
type = StateTypeSet
trigger1 = AnimElem = 4
StateType = A
physics = N

[State 903]
type = VelSet
trigger1 = AnimElemTime(4) = 1
x = -3.69
y = -10

[State 903]
type = veladd
trigger1 = AnimElemTime(4) >= 2
y = .64

[State 901]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
value = 1732
ctrl = 1

;---------------------------------------------------------------------------
;百鬼豪墜（着地）
[Statedef 1732]
type    = S
movetype = I
physics = S
velset = 0,0
anim = 0

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

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

[State 901]
type = ChangeState
trigger1 = time = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;百鬼豪墜（相手）
[Statedef 1735]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = -1

[State 1201]
type = screenbound
trigger1 = 1
value = 1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 1735

;---------------------------------------------------------------------------
;百鬼豪墜（相手）2
[Statedef 1736]
type    = A
movetype = H
physics = N
velset = 0,0
sprpriority = -1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 1736

;15,A1(30)
;28,75(16) 82.4

[State 903]
type = VelSet
trigger1 = AnimElemTime(2) = 1
x = -3.89
y = -10.2

[State 903]
type = veladd
trigger1 = AnimElemTime(2) >= 2
y = .66

[State 903]
type = null;EnvShake
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 10

[State 903, 2]
type = SelfState
trigger1 = AnimElemTime(2) > 7
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
value = 5100

;---------------------------------------------------------------------------
;百鬼豪墜（相手）3
[Statedef 1737]
type    = S
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 1205]
type = selfstate
trigger1 = Time > 7
value = 5100

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


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;target state
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 2000]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 5035, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 5030

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

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

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

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 2001]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 5050

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

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

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

;---------------------------------------------------------------------------
; HITA_SHAKE ;zero counter
[Statedef 2010]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -2

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

[State 5035, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 610

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

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

;---------------------------------------------------------------------------
; HITA_UP (initial going up) zero counter
[Statedef 2011]
type    = A
movetype= H
physics = N
ctrl = 0
sprpriority = -2

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

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

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

[State 5050, 6]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
value = 5100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 2001]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 5050

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

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

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


;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 2050]
type    = A
movetype = H
physics = N

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

[State 5040, 1]
type = SelfState
trigger1 = time = 1
value = 5040

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;滅殺豪波動
[Statedef 3000]
type    = S
movetype = A
physics = S
juggle = 0
ctrl = 0
anim = 3000 + var(12)
velset = 0,0

[State 110]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse((Command = "m_hadou2" && Power >= 2000) || (Command = "m_hadou3" && (Power >= 2000 && Power < 3000)), 1, ifelse(Command = "m_hadou3" && Power >= 3000, 2, 0))

[State 110]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = random%3

[State 110]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
trigger1 = numtarget
var(6) = ifelse((target,life>=370),2,ifelse((target,life>=270),1,0))

[State 110]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
trigger1 = !numtarget
trigger2 = var(45) = 450
trigger3 = (var(12) && enemynear,GetHitVar(hittime) <= 7 && (P2bodydist X >= 75))
var(6) = 0

[State 110]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = ifelse((var(6)=1 && Power >= 2000) || (var(6)=2 && (Power >= 2000 && Power < 3000)), 1, ifelse(var(6)=2 && Power >= 3000, 2, 0))

[State 902, 1]
type = null;ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 3020, ifelse(var(6) = 1, 3030, 3040))

[State 1000]
type = Width
trigger1 = 1
edge = ceil(50*const(size.xscale)), 0

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

[State 110]
type = PlaySnd
trigger1 = time = 4
value = 210,0

[State 1000]
type = PlaySnd
trigger1 = time = 7
value = 100, 5
channel = 0

;3,38,47

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA,AA,AP
time = ifelse(!var(12),39,50)

[State 3000]
type = SuperPause
trigger1 = Time = 3
time = ifelse(!var(6),35,34)
movetime = ifelse(!var(6),35,34)
anim = -1
sound = -1
pos = 0,0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State -2]
type = pause
triggerall = time = ifelse(!var(6),38,37)
trigger1 = P2MoveType = H
trigger2 = P2stateno = [120,155]
trigger2 = P2StateType != A
time = 1
movetime = 1
pausebg = 0

[State -2]
type = pause
triggerall = time = ifelse(!var(6),38,37)
trigger1 = P2MoveType != H || (P2stateno != [120,155])
trigger2 = P2stateno = [120,155]
trigger2 = P2StateType = A
time = ifelse(!var(6),8,7)
movetime = ifelse(!var(6),8,7)
pausebg = 0

[State 300]
type = Helper
trigger1 = Time = 5
id = 8002
name = "Super"
pos = 0,0
postype = P1
stateno = 8002
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
persistent = 0

[State 860, 4]
type = PowerAdd
trigger1 = time = 0
value = ifelse(!var(6), -1000, ifelse(var(6) = 1, -2000, -3000))

[State 200]
type = AfterImage
trigger1 = time = 2
time = 60
trans = none
length = 15
framegap = 4
palcolor = 0
;palinvertall = 0
palbright = 1,1,1
palpostbright = 1,1,120
palcontrast = 104,172,142
PalAdd = -16,-16,1
PalMul = 1, 1, .85

[State 1000]
type = PlaySnd
trigger1 = AnimElem = 17
value = 150,0

[State 1000]
type = PlaySnd
trigger1 = AnimElem = 16
value = 100, 1
channel = 0

[State -3]
type = Helper
trigger1 = AnimElem = 17
id = 6500
name = "s_hadouken"
pos = ceil(93*const(size.xscale)),ceil(-56*const(size.yscale))
postype = P1
stateno = 6500
helpertype = normal
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause = 1
persistent = 0

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

;---------------------------------------------------------------------------
;滅殺豪波動（飛び道具）
[Statedef 6500]
type    = S
movetype = A
physics = N
ctrl = 0
anim = 6500
velset = 0,0
sprpriority = 4

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(6) = parent,var(6)

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(12) = parent,var(12)

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(10) = parent,var(10)

[State 1000, 3]
type = AttackMulSet
trigger1 = var(10) = 1
value = 1.0981

[State 1000, 3]
type = AttackMulSet
trigger1 = var(12) && !var(10)
value = 1.144

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(2) = 1

[State 300]
type = varadd
trigger1 = root,ProjContacttime(1500) = 2
ignorehitpause = 1
Persistent = 1
var(2) = 1

;35,A7(18) 5.28
;50,98 3.33

[State 1100]
type = VelSet
trigger1 = time = 1
x = ifelse(!var(12), 3.33, 5.28)

[State 100]
type = Projectile
triggerall = var(6) != 2
trigger1 = time = 1
projanim = 6550
Projhitanim = -1
Projremanim = -1
projcancelanim = -1
offset = 0, 0
projpriority = 1
projsprpriority = 4
projmisstime = 0
projhits = 4+var(6)*2
ProjID = 1500
projstagebound = 48
projedgebound = 48
velocity = vel X, vel Y
attr = S, SP
damage = ifelse(!Var(6),62,ifelse(Var(6)=1,62,61)),10
;z, 84-75-67(270) 85-7e-76-71-6d-5a(374) 7c-71-69-62-5b-57-4f-4A(486)
;71-62 5e 64
animtype = Heavy
hitflag = MAF
guardflag = M
pausetime = 3,6
sparkno = -1
guard.sparkno = -1;S7600
sparkxy = 0, 0
hitsound = -1;S1,2
guardsound = -1;S3,0
ground.type = High
ground.slidetime = 16
ground.hittime = 16
air.hittime = 19
guard.ctrltime = 15
ground.velocity = -1.08 ,-7.54 ;-4, -5.5
guard.velocity = -11
air.velocity = -1.08 ,-7.54 ;-4, -5.5
airguard.velocity = -5.7,-1
air.juggle = 8
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
getpower = 0,0
givepower = 62,31 ;03,
forcestand = 1
yaccel = .58
nochainID = root,var(8)
Persistent = 0

[State 100]
type = Projectile
triggerall = var(6) = 2
trigger1 = time = 1
projanim = 6550
Projhitanim = -1
Projremanim = -1
projcancelanim = -1
offset = 0, 0
projpriority = 1
projsprpriority = 4
projmisstime = 0
projhits = 4+var(6)*2
ProjID = 1500
projstagebound = 48
projedgebound = 48
velocity = vel X, vel Y
attr = S, SP
damage = ifelse(!Var(6),65,ifelse(Var(6)=1,62,61)),10
;z, 84-75-67(270) 85-7e-76-71-6d-5a(374) 7c-71-69-62-5b-57-4f-4A(486)
;71-62 5e 64
animtype = Heavy
hitflag = MAF
guardflag = M
pausetime = 3,6
sparkno = -1
guard.sparkno = -1;S7600
sparkxy = 0, 0
hitsound = -1;S1,2
guardsound = -1;S3,0
ground.type = High
ground.slidetime = 16
ground.hittime = 16
air.hittime = 19
guard.ctrltime = 15
ground.velocity = -1.08 ,-7.54 ;-4, -5.5
guard.velocity = -11
air.velocity = -1.08 ,-7.54 ;-4, -5.5
airguard.velocity = -5.7,-1
air.juggle = 8
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
getpower = 0,0
givepower = 62,31 ;03,
forcestand = 1
palfx.color = 0
palfx.add = 100,-20,-134
palfx.sinadd = 20,0,0,3
palfx.time = 42 ;ifelse(p2statetype = A ,45,36)
yaccel = .58
nochainID = root,var(8)
Persistent = 0

[State 300]
type = Explod
trigger1 = root,projContacttime(1500) = 1
id = 1100
name = "projhit_s"
pos = P2bodydist X+8 ,10
postype = P1
anim = ifelse((root,projhittime(1500) = 1),8060,8120)
random = 5,20
scale = const(size.xscale),const(size.yscale)
ownpal = 1
ontop = 1
ignorehitpause = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 300]
type = VarSet
trigger1 = var(1) = 5
ignorehitpause = 1
var(1) = 0

[State 300]
type = VarSet
trigger1 = root,ProjContacttime(1500) = 1
ignorehitpause = 1
var(1) = 1

[State 300]
type = VarAdd
trigger1 = var(1)
ignorehitpause = 1
var(1) = 1

[State 4110]
type = PosFreeze
triggerall = time > 1
trigger1 = var(1)
trigger2 = root,ProjContact1500 = 1
trigger2 = P2dist X < -8
value = 1
ignorehitpause = 1

[State 4110]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -50 && !var(1)

[State 900, 4]
type = ChangeState
triggerall = time > 1
trigger1 = !root,NumProjID(1500)
value = 6505

;---------------------------------------------------------------------------
;滅殺豪波動（飛び道具）（消滅）
[Statedef 6505]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8990

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 300]
type = Explod
trigger1 = time = 0
id = 6250
name = "disappear"
pos = 0,0
postype = P1
anim = ifelse((root,projhittime(1500)=[1,5]),6250,6150)
ownpal = 1
scale = const(size.xscale),const(size.yscale)
persistent = 0
sprpriority = 4
pausemovetime = 99999999999999

[State 300]
type = varSet
trigger1 = time = 0
var(2) = 0

[State 411]
type = RemoveExplod
trigger1 = FrontEdgeDist <= -50 && !var(1)
id = 6250

[State 410]
type = null;PosAdd
trigger1 = time = 1
trigger1 = P2dist X < -22
x = P2dist X + 22

[State 410]
type = DestroySelf
trigger1 = time >= 1
trigger1 = !NumExplod(6250)

;---------------------------------------------------------------------------
;83-7A-6f-6a 7f-75-6b-5f-5b-57 80-78-6d-65-5f-57-4e-49
;89 85 82
;---------------------------------------------------------------------------
;滅殺豪昇龍
[Statedef 3100]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
velset = 0,0

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

[State 110]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse((Command = "m_syou2" && Power >= 2000) || (Command = "m_syou3" && (Power >= 2000 && Power < 3000)), 1, ifelse(Command = "m_syou3" && Power >= 3000, 2, 0))

[State 110]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = random%2

[State 110]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
trigger1 = numtarget
var(6) = ifelse((HitCount < 2 && target,life>=370),2,ifelse((target,life>=270),1,0))

[State 110]
type = VarSet
triggerall = var(59)
triggerall = Time = 0
trigger1 = !numtarget
trigger2 = P2statetype = A
var(6) = 0

[State 110]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = ifelse((var(6)=1 && Power >= 2000) || (var(6)=2 && (Power >= 2000 && Power < 3000)), 1, ifelse(var(6)=2 && Power >= 3000, 2, 0))

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 3100, ifelse(var(6) = 1, 3110, 3120))

;2,38,48

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = ifelse(!var(6),39,40)

[State 3000]
type = SuperPause
trigger1 = Time = 2
time = ifelse(!var(6),36,37)
movetime = ifelse(!var(6),36,37)
anim = -1
sound = -1
pos = 0,0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State 170, 1]
type = NotHitBy
trigger1 = P2MoveType != H
trigger1 = time = ifelse(!var(6),39,40)
value = ,AA,AT
time = ifelse(!var(6),8,7)

[State -2]
type = pause
triggerall = time = ifelse(!var(6),38,39)
trigger1 = P2MoveType = H
trigger2 = P2stateno = [120,155]
trigger2 = P2StateType != A
time = 1
movetime = 1
pausebg = 0

[State -2]
type = pause
triggerall = time = ifelse(!var(6),38,39)
trigger1 = P2MoveType != H && (P2stateno != [120,155])
trigger2 = P2stateno = [120,155]
trigger2 = P2StateType = A
time = ifelse(!var(6),9,8)
movetime = ifelse(!var(6),9,8)
ignorehitpause = 1
pausebg = 0

[State 300]
type = Helper
trigger1 = Time = 3
id = 8000
name = "Super"
pos = 0,0
postype = P1
stateno = 8001
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 110]
type = PlaySnd
trigger1 = time = 3
value = 210,0

[State 110]
type = PlaySnd
trigger1 = time = 3
value = 100,5
channel = 0

[State 110]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = var(6) = 2 && animelem = 9
value = 100,1
channel = 0
ignorehitpause = 1

[State 110]
type = PlaySnd
trigger1 = !var(6)
trigger1 = AnimElem = 9
trigger2 = var(6) = 1
trigger2 = AnimElem = 10
trigger3 = var(6) = 2
trigger3 = AnimElem = 16
value = 100,3
channel = 0
ignorehitpause = 1

[State 3105]
type = AssertSpecial
trigger1 = movecontact
trigger1 = alive
flag = nokoslow
ignorehitpause = 1

[State 860, 4]
type = PowerAdd
trigger1 = time = 0
value = ifelse(!var(6), -1000, ifelse(var(6) = 1, -2000, -3000))

[State 200]
type = AfterImage
trigger1 = time = 2
time = 999
trans = none
length = 15
framegap = 4
palcolor = 0
;palinvertall = 0
palbright = 1,1,1
palpostbright = 1,1,120
palcontrast = 104,172,142
PalAdd = -16,-16,1
PalMul = 1, 1, .85

[State 110]
type = StateTypeSet
trigger1 = !var(6) &&AnimElemTime(10) = 2
trigger2 = var(6) = 1 &&AnimElemTime(11) = 2
trigger3 = var(6)=2 &&AnimElemTime(17) = 2
StateType = A
physics = N

[State 300]
type = Width
trigger1 = 1
edge = 20,0

[State 110]
type = VelSet
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(4) < 0
x = 7

[State 110]
type = VelSet
trigger1 = !var(6)
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(10) < 0
trigger2 = var(6) = 1
trigger2 = AnimElemTime(9) >= 0 && AnimElemTime(11) < 0
trigger3 = var(6) = 2
trigger3 = AnimElemTime(8) >= 0 && AnimElemTime(10) < 0
x = ifelse(!var(6),6,11)

[State 110]
type = VelSet
trigger1 = var(6)=2&&(AnimElemTime(15) >= 0 && AnimElemTime(17) < 0)
x = 11.5

[State 110]
type = VelMul
trigger1 = var(6) != 1
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(7) < 0
trigger2 = var(6) = 1
trigger2 = AnimElemTime(5) >= 0 && AnimElemTime(8) < 0
trigger3 = var(6)=2&&(AnimElemTime(10) >= 0 && AnimElemTime(14) < 0)
trigger4 = var(6)=2&&AnimElemTime(17) >= 0
x = .93

[State 110]
type = VelMul
trigger1 = !var(6)&&AnimElemTime(10) >= 0
trigger2 = var(6) = 1 && AnimElemTime(11) >= 0
x = .88

[State 110]
type = VelSet
trigger1 = !var(6) &&AnimElemTime(10) = 2
trigger2 = var(6)=1 &&AnimElemTime(11) = 2
trigger3 = var(6)=2 &&AnimElemTime(17) = 2
y = ifelse(!var(6), -10.8, ifelse(var(6) = 1, -11.2, -12.4))

[State 110]
type = VelSet
trigger1 = !var(6)
trigger1 = AnimElemTime(6) = 0 || AnimElemTime(11) = 0
trigger2 = var(6) = 1
trigger2 = AnimElemTime(7) = 0 || AnimElemTime(13) = 0
trigger3 = var(6)=2
trigger3 = AnimElemTime(6) = 0 || AnimElemTime(13) = 0 || AnimElemTime(19) = 0
x = 0

[State 110]
type = Veladd
trigger1 = !var(6) &&AnimElemTime(10) > 2
trigger2 = var(6)=1 &&AnimElemTime(11) > 2
trigger3 = var(6)=2 &&AnimElemTime(17) > 2
y = .63

[State 105, 1]
type = statetypeset
trigger1 = var(6) != 2 && AnimElem = 14
trigger2 = var(6) = 2 && AnimElem = 20
movetype = I

[State 110]
type = HitDef
triggerall = var(6) = 1
trigger1 = AnimElem = 3
attr = S, HA
animtype  = Heavy
air.animtype  = Back
damage = 76,12
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = -3, -55
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = ifelse(win=1,-3.5,0),0
guard.velocity = -5
air.velocity = -3.5,-7
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -4
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,

[State 110]
type = HitDef
trigger1 = var(6) != 1
trigger1 = AnimElem = 3
trigger2 = var(6) = 1
trigger2 = AnimElem = 4
attr = S, HA
animtype  = Heavy
air.animtype  = Back
damage = ifelse(!var(6),90,ifelse(var(6)=1,74,111)) ,12
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = -5, -55
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = ifelse(win=1,-3.5,0),0
guard.velocity = -5
air.velocity = -3.5,-7
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -4
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,

[State 110]
type = HitDef
trigger1 = var(6) != 1
trigger1 = AnimElem = 4
trigger2 = var(6) = 1
trigger2 = AnimElem = 5
attr = S, HA
animtype  = Heavy
air.animtype  = Back
damage =  ifelse(!var(6),62,ifelse(var(6)=1,83,56)) ,12
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = 5, -91
hitsound   = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = ifelse(win=1,-3.5,0),0
guard.velocity = -6
air.velocity = -3.5,-8
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -4
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,

[State 110]
type = HitDef
trigger1 = var(6) = 1
trigger1 = AnimElem = 10
trigger2 = var(6) = 2
trigger2 = AnimElem = 9
attr = S, HA
animtype  = Heavy
air.animtype  = Up
damage = ifelse(var(6)=1,74,76) ,12
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = -3, -55
hitsound = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = -4,ifelse(var(6)=1,-8.5,0)
guard.velocity = -6 ;ifelse(var(6)=1, -6, -6*const(size.xscale))
air.velocity = -4,-8.5
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -4
fall = ifelse(var(6)=1,1,0)
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,
forcestand = ifelse(var(6)=1,1,0)

[State 110]
type = HitDef
trigger1 = !var(6)
trigger1 = AnimElem = 9
trigger2 = var(6) = 1
trigger2 = AnimElem = 11
trigger3 = var(6) = 2
trigger3 = AnimElem = 10
attr = S, HA
animtype  = Heavy
air.animtype  = Up
damage = ifelse(!var(6),76,ifelse(var(6)=1,38,56)) ,12
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = -5, -55
hitsound = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = -4,ifelse(var(6)!=2,-8.5,0)
guard.velocity = -6 ;ifelse(var(6)!=2, -6, -6*const(size.xscale))
air.velocity = -4,-8.5
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -4
fall = ifelse(var(6)!=2,1,0)
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,
forcestand = ifelse(var(6)!=2,1,0)

[State 110]
type = HitDef
trigger1 = !var(6)
trigger1 = AnimElem = 10
trigger2 = var(6) = 1
trigger2 = AnimElem = 12
trigger3 = var(6) = 2
trigger3 = AnimElem = 11
attr = S, HA
animtype  = Heavy
air.animtype  = Up
damage = ifelse(!var(6),35,ifelse(var(6)=1,28,42))
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = 5, -91
hitsound = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = -4,ifelse(var(6)!=2,-8.5,0)
guard.velocity = ifelse(var(6)!=2, -11, -9)
air.velocity = -4,-8.5
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -4
fall = ifelse(var(6)!=2,1,0)
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,
forcestand = ifelse(var(6)!=2,1,0)

[State 110]
type = HitDef
triggerall = var(6) = 2
trigger1 = AnimElem = 16
attr = S, HA
animtype  = Heavy
air.animtype  = Up
damage = 56,12
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = -3, -55
hitsound = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = -4,-8.5
guard.velocity = -8
air.velocity = -4,-8.5
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -4
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,
forcestand = 1

[State 110]
type = HitDef
triggerall = var(6) = 2
trigger1 = AnimElem = 17
attr = S, HA
animtype  = Heavy
air.animtype  = Up
damage = 62,12
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = -5, -55
hitsound = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = Low
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = -4,-8.5
guard.velocity = -8
air.velocity = -4,-8.5
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,
forcestand = 1

[State 110]
type = HitDef
triggerall = var(6) = 2
trigger1 = AnimElem = 18
attr = S, HA
animtype  = Heavy
air.animtype  = Up
damage = 35,12
priority  = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 4,5
sparkno = S8060
guard.sparkno = S8120
sparkxy = 5, -91
hitsound = S1,3+(roundstate = 3)*10
guardsound = S3,1
ground.type = High
ground.slidetime = 16
ground.hittime  = 16
guard.ctrltime = 16
ground.velocity = -4,-8.5
guard.velocity = -11
air.velocity = -4,-8.5
airguard.velocity = -6.3,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = -4
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 62,31 ;03,
forcestand = 1

[State 110]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 3105

;---------------------------------------------------------------------------
;滅殺豪昇龍（着地）
[Statedef 3105]
type    = S
physics = S
ctrl = 0
anim = 3105
velset = 0,0

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

[State 52]
type = PlaySnd
trigger1 = Time = 0
value = 4, 0
channel = 20

[State 52, 2]
type = VarSet
trigger1 = Time = 0
trigger1 = var(8) = 1
var(8) = 0

[State 200]
type = AfterImage
trigger1 = time = 0
time = 0
trans = none
length = 15
framegap = 4

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

;---------------------------------------------------------------------------
;瞬獄殺
[Statedef 3200]
type = S
movetype = A
physics = N
juggle = 8
velset = 0,0
ctrl = 0
anim = 3200 + var(12)
poweradd = -3000

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

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 39

[State 3000]
type = SuperPause
trigger1 = Time = 2
time = 36
movetime = 36
anim = -1
sound = -1
pos = 0,0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State 170, 1]
type = NotHitBy
trigger1 = !var(12)
trigger1 = time = 38
value = ,AA,AT
time = 6

[State 170, 1]
type = NotHitBy
trigger1 = var(12)
trigger1 = time = 38
value = SCA
time = 6

[State -2]
type = pause
trigger1 = time = 38
time = 1
movetime = 1
pausebg = 0

[State 3001]
type = Helper
trigger1 = Time = 4
id = 8001
name = "Super"
pos = ceil(13*const(size.xscale)),ceil(-89*const(size.yscale))
postype = P1
stateno = 8001
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State 300]
type = PlaySnd
trigger1 = Time = 4
value = 210,0

[State 300]
type = PlaySnd
trigger1 = Time = 4
value = 100,1
channel = 0

[State 200]
type = AfterImage
trigger1 = !var(12)
trigger1 = time = 2
time = 999
trans = none
length = 11
framegap = 3
palcolor = 0
;palinvertall = 0
palbright = 1,1,1
palpostbright = 1,1,120
palcontrast = 104,172,142
PalAdd = -16,-16,1
PalMul = 1, 1, .85

[State 200]
type = AfterImage
trigger1 = var(12)
trigger1 = time = 2
time = 999
trans = none
length = 7
framegap = 2
palcolor = 0
;palinvertall = 0
palbright = 1,1,1
palpostbright = 1,1,120
palcontrast = 104,172,142
PalAdd = -16,-16,1
PalMul = 1, 1, .85

;98,6b(35) 174
;18,90(35) 311

[State 1100]
type = VelSet
trigger1 = Time = ifelse(!var(12), 43, 40)
x = ifelse(!var(12), 5, 8.9)

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

[State 3200]
type = StateTypeSet
triggerall = P2movetype = H
trigger1 = Animelem = 2,>= 0
trigger1 = animelem = 3,< 0
movetype = I

[State 3200]
type = StateTypeSet
triggerall = P2movetype != H
trigger1 = Animelem = 2,>= 0
trigger1 = animelem = 3,< 0
movetype = A

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 1200, 1]
type = HitDef
triggerall = P2movetype != H
triggerall = P2StateNo != [150,155]
trigger1 = animelem = 2,>= 0
trigger1 = animelem = 3,< 0
attr = S, HT
hitflag = M-
numhits = 0
priority = 7, Miss
sparkno = -1
hitsound = -1
p1stateno = 3201
p2stateno = 3209
p1facing = 1
p2facing = 1
fall = 1
fall.recover = 0

[State 1200, 2]
type = ChangeState
Trigger1 = AnimTime = 0
Trigger2 = frontedgedist <= 1 && animelemtime(2) > 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;瞬獄殺（hit）
[Statedef 3201]
type    = S
movetype = A
physics = N
juggle = 0
ctrl = 0
anim = 3201
velset = 0,0

[State 901]
type = TargetState
trigger1 = AnimElem = 1
value = 3205

[State 300]
type = Width
trigger1 = Time = 0
edge = ceil(50*const(size.xscale)),0

[State 901,1]
type = targetBind
trigger1 = animelem = 1
pos = ceil(45*const(size.xscale)),0
postype = P1

[State 200, 2]
type = Playsnd
trigger1 = Time = 0
value = 5,5

[State 310]
type = AssertSpecial
trigger1 = Time = [11,57]
flag = NoBarDisplay

[State 310]
type = AssertSpecial
trigger1 = Time = [11,57]
flag =  NoBG
flag2 = NoFG
flag3 = timerfreeze

[State 310]
type = AssertSpecial
trigger1 = Time = [11,57]
flag = GlobalNoShadow

[State 411]
type = Explod
trigger1 = Time = [11,57]
anim = 6705
id = 6705
pos = 0,0
postype = Left
sprpriority = -10
bindtime = 1
ownpal = 1

[State 3000]
type = AfterImage
trigger1 = time = 11
time = 0
TimeGap  = 3
FrameGap = 4
length = 10
PalBright = 1,1,1
PalContrast =  150,50,50
PalAdd = 0,0,0
PalMul = 1,1,1
trans = add1

[State 960]
type = Playsnd
trigger1 = Time = 5
value = 100,3
channel = 0

;16,19,21,24,27,30,33,35,38,41,44,47,49,52,55
;17,20,22,25,28,31,34,36,39,42,45,48,50,53,

[State 960]
type = Playsnd
trigger1 = Time = 16 || Time = 19 || Time = 35 || Time = 49 || Time = 52
trigger2 = (Time = [21,33]) && Time % 3 = 0
trigger3 = (Time = [38,47]) && Time % 3 = 2
value = 200,0+random%2 ;var(6)  ;200,ifelse(Var(12) = 20,1+random%4,1)
channel = 10

[State 960]
type = null;Playsnd
trigger1 = (Time = [16,54]) && Time % 3 = 1
value = 200,2+random%2 ;var(6)  ;200,ifelse(Var(12) = 20,1+random%4,1)
channel = 10


[State 960]
type = Playsnd
trigger1 = Time = 55
value = 200,0
channel = 10

[State 411]
type = Explod
trigger1 = Time = 16 || Time = 19 || Time = 35 || Time = 49 || Time = 52 || Time = 55
trigger2 = (Time = [21,33]) && Time % 3 = 0
trigger3 = (Time = [38,47]) && Time % 3 = 2
anim = 8020
id = 8020
pos = 20+2*(random%21),-140+5*(random%28)
postype = P1
sprpriority = 5
scale = 0.833, 1.071
bindtime = 1
ownpal = 1
;random =  60,120 ;80,80

[State 300]
type = HitAdd
trigger1 = Time = 55
value = 15

[State 310]
type = TargetLifeAdd
trigger1 = Time = 57
value = ifelse(!var(12), -500, ifelse(var(10),-611,-572)) ;ceil(-550*var(52)/3) -572

[State 180, 1]
type = TargetPowerAdd
trigger1 = Time = 16 || Time = 19 || Time = 35 || Time = 49 || Time = 52 || Time = 55
trigger2 = (Time = [21,33]) && Time % 3 = 0
trigger3 = (Time = [38,47]) && Time % 3 = 2
value = 14
ignorehitpause = 1
persistent = 1

[State 310]
type = AssertSpecial
trigger1 = win
flag = NoMusic

[State 900]
type = TargetState
trigger1 = Time = 58
value = 3206

[State 200, 2]
type = ChangeState
trigger1 = Time = 58
value = 3202

;---------------------------------------------------------------------------
;瞬獄殺（hit）（相手）1
[Statedef 3205]
type    = S
movetype = H
physics = N
juggle = 0
ctrl = 0
velset = 0, 0
sprpriority = -1

[State 200, 2]
type = ChangeAnim2
trigger1 = time = 0
value = 3205

;---------------------------------------------------------------------------
;瞬獄殺（hit）（相手）2
[Statedef 3206]
type    = L
movetype = H
physics = N
juggle = 0
ctrl = 0
anim = 5110
velset = 0, 0
sprpriority = -1

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

[State 3110]
type = SelfState
trigger1 = Time = 50
value = ifelse(alive, 5120, 5150)

;---------------------------------------------------------------------------
;瞬獄殺（hit）（相手）3
[Statedef 3209]
type    = A
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 120]
type = selfstate
trigger1 = Time > 5
value = 5100

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

;---------------------------------------------------------------------------
;瞬獄殺（終了）
[Statedef 3202]
type = S
ctrl = 0
anim = ifelse(facing = 1, 3202, 3203)
velset = 0,0

[State 310]
type = AssertSpecial
trigger1 = win
trigger1 = Time <= 56
flag = NoMusic

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

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

[State 200]
type = AfterImage
trigger1 = Win = 0
trigger1 = time = 0
time = 30
trans = none
length = 11
framegap = 3
palcolor = 0
;palinvertall = 0
palbright = 1,1,1
palpostbright = 1,1,120
palcontrast = 104,172,142
PalAdd = -16,-16,1
PalMul = 1, 1, .85

[State -2]
type = Helper
trigger1 = Win
trigger1 = Time = 0
ID = 3250
stateno = 3250
postype = left
pos = 0,0
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
ownpal = 1

[State 200, 2]
type = Playsnd
trigger1 = Win
trigger1 = Time = 0
value = 210 ,20
channel = 10
abspan = 0

[State 3810,5]
type = Changestate
trigger1 = animTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;sgsKO時演出
[Statedef 3250]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = win
trigger1 = Time <= 56
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = AssertSpecial
trigger1 = win
trigger1 = Time <= 56
flag = NoBarDisplay
flag2 = NoMusic

[State 120]
type = Explod
trigger1 = Time = 0
anim = 6700+random%2
id = 6700
pos = 0,0
postype = Left
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.833, 1.071
;removetime = -1; 91
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = RemoveExplod
trigger1 = Time = 57
id = 6600

[State 902]
type = DestroySelf
trigger1 = time = 56
trigger2 = time = 58

;---------------------------------------------------------------------------
;天魔豪斬空
[Statedef 3300]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
velset = 0,0

[State 110]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse((Command = "m_syou2" && Power >= 2000) || (Command = "m_syou3" && (Power >= 2000 && Power < 3000)), 1, ifelse(Command = "m_syou3" && Power >= 3000, 2, 0))

[State 110]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = 0

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(6), 3300, ifelse(var(6) = 1, 3310, 3320))

[State 860, 4]
type = PowerAdd
trigger1 = time = 0
value = ifelse(!var(6), -1000, ifelse(var(6) = 1, -2000, -3000))

[State 110]
type = PlaySnd
trigger1 =  Time = 3
value = 210,0

[State 110]
type = PlaySnd
trigger1 = Time = 3
value = 100,5
channel = 0

[State 300]
type = null;SuperPause
trigger1 = Time = 2
time = ifelse(!var(6), 39, ifelse(var(6) = 1, 46, 56))
movetime = ifelse(!var(6), 39, ifelse(var(6) = 1, 46, 56))
anim = -1
sound = -1
pos = 0,0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State 170, 1]
type = NotHitBy
trigger1 = !var(6)
trigger1 = AnimElemtime(4) < 0
trigger2 = var(6) = 1
trigger2 = AnimElemtime(6) < 0
trigger3 = var(6) = 2
trigger3 = AnimElemtime(7) < 0
value = SCA
time = 1

;38 ,40
;48 ,50
;56 ,58

[State 3000]
type = SuperPause
trigger1 = Time = 2
time = ifelse(!var(6),36,ifelse(var(6)=1,46,54))
movetime = ifelse(!var(6),36,ifelse(var(6)=1,46,54))
anim = -1
sound = -1
pos = 0,0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State -2]
type = pause
trigger1 = time = ifelse(!var(6),37,ifelse(var(6)=1,47,55))
time = 1
movetime = 1
pausebg = 0

[State 200]
type = AfterImage
trigger1 = time = 2
time = 999
trans = none
TimeGap  = 2
FrameGap = 3
length = 10
palcolor = 0
;palinvertall = 0
palbright = 1,1,1
palpostbright = 1,1,120
palcontrast = 104,172,142
PalAdd = -16,-16,1
PalMul = 1, 1, .85

[State 300]
type = Helper
trigger1 = Time = 4
id = 8000
name = "Super"
pos = ceil(44*const(size.xscale)),ceil(-49*const(size.yscale))
postype = P1
stateno = 8001
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 999999
supermovetime = 999999

[State 920, 0]
type = Posfreeze
trigger1 = !var(6)
trigger1 = AnimElemtime(4) < 8
trigger2 = var(6) = 1
trigger2 = AnimElemtime(6) < 8
trigger3 = var(6) = 2
trigger3 = AnimElemtime(7) < 8

[State 110]
type = VelSet
trigger1 = !var(6)
trigger1 = AnimElemtime(4) = 8
trigger2 = var(6) = 1
trigger2 = AnimElemtime(6) = 8
trigger3 = var(6) = 2
trigger3 = AnimElemtime(7) = 8
x = -1
y = -11

[State 110]
type = Veladd
trigger1 = !var(6)
trigger1 = AnimElemtime(4) >= 9
trigger2 = var(6) = 1
trigger2 = AnimElemtime(6) >= 9
trigger3 = var(6) = 2
trigger3 = AnimElemtime(7) >= 9
y = .53

[State 110]
type = PlaySnd
trigger1 = !var(6)
trigger1 = AnimElemtime(4) = 1
trigger2 = var(6) = 1
trigger2 = AnimElemtime(6) = 1
trigger3 = var(6) = 2
trigger3 = AnimElemtime(7) = 1
value = 100,1
channel = 0

[State 100]
type = PlaySnd
trigger1 = !var(6)
trigger1 = AnimElem = 4
trigger2 = var(6) = 1
trigger2 = AnimElem = 6
trigger3 = var(6) = 2
trigger3 = AnimElem = 7
value = 150,0

[State -3]
type = Helper
trigger1 = !var(6)
trigger1 = AnimElem = 4
trigger2 = var(6) = 1
trigger2 = AnimElem = 6
trigger3 = var(6) = 2
trigger3 = AnimElem = 7
id = 6600
name = "tenma"
pos = ceil(86*const(size.xscale)),ceil(-36*const(size.yscale))
postype = P1
stateno = 6600
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 100]
type = ChangeState
trigger1 = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 3305

;---------------------------------------------------------------------------
;天魔豪斬空(着地)
[Statedef 3305]
type  = S
movetype = I
physics = S
ctrl = 0
anim = 3305
velset = 0,0

[State 110]
type = PosSet
trigger1 = time = 0
y = 0

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

[State 200]
type = AfterImage
trigger1 = animtime = 0
time = 0
trans = none
TimeGap  = 2
FrameGap = 3
length = 10

[State 100]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;天魔豪斬空（飛び道具）
[Statedef 6600]
type  = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 6600
sprpriority = 4

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = time = 0
var(6) = parent,var(6)
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(12) = parent,var(12)

[State 300]
type = VarSet
trigger1 = time = 0
var(10) = parent,var(10)
ignorehitpause = 1

[State 1000, 3]
type = AttackMulSet
trigger1 = var(12)
value = 1.144

[State 300]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(2) = 1

[State 300]
type = varadd
trigger1 = root,ProjContacttime(1600) = 2
ignorehitpause = 1
Persistent = 1
var(2) = 1

;e5,67(20) 5.37
;9e,36 5.56

;ea,4e 5.5
;95,45 5.71

[State 1100]
type = VelSet
trigger1 = time = 1
x = ifelse(!var(12), 5.37, 5.6)
y = ifelse(!var(12), 5.56, 5.71)

[State 100]
type = Projectile
trigger1 = time = 1
projanim = 6060
Projhitanim = -1
Projremanim = -1
projcancelanim = -1
projmisstime = 0
projhits = 4+(var(6)*2)
projstagebound = 40
projedgebound = 40
offset = 0, 0
projpriority = 1
projsprpriority = 4
ProjID = 1600
velocity = vel X, vel Y
attr = A, HP
damage = ifelse(!Var(6),65,ifelse(Var(6)=1,62,61)),10
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 3,6
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 13
ground.hittime = 13
air.hittime = 18
guard.ctrltime = 13
ground.velocity = -5.7, 5.75 ;-7.2, 6.5  
guard.velocity = -8
air.velocity = -5.7, 5.75 ;-7.2, 6.5
airguard.velocity = -5.7,-1
air.juggle = 8
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
;envshake.time = 12
;envshake.ampl = 2
getpower = 0,0
givepower = 62,31 ;03,
nochainID = root,var(8)

[State 300]
type = Explod
trigger1 = root,projContacttime(1600) = 1
id = 1100
name = "projhit_s"
pos = P2bodydist X+8 ,10
postype = P1
anim = ifelse((root,projhittime(1600) = 1),8060,8120)
random = 5,20
scale = const(size.xscale),const(size.yscale)
ownpal = 1
ontop = 1
ignorehitpause = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 300]
type = VarSet
trigger1 = var(1) = 5
ignorehitpause = 1
var(1) = 0

[State 300]
type = VarSet
trigger1 = root,ProjContacttime(1600) = 1
ignorehitpause = 1
var(1) = 1

[State 300]
type = VarAdd
trigger1 = var(1)
ignorehitpause = 1
var(1) = 1

[State 4110]
type = PosFreeze
triggerall = time > 1
trigger1 = var(1)
value = 1
ignorehitpause = 1

[State 900, 4]
type = ChangeState
triggerall = time > 1
trigger1 = Pos Y >= 0 && Vel Y > 0
trigger2 = !root,NumProjID(1600)
value = 6605

;---------------------------------------------------------------------------
;天魔豪斬空（飛び道具）(消滅)
[Statedef 6605]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 8990

[State 300]
type = Explod
trigger1 = time = 0
id = 6605
name = "disappear"
pos = 0,0
postype = P1
anim = ifelse((root,projhittime(1600)=[1,5]),6605,6350)
ownpal = 1
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
persistent = 0
pausemovetime = 99999999999999

[State 900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 120]
type = RemoveExplod
trigger1 = FrontEdgeDist <= -55 && !var(1)
id = 6605

[State 410]
type = DestroySelf
trigger1 = time >= 1
trigger1 = !NumExplod(6605)

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;common state
;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

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

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

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

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

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

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

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

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

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

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

[State 5150, 8]
type = NotHitBy
triggerall = Var(12) != 20
trigger1 = CanRecover
value = SCA
time = 1

[State 5050, 4] ;Recover near ground
type = ChangeState
triggerall = !var(59)
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5]; Recover in mid air
type = null;ChangeState
triggerall = !var(59)
triggerall = Var(12)
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 15) ;25
value = 5100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

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

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;HIT_LIEDOWN

[State 5100, 8]
type = null;GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = null;PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 5101

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N

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

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

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

[State 5110, 7]
type = null;GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine

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

[State 5150, 1] ;Normal anim
type = ChangeAnim
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
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
;trigger1 = Time = 0
trigger1 = MatchOver = 1
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
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[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

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = S
movetype = I
physics = N
;anim = 5200
ctrl = 0
velset = 0,0

[State 5201, 1] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -5

[State 110]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(6) = ifelse(Command = "recovery", 0, ifelse(Command = "recovery_2", 1, 2))

[State 110]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(6) = 0 ;+random%2

[State 110]
type = null;VarSet
triggerall = var(59)
trigger1 = Time = 0
trigger1 = backedgebodydist <= 20
trigger1 = P2bodydist X <= 60
trigger1 = P2bodydist Y <= -45
var(6) = 1+random%2

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 5200+var(6)

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

[State 5201, 2]
type = VelSet
trigger1 = AnimElemTime(3) = 1
trigger1 = var(6)
x = 7

[State 5201, 2]
type = null;VelSet
trigger1 = vel X > -.1
x = 0

[State 5201, 2]
type = null;VelMul
trigger1 = 1
x = .95

[State 130]
type = PlayerPush
trigger1 = 1
value = 0

[State 5201, 4]
type = NotHitBy
trigger1 = animelemtime(3) < 1
value = SCA
time = 1

[State 5201, 4]
type = NotHitBy
trigger1 = animelemtime(3) >= 1
value = SC,AP
time = 1

[State 5201, 5] ;Blink white
type = null;PalFX
trigger1 = Time = 0
time = 2
add = 128,128,128 ;256,256,256

[State 5201, 1] ;Turn if not facing opponent
type = Turn
trigger1 = var(6)
trigger1 = animTime = 0
trigger1 = p2dist X < -5

[State 5900, 3]
type = ChangeState
trigger1 = animTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
;anim = 5210
ctrl = 0

[State 5050, 6]
type = ChangeState
trigger1 = time = 0
trigger1 = Pos Y <= -5
value = 5050

[State 5050, 6]
type = ChangeState
trigger1 = time = 0
trigger1 = Pos Y > -5
value = 5100

[State 5050, 6]
type = ChangeAnim
trigger1 = time = 0
value = 5210

[State 5210, 1] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 2
add = 128,128,128 ;256,256,256

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 1
value = 100, 3

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
trigger1 = Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -2
y = -1

[State 5210, 2] ;Go up
type = null;VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdup"
y = -2

[State 5210, 2] ;Go down
type = null;VelAdd
trigger1 = Time = 4
trigger1 = Command = "holddown"
y = 1.5

[State 5210, 2] ;Go fwd
type = null;VelMul
trigger1 = Time = 4
trigger1 = Command = "holdfwd"
x = 1

[State 5210, 2] ;Go back
type = null;VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdback"
x = -1

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 16
value = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 4
y = .5

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMP_LAND
ctrl = 1

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

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

;---------------------------------------------------------------------------
;helper def
;---------------------------------------------------------------------------
;燃焼エフェクト
[Statedef 7000]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8990

[State 18600, PosSet]
type = PosSet
trigger1 = 1
x = enemynear,pos x
y = enemynear,pos y
ignorehitpause = 1

[State -2]
type = Explod
trigger1 = time = 0
anim = 7000
id = 7000
pos = 0,enemynear,const(size.mid.pos.y)
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
RemoveTime = -1
sprpriority = 1
ownpal = 1
pausemovetime = 99999999
ignorehitpause = 1

[State 4110, ChangeState]
type = ChangeState
trigger1 = enemynear,statetype = L
trigger2 = enemynear,movetype != H
trigger3 = root,projcontacttime(1100) >= 20 || root,projcontacttime(1500) >= 20
trigger3 = enemynear,stateno = [5000,5030]
trigger3 = enemynear,time <= 5
trigger4 = enemynear,stateno != [5000,5071]
trigger4 = enemynear,movetype = H
value = 7005

;---------------------------------------------------------------------------
;燃焼エフェクト（消滅）
[Statedef 7005]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8990

[State -2]
type = RemoveExplod
trigger1 = time = 1
ID = 7000

[State 410]
type = DestroySelf
trigger1 = Time = 2

;---------------------------------------------------------------------------
;燃焼エフェクト(青)
[Statedef 7010]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8990

[State 18600, PosSet]
type = PosSet
trigger1 = 1
x = enemynear,pos x
y = enemynear,pos y
ignorehitpause = 1

[State -2]
type = Explod
trigger1 = time = 0
anim = 7010
id = 7010
pos = 0,enemynear,const(size.mid.pos.y)
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
RemoveTime = -1
sprpriority = 1
ownpal = 1
pausemovetime = 99999999
ignorehitpause = 1

[State 4110, ChangeState]
type = ChangeState
trigger1 = enemynear,statetype = L
trigger2 = enemynear,movetype != H
trigger3 = time > 25
trigger3 = enemynear,stateno = [5000,5020]
trigger4 = enemynear,stateno != [5000,5071]
trigger4 = enemynear,movetype = H
value = 7015

;---------------------------------------------------------------------------
;燃焼エフェクト（消滅）
[Statedef 7015]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8990

[State -2]
type = RemoveExplod
trigger1 = time = 1
ID = 7010

[State 410]
type = DestroySelf
trigger1 = Time = 2

;---------------------------------------------------------------------------
;super1
[Statedef 8001]
ctrl = 0
anim = 8011

[State 1000, 3]
type = BindToParent
trigger1 = parent,stateno = 3100
time = -1
pos = ceil(14*const(size.xscale)),ceil(-49*const(size.yscale))

[State 1000, 3]
type = BindToParent
trigger1 = parent,stateno = 3300
time = -1
pos = ceil(44*const(size.xscale)),ceil(-49*const(size.yscale))

[State 5210, 5]
type = VarSet
trigger1 = Time = 0
var(6) = parent,var(6)

[State 5210, 5]
type = VarSet
trigger1 = Time = 0
trigger1 = parent,stateno = 3200
var(6) = 2

[State 1200]
type = Explod
trigger1 = parent,stateno != 3300
trigger1 = Time = 0
anim = ifelse(!var(6),8200,ifelse(var(6)=1,8210,8220))
id = 8001
pos = 0,0
postype = P1
bindtime = -1
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1200]
type = Explod
trigger1 = parent,stateno = 3300
trigger1 = Time = 0
anim = ifelse(!var(6),8230,ifelse(var(6)=1,8240,8250))
id = 8001
pos = 0,0
postype = P1
bindtime = -1
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 902]
type = DestroySelf
trigger1 = time > 1
trigger1 = !NumExplod(8001) ;time = 45

;---------------------------------------------------------------------------
;super2
[Statedef 8002]
ctrl = 0
anim = 8011

[State 1000, 3]
type = null;BindToParent
trigger1 = 1
time = -1
pos = 0,0

[State 5210, 5]
type = VarSet
trigger1 = Time = 0
var(6) = parent,var(6)

[State 1200]
type = Explod
trigger1 = Time = 0
anim = 8200
id = 8003
pos = ceil(42*const(size.xscale)), ceil(-48*const(size.yscale))
postype = P1
bindtime = -1
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1200]
type = Explod
trigger1 = Time = 0
anim = ifelse(!var(6),8200,ifelse(var(6)=1,8210,8220))
id = 8004
pos = ceil(-29*const(size.xscale)),ceil(-49*const(size.yscale))
postype = P1
bindtime = -1
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 9020]
type = DestroySelf
trigger1 = time = 45

;---------------------------------------------------------------------------
;KO演出1
[Statedef 8010]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = Time <= ifelse((!root,var(6)), 144, 145)
flag = NoBarDisplay
flag2 = NoMusic

[State 310]
type = AssertSpecial
trigger1 = Time >= 1
trigger1 = Time <= ifelse((!root,var(6)), 144, 145)
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = PlaySnd
trigger1 = time = 1
value = 210,10
ignorehitpause = 1
abspan = 0

[State 120]
type = Explod
trigger1 = Time = 1
anim = 8300
id = 8300
pos = 0,0
postype = BACK
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
removetime = -1; ;97
;persistent = 0
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = root,var(6)
trigger1 = Time = 10
anim = 8330
id = 8330
pos = 0,239
postype = BACK
sprpriority = -7
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
;removetime = 200; ;97
vfacing = -1
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = RemoveExplod
trigger1 = Time = ifelse((!root,var(6)), 145, 146)
id = 8300

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8330

[State 902]
type = DestroySelf
trigger1 = time = ifelse((!root,var(6)), 146, 147)

;---------------------------------------------------------------------------
;KO演出2-1
[Statedef 8011]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = Time <= 144
flag = NoBarDisplay
flag2 = NoMusic

[State 310]
type = AssertSpecial
trigger1 = Time >= 1
trigger1 = Time <= 144
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = PlaySnd
trigger1 = time = 1
value = 210,10
ignorehitpause = 1
abspan = 0

[State 120]
type = Explod
trigger1 = Time = 1
anim = 8310
id = 8310
pos = 0,0
postype = Back
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = RemoveExplod
trigger1 = Time = 145
id = 8310

[State 902]
type = DestroySelf
trigger1 = time =  146

;---------------------------------------------------------------------------
;KO演出2-2
[Statedef 8012]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = Time <= 145
flag = NoBarDisplay
flag2 = NoMusic

[State 310]
type = AssertSpecial
trigger1 = Time >= 1
trigger1 = Time <= 145
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = PlaySnd
trigger1 = time = 1
value = 210,10
ignorehitpause = 1
abspan = 0

[State 120]
type = Explod
trigger1 = Time = 1
anim = 8310
id = 8310
pos = 0,0
postype = Back
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = Time = 14
anim = 8340
id = 8340
pos = 0,0
postype = Back
sprpriority = -7
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
;removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8310

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8340

[State 902]
type = DestroySelf
trigger1 = time =  147

;---------------------------------------------------------------------------
;KO演出2-3
[Statedef 8013]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = Time <= 145
flag = NoBarDisplay
flag2 = NoMusic

[State 310]
type = AssertSpecial
trigger1 = Time >= 1
trigger1 = Time <= 145
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = PlaySnd
trigger1 = time = 1
value = 210,10
ignorehitpause = 1
abspan = 0

[State 120]
type = Explod
trigger1 = Time = 1
anim = 8310
id = 8310
pos = 0,0
postype = Back
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = Time = 15
anim = 8350
id = 8350
pos = 0,0
postype = Back
sprpriority = -7
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
;removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8310

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8350

[State 902]
type = DestroySelf
trigger1 = time =  147

;---------------------------------------------------------------------------
;KO演出3-1
[Statedef 8014]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = Time <= 144
flag = NoBarDisplay
flag2 = NoMusic

[State 310]
type = AssertSpecial
trigger1 = Time >= 1
trigger1 = Time <= 144
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = PlaySnd
trigger1 = time = 1
value = 210,10
ignorehitpause = 1
abspan = 0

[State 120]
type = Explod
trigger1 = Time = 1
anim = 8300
id = 8300
pos = 320,0
postype = BACK
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
facing = -1
removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = RemoveExplod
trigger1 = Time = 145
id = 8300

[State 902]
type = DestroySelf
trigger1 = time =  146

;---------------------------------------------------------------------------
;KO演出3-2
[Statedef 8015]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = Time <= 145
flag = NoBarDisplay
flag2 = NoMusic

[State 310]
type = AssertSpecial
trigger1 = Time >= 1
trigger1 = Time <= 145
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = PlaySnd
trigger1 = time = 1
value = 210,10
ignorehitpause = 1
abspan = 0

[State 120]
type = Explod
trigger1 = Time = 1
anim = 8300
id = 8300
pos = 320,0
postype = BACK
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
facing = -1
removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = Time = 42
anim = 8320
id = 8320
pos = 0,0
postype = Back
sprpriority = -7
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
;removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8300

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8320

[State 902]
type = DestroySelf
trigger1 = time =  147

;---------------------------------------------------------------------------
;KO演出3-3
[Statedef 8016]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = Time <= 145
flag = NoBarDisplay
flag2 = NoMusic

[State 310]
type = AssertSpecial
trigger1 = Time >= 1
trigger1 = Time <= 145
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = PlaySnd
trigger1 = time = 1
value = 210,10
ignorehitpause = 1
abspan = 0

[State 120]
type = Explod
trigger1 = Time = 1
anim = 8300
id = 8300
pos = 320,0
postype = BACK
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
facing = -1
removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = Time = 10
anim = 8330
id = 8330
pos = 0,0
postype = Back
sprpriority = -7
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
;removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8300

[State 120]
type = RemoveExplod
trigger1 = Time = 146
id = 8330

[State 902]
type = DestroySelf
trigger1 = time =  147

;---------------------------------------------------------------------------
;KO演出(オリコン)
[Statedef 8017]
ctrl = 0
anim = 8990

[State 310]
type = AssertSpecial
trigger1 = Time <= 143
flag = NoBarDisplay
flag2 = NoMusic

[State 310]
type = AssertSpecial
trigger1 = Time <= 143
flag = globalnoshadow
flag2 = NoBG
flag3 = noFG

[State 310]
type = PlaySnd
trigger1 = time = 0
value = 210,10
ignorehitpause = 1
abspan = 0

[State 120]
type = Explod
trigger1 = Time = 0
anim = 8460
id = 8460
pos = 0,0
postype = Left
sprpriority = -8
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
;removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = Time = 0
anim = 8465
id = 8465
pos = 0,0
postype = Left
sprpriority = -7
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
;removetime = -1 ;97
pausemovetime = 99999999
supermovetime = 99999999

[State 902]
type = DestroySelf
trigger1 = time > 1
trigger1 = !NumExplod(8460)
trigger1 = !NumExplod(8465)

;---------------------------------------------------------------------------
;zeroカウンターエフェクト1
[Statedef 8020]
type = A
movetype = I
physics = N
ctrl = 0
anim = 7960

[State 18600, PosSet]
type = PosSet
trigger1 = 1
x = enemynear,pos x
y = enemynear,pos y -37
ignorehitpause = 1

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

[State 4110, ChangeState]
type = ChangeState
trigger1 = time > 1
trigger1 = enemynear,stateno != 2010
value = 8021

;---------------------------------------------------------------------------
;zeroカウンターエフェクト2
[Statedef 8021]
type = A
movetype = I
physics = N
ctrl = 0

[State 18600, PosSet]
type = PosSet
trigger1 = 1
x = enemynear,pos x
y = enemynear,pos y -37
ignorehitpause = 1

[State 40]
type = DestroySelf
trigger1 = enemynear,statetype = L
trigger2 = enemynear,movetype != H
trigger3 = enemynear,stateno != 2011

;---------------------------------------------------------------------------
;オリコンエフェクト
[Statedef 8030]
ctrl = 0
anim = 8990

[State 310]
type = PlaySnd
trigger1 = time = 0
value = 400,0

[State 310]
type = PlaySnd
triggerall = 3000*power/powermax <= 2000
trigger1 = root,stateno = 620
trigger1 = root,animtime = -1
trigger2 = root,stateno = 625
trigger2 = root,time = 26
value = 400,2

[State 310]
type = PlaySnd
triggerall = 3000*power/powermax > 2000
trigger1 = root,stateno = 620
trigger1 = root,animtime = -1
trigger2 = root,stateno = 625
trigger2 = root,time = 26
value = 400,3

[State 120]
type = Explod
trigger1 = Time = 0
anim = 8410
id = 8410
pos = 0,0
postype = P1
sprpriority = 2
bindtime = 1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = root,stateno = 620
trigger1 = Time = 0
anim = 8400
id = 8400
pos = 0,0
postype = P1
sprpriority = -1
bindtime = 1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
pausemovetime = 99999999
supermovetime = 99999999

[State 120]
type = Explod
trigger1 = root,stateno = 620
trigger1 = Time = 7
anim = 8405
id = 8405
pos = 0,0
postype = P1
sprpriority = 1
bindtime = 1
ownpal = 1
ignorehitpause = 1
scale = 0.836, 1.072
pausemovetime = 99999999
supermovetime = 99999999

[State 902]
type = DestroySelf
trigger1 = time > 8
trigger1 = !NumExplod(8400)
trigger1 = !NumExplod(8405)
trigger1 = !NumExplod(8410)

;---------------------------------------------------------------------------
;オリコンtime bar
[Statedef 8040]
ctrl = 0
anim = 8990

[State 8040]
type = varadd
trigger1 = time > 1
trigger1 = var(15)
trigger1 = root,stateno != [620,629]
var(15) = -1

[State 8040]
type = varset
trigger1 = time = 0
var(15) = root,var(15)

[State 8040]
type = Explod
trigger1 = time = 0
trigger1 = teamside = 1
anim = 8450
id = 8450
postype = Left
pos = 0,239
ownpal = 1
bindtime = -1
;removetime = -1
ignorehitpause = 1
ontop = 1
pausemovetime = -1
supermovetime = 9999

[State 8040]
type = Explod
trigger1 = time = 0
trigger1 = teamside = 2
anim = 8451
id = 8450
postype = Right
pos = 0,239
ownpal = 1
bindtime = -1
facing = -1
;removetime = -1
ignorehitpause = 1
ontop = 1
pausemovetime = -1
supermovetime = 9999

[State 8040]
type = Explod
trigger1 = time = 0
trigger1 = teamside = 1
anim = 8452
id = 8452
postype = Left
pos = 152,239 ;ifelse(teamside = 1, 152, -7),239
ownpal = 1
bindtime = -1
facing = 1
ignorehitpause = 1
;removetime = -1
ontop = 1
pausemovetime = -1
supermovetime = 9999

[State 8040]
type = Explod
trigger1 = time = 0
trigger1 = teamside = 2
anim = 8452
id = 8452
postype = Right
pos = -7,239
ownpal = 1
bindtime = -1
facing = 1
ignorehitpause = 1
;removetime = -1
ontop = 1
pausemovetime = -1
supermovetime = 9999

[State 8040]
type = ModifyExplod
trigger1 = NumExplod(8452)
trigger1 = var(15) >= 109
ID = 8452
scale = 1,1
ignorehitpause = 1
supermovetime = 9999

[State 8040]
type = ModifyExplod
trigger1 = NumExplod(8452)
trigger1 = var(15) = [0,108]
ID = 8452
scale = var(15)/108.0,1
ignorehitpause = 1

[State 120]
type = RemoveExplod
triggerall = time > 1
trigger1 = !root,var(13)
trigger2 = roundstate >= 3
id = 8450
ignorehitpause = 1

[State 120]
type = RemoveExplod
triggerall = time > 1
trigger1 = !root,var(13)
trigger2 = roundstate >= 3
id = 8452
ignorehitpause = 1

[State 902]
type = DestroySelf
triggerall = time > 1
trigger1 = !root,var(13)
trigger2 = roundstate >= 3
ignorehitpause = 1

;---------------------------------------------------------------------------
;オリコンplayerpush
[Statedef 8045]
type = A
movetype = I
physics = N
anim = 8991
ctrl = 0

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

[State 130]
type = PlayerPush
trigger1 = root,stateno = [1100,1110]
value = 1

[State 130]
type = null;PlayerPush
trigger1 = P2statetype != A
trigger2 = P2Movetype != H
trigger2 = enemynear,Pos Y = 0
value = 0

[State 100, PosSet]
type = PosSet
trigger1 = 1
x = root,pos x
y = 0
ignorehitpause = 1

[State 40]
type = DestroySelf
trigger1 = time > 1
trigger1 = !root,var(13)

;---------------------------------------------------------------------------
;AI
[Statedef 10000]
anim=8990 ;なにも表示しないｱﾆﾒでもいいけど入れなくても全然問題ない
ctrl=0

[State 10000,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[State 10000,プレイヤー判定]
type=varset
trigger1=command="up"&&root,command="up"
trigger2=command="down"&&root,command="down"
trigger3=command="back"&&root,command="back"
trigger4=command="fwd"&&root,command="fwd"
trigger5=command="a"&&root,command="a"
trigger6=command="b"&&root,command="b"
trigger7=command="c"&&root,command="c"
trigger8=command="x"&&root,command="x"
trigger9=command="y"&&root,command="y"
trigger10=command="z"&&root,command="z"
trigger11=command="start"&&root,command="start"
var(59)=-1

[State 10000,立ったら消失]
Type = DestroySelf
triggerAll = isHelper
Trigger1 = root,var(59) != 0||var(59)=-1
trigger2=command="up"&&root,command="up"
trigger3=command="down"&&root,command="down"
trigger4=command="back"&&root,command="back"
trigger5=command="fwd"&&root,command="fwd"
trigger6=command="a"&&root,command="a"
trigger7=command="b"&&root,command="b"
trigger8=command="c"&&root,command="c"
trigger9=command="x"&&root,command="x"
trigger10=command="y"&&root,command="y"
trigger11=command="z"&&root,command="z"
trigger12=command="start"&&root,command="start"
trigger13 = !root,var(59)
trigger13 = root,var(41) >= 300

[State 10000,ﾌﾗｸﾞON]
type=varset
triggerall=var(59)!=-1
triggerall = root,ctrl
triggerall = root,stateno != [120,159]
triggerall = root,stateno != [5000,5099]
trigger1=root,command="up"
trigger2=root,command="down"
trigger3=root,command="back"
trigger4=root,command="fwd"
trigger5=root,command="a"
trigger6=root,command="b"
trigger7=root,command="c"
trigger8=root,command="x"
trigger9=root,command="y"
trigger10=root,command="z"
trigger11=root,command="start"
var(59)=1

;===========================================================================
; 常時監視ステート（−２）
;===========================================================================
[Statedef -2]

;モード
[State -2, 3]
type = VarSet
trigger1 = name = "Gouki" && (PalNo = [7,12])
trigger2 = name = "Shin Gouki"
var(12) = 10

[State -2, 3]
type = VarSet
trigger1 = name = "Shin Gouki(cpu)"
var(10) = 1

[State 1000, 3]
type = AttackMulSet
trigger1 = var(12) && var(10)
trigger1 = stateno = 3100
trigger2 = var(12) && !var(10)
trigger2 = stateno = [1000,3999]
value = 1.144

[State 1000, 3]
type = AttackMulSet
trigger1 = var(12)
trigger1 = MoveType != A
value = 1

[State -2, 1]
type = DefenceMulSet
trigger1 = var(12) && !var(10)
value = 0.89

;vs真豪鬼モードイントロ
[state 190]
type = helper
trigger1 = RoundNo = 1
trigger1 = roundstate = 0
trigger1 = !Numhelper(193)
trigger1 = var(12) && var(10)
ID = 193
stateno = 193
postype = p1
pos = 0,0
name = "intro"
;bindtime = -1
supermovetime = 9999999
pausemovetime = 9999999
persistent = 0

[State 3000]
type = PlaySnd
trigger1 = Numhelper(193)
trigger1 = helper(193),time >= 507
trigger1 = helper(193),var(1) = 1
trigger1 = helper(193),NumExplod(8560)
value = 300,21
channel = 1

[State 3000]
type = StopSnd
trigger1 = roundstate = 2
channel = 1


;残像消去
[State -2]
type = AfterImageTime
triggerall = !var(13)
trigger1 = MoveType = H
trigger2 = StateNo = [0,99]
trigger3 = StateNo = [100,155]
trigger4 = StateNo = [200,999]
trigger5 = (StateNo != [1600,1605]) && (StateNo = [1000,1999])
time = 0

[State -2]
type = AfterImageTime
triggerall = var(13)
trigger1 = var(15) < 7
trigger2 = roundstate >= 3
trigger2 = stateno = 0 || stateno = [10,12]
time = 0

;hit用
[State -2]
type = VarSet
trigger1 = movehit
trigger2 = projHit = 1
var(3) = ifelse(movehit,1,3)
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = moveguarded
trigger2 = projGuarded = 1
var(3) = ifelse(moveguarded,2,4)
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = Time = 1
trigger1 = stateno != 1005
trigger1 = stateno != 1105
trigger1 = stateno != 1115
trigger1 = stateno != 1505
trigger1 = stateno != 1515
trigger1 = stateno != 1706
trigger1 = stateno != 1716
trigger1 = stateno != 3105
trigger1 = stateno != 3125
var(3) = 0
ignorehitpause = 1

;振り向き
[State -2]
type = Turn
triggerall = RoundState = 2
triggerall = !var(13)
triggerall = P2Dist X < 0
triggerall = time = 1
trigger1 = prevstateno = 52 || prevstateno = 100 || prevstateno = 620
trigger2 = prevstateno = 1105 || prevstateno = 1125
ignorehitpause = 1

;燃焼エフェクト
[State -2]
type = helper
triggerall = !NumHelper(7000)
triggerall = numenemy = 1
trigger1 = projHit1100 = 1
trigger2 = Numhelper(6500)
trigger2 = helper(6500),var(6) = 2
trigger2 = projHit1500 = 1
helpertype = normal
name = "burn"
stateno = 7000
ID = 7000
pos = 0,0
postype = P2
keyctrl = 0
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

;オリコン
[State -2]
type = VarSet
trigger1 = var(13)
trigger1 = movetype = H
var(13) = -1
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(15) = [-1,0]
trigger2 = roundstate <= 1
var(13) = 0
ignorehitpause = 1

[State 52, 2]
type = PowerAdd
trigger1 = var(13) = -1
value = -1396

;98,88(30) 199 6.633

[State 52, 2]
type = CtrlSet
triggerall = roundstate = 2
trigger1 = var(13)
value = 0

[State -2]
type = assertspecial
trigger1 = var(15) > 6
ignorehitpause = 1
flag = nojugglecheck

[State 52, 2]
type = PowerAdd
trigger1 = var(13)
trigger1 = stateno != [620,629]
trigger1 = power > 0
value = -1*ceil(27.4*powermax/3000)
ignorehitpause = 1

[State 1000]
type = Width
triggerall = roundstate = 2
trigger1 = var(13)
edge = 5,0

[State 190, 2]
type = AssertSpecial
triggerall = roundstate = 2
trigger1 = var(13)
flag = NoAutoTurn
flag2 = NoWalk
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(15) = 1
var(15) = -1
ignorehitpause = 1

[State -2]
type = VarAdd
trigger1 = stateno != [620,629]
trigger1 = var(15) > 1
var(15) = -1
ignorehitpause = 1

[State 52, 2]
type = CtrlSet
triggerall = var(15) = -1
triggerall = roundstate = 2
trigger1 = stateno = 0
trigger2 = stateno = [10,12]
value = 1
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = movetype = H
trigger2 = roundstate <= 1
trigger3 = var(16) = -1
var(15) = 0
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = !var(13)
var(14) = 0
ignorehitpause = 1

[State -2]
type = VarAdd
triggerall = var(13)
triggerall = var(14) > 1
triggerall = movehit = 1
trigger1 = (stateno = [200,410])
var(14) = -1
ignorehitpause = 0

[State -2]
type = VarSet
triggerall = var(13)
triggerall = !var(14)
triggerall = movehit = 1
trigger1 = (stateno = [200,410])
var(14) = 6
ignorehitpause = 0

[State -2]
type = VarSet
trigger1 = !var(15)
var(16) = 0
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(15) = -1
trigger1 = P2MoveType != H
var(16) = -1
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = var(13)
triggerall = var(16) != 2
triggerall = movehit = 1
trigger1 = stateno = [200,410]
trigger2 = stateno = [1000,1999]
var(16) = 1
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = var(16) = 1
triggerall = var(15) = [1,6]
triggerall = numtarget
trigger1 = P2MoveType = H && P2stateType = A
trigger2 = target,gethitvar(yvel) && target,stateType != A
trigger3 = target,gethitvar(fall)
var(16) = 2
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = !var(13)
triggerall = var(16) = 2
trigger1 = var(7) >= 1 && movehit = 1
trigger1 = stateno = [1000,1999]
var(16) = 3
ignorehitpause = 1

;hit effect
[State 1000]
type = VarSet
trigger1 = movetype = I
trigger2 = var(20)
trigger2 = AnimElemNo(0)%2 = 1
var(20) = 0
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1000]
type = VarSet
trigger1 = movetype = I
trigger2 = var(21)
trigger2 = AnimElemNo(0)%2 = 0
var(21) = 0
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1000]
type = VarSet
triggerall = stateno = 1000 || (stateno = [1100,1120]) || (stateno = [1500,1520]) || (stateno = [600,605])
triggerall = !var(20)
triggerall = time >= 1
trigger1 = movehit = 1
trigger1 = AnimElemNo(0)%2 = 0
var(20) = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1000]
type = VarSet
triggerall = stateno = 1000 || (stateno = [1100,1120]) || (stateno = [1500,1520]) || (stateno = [600,605])
triggerall = !var(21)
triggerall = time >= 1
trigger1 = AnimElemNo(0)%2 = 1
trigger1 = movehit = 1
var(21) = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = Explod
triggerall = P2MoveType = H
trigger1 = var(20) = 1
trigger1 = var(20) := 2
trigger2 = var(21) = 1
trigger2 = var(21) := 2
anim = 8070
id = 8070
pos = 0,ifelse(stateno = 605, enemynear,Const(size.mid.pos.y), enemynear,Const(size.head.pos.y))
postype = P2
bindtime = -1
sprpriority = -2
scale = const(size.xscale),const(size.yscale)
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = Explod
triggerall = var(13)
triggerall = p2movetype = H
trigger1 = projhittime(1000) = 1
trigger2 = projhittime(1100) = 1
anim = 8070
id = 8070
pos = 0,enemynear,Const(size.head.pos.y)
postype = P2
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = -2
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 300]
type = Explod
triggerall = var(13)
trigger1 = projContacttime(1100) = 1
id = 1100
name = "projhit_s"
pos = 8,ceil(-56*const(size.yscale))+10
postype = P2
anim = ifelse((projhittime(1100) = 1),8050,8110)
random = 5,20
scale = const(size.xscale),const(size.yscale)
ownpal = 1
ontop = 1
ignorehitpause = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

;zero counter effect
[State -2]
type = helper
triggerall = !NumHelper(8020)
triggerall = NumTarget
triggerall = movehit = 1
trigger1 = stateno = 600
trigger1 = anim = 1020 && animelemtime(3) >= 0
trigger2 = stateno = 605
trigger2 = anim = 605
helpertype = normal
name = "zero counter effect"
stateno = 8020
ID = 8020
pos = 0,0
postype = P2
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

;スパコン波動ヒット回数
[State 1000]
type = VarSet
trigger1 = stateno = 3000
trigger1 = time = 1
trigger2 = stateno = 3300
trigger2 = time = 1
var(22) = 0
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1000]
type = VarAdd
trigger1 = projhittime(1500) = 1
trigger2 = projhittime(1600) = 1
var(22) = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = TargetState
triggerall = numtarget
triggerall = target,pos y != 0
trigger1 = projhittime(1500) = [1,3]
trigger1 = numhelper(6500)
trigger1 = (var(22) = 1 && !helper(6500),var(6)) || (var(22) = 2 && helper(6500),var(6) = 1) || (var(22) = 3 && helper(6500),var(6) = 2)
trigger2 = projhittime(1600) = [1,3]
trigger2 = numhelper(6600)
trigger2 = (var(22) = 1 && !helper(6600),var(6)) || (var(22) = 2 && helper(6600),var(6) = 1) || (var(22) = 3 && helper(6600),var(6) = 2)
value = 2000
ignorehitpause = 1
pausemovetime = 999999

;挑発回数制限
[State -2]
type = VarSet
trigger1 = roundstate = [0,1]
var(23) = 0

[State -2]
type = VarSet
trigger1 = stateno = 195
var(23) = 1

;20,21,22,20,21,22,

;[15,16],17,[18,19],20,[21,22],

;波動拳ヒット後スローモーション
;hadous
[State -2]
type = pause
triggerall = roundstate = 2
triggerall = numtarget
triggerall = target,movetype = H
triggerall = !var(13)
trigger1 = projhittime(1000) = [1,7]
trigger2 = projhittime(1000) = [8,12]
trigger2 = projhittime(1000)%3 = 0
trigger3 = projhittime(1100) = [1,7]
trigger3 = !NumProjID(1100)
trigger4 = projhittime(1100) = [8,12]
trigger4 = projhittime(1100)%3 = 0
trigger4 = !NumProjID(1100)
trigger5 = projhittime(1200) = [1,7]
trigger6 = projhittime(1200) = [8,12]
trigger6 = projhittime(1200)%3 = 0
trigger7 = win = 0
trigger7 = projhittime(1500) = [8,12]
trigger7 = projhittime(1500)%3 = 0
trigger8 = projhittime(1201) = [1,7]
trigger9 = projhittime(1201) = [8,12]
trigger9 = projhittime(1201)%3 = 0
trigger10 = win = 0
trigger10 = projhittime(1600) = [8,12]
trigger10 = projhittime(1600)%3 = 0
trigger11 = win = 0
trigger11 = ((projhittime(1500) = [2,7]) && !NumProjID(1500)) || projhittime(1500) = 1
trigger12 = win = 0
trigger12 = ((projhittime(1600) = [2,7]) && !NumProjID(1600)) || projhittime(1600) = 1
time = 1
pausebg = 0

;
[State -2]
type = VarSet
trigger1 = roundstate = 4
trigger2 = roundstate = [0,1]
var(1) = 0

[State -2]
type = VarSet
triggerall = roundstate = [2,3]
triggerall = WinKo
triggerall = var(4) = [1,10]
trigger1 = projhittime(1500) = [1,4]
trigger2 = stateno = 3100 && var(3) = [1,2]
trigger3 = projhittime(1600) = [1,4]
var(1) = 1
ignorehitpause = 1
pausemovetime = 999999

[State -2]
type = TargetState
triggerall = roundstate = [2,3]
triggerall = WinKo
triggerall = var(4) = [1,10]
triggerall = numtarget
trigger1 = projhittime(1500) = 1
trigger2 = projhittime(1600) = 1
value = 2000
ignorehitpause = 1
pausemovetime = 999999

;KO演出
[State -2]
type = null;Helper
triggerall = roundstate >= 2
triggerall = !Numhelper(8011)
triggerall = WinKo
triggerall = var(4) = [0,1]
trigger1 = projhittime(1500) = 1
trigger2 = stateno = 3100 && var(3) = [1,2]
trigger3 = stateno = 3120 && var(3) = [1,2]
trigger4 = projhittime(1600) = 1
ID = 8010
stateno = 8010
postype = left
pos = 0,0
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
ownpal = 1

[State -2]
type = Helper
triggerall = !Numhelper(8010)
triggerall = WinKo
triggerall = var(4) = [0,1]
trigger1 = stateno = 3100 && var(3) = [1,2]
ID = 8010
stateno = 8010
postype = BACK
pos = 0,0
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
ownpal = 1

[State -2]
type = Helper
triggerall = !Numhelper(8010)
triggerall = WinKo
triggerall = var(4) = [0,1]
trigger1 = projhittime(1500) = 1
ID = 8010
stateno = ifelse((Numhelper(6500)&&helper(6500),var(6)= 2), 8013,ifelse((Numhelper(6500)&&helper(6500),var(6)= 1), 8012,8011))
postype = BACK
pos = 0,0
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
ownpal = 1

[State -2]
type = Helper
triggerall = !Numhelper(8010)
triggerall = WinKo
triggerall = var(4) = [0,1]
trigger1 = projhittime(1600) = 1
ID = 8010
stateno = ifelse((Numhelper(6600)&&helper(6600),var(6)= 2), 8016,ifelse((Numhelper(6600)&&helper(6600),var(6)= 1), 8015,8014))
postype = BACK
pos = 0,0
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
ownpal = 1

[State -2]
type = Helper
triggerall = !Numhelper(8010)
triggerall = WinKo
triggerall = var(4) = [0,1]
triggerall = var(13)
trigger1 = var(3) = [1,2]
trigger2 = projhit = 1, < 5
ID = 8010
stateno = 8017
postype = BACK
pos = 0,0
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
ownpal = 1

[State 900]
type = AssertSpecial
trigger1 = ProjContact1500 = 1
trigger1 = alive = 1
trigger2 = ProjContact1600 = 1
trigger2 = alive = 1
trigger3 = var(13)
trigger3 = alive = 1
flag = NoKOSlow
ignorehitpause = 1

[State -2]
type = pause
triggerall = roundstate >= 2
triggerall = WinKo
triggerall = var(4) = [2,46]
trigger1 = var(1)
trigger2 = var(15) > 0
time = ifelse(var(4)<42,3,1)
pausebg = 0
ignorehitpause = 1

;[1,2],[3,4,5],[6,7,8],[9,10,11],[12,13,14],[15,16,17],
;[18,19,20],[21,22,23],[24,25,26],[27,28,29],[30,31,32]
:[33,34,35],36....

;39

[State -2]
type = null;pause
triggerall = roundstate >= 2
triggerall = WinKo
triggerall = var(4) >= 2
trigger1 = projhit1500 =1, < 50 && !((stateno = [1000,1999]) && movecontact)
trigger2 = (stateno = [3100,3125]) || var(1)
trigger3 = projhit1600 =1, < 50
time = ifelse(var(4)<30,2,1)
pausebg = 0
ignorehitpause = 1

[State -2]
type = null;pause
triggerall = roundstate >= 2
triggerall = WinKo
triggerall = var(4) >= 2
triggerall = var(12) != 20
trigger1 = projcontacttime(1500) >= 8
trigger1 = projhit1500 = 1, < 54
time = ifelse((var(4)%4=1),2,1) ;projcontacttime(1500)<=53
pausebg = 0
ignorehitpause = 1

;roundstate3time
[State -2]
type = VarSet
trigger1 = roundstate = 2
trigger1 = var(4)
trigger2 = roundstate = 0
trigger3 = roundstate = 4
var(4) = 0
ignorehitpause = 1

[State -2]
type = VarAdd
trigger1 = roundstate = 3
var(4) = 1
ignorehitpause = 1

;コンボ制限1
[State -2]
type = VarSet
trigger1 = P2MoveType != H
trigger2 = numtarget
trigger2 = target,statetype = S
trigger3 = numtarget
trigger3 = target,statetype = C
trigger4 = var(13)
trigger4 = !var(3)
var(7) = 0
ignorehitpause = 1

[State -2]
type = VarAdd
triggerall = movehit
triggerall = numtarget
trigger1 = P2MoveType = H && P2stateType = A
trigger1 = movehit < 2
trigger2 = target,gethitvar(yvel) && target,stateType != A
trigger2 = movehit < 2
trigger3 = target,gethitvar(fall)
trigger3 = movehit < 2
ignorehitpause = 0
var(7) = 1

[State -2]
type = VarSet
triggerall = numtarget 
trigger1 = projhit1500 = 1
trigger2 = projhittime(1200) = 1 || projhittime(1201) = 1
trigger3 = var(16) = 2
ignorehitpause = 1
var(7) = 1

[State -2]
type = assertspecial
triggerall = P2MoveType = H && P2stateType = A
triggerall = var(7)
trigger1 = stateno = 1000 && var(7) < 3
trigger2 = stateno = 1100 && var(7) < 3
trigger3 = stateno = 1500 && var(7) < 3
trigger4 = stateno = 1110 && var(7) < 3
trigger5 = stateno = 1510 && var(7) < 3
trigger6 = stateno = 3100 && var(7)
ignorehitpause = 1
flag = nojugglecheck

;コンボ制限2
[State -2]
type = VarSet
trigger1 = P2MoveType != H
trigger2 = numtarget
trigger2 = target,statetype = S
trigger3 = numtarget
trigger3 = target,statetype = C
trigger4 = var(13) || var(15) = -1 && (var(16) = [1,2])
trigger4 = movehit = 0
var(8) = -1

[State -2]
type = VarSet
triggerall = var(8) = -1
triggerall = numtarget
triggerall = movehit || projhit = 1
trigger1 = target,gethitvar(yvel)
trigger1 = movehit < 2
trigger2 = target,gethitvar(fall)
trigger2 = movehit < 2
var(8) = 1
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = var(8) = 1
trigger1 = stateno = 1000 && var(7) >= 3
trigger2 = stateno = 1100 && var(7) >= 3
trigger3 = stateno = 1005
trigger4 = !var(13)
trigger4 = (stateno = [200,500]) && stateno != 330 && var(7)
trigger5 = stateno = 1500 && var(7) >= 3
trigger6 = stateno = 1200 && time = 1
trigger7 = stateno = 1300 && time = 1
trigger8 = stateno = 1400 && time = 1
trigger9 = stateno = 3000 && time = 1
trigger10 = numtarget
trigger10 = target,vel y >= 6
trigger11 = numtarget
trigger11 = target,vel y >= 6
trigger11 = projhittime(1200) >= 10 || projhittime(1201) >= 10
trigger12 = stateno = 1110 && var(7) >= 3
trigger13 = stateno = 600 && anim = 1020 && animelemtime(5) >= 1 && time >= 1
trigger14 = stateno = 605 && anim = 605 && var(7)
trigger15 = stateno = 1510 && var(7) >= 3
trigger16 = numtarget
trigger16 = projhittime(1500) >= 5 || projhittime(1600) >= 5
var(8) = 0
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = !var(8)
triggerall = numtarget
trigger1 = (prevstateno = [200,500]) && var(7)
trigger1 = stateno >= 1000 && time = 1
trigger1= stateno != 1200 || stateno != 1300 || stateno != 1400 || stateno != 3000
trigger1 = target,vel y <= 0
trigger1 = target,gethitvar(fall)
trigger1 = numtarget
trigger2 = stateno = 1000 || stateno = 1100 || stateno = 1500 || stateno = 3100
trigger2 = target,vel y <= 6 && var(7) = [1,2]
var(8) = 1
ignorehitpause = 1

;空中復帰誘導
[State -2]
type = VarSet
triggerall = movetype != H
trigger1 = !NumTarget
trigger2 = P2MoveType != H
trigger3 = movehit
trigger3 = stateno >= 1000 && time >= 1
trigger4 = projhit = 1
trigger5 = numtarget
trigger5 = !target,gethitvar(fall)
var(2) = 0
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = !var(16)
triggerall = var(2) = 1
trigger1 = movehit
var(2) = 2
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = !var(16)
triggerall = var(2) != 2
triggerall = (stateno = [200,499])
trigger1 = stateno != 330
var(2) = 1
ignorehitpause = 1

[State -2]
type = TargetState
triggerall = !var(16)
triggerall = Numtarget
triggerall = var(2) = 2
trigger1 = target,stateno = 5050 && target,alive
value = 2050
ignorehitpause = 1

;効果音
[State -2]
type = PlaySnd
trigger1 = projhittime(1200) = 1
trigger2 = projhittime(1201) = 1
trigger3 = projhittime(1100) = 1
trigger4 = projhittime(1500) = 1
trigger5 = projhittime(1600) = 1
trigger6 = projhittime(1000) = 1
value = 1, 3+(roundstate = 3)*10
channel = 5

[State -2]
type = PlaySnd
trigger1 = ProjGuardedTime(1200) = 1
trigger2 = ProjGuardedTime(1201) = 1
trigger3 = ProjGuardedTime(1100) = 1
trigger4 = ProjGuardedTime(1500) = 1
trigger5 = ProjGuardedTime(1600) = 1
trigger6 = ProjGuardedTime(1000) = 1
value = 3, 1
channel = 5

[State -2]
type = VarSet
trigger1 = power < 3000
var(0) = 0
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(0) = 2
var(0) = 3
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = !var(0)
trigger1 = Power >= 3000
var(0) = 1
ignorehitpause = 1

[State -2]
type = Playsnd
trigger1 = var(0) = 1
trigger1 = Power >= 3000
value = 300,0

[State -2]
type = VarAdd
trigger1 = var(0) = 1
var(0) = 1
ignorehitpause = 1

[State -2]
type = PlaySnd
triggerall = Time = 1
trigger1 = StateNo = 5100
value = 4,20+(roundstate = 3)*10
channel = 20

[State -2]
type = PlaySnd
triggerall = Time = 1
trigger1 = StateNo = 5110
value = 4,25+(roundstate = 3)*10
channel = 20

[State -2]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
trigger1 = stateno = 5000 || stateno = 5010 || stateno = 5020
value = 11,ifelse(gethitvar(yvel) < 0, 11,10)
channel = 10

;勝利画面選択用
[State -2]
type = VarSet
trigger1 = roundstate <= 1
var(11) = 0

[State -2]
type = VarSet
triggerall = roundstate = 3
trigger1 = var(4) = [1,3]
var(11) = -1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2]
type = VarSet
triggerall = roundstate = 3
trigger1 = Command = "x" && Command = "a"
var(11) = ifelse(Command = "holdup",0,ifelse(Command = "holddown",1,ifelse(Command = "holdback",2,3)))
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2]
type = VarSet
triggerall = roundstate = 3
trigger1 = Command = "y" && Command = "b"
var(11) = ifelse(Command = "holdup",4,ifelse(Command = "holddown",5,ifelse(Command = "holdback",6,7)))
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2]
type = VarSet
triggerall = roundstate = 3
trigger1 = Command = "z" && Command = "c"
var(11) = ifelse(Command = "holdup",8,ifelse(Command = "holddown",9,ifelse(Command = "holdback",10,11)))
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2]
type = VarSet
triggerall = roundstate = 3
trigger1 = Command = "x" && Command = "y" && Command = "z"
var(11) = ifelse(Command = "holdup",12,ifelse(Command = "holddown",13,ifelse(Command = "holdback",14,15)))
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2]
type = VarSet
triggerall = roundstate = 3
trigger1 = Command = "a" && Command = "b" && Command = "c"
var(11) = ifelse(Command = "holdup",16,ifelse(Command = "holddown",17,ifelse(Command = "holdback",18,19)))
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

[State -2]
type = VarSet
triggerall = roundstate = 3
trigger1 = Command = "start"
var(11) = ifelse(Command = "holdup",20,ifelse(Command = "holddown",21,ifelse(Command = "holdback",22,23)))
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999

;---------------------------------------------------------------------------
;-2 for AI
;---------------------------------------------------------------------------
;stand time
[State -2]
type = VarSet
triggerall = Var(59)
triggerall = Var(40)
trigger1 = stateno != [120,140]
trigger1 = stateno != 0
trigger1 = time = 1
var(40) = 0

;---------------------------------------------------------------------------
;相手起き上がり

[State 3001, VarSet]
type = VarSet
trigger1 = var(49) >= 40
trigger2 = roundstate >= 3
var(49) = 0
ignorehitpause = 1

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

[State 3001, VarSet]
type = VarSet
triggerall = enemynear,alive = 1
triggerall = roundstate = 2
trigger1 = (enemynear,stateno = 5120) || (enemynear,stateno = 5201)
trigger1 = enemynear,animtime = -1
var(49) = 1
ignorehitpause = 1

;roundstate2 time
[State 3001, VarSet]
type = VarSet
trigger1 = roundstate >= 3
trigger2 = roundstate = 0
var(41) = 0

[State 3001, VarSet]
type = VarSet
trigger1 = roundstate = 1
var(41) = 1

[State 3001, VarSet]
type = VarAdd
trigger1 = roundstate = 2
var(41) = 1

;---------------------------------------------------------------------------
;動作終了後時間計測
[State -2]
type = VarSet
trigger1 = var(42) = 25
var(42) = 0
ignorehitpause = 1

[State -2]
type = VarAdd
trigger1 = var(42)
var(42) = 1
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = time = 1
trigger1 = stateno = 52 || stateno = 455 || stateno = 475
trigger2 = time = 1
trigger2 = stateno = 1005 || stateno = 1025 || stateno = 1105 || stateno = 1115
trigger3 = time = 1
trigger3 = stateno = 1405 || stateno = 1505 || stateno = 1515 || stateno = 1605
trigger4 = time = 1
trigger4 = stateno = 1706 || stateno = 1711 || stateno = 1716 || stateno = 1726
trigger5 = time = 1
trigger5 = stateno = 3105 || stateno = 3305
trigger6 = animtime = -1
trigger6 = stateno = [90,105]
trigger7 = animtime = -1
trigger7 = (stateno = [200,330]) || (stateno = [651,3020])
trigger7 = stateno != 1005 && stateno != 1025 && stateno != 1105 && stateno != 1115
trigger7 = stateno != 1405 && stateno != 1505 && stateno != 1515 && stateno != 1605
trigger7 = stateno != 1706 && stateno != 1711 && stateno != 1716 && stateno != 1726
trigger8 = animtime = -1
trigger8 = stateno = 5201
var(42) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
;学習1
[State -2]
type = VarSet
;trigger1 = RoundsExisted = 0
trigger1 = roundstate <= 1
trigger2 = var(43) = 1
trigger2 = stateno != 450
trigger2 = movetype != H
var(43) = 0

[State -2]
type = VarSet
trigger1 = var(43) = 3
trigger1 = stateno != 450
trigger1 = movetype != H
var(43) = 2

[State -2]
type = VarSet
triggerall = var(43) = 1
trigger1 = stateno != [120,155]
trigger1 = movetype = H
trigger2 = MoveReversed
var(43) = 2

[State -2]
type = VarSet
triggerall = !var(43)
trigger1 = stateno = 450 && time >= 3
var(43) = 1

[State -2]
type = VarSet
triggerall = var(43) = 3
trigger1 = stateno != [120,155]
trigger1 = movetype = H
trigger2 = MoveReversed
var(43) = 4

[State -2]
type = VarSet
triggerall = var(43) = 2
trigger1 = stateno = 450 && time >= 3
var(43) = 3

;---------------------------------------------------------------------------
;通常攻撃スカ回避
[State -2]
type = VarSet
triggerall = !var(44)
trigger1 = roundstate <= 1
var(44) = -1
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = var(44) > 0
trigger1 = p2stateno != var(44)
trigger2 = movetype = H
var(44) = -1
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = var(44) = [-3,-1]
trigger1 = stateno = [200,330]
trigger1 = time = 1
trigger1 = p2bodydist X = [-10,80]
trigger1 = p2statetype != A
trigger1 = enemynear,vel X >= 0
var(44) = -1
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = var(44) = -1
triggerall = stateno = [200,330]
triggerall = time >= 2
trigger1 = p2bodydist X = [1,80]
var(44) = ifelse(p2statetype = A,-3,-2)
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = var(44) = [-2,-1]
triggerall = stateno = [200,330]
trigger1 = animtime = -1
trigger1 = p2bodydist X = [-10,80]
trigger1 = p2stateno != 0
trigger1 = !numtarget
trigger2 = time >= 2
trigger2 = p2statetype != A
trigger2 = p2bodydist X = [-80,-5]
var(44) = P2stateno
ignorehitpause = 1

;---------------------------------------------------------------------------
;prevstateno
[State 3001, VarSet]
type = VarSet
trigger1 = movetype = A
trigger1 = time = 2
trigger2 = stateno = 5201 || stateno = 5210 || stateno = 90 || stateno = 620
trigger2 = time = 1
var(45) = stateno

[State 3001, VarSet]
type = VarSet
trigger1 = movetype = H
var(45) = -1

;---------------------------------------------------------------------------
;ガード間隔
[State 300]
type = VarSet
trigger1 = var(46) >= 40
trigger2 = movetype = A
trigger3 = stateno != [120,155]
trigger3 = movetype = H
var(46) = 0
ignorehitpause = 1

[State 300]
type = VarAdd
trigger1 = var(46)
var(46) = 1
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = stateno = 150 || stateno = 152
trigger1 = time = 1
var(46) = 1
ignorehitpause = 1

;get hit間隔
[State 300]
type = VarSet
trigger1 = var(47) >= 35
trigger2 = movetype = A
trigger3 = stateno != [5000,5050]
trigger3 = movetype = H
var(47) = 0
ignorehitpause = 1

[State 300]
type = VarAdd
trigger1 = var(47)
var(47) = 1
ignorehitpause = 1

[State 300]
type = VarSet
trigger1 = stateno = 5000 || stateno = 5010 || stateno = 5020
trigger1 = time = 1
var(47) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
;hit確認
[State -2]
type = VarSet
trigger1 = movetype = A
trigger1 = time = 1
trigger2 = movetype = H
var(48) = 0
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = movehit
trigger2 = projHit = 1
var(48) = ifelse(movehit,1,3)
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = moveguarded
trigger2 = projGuarded = 1
var(48) = ifelse(moveguarded,2,4)
ignorehitpause = 1

;---------------------------------------------------------------------------
;P2movetype time measure 1
[State 3001, VarSet]
type = VarSet
trigger1 = P2MoveType = I
trigger2 = P2MoveType = A
trigger2 = enemynear,animtime = [-2,-1]
var(50) = enemynear,power

;---------------------------------------------------------------------------
;超必危険時間
[State 3001, VarSet]
type = VarSet
trigger1 = P2movetype != A
trigger2 = var(51) >= 60
var(51) = 0

[State 3001, VarSet]
type = VarAdd
trigger1 = var(51)
var(51) = 1

[State 3001, VarSet]
type = VarSet
trigger1 = !var(51)
trigger1 = numenemy = 1
trigger1 = var(50) - enemynear,power >= 1000
var(51) = 1

[State 3001, VarSet]
type = VarSet
trigger1 = !var(51)
trigger1 = numenemy = 2
trigger1 = p2stateno = [3000,3999]
trigger1 = enemynear,time = 1
var(51) = 1

;---------------------------------------------------------------------------
;起き上がり時間
[State 3001, VarSet]
type = VarSet
trigger1 = var(54) >= 40
trigger2 = movetype = A
trigger3 = movetype = H
var(54) = 0
ignorehitpause = 1

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

[State 3001, VarSet]
type = VarSet
trigger1 = stateno = 5120 || root,stateno = 5201
trigger1 = animtime = -1
var(54) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
;inguarddist time measure
[State 3001, VarSet]
type = VarSet
trigger1 = !inguarddist
var(55) = 0

[State 3001, VarSet]
type = VarAdd
trigger1 = inguarddist
var(55) = 1

;---------------------------------------------------------------------------
;hitcount
[State 3001, VarSet]
type = VarSet
trigger1 = !numtarget
trigger2 = movetype = H
var(56) = 0
ignorehitpause = 1

[State 3001, VarSet]
type = VarAdd
trigger1 = numtarget
trigger1 = movehit = 1
var(56) = 1

;---------------------------------------------------------------------------
[State -2, クリップボード]
type = DisplayToClipboard
trigger1 = 1
text = "Body-Distance X=%d,Y=%d  Velocity X=%f,Y=%f \n" ;Cancel=%d, Throw=%d, Button=%d, 
params = floor(P2BodyDist X),floor(P2bodyDist Y),(Vel X),(Vel Y)

[State -2, クリップボード]
type = null;DisplayToClipboard
trigger1 = 1
text = "var(20)=%d,var(21)=%d var(22)=%d,var(23)=%d var(24)=%d \n"  
params = var(20),var(21),var(22),var(23),var(24)

[State -2, クリップボード（追加専用）]
type = null;AppendToClipboard
trigger1 = 1
text = " roundstate = %d helper(193),var(2) = %d numexplod(8510) = %d time = %d var(16) = %d  \n"
params = roundstate,helper(193),var(2),numexplod(8510),(enemynear,GetHitVar(hittime)),var(16)

[State -2, クリップボード（追加専用）]
type = AppendToClipboard
trigger1 = 1
IgnoreHitPause = 1
text = "Position X=%d,Y=%d, Velocity X=%f,Y=%f, Hit=%d \n"
params = floor(Pos X),floor(Pos Y),(Vel X),(Vel Y),(MoveHit)

[State -2]
type = null;Explod
trigger1 = roundstate = 2
trigger1 = var(43) = 0
trigger1 = !NumExplod(7050)
anim = 7050
id = 7050
pos = -50,-50
postype = P1
bindtime = -1
ownpal = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
[State -3, AI起動用ヘルパー]
type = helper
triggerall = !NumHelper(10000)
triggerall = Var(59) = 0
triggerall = Var(41) <= 300
TriggerAll = Ctrl
TriggerAll = RoundState = 2
TriggerAll = StateNo = 0
Trigger1 = RoundNo = 1
Trigger2 = TeamMode = Turns
Trigger2 = RoundsExisted = 0
helpertype=normal
name="AI"
stateno=10000
ID=10000
PosType = P1
pos=0,0
keyctrl=1
IgnoreHitPause = 1
pausemovetime=2147483647
supermovetime=2147483647
persistent = 0

;念のため↓も付けておく
[State -3, 関係無いステートに行かないように]
type=changestate
trigger1= ishelper(10000)
trigger1= stateno!=10000
value=10000

