; DOCTOR DOOM by JC
; Updated and modified by TA-Chan

; Variables used
; var(3)  : SuperJump 
; var(10) : Flight Counter
; var(39) : AI

[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = -100
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 0.5           
yscale = 0.5           
ground.back = 40  
ground.front =  35   
air.back = 12        
air.front = 12       
height = 125      
attack.dist = 160    
proj.attack.dist = 90 
proj.doscale = 1     
head.pos = 0, -115  
mid.pos = -5, -70    
shadowoffset = 0     
draw.offset = 0,0    

[Velocity]
walk.fwd  = 1.7     
walk.back = -1.7     
run.fwd  = 7, 0    
run.back = -4.5,-3.8 
jump.neu = 0,-8.4    
jump.back = -3,-7   
jump.fwd = 3,7      
runjump.back = -2.55,-8.1 
runjump.fwd = 4,-8.1      
airjump.neu = 0,-8.1      
airjump.back = -3.0,8     
airjump.fwd = 2.5        
 
[Movement]
airjump.num = 0      
airjump.height = 35  
yaccel = .44         
stand.friction = .85  
crouch.friction = .82 

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

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

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

[State 180, 1]
type = VarRandom
trigger1 = time = 0
v = 0
range = 1, 900

[State 180, 2]
type = ChangeState
triggerall = !wintime
trigger1 = var(0) = [1,500]
value = 181

[State 180, 3]
type = ChangeState
triggerall =!wintime
trigger1 = var(0) = [500,700]
value = 182

[State 180, 3]
type = ChangeState
triggerall =!wintime
trigger1 = var(0) = [701,900]
value = 183

;---------------------------------------------------------------------------
; Win Pose 1
[Statedef 181]
type = S
movetype = A
physics = N
ctrl = 0
anim = 0
velset = 0 ,0

[State 181, a]
type = AssertSpecial
trigger1 = 1
flag = RoundNotOver

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

[State 181, 2]
type = ChangeAnim
triggerall = !var(1)
trigger1 = var(2) < 0
value = 5
persistent = 0

[State 181, 2a]
type = Turn
triggerall = !var(1)
trigger1 = (Anim = 5) && (AnimTime = 0)
persistent = 0

[State 181, 3]
type = ChangeAnim
trigger1 = (Anim = 5) && (AnimTime = 0)
trigger2 = var(2) > 0
trigger3 = var(1)
value = 20
persistent = 0

[State 181, 4]
type = VelSet
trigger1 = Anim = 20
x = 2.0
persistent = 0

[State 181, 5]
type = VarSet
trigger1 = time = 0
fv = 0
value = abs(var(2))

[State 181, 6]
type = VarAdd
trigger1 = Anim = 20
fv = 0
value = -2.0

[State 181, 7]
type = ChangeAnim
triggerall = Anim = 20
trigger1 = fvar(0) <= 70
value = 181

[State 181, 8]
type = ChangeState
trigger1 = Anim = 181
value = 185

;---------------------------------------------------------------------------
; Win Pose 2
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0
sprpriority = 2



[State 191, Wood 1]
type = Explod
triggerall = NumExplod(2)=0
trigger1 = time = 10
ID= 2
anim = 185
postype = p1
pos = 0, 0
bindtime = -1
removeongethit= 1
sprpriority = -2
under = 1
scale = const(size.xscale),const(size.yscale)

[State 191, Wood 1]
type = Explod
triggerall = NumExplod(3)=0
trigger1 = time = 10
ID= 3
persistent = 0
anim = 184
postype = p1
pos = 0, 0
bindtime = -1
removeongethit= 1
sprpriority = 2
scale = const(size.xscale),const(size.yscale)

[State 191, Wood 1]
type = Explod
triggerall = NumExplod(4)=0
trigger1 = time = 3
ID= 4
persistent = 0
anim = 183
postype = p1
pos = 0, 0
ontop = 1
bindtime = -1
removeongethit= 1
sprpriority = 7
ontop = 1
scale = const(size.xscale),const(size.yscale)

[State 191, Wood 1]
type = Explod
triggerall = NumExplod(5)=0
trigger1 = time = 10
ID= 5
persistent = 0
anim = 186
postype = p1
pos = 0, 0
bindtime = -1
removeongethit= 1
sprpriority = 3
scale = const(size.xscale),const(size.yscale)

[state 181, 0]
type = assertspecial
trigger1 = time = [0,200]
flag = roundnotover

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


[State 196, 4]
type = PlaySnd
trigger1 = Time = 90
value = 330,0

;---------------------------------------------------------------------------
; Win Pose 3
[Statedef 183]
type = S
ctrl = 0
anim = 1499
velset = 0,0

[State 181, a]
type = Playsnd
trigger1 = time = 0
value = 329,0


[state 181, 0]
type = assertspecial
trigger1 = time = [0,150]
flag = roundnotover

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


;---------------------------------------------------------------------------
; Win Pose 1 (cont)
[Statedef 185]
type = S
ctrl = 0
anim = 188
velset = 0,0
sprpriority = 2

[State 185, 5]
type = Helper
triggerall = NumHelper(11)=0
trigger1 = time = 7
ownpal = 1
pos =0,0
postype = p1
ID = 185
name = "Robot 1"
stateno = 186
scale = const(size.xscale),const(size.yscale)

[State 185, 5]
type = Helper
triggerall = NumHelper(12)=0
trigger1 = time = 12
ownpal = 1
pos =0,0
postype = p1
ID = 185
name = "Robot 2"
stateno = 194
scale = const(size.xscale),const(size.yscale)

[State 185, 5]
type = Helper
triggerall = NumHelper(13)=0
trigger1 = time = 15
ownpal = 1
pos =0,0
postype = p1
ID = 185
name = "Robot 3"
stateno = 300
scale = const(size.xscale),const(size.yscale)

[State 185, 5]
type = Helper
triggerall = NumHelper(14)=0
trigger1 = time = 18
ownpal = 1
pos =0,0
postype = p1
ID = 185
name = "Robot 4"
stateno = 310
scale = const(size.xscale),const(size.yscale)

[State 185, a]
type = AssertSpecial
trigger1 = time = (0,140)
flag = RoundNotOver

[State 185, a]
type = Playsnd
trigger1 = time = 50
value = 329,0

; Win Pose 1 (helper 1 going down)
[Statedef 186]
type    = A
movetype= I
physics = S
ctrl = 0
anim = 189
sprpriority = -2

[State 189, 0]
type = PosAdd
trigger1 = Time = 0 ; Posicionamos al helper arriba de la pantalla
x = 45
y = -240

[State 189, 1]
type = VelAdd
trigger1 = 1
y = 0.41
x = 0

[State 189, 2]
type = VelSet
trigger1 = Pos Y >= 0 ; Cuando toque el suelo parara 
y = 0
x = 0

[State 189, 3]
type = PosSet
trigger1 = Pos Y >= 0
y = 0

[State 4120, 5]
type = ChangeState
trigger1 = Pos Y >= 0
value = 196

; Win Pose 1 (helper 1 landing)
[Statedef 196]
type    = A
movetype= I
physics = S
ctrl = 0
anim = 47
sprpriority = -10

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

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

[State 196, 4]
type = PlaySnd
trigger1 = Time = 0
value = 0, 6

[State 196, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 187
ctrl = 1

; Win Pose 1 (helper 2 going down)
[Statedef 300]
type    = A
movetype= I
physics = S
ctrl = 0
anim = 189
sprpriority = 7

[State 189, 0]
type = PosAdd
trigger1 = Time = 0 ; Posicionamos al helper arriba de la pantalla
x = 135
y = -240

[State 189, 0]
type = Turn
trigger1 = Time = 0 
value = 1

[State 189, 1]
type = VelAdd
trigger1 = 1
y = 0.41
x = 0

[State 189, 2]
type = VelSet
trigger1 = Pos Y >= 0 ; Cuando toque el suelo parara 
y = 0
x = 0

[State 189, 3]
type = PosSet
trigger1 = Pos Y >= 0
y = 0

[State 4120, 5]
type = ChangeState
trigger1 = Pos Y >= 0
value = 301

; Win Pose 1 (helper 2 landing)
[Statedef 301]
type    = A
movetype= I
physics = S
ctrl = 0
anim = 47
sprpriority = 7


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

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

[State 196, 4]
type = PlaySnd
trigger1 = Time = 0
value = 0, 6

[State 196, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 302
ctrl = 1

[Statedef 302]
type    = S                      
movetype= A                     
physics = S                      
juggle  = 1                      
velset = 0,0                     
ctrl = 0                        
anim = 300                     
poweradd = 20                    
sprpriority = 7                  

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

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

[Statedef 310]
type    = A
movetype= I
physics = S
ctrl = 0
anim = 189
sprpriority = 8

[State 189, 0]
type = PosAdd
trigger1 = Time = 0 ; Posicionamos al helper arriba de la pantalla
x = 180
y = -240

[State 189, 0]
type = Turn
trigger1 = Time = 0 
value = 1

[State 189, 1]
type = VelAdd
trigger1 = 1
y = 0.41
x = 0

[State 189, 2]
type = VelSet
trigger1 = Pos Y >= 0 ; Cuando toque el suelo parara 
y = 0
x = 0

[State 189, 3]
type = PosSet
trigger1 = Pos Y >= 0
y = 0


[State 4120, 5]
type = ChangeState
trigger1 = Pos Y >= 0
value = 311

[Statedef 311]
type    = A
movetype= I
physics = S
ctrl = 0
anim = 47
sprpriority = 8


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

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

[State 196, 4]
type = PlaySnd
trigger1 = Time = 0
value = 0, 6

[State 196, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 312
ctrl = 1

[Statedef 312]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
velset = 0,0                     
ctrl = 0                        
anim = 310                    
poweradd = 0                    
sprpriority = 8                  

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

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




[Statedef 194]
type    = A
movetype= I
physics = S
ctrl = 0
anim = 189
sprpriority = 3

[State 189, 0]
type = PosAdd
trigger1 = Time = 0 ; Posicionamos al helper arriba de la pantalla
x = 90
y = -240

[State 189, 0]
type = Turn
trigger1 = Time = 0 
value = 1

[State 189, 1]
type = VelAdd
trigger1 = 1
y = 0.41
x = 0

[State 189, 2]
type = VelSet
trigger1 = Pos Y >= 0 ; Cuando toque el suelo parara 
y = 0
x = 0

[State 189, 3]
type = PosSet
trigger1 = Pos Y >= 0
y = 0


[State 4120, 5]
type = ChangeState
trigger1 = Pos Y >= 0
value = 204


[Statedef 204]
type    = A
movetype= I
physics = S
ctrl = 0
anim = 47

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

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

[State 196, 4]
type = PlaySnd
trigger1 = Time = 0
value = 0, 6

[State 196, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 205
ctrl = 1


;---------------------------------------------------------------------------
;RUN_FWD
[Statedef 100]
type    = A
physics = A
anim = 100 
velset = 0,0
ctrl = 1

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

[State 100, Cambiar animacion]
type = ChangeAnim
trigger1 = !Time && Anim != 100
value = 100

[State 100]
type = AssertSpecial
trigger1 = 1
flag = NoWalk
flag2 = NoAutoTurn

[State 100, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = 6
y = -4

[State 100, 4]
type = ChangeState
trigger1 = animtime = 0
value = 101
ctrl = 1

[Statedef 101]
type    = A
physics = A
ctrl = 0
anim = 101

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

[State 101, 4]
type = ChangeState
trigger1 = Pos y > 0
value = 52
ctrl = 1

;---------------------------------------------------------------------------
;RUN_BACK
[Statedef 105]
type    = A
physics = A
velset = 0,0
ctrl = 1

[State 105, 1]
type = PlaySnd
trigger1 = Time = 1
value = 1170, 0

[State 105, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != 105
value = 105

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

[State 105, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = -6
y = -4

[State 105, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 106
ctrl = 1

[Statedef 106]
type    = A
physics = A
ctrl = 0
anim = 106

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

[State 101, 4]
type = ChangeState
trigger1 = Pos Y > 0
value = 52
ctrl = 1


; Kuuchuu Dash
[Statedef 110]
type    = A
physics = A
velset = 0,0
ctrl = 1

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

[State 110]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = !Time && Anim != 100
value = 100

[State 110]
type = ChangeAnim
trigger1 = command = "holdback"
trigger1 = !Time && Anim != 105
value = 105

[State 110]
type = AssertSpecial
trigger1 = 1
flag = NoWalk
flag2 = NoAutoTurn

[State 110, VelSet]
type = VelSet
trigger1 = AnimElem = 1 
trigger1 = command = "holdup" && command != "holdback" && command != "holdfwd" 
y = -12

[State 110, VelSet]
type = VelSet
trigger1 = AnimElem = 1 
trigger1 = command = "holddown" && command != "holdback" && command != "holdfwd"
y = 12

[State 110, VelSet]
type = VelSet
trigger1 = AnimElem = 1 
trigger1 = command != "holdback" && command != "holdup" && command != "holddown"
x = 7
y = -4

[State 110, VelSet]
type = VelSet
trigger1 = AnimElem = 1 
trigger1 = command = "holdback" && command != "holdup" && command != "holddown"
x = -6
y = -4

[State 110, VelSet]
type = VelSet
trigger1 = AnimElem = 1 
trigger1 = command = "holdback" && command = "holdup"
x = -6
y = -10

[State 110, VelSet]
type = VelSet
trigger1 = AnimElem = 1 
trigger1 = command = "holdback" && command = "holddown"
x = -6
y = 10

[State 110, VelSet]
type = VelSet
trigger1 = AnimElem = 1 
trigger1 = command = "holdfwd" && command = "holdup"
x = 6
y = -10

[State 100, VelSet]
type = VelSet
trigger1 = AnimElem = 1 
trigger1 = command = "holdfwd" && command = "holddown"
x = 6
y = 10

[State 110, ]
type = PosSet
trigger1 = Pos y > -20
y = -20

[State 110, ]
type = VelSet
trigger1 = pos y >= -20
y = 0

[State 110, 4]
type = ChangeState
trigger1 = var(10) < 0 && animtime = 0
value = ifelse(vel x = 0, 111, ifelse(vel x > 0, 101, 106))
ctrl = 1

[State 110, 4]
type = ChangeState
trigger1 = var(10) > 0 && time >= 28 
value = 8001
ctrl = 1

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

[State 180, 1]
type = VarRandom
trigger1 = time = 0
v = 0
range = 1, 900

[State 180, 2]
type = ChangeState
trigger1 = var(0) = [1,500]
value = 192

[State 180, 3]
type = ChangeState
trigger1 = var(0) = [500,700]
value = 193

[State 180, 3]
type = ChangeState
trigger1 = var(0) = [700,900]
value = 1960

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

[State 191, 3]
type = Playsnd
trigger1 = AnimElem = 20
value = 380,0
channel = 31

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

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

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



[Statedef 193]
type = S
ctrl = 0
anim = 198
velset = 0,0

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 261,0

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

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

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

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

[State 195, a]
type = Playsnd
trigger1 = time = 0
value = 329,0
channel = 30

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


;---------------------------------------------------------------------------
;Stand Light Punch
[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 2                     
velset = 0,0                    
ctrl = 0                         
anim = 200                       
poweradd = 20                    
sprpriority = 2                 

[State 200, 1]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 116,0
channel = 0

[State 200, 2]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 31,0

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 11,11
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-90
hitsound = S100,0
guardsound = S111,0
ground.type = High
ground.slidetime = 10 
ground.hittime  = 13 
ground.velocity = -7 
guard.velocity = -7
air.type = High
air.velocity = -4,-1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

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

;---------------------------------------------------------------------------
; Standing Medium punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 32,0
channel = 0

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

[State 210, 2]
type = HitDef
trigger1 = time =0
attr = S, NA
animtype  = Medium
damage    = 60
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = -1
sparkxy = -20,-118
hitsound   = S0, 4
guardsound = S0, 9
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -10 
air.velocity = -4
air.hittime = 16
guard.slidetime = 11 
guard.hittime = 17
guard.velocity = -6.5 
givepower = 35
getpower = 50

[State 202, 2]
type = HitDef
triggerall = p2statetype = A
trigger1 = time = 0
attr = S, NA
animtype  = Heavy
damage    = 100,70
guardflag = MA
pausetime = 13,11
sparkno = -1
sparkxy = -10,-59
guard.sparkno = -1
hitsound   = S102,0
guardsound = S111,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -6, -6
air.velocity = -6, -6
Fall = 1
fallrecover = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 191, Wood 1]
type = Explod
trigger1 = AnimElem = 1
persistent = 0
anim = 211
postype = p1
pos = 0, 0
ontop = 1
bindtime = -1
removeongethit= 1
sprpriority = 3
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
; Standing Strong punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 2
poweradd = 65

[State 191, Wood 1]
type = Explod
trigger1 = AnimElem = 1
persistent = 0
anim = 221
postype = p1
pos = 0, 0
ontop = 1
bindtime = -1
removeongethit= 1
sprpriority = 3
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)


[State 220, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 320,0

[State 220, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 194,0



[State 220,4]
type = HitDef
trigger1 = AnimElem = 4
attr = S,NA
animtype = Heavy
damage = 100,70
hitflag = MAFD
guardflag = MA
pausetime = 11,12
sparkno = -1
sparkxy = -10,-59
guard.sparkno = -1
hitsound   = S102,0
guardsound = S111,0
ground.type = High
ground.type = Hard
ground.slidetime = 17
ground.hittime = 17
air.hittime = 40
ground.velocity = -7,-8
air.velocity = -7,-6
airguard.velocity = -4,-1.7
guard.velocity = -12
fall.recovertime = 20
getpower = 30,30
givepower = 15,15
fall.yvelocity = -3.5
guard.pausetime = 11,11
guard.slidetime = 18
guard.hittime = 36
guard.ctrltime = 36
yaccel = .55

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
; De la intro
[Statedef 187]
type    = S                      
movetype= A                     
physics = S                      
juggle  = 1                      
velset = 0,0                    
ctrl = 0                         
anim = 193                      
poweradd = 20                    
sprpriority = -1                  
         

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

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

; De la intro
[Statedef 205]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 194                    ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set layering priority to 2 (in front)
         ;Time before opponent regains control in air

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

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

;---------------------------------------------------------------------------
; Standing light kick
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 116, 0

[State 230 , 0]
type = HitDef
trigger1 = AnimElem = 3
persistent = 0
attr = S, NA   
damage    = 30
animtype = Light
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 11,11
sparkno = -1
guard.sparkno = -1
sparkxy = -15,-3
hitsound   = S100,0
guardsound = s111,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1,-3

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
; Standing medium kick
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

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

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 32, 0

[State 403, HitDef A]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage = 60,0
animtype = up
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 7,7
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-74
hitsound = S101,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
p2stateno = 500

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 403, HitDef A]
type = HitDef
trigger1 = P2StateType != L
trigger1 = AnimElem= 3
attr = C, NA
damage = 60,0
animtype = Up
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,9
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-100
hitsound = S101,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11  
p2stateno = 500
sprpriority = 6

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
; Standing strong kick
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 250
sprpriority = 2

[State 250, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 118, 0

[State 250, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 320, 0

[State 250 , 1]
type = HitDef
trigger1 = AnimElem = 3
persistent = 0
attr = S, NA   
damage    = 80 
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 10,10
sparkno = -1
sparkxy = 0,-70
guard.sparkno = -1
hitsound   = S102,0
guardsound = s111,0
ground.type = low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.velocity = -4,-4

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 400
sprpriority = 2

[State 400, 1]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 116,0
channel = 0

[State 400, 2]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 31,0

[State 400, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,9
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-54
hitsound = S100,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -4,-1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 410
sprpriority = 2

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

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


[State 411, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage = 80,0
animtype = Medium
guardflag = L
hitflag = MFD
priority = 4, Hit
pausetime = 9,9
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-54
hitsound = S100,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
down.bounce = 1
down.velocity = -4,-4
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 420
sprpriority = 2

[State 420, 5]
type = Helper
triggerall = NumHelper(10)=0
trigger1 = AnimElem = 2
ownpal = 1
pos =0,0
postype = p1
ID = 10
bindtime = -1
name = "Efecto"
stateno = 421
ontop = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 420, 1]
type = PlaySnd
trigger1 = AnimElem = 9
value = 320, 0

[State 420, 1]
type = PlaySnd
trigger1 = AnimElem = 12
trigger2 = AnimElem = 13
value = 195, 0

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

[Statedef 421]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 421
sprpriority = 3

[State 403, HitDef A]
type = HitDef
trigger1 = P2StateType != L
trigger1 = time = 0
attr = C, NA
damage = 100,0
animtype = Up ;Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-60
hitsound = S102,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1,-11.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11.5
sprpriority = 6
ignorehitpause = 1
[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 250, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
hitflag = MAFD
animtype = Hitup
damage = 111
guardflag = MA
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-60
hitsound = S102,0
guardsound = S111,0
ground.type = High
air.type = low
ground.slidetime = 17
ground.hittime = 17
air.hittime = 17
ground.velocity = -0.8,-14.2
air.velocity = -0.8,-12.6
airguard.velocity = -4,-6
guard.velocity = -12
ground.cornerpush.veloff = -10.5
air.cornerpush.veloff = -0
guard.cornerpush.veloff = -10.5
getpower = 30,30
givepower = 15,15
guard.pausetime = 0,0
guard.slidetime = 15
guard.hittime = 30
guard.ctrltime = 30
p2stateno = 500
fall = 0
yaccel = .49
sprpriority = 6
ignorehitpause = 1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 421, 3]
type = Posset
trigger1 = 1
y = 0

[State 421, 3]
type = Bindtoparent
trigger1 = 1
time = 50
facing = 1
sprpriority = 6

[State 230, 3]
type = Destroyself
trigger1 = Animtime = 0
trigger2 = parent, stateno != 420

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

[State 253, 1] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = selfanimexist(5051)
value = 5051

[State 253, 2] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !selfanimexist(5051)
trigger1 = selfanimexist(5052)
value = 5052

[State 253, 3] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !selfanimexist(5051)
trigger1 = !selfanimexist(5052)
value = 5030

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

[State 253, 5] 
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 253, 6]
type = hitfallset
trigger1 = time = 0
value = 0

[State 253, 7]
type = SelfState
trigger1 = HitShakeOver
value = 5030

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

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

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

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

[State 422, Cambiar]
type = ChangeAnim
trigger1 = Time = 0
value = 5012

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

[State 422, 2] 
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 423, ChangeState]
type = ChangeState
trigger1 = HitShakeOver
value = 423

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

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

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


[Statedef 423]
type    = A
movetype= H
physics = N
ctrl = 0

[State 424, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype)

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

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

[State 424, 3]
type = ChangeState
trigger1 = (AnimTime = 0) || (Time = 12)
value = 425

;---------------------------------------------------------------------------
[Statedef 425]
type    = A
movetype= H
physics = N

[State 425,1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059]
trigger1 = Anim != 5090 
value = 5035

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

[State 425,3]
type = ChangeState
trigger1 = HitOver  
trigger2 = AnimTime = 0 
trigger3 = Vel Y > 0    
trigger3 = Pos Y >= 10  
trigger4 = Time = 0     
trigger4 = Anim != 5035 
value = 426

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

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

[State 426, 1] 
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0    
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 
value = 5050

[State 426, 3] 
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, SelfState 1]
type = SelfState
triggerall = Alive = 1
trigger1 = (Time = 15) || (Vel Y >= 0)
value = 5040

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

;---------------------------------------------------------------------------
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 430
sprpriority = 2

[State 430, 1]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 116,0
channel = 0

[State 430, 2]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 31,0


[State 410, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage = 53,0
animtype = Light
guardflag = L
hitflag = MFD
priority = 3, Hit
pausetime = 9,9
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-10
hitsound = S100,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 10
ground.velocity = -7
guard.velocity = -10
down.bounce = 1
down.velocity = -4,-4
air.type = Low
air.velocity = -4,-1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 430
sprpriority = 2

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

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage = 80,0
animtype = Medium
guardflag = L
hitflag = MFD
priority = 4, Hit
pausetime = 10,10
sparkno = -1
guard.sparkno = -1
sparkxy = -5,-15
hitsound = S101,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
down.bounce = 1
down.velocity = -4,-4
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 440
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 118, 0

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

[State 450, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage = 90,0
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 4, Hit
pausetime = 9,9
sparkno = -1
guard.sparkno = -1
sparkxy = -5,-20
hitsound = S20,2
guardsound = S20,4
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-4
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Trip
air.velocity = 0,-4
down.bounce = 1
down.velocity = -4,-4
fall.animtype = back
fall = 1
fall.recover = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
; Launcher (hit state 1)
[Statedef 500]
type    = S
movetype= H
physics = N
velset = 0,0

[State 500, ChangeAnim]
type = ChangeAnim
trigger1 = Time >= 0
value = 5012

[State 500, StateTypeSet]
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = A

[State 500, ChangeState]
type = ChangeState
trigger1 = HitShakeOver
value = 501

;---------------------------------------------------------------------------
; Launcher (hit state 2)
[Statedef 501]
type    = A
movetype= H
physics = N
ctrl = 0

[State 501, Gravity]
type = VelAdd
trigger1 = Time > 0
y = 0.8

[State 501, VelSet]
type = VelSet
trigger1 = Time = 0
x = 0
y = -16

[State 501, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 1
value = ifelse(AnimExist(5051),5051,5050)

[State 501, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 26 && AnimExist(5061)
value = 5061

[State 501, SelfState]
type = SelfState
trigger1 = Time = 35
value = 5040

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

[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600
sprpriority = 2

[State 6XX, StateTypeSet]
type = StateTypeSet
trigger1 = var(10) > 0
physics = N

[State 6XX, VelSet]
type = VelSet
trigger1 = var(10) > 0
x = 0
y = 0

[State 6XX, ChangeState]
type = ChangeState
trigger1 = Var(10) > 0
trigger1 = AnimTime = 0
value = 8001
ctrl = 1

[State 600, 1]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 116,0
channel = 0

[State 600, 2]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 31,0

[State 600, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10,11
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-110
hitsound = S100,0
guardsound = S111,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2.5,-1
guard.velocity = -3
airguard.velocity = -3,-1
air.type = High
air.velocity = 0,-3

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

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

[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 610
sprpriority = 2

[State 6XX, StateTypeSet]
type = StateTypeSet
trigger1 = var(10) > 0
physics = N

[State 6XX, VelSet]
type = VelSet
trigger1 = var(10) > 0
x = 0
y = 0

[State 6XX, ChangeState]
type = ChangeState
trigger1 = Var(10) > 0
trigger1 = AnimTime = 0
value = 8001
ctrl = 1

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

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 194, 0

[State 191, Wood 1]
type = Explod
trigger1 = Numexplod(1)=0
trigger1 = AnimElem = 2
persistent = 0
anim = 611
ID = 1
postype = p1
pos = 0, 0
ontop = 1
bindtime = -1
removeongethit= 1
sprpriority = 3
scale = const(size.xscale),const(size.yscale)

[State 610, 2]
type = removeexplod
trigger1 = stateno =[0,609]
trigger2= stateno =[611,9999999]
ID = 1

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

[State 411, HitDef]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage = 80,0
animtype = Medium
guardflag = L
hitflag = MAF
priority = 4, Hit
pausetime = 9,9
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-54
hitsound = S101,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 11
ground.velocity = -4
guard.velocity = -10
down.bounce = 1
down.velocity = -4,-4
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
[Statedef 620]
type = A
physics = A
movetype = A
ctrl = 0
poweradd = 20
anim = 660

[State 6XX, StateTypeSet]
type = StateTypeSet
trigger1 = var(10) > 0
physics = N

[State 6XX, VelSet]
type = VelSet
trigger1 = var(10) > 0
x = 0
y = 0

[State 6XX, ChangeState]
type = ChangeState
trigger1 = Var(10) > 0
trigger1 = AnimTime = 0
value = 8001
ctrl = 1

[State 605, 1]
type = VelSet
trigger1 = time = (2,37)
trigger1 = var(10) = -1
x = 0
y = .5

[State 605, 2]
type = Helper
trigger1 = NumHelper(621) = 0
trigger1 = AnimElem = 4
id = 621
name = "Laser"
pos = 0, 0
postype = p1
facing = 0
stateno = 661
helpertype = normal
keyctrl = 0
ownpal = 0
ontop = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 600, 1]
type = PlaySnd
trigger1 = AnimElem= 4
value = 196,0

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

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

[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
anim = 630
sprpriority = 2

[State 6XX, StateTypeSet]
type = StateTypeSet
trigger1 = var(10) > 0
physics = N

[State 6XX, VelSet]
type = VelSet
trigger1 = var(10) > 0
x = 0
y = 0

[State 6XX, ChangeState]
type = ChangeState
trigger1 = Var(10) > 0
trigger1 = AnimTime = 0
value = 8001
ctrl = 1

[State 630, 1]
type = PlaySnd
trigger1 = AnimElem =1
value = 116,0
channel = 0

[State 630, 2]
type = PlaySnd
trigger1 = AnimElem= 2
value = 31,0


[State 630, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 30,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10,11
sparkno = -1
guard.sparkno = -1
sparkxy = 0,-80
hitsound = S100,0
guardsound = S111,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 13
ground.velocity = -2.5
guard.velocity = -3
airguard.velocity = -3,-1
air.type = High
air.velocity = 0,-3

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

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

[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 640
sprpriority = 2

[State 6XX, StateTypeSet]
type = StateTypeSet
trigger1 = var(10) > 0
physics = N

[State 6XX, VelSet]
type = VelSet
trigger1 = var(10) > 0
x = 0
y = 0

[State 6XX, ChangeState]
type = ChangeState
trigger1 = Var(10) > 0
trigger1 = AnimTime >= 25
value = 8001
ctrl = 1

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

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 32, 0

[State 640, HitDef]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage = 55,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,11
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-90
hitsound = S101,0
guardsound = S111,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -5
guard.velocity = -4
airguard.velocity = -7,-2.5
air.type = Low
air.velocity = -5,-3

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 6XX, ChangeState]
type = ChangeState
trigger1 = AnimTime >= 25
value = 50
ctrl = 1


[Statedef 647]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 6470
sprpriority = 2

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

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 32, 0

[State 640, HitDef]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage = 55,0
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,11
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-90
hitsound = S101,0
guardsound = S111,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -5
guard.velocity = -4
airguard.velocity = -7,-5
air.type = Low
air.velocity = -1,-5

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[Statedef 648]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 610
sprpriority = 2

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

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 194, 0

[State 191, Wood 1]
type = Explod
trigger1 = Numexplod(13)=0
trigger1 = AnimElem = 2
persistent = 0
anim = 611
ID = 13
postype = p1
pos = 0, 0
ontop = 1
bindtime = -1
removeongethit= 1
sprpriority = 3
scale = const(size.xscale),const(size.yscale)

[State 610, 2]
type = removeexplod
trigger1 = stateno =[0,647]
trigger2= stateno =[649,9999999]
ID = 13

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

[State 411, HitDef]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage = 80,0
animtype = Light
guardflag = L
hitflag = MAF
priority = 4, Hit
pausetime = 10,11
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-54
hitsound = S101,0
guardsound = S111,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -4
guard.velocity = -10
down.bounce = 1
down.velocity = -2,-1
airguard.velocity = -5,-1
air.type = Low
air.velocity = 1,-4

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

; Aceleracion basica de Y e X aqui hay que medir dos frames o mas

[Statedef 650]
type    = A
movetype= A
physics = A
poweradd= 45
ctrl = 0
anim = 650

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

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 176, 0

[State 650, 3]
type = VelSet
trigger1 = AnimElem = 2
x = 4.5
y = 0.5

[State 650, 4]
type = Veladd
trigger1 = Time = 5
y = -2

[State 450, 4]
type = HitDef
trigger1 = time = 0
attr = C, NA
hitflag = MAF
guardflag = MA
pausetime = 8, 8
animtype = Hard
priority = 5, Hit
damage = 92
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -14
hitsound = S102, 0
guardsound = S111, 0
ground.type = Low
ground.velocity = -10
ground.slidetime = 13
ground.hittime = 27
air.velocity = -3, -5
guard.slidetime = 14
guard.hittime = 31
guard.velocity = -9
givepower = 40
getpower = 50

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 650 ,4] 
type = ChangeState
trigger1 = movecontact = 1
value = 656   

[State 650, 5]
type = ChangeState
trigger1 = Pos Y >= -8
value = 52


[Statedef 652]
type    = A
movetype= A
physics = A
poweradd= 45
ctrl = 0
anim = 6500

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

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 176, 0

[State 650, 3]
type = VelSet
trigger1 = AnimElem = 2
x = 6
y = 1.2

[State 650, 4]
type = Veladd
trigger1 = Time = 5
y = -2

[State 450, 4]
type = HitDef
trigger1 = time = 0
attr = C, NA
hitflag = MAF
guardflag = MA
pausetime = 8, 8
animtype = Hard
priority = 5, Hit
damage = 92
sparkno = -1
guard.sparkno = -1
sparkxy = -10, -14
hitsound = S102, 0
guardsound = S111, 0
ground.type = Low
ground.velocity = -10
ground.slidetime = 13
ground.hittime = 27
air.velocity = -3, -5
guard.slidetime = 14
guard.hittime = 31
guard.velocity = -9
givepower = 40
getpower = 50

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8010
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 650 ,4] 
type = ChangeState
trigger1 = movecontact = 1
value = 656   

[State 650, 5]
type = ChangeState
trigger1 = Pos Y >= -8
value = 52

; Parar un poco al doctor doom cuando dispara su rayo laser sencillo

[Statedef 656]
type    = A
movetype= I
physics = A
ctrl = 0
anim = 656


[State 616, 0]
type = VelSet
trigger1 = Time = 0
x = -4
y = -7

[State 616, 1]
type = ChangeState
trigger1 = AnimTIme = 0
value = 50


[Statedef 6610]
type     = S
movetype = A
ctrl = 0
velset = 0,0
anim = 661
juggle = 5
SprPriority = 2
ignorehitpause = 1


[State 421, 3]
type = Bindtoparent
trigger1 = time = 0
time = 24
facing = 1
sprpriority = 2
ignorehitpause = 1

[State 212, HitDef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 16
trigger4 = AnimElem = 5
trigger5 = AnimElem = 10
trigger6 = AnimElem = 13
attr = A, NA
damage = 30,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-84
hitsound = S109,0
guardsound = S111,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -4
guard.velocity = -11
airguard.velocity = -3,-1
air.type = Low
air.velocity = -4,-1.5
[State 1310, 6]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = parent, MoveType = H
trigger3 = parent, StateNo = [0,6609]
trigger4 = parent, StateNo = [6611,9999999]

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[Statedef 661]
type     = S
movetype = A
ctrl = 0
velset = 0,0
anim = 661
juggle = 5
SprPriority = 2
ignorehitpause = 1

[State 421, 3]
type = Bindtoparent
trigger1 = parent, stateno = 620
time = 1
facing = 1
sprpriority = 2
ignorehitpause = 1

[State 212, HitDef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 16
trigger4 = AnimElem = 5
trigger5 = AnimElem = 10
trigger6 = AnimElem = 13
attr = A, NA
damage = 30,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-84
hitsound = S109,0
guardsound = S111,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -4
guard.velocity = -11
airguard.velocity = -3,-1
air.type = Low
air.velocity = -4,-1.5

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8011
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 8020
postype = p2
pos = 10, -70
sprpriority = 7
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1310, 6]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = parent, stateno != 620 && AnimTime < 15

[Statedef 850]
type    = A
movetype= A
physics = A
juggle  = 0
ctrl = 0
sprpriority = 2

[State 850, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 800

[State 850, HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, NT
hitflag = A-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 914
p2stateno = 805
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0
fall.damage = 80

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


[Statedef 914]
type = A
movetype = A
physics = N
anim = 801
velset = 0,0

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


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

[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 6
value =320,0

[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 8
value =190,0



[State 191, Wood 1]
type = Explod
triggerall = NumExplod(850)=0
trigger1 = AnimElem = 1
ID= 850
anim = 850
postype = p1
pos = 0, 0
bindtime = -1
removeongethit= 1
sprpriority = -2
under = 1
removetime = 77
scale = const(size.xscale),const(size.yscale)


[State 810, a]
type = Width
trigger1 = 1
value = 80, 0

[State 191, Wood 1]
type = Explod
triggerall = NumExplod(12)=0
trigger1 = AnimElem = 5
ID= 12
anim = 813
postype = p1
pos = 0, 0
bindtime = -1
removeongethit= 1
sprpriority = 3
ontop = 1
scale = const(size.xscale),const(size.yscale)

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

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

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 1
pos = 62,-130

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 61,-150

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 5
pos = 90,-160

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 6
projanim = 810
projhitanim = 810
projpriority = 1
projsprpriority = -1
offset = 0, -300
attr = S, SP
damage = 95,8
Numhit = 0
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,10
sparkno= -1
sparkxy = 0, 0
hitsound = S7,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5,-5
air.velocity = -5,-5
fall=1

[State 1410, State]
type = sprpriority
trigger1 = 1
value = -2

[State 1410, State]
type = ChangeState
trigger1 = animtime = 0
value = 50
ctrl = 1

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

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT         
hitflag = M-          
priority = 2, miss  
sparkno = -1  
hitsound = S1, 1     
sprpriority = 1       
p1facing = ifelse (command = "holdfwd", 1, -1) 
p2facing = 1         
p1stateno = 804     
p2stateno = 805      
guard.dist = 0        
fall = 1              

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

[Statedef 804]
type = S
movetype = A
physics = S
anim = 801
velset = 0,0


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


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

[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 6
value =320,0

[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 8
value =190,0

[State 810, a]
type = Width
trigger1 = 1
value = 80, 0

[State 191, Wood 1]
type = Explod
triggerall = NumExplod(12)=0
trigger1 = AnimElem = 5
ID= 12
anim = 813
postype = p1
pos = 0, 0
bindtime = -1
removeongethit= 1
sprpriority = 3
ontop = 1
scale = const(size.xscale),const(size.yscale)

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

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 1
pos = 62,-130

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 61,-150

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 5
pos = 90,-160

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 6
projanim = 810
projhitanim = 810
projpriority = 1
projsprpriority = 2;-1
offset = 0, -300
attr = S, SP
damage = 95,8
Numhit = 0
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,10
sparkno= -1
sparkxy = 0, 0
hitsound = S101,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5,-5
air.velocity = -5,-5
fall=1

[State 1410, State]
type = sprpriority
trigger1 = 1
value = -2

[State 1410, State]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[Statedef 805]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0, 0
poweradd = 80


[State 1410, 1]
type = SprPriority
trigger1 = time >= 0
value = 2

[State 850, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 802


[State 850, 1]
type = screenbound
trigger1 = 1
value = 1


[Statedef 900]
type = S
movetype = A
physics = S
velset = 0,0
anim = 800
ctrl = 0

[State 900, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT         
hitflag = M-          
priority = 2, miss  
sparkno = -1  
hitsound = S1, 1     
sprpriority = 1       
p1facing = ifelse (command = "holdfwd", 1, -1) 
p2facing = 1         
p1stateno = 904     
p2stateno = 905      
guard.dist = 0        
fall = 1              

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


[Statedef 860]
type    = A
movetype= A
physics = A
juggle  = 0
ctrl = 0
sprpriority = 2


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

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


[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 7
value =320,0

[State 850, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 800

[State 850, HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, NT
hitflag = A-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 924
p2stateno = 905
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0
fall.damage = 40

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


[Statedef 904]
type = S
movetype = A
physics = S
anim = 901
velset = 0,0


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


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

[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 6
value =320,0



[State 810, a]
type = Width
trigger1 = 1
value = 80, 0

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

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

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 1
pos = 62,-130

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 61,-150

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 5
pos = 15,-115

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 6
pos = 10,-100

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 7
pos = -40,-20


[State 1410, State]
type = sprpriority
trigger1 = 1
value = -2

[State 1410, State]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[Statedef 924]
type = A
movetype = A
physics = N
anim = 924
velset = 0,0

[State 191, Wood 1]
type = Explod
triggerall = NumExplod(850)=0
trigger1 = AnimElem = 1
ID= 850
anim = 850
postype = p1
pos = 0, 0
bindtime = -1
removeongethit= 1
sprpriority = -2
under = 1
removetime = 22
scale = const(size.xscale),const(size.yscale)

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


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

[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 6
value =320,0


[State 810, a]
type = Width
trigger1 = 1
value = 80, 0


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

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 1
pos = 62,-130

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 61,-150

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 5
pos = 15,-115

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 6
pos = 10,-100

[State 1410, 2]
type = TargetBind
trigger1 = AnimElem = 7
pos = -40,-20


[State 1410, State]
type = sprpriority
trigger1 = 1
value = -2

[State 1410, State]
type = ChangeState
trigger1 = animtime = 0
value = 50
ctrl = 1



[Statedef 905]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0, 0
poweradd = 80


[State 1410, 1]
type = SprPriority
trigger1 = time >= 0
value = 2

[State 850, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 902


[State 850, 1]
type = screenbound
trigger1 = 1
value = 1

[State 1420, 4]
type = Lifeadd
trigger1 = AnimElem = 5
value = -120

[State 1310, 5]
type = EnvShake
trigger1 = time = 34
freq = 180
ampl = -3
phase = 70
time = 20

[State 1420, State]
type = SelfState
trigger1 = time = 34
value = 5100

; Estados normales modificados del common1.cns parcialmente
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1]
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] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type


[State 5000, 5] 
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

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

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

[State 5000, llight]
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

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

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

[State 5010, 1] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

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

[State 5010, 3]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type


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

[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

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

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

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

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

[State 5020, 3]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type


[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

;---------------------------------------------------------------------------
[Statedef 5040]
type    = A
movetype= H
physics = N

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

[State 5040, 2]
type = ChangeAnim
triggerall = PrevStateNo != 3950
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

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

[State 5080, 1] 
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] 
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080, 3] 
type = ChangeAnim
trigger1 = Time = 0
value = sysvar(2)

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

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

; Dizzy
[Statedef 3200]
type    = A
movetype= H
physics = N
ctrl = 0
anim = 3200
poweradd = 0
velset = -2,-15.5
sprpriority = 1

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

[State 3200, 2]
type = VelAdd
trigger1 = 1
y = 0.46

[State 3200, 3]
type = VarSet
trigger1 = Time = 0
v = 35
value = 0

[State 3200, 4]
type = VarSet
trigger1 = Time = 0
v = 37
value = 1

[State 3200, 5]
type = ChangeAnim
trigger1 = (Vel Y >= 0) && (Anim != 3201)
value =  3201

[State 3200, 6]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 3201

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

[Statedef 3201]
type    = S
movetype= I
physics = S
ctrl = 0
poweradd = 0
velset = 0,0
sprpriority = 0

[State 3201, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 5040
elem = 2

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

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

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

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

[Statedef 3202]
type    = S
movetype= I
physics = S
ctrl = 0
poweradd = 0
anim = 5300
velset = 0,0
sprpriority = 0

[State 3202,2]
type = PlaySnd
trigger1 = Time = 1
value = 312,0


[State 3202, 3]
type = ChangeState
trigger1 = Time = 140
value = 0
ctrl = 1

; Recobrarse y deslizarse en un golpe
[Statedef 6770] 
type = L
movetype = I
physics = N
ctrl = 0
anim = 5120
sprpriority = 1
facep2 = 1
velset = 0, 0

[State 6770, Siempre en el suelo]
type = PosSet
trigger1 = 1
y = 0

[State 6770, Velocidad]
type = VelSet
trigger1 = AnimElem = 1
x = 8

[State 6770, Nada de daño]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, AA, AP

[State 6770, Nada de daño]
type = NotHitBy
trigger1 = 1
time = 11
value = SCA, AT

[State 6770, Parar velset]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 6770, Estado de recuperacion]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


[Statedef 6771] 
type = L
movetype = I
physics = N
ctrl = 0
anim = 5120
sprpriority = 1
facep2 = 1
velset = 0, 0

[State 6771, Siempre en el suelo]
type = PosSet
trigger1 = 1
y = 0

[State 6771, Velocidad]
type = VelSet
trigger1 = AnimElem = 1
x = -8

[State 6771, Nada de daño]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, AA, AP

[State 6771, Nada de daño]
type = NotHitBy
trigger1 = 1
time = 11
value = SCA, AT

[State 6771, Parar velset]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 6771, Estado de recuperacion]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


; Intro (Flying Down)
[Statedef 1960]
type = S
movetype = I
physics = N
anim = 6000
sprpriority = 1
velset = 0,0
ctrl = 0

[State 191, 3] 
type = Playsnd
trigger1 = time = 61
value = 380,0
channel = 31

[State 196, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,360]
flag = Intro

[State 193, PosSet]
type = PosSet
trigger1 = !Time
y = -361

[State 193, PosAdd]
type = PosAdd
trigger1 = Time > 1 && Pos Y < 2
y = 3

[State 289598,Land]
type = Posset
trigger1 = Pos Y >= 0
y = 0

[State 289598,Land]
type = Changestate
trigger1 = Pos Y >= 0&& !AnimTime
value = 0
ctrl = 1 

[State 289598,Land]
type = Posset
trigger1 = Pos Y >= 0
y = 0
 

; Counter
[Statedef 1300]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1120

[State 1300, 2]
type = HitDef
triggerall = movecontact = 0
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
attr = S, NA
animtype  = Light
damage    = 0
guardflag = 
pausetime = 0,0
sparkno = -1
ground.type = High
ground.slidetime = 50
ground.hittime  = 11
ground.velocity = -23.6
air.velocity = -11,-2.2

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



[Statedef 8070]
type = A
movetype = I
physics = N
anim = 9998


[State 9070, 2]
type = Explod
triggerall = NumExplod(8071)=0
trigger1 = NumHelper(3005)=1
ID = 8071
anim = 699
scale =1,1.08
postype = left
pos = 0, 0
bindtime = -1
removetime = -1
ownpal = 1
sprpriority = -4
scale = const(size.xscale),const(size.yscale)


[State 100, 4]
type = Destroyself
trigger1 = time = 200
trigger2 = parent,stateno = 52


[State 100, 4]
type = Removeexplod
trigger1 = stateno = 52
trigger2 = NumHelper(3005)=0

; Special Finish BG
[Statedef 8060]
type = A
movetype = I
physics = N
anim = 9998

[State 9070, 2]
type = Explod
triggerall = time = 0
triggerall = NumExplod(8071)=0
trigger1 = NumHelper(3007)=1
ID = 8071
anim = 540
postype = left
scale =1,1.08
pos = 0, 0
bindtime = -1
removetime = 200
ownpal = 1
sprpriority = -4
scale = const(size.xscale),const(size.yscale)

[State 100, 4]
type = Removeexplod
trigger1 = parent,stateno != [1999, 2999]
ID = 8071

[State 100, 4]
type = Destroyself
trigger1 = time = 200

[Statedef 5900]
type = S

[State 5900, 1] 
type = VarRangeSet
trigger1 = roundno = 1
value = 0

[State 5900, 2] 
type = VarRangeSet
trigger1 = roundno = 1
fvalue = 0

[State 5900, 3]
type = VarSet
trigger1 = time = 0
fv = 1
value = 1

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190



[Statedef -2]

[State -2, Debug]
type = DisplayToClipboard
trigger1 = 1
text = "Fly: %d, SuperJump: %d  AI: %d     %f"
params = Var(10), Var(3), Var(39), Pos Y;
ignorehitpause = 1

;------------------------------------------------------------
;Flying Mode
[State -2, SetFlyVar]
type = VarSet
trigger1 = Pos Y > 0;-15
trigger1 = command = "holddown"
v = 10
value = 0

[State -2, SetFlyVar]
type = VarSet
trigger1 = Var(10) = 0
trigger2 = stateno = 52
trigger3 = MoveType = H
v = 10
value = -1

[State -2, SetFlyVar]
type = PowerSet
trigger1 = Var(10) > 0
value = var(10) * 5

[State -2, SetFlyVar]
type = VarAdd
trigger1 = Var(10) > 0
trigger1 = (GameTime%1) = 0
trigger1 = RoundState = 2
trigger1 = StateNo != 8000
v = 10
value =  -1

[State -2, SetVar]
type = VarSet
trigger1 = Var(10) > 0
trigger1 = RoundState > 2
v = 10
value = 0

;------------------------------------------------------------
[State -2, Efecto especial]
type = Helper
triggerall = NumHelper(3075)=0
triggerall = WinKO
trigger1 = StateNo = [1999, 2999]
name = "Hyper KO FX" ; 
ID = 3007
StateNo = 8060
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State -2, 3]
type = Destroyself
trigger1 = Animtime = 0
trigger2 =  MoveType = H
trigger3 = StateNo = [0,419]
trigger4 =  StateNo = [421,464]
trigger5 =  StateNo = [466,999999]
trigger6 = var(52)=1
ID = 10

[State -2, destruimos el explod]
type = Removeexplod
trigger1 = Roundstate = 4
trigger2 = stateno = 0
trigger3 = stateno = 52
trigger4 = NumHelper(3005)=0
ID = 8071

[State -2, destruimos el explod]
type = Destroyself
trigger1 = Roundstate = 4
trigger2 = stateno = 0
trigger3 = stateno = 52
ID = 3005

[State -2, 3]
type = removeexplod
ID = 7129
trigger1 = movetype = H
trigger2 = anim != 6112

[State -2, 3]
type = removeexplod
ID = 6117
trigger1 = movetype = H
trigger2 = anim != 6112

[State -2, 3]
type = removeexplod
ID = 1123
trigger1 = movetype = H
trigger2 = anim != 8110

; 5 PROYECTILES 5 POSICIONES
[State -2, PROJECTILE 1]
type = Explod
trigger1 = Projhit1=1
anim = 3015
id = 10001
postype = P2
pos = 10,-90
facing = 1
sprpriority = 3
persistent = 0
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)

[State -2, PROJECTILE 2]
type = Explod
trigger1 = Projhit2=1
anim = 3015
id = 10001
postype = P2
pos = 10,-70
facing = 1
sprpriority = 3
persistent = 0
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)

[State -2, PROJECTILE 3]
type = Explod
trigger1 = Projhit3=1
anim = 3015
id = 10001
postype = P2
pos = 10,-80
facing = 1
sprpriority = 3
persistent = 0
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)


[State -2, PROJECTILE 4]
type = Explod
trigger1 = Projhit4=1
anim = 3015
id = 10001
postype = P2
pos = 10,-50
facing = 1
sprpriority = 3
persistent = 0
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)

[State -2, PROJECTILE 5]
type = Explod
trigger1 = Projhit5=1
anim = 3015
id = 10001
postype = P2
pos = 0,-40
facing = 1
sprpriority = 3
persistent = 0
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)

;------------------------------------------------------------
; Dizzy Meter
[State -2, Contar estados golpeados]
type = VarAdd
triggerall = Time = 0
trigger1 = (StateNo = 5000) || (StateNo = 5010) || (StateNo = 5020) || (StateNo = 5070) || (StateNo = 5080)
v = 36
value = 1
ignorehitpause = 1

[State -2, Contador reset]
type = VarSet
trigger1 = MoveType != H
v = 36
value = 0
ignorehitpause = 1

[State -2, Variable añadida]
type = VarAdd
triggerall = (Time = 0) && (Var(36) < 15) && (Var(37) = 0)
trigger1 = (StateNo = 5000) || (StateNo = 5010) || (StateNo = 5020) || (StateNo = 5070) || (StateNo = 5080)
v = 35
value = ((GetHitVar(animtype)=0)*100)+((GetHitVar(animtype)=1)*200)+((GetHitVar(animtype)=2)*300)+((GetHitVar(animtype)>=3)*400)

[State -2, Varquitada]
type = VarAdd
trigger1 = Var(35) > 0
v = 35
value = ifelse(MoveType = A,-3,-2)

[State -2, puesta]
type = VarSet
trigger1 = Var(35) < 0
v = 35
value = 0
ignorehitpause = 1

[State -2, vuelta a marear]
type = VarSet
trigger1 = (MoveType != H) && (StateNo != [3200,3202])
v = 37
value = 0

[State -2, Cambiar estado]
type = ChangeState
triggerall = Time = 1
trigger1 = (StateNo = 5000) || (StateNo = 5010) || (StateNo = 5020) || (StateNo = 5070) || (StateNo = 5080)
trigger1 = (Var(35) >= 8000) && (LoseKO = 0)
value = 3200
ignorehitpause = 1
persistent = 0
;------------------------------------------------------------

[State 2,1]
type = removeexplod
trigger1= stateno !=610
trigger2 = stateno = 52
trigger3 = statetype !=A
ID = 1

[State 2,1]
type = removeexplod
trigger1= stateno !=648
trigger2 = stateno = 52
trigger3 = statetype !=A
ID = 13

[State 2,1]
type = removeexplod
trigger1= stateno !=7690
trigger2 = stateno = 52
trigger3 = statetype !=A
ID = 6113


[State 2,1]
type = removeexplod
trigger1= stateno =50
ID = 850


[State -3, Variable correcta posicion]
type = VarSet
triggerall = WinKO
trigger1 = Anim = [5,6]
v = 1
value = 1


[State -2, Saber distancia p2]
type = VarSet
trigger1 = P2Dist X != 0
v = 2
value = floor(P2Dist X)



[State -2, Explod] 
type = Explod
trigger1 = time = 1
trigger1 = anim = 5300
anim = 5302
ID = 8000
postype = P1
pos = 0,0
sprpriority = 3
ontop = 1
removeongethit = 1
removetime = 200
bindtime = -1
scale = const(size.xscale),const(size.yscale)

[State -2, Explod fuera] 
type = Removeexplod
trigger1 = anim !=5300
ID = 8000





[State -2, var(28)]
type = VarSet
trigger1 = StateNo = 52
trigger2 = StateType != A
trigger3 = stateno!=240
trigger4 = stateno!=5400
trigger5 = stateno!=50
trigger6 = stateno!= 4500
v = 28
value = 0

[State -2]
type = VarSet
;trigger1 = command = "comboair"
trigger1 = stateno =240
trigger2 = stateno =5400
trigger3 = stateno =50
trigger4 = stateno = 4500
trigger5 = stateno = [600,660]
v = 28
value = 1

[State -3]
type = Stopsnd
trigger1 = p2stateno = 3200
channel = 20



[State -3, 1
type = Stopsnd
trigger1 = stateno != 195
channel = 30

[State -3, 2
type = Varset
trigger1 = p2life <=0
trigger2 = life = 0
trigger3 = wintime 
trigger4 = losetime
trigger5 = lose
trigger6 = win
trigger7 = winko
v = 22
value = 1

[State -2, 2]
type = Explod
triggerall = NumExplod(4898)=0
trigger1= anim = 4799
trigger1= time = 8
anim = 4898
ID = 4898
postype = p1
pos = 0, 0
bindtime = -1
ownpal = 1
removeongethit=1
spripriority = 3
under = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)


[State 3201, 1]
type = Explod
trigger1 = projhit344 = 1
anim = 6200
pos = 0,-40
facing = -1
postype = p2
bindtime = -1
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 3201, 1]
type = Explod
trigger1 = projhit345 = 1
anim = 6200
pos = 0,-36
facing = -1
postype = p2
bindtime = -1
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 3201, 1]
type = Explod
triggerall = NumExplod(123)=0
triggerall = var(52)=0
trigger1 = enemy,stateno = 422
trigger1 = p2movetype = H
ID = 123
anim = 123
pos = 0,0
facing = -1
postype = p2
bindtime = -1
ontop = 1
ownpal = 1
ontop = 1
removetime = 100
scale = const(size.xscale),const(size.yscale)


[State 3201, 1]
type = Removeexplod
trigger1 = stateno = 52
ID = 123


[State 3201, 1]
type = Varset
triggerall = statetype = A
trigger1 = anim = 4799
v = 38
value = 1

[State 3201, 38]
type = Varset
trigger1 = stateno = 52
trigger2 = StateType = S || StateType = C
v = 38
value = 0

[State 3201, 38]
type = Varset
trigger1 = command ="combo_aereo"
trigger1 = stateno =[6900,7200]
v = 52
value = 1


[State 3201, 38]
type = Varset
trigger1 = stateno = 52
trigger2 = StateType = S || StateType = C
trigger3 = MoveType = H
trigger4 = NumHelper(1)=1
trigger5 = NumHelper(3700)=1
v = 52
value = 0


[State -3, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 < 5
trigger1 = stateno = 5000
trigger1 = anim = 5000 || anim = 5010
trigger2 = stateno = 5010
trigger2 = anim = 5020
value = 310,0
channel = 0
ignorehitpause = 1


[State -3, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 311,0
channel = 0
ignorehitpause = 1


[State -2, Ayudante de Helper]
type = Helper
triggerall = p2life <=0
triggerall = NumHelper(3005) = 0
trigger1 = StateNo = 634 
trigger2 = StateNo = 612
trigger3 = StateNo = 203
trigger4 = StateNo = 257
trigger5 = StateNo = 435
trigger6 = StateNo = 405
trigger7 = StateNo = 465
trigger8 = StateNo = 6990
trigger9 = StateNo = 605
trigger10 = StateNo = 635
trigger11 = StateNo = 617
trigger12 = StateNo = 644
trigger13 = StateNo = 636
trigger14= StateNo = 654
trigger15= StateNo = 7690
name = "Death Bite" 
ID = 3005
StateNo = 8070
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)


[State -2, 2]
type = Explod
triggerall = NumExplod(80700)=0
trigger1 = stateno = 904
trigger1 = p2stateno = 5100
trigger2 = stateno = 924
trigger2 = p2stateno = 5110
anim = 8070
ID = 80700
postype = P2
pos = -12,3
sprpriority = -1
scale = const(size.xscale),const(size.yscale)

[State -2, 1]
type = Explod
triggerall = NumExplod(80710)=0
trigger1 = stateno = 904
trigger1 = p2stateno = 5100
trigger2 = stateno = 924
trigger2 = p2stateno = 5110
anim = 8071
ID = 80710
postype = P2
pos = -12,3
sprpriority = 1
scale = const(size.xscale),const(size.yscale)

[Statedef -3]

[State -3, VelAdd] ;to fall slower during super jump
type = VelAdd
trigger1 = Var(3) = 1 && Vel Y > 0
y = -0.15

[State -3, 1]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 106 
value = 1100, 0

[State 3,2]
type = Playsnd
triggerall= stateno = 4001
trigger1 = anim  =6001
trigger1 = animElem = 2,1
trigger2 = anim  =6002
trigger2 = animElem = 2,1
value = 1170,0
