;================================================================================
;                         婎杮摦嶌
;================================================================================
;VAR = 4	傗傜傟儃僀僗
;VAR = 5	儘儞僌僕儍儞僾
;VAR = 15	彑棙億乕僘
;VAR = 32	僼傿僯僢僔儏僄僼僃僋僩
;channel = 2	婥崌棴傔儃僀僗
;channel = 3	婥崌棴傔
;channel = 4	挻偐傔偼傔攇棴傔
;channel = 5	僗僷乕僉儞僌両
;channel = 6	僀儞僩儘
;channel = 7	亀偐乣傔乣偼乣傔乣攇偀偀亁


[Data]
life = 1000
attack = 80
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 25
sparkno = 2
guard.sparkno = s8000
KO.echo = 0
volume = 200
IntPersistIndex = 59
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 20
ground.front = 20
air.back = 20    
air.front = 20   
height = 80   
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0     
head.pos = 0, -100
mid.pos = -0, -60   
shadowoffset = 0     
draw.offset = 0,-2

[Velocity]
walk.fwd  = 3.4      
walk.back = -3.2     
run.fwd  = 7.3, 0    
run.back = -6.9,-5;-4,-6
jump.neu = 0,-11    
jump.back = -3.25
jump.fwd = 3.25
runjump.back = -4,-11
runjump.fwd = 4,-12   
airjump.neu = 0,-9.5  
airjump.back = -3.55  
airjump.fwd = 3.5        

[Movement]
airjump.num = 1
airjump.height = 35
yaccel = .48
stand.friction = .85 
crouch.friction = .82 


;-------------------------------------------------------------
;-------------------------------------------------------------
; ------------------僕儍儞僾奐巒
[Statedef 40]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

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

[State 40, 2]
type = VarSet
trigger1 = Time = 0
var(5) = 0

[State 40, longjump];儘儞僌僕儍儞僾
type = VarSet
triggerall = var(59) <= 0
trigger1 = command = "longjump"
trigger2 = prevstateno = 101 && command = "holdfwd"
trigger3 = prevstateno = 420 && command = "holdup"
trigger4 = prevstateno = 920 && command = "holdup"
trigger5 = prevstateno = 2401 && command = "holdup"
var(5) = 1

[State 40, 4]
type = VarSet
trigger1 = var(59) <= 0
trigger1 = command = "holdfwd"
trigger2 = var(59) >= 1
trigger2 = p2Movetype = H || Random <= 500
sysvar(1) = 1

[State 40, 5]
type = VarSet
trigger1 = var(59) <= 0
trigger1 = command = "holdback"
trigger2 = var(59) >= 1
trigger2 = p2Movetype != H
sysvar(1) = -1

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

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

; --------------------忋曽僕儍儞僾
[Statedef 50]
type    = A
physics = A

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

[State 50, 2]
type = VelSet
trigger1 = Time = 0 && Var(5)
x = IfElse(vel x = 0,0,IfElse(vel x < 0,-5,6))
y = -12

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


[State 50, 4];巆憸
type = AfterImage
triggerall = Var(10) !=0
trigger1 = Time = 0 && Var(5) && Vel X != 0
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 50,line1];僗僺乕僪儔僀儞侾
type = Explod
triggerall = Var(5) && Vel X != 0
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8203  
postype = p1
pos = 10, -60
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1

[State 50, line2];僗僺乕僪儔僀儞俀
type = Explod
triggerall = Var(5) && Vel X != 0
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8202  
postype = p1
pos = -5, -40
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1

[State 50, line3];僗僺乕僪儔僀儞俁
type = Explod
triggerall = Var(5) && Vel X != 0
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8201  
postype = p1
pos = -10, -60
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1

[State 50, line4];僗僺乕僪儔僀儞係
type = Explod
triggerall = Var(5) && Vel X != 0
trigger1 = Time % 4 = 0 && Time > 22 && Time < 34
anim = 8200
postype = p1
pos = 5, -40
velocity = 0, 0
accel = 0, 0
random = 40, 15
removetime = -2
ownpal = 1

; ------------------僕儍儞僾拝抧
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47
velset = 0,0
facep2 = 1

[State 52, Landing Sound]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0

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

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

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
trigger1 = PrevStateNo != [670,680]
value = 1

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = PrevStateNo != [670,680]
trigger2 = Time = 8
trigger2 = PrevStateNo = [670,680]
value = 0
ctrl = 1


;--------------------------------------------
;-----------------僟僢僔儏-------------------
;--------------------------------------------
;---------------------奐巒
[Statedef 100]
type = S
movetype = I
physics = S
anim = 100
velset = 0
ctrl = 0

[State 100, dust]
type = Explod
trigger1 = AnimElem = 1
anim = 8100
postype = p1
pos = -10,2
bindtime = 1
sprpriority = 2
ownpal = 1

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

;---------------------僟僢僔儏拞
[Statedef 101]
type = S;A
movetype = I;A
physics = S;N
anim = 101
vel = 0,0
ctrl = 0

[State 1200, 1]
type = Width
trigger1 = 1
value = 27,15

[State 100, 1]
type = VelSet
trigger1 = 1
x = 9.5;const(velocity.run.fwd.x)

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

[state 101, dust2]
type = explod
triggerall = stateno = 101
trigger1 = time = 0
pos = -20,2
spacing = 1
anim = 8104
bindtime = -1
ownpal = 1
id = 101
removeongethit = 1
ignorehitpause = 1

[State 101, line1];僗僺乕僪儔僀儞侾
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8210
postype = p1
pos = 0, -55
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2

[State 101, line2];僗僺乕僪儔僀儞俀
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8211
postype = p1
pos = -5, -45
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2

[State 101, line3];僗僺乕僪儔僀儞俁
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8212
postype = p1
pos = -30, -28
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2

[State 101, line4];僗僺乕僪儔僀儞係
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8213
postype = p1
pos = 10, -68
velocity = 0, 0
accel = 0, 0
random = 40, 15
removetime = -2
ownpal = 1

[State 101, 3]
type = ChangeState
triggerall = var(59) <= 0
trigger1 = command = "holdup"
value = 40

[State 100, 5.1]
type = ChangeState
triggerall = var(59) <= 0
trigger1 = time > 7
trigger1 = command != "holdfwd" || time = 25
value = 102

[State 100,AI梡僟僢僔儏僗僩僢僾]
type = ChangeState
triggerall = var(59) >= 1
triggerall = time > 7
trigger1 = P2bodydist X <= -30
trigger2 = P2bodydist X <= 40-(P2stateno=[120,159])*20
trigger2 = P2bodydist Y <= -50
trigger3 = inguarddist
trigger4 = enemynear,Movetype = A
trigger5 = RoundState != [1,2]
value = 102

;---------------------掆巭
[Statedef 102]
type = S
movetype = I
physics = S
anim = 102

[State 1002, landdust1]
type = explod
trigger1 = StateNo = 102 && Time = 1
postype = p1
pos = 5,2
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5

[State 1002, landdust]
type = explod
trigger1 = StateNo = 102 && Time = 1
postype = p1
pos = 48,2
facing = -1
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5

[State 102, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1; RUN_BACK2 (land)

;---------------------嬻拞僟僢僔儏
[Statedef 110]
type = A
;movetype = I
physics = N
anim = 60
velset = 0
ctrl = 1;0

;[State 105 , 1]
;type = AssertSpecial
;trigger1 = 1
;flag=NoWalk

[State 110, 1
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 115

[State 110, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 111

;---------------------嬻拞僟僢僔儏拞
[Statedef 111]
type = A
;movetype = I
physics = N
anim = 104
ctrl = 1

[State 111, 1]
type = Width
trigger1 = 1
value = 27,15

[State 111, 1]
type = VelSet
trigger1 = 1
x = 9;const(velocity.run.fwd.x)

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

[State 111, line1];僗僺乕僪儔僀儞侾
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8210
postype = p1
pos = 0, -55
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2

[State 111, line2];僗僺乕僪儔僀儞俀
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8211
postype = p1
pos = -5, -45
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2

[State 111, line3];僗僺乕僪儔僀儞俁
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8212
postype = p1
pos = -30, -28
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2

[State 111, line4];僗僺乕僪儔僀儞係
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8213
postype = p1
pos = 10, -68
velocity = 0, 0
accel = 0, 0
random = 40, 15
removetime = -2
ownpal = 1

[State 111, 5.1]
type = ChangeState
triggerall = time > 7
trigger1 = var(59) <= 0
trigger1 = command != "holdfwd"
trigger2 = time >= 25
value = 950

[State 111, 5.1]
type = ChangeState
triggerall = time > 7
triggerall = var(59) >= 1
trigger1 = P2bodydist X <= 40
trigger2 = inguarddist
trigger3 = enemynear,Movetype = A
trigger4 = (RoundState != [1,2])
trigger5 = vel Y <= -230
value = 950

[State 111, end]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 115

;---------------------------------拝抧

[Statedef 115]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 103

[State 115, 1]
type = VelSet
trigger1 = Time = 0
x = 15
y = 0

[State 115, 3]
type = VelAdd
trigger1 = Time > 0
x = .15

[state 115, 2]
type = posset
trigger1 = time = 0
y = 0

[State 115, landdust1]
type = explod
trigger1 = Time = 0
postype = p1
pos = 10,2
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5

[State 115, Landing Sound]
type = PlaySnd
trigger1 = animelem = 2
value = 52,0

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

;---------------------嬻拞僶僢僋僟僢僔儏
[Statedef 112]
type = A
movetype = I
physics = N
anim = 65
ctrl = 0

[State 112, 1]
type = Width
trigger1 = 1
value = 27,15

[State 112, 1]
type = VelSet
trigger1 = 1
x = -8;const(velocity.run.fwd.x)

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

[State 112, line1];僗僺乕僪儔僀儞侾
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8210
postype = p1
pos = 0, -60
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2
facing = -1

[State 112, line2];僗僺乕僪儔僀儞俀
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8211
postype = p1
pos = -5, -50
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2
facing = -1

[State 112, line3];僗僺乕僪儔僀儞俁
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8212
postype = p1
pos = -5, -35
velocity = 0, 0
accel = 0, 0
random = 20, 20
removetime = -2
ownpal = 1
sprpriority = 2
facing = -1

[State 112, line4];僗僺乕僪儔僀儞係
type = Explod
trigger1 = Time % 4 = 0 && Time < 30  
anim = 8213
postype = p1
pos = 10, -80
velocity = 0, 0
accel = 0, 0
random = 40, 15
removetime = -2
ownpal = 1
facing = -1

[State 112, 5.1]
type = ChangeState
trigger1 = time > 7
trigger1 = command != "holdfwd" || time = 25
value = 113

[State 112, end]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

[Statedef 113]
type    = A
physics = A
anim = 113

[state 113, 1]
type = VelAdd
trigger1 = Time = 0
y = -0.08


;------------------------僴僀僕儍儞僾屻

[Statedef 950]
type    = A
physics = A
anim = 44

[state 950, 1]
type = VelAdd
trigger1 = Time = 0
y = -0.08


;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;僈乕僪奐巒 GUARD (start)
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
[Statedef 120]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged

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

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

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

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

[State 120, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(59) = 0
trigger1 = command = "holddown"
Trigger2 = var(59) >= 1
trigger2 = p2StateType != A
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(59) = 0
trigger1 = command != "holddown"
Trigger2 = var(59) >= 1
trigger2 = p2StateType = A
statetype = S
physics = S

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

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

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;棫僈乕僪 STAND GUARD (guarding)
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
[Statedef 130]
type    = S
physics = S

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

[State 130, Hi to Lo]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command = "holddown"
Trigger2 = var(59) >= 1
trigger2 = p2StateType != A
value = 131

[State 130, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;孅僈乕僪 CROUCH GUARD (guarding)
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
[Statedef 131]
type    = C
physics = C

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

[State 131, Lo to Hi]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command != "holddown"
Trigger2 = var(59) >= 1
trigger2 = p2StateType = A
value = 130

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

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

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

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

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

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

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

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

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

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

;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
;----------------------------僈乕僪僗僥乕僩(AI僼儕乕僘杊巭梡)
;劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒
[Statedef 140]
type = U
physics = U
ctrl= 1

[State 140, ChangeAnim]
type = ChangeAnim
trigger1 = (!Time)
value = 140 + (StateType = C) + (StateType = A)*2

[State 140, StateTypeSet]
type = StateTypeSet
trigger1 = (!Time) && (StateType = S)
physics = S

[State 140, StateTypeSet]
type = StateTypeSet
trigger1 = (!Time) && (StateType = C)
physics = C

[State 140, StateTypeSet]
type = StateTypeSet
trigger1 = (!Time) && (StateType = A)
physics = A

[State 140, StateTypeSet]
type = StateTypeSet
triggerall = StateType = S
trigger1 = var(59) = 0
trigger1 = Command = "holddown"
Trigger2 = var(59) >= 1
trigger2 = p2StateType != A
statetype = C
physics = C

[State 140, StateTypeSet]
type = StateTypeSet
triggerall = StateType = C
trigger1 = var(59) = 0
trigger1 = Command != "holddown"
Trigger2 = var(59) >= 1
trigger2 = p2StateType = A
statetype = S
physics = S

[State 140, ChangeState]
type = ChangeState
trigger1 = (!AnimTime)
value = (StateType = C)*11 + (StateType = A)*51



;============================================================
; Intros and endings
;============================================================

; 僞僀儉僆乕僶乕晧偗
[Statedef 170]
type = S
ctrl = 0
anim = 170;5300
velset = 0,0

[State 170, 1];亀偽偐側亁
type = PlaySnd
trigger1 = time = 15
value = 170,0
volume = 255

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

;---------------------------------------------------------------------------
;-------------------------------彑棙億乕僘
[Statedef 180]
type = S

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 10
range = 10,12

[State 180, 2]
type = VarSet
trigger1 = Matchover != 1
v = 10
value = 11

[State 180, 2]
type = VarSet
trigger1 = Matchover = 1
v = 10
value = 12

[State 180, 3];win1
type = ChangeState
trigger1 = Var(10) = 11
value = 181

[State 180, 4];win2
type = ChangeState
trigger1 = Var(10) = 12
value = 182

;-------------------------------彑棙億乕僘1

[statedef 181]
type = s
ctrl = 0
anim = 181

[State 181, change];懱椡敿暘
type = ChangeAnim2
triggerall = Time = 0
triggerall = life <= 499
trigger1 = stateno = 181
value = 183

[State 181, voice1];亀壣偮傇偟偵偼側偭偨側亁
type = PlaySnd
triggerall = Time = 0
triggerall = life <= 499
trigger1 = stateno = 181
value = 180,0

[State 181, voice2];亀傗偼傝椡偵嵎偑偁傞偲柺敀偔側偄側亁
type = PlaySnd
triggerall = Time = 0
triggerall = life >= 500
trigger1 = stateno = 181
value = 180,1

[state 181, 2] 
type = assertspecial
trigger1 = animelemtime(3) < 200
flag = roundnotover

;-------------------------------彑棙億乕僘2

[statedef 182]
type = s
ctrl = 0
anim = 182

[State 182, change];懱椡敿暘
type = ChangeAnim2
triggerall = Time = 0
triggerall = life <= 499
trigger1 = stateno = 182
value = 184

[State 182, voice3];亀偙偙傑偱妝偟傔傞偲偼巚傢側偐偭偨偧亁
type = PlaySnd
triggerall = Time = 1
triggerall = life <= 499
trigger1 = stateno = 182
value = 180,3

[State 182, voice4];亀偄偝偝偝偐戝恖偘側偐偭偨偐側亁
type = PlaySnd
triggerall = Time = 1
triggerall = life >= 500
trigger1 = stateno = 182
value = 180,2

[state 182, 2] 
type = assertspecial
trigger1 = animelemtime(3) < 230
flag = roundnotover

;---------------------------------------------------------------------------
; ---------------------------僀儞僩儘
;[Statedef 190]
;type = S

;[State 190, 1]
;type = ChangeState
;trigger1 = Random < 500
;value = 191

;[State 190, 1]
;type = ChangeState
;trigger1 = Random >= 500
;value = 192
;---------------------------------------------------------------------------
; 僀儞僩儘1
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 191 , 1]
type = ChangeState
trigger1 = P2name = "SonGoku"
trigger2 = P4name = "SonGoku"
trigger3 = P2name = "Piccolo"
trigger4 = P4name = "Piccolo"
trigger5 = P2name = "Frieza"
trigger6 = P4name = "Frieza"
trigger7 = P2name = "Trunks"
trigger8 = P4name = "Trunks"
trigger9 = P2name = "Mr Satan"
trigger10 = P4name = "Mr Satan"
trigger11 = P2name = "Dr Gero"
trigger12 = P4name = "Dr Gero"
trigger13 = P2name = "Songohan"
trigger14 = P4name = "Songohan"
trigger15 = P2name = "Piccolo Daimaoh"
trigger16 = P4name = "Piccolo Daimaoh"
value = 192

[State 191, 1];亀寉偔僂僅乕儈儞僌傾僢僾偱傕偡傞偐亁
type = PlaySnd
trigger1 = time = 25
value = 191,0
channel = 6

[state 190, 2]
type = assertspecial
trigger1 = 1
flag = intro

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; ----------------------------------乮倁俽懛屽嬻丄懠乯
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 192, 1];亀棃偄亁
type = PlaySnd
trigger1 = animelem = 3
value = 192,0
volume = 225

[state 190, 2]
type = assertspecial
trigger1 = 1
flag = intro

[State 192, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0


;============================================================
;------------------------------ 挧敪
;============================================================

[Statedef 195]
type = S
movetype = I
physics = S
anim = 195
velset = 0
ctrl = 0

[State 195, 1];亀偦偺掱搙偐亁
type = PlaySnd
trigger1 = AnimElem = 1
value = 195,0

;[State 195, 2]
;type = CtrlSet
;trigger1 = Time = 60
;value = 1

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


;------------------------------------------------------------------------
;--------------------崅懍堏摦乮嬞媫夞旔乯--------------------------------
;------------------------------------------------------------------------
;--------崅懍堏摦乮慜曽乯
[Statedef 1001]
type = S
physics = S
anim = 1001
sprpriority = -1
poweradd = 0
velset = 0,0
ctrl = 0

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

[State 1001, snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3000,4

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

[State 1001, nothit]
type = NotHitBy
trigger1 = 1
value = , AP

[State 1001, nothit]
type = NotHitBy
trigger1 = time <25
value2 = , AA

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

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

[State 1001, 1]
type = velset
trigger1 = Time = [10,25]
x = 5

[state 1001, 1]
type = explod
trigger1 = animelem = 1
postype = p1
bindtime = 1
removetime = 8
removeongethit = 1
pos = 0,0
anim = 1002
sprpriority = 3

[state 1001, 1]
type = explod
trigger1 = time = 20
postype = p1
bindtime = 1
removetime = 8
removeongethit = 1
pos = 25,0
anim = 1002
sprpriority = 3

[State 1001, dust]
type = Explod
trigger1 = AnimElem = 1
anim = 8100
postype = p1
pos = -10,5
bindtime = 1
sprpriority = 2
ownpal = 1
scale = .7, .7

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

;--------崅懍堏摦乮屻曽乯
[Statedef 1000]
type = S
physics = S
anim = 1000
poweradd = 0
sprpriority = -1
velset = 0,0
ctrl = 0

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

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

[State 1000, nothit]
type = NotHitBy
trigger1 = 1
value = , AP

[State 1000, nothit]
type = NotHitBy
trigger1 = time <25
value2 = , AA

[State 1000, snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3000,4

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

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

[State 1000, 1]
type = velset
trigger1 = Time = [10,25]
x = -5

[state 1000, 1]
type = explod
trigger1 = animelem = 1
postype = p1
bindtime = 1
removetime = 8
removeongethit = 1
pos = 0,0
anim = 1002
sprpriority = 3

[state 1000, 1]
type = explod
trigger1 = time = 20
postype = p1
bindtime = 1
removetime = 8
removeongethit = 1
pos = -40,0
anim = 1002
sprpriority = 3

[State 1000, dust]
type = Explod
trigger1 = AnimElem = 1
anim = 8100
postype = p1
pos = 30,5
bindtime = 1
sprpriority = 2
ownpal = 1
facing = -1
scale = .7, .7

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


;============================================================
;-------------------------婥椡棴傔--------------
;============================================================
;----------------------僷儚乕棴傔
[Statedef 4500]
type = S
physics = S
ctrl = 0
anim = 4500
velset = 0,0
sprpriority = 2

[State 4500, 1];婥偺壒1
type = PlaySnd
trigger1 = time = 0
value = 4000, 1
volume = 255

[State 4500, 2];婥偺壒2
type = PlaySnd
trigger1 = time = 10
value = 4000, 2
loop = 1
pan = 1
volume = 25
channel = 3

[State 4500, 3];亀偼偀乣亁
type = PlaySnd
trigger1 = time = 0
value = 4000, 0
channel = 2
volume = 255

[State 4500, 4]
type = poweradd
trigger1 = Time >= 0
value = 3

[State 4500, 5]
type = poweradd
trigger1 = Time >= 25
value = 4

[State 4500, 6]
type = poweradd
trigger1 = Time >= 75
value = 5

[State 4500, 7]
type = poweradd
trigger1 = Time >= 120
value = 6

[State 4500, charge]
type = Helper
trigger1 = Time = 0
id = 4502
name = "Charge"
pos = 4,0
postype = P1
stateno = 4502
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
size.xscale = 1
size.yscale = 1

[State 4500, dust]
type = explod
removetime = -1
trigger1 = time = 0
trigger1 = stateno = 4500
anim = 8106
pos = 17,5
sprpriority = 2
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1
id = 4500
facing = -1

[state 4500, shake]
type = envshake
trigger1 = time%5 = 0
time = 5
freq = 60
ampl = -2

[State 4500, flash]
type = PalFX
triggerall = Time >= 5
trigger1 = TimeMod = 4,0
trigger1 = Time > 0
time = 1
add = 100,100,100

[State 4500, 9];MAX婥偺壒
type = PlaySnd
trigger1 = power >= 3000
value = 4000, 1
pan = 1

[State 4500, 10]
type = ChangeState
trigger1 = power >= 3000
trigger2 = var(59) <= 0
trigger2 = command != "hold_b" || command != "hold_y"
trigger2 = command != "hold_c"
value = 4501
ctrl = 1

[State 4500,AI梡僗僩僢僾]
type = ChangeState
triggerall = var(59) >= 1
triggerall = enemynear,statetype != L
trigger1 = inguarddist
trigger2 = p2bodydist x <= 150
trigger3 = enemynear,Movetype = A
trigger4 = (RoundState != [1,2])
value = 4501
ctrl = 1

;--------------------------婥棴傔傗傔傞

[Statedef 4501]
type = S
physics = N
ctrl = 0
anim = 4501
sprpriority = 2

[State 4501, StopSnd]
type = StopSnd
trigger1 = Time = 0
channel = 3

[State 4501, StopSnd]
type = StopSnd
trigger1 = Time = 0
channel = 2

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

;----------------------------------傊傞傁乕
[Statedef 4502]
type = A
movetype = I
physics = N
ctrl = 0
anim = 4000
velset = 0,0
sprpriority = 0

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

[State 4502, BindToParent1]
type = BindToParent
trigger1 = anim = 4000
pos = 4,0

[State 4502, BindToParent2]
type = BindToParent
trigger1 = anim = 4001
pos = 4,3

[State 4502, Anim]
type = ChangeAnim
triggerall = anim = 4000
trigger1 = root,anim = 4501
trigger2 = root,movetype = H
value = 4001

[State 4502, DestroySelf]
type = DestroySelf
trigger1 = anim = 4000 && Root,StateNo != 4500
trigger2 = anim = 4001 && animtime = 0
trigger3 = Root,stateno = [5000,5090]


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[statedef -2]

[State -2, DEBUG]
trigger1 = 1
type = DisplayToClipboard
ignorehitpause = 1
text = "choujin world\n http://choujin.50webs.com"

[state -2, remove dash dust]
type = removeexplod
trigger1 = stateno = 40
id = 100

[state -2, remove charge dust]
type = removeexplod
trigger1 = stateno != 4500
id = 4500

[state -2, stop charge voice]
type = stopsnd
trigger1 = stateno != 4500
channel = 2

[state -2, stop charge sound]
type = stopsnd
trigger1 = stateno != 4500
channel = 3

[state -2, stop charge sound];偡傁乕偒傫
type = stopsnd
trigger1 = stateno != 3000
channel = 5

[State -2, stopsnd];僀儞僩儘
type = StopSnd
trigger1 = stateno != [190,192]
channel = 6

[state -2, stop charge voice];偐乣傔乣偼乣傔乣攇偀偀
type = stopsnd
trigger1 = stateno != 3200
channel = 7



;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, Corner]
type = Velset
trigger1 = FrontEdgeDist < 10 && vel x > 0.1
x = 0.1

[State -3, bounce Sound]
type = PlaySnd
trigger1 = Time = 1
trigger1 = stateno = 5100
value = 5100, 0

[State -3, fall Sound]
type = PlaySnd
trigger1 = Time = 1
trigger1 = stateno = 5110
value = 5110, 0

;[State 52, Landing Sound]
;type = PlaySnd
;trigger1 = Time = 1
;trigger1 = stateno = 52
;value = 52, 0

[State -3, recover]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 5210
trigger2 = stateno = 5201
value = 5210,0
volume = -100

[State -3, Jumping Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 40
value = 40,0

[State -3, Double Jump Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 45
value = 105,0

[State -3, Backstep Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 105
value = 105,0

[State -3, Backstep Landing Sound]
type = PlaySnd
trigger1 = Time = 1
trigger1 = stateno = 106
value = 52, 0

[State -2, backstep afterimage]
type = AfterImage
triggerall = Time = 1
trigger1 = stateno = 105
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State -2, sethitvoice]
type = VarRandom
triggerall = Time = 1
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
v = 4
range = 0,14

[State -2, hitvoice1]
type = PlaySnd
triggerall = Time = 1
triggerall = Var(4) = [0,2]
triggerall = alive = 1
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
value = 5000,0

[State -2, hitvoice2]
type = PlaySnd
triggerall = Time = 1
triggerall = Var(4) = [3,5]
triggerall = alive = 1
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
value = 5000,1

[State -2, hitvoice3]
type = PlaySnd
triggerall = Time = 1
triggerall = Var(4) = [6,8]
triggerall = alive = 1
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
value = 5000,2

[State -2, hitvoice4]
type = PlaySnd
triggerall = Time = 1
triggerall = Var(4) = [9,11]
triggerall = alive = 1
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
value = 5000,3

[State -3, jumpdust1];僕儍儞僾儂僐儕1
type = explod
trigger1 = StateNo = 40 && Time = 1
postype = p1
pos = -4,2
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5
supermove = 1

[State -3, jumpdust2];僕儍儞僾儂僐儕2
type = explod
trigger1 = StateNo = 40 && Time = 1
postype = p1
pos = 4,2
facing = -1
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5
supermove = 1

[State -3, landdust1];拝抧儂僐儕1
type = explod
trigger1 = StateNo = 52 && Time = 1
postype = p1
pos = -17,4
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5
supermove = 1

[State -3, landdust];拝抧儂僐儕2
type = explod
trigger1 = StateNo = 52 && Time = 1
postype = p1
pos = 20,4
facing = -1
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5
supermove = 1

[State -3, landdust1];僶僢僋僗僥僢僾拝抧1
type = explod
trigger1 = StateNo = 106 && Time = 1
postype = p1
pos = -35,4
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5
supermove = 1

[State -3, landdust];僶僢僋僗僥僢僾拝抧2
type = explod
trigger1 = StateNo = 106 && Time = 1
postype = p1
pos = 8,4
facing = -1
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5
supermove = 1

[State -3, removedust];慜僟僢僔儏毢嶍彍
type = RemoveExplod
trigger1 = stateno != 101
id = 101

;----------------------------------------------
;----------僼傿僯僢僔儏僄僼僃僋僩----------
;----------------------------------------------

[State -2,KO]
type = Varadd
trigger1 = roundstate = 3
ignorehitpause = 1
var(32) = 1

[State -2,KO]
type = Varset
trigger1 = roundstate != 3
ignorehitpause = 1
var(32) = 0

[state -2, finish]
type = explod
triggerall = WinKo && var(32) = 1
trigger1 = projhittime(3202) = 1 || stateno = 805 || stateno = 3100
anim = 8500
pos = 0,0
postype = left
bindtime = -1
supermove = 1 ;0
removetime = 24
ontop = 1
ownpal = 1


;----------------------------------------------
;--------------------僟儊乕僕曗惓----------
;----------------------------------------------

[State -2, 儕僙僢僩]
type = varset
trigger1 = enemy,movetype != H
trigger2 = enemy,ctrl
triggerall = time > 0
fvar(8) = 0

[State -2, 曗惓懳徾];僌儔儞僪僗儔僀僟乕
type = varadd
trigger1 = movehit = 1
trigger1 = hitdefattr = SCA,SA
trigger1 = stateno = 2401; 仼曗惓偐偗偨偄媄偺斣崋 
trigger1 = fvar(8) < 0.7
fvar(8) = 0.21+(fvar(8)*0.57);丂仼偙偙偺悢帤傪偄偠傞偲曗惓偑嫮偔側傞

[State -2, 曗惓懳徾];僌儔儞僪僗儔僀僟乕(僐儞價僱乕僔儑儞)
type = varadd
trigger1 = movehit = 1
trigger1 = hitdefattr = SCA,SA
trigger1 = stateno = 2391; 仼曗惓偐偗偨偄媄偺斣崋 
trigger1 = fvar(8) < 0.7
fvar(8) = 0.35+(fvar(8)*0.57);丂仼偙偙偺悢帤傪偄偠傞偲曗惓偑嫮偔側傞

[State -2, 曗惓懳徾];晜偐偣媄
type = varadd
trigger1 = movehit = 1
trigger1 = hitdefattr = SCA,NA
trigger1 = stateno = 420 || stateno = 920; 仼曗惓偐偗偨偄媄偺斣崋 
trigger1 = fvar(8) < 0.7
fvar(8) = 0.15+(fvar(8)*0.57);丂仼偙偙偺悢帤傪偄偠傞偲曗惓偑嫮偔側傞

[State -2, 峌寕椡]
type = AttackMulSet
trigger1 = 1
value = 1-fvar(8);value = fvar(8)

[State -2, 尷奅抣]
type = varset
trigger1 = fvar(8) > 0.7
fvar(8) = 0.8
