
[Data]
life = 2000    
attack = 70  
defence = 220   
fall.defence_up = 9999 
liedown.time = 60    
airjuggle = 10       
sparkno = 0          
guard.sparkno = 40   
KO.echo = 0          
volume = 999           
IntPersistIndex = 60
FloatPersistIndex = 40

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

[Velocity]
walk.fwd  = 1.5      
walk.back = -1       
run.fwd  = 7.6,0     
run.back = -7.2      
jump.neu = 0,-8.1    
jump.back = -2.55    
jump.fwd = 2.5       
runjump.back = -2.55,-8.1 
runjump.fwd = 4,-8.1      
airjump.neu = 0,-8.1      
airjump.back = -2.55,-8.1 
airjump.fwd = 2.5,-8.1    

[Movement]
airjump.num = 2      
airjump.height = 35  
yaccel = .38         
stand.friction = .85  
crouch.friction = .82 

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

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

;---------------------------------------------------------------------------
[Statedef 180]
type = S

[State 180, 0]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[state 180]
type = playsnd
trigger1 = time = 10
value = 0, 1
volume = 999

[State 180, 1a]
type = ChangeAnim
trigger1 = Time = 0
value = 180

[state 180]
type = explod
triggerall = teammode = single
triggerall = matchover = 1
triggerall = life < 1500
trigger1 = time = 200
anim = 11112
ontop = 1
ownpal = 1
sprpriority = 99
postype = left
removetime = -1

[state 180]
type = explod
triggerall = teammode = single
triggerall = matchover = 1
triggerall = life < 500
trigger1 = time = 200
anim = 11113
ontop = 1
ownpal = 1
sprpriority = 100
postype = left
removetime = -1

[state 180]
type = explod
triggerall = teammode = single
triggerall = matchover = 1
triggerall = life > 1500
trigger1 = time = 200
anim = 11111
ontop = 1
ownpal = 1
sprpriority = 99
postype = left
removetime = -1

[state 180]
type = explod
triggerall = teammode = single
triggerall = matchover = 1
trigger1 = time = 200
anim = 11114
ownpal = 1
sprpriority = 3
postype = left
removetime = -1

[State 180]
type = allPalFX
triggerall = teammode = single
triggerall = matchover = 1
trigger1 = time = 200
time = 12
add = 20,20,20
mul = 256,256,256
sinadd = 200,200,200,4
invertall = 1
color = 256

[state 180]
type = playsnd
triggerall = teammode = single
triggerall = matchover = 1
trigger1 = time = 200
value = 300,0 
volume = 255

[state 180]
type = playsnd
triggerall = teammode = single
triggerall = matchover = 1
trigger1 = time = 200
value = 0,25 
volume = 255

[State 180] 
type = AssertSpecial
triggerall = matchover = 1
trigger1 = (time > 200)
flag = invisible
flag1 = noshadow
flag2 = nomusic
flag3 = NoFG

[State 180] 
type = AssertSpecial
triggerall = teammode = single
triggerall = matchover = 1
trigger1 = (time < 1500)
flag = RoundNotOver
flag1 = NoFG
flag2 = nobardisplay

[State 180] 
type = AssertSpecial
triggerall = roundno = 1
trigger1 = (time < 100)
flag = RoundNotOver 

;---------------------------------------------------------------------------
[Statedef 191]
type = S
ctrl = 0
anim = 190

[state 191]
type = changeanim
triggerall = p2name =  "Himan version beta"
trigger1 = time = 0
value = 0

[State 191]
type	= AssertSpecial
triggerall = p2name !=  "Himan version beta"
trigger1= (Time < 700)
flag	= Intro
flag2	= NoBarDisplay
flag3	= nomusic

[state 191]
type = playsnd
triggerall = p2name !=  "Himan version beta" 
trigger1 = time = 0
value = 0, 20
volume = 999
channel = 10

[state 191]
type = playsnd
triggerall = p2name !=  "Himan version beta"
trigger1 = animelem = 5
trigger1 = anim = 190
value = 0, 8
volume = 255

[state 191]
type = explod
triggerall = p2name !=  "Himan version beta"
trigger1 = animelem = 4
trigger1 = anim = 190
anim = 202     
sprpriority = 3 

[state 191]
type = explod
triggerall = p2name !=  "Himan version beta" 
trigger1 = time = 20
trigger1 = anim = 190
anim = 1086
sprpriority = 3
removetime = 350

[state 191]
type = playsnd
triggerall = p2name !=  "Himan version beta"
trigger1 = timemod = 60, 0
value = 0, 22
volume = 255
channel = 11

[state 0]
type = stopsnd
triggerall = time > 350
trigger1 = timemod = 1,0
channel = 11

[State 191,1shake] 
type = EnvShake
triggerall = p2name !=  "Himan version beta"
trigger1 = time = 0
time = 350
ampl = 2
freq = 127

[state 191]
type = playsnd
triggerall = p2name !=  "Himan version beta"
trigger1 = animelem = 12
trigger1 = anim = 190
value = 0, 4
volume = 255

[state 191]
type = changeanim
trigger1 = time = 650
value = 0

;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
anim = 0

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

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4]
type = VarSet
trigger1 = Pos Y = 0
var(3) = 0

[state 0]
type = stopsnd
trigger1 = time = 0
channel = 10

[state 0]
type = stopsnd
trigger1 = time = 0
channel = 11

[State 0, 5]
type = ChangeState
trigger1 = time = 0
trigger1 = Pos Y < 0
value = 50

;-----------------------------------------------------------------------------
[statedef -2]
;vs.the nightmare SSJ3

[State -2]
type = DefencemulSet
trigger1 = p2name = "Broly 'le cauchemar' super saiyen nv3"
trigger2 = p1name = "Broly 'le cauchemar' super saiyen nv3"
value = 0.5

[state -2]
type = attackmulset
trigger1 = p2life < 500
trigger1 = p2name = "Broly 'le cauchemar' super saiyen nv3"
trigger2 = p1name = "Broly 'le cauchemar' super saiyen nv3"
value = 2

[State -2, PowerAdd]
type = PowerAdd
trigger1 = 2
value = 2

;------------------------------------------------------------------------------------
;versus ennemi avec moins de 1100 life
[state -2]
type = attackmulset
triggerall = roundstate >= 1
trigger1 = P2Life >= 1 && P2Life < 1000
value = 0.5

;-----------------------------------------------------------------------------
superdéfence
[state -2]
type = defencemulset
triggerall = alive = 1
triggerall = p2name != "Broly 'le cauchemar' super saiyen nv3"
triggerall = p2name != "Himan version beta"
trigger1 = stateno = 5000
trigger2 = stateno = 5001
trigger3 = stateno = 5010
trigger4 = stateno = 5011
trigger5 = stateno = 5020
trigger6 = stateno = 5030
trigger7 = stateno = 5035
trigger8 = stateno = 5040
trigger9 = stateno = 5050
trigger10 = stateno = 5070
trigger11 = stateno = 5071
trigger12 = stateno = 5080
trigger13 = stateno = 5081
trigger14 = stateno = 5100
trigger15 = stateno = 5101
trigger16 = stateno = 5110
trigger17 = stateno = 5120
trigger18 = stateno = 5150
trigger19 = stateno = 5200
trigger20 = stateno = 5201
trigger21 = stateno = 5210
value = 0.2

;-----------------------------------------------------------------------------
[state -2]
type = HitOverride
triggerall = var(5) != 2
triggerall = var(5) = 1
trigger1 = Alive = 1
trigger2 = Time >= 0
attr = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
slot = 0
stateno = 10000

[state -2]
type = varset
trigger1 = power < 100
v = 5
value = 2

[state -2]
type = varset
trigger1 = power = 0
v = 6
value = 2

[state -2]
type = poweradd
triggerall = var(6) != 2
trigger1 = var(6) = 1
trigger1 = timemod = 20,0
value = -100 

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

[State -2]
type = VarSet
trigger1 = time = 0
v = 55
value = 1

[State -2]
type = DisplayToClipboard
trigger1 = var(55) = 1
text = "sephiroth le boss de mugen %d, VelX %f, VelY %f"
params = var(55),P2BodyDist X,P2BodyDist Y 

[State -2]
type = AssertSpecial
trigger1 = 1
ignorehitpause = 1
flag = TimerFreeze

;digit1
[State -2]
type = Explod
trigger1 = Var(0) != Var(1)
trigger1 = (Var(0)-Var(1))*IfElse(Time%2=0,1,-1) < 0 
ignorehitpause = 1
removetime = 15
anim = 10000+(Var(0)-Var(1))%10
pos = IfElse(Facing=-1,-21,14),-50
facing = Facing
velocity = 0,-4
accel = 0,0.666666666666
ontop = 1

;digit2
[State -2]
type = Explod
trigger1 = Var(0) != Var(1)
trigger1 = (Var(0)-Var(1))*IfElse(Time%2=0,1,-1) < 0 
trigger1 = abs(Var(0)-Var(1)) >= 10
ignorehitpause = 1
removetime = 15
anim = 10000+floor((Var(0)-Var(1))/10.0)%10
pos = IfElse(Facing=-1,-14,7),-50
facing = Facing
velocity = 0,-4
accel = 0,0.666666666666
ontop = 1

;digit3
[State -2]
type = Explod
trigger1 = Var(0) != Var(1)
trigger1 = (Var(0)-Var(1))*IfElse(Time%2=0,1,-1) < 0 
trigger1 = abs(Var(0)-Var(1)) >= 100
ignorehitpause = 1
removetime = 15
anim = 10000+floor((Var(0)-Var(1))/100.0)%10
pos = IfElse(Facing=-1,-7,0),-50
facing = Facing
velocity = 0,-4
accel = 0,0.666666666666
ontop = 1

;digit4
[State -2]
type = Explod
trigger1 = Var(0) != Var(1)
trigger1 = (Var(0)-Var(1))*IfElse(Time%2=0,1,-1) < 0 
trigger1 = abs(Var(0)-Var(1)) >= 1000
ignorehitpause = 1
removetime = 15
anim = 10000+floor((Var(0)-Var(1))/1000.0)%10
pos = IfElse(Facing=-1,0,-7),-50
facing = Facing
velocity = 0,-4
accel = 0,0.666666666666
ontop = 1

;digit5
[State -2]
type = Explod
trigger1 = Var(0) != Var(1)
trigger1 = (Var(0)-Var(1))*IfElse(Time%2=0,1,-1) < 0 
trigger1 = abs(Var(0)-Var(1)) >= 10000
ignorehitpause = 1
removetime = 15
anim = 10000+floor((Var(0)-Var(1))/10000.0)%10
pos = IfElse(Facing=-1,7,-14),-50
facing = Facing
velocity = 0,-4
accel = 0,0.666666666666
ontop = 1

;digit6
[State -2]
type = Explod
trigger1 = Var(0) != Var(1)
trigger1 = (Var(0)-Var(1))*IfElse(Time%2=0,1,-1) < 0 
trigger1 = abs(Var(0)-Var(1)) >= 100000
ignorehitpause = 1
removetime = 15
anim = 10000+floor((Var(0)-Var(1))/100000.0)%10
pos = IfElse(Facing=-1,14,-7),-50
facing = Facing
velocity = 0,-4
accel = 0,0.666666666666
ontop = 1

;-----------------------------------------------------------------------------
; s'accroupir
[Statedef 10]
type    = C
movetype = A
physics = C
anim = 5

[State 10, Resistance]
type = HitDef
trigger1 = Alive = 1
trigger1 = Var(5) != 0
trigger1 = timemod = 20,0
attr = S, SA
getpower = 100
guardflag = MA
hitflag = P
priority = 9

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

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

;---------------------------------------------------------------------------
; accroupi
[Statedef 11]
type    = C
physics = C
anim = 5

[State 11, 1]
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; accroupi et sans bouger
[Statedef 12]
type    = S
movetype = A
physics = S
anim = 5

[State 12, Resistance]
type = HitDef
trigger1 = Alive = 1
trigger1 = Var(5) != 0
trigger1 = timemod = 20,0
attr = S, SA
getpower = 100
guardflag = MA
hitflag = P
priority = 9

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

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

[State 20, StepSnd]
type = PlaySnd
trigger1 = timemod = 24,0
volume = -1
value = 21, 2

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

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

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

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

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

[State 40, Resistance]
type = HitDef
trigger1 = Alive = 1
trigger1 = Var(5) != 0
trigger1 = timemod = 20,0
attr = S, SA
getpower = 100
guardflag = MA
hitflag = P
priority = 9

[state 40]
type = playsnd
trigger1 = animelem = 1
value = 0, 10
volume = -100

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

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

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

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

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

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

;---------------------------------------------------------------------------
; AirJump Start
[Statedef 45]
type    = A
movetype = A
physics = N
ctrl = 0
velset = 0,0

[State 45, Resistance]
type = HitDef
trigger1 = Alive = 1
trigger1 = Var(5) != 0
trigger1 = timemod = 20,0
attr = S, SA
getpower = 100
guardflag = MA
hitflag = P
priority = 9

[State 45, JumpSnd]
type = Playsnd
trigger1 = time = 0
value = 20,9

[State 45, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(44)
value = 44

[State 45, 2]
type = ChangeAnim
trigger1 = !SelfAnimExist(44)
value = 41

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

[State 45, 4]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

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

[State 45, 6]
type = VelSet
trigger1 = Time = 2
x = ifelse(sysvar(1)=0, const(velocity.airjump.neu.x), ifelse(sysvar(1)=1, const(velocity.airjump.fwd.x), const(velocity.airjump.back.x)))
y = const(velocity.airjump.y)

[State 45, 7]
type = ChangeState
trigger1 = Time = 2
value = 50
ctrl = 1

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

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

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

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

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
movetype = A
physics = S
ctrl = 0
anim = 47

[State 52, Resistance]
type = HitDef
trigger1 = Alive = 1
trigger1 = Var(5) != 0
trigger1 = timemod = 20,0
attr = S, SA
getpower = 100
guardflag = MA
hitflag = P
priority = 9

[state 52]
type = playsnd
trigger1 = time = 0
value = 0, 9

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

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

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

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

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[state 100]
type = playsnd
trigger1 = time = 0
value = 0, 10
volume = -100 

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x) +20
sparkno = 120

[State 100,Terremoto]
type	= EnvShake
trigger1 = Time = 0
time = 20
freq	= 40
ampl	= -40
phase	= 190

[State 100, 4]
type = Explod
trigger1 = time = 0
anim = 227
sprpriority = 2
postype = p1
pos = 0, 20
removetime = 10

[state 100, Cenario alterado]
type = BGPalFx
trigger1 = time = 0
time  = 10
invertall = 1

[State 100, Shadows]
type = Afterimage
trigger1 = time = 0
time = 10
length = 60
palbright = 5,5,5
PalContrast = 50,50,255
paladd = 0,0,0
palmul = 1,.165,1
FrameGap = 1
Trans = Add

[State 100,Energia]
type = AfterImage
trigger1 = time = 0
trigger1 = Var(0) = 1
time = 10
length = 60
palcolor = 0
palinvertall = 2
framegap = 1
trans = add

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, Snd 1]
type = PlaySnd
trigger1 = Time = 0
value = 13,11
volume = 255

[State 100, Snd 2]
type = PlaySnd
trigger1 =AnimElem = 1
trigger2 =AnimElem = 3
trigger3 =AnimElem = 5
value = 13,12
volume = 255

[State 100, Hit]
type = HitDef
trigger1 = timemod = 10,0
attr = S, NA                     
damage    = 10                  
animtype = light                
getpower = 0                 
givepower = 0                 
guardflag = MA                   
hitflag = MAFP                    
priority = 9                
pausetime = 11,11                
numhits = 1                      
sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = Trip               
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -15,-0             
airguard.velocity = -1.9,-.8     
air.velocity = -15,-0  

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd"
value = 0

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

[State 105, Hit]
type = HitDef
trigger1 = timemod = 25,0
attr = S, NA                     
damage    = 45                   
animtype = Medium                
getpower = 0                 
givepower = 0                 
guardflag = MA                   
hitflag = MAFP                    
priority = 9                
pausetime = 11,11                
numhits = 1                      
sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = Trip               
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -15,-0             
airguard.velocity = -1.9,-.8     
air.velocity = -15,-0           
[State 105, RunSnd]
type = PlaySnd
trigger1 = time = 0
value = 21, 0

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

[State 105, 2]
type = CtrlSet
trigger1 = Time = 2
value = 1

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

;---------------------------------------------------------------------------
; RUN_BACK2 (land)
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 47

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

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

[State 106, 3]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

[State 106, 4]
type = ChangeState
trigger1 = Time = 7
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; RUN_UP
[Statedef 110]
type    = S
physics = N

[State 110, 0]
type = CtrlSet
trigger1 = Time = 0
value = 0

[State 110, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 110

[State 110, 2]
type = HitBy
trigger1 = Time = 0
value = SCA, NT, ST, HT
time = 30

[State 110, 3]
type = VelSet
trigger1 = Time = 0
x = 0
z = -7

[State 110, 4]
type = VelMul
trigger1 = 1
z = 0.8

[State 110, 5]
type = VelSet
trigger1 = AnimTime = -8
z = 0

[State 110, 7]
type = CtrlSet
trigger1 = AnimTime = 0
value = 1

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

;---------------------------------------------------------------------------
; RUN_DOWN
[Statedef 115]
type    = S
physics = N

[State 115, 0]
type = CtrlSet
trigger1 = Time = 0
value = 0

[State 115, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 110

[State 115, 2]
type = HitBy
trigger1 = Time = 0
value = SCA, NT, ST, HT
time = 30

[State 115, 3]
type = VelSet
trigger1 = Time = 0
x = 0
z = 7

[State 115, 4]
type = VelMul
trigger1 = 1
z = 0.8

[State 115, 5]
type = VelSet
trigger1 = AnimTime = -8
z = 0

[State 115, 7]
type = CtrlSet
trigger1 = AnimTime = 0
value = 1

[State 115, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

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

[State 130, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
value = 10000

[State 151, Counter]
type = ChangeState
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "c"
value = 10003

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

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

[Statedef 131]
type    = C
physics = C

[State 131, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
value = 10000

[state 131]
type = ChangeState
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "c"
value = 10003

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

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

[State 132, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"
value = 610

[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
trigger1 = sysvar(0)
trigger1 = command != "holdback"
value = 52

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

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

[State 150, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
value = 10000

[State 150, Counter]
type = ChangeState
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "c"
value = 10003

[State 150, Spr]
type = SprPriority
trigger1 = Time >= 0
value = -1

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

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
trigger2 = Time >= 50
trigger2 = Pos Y < 0
value = 151

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

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = c
anim = 150

[State 151, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
value = 10000

[State 151, Counter]
type = ChangeState
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "c"
value = 10003

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

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = Time >= GetHitVar(hittime)
x = 0

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

[State 151, 4]
type = ChangeState
trigger1 = Time >= GetHitVar(hittime)
value = 130
ctrl = 1

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

[State 152, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"
value = 5601

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

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 153

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

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

[State 153, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"
value = 5601

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

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

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

[State 153, 4]
type = ChangeState
trigger1 = Time >= GetHitVar(hittime)
value = 131
ctrl = 1

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

[State 154, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"
value = 610

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

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

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

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

[State 155, Counter]
type = ChangeState
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"
value = 610

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

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

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

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

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

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

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

[State 155, 8]
type = ChangeState
trigger1 = sysvar(0)
value = 130

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

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

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

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

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

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

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

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

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 191

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 191]
type = S
ctrl = 0

[State 191, 1]
type = ChangeState
trigger1 = Time = 0
value = 0

;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 3] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 4] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
value = a

[State 5000, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5001 ;HITG_SLIDE

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

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

;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 5001]
type    = S
movetype= H
physics = S

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

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

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

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

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = HitOver
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HITC_SHAKE
[Statedef 5010]
type    = C
movetype= H
physics = N
velset = 0,0

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

[State 5010, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 5010, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5010, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5010, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5010, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5011 ;HITC_SLIDE

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type    = C
movetype= H
physics = C

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

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

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

[State 5011, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5011, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5011, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5011, 6]
type = ChangeState
trigger1 = HitOver
value = 11
ctrl = 1


;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

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

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= H
physics = N

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

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

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger1 = Pos Y >= 100 ;Custom
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

[State 5035, Air]
type = ChangeState
trigger1 = Var(3) != 0
value = 2000

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

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

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 4] ;Recover near ground
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE

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

[state 5000]
Type = NotHitBy
Trigger1 = 1
Value = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
Time = 2

[State 5070, Air]
type = ChangeState
trigger1 = Var(3) != 0
trigger1 = HitShakeOver
value = 2000

[State 5070, 1]
type = PlaySnd
trigger1 = Time = 2
trigger1 = alive = 1
value = 5,12
volume = 999

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

[State 5070, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 5071

[State 5070, 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

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

[State 5071, 2] ;Acceleration
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]
type    = L
movetype= H
physics = N
velset = 0,0

[State 5080, 1] ;Set default anim
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)

[State 5080, 2]
type = VarAdd
trigger1 = time = 0
trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
sysvar(2) = anim % 10

[State 5080, 3] ;If 5090 doesn't exist, default to 5030
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080, 3] ;Freeze
type = ChangeAnim
trigger1 = 1
value = sysvar(2)

[State 5080, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5081 ;HITL_SLIDE

[State 5080, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) != 0
value = 5030 ;HITA_UP

;---------------------------------------------------------------------------
; HITL_SLIDE
[Statedef 5081]
type    = L
movetype= H
physics = C

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

[State 5081, 2]
type = VelSet
trigger1 = HitOver
x = 0

[State 5081, 3] ;Don't show hit ground frame
type = VarSet
trigger1 = Time = 0
sysvar(0) = 1

[State 5081, 4]
type = ChangeState
trigger1 = HitOver
value = 5110 ;HIT_LIEDOWN

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
;trigger1 = GetHitVar(fall.yvel) = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
;value = 61
;pos = 0, 0
;under = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10a]
type = PlaySnd
trigger1 = Time = 1
value = 20, 7 ;Hit ground
;value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 10b]
type = PlaySnd
trigger1 = Time = 1
value = 20,6 ; Hit ground - DBZ
;value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 5101

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type    = L
movetype= H
physics = N

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = 1
y = .4

[State 5101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 6a]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 0, 11 ;Hit ground
;value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5110, 6b]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 0,11 ; Hit ground - DBZ
;value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5110, 7]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine

;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

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

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

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

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

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 6]
type = SprPriority
trigger1 = Time = 0
value = -3

[State 5150, 7] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 8] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 9]
type = NotHitBy
trigger1 = 1
value = SCA
time = 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
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = 5201

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = A
movetype= H
physics = A
anim = 5200

[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
x = -.15
y = -3.5

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

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

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

[State 5201, 6]
type = GameMakeAnim
trigger1 = Time = 1
value = 60
pos = 0, 0
under = 1

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

[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

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

[State 5300]
type = ChangeState
trigger1 = time = 50
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Continue?
[Statedef 5500]
type = S
ctrl = 0
anim = 5500
velset = 0,0

[State 5500, 1]
type = ChangeAnim
trigger1 = time = 0
trigger1 = !SelfAnimExist(5500)
trigger1 = SelfAnimExist(5300)
value = 5300

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 1] ;Intro
type = ChangeState
trigger1 = p2name = "Himan Zellode le gardien de la hache d'or ver.béta" 
trigger1 = roundno = 1
value = 10191

[State 5900: 	ChangeState] 
type = ChangeState
triggerall = p2name != "Himan Zellode le gardien de la hache d'or ver.béta" 
trigger1 = (RoundNo = 1) && (Time = 1)
value = 190

;---------------------------------------------------------------------------
;Push Counter - Stand
[Statedef 5600]
type    = S
movetype= H
physics = N

[State 5600, 0]
type = PlaySnd
trigger1 = Time = 0
value = 20, 3

[State 5600, 1]
type = ChangeAnim
trigger1 = Time >= 0
value = 5600 

[State 5600, 2]
type = VelSet
trigger1 = Time = [0,5]
x = 4

[State 5600, 2]
type = VelSet
trigger1 = Time = [6,10]
x = 3

[State 5600, 2]
type = VelSet
trigger1 = Time = [11,15]
x = 2

[State 5600, 1]
type = PowerAdd
trigger1 = Time = 0
value = -500

[State 5600, 1]
type = NotHitBy
trigger1 = Time = 0
value2 = SCA
time = 60

[State 5600, 3]
type = PlaySnd
trigger1 = Time = 0
value = F6,2

[State 5600, 1] ;Blink 
type = PalFX
trigger1 = Time = 0
time = 3
add = 0,20,255 

[State 5600, 1] ;Blink 
type = PalFX
trigger1 = Time = 3
time = 5
add = 0,20,128 

[State 5600, 1] ;Blink 
type = PalFX
trigger1 = Time = 8
time = 7
add = 0,20,64 

[State 5600, 9]
type = MakeDust
trigger1 = Time >= 0
pos = 5,0

[State 5600, 3]
type = CtrlSet
trigger1 = Time = 15
value = 1

[State 5600, 3]
type = ChangeState
trigger1 = Time = 16
value = 200

;---------------------------------------------------------------------------
;Push Counter - Air
[Statedef 5602]
type    = A
movetype= H
physics = N

[State 5602, 0]
type = PlaySnd
trigger1 = Time = 0
value = S20, 3

[State 5602, 1]
type = VelAdd
trigger1 = Time >= 0
y = .35

[State 5602, 1]
type = ChangeAnim
trigger1 = Time >= 0
value = 152

[State 5602, 2]
type = VelSet
trigger1 = Time = [0,5]
x = 4

[State 5602, 2]
type = VelSet
trigger1 = Time = [6,10]
x = 3

[State 5602, 2]
type = VelSet
trigger1 = Time = [11,15]
x = 2

[State 5602, 1]
type = PowerAdd
trigger1 = Time = 0
value = -500

[State 5602, 1]
type = NotHitBy
trigger1 = Time = 0
value2 = SCA
time = 60

[State 5602, 3]
type = PlaySnd
trigger1 = Time = 0
value = F6,2

[State 5602, 1] ;Blink 
type = PalFX
trigger1 = Time = 0
time = 3
add = 0,20,255 

[State 5602, 1] ;Blink 
type = PalFX
trigger1 = Time = 3
time = 5
add = 0,20,128 

[State 5602, 1] ;Blink 
type = PalFX
trigger1 = Time = 8
time = 7
add = 0,20,64 

[State 5602, 9]
type = MakeDust
trigger1 = Time >= 0
pos = 5,0

[State 5602, 3]
type = CtrlSet
trigger1 = Time = 15
value = 1

[State 5602, 3]
type = ChangeState
trigger1 = Time = 16
value = 610

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



;---------------------------------------------------------------------------
;Weak Hit - High/Air
[Statedef 6000]
type    = S
movetype= H
physics = N
velset = 0,0

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

[State 6000, 2]
type = SelfState
trigger1 = Time = 20
value = 5000

;---------------------------------------------------------------------------
;Medium Hit - High/Air
[Statedef 6001]
type    = S
movetype= H
physics = S
velset = 0,0

[State 6001, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 6000

[State 6001, 2]
type = SelfState
trigger1 = Time = 20
value = 5000

;---------------------------------------------------------------------------
;Strong Hit - High/Air
[Statedef 6002]
type    = S
movetype= H
physics = S
velset = 0,0
ctrl = 0

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

[State 6002, 2]
type = SelfState
trigger1 = Time = 20
value = 5000

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

[Statedef 6003]
type    = S
movetype= H
physics = S
velset = 0,0
ctrl = 0

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

[State 6003, 2]
type = SelfState
trigger1 = Time = 20
value = 5000

;---------------------------------------------------------------------------
;Weak Hit - Low/Air
[Statedef 6010]
type    = S
movetype= H
physics = N
velset = 0,0

[State 6010, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 6002

[State 6010, 2]
type = SelfState
trigger1 = Time = 20
value = 5010

;---------------------------------------------------------------------------
;Medium Hit - Low/Air
[Statedef 6011]
type    = C
movetype= H
physics = N
velset = 0,0

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

[State 6011, 2]
type = SelfState
trigger1 = Time = 20
value = 5011

;---------------------------------------------------------------------------
;Strong Hit - Low/Air
[Statedef 6012]
type    = S
movetype= H
physics = N
velset = 0,0

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

[State 6012, 2]
type = SelfState
trigger1 = Time = 20
value = 5012

;---------------------------------------------------------------------------
;Weak Hit - Crouch
[Statedef 6020]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 6020, 2]
type = SelfState
trigger1 = Time = 20
value = 5020

;---------------------------------------------------------------------------
;Medium Hit - Crouch
[Statedef 6021]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 6021, 2]
type = SelfState
trigger1 = Time = 20
value = 5021

;---------------------------------------------------------------------------
;Strong Hit - Crouch
[Statedef 6022]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 6022, 2]
type = SelfState
trigger1 = Time = 20
value = 5022

;---------------------------------------------------------------------------
;Lie Down
[Statedef 6110]
type    = L
movetype= H
physics = N
velset = 0,0

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

[State 6110, 2]
type = SelfState
trigger1 = Time = 20
value = 5110

;---------------------------------------------------------------------------
;Combo Hit - High/Air
[Statedef 6200]
type    = S
movetype= H
physics = S
velset = 0,0

[State 6200, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 6011

[State 6000, 2]
type = SelfState
trigger1 = Time = 50
value = 5011

;---------------------------------------------------------------------------
;Ultimate - Knocked up
[Statedef 6300]
type    = A
physics = N
ctrl = 0
velset = 0,-140

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

[State 6300, VelAdd]
type = VelAdd
trigger1 = Time >= 0
y = 0.40

[State 6300, VelMul] 
type = VelMul
trigger1 = Time = 0
y = 0.10

[State 6300, VelSetX]
Type = VelSet
Trigger1 = Time >= 0
X = 0

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

[State 6300, 6]
type = ChangeState
trigger1 = Pos Y >= .1
value = 5110
ctrl = 1

;---------------------------------------------------------------------------
;USSJ Hit
[Statedef 6301]
type    = S
movetype= H
physics = N
velset = 0,0

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

[State 6301, 3]
type = SelfState
trigger1 = Time = 35
value = 5030

;-------------------------------------------------------------------------
;Strong Punch
[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1
ctrl = 0                         
anim = 200    

[state 200]
type = poweradd 
triggerall = var(5) != 1
triggerall = var(6) != 1
trigger1 = time = 0
value = 50

[state 200]
type = explod
trigger1 = time = 10
anim = 202 
superpause = 1
supermovetime = 99999
pausemovetime = 99999
sprpriority = 3  

[state 200]
type = projectile
triggerall = var(6) = 1
trigger1 = AnimElem = 2
projanim = 39939
attr = S, SA
animtype  = Hard
damage    = 100,10
velocity = 15 , 0
priority  = 5
guardflag = M
pausetime = 8,7
sparkno = s39949
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S300, 1
guardsound = S300, 1
palfx.time = 20
palfx.add = 255,10,10
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1    

[state 200]
type = explod
trigger1 = movecontact = 1
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1                                 

[State 200, VelSetY]
Type = VelSet
Trigger1 = Time = 0 
y = 0

[State 200, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA                     
damage    = 150, 10                 
animtype = Medium                 
getpower = 0                                               
givepower = 25                                                 
guardflag = MA                   
hitflag = MAP                    
priority = 3, Hit                
pausetime = 15,11                  
;sparkno = 0, 3                   
sparkxy = -10,-70                
hitsound = S200, 0                   
guardsound = S200, 0                
ground.type = Trip                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -3,-3.5        
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3                   
fall = 2                         
fall.recover = 0
p2stateno = 6001

[State 200, PosAddX]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

[State 200, VelSetY]
type = VelSet
trigger1 = Time = 0 
y = 0

[State 200, SwgSnd]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2
volume = 999

[state 200]
type = playsnd
trigger1 = time = 2
value = 0, 5 
volume = 999

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

;---------------------------------------------------------------------------
;Weak Punch
[Statedef 201]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                     
ctrl = 0                         
anim = 201   

[state 201]
type = poweradd 
triggerall = var(5) != 1
triggerall = var(6) != 1
trigger1 = time = 0
value = 50

[state 201]
type = explod
trigger1 = time = 10
anim = 203  
superpause = 1 
supermovetime = 99999
pausemovetime = 99999  
sprpriority = 3  

[state 201]
type = explod
trigger1 = movecontact = 1
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1     

[state 201]
type = projectile
triggerall = var(6) = 1
trigger1 = AnimElem = 2
projanim = 39939
attr = S, SA
animtype  = Hard
damage    = 100,10
velocity = 15 , 0
priority  = 5
guardflag = M
pausetime = 8,7
sparkno = s39949
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S300, 1
guardsound = S300, 1
palfx.time = 20
palfx.add = 255,10,10
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1    

[State 201, PosAdd]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

[State 201, VelSetY]
type = VelSet
trigger1 = Time = 0 
y = 0

[State 201, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA
animtype  = Hard
damage    = 100,10
priority  = 5
guardflag = M
pausetime = 8,7
sparkno = s19999
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S200, 0
guardsound = S200, 0
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1
p2stateno = 1012

[State 201, SwgSnd]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2
volume = 999

[state 201]
type = playsnd
trigger1 = time = 2
value = 0, 5 
volume = 999

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

;---------------------------------------------------------------------------
;Medium Punch
[Statedef 202]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                     
ctrl = 0                         
anim = 202 

[state 202]
type = poweradd 
triggerall = var(5) != 1
triggerall = var(6) != 1
trigger1 = time = 0
value = 50                     

[State 202, PosAdd]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

[State 202, VelSet]
type = VelSet
trigger1 = Time = 0 
y = 0

[state 202]
type = projectile
triggerall = var(6) = 1
trigger1 = AnimElem = 2
projanim = 39939
attr = S, SA
animtype  = Hard
damage    = 100,10
velocity = 15 , 0
priority  = 5
guardflag = M
pausetime = 8,7
sparkno = s39949
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S300, 1
guardsound = S300, 1
palfx.time = 20
palfx.add = 255,10,10
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1    

[state 202]
type = explod
trigger1 = movecontact = 1
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1

[State 202, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA                     
damage    = 220, 10                  
animtype = Medium                
getpower = 0                 
givepower = 20                 
guardflag = MA                   
hitflag = MA                    
priority = 3, Hit                
pausetime = 15,11                
numhits = 1  
sparkno = s19999   
guard.sparkno	= S29999                 
;sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = Trip                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -4,-3.5             
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3  
p2stateno = 6001        

[State 202, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2
volume = 999

[state 202]
type = playsnd
trigger1 = time = 2
value = 0, 5 
volume = 999

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

;---------------------------------------------------------------------------
;Medium Kick
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 210

[state 210]
type = poweradd 
triggerall = var(5) != 1
triggerall = var(6) != 1
trigger1 = time = 0
value = 50

[State 210, PosAddX]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 80
x = -2

[State 210, VelSetY]
type = VelSet
trigger1 = Time = 0 
y = 0

[state 210]
type = projectile
triggerall = var(6) = 1
trigger1 = AnimElem = 2
projanim = 39939
attr = S, SA
animtype  = Hard
damage    = 100,10
velocity = 15 , 0
priority  = 5
guardflag = M
pausetime = 8,7
sparkno = s39949
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S300, 1
guardsound = S300, 1
palfx.time = 20
palfx.add = 255,10,10
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1    

[state 210]
type = explod
trigger1 = movecontact = 1
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1

[State 210, PlaySnd]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
volume = 999

[state 210]
type = playsnd
trigger1 = time = 5
value = 0, 7 
volume = 999

[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 1
trigger2 = Var(5) != 0
attr = S, SA
animtype  = Medium
damage    = 120, 10
guardflag = MA
pausetime = 15,11
sparkxy = -10,-70
getpower = 0
givepower = 35
hitsound = S200, 0
guardsound = S200, 0
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3,-4.5
air.velocity = -2.2,-3.2
p2stateno = 6001

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

;---------------------------------------------------------------------------
;Weak Kick
[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 211

[state 211]
type = poweradd 
triggerall = var(5) != 1
triggerall = var(6) != 1
trigger1 = time = 0
value = 50

[State 211, PosAddX]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

[State 211, 0]
type = VelSet
trigger1 = animelem = 2 
x = 10

[state 211]
type = explod
trigger1 = movecontact = 1
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1

[State 211, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
volume = 999

[state 211]
type = projectile
triggerall = var(6) = 1
trigger1 = AnimElem = 2
projanim = 39939
attr = S, SA
animtype  = Hard
damage    = 100,10
velocity = 15 , 0
priority  = 5
guardflag = M
pausetime = 8,7
sparkno = s39949
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S300, 1
guardsound = S300, 1
palfx.time = 20
palfx.add = 255,10,10
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1    

[state 211]
type = playsnd
trigger1 = time = 5
value = 0, 7 
volume = 999

[State 211, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
attr = S, SA                     
damage    = 220, 10                   
animtype = Medium                
getpower = 0                 
givepower = 20                 
guardflag = MA                   
hitflag = MA                    
priority = 3, Hit                
pausetime = 15,11                
numhits = 1  
sparkno = s19999   
guard.sparkno	= S29999                 
;sparkxy = -10,-70                
hitsound = S200, 0                   
guardsound = S200, 0                
ground.type = Trip                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -4,-3.5             
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3  
p2stateno = 6001     

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

;---------------------------------------------------------------------------
;Strong Kick
[Statedef 212]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 212

[state 212]
type = poweradd 
triggerall = var(5) != 1
triggerall = var(6) != 1
trigger1 = time = 0
value = 50

[state 212]
type = explod
trigger1 = time = 25
anim = 204
supermovetime = 99999
pausemovetime = 99999
superpause = 1
sprpriority = 3

[State 212, 0]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 80
x = -2

[State 212, 0]
type = VelSet
trigger1 = Time = 0 
y = 0

[state 212]
type = projectile
triggerall = var(6) = 1
trigger1 = AnimElem = 2
projanim = 39939
attr = S, SA
animtype  = Hard
damage    = 100,10
velocity = 15 , 0
priority  = 5
guardflag = M
pausetime = 8,7
sparkno = s39949
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S300, 1
guardsound = S300, 1
palfx.time = 20
palfx.add = 255,10,10
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1    

[State 212, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
volume = 999

[state 212]
type = playsnd
trigger1 = time = 5
value = 0, 7 
volume = 999

[state 212]
type = explod
trigger1 = movecontact = 1
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1

[State 212, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger2 = Var(5) != 0
attr = S, SA
animtype  = Medium
damage    = 200, 10
hitflag = MAFP
guardflag = MA
pausetime = 15,11
sparkxy = -10,-70
getpower = 0
givepower = 30
hitsound = S200, 0
guardsound = S200, 0
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3,-4.5
air.velocity = -2.2,-3.2
p2stateno = 6001
fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
;Jump Kick
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 3
ctrl = 0
anim = 610

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
volume = 999

[state 610]
type = playsnd
trigger1 = time = 3
value = 0, 5
volume = 999

[state 610]
type = projectile
triggerall = var(6) = 1
trigger1 = AnimElem = 2
projanim = 39939
attr = S, SA
animtype  = Hard
damage    = 100,10
velocity = 15 , 0
priority  = 5
guardflag = M
pausetime = 8,7
sparkno = s39949
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S300, 1
guardsound = S300, 1
palfx.time = 20
palfx.add = 255,10,10
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1    

[state 610]
type = explod
trigger1 = movecontact = 1
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1

[state 610]
type = explod
trigger1 = animelem = 2
anim = 204
superpause = 1
supermovetime = 99999
pausemovetime = 99999
sprpriority = 3

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 120, 10
getpower  = 0
givepower = 40
guardflag = HA
animtype = Medium
pausetime = 11,11
sparkxy = -10,-51
hitsound = S200, 0
guardsound = S200, 0
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3,-4
air.velocity = -1.3,-3
p2stateno = 6001

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

;------------------------------------------------------------------------
dégage !!
[Statedef 1012]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1012, Anim]
type = ChangeAnim2
Trigger1 = Time >= 0
value = 1012

[State 1012, State]
type = ChangeState
Trigger1 = HitShakeOver = 1
value = 1013

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

[Statedef 1013]
type    = A
movetype= H
physics = N

[State 1013, Velocity]
type = HitVelSet
Trigger1 = Time = 0
x = 1
y = 1

[State 1013, Gravity]
type = VelAdd
Trigger1 = Time >= 0
y = .45

[State 1013, No scroll]
type = ScreenBound
Triggerall = Pos y < -15
Trigger1 = BackEdgeBodyDist < 65
Trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1013, Hit wall]
type = ChangeState
Triggerall = Pos y < -15
Trigger1 = BackEdgeBodyDist <= 20
Trigger2 = FrontEdgeBodyDist <= 20
value = 1014

[State 1013, Hit ground]
type = SelfState
Trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

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

[Statedef 1014]
type    = A
movetype= H
physics = N

[State 1014, Turn]
type = Turn
Trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1014, Pos]
type = PosAdd
Trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1014, Stop moving]
type = PosFreeze
Trigger1 = 1
x = 1
y = 1

[State 1014, No scroll]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 0,1

[State 1014, Spark]
type = Explod
Trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1014, Anim]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1014

[State 1014, Sound]
type = PlaySnd
Trigger1 = Time = 0
value = F7,0

[State 1014, State]
type = ChangeState
Trigger1 = AnimTime = 0
value = 1015

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

[Statedef 1015]
type    = A
movetype= H
physics = N

[State 1015, 1]
type = NotHitBy
Trigger1 = Time >= 0
value = , NA, NP

[State 1015, Vel Y]
type = VelSet
Trigger1 = Time = 0
y = -6

[State 1015, Vel X]
type = VelSet
Trigger1 = Time = 0
x = 1.6

[State 1015, Turn]
type = Turn
Trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1015, Gravity]
type = VelAdd
Trigger1 = Time >= 0
y = .35

[State 1015, Anim 5050]
type = ChangeAnim
Trigger1 = Time = 0
Trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1015, Anim 5052]
type = ChangeAnim
Trigger1 = Time = 0
Trigger1 = SelfAnimExist(5052)
value = 5052

[State 1015, Anim 5060]
type = ChangeAnim
Trigger1 = Vel Y > -2
Trigger1 = Anim = 5050
Trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1015, Anim 5062]
type = ChangeAnim
Trigger1 = Vel Y > -2
Trigger1 = Anim = 5052
Trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1015, Hit ground]
type = SelfState
Trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100


;---------------------------------------------------------------------------
;Instantaneous Movement
[Statedef 2001]
type    = S
movetype= I
physics = S
ctrl = 0
velset = (prevstateno = 9010)* 0,(prevstateno = 9010)* 0
facep2 = !(prevstateno = 9010)

[State 2001, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 2002
value = 2002

[State 2001, Pause1]
Type = SuperPause
trigger1 = Time = 0
MoveTime = 20
Time = 20
Pos = 11, -80
Darken = 0
anim = -1

[State 2001, Pause2]
Type = SuperPause
trigger1 = AnimTime = 0
MoveTime = 25
Time = 25
Pos = 11, -80
Darken = 0
anim = -1

[State 2001, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 2001, AfterImage]
type = AfterImage
trigger1 = AnimElem = 1
time = 20
trans = add
palfx = 200,200,200

[State 2001, TeleportFwd]
type = PosAdd
triggerall = AnimElem = 1
trigger1 = PalNo = [1, 6]
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger2 = PalNo = [7, 12]
x = 400
y = 0

[State 2001, TeleportBack]
type = PosAdd
triggerall = AnimElem = 1
trigger1 = PalNo = [1, 6]
trigger1 = command = "holdback"
trigger1 = command != "holdfwd"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger2 = PalNo = [7, 12]
x = -400
y = 0

[State 2001, TeleportUp]
type = PosAdd
triggerall = AnimElem = 1
trigger1 = PalNo = [1, 6]
trigger1 = command = "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
x = 0
y = -150


[State 2001, Turn]
type = Turn
trigger1 = P2Dist X < 0

[State 2001, 3]
type = Projectile
trigger1 = AnimElem = 1
projanim = 303
projremovetime = 10
projid = 303
velocity = 0
offset = 0

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

[State 2001, 7]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 1,1

[State 2001:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 2001:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 2001:	BGPalFX]
type			= BGPalFX
triggerall = p2name != "Broly 'le cauchemar' super saiyen nv3"
trigger1		= (AnimElem = 2)
time			= 12
add			= 20,20,20
mul			= 256,256,256
sinadd		= 200,200,200,4
invertall		= 1
color			= 256


;----------------------------------------------------------------------------------------
;Instantaneous Movement - Reappear Image
[Statedef 2003]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 2004
ctrl = 0
facep2 = 1

[State 2003, 0]
type = AfterImage
trigger1 = AnimElem = 1
time = 20
trans = add
palfx = 200,200,200

[State 2003:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300,0

[State 2003:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 2003:	BGPalFX]
type			= BGPalFX
triggerall = p2name != "Broly 'le cauchemar' super saiyen nv3" 
trigger1		= (AnimElem = 2)
time			= 12
add			= 20,20,20
mul			= 256,256,256
sinadd		= 200,200,200,4
invertall		= 1
color			= 256

[State 2003, 2]
type = Projectile
trigger1 = Time = AnimElem = 1
projanim = 303
projremovetime = 10
velocity = 0
offset = 0

[State 2003, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;-----------------------------------------------------------------------------
;insulte
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S

[State 195, 1]
type = CtrlSet
trigger1 = Time = 40
value = 1

[state 195]
type = playsnd
trigger1 = time = 0
value = 0, 4
volume = 999

[State 195, 2]
type = ChangeState
trigger1 = Time = 80
value = 0
ctrl = 1

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

[State -2, 1]
type = PlaySnd
trigger1 = Time = 2
trigger1 = stateno = 5070
trigger1 = alive = 1
value = 5,12

;-----------------------------------------------------------------------------
contreattaque
[Statedef 10000]
type    = S
movetype= I
physics = S
ctrl = 0
velset = (prevstateno = 9010)* 0,(prevstateno = 9010)* 0
facep2 = !(prevstateno = 9010)

[State 10000, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 2002
value = 2002

[State 10000, Pause1]
Type = SuperPause
trigger1 = Time = 0
MoveTime = 20
Time = 20
Pos = 11, -80
Darken = 0

[State 10000, Pause2]
Type = SuperPause
trigger1 = AnimTime = 0
MoveTime = 25
Time = 25
Pos = 11, -80
Darken = 0

[State 10000, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 10000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 1
time = 20
trans = add
palfx = 200,200,200


[State 10000, Turn]
type = Turn
trigger1 = P2Dist X < 0

[State 10000, 3]
type = Projectile
trigger1 = AnimElem = 1
projanim = 303
projremovetime = 10
projid = 303
velocity = 0
offset = 0

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

[State 10000, 7]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 1,1

[State 10000:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 10000:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 10000:	BGPalFX]
type			= BGPalFX
trigger1		= (AnimElem = 2)
time			= 12
add			= 20,20,20
mul			= 256,256,256
sinadd		= 200,200,200,4
invertall		= 1
color			= 256


;----------------------------------------------------------------------------------------
;Instantaneous Movement - Reappear Image
[Statedef 10001]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 2004
ctrl = 0
facep2 = 1

[State 10001, 0]
type = AfterImage
trigger1 = AnimElem = 1
time = 20
trans = add
palfx = 200,200,200

[State 10001:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300,0

[State 10001:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 10001:	BGPalFX]
type			= BGPalFX
trigger1		= (AnimElem = 2)
time			= 12
add			= 20,20,20
mul			= 256,256,256
sinadd		= 200,200,200,4
invertall		= 1
color			= 256

[State 10001, 2]
type = Projectile
trigger1 = Time = AnimElem = 1
projanim = 303
projremovetime = 10
velocity = 0
offset = 0

[State 10001, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 10002
ctrl = 1

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

[Statedef 10002]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 200
ctrl = 0
anim = 10000

[State 10002, PosAddX]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

[State 10002, 0]
type = VelSet
trigger1 = animelem = 1 
x = -30

[State 10002, 0]
type = VelSet
trigger1 = animelem = 2 
x = 60

[State 10002, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
volume = 999

[state 10002]
type = playsnd
trigger1 = time = 5
value = 0, 7 
volume = 999

[State 10002, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 100
hitflag = MAD
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
getpower = 0
givepower = 30
hitsound = S200, 0
guardsound = S200, 0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2
fall = 2                        
fall.recover = 0
p2stateno = 6001

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

;------------------------------------------------------------------------------
[Statedef 10003]
type    = S
movetype= I
physics = S
ctrl = 0
velset = (prevstateno = 9010)* 0,(prevstateno = 9010)* 0
facep2 = !(prevstateno = 9010)

[State 10003, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 2002
value = 2002

[State 10003, Pause1]
Type = SuperPause
trigger1 = Time = 0
MoveTime = 20
Time = 20
Pos = 11, -80
Darken = 0

[State 10003, Pause2]
Type = SuperPause
trigger1 = AnimTime = 0
MoveTime = 25
Time = 25
Pos = 11, -80
Darken = 0

[State 10003, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 10003, TeleportFwd]
type = PosAdd
trigger1 = AnimElem = 1
x = p2bodydist x + 85    
y = p2bodydist y - 35

[state 10003]
type = PosAdd
triggerall = AnimElem = 1
trigger1 = PalNo = [1, 6]
y = -70

[State 10003, Turn]
type = Turn
trigger1 = P2Dist X < 0

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

[State 10003, 7]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 1,1

[State 10003:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 10003:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 10003:	BGPalFX]
type			= BGPalFX
trigger1		= (AnimElem = 2)
time			= 12
add			= 20,20,20
mul			= 256,256,256
sinadd		= 200,200,200,4
invertall		= 1
color			= 256


;----------------------------------------------------------------------------------
;Instantaneous Movement - Reappear Image
[Statedef 10004]
type    = S
movetype= I
physics = S
velset = 0,0
anim = -1
ctrl = 0
facep2 = 1

[State 10004:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300,0

[State 10004:	PlaySnd]
type			= PlaySnd
trigger1		= (AnimElem = 2)
value			= 300 , 0

[State 10004:	BGPalFX]
type			= BGPalFX
trigger1		= (AnimElem = 2)
time			= 12
add			= 20,20,20
mul			= 256,256,256
sinadd		= 200,200,200,4
invertall		= 1
color			= 256


[State 10004, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 10005
ctrl = 1

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

[statedef 10005]
type    = A
movetype= A
physics = A
juggle  = 3
ctrl = 0
anim = 620

[state 10005]
type = superpause
trigger1 = animelem = 1
time = 60
anim = -1

[state 10005]
type = velset
trigger1 = animelem = 2
y = 10

[State 10005, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
volume = 999

[state 10005]
type = playsnd
trigger1 = time = 3
value = 0, 5
volume = 999

[State 10005, 4]
type = ChangeState
trigger1 = animelem = 2
value = 10006
ctrl = 0

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

[Statedef 10006]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1
poweradd = 200
ctrl = 0                         
anim = 630   

[state 10006]
type = superpause
trigger1 = time = 11
anim = -1
darken = 0
time = 20 

[state 10006]
type = explod
trigger1 = animelem = 2
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1

[state 10006]
type = velset
trigger1 = animelem = 1
y = 10.4
x = 0   

[state 10006]
type = velset
trigger1 = animelem = 2
y = 0
x = 0                                

[State 10006, HitDef]
type = HitDef
trigger1 = AnimElem = 1
trigger2 = animelem = 2
attr = S, HA
animtype  = Back
damage    = 200
guardflag = MA
pausetime = 2,11
getpower = 0
givepower = 0
sparkno = 1091
sparkxy = -10,-60
hitsound   = S200,0
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 25
ground.velocity = -4,-5
fall = 2
fall.recover = 0
air.velocity = -4,-5
air.fall = 1
air.recover = 0

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

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

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

[State 10195, 1]
type = CtrlSet
trigger1 = Time = 40
value = 1

[state 10195]
type = playsnd
trigger1 = time = 0
value = 0, 4
volume = 999

[State 10195, 2]
type = ChangeState
trigger1 = Time = 80
value = 0
ctrl = 1

[state 10195]
type = ChangeState
trigger1 = time = 0
trigger1 = Pos Y < 0
value = 50

;--------------------------------------------------------------------------------------
;v.s himan
[statedef 10191]
type = S
ctrl = 0
anim = 0

[State 191:		AssertSpecial]
type			= AssertSpecial
trigger1		= (Time < 700)
flag			= Intro
flag2			= NoBarDisplay
flag3			= nomusic

;--------------------------------------------------------------------------------------
;MAGIE

;----------------------------------------------------------------------------------------------
;Rock
[StateDef 900]
type = A
physics = N
movetype = A
anim = 1000
poweradd = -1000
velset = 0,0
ctrl = 0

[State 900]
type = Helper
trigger1 = AnimElem = 2,0
name = "BigRock"
stateno = 901
pos = 80,-200
keyctrl = 0
ownpal = 1
id = 901

[State 900]
type = ChangeState
trigger1 = AnimElem = 5,>=16
value = 0
ctrl = 1

;---------------------------------
;Big Rock
[StateDef 901]
type = A
physics = N
movetype = A
velset = 8,12
anim = 900
ctrl = 0

[State 901]
type = PlaySnd
trigger1 = Time = 0
value = 4100,1
channel = 1

[State 901]
type = HitDef
trigger1 = !MoveContact
attr = A,SP
damage = 300,10
hitflag = MADFP
guardflag = MA
sparkno = -1
hitsound = 5,4
pausetime = 0,4
animtype = Hard
ground.type = High
ground.velocity = 4,-2
ground.hittime = 12
air.type = Low
air.velocity = 3,0.1
fall = 1

[State 901]
type = Sprpriority 
trigger1 = 1
value = 3

[State 901]
type = AngleAdd
trigger1 = 1
value = 4

[State 901]
type = AngleDraw
trigger1 = 1

[State 901]
type = PalFx
trigger1 = 1
time = 1
add = Time,0,0

[State 901]
type = ChangeState
trigger1 = Pos Y >= -50
value = 902
ctrl = 0

;---------------------------------
;Big Rock Break
[StateDef 902]
type = A
physics = N
movetype = A
velset = 0,0
anim = 20000
ctrl = 0

[State 902]
type = PlaySnd
trigger1 = Time = 0
value = 900,0
channel = 1

[State 902]
type = EnvShake
trigger1 = Time = 0
time = 12

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

[State 902]
type = Explod
trigger1 = Time = 0
removetime = 16
anim = 903
pos = Random/5.0-100,0
sprpriority = 2
ownpal = 1
scale = 2,3

[State 902]
type = Explod
trigger1 = Time = 0
removetime = 16
anim = 903
pos = Random/5.0-100,0
sprpriority = 2
ownpal = 1
scale = 2,3

[State 902]
type = Explod
trigger1 = Time = 0
removetime = 16
anim = 903
pos = Random/5.0-100,0
sprpriority = 2
ownpal = 1
scale = 2,3

[State 902]
type = Explod
trigger1 = Time = 0
removetime = 16
anim = 903
pos = -200,0
sprpriority = 2
ownpal = 1
scale = 2,3

[State 902]
type = Explod
trigger1 = Time = 0
removetime = 16
anim = 903
pos = Random/5.0-100,0
sprpriority = 2
ownpal = 1
scale = 2,3

[State 902]
type = Helper
trigger1 = Time = 0
name = "SmallRock"
stateno = 903
pos = 50,50
keyctrl = 0
ownpal = 1

[State 902]
type = Helper
trigger1 = Time = 0
name = "SmallRock"
stateno = 903
pos = 50,-50
keyctrl = 0
ownpal = 1

[State 902]
type = Helper
trigger1 = Time = 0
name = "SmallRock"
stateno = 903
pos = -50,50
keyctrl = 0
ownpal = 1

[State 902]
type = Helper
trigger1 = Time = 0
name = "SmallRock"
stateno = 903
pos = -50,-50
keyctrl = 0
ownpal = 1

[State 902]
type = DestroySelf
trigger1 = Time = 60


;---------------------------------
;Small Rock
[StateDef 903]
type = A
physics = N
movetype = A
velset = Random/100.0-5,-Random/60.0
anim = 901
ctrl = 0

[State 903]
type = HitDef
trigger1 = !MoveContact
attr = A,SP
damage = 100,5
hitflag = MADFP
guardflag = MA
sparkno = -1
pausetime = 0,4
animtype = Light
ground.type = High
ground.velocity = 4,0
ground.hittime = 12
air.type = Low
air.velocity = 3,-1

[State 903]
type = VelAdd
trigger1 = 1
y = 0.46

[State 903]
type = AngleAdd
trigger1 = 1
value = 8

[State 903]
type = AngleDraw
trigger1 = 1

[State 903]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 902
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 903]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 902
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 903]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 902
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 903]
type = PlaySnd
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
value = 900,0
channel = 1

[State 903]
type = DestroySelf
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact

;--------------------------------------------------------------------------------------
;cheval pale
[StateDef 1100]
type    = S
movetype= A
physics = S
velset = 0,0,0
poweradd = -1000
juggle = 0
ctrl = 0
anim = 914

[state 1100]
type = superpause
trigger1 = time = 10
darken = 0
time = 250
anim = -1

[State 1100, envshake]
type = EnvShake
trigger1 = Time = 10
time = 300

[State 1100, Final-Flash]
type = PlaySnd
trigger1 = time = 0
value = 5150,1
volume= 5000

[State 1100, Final-Flash]
type = PlaySnd
trigger1 = time = 21
value = 5150,0
volume= 5000

[State 1100, end]
type = ChangeState
trigger1 = Time = 100
value = 0
ctrl = 1

[State 1100, ball]
type = Explod
trigger1 = Time = 1
anim = 913
pos = 0,-0
bindtime = -1
sprpriority = 4
removetime = 250
supermove = 1

[State 1100, p1Effect]
type = Explod
trigger1 = time = [11,90]
anim = 910
pos = 35,-40
bindtime = -1
sprpriority = 2

[State 1100, 3]
type = HitDef
trigger1 = timemod = 1,0
trigger1 = time = [20,100]
attr = S, NA
projhits = 2
animtype  = Hard
damage = 5,0
pausetime = 0,0
sparkno = s555
sparkxy = -10,-60
hitsound   = -1
guardsound = -1
ground.type = High
ground.slidetime = 0
ground.hittime  = 0
ground.velocity = 0
air.velocity = 0

[State 1100, 3]
type = HitDef
trigger1 = time = 99
attr = S, NA
projhits = 2
animtype  = Hard
damage = 5,0
pausetime = 0,0
sparkno = s555
sparkxy = -10,-60
hitsound   = -1
guardsound = -1
ground.type = High
ground.slidetime = 0
ground.hittime  = 0
ground.velocity = 0
air.velocity = 0
p2stateno = 1012

;--------------------------------------------------------------------------------------
;Clock
[StateDef 1200]
type = A
physics = N
movetype = I
anim = 1200
poweradd = -2000
ctrl = 0

[State 1200]
type = PlaySnd
trigger1 = Time = 0
value = 4100,3
channel = 1

[State 1200]
type = PosSet
trigger1 = 1
x = 0
y = -120

[State 1200]
type = AssertSpecial
trigger1 = Time <= 15
flag = invisible

[State 1200]
type = Explod
trigger1 = Time = 0
anim = 1200
bindtime = -1
scale = 0,0
sprpriority = 2
id = 1201

[State 1200]
type = Sprpriority
trigger1 = 1
value = 2

[State 1200]
type = ModifyExplod
trigger1 = Time <= 15
id = 1201
scale = Time/15.0,Time/15.0

[State 1200]
type = RemoveExplod 
trigger1 = Time = 16
id = 1201

[State 1200]
type = Helper
trigger1 = Time = 16
name = "Time"
stateno = 1201
keyctrl = 0

[State 1200]
type = Helper
trigger1 = Time = 16
name = "Time"
stateno = 1202
keyctrl = 0

[State 1200]
type= PalFX
trigger1 = Time = [105,120]
time = 2
add = -255*(Time-105)/15.0,-255*(Time-105)/15.0,-255*(Time-105)/15.0

[State 1200]
type = DestroySelf
trigger1 = Time >= 120

;---------------------------------
;Time
[StateDef 1201]
type = A 
physics = N
movetype = I
anim = 1201
sprpriority = 3

[State 1201]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,0

[State 1201]
type = AngleSet
trigger1 = 1
value = Time/105.0*360

[State 1201]
type = AngleDraw
trigger1 = 1

[State 1201]
type = DestroySelf
trigger1 = Time >= 105

;---------------------------------
;Time
[StateDef 1202]
type = A 
physics = N
movetype = I
anim = 1202
sprpriority = 4

[State 1202]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,0

[State 1202]
type = AngleAdd
trigger1 = 1
value = 1/105.0*30

[State 1202]
type = AngleDraw
trigger1 = 1

[State 1202]
type = DestroySelf
trigger1 = Time >= 105

;----------------------------------------------------------------------------------------------
;Elf
[StateDef 1300]
type = A
physics = N
movetype = I
anim = 20000
poweradd =-5

[State 1300]
type = PlaySnd
trigger1 = Time = 0
value = 1000,0
channel = 1

[State 1300]
type = Explod
trigger1 = 1
removetime = Time < 180
anim = 1300
scale = exp(0.5*ln((180.0-Time)/180.0)),exp(0.5*ln((180.0-Time)/180.0))

[State 1300]
type = Explod
trigger1 = Time = 0
removetime = 52
anim = 403
pos = 0,-80
velocity = Random/100.0-5,Random/100.0-5
ownpal = 1
sprpriority = 2

[State 1300]
type = Explod
trigger1 = Time = 0
removetime = 52
anim = 403
pos = 0,-80
velocity = Random/100.0-5,Random/100.0-5
ownpal = 1
sprpriority = 2

[State 1300]
type = Explod
trigger1 = Time = 0
removetime = 52
anim = 403
pos = 0,-80
velocity = Random/100.0-5,Random/100.0-5
ownpal = 1
sprpriority = 2

[State 1300]
type = Explod
trigger1 = Random = [0,50]
removetime = 32
anim = 402
pos = -Random/50,Random/50
velocity = 0,0.7
ownpal = 1
sprpriority = 2
scale = exp(0.5*ln((180.0-Time)/180.0)),exp(0.5*ln((180.0-Time)/180.0))

[State 1300]
type = Explod
trigger1 = Random = [0,50]
removetime = 52
anim = 403
pos = -Random/50,Random/50
velocity = 0,0.7
ownpal = 1
sprpriority = 2
scale = exp(0.5*ln((180.0-Time)/180.0)),exp(0.5*ln((180.0-Time)/180.0))

[State 1300]
type = Turn
trigger1 = P2Dist X < 0

[State 1300]
type = VelAdd
trigger1 = 1
x = P2BodyDist X/400.0
y = P2BodyDist Y/400.0

[State 1300]
type = DestroySelf
trigger1 = Time >= 180

;------------------------------------------------------------------------------
;proctection de foudre
[statedef 3600]
type = A
physics = N
movetype = A
velset = 0,0
poweradd = -500
anim = 3000
ctrl = 0

[state 3600]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 3600]
type = explod
trigger1 = time = 0
sprpriority = 2
anim = 4201
removetime = 80

[State 3600]
type = PlaySnd
trigger1 = Time = 0
value = 3000,0
channel = 1

[State 3600]
type = ChangeAnim
trigger1 = Time = 60
value = 3998

[state 3600]
type = explod
trigger1 = time = 65
anim = 500
sprpriority = 3
removetime = 50
pos = -15 ,0

[state 3600]
type = playsnd
trigger1 = time = 65
value = 3100 , 1
volume = 999

[state 3600]
type = Helper
trigger1 = time = 70
name = "foudre1"
stateno = 3601
ownpal = 1
keyctrl = 0
id = 2

[state 3600]
type = varset
trigger1 = time = 70
var(5) = 1

[state 3600]
type = changestate
trigger1 = time = 120
value = 0
ctrl = 1

;------------------------------------------------------------------------------
;foudre1
[StateDef 3601]
type = A
physics = N
movetype = I
velset = 0,0
anim = 3999
ctrl = 0

[State 3601]
type = PlaySnd
trigger1 = Time = 0
value = 3100, 1
channel = 1

[State 3601]
type = Turn
trigger1 = Facing != Parent, Facing

[State 3601]
type = Sprpriority
trigger1 = 1
value = 3

[State 3601]
type = BindToParent
trigger1 = 1
time = 1
pos = 80,-100

[State 3601]
type = PlaySnd
trigger1 = Parent, StateNo = 5000
trigger1 = Parent, Time = 1
value = 4000,0
channel = 2

[state 3601]
type = HitOverride
trigger1 = Alive = 1
trigger2 = Time >= 0
attr = SCA, NA, SA, HA, NP, HP, SP, AA, AT, AP
slot = 0
stateno = 3601

[State 3601]
type = Explod
triggerall = alive = 1
trigger1 = Parent, StateNo = 5000
trigger1 = Parent, Time = 1
ignorehitpause = 1
removetime = 6
anim = 3999
pos = 0,0
ownpal = 1
sprpriority = 3

[State 3601]
type = PowerAdd
trigger1 = Parent, StateNo = 5000
trigger1 = Parent, Time = 1
ignorehitpause = 1
value = -200

[State 3601, LowDefence]
type = DefenceMulSet
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
value = -0

[state 3601]
type = projectile
triggerall = NumPROJID(9977) = 0 
trigger1 = Timemod = 5,0
PROJID = 9977
PROJanim = 4999
postype = p1
sprpriority = 2
BINDTIME = -1
ownpal = 1
persistent = 1
projremovetime = 12
projcanceltime = 12 
PROJREMOVanim = -1
attr = SCA, NP 
damage = 3, 1
animtype = Light
guardflag = MA 
hitflag = MA;F 
priority = 3, Hit 
pausetime = 2,2
sparkno = -1
sparkxy = 0,0
hitsound =   s3100,0
guardsound = s3100,0
pausetime = 8,7
sparkno = s19999
guard.sparkno	= S29999
;sparkxy = -10,-60
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1
palfx.time = 20
palfx.add = 40,0,200 
palfx.mul = 250,224,120 
palfx.sinadd = 110,55,85,10
Palfx.color = 0 
palfx.invertall = 1 
bindtime = -1
air.recovery = 0
p2stateno = 1012

[state 3601]
type = poweradd 
trigger1 = timemod = 15,0
value = -50

[State 3601]
type = DestroySelf
trigger1 = power < 100

[State 3601]
type = DestroySelf
trigger1 = parent,stateno = 180

;-----------------------------------------------------------------------------
masamune emflamée
[statedef 3700]
type = A
physics = N
movetype = A
velset = 0,0
poweradd = -300
anim = 3000
ctrl = 0

[state 3700]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 3700]
type = playsnd
trigger1 = time = 71
value = 3300, 0
volume = 255

[state 3700]
type = explod
trigger1 = time = 0
sprpriority = 2
anim = 4201
removetime = 80

[state 3700]
type = explod
trigger1 = time = 71
sprpriority = 3
bindtime = -1
ownpal = 1
anim = 3994
removetime = 25

[State 3700]
type = PlaySnd
trigger1 = Time = 0
value = 3000,0
channel = 1

[State 3700]
type = ChangeAnim
trigger1 = Time = 60
value = 3998

[state 3700]
type = varset
trigger1 = time = 70
var(6) = 1

[state 3700]
type = changestate
trigger1 = time = 120
value = 0
ctrl = 1

;-----------------------------------------------------------------------------
sephi surf sur météore !
[statedef 3800]
type = A
physics = N
movetype = A
velset = 0,0
poweradd = -1000
anim = 3000
ctrl = 0

[state 3800]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 3800]
type = explod
trigger1 = time = 0
sprpriority = 2
anim = 4201
removetime = 80

[State 3800]
type = PlaySnd
trigger1 = Time = 0
value = 3000,0
channel = 1

[State 3800]
type = ChangeAnim
trigger1 = Time = 70
value = 41

[state 3800]
type = playsnd
trigger1 = time = 71
value = 4100 , 0

[state 3800]
type = velset
trigger1 = time = 71
x = -3 
y = -20

[state 3800]
type = changeanim
trigger1 = time = 95
value = 40000

[state 3800]
type = velset
trigger1 = time = 96
x = 6 
y = 12

[state 3800]
type = HitDef
trigger1 = !movecontact
attr = S, SA
animtype  = Hard
damage    = 300,10
priority  = 5
guardflag = M
pausetime = 1,1
sparkno = s19999
guard.sparkno	= S29999
;sparkxy = -10,-60
getpower = 0
givepower = 80
hitsound = S5150, 0
guardsound = S5150, 0
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -20,-7
air.velocity = -20,-7
guard.velocity = -8
airguard.velocity =-5,-3.5
fall = 1

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 901
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 901
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 901
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 902
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 902
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 902
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 60
anim = 902
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
ownpal = 1

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 16
anim = 903
pos = Random/5.0-100,0
sprpriority = 2
ownpal = 1
scale = 2,3

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 16
anim = 903
pos = Random/5.0-100,0
sprpriority = 2
ownpal = 1
scale = 2,3

[State 3800]
type = Explod
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = MoveContact
removetime = 16
anim = 903
pos = Random/5.0-100,0
sprpriority = 2
ownpal = 1
scale = 2,3

[state 3800] 
type = EnvShake
trigger1 = time = 120
trigger2 = pos Y > 0
time = 80
ampl = 8
freq = 127

[state 3800]
type = playsnd
trigger1 = pos Y > 0
value = 1100 , 0

[state 3800]
type = ChangeState
trigger1 = Pos Y > 0
value = 40

;-----------------------------------------------------------------------------
;glace paralysante
[StateDef 4400]
type = A
physics = N
movetype = A
velset = 0,0
poweradd = -1000
anim = 3000
ctrl = 0

[state 4400]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 4400]
type = explod
trigger1 = time = 0
sprpriority = 2
anim = 4201
removetime = 80

[State 4400]
type = PlaySnd
trigger1 = Time = 0
value = 3000,0
channel = 1

[State 4400]
type = Helper
trigger1 = time = 65
name = "Ice"
pos = 80,-100
stateno = 4401
keyctrl = 0
ownpal = 1
id = 401

[State 4400]
type = ChangeAnim
trigger1 = Time = 60
value = 3001

[State 3100]
type = ChangeState
trigger1 = Anim = 3001
trigger1 = AnimElem = 3,>= 30
value = 0
ctrl = 1

;---------------------------------------
;Ice
[StateDef 4401]
type = A
physics = N
movetype = A
velset = 0,0
anim = 400

[State 4401]
type = PlaySnd
trigger1 = Time = 0
value = 400,0
channel = 1

[State 4401]
type = projectile
trigger1 = time = 20
trigger1 = !MoveContact
projanim = 8500
attr = A,NP
damage = 0,0
getpower = 0
givepower = 50
velocity = 15, 0
hitflag = MAP
guardflag = MA
sparkxy = 0,0
pausetime = 0,200
guard.pausetime = 0,0
animtype = Medium
ground.velocity = 0,0
ground.type = Low
ground.hittime = 4
ground.slidetime = 4
air.velocity = 0,0
air.type = Low
palfx.time = 60
palfx.add = 45,57,100
palfx.color = 0
palfx.invertall = 1
p1stateno = 11002

[State 4401]
type = hitdef
trigger1 = Time >= 16
trigger1 = !MoveContact
attr = A,NP
damage = 100,5
getpower = 0
givepower = 50
hitflag = MAP
guardflag = MA
sparkxy = 0,0
pausetime = 0,200
guard.pausetime = 0,0
animtype = Medium
ground.velocity = 0,0
ground.type = Low
ground.hittime = 4
ground.slidetime = 4
air.velocity = 0,0
air.type = Low
palfx.time = 200
palfx.add = 45,57,100
palfx.color = 0
palfx.invertall = 1
p1stateno = 4402

[State 4401]
type = AssertSpecial
trigger1 = Time = [0,16]
flag = invisible

[State 4401]
type = Explod
trigger1 = Time = [0,16]
removetime = 1
anim = 400
sprpriority = 2
scale = Time/16.0,Time/16.0

[State 4401]
type = Explod
trigger1 = Random = [0,167]
removetime = 32
pos = Random/80-6,Random/10-50
anim = 402
sprpriority = 2

[State 4401]
type = Explod
trigger1 = Time = 24
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

[State 4401]
type = Explod
trigger1 = Time = 24
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

[State 4401]
type = Explod
trigger1 = Time = 24
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

[State 4401]
type = DestroySelf
trigger1 = Time >= 24

;---------------------------------------
;Ice Break
[StateDef 4402]
type = A
physics = N
movetype = I
velset = 0,0
anim = 20000

[State 4402]
type = Explod
trigger1 = 1
removetime = 1
anim = 400
scale = IfElse(Time<8,1+Time/16.0,1.5),IfElse(Time<8,1+Time/16.0,1.5)
sprpriority = 2

[State 4402]
type = Explod
trigger1 = Time = 0
anim = 403
sprpriority = 2

[State 4402]
type = Explod
trigger1 = Time = 60
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

[State 4402]
type = Explod
trigger1 = Time = 60
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

[State 4402]
type = Explod
trigger1 = Time = 60
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

[State 4402]
type = DestroySelf
trigger1 = Time = 60

;--------------------------------------------------------------------------
[Statedef 11002]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 200
ctrl = 0
anim = 201

[State 11002, PosAddX]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

[State 11002, 0]
type = VelSet
trigger1 = animelem = 1 
x = -30

[State 11002, 0]
type = VelSet
trigger1 = animelem = 2 
x = 60

[State 11002, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
volume = 999

[state 11002]
type = playsnd
trigger1 = time = 5
value = 0, 7 
volume = 999

[State 11002, 2]
type = HitDef
triggerall = p2life != 100 
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 200
hitflag = MAD
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
getpower = 0
givepower = 30
hitsound = S200, 0
guardsound = S200, 0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2
fall = 2                        
fall.recover = 0
p2stateno = 6001

[State 11002, 2]
type = projectile
triggerall = p2life <= 100
trigger1 = time = 5
projanim = 20001
attr = S, NA
animtype  = heavy
damage    = 200
hitflag = MAD
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
getpower = 0
givepower = 30
hitsound = S0, 23
guardsound = S0, 23
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2
fall = 2                        
fall.recover = 0
p2stateno = 7550

[state 11002]
type = playsnd
trigger1 = time = 15
value = 0, 24
volume = 999

[State 11002]
type = Explod
trigger1 = Time = 24
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

[State 11002]
type = Explod
trigger1 = Time = 24
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

[State 11002]
type = Explod
trigger1 = Time = 24
removetime = 30
anim = 401
pos = 0,0
velocity = Random/100-5, Random/100.0-10
accel = 0,0.46
sprpriority = 2

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

;----------------------------------------------------------------------------
[Statedef 7550]
type = S
movetype = H
SprPriority = 4
velset = 0
ctrl = 0

[state 7550,anim]
type = velset
trigger1 = time = 0
x = 0
y = 0

[state 7550,anim]
type = changeanim
trigger1 = time = 0
value = 5010

[state 7550,life]
type = posset
trigger1 = time = 1
y = 9999

[state 7550,life]
type = lifeadd
trigger1 = time = 1
value = -9999999

[state 7550,some]
type = SprPriority
trigger1 = time >= 1
value = -5

[state 7550,some]
type = changeanim
trigger1 = NumExplod(7500) = 0
trigger1 = time = 10
value = 5050

[State 7550, 2]
type = SelfState
trigger1 = life = 0
trigger2 = time = 1
value = 5150

[state 7550,some]
type = selfstate
trigger1 = time = 12
value = 50

;--------------------------------------------------------------------------------------
;AUTRES

;----------------------------------------------------------------------------------------------
;Steal Magic
[StateDef 1040]
type = A
physics = N
movetype = A
anim = 4200
velset = 0,0

[State 1040]
type = PlaySnd
trigger1 = Time = 0
value = 0, 3
volume = 999

[state 1040]
type = explod
trigger1 = time = 0
anim = 4202
bindtime = -1
sprpriority = 2
removetime = 120

[State 1040]
type = Projectile
trigger1 = Time = 0
projremovetime = 60
projanim = 602
projremove = 0
projhits = 1
attr = A,SP
damage = 0,0
getpower = 500
givepower = -500
hitflag = MAFD
guardflag =
sparkno = -1 
projid = 4201

[State 1040]
type = Explod
trigger1 = ProjHit4201 = 1
removetime = 60
anim = 2000
pos = 0,0
velocity = 0,-1
facing = Facing
sprpriority = 3

[State 1040]
type = Explod
trigger1 = ProjHit4201 = 1
removetime = 60
anim = 2001
postype = P2
pos = 0,-50
facing = -Facing
velocity = 0,1
sprpriority = 3

[state 1040]
type = lifeadd
trigger1 = timemod = 5,0
value = 3

[State 1040]
type = ChangeState
trigger1 = Time = 120
value = 0
ctrl = 1

;-----------------------------------------------------------------------------
;charge sur enemi
[Statedef 1080]
Type    = S
movetype= A
physics = N
anim = 1085
velset = 0,0
ctrl = 0

[state 1080]
type = playsnd
trigger1 = time = 2
value = 0 , 10
volume = 255

[state 1080]
type = playsnd
trigger1 = time = 2
value = 0, 6 
volume = 999

[State 1080, NotHitBy]
Type = NotHitBy
Trigger1 = Time = 0
Value = SCA
Time = 50

[State 1080, 0]
Type = VelSet
Trigger1 = Time = 0 
y = 0

[State 1080, 0]
Type = VelSet
Trigger1 = AnimElem = 2 
x = 35

[State 1080, HitDef]
type = HitDef
trigger1 = AnimElem = 2
Attr = S, HA   
Damage = 50,50   
AnimType = Hard   
getpower = 0                                             
givepower = 25 
guardflag = M    
hitflag = MAFD      
priority = 3, Hit 
pausetime = 10,20
sparkxy = -10,-70    
hitsound = S20, 0 
guardsound = S20, 3    
ground.type = High
ground.slidetime = 12 
ground.hittime  = 15
ground.velocity = -3        
air.velocity = -1.3,-3
p1stateno = 1081
p2stateno = 6001

[State 1080, MoveGuarded]
type = ChangeState
trigger1 = MoveGuarded = 1
trigger1 = AnimTime = 0
value = 2001

[State 1080, NoContact]
type = ChangeState
trigger1 = MoveContact = 0
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 1080, End]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = FrontEdgeBodyDist < 10
value = 0
ctrl = 1

;----------------------------------------------------------------------------------
; Omni-Slash
[Statedef 1081]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd = -3000
ctrl = 0
anim = 1080

[state 1081]
type = attackmulset
triggerall = p2name = "Broly 'le cauchemar' super saiyen nv3"
trigger1 = p2life < 550
value = 5

[state 1081]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 1081]
type = Explod
trigger1 = AnimElem = 1
anim = 9101
pos = -320,0
postype = right
sprpriority = -2
supermove = 1
removetime = 74
ignorehitpause = 1
bindtime = -1
persistent = 0

[State 1081]
type = ModifyExplod
trigger1 = Time = 0
id = 4202
add = 128, 6, 6
removetime = 80

[state 1081]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = 2
pos = -8
anim = 1081
removetime = 80

[state 1081]
type = explod
trigger1 = time = 0
supermove = 1
pos = -81,-97
sprpriority = 2
anim = 1082

[State 1081,Spark]
type = posfreeze
trigger1 = time = 1
trigger1 = time >= 1
trigger1 = time <= 26

[state 1081, tishok]
type = explod
trigger1 = time = 0
trigger1 = pos Y >= 0
anim = F61
pos = -3,0
postype = P1
ownpal = 1
sprpriority = -1
removetime = 12
bindtime = -1

[State 1081,flash1]
type = explod
Trigger1 = time = 10
anim = 4203
postype = left
ownpal = 1
superpause = 1
ontop = 1
removetime = 224

[State 1081, 1]
type = Envcolor
trigger1 = Time = 0
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 74
under = 1
supermove = 1

[State 1081, 1]
type = SuperPause
trigger1 = Time = 0
pos = 0, 0
anim = -1
Time = 74

[state 1081,2]
type = superpause
trigger1 = animelem = 38
pos = 0, 0
anim = -1
time = 150

[state 1081]
type = explod
trigger1 = animelem = 38
bindtime = -1
supermove = 1
pos = -180,-69
sprpriority = 2
anim = 1082

[state 1081,image]
type = Explod
trigger1 = time = 1
ownpal = 1
anim = 8000
pos = -320, 0
postype = right
sprpriority = -6
supermove = 1
removetime = 400
ignorehitpause = 1
bindtime = -1
persistent = 0

[state 1081,3]
type = playsnd
trigger1 = animelem =38
value =3400, 1

[State 1081, 2]
type = PlaySnd
trigger1 = Time = 0
value = 4000, 1 
volume = 255

[State 1081, 2]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
trigger5 = AnimElem = 6
trigger6 = AnimElem = 7
trigger7 = AnimElem = 8
trigger8 = AnimElem = 9
trigger9 = AnimElem = 10
trigger10 = AnimElem = 11
trigger11 = AnimElem = 12
trigger12 = AnimElem = 13
trigger13 = AnimElem = 14
trigger14 = AnimElem = 15
trigger15 = AnimElem = 16
trigger16 = animelem = 17
trigger17 = animelem = 18
value = 300, 1


[state 1081]
type = playsnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
trigger3 = AnimElem = 6
trigger4 = AnimElem = 8
trigger5 = AnimElem = 10
trigger6 = AnimElem = 12
trigger7 = AnimElem = 14
trigger8 = AnimElem = 16
trigger9 = AnimElem = 18
trigger10 = AnimElem = 20
trigger11 = AnimElem = 22
trigger12 = AnimElem = 24
trigger13 = AnimElem = 26
trigger14 = AnimElem = 28
trigger15 = AnimElem = 30
trigger16 = animelem = 32
trigger17 = animelem = 34
trigger18 = animelem = 31
trigger19 = animelem = 40
value = 0, 8
volume = -100

[State 1081, 2]
type = PlaySnd
trigger1 = AnimElem = 38
value = 3100, 1 

[State 1081, 2]
type = PlaySnd
trigger1 = AnimElem = 41
value = 5150, 0 
volume = 340

[state 1081]
type = playsnd
trigger1 = animelem = 41
value = 0, 5
volume = 999

[state 1081]
type = explod
trigger1 = animelem = 41
anim = 1083
sprpriority = 2
ignorehitpause = 1

[State 1081, 12]
type = EnvColor
trigger1 = MoveHit = 1
time = 1
value = 255,255,255
under = 1
ignorehitpause = 1

[State 1081, 13]
type = MoveHitReset
trigger1 = TimeMod = 8,6
value = 255,255,255
under = 1
ignorehitpause = 1

[state 1081]
type = explod
trigger1 = animelem = 2
trigger2 = animelem = 8
trigger3 = animelem = 17
trigger4 = animelem = 23
trigger5 = animelem = 27
trigger6 = animelem = 29
anim = 203
sprpriority = 2
ignorehitpause = 1

[state 1081]
type = explod
trigger1 = animelem = 5
trigger2 = animelem = 12
trigger3 = animelem = 16
trigger4 = animelem = 26
trigger5 = animelem = 34
trigger6 = animelem = 37
anim = 202
sprpriority = 2
ignorehitpause = 1

[state 1081]
type = explod
triggerall = movecontact != 0 
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
trigger5 = AnimElem = 6
trigger6 = AnimElem = 7
trigger7 = AnimElem = 8
trigger8 = AnimElem = 9
trigger9 = AnimElem = 10
trigger10 = AnimElem = 11
trigger11 = AnimElem = 12
trigger12 = AnimElem = 13
trigger13 = AnimElem = 14
trigger14 = AnimElem = 15
trigger15 = AnimElem = 16
trigger16 = animelem = 17
trigger17 = animelem = 18
trigger18 = animelem = 19
trigger19 = animelem = 20
trigger20 = animelem = 21
trigger21 = animelem = 22
trigger22 = animelem = 23
trigger23 = animelem = 24
trigger24 = animelem = 25
trigger25 = animelem = 26
trigger26 = animelem = 27
trigger27 = animelem = 28
trigger28 = animelem = 29
trigger29 = animelem = 30
trigger30 = animelem = 31
trigger31 = animelem = 32
trigger32 = animelem = 33
trigger33 = animelem = 34
trigger34 = animelem = 40
anim = 1084
postype = p2
pos = -60 , -5
sprpriority = 2
ignorehitpause = 1
superpause = 1
ownpal = 1

[State 1081, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
trigger5 = AnimElem = 6
trigger6 = AnimElem = 7
trigger7 = AnimElem = 8
trigger8 = AnimElem = 9
trigger9 = AnimElem = 10
trigger10 = AnimElem = 11
trigger11 = AnimElem = 12
trigger12 = AnimElem = 13
trigger13 = AnimElem = 14
trigger14 = AnimElem = 15
trigger15 = AnimElem = 16
trigger16 = animelem = 17
trigger17 = animelem = 18
trigger18 = animelem = 19
trigger19 = animelem = 20
trigger20 = animelem = 21
trigger21 = animelem = 22
trigger22 = animelem = 23
trigger23 = animelem = 24
trigger24 = animelem = 25
trigger25 = animelem = 26
trigger26 = animelem = 27
trigger27 = animelem = 28
trigger28 = animelem = 29
trigger29 = animelem = 30
trigger30 = animelem = 31
trigger31 = animelem = 32
trigger32 = animelem = 33
trigger33 = animelem = 34
trigger34 = animelem = 35
trigger35 = animelem = 36
trigger36 = animelem = 37
trigger37 = animelem = 38
trigger38 = animelem = 39
trigger39 = animelem = 40
attr = S, HA
animtype  = Hard
damage    = 80,15
guardflag = MA
pausetime = 2,11
getpower = 0
giverpower = 0
sparkno = -1
guard.sparkno = -1
;sparkxy = 0,0
hitsound   = 700,1
guardsound = 700,1
p2stateno = 6002
ground.type = High
ground.slidetime = 0
ground.hittime  = 60
ground.velocity = 0
air.velocity = 0
;PalFX
palfx.time = 20
palfx.add = 230,150,150
palfx.sinadd = 240,130,130,20
palfx.mul = 250,110,110

[State 1081, BGPalFX1]
type = BGPalFX
trigger1 = winko = 1
trigger1 = movehit = 1
mul = 128,0,0
invertall = 1
time = 50
persistent = 0
ignorehitpause = 1

[State 1081, 2]
type = HitDef
trigger1 = AnimElem = 41
attr = S, HA
animtype  = Back
damage    = 120,50
guardflag = MA
pausetime = 2,11
getpower = 0
givepower = 0
sparkno = S6009
sparkxy = -10,-60
hitsound   = S52,0
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 25
ground.velocity = -4,-5
fall = 2
fall.recover = 0
air.velocity = -4,-5
air.fall = 1
air.recover = 0
;PalFX
palfx.time = 25
palfx.add = 160,100,100
palfx.sinadd = 170,80,80,20
palfx.mul = 180,60,60

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

;-----------------------------------------------------------------------------
;coup fatal
[Statedef 1082]
Type    = S
movetype= A
physics = N
anim = 1092
poweradd = -2000 
velset = 0,0
ctrl = 0

[state 1082]
type = playsnd
trigger1 = time = 2
value = 0 , 10
volume = 255

[state 1082]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[State 1082]
type = ModifyExplod
trigger1 = Time = 0
id = 4202
add = 128, 6, 6
removetime = 80

[state 1082]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = 2
pos = -8
anim = 1081
removetime = 80

[state 1082]
type = explod
trigger1 = time = 0
supermove = 1
pos = -81,-97
sprpriority = 2
anim = 1082

[state 1082]
type = PlaySnd
trigger1 = Time = 0
value = 4000, 1 
volume = 255

[state 1082]
type = superpause
trigger1 = time = 0
time = 80
anim = -1

[state 1082]
type = Explod
trigger1 = AnimElem = 1
anim = 9101
pos = -320,0
postype = right
sprpriority = -2
supermove = 1
removetime = 74
ignorehitpause = 1
bindtime = -1
persistent = 0

[state 1082]
type = playsnd
trigger1 = time = 2
value = 0, 6 
volume = 999
supermove = 1

[State 1082, NotHitBy]
Type = NotHitBy
Trigger1 = Time = 0
Value = SCA
Time = 50

[State 1082, 0]
Type = VelSet
Trigger1 = Time = 0 
y = 0

[State 1082, 0]
Type = VelSet
Trigger1 = AnimElem = 2 
x = 35

[State 1082, HitDef]
type = HitDef
trigger1 = AnimElem = 2
Attr = S, HA   
Damage = 50,50   
AnimType = Hard   
getpower = 0                                             
givepower = 0
guardflag = M    
hitflag = MAFD      
priority = 3, Hit 
pausetime = 10,20
sparkxy = -10,-70    
hitsound = S20, 0 
guardsound = S20, 3    
ground.type = High
ground.slidetime = 12 
ground.hittime  = 15
ground.velocity = -3        
air.velocity = -1.3,-3
p1stateno = 1083
p2stateno = 6002

[state 1082]
type = explod
trigger1 = animelem = 2
anim = 1099
postype = p2
pos = 0 , -55
sprpriority = 3
supermove = 1

[state 1082]
type = EnvColor
trigger1 = animelem = 2
time = 25
value = 255,255,255
under = 1
ignorehitpause = 1
supermove = 1

[State 1082, MoveGuarded]
type = ChangeState
trigger1 = MoveGuarded = 1
trigger1 = AnimTime = 0
value = 2001

[State 1082, NoContact]
type = ChangeState
trigger1 = MoveContact = 0
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 1082, End]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = FrontEdgeBodyDist < 10
value = 0
ctrl = 1

;------------------------------------------------------------------------------
meurs !
[statedef 1083]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 1090

[state 1083]
type = attackmulset
triggerall = p2name =  "Broly 'le cauchemar' super saiyen nv3"
trigger1 = p2life < 550
value = 5

[state 1083]
type = Explod
trigger1 = time = 10
ownpal = 1
anim = 9999
pos = -320, 0
postype = right
sprpriority = -99
supermove = 1
removetime = 150
ignorehitpause = 1
bindtime = -1
persistent = 0

[state 1083]
type = velset
trigger1 = animelem = 1
x = 50

[state 1083]
type = superpause
trigger1 = time = 15
time = 150
anim = -1
darken = 0

[state 1083]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
animtype  = Back
damage    = 0
sparkno = -1
guard.sparkno = -1
p2stateno = 6002

[state 1083]
type = HitDef
trigger1 = AnimElem = 2
attr = S, HA
animtype  = Back
damage    = IfElse(Random<=10+NumHelper(1300)*489,99999,1),IfElse(Random<=10+NumHelper(1300)*489,99999,1)
guardflag = MA
pausetime = 2,11
getpower = 0
givepower = 0
sparkno = S6009
sparkxy = -10,-60
hitsound   = S200,0
guardsound = 200,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 25
ground.velocity = -4,-5
fall = 2
fall.recover = 0
air.velocity = -4,-5
air.fall = 1
air.recover = 0

[State 1083]
type = TargetLifeAdd
trigger1 = animelem = 2
value = Ceil(-0.18 * enemy,Const(data.life)) - 100
ignorehitpause = 1
absolute = 1

[state 1083]
type = explod
trigger1 = timemod = 10,0
trigger1 = time = [10,150]
anim = 1091
postype = p2
pos = 0, -23
sprpriority = 3
supermove = 1

[state 1083]
type = changestate
trigger1 = animtime = 0
value = 195
ctrl = 1 

;-----------------------------------------------------------------------------------
lame mortel
[Statedef 4500]
Type    = S
movetype= A
physics = N
anim = 4500
poweradd = -1500 
velset = 0,0
ctrl = 0

[state 4500]
type = playsnd
trigger1 = time = 2
value = 0 , 10
volume = 255

[state 4500]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[State 4500]
type = ModifyExplod
trigger1 = Time = 0
id = 4202
add = 128, 6, 6
removetime = 80

[state 4500]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = 2
pos = -8
anim = 1081
removetime = 80

[state 4500]
type = explod
trigger1 = time = 0
supermove = 1
pos = -81,-97
sprpriority = 2
anim = 1082

[state 4500]
type = PlaySnd
trigger1 = Time = 0
value = 4000, 1 
volume = 255

[state 4500]
type = superpause
trigger1 = time = 0
time = 80
anim = -1

[state 4500]
type = Explod
trigger1 = AnimElem = 1
anim = 9101
pos = -320,0
postype = right
sprpriority = -2
supermove = 1
removetime = 74
ignorehitpause = 1
bindtime = -1
persistent = 0

[state 4500]
type = playsnd
trigger1 = time = 2
value = 0, 6 
volume = 999

[state 4500]
type = Projectile
trigger1 = AnimElem = 7
projanim = 4501
projpriority = 1
projshadow = -1
projID = 1001
offset = 0,0
Velocity = 6.5
attr = S, SP
damage   = 600,10
animtype = heavy
guardflag = MA
hitflag = MAFP
getpower = 0
givepower= 0
pausetime = 0,10
hitsound   = S200,0
guardsound = S200,0
sparkxy = 500,500
ground.type = High
ground.slidetime = 26
ground.hittime  = 26
ground.Velocity = -6
air.animtype = Back
air.Velocity = -7,-6
air.juggle = 3
air.fall = 1
down.Velocity = -7,-6
down.hittime = 30
down.bounce = 0

[state 4500]
type = changestate
trigger1 = animtime = 0
value = 10003
ctrl = 1 

;-----------------------------------------------------------------------------------
;STATUS ATTACKS

;Bio
[StateDef 600]
type = A
physics = N
movetype = A
velset = 0,0
anim = 1000
ctrl = 0

[State 600]
type = Helper
trigger1 = AnimElem = 3,0
name = "BioBubble"
pos = 50,-100
stateno = 601
ownpal = 1
keyctrl = 0
id = 601

[State 600]
type = ChangeState
trigger1 = AnimElem = 5,>=8
value = 0
ctrl = 1

;--------------------------------------------
;BioBubble
[StateDef 601]
type = A
physics = N
movetype = A
velset = 5,0
anim = 600
ctrl = 0

[State 601]
type = PlaySnd
trigger1 = Time = 0
value = 600,0
channel = 1

[State 601]
type = VelAdd
trigger1 = P2Dist Y != 50
y = 0.5*IfElse(P2Dist Y<=50,-1,1)

[State 601]
type = PalFx
trigger1 = Time >= 14
time = 1
add = -(Time-14)/14.0*200,-(Time-14)/14.0*200,-(Time-14)/14.0*200

[State 601]
type = HitDef
trigger1 = !MoveContact
attr = A, SP
damage = 100,10
hitflag = MAFD
guardflag = MA
sparkno = -1
guard.sparkno = -1
pausetime = 0,4
hitsound = S600,1
animtype = Light
ground.type = High
ground.hittime = 4
palfx.time = 4
palfx.add = 0,150,200
p1stateno = 602

[State 601]
type = DestroySelf
trigger1 = Time >= 28

;--------------------------------------------
;Bio Hit
[StateDef 602]
type = A
physics = N
movetype = I
velset = 0,0
anim = 602

[State 602]
type = StateTypeSet
trigger1 = P2MoveType = A
trigger2 = Time = 999
movetype = A 

[State 602]
type = StateTypeSet
trigger1 = P2MoveType != A
trigger1 = Time != 999
movetype = I

[State 602]
type = HitDef
trigger1 = 1
attr = A, SP
damage = 100,30
hitflag = MAFD
guardflag = 
sparkno = -1
guard.sparkno = -1
pausetime = 0,4
hitsound = S600,1
animtype = Light
ground.type = High
ground.hittime = 4
palfx.time = 4
palfx.add = 0,150,200

[State 602]
type = Explod
trigger1 = P2MoveType != A
trigger1 = Random = [0,100]
removetime = 32
anim = 601
postype = P2
pos = Random/200.0-2,-58-Random/200.0
accel = 0,-0.1
sprpriority = 2
ownpal = 1
scale = 0.3,0.3

[State 602]
type = Explod
trigger1 = P2MoveType = A
trigger1 = MoveHit
removetime = 32
anim = 601
pos = P2Dist X, P2Dist Y
accel = 0,-0.23
sprpriority = 2
ownpal = 1

[State 602]
type = MoveHitReset
trigger1 = MoveHit

[State 602]
type = DestroySelf
trigger1 = Time >= 999

;----------------------------------------------------------------------------------------
;Sudden Dead
[StateDef 700]
type = A
physics = N
movetype = A
velset = 0,0
anim = 1000
ctrl = 0

[State 700]
type = Helper
trigger1 = AnimElem = 3,0
name = "Skull"
postype = P2
pos = -50,-80
stateno = 701
facing = -1
ownpal = 1
keyctrl = 0
id = 701

[State 700]
type = ChangeState
trigger1 = AnimElem = 5,>=8
value = 0
ctrl = 1

;--------------------------------------------
;Skull
[StateDef 701]
type = A
physics = N
movetype = A
anim = 700
velset = 0,0
ctrl = 0

[State 701]
type = PlaySnd
trigger1 = Time = 0
value = 700,2
channel = 1

[State 701]
type = AssertSpecial
trigger1 = Time = [0,60]
flag = invisible

[State 701]
type = Helper
trigger1 = Time = [0,60]
name = "SkullFace"
anim = 700
stateno = 702
keyctrl = 0
size.xscale = Time/60.0
size.yscale = Time/60.0
  
[State 701]
type = Explod
trigger1 = Time = 60
removetime = 120
bindtime = -1
pos = 2,0
anim = 701
ownpal = 1
sprpriority = 3

[State 701]
type = Helper
trigger1 = Time = 90
name = "Sickle"
pos = -50,50
stateno = 703
keyctrl = 0

[State 701]
type = PalFx
trigger1 = Time = [165,180]
time = 1
add = -(Time-165)/15.0*255,-(Time-165)/15.0*255,-(Time-165)/15.0*255

[State 701]
type = DestroySelf
trigger1 = Time >= 180

;--------------------------------------------
;Skull Face
[StateDef 702]
type = A
physics = N
movetype = I
anim = 700
ctrl = 0

[State 702]
type = AngleSet
trigger1 = 1
value = Parent, Time-60

[State 702]
type = AngleDraw
trigger1 = 1

[State 702]
type = DestroySelf
trigger1 = Time >= 1

;--------------------------------------------
;Sickle
[StateDef 703]
type = A
physics = N
movetype = A
anim = 702
ctrl = 0

[State 703]
type = PlaySnd
trigger1 = Time = 0
value = 700,1
channel = 1

[State 703]
type = Sprpriority
trigger1 = 1
value = 10

[State 703]
type = VelSet
trigger1 = 1
x = IfElse(Time<=15,-4,0)
y = IfElse(Time<=15,-1.5,0)

[State 703]
type = AngleSet
trigger1 = Time = [0,8]
value = 60-Time*45

[State 703]
type = AngleDraw
trigger1 = 1

[State 703]
type = HitDef
trigger1 = !MoveContact
attr = A, SA
damage = IfElse(Random<=10+NumHelper(1300)*489,99999,1),IfElse(Random<=10+NumHelper(1300)*489,99999,0)
getpower = 500
givepower = 250
hitflag = MAFD
guardflag = MA
sparkno = -1
guard.sparkno = -1
hitsound = S700,0
pausetime = 0,4
animtype = Hard
ground.type = Trip
ground.velocity = 1,-1
ground.hittime = 30
air.type = Trip
air.velocity = 1,-1
fall = 1

[State 703]
type = Explod
trigger1 = MoveHit
trigger1 = TimeMod = 8,0
trigger1 = Time <= 80
removetime = 16
postype = P2
anim = 703
pos = 0,-10
velocity = Random/100.0-5,-Random/100.0
accel = 0,0.46
sprpriority = 2
ownpal = 1

[State 703]
type = DestroySelf
trigger1 = Time >= 90

;----------------------------------------------------------------------------------------
;Shield
[StateDef 800]
type = A
physics = N
movetype = I
velset = 0,0
anim = 1000
ctrl = 0

[State 800]
type = Helper
trigger1 = AnimElem = 2,0
name = "Shield"
pos = 80,-100
stateno = 801
ownpal = 1
keyctrl = 0
id = 801

[State 800]
type = ChangeState
trigger1 = AnimElem = 5,>=8
value = 0
ctrl = 1

;--------------------------------------------
;Shield Itself
[StateDef 801]
type = A
physics = N
movetype = I
velset = 0,0
anim = 800
ctrl = 0

[State 801]
type = PlaySnd
trigger1 = Time = 0
value = 800,0
channel = 1

[State 801]
type = PalFx
trigger1 = 1
time = 1
add = -Time/999.0*255,-Time/999.0*255,-Time/999.0*255

[State 801]
type = Turn
trigger1 = Facing != Parent, Facing

[State 801]
type = Sprpriority
trigger1 = 1
value = 3

[State 801]
type = BindToParent
trigger1 = 1
time = 1
pos = 80,-100

[State 801]
type = PlaySnd
trigger1 = Parent, StateNo = 5000
trigger1 = Parent, Time = 1
value = 4000,0
channel = 2

[State 801]
type = Explod
trigger1 = Parent, StateNo = 5000
trigger1 = Parent, Time = 1
ignorehitpause = 1
removetime = 6
anim = 801
pos = 0,0
ownpal = 1
sprpriority = 3

[State 801]
type = PowerAdd
trigger1 = Parent, StateNo = 5000
trigger1 = Parent, Time = 1
ignorehitpause = 1
value = -200

[State 801, LowDefence]
type = DefenceMulSet
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
value = -0

[State 801]
type = DestroySelf
trigger1 = Parent, Power < 200
trigger2 = Time >= 999

;----------------------------------------------------------------------------------------
;Care
[StateDef 1000]
type = A
physics = N
movetype = I
velset = 0,0
anim = 1000
poweradd = -1000
ctrl = 0

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

[State 1000]
type = Explod
trigger1 = Random = [0,150]
removetime = 52
anim = 403
pos = Random/5.0-100,Random/10.0-50
accel = 0,-0.46
sprpriority = 2

[State 1000]
type = LifeAdd
trigger1 = AnimElem = 5,0
value = 15000
abs = 1

[State 1000]
type = ChangeState
trigger1 = AnimElem = 5,>=8
value = 0
ctrl = 1

;--------------------------------------------------------------------------------------
;STRONG MAGIC

;Thumder
[StateDef 3100]
type = A
physics = N
movetype = A
velset = 0,0
poweradd = -1500
anim = 3000
ctrl = 0

[state 3100]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 3100]
type = explod
trigger1 = time = 0
sprpriority = 2
anim = 4201
removetime = 80

[State 3100]
type = PlaySnd
trigger1 = Time = 0
value = 3000,0
channel = 1

[State 3100]
type = BGPalFX
trigger1 = Time = [0,72]
time = 1
add = -Time/72.0*255,-Time/72.0*255,-Time/72.0*255

[State 3100]
type = ChangeAnim
trigger1 = Time = 60
value = 3001

[State 3100]
type = Helper
trigger1 = Time = 72
name = "Thumder"
pos = 130,-Pos Y
stateno = 3101
keyctrl = 0
ownpal = 1
id = 3101

[State 3100]
type = NotHitBy
trigger1 = NumHelper(3101) > 0
value = SCA

[State 3100]
type = ChangeState
trigger1 = Anim = 3001
trigger1 = AnimElem = 3,>=180
value = 0
ctrl = 1

;-------------------------------------------
;Thumder Itself
[StateDef 3101]
type = A
physics = N
movetype = A
anim = 3105
ctrl = 0

[State 3101]
type = PlaySnd
trigger1 = Time = 0
value = 3100,1
channel = 1

[State 3101]
type = PlaySnd
trigger1 = Time = 130
value = 3100,2
channel = 2

[State 3101]
type = PosSet
trigger1 = 1
x = 0

[State 3101]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
flag3 = NoBarDisplay

[State 3101]
type = PalFX
trigger1 = Time = [0,30]
time = 1
add = Time/30.0*255-255,Time/30.0*255-255,Time/30.0*255-255

[State 3101]
type = Explod
trigger1 = Time = [1,30]
removetime = 1
anim = 3104
pos = 0,-Time*6
sprpriority = -10
scale = 2,1-Time/40.0

[State 3101]
type = PalFX
trigger1 = Time = 40
trigger2 = Time = 80
time = 1
add = 255,255,255

[State 3101]
type = Explod
trigger1 = Time = [30,90]
removetime = 1
anim = 3104
pos = 0,-180-Time/2.0
sprpriority = -10
scale = 2,0.25

[State 3101]
type = Helper
trigger1 = Time = 100
trigger2 = Time = 110
trigger3 = Time = 120
name = "Lightening"
stateno = 3102
pos = IfElse(Time=100,80,IfElse(Time=110,-80,0)),0
keyctrl = 0
ownpal = 1

;Large Shock
[State 3101]
type = Explod
trigger1 = Time = 130
removetime = 110
bindtime = -1
pos = 0,60
anim = 3100
scale = 0,1.5
sprpriority = 2
id = 3102

[State 3101]
type = ModifyExplod
trigger1 = Time = [130,240]
id = 3102
scale = exp(0.25*ln((Time-130)/1100.0))*3,1.5

[State 3101]
type = Explod
trigger1 = Time = [130,240]
removetime = 1
bindtime = -1
anim = 3101
pos = 0,50
scale = exp(0.25*ln((Time-130)/110.0))*4.0,exp(0.25*ln((Time-130)/110.0))*1.0
sprpriority = 3

[State 3101]
type = Explod
trigger1 = Time = [140,240]
removetime = 1
bindtime = -1
anim = 3102
pos = 0,0
scale = (Time-140)/33.3,(Time-140)/33.3
sprpriority = 4

[State 3102]
type = HitDef
trigger1 = Time = 150
attr = A,NP
damage = 300,10
getpower = 100
givepower = 50
hitflag = MADFP
guardflag = 
sparkxy = 0,0
pausetime = 0,0
animtype = Up
hitsound = S3100,0
ground.velocity = -1,-12
ground.type = Low
ground.hittime = 60
ground.slidetime = 60
air.velocity = -6,-12
air.type = Low
fall = 1
palfx.time = 60
palfx.sinadd = 150,100,255,4
palfx.color = 0
palfx.invertall = 1

[State 3101]
type = AllPalFX
trigger1 = Time = [180,240]
time = 1
add = (Time-180)/60.0*255,(Time-180)/60.0*255,(Time-180)/60.0*255

[State 3101]
type = DestroySelf
trigger1 = Time >= 240

;---------------------------------------
;The Shock
[StateDef 3102]
type = A
physics = N
movetype = A
anim = 500
ctrl = 0

[State 3102]
type = PlaySnd
trigger1 = Time = 0
value = 500,1
channel = 1

[State 3102]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 3102]
type = Explod
trigger1 = Time = 0
removetime = 12
bindtime = -1
anim = 500
scale = 0,0
sprpriority = 2
id = 502

[State 3102]
type = ModifyExplod
trigger1 = 1
id = 502
scale = IfElse(Time<=8,Time/8.0,1+(Time-8)/336.0),1

[State 3102]
type = Explod
trigger1 = 1
removetime = 1
anim = 501
scale = Time/6.0,Time/8.0
sprpriority = 2

[State 3102]
type = Explod
trigger1 = Time = 0
removetime = 12
anim = 3103
sprpriority = 3
ownpal = 1

[State 3102]
type = PalFx
trigger1 = Time = [8,12]
time = 1
add = -Time/6.0*255,-Time/6.0*255,-Time/6.0*255

[State 3102]
type = HitDef
trigger1 = AnimElem = 2
attr = A,HP
damage = 100,10
getpower = 100
givepower = 50
hitflag = MADFP
guardflag = MA
sparkxy = 0,0
pausetime = 0,0
animtype = Up
hitsound = S500,0
ground.velocity = -6,-6
ground.type = Low
ground.hittime = 60
ground.slidetime = 60
air.velocity = -6,-6
air.type = Low
fall = 1
palfx.time = 60
palfx.sinadd = 150,100,255,4
palfx.color = 0
palfx.invertall = 1

[State 3102]
type = Helper
trigger1 = Time = 0
name = "SmallRock"
stateno = 903
pos = 0,0
keyctrl = 0
ownpal = 1

[State 3102]
type = Helper
trigger1 = Time = 0
name = "SmallRock"
stateno = 903
pos = 0,0
keyctrl = 0
ownpal = 1

[State 3102]
type = DestroySelf
trigger1 = Time = 12

;----------------------------------------------------------------------------------------------
;Space
[StateDef 3200]
type = A
physics = N
movetype = A
velset = 0,0
poweradd = -1500
anim = 3000
ctrl = 0

[state 3200]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 3200]
type = explod
trigger1 = time = 0
sprpriority = 2
anim = 4201
removetime = 80

[State 3200]
type = PlaySnd
trigger1 = Time = 0
value = 3000,0
channel = 1

[State 3200]
type = BGPalFX
trigger1 = Time = [0,72]
time = 1
add = -Time/72.0*255,-Time/72.0*255,-Time/72.0*255

[State 3200]
type = ChangeAnim
trigger1 = Time = 60
value = 3001

[State 3200]
type = Helper
trigger1 = Time = 72
name = "Space"
pos = P2Dist X, -Pos Y-100
stateno = 3201
keyctrl = 0
ownpal = 1
id = 3201

[State 3200]
type = NotHitBy
trigger1 = NumHelper(3201) > 0
value = SCA

[State 3200]
type = ChangeState
trigger1 = Anim = 3001
trigger1 = AnimElem = 3,>=180
value = 0
ctrl = 1

;---------------------------------------
;Space Itself
[StateDef 3201]
type = A
physics = N
movetype = A
anim = 20000
ctrl = 0

[State 3201]
type = PlaySnd
trigger1 = Time = 0
value = 4100,1
value = 1

[State 3201]
type = AssertSpecial
trigger1 = Time = [0,210]
flag = NoBG
flag2 = NoFG
flag3 = NoBarDisplay

[State 3201]
type = BGPalFX
trigger1 = Time = [210,240]
time = 1
add = (240-Time)/30.0*-255,(240-Time)/30.0*-255,(240-Time)/30.0*-255

[State 3201]
type = Explod
trigger1 = Time = [0,30]
removetime = 1
anim = 3202
scale = Time/15.0,Time/15.0

[State 3201]
type = Explod
trigger1 = Time = (30,60]
removetime = 1
anim = 3202
scale = 2,2-(Time-30)/20.0

[State 3201]
type = Explod
trigger1 = Time = (60,210]
removetime = 1
anim = 3202
scale = 2,0.5

[State 3201]
type = Explod
trigger1 = Time = (210,240]
removetime = 1
anim = 3202
scale = 2*(240-Time)/30.0,0.5*(240-Time)/30.0

[State 3201]
type = VelSet
trigger1 = Time = 30
y = -2

[State 3201]
type = VelSet
trigger1 = Time = 60
y = 0

[State 3201]
type = Helper
trigger1 = Time = [60,210]
trigger1 = TimeMod = 10,5
name = "RockFromSpace"
pos = cos(Time*Pi/30.0)*80,0
stateno = 3202
keyctrl = 0
ownpal = 1

[State 3201]
type = DestroySelf
trigger1 = Time >= 240

;---------------------------------------
;Rock With Fire
[StateDef 3202]
type = A
physics = N
movetype = A
anim = 901
velset = cos(Parent, Time*Pi/30.0)*5.0,15
ctrl = 0

[State 3202]
type = PlaySnd
trigger1 = Time = 0
value = 4100,0
channel = 1

[State 3202]
type = AngleSet
trigger1 = 1
value = Atan(Vel Y/Vel X)+180

[State 3202]
type = AngleDraw
trigger1 = 1

[State 3202]
type = PalFX
trigger1 = Time >= 0
time = 1
color = 0
add = 150,60,0

[State 3202]
type = Explod
trigger1 = 1
removetime = 1
anim = 3200
scale = 0.2+Time/12.0,0.2+Time/8.0
ownpal = 1
facing = IfElse(Vel X>0,1,-1)
sprpriority = 2

[State 3202]
type = HitDef
trigger1 = !MoveContact
attr = A,HP
damage = 200,10
getpower = 100
givepower = 50
hitflag = MADFP
guardflag = 
sparkxy = 0,0
pausetime = 0,0
animtype = Hard
ground.velocity = Vel X, Vel Y
ground.type = Trip
ground.hittime = 60
ground.slidetime = 60
air.velocity = Vel X, Vel Y
air.type = Low
fall = 1

[State 3202]
type = ChangeState
trigger1 = Pos Y > 0
value = 3203

;---------------------------------------
;Rock With Fire Hit Ground
[StateDef 3203]
type = A
physics = N
movetype = A
anim = 20000
velset = 0,0
ctrl = 0

[State 3203]
type = PlaySnd
trigger1 = Time = 0
value = 300,0
channel = 1

[State 3203]
type = PalFx
trigger1 = 1
time = 1
add = 80-Time/30.0*335,80-Time/30.0*335,80-Time/30.0*335

[State 3203]
type = Explod
trigger1 = 1
removetime = 1
anim = 3201
scale = 0.3+Time/30.0,0.3+Time/30.0
sprpriority = 2

[State 3203]
type = DestroySelf
trigger1 = Time >= 30

;----------------------------------------------------------------------------------------------
;Super Fire
[StateDef 3300]
type = A
physics = N
movetype = A
velset = 0,0
poweradd = -1500
anim = 3000
ctrl = 0

[state 3300]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 3300]
type = explod
trigger1 = time = 0
sprpriority = 2
anim = 4201
removetime = 80

[State 3300]
type = PlaySnd
trigger1 = Time = 0
value = 3000,0
channel = 1

[State 3300]
type = BGPalFX
trigger1 = Time = [0,72]
time = 1
add = -Time/72.0*255,-Time/72.0*255,-Time/72.0*255

[State 3300]
type = ChangeAnim
trigger1 = Time = 60
value = 3001

[State 3300]
type = Helper
trigger1 = Time = 72
name = "Magic Ring"
pos = 80,-50
stateno = 3301
keyctrl = 0
ownpal = 1
id = 3301

[State 3300]
type = NotHitBy
trigger1 = NumHelper(3301) > 0
value = SCA

[State 3300]
type = ChangeState
trigger1 = Anim = 3001
trigger1 = AnimElem = 3,>=180
value = 0
ctrl = 1

;-------------------------------------------
;Magic Ring
[StateDef 3301]
type = A
physics = N
movetype = A
velset = 0,0
anim = 3301
ctrl = 0

[State 3301]
type = PlaySnd
trigger1 = Time = 150
value = 3300,0
channel = 3

[State 3301]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
flag3 = NoBarDisplay

[State 3301]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[State 3301]
type = Explod
trigger1 = Time = [0,30]
removetime = IfElse(Time%2=0,10,1)
anim = 3301
scale = Time/30.0,Time/30.0
sprpriority = 2

[State 3301]
type = Explod
trigger1 = Time = (30,60]
removetime = IfElse(Time%2=0,10,1)
anim = 3301
scale = 1,1
sprpriority = 2

[State 3301]
type = Explod
trigger1 = Time = (60,90]
removetime = IfElse(Time%2=0,10,1)
anim = 3301
scale = 1,1-(Time-60)/20.0
sprpriority = 2

[State 3301]
type = Explod
trigger1 = Time = (90,240]
removetime = 1
anim = 3301
scale = 1,-0.5
sprpriority = -1

[State 3301]
type = VelSet
trigger1 = Time = 15
x = P2Dist X/15.0
y = -(Pos Y+180)/15.0

[State 3301]
type = VelSet
trigger1 = Time = 30
trigger2 = Time = 90
x = 0
y = 0

[State 3301]
type = VelSet
trigger1 = Time = 60
x = 0
y = 6

[State 3301]
type = Helper
trigger1 = Time = [120,180]
trigger1 = TimeMod = 10,0
name = "FireBar"
stateno = 3302
keyctrl = 0
ownpal = 1

[State 3301]
type = Explod
trigger1 = Time = [150,240]
removetime = 1
anim = 3303
sprpriority = 3
scale = (Time-150)/16.0,(Time-150)/16.0

[State 3301]
type = Explod
trigger1 = Time = 180
removetime = 32
anim = 3300
postype = Back
pos = 160,120
sprpriority = -10
scale = 6,6

[State 3301]
type = Explod
trigger1 = Time = [190,240]
removetime = 1
anim = 3302
postype = Back
pos = 160,120
scale = 1+(Time-210)/40.0,1+(Time-210)/40.0
sprpriority = -11

[State 3301]
type = AllPalFX
trigger1 = Time = [150,240]
time = 1
add = (Time-150)/90.0*400,(Time-150)/90.0*255,(Time-150)/90.0*-255

[State 3301]
type = HitDef
trigger1 = Time >= 60
trigger1 = !MoveContact
attr = A,HP
damage = 100,10
getpower = 100
givepower = 50
hitflag = MADFP
guardflag = 
sparkxy = 0,0
sparkno = -1
pausetime = 0,(P2StateType != A)*30
animtype = Hard
ground.velocity = 0,0
ground.type = Low
ground.hittime = 60
ground.slidetime = 60
air.velocity = 4,-5
air.type = Low

[State 3301]
type = DestroySelf
trigger1 = Time >= 240

;-------------------------------------------
;Fire Bar
[StateDef 3302]
type = A
physics = N
movetype= A
anim = 3304
ctrl = 0

[State 3302]
type = PlaySnd
trigger1 = Time = 0
value = 300,1
channel = 1

[State 3302]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[State 3302]
type = PalFX
trigger1 = 1
time = 1
add = Time/15.0*-255,Time/15.0*-255,Time/15.0*-255

[State 3302]
type = Explod
trigger1 = 1
removetime = 1
anim = 3304
scale = Time/2.0,Time/3.0
sprpriority = 2

[State 3302]
type = HitDef
trigger1 = !MoveContact
attr = A,HP
damage = 100,10
getpower = 100
givepower = 50
hitflag = MADFP
guardflag = 
sparkxy = 0,0
sparkno = -1
pausetime = 0,0
animtype = Hard
ground.velocity = 0,-6
ground.type = High
ground.hittime = 120
ground.slidetime = 60
air.velocity = 0,-5
air.type = Low
air.hittime = 120
fall = 1

[State 3302]
type = DestroySelf
trigger1 = Time >= 15

;----------------------------------------------------------------------------------------------
;Freeze
[StateDef 3400]
type = A
physics = N
movetype = A
velset = 0,0
poweradd = -1500
anim = 3000
ctrl = 0

[state 3400]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 3400]
type = explod
trigger1 = time = 0
sprpriority = 2
anim = 4201
removetime = 80

[State 3400]
type = PlaySnd
trigger1 = Time = 0
value = 3000,0
channel = 1

[State 3401]
type = PlaySnd
trigger1 = Time = 60
value = 3400,1
channel = 2

[State 3400]
type = BGPalFX
trigger1 = Time = [0,72]
time = 1
add = -Time/72.0*255,-Time/72.0*255,-Time/72.0*255

[State 3400]
type = ChangeAnim
trigger1 = Time = 60
value = 3001

[State 3400]
type = Helper
trigger1 = Time = 72
name = "Freeze"
pos = P2Dist X, -Pos Y
stateno = 3401
keyctrl = 0
ownpal = 1
id = 3401

[State 3400]
type = NotHitBy
trigger1 = NumHelper(3401) > 0
value = SCA

[State 3400]
type = ChangeState
trigger1 = Anim = 3001
trigger1 = AnimElem = 3,>=180
value = 0
ctrl = 1

;-------------------------------------------
;Freeze Agent
[StateDef 3401]
type = A
physics = N
movetype = A
anim = 20000
ctrl = 0

[State 3401]
type = PlaySnd
trigger1 = Time = 0
value = 400,0
channel = 1

[State 3401]
type = AssertSpecial
trigger1 = 1
flag = NoBG
flag2 = NoFG
flag3 = NoBarDisplay

[State 3401]
type = Helper
trigger1 = Time = 0
name = "Ice"
stateno = 3402
pos = 200,-220
keyctrl = 0
ownpal = 1
size.xscale = 2
size.yscale = 2

[State 3401]
type = Helper
trigger1 = Time = 0
name = "Ice"
stateno = 3402
pos = 0,-220
keyctrl = 0
ownpal = 1
size.xscale = 2
size.yscale = 2
id = 3402

[State 3401]
type = Helper
trigger1 = Time = 0
name = "Ice"
stateno = 3402
pos = -200,-220
keyctrl = 0
ownpal = 1
size.xscale = 2
size.yscale = 2

[State 3401]
type = Explod
trigger1 = Time = [60,90]
trigger1 = Random%10 = 0
removetime = 2
anim = 3401
pos = 0,-200
facing = -1
sprpriority = 3

[State 3401]
type = Helper
trigger1 = Helper(3402),StateNo = 3403
persistent = 0
name = "ColdGas"
stateno = 3404
keyctrl = 0
ownpal = 1

[State 3401]
type = AllPalFX
trigger1 = Time = [180,240]
time = 1
add = (Time-180)/60.0*-255,(Time-180)/60.0*150,(Time-180)/60.0*300

[State 3401]
type = DestroySelf
trigger1 = Time >= 240

;-------------------------------------------
;Ice
[StateDef 3402]
type = A
Physics = N
movetype = A
velset = P2Dist X/10.0,IfElse(P2Dist Y>0,P2Dist Y/10.0,6)
anim = 400

[State 3402]
type = PlaySnd
trigger1 = Time = 0
value = 4100,0
channel = 1

[State 3402]
type = AssertSpecial
trigger1 = Time = [0,30]
flag = Invisible

[State 3402]
type = Explod
trigger1 = Time = [0,30]
removetime = 1
anim = 400
scale = Time/15.0,Time/15.0

[State 3402]
type = Explod
trigger1 = Time = [0,30]
trigger1 = Random = [0,60]
removetime = 32
anim = 402
pos = Random/50.0-40,Random/50.0-40

[State 3402]
type = Explod
trigger1 = Time = [0,30]
trigger1 = Random = [0,50]
removetime = 30
anim = 401
pos = Random/50.0-40,Random/50.0-40
accel = 0,0.46

[State 3402]
type = Explod
trigger1 = Time = [0,30]
trigger1 = Random = [0,60]
removetime = 52
anim = 403
pos = Random/50.0-40,Random/50.0-40
velocity = 0,1

[State 3402]
type = PosFreeze
trigger1 = Time = [0,30]
time = 1

[State 3402]
type = AngleSet
trigger1 = Time = 30
value = atan(P2Dist Y/P2Dist X)*40

[State 3402]
type = AngleDraw
trigger1 = Time >= 30

[State 3402]
type = HitDef
trigger1 = Time > 30
trigger1 = !MoveContact
attr = A,HP
damage = 200,10
getpower = 100
givepower = 50
hitflag = MAFD
guardflag = 
sparkxy = 0,0
pausetime = 0,180
animtype = light
ground.velocity = 0,0
ground.type = High
ground.hittime = 4
ground.slidetime = 4
air.velocity = 0,0
air.type = Low
palfx.time = 180
palfx.add = 45,57,100
palfx.color = 0
palfx.invertall = 1

[State 3402]
type = ChangeState
trigger1 = Pos Y > -30
value = 3403

;-------------------------------------------
;Ice Hit Ground
[StateDef 3403]
type = A
Physics = N
movetype = A
velset = 0,0
anim = 400

[State 3403]
type = PlaySnd
trigger1 = Time = 0
value = 900,0
channel = 1

[State 3402]
type = Explod
trigger1 = Time = 0
anim = F61
sprpriority = 2

[State 3402]
type = AngleDraw
trigger1 = 1

[State 3403]
type = DestroySelf
trigger1 = Parent, Time >= 240

;-------------------------------------------
;Cold Gas
[StateDef 3404]
type = A
physics = N
movetype = I
anim = 20000
ctrl = 0

[State 3404]
type = PlaySnd
trigger1 = Time = 0
value = 3400,0
channel = 1

[State 3404]
type = PalFX
trigger1 = 1
time = 1
color = 0
add = 0,50+sin(Time*Pi/120.0)*50,100+sin(Time*Pi/120.0)*100

[State 3404]
type = Explod
trigger1 = Time = 1
removetime = 240-Parent, Time
anim = 1102
postype = Back
pos = -300,240
velocity = 1,0
scale = 1,0
id = 3404
ownpal = 0
sprpriority = 3

[State 3404]
type = ModifyExplod
trigger1 = 1
id = 3404
scale = 1+exp(2*ln(Time/60.0)),exp(2*ln(Time/30.0))

[State 3404]
type = DestroySelf
trigger1 = Parent, Time >= 240

;----------------------------------------------------------------------------------------------
;invocation bahamut
[statedef 4300]
type = A
physics = N
movetype = A
poweradd = -5000
velset = 0,0
anim = 3000
ctrl = 0

[state 4100]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 4100]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = 2
anim = 1081
removetime = 80

[State 4100]
type = PlaySnd
trigger1 = Time = 0
value = 4000,1
channel = 1

[State 4100]
type = NotHitBy
trigger1 = Time >= 60
time = 1
value = SCA

[State 4100]
type = AssertSpecial
trigger1 = Anim = 3001
flag = Invisible

[State 4100]
type = ChangeAnim
trigger1 = Time = 60
value = 3001

[State 4100]
type = AfterImage
trigger1 = Time = 60
time = 60
lenght = 5
removetime = 12
trans = Sub
timegap = 2
framegap = 1

[State 4100] 
type = allPalFX
Trigger1 = time = 80
time = 40
add = 255,255,255
mul = 256,256,256
sinadd = 300,75,75,25
invertall = 0
color = 256

[State 4100]
type = ChangeState
trigger1 = Time = 120
value = 4301
;------------------------------------------------------------------------------------------
;l'invocation
[StateDef 4301]
type = A
physics = N
movetype = A
anim = 602

[State 4101]
type = PlaySnd
trigger1 = Time = 0
value = 4300,0
channel = 2

[State 4101]
type = PlaySnd
trigger1 = Time = 258
value = 4300,1
channel = 2

[State 4101]
type = PlaySnd
trigger1 = Time = 396
value = 4300,2
channel = 2

[State 4101]
type = PlaySnd
trigger1 = Time = 580
value = 4300,5
channel = 2

[State 4101]
type = PlaySnd
trigger1 = Time = 820
value = 4300,3
channel = 2

[State 4101]
type = PlaySnd
trigger1 = Time = 1030
value = 4300,4
channel = 2

[State 4101]
type = Pause
trigger1 = Time = 0
time = 1030
movetime = 1030

[State 4101]
type = AssertSpecial
trigger1 = Time = [0,1040]
flag = NoBG
flag2 = NoFG
flag3 = NoBarDisplay

[State 4101]
type = Explod
trigger1 = Time = 0
pausemovetime = -1
anim = 4301
pos =-19,-19
postype = Back
scale = 1,1.43
sprpriority = 100

[State 4101]
type = Explod
trigger1 = Time = 1031
pausemovetime = -1
anim = 3101
pos = 0,-350
postype = Back
velocity = 0,10
sprpriority = 10

[State 4101]
type = Explod
trigger1 = Time = 1031
pausemovetime = -1
removetime = 100
anim = 3201
pos = 0,-350
postype = Back
velocity = 0,10
sprpriority = 11

[State 4001]
type = AllPalFX
trigger1 = Time = [1031,1200]
time = 1
add = -255+(Time-1031)/30.0*255,300+(Time-1031)/30.0*-300,0

[State 4001]
type = Explod
trigger1 = Time = [1031,1200]
removetime = 1
anim = 3201
postype = Back
pos = 160,200
scale = (Time-1031)/1.0,(Time-1031)/1.0
sprpriority = 10

[State 4001]
type = Explod
trigger1 = Time = [1032,1200]
removetime = 1
anim = 3102
postype = Back
pos = 160,200
ownpal = 1
scale = (Time-1032)/2.0,(Time-1032)/2.0
sprpriority = 11

[State 4301]
type	= BGPalFX
trigger1= ((Time > 13) && ((GameTime%10) = 0))
time	= 10
add	= 20,20,20
mul	= 256,256,256
sinadd	= 200,200,200,4
invertall= 1
color	= 256

[State 4301]
type = TargetLifeAdd
trigger1 = time = 1199
value = Ceil(-0.18 * enemy,Const(data.life)) - 600
ignorehitpause = 1
absolute = 1

[State 4001]
type = HitDef
trigger1 = Time = [1031,1220]
attr = A,HP
damage = 0,0
numhits = 10
hitflag = MAFD
guardflag = MA
getpower = 0
givepower = 0
sparkno = -1
pausetime = 0,0
animtype = Up
ground.type = High
ground.velocity = 4,-15
ground.hittime = 180
air.velocity = 4,-11
fall = 1
fall.recover = 0

[State 4001]
type = ChangeState
trigger1 = Time >= 1220
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------------
;super nova dissidia
[statedef 4700]
type = A
physics = N
movetype = A
poweradd = -5000
velset = 0,0
anim = 3000
ctrl = 0

[state 4100]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = -1
anim = 4202
removetime = 80

[state 4100]
type = explod
trigger1 = time = 0
supermove = 1
sprpriority = 2
anim = 1081
removetime = 80

[State 4100]
type = PlaySnd
trigger1 = Time = 0
value = 4000,1
channel = 1

[State 4100]
type = NotHitBy
trigger1 = Time >= 60
time = 1
value = SCA

[State 4100]
type = AssertSpecial
trigger1 = Anim = 3001
flag = Invisible

[State 4100]
type = ChangeAnim
trigger1 = Time = 60
value = 3001

[State 4100]
type = AfterImage
trigger1 = Time = 60
time = 60
lenght = 5
removetime = 12
trans = Sub
timegap = 2
framegap = 1

[State 4100] 
type = allPalFX
Trigger1 = time = 80
time = 40
add = 255,255,255
mul = 256,256,256
sinadd = 300,75,75,25
invertall = 0
color = 256

[State 4100]
type = ChangeState
trigger1 = Time = 120
value = 4701

;----------------------------------------------------------------------------------------------------
;l'animation
[StateDef 4701]
type = A
physics = N
movetype = A
anim = 602

[state 4701]
type = changestate
trigger1 = p2life = 0
value = 0
ctrl = 1

[State 4101]
type = Pause
trigger1 = Time = 0
time = 1200
movetime = 1200

[State 4101]
type = AssertSpecial
trigger1 = Time = [0,1076]
flag = NoBG
flag2 = NoFG
flag3 = NoBarDisplay

[State 4101]
type = Explod
trigger1 = Time = 0
pausemovetime = -1
anim = 4400
pos = 0,0
postype = Back
scale = 0.70,1
sprpriority = 100
ontop = 1

[State 4101]
type = Explod
trigger1 = Time = 0
pausemovetime = -1
removetime = 1076
anim = 9999
pos = 0,0
scale = 3,3
postype = Back
sprpriority = 50

[State 4101]
type = Explod
trigger1 = Time = 1077
pausemovetime = -1
removetime = 130
anim = 41008
pos = -150,80
velocity = 1,0
scale = 1,1
postype = Back
sprpriority = 50

[State 4101]
type = Explod
trigger1 = Time = 1077
pausemovetime = -1
removetime = 130
anim = 8000
pos = 0,0
scale = 1,1
postype = Back
sprpriority = -5

[state 4101]
type = explod
trigger1 = time = 1077
superpause = 1
pausemovetime = -1
postype = p1
removetime = 130
sprpriority = 5
shadow = 255,255,255
anim = 4401

[state 4101]
type = posadd
trigger1 = time = 1077
x = 50
y = 0

[state 4101]
type = playsnd
trigger1 = timemod = 80,0
value = 0,22
volume = -255
channel = 1

[state 4101]
type = playsnd
trigger1 = time = 50
value = 2000,0

[state 4101]
type = playsnd
trigger1 = time = 100
value = 3000,0

[state 4101]
type = playsnd
trigger1 = time = 430
value = 3400,1
volume = 999

[state 4101]
type = playsnd
trigger1 = time = 430
value = 0,8

[state 4101]
type = playsnd
trigger1 = time = 600
value = 5150,1
volume = 999

[state 4101]
type = playsnd
trigger1 = time = 600
value = 5150,1
volume = 999

[state 4101]
type = playsnd
trigger1 = time = 600
value = 5150,1
volume = 999

[state 4101]
type = playsnd
trigger1 = time = 700
value = 5150,1
volume = 999

[state 4101]
type = playsnd
trigger1 = time = 750
value = 5150,1
volume = 999

[state 4101]
type = playsnd
trigger1 = time = 920
value = 4300,2
volume = -999 

[state 4101]
type = playsnd
trigger1 = time = 1200
value = 4300,4

[State 4101] 
type = EnvShake
Trigger1 = time > 1077
Trigger1 = TimeMod = 4,0
time = 4
ampl = 4
freq = 127

[State 4001]
type = AllPalFX
trigger1 = Time = [1200,1900]
time = 100
add = -255+(Time-1031)/30.0*255,300+(Time-1031)/30.0*-300,0

[State 4301]
type = TargetLifeAdd
trigger1 = time = [1200,1202]
superpause = 1
pausemovetime = -1
value = Ceil(-0.18 * enemy,Const(data.life)) - 300
ignorehitpause = 1
absolute = 1

[State 4001]
type = HitDef
trigger1 = Time = [1200,1202]
attr = A,HP
damage = 1,1
numhits = 1
hitflag = MAFD
guardflag = MA
getpower = 0
givepower = 0
sparkno = -1
pausetime = 0,0
animtype = Up
ground.type = High
ground.velocity = 4,12
ground.hittime = 180
air.velocity = -4,-50
fall = 1
fall.recover = 0

[State 4001]
type = ChangeState
trigger1 = Time >= 1210
value = 0
ctrl = 1