; Homer's Basic Moves
; ______________________________________________


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

;---------------------------------------------------------------------
; Dｴoh !
[Data]
life = 1000          ; 体力ゲージ、上限値（デフォルト：1000）
attack = 100         ; 攻撃力（％）
defence = 100
power = 4000        ; 防御力（％）
fall.defence_up = 50 ; 空中コンボ修正率（％）
liedown.time = 15    ; ダウン時間
airjuggle = 15        ; 空中コンボ
sparkno = 2        ; 初期ヒットスパーク番号
guard.sparkno = 40 ; 初期ガードスパーク番号
KO.echo = 0          ; ＫＯボイスエコー（0:OFF、1:ON）
volume = 128          ; キャラボイスボリューム値

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

[Velocity]
walk.fwd  = 2.6		; 前進速度
walk.back = -2.2		; 後退速度
run.fwd  = 5.4, 0		; 前ダッシュ速度（y<0の場合、ホップステップ）
run.back = -7,-3		; バックステップ速度（y=0の場合、走り）
jump.neu = 0,-9		; 垂直ジャンプ速度
jump.back = -2.8		; 後方ジャンプ速度
jump.fwd = 	2.8		; 前方ジャンプ速度
runjump.back = -4.3,-10	; 後方ジャンプ速度（ダッシュ中）
runjump.fwd = 4.3,-10	; 前方ジャンプ速度（ダッシュ中）
airjump.neu = 0,0		; 空中垂直ジャンプ速度
airjump.back = 0,0		; 空中後方ジャンプ速度
airjump.fwd = 0,0		; 空中前方ジャンプ速度

[Movement]
airjump.num = 0	; 空中ジャンプ回数
airjump.height = 35	; 空中ジャンプ最低高度
yaccel = .5		; キャラ重力加速度
stand.friction = .85	; 摩擦係数（立ち状態）
crouch.friction = .82; 摩擦係数（しゃがみ状態）

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

;===============================================================================
; Definition of the Win/Lose/Intro Pause
;===============================================================================

;-------------------------------------------------------------------------------
; Lose Animation
[Statedef 170]
type = S
ctrl = 0
anim = 175 + Var(39)*10000
velset = 0,0

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

;Beer Riot Mode: Create Bart Devil
[State 193, 1]
type = Explod
trigger1 = Var(39)
trigger1 = AnimElem = 2,=0
anim = 10176
pos = 0,0
bindtime = -1
sprpriority = 5
ownpal = 1
persistent = 0

;Beer Riot Mode: Bart Evil Laugh
[State 100,1]
type = PlaySnd
trigger1 = Var(39)
trigger1 = AnimElem = 2,=0
value = 10170,0


[State 100,1]
type = PlaySnd
trigger1 = Var(39) = 0
trigger1 = AnimElem = 1,=1
value = 191,2

[State 100,1]
type = PlaySnd
trigger1 = Var(39) = 0
trigger1 = AnimElem = 5,=1
value = 13500,1

[State 100,1]
type = PlaySnd
trigger1 = Var(39) = 0
trigger1 = AnimElem = 5,=1
value = 5000,10

[State 0, EnvShake]
type = EnvShake
trigger1 = Var(39) = 0
trigger1 = AnimElem = 5,=1
time = 35
freq = 60
ampl = -8
phase = 90

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

;-------------------------------------------------------------------------------
; Survival Mode: Lose
[Statedef 175]
type = S
ctrl = 0
anim = 175
velset = 0,0

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

[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 191,2

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

[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 5,=1
value = 5000,10

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 5,=1
time = 35
freq = 60
ampl = -8
phase = 90
;ignorehitpause =
;persistent =


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

;-------------------------------------------------------------------------------
; Victory Animation
;-------------------------------------------------------------------------------
;

[Statedef 180]
type = S

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

;Victory Animation - Random Selector
[State 180, VarRandom]
type = VarRandom
trigger1 = Time = 1
trigger1 = NumHelper (3500) = 0 && var(9) = 0
range = 249
v = 5

;Victory Animation - Choose Victory 1
[State 180, 9]
type = VarSet
trigger1 = NumHelper (3500) = 0 && var(9) = 0
trigger1 = command = "hold_a"
v = 5
value = 25

;Victory Animation - Choose Victory 2
[State 180, 9]
type = VarSet
trigger1 = NumHelper (3500) = 0 && var(9) = 0
trigger1 = command = "hold_b"
v = 5
value = 75

;Victory Animation - Choose Victory 3
[State 180, 9]
type = VarSet
trigger1 = NumHelper (3500) = 0 && var(9) = 0
trigger1 = command = "hold_c"
v = 5
value = 125

;Victory Animation - Choose Victory 4
[State 180, 9]
type = VarSet
trigger1 = NumHelper (3500) = 0 && var(9) = 0
trigger1 = command = "hold_x"
v = 5
value = 175

;Victory Animation - Choose Victory 5
[State 180, 9]
type = VarSet
trigger1 = NumHelper (3500) = 0 && var(9) = 0
trigger1 = command = "hold_y"
v = 5
value = 225

;Normal Victory 1 - Evil Homer
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 0 && NumHelper (3500) = 0 && var(9) = 0
trigger1 = Var(5) = [0,49]
value = 181

;Normal Victory 2 - S-M-R-T
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 0 && NumHelper (3500) = 0 && var(9) = 0
trigger1 = Var(5) = [50,99]
value = 182

;Normal Victory 3 - Iori Invincible
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 0 && NumHelper (3500) = 0 && var(9) = 0
trigger1 = Var(5) = [100,149]
value = 183

;Normal Victory 4 - Bart Taunt
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 0 && NumHelper (3500) = 0 && var(9) = 0
trigger1 = Var(5) = [150,199]
value = 184

;Normal Victory 5 - Homer Spin
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 0 && NumHelper (3500) = 0 && var(9) = 0
trigger1 = Var(5) = [200,249]
value = 185

;Road Roller D'oh! KO Victory - WRYYYYYYYY!!!
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 1 && NumHelper (3500) !=0 && var(9) = 0
value = 186

;Shun Homer Satsu KO Victory
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 1 && NumHelper (3500) !=0 && var(9) = 1
value = 1

;Victory Animation 1 - Beer Riot Homer - "To Alcohol..."
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 1 && var(9) = 0
trigger1 = Var(5) = [0,82]
value = 10181

;Victory Animation 2 - Beer Riot Homer - "Free Duff!"
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 1 && var(9) = 0
trigger1 = Var(5) = [83,166]
value = 10182

;Victory Animation 3 - Beer Riot Homer - Flander-ality
[State 180,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 1 && NumHelper (3500) = 0 && var(9) = 0
trigger1 = Var(5) = [167,249]
value = 187


;-------------------------------------------------------------------------------
; Victory 1 - Evil Homer
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0,0

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

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

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,446]
flag = RoundNotOver

;-------------------------------------------------------------------------------
; Victory 2 - I am so S-M-R-T
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0,0

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

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

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,360]
flag = RoundNotOver

;-------------------------------------------------------------------------------
; Victory 3 - Iori Invincible
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0,0

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

[State 100,1, Woohoo]
type = PlaySnd
trigger1 = AnimElem = 2,=1
value = 0,14

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

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,390]
flag = RoundNotOver

;-------------------------------------------------------------------------------
; Victory 4 - Bart Taunt
[Statedef 184]
type = S
ctrl = 0
anim = 184
velset = 0,0,0

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

[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 7,=1
value = 184,0

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,360]
flag = RoundNotOver

;-------------------------------------------------------------------------------
; Victory 5 - Homer Spin
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0,0

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

[State 100,1, Woohoo]
type = PlaySnd
trigger1 = AnimElem = 2,=1
value = 0,14

[State 100,1, Homer Spin Whooping]
type = PlaySnd
trigger1 = AnimElem = 5,=1
value = 185,0
loop = 1

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,390]
flag = RoundNotOver

;-------------------------------------------------------------------------------
; Road Roller D'oh! Victory - WRYYYYYYYYY!!!
[Statedef 186]
type = S
ctrl = 0
anim = 13515
velset = 0,0,0

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

[State 100,1, WRYYYYYYY]
type = PlaySnd
trigger1 = Time = 0
value = 13515,0

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

;-------------------------------------------------------------------------------
; Flander-ality Victory!
[Statedef 187]
type = S
ctrl = 0
anim = 10183
velset = 0,0,0

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

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time > 105
flag = nomusic

[State 100,1, Fatality Start]
type = PlaySnd
trigger1 = AnimElem = 4
value = 10183,1


[State 0, BGPalFX]
type = BGPalFX
trigger1 = AnimElem = 4
time = -1
add = 0,0,0
mul = 112,112,112
sinadd = 0,0,0,10
invertall = 0
color = 256

[State 100,1, Fatality Hit]
type = PlaySnd
trigger1 = AnimElem = 7
value = 10183,5

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 7
time = 30
freq = 60
ampl = -9
phase = 90
;ignorehitpause =
;persistent =

[State 100,1, Death Scream]
type = PlaySnd
trigger1 = AnimElem = 8
value = 10183,3

[State 100,1, Homer Laugh]
type = PlaySnd
trigger1 = AnimElem = 13
value = 10183,4

[State 100,1, MK Fatality Theme]
type = PlaySnd
trigger1 = Time = 530
value = 10183,0

[State 100,1, Fatality]
type = PlaySnd
trigger1 = Time = 740
value = 10183,2



[State 0, Helper]
type = Helper
trigger1 = Time = 740
trigger1 = Facing = 1
helpertype = normal ;player
name =  "Fatality"
ID =  10184
stateno = 10184
pos = 160,-136
postype = back
facing = 1
keyctrl = 0
ownpal = 1
supermove = 99999
pausemove = 99999

[State 0, Helper]
type = Helper
trigger1 = Time = 740
trigger1 = Facing = -1
helpertype = normal ;player
name =  "Fatality"
ID =  10184
stateno = 10184
pos = 160,-136
postype = back
facing = -1
keyctrl = 0
ownpal = 1
supermove = 99999
pausemove = 99999

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,1000]
flag = RoundNotOver
;-------------------------------------
;Fatality Helper
[Statedef 10184]
type = S
physics = N
ctrl = 0
anim = 10184
velset = 0,0,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time > 2000
;ignorehitpause =
;persistent =

;-------------------------------------------------------------------------------
; Shun Homer Satsu Victory
[Statedef 186]
type = S
ctrl = 0
anim = 13604
velset = 0,0,0

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,120]
flag = RoundNotOver

;-------------------------------------------------------------------------------
; Victory - Beer Riot Homer - "To alcohol..."
[Statedef 10181]
type = S
ctrl = 0
anim = 10181
velset = 0,0,0

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

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

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,360]
flag = RoundNotOver

;-------------------------------------------------------------------------------
; Victory - Beer Riot Homer - "Free Duff!"
[Statedef 10182]
type = S
ctrl = 0
anim = 10181
velset = 0,0,0

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

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

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,360]
flag = RoundNotOver

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

[State 180,VarSet]
type = VarSet
trigger1 = Time = 0
v = 10
value = Random

;[State 190,4]
;type = Null ;ChangeState
;triggerall = Time = 0
;trigger1 = P2Name = "CVSKyo" || P4Name = "CVSKyo"
;value = 193

[State 190,4] ;Intro versus CHOUJIN DBZ characters (GigaBowserX)
type = ChangeState
triggerall = Time = 0
trigger1 = Enemy, AuthorName = "CHOUJIN" || Enemy, AuthorName = "CHOUJIN"
value = 194

[State 191,4]
type = ChangeState
trigger1 = P2Name = "Peter Griffin" || P4Name = "Peter Griffin"
trigger1 = RoundNo = 1
value = 191

;Intro Animation Random Selector
[State 180, VarRandom]
type = VarRandom
trigger1 = Time = 1
range = 150
v = 5

;Intro 1: Super Homer
[State 190,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 0
trigger1 = Var(5) = [0,49]
value = 10190

;Intro 2: Strong Man Homer
[State 190,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 0
trigger1 = Var(5) = [50,99]
value = 10191

;Intro 3: 1987 Homer
[State 190,ChangeState]
type = ChangeState
trigger1 = Time = 1
trigger1 = Var(39) = 0
trigger1 = Var(5) = [100,149]
value = 10194

; =========================================================
; Intro 1 - Super Homer
; =========================================================

[Statedef 10190]
type = A
ctrl = 0
physics = N
anim =  10190
velset = 0,0

[State 10190,1]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

[State 191, 3]
type = Screenbound
trigger1 = 1
value = 0
movecamera = 0,0

[State 10190,2]
Type = PosAdd
trigger1 = Time = 0
x = -214
y = -104

[State 10190,3]
Type = PlaySnd
trigger1 = Time = 30
value = 10190,0

[State 10190,4]
type = posadd
trigger1 = Time > 30
trigger1 = Time < 120
x = 3

[State 10190,5]
type = ChangeAnim
trigger1 = Time = 120
value = 10191


[State 10191, Gravity]
type = PosAdd
trigger1 = Time > 120
trigger1 = Pos Y <= 0
y = 2
x = -1

[State 10191, 2]
type = ChangeAnim
trigger1 = Pos Y > 0
trigger1 = Anim != 10192
value = 10192

[State 10190,3]
Type = PlaySnd
trigger1 = Anim = 10192
trigger1 = AnimElem = 2
value = 1,4

[State 10190,3]
Type = PlaySnd
trigger1 = Anim = 10192
trigger1 = AnimElem = 13
value = 0,14

[State 10190,4]
Type = ChangeState
trigger1 = Anim = 10192
trigger1 = AnimElem = 15
value = 0

; =========================================================
; Intro 2 - Strong Man Homer
; =========================================================

[Statedef 10191]
type = A
ctrl = 0
physics = N
anim =  10193
velset = 0,0

[State 10190,1]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

;"Heh heh heh heh! Suckers!"
[State 10190,3]
Type = PlaySnd
trigger1 = AnimElem = 3
value = 10191, 0

;Wood Creak
[State 10190,3]
Type = PlaySnd
trigger1 = AnimElem = 10
value = 10191, 1

;Kathud!
[State 10190,3]
Type = PlaySnd
trigger1 = AnimElem = 15
value = 10191, 2

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 15
time = 90
freq = 40
ampl = -4
phase = 90
;ignorehitpause =
;persistent =


;"D'oh!"
[State 10190,3]
Type = PlaySnd
trigger1 = AnimElem = 19
value = 5000, 10

[State 10190,4]
Type = ChangeState
trigger1 = AnimElem = 20
value = 0

; =========================================================
; Intro 3 - 1987 Homer
; =========================================================

[Statedef 10194]
type = S
ctrl = 0
anim = 10194
velset = 0,0,0

[State 10190,1]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

[State 194,1] ;"Let's all go out for frosty chocolate milkshakes!"
type = PlaySnd
trigger1 = AnimElem = 1
value = 10194, 0

[State 194,2]; POOF!
type = PlaySnd
trigger1 = AnimElem = 26
value = 1, 5

[State 194,2]; "OH MY GOD!"
type = PlaySnd
trigger1 = AnimElem = 30
value = 10194, 1

[State 106, 3]
type = Explod
trigger1 = AnimElem = 26
anim = 3006
pos = 0,0
bindtime = -1
sprpriority = 5
ownpal = 1

[State 194, 4]
type = EnvShake
trigger1 = AnimElem = 26
time = 15
ampl = -2
freq = 60
phase = 60

[State 194,5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;-------------------------------------------------------------------------------

;-------------------------------------------------------------------------------
; イントロ（通常１）
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0,0

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

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

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

[State 191,4]
type = ChangeState
triggerall = AnimTime = 0
trigger1 = P2Name = "Peter Griffin" || P4Name = "Peter Griffin"
value = 192

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

;===============================================================================
; Extra intro animarion vs. Peter Griffin
; by: BBHood217

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

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

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

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

;---------------------------------------------------------------------
; イントロ（対カプエス京専用）
[Statedef 193]
type = S
physics = N
ctrl = 0
anim = 192
velset = 0, 0
sprpriority = 1

[State 4400,AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

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

[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 3,=9
value = 1,15

[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 37,=0
value = 1,16

[State 193, 1]
type = Explod
trigger1 = AnimElem = 3,=9
anim = 6000
pos = 0,0
bindtime = -1
sprpriority = 5
ownpal = 1

[State 193, 1]
type = Explod
trigger1 = AnimElem = 6,=7
anim = 6001
pos = 0,0
bindtime = -1
removetime = 250
sprpriority = 5
ownpal = 1

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

;-------------------------------------------------------------------------------
; Intro against CHOUJIN DBZ characters
; by: GigaBowserX
;-------------------------------------------------------------------------------
[Statedef 194]
type = S
ctrl = 0
anim = 193
velset = 0,0,0

[State 4400,AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay
flag3 = nomusic

[State 100, Kakkarotto]
type = PlaySnd
trigger1 = AnimElem = 2
value = 10192, 0

[State 100,1, Charge Growl]
type = PlaySnd
trigger1 = AnimElem = 16
value = 10192, 1

[State 100,1, CHARGE SCREAAAAMMMM]
type = PlaySnd
trigger1 = AnimElem = 24
value = 10192, 2

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 24
helpertype = normal ;player
name = "BLAST"
ID = 666
stateno = 666
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove



[State 100,1, DBZ Aura Start Sound]
type = PlaySnd
trigger1 = AnimElem = 24
value = 666, 0

[State 192, DBZ Aura Loop Sound]
type = PlaySnd
trigger1 = AnimElem = 24
value = 666,1
freqmul = 1.0
loop = 1
pan = 0
;abspan =
;ignorehitpause =
;persistent =


[State 100,1, Dramatic Music]
type = PlaySnd
trigger1 = AnimElem = 24
value = 10192, 1337

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 24
time = 330

[State 0, Darken BKG]
type = BGPalFX
trigger1 = AnimElem = 24
time = 330
add = -100,-100,-100
mul = 250,224,120
sinadd = -10,-10,-10,10

[State 0, StopSnd]
type = StopSnd
trigger1 = AnimElem = 26
channel = -1

[State 100,1, Sudden Stop]
type = PlaySnd
trigger1 = AnimElem = 26
value = 666, 2

; "Aww, crap!"
[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 27
value = 191, 2

;[State 100,1]
;type = PlaySnd
;trigger1 = AnimElem = 18
;value = 0, 113

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

;-------------------------------------------------------------------------------
[Statedef 666]
type = S
ctrl = 0
anim = 194
velset = 0,0,0

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 330
value = 667
ctrl = 0

;-------------------------------------------------------------------------------
[Statedef 667]
type = S
ctrl = 0
anim = 667
velset = 0,0,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
;ignorehitpause =
;persistent =

;-------------------------------------------------------------------------------
; 挑発
[Statedef 195]
type = S
movetype = I
physics = S
anim = 195 + Var(39)*10000
velset = 0, 0
ctrl = 0

[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,108,110),ifelse(Random <= 500,7,8))
channel = 0

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

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

;-------------------------------------------------------------------------------
; 遠距離・立ち弱パンチ
[Statedef 200]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 200  + Var(39)*10000
ctrl = 0
poweradd = 0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),ifelse(Random <= 500,4,5))
channel = 0

[State 200,HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype = Light
damage    = ifelse(Var(39)=1,21,14)
getpower = 72,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 10,10
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-60
hitsound = S3, 0
guardsound = S4, 0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -4
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 200,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 6 ;3
movetype = I

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

;-------------------------------------------------------------------------------
; 近距離・立ち弱パンチ
[Statedef 205]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 205 + Var(39)*10000
ctrl = 0
poweradd = 0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),ifelse(Random <= 500,4,5))
channel = 0

[State 200,HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype = Light
damage    = ifelse(Var(39)=1,28,21)
getpower = 72,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 10,10
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-60
hitsound = S3, 0
guardsound = S4, 0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -4
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

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

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

;-------------------------------------------------------------------------------
; 遠距離・立ち強パンチ
[Statedef 210]
type    = S
movetype= A
physics = S
poweradd= 0
anim = 210 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,103,104),5)
channel = 0

[State 200,HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype = Hard
damage    = ifelse(Var(39)=1,91,84)
getpower = 144,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 11,12
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-60
hitsound = S3, 1
guardsound = S4, 0
ground.type = Low
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -7
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 230, ChangeAnim]
type = ChangeAnim
trigger1 = HitPauseTime > 0 && HitPauseTime < 10
value = 210 + Var(39)*10000
elem = 4
ignorehitpause = 1

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

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

;-------------------------------------------------------------------------------
; 近距離・立ち強パンチ
[Statedef 215]
type    = S
movetype= A
physics = S
anim = 215 + Var(39)*10000
poweradd= 0
ctrl = 0
velset = 0,0
juggle = 15

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

;Beer Riot Mode: Force distance cushion
[State 0, Width]
type = Width
trigger1 = var(39) = 1
trigger1 = Time < 26
value = 32,0

;Beer Riot Mode: Nudge forward for initial attack
[State 0, PosAdd]
type = PosAdd
trigger1 = var(39) = 1
trigger1 = Time < 26
x = 2
y = 0
;ignorehitpause =
;persistent =


[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,103,104),5)
channel = 0

[State 200,HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype = Hard
damage    = ifelse(Var(39)=1,ifelse((AnimElem = 2),77,63),70)
getpower = 144,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 14,12
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-60
hitsound = S3, 1
guardsound = S4, 0
ground.type = High
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -7
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State -2, VarSet]
type = VarSet
trigger1 = Time = 0
trigger2 = AnimElem = 3
var(13) = 0

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

[State 230, ChangeAnim]
type = ChangeAnim
trigger1 = HitPauseTime > 0 && HitPauseTime < 11
value = 215 + Var(39)*10000
elem = 3
ignorehitpause = 1

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

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

;-------------------------------------------------------------------------------
; 遠距離・立ち弱キック
[Statedef 230]
type    = S
movetype= A
physics = S
poweradd= 0
anim = 230 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),ifelse(Random <= 500,4,5))
channel = 0

[State 200,HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype = Light
damage    = ifelse(Var(39)=1,35,28)
getpower = 72,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 8,8
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-30
hitsound = S3, 2
guardsound = S4, 0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -5
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 230, ChangeAnim]
type = ChangeAnim
trigger1 = HitPauseTime > 0 && HitPauseTime < 7
value = 230 + Var(39)*10000
elem = 4
ignorehitpause = 1

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

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

;-------------------------------------------------------------------------------
; 近距離・立ち弱キック
[Statedef 235]
type    = S
movetype= A
physics = S
anim = 235 + Var(39)*10000
poweradd= 0
ctrl = 0
velset = 0,0,0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),ifelse(Random <= 500,4,5))
channel = 0

[State 235,HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype = Light
damage    = ifelse(Var(39)=1,28,21)
getpower = 72,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 10,10
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-15
hitsound = S3, 2
guardsound = S4, 0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -5
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

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

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

;-------------------------------------------------------------------------------
; 遠距離・立ち強キック
[Statedef 240]
type    = S
movetype= A
physics = S
poweradd= 0
anim = 240 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,103,104),5)
channel = 0


[State 240,HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype = Hard
damage    = ifelse(Var(39)=1,91,84)
getpower = 144,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-85
hitsound = S3, 4
guardsound = S4, 0
ground.type = Hight
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -7,-5
air.hittime = 13
air.velocity = -7,-5
fall = 1
yaccel = .4

[State 230, ChangeAnim]
type = ChangeAnim
trigger1 = HitPauseTime > 0 && HitPauseTime < 10
value = 240 + Var(39)*10000
elem = 5
ignorehitpause = 1

[State 240,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

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

;-------------------------------------------------------------------------------
; 近距離・立ち強キック
[Statedef 245]
type    = S
movetype= A
physics = S
poweradd= 0
anim = 245 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,103,104),5)
channel = 0

[State 240,HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype = Hard
damage    = ifelse(Var(39)=1,98,91)
getpower = 144,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-85
hitsound = S3, 3
guardsound = S4, 0
ground.type = Hight
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -7
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

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

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

;-------------------------------------------------------------------------------
; しゃがみ弱パンチ
[Statedef 400]
type    = C
movetype= A
physics = C
poweradd= 0
anim = 400 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 100
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),ifelse(Random <= 500,4,5))
channel = 0

[State 400,HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
animtype = Light
damage    = ifelse(Var(39)=1,21,14)
getpower = 72,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 9,9
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-45 
hitsound = S3, 0
guardsound = S4, 0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -5
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 400,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

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

;-------------------------------------------------------------------------------
; しゃがみ強パンチ
[Statedef 410]
type    = C
movetype= A
physics = C
poweradd= 0
anim = 410 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,103,104),5)
channel = 0

[State 410,HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA
animtype = Hard
damage    = ifelse(Var(39)=1,84,77)
getpower = 144,36
givepower = 36
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-90
hitsound = S3, 1
guardsound = S4, 0
ground.type = High
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -7
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 410,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

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

;-------------------------------------------------------------------------------
; しゃがみ弱キック
[Statedef 430]
type    = C
movetype= A
physics = C
poweradd= 0
anim = 430 + Var(39)*10000
ctrl = 0
velset = 0, 0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),ifelse(Random <= 500,4,5))
channel = 0

[State 430,HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
animtype = Light
damage    = ifelse(Var(39)=1,21,14)
getpower = 72,36
givepower = 36
guardflag = L
hitflag = MAF
pausetime = 10,10
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-15
hitsound = S3, 2
guardsound = S4, 0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -4
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 430,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

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

;-------------------------------------------------------------------------------
; しゃがみ強キック
[Statedef 440]
type    = C
movetype= A
physics = C
anim = 440 + Var(39)*10000
poweradd= 0
ctrl = 0
juggle = 15

[State 1110, posadd]
type = posadd
trigger1 = AnimElem = 2,=3 || AnimElem = 3,= 0
x = 13

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


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

[State 1005, Explod]
type = Explod
trigger1 = AnimElem = 6,=4

anim = 2050
id = 2050
pos =0,0
postype = P1
sprpriority = 5
facing = -1
bindtime = 1
ownpal = 1

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = ifelse(Var(39)=1,77,70)
getpower = 144,36
givepower = 36
animtype = Hard
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-50
hitsound = S3, 3
guardsound = S4, 0
ground.type = Trip
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1.5,-6
air.hittime = 13
air.velocity = -1.5,-6
guard.velocity = -7
fall = 1
fall.recovertime = 20
yaccel = .55

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

;-------------------------------------------------------------------------------
; 垂直／斜めジャンプ弱パンチ
[Statedef 600]
type    = A
movetype= A
physics = N
poweradd= 0
anim = 600 + Var(39)*10000
ctrl = 0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),ifelse(Random <= 500,4,5))
channel = 0

[State 600,HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
animtype = Light
damage    = ifelse(Var(39)=1,42,28)
getpower = 72,36
givepower = 36
guardflag = HA
hitflag = MAF
pausetime = 8,8
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-30
hitsound = S3, 0
guardsound = S4, 0
ground.type = High
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -4
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 600,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 105,VelAdd]
type = VelAdd
trigger1 = 1
y = const(Movement.yaccel)+Var(39)*.25

[State 105,End]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;-------------------------------------------------------------------------------
; 垂直／斜めジャンプ強パンチ
[Statedef 610]
type    = A
movetype= A
physics = N
poweradd= 0
anim = 610 + Var(39)*10000
ctrl = 0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,103,104),5)
channel = 0

[State 610,HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
animtype = Hard
damage    = ifelse(Var(39)=1,77,70)
getpower = 144,36
givepower = 36
guardflag = HA
hitflag = MAF
pausetime = 12,20
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-20
hitsound = S3, 1
guardsound = S4, 0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
guard.slidetime = 16
guard.hittime = 16
ground.velocity = -4
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

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

[State 105,VelAdd]
type = VelAdd
trigger1 = 1
y = const(Movement.yaccel)+Var(39)*.25

[State 105,End]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;-------------------------------------------------------------------------------
; 垂直／斜めジャンプ弱キック
[Statedef 630]
type    = A
movetype= A
physics = N
poweradd= 0
anim = 630 + Var(39)*10000
ctrl = 0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),ifelse(Random <= 500,4,5))
channel = 0

[State 630,HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
animtype = Light
damage    = ifelse(Var(39)=1,49,35)
getpower = 72,36
givepower = 36
guardflag = HA
hitflag = MAF
pausetime = 10,10
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-30
hitsound = S3, 2
guardsound = S4, 0
ground.type = High
ground.slidetime = 8
ground.hittime  = 8
guard.slidetime = 16
ground.velocity = -4
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 630,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 105,VelAdd]
type = VelAdd
trigger1 = 1
y = const(Movement.yaccel)+Var(39)*.25

[State 105,End]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;-------------------------------------------------------------------------------
; 垂直／斜めジャンプ強キック
[Statedef 640]
type    = A
movetype= A
physics = N
poweradd= 0
anim = 640 + Var(39)*10000
ctrl = 0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,103,104),5)
channel = 0

[State 640,HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
animtype = Hard
damage    = ifelse(Var(39)=1,77,70)
getpower = 144,36
givepower = 36
guardflag = HA
hitflag = MAF
pausetime = 12,12
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-35
hitsound = S3, 3
guardsound = S4, 0
ground.type = High
ground.slidetime = 8
ground.hittime  = 10
guard.slidetime = 16
guard.hittime = 16
ground.velocity = -5
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

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

[State 105,VelAdd]
type = VelAdd
trigger1 = 1
y = const(Movement.yaccel)+Var(39)*.25

[State 105,End]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;===============================================================================
; Definition of the (Dir + Button) attack
;===============================================================================

;-------------------------------------------------------------------------------
; 外式・轟斧　陰　"死神"（→＋A）
[Statedef 700]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 700 + Var(39)*10000
poweradd = 0
juggle = 15

[State 1110, posadd]
type = posadd
trigger1 = AnimElem = 2,=0 || AnimElem = 2,=3 || AnimElem = 3,=0
trigger2 = AnimElem = 3,=3 || AnimElem = 4,=0 || AnimElem = 9,=0
x = 6

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5,=1
value = 0,ifelse(Var(39)=1,110,5)
channel = 0

[State 700,HitDef]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NA
animtype = Hard
damage    = ifelse(Var(39)=1,70,63)
getpower = 144,36
givepower = 36
guardflag = H
hitflag = MAF
pausetime = 10,10
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-80
hitsound = S3, 3
guardsound = S4, 0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -6
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 710,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

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

;-------------------------------------------------------------------------------
; panzaso a駻eo ----------------
[Statedef 710]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 710 + Var(39)*10000
poweradd = 0
juggle = 15

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 && Random <= 300
value = 0,ifelse(Var(39)=1,ifelse(Random <= 500,102,103),5)
channel = 0

[State 700,HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
animtype = Light
damage    = ifelse(Var(39)=1,35,28)
getpower = 144,36
givepower = 36
guardflag = H
hitflag = MAF
pausetime = 9,9
sparkno = S2000+(random%3)
guard.sparkno = S2010
sparkxy = 0,-20
hitsound = S3, 3
guardsound = S4, 0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -4
guard.velocity = -7
air.hittime = 13
air.velocity = -2,-5
yaccel = .4

[State 710,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 105,VelAdd]
type = VelAdd
trigger1 = 1
y = const(Movement.yaccel)+Var(39)*.25

[State 105,End]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

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

;-------------------------------------------------------------------------------
; 逆剥ぎ（Ｐ通常投げ）
[Statedef 800]
type = S
movetype = A
physics = S
ctrl = 0
anim = 800 + Var(39)*10000
velset = 0, 0

[State 800,HitDef]
type = Hitdef
trigger1 = AnimElem = 2
trigger1 = P2MoveType != H
trigger1 = P2StateNo != [150,155]
attr = S, NT
priority = 3,Miss
getpower = 0
hitflag = M-
numhits = 1
sparkno = -1
p1facing = ifelse (command = "holdfwd", 1,-1)
p2facing = 1
p1stateno = 810
p2stateno = 820
p2getp1state = 1
hitsound = -1
fall = 1
fall.recover = 0

[State 710,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 5000,ifelse(Var(39)=1,110,10)
channel = 0

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

;-------------------------------------------------------------------------------
; 逆剥ぎ（Ｋ通常投げ）
[Statedef 850]
type = S
movetype = A
physics = S
ctrl = 0
anim = 850 + Var(39)*10000
velset = 0, 0

[State 800,HitDef]
type = Hitdef
trigger1 = AnimElem = 2
trigger1 = P2MoveType != H
trigger1 = P2StateNo != [150,155]
attr = S, NT
priority = 3,Miss
getpower = 0
hitflag = M-
numhits = 1
sparkno = -1
p1facing = ifelse (command = "holdfwd", 1,-1)
p2facing = 1
p1stateno = 810
p2stateno = 820
p2getp1state = 1
hitsound = -1
fall = 1
fall.recover = 0

[State 710,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 5000,ifelse(Var(39)=1,110,10)
channel = 0

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

;-------------------------------------------------------------------------------
; 逆剥ぎ（成功）
[Statedef 810]
type = S
movetype = A
physics = N
anim = 810 + Var(39)*10000
velset = 0, 0
poweradd = 0
sprpriority = 3

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,ifelse(Var(39)=1,106,6)
channel = 0

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

[State 810,TargetBind]
type = TargetState
trigger1 = AnimElem = 1,< 6 && PrevStateNo = 800
trigger2 = AnimElem = 1,< 2 && PrevStateNo = 850
triggerall = Target,Command = "fwd_b" || Target,Command = "fwd_y" || Target,Command = "back_b" || Target,Command = "back_y"
value = 1755

[State 810,TargetBind]
type = ChangeState
trigger1 = AnimElem = 1,< 6 && PrevStateNo = 800
trigger2 = AnimElem = 1,< 2 && PrevStateNo = 850
triggerall = Target,Command = "fwd_b" || Target,Command = "fwd_y" || Target,Command = "back_b" || Target,Command = "back_y"
value = 1750

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

[State 810,Width]
type = Width
triggerall = AnimElem = 1
trigger1 = FrontEdgeDist < 40
trigger2 = BackEdgeDist < 40
edge = 40,40

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

;[State 193, 1]
;type = Explod
;trigger1 = AnimElem = 16,=0
;anim = 2000
;pos = 20,-65
;bindtime = -1
;sprpriority = 5
;ownpal = 1

[State 810,TargetBind]
type = TargetBind
trigger1 = AnimElem = 16,<0
pos = 35,0

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

[State 810,TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 16,=1
value = -IfElse(PrevStateNo = 800,119,133)

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

;-------------------------------------------------------------------------------
; 逆剥ぎ（投げられ側）
;------------------------ 1
[Statedef 820]
type = A
movetype = H
physics = N
ctrl = 0

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

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

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

;------------------------ 2
[Statedef 821]
type = A
movetype = H
physics = N
velset = -4.5,-6
ctrl = 0

[State 820,ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = 5050

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

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

[State 1509, SelfState]
type = SelfState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5100

;=====================================================================
; Beer Riot Mode
;=====================================================================
;
;-------------------------------------------------------------------------------
; 暴走
[Statedef 9999]
type = S
movetype = I
physics = S
anim = 9999
velset = 0, 0
ctrl = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 0,100
channel = 0
persistent = 0

[State 3000, Pause]
type = Pause
trigger1 = AnimElem = 3,=1
time = 39
movetime = 39

[State -2, 1]
type = VarSet
trigger1 = AnimElem = 3,=1
var(39) = 1

[State 1000, 3]
type = LifeSet
trigger1 = AnimElem = 3,=1        
value = ceil(var(29)/2)

[State 3000, Super]
type = Helper
trigger1 = AnimElem = 3,=1
persistent = 0
id = 2320
name = "Super Spark Helper"
pos = -26,-74
postype = P1
stateno = 2300
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

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

;---------------------------------------------------------------------
; 緊急回避動作
[Statedef 4000]
type = S
movetype = I
physics = N
ctrl = 0
anim = 4000 + Var(39)*10000
velset = 4.53, 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 5000, 25 ;0,ifelse(Var(39)=1,103,5)-------de lado a lado
channel = 0

[State 4050,0]
type = NotHitBy
trigger1 = AnimElem = 13,< 0
value = SCA

[State 4050,1]
type = HitBy
trigger1 = 1
value = SC, NT, ST, HT

[State 4050,2]
type = PlayerPush
trigger1 = AnimElem = 13,< 0
value = 0

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

[State 4050, 6]
type = AfterImage
trigger1 = AnimElem = 2
time = 18
length = 10
framegap = 6 ;3
trans = add1
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1

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

;---------------------------------------------------------------------
; ゲージ溜め動作
[Statedef 4100]
type = S
movetype = I
physics = N
ctrl = 0
anim = 4100 + Var(39)*10000
velset = 0, 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 0,ifelse(Var(39)=1,105,3)
channel = 0

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 1, 3
channel = 1
persistent = 0

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

[State 4100,Poweradd]
type = Poweradd
trigger1 = Time < 11
value = 3

[State 4100,Poweradd]
type = Poweradd
trigger1 = Time < 21
value = 5

[State 4100,Poweradd]
type = Poweradd
trigger1 = Time >= 21
value = 10

[State 4050,8]
type = ChangeState
trigger1 = Command != "charge" && (Command != "charge1" || Command != "charge2")
trigger2 = Power >= 4000
value = 4101
ctrl = 0

;------------------- 終了
[Statedef 4101]
type = S
movetype = I
physics = N
ctrl = 0
anim = 4101 + Var(39)*10000
velset = 0, 0

[State 820,PlaySnd]
type = Stopsnd
trigger1 = Time = 0
channel = 1
persistent = 0

[State 820,PlaySnd]
type = Stopsnd
trigger1 = Time = 0
channel = 0
persistent = 0

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

;---------------------------------------------------------------------------
; ガードクラッシュ（立ち）
;------------------- 1
[Statedef 5910]
type    = S
movetype= H
physics = N
anim = 5910 + Var(39)*10000
velset = 0,0

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

[State -2, 1]
type = VarSet
trigger1 = Time = 0
var(18) = 0

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 5000,ifelse(Var(39)=1,110,10)
channel = 0
persistent = 0

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1, 6
persistent = 0

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

;------------------- 2
[Statedef 5911]
type    = S
movetype= H
physics = S

[State 5001, 2]
type = ChangeAnim
trigger1 = (Anim = 5910 || Anim = 15910) && Time > 34
value = 5911 + Var(39)*10000
persistent = 0

[State 1005, Explod]
type = Explod
trigger1 = Time = 0
anim = 5950
id = 5950
pos =0,-75
postype = P1
sprpriority = 3
facing = 1
bindtime = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

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

[State 5001, 3]
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = (Anim = 5911 || Anim = 15911) && AnimTime = 0
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = (Anim = 5911 || Anim = 15911) && AnimTime = 0
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = (Anim = 5911 || Anim = 15911) && AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; ガードクラッシュ（しゃがみ）
;------------------- 1
[Statedef 5920]
type    = C
movetype= H
physics = N
anim = 5920 + Var(39)*10000
velset = 0,0

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

[State -2, 1]
type = VarSet
trigger1 = Time = 0
var(18) = 0

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 5000,ifelse(Var(39)=1,110,10)
channel = 0
persistent = 0

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1, 6
persistent = 0

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

;------------------- 2
[Statedef 5921]
type    = C
movetype= H
physics = C

[State 5001, 2]
type = ChangeAnim
trigger1 = (Anim = 5920 || Anim = 15920) && Time > 34
value = 5921 + Var(39)*10000
persistent = 0

[State 1005, Explod]
type = Explod
trigger1 = Time = 0
anim = 5950
id = 5950
pos =0,-45
postype = P1
sprpriority = 3
facing = 1
bindtime = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

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

[State 5001, 3]
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = (Anim = 5921 || Anim = 15921) && AnimTime = 0
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = (Anim = 5921 || Anim = 15921) && AnimTime = 0
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = (Anim = 5921 || Anim = 15921) && AnimTime = 0
value = 0
ctrl = 1

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

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

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

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

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

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

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

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

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

[State 3001, Super]
type = Helper
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
persistent = 0
id = 5305
name = "Chicken"
pos = 0,0
postype = P1
stateno = 5305
helpertype = normal
keyctrl = 0
ownpal = 1

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

;------------------- 3
[Statedef 5320]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 5300 + Var(39)*10000
velset = 0,0

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

[State 5300, Varadd]
type = Varadd
trigger1 = Time = 0
var(24) = 5

[State 180,VarSet]
type = VarSet
trigger1 = Time = 0
v = 10
value = Random

[State 5300, VarSet]
type = VarSet
trigger1 = Time = 0
var(23) = ifelse((Var(10) = [0,49]),70,ifelse((Var(10) = [50,199]),84,ifelse((Var(10) = [200,599]),126,ifelse((Var(10) = [600,899]),168,210))))

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

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

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

;---------------------------------------------------------------------
; 投げ抜け
;------------------------ 自分側
[Statedef 1750]
type = S
movetype = I
physics = N
anim = 5910 + Var(39)*10000
ctrl = 0
velset = -3, 0

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1, 7
persistent = 0

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 5000,ifelse(Var(39)=1,110,10)
channel = 0
persistent = 0

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

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

[State 4100,4]
type = PlayerPush
trigger1 = P2BodyDist X < 0
value = 0

[State 1005, Explod]
type = Explod
trigger1 = Time = 0
anim = 2200
id = 2200
pos =0,0
postype = P1
sprpriority = 5
facing = 1
bindtime = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 3001, Super]
type = Null;Helper
trigger1 = Time = 0
name = "Super Spark Helper"
pos = 0,0
postype = P1
stateno = 2550
helpertype = normal
keyctrl = 0
ownpal = 1

[State 105,End]
type = ChangeState
trigger1 = Time >= 30
value = 0
ctrl = 1

;------------------------ 相手側
[Statedef 1755]
type = S
movetype = I
physics = N
ctrl = 0
velset = -3, 0
facing = enemy,facing

[State 1040,ChangeAnim]
type = ChangeAnim
triggerall = Time = 0 && SelfAnimExist(5910)
trigger1 = authorname = "H”" || authorname = "M.M.R." || authorname = "CAMRAT Type KOF"
trigger2 = authorname = "Tin" || authorname = "Nyankoro" || authorname = "ryokucha"
trigger3 = authorname = "Third" || authorname = "adamskie" || authorname = "Bad Darkness"
value = 5910

[State 820,ChangeAnim2]
type = ChangeAnim
trigger1 = Time = 0 && !SelfAnimExist(5910)
value = 5007

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

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

[State 4100,4]
type = PlayerPush
trigger1 = P2BodyDist X < 0
value = 0

[State 105,End]
type = SelfState
trigger1 = Time >= 29
value = 0
ctrl = 1

;=====================================================================
; 特殊エフェクト関連
;=====================================================================

;---------------------------------------------------------------------------
; パワー溜めエフェクト
;------------------------ 
[Statedef 4110]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
ownpal = 1

[State 4110, BindToParent]
type = BindToParent
trigger1 = 1
pos = 20,0

[State 4110, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
trigger2 = Parent,StateNo = 4100
value = 4116

[State 4110, Varset]
type = Varset
trigger1= AnimElem = 1,=0
ignorehitpause = 1
Fv = 1
value = (power * 0.00033)

[State 4110, Explod]
type = Explod
trigger1 = Time = 0 && NumExplod(4110) = 0
anim = 4110
id = 4110
pos = 0,0
postype = P1
scale  = 1,Fvar(1)
sprpriority = 3
bindtime = -1
ownpal = 0
removetime = 999999
facing = 1
persistent = 0

[State 4110, Explod]
type = Explod
trigger1 = Time = 0 && NumExplod(4115) = 0
anim = 4115
id = 4115
pos = 0,0
postype = P1
sprpriority = -1
bindtime = -1
ownpal = 0
removetime = 999999
facing = 1
persistent = 0

[State 4110, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 1,=0
ID = 4110
scale  = 1,Fvar(1)

[State 4110, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 1,=1
ID = 4110
scale  = .8,Fvar(1)

[State 4110, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 1,=2
ID = 4110
scale  = .65,Fvar(1)

[State 4110, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 1,=3
ID = 4110
scale  = .4,Fvar(1)

[State 4110, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 1,=4
ID = 4110
scale  = .3,Fvar(1)

[State 4110, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 1,=5
ID = 4110
scale  = .2,Fvar(1)

[State 4110, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 1,=6
ID = 4110
scale  = .15,Fvar(1)

[State 4110, Varset]
type = Varset
trigger1= AnimElem = 1,=0
ignorehitpause = 1
var(1) = 0
persistent = 0

[State 4110, Varadd]
type = Varadd
trigger1= AnimElem = 1,>0
ignorehitpause = 1
var(1) = -32

[State 4110, PalFX]
type = PalFX
trigger1= AnimElem = 1,>0
add = Var(1)-1,Var(1)-1,Var(1)-1
time = 1

[State 4110, RemoveExplod]
type = RemoveExplod
trigger1 = Parent,StateNo != [4100,4101]
trigger2 = AnimTime = 0
id = 4110

[State 4110, RemoveExplod]
type = RemoveExplod
trigger1 = Parent,StateNo != [4100,4101]
trigger2 = AnimTime = 0
id = 4115

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Parent,StateNo != [4100,4101]
trigger2 = AnimTime = 0

;---------------------------------------------------------------------------
; ダッシュエフェクト
;------------------------ 1
[Statedef 2155]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 4110, Explod]
type = Explod
trigger1 = Time = 0 && NumExplod(2155) = 0
anim = 2155
id = 2155
pos = 0,0
postype = P1
sprpriority = 5
bindtime = 1
ownpal = 0
removetime = 11
persistent = 0

[State 4110, Varset]
type = Varset
trigger1= Time = 0
ignorehitpause = 1
var(1) = 0
persistent = 0

[State 4110, Varadd]
type = Varadd
trigger1= Time > 0
ignorehitpause = 1
var(1) = -16

[State 4110, PalFX]
type = PalFX
trigger1= Time > 0
add = Var(1)-1,Var(1)-1,Var(1)-1
time = 1

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 0 && NumExplod(2155) = 0

;------------------------ 2
[Statedef 2150]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 4110, BindToParent]
type = BindToParent
trigger1 = Time < 13
pos = 0,0

[State 4110, Explod]
type = Explod
trigger1 = Time = 0 && NumExplod(2150) = 0
anim = 2150
id = 2150
pos = 0,0
postype = P1
sprpriority = 5
bindtime = -1
ownpal = 0
removetime = 20
facing = 1
persistent = 0

[State 4110, Varset]
type = Varset
trigger1= Time = 0
ignorehitpause = 1
var(1) = 0
persistent = 0

[State 4110, Varadd]
type = Varadd
trigger1= Time = 13
ignorehitpause = 1
var(1) = 32
persistent = 0

[State 4110, Varadd]
type = Varadd
trigger1= Time > 13
ignorehitpause = 1
var(1) = -32

[State 4110, PalFX]
type = PalFX
trigger1= Time > 0
add = Var(1),Var(1)-1,Var(1)-1
time = 1

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 0 && NumExplod(2150) = 0

;---------------------------------------------------------------------------
; ジャンプエフェクト
;------------------------ 1
[Statedef 2100]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 4110, Explod]
type = Explod
trigger1 = Time = 0
anim = 2100
id = 2100
pos = 0,0
postype = P1
vel = 2.4,-2.5
sprpriority = 5
bindtime = 1
ownpal = 0
removetime = 10
facing = 1
persistent = 0

[State 4110, Explod]
type = Explod
trigger1 = Time = 0
anim = 2100
id = 2100
pos = 0,0
postype = P1
vel = 1.4,-1.5
sprpriority = 5
bindtime = 1
ownpal = 0
removetime = 10
facing = 1
persistent = 0

[State 4110, Explod]
type = Explod
trigger1 = Time = 0
anim = 2100
id = 2100
pos = 0,0
postype = P1
vel = -1.1,-1.8
sprpriority = 5
bindtime = 1
ownpal = 0
removetime = 10
facing = 1
persistent = 0

[State 4110, Explod]
type = Explod
trigger1 = Time = 0
anim = 2100
id = 2100
pos = 0,0
postype = P1
vel = -1.8,-0.7
sprpriority = 5
bindtime = 1
ownpal = 0
removetime = 10
facing = 1
persistent = 0

[State 4110, Explod]
type = Explod
trigger1 = Time = 0
anim = 2100
id = 2100
pos = 0,0
postype = P1
vel = -3.2,-4.0
sprpriority = 5
bindtime = 1
ownpal = 0
removetime = 10
facing = 1
persistent = 0

[State 4110, Explod]
type = Explod
trigger1 = Time = 0
anim = 2100
id = 2100
pos = 0,0
postype = P1
vel = -3.2,-4.0
sprpriority = 5
bindtime = 1
ownpal = 0
removetime = 10
facing = 1
persistent = 0

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 0 && NumExplod(2100) = 0

;---------------------------------------------------------------------------
; 炎エフェクト
;------------------------ 
[Statedef 2020]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 4110, Varset]
type = ParentVarset
trigger1= Time = 0
ignorehitpause = 1
var(14) = 1
persistent = 0

[State 18600, PosSet]
type = PosSet
trigger1 = 1
x = enemynear,pos x
y = enemynear,pos y
ignorehitpause = 1

[State -3, Burn sparks]
type = Explod
trigger1 = Time = 0
anim = 2020
id = 2020
postype = p2
pos = (enemynear,const(size.mid.pos.x))-15,(enemynear,const(size.mid.pos.y))-10
ownpal = 1
bindtime = -1
removetime = 9999999
ignorehitpause = 1
sprpriority = 1

[State -3, Burn sparks]
type = Explod
trigger1 = Time = 0
anim = 2020
id = 2020
postype = p2
pos = (enemynear,const(size.mid.pos.x))-5,(enemynear,const(size.mid.pos.y))-20
ownpal = 1
bindtime = -1
removetime = 9999999
ignorehitpause = 1
sprpriority = 1

[State -3, Burn sparks]
type = Explod
trigger1 = Time = 0
anim = 2025
id = 2020
postype = p2
pos = (enemynear,const(size.mid.pos.x))+15,(enemynear,const(size.mid.pos.y))+20
ownpal = 1
bindtime = -1
removetime = 9999999
ignorehitpause = 1
sprpriority = 1

[State -3, Burn sparks]
type = Explod
trigger1 = Time = 0
anim = 2025
id = 2020
postype = p2
pos = (enemynear,const(size.mid.pos.x))+20,(enemynear,const(size.mid.pos.y))-5
ownpal = 1
bindtime = -1
removetime = 9999999
ignorehitpause = 1
sprpriority = 1

[State 4110, RemoveExplod]
type = RemoveExplod
trigger1 = Time > 0 && Parent,var(14) = 0
id = 2020

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 0 && Parent,var(14) = 0

;---------------------------------------------------------------------------
; Bash Dash Masher Hyper Spark Helper
;------------------------ 1
[Statedef 2005]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 4110, Explod]
type = Explod
trigger1 = Time = 0 && NumExplod(2005) = 0
anim = 2310
id = 2005
pos = 0,ifelse(IsHelper(2005)=1,(Parent,Var(20)),0)
postype = P1
sprpriority = 8
bindtime = -1
ownpal = 0
removetime = 18
facing = ifelse((Random=[0,499]),-1,1)
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 4110, Varset]
type = Varset
trigger1= Time = 0
ignorehitpause = 1
var(1) = 0
persistent = 0

[State 4110, Varadd]
type = Varadd
trigger1= Time >= 8
ignorehitpause = 1
var(1) = -24

[State 4110, PalFX]
type = PalFX
trigger1= Time > 0
add = Var(1)-1,Var(1)-1,Var(1)-1
time = 1

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 0 && NumExplod(2005) = 0

;---------------------------------------------------------------------------
; Super Start Spark Helper
;------------------------ 1
[Statedef 2300]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

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

[State 3000, BGPalFX]
type = BGPalFX
trigger1 = 1
time = 1
add = 0,0,0
mul = 32,32,32
sinadd = 0,0,0,1
invertall = 0
color = 256

;Super Spark left half, facing right
[State 3000, 1]
type = Explod
trigger1 = Time = 3
trigger1 = Pos X <= 0
trigger1 = Facing = 1
anim = 2305
postype = P1
pos = 0,0
facing = -1
sprpriority = 6
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 39

;Super Spark right half, facing right
[State 3000, 1]
type = Explod
trigger1 = Time = 3
trigger1 = Pos X > 0
trigger1 = Facing = 1
anim = 2305
postype = P1
pos = 0,0
facing = 1
sprpriority = 6
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

;Super Spark left half, facing left
[State 3000, 1]
type = Explod
trigger1 = Time = 3
trigger1 = Pos X < 0
trigger1 = Facing = -1
anim = 2305
postype = P1
pos = 0,0
facing = 1
sprpriority = 6
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 39

;Super Spark right half, facing left
[State 3000, 1]
type = Explod
trigger1 = Time = 3
trigger1 = Pos X > 0
trigger1 = Facing = -1
anim = 2305
postype = P1
pos = 0,0
facing = -1
sprpriority = 6
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

;Fade out
[State 4001, Fade Out]
type=palfx
trigger1= Time = 30
time=12
sinadd=-255,-255,-255,60

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 39

;---------------------------------------------------------------------------
; Super Cancel Display Helper
;------------------------ 1
[Statedef 2310]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 3000, 1] ;Super Cancel Enter
type = Explod
trigger1 = Time = 0
anim = 30005
id = 30005
postype = left
pos = 320,-48
vel = -40,0
facing = 1

sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Super Cancel Entry]
type = RemoveExplod
trigger1 =  time > 5
id =  30005
;ignorehitpause =
;persistent =

[State 3000, 1] ;Super Cancel Freeze
type = Explod
trigger1 = Time = 5
anim = 30005
id = 30015
postype = left
pos = 0,-48
vel = 0,0
facing = 1
bindtime = -1
sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Super Cancel Freeze]
type = RemoveExplod
trigger1 =  time > 35
id =  30015
;ignorehitpause =
;persistent =

[State 3000, 1] ;Super Cancel Exit
type = Explod
trigger1 = Time = 35
anim = 30005
id = 30025
postype = left
pos = 0,-48
vel = -40,0
facing = 1

sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Super Cancel Exit]
type = RemoveExplod
trigger1 =  time > 40
id =  30025
;ignorehitpause =
;persistent =

[State 2310, DestroySelf]
type = DestroySelf
trigger1 = time > 40
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Dream Cancel Display Helper
;------------------------ 1
[Statedef 2320]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 3000, 1] ;Dream Cancel Enter
type = Explod
trigger1 = Time = 0
anim = 30006
id = 30006
postype = left
pos = 320,0
vel = -40,0
facing = 1

sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Dream Cancel Entry]
type = RemoveExplod
trigger1 =  time > 5
id =  30006
;ignorehitpause =
;persistent =

[State 3000, 1] ;Dream Cancel Freeze
type = Explod
trigger1 = Time = 5
anim = 30006
id = 30016
postype = left
pos = 0,0
vel = 0,0
facing = 1
bindtime = -1
sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Dream Cancel Freeze]
type = RemoveExplod
trigger1 =  time > 35
id =  30016
;ignorehitpause =
;persistent =

[State 3000, 1] ;Dream Cancel Exit
type = Explod
trigger1 = Time = 35
anim = 30006
id = 30026
postype = left
pos = 0,0
vel = -40,0
facing = 1

sprpriority = 7
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 2310, Kill Dream Cancel Exit]
type = RemoveExplod
trigger1 =  time > 40
id =  30026
;ignorehitpause =
;persistent =

[State 2310, DestroySelf]
type = DestroySelf
trigger1 = time > 40
;ignorehitpause =
;persistent =

;============================================================================
; Homer Level 3 Hyper Portrait Helper
;============================================================================

[Statedef 2350]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 3000, 1]
type = Explod
trigger1 = Time = 0
anim = 33600
id = 33600
postype = left
pos = 160,120
vel = 0,0
facing = 1
removetime = 20
bindtime = -1
sprpriority = -3
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0


[State 3101, Homerote]
type = explod
trigger1 = time = 20
anim = 33600
ID = 33600
postype = left
sprpriority = -3
supermovetime = -1
removetime = 3
facing = 1
pos = 160,120
bindtime = -1
pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = 1.2, 1.2
removeongethit = 1

[State 3101, Homerote]
type = explod
trigger1 = time = 23
anim = 33600
ID = 33600
postype = left
sprpriority = -3
supermovetime = -1
removetime = 3
facing = 1
pos = 160,120
bindtime = -1
scale = 1.2, 1.2
removeongethit = 1

[State 3101, Homerote]
type = explod
trigger1 = time = 26
anim = 33600
ID = 33600
postype = left
sprpriority = -3
supermovetime = -1
removetime = 3
facing = 1
pos = 160,120
bindtime = -1
scale = 1.4, 1.4
removeongethit = 1

[State 3101, Homerote]
type = explod
trigger1 = time = 29
anim = 33600
ID = 33600
postype = left
sprpriority = -3
supermovetime = -1
removetime = 3
facing = 1
pos = 160,120
bindtime = -1
scale = 1.6, 1.6
removeongethit = 1

[State 3101, Homerote]
type = explod
trigger1 = time = 32
anim = 33600
ID = 33600
postype = left
sprpriority = -3
supermovetime = -1
removetime = 3
pos = 160,120
facing = 1
bindtime = -1
scale = 1.8, 1.8
removeongethit = 1

[State 3101, Homerote]
type = explod
trigger1 = time = 35
anim = 33600
ID = 33600
postype = left
sprpriority = -3
supermovetime = -1
removetime = 5
pos = 160,120
facing = 1
bindtime = -1
scale = 2.0, 2.0
removeongethit = 1

;Fade out
[State 4001, Fade Out]
type=palfx
trigger1= Time = 20
time=20
sinadd=-255,-255,-255,80

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time = 39

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 40

;---------------------------------------------------------------------------
; 気絶エフェクト
;------------------------ 1
[Statedef 5305]
type = A
movetype = I
physics = N
ctrl = 0
anim = 5305
velset = 0,0
ownpal = 1
sprpriority = 5

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

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Root,StateNo = 5320
value = 1, 8
channel = 2
loop = 1
persistent = 0

[State 820,PlaySnd]
type = Stopsnd
trigger1 = Time > 0
trigger1 = Root,StateNo != [5310,5320]
trigger1 = Root,StateNo != [5100,5120]
channel = 2
persistent = 0

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 0
trigger1 = Root,StateNo != [5310,5320]
trigger1 = Root,StateNo != [5100,5120]

;---------------------------------------------------------------------------
; 鬼焼きエフェクト
;------------------------ 1
[Statedef 1105]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 193, 1]
type = Explod
trigger1 = Time = 0
anim = 1102
id = 1105
pos = 0,0
bindtime = -1
sprpriority = 3
ownpal = 1

[State 193, 1]
type = Explod
trigger1 = Time = 0
anim = 1103
id = 1105
pos = 0,0
bindtime = -1
sprpriority = 1
ownpal = 1

[State 1110, posadd]
type = posset
trigger1 = 1
x = (Parent,Pos X)
y = 0

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = Time > 36
trigger2 = Time < 20
trigger2 = Parent,MoveType = H
id = 1105

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 36
trigger2 = Time < 20
trigger2 = Parent,MoveType = H






;=====================================================================
; Stuff to do
;=====================================================================
[Statedef -2]
;---------------------------------------------------------------------------
;デバッグ用
;[State -2,debug]
;type = displaytoclipboard
;trigger1 = 1
;text = "NumTarget = %d X Vel = %f Y Vel = %f X Var(33) = %d Y Vel = %f"
;params = NumTarget,Vel X,Vel Y,var(33),FVar(4)
;ignorehitpause = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
type = DisplayToClipboard
text="var(27) = %d"
params = var(27)
ignorehitpause = 1

; Do not make Homer turn towards his enemy when he KO's an opponent
; with Road Roller D'oh special. Fixes the turn glitch when Homer
; does this when facing left.
[State 0, AssertSpecial]
type = AssertSpecial
triggerall = roundstate > 2
trigger1 = NumHelper (3500) > 0
flag = noautoturn

;---------------------------------------------------------------------------
; 特殊エフェクト消去
[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = StateNo != 0
id = 12000

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = StateNo != 11
id = 12001

;---------------------------------------------------------------------
; ダメージ時の特殊エフェクト消去
[State -2,AfterImageTime]
type = AfterImageTime
trigger1 = MoveType = H && StateNo !=5110 && StateNo !=5120 
time = 0

;---------------------------------------------------------------------
; 特殊ジャンプフラグ
[State -2,VarSet]
type = VarSet
trigger1 = Command = "holddown"
var(11) = 5

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

[State 50, 1]
type = VarSet
trigger1 = MoveType = H
var(11) = 0

;---------------------------------------------------------------------
; 時間差起き上がりフラグ
[State -2,VarSet]
type = VarSet
trigger1 = Ctrl = 1
var(25) = 0

;---------------------------------------------------------------------------
;ガードクラッシュ
;------------------------ 
[State -2, Varadd]
type = Varadd
trigger1 = var(19) < 120 && movetype != H
persistent = 0
ignorehitpause = 1
var(19) = 1

[State -2, VarSet]
type = VarSet
trigger1 = stateno = [150,155)
trigger2 = stateno = [5000,5999)
persistent = 0
ignorehitpause = 1
var(19) = 0

[State -2, VarSet]
type = VarSet
trigger1 = movetype = H
trigger1 = stateno != [5000,5999)
trigger1 = stateno != [150,155)
persistent = 0
ignorehitpause = 1
var(19) = 120

[State -2, VarSet]
type = VarSet
trigger1 = movetype = H
trigger1 = stateno != [5000,5999)
trigger1 = stateno != [150,155)
persistent = 0
ignorehitpause = 1
var(18) = 0

[State -2, 1]
type = Varadd
trigger1 = var(19) = 120 && var(18) < 1200 && var(18) > 1
persistent = 0
ignorehitpause = 1
var(18) = -2

[State -2, 1]
type = Varadd
trigger1 = var(19) = 120 && var(18) > 1200
persistent = 0
ignorehitpause = 1
var(18) = -1

[State -2, 5]
type = Varadd
triggerall = GetHitVar(hitshaketime) = 15
trigger1 = stateno = 150 || stateno = 152 || stateno = 154
ignorehitpause = 1
var(18) = Floor(35 * Ifelse(statetype = S,1,Ifelse(statetype = C,1.25,1.5)))

[State -2, 6]
type = Varadd
triggerall = GetHitVar(hitshaketime) = 12
trigger1 = stateno = 150 || stateno = 152 || stateno = 154
ignorehitpause = 1
var(18) = Floor(75 * Ifelse(statetype = S,1,Ifelse(statetype = C,1.25,1.5)))

[State -2, 7]
type = Varadd
triggerall = GetHitVar(hitshaketime) = 8
trigger1 = stateno = 150 || stateno = 152 || stateno = 154
ignorehitpause = 1
var(18) = Floor(110 * Ifelse(statetype = S,1,Ifelse(statetype = C,1.25,1.5)))

[State 9010,PalFx]
type = PalFx
trigger1 = var(18) >= 1800 && TimeMod = 2,0 && (stateno = 150 || stateno = 152)
time = 1
add = 152,24,16
mul = 300,180,120
color = 10

[State -2, 8]
type = ChangeState
trigger1 = alive
trigger1 = var(18) >= 2400 &&  (stateno = 150 || stateno = 152)
trigger1 = stateno != 5910 && stateno != 5920
value = Ifelse(stateno = 150,5910,5920)
ignorehitpause = 1
ctrl = 0

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

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

[State -2, 6]
type = Varadd
triggerall = stateno = 5000 || stateno = 5010 || stateno = 5020
trigger1 = GetHitVar(hitshaketime) = 16
trigger2 = GetHitVar(hitshaketime) = 12
trigger3 = GetHitVar(hitshaketime) = 8
ignorehitpause = 1
var(21) = 1

[State -2,varset]
type = varset
trigger1 = var(22) = 0
var(21) = 0

[State -1, Stand_NotHitBy]
type = NotHitBy
trigger1 = alive
trigger1 = var(21) >= 20+Var(24)
trigger1 = stateno = [5000,5299]
value = SCA
time = 1

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

;---------------------------------------------------------------------------
; ダメージ補正
[State -2, Attack Fix]
type = VarSet
trigger1 = 1
fvar(3) = ifelse(power >= 3000,1.15,ifelse(power >= 2000,1.1,ifelse(power >= 1000,1.05,1.0)))

[State -2, Attack Fix]
type = VarAdd
trigger1 = 1
fvar(3) = ifelse(life < 150,.1,ifelse(life < 300,.05,0))

[State -2, Attack Fix]
type = VarAdd
trigger1 = Var(26) > 5
fvar(3) = -(4.125*var(26)-5)/100

[State -2, Attack Fix]
type = AttackMulSet
trigger1 = 1
value = ifelse(fvar(3),fvar(3),.1)

[State -2, Combo]
type = VarSet
trigger1 = numenemy
trigger1 = enemy,MoveType != H
var(26) = 0
ignorehitpause = 1

[State -2, Combo]
type = VarAdd
trigger1 = MoveHit
var(26) = 1
ignorehitpause = 1

[State -2, Defence Fix]
type = VarSet
trigger1 = 1
fvar(2) = ifelse(life < 150,.9,ifelse(life < 300,.75,1.0)) * ifelse(var(39)=1,1.25,1)

[State -2, Defence Fix]
type = DefenceMulSet
trigger1 = 1
value = fvar(2)

;---------------------------------------------------------------------------
; 炎系ヒットエフェクト
[State 3001, Super]
type = Helper
trigger1 = MoveHit && (StateNo = 1100 || StateNo = 1110)
trigger2 = ProjHitTime(1005) = 1
id = 2020
name = "Fire"
pos = 0,0
postype = P2
stateno = 2020
helpertype = normal
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State -2, MoveContact]
type = VarSet
trigger1 = NumTarget = 1
trigger1 = Target,stateno = 5100 || Target,MoveType != H
trigger2 = NumTarget = 0
var(14) = 0

;---------------------------------------------------------------------------
; MoveContact系管理
[State -2, MoveContact]
type = VarAdd
trigger1 = var(12)
var(12) = 1
ignorehitpause = 1

[State -2, MoveContact]
type = VarSet
trigger1 = MoveContact
var(12) = 1
ignorehitpause = 1

[State -2, MoveContact]
type = VarSet
trigger1 = ctrl || Time = 1 || stateno != [200,5000)
var(12) = 0

[State -2, MoveGuarded]
type = VarSet
trigger1 = Time = 1
var(30) = 0

[State -2, MoveGuarded]
type = VarAdd
trigger1 = var(30)
var(30) = 1
ignorehitpause = 1

[State -2, MoveGuarded]
type = VarSet
trigger1 = MoveGuarded
var(30) = 1
ignorehitpause = 1

[State -2, MoveContact]
type = VarSet
trigger1 = NumTarget=0
trigger2 = MoveContact
trigger2 = stateno != 1301
var(28) = 0

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
trigger1 = stateno != 1100 && stateno != 1110
trigger1 = stateno != 1402 && stateno != 1301
trigger1 = stateno != [3100,3199]
trigger1 = stateno != [3300,3399]
ignorehitpause = 1

;---------------------------------------------------------------------------
; 必殺技ガードエフェクト
[State -2, Special Guard Effect]
type = VarSet
trigger1 = Time = 1
var(32) = ifelse((stateno = [1000,2999)),1,0)

[State -2, Special Guard Effect]
type = Explod
trigger1 = Var(30) = 1 && Var(32)
trigger2 = MoveGuarded && stateno = [3300,3399]
trigger3 = ProjGuardedTime(1005) = 1
anim = 2010
id = 2015
sprpriority = 5
postype = p2
pos = 0,var(31)-floor(P2BodyDist Y)
ignorehitpause = 1
ownpal = 1

;---------------------------------------------------------------------------
; 裏百八式・八酒杯・管理用
[State -2, MoveContact]
type = VarSet
trigger1 = NumHelper != 0
trigger1 = Numenemy != 0
trigger1 = enemy,MoveType = H && enemy,stateno = [3050,3054] 
trigger1 = Helper,NumTarget != 0
var(17) = 1

[State -2, MoveContact]
type = VarSet
trigger1 = NumHelper = 0
trigger1 = Numenemy != 0
var(17) = 0

;---------------------------------------------------------------------------
; 空中コンボ関連
[State -2,Assertspecial]
type = Assertspecial
trigger1 = var(28) = 1
trigger1 = StateNo = [3300,3399]
flag = Nojugglecheck

;---------------------------------------------------------------------------
; ライフ管理
[State -2,Assertspecial]
type = VarSet
trigger1 = StateNo != 9999
var(29) = Life
ignorehitpause = 1

;---------------------------------------------------------------------------
; 死亡時声管理
[State -2,PlaySnd]
type = PlaySnd
triggerall = !Alive
triggerall = Time = 1
trigger1 = stateno = 5000 || stateno = 5010 || stateno = 5020 || stateno = 5070
value = IfElse(Var(39)=1,5000,5010),30
persistent = 0

;---------------------------------------------------------------------------
[Statedef -3]
;---------------------------------------------------------------------------
;---------------------------------------------------------------------
[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 5 && Var(39)
value = 10005

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && Var(39)
value = 10006

; Sound Fix
[State -3,PlaySnd1]
type = PlaySnd
triggerall = Time = 1 && Alive && Random < 333
triggerall = StateNo = 5000 || StateNo = 5010
trigger1 = Anim = 5000 || Anim = 5010 || Anim = 5020
trigger2 = Anim = 15000 || Anim = 15010 || Anim = 15020
value = 5000,ifelse(Var(39)=1,ifelse(Random <= 500,100,110),ifelse(Random <= 500,0,10))
channel = 0

[State -3,PlaySnd2]
type = PlaySnd
triggerall = Time = 1 && Alive && Random < 333
triggerall = StateNo = 5000 || StateNo = 5010
trigger1 = Anim = 5001 || Anim = 5011 || Anim = 5021
trigger2 = Anim = 15001 || Anim = 15011 || Anim = 15021
value = 5000,ifelse(Var(39)=1,ifelse(Random <= 500,100,110),ifelse(Random <= 500,0,10))
channel = 0

[State -3,PlaySnd3]
type = PlaySnd
triggerall = GetHitVar(fall) = 0
triggerall = Time = 1 && Alive && Random < 333
triggerall = StateNo = 5000 || StateNo = 5010
trigger1 = Anim = 5002 || Anim = 5012 || Anim = 5022
trigger2 = Anim = 15002 || Anim = 15012 || Anim = 15022
value = 5000,ifelse(Var(39)=1,ifelse(Random <= 500,110,120),ifelse(Random <= 500,10,20))
channel = 0

[State -3,PlaySnd3]
type = PlaySnd
triggerall = GetHitVar(fall) = 1
triggerall = Time = 1 && Alive && Random < 333
triggerall = StateNo = 5000 || StateNo = 5010
trigger1 = Anim = 5002 || Anim = 5012 || Anim = 5022
trigger2 = Anim = 15002 || Anim = 15012 || Anim = 15022
value = 5000,ifelse(Var(39)=1,120,20)
channel = 0

;-------------- Generated by Fighter Factory -------------

;--------------------- Variable List ----------------------

; Var(1) - StateDef 1006, 3006, 3007, 4110, 2155, 2150, 2005
; Var(2) - StateDef 3006, 3007, 3008
; Var(3) - StateDef 3008, 3060
; Var(4) - StateDef 3060
; Var(5) - StateDef 180, 190
; Var(9) - StateDef 3500, 3502, 3503
; Var(10) - StateDef 190, 5320
; Var(11) - StateDef 50, -2
; Var(12) - StateDef 1100, 1110, 3300, 3310, 3320, -2
; Var(13) - StateDef 1100, 215
; Var(14) - StateDef 2020, -2
; Var(15) - StateDef 1301, 1302
; Var(16) - StateDef 3000, 3002, 3010, 3020
; Var(17) - StateDef 3002, 3010, -2
; Var(18) - StateDef 5910, 5920, -2
; Var(19) - StateDef -2
; Var(20) - StateDef 3300, 3310, 3320
; Var(21) - StateDef 5320, -2
; Var(22) - StateDef -2
; Var(23) - StateDef 5320
; Var(24) - StateDef 5320
; Var(25) - StateDef 40, 5110, -2
; Var(26) - StateDef 3101, 3105, 3115, 3125, -2
; Var(27) - StateDef 3000, 3002, 3010, 3020, 3008
; Var(28) - StateDef 1301, -2
; Var(29) - StateDef -2
; Var(30) - StateDef 1100, 1110, 3300, 3310, 3320, -2
; Var(31) - StateDef 1000, 1010, 1100, 1110, 1300, 1301, 1302, 1402, 1403, 3100, 3110, 3120, 3300, 3310, 3320
; Var(32) - StateDef -2
; Var(33) - StateDef 3300, 3320
; Var(39) - StateDef 40, 9999

;--------------------- Float Variable List ----------------------

; fVar(1) - StateDef 4110
; fVar(2) - StateDef -2
; fVar(3) - StateDef -2
