;---------------------------------------------------------------------------
;婎杮僨乕僞晹暘
[Data]
life              = 1000    ;懱椡僎乕僕偺嵟戝抣傪寛傔傑偡
power             = 6000    ;僷儚乕僎乕僕嵟戝抣乮僨僼僅儖僩偼 3000 = Lv.3 偵側傝傑偡丒僆僾僔儑儞乯
attack            = 100     ;峌寕椡僷乕僙儞僥乕僕乮僨僼僅儖僩偼 100% 偵側傝傑偡乯
defence           = 100     ;杊屼椡僷乕僙儞僥乕僕乮僨僼僅儖僩偼 100% 偵側傝傑偡乯
fall.defence_up   = 50      ;堦帪揑偵忋徃偡傞僟僂儞帪偺杊屼椡僷乕僙儞僥乕僕
liedown.time      = 60      ;搢傟偰偐傜婲偒忋偑傞傑偱偺帪娫
airjuggle         = 15      ;僕儍僌儖億僀儞僩尷奅抣丂仛侾
sparkno           = 2       ;僨僼僅儖僩偺僸僢僩僗僷乕僋斣崋乮fightfx.air偐丄僉儍儔偺air偐傜屇傃弌偡乯
guard.sparkno     = 40      ;僨僼僅儖僩偺僈乕僪僗僷乕僋斣崋乮fightfx.air偐丄僉儍儔偺air偐傜屇傃弌偡乯
KO.echo           = 0       ;俲俷帪偺惡偵僄僐乕傪妡偗傞偐偳偆偐乮0=偟側偄丒1=偡傞乯
volume            = 255     ;僉儍儔偺壒検丂255偑嵟崅
intpersistindex   = 58      ;Var傪師偺儔僂儞僪傊帩偪墇偟偑壜擻 (嵟彫=0, 嵟戝=59)  仛俀
floatpersistindex = 40      ;FVar傪師偺儔僂儞僪傊帩偪墇偟偑壜擻 (嵟彫=0, 嵟戝=39) 仛俀

;丂曄悢帩偪墇偟偺巊梡椺丗
;丂侾丗IntPersistIndex = 20,29丂丂乮Var(20)乣Var(29)偺曄悢偑師偺儔僂儞僪傊帩偪墇偟偑弌棃傑偡乯
;丂俀丗FloatPersistIndex = 25丂丂丂乮FVar(25)偺曄悢偑師偺儔僂儞僪傊帩偪墇偟偑弌棃傑偡乯
;丂乮娫堘偄丗4,8,12,16傗[22,37]側偳偺婰弎偼柍岠偵側傝傑偡丅乯
;
;丂仸僷儔儊乕僞傪IntPersistIndex=60丄FloatPersistIndex=40偵偟偨応崌丄
;丂丂偦傟偧傟侽乣俆俋丒侽乣俁俋埲奜偺悢抣側傜偽丄慡偰偺曄悢偺帩偪墇偟傪柍岠偵弌棃傑偡丅
;丂丂僶僌偵偼側傜側偄偺偱丄巊梡偡傞帪偑棃傞傑偱偼偦傟偱傕峔偄傑偣傫丅
;
;丂妎偊偰偍偔偲僉儍儔嶌傝偵戝曄栶棫偮儌僲側偺偱丄偁傞掱搙姷傟偰偒偨傜偄傠偄傠僠儍儗儞僕偟偰傒傑偟傚偆丅


;---------------------------------------------------------------------------
;僒僀僘愝掕
[Size]
xscale           = 1        ;僉儍儔夋憸偺墶偺僗働乕儖
yscale           = 1        ;僉儍儔夋憸偺廲偺僗働乕儖
ground.back      = 15       ;僉儍儔偺暆乮抧忋屻曽乯
ground.front     = 15       ;僉儍儔偺暆乮抧忋慜曽乯
air.back         = 15       ;僉儍儔偺暆乮嬻拞屻曽乯
air.front        = 15       ;僉儍儔偺暆乮嬻拞慜曽乯
height           = 60       ;挼傃墇偡憡庤偺偨傔偺僉儍儔偺崅偝
attack.dist      = 160      ;峌寕傪弌偟偨帪偵憡庤偑僈乕僪懱惃偵擖傞嵟掅偺嫍棧
proj.attack.dist = 90       ;憡庤偑僈乕僪懱惃偵擖傞敪幩暔偲偺嵟掅偺嫍棧
proj.doscale     = 0        ;xscale偲yscale偑敪幩暔偺僗働乕儖偵傕塭嬁偡傞偐偳偆偐乮0=偟側偄丒1=偡傞乯
head.pos         = 5, -70  ;BindToTarget偺帪偵昁梫側摢偺嵗昗
mid.pos          = -5, -60  ;BindToTarget偺帪偵昁梫側懱拞怱偺嵗昗
shadowoffset     = 0        ;塭偺悅捈曽岦偺埵抲
draw.offset      = 0,0      ;僉儍儔昤夋昞帵埵抲乮倃幉,倄幉乯

;---------------------------------------------------------------------------
;堏摦懍搙愝掕
[Velocity]
walk.fwd     = 3.6         ;慜恑曕峴懍搙
walk.back    = -2.7        ;屻戅曕峴懍搙
run.fwd      = 6.5, 0      ;慜偵憱傞帪偺懍搙乮倃幉,倄幉乯
run.back     = -6,-5.1   ;屻傠偵憱傞帪偺懍搙乮倃幉,倄幉乯
jump.neu     = 0,-9     ;悅捈僕儍儞僾懍搙乮倃幉,倄幉乯
jump.back    = -2.8,-9        ;屻僕儍儞僾懍搙
jump.fwd     = 2.8,-9        ;慜僕儍儞僾懍搙
;runjump.back = -2.55,-8.1  ;屻傠偵憱傝側偑傜偺僕儍儞僾懍搙乮僆僾僔儑儞乯
runjump.fwd  = 4,-9      ;慜偵憱傝側偑傜偺僕儍儞僾懍搙乮僆僾僔儑儞乯

;---------------------------------------------------------------------------
;摦嶌愝掕
[Movement]
airjump.num     = 0      ;嬻拞僕儍儞僾偑弌棃傞夞悢乮僆僾僔儑儞乯
airjump.height  = 35     ;嬻拞僕儍儞僾偡傞偨傔偵昁梫側嵟掅尷偺崅偝乮僆僾僔儑儞乯
yaccel          = .565    ;廳椡乮悅捈壓崀壛懍搙乯
stand.friction  = .8    ;棫偪忬懺偺杸嶤學悢
crouch.friction = .8    ;偟傖偑傒忬懺偺杸嶤學悢


;---------------------------------------------------------------------------
; Var偺巊梡忬嫷
; var(0)  - 愭峴擖椡帪娫
; var(1)  - 愭峴擖椡乮挻乯昁嶦媄
; var(2)  - 愭峴擖椡(摿庩媄乯捠忢媄
; var(4)  - 惗懚敾掕
; var(8)  - 僕儍儞僾
; var(11) - 僗乕僷乕僉儍儞僙儖
; var(12) - 僪儕乕儉僉儍儞僙儖
; var(21) - Random var梡
; var(59) - AI敾掕

; var(0)  - 僟儊乕僕曗惓
; var(1)  - 僱僶儕曗惓

;---------------------------------------------------------------------------
; 婎杮峴摦偺僗僥乕僩
;---------------------------------------------------------------------------
; 僞僀儉僆乕僶乕帪

[Statedef 170]
type = S
ctrl = 0     ;偙偙偱CtrlSet傪娙棯壔偱偒傑偡丅丂1=帺桼偵摦偐偣傞
anim = 170
velset = 0,0 ;偙偙偱VelSet傪娙棯壔偱偒傑偡丅丂x曽岦,y曽岦 偺弴

[State 170, 柍揋]
type = NotHitBy
trigger1 = 1 ;1偵偡傞偲偄偐側傞忦審偱傕桳岠偱丄0偵偡傞偲偄偐側傞忦審偱傕柍岠
value = SCA  ;仸
time = 1



;---------------------------------------------------------------------------
; 彑棙億乕僘暘婒
;偙偙偱彑棙億乕僘傪慖戰偡傞丅丂MatchOver偼帋崌廔椆傪敾掕偡傞偺偱丄
;堦夞栚偲擇夞栚彑棙傪暿偺億乕僘偵偟偨偄帪偵曋棙丅

[Statedef 180]
type = S

[State 180, 儔儞僟儉偵曄悢傪慖傇]
type = null;VarRandom
trigger1 = 1
v = 21
range = 0,1  ;斖埻傪寛掕丄偙傟偩偲0乣1偲偄偆堄枴

[State 180, 彑棙億乕僘1]
type = ChangeState
trigger1 = Time = 1
;trigger1 = MatchOver = 0     ;0側傜師偺帋崌偑傑偩巆偭偰傞偲偄偆偙偲
value = 181

[State 180, 彑棙億乕僘2]
type = null;ChangeState
triggerall = RoundState != 0
triggerall = TeamMode != turns
trigger1 = MatchOver = 1
trigger1 = Time = 0
trigger1 = var(58) = 1
value = 182

[State 180, 彑棙億乕僘2 ]
type = ChangeState
triggerall = RoundState != 0
triggerall = MatchOver = 1
triggerall = Time = 0
trigger1 = Enemy, Name = "kyoXI" && EnemyNear,AuthorName = "beppu"
trigger2 = Enemy, Name = "kyo99" && EnemyNear,AuthorName = "beppu"
trigger3 = Enemy, Name = "kyonbc" && EnemyNear,AuthorName = "beppu"
trigger4 = Enemy, Name = "kyoXI_EX" && EnemyNear,AuthorName = "beppu"
trigger5 = Enemy, Name = "kyoAkof" && EnemyNear,AuthorName = "beppu"
value = 182


;---------------------------------------------------------------------------
; 彑棙億乕僘1 偦偺傑傑巰偹両

[Statedef 181]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 181]
type = AssertSpecial
trigger1 = time = [0,200]
flag = roundnotover

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

[State 181,]
type = PlaySnd
trigger1 = time = 10
value = 3,10
;channel = 0
volume = 255

;---------------------------------------------------------------------------
; 彑棙億乕僘俀 乮嫗愱梡乯偳偆偟偨丒丒丒丅婱條傕偙傟傑偱偐丠

[Statedef 182]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 181, 摿庩岠壥]
type = AssertSpecial
trigger1 = time = [0,320]
flag = roundnotover

[State 181,1]
type = PlaySnd
trigger1 = time = 1
value = 3,11
volume = 255

;---------------------------------------------------------------------------
; 僀儞僩儘暘婒

;僀儞僩儘慖戰
[Statedef 190]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 190]
type = ChangeState
trigger1 = Time = 1
value = 191

[State 190]
type = ChangeState
trigger1 = (P2Name = "kyoXI" || P4Name = "kyoXI") && EnemyNear,AuthorName = "beppu"
value = 192

;---------------------------------------------------------------------------
; 僀儞僩儘  偡偖妝偵偟偰傗傞

[Statedef 191]
type = S
ctrl = 0
anim = 184
velset = 0,0

[State 191, 傾僯儊曄峏] ;夋柺僼僃乕僪僀儞偺娫偩偗傾僯儊乕僔儑儞傪孞傝曉偟丄巭傑偭偰偄傞傛偆偵尒偣偰偄傑偡
type = ChangeAnim
trigger1 = RoundState = 0
value = 184

[State 191, 摿庩岠壥] ;乽ROUND1, FIGHT!乿偺傾僫僂儞僗偑巒傑傞傑偱偼丄偙偺僐儞僩儘乕儔傪巊偭偰偔偩偝偄
type = AssertSpecial
trigger1 = 1
flag = Intro ;僀儞僩儘偺忬懺偵側傝傑偡

[State 181,]
type = PlaySnd
trigger1 = time = 0
value = 3,13
volume = 255

[State 181,]
type = PlaySnd
trigger1 = time = 0
value = 22,0
freqmul = 1.7
volume = 255

[State 1100]
type = Explod
trigger1 = time = 0
persistent = 1
anim = 185
postype = P1
pos = 0,0
scale = 1 , 0.1
sprpriority = -1
id = 1111
removetime = 116

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%15)= 1
persistent = 1
anim = 187
postype = P1
pos = 0,-10
vel = 0,-6
sprpriority = 10

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%20)= 1
persistent = 1
anim = 187
postype = P1
pos = 0,-30
vel = 0,-6
sprpriority = -1

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%15)= 1
persistent = 1
anim = 187
postype = P1
pos = 20,-15
vel = 0,-6
sprpriority = 10

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%17)= 1
persistent = 1
anim = 187
postype = P1
pos = 20,-25
vel = 0,-6
sprpriority = -1

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%21)= 1
persistent = 1
anim = 187
postype = P1
pos = -20,-15
vel = 0,-6
sprpriority = 10

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%12)= 1
persistent = 1
anim = 187
postype = P1
pos = -20,-25
vel = 0,-6
sprpriority = -1

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%15)= 1
persistent = 1
anim = 187
postype = P1
pos = 55,-20
vel = 0,-6
sprpriority = 10

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%21)= 1
persistent = 1
anim = 187
postype = P1
pos = 55,-20
vel = 0,-6
sprpriority = -1

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%14)= 1
persistent = 1
anim = 187
postype = P1
pos = -55,-20
vel = 0,-6
sprpriority = 10

[State 1100]
type = Explod
triggerall = time <= 101
trigger1 = (gametime%20)= 1
persistent = 1
anim = 187
postype = P1
pos = -55,-20
vel = 0,-6
sprpriority = -1

[State 2900, 1];
type = null;helper
trigger1 = time = 101
persistent = 1
name = "glyph"
pos = 0,0
postype = P1
facing = -1
stateno = 1911
size.xscale = 1
size.yscale = 0.1
helpertype = normal
keyctrl = 0
ownpal = 1

[State 181, a]
type = PlaySnd
trigger1 = time = 101
value = 22,1
volume = 255

[State a]
type = VarAdd
triggerall = time > 101
trigger1 = Var(56) <= 20
var(56) = 1

[State 11]
type = modifyexplod
trigger1 = time > 101
scale = 1 - Var(56)/20.0 , 0.1 - Var(56)/130.0


[State 190,1]
type = Varset
triggerall = time = 0
trigger1 = (P2Name = "kyoXI" || P4Name = "kyoXI") && EnemyNear,AuthorName = "beppu"
trigger2 = (P2Name = "kyo99" || P4Name = "kyo99") && EnemyNear,AuthorName = "beppu"
trigger3 = (P2Name = "kyonbc" || P4Name = "kyonbc") && EnemyNear,AuthorName = "beppu"
trigger4 = (P2Name = "kyoXI_EX" || P4Name = "kyoXI_EX") && EnemyNear,AuthorName = "beppu"
trigger5 = (P2Name = "kyoAkof" || P4Name = "kyoAkof")  && EnemyNear,AuthorName = "beppu"
var(58) = 1

[State 191, 僗僥乕僩曄峏]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[Statedef 1911]
type    = A
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
sprpriority = -1
anim = 186
ownpal = 1

[State 181,]
type = PlaySnd
trigger1 = time = 0
value = 22,1
volume = 255

[state a]
type = nothitby
trigger1 = 1
value = SCA

[state a]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1

[State a]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State a]
type = Trans
trigger1 = 1
trans = add

[state a]
type = varset
trigger1 = time = 0
v = 56
value = 0

[State a]
type = VarAdd
trigger1 = Var(56) <= 20
var(56) = 1

[State a]
Type = AngleDraw
Trigger1 = Time >= 0
scale = 1 - Var(56)/20.0 , 0.2 - Var(56)/20.0



[state a]
type = destroyself
trigger1 = Time >= 20

;---------------------------------------------------------------------------
; 僀儞僩儘俀乮嫗愱梡乯嫗丒丒丒峴偔偧両

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

[State 191, 摿庩岠壥]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 1
value = 4,7
;channel = 0
volume = 255

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 7
value = 4,8
;channel = 0
volume = 255

[State 190,1]
type = Varset
;triggerall = TeamMode != turns
trigger1 = time = 0
var(58) = 1

[State 191, 僗僥乕僩曄峏]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;AssertSpecial偼摿庩側僼儔僌傪愝掕偟傑偡丅摨帪偵嶰偮傑偱愝掕偱偒傑偡丅

;[State xxx, 僼儔僌愝掕婰弎椺]
;type = AssertSpecial
;trigger1 = 1
;flag  = invisible
;flag2 = noshadow
;flag3 = timerfreeze

;庬椶堦棗
;intro丂丂丂丂丂 僀儞僩儘偺摦嶌傪偟偰偄傞偙偲傪愰尵偟傑偡丅
;invisible丂丂丂 愝掕偟偰偄傞娫偼丄僉儍儔僋僞乕偺巔偑尒偊側偔側傝傑偡丅
;丂丂丂丂丂丂丂丂扐偟丄AfterImage偺巆憸偼尒偊傑偡丅
;roundnotover丂丂僉儍儔偑彑偪億乕僘拞偱偁傞偙偲傪愰尵偟傑偡丅
;nobardisplay丂丂愝掕拞偼儔僀僼僶乕丄僷儚乕僶乕偑徚偊傑偡丅
;noBG丂丂丂丂丂丂愝掕拞偼攚宨偑鉟楉偵崟偵側傝傑偡丅
;noFG丂丂丂丂丂丂愝掕拞偼僗僥乕僕儗僀儎乕侾偑徚偊傑偡丅
;nostandguard丂丂愝掕拞偼棫偪杊屼晄壜擻偵側傝傑偡丅
;nocrouchguard丂 愝掕拞偼偟傖偑傒杊屼晄壜擻偵側傝傑偡丅
;noairguard丂丂丂愝掕拞偼嬻拞杊屼晄壜擻偵側傝傑偡丅
;noautoturn丂丂丂愝掕拞偼僉儍儔偑帺摦揑偵僞乕儞偟側偄傛偆偵側傝傑偡丅
;nojugglecheck丂 愝掕拞偼僉儍儔偺Juggle偑僇僂儞僩偝傟側偔側傝傑偡丅
;丂丂丂丂丂丂丂丂摿庩儌乕僪帪偵楢懕僸僢僩偝偣傞帪摍偵巊梡偟傑偡丅
;nokosnd丂丂丂 丂愝掕拞偼僲僢僋傾僂僩帪偵11,0(KOsnd)傪嵞惗偱偒側偔偡傞僼儔僌偱偡丅
;nokoslow丂丂丂丂愝掕拞偼僲僢僋傾僂僩帪偵僗儘乕儌乕僔儑儞傪岠偐側偔偡傞丅
;noshadow丂丂丂丂愝掕拞亀塭亁偑枹昞帵偵側傝傑偡丅
;globalnoshadow丂愝掕拞慡偰偺僉儍儔僋僞乕丄Helper丄Explod偺塭偑徚偊傑偡丅
;nomusic丂丂丂丂 愝掕拞丄BGM偑掆巭偟傑偡丅
;nowalk丂丂丂丂丂愝掕拞丄曕偔忬懺偵側傜側偔側傝傑偡丅
;丂丂丂丂丂丂丂丂僟僢僔儏忬懺偑曕偒忬懺偵側傜側偄傛偆偵偡傞偙偲偵巊梡偡傞偺偑庡丅
;timerfreeze丂 丂愝掕拞丄帪娫偑僇僂儞僩偝傟側偔側傝傑偡丅
;unguardable丂丂 愝掕拞丄慡偰偺Hitdef偺僈乕僪僼儔僌偑柍帇偝傟傑偡丅
;丂丂丂丂丂丂丂丂偮傑傝丄僈乕僪晄擻媄偵側傝傑偡丅

;---------------------------------------------------------------------------
; 挧敪暘婒

;挧敪慖戰
[Statedef 195]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 190]
type = ChangeState
trigger1 = Time = 1
value = 196

[State 190]
type = ChangeState
trigger1 = (P2Name = "kyoXI" || P4Name = "kyoXI") && EnemyNear,AuthorName = "beppu"
trigger2 = (P2Name = "kyo99" || P4Name = "kyo99") && EnemyNear,AuthorName = "beppu"
trigger3 = (P2Name = "kyonbc" || P4Name = "kyonbc") && EnemyNear,AuthorName = "beppu"
trigger4 = (P2Name = "kyoXI_EX" || P4Name = "kyoXI_EX") && EnemyNear,AuthorName = "beppu"
trigger5 = (P2Name = "kyoAkof" || P4Name = "kyoAkof")  && EnemyNear,AuthorName = "beppu"
value = 197

;---------------------------------------------------------------------------
; 挧敪
[Statedef 196]
type     = S
movetype = I
physics  = S
anim     = 195
velset   = 0,0
ctrl     = 0
sprpriority = 2 ;偙偙偱昞帵桪愭搙傪寛掕偱偒傑偡丅丂斖埻偼-5乣5丄戝偒偄傎偳庤慜偵昞帵偝傟傞
facep2 = 1      ;憡庤偺曽傪岦偄偰偐傜挧敪乮寢峔廳梫乯

[State 181,1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3,10
channel = 4
volume = 255


[State 181,3]
type = CtrlSet
trigger1 = AnimElem = 3
value = 1

[State 195, 僗僥乕僩曄峏]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 挧敪(嫗愱梡乯
[Statedef 197]
type     = S
movetype = I
physics  = S
anim     = 196
velset   = 0,0
ctrl     = 0
sprpriority = 2
facep2 = 1

[State 181,1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3,4
channel = 4
;channel = 5
volume = 255

[State 181,3]
type = CtrlSet
trigger1 = AnimElem = 11
value = 1

[State 195, 僗僥乕僩曄峏]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1




;---------------------------------------------------------------------------
; JUMP_UP START
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
velset = 0,0
facep2 = 1

[State 40, NOTHITBY]
type = nothitby
trigger1 = 1
value = , NT, ST, HT

[State 40, 4]
type = VarSet
trigger1 = Time = 0
var(8) = 0

[State 40, 5]
type = VarSet
triggerall = var(59) != 1
trigger1 = Command = "holdfwd"
trigger1 = var(8) != 2
var(8) = 1

[State 40, 6]
type = VarSet
triggerall = var(59) != 1
trigger1 = Command = "holdback"
trigger1 = var(8) != -2
var(8) = -1

[State 40, 7]
type = VarSet
triggerall = var(59) != 1
triggerall = Time = 0
triggerall = Command = "holdfwd"
trigger1 = Command = "longjump"
trigger2 = PrevStateNo = 100 ;RUN_FWD
trigger3 = Prevstateno = [10,12]
var(8) = 2

[State 40, 8]
type = VarSet
triggerall = var(59) != 1
triggerall = Time = 0
triggerall = Command = "holdback"
trigger1 = Command = "longjump"
trigger2 = Prevstateno = [10,12]
var(8) = -2

;AI彫僕儍儞僾悅捈
[State -1, AI-Nj]
Type = VarSet
Triggerall = Var(59) = 1
triggerall = PrevStateNo != 100
trigger1 = P2BodyDist X <= 60
trigger1 = Random = [0,30]
var(8)   = 0

;AI彫僕儍儞僾慜
[State -1, AI-Nj]
Type = VarSet
Triggerall = Var(59) = 1
triggerall = PrevStateNo != 100
trigger1 = P2BodyDist X <= 60
trigger1 = Random = [31,760]
trigger2 = P2BodyDist X <= 60
trigger2 = frontedgebodydist < 40
trigger2 = Random < 700
var(8)   = 1

;AI拞丄戝僕儍儞僾慜
[State -1, AIdaij]
Type = VarSet
Triggerall = Var(59) = 1
triggerall = Time = 0
trigger1 = P2BodyDist X >= 60
trigger1 = PrevStateNo = 100
trigger2 = P2BodyDist X >= 60
trigger2 = Random = [0,800]
trigger3 = P2BodyDist X <= 60
trigger3 = frontedgebodydist < 40
trigger3 = Random = [701,999]
var(8)   = 2

;AI彫僕儍儞僾屻傠
[State -1, AI-Nj]
Type = VarSet
Triggerall = Var(59) = 1
triggerall = PrevStateNo != 100
trigger1 = P2BodyDist X <= 60
trigger1 = Random = [761,790]
var(8)   = -1

;AI拞丄戝僕儍儞僾屻傠
[State -1, AIdaij]
Type = VarSet
Triggerall = Var(59) = 1
triggerall = Time = 0
trigger1 = P2BodyDist X >= 60
trigger1 = Random = [801,999]
trigger2 = P2BodyDist X <= 60
trigger2 = Random = [791,999]
var(8)   = -2

[State 201, 1] ; Play sound when jumping (Light)
type = PlaySnd
trigger1 = AnimElem = 1;trigger1 = Time = 0
trigger1 = var(8) != -2
trigger1 = var(8) != 2
value = 5,6
volume = 0

;make sure running snd is off
[State 40, 9]
type = StopSnd
trigger1 = Time = 0
channel = 20;running snd

[State 40, 10]
type = ChangeState
triggerall = var(59) != 1
triggerall = AnimTime = 0
trigger1 = Command != "holdup"
value = 99;44


;彫丄拞僕儍儞僾
[State -1, syoJump]
type = ChangeState
TriggerAll = Var(59) = 1
triggerall = AnimTime = 0
Trigger1 = Var(8) = 1 ;&& (P2BodyDist X <= 60) && Var(8)! = 2  && Random <= 90;彫僕儍儞僾
Trigger2 = Var(8) = 2 && P2BodyDist X <= 160; && (P2BodyDist X = [61,130]);&& Var(8)! = 1;拞僕儍儞僾
value = 99
ctrl = 1


[State 40, 11]
type = VelSet
trigger1 = AnimTime = 0
x = IfElse(var(8)= 0, Const(velocity.jump.neu.x), IfElse(var(8)>0, Const(velocity.jump.fwd.x), Const(velocity.jump.back.x)))
y = Const(velocity.jump.y)


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

[State 40, 13]
type = null;ChangeState
triggerall = Var(59) = 1
trigger1 = AnimTime = 0
trigger2 = Var(8) = 2 && P2BodyDist X >= 131
value = 50
ctrl = 1

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

[State 50, Fwd]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = 2
x = 4.725

[State 50, Back]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = -2
x = -4.725

[State 2041, 2] ; Play sound when jumping (long)
type = PlaySnd
triggerall = Time = 0
trigger1 = var(8) = 2
trigger2 = var(8) = -2
value = 5,26
volume = 30

[State 50, 3] ; Shadows
type = Afterimage
triggerall = Time = 1
triggerall = vel x != 0
trigger1 = var(8) = -2
trigger2 = var(8) = 2
time = 10
PalBright = 0, 0, 0
PalContrast =  250,250,250
PalAdd = 0, 0, 0
PalMul = 1,1,1
Length = 7
FrameGap = 3

[State 50, CTRL LIMITTER] ;Can't attack after recovery
type = ctrlset
trigger1 = Time = 0
trigger1 = prevstateno = 5040
trigger1 = prevstateno = 5210
value = 0

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

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

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

;---------------------------------------------------------------------------
; JUMP_LOW
[Statedef 99]
type    = A
physics = N
anim = 99
velset = 0,-8;8.4
ctrl = 1

[State 201, CTRL LIMITTER] ;Can't attack after recovery
type = ctrlset
trigger1 = Time = 0
trigger1 = prevstateno = 5040
trigger1 = prevstateno = 5210
value = 0

[State 201, 3] ; Shadows
type = Afterimage
triggerall = Time = 1
triggerall = vel x != 0
trigger1 = var(8) = -2
trigger2 = var(8) = 2
time = 10
PalBright = 0, 0, 0
PalContrast =  250,250,250
PalAdd = 0, 0, 0
PalMul = 1,1,1
Length = 7
FrameGap = 3

[State 201, 4] ; Shadows off
type = Afterimage
trigger1 = Time = 11
time = 0

[State 201, PUSH]
type = playerpush
triggerall = anim = 41
triggerall = p2statetype != A
triggerall = animelem = 2, >= 0
triggerall = animelem = 5, <= 0
trigger1 = var(8) = -2
trigger2 = var(8) = 2
value = 0

[State 201, 6]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = 1
x = 3.31

[State 201, 8]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = -1
x = -3.31

[State 2041, 2] ;;
type = PlaySnd
triggerall = Time = 0
trigger1 = var(8) = 2
trigger2 = var(8) = -2
value = 5,26
volume = 30

[State 201, 7]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = 2
x = 4.965

[State 201, 9]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = -2
x = -4.965

[State 201, 9]
type = Veladd
trigger1 = 1
y = .6375

[State 201, 15] ;Short
type = Changestate
trigger1 = vel y > 0 && pos y >= -11
value = 52
ctrl = 0

;---------------------------------------------------------------------------
; Jump Down (empty state for compatibility)
[Statedef 51]
type    = A
physics = A

[State 51, 1]
type = Null
trigger1 = 1

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
anim = 47
ctrl = 0
velset = 0,0
facep2 = 1

;[State 52, 2]
;type = Ctrlset
;trigger1 = Time = 2
;value = 1

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

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

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


;---------------------------------------------------------------------------
; HIT_FALLRECOVER (still falling)
[Statedef 5200]
type    = A
movetype= H
physics = N

[State 5200, 1] ;Change anim if done with transition
type = ChangeAnim
trigger1 = Anim = 5035
trigger1 = AnimTime = 0
value = 5050

[State 5200, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5200, 3]
type = SelfState
triggerall = var(59) != 1
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = ifelse(Command !="holdfwd",5201,5202)

[State 5200, 3]
type = SelfState
triggerall = var(59) = 1
triggerall = BackEdgeBodyDist <= 40
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = ifelse(random <= 600,5202,5201)

[State 5200, 3]
type = SelfState
triggerall = var(59) = 1
triggerall = BackEdgeBodyDist > 40
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = ifelse(random <= 400,5202,5201)

;---------------------------------------------------------------------------
; 抧忋庴恎 HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = S;A
movetype= H
physics = S;A
anim = 5200
ctrl = 0

[State 200, 2]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 3,3
;channel = 4

[State 5201, 5] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5201, 1] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = P2Dist X < -5

[State 5201, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5201, 2.1]
type = VelSet
trigger1 = Time >= 0
trigger1 = Time <= 12
x = -4

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

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

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

;---------------------------------------------------------------------------
; 慜曽庴恎 (on the ground)
[Statedef 5202]
type    = S
movetype= H
physics = S
anim = 5201
ctrl = 0

[State 200, 2]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 3,3
;channel = 4

[State 5201, 5] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5201, 1] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = P2Dist X < -5

[State 5201, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5201, 2.1]
type = VelSet
trigger1 = Time >= 0
trigger1 = Time <= 12
x = 9.5

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

[State 5201, 4]
type = null;NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 700, 憡庤偲廳側偭偨応崌]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

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

;---------------------------------------------------------------------------
; 嬻拞庴恎HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

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

[State 5210, 1] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
trigger1 = Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -2
y = -1

[State 5210, 2] ;Go up
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdup"
y = -2

[State 5210, 2] ;Go down
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holddown"
y = 1.5

[State 5210, 2] ;Go fwd
type = VelMul
trigger1 = Time = 4
trigger1 = Command = "holdfwd"
x = 1

[State 5210, 2] ;Go back
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdback"
x = -1

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 4
y = .35

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMP_LAND
ctrl = 1


;------------------------------------------------------------
; Power Up
[statedef 660]
type = S
movetype = I
physics = S
anim = 660
velset = 0
ctrl = 0

[State 3202,9916]
type = Explod
trigger1= time%3 = 0
anim = 1518
sprpriority = -3+random%6
postype = p1
pos = -20+random%40,0
Facing = 1-(Random<500)*2
VFacing = 1-(Random<500)*2
Vel = -2+random%4,-7-Random/333.
scale = 1.1, 1.1
ownpal = 1

[State 3030, 壒]
Type = PlaySnd
Trigger1 = (time >= 3) && (time%15 = 6)
Value = s25,12

[State 3030, 壒]
Type = PlaySnd
Trigger1 = time = 0
Value = s2,26

[State 8000, 2]
type = PlaySnd
trigger1 = Time = 0
value = s25,8

[State 8000, 3]
type = PowerAdd
trigger1 = ((Time + 3) % 2) = 0
value = 25

[State 8000, 4]
type = ChangeState
trigger1 = power >= 6000
value = 663

[State 8000, 5]
type = ChangeState
triggerall = AnimElem = 3, >= 0
trigger1 = command != "hold_b"
trigger2 = command != "hold_a"
trigger3 = command != "hold_x"
value = 662

[State 8001, 2]
type = Explod
trigger1 = animelem = 3
anim = 663
ID = 661
scale = 0.8,1
sprpriority = 5
postype = p1
pos = 2,-134
bindtime = -1
removeongethit = 1


;当人物的能量不足3000，又同时按住了a和b，则跳转至聚气的state
[State 8000, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 661

[Statedef 661]   
type = S
movetype = I
physics = S
anim = 661              

[State 3202,9916]
type = Explod
trigger1= time%3 = 0
anim = 1518
sprpriority = -3+random%6
postype = p1
pos = -20+random%40,0
Vel = -2+random%4,-7-Random/333.
scale = 1.1, 1.1
ownpal = 1

;能量增加速度
[State 8001, 1]
type = PowerAdd
trigger1 = ((Time + 2) % 2) = 0
value = 25



[State 3030, 壒]
Type = PlaySnd
Trigger1 = (time >= 3) && (time%15 = 6)
Value = s25,12

;聚气时气流的声音
[State 8000, 2]
type = PlaySnd
trigger1 = ((Time + 1) % 15) = 0
value = 25,8

[State 1000, 6]
type = envshake
trigger1 = ((Time + 3) % 3) = 0
time = 4
ampl = 10
freq = 50
phase = 50
ignorehitpause = 1


[State 3010, 抏]
Type = Helper
trigger1 = ((Time + 1) % 37) = 0
StateNo = 12201
ID = 12201
Name = "Quake"
Pos = 0,0
PosType = P1
Ownpal = 1
Size.XScale = 1
Size.YScale = 1
IgnoreHitPause = 1
Persistent = 1


;能量增加时显示气流
[State 8001, 2]
type = Explod
trigger1 = ((Time + 1) % 20) = 0
anim = 663
ID = 661
scale = 0.8,1
sprpriority = 5
postype = p1
pos = 2,-134
bindtime = -1
removeongethit = 0

[State 8001, 3]
type = ChangeState
trigger1 = command != "hold_b"
trigger2 = command != "hold_a"
trigger3 = command != "hold_x"
value = 662

[State 8001, 4]
type = ChangeState
trigger1 = power >= 6000
value = 663


[Statedef 662]   
type = S
movetype = I
physics = S
anim = 662

[state rmv]
type = removeexplod
trigger1 = time = 0
id = 661

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

;聚气到极点
[Statedef 663]   
type = S
movetype = I
physics = S
anim = 662

[state rmv]
type = removeexplod
trigger1 = time = 0
id = 661


;停止播放聚气时气流的声音
[State 8002, 2]
type = StopSnd
trigger1 = Time = 0
channel = 2


[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 12202
sprpriority = 9
postype = p1
pos = 0,-10
bindtime = 1
supermove = 1
under = 0
ownpal = 1

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 879
sprpriority = 5
postype = p1
pos = 0,-10
bindtime = 1
supermove = 1
under = 0
ownpal = 1
[State 1000, 5]
type = Explod
trigger1 = time = 2
anim = 879
sprpriority = 5
postype = p1
pos = 0,-30
facing = -1
bindtime = 1
supermove = 1
under = 0
ownpal = 1
[State 1000, 5]
type = Explod
trigger1 = time = 2
anim = 879
sprpriority = 5
postype = p1
pos = 0,-50
bindtime = 1
supermove = 1
under = 0
ownpal = 1
[State 1000, 5]
type = Explod
trigger1 = time = 2
anim = 879
sprpriority = 5
postype = p1
pos = 0,-70
facing = -1
bindtime = 1
supermove = 1
under = 0
ownpal = 1

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 12203
sprpriority = 1
postype = p1
pos = -10,0
scale = 1,2.3
bindtime = 1
supermove = 1
under = 0
ownpal = 1

[State 3010, 抏]
Type = Helper
trigger1 = Time = 0
StateNo = 12201
ID = 12201
Name = "Quake"
Pos = 0,0
PosType = P1
Ownpal = 1
Size.XScale = 1
Size.YScale = 1
IgnoreHitPause = 1
Persistent = 1

[State 1000, 6]
type = envshake
trigger1 = Time = 0
time = 20
ampl = -15

[State 10000,1-1]
type = PalFX
trigger1 = Time % 2
time = 3
add  = 10,21,240
ignorehitpause = 1
invertall = 0 

[state snd]
type = playsnd
trigger1 = time = 0
value = s25,20
[state snd]
type = playsnd
trigger1 = time= 0
value = s25,17
volume = 255

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