; 仮面ライダービースト　ver1.00

; 基本設定
[Data]
  ;体力ゲージの初期値
life = 1000
  ;攻撃力（これ以上に設定すると強くなる）
attack = 100
  ;防御力（これ以上に設定すると強くなる）
defence = 100
  ;コンボをくらっている時にあがる防御力
fall.defence_up = 50
  ;倒れてから起上がるまでのフレーム数
liedown.time = 60
  ;空中でどれだけコンボが繋がるか（高くすると無限コンボになるので注意）
airjuggle = 999
  ;hitdefで設定していない時の基本ヒットスパークナンバー
sparkno = 2
  ;設定してない時のガードナンバー
guard.sparkno = 40
  ;KOした時に声にエコーをかけるか（１でＯＮ）
KO.echo = 0
 volume = 0
  IntPersistIndex = 30
FloatPersistIndex = 40

[Size]
xscale = 1           ;水平方向の縮尺（通常１）
yscale = 1           ;垂直方向の縮尺（通常１）
ground.back = 15     ;キャラの幅(後方,地上)
ground.front = 16    ;キャラの幅(前方,地上)
air.back = 12        ;キャラの幅(後方,空中)
air.front = 12       ;キャラの幅(前方,空中)
height = 60          ;キャラの高さ
attack.dist = 160    ;攻撃をした時相手がガード体制に入る最低距離
proj.attack.dist = 90;攻撃をした時相手がガード体制に入る最低距離（飛び道具）
proj.doscale = 0     ;上で設定した縮尺を飛び道具にも適用するか（１でＯＮ）   
head.pos = -5, -90   ;頭の大体の座標
mid.pos = -5, -60    ;体の中心の大体の座標
shadowoffset = 0     ;影の垂直方向のオフセット
draw.offset = 0,0    ;使用しない

[Velocity]
walk.fwd  = 2.4      ;前進の速度
walk.back = -2.2     ;後退の速度
run.fwd  = 4.6, 0    ;前ダッシュの速度（ホップする時はyを-にする）
run.back = -5.5,-2.8 ;後ダッシュの速度（ホップする時はyを-にする）
jump.neu = 0,-8.4    ;垂直ジャンプの速度
jump.back = -2.55    ;後ジャンプの速度
jump.fwd = 2.5       ;前ジャンプの速度
runjump.back = -2.55,-8.1 ;後ダッシュしながらのジャンプ速度(オプション)
runjump.fwd = 4,-8.1      ;前ダッシュしながらのジャンプ速度(オプション)
airjump.neu = 0,-8.1      ;２段ジャンプ以降の垂直ジャンプの速度(オプション)
airjump.back = -2.55      ;２段ジャンプ以降の後ジャンプの速度(オプション)
airjump.fwd = 2.5         ;２段ジャンプ以降の前ジャンプの速度

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

;---------------------------------------------------------------------------
; ステイトの解説
; [Statedef STATENO]
; type = ?      S/C/A/L  Ｓ：立ち/Ｃ：屈み/Ａ：空中/Ｌ：ダウン
; movetype = ?  I/A/H    Ｉ：通常状態/Ａ：攻撃状態/Ｈ：ダメージをくらってる状態
; physics = ?   S/C/A/N  Ｓ：立ち/Ｃ：屈み/Ａ：空中/Ｎ：無し
; juggle = ?             その攻撃に使うジャグル数
;
;━━━━━━━━━━━━━━━━
;魔法陣消失
[Statedef 99999]
type	= S
velset	= 0,0
ctrl	= 0
sprpriority=999999

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause =1 

[State 0, SprPriority]
type = SprPriority
trigger1 = prevstateno=13101
value = -3
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 =prevstateno!=13303
time = 1
add = 7,-200,-200
mul = 256,256,256
sinadd = 30,30,0,10
invertall = 0
color = 0
invertall = 0
color = 256

[State 181]
type = trans
trigger1=1
trans = addalpha
alpha = 256-((var(59))*10), 256
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(59) = 1
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = var(59)>=25
ignorehitpause = 1 

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

[State 20, AI]
Type = ChangeState
triggerAll = Var(59) > 0;条件を加えずに必ず戻るようにする。
trigger1 = Time = 0
Value = 0
Ctrl = 1
IgnoreHitPause = 1

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

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

;---------------------------------------------------------------------------
[Statedef 20, 歩行]
type    = S
physics = S
sprpriority = 0

[State 20, AI]
Type = ChangeState
triggerAll = Var(59) > 0;条件を加えずに必ず戻るようにする。
trigger1 = Time = 0
Value = 0
Ctrl = 1
IgnoreHitPause = 1

[State 20, 移動速度] ;前進する速度
type = VelSet
trigger1 = var(59) < 1 ; AIフラグがOFF(人操作時)
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x) ;定数で設定した速度

[State 20, 移動速度] ;後退する速度
type = VelSet
trigger1 = var(59) < 1 ; AIフラグがOFF(人操作時)
trigger1 = command = "holdback" ; 後ろキーが押されてるとき
x = const(velocity.walk.back.x) ;定数で設定した速度

[State 20, アニメ変更] ;前進するアニメに変更
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, アニメ変更] ;後退するアニメに変更
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

;------------------------------------------------------------------------------------
;   AI用基本行動ステート
;------------------------------------------------------------------------------------
;プレイヤー操作とは別にAI用のステートを別に作っておきます。
;そうする事で自分の決めた条件で歩行やジャンプを制御できます。

[Statedef 21]
type	= S
physics	= S
anim	= 20
sprpriority = 0
ctrl	= 0

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

[State 21, VelSet]
type	= VelSet
trigger1= 1
x = const(velocity.walk.fwd.x)

[State 21, ChangeAnim]
type	= ChangeAnim
triggerAll = Vel X > 0
trigger1= Anim != 20 && Anim != 5
trigger2= Anim = 5 && AnimTime = 0
value	= 20

[State 21, ChangeAnim]
type	= ChangeAnim
triggerAll = Vel X < 0
trigger1= Anim != 21 && Anim != 5
trigger2= Anim = 5 && AnimTime = 0
value	= 21

[State 21, ChangeState]
type	= ChangeState
trigger1= RoundState != 2
trigger2= P2BodyDist X < 5 && random <= 200
trigger3= random <= 10
value	= 0
ctrl	= 1

;後退
[Statedef 22]
type	= S
physics	= S
anim	= 21
sprpriority = 0
ctrl	= 0

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

[State 22, VelSet]
type	= VelSet
trigger1= 1
x = const(velocity.walk.back.x)

[State 22, ChangeAnim]
type	= ChangeAnim
triggerAll = Vel X > 0
trigger1= Anim != 20 && Anim != 5
trigger2= Anim = 5 && AnimTime = 0
value	= 20

[State 22, ChangeAnim]
type	= ChangeAnim
triggerAll = Vel X < 0
trigger1= Anim != 21 && Anim != 5
trigger2= Anim = 5 && AnimTime = 0
value	= 21

[State 22, ChangeState]
type	= ChangeState
trigger1= RoundState != 2
trigger2= P2BodyDist X >= 230
trigger3= random <= 20
trigger4= backedgebodydist <= 3
value	= 0
ctrl	= 1

;ジャンプ
[Statedef 39]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 39, VarSet]
type	= VarSet
triggerAll = time = 0
trigger1 = P2BodyDist X >= 65
trigger2 = P2BodyDist X < 65
trigger2 = BackEdgeBodyDist <= 40
sysvar(1) = 1

[State 39, VarSet]
type	= VarSet
triggerAll = time = 0
trigger1= P2BodyDist X < 65
trigger1 = BackEdgeBodyDist > 40
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, 音を鳴らす]
type = PlaySnd
trigger1 = !animtime
value = 20000,0

[State 3100, AfterImage]
type = AfterImage
triggerall = !animtime
trigger1 = prevstateno=100
time = 20
length = 9
TimeGap  = 2
FrameGap = 3
palbright = 0,0,0
palcontrast = 100,100,100
palpostbright = 0,0,0
paladd = -30,-30,-30
palmul = .75,.75,.75
trans = add1

[State -2, 煙ヘルパー呼び出し]
type = Helper
trigger1 = !animtime
name = "Smoke"
stateno = 10040
ID = 10040
size.xscale = 1
size.yscale = 1
postype = p1
pos = 0,0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

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

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

[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 && var(59)<=0
physics = S

[State 120, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C && var(59)<=0
physics = C

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

[State 120, Hi to Lo]
type = StateTypeSet
Trigger1 = StateType = S
Trigger1 = Command = "holddown" && Var(59)<1
trigger2 = StateType != A && ((Enemynear(Var(12)),stateno=var(53)) || (Enemynear(Var(12)),stateno=var(54)) || (Enemynear(Var(12)),statetype = C)) && Var(59)>0
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
Trigger1 = StateType = C
Trigger1 = Command != "holddown" && Var(59)<1
trigger2 = StateType != A && Enemynear(Var(12)),stateno!=var(53) && Enemynear(Var(12)),stateno!=var(54) && Enemynear(Var(12)),statetype != C && Var(59)>0
statetype = S
physics = S

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

[State 130, Stop Guarding]
type = ChangeState
triggerall = var(59) > 0
trigger1 = !inguarddist
value = 140

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

;---------------------------------------------------------------------------
; Stand guard (guarding)
[Statedef 130]
type    = S
physics = S

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

[State 130, Hi to Lo]
type = ChangeState
trigger1 = Var(59)<1
trigger1 = command = "holddown"
Trigger2 = ((Enemynear(Var(12)),stateno=var(53)) || (Enemynear(Var(12)),stateno=var(54)) || (Enemynear(Var(12)),statetype = C)) && Var(59)>0
value = 131

[State 130, Stop Guarding]
type = ChangeState
triggerall = var(59) > 0
trigger1 = !inguarddist
value = 140

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

;---------------------------------------------------------------------------
; Crouch guard (guarding)
[Statedef 131]
type    = C
physics = C

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

[State 130, Hi to Lo]
type = ChangeState
trigger1 = Var(59)<1
trigger1 = command != "holddown"
Trigger2 = Enemynear(Var(12)),stateno!=var(53) && Enemynear(Var(12)),stateno!=var(54) && Enemynear(Var(12)),statetype != C && Var(59)>0
value = 130

[State 130, Stop Guarding]
type = ChangeState
triggerall = var(59) > 0
trigger1 = !inguarddist
value = 140

[State 130, Stop Guarding]
type = ChangeState
triggerall = var(59)<= 0
trigger1 = command != "holdback"
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)<1 && command = "holdback"
trigger2 = var(59)>0
value = 130

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

[State 130, Stop Guarding]
type = ChangeState
triggerall = var(59) > 0
trigger1 = !inguarddist
value = 140

[State 130, Stop Guarding]
type = ChangeState
triggerall = var(59)<= 0
trigger1 = command != "holdback"
trigger2 = !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 && var(59)<=0
physics = S

[State 140, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C && var(59)<=0
physics = C

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

[State 140, Hi to Lo]
type = StateTypeSet
Trigger1 = StateType = S
Trigger1 = Command = "holddown" && Var(59)<1
Trigger2 = StateType != A && ((Enemynear(Var(12)),stateno=var(53)) || (Enemynear(Var(12)),stateno=var(54)) || (Enemynear(Var(12)),statetype = C)) && Var(59)>0
statetype = C
physics = C

[State 140, Lo to Hi]
type = StateTypeSet
Trigger1 = StateType = C
Trigger1 = Command != "holddown" && Var(59)<1
Trigger2 = StateType != A && Enemynear(Var(12)),stateno!=var(53) && Enemynear(Var(12)),stateno!=var(54) && Enemynear(Var(12)),statetype != C && Var(59)>0
statetype = S
physics = S

;[State 140, 5] ;Implemented within engine
;type = ChangeState
;trigger1 = AnimTime = 0
;value = (statetype = C)*11 + (statetype = A)*51

;---------------------------------------------------------------------------
; 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
triggerall = var(59) <= 0
trigger1 = HitShakeOver
value = 151 + 2*(command="holddown")

[State 150, 2]
type = ChangeState
triggerall = var(59) > 0
trigger1 = HitShakeOver
value = 151 + 2*(StateType = C)

[State 150, Hi to Lo]
type = StateTypeSet
Trigger1 = StateType = S
Trigger1 = Command = "holddown" && Var(59)<1
Trigger2 = StateType != A && ((Enemynear(Var(12)),stateno=var(53)) || (Enemynear(Var(12)),stateno=var(54)) || (Enemynear(Var(12)),statetype = C)) && Var(59)>0
statetype = C
physics = C

[State 150, Lo to Hi]
type = StateTypeSet
Trigger1 = StateType = C
Trigger1 = Command != "holddown" && Var(59)<1
Trigger2 = StateType != A && Enemynear(Var(12)),stateno!=var(53) && Enemynear(Var(12)),stateno!=var(54) && Enemynear(Var(12)),statetype != C && Var(59)>0
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 = StateType = S
Trigger1 = Command = "holddown" && Var(59)<1
Trigger2 = StateType != A && ((Enemynear(Var(12)),stateno=var(53)) || (Enemynear(Var(12)),stateno=var(54)) || (Enemynear(Var(12)),statetype = C)) && Var(59)>0
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
Trigger1 = StateType = C
Trigger1 = Command != "holddown" && Var(59)<1
Trigger2 = StateType != A && Enemynear(Var(12)),stateno!=var(53) && Enemynear(Var(12)),stateno!=var(54) && Enemynear(Var(12)),statetype != C && Var(59)>0
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 150, 2]
type = ChangeState
triggerall = var(59) <= 0
trigger1 = HitShakeOver
value = 151 + 2*(command="holddown")

[State 150, 2]
type = ChangeState
triggerall = var(59) > 0
trigger1 = HitShakeOver
value = 151 + 2*(StateType = C)

[State 152, Hi to Lo]
type = StateTypeSet
Trigger1 = StateType = S
Trigger1 = Command = "holddown" && Var(59)<1
Trigger2 = StateType != A && ((Enemynear(Var(12)),stateno=var(53)) || (Enemynear(Var(12)),stateno=var(54)) || (Enemynear(Var(12)),statetype = C)) && Var(59)>0
statetype = C
physics = C

[State 152, Lo to Hi]
type = StateTypeSet
Trigger1 = StateType = C
Trigger1 = Command != "holddown" && Var(59)<1
Trigger2 = StateType != A && Enemynear(Var(12)),stateno!=var(53) && Enemynear(Var(12)),stateno!=var(54) && Enemynear(Var(12)),statetype != C && Var(59)>0
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 = StateType = S
Trigger1 = Command = "holddown" && Var(59)<1
Trigger2 = StateType != A && ((Enemynear(Var(12)),stateno=var(53)) || (Enemynear(Var(12)),stateno=var(54)) || (Enemynear(Var(12)),statetype = C)) && Var(59)>0
statetype = C
physics = C

[State 153, Lo to Hi]
type = StateTypeSet
Trigger1 = StateType = C
Trigger1 = Command != "holddown" && Var(59)<1
Trigger2 = StateType != A && Enemynear(Var(12)),stateno!=var(53) && Enemynear(Var(12)),stateno!=var(54) && Enemynear(Var(12)),statetype != C && Var(59)>0
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 132, 6]
type = ChangeState
triggerall = sysvar(0)
triggerall = inguarddist
trigger1 = Var(59)<1 && command = "holdback"
trigger2 = var(59)>0
value = 130

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

;---------------------------------------------------------------------------
; タイムオーバーで負けた時
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

;---------------------------------------------------------------------------
; 勝った動作１
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181+((var(10))*10000)

;---------------------------------------------------------------------------
; 勝った動作２
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, 2]
type = AssertSpecial
trigger1 = Time = [0,150]
flag = roundnotover

[State 0, VarRandom]
type = VarRandom
trigger1 = !time
v = 21
range = 0,1
ignorehitpause = 1

[State 181, 3]
type = PlaySnd
trigger1 = !time
value = 180,var(21)

;---------------------------------------------------------------------------
; 勝った動作２
[Statedef 10181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, 2]
type = AssertSpecial
trigger1 = Time = [0,150]
flag = roundnotover

[State 181, 3]
type = PlaySnd
trigger1 = !time
value = 10200,0

[State 181, 3]
type = PlaySnd
trigger1 = animelem=2
value = 100,1

;---------------------------------------------------------------------------
; 勝った動作２
[Statedef 20181]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 181, 2]
type = AssertSpecial
trigger1 = Time = [0,180]
flag = roundnotover

[State 181, 3]
type = PlaySnd
trigger1 = !time
value = 3900,4

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

[Statedef 10001]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 10001
sprpriority = 4

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

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

[Statedef 10002]
type    = A
movetype= A
physics = N
velset = -2,0
anim = 10002
sprpriority = 4

[State 3000, 4]
type = Velset
trigger1 = animelem = 1
x = -3.6

[State 1206, 2]
type = destroyself
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; 開始前の動作
[Statedef 190]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 190, 1] 
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

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

[State 190, 3]
type = PlaySnd
trigger1 = animelem=4
value = 100, 0
volume = 300

[State 190, 3]
type = PlaySnd
trigger1 = AnimElem = 13
value = 100, 2

[State 190, 3]
type = PlaySnd
trigger1 = AnimElem = 13
value = 100, 11

[State 190, 3]
type = PlaySnd
trigger1 = AnimElem = 14
value = 100, 3
volume = 300

[State 190, 3]
type = PlaySnd
trigger1 = AnimElem = 14
value = 100, 12

[State 190, 3]
type = PlaySnd
trigger1 = AnimElem = 15
value = 100, 4
volume = 300

[State 190, 3]
type = PlaySnd
trigger1 = time = 1
value = 100, 5
[State 190, 3]
type = PlaySnd
trigger1 = time = 1
value = 100, 10

[State 190, 3]
type = PlaySnd
trigger1 = animelem=2
value = 100, 13

[State 190, 3]
type = PlaySnd
trigger1 = AnimElem = 17 =< time = 8
value = 100, 6
volume = 300

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

 [State 9500,エフェクト]
type = Explod
trigger1 = AnimElem = 14
ID = 3025
anim = 3025
postype = p1
pos = -8,-64
vel = 0,0
accel = 0,0
scale = 0.5,0.5
RemoveTime = -2
sprpriority = 5
RemoveOnGethit = 1
ownpal = 1
supermovetime = 999
pausemovetime = 999

[State -2, アーマーヘルパー呼び出し]
type = Helper
trigger1= AnimElem = 15
name = "Magic Square"
stateno = 10191
ID = 10191
size.xscale = 0.4
size.yscale = 0.4
postype = p1
pos = -9,-69
sprpriority = 9999999
ownpal = 1
;━━━━━━━━━━━━━━━━
[Statedef 10191]
type	= S
physics=S
anim	= 191
velset	= 10,0
ctrl	= 0
sprpriority=999999

[State 0, SelfState]
type = SelfState
trigger1 =!ishelper
value =50
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
triggerall = !time
trigger1 = ishelper(13012)
trigger2 = ishelper(13013)
x = 0
y = 0
ignorehitpause = 1

[State 0, PosSet]
type = PosSet
triggerall=!time
triggerall=root,var(7)
triggerall=playeridexist(root,var(7))
trigger1 = ishelper(13012)
x = playerid(root,var(7)),pos x
y = playerid(root,var(7)),pos y-50
ignorehitpause = 1
[State 0, PosSet]
type = PosSet
triggerall=!time
triggerall=root,var(8)
triggerall=playeridexist(root,var(8))
trigger1 = ishelper(13013)
x = playerid(root,var(8)),pos x
y = playerid(root,var(8)),pos y-50
ignorehitpause = 1

[State 0, StateTypeSet]
type = StateTypeSet
triggerall=winko
trigger1 = ishelper(13012)
trigger2 = ishelper(13013)
movetype = A
ignorehitpause = 1

[state ]
type=hitdef
triggerall=winko
trigger1 = ishelper(13012)
trigger2 = ishelper(13013)
attr=,aa,ap,at
hitflag=mafd
priority=7,h
pausetime=0,0
numhits=0
sparkno=-1
p2stateno=13014
id=210
ignorehitpause=1

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 7,7,-200
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause =1 

[State 0, VarAdd]
type = VarSet
trigger1 = !time
fvar(1) = 0.1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)
ignorehitpause = 1 

[State 0, VarAdd]
type = VarSet
trigger1 = fvar(1)<1
fvar(1) = 1
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = fvar(1)>1
fvar(1) = -0.075
ignorehitpause = 1

[State 181]
type = trans
trigger1=1
trans = addalpha
alpha = (var(1)*17), 256
ignorehitpause = 1

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

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "rdx = %f rdy = %f velx = %f vely = %f"
params = rootdist x,rootdist y,vel x,vel y
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
triggerall=!ishelper(13013)
triggerall=!ishelper(13012)
trigger1 = time>=42
value =10192
ignorehitpause = 1 

[State 0, ChangeState]
type = ChangeState
triggerall = root,time>=40
triggerall = root,stateno=13012
trigger1=!ishelper(13013)
trigger2=!ishelper(13012)
value =13013
ignorehitpause = 1 
;━━━━━━━━━━━━━━━━
[Statedef 13013]
type	= S
physics=N
ctrl	= 0
sprpriority=999999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 100,9
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 7,7,-200
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)
ignorehitpause = 1 

[State 0, VarAdd]
type = VarSet
trigger1 = fvar(1)<0.5
fvar(1) = 0.5
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = fvar(1)>0.5
fvar(1) = -0.025
ignorehitpause = 1

[State 200]
type = VelAdd
trigger1 =RootDist X > 0
x= 1
ignorehitpause = 1

[State 200]
type = VelAdd
trigger1 =RootDist X < 0
x= -1
ignorehitpause = 1

[State 200]
type = VelAdd
trigger1 =RootDist Y > 75
y= 1
ignorehitpause = 1

[State 200]
type = VelAdd
trigger1 =RootDist Y < 75
y= -1
ignorehitpause = 1

[State xxx, x]
type = posset
trigger1 = pos y >=-50
y = -50
ignorehitpause=1

[State 181]
type = trans
trigger1=1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "rdx = %f rdy = %f velx = %f vely = %f"
params = rootdist x,rootdist y,vel x,vel y
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = rootdist x <=0
trigger1 = rootdist y <=90
value = 100,7
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = rootdist x <=0
trigger1 = rootdist y <=90
ignorehitpause = 1
;━━━━━━━━━━━━━━━━
[Statedef 10192]
type	= S
velset	= 0,0
ctrl	= 0
sprpriority=999999

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 7,7,-200
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 181]
type = trans
trigger1=rootdist x>=43
trans = addalpha
alpha = 256-((var(2))*12), 256
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause =1 

[State 0, VelAdd]
type = VelSet
trigger1 = rootdist x<43
trigger1 = var(1)>=20
x = -1.25
ignorehitpause =1

[State 0, VelAdd]
type = VelSet
triggerall=vel x<0
trigger1 = rootdist x>=43
trigger1 = var(1)>=20
x = 0
ignorehitpause =1

[State 0, VelAdd]
type = Velset
trigger1=vel x>=0
x = 0
ignorehitpause =1

[State 0, SprPriority]
type = SprPriority
trigger1 = rootdist x>=10
value = -3
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = rootdist x>=43
var(2) = 1
ignorehitpause = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = rootdist x>=8
var(3) = 1
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = var(2)>=43
ignorehitpause = 1

;---------------------------------------------------------------------------
; 立ち弱攻撃
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim = 200
sprpriority = 2

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

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 1
value = S200, random%3
channel = 0

[State 200, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Light
damage    = 25
getpower  = 70,35
guardflag = MA
pausetime = 12,12
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -10,-85
hitsound   = s10200,0
guardsound = s10210,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2.5,-3.5

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

;---------------------------------------------------------------------------
; 立ち中攻撃
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 0
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2

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

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 1
value = S200, random%3
channel = 0

[State 210, 2] 
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage    = 50
getpower  = 80,40
animtype  = Medium
hitflag = MAF
guardflag = MA
pausetime = 12,12
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -10,-73
hitsound   = s10200,4
guardsound = s10210,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -7
air.velocity = -3,-4

[State 210, 3]
type = PosAdd
trigger1 = AnimElem = 7
x = 12

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

;---------------------------------------------------------------------------
; 立ち強攻撃
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 1

[State 220, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 10220, 2

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 1
value = S200, random%3
channel = 0

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Heavy
damage    = 75
getpower  = 90,45
guardflag = MA
pausetime = 12,12
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -10,-80
hitsound   = s10200,6
guardsound = s10210,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5.5
air.velocity = -2.5,-4

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


;---------------------------------------------------------------------------
;屈み弱攻撃
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 0
ctrl = 0
anim = 400
sprpriority = 2

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

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 1
value = S200, random%3
channel = 0

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 25
getpower  = 70,35
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -5,-65
hitsound   = s10200,0
guardsound = s10210,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

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

;---------------------------------------------------------------------------
;屈み中攻撃
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 0
ctrl = 0
anim = 410
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = Time = 2
value = 10220, 1

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 1
value = S200, random%3
channel = 0

[State 410, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 50
getpower  = 80,40
animtype  = Medium
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -10,-15
hitsound   = s10200,4
guardsound = s10210,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 16
ground.velocity = -4
air.velocity = -3,-4
guard.velocity = -5

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

;---------------------------------------------------------------------------
;屈み強攻撃
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 0
ctrl = 0
anim = 420
sprpriority = 2

[State 420, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 10220, 2

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 1
value = S200, random%3
channel = 0

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 75
getpower  = 90,45
animtype  = Heavy
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -5,-60
hitsound   = s10200,6
guardsound = s10210,0
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
fall = 1

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

;---------------------------------------------------------------------------
;空中弱攻撃
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 0
ctrl = 0
anim = 600
sprpriority = 2

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

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 1
value = S200, random%3
channel = 0

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 25
getpower  = 70,35
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -5,-90
hitsound   = s10200,0
guardsound = s10210,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -4
air.velocity = -2,-3

;---------------------------------------------------------------------------
;空中中攻撃
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 0
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 1]
type = PlaySnd
trigger1 = Time = 2
value = 10220, 1

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 1
value = S200, random%3
channel = 0

[State 610, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 50
getpower  = 80,40
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -10,-35
hitsound   = s10200,4
guardsound = s10210,0
animtype = Med
ground.type = High
ground.slidetime = 14
ground.hittime  = 18
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;空中強攻撃
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 0
ctrl = 0
anim = 620
sprpriority = 2

[State 620,１ ]
type = PlaySnd
trigger1 = Time = 1
value = 10220, 2

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 0
value = S200, random%3
channel = 0
[State 620, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 75
getpower  = 90,45
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = S8200+var(5)
guard.sparkno = S8100
sparkxy = -10,-90
hitsound   = s10200,6
guardsound = s10210,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 18
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;ライダー投げ
[Statedef 800]
type = S
MoveType = A
physics = S
juggle  = 0
velset = 0,0
anim = 800
ctrl = 0

[State 800 , 0]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;攻撃属性: これは Standing, Normal Throw（立ち通常投げ）
hitflag = M-          ;相手がやられ状態ではない地上の時でしか掴む事が出来ません
priority = 1, Miss    ;投げなので優先度を低く、かつmissかdodgeの属性でなければなりません
sparkno = -1          ;-1にすればヒットスパークが表示しなくなります
sprpriority = 1       ;攻撃が当たった時に画像表示優先度を1に出来ます
p1facing = ifelse(command = "holdfwd", 0, 0) ;攻撃が当たった時の自分の向き ★６
p2facing = 0          ;攻撃が当たった時の相手の向き
p1stateno = 801       ;自分のステート変更
p2stateno = 802      ;相手を制御するステートに行かせる
guard.dist = 0        ;相手がガード状態に移行出来る距離（現在は0なのでガード不可）
fall = 1              ;1にすれば相手がダウン状態になる
ID = 800

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

;---------------------------------------------------------------------------
[Statedef 801]
type    = S
movetype= A
physics = N
anim = 801
poweradd = 200

[State 801, 音を鳴らす]
type = PlaySnd
trigger1 = !time
value = 10200,7

[State 801, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 3
value = 10200,2

[State 1027, エフェクト表示]
type = Explod
trigger1 = AnimElem = 3
anim = 8200+var(5)
sprpriority = 9
pos = 27,-108
bindtime = 1

[State 200, 効果音]
type = PlaySnd
trigger1 = AnimElem = 3
value = S200, random%3
channel = 0

[State 801, 掴んだ相手の位置]
type = TargetBind
trigger1 = animelem=1
pos = 53, 0

[State 801, 掴んだ相手の位置]
type = TargetBind
trigger1 = animelem=2
pos = 15, -9

[State 903, 11] ;Damage target
type = TargetLifeAdd
Trigger1 = AnimElem = 3
value = -85

[State 903, 11] ;Damage target
type = TargetState
Trigger1 = AnimElem = 3
value = 803

[State 903, 12] ;Shake
type = EnvShake
Trigger1 = AnimElem = 3
time = 25

[State 903, 16]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Thrown by Throw2
[Statedef 802]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 904, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 802

[State 0, SprPriority]
type = SprPriority
trigger1 = time=15
value = 8
ignorehitpause = 1

[State 0, SelfState]
type = SelfState
trigger1 =time>=60
value =5050

;---------------------------------------------------------------------------
;
[Statedef 803]
type    = A
movetype= H
physics = N
velset = -5,-4.5
poweradd = 40

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(selfanimexist(5070),5070,0)

[State 821, 速度加算] ;重力
type = VelAdd
Trigger1 = 1
y = .35

[State 821, 制御解除して相手のステートに戻す]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;common1.cns参照

;---------------------------------------------------------------------------
;ダッシュ       
[Statedef 100]          
type = A             
physics = A           
ctrl = 0
anim = 100
velset = 5.5,-2.8

[State -2, Common Effect]
type = Explod
trigger1 = !time
anim = 10105
facing = 1
pos = 0,5
scale = .55,.55
sprpriority = 0
postype=p1
bindtime=1
ownpal = 1
Supermovetime = -1

[State 2424]
type = PlaySnd
trigger1 = time = 1
value = 20000, 2

[State 100, 1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 101

;---------------------------------------------------------------------------
;ダッシュ2
[Statedef 101]
type    = S
physics = S
ctrl = 1

[State 101, 1]
type = VelSet
trigger1 = Time = 0
y = 0

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

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

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State -2, Common Effect]
type = Explod
trigger1 = !time
anim = 10105
facing = -1
pos = 0,5
postype=p1
scale = .55,.55
sprpriority = 0
bindtime=1
ownpal = 1
Supermovetime = -1

[State 2424]
type = PlaySnd
trigger1 = time = 1
value = 20000, 2

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

;-----------------------------------------------------------------------
;ライダーキック （弱）開始
[Statedef 1000]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 1000
velset = 0, 0
PowerAdd = 0

[State 1010, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 1001
;-----------------------------------------------------------------------
[Statedef 1001]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 2, -5.5
anim = 1001
velset = 0, 0
PowerAdd = 0

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 0
value = S21000, random%3
channel = 0

[State 1011, 1]
type = HitDef
trigger1 = !time
attr = A, SA
animtype = Up
damage = 80, 20
guardflag = HA
hitflag = MAF
getpower  = 40,20
pausetime = 15, 15
sparkno = S8210+var(5)
guard.sparkno = S8105
sparkxy = -5,-90
hitsound   = s10200,5
guardsound = s10210,0
ground.type = High
guard.slidetime = 3
ground.hittime  = 15
ground.velocity = -4, -7
air.velocity = -4, -7
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 176

[State 0, PalFXWiz]
type = null;PalFX
trigger1 = animelemtime(2)=[0,5]
time = 1
add = 255,255,255
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1002
pos = 1, -123
sprpriority = 9999
postype = p1
supermove = 1
bindtime = -1
ownpal = 1
scale = .8,.8

[State 1010, 1]
type = PlaySnd
trigger1 = !time
value = 4444, 0
volume=-100
[State 1010, 1]
type = PlaySnd
trigger1 = !time
value = 4444, 2
volume=-100

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 20000, 1
channel = 1

[State 0, Gravity]
type = Gravity
trigger1 = animelemtime(1)>=3

[State 1010, 2]
type = ChangeState
trigger1 = movecontact
trigger1 = command="holdback"
value = 1002
ignorehitpause=1

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

;-----------------------------------------------------------------------
[Statedef 1002]
type    = A
movetype= I
physics = N
ctrl = 0
velset = -5, -2
anim = 1003
velset = 0, 0
PowerAdd = 30

[State 0, PalFXWiz]
type = null;PalFX
trigger1 = animelemtime(1)=[0,5]
time = 1
add = 255,255,255
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, Gravity]
type = Gravity
trigger1 = animelemtime(1)>=6

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

;-----------------------------------------------------------------------
;ライダーキック （弱）開始
[Statedef 1010]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 1000
velset = 0, 0
PowerAdd = 0

[State 1010, 2]
type = ChangeState
trigger1 = Time = 9
value = 1011

;-----------------------------------------------------------------------
[Statedef 1011]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 2, -8.5
anim = 1001
velset = 0, 0
PowerAdd = 0

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 0
value = S21000, random%3
channel = 0

[State 1011, 1]
type = HitDef
trigger1 = !time
attr = A, SA
animtype = Up
damage = 80, 20
guardflag = HA
hitflag = MAF
getpower  = 40,20
pausetime = 15, 15
sparkno = S8210+var(5)
guard.sparkno = S8105
sparkxy = -5,-90
hitsound   = s10200,5
guardsound = s10210,0
ground.type = High
guard.slidetime = 3
ground.hittime  = 15
ground.velocity = -4, -7
air.velocity = -4, -7
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 176

[State 0, PalFXWiz]
type = null;PalFX
trigger1 = animelemtime(2)=[0,5]
time = 1
add = 255,255,255
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1002
pos = 1, -123
sprpriority = 9999
postype = p1
supermove = 1
bindtime = -1
ownpal = 1
scale = .8,.8

[State 1010, 1]
type = PlaySnd
trigger1 = !time
value = 4444, 0
volume=-100
[State 1010, 1]
type = PlaySnd
trigger1 = !time
value = 4444, 2
volume=-100

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 20000, 1
channel = 1

[State 0, Gravity]
type = Gravity
trigger1 = animelemtime(1)>=3

[State 1010, 2]
type = ChangeState
triggerall = movecontact
trigger1 = var(59)<1 && command="holdback"
trigger2 = var(59)>0 && moveguarded && p2bodydist X >= 5 && backedgebodydist >= 40 && time >= 10
value = 1002
ignorehitpause=1

[State 1010, 2]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52
;-----------------------------------------------------------------------
;ライダーキック （弱）開始
[Statedef 1020]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 1000
velset = 0, 0
PowerAdd = -500

[State 1010, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 1021

;-----------------------------------------------------------------------
[Statedef 1021]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 2, -8.5
anim = 1001
velset = 0, 0
PowerAdd = 0

[State 1020, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 15

[State 1020, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 15
add = 32,16,0
sinadd = 64,32,5,3

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 0
value = S21000, random%3
channel = 0

[State 1011, 1]
type = HitDef
trigger1 = animelemtime(1)%3=0
attr = A, SA
animtype = Up
damage = ceil(30 * (fVar(1))), 9
guardflag = HA
hitflag = MAF
getpower  = 0,0
pausetime = 5, 5
sparkno = S8210+var(5)
guard.sparkno = S8105
sparkxy = -5,-90
hitsound   = s10200,5
guardsound = s10210,0
ground.type = High
guard.slidetime = 3
ground.hittime  = 15
ground.velocity = -4, -7
air.velocity = -4, -7
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 176

[State 0, PalFXWiz]
type = null;PalFX
trigger1 = animelemtime(2)=[0,5]
time = 1
add = 255,255,255
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1002
pos = 1, -123
sprpriority = 9999
postype = p1
supermove = 1
bindtime = -1
ownpal = 1
scale = .8,.8

[State 1010, 1]
type = PlaySnd
trigger1 = !time
value = 4444, 0
volume=-100
[State 1010, 1]
type = PlaySnd
trigger1 = !time
value = 4444, 2
volume=-100

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 20000, 1
channel = 1

[State 0, Gravity]
type = Gravity
trigger1 = animelemtime(1)>=3

[State 1010, 2]
type = ChangeState
trigger1 = movecontact
trigger1 = command="holdback"
value = 1002
ignorehitpause=1

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

;-------------------------------------------------------------------------------
; ストームシュート （弱）
[Statedef 1100]
type = S
movetype = A
physics = S
anim = 1100
velset = 0
ctrl = 0
poweradd = 0
juggle = 4

[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 4444, 10

[State 0, VelSet]
type = VelSet
trigger1 = animelemno(0)=2
x = -2
ignorehitpause = 1

[State 1100,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1101
ctrl = 0

;-------------------------------------------------------------------------------
; ストームシュート （強）
[Statedef 1101]
type = S
movetype = A
physics = S
anim = 1101
velset = 20,0
ctrl = 0
poweradd = 0
juggle = 4

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 0
value = S21000, random%3
channel = 0

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

[State 100]
Type           = Afterimage
Trigger1       = Time = 0
Trans          = Add
TimeGap        = 2
FrameGap       = 3
Time           = 5
PalBright      = 0, 0, 0
PalContrast    = 70, 70, 70
PalAdd         = 0, 0, 160
PalMul         = 1, 1, 1

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 11100
pos = 30, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = .8,.8

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 11101
pos = 101, -75
sprpriority = 99
postype = p1
supermove = 1
bindtime = -1
ownpal = 1
scale= .8,.8

[State 1020, 1]
type = PlaySnd
trigger1 = time = 0
value = 4444, 11
[State 1020, 1]
type = PlaySnd
trigger1 = time = 0
value = 11100, 0
volume=255

[State 1120, 1]
type = HitDef
trigger1 = !time
attr = S, SA
damage    = 80,20
getpower  = 130,65
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = S8210+var(5)
guard.sparkno = S8105
sparkxy = -5,-60
hitsound   = S10200,5
guardsound = S10210,0
ground.type = high
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -7, -4
air.velocity = -6.5,-3.5
envshake.time = 30
envshake.ampl = 8
envshake.freq = 200
fall = 1
fall.recover = 0

[State 1100,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 1102
ctrl = 0

;-------------------------------------------------------------------------------
[Statedef 1102]
type = S
movetype = A
physics = S
anim = 1102
velset = 5,0
ctrl = 0
poweradd = 0
juggle = 4

[State 1100,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1103
ctrl = 0

;-------------------------------------------------------------------------------
[Statedef 1103]
type = S
movetype = A
physics = S
anim = 1103
velset = 0,0
ctrl = 0
poweradd = 0
juggle = 4

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

;-------------------------------------------------------------------------------
; ストームシュート （弱）
[Statedef 1110]
type = S
movetype = A
physics = S
anim = 1110
velset = 0
ctrl = 0
poweradd = 0
juggle = 4

[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 4444, 10

[State 0, VelSet]
type = VelSet
trigger1 = animelemno(0)=2
x = -2
ignorehitpause = 1

[State 1100,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1111
ctrl = 0

;-------------------------------------------------------------------------------
; ストームシュート （強）
[Statedef 1111]
type = S
movetype = A
physics = S
anim = 1101
velset = 30,0
ctrl = 0
poweradd = 0
juggle = 4

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 0
value = S21000, random%3
channel = 0

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

[State 100]
Type           = Afterimage
Trigger1       = Time = 0
Trans          = Add
TimeGap        = 2
FrameGap       = 3
Time           = 5
PalBright      = 0, 0, 0
PalContrast    = 70, 70, 70
PalAdd         = 0, 0, 160
PalMul         = 1, 1, 1

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 11100
pos = 30, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = .8,.8

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 11101
pos = 101, -75
sprpriority = 99
postype = p1
supermove = 1
bindtime = -1
ownpal = 1
scale= .8,.8

[State 1020, 1]
type = PlaySnd
trigger1 = time = 0
value = 4444, 11
[State 1020, 1]
type = PlaySnd
trigger1 = time = 0
value = 11100, 0
volume=255

[State 1120, 1]
type = HitDef
trigger1 = !time
attr = S, SA
damage    = 120,50
getpower  = 0,0
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = S8210+var(5)
guard.sparkno = S8105
sparkxy = -5,-60
hitsound   = S10200,5
guardsound = S10210,0
ground.type = high
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -7, -4
air.velocity = -6.5,-3.5
envshake.time = 30
envshake.ampl = 8
envshake.freq = 200
fall = 1
fall.recover = 0

[State 1100,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 1102
ctrl = 0

;-------------------------------------------------------------------------------
[Statedef 1112]
type = S
movetype = A
physics = S
anim = 1112
velset = 5,0
ctrl = 0
poweradd = 0
juggle = 4

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1160
pos = 100, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 1100,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1113
ctrl = 0

;-------------------------------------------------------------------------------
[Statedef 1113]
type = S
movetype = A
physics = S
anim = 1113
velset = 0,0
ctrl = 0
poweradd = 0
juggle = 4

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

;-------------------------------------------------------------------------------
; ストームシュート （弱）
[Statedef 1120]
type = S
movetype = A
physics = S
velset = 0
ctrl = 0
juggle = 4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim!=1100
value = 1100
ignorehitpause = 1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelemtime(1)=0
value = -500
ignorehitpause =1 

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 1121
time = 1
ignorehitpause = 1

[State 1020, 1]
type = PlaySnd
trigger1 = animelemtime(1)=0
value = 4444, 10

[State 0, VelSet]
type = VelSet
trigger1 = animelemno(0)=2
x = -2
ignorehitpause = 1

[State 1020, Blink Yellow]
type = PalFX
trigger1 = animelemtime(1)=0
time = 15
add = 32,16,0
sinadd = 64,32,5,3

[State 1100,4]
type = ChangeState
trigger1 = !alive
value = 5050

[State 1100,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1111
ctrl = 0

;-------------------------------------------------------------------------------
; ストームシュート （強）
[Statedef 1121]
type = S
movetype = H
physics = N

[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 2
add = 250,0,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 1100,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1111
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time= 1
value = 1120
ignorehitpause = 1
;-------------------------------------------------------------------------------
[Statedef 1122]
type = S
movetype = A
physics = S
anim = 1122
velset = 5,0
ctrl = 0
poweradd = 0
juggle = 4

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1160
pos = 100, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 1100,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1123
ctrl = 0

;-------------------------------------------------------------------------------
[Statedef 1123]
type = S
movetype = A
physics = S
anim = 1113
velset = 0,0
ctrl = 0
poweradd = 0
juggle = 4

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

;-------------------------------------------------------------------------------
; セイバースラッシュ（弱）
[Statedef 1200]
type = S
movetype = I
physics = S
anim = 1200
velset = 0
ctrl = 0
poweradd =-500
juggle = 4

[State 1020, 1]
type = lifeadd
triggerall = alive = 1
trigger1 = AnimElem = 5 =< time = 1
ignorehitpause = 0
value = 100;floor(lifemax*0.1)

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 5 =< time = 1
anim = 11000
pos = 5,-76
postype = p1
postype = back
sprpriority = 3
ownpal=1
removeongethit=1

[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElem = 5 =< time = 1
time = 20
add = 0,120,150
mul = 256,256,256
sinadd = 0,30,30,30
invertall = 0
color = 256

[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 100, 2
[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 4444, 7
[State 1020, 1]
type = null;PlaySnd
trigger1 = time = 51
value = 11300, 0
channel=4

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 4444, 1
channel=4

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 5 =< time = 1
value = 600, 2

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

;-------------------------------------------------------------------------------
; セイバースラッシュ（強）
[Statedef 1210]
type = S
movetype = I
physics = S
anim = 1200
velset = 0
ctrl = 0
poweradd =-1000
juggle = 4

[State 1020, 1]
type = lifeadd
triggerall = alive = 1
trigger1 = AnimElem = 5 =< time = 1
ignorehitpause = 0
value = 200;floor(lifemax*0.2)

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 5 =< time = 1
anim = 11000
pos = 5,-76
postype = p1
postype = back
sprpriority = 3
removeongethit=1
ownpal=1

[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElem = 5 =< time = 1
time = 20
add = 0,120,150
mul = 256,256,256
sinadd = 0,30,30,30
invertall = 0
color = 256

[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 100, 2
[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 4444, 7
[State 1020, 1]
type = null;PlaySnd
trigger1 = time = 51
value = 11300, 0
channel=4

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 4444, 1
channel=4

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 5 =< time = 1
value = 600, 2

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

;-------------------------------------------------------------------------------
; セイバースラッシュ（強）
[Statedef 1220]
type = S
movetype = I
physics = S
anim = 1200
velset = 0
ctrl = 0
poweradd =-1500
juggle = 4

[State 1020, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 15
add = 32,16,0
sinadd = 64,32,5,3

[State 1020, 1]
type = lifeadd
triggerall = alive = 1
trigger1 = AnimElem = 5 =< time = 1
ignorehitpause = 0
value = 300;floor(lifemax*0.3)

[State 1027, Spark]
type = Explod
trigger1 = AnimElem = 5 =< time = 1
anim = 11000
pos = 5,-76
postype = p1
postype = back
sprpriority = 3
removeongethit=1
ownpal=1

[State 0, PalFXWiz]
type = PalFX
trigger1 = AnimElem = 5 =< time = 1
time = 20
add = 0,120,150
mul = 256,256,256
sinadd = 0,30,30,30
invertall = 0
color = 256

[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 100, 2
[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 4444, 7
[State 1020, 1]
type = null;PlaySnd
trigger1 = time = 51
value = 11300, 0
channel=4

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 4444, 1
channel=4
[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 5 =< time = 1
value = 4444, 8

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 5 =< time = 1
value = 600, 2

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

;-------------------------------------------------------------------------------
;･ﾂクｩ??ーブ
[Statedef 1300]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 1300
sprpriority = 2

[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 100, 2
[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 4444, 4

[State 1020, 1]
type = null;PlaySnd
trigger1 = AnimElem = 3
value = 4444, 1
volume = 1000

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

[State 1200, 5]
type = ModifyExplod
trigger1 = time = [20,25]
ID = 3000
scale = (time*1.5-27) *.40, (25.2 - time) * 0.1

[State 1200, 6]
type = PalFX
trigger1 = Time = 11
time = 20
sinadd =  255,255,255,38
ignorehitpause = 1

[State 1200, 7]
type = VarSet
triggerall = Time = 0
trigger1 = var(59)<1 && command = "Chamelon 1"
trigger2 = var(59)>0
var(2) = 1

[State 1200, 8]
type = VarSet
trigger1 = Time = 0
trigger1 = var(59)<1 && command = "Chamelon 2"
var(2) = 2

[State 1200, 11]
type = ChangeState
trigger1 = AnimTime = 0
value = 1301

[State -2, アーマーヘルパー呼び出し]
type = Helper
trigger1= Animelem=2
name = "Magic Square"
stateno = 11300
ID = 11300
size.xscale = 0.2
size.yscale = 0.2
postype = p1
pos = 69,-95
sprpriority = 9999999
ownpal = 1
;━━━━━━━━━━━━━━━━
;━━━━━━━━━━━━━━━━
[Statedef 11300]
type	= S
velset	= 0,0
anim = 191
ctrl	= 0
sprpriority=999999

[State 0, VarAdd]
type = VarSet
trigger1 = !time
fvar(1) = 1
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 7,7,-200
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 181]
type = trans
trigger1=1
trans = addalpha
alpha = 256-((var(2))*12), 256
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause =1 

[State 0, VelAdd]
type = VelAdd
trigger1 = var(2)<=8
x = -1.25
ignorehitpause =1
[State 0, VelAdd]
type = VelAdd
trigger1 = var(2)>=8
x = 1.25
ignorehitpause =1

[State 0, VelAdd]
type = Velset
trigger1=vel x>=-2
x = -2
ignorehitpause =1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = fvar(1)<2
fvar(1) = 0.117
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = fvar(1)>=2
fvar(1) = 2
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(2) = 1
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = var(2)>=20
ignorehitpause = 1

;------------------------------------------
;移動
[Statedef 1301]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1301

[State 1210, 1]
type = VarSet
trigger1 = Time = 0
var(4) = floor(P2Dist x)

[State 1210, 2]
type = velset
trigger1 = Time = 0 && var(2) = 1
x = (var(4) + 100) / 10

[State 1210, 3]
type = velset
trigger1 = Time = 0 && var(2) = 2
x = (var(4) - 100) / 10

[State 1210, 4]
type = velset
trigger1 = Time = 0 && var(2) = 3
x = (var(4) + 200) / 10

[State 1210, 5]
type = velset
trigger1 = Time = 0 && var(2) = 4
x = (var(4) - 200) / 10

[State 1210, 6]
type = Turn
trigger1 = Time = 10
trigger1 = p2dist X < -5

[State 1210, 7]
type = PalFX
trigger1 = Time = 0
time = 18
sinadd =  255,255,255,36
ignorehitpause = 1

[State 1210, 8]
type = ChangeState
trigger1 = Time = 10
value = 1302

;-------------------------------------------------
;現れる
[Statedef 1302]
type    = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1302
sprpriority = 2

[State 1220, 4]
type = ModifyExplod
trigger1 = time = [0,5]
ID = 3000
scale = (6 - time) * 0.6, time * 0.2

[State 1220, 5]
type = ChangeState
trigger1 = animTime = 0 && pos y = 0
value = 0
ctrl = 1

[State 1220, 6]
type = Changeanim
trigger1 = animTime = 0
value = 1220

[State 1220, 7]
type = Veladd
trigger1 = time >= 27
y = .22

[State 1220, 8]
type = ctrlset
trigger1 = time >= 23 && Pos Y < 0
value = 1

[State 1220, 9]
type = ChangeState
trigger1 = time >= 27
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 53

;-------------------------------------------------------------------------------
;･ﾂクｩ??ーブ
[Statedef 1310]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 1300
sprpriority = 2

[State -2, アーマーヘルパー呼び出し]
type = Helper
trigger1= Animelem=2
name = "Magic Square"
stateno = 11300
ID = 11300
size.xscale = 0.2
size.yscale = 0.2
postype = p1
pos = 69,-95
sprpriority = 9999999
ownpal = 1

[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 4444, 4

[State 1020, 1]
type = PlaySnd
trigger1 = time = 1
value = 100, 2

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

[State 1200, 5]
type = ModifyExplod
trigger1 = time = [20,25]
ID = 3000
scale = (time*1.5-27) *.40, (25.2 - time) * 0.1

[State 1200, 6]
type = PalFX
trigger1 = Time = 11
time = 20
sinadd =  255,255,255,38
ignorehitpause = 1

[State 1200, 7]
type = VarSet
triggerall = Time = 0
trigger1 = var(59)<1 && command = "Chamelon 3"
trigger2 = var(59)>0
var(2) = 1

[State 1200, 11]
type = ChangeState
trigger1 = AnimTime = 0
value = 1311

;------------------------------------------
;移動
[Statedef 1311]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1301

[State 1210, 1]
type = VarSet
trigger1 = Time = 0
var(4) = floor(P2Dist x)

[State 1210, 2]
type = velset
trigger1 = Time = 0 && var(2) = 1
x = (var(4) + 100) / 10

[State 1210, 3]
type = velset
trigger1 = Time = 0 && var(2) = 2
x = (var(4) - 100) / 10

[State 1210, 4]
type = velset
trigger1 = Time = 0 && var(2) = 3
x = (var(4) + 200) / 10

[State 1210, 5]
type = velset
trigger1 = Time = 0 && var(2) = 4
x = (var(4) - 200) / 10

[State 1210, 6]
type = Turn
trigger1 = Time = 10
trigger1 = p2dist X < -5

[State 1210, 7]
type = PalFX
trigger1 = Time = 0
time = 18
sinadd =  255,255,255,36
ignorehitpause = 1

[State 1210, 8]
type = ChangeState
trigger1 = Time = 10
value = 1312

;-------------------------------------------------
;現れる
[Statedef 1312]
type    = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1303
poweradd = -500
sprpriority = 2

[State 1220, 4]
type = ModifyExplod
trigger1 = time = [0,5]
ID = 3000
scale = (6 - time) * 0.6, time * 0.2

[State 1220, 5]
type = ChangeState
trigger1 = animTime = 0 && pos y = 0
value = 0
ctrl = 1

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

[State 1220, 6]
type = Changeanim
trigger1 = animTime = 0
value = 1220

[State 1220, 7]
type = Veladd
trigger1 = time >= 27
y = .22

[State 1220, 8]
type = ctrlset
trigger1 = time >= 23 && Pos Y < 0
value = 1

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

[State 1220, 9]
type = ChangeState
trigger1 = Time = 0
value = 1313

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

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

[State 1200, 3]
type = NotHitBy
trigger1 = time <= 2
value = SCA

[State 200, 効果音]
type = PlaySnd
trigger1 = Time = 0
value = S21000, random%3
channel = 0

[State 3050, 1]
type = PlaySnd
trigger1 = Time = 0
value = 0, 4

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage    = 110,30
getpower  = 0,0
animtype  = Heavy
hitflag = MAFD
guardflag = MA
pausetime = 12,12
sparkno = S8210+var(5)
guard.sparkno = S8105
sparkxy = -5,-50
hitsound   = s10200,5
guardsound = s10210,0
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
envshake.time = 25
envshake.ampl = 4
envshake.freq = 176

[State 1200, 11]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; ファルコキック
[Statedef 1400]
type    = A
movetype= A
physics = S
juggle  = 6
poweradd= 0
velset=0,0
ctrl = 0
anim = 1400

[State 200, 効果音]
type = PlaySnd
trigger1 = animelem=2
value = S21000, random%3
channel = 0
volume=100

[State 0, VelSet]
type = VelSet
trigger1 =time=[0,5]
y = -2
ignorehitpause =1

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(2)>=0
x = 20
y = 15

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S4444,3
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=2
value = S4444,0
volume=-100
ignorehitpause = 1

[State 200, 1]
type = hitdef
trigger1 = !time
attr = A, SA			;Attribute: Standing, Normal Attack
damage = 80, 10			;Damage that move inflicts, guard damage
getpower  = 130,65
animtype = Hard			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = LA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 5, Hit			;Attack priority: 0 (least) to 7 (most), 4 default
					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 10			;Time attacker pauses, time opponent shakes
sparkno = S8210+var(5)
guard.sparkno = S8105
sparkxy = 0, -37		;X-offset for the "hit spark" rel. to p2,
					;Y-offset for the spark rel. to p1
hitsound   = s10200,5
guardsound = s10210,0
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 15		;Time that the opponent slides back
ground.hittime  = 22		;Time opponent is in hit state
ground.velocity = -6		;Velocity at which opponent is pushed
airguard.velocity = -6.9,-.8	;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High			;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -17,20		;X-velocity at which opponent is pushed,
					;Y-velocity at which opponent is pushed
air.hittime = 12			;Time before opponent regains control in air
air.fall=1
fall.recover = 0
guard.velocity=-6

[State 410, 5]
type = ChangeState
triggerall = vel y >0
trigger1 = pos y >= 0
value = 1401
ctrl = 0

;-------------------------------------------------------------------------------
[Statedef 1401]
type = S
movetype = A
physics = S
anim = 1401
velset = 7,0
ctrl = 0
poweradd = 0

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

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

;---------------------------------------------------------------------------
;クロスホーンライダーキック 前動作
[Statedef 3000]
type = A
ctrl = 0
anim = 3000
velset = 0,0
movetype = A
physics = N
PowerAdd = -1000

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S4444,14
volume=120

[State 3000, Super]
type = Helper
trigger1 = AnimElem = 1
persistent = 0
id = 8000
name = "super"
pos = 5, -84
postype = P1
stateno = 8000
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999999

[State 3050, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 20, -95
movetime = 158
time = 158
anim=-1
darken=0
p2defmul = 1

[State 0, EnvColor]
type = EnvColor
trigger1 = 1
value = 0,0,0
time = 1
under = 1
ignorehitpause = 1

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

[State 3050, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 3010

;---------------------------------------------------------------------------
;クロスホーンライダーキック 開始
[Statedef 3010]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 3010
velset = 0, 0

[State 3000, 1]
type = PlaySnd
trigger1 = time=5
value = 4444, 1

[State 0, EnvColor]
type = EnvColor
trigger1 = 1
value = 0,0,0
time = 1
under = 1
ignorehitpause = 1

[State 3050, 1]
type = velset
trigger1 = time =0
y = -9

[State 0, VelAdd]
type = VelAdd
trigger1 = vel y <-1
y = 0.5
ignorehitpause = 1
[State 0, VelAdd]
type = VelSet
trigger1 = vel y >=-1
y = -1
ignorehitpause = 1

[State -2, 煙ヘルパー呼び出し]
type = Helper
trigger1 = !time
name = "Smoke"
stateno = 10040
ID = 10040
size.xscale = 1
size.yscale = 1
postype = p1
pos = 0,0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

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

[State 3000, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 3013

;---------------------------------------------------------------------------
;クロスホーンライダーキック 開始
[Statedef 3013]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 3013
velset = 0, 0

[State 0, VelSet]
type = VelSet
trigger1 = 1
y = -1
ignorehitpause = 1

[State 0, EnvColor]
type = EnvColor
trigger1 = 1
value = 0,0,0
time = 1
under = 1
ignorehitpause = 1

[State -2, 煙ヘルパー呼び出し]
type = Helper
trigger1 = !time
name = "Ring"
stateno = 13000
ID = 13000
size.xscale = .4
size.yscale = .4
postype = p1
pos = 0,-39
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, 煙ヘルパー呼び出し]
type = Helper
trigger1 = time=5
name = "Ring"
stateno = 13000
ID = 13000
size.xscale = .4
size.yscale = .4
postype = p1
pos = 42,-5
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, 煙ヘルパー呼び出し]
type = Helper
trigger1 = time=10
name = "Ring"
stateno = 13000
ID = 13000
size.xscale = .4
size.yscale = .4
postype = p1
pos = 82,20
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State 3050, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 3011

;━━━━━━━━━━━━━━━━
[Statedef 13000]
type	= S
physics=S
anim	= 13000
velset	= 10,4
ctrl	= 0
sprpriority=999999

[State 0, VelAdd]
type = VelAdd
trigger1 = vel y>0
y = -0.5
ignorehitpause = 1

[State 0, VelAdd]
type = VelSet
trigger1 = vel y<0
y = 0
ignorehitpause = 1
[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 7,7,-200
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause =1 

[State 181]
type = trans
trigger1=1
trans = addalpha
alpha = (var(1)*17), 256
ignorehitpause = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno!=[3011,3013]
trigger2 = root,stateno=3011
trigger2 = rootdist x>=-20
value = 13001
ignorehitpause = 1

[Statedef 13001]
type	= S
velset	= 0,0
ctrl	= 0
sprpriority=999999

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 7,7,-200
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause =1 

[State 0, VarAdd]
type = VarSet
trigger1 = !time
fvar(1) = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)
ignorehitpause = 1 

[State 0, VarAdd]
type = null;VarSet
trigger1 = fvar(1)>5
fvar(1) = 5
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = 1;fvar(1)<5
fvar(1) = 0.5
ignorehitpause = 1

[State 181]
type = trans
trigger1=1
trans = addalpha
alpha = 256-(var(59)*22), 256
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(59) = 1
ignorehitpause = 1

[State 0, ChangeState]
type = destroyself
trigger1 = var(59)>=20
ignorehitpause = 1 

;---------------------------------------------------------------------------
;クロスホーンライダーキック 攻撃
[Statedef 3011]
type    = A
movetype= A
physics = N
juggle  = 8
anim = 3011
velset = 0, 0

[State 0, VelAdd]
type = VelAdd
trigger1 = Time = [0,30]
x = 0.85
y = 0.55
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S4444,13
volume=120

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S4444,15

[State 3001, 8]
type = HitDef
triggerall=numenemy=1
trigger1 = AnimElem= 1
attr = A, HA
animtype = Heavy
damage = ceil(220 * (fVar(1))),80
guardflag = MA
hitflag = MAF
getpower  = 0,0
givepower = 50,25
pausetime = 0, 0
sparkno = S13001
guard.sparkno=S8105
sparkxy = -5, -38
hitsound   = s20000,4
guardsound = s10210,0
ground.type = Low
guard.slidetime = 35
ground.velocity = -8,-7
guard.velocity = -20
ground.hittime=35
air.hittime=35
air.velocity = -8,-7
airguard.velocity = -5, -4
palfx.time = 40
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 246
ID=210

[State 3001, 8]
type = HitDef
triggerall=numenemy!=1
trigger1 = AnimElemtime(1)%2=0
attr = A, HA
animtype = Heavy
damage = ceil(220 * (fVar(1))),80
guardflag = MA
hitflag = MAF
getpower  = 0,0
givepower = 50,25
pausetime = 0, 0
sparkno = S13001
guard.sparkno=S8105
sparkxy = -5, -38
hitsound   = s20000,4
guardsound = s10210,0
ground.type = Low
guard.slidetime = 35
ground.velocity = -8,-7
guard.velocity = -20
ground.hittime=35
air.hittime=35
air.velocity = -8,-7
airguard.velocity = -5, -4
palfx.time = 40
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 246
hitonce=1
id=210
nochainid=2012,210
[State 3001, 8]
type = HitDef
triggerall=numenemy!=1
trigger1 = AnimElemtime(1)%2!=0
attr = A, HA
animtype = Heavy
damage = ceil(220 * (fVar(1))),80
guardflag = MA
hitflag = MAF
getpower  = 0,0
givepower = 50,25
pausetime = 0, 0
sparkno = S13001
guard.sparkno=S8105
sparkxy = -5, -38
hitsound   = s20000,4
guardsound = s10210,0
ground.type = Low
guard.slidetime = 35
ground.velocity = -8,-7
guard.velocity = -20
ground.hittime=35
air.hittime=35
air.velocity = -8,-7
airguard.velocity = -5, -4
palfx.time = 40
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 246
hitonce=1
id=2012
nochainid=2012,210

[State -2, 煙ヘルパー呼び出し]
type = Helper
triggerall=!numhelper(13012)
triggerall=var(7)
trigger1 = winko
name = "Ring"
stateno = 10191
ID = 13012
size.xscale = .4
size.yscale = .4
postype = p1
pos = 0,0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999
[State -2, 煙ヘルパー呼び出し]
type = Helper
triggerall=!numhelper(13013)
triggerall=var(8)
trigger1 = winko
name = "Ring"
stateno = 10191
ID = 13013
size.xscale = .4
size.yscale = .4
postype = p1
pos = 0,0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State 0, VarSet]
type = VarSet
trigger1 = numtarget(210)
var(7) = target(210),id
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = numtarget(2012)
var(8) = target(2012),id
ignorehitpause = 1

[State 0, EnvColor]
type = EnvColor
trigger1 = movehit
trigger1 = var(6)!=hitcount
value = 255,255,255
time = 2
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = movehit
var(6) = hitcount
ignorehitpause = 1

[State 2802, ChangeState]
type	= ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value	= 3012+(winko*10000)

;---------------------------------------------------------------------------
;クロスホーンライダーキック ヒット着地

[Statedef 3012]
type    = S
movetype= A
physics = S
anim = 3012

[State 3002, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3002, 1]
type = VelSet
trigger1 = Time = 0
y = 0

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

;---------------------------------------------------------------------------
;クロスホーンライダーキック ヒット着地

[Statedef 13012]
type    = C
movetype= A
physics = S
anim = 13012

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

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

[State 3002, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 3002, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(9)>=15
statetype = S       ;S,A,C,L
movetype = I        ;I,A,H
ignorehitpause = 1

[State 0, CtrlSet]
type = CtrlSet
trigger1 = var(9)>=15
value = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarAdd
trigger1 = time
trigger1 = !numhelper(13012)
trigger1 = !numhelper(13013)
var(9) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
;クロスホーンライダーキック ヒット着地

[Statedef 13014]
type    = S
movetype= H
physics = N
velset = 0, 0

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !alive
flag = noshadow
flag2 = invisible
ignorehitpause = 1

[State 0, ChangeState]
type = SelfState
trigger1 = alive
value = 5050
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = time=1
value = 5150
ignorehitpause = 1

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = prevstateno=13014
flag = noshadow
flag2 = invisible
ignorehitpause = 1

[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

;---------------------------------------------------------------------------
; バーニングパンチ
[Statedef 3100]
type = A
ctrl = 0
anim = 3100
velset = 0,0
movetype = A
physics = N
PowerAdd = -2000

[State 3050, Super A]
type = SuperPause
trigger1 = Time = 0
movetime = 95
time = 95
anim = -1


;[State 6220,0]
type = AfterImage
trigger1 = Time = 0
time = 999
timegap = 2
framegap = 4
length = 10

[State 6220,2]
type = Explod
trigger1 = AnimElem = 2
anim = 3105
ID = 3105
pos = 21,-73
postype = p1
sprpriority = -2
supermove = 1
ownpal = 1
removetime = 30
bindtime = -1

[State 6220,3]
type = Explod
trigger1 = AnimElem = 2
anim = 3110
ID = 3110
pos = 21,-73
postype = p1
sprpriority = 4
supermove = 1
ownpal = 1
removetime = 30
bindtime = -1


[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3100, 0

[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 16
value = 3100, 2

[State 1103 , 1]
type = HitDef
trigger1 = AnimElem = 15
attr = S, SA
damage    = 400,60
animtype = Hard
getpower = 52
givepower = 20
hitflag = MAF
pausetime = 32,30
sparkno = S3050
sparkxy = -5, -38
guard.sparkno = S206
hitsound   = s3001,0
guardsound = s10210,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 15
ground.velocity = -6,-3.0
air.velocity = -5.2,-2.5
palfx.time = 75
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
fall.recover = 0
air.recover = 0
recover = 0

[State 6220,16]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

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

;---------------------------------------------------------------------------
;クロスホーンライダーキック 前動作
[Statedef 3200]
type = S
ctrl = 0
anim = 3200
velset = 0,0
movetype = A
physics = S
PowerAdd = -2000

[State 3000, Super]
type = Helper
trigger1 = AnimElem = 1
persistent = 0
id = 8002
name = "super"
pos = 5, -84
postype = P1
stateno = 8000
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999999

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0,143]
flag = nobg
ignorehitpause = 1

[State 6710,9]
type = SuperPause
trigger1 = Time = 0
movetime = 143
time = 143
anim = -1
darken=0
p2defmul = 1

[State 6220,5]
type = PlaySnd
trigger1 = !time
value = 32000, 4
volume=100
[State 6220,5]
type = null;PlaySnd
trigger1 = AnimElem = 1
value = 3200, 0
[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 1
value = 32000, 0

[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 6
value = 100, 2
volume=-50
[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 6
value = 32000, 1
volume=-50

[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 14
value = 32000, 2
[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 14
value = 32000, 3

[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 14
value = 32000, 5
volume=100

[State 191, Visual effect]
type = null;Explod
trigger1 = Animelem = 13
anim = 10000
pos = 0,0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 1000, helper]
type = helper
trigger1 = AnimElem = 14
ID = 3202
pos = 48, -102
postype = p1
stateno = 3202
helpertype = normal
name = "tama"
ownpal = 1
keyctrl = 0
Size.XScale = 0.2
Size.YScale = 0.2

[State 1000, helper]
type = helper
trigger1 = AnimElem = 14
ID = 3201
pos = 48, -102
postype = p1
stateno = 3201
helpertype = normal
name = "tama"
ownpal = 1
keyctrl = 0
Size.XScale = 1.5
Size.YScale = 1.5

[State 1000, Dust]
type = Explod
trigger1 = AnimElem = 14
anim = 11100
pos = -30, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = .8,.8

[State 0, VelSet]
type = VelSet
trigger1 = animelem=14
x = -10
ignorehitpause = 1

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

;-------------------------------------------------------------------------------
[Statedef 3201]
type    = S
movetype = A
physics = S
juggle  = 0
velset = 0
ctrl = 0
anim = 3201
poweradd = 0
juggle = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 100]
Type           = Afterimage
Trigger1       = Time %15 = 0
Trans          = Add
TimeGap        = 2
FrameGap       = 3
Time           = 15
PalBright      = 0, 0, 0
PalContrast    = 70, 70, 70
PalAdd         = 0, 0, 160
PalMul         = 1, 1, 1

[State 210, 1]
type = HitDef
triggerall=gametime%2=0
trigger1 = hitcount<15
attr = S, HP
priority = 7,Hit
damage   = 15,7
getpower  = 0,0
animtype = Hard
guardflag = MA
pausetime = 0,25
guard.pausetime = 0,8
sparkxy =  0,0
sparkno = S8220+root,var(5)
guard.sparkno=S8105
hitsound   = -1
guardsound = -1;s10210,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -5,15
air.velocity = -5,15
airguard.velocity = -3 
guard.velocity=-5
fall = 1
yaccel = .35
fall.yvelocity = -4.5
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 210, 1]
type = HitDef
trigger1 = hitcount>=15
attr = S, HP
priority = 7,Hit
damage   = ceil(190 * (root,fVar(1))),100
getpower  = 0,0
animtype = Hard
guardflag = MA
pausetime = 0,25
guard.pausetime = 0,8
sparkxy =  0,0
sparkno = S8220+root,var(5)
guard.sparkno=S8105
hitsound   = -1
guardsound = -1;s10210,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -5,15
air.velocity = -5,15
airguard.velocity = -3 
guard.velocity=-5
fall = 1
yaccel = .35
fall.yvelocity = -4.5
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = time%10=0
time = 10           ;ヒットした時に画面を揺らす時間
ampl = 6           ;ヒットした時の画面の振幅
freq = 200          ;ヒットした時に画面が揺れる速度
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
trigger1=hitcount>=16
value = 32005
ignorehitpause = 1

[state 45, 45]
type = sprpriority
trigger1 = time = 0
value = 5

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

[State 6010, 1]
type = veladd
triggerall=!movecontact
trigger1 = time > 0
x = 5

[State 6010, 1]
type = velset
triggerall=movecontact
trigger1 = time > 0
x = 5

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

[State 200, 2]
type = destroyself
trigger1 = FrontEdgeDist < -80

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

[Statedef 3202]
type	= S
velset	= 0,0
ctrl	= 0
sprpriority=999999
anim=191

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 7,7,-200
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause =1 

[State 0, VarAdd]
type = VarSet
trigger1 = !time
fvar(1) = 1
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)
ignorehitpause = 1 

[State 0, VarAdd]
type = null;VarSet
trigger1 = fvar(1)>5
fvar(1) = 5
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = 1;fvar(1)<5
fvar(1) = 0.5
ignorehitpause = 1

[State 181]
type = trans
trigger1=1
trans = addalpha
alpha = 256-(var(59)*22), 256
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
var(59) = 1
ignorehitpause = 1

[State 0, ChangeState]
type = destroyself
trigger1 = var(59)>=20
ignorehitpause = 1 

;---------------------------------------------------------------------------
;クロスホーンライダーキック 開始
[Statedef 3210]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0.5, -1.5
anim = 3210
velset = 0, 0
PowerAdd = -3000

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1050
pos = -3, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

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

[State 3000, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 3211

;---------------------------------------------------------------------------
;クロスホーンライダーキック 攻撃
[Statedef 3211]
type    = A
movetype= A
physics = N
juggle  = 8
anim = 3211
velset = 0, 0

[State 3001, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 3001, Friction]
type = VelMul
trigger1 = 1
x = .85 * ifelse (AnimElemTime(6) < 0, 1, .8)

[State 3001, Afterimage]
type = AfterImageTime
trigger1 = AnimElemTime(8) < 0
time = 2

[State 3001, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 3001, 1]
type = VelSet
trigger1 = Time > 0
;x = 7
;x = 8.5
x = 10

[State 3001, 2]
type = VelSet
trigger1 = Time > 0
trigger1 = Time < 5
y = -7.5

[State 3001, 3]
type = VelSet
trigger1 = Time > 4   
trigger1 = Time < 15
y = 0

[State 3001, 4]
type = VelSet
trigger1 = Time > 15
trigger1 = Pos Y < -2
y = 7.5

[State 3001, 5]
type = VelSet
trigger1 = Time > 20
x = 0

[State 3001,7]
type = ChangeState
trigger1 = Time > 20
trigger2 = Pos Y > -2 
value = 3012


[State 3001, 8]
type = HitDef
trigger1 = AnimElem= 1
attr = A, SA
animtype = Hard
damage = 600,130
guardflag = HA
hitflag = MAF
getpower  = 0,0
givepower = 50,25
pausetime = 20, 27
sparkno = S3050
sparkxy = -5, -38
hitsound   = s3001,0
guardsound = s10210,0
ground.type = Low
guard.slidetime = 20
ground.velocity = -8,-7
guard.velocity = -7
air.velocity = -8,-7
airguard.velocity = -5, -4
palfx.time = 100
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
p2stateno = 3230

;---------------------------------------------------------------------------
;クロスホーンライダーキック ヒット着地

[Statedef 3212]
type    = C
movetype= A
physics = S
anim = 3212
velset = 0.25, 0

[State 3002, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3002, 2]
type = VelAdd
trigger1 = Vel X > 0.2
x = -0.05

[State 3002, 3]
type = VelSet
trigger1 = Vel X <= 0.2
x = 0

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

;---------------------
;クロスホーンライダーキック ヒット時相手動作１
;---------------------
[Statedef 3230]
type = A
movetype = H
physics = N

[State 1010, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 3005, 2]
type = ChangeAnim2
Trigger1 = Time >= 0
value = 3230

[State 3005, 9]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 3231

;---------------------
; クロスホーンライダーキック ヒット時相手動作２
;---------------------
[Statedef 3231]
type = A
movetype = H
physics = N
velset = -2.2,-15.3

[State 3006, 1]
type = VelAdd
trigger1 = Time > 0
y = .6

[State 3006, 2]
type = EnvShake
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 16
ampl = 10
freq = 90
phase = 90
ignorehitpause = 1

[State 3006, 9]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

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

;---------------------------------------------------------------------------
; ここは-2のステートを書いてください、ヘルパー関係です
;---------------------------------------------------------------------------
[Statedef -2]

;---------------------[ダメージ補正]
[State -2];補正
type = Varset
trigger1 = movetype != A
fv = 1
value = 1
ignorehitpause = 1

[State -2];補正
type = Varset
trigger1 = movetype = A && !(stateno = [3000,3999]) && !(stateno = [32002,32003])
fv = 1
value = 0.7
ignorehitpause = 1

;-------------------------------------------------------------------------
[State -2]
type = Varset
trigger1 = var(13)>=1 && var(59) > 0 && p2bodydist X >= 0 && var(53)<=0
trigger1 = movetype = H && time >= 1 && (stateno != [120,159]) && alive
trigger1 = Enemynear(Var(12)),statetype!=C && Enemynear(Var(12)),movetype = A
v = 53
value = Enemynear(Var(12)),stateno
persistent = 0
ignorehitpause = 1

[State -2]
type = Varset
trigger1 = var(53) = 0 && var(59) > 0
trigger2 = var(13)<=-1 && var(59) > 0 && p2bodydist X >= 0 && var(53)>0 && Enemynear(Var(12)),stateno=var(53)
trigger2 = movetype = H && time >= 1 && (stateno != [120,159]) && alive
trigger2 = Enemynear(Var(12)),statetype!=C && Enemynear(Var(12)),movetype = A
v = 53
value = -12345
persistent = 0
ignorehitpause = 1

[State -2]
type = Varset
trigger1 = var(54) = 0 && var(59) > 0
trigger2 = (var(54) = var(53)) && var(59) > 0
trigger3 = var(13)<=-1 && var(59) > 0 && p2bodydist X >= 0 && var(54)>0 && Enemynear(Var(12)),stateno=var(54)
trigger3 = movetype = H && time >= 1 && (stateno != [120,159]) && alive
trigger3 = Enemynear(Var(12)),statetype!=C && Enemynear(Var(12)),movetype = A
v = 54
value = -54321
persistent = 0
ignorehitpause = 1

[State -2]
type = Varset
trigger1 = var(13)>=1 && var(59) > 0 && p2bodydist X >= 0 && var(53)>0 && Enemynear(Var(12)),stateno!=var(53)
trigger1 = movetype = H && time >= 1 && (stateno != [120,159]) && alive
trigger1 = Enemynear(Var(12)),statetype!=C && Enemynear(Var(12)),movetype = A
v = 54
value = Enemynear(Var(12)),stateno
persistent = 0
ignorehitpause = 1

[State -2]
type = varset
Triggerall = !Ishelper && var(59) > 0
trigger1 = stateno = 130||(stateno = [150,151])
trigger2 = (stateno = 120||stateno = 140) && statetype = S
var(13) = 1
ignorehitpause = 1

[State -2]
type = varset
Triggerall = !Ishelper && var(59) > 0
trigger1 = stateno = 131||(stateno = [152,153])
trigger2 = (stateno = 120||stateno = 140) && statetype = C
var(13) = -1
ignorehitpause = 1

[State -2]
type = varset
Triggerall = !Ishelper && var(59) > 0
trigger1 = (stateno != [130,131]) && (stateno != [150,153]) && stateno != 120 && stateno != 140 && time >= 1
trigger2 = (stateno = 120||stateno = 140) && statetype = A
trigger3 = movetype != H && (stateno != [120,159])
var(13) = 0
ignorehitpause = 1

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

[State 0, VarSet]
type = VarSet
trigger1 = !ishelper
trigger1 = !roundstate
var(10) = 0
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !ishelper
trigger1 = var(11)>5
var(11) = 5
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = !ishelper
trigger1 = var(11)<0
var(11) = 0
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = !ishelper
trigger1 = var(10)>2
var(10) = 2
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = !ishelper
trigger1 = var(10)<0
var(10) = 0
ignorehitpause = 1

[State 0, VarRandom]
type = VarRandom
trigger1 = !ishelper
v = 5
range = 0,7
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
triggerall=!ishelper
trigger1 = time=[0,2]
trigger1 = var(6)!=hitcount
var(6) = 0
ignorehitpause = 1

[Statedef 32002]
type = S
ctrl = 0
anim = 32002
velset = 0,0
movetype = A
physics = N
PowerAdd = -1000

[State 3000, Super]
type = Helper
trigger1 = AnimElem = 1
persistent = 0
id = 8000
name = "super"
pos = 5, -84
postype = P1
stateno = 8000
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999999

[State 0, EnvColor]
type = EnvColor
trigger1 = 1
value = 0,0,0
time = 1
under = 1
ignorehitpause = 1

[State 1000, Dust]
type = Explod
trigger1 = Time=48
anim = 32004
pos = 0, 0
sprpriority = 99
postype = p1
supermove = 1
bindtime = -1
ownpal = 1
removetime=60
removeongethit=1

[State 6710,9]
type = SuperPause
trigger1 = Time = 0
movetime = 48+60+45
time = 48+60+45
anim = -1
darken=0
p2defmul = 1

[State 6220,5]
type = PlaySnd
trigger1 = !Time
value = 30000, 8

[State 6220,5]
type = PlaySnd
trigger1 = Time=48
value = 30000, 7
channel=6

[State 200, 3]
type = ChangeState
trigger1 = Time = 108
value = 32003

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

[State 0, EnvColor]
type = EnvColor
trigger1 = time=[0,50]
value = 0,0,0
time = 1
under = 1
ignorehitpause = 1

[State 0, VarRandom]
type = VarRandom
triggerall=!var(50)
trigger1 = !time
v = 11
range = 0,5
ignorehitpause = 1

[State 1000, Dust]
type = Explod
trigger1 = !time
anim = 33000+var(11)
pos = 0, 0
sprpriority = 99
postype = p1
supermove = 1
bindtime = -1
ownpal = 1
removetime=50
removeongethit=1

[State 6220,5]
type = PlaySnd
trigger1 = !time
value = 100, 2
channel=6
[State 6220,5]
type = PlaySnd
trigger1 = !time
trigger1 = var(11)>=5
value = 30000, 10
[State 6220,5]
type = PlaySnd
trigger1 = !time
value = 30000, var(11)

[State 6220,5]
type = PlaySnd
trigger1 = animelem=2
value = 30000, 9

[State 6220,5]
type = PlaySnd
trigger1 = animelem=2
value = 30000, 6

[State -2, 煙ヘルパー呼び出し]
type = Helper
trigger1 = animelem=2
name = "Smoke"
stateno = 32004
ID = 32004
size.xscale = 1
size.yscale = 1
postype = p1
pos = 78,-94
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, 煙ヘルパー呼び出し]
type = Helper
triggerall=var(11)>=1
trigger1 = animelem=2
name = "Smoke"
stateno = 32004
ID = 32005
size.xscale = 1
size.yscale = 1
postype = p1
pos = 28,-64
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, 煙ヘルパー呼び出し]
type = Helper
triggerall=var(11)>=2
trigger1 = animelem=2
name = "Smoke"
stateno = 32004
ID = 32006
size.xscale = 1
size.yscale = 1
postype = p1
pos = 128,-84
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, 煙ヘルパー呼び出し]
type = Helper
triggerall=var(11)>=3
trigger1 = animelem=2
name = "Smoke"
stateno = 32004
ID = 32007
size.xscale = 1
size.yscale = 1
postype = p1
pos = 48,-84
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, 煙ヘルパー呼び出し]
type = Helper
triggerall=var(11)>=4
trigger1 = animelem=2
name = "Smoke"
stateno = 32004
ID = 32008
size.xscale = 1
size.yscale = 1
postype = p1
pos = 8,-64
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State -2, 煙ヘルパー呼び出し]
type = Helper
triggerall=var(11)>=5
trigger1 = animelem=2
name = "Smoke"
stateno = 32004
ID = 32009
size.xscale = 1
size.yscale = 1
postype = p1
pos = 88,-44
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State 200, 3]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl=1

[Statedef 32004]
type = S
ctrl = 0
anim = 33006
velset = 0,0
movetype = A
physics = N
sprpriority=999

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 0, VarSet];ホーミングフラグ
type = VarSet
trigger1 = ishelper(32004)
trigger1 = root,var(11)>=2
trigger2 = ishelper(32005)
trigger2 = root,var(11)>=3
trigger3 = ishelper(32006)
trigger3 = root,var(11)>=4
trigger4 = root,var(11)>=5
sysvar(1) = 1
ignorehitpause = 1
[State 0, VarSet];初期Y座標取得
type = VarSet
trigger1=!time
sysvar(2) = floor(pos Y)
ignorehitpause = 1

[State 100]
Type           = Afterimage
Trigger1       = Time %15 = 0
Trans          = Add
TimeGap        = 2
FrameGap       = 3
Time           = 15
PalBright      = 0, 0, 0
PalContrast    = 70, 70, 70
PalAdd         = 0, 0, 160
PalMul         = 1, 1, 1

[State 0, VelAdd]
type = VelAdd
trigger1 = !sysvar(1)
x = 1
ignorehitpause = 1

[State 200]
type = VelAdd
trigger1 = sysvar(1)
trigger1 =P2BodyDist X > 0
x= 1
ignorehitpause = 1

[State 200]
type = VelAdd
trigger1 = sysvar(1)
trigger1 =P2BodyDist X < 0
x= -1
ignorehitpause = 1

[State 200]
type = VelAdd
trigger1 = sysvar(1)
trigger1 =P2BodyDist Y > 0
y= 1
ignorehitpause = 1

[State 200]
type = VelAdd
trigger1 = sysvar(1)
trigger1 =P2BodyDist Y< 0
y= -1
ignorehitpause = 1

[State xxx, x]
type = posset
trigger1 = sysvar(1)
trigger1 = pos y >=sysvar(2)
y = sysvar(2)
ignorehitpause=1

[State 3000, 6]
type = HitDef
triggerall=root,var(11)=[0,1]
trigger1 = !time
attr = S, HP
animtype  = Hard
damage    = ceil(60 * (root,fVar(1))),20
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 0,3
sparkxy = -10,0
sparkno = S8220+root,var(5)
guard.sparkno=S8105
hitsound   = -1
guardsound = s10210,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -5, -4
guard.velocity = -12
air.velocity = -5,-4
airguard.velocity = -3,-3
fall.animtype = Hard
fall = 1
fall.recover = 0
palfx.time = 40
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 246
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 6]
type = HitDef
triggerall = !time
trigger1=root,var(11)=2
trigger2=root,var(11)=[3,4]
trigger2=!ishelper(32007)
attr = S, HP
animtype  = Hard
damage    = ceil(60 * (root,fVar(1))),20
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 0,3
sparkxy = -10,0
sparkno = S8220+root,var(5)
guard.sparkno=S8105
hitsound   = -1
guardsound = s10210,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -5, -4
guard.velocity = -12
air.velocity = -5,-4
airguard.velocity = -3,-3
fall.animtype = Hard
getpower=20
fall = 1
fall.recover = 0
palfx.time = 40
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 246
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
[State 3000, 6]
type = HitDef
triggerall=root,var(11)=[3,4]
triggerall = !time
trigger1=ishelper(32007)
attr = S, HP
animtype  = Hard
damage    = ceil(60 * (root,fVar(1))),20
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 0,3
sparkxy = -10,0
sparkno = S8220+root,var(5)
guard.sparkno=S8105
hitsound   = -1
guardsound = s10210,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -5, -4
guard.velocity = -12
air.velocity = -5,-4
airguard.velocity = -3,-3
fall.animtype = Hard
getpower=20
fall = 1
fall.recover = 0
palfx.time = 40
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 246
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 6]
type = HitDef
triggerall=root,var(11)=5
trigger1 = !time
attr = S, HP
animtype  = Hard
damage    = ceil(60 * (root,fVar(1))),20
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 0,3
sparkxy = -10,0
sparkno = S8220+root,var(5)
guard.sparkno=S8105
hitsound   = -1
guardsound = s10210,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -5, -4
guard.velocity = -12
air.velocity = -5,-4
airguard.velocity = -3,-3
fall.animtype = Hard
getpower=20
fall = 1
fall.recover = 0
palfx.time = 40
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
envshake.time = 25
envshake.ampl = 4
envshake.freq = 246
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0


[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 32005
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !sysvar(1)
trigger1 = frontedgebodydist < -10
trigger2 = sysvar(1)
trigger2 = time>=240
ignorehitpause = 1

[Statedef 32005]
type = S
ctrl = 0
anim = 13001
velset = 0,0
movetype = I
physics = N
sprpriority=999

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = 1
time = 0
ignorehitpause = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
trigger1 = prevstateno!=3201
time = 25
ampl = 4
freq = 246
ignorehitpause = 1
[State 0, EnvShake]
type = EnvShake
trigger1 = !time
trigger1 = prevstateno=3201
time = 25
ampl = 16
freq = 246
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 20000,4
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime
ignorehitpause = 1
;クロスホーンライダーキック 前動作
[Statedef 3900]
type = S
ctrl = 0
anim = 3900
velset = 0,0
movetype = A
physics = N
PowerAdd = -3000

[State 3000, Super]
type = Helper
trigger1 = AnimElem = 2
persistent = 0
id = 8002
name = "super"
pos = 7, -81
postype = P1
stateno = 8000
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999999

[State 6710,9]
type = SuperPause
trigger1 = AnimElem = 2
movetime = 48+40+280
time = 48+40+280
anim = -1
darken=0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time>=70
flag = nobg

[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3900, 0
channel=0
[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3900, 1
channel=0

[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 2
value = 10200, 8

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 2
time = 25
ampl = 7
freq = 246
ignorehitpause = 1

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

;クロスホーンライダーキック 前動作
[Statedef 3203]
type = S
ctrl = 0
anim = 3203
velset = 0,0
movetype = A
physics = N

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time=[0,280]
flag = nobg

[State 6220,5]
type = PlaySnd
trigger1 = animelem=2
value = 3900, 2

[State 191, Visual effect]
type = Explod
trigger1 = Animelem = 13
anim = 10000
pos = 0,0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 1000, helper]
type = helper
trigger1 = AnimElem = 2
ID = 3220
pos = 8, -75
postype = p1
stateno = 3220
helpertype = normal
name = "tama"
ownpal = 1
keyctrl = 0
supermovetime=99999
pausemovetime=99999
Size.XScale = 2.0
Size.YScale = 2.0

[State 0, StateTypeSet]
type = StateTypeSet
triggerall=winko
trigger1 = time=320
movetype = I        ;I,A,H
ignorehitpause = 1

[State 0, CtrlSet]
type = CtrlSet
triggerall=winko
trigger1 = time=320
value = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = winko
v = 10    ;fv = 10
value = 2
ignorehitpause = 1

[State 0, LifeSet]
type = LifeSet
triggerall=!winko
trigger1 = Time = 300
value = 0
ignorehitpause = 1

[State 200, 3]
type = ChangeState
triggerall=!winko
trigger1 = Time = 300
value = 5050

;-------------------------------------------------------------------------------
[Statedef 3220]
type    = S
movetype = A
physics = S
juggle  = 0
velset = 0
ctrl = 0
anim = 3220
poweradd = 0

[State 0, VarSet]
type = VarSet
trigger1 = !time
sysvar(1) = 0
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = !time
sysvar(2) = 0
ignorehitpause = 1

[State 100]
Type           = Afterimage
triggerall=time>=240
Trigger1       = Time %15 = 0
Trans          = Add
TimeGap        = 2
FrameGap       = 3
Time           = 15
PalBright      = 0, 0, 0
PalContrast    = 70, 70, 70
PalAdd         = 0, 0, 160
PalMul         = 1, 1, 1

[State 181]
type = trans
trigger1=1
trans = addalpha
alpha = (var(1)), 256
ignorehitpause = 1

[State 210, 1]
type = HitDef
triggerall= time>=240
trigger1 = !movecontact
attr = S, HP
priority = 7,Hit
damage   = 600000,0
getpower  = 0,0
animtype = Hard
guardflag = MA
pausetime = 20,20
guard.pausetime = 0,8
sparkxy =  0,0
sparkno = S13001
guard.sparkno = S8105
hitsound   = S20000, 4
guardsound = s10210, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -15,15
air.velocity = -15,15
guard.velocity=-15
airguard.velocity = -3 
fall = 1
yaccel = .35
fall.yvelocity = -4.5
fall.recover = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = movehit
trigger1 = sysvar(1)!=hitcount
trigger2 = moveguarded
trigger2 = sysvar(2)!=enemynear,GetHitVar(Guarded)
time = 15
freq = 300
ampl = 20
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = movehit
sysvar(1) = hitcount
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = moveguarded
sysvar(2) = enemynear,GetHitVar(Guarded)
ignorehitpause = 1

[state 45, 45]
type = sprpriority
trigger1 = time = 0
value = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=240
value = S3900,3
ignorehitpause = 1

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

[State 6010, 1]
type = veladd
trigger1 = time > 240
x = 5

[State 200, 2]
type = destroyself
trigger1 = FrontEdgeDist < -80

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

[State 0, VarAdd]
type = VarSet
trigger1 = var(1)>=256
var(1) = 256
ignorehitpause = 1

[State 0, VarAdd]
type = VarAdd
trigger1 = var(1)<256
v =  1
value = 10
ignorehitpause = 1

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

[State 40, AI]
Type = ChangeState
triggerAll = Var(59) > 0;条件を加えずに必ず戻るようにする。
trigger1 = Time = 0
Value = 0
Ctrl = 1
IgnoreHitPause = 1

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

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

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

[State 40, 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, 音を鳴らす]
type = PlaySnd
trigger1 = !animtime
value = 20000,0

[State 3100, AfterImage]
type = AfterImage
triggerall = !animtime
trigger1 = prevstateno=100
time = 20
length = 9
TimeGap  = 2
FrameGap = 3
palbright = 0,0,0
palcontrast = 100,100,100
palpostbright = 0,0,0
paladd = -30,-30,-30
palmul = .75,.75,.75
trans = add1

[State -2, 煙ヘルパー呼び出し]
type = Helper
trigger1 = !animtime
name = "Smoke"
stateno = 10040
ID = 10040
size.xscale = 1
size.yscale = 1
postype = p1
pos = 0,0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;------------------------
[Statedef 10040]
type = A
movetype = I
physics = N
ctrl = 0
anim = 9999
velset = 0,0

[State 1000, 0]
type = BindToRoot
trigger1 = time > 0
pos = 0,0

[State 4110, Explod]
type = Explod
trigger1 = time = 0 || time = 2 || time = 6
anim = 10040
pos = 0,0
postype = P1
scale = .5,.5
sprpriority = 5
supermove=1
ownpal = 0

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = time >= 20
;------------------------
[Statedef 8000]
type    = A
movetype= I
physics = N
anim = 8000
velset = 0,0
ctrl = 0
sprpriority = 5

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

[State 3000, BGInvert]
type = null;BGPalFX
trigger1 = time < 47
time = 1
invertall = 1
ignorehitpause = 1

[State -2,AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 5035, 1]
type = Trans
trigger1 = 1
trans = add

[State -2, 1]
type = PalFX
trigger1 = time = 0
time = 1
add = 0,0,0

[State -2, Explod(P1)]
type = Explod
trigger1 = Time = 1
anim = 8002
id = 8002
pos = 0,0
postype = P1
scale = .75,.75
sprpriority = 5
supermove = 1
bindtime = -1
removetime = 10
ownpal = 0
persistent = 0
Supermovetime = 999999
pausemovetime = 999999

[State -3, Burst]
type = VarSet
trigger1 = Time = 1
fvar(2) = .5

[State -3, Burst]
type = VarAdd
trigger1 = fvar(2) > 0
fvar(2) = .15

[State 4900, 16]
type = modifyExplod
trigger1 = 1
Id = 8002
scale = fvar(2),fvar(2)

[State -3, Burst]
type = VarSet
trigger1 = Time = 1
fvar(1) = 1

[State -3, Burst]
type = VarAdd
trigger1 = Time < 25
trigger1 = fvar(1) > .5
fvar(1) = -.02

[State 4900, 16]
type = AngleAdd
trigger1 = 1
value = -5.625

[State 4900, 16]
type = AngleDraw
trigger1 = 1
scale = fvar(1),fvar(1)

[State 3000, Super]
type = Helper
trigger1 = Time = 1 || Time = 6 || Time = 11 || Time = 16
id = 8001
pos = 0,0
postype = P1
stateno = 8001
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 99999999
pausemovetime = 999999

[State 3000, Super]
type = Helper
triggerall = !IsHelper(8000)
trigger1 = Time = 4
id = 8003
pos = 0,0
postype = P1
stateno = 8003
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 99999999
pausemovetime = 999999
size.xscale = 1
size.yscale = 1

[State 3000, Super]
type = Helper
triggerall = !IsHelper(8000)
trigger1 = Time = 4
id = 8004
pos = 0,0
postype = P1
stateno = 8004
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 99999999
pausemovetime = 999999
size.xscale = 1
size.yscale = 1

[State 3000, Super]
type = Helper
triggerall = !IsHelper(8000)
trigger1 = Time = 4
id = 8005
pos = 0,0
postype = P1
stateno = 8005
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 99999999
pausemovetime = 999999
size.xscale = 1
size.yscale = 1

[State 3000, Super]
type = Helper
triggerall = IsHelper(8002)
trigger1 = Time = 4
id = 8006
pos = 0,0
postype = P1
stateno = 8006
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 99999999
pausemovetime = 999999
size.xscale = 1
size.yscale = 1

[State 3000, Super]
type = Helper
triggerall = IsHelper(8002)
trigger1 = Time = 4
id = 8007
pos = 0,0
postype = P1
stateno = 8007
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 99999999
pausemovetime = 999999
size.xscale = 1
size.yscale = 1

[State 3000, Super]
type = Helper
triggerall = IsHelper(8002)
trigger1 = Time = 4
id = 8008
pos = 0,0
postype = P1
stateno = 8008
helpertype = normal
keyctrl = 0
ownpal = 1
supermovetime = 99999999
pausemovetime = 999999
size.xscale = 1
size.yscale = 1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = time = 48
id = 8010

[State 1150, ChangeState]
type = DestroySelf
trigger1 = time = 48

;------------------------ 2
[Statedef 8001]
type    = A
movetype= I
physics = N
anim = 9999
velset = 0,0
ctrl = 0

[State 1000, 0]
type = BindToParent
trigger1 = 1
pos = 0,0

[State -2, 1]
type = PalFX
trigger1 = time = 0
time = 1
add = 0,0,0

[State -2, Explod(P1)]
type = Explod
trigger1 = Time = 0
anim = 8001
id = 8001
pos = 0,0
postype = P1
scale = .5,.5
sprpriority = 5
bindtime = -1
removetime = -1
ownpal = 0
persistent = 0
Supermovetime = 999999
pausemovetime = 999999

[State -3, Burst]
type = VarSet
trigger1 = Time = 0
fvar(1) = .5

[State -3, Burst]
type = VarAdd
trigger1 = Time > 0
fvar(1) = .025

[State 4900, 16]
type = modifyExplod
trigger1 = 1
Id = 8001
scale = fvar(1),fvar(1)

[State -3, Burst]
type = VarSet
trigger1 = Time = 0
var(1) = 0

[State -3, Burst]
type = VarAdd
trigger1 = Time > 0
var(1) = -15

[State -2, 1]
type = PalFX
trigger1 = 1
time = 1
add = var(1),var(1),var(1)

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 15
id = 8001

[State 1150, ChangeState]
type = DestroySelf
trigger1 = Time = 15

;------------------------ 3-1
[Statedef 8003]
type    = A
movetype= I
physics = N
anim = 8003
velset = 0,0
ctrl = 0
sprpriority = 5

[State 1000, 0]
type = BindToParent
trigger1 = 1
pos = 0,0

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(0) = .5

[State -3, Burst]
type = VarAdd
trigger1 = Time > 17
fvar(0) = -.032

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(1) = .125

[State -3, Burst]
type = VarAdd
trigger1 = Time < 13
fvar(1) = .032

[State 1000, 0]
type = AngleSet
trigger1 = 1
value = 64-time

[State 1000, 0]
type = AngleDraw
trigger1 = 1
scale = fvar(0),fvar(1)

[State 1000, 1]
type = Trans
trigger1 = 1
trans = add

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

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 31

;------------------------ 3-2
[Statedef 8004]
type    = A
movetype= I
physics = N
anim = 8003
velset = 0,0
ctrl = 0
sprpriority = 5

[State 1000, 0]
type = BindToParent
trigger1 = 1
pos = 0,0

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(0) = .5

[State -3, Burst]
type = VarAdd
trigger1 = Time > 17
fvar(0) = -.032

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(1) = .125

[State -3, Burst]
type = VarAdd
trigger1 = Time < 13
fvar(1) = .032

[State 1000, 0]
type = AngleSet
trigger1 = 1
value = 184-time

[State 1000, 0]
type = AngleDraw
trigger1 = 1
scale = fvar(0),fvar(1)

[State 1000, 1]
type = Trans
trigger1 = 1
trans = add

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

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 31

;------------------------ 3-3
[Statedef 8005]
type    = A
movetype= I
physics = N
anim = 8003
velset = 0,0
ctrl = 0
sprpriority = 5

[State 1000, 0]
type = BindToParent
trigger1 = 1
pos = 0,0

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(0) = .5

[State -3, Burst]
type = VarAdd
trigger1 = Time > 17
fvar(0) = -.032

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(1) = .125

[State -3, Burst]
type = VarAdd
trigger1 = Time < 13
fvar(1) = .032

[State 1000, 0]
type = AngleSet
trigger1 = 1
value = 304-time

[State 1000, 0]
type = AngleDraw
trigger1 = 1
scale = fvar(0),fvar(1)

[State 1000, 1]
type = Trans
trigger1 = 1
trans = add

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

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 31

;------------------------ 3-4
[Statedef 8006]
type    = A
movetype= I
physics = N
anim = 8003
velset = 0,0
ctrl = 0
sprpriority = 5

[State 1000, 0]
type = BindToParent
trigger1 = 1
pos = 0,0

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(0) = .5

[State -3, Burst]
type = VarAdd
trigger1 = Time > 17
fvar(0) = -.032

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(1) = .125

[State -3, Burst]
type = VarAdd
trigger1 = Time < 13
fvar(1) = .032

[State 1000, 0]
type = AngleSet
trigger1 = 1
value = 4

[State 1000, 0]
type = AngleDraw
trigger1 = 1
scale = fvar(0),fvar(1)

[State 1000, 1]
type = Trans
trigger1 = 1
trans = add

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

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 31

;------------------------ 3-5
[Statedef 8007]
type    = A
movetype= I
physics = N
anim = 8003
velset = 0,0
ctrl = 0
sprpriority = 5

[State 1000, 0]
type = BindToParent
trigger1 = 1
pos = 0,0

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(0) = .5

[State -3, Burst]
type = VarAdd
trigger1 = Time > 17
fvar(0) = -.032

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(1) = .125

[State -3, Burst]
type = VarAdd
trigger1 = Time < 13
fvar(1) = .032

[State 1000, 0]
type = AngleSet
trigger1 = time = 0
value = 124

[State 1000, 0]
type = AngleDraw
trigger1 = 1
scale = fvar(0),fvar(1)

[State 1000, 1]
type = Trans
trigger1 = 1
trans = add

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

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 31

;------------------------ 3-6
[Statedef 8008]
type    = A
movetype= I
physics = N
anim = 8003
velset = 0,0
ctrl = 0
sprpriority = 5

[State 1000, 0]
type = BindToParent
trigger1 = 1
pos = 0,0

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(0) = .5

[State -3, Burst]
type = VarAdd
trigger1 = Time > 17
fvar(0) = -.032

[State -3, Burst]
type = VarSet
trigger1 = time = 0
fvar(1) = .125

[State -3, Burst]
type = VarAdd
trigger1 = Time < 13
fvar(1) = .032

[State 1000, 0]
type = AngleSet
trigger1 = time = 0
value = 244

[State 1000, 0]
type = AngleDraw
trigger1 = 1
scale = fvar(0),fvar(1)

[State 1000, 1]
type = Trans
trigger1 = 1
trans = add

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

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 31
;---------------------------------------------------------------------------
[Statedef 16000]
type = S
ctrl = 0
anim = 9999
velset = 0,0

[State 0, LifeSet]
type = LifeSet
trigger1 = !ishelper
value = lifemax
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !ishelper
flag = intro
flag2 = nobardisplay
flag3 = noFG
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !ishelper
flag = noko
flag2 = timerfreeze
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = !numexplod(16001)
anim = 16001
ID = 16001
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
scale=.5,.5
removetime = -1
ontop=1
ownpal=1
removeongethit = 1
ignorehitpause =1
[State 0, Explod]
type = Explod
trigger1 = !numexplod(16000)
anim = 16000
ID = 16000
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
scale=.5,.5
removetime = -1
ontop=1
ownpal=1
removeongethit = 1
ignorehitpause =1
;-----------------------------------------
;AI起動用
[Statedef 10000]
anim=9999;なにも表示しないｱﾆﾒでもいいけど入れなくても全然問題ない
ctrl=0

[State 10000,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=50

[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=parentvarset
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(41)=-1

[State 10000,立ったら消失]
Type = DestroySelf
triggerAll = isHelper
Trigger1 = root,var(59)||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"

[State 10000,ﾌﾗｸﾞON]
type=varset
triggerall=var(59)!=-1
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