[Data]
;Amount of life to start with
;体力ゲージの初期値
life = 1000
;attack power (more is stronger)
;攻撃ダメージ
attack = 100
;defensive power (more is stronger)
;体力パワー
defence = 100
;Percentage to increase defense everytime player is knocked down
fall.defence_up = 50
;Time which player lies down for, before getting up
liedown.time = 60
;Number of points for juggling
airjuggle = 15
;Default hit spark number for HitDefs
sparkno = 2
;Default guard spark number
guard.sparkno = 40
;1 to enable echo on KO
KO.echo = 0
;Volume offset (negative for softer)
volume = 0
;Variables with this index and above will not have their values
;reset to 0 between rounds or matches. There are 60 int variables,
;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
;If omitted, then it defaults to 60 and 40 for integer and float
;variables repectively, meaning that none are persistent, i.e. all
;are reset. If you want your variables to persist between matches,
;you need to override state 5900 from common1.cns.
IntPersistIndex = 30
FloatPersistIndex = 30

[Size]
xscale = 1           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 15     ;Player width (back, ground)
ground.front = 16    ;Player width (front, ground)
air.back = 12        ;Player width (back, air)
air.front = 12       ;Player width (front, air)
height = 60      ;Height of player (for opponent to jump over)
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too
head.pos = 10, -110   ;Approximate position of head
mid.pos = 5, -70    ;Approximate position of midsection
shadowoffset = 0     ;Number of pixels to vertically offset the shadow
draw.offset = 0,0    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2.4      ;Walk forward
walk.back = -2.2     ;Walk backward
run.fwd  = 4.6, 0    ;Run forward (x, y)
run.back = -4.5,-3.8 ;Hop backward (x, y)
jump.neu = 0,-8.4    ;Neutral jumping velocity (x, y)
jump.back = -2.55    ;Jump back Speed (x, y)
jump.fwd = 2.5       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -2.55      ;Air jump speeds (opt)
airjump.fwd = 2.5         ;.

[Movement]
airjump.num = 0     ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .44         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...

;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

;sombrero cae
[State 191]
type = Explod
trigger1 = animelem = 5
persistent = 0
anim = 171
postype = p1
pos = 18, -48
ownpal = 1
shadow = -1
accel = 0,0.32
removetime = 18
sprpriority = 2

;sombrero caido
[State 191]
type = Explod
trigger1 = time = 40
persistent = 0
anim = 172
postype = p1
pos = 18, 0
ownpal = 1
shadow = -1
removetime = -1
sprpriority = 2

[State 106, 3]
type = MakeDust
trigger1 = Time = 40
pos = 14,0
spacing = 1

[State 106, 3]
type = MakeDust
trigger1 = Time = 40
pos = 28,0
spacing = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 40
value = 40,0

[State 191, Snd 2]
type = PlaySnd
trigger1 = animelem = 6
value = 40,5
freqmul = 1.2

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

;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S

;SURVIVAL SCORE
[State 0, ChangeState]
type = ChangeState
trigger1 = !(enemynear, Authorname = "Andres Borghi")
value = 185
ctrl = 0

;ENDING VS FINAL
[State 0, ChangeState]
type = ChangeState
trigger1 = enemynear,name = "Final" && matchover && matchno >= 7
trigger1=!(teammode=simul)&&!(enemy,teammode=simul)
value = 4499
ctrl = 0

;ENDING TEAM MODE WALLPAPER
[State 0, ChangeState]
type = ChangeState
trigger1=teammode=simul && enemy,teammode=simul && !ishometeam
trigger1=matchover && matchno >= 5
value = 500
ctrl = 0

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

[State 180, a]
type = ChangeState
trigger1 = time >= 2
trigger1 = var(1) = 1
value = 181

[State 180, b]
type = ChangeState
trigger1 = time >= 2
trigger1 = var(1) = 2
value = 183

[State 180, b]
type = ChangeState
trigger1 = time >= 2
trigger1 = var(1) = 3
value = 185

;---------------------------------------------------------------------------
; Win pose 1
[Statedef 181]
type = S
ctrl = 0
velset = 0,0

[State 181, a]
type = changeanim
trigger1 = time = 33
value = 181

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 36
value = 0,1
freqmul = 0.9+(random/3333.3)

;margarita frontal
[State 191]
type = Explod
triggerall = frontedgedist > 160
trigger1 = time = 0
persistent = 0
anim = 182
postype = p1
pos = 53, 0
ownpal = 1
shadow = -1
sprpriority = -1

;salto frontal
[State 191]
type = Explod
triggerall = frontedgedist > 160
trigger1 = time = 36
anim = 42
postype = p1
pos = 0, 0
velocity = 1.2,-8
accel = 0,0.32
shadow = -1
removetime = 46

;margarita trasera
[State 191]
type = Explod
triggerall = frontedgedist <= 160
trigger1 = time = 0
persistent = 0
anim = 182
postype = p1
pos = -53, 0
ownpal = 1
shadow = -1
sprpriority = -1

;salto trasero
[State 191]
type = Explod
triggerall = frontedgedist <= 160
trigger1 = time = 36
anim = 42
postype = p1
pos = 0, 0
velocity = -1.1,-8
accel = 0,0.32
shadow = -1
removetime = 46

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

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 0
value = 40,5
freqmul = 0.8+(random/5000.0)

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 22
value = 0,3
volume = -100
freqmul = 1.1+(random/5000.0)

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 82
value = 1,1
volume = -120

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 82
value = 15,2
volume = -120
channel = 0

;---------------------------------------------------------------------------
; Win pose 2
[Statedef 183]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0 ,0

[State 181, a]
type = AssertSpecial
trigger1 = time < 290
flag = RoundNotOver

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

[State 181, a]
type = changeanim
trigger1 = time = 88
value = 183

[State 191, Snd 2]
type = PlaySnd
trigger1 = anim = 183 && animelem = 1
value = 1,1
freqmul = 1.4+(random/5000.0)
volume = -100


;amigo
[State 191]
type = Explod
trigger1 = time = 10
anim = 184
postype = p1
pos = 60, 0
shadow = -1

;polvo
[State 191]
type = Explod
trigger1 = time = 10
anim = 3057
postype = p1
pos = 60, 7
sprpriority = 2
scale = 0.3,0.3

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 10
value = 40,2
freqmul = 0.9+(random/5000.0)

[State 210, 1]
type = PlaySnd
trigger1 = time = 97
value = 10, 6
volume = 250
channel = 0

;---------------------------------------------------------------------------
; Win pose 3
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 191, Snd 2]
type = PlaySnd
trigger1 = animelem = 7
value = 100,4
freqmul = 0.9+(random/5000.0)

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 1]
type = explod
trigger1 = animelem = 7
pos = ceil(23+(random/72)),ceil(-100-(random/72))
sprpriority = 10
vel = 0+(random/200.0),0+(random/200.0)
accel = 0-(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

;---------------------------------------------------------------------------
; Intro state decider
[Statedef 191]
type = S

;intro full game
[State 180, 1]
type = ChangeState
trigger1 = P2name = "final" && matchno >= 7
trigger1=!(teammode=simul)&&!(enemy,teammode=simul)
value = 192

;intro vs himself
[State 180, 1]
type = ChangeState
trigger1 = P2name = "hashi"
trigger1 =!(teammode=simul)&&!(enemy,teammode=simul)
value = 300

[State 180, 1]
type = VarRandom
trigger1 = Roundstate = 0
v = 1
range = 1, 3

[State 180, a]
type = ChangeState
trigger1 = time >= 2
trigger1 = var(1) = 1
value = 198

[State 180, b]
type = ChangeState
trigger1 = time >= 2
trigger1 = var(1) = 2
value = 197

[State 180, b]
type = ChangeState
trigger1 = time >= 2
trigger1 = var(1) = 3
value = 199

;---------------------------------------------------------------------------
; Intro 1
[Statedef 197]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

[State 0, Helper]
type = Helper
trigger1 = !time
name = "florecita"
ID = 197
pos = 86,0
stateno = 4200
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 44
anim = 193
pos = 68,-100
vel = 5,-7
accel = 0,.3
removetime = 50
sprpriority = 3
shadow = -1
ownpal = 1

[State 200, 1]
type = PlaySnd
trigger1 = !time
value = 40, 4
freqmul = 1.2+(random/5000.0)
volume = 200
channel = 26

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 40
value = 15,0
channel = 0
freqmul = 0.9+(random/5000.0)

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 44
value = 0, 5
freqmul = 1.1+(random/5000.0)

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

;---------------------------------------------------------------------------
; Intro 2
[Statedef 198]
type = S
ctrl = 0
anim = 194
velset = 0,0

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

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

;arbol
[State 191,]
type = Explod
trigger1 = time = 1
persistent = 0
anim = 195
postype = p1
pos = 0, 0
shadow = -1
sprpriority = 1

[State 210, 1]
type = PlaySnd
trigger1 = Time = 158
value = 40, 2
volume = -100
freqmul = 0.7+(random/5000.0)

;polvo
[State 191]
type = Explod
trigger1 = time = 160
anim = 3057
postype = p1
pos = 0, 20
sprpriority = 2
scale = 1,0.5

[State 200, 1]
type = PlaySnd
trigger1 = time = 1
value = 15,1
channel = 26
freqmul = 0.9+(random/5000.0)

;zzzzzzzz
[State 191]
type = Explod
trigger1 = time = 1
trigger2 = time = 40
trigger3 = time = 80
anim = 196
postype = p1
pos = -30, -105
shadow = -1
sprpriority = 2
velocity = 0.8,-0.5

[State 200, 1]
type = PlaySnd
trigger1 = time = 110
value = 15,0
freqmul = 1.0+(random/5000.0)
channel = 0

;empieza salto
[State 191]
type = Explod
trigger1 = time = 140
anim = 40
postype = p1
pos = -20, -65
shadow = -1
sprpriority = 2

;salto
[State 191]
type = Explod
trigger1 = time = 143
anim = 42
postype = p1
pos = -20, -65
velocity = 0.8,-3
accel = 0,0.32
shadow = -1
removetime = 34
sprpriority = 2

[State 200, 1]
type = PlaySnd
trigger1 = time = 143
value = 0, 1
freqmul = 0.9+(random/5000.0)

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 100, 3
freqmul = 0.9+(random/5000.0)

;---------------------------------------------------------------------------
; Intro 3
[Statedef 199]
type = S
ctrl = 0
anim = 186
velset = 0,0

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

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

;teleport hashi
[State 191,]
type = Explod
trigger1 = time = 30
anim = 187
sprpriority = 3

;teleport bako
[State 191,]
type = Explod
trigger1 = time = 30
anim = 189
sprpriority = 3

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 30
value = 100,8
freqmul = 0.9+(random/5000.0)
volume = -100

;bako
[State 191,]
type = Explod
trigger1 = time = 66
anim = 188
sprpriority = 1
shadow = -1
pos = 60,0

[State 0, MakeDust]
type = MakeDust
trigger1 = time = 139
pos = 60,0
spacing = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 139
value = 40,2
freqmul = 0.9+(random/5000.0)
volume = -100

;escupida
[State 999, 7]
type = Projectile
trigger1 = AnimElem = 9
projanim = 198
projremanim = 199
projcancelanim = 199
velocity = -3, 1
accel = 0, 0.25
offset = -20,-100

;escupe
[State 191, Snd 2]
type = PlaySnd
trigger1 = animelem = 9
value = 40,9
freqmul = 1.2
channel = 0

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 5
value = 15,0
volume = -100
freqmul = 0.8+(random/3333.3)

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 12
value = 15,2
volume = -100
freqmul = 0.9+(random/5000.0)

;---------------------------------------------------------------------------
; Intro full game
[Statedef 192]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = time <= 890
flag = Intro

;bako
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 192
ID = 192
pos = -20,0
sprpriority = 2
shadow = -1
ownpal = 1

[State 0, MakeDust]
type = MakeDust
trigger1 = time = 890
pos = -20,0
spacing = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = time =  890
value = 40,2
freqmul = 0.9+(random/5000.0)
volume = -100

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 890
value = 0

;---------------------------------------------------------------------------
; Intro vs HIMSELF
[Statedef 300]
type = S
ctrl = 0
anim = 9123000
velset = 0,0

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

[State 0, Helper]
type = Helper
trigger1 = !time
name = "himself"
stateno = 301
pos = ifelse(facing = 1,100,220),0
postype = left
facing = ifelse(facing = 1,1,-1)

[State 191, 3]
type = Changeanim
trigger1 = time = 263
value = 47

[State 0, MakeDust]
type = MakeDust
trigger1 = anim = 47 && animelem = 1
spacing = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 47 && animelem = 1
value = 100,3
freqmul = 0.9+(random/3333.3)

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 47 && animtime = 0
value = 0

;---------------------------------------------------------------------------
; Intro vs HIMSELF
[Statedef 301]
type = S
ctrl = 0
anim = ifelse(facing = 1,300,301)
velset = 0,0

;teleport hashi
[State 191,]
type = Explod
trigger1 = time = 30
anim = 187
sprpriority = 3

;teleport bako
[State 191,]
type = Explod
trigger1 = time = 30 && facing = 1
anim = 189
sprpriority = 3

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 30 && facing = 1
value = 100,8
freqmul = 0.9+(random/5000.0)
volume = -100

;bako
[State 191,]
type = Explod
trigger1 = time = 66 && facing = 1
anim = 188
sprpriority = 1
shadow = -1
pos = 60,0

[State 0, MakeDust]
type = MakeDust
trigger1 = time = 139 && facing = 1
pos = 60,0
spacing = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 139 && facing = 1
value = 40,2
freqmul = 0.9+(random/5000.0)
volume = -100

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 6
value = 15,0
freqmul = 0.8+(random/3333.3)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 300 && animtime = 0
trigger2 = anim = 301 && animtime = 0
value = 41

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 41 && animelem = 1
value = 0,2
freqmul = 0.9+(random/3333.3)

;busca cuerpo
[State 191, Snd 2]
type = velset
trigger1 = anim = 41 && animelem = 1
x = ((rootdist x)/15.0)

[State 0, VelSet]
type = VelSet
trigger1 = anim = 41 && animelem = 1
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = anim = 41
y = .3

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

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

;escupida
[State 999, 7]
type = Projectile
trigger1 = AnimElem = 3
projanim = 198
projremanim = 199
projcancelanim = 199
velocity = -3, 1
accel = 0, 0.25    
offset = -20,-100

;escupe
[State 191, Snd 2]
type = PlaySnd
trigger1 = animelem = 3
value = 40,9
freqmul = 1.2
channel = 0


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

;---------------------------------------------------------------------------
; ENDING WALLPAPER
[Statedef 500]
type = S
ctrl = 0
velset = 0,0

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = noBG
flag3 = noFG

[State 182, 1]
type = AssertSpecial
trigger1 = time < 800
flag = roundnotover

;WALLPAPER 05
[State 3900, 1]
type = Explod
trigger1 = !time && partner, name = "peketo"
anim = f 3005
pos = 0,0
postype = left
ownpal = 1
sprpriority = 6
removetime = -1

;PASS 05
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "peketo"
anim = f 3105
pos = 161,201
postype = left
ownpal = 1
sprpriority = 7
removetime = -1

;LETRA 05
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "peketo"
anim = f 3209
pos = 177,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 05
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "peketo"
anim = f 3227
pos = 186,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 05
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "peketo"
anim = f 3214
pos = 195,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 05
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "peketo"
anim = f 3221
pos = 204,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;WALLPAPER 10
[State 3900, 1]
type = Explod
trigger1 = !time && partner, name = "ananzi"
anim = f 3010
pos = 0,0
postype = left
ownpal = 1
sprpriority = 6
removetime = -1

;PASS 10
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "ananzi"
anim = f 3110
pos = 161,201
postype = left
ownpal = 1
sprpriority = 7
removetime = -1

;LETRA 10
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "ananzi"
anim = f 3205
pos = 177,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 10
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "ananzi"
anim = f 3219
pos = 186,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 10
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "ananzi"
anim = f 3224
pos = 195,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 10
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "ananzi"
anim = f 3213
pos = 204,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 10
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "ananzi"
anim = f 3205
pos = 213,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;WALLPAPER 14
[State 3900, 1]
type = Explod
trigger1 = !time && partner, name = "animus"
anim = f 3014
pos = 0,0
postype = left
ownpal = 1
sprpriority = 6
removetime = -1

;PASS 14
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "animus"
anim = f 3114
pos = 161,201
postype = left
ownpal = 1
sprpriority = 7
removetime = -1

;LETRA 14
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "animus"
anim = f 3227
pos = 177,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 14
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "animus"
anim = f 3214
pos = 186,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 14
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "animus"
anim = f 3219
pos = 195,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 14
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "animus"
anim = f 3215
pos = 204,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 14
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "animus"
anim = f 3227
pos = 213,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;WALLPAPER 17
[State 3900, 1]
type = Explod
trigger1 = !time && partner, name = "shar-makai"
anim = f 3017
pos = 0,0
postype = left
ownpal = 1
sprpriority = 6
removetime = -1

;PASS 17
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "shar-makai"
anim = f 3117
pos = 161,201
postype = left
ownpal = 1
sprpriority = 7
removetime = -1

;LETRA 17
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "shar-makai"
anim = f 3217
pos = 177,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 17
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "shar-makai"
anim = f 3227
pos = 186,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 17
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "shar-makai"
anim = f 3214
pos = 195,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 17
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "shar-makai"
anim = f 3224
pos = 204,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 17
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "shar-makai"
anim = f 3227
pos = 213,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;WALLPAPER 19
[State 3900, 1]
type = Explod
trigger1 = !time && partner, name = "hashi"
anim = f 3019
pos = 0,0
postype = left
ownpal = 1
sprpriority = 6
removetime = -1

;PASS 19
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "hashi"
anim = f 3119
pos = 161,201
postype = left
ownpal = 1
sprpriority = 7
removetime = -1

;LETRA 19
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "hashi"
anim = f 3207
pos = 177,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 19
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "hashi"
anim = f 3209
pos = 186,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 19
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "hashi"
anim = f 3220
pos = 195,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 19
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "hashi"
anim = f 3207
pos = 204,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 19
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "hashi"
anim = f 3227
pos = 213,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 19
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "hashi"
anim = f 3219
pos = 222,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 19
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "hashi"
anim = f 3227
pos = 231,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;WALLPAPER 20
[State 3900, 1]
type = Explod
trigger1 = !time && partner, name = "noroko"
anim = f 3020
pos = 0,0
postype = left
ownpal = 1
sprpriority = 6
removetime = -1

;PASS 20
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "noroko"
anim = f 3120
pos = 161,201
postype = left
ownpal = 1
sprpriority = 7
removetime = -1

;LETRA 20
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "noroko"
anim = f 3213
pos = 177,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 20
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "noroko"
anim = f 3214
pos = 186,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;LETRA 20
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "noroko"
anim = f 3227
pos = 195,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

;NEGRO IN
[State 3900, 1]
type = Explod
trigger1 = !time
anim = f 4510
pos = 0,0
postype = left
ownpal = 1
sprpriority = 7

;PELICULA VIEJA
[State 3900, 1]
type = Explod
trigger1 = !time
anim = f 4505
pos = 160,0
postype = left
ownpal = 1
sprpriority = 8
removetime = -1

;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
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 = 200                       ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 20

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 23, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 4, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -76               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -4             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
getpower = 13.8*!var(10)

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0
freqmul = 0.9+(random/3333.3)

;anti light attacks super combos
[State 0, VarAdd]
type = VarAdd
trigger1 = !time
var(25)=1


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

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 65, -73
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = 210
sprpriority = -1

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 65

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (7) < 0)
value = 15,0

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 0, 2
freqmul = 0.9+(random/3333.3)

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 6

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Light
damage    = 21
guardflag = MA
pausetime = 7,10
sparkno = 0
sparkxy = -10,-80
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5.5
air.velocity = -2.5,-4
getpower = 13.8*!var(10)
envshake.time = 7
envshake.ampl = 2
priority = 4, Hit

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Medium
damage    = 21
guardflag = MA
pausetime = 7,10
sparkno = ifelse((enemynear,name = "noroko" && enemynear,var(10)=1),1,7004)
sparkxy = -15,-80
hitsound   = s6,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5.5
air.velocity = -2.5,-4
getpower = 13.8*!var(10)
envshake.time = 7
envshake.ampl = 3
priority = 4, Hit

[State 0, MoveHitReset]
type = MoveHitReset
trigger1 = animelem = 5

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype  = Heavy
damage    = 21
guardflag = MA
pausetime = 7,10
sparkno = ifelse((enemynear,name = "noroko" && enemynear,var(10)=1),2,7005)
sparkxy = -20,-80
hitsound   = s6,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5.5
air.velocity = -2.5,-4
getpower = 13.8*!var(10)
envshake.time = 7
envshake.ampl = 5
priority = 4, Hit

;sangre volatil
[State 0, Helper]
type = Helper
trigger1 = movehit && animelemtime(5)=1 && random < 70
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
name = "sangre volatil"
ID = 6101
stateno = 6101
pos = 95,-83
ownpal = 1
ignorehitpause = 1
persistent = 0

;sangre volatil
[State 0, Helper]
type = Helper
trigger1 = movehit && animelemtime(5)=1 && random < 70
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
name = "sangre volatil"
ID = 6101
stateno = 6101
pos = 95,-83
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

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

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 80, -81
ownpal = 1
persistent = 0
ignorehitpause = 1

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

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 22

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1
freqmul = 0.9+(random/3333.3)

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 26
guardflag = MA
pausetime = 12,12
sparkno = 0
sparkxy = -10,-37
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -5
air.velocity = -2.5,-3.5
getpower = 15.6*!var(10)
priority = 4, Hit

;anti light attacks super combos
[State 0, VarAdd]
type = VarAdd
trigger1 = !time
var(25)=1

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

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 46, -47
ownpal = 1
persistent = 0
ignorehitpause = 1

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

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 65

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 40,6

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 10,3
freqmul = 0.9+(random/3333.3)
channel = 0

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 0,2
freqmul = 0.9+(random/3333.3)

[State 240, 2]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
animtype  = Light
damage    = 22
guardflag = MA
pausetime = 7,10
sparkno = ifelse(random<500,0,1)
sparkxy = -10,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.velocity = -2.2,-3.2
getpower = 13.8*!var(10)
envshake.time = 7
envshake.ampl = 5
priority = 4, Hit

[State 240, 2]
type = HitDef
trigger1 = animelem = 4
attr = S, NA
animtype  = Medium
damage    = 22
guardflag = MA
pausetime = 7,10
sparkno = ifelse(random<500,0,1)
sparkxy = -10,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.velocity = -2.2,-3.2
getpower = 13.8*!var(10)
envshake.time = 7
envshake.ampl = 5
priority = 4, Hit

[State 240, 2]
type = HitDef
trigger1 = animelem = 5
attr = S, NA
animtype  = Heavy
damage    = 22
guardflag = MA
pausetime = 7,10
sparkno = ifelse(random<500,0,1)
sparkxy = -10,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.velocity = -2.2,-3.2
getpower = 13.8*!var(10)
envshake.time = 7
envshake.ampl = 5
priority = 4, Hit

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

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 65, -73
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
ctrl = 0
anim = 400
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 15

[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0
freqmul = 0.9+(random/3333.3)

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 23
priority = 4, Hit
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = 0
sparkxy = -10,-42
hitsound   = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1.5,-3
getpower = 13.8*!var(10)

;anti light attacks super combos
[State 0, VarAdd]
type = VarAdd
trigger1 = !time
var(25)=1

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

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 65, -46
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Crouching strong punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
ctrl = 0
anim = 410
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 50

[State 410, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 0, 3
freqmul = 0.9+(random/3333.3)

[State 410, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 50
animtype  = UP
hitflag = MAF
guardflag = M
sparkno = 1
sparkxy = -10,-75
hitsound = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -2,-9
air.velocity = -2,-9
Fall = 1
envshake.time = 10
envshake.ampl = 7
getpower = 34.2*!var(10)
pausetime = 0,8
priority = 4, Hit

[State 220, 3]
type = changeanim
value = 4100
trigger1 = Movehit
persistent = 0

[State 400, 1]
type = PlaySnd
trigger1 = anim = 4100 & animelem = 1
value = 40,13
volume = 256
ignorehitpause = 1

[State 1200, pomponito 1]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 2]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 3]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 4]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 5]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 6]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 7]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 8]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 9]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

[State 1200, pomponito 10]
type = explod
trigger1 = anim = 4100 && animelem = 1
pos = ceil(42+(random/72)),ceil(-134-(random/72))
sprpriority = 10
vel = 0-(random/200.0),0+(random/200.0)
accel = 0+(random/5000.0),0-(random/5000.0)
removetime = 200
anim = 4101

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

;variable para aerial rave
[State 0, VarSet]
type = VarSet
trigger1 = movehit
v =  15
value = 1
ignorehitpause = 1
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = anim = 4100 && animelemtime(1) = 15
v =  15
value = 0

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 70, -46
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Crouching light kick
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
ctrl = 0
anim = 430
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 22

[State 430, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1
freqmul = 0.9+(random/3333.3)

[State 430, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 28
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = 0
sparkxy = -10,-8
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20
getpower = 16.8*!var(10)
priority = 4, Hit

;anti light attacks super combos
[State 0, VarAdd]
type = VarAdd
trigger1 = !time
var(25)=1

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

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 50, -46
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 440
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 70

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 40,6
freqmul = 0.8

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 0,2
freqmul = 0.9+(random/3333.3)

[State 440, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 72
hitflag = MAFD
guardflag = L
pausetime = 7,10
sparkno = 1
sparkxy = -5,-10
hitsound   = 5,2
guardsound = 6,0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
guard.velocity = -5
fall = 1
getpower = 43.2*!var(10)
envshake.time = 7
envshake.ampl = 5
priority = 4, Hit

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

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 50, -46
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Jump Light Punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 600
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 11

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0
freqmul = 0.9+(random/3333.3)

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 20
guardflag = HA
priority = 4, Hit
pausetime = 7,8
sparkno = 0
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3
getpower = 12.0*!var(10)

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

;anti light attacks super combos
[State 0, VarAdd]
type = VarAdd
trigger1 = !time
var(25)=1

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 53, -54
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Jump Strong Punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 610
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 65

[State 1000, 1]
type = PlaySnd
trigger1 = time = 2
value = 10,2
volume = -50
channel = 0
freqmul = 0.9+(random/3333.3)

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2
freqmul = 0.9+(random/3333.3)

[State 610, 3]
type = HitDef
trigger1 = animelem = 2
attr = A, NA
damage = 30
guardflag = HA
priority = 4, Hit
pausetime = 5,5
sparkno = ifelse((enemynear,name = "noroko" && enemynear,var(10)=1),1,7004)
sparkxy = -15,-55
hitsound   = s6,1
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -3,-4
getpower = 21.0*!var(10)
envshake.time = 7
envshake.ampl = 5

[State 610, 3]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage = 44
guardflag = HA
priority = 4, Hit
pausetime = 8,8
sparkno = ifelse((enemynear,name = "noroko" && enemynear,var(10)=1),2,7009)
sparkxy = -20,-55
hitsound   = s6,2
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6
air.velocity = -6,4
fall = 1
getpower = 21.0*!var(10)
envshake.time = 7
envshake.ampl = 5

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 53, -54
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Jump Light Kick
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 630
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 20

[State 630, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1
freqmul = 0.9+(random/3333.3)

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 26
guardflag = HA
priority = 4, Hit
pausetime = 8,8
sparkno = 1
sparkxy = -5,-35
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -4
air.velocity = -2,-3
getpower = 15.6*!var(10)

;anti light attacks super combos
[State 0, VarAdd]
type = VarAdd
trigger1 = !time
var(25)=1

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 53, -54
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Jump Strong Kick
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 7
ctrl = 0
anim = 640
sprpriority = 2

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(10) = 0
trigger1 = !time
value = 65

[State 640, 2]
type = PlaySnd
trigger1 = animelem = 3
value = 0, 2
freqmul = 0.9+(random/3333.3)

[State 640, 2]
type = PlaySnd
trigger1 = animelem = 3
value = 10, 0
channel = 0
freqmul = 0.9+(random/3333.3)

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 70
guardflag = HA
priority = 4, Hit
pausetime = 5,5
sparkno = 1
sparkxy = -15,-40
hitsound   = 5,3
guardsound = 6,0
animtype = Up
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,-4
air.velocity = -5,-4
fall = 1
getpower = 42.0*!var(10)
envshake.time = 7
envshake.ampl = 5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact
value = 640
elem = 5
ignorehitpause = 1
persistent = 0

;espina p1 - 1
[State 191]
type = Explod
trigger1 = movehit
persistent = 0
anim = 4110
postype = p1
pos = 50, -100
velocity = -2, -4
accel = 0, .22
removetime = 100
ontop = 1

;espina p1 - 2
[State 191]
type = Explod
trigger1 = movehit
persistent = 0
anim = 4111
postype = p1
pos = 45, -110
velocity = -1, -5
accel = 0, .22
removetime = 100
ontop = 1

;espina p1 - 3
[State 191]
type = Explod
trigger1 = movehit
persistent = 0
anim = 4110
postype = p1
pos = 55, -102
velocity = 0, -4.5
accel = 0, .22
removetime = 100
ontop = 1

;espina p1 - 4
[State 191]
type = Explod
trigger1 = movehit
persistent = 0
anim = 4111
postype = p1
pos = 53, -90
velocity = 0.7, -4.3
accel = 0, .22
removetime = 100
ontop = 1

;df - fruto
[State 1200, pomponito 2]
type = Helper
trigger1 = var(10)=1 && movehit && numhelper(3500)=0
name = "fruto especial"
ID = 3500
stateno = 3505
postype = p1
pos = 53, -54
ownpal = 1
persistent = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;Throw 1 - Attempt (punch)
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents KFM from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
;p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face KFM
p1stateno = 810       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
;Throw 1 - p1
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810]
type = sprpriority
trigger1 = time = 0
value = 3

;mano agarrando cuello
[State 191]
type = Explod
trigger1 = animelem = 2
persistent = 0
anim = 811
postype = p1
pos = 0, 0
sprpriority = 1
shadow = -1

[State 610, 2]
type = PlaySnd
trigger1 = !time
value = 1,1

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

;semilla voladora
[State 191]
type = Explod
trigger1 = animelem = 11
persistent = 0
anim = 812
postype = p1
pos = 0, -98
sprpriority = 4
velocity = 2.5, -6
accel = 0, .32
removetime = 34
ownpal = 1
shadow = -1

[State 610, 2]
type = PlaySnd
trigger1 = animelem = 11
value = 0, 5

;gotita de saliva 1
[State 191]
type = Explod
trigger1 = animelemtime(11)= 33
persistent = 0
anim = 813
postype = p1
pos = 80, -125
sprpriority = 4
velocity = -1.5, -3
accel = 0, .32
removetime = 12
ownpal = 1
shadow = -1

;gotita de saliva 2
[State 191]
type = Explod
trigger1 = animelemtime(11)= 33
persistent = 0
anim = 813
postype = p1
pos = 80, -125
sprpriority = 4
velocity = -1.7, -2
accel = 0, .32
removetime = 12
ownpal = 1
shadow = -1

[State 610, 2]
type = PlaySnd
trigger1 = animelemtime(11)= 33
value = 40, 3

[State 610, 2]
type = PlaySnd
trigger1 = time = 108
value = 40, 1
channel = 4
volume = -100

[State 610, 2]
type = PlaySnd
trigger1 = animelemtime(11)= 122
value = 6, 2
channel = 4

[State 0, Helper]
type = Helper
trigger1 = animelemtime(11)= 122
name = "arbol"
pos = 80,-125
stateno = 812
ownpal = 1

;sangre
[State 191]
type = Explod
trigger1 = animelemtime(11)= 122
anim = 910
pos = 80, -125
sprpriority = 5
ownpal = 1
shadow = -1
scale = 0.5,0.5
facing = -1

;sangre
[State 191]
type = Explod
trigger1 = animelemtime(11)= 122
trigger2 = animelemtime(11)= 177
anim = f ifelse(random<500,7004,7005)
pos = 80, -125
sprpriority = 5
ownpal = 1
shadow = -1
facing = ifelse(random<500,-1,1)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 12
value = 0,3

[State 810, Width 2-11]
type = Width
trigger1 = !time
edge = 80,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 = !time
time = 100
pos = 72, 0

[State 810, Throw 11]
type = Targetlifeadd
trigger1 = animelemtime(11)= 122
value = -150

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

;-----------------------------------------------------
;arbol throw
[Statedef 812]
type    = A
movetype= I
physics = N
anim = 814
sprpriority = 4

[State 610, 2]
type = PlaySnd
trigger1 = !time
value = 40, 10

[State 4500, 2.5]
type = EnvShake
Trigger1 = !time
trigger2 = anim = 816 && animelemtime(1) = 1
time = 10
ampl = 4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 55
value = 815

[State 610, 2]
type = PlaySnd
trigger1 = anim = 815
value = 40, 11
persistent = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = anim = 815
y = .3

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >= -10 && vel y > 0
value = 816

[State 0, VelSet]
type = VelSet
trigger1 = anim = 816
y = 0

[State 0, posSet]
type = posset
trigger1 = anim = 816
y = 0

;polvo
[State 191]
type = Explod
trigger1 = anim = 816
anim = 3057
postype = p1
pos = -45, 0
sprpriority = 5
scale = 0.6,0.4
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 815
value = 40, 12
volume = 160
freqmul = 0.8
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 816
value = 6, 1
freqmul = 0.8
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = anim = 816 && animtime = 0


;---------------------------------------------------------------------------
;throw 1 - p2
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 810]
type = sprpriority
trigger1 = !time
value = 2

;ES Peketo DF
[State 700, 10]
type = Changeanim
trigger1 = !time
trigger1 = name = "peketo" && var(10)=1
value = 6260

[State 820, 1]
type = ChangeAnim2
Trigger1 = !time && anim != 6260
value = 820

[State 0, target sufre sound]
type = PlaySnd
triggerall = Authorname = "Andres Borghi"
trigger1 = anim = 820
trigger1 = animelem = 28
trigger1 = life >= 151
value = 11,ifelse(random<333,1,ifelse(random<500,2,3))
channel = 15
volume = ifelse(name = "shar-makai",-70,ifelse(name = "noroko", 200,20))
freqmul = 0.9+(random/3333.3)

;anti-error
[State 821, 4] ;Hit ground
type = SelfState
trigger1 = animtime = 0
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
;Throw 2 -attempt (kick)
[Statedef 830]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
;p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face KFM
p1stateno = 831       ;On success, KFM changes to state 810
p2stateno = 840       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
;Throw 2 - p1
[Statedef 831]
type    = S
movetype= A
physics = N
anim = 831
poweradd = 60
sprpriority = 2

[State 810, Width 2-11]
type = Width
trigger1 = !time
edge = 80,0

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

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 80,-105

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 2
pos = 78,-104

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 3
pos = 58,-100

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 4
pos = 34,-82

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 5
pos = 58,-100

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 6
pos = 78,-104

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 832
bindtime = -1
sprpriority = 0
shadow = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 10,0
freqmul = 1.1
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 40,12
freqmul = 1.3

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 4
time = 10

[State 810, Throw 11]
type = Targetlifeadd
trigger1 = animelem = 4
value = -150

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 910
bindtime = -1
sprpriority = 0
shadow = -1
pos = 35,-71

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 100,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 6,2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 10,2
freqmul = .8
channel = 0

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

;---------------------------------------------------------------------------
;throw 2 - p2
[Statedef 840]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 810]
type = sprpriority
trigger1 = !time
value = 0

;ES Peketo DF
[State 700, 10]
type = Changeanim
trigger1 = !time
trigger1 = name = "peketo" && var(10)=1
value = 6261

[State 820, 1]
type = ChangeAnim2
Trigger1 = !time && anim != 6261
value = 840

[State 0, target sufre sound]
type = PlaySnd
triggerall = Authorname = "Andres Borghi"
trigger1 = anim = 840
trigger1 = animelem = 2
trigger1 = life >= 151
value = 11,ifelse(random<333,1,ifelse(random<500,2,3))
channel = 15
volume = ifelse(name = "shar-makai",-70,ifelse(name = "noroko", 200,20))
freqmul = 0.9+(random/3333.3)

[State 820, 1]
type = Changestate
Trigger1 = time = 65
value = 841
ctrl = 0

;---------------------------------------------------------------------------
;throw 2 - p2 - vuela
[Statedef 841]
type    = A
movetype= H
physics = N
velset = -5,-4
poweradd = 40

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

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = -10

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .32

;ES Peketo DF
[State 700, 10]
type = Changeanim
trigger1 = !time && anim = 6261
value = 6262

[State 820, 1]
type = ChangeAnim2
Trigger1 = !Time && anim != 6262
value = 841

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

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
; Abanico natural fuerte
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 9
value = 0, 3
freqmul = 0.9+(random/3333.3)

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 9
value = 40, 12
volume = 256
freqmul = 1.0+(random/3333.3)

[State 1000, 5] 
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Up
damage    = 55, 3
priority = 4, Hit
guardflag = MA
pausetime = 10,14
sparkxy = -20,-90
hitsound   = s6,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -2,-7
air.velocity = -2,-5
fall = 1
fall.recover = 0
envshake.time = 10
envshake.ampl = 8

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && animelemtime(4)=1
value = 1000
elem = 5
ignorehitpause = 1

[State 0, MoveHitReset]
type = MoveHitReset
trigger1 = AnimElem = 9

[State 1000, 5]
type = HitDef
trigger1 = AnimElem = 9
attr = S, SA
animtype  = Up
damage    = 55, 3
priority = 4, hit
guardflag = MA
pausetime = 20,10
guard.pausetime = 15,10
sparkxy = -20,-100
hitsound   = s6,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6,-7
air.velocity = -6,-6
fall = 1
fall.recover = 0
envshake.time = 10
envshake.ampl = 8
id = 1000
p2facing = 1

[State 3300, p2state]
type=targetstate
trigger1 = movehit && numtarget(1000)
ID=1000
value=1001
persistent = 0
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && animelemtime(9)=1
value = 1000
elem = 10
ignorehitpause = 1

[State 1000, 6]
type = veladd
trigger1 = AnimElem = 1
x = 5

[State 1000, 6]
type = veladd
trigger1 = AnimElem = 6
x = 5

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

;---------------------------------------------------------------------------
; Abanico natural debil
[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1010
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 7
value = 0, 3
freqmul = 0.9+(random/3333.3)

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 7
value = 40, 12
volume = 256
freqmul = 1.0+(random/3333.3)

[State 1000, 5]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Up
damage    = 75, 3
priority = 4, hit
guardflag = MA
pausetime = 20,10
guard.pausetime = 15,10
sparkxy = -20,-100
hitsound   = s6,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6,-7
air.velocity = -6,-6
fall = 1
fall.recover = 0
envshake.time = 10
envshake.ampl = 8
id = 1000
p2facing = 1

[State 3300, p2state]
type=targetstate
trigger1 = movehit && numtarget(1000)
ID=1000
value=1001
persistent = 0
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && animelemtime(7)=1
value = 1010
elem = 8
ignorehitpause = 1

[State 1000, 6]
type = veladd
trigger1 = AnimElem = 3
x = 5

[State 1000, 6]
type = posadd
trigger1 = AnimElem = 3
x = 7

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

;-------------------
; golpeado por Abanico natural
[Statedef 1001]
type    = A
physics = N
movetype= H
ctrl = 0
velset = 0,0

[State 0, PosAdd]
type = PosAdd
trigger1 = !time
y = -50

;ES Peketo DF
[State 700, 10]
type = Changeanim
trigger1 = !time
trigger1 = name = "peketo" && var(10)=1
value = 6263

[State 820, 1]
type = changeanim2
trigger1 = !time && anim != 6263
value = 1001

[State 0, target sufre sound]
type = PlaySnd
trigger1 = Authorname = "Andres Borghi"
trigger1 = anim = 1001
trigger1 = life >= 44
trigger1 = !time
trigger1 = anim = 1001
value = 11,ifelse(random<333,1,ifelse(random<500,2,3))
channel = 15
volume = ifelse(name = "shar-makai",-70,20)
freqmul = 0.9+(random/3333.3)

;es peketo DF
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 6263 && animtime = 0
value = 6264

[State 820, 1]
type = changeanim2
trigger1 = anim = 1001 && animtime = 0
value = 1002

[State 0, VelSet]
type = VelSet
trigger1 = (anim = 1002)||(anim = 6264)
x = -7
y = -6
persistent = 0

[State 820, 3.2];Gravity
type = veladd
trigger1 = (anim = 1002)||(anim = 6264)
y = .5

[State 820, 5]
type = Envshake
trigger1 = pos y >= -20
trigger1 = vel y > 0
time = 10
ignorehitpause = 1

[State 820, 6]
type = Selfstate
trigger1 = pos y >= -20
trigger1 = vel y > 0
value = 5100
ignorehitpause = 1

;---------------------------------------------------------------------------
; sembrado cerca
[Statedef 1100]
type    = S
movetype= I
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

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

[State 1200, helper]
type = Helper
trigger1 = AnimElem = 4
name = "semilla"
ID = 300
stateno = 1101
postype = p1
pos = 40,-60
sprpriority = 4
ownpal = 1

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

;---------------------------------------------------------------------------
; sembrado lejos
[Statedef 1103]
type    = S
movetype= I
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

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

[State 1200, helper]
type = Helper
trigger1 = AnimElem = 4
name = "semilla"
ID = 301
stateno = 1101
postype = p1
pos = 40,-60
sprpriority = 4
ownpal = 1

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

;----------------------------
;semilla (helper)
[Statedef 1101]
type    = A
movetype= I
physics = N
juggle  = 1
ctrl = 0
velset = ifelse(ishelper(300),2.3,5.5),-6
anim = 812
sprpriority = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = anim = 812
y = .41

[State 220, 3]
type = DestroySelf
trigger1 = anim = 812 && FrontEdgeBodyDist <= -100

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 812 && pos y >=-7 && vel y >0
value = 1101

[State 106, 3]
type = MakeDust
trigger1 = anim = 1101 && animelem = 1
trigger2 = anim = 1101 && animelem = 17
spacing = 1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1101
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = anim = 1101 && animelem = 1
y = 0

[State 191, Snd 2]
type = PlaySnd
trigger1 = anim = 1101 && animelem = 1
value = 40,0

[State 4500, 2.5] ;Shake cuando sale arbol
type = EnvShake
Trigger1 = anim = 1101 && animelem = 2
time = 5
ampl = 4

;ondita
[State 0, Explod]
type = Explod
Trigger1 = anim = 1101 && animelem = 2
anim = f 61
sprpriority = 0
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
Trigger1 = anim = 1101 && animelem = 2
value = 0,3
freqmul = 0.9+(random/3333.3)

[State 0, PlaySnd]
type = PlaySnd
Trigger1 = anim = 1101 && animelem = 10
Trigger2 = anim = 1101 && animelem = 15
value = 40,6
freqmul = 1.7+(random/3333.3)

[State 191, Snd 2]
type = PlaySnd
trigger1 = anim = 1101 && animelem = 11
value = 200,1
volume = -50
freqmul = 0.9+(random/3333.3)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1101 && animelem = 1
movetype = A

[State 1000, 5]
type = HitDef
trigger1 = anim = 1101 && AnimElem = 10
attr = S, SP
animtype  = heavy
damage    = 50, 3
priority = 4, Hit
guardflag = MA
sparkno = ifelse((enemynear,name = "noroko" && enemynear,var(10)=1)||(enemynear,name = "animus" && enemynear,stateno = 3100),1,ifelse(random<500,7008,7009))
sparkxy = -4,-60
hitsound   = -1
guardsound = 6,0
ground.type = High
ground.velocity = 4.5,-7
air.velocity = 4.5,-6
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 10
envshake.ampl = 8
pausetime = 0,7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(12)=1 && movehit
value = 6,1
freqmul = 0.8
persistent = 0
ignorehitpause = 1

[State 0, MoveHitReset]
type = MoveHitReset
trigger1 = animelem = 13

[State 1000, 5]
type = HitDef
trigger1 = anim = 1101 && AnimElem = 13
attr = S, SP
animtype  = heavy
damage    = 50, 3
priority = 4, Hit
guardflag = MA
pausetime = 7,7
sparkno = ifelse((enemynear,name = "noroko" && enemynear,var(10)=1)||(enemynear,name = "animus" && enemynear,stateno = 3100),2,ifelse(random<500,7008,7009))
sparkxy = -4,-60
hitsound   = s 6,1
guardsound = 6,0
ground.type = High
ground.velocity = -2,-8
air.velocity = -2,-8
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 10
envshake.ampl = 8

[State 191, Snd 2]
type = PlaySnd
trigger1 = anim = 1101 && animelem = 15
value = 200,2
volume = -50
freqmul = 0.9+(random/3333.3)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 14
movetype = I

[State 220, 3]
type = DestroySelf
trigger1 = anim = 1101 && animtime = 0

;--------------------------------------------
;fruti-toss bajo
[Statedef 1200]
type = S
ctrl = 0
velset = 0,0
poweradd= 110
sprpriority = 1

[State 180, 1]
type = VarRandom
trigger1 = !time
v = 1
range = 1, 5

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 1
trigger1 = !time
value = 1200

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 2
trigger1 = !time
value = 1210

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 3
trigger1 = !time
value = 1220

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 4
trigger1 = !time
value = 1230

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 5
trigger1 = !time
value = 1240

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 10,ifelse(random<500,1,2)
channel = 0
freqmul = 0.9+(random/3333.3)

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 3
freqmul = 0.9+(random/3333.3)

[State 1200, helper]
type = Helper
trigger1 = AnimElem = 4
name = "fruta"
ID = 1200
stateno = 1202
postype = p1
pos = 49,-28
sprpriority = 2
ownpal = 1

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

;--------------------------------------------
;fruti-toss alto
[Statedef 1300]
type = S
ctrl = 0
velset = 0,0
poweradd= 110
sprpriority = 1

[State 0, VarSet]
type = VarSet
trigger1 = !time
var(2)=1

[State 180, 1]
type = VarRandom
trigger1 = !time
v = 1
range = 1, 5

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 1
trigger1 = !time
value = 1200

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 2
trigger1 = !time
value = 1210

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 3
trigger1 = !time
value = 1220

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 4
trigger1 = !time
value = 1230

[State 1000, 7]
type = Changeanim
trigger1 = var(1) = 5
trigger1 = !time
value = 1240

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 10,ifelse(random<500,1,2)
channel = 0
freqmul = 0.9+(random/3333.3)

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 3
freqmul = 0.9+(random/3333.3)

[State 1200, helper]
type = Helper
trigger1 = AnimElem = 4
name = "fruta"
ID = 1200
stateno = 1202
postype = p1
pos = 49,-28
sprpriority = 2
ownpal = 1

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

;----------------------------
;fruta voladora (helper)
[Statedef 1202]
type    = A
movetype= A
physics = N
juggle  = 4
ctrl = 0
velset = 6.8,ifelse((root,var(2)=1),-11,-7)

[State 1005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1203
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse((parent,anim=1200),1202,ifelse((parent,anim=1210),1212,ifelse((parent,anim=1220),1222,ifelse((parent,anim=1230),1232,1242))))

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .4

[State 220, Hitdef]
type = Hitdef
trigger1 = 1
attr = S, SP
animtype = Hard
damage = 50,5
hitflag = MAF
guardflag = MA
priority = 4
pausetime = 0,10
sparkno = ifelse(random<500,0,1)
guard.sparkno = 40
sparkxy = 0,0
hitsound = s22,0;
guardsound = s39,0;
ground.type = Hight
ground.slidetime = 18
ground.hittime = 20;11
ground.velocity = -3,0
air.velocity = -3,-2
airguard.velocity = -1,-1
envshake.time = 7
envshake.ampl = 5

[State 220, 3]
type = changestate
trigger1 = Movehit
value = 1203

[State 220, 3]
type = changestate
trigger1 = MoveGuarded
trigger2 = pos y > -10 && vel y > 0
value = 1204

[State 220, 3]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -30

;----------------------------
;fruta estalla - hits (helper)
[Statedef 1203]
type    = S
movetype = I
poweradd= 65
ctrl = 0
velset = -1.3,-1.5
sprpriority = 5
physics = N

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(anim=1202,1203,ifelse(anim=1212,1213,ifelse(anim=1222,1223,ifelse(anim=1232,1233,1243))))

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .32

[State 191, Snd 2]
type = PlaySnd
trigger1 = !time
value = 100,0

[State 191, Snd 2]
type = PlaySnd
trigger1 = !time
value = 1,1

;mitad 2
[State 191, Wood 1]
type = Explod
trigger1 = !time
anim = ifelse(anim=1203,1204,ifelse(anim=1213,1214,ifelse(anim=1223,1224,ifelse(anim=1233,1234,1244))))
postype = p1
pos = 0, 0
velocity = 1.3, -1.5
accel = 0, .32
removetime = 47
sprpriority = 3

;jugo
[State 191, Wood 1]
type = Explod
trigger1 = !time && anim!=1213 && anim!=1233
anim = ifelse(anim=1203,1205,ifelse(anim=1223,1225,1245))
sprpriority = 4

;jugo frutilla
[State 191, Wood 1]
type = Explod
trigger1 = !time && anim=1213
anim = f 7004
sprpriority = 4

[State 220, 3]
type = DestroySelf
trigger1 = pos y >= 50

;----------------------------
;fruta guarded (helper)
[Statedef 1204]
type    = S
juggle  = 0
poweradd= 65
ctrl = 0
velset = -1.3,-2.7
sprpriority = 1

[State 0, MakeDust]
type = MakeDust
trigger1 = !time && pos y >-10
pos = 0,0
spacing = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = !time
value = 1,1

[State 821, 2.2]
type = veladd
trigger1 = 1
y = 0.3

[State 821, 2.2]
type = AssertSpecial
trigger1 = pos Y >0
flag = noshadow 

[State 220, 3]
type = DestroySelf
trigger1 = pos y > 50

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Cosecha de dolor 1 (hyper)
[Statedef 3000]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = AnimElem = 3 && anim = 3000
sound = S500, 0
poweradd = -1000
p2defmul=1.2

[State 3900, 1] 
type = Explod
trigger1 = AnimElem = 3 && anim = 3000
anim = 8500
pos = 0,0
postype = left
supermove = 1
facing = 1 
bindtime = 30
sprpriority = -2
ownpal = 1

[State 3900, 1] 
type = Explod
trigger1 = animelem = 3 && anim = 3000
anim = 30001
pos = 0,0
postype = p1
supermove = 1
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
velocity = 1,-1

[State 3900, 1] 
type = Explod
trigger1 = animelem = 3 && anim = 3000
anim = 30001
pos = 0,0
postype = p1
supermove = 1
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
velocity = -1,1

[State 0, afterimage]
type = AfterImage
trigger1 = animelem = 3 && anim = 3000
time = 46
FrameGap = 2
length = 7
paladd = 10,50,10
PalContrast = 0,100,0
PalBright = -180,0,-180
TimeGap = 1
PalColor = 0
Trans = add
persistent = 0
palmul = .65,.65,.65

[State 1000, 1]
type = PlaySnd
triggerall = anim = 3000
trigger1 = animelem = 5
trigger2 = animelem = 11
trigger3 = animelem = 17
value = 0, 3
freqmul = 0.9+(random/3333.3)

[State 1000, 1]
type = PlaySnd
triggerall = anim = 3000
trigger1 = animelem = 6
trigger2 = animelem = 12
trigger3 = animelem = 18
value = 10, ifelse(random<333,0,ifelse(random<500,2,3))
freqmul = 0.9+(random/3333.3)

[State 1000, 6]
type = veladd
triggerall = anim = 3000
trigger1 = AnimElem = 4
trigger2 = AnimElem = 10
trigger3 = AnimElem = 16
x = 7

[State 0, MoveHitReset]
type = MoveHitReset
triggerall = anim = 3000
trigger1 = animelem = 12
trigger2 = animelem = 18

[State 1000, 5] 
type = HitDef
triggerall = anim = 3000
trigger1 = AnimElem = 6
trigger2 = AnimElem = 12
attr = S, SA
animtype  = Up
damage    = ifelse(var(9)=1,100,70), 3
priority = 4, Hit
guardflag = MA
pausetime = 13,15
sparkno = 1
sparkxy = 0,-90
hitsound   = s6,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -2,-6
air.velocity = -2,-4
fall = 1
fall.recover = 0
envshake.time = 10
envshake.ampl = 7
getpower = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 3000
trigger1 = animelemtime(6)=1 && movecontact
value = 3000
elem = 7
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 3000
trigger1 = animelemtime(12)=1 && movecontact
value = 3000
elem = 13
ignorehitpause = 1

[State 1000, 5]
type = HitDef
trigger1 = AnimElem = 18
attr = S, SA
animtype  = Up
damage    = ifelse(var(9)=2,125,ifelse(var(9)=1,100,70)), 3
priority = 4, hit
guardflag = MA
pausetime = 0,15
sparkno = 2
sparkxy = -20,-100
hitsound   = s6,2
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6,-7
air.velocity = -6,-6
fall = 1
fall.recover = 0
envshake.time = 15
envshake.ampl = ifelse(var(9)=2,13,10)
id = 3000
p2facing = 1

[State 0, VarAdd]
type = VarAdd
triggerall = movehit
trigger1 = animelemtime(6)=1
var(9)=1
ignorehitpause = 1
persistent = 0

[State 0, VarAdd]
type = VarAdd
triggerall = movehit
trigger1 = animelemtime(12)=1
var(9)=1
ignorehitpause = 1
persistent = 0

[State 0, VarAdd]
type = VarAdd
triggerall = movehit
trigger1 = animelemtime(18)=1
var(9)=1
ignorehitpause = 1
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelemtime(18)=1 && movecontact && anim != 3005
value = ifelse(var(9)=3,3005,3001)
ignorehitpause = 1

[State 3300, p2state]
type=targetstate
trigger1 = var(9)=3 && movehit && numtarget(3000)
ID=3000
value= 3010
persistent = 0
ignorehitpause = 1

;--maderas 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = var(9)=2
value = 40,14
volume = -170
freqmul = 1.3
ignorehitpause = 1
persistent = 0

;sangre
[State 0, Explod]
type = Explod
trigger1 = var(9)=2
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
anim = f 7009
pos = 65,-130
sprpriority = 2
shadow = -1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = var(9)=2
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-60-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = var(9)=2
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-60-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = var(9)=2
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-60-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = var(9)=2
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-60-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = var(9)=2
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-60-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = var(9)=2
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-60-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

;--maderas 2

;sangre
[State 0, Explod]
type = Explod
trigger1 = var(9)=3
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
anim = f 7008
pos = 65,-130
sprpriority = 2
shadow = -1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = var(9)=3
value = 40,14
volume = -50
freqmul = 0.9
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1
scale = 1.5,1.5

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1
scale = 1.5,1.5

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1
scale = 1.5,1.5

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1
scale = 2,2

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = anim = 3005
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(60+random/25),ceil(-100-(random/16.6))
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -3+(random/166.6),-1-(random/166.6)
accel = 0,.3
removetime = 100
ontop = 1
ownpal = 1
persistent = 0
ignorehitpause = 1

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

;----------------------
; golpeado por tronco
[Statedef 3010]
type    = A
physics = N
movetype= H
ctrl = 0
velset = 0,0

;Muere decapitado
[State 0, ChangeState]
type = ChangeState
trigger1 = !alive && selfanimexist(9123000)
trigger1 = !(name = "peketo" && var(10)!=0)
value = 3011
ctrl = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = !time
y = -50

;ES Peketo DF
[State 700, 10]
type = Changeanim
triggerall = name = "peketo" && var(10)=1
trigger1 = !time
trigger2 = time = 5
value = 6263

[State 820, 1]
type = changeanim2
triggerall = anim != 6263
trigger1 = !time
trigger2 = time = 5
value = 1001

[State 0, target sufre sound]
type = PlaySnd
trigger1 = Authorname = "Andres Borghi"
trigger1 = life >= 44
trigger1 = !time
trigger1 = anim = 1001
value = 11,ifelse(random<333,1,ifelse(random<500,2,3))
channel = 15
volume = ifelse(name = "shar-makai",-70,20)
freqmul = 0.9+(random/3333.3)

[State 820, 1]
type = changeanim
trigger1 = anim = 6263 && animtime = 0
value = 6264

[State 820, 1]
type = changeanim2
trigger1 = anim = 1001 && animtime = 0
value = 1002

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1002
trigger2 = anim = 6264
x = -7
y = -6
persistent = 0

[State 820, 3.2];Gravity
type = veladd
trigger1 = anim = 1002
trigger2 = anim = 6264
y = .5

[State 820, 5]
type = Envshake
trigger1 = pos y >= -20
trigger1 = vel y > 0
time = 10
ignorehitpause = 1

[State 820, 6]
type = Selfstate
trigger1 = pos y >= -20
trigger1 = vel y > 0
value = 5100
ignorehitpause = 1

;----------------------
; MUERE decapitado por tronco
[Statedef 3011]
type    = A
physics = N
movetype= H
ctrl = 0
velset = 0,0

;[State 0, PosAdd]
;type = PosAdd
;trigger1 = !time
;y = -50

[State 820, 1]
type = changeanim2
trigger1 = !time
trigger2 = time = 5
value = 1001

[State 820, 1]
type = changeanim2
trigger1 = anim = 1001 && animtime = 0
value = 91231

;cabeza rebanada
[State 1201, helper]
type = Helper
trigger1 = anim = 91231 && AnimElem = 1
name = "cabeza"
ID = 4011
stateno = 912320
postype = p1
pos = -5,-24
sprpriority = 7

[State 0, VelSet]
type = VelSet
trigger1 = anim = 91231
x = -2
y = -2
persistent = 0

[State 820, 3.2];Gravity
type = veladd
trigger1 = anim = 91231
y = .5

[State 820, 5]
type = Envshake
trigger1 = pos y >= -20
trigger1 = vel y > 0
time = 10
ignorehitpause = 1

[State 820, 6]
type = changestate
trigger1 = pos y >= -20
trigger1 = vel y > 0
value = 5150
ignorehitpause = 1

;---------------------------------------------
;super sembrado (hyper)
[Statedef 3050]
type    = S
movetype= I
physics = S
juggle  = 4
velset = 0,0
anim = 3050
ctrl = 0
sprpriority = 2

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = AnimElem = 2
sound = S500, 0
poweradd = -1000
movetime = 45
time = 45
p2defmul=1.2

[State 3900, 1] 
type = Explod
trigger1 = AnimElem = 2
anim = 8500
pos = 0,0
postype = left
supermove = 1
facing = 1 
bindtime = 30
sprpriority = -2
ownpal = 1
removetime = 45

[State 0, afterimage]
type = AfterImage
trigger1 = animelem = 2
time = 30
FrameGap = 2
length = 10
paladd = 10,50,10
PalContrast = 0,200,0
PalBright = -180,0,-180
TimeGap = 2
PalColor = 0
Trans = add
persistent = 0
palmul = .65,.65,.65

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = animelem = 9
time = 0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 6
value = 0, 5

;semilla
[State 1200, helper]
type = Helper
trigger1 = AnimElem = 7
name = "semilla hyper"
ID = 3050
stateno = 3051
postype = p1
pos = 40,-60
sprpriority = 4
ownpal = 1
supermovetime = 100

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

;----------------------------
;semilla y arbol de super sembrado (helper)
[Statedef 3051]
type    = A
movetype= I
physics = N
juggle  = 4
ctrl = 0
velset = 2.6,-6
anim = 812
sprpriority = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = anim = 812
y = .41

[State 0, afterimage]
type = AfterImage
trigger1 = !time
time = 100
FrameGap = 1
length = 10
paladd = 10,50,10
PalContrast = 0,200,0
PalBright = -180,0,-180
TimeGap = 1
PalColor = 0
Trans = add
persistent = 0
palmul = .65,.65,.65

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-10 && vel y > 0 && anim = 812
value = 3053

[State 0, VelSet]
type = VelSet
trigger1 = anim = 3053
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = anim = 3053
y = 0

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = anim = 3053
time = 0

[State 106, 3]
type = MakeDust
trigger1 = anim = 3053 && animelem = 1
spacing = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = anim = 3053 && animelem = 1
value = 40,0

;ondita
[State 0, Explod]
type = Explod
trigger1 = anim = 3053 && animelem = 2
anim = f 61
sprpriority = 0
ownpal = 1
pos = 0,0

;polvo
[State 191]
type = Explod
trigger1 = anim = 3053 && animelem = 2
persistent = 0
anim = 3057
postype = p1
pos = 0, 7
sprpriority = 4
ownpal = 1
scale = .5,.3

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3053 && animelem = 1
movetype = A

;golpea cuando sube
[State 1000, 5]
type = HitDef
trigger1 = !time
attr = S, SP
animtype  = Up
damage    = 110, 5
priority = 4, Hit
guardflag = MA
sparkno = -1
sparkxy = -4,-60
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = 0,-10
air.velocity = 0,-10
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 6
envshake.ampl = 4
pausetime = 5,5

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3053 && animelem = 7
movetype = I

[State 4500, 2.5] ;Shake cuando salen frutos
type = EnvShake
Trigger1 = anim = 3053 && animtime = 0
time = 10
ampl = 10

[State 191, Snd 2]
type = PlaySnd
trigger1 = anim = 3053 && animelem = 2
value = 40,2

[State 191, Snd 2]
type = PlaySnd
trigger1 = anim = 3053 && animelem = 9
value = 40,1

[State 191, Snd 2]
type = PlaySnd
Trigger1 = anim = 3053 && animtime = 0
value = 100,2

;polvo 2
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
anim = 3057
postype = p1
pos = 0, -20
sprpriority = 0
ownpal = 1
scale = 2,2

;gajo 1
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
anim = 3060
sprpriority = 5
velocity = 7, -3
accel = 0, .32
removetime = 100
ownpal = 1

;gajo 2
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
anim = 3060
sprpriority = 5
velocity = -8, -4
accel = 0, .32
removetime = 100
ownpal = 1
facing = -1

;gajo 3
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
anim = 3061
sprpriority = 5
velocity = 12, -2
accel = 0, .32
removetime = 100
ownpal = 1

;gajo 3
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
anim = 3061
sprpriority = 5
velocity = -11, -3
accel = 0, .32
removetime = 100
ownpal = 1
facing = -1

;gotita de saliva2
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = -20, -80
sprpriority = 4
velocity = -3, -3
accel = 0, .32
removetime = 100
ownpal = 1

;gotita de saliva3
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = -10, -80
sprpriority = 4
velocity = -2.5, -4
accel = 0, .32
removetime = 100
ownpal = 1

;gotita de saliva4
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = -5, -178
sprpriority = 4
velocity = -2, -5
accel = 0, .32
removetime = 100
ownpal = 1

;gotita de saliva5
[State 191]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = -2, -182
sprpriority = 4
velocity = -0.5, -6.2
accel = 0, .32
removetime = 100
ownpal = 1

;gotita de saliva6
[State 192]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = 0, -167
sprpriority = 4
velocity = 0, -7.6
accel = 0, .32
removetime = 100
ownpal = 1

;gotita de saliva7
[State 192]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = 4, -167
sprpriority = 4
velocity = 0.4, -6.6
accel = 0, .32
removetime = 100
ownpal = 1

;gotita de saliva8
[State 192]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = 10, -177
sprpriority = 4
velocity = 1, -5.3
accel = 0, .32
removetime = 100
ownpal = 1

;gotita de saliva9
[State 192]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = 16, -170
sprpriority = 4
velocity = 1.4, -5
accel = 0, .32
removetime = 100
ownpal = 1

;gotita de saliva10
[State 192]
type = Explod
Trigger1 = anim = 3053 && animtime = 0
persistent = 0
anim = 813
postype = p1
pos = 20, -169
sprpriority = 4
velocity = 2.1, -2
accel = 0, .32
removetime = 100
ownpal = 1

;FRUTO 1
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
postype = p1
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 2
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
postype = p1
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 3
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
postype = p1
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 4
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
postype = p1
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 5
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
postype = p1
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 6
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
postype = p1
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 7
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
postype = p1
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 8
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
postype = p1
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 9
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 10
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 11
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 12
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 13
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 14
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 15
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 16
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 17
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 18
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

;FRUTO 19
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1

;FRUTO 20
[State 1200, helper]
type = Helper
Trigger1 = anim = 3053 && animtime = 0
name = "fruto"
ID = 302
stateno = 3061
pos = ceil(-15+(random/33)),ceil(-20-(random/25))
sprpriority = 4
ownpal = 1
facing = -1

[State 220, 3]
type = DestroySelf
trigger1 = anim = 3053 && animtime = 0

;--------------------------------
;FRUTO (helper)
[Statedef 3061]
type    = A
movetype= I
physics = N
juggle  = 4
ctrl = 0
anim = 3055
sprpriority = 4

[State 220, 3]
type = veladd
trigger1 = 1
y = .32

[State 220, 3]
type = velset
trigger1 = time = 0
y = -16 -(random/95.2)

[State 220, 3]
type = velset
trigger1 = !time
x = ifelse(random<500,(-0.7 +(random/714.2)),(-3 +(random/166.6)))

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 20+(random/50) && random < 300
value = 200,0
freqmul = 1.4+(random/3333.3)
volume = -130
channel = 5

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = time = 40
movetype = A

[State 220, Hitdef]
type = Hitdef
trigger1 = animelem = 2
attr = S, SP
animtype = Hard
damage = 50,2
hitflag = MAFD
guardflag = MA
priority = 4, Hit
pausetime = 0,10
sparkno = 543543
guard.sparkno = 40
sparkxy = 25,0
hitsound = s22,0;
guardsound = s39,0;
ground.type = High
ground.slidetime = 18
ground.hittime = 20;11
ground.velocity = -3,0
air.velocity = -3,-2
getpower = 0

[State 220, 3]
type = changestate
value = 3053
trigger1 = Movehit

[State 220, 3]
type = changestate
value = 3054
trigger1 = MoveGuarded

[State 220, 3]
type = changestate
trigger1 = pos Y >= -20 && vel y > 0
value = 30530

;----------------------------
;fruto rebota en el suelo (helper)
[Statedef 30530]
type    = S
juggle  = 0
ctrl = 0
anim = 3055
sprpriority = 1

[State 191, Snd 2]
type = Posset
trigger1 = time = 1
y = 0

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 1
value = 100,3
freqmul = 0.8+(random/1000.0)

[State 106, 3]
type = MakeDust
trigger1 = Time = 1
pos = 0,0
spacing = 1

[State 1000, 7]
type = velset
trigger1 = time = 1
x = -1.3+(random/384.6)
y = -2.7 -(random/200.0)

[State 821, 2.2]
type = veladd
trigger1 = 1
y = 0.3

[State 821, 2.2]
type = AssertSpecial
trigger1 = pos y > 0
flag = noshadow 

[State 0, StopSnd]
type = StopSnd
trigger1 = !time
channel = 5

[State 220, 3]
type = DestroySelf
trigger1 = pos y > 100

;----------------------------
;fruto estalla - hits (helper)
[Statedef 3053]
type    = S
juggle  = 0
ctrl = 0
velset = 0,0
anim = 9123000
sprpriority = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 0
value = 1,1

;mitad 1
[State 191, Wood 1]
type = Explod
trigger1 = time = 0
persistent = 0
anim = 3054
postype = p1
pos = 0, 0
velocity = -1.3, -1.5
accel = 0, .32
removetime = 47
sprpriority = 5

;mitad 2
[State 191, Wood 1]
type = Explod
trigger1 = time = 0
persistent = 0
anim = 30540
postype = p1
pos = 0, 0
velocity = 1.3, -1.5
accel = 0, .32
removetime = 47
sprpriority = 4

;sangre
[State 191, Wood 1]
type = Explod
trigger1 = !time && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
anim = f ifelse(random<500,7004,7005)
sprpriority = 3
facing = ifelse(random<500,-1,1)

;SPARK
[State 1010, 9]
type = explod
trigger1 = !time && enemynear,name = "noroko" && enemynear,var(10)=1
trigger2 = !time && enemynear,name = "animus" && enemynear,stateno = 3100
trigger3 = !time && !numtarget
anim = f ifelse(random < 500,0,1)
persistent = 0
ignorehitpause = 1
sprpriority = 4

[State 220, 3]
type = DestroySelf
trigger1 = time = 0

;-------------------------------------------------------------------
;fruto guarded (helper)
[Statedef 3054]
type    = S
juggle  = 0
ctrl = 0
velset = 0,0
anim = 94343599598
sprpriority = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = time = 0
value = 1,1


[State 191, Wood 1]
type = Explod
trigger1 = time = 0
persistent = 0
anim = 3055
postype = p1
pos = 0, 0
velocity = -1.3, -2.5
accel = 0, .32
removetime = 47


[State 220, 3]
type = DestroySelf
trigger1 = time = 0


;--------------------------------------------------------------------------
;---------------------------------------------------------------------------
; super fruti-toss (hyper) (accion 1)
[Statedef 3100]
type    = S
movetype= I
physics = S
juggle  = 4
velset = 0,0
anim = 3100
ctrl = 0
sprpriority = 2

[State 191, Snd 2]
type = PlaySnd
trigger1 = animelem = 2
value = 40,5
freqmul = 0.9

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = AnimElem = 5
sound = S500, 0
poweradd = -1000
p2defmul=1.2

[State 3900, 1] 
type = Explod
trigger1 = AnimElem = 5
anim = 8500
pos = 0,0
postype = left
supermove = 1
facing = 1 
bindtime = 30
sprpriority = -2
ownpal = 1

[State 0, afterimage]
type = AfterImage
trigger1 = animelem = 4
time = 30
FrameGap = 2
length = 10
paladd = 10,50,10
PalContrast = 0,200,0
PalBright = -180,0,-180
TimeGap = 2
PalColor = 0
Trans = add
persistent = 0
palmul = .65,.65,.65

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = animelem = 9
time = 0

[State 1200, helper]
type = Helper
trigger1 = AnimElem = 8
name = "sandia"
ID = 320
stateno = 3101
postype = p1
pos = 49,-28
sprpriority = 4
ownpal = 1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 7
value = 10,0
channel = 0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 8
value = 0, 3

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

;-------------------------------------------------------------------
;sandia voladora (helper)
[Statedef 3101]
type    = A
movetype= A
physics = N
juggle  = 4
ctrl = 0
sprpriority = 5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
trigger1 = parent, animelemtime(9)<=2
value = 3101

[State 0, Velset]
type = Velset
trigger1 = !time
trigger1 = parent, animelemtime(9)<=2
x = 6.8
y = -7

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .39
ignorehitpause = 1

[State 0, afterimage]
type = AfterImage
trigger1 = !time
time = 30
FrameGap = 1
paladd = 10,50,10
PalContrast = 0,200,0
PalBright = -180,0,-180
TimeGap = 2
PalColor = 0
Trans = add
persistent = 0
palmul = .65,.65,.65

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = -1

[State 1005, hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 1005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr= SCA, HP
stateno=3102
slot = 0

[State 1005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr= SCA, NP, SP
stateno=3107
slot = 1

[State 220, Hitdef]
type = Hitdef
trigger1 = 1
attr = S, HP
animtype = Hard
damage = 210,15
hitflag = MAF
guardflag = MA
priority = 4
pausetime = 0,13
sparkno = 2
guard.sparkno = 40
sparkxy = 0,0
hitsound = s22,0
guardsound = s39,0
ground.type = Hight
ground.slidetime = 18
ground.hittime = 20;11
ground.velocity = -2,-4
air.velocity = -3,-2
fall = 1
fallrecover = 0
envshake.time = 13
envshake.ampl = 8
getpower = 0

[State 220, 3]
type = changestate
value = 3102
trigger1 = Movehit

[State 220, 3]
type = changestate
value = 3103
trigger1 = MoveGuarded

[State 220, 3]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -70

[State 220, 3]
type = changestate
trigger1 = pos Y >= -20 && vel y > 0
value = 3104

;------------------------------------------------------------------
;sandia estalla - hits (helper)
[Statedef 3102]
type    = S
juggle  = 0
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 9123000
value = anim
elem = animelemno(0)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 13
value = 9123000

[State 191, Snd 2]
type = PlaySnd
trigger1 = !time
value = 100,1
volume = 200
persistent = 0
freqmul = ifelse(facing = 1,0.8,1)
ignorehitpause = 1

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = 0
ignorehitpause = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = !time
value = f 5,3
persistent = 0
ignorehitpause = 1

;parte 1
[State 191, Wood 1]
type = Explod
trigger1 = anim = 9123000 && animelem = 1
persistent = 0
anim = 3102
postype = p1
pos = 0, 0
velocity = -1.6, -1.5
accel = 0, .32
removetime = 47
sprpriority = 3

;parte 2
[State 191, Wood 1]
type = Explod
trigger1 = anim = 9123000 && animelem = 1
persistent = 0
anim = 3103
postype = p1
pos = 0, 0
velocity = -1.3, -0.5
accel = 0, .32
removetime = 47
sprpriority = 7

;parte 3
[State 191, Wood 1]
type = Explod
trigger1 = anim = 9123000 && animelem = 1
persistent = 0
anim = 3104
postype = p1
pos = 0, 0
velocity = 1.3, -0.5
accel = 0, .32
removetime = 47
sprpriority = 5

;parte 4
[State 191, Wood 1]
type = Explod
trigger1 = anim = 9123000 && animelem = 1
persistent = 0
anim = 3105
postype = p1
pos = 0, 0
velocity = 1.6, -1.5
accel = 0, .32
removetime = 47
sprpriority = 1

;jugo de sandia 1
[State 191, Wood 1]
type = Explod
trigger1 = anim = 9123000 && animelem = 1
anim = f ifelse(random<500,7004,7005)
postype = p1
pos = -19, 7
sprpriority = 4
facing = ifelse(random<500,-1,1)

;jugo de sandia 2
[State 191, Wood 1]
type = Explod
trigger1 = anim = 9123000 && animelem = 1
anim = f ifelse(random<500,7004,7005)
postype = p1
pos = 3, -25
sprpriority = 2
facing = ifelse(random<500,-1,1)

[State 220, 3]
type = DestroySelf
trigger1 = anim = 9123000 && animelem = 1

;----------------------------
;sandia guarded (helper)
[Statedef 3103]
type    = S
juggle  = 0
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 9123000
value = anim
elem = animelemno(0)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 13
value = 9123000

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = 0
ignorehitpause = 1

[State 191, Snd 2]
type = PlaySnd
trigger1 = !time
value = f 6,0
persistent = 0
ignorehitpause = 1
volume = 150

[State 191, Wood 1]
type = Explod
trigger1 = anim = 9123000 && animelem = 1
persistent = 0
anim = 3101
postype = p1
pos = 0, 0
velocity = -1.3, -2.5
accel = 0, .32
removetime = 47

[State 220, 3]
type = DestroySelf
trigger1 = anim = 9123000 && animelem = 1

;----------------------------
;sandia rebota en el suelo (helper)
[Statedef 3104]
type    = S
juggle  = 0
ctrl = 0
velset = -1.3,-2.7
anim = 3101
sprpriority = 1

[State 106, 3]
type = MakeDust
trigger1 = Time = 1
pos = 0,0
spacing = 1

[State 821, 2.2]
type = veladd
trigger1 = 1
y = 0.3

[State 821, 2.2]
type = AssertSpecial
trigger1 = 1
flag = noshadow 

[State 220, 3]
type = DestroySelf
trigger1 = time = 50

[State 1000, 1]
type = PlaySnd
trigger1 = !time
value = 6,1
volume = -50

[State 1000, 1]
type = PlaySnd
trigger1 = !time
value = 1,1

[State 1000, 1]
type = PlaySnd
trigger1 = !time
value = 100,0
freqmul = 0.7

;-----------------------------------------
;sandia golpea normal projs
[Statedef 3107]
type    = S
juggle  = 0
ctrl = 0
sprpriority = 1

[State 220, 3]
type = changestate
trigger1 = 1
value= ifelse(numtarget, 3102, 3101)

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .39
ignorehitpause = 1

;---------------------------------------------
;---------------------------------------------
; darkforce (hyper) (accion 1)
[Statedef 3500]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 3500
ctrl = 0

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = anim = 3500 && AnimElem = 4
sound = S500, 0
movetime = 111
time = 111
poweradd = ifelse(var(33)=1,-500,0)

[State 3900, 1]
type = Explod
trigger1 = anim = 3500 && AnimElem = 4
anim = 8500
pos = 0,0
postype = left
supermove = 1
facing = 1
bindtime = 30
sprpriority = -2
ownpal = 1
removetime = 111

;luz tierra
[State 0, Explod]
type = Explod
;type = null
trigger1 = anim = 3500 && animelemtime(4)=20
anim = 3510
pos = 0,20
bindtime = -1
ontop = 1
ownpal = 1
supermove = 1
id = 3510
scale = 1,1.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3500 && animelemtime(4)=20
value = 100,7
volume = -100
freqmul = 1.3

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = anim = 3500 && animelemtime(4)=50
time = -1
add = 0,0,0
mul = 256,256,256
sinadd = -256,256,-256,100
invertall = 0
color = 256

[State 0, PalFX]
type = PalFX
trigger1 = anim = 3500 && animelemtime(4)=69
time = 1
add = 0,0,0
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = anim = 3500 && animelemtime(4)=70
anim = 3511
bindtime = -1
supermove = 1
sprpriority = 2
ownpal = 1

[State 0, VarSet]
type = VarSet
trigger1 = anim = 3500 && animelemtime(4)=70
var(10)=1

[State 0, afterimage]
type = AfterImage
trigger1 = anim = 3500 && animelemtime(4)=70
time = -1
FrameGap = 1
length = 8
TimeGap = 2
paladd = -30,10,-30
PalContrast = 0,200,0
PalBright = -180,0,-180
palmul = .65,.65,.65
Trans = add
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3500 && animtime = 0
value = 100,9
channel = 2
loop = 1

[State 0, ChangeAnim]
type = Changestate
trigger1 = anim = 3500 && animtime = 0
value = 0
ctrl = 1

;--------------------------------------------------------
; darkforce termina
[Statedef 3501]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3500
elem = 5

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 3512
bindtime = -1
supermove = 1
sprpriority = 2
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 100,8
volume = -120

[State 0, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(5)<=50
value = sca

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelemtime(5)=25
time = 8
add = -256,256,-256
mul = 256,256,256
sinadd = 256,-256,256,28
invertall = 0
color = 256

[State 0, VarSet]
type = VarSet
trigger1 = animelemtime(5)=26
var(10) = 0

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = animelemtime(5)=26
time = 0

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

;-------------------------------------------------------------------
;DF combo!
[Statedef 3520]
type    = A
movetype= A
physics = N
juggle  = 4
ctrl = 0
anim = 3520
sprpriority = 2
velset = 0,0

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = AnimElem = 2
sound = S500, 0
movetime = 95
time = 95
poweradd = -500

[State 3900, 1]
type = Explod
trigger1 = AnimElem = 2
anim = 8500
pos = 0,0
postype = left
supermove = 1
facing = 1
bindtime = 30
sprpriority = -2
ownpal = 1
removetime = 95

;luz tierra
[State 0, Explod]
type = Explod
type = null
trigger1 = animelem=2
anim = 3510
pos = 0,20
bindtime = -1
ontop = 1
ownpal = 1
supermove = 1
id = 3510
scale = 1,1.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 100,7
volume = -100
freqmul = 1.3

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelemtime(2)=40
time = -1
add = 0,0,0
mul = 256,256,256
sinadd = -256,256,-256,100
invertall = 0
color = 256

[State 0, PalFX]
type = PalFX
trigger1 = animelemtime(2)=60
time = 1
add = 0,0,0
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = animelemtime(2)=60
anim = 3522
bindtime = -1
supermove = 1
sprpriority = 2
ownpal = 1

[State 0, VarSet]
type = VarSet
trigger1 = animelemtime(2)=60
var(10)=1

[State 0, afterimage]
type = AfterImage
trigger1 = animelemtime(2)=60
time = -1
FrameGap = 1
length = 8
TimeGap = 2
paladd = -30,10,-30
PalContrast = 0,200,0
PalBright = -180,0,-180
palmul = .65,.65,.65
Trans = add
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(2)=60
value = 100,9
channel = 2
loop = 1

[State 0, Width]
type = Width
trigger1 = animelem = 5
edge = 90,0

[State 0, Helper]
type = Helper
trigger1 = animelem = 6
name = "super arbol"
ID = 3521
stateno = 3521
pos = 90,0
ownpal = 1
size.xscale = 2.0
size.yscale = 2.0

[State 1000, 7]
type = Changeanim
trigger1= numhelper(3521)
trigger1 = helper(3521),animelem = 10
value = 3520
elem = 8

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

;--------------------------------
;DF COMBO! arbol
[Statedef 3521]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 3521
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
trigger2 = animelem = 8
value = 40,2
freqmul = 0.9+(random/3333.3)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
trigger2 = animelem = 8
value = 40,11
freqmul = 0.9+(random/3333.3)

;polvo
[State 191]
type = Explod
trigger1 = !time
trigger2 = animelem = 8
anim = 3057
pos = 0, 15
sprpriority = 6
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
trigger2 = animelem = 8
time = 12
ampl = -7

;maderas

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1
scale = 1.5,1.5

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1
scale = 1.5,1.5

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1
scale = 1.5,1.5

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1
scale = 2,2

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1
scale = 2,2

[State 0, Explod]
type = Explod
trigger1 = !time
anim = ifelse(random<500,3020,ifelse(random<500,3021,3022))
pos = ceil(-30+random/16),0
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
vel = -5+(random/100.0),-5-(random/166.6)
accel = 0,.24
removetime = 150
ontop = 1
scale = 2,2

[State 1000, 5]
type = HitDef
trigger1 = time % 2 = 0
attr = S, SP
animtype  = up
damage    = 43, 3
priority = 4, Hit
guardflag = MA
sparkno = ifelse((enemynear,name = "noroko" && enemynear,var(10)=1)||(enemynear,name = "animus" && enemynear,stateno = 3100),ifelse(random<500,1,2),ifelse(random<333,7003,ifelse(random<500,7008,7009)))
sparkxy = 0,ceil((target, pos y-60))
hitsound   = s 6,ifelse(random<500,1,2)
guardsound = 6,0
ground.type = High
ground.velocity = 4.5,-7
air.velocity = -3,-6
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 3
envshake.ampl = 8
pausetime = 5,5
getpower = 0,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

;--------------------------------
;DF FRUTO especial
[Statedef 3505]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 3505
sprpriority = 5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !time && random < 500
trigger2 = frontedgedist <= -30
trigger3 = backedgedist <= -30

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 100,6
freqmul = 0.8

[State 220, 3]
type = veladd
trigger1 = 1
y = .3

[State 220, 3]
type = velset
trigger1 = !time
y = -6 -(random/250.0)

[State 220, 3]
type = velset
trigger1 = !time
x = -2 +(random/333.3)

[State 220, 3]
type = changestate
trigger1 = pos Y >= -20 && vel y > 0
value = 3506

;-----------------------------------------------------------
;fruto en el suelo
[Statedef 3506]
type    = S
movetype= I
physics = n
juggle  = 0
ctrl = 0
anim = 3505
poweradd = 0
velset = 0,0

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

;obtiene player
[State 0, ChangeAnim]
type = changeanim
trigger1 = root, pos x - pos x = [-10,10]
trigger1 = root, pos y - pos y = [-12,0]
trigger1 = anim != 3506
value = 3506

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3506 && animelem = 1
value = 100,5
freqmul = 0.8

[State 0, DestroySelf]
type = DestroySelf
trigger1 = anim = 3505 && animtime = 0
trigger2 = anim = 3506 && animtime = 0
trigger3 = frontedgedist <= -30
trigger4 = backedgedist <= -30

;-------------------------------------
;----------------------------------------
; FATAL MOVE (hyper)
[Statedef 4000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 4000
ctrl = 0
sprpriority = 1

[State 3050, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 15, 2
channel = 0

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = AnimElem = 5
sound = S500, 0
poweradd = -3000

[State 3900, 1] 
type = Explod
trigger1 = AnimElem = 5
anim = 8500
pos = 0,0
postype = left
supermove = 1
facing = 1 
bindtime = 30
sprpriority = -2
removetime = 30
ownpal = 1

[State 0, afterimage]
type = AfterImage
trigger1 = animelem =7
time = 20
FrameGap = 1
length = 4
PalContrast = 200,0,0
PalBright = 100,-80,-180
TimeGap = 2
PalColor = 0
Trans = add
persistent = 0
paladd = 50,0,0

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = anim = 47
time = 0

[State 0, Helper]
type = Helper
trigger1 = !time
name = "florecita"
ID = 4000
pos = -33,0
stateno = 4200
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = !time
name = "florecita"
ID = 4000
pos = 33,0
stateno = 4200
ownpal = 1
sprpriority = 2

[State 0, Helper]
type = Helper
trigger1 = !time
name = "florecita"
ID = 4000
pos = -16,3
stateno = 4200
ownpal = 1
sprpriority = 2

[State 0, Helper]
type = Helper
trigger1 = !time
name = "florecita"
ID = 4000
pos = 16,3
stateno = 4200
ownpal = 1
sprpriority = 2

[State 0, Helper]
type = Helper
trigger1 = !time
name = "florecita"
ID = 4000
pos = 0,6
stateno = 4200
ownpal = 1
sprpriority = 2

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem = 7
time = 20
add = 94,-200,-200
mul = 256,256,256
sinadd = 66,80,40,8
color = 0

[State 3050, 1]
type = PlaySnd
trigger1 = AnimElem = 7
value = 0, 3

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 7
x = 6.5
y = -2.5

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 7
statetype = A
physics = n

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(7)>=1
y = .3

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 4000 && pos y >= 3 && vel y > 0
value = 47

[State 0, VelSet]
type = VelSet
trigger1 = anim = 47
y = 0

[State 0, VelSet]
type = posset
trigger1 = anim = 47
y = 0

;ondita
[State 0, Explod]
type = Explod
trigger1 = animelem = 7
anim = f 61
pos = 0,0
sprpriority = 0

[State 0, MakeDust]
type = MakeDust
trigger1 = animelem = 7
trigger2 = anim = 47 && animelem = 1
pos = 0,0
spacing = 1

[State 3300, hit]
type = hitdef
trigger1 = anim = 4000 && animelem = 7
trigger1 = !movecontact && !movereversed
attr = S,HA
damage = 0,0
animtype = Hard
guardflag = M
hitflag = MAF
priority = 4,Hit
guard.pausetime = 4,10
sparkno = -1
guard.sparkno = 40
sparkxy = 0,-60
hitsound = -1,-1
guardsound = 6,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-10,0
air.type=Low
air.velocity=-5,-5
getpower=0
givepower=0
id = 4000
numhits = 0
hitonce = 1
p2facing = 1

[State 3300, p2state]
type=targetstate
trigger1= movehit && numtarget(4000)
ID=4000
value=4003

[State 3300, p1state]
type=changestate
trigger1= moveguarded
value=4020

[State 3300, p1state]
type=changestate
trigger1= movehit && numtarget(4000)
value=4001

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 47
statetype = S
physics = s

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 47 && animtime = 0
value = 0
ctrl = 1

;--------------------------------------------------------------------------
;fatal move BLOQUEADA
[Statedef 4020]
type    = A
movetype= I
physics = A
anim = 5200
ctrl = 0
sprpriority = 2
velset = -2,-6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S 2,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 0,3

[State 0, PalFX]
type = PalFX
trigger1 = !time
time = 1
add = 0,0,0

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = 0

;---------------------------------------------------------
;fatal move P1 - 1
[Statedef 4001]
type = S
movetype = A
ctrl = 0
velset = 0, 0
anim = 4001

;P2 tiene mas de 250
;-------------------

;spark
[State 0, Explod]
type = Explod
trigger1= numtarget(4000)
trigger1 = target(4000),life > 250
trigger1 = !time
anim = f 2
pos = 30, -70
ontop = 1
pausemovetime = 10

[State 0, Pause]
type = Pause
trigger1= numtarget(4000)
trigger1 = target(4000),life > 250
trigger1 = !time
time = 10
movetime = 0

[State 5210, 1] ;Blink white
type = PalFX
trigger1= numtarget(4000)
trigger1 = target(4000),life > 250
trigger1 = !time
time = 3
add = 128,128,128

[State 0, EnvShake]
type = EnvShake
trigger1= numtarget(4000)
trigger1 = target(4000),life > 250
trigger1 = !time
time = 5
ampl = -6

[State 0, PlaySnd]
type = PlaySnd
trigger1= numtarget(4000)
trigger1 = target(4000),life > 250
trigger1 = !time
value = 1,1
volume = 100
freqmul = 0.5

[State 0, PlaySnd]
type = PlaySnd
trigger1= numtarget(4000)
trigger1 = target(4000),life > 250
trigger1 = !time
value = S 5,3
freqmul = 0.6

[State 3300, p1state]
type=changestate
trigger1= numtarget(4000)
trigger1 = target(4000),life > 250
trigger1 = !time
value=4020

;------

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze

[State 3000, 0]
type = BGPalfx
trigger1 = !time
supermove = 1
time = -1
add = -50,-50,-50
color = 0

[State 3000, 0]
type = BGPalfx
trigger1 = animelem = 41
time = 1
add = 0,0,0

[State 0, ScreenBound]
type = ScreenBound
trigger1 = anim = 4001
trigger1 = animelemtime(25)>0
trigger1 = animelemtime(41)<0
trigger2  = anim = 4002
value = 1
movecamera = 1,0

[State 0, Width]
type = Width
triggerall = anim = 4001
trigger1 = animelemtime(1)<= 15
edge = 75,0

[State 3050, Super C]
type = AfterImageTime
trigger1 = !time
time = 0

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 610, 2]
type = PlaySnd
trigger1 = !time
trigger2 = anim = 4001 && animelemtime(25)=42
value = 1,1
freqmul = 0.9+(random/3333.3)

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4001
trigger1 = animelemtime(4)<0
time = 1
pos = 72, 0

[State 0, Explod]
type = Explod
triggerall = anim = 4001
trigger1 = animelem = 2
anim = 4010
bindtime = -1
sprpriority = 0

;semilla voladora
[State 191]
type = Explod
triggerall = anim = 4001
trigger1 = animelem = 11
persistent = 0
anim = 812
postype = p1
pos = 0, -98
sprpriority = 4
velocity = 2.5, -6
accel = 0, .32
removetime = 34
ownpal = 1
shadow = -1

[State 610, 2]
type = PlaySnd
triggerall = anim = 4001
trigger1 = animelem = 11
value = 0, 5

;gotita de saliva 1
[State 191]
type = Explod
triggerall = anim = 4001
trigger1 = animelemtime(11)= 33
persistent = 0
anim = 813
postype = p1
pos = 80, -125
sprpriority = 4
velocity = -1.5, -3
accel = 0, .32
removetime = 12
ownpal = 1
shadow = -1

;gotita de saliva 2
[State 191]
type = Explod
triggerall = anim = 4001
trigger1 = animelemtime(11)= 33
persistent = 0
anim = 813
postype = p1
pos = 80, -125
sprpriority = 4
velocity = -1.7, -2
accel = 0, .32
removetime = 12
ownpal = 1
shadow = -1

[State 610, 2]
type = PlaySnd
triggerall = anim = 4001
trigger1 = animelemtime(11)= 33
value = 40, 3

[State 610, 2]
type = PlaySnd
trigger1= numtarget(4000)
trigger1 = target(4000), anim = 4005
trigger1 = target(4000), animelem = 4
value = 40,6
freqmul = 0.7

[State 610, 2]
type = PlaySnd
trigger1= numtarget(4000)
trigger1 = target(4000), anim = 4005
trigger1 = target(4000), animelem = 4
value = 0,6
freqmul = 0.7

[State 610, 2]
type = PlaySnd
trigger1 = animelem = 14
value = 0,3

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 4001 && animelem = 14
value = 10, ifelse(random<333,0,ifelse(random<500,2,3))
freqmul = 0.9+(random/3333.3)

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 4001 && animelem = 17
value = 40,2
freqmul = 0.8+(random/5000.0)

;polvo
[State 191]
type = Explod
trigger1 = anim = 4001 && animelem = 17
anim = 3057
postype = p1
pos = 30, 25
sprpriority = 4
scale = 1.3,1

[State 0, PosAdd]
type = PosAdd
triggerall = anim = 4001
trigger1 = animelem = 25
x = 70

;helper screenbound
[State 0, Helper]
type = Helper
trigger1 = anim = 4001 && animelem = 25
name = "screenbound bitch"
ID = 4011
pos = 160,0
postype = back
stateno = 4021

;brazo
[State 0, Explod]
type = Explod
triggerall = anim = 4001
trigger1 = animelemtime(25)=28
anim = 4011
ID = 4011
pos = -5,0
sprpriority = 5
shadow = -1

;parche brazo
[State 0, Explod]
type = Explod
triggerall = anim = 4001
trigger1 = animelemtime(25)=28
anim = 4020
ID = 4020
pos = -5,0
sprpriority = 1
shadow = -1

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 4001
trigger1 = animelemtime(25)=28
trigger2 = animelem = 26
trigger3 = animelemtime(35)=1
value = 40,2
freqmul = 0.7+(random/1666.6)
volume = -50

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 4001
trigger1 = animelem = 26
value = 40,11
volume = 100

[State 0, EnvShake]
type = EnvShake
triggerall = anim = 4001
trigger1 = animelemtime(25)=42
trigger2 = animelem = 34
trigger3 = animelemtime(34)=100
time = 7
ampl = -10

;polvo
[State 191]
type = Explod
triggerall = anim = 4001
trigger1 = animelemtime(25)=28
trigger2 = animelem = 26
trigger3 = animelem = 35
anim = 3057
postype = p1
pos = -5, 30
sprpriority = 6
scale = 1.3,1

;polvo
[State 191]
type = Explod
triggerall = anim = 4001
trigger1 = animelemtime(25)=36
trigger2 = animelem = 35
anim = 3057
postype = p1
pos = -80, 30
sprpriority = 6

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4001
trigger1 = animelemtime(25)>=42
trigger1 = animelemtime(33)<50
trigger2 = animelemtime(34)>=106
trigger2 = animelemtime(34)<186
time = 300
pos = 0, -130

;grito
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 32
value = 40,16
freqmul = 1.2

[State 0, EnvShake]
type = EnvShake
triggerall = anim = 4001
trigger1 = animelemtime(25)=100
trigger2 = animelem = 35
time = 40
ampl = -4

[State 0, EnvShake]
type = EnvShake
triggerall = anim = 4001
trigger1 = animelem = 33
time = 60
ampl = -3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(25)=100
value = 40,1
volume = -100
freqmul = 1.2

[State 0, SprPriority]
type = SprPriority
trigger1 = animelem = 25
value = 0

;boca
[State 0, Explod]
type = Explod
triggerall = anim = 4001
trigger1 = animelem = 33
anim = 4016
bindtime = -1
sprpriority = 5
id = 4016

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4001
trigger1 = animelemtime(33)>=50
trigger1 = animelemtime(33)<53
trigger2 = animelemtime(34)>=103
trigger2 = animelemtime(34)<106
trigger3 = animelemtime(35)>=0
trigger3 = animelemtime(36)<0
time = 3
pos = 0, -107

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4001
trigger1 = animelemtime(33)>=53
trigger1 = animelemtime(34)<0
trigger2 = animelemtime(34)>=100
trigger2 = animelemtime(34)<103
trigger3 = animelemtime(36)>=0
trigger3 = animelemtime(37)<0
time = 3
pos = 0, -85

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4001
trigger1 = animelemtime(34)>=0
trigger1 = animelemtime(34)<100
trigger2 = animelemtime(37)>=0
trigger2 = animelemtime(38)<0
time = 3
pos = 0, -40

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4001
trigger1 = animelemtime(38)>=0
trigger1 = animelemtime(39)<0
time = 3
pos = 0, -10

[State 0, TargetState]
type = TargetState
triggerall = anim = 4001
trigger1 = animelem = 34
value = 4004
ID = 4000

[State 0, Explod]
type = Explod
triggerall = anim = 4001
trigger1 = animelem = 34
anim = 4008
pos = 0,-15
sprpriority = 4
shadow = -1
ownpal = 1
scale = 1,.8

[State 810, Throw 11]
type = Targetlifeadd
trigger1= numtarget(4000)
trigger1 = animelem = 34
trigger1 =numtarget(4000)
value = -(target,lifemax)
id = 4000

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 34
value = 40,7
freqmul = 1.2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 34
value = 100,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 34
value = 6,2
freqmul = 0.8

;sin custom
;----------

;sin custom
[State 0, ChangeAnim]
type = ChangeAnim
trigger1= numtarget(4000)
trigger1 = target(4000), anim != 91250
trigger1 = anim = 4001 && animelemtime(34)=1
trigger1 = anim != 4002
value = 4002

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = anim = 4002 && animelem = 1
trigger2 = anim = 4001 && animelem = 35
id = 4016

;boca sin custom
[State 0, Explod]
type = Explod
trigger1 = anim = 4002 && animelem = 1
anim = 4019
bindtime = -1
sprpriority = 5
id = 4019

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 4002
trigger1 = animelem = 3
value = 40,2
freqmul = 0.7+(random/1666.6)
volume = -50

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4002
trigger1 = animelemtime(3)>=0
trigger1 = animelemtime(3)<3
time = 3
pos = 0, -85

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4002
trigger1 = animelemtime(3)>=3
trigger1 = animelemtime(3)<6
time = 3
pos = 0, -107

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 4002
trigger1 = animelemtime(3)>=6
time = 10
pos = 0, -130

[State 0, Explod]
type = Explod
triggerall = anim = 4002
trigger1 = animelemtime(3)=7
trigger2 = animelemtime(5)=10
trigger3 = animelemtime(5)=33
trigger4 = animelemtime(5)=50
trigger5 = animelemtime(5)=60
anim = 4018
pos = 0,-130
sprpriority = 6
ownpal = 1
facing = ifelse(random<500,-1,1)
scale = 0.7,0.7

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 4002 && animtime = 0
value = 4001
elem = 35

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

[State 0, EnvShake]
type = EnvShake
triggerall = anim = 4001
trigger1 = animelemtime(34)=70
time = 30
ampl = -2

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 4001
trigger1 = animelemtime(34)=70
value = 40,15
freqmul = 0.6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 4001 && animelemtime(34)=100
trigger2 = anim = 4002 && animelemtime(3)=7
value = 40,15

[State 0, Explod]
type = Explod
triggerall = anim = 4001
trigger1 = animelemtime(34)=100
anim = 4018
pos = 0,-40
sprpriority = 6
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(34)=100
value = 6,2
freqmul = 0.9+(random/3333.3)

[State 0, Explod]
type = Explod
triggerall = anim = 4001
trigger1 = animelemtime(34)=100
trigger2 = animelemtime(34)=116
trigger3 = animelemtime(34)=132
trigger4 = animelemtime(34)=150
trigger5 = animelemtime(34)=170
anim = 4018
pos = 0,-130
sprpriority = 6
ownpal = 1
facing = ifelse(random<500,-1,1)
scale = 0.7,0.7

[State 0, Explod]
type = Explod
triggerall = anim = 4001
trigger1 = animelem = 39
anim = 4017
sprpriority = 0
ownpal = 1

[State 0, PosAdd]
type = PosAdd
triggerall = anim = 4001
trigger1 = animelem = 41
x = -100

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

;---------------------------------------------------------
;fatal move P2 - 1 - sube y baja
[Statedef 4003]
type = A
movetype = H
ctrl = 0
physics = N
velset = 0, 0

;tiene mas de 250
;----------------

[State 0, SelfState]
type = SelfState
trigger1 = !time && life > 250
value = 5210

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

;ES Peketo DF
[State 700, 10]
type = Changeanim
trigger1 = !time
trigger1 = name = "peketo" && var(10)=1
value = 6265

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time && anim != 6265
value = 4005

[State 0, target sufre sound]
type = PlaySnd
triggerall = Authorname = "Andres Borghi"
triggerall = anim = 4005
trigger1 = !time
trigger2 = animelem = 4
trigger3 = animelem = 24
value = 11,ifelse(random<333,1,ifelse(random<500,2,3))
channel = 15
volume = ifelse(name = "shar-makai",-70,ifelse(name = "noroko", 200,20))
freqmul = 0.9+(random/3333.3)

[State 0, sbound]
type=screenbound
trigger1 = 1
value=0
movecamera=1,0

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem = 4
time = -1
add = -256,53,-100
mul = 228,232,0
color = 0

[State 0, SprPriority]
type = SprPriority
trigger1 = animelem = 17
value = 3

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 17
x = 0
y = -80

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 17
y = -13

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(17)>=1
y = .35

;---------------------------------------------------------
;fatal move P2 - 2 - es cortado (o no)
[Statedef 4004]
type = S
movetype = H
ctrl = 0
physics = n
velset = 0, 0

[State 0, sbound]
type=screenbound
trigger1 = 1
value=1
movecamera=1,0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time && selfanimexist(91250)
value = 91250

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time && anim != 91250
value = 4006

[State 0, ChangeAnim2]
type = Changestate
trigger1 = anim = 91250 && animtime = 0
value = 5150
ctrl = 0

[State 0, SelfState]
type = SelfState
trigger1 = anim = 4006 && animtime = 0
value = 5100

;------------------------------------
;SCREENBOUND helper
[Statedef 4021]
physics=N
velset=0,0
anim = 8055000
sprpriority = 2

[State 7650, bound]
type=screenbound
trigger1=1
value=0
movecamera=1,1

[State 7650, width]
type=width
trigger1=1
edge=320,320

[State 7650, pos]
type=bindtoroot
trigger1=1
time = -1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, animelem = 41

;-------------------------------------------------
;-------------------------------------------------
;florecita (helper)
[Statedef 4200]
type    = S
movetype= I
physics = N
ctrl = 0

[State 0, Turn]
type = Turn
trigger1 = !time && random <500

[State 0, DestroySelf]
type = DestroySelf
triggerall = animtime = 0
trigger1 = anim = 4201
trigger2 = anim = 4211
trigger3 = anim = 4221
trigger4 = anim = 4251
trigger5 = anim = 4252
trigger6 = ishelper(3501) && frontedgedist <=-5
trigger7 = ishelper(3501) && backedgedist <=-5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = ishelper(197) && time  =173
trigger2 = ishelper(3501) && !time
value = 40,5
volume = -150
freqmul = 1.4+(random/2500.0)
persistent = 0

;intro 1 - id = 197
;-------

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(197) && !time
value = ifelse(random<333,4200,ifelse(random<500,4210,4220))
elem = 7

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(197) && anim = 4200 && time = 173
value = 4201

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(197) && anim = 4210 && time = 173
value = 4211

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(197) && anim = 4220 && time = 173
value = 4221

;dark force - id = 3501
;----------

[State 0, SprPriority]
type = SprPriority
trigger1 = ishelper(3501)
value = ifelse(pos y <=3,3,ifelse(pos y =4,4,ifelse(pos y =5,5,6)))

[State 0, PosSet]
type = PosSet
trigger1 = ishelper(3501) && !time
y = ceil(3+(random/100))

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(3501) && !time
value = ifelse(random<150,4250,ifelse(random<333,4200,ifelse(random<500,4210,4220)))

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = ishelper(3501) && anim = 4200
trigger1 = rootdist x >=30
trigger2 = rootdist x <=-30
trigger3 = root, var(10)=0
trigger4 = roundstate!=2
trigger5 = root, life = 0
value = 4201

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = ishelper(3501) && anim = 4210
trigger1 = rootdist x >=30
trigger2 = rootdist x <=-30
trigger3 = root, var(10)=0
trigger4 = roundstate!=2
trigger5 = root, life = 0
value = 4211

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = ishelper(3501) && anim = 4220
trigger1 = rootdist x >=30
trigger2 = rootdist x <=-30
trigger3 = root, var(10)=0
trigger4 = roundstate!=2
trigger5 = root, life = 0
value = 4221

;raiz se va
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = ishelper(3501) && anim = 4250
trigger1 = animelemtime(6)=200
trigger2 = root, var(10)=0
trigger3 = roundstate!=2
trigger4 = root, life = 0
value = 4251

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim =4252
movetype = A

;raiz reacciona
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = ishelper(3501) && anim = 4250 && animelemtime(6)>=1
trigger1 = p2dist x <= 20
trigger1 = p2dist x >= -20
trigger1 = enemynear,pos y >= -110
value = 4252

[State 191, Snd 2]
type = PlaySnd
trigger1 = ishelper(3501) && anim = 4252 && animelem = 1
value = 200,1
freqmul = 0.7+(random/3333.3)

[State 191, Snd 2]
type = PlaySnd
trigger1 = ishelper(3501) && anim = 4252 && animelem = 7
value = 200,2
freqmul = 0.7+(random/3333.3)

;polvo
[State 191]
type = Explod
trigger1 = ishelper(3501) && anim = 4252 && animelem = 1
anim = 3057
postype = p1
pos = 0, 7
sprpriority = 5
scale = 0.7,0.5

[State 1000, 5]
type = HitDef
trigger1 = ishelper(3501)
attr = S, SP
hitflag = MAFD
animtype  = Up
damage    = 90, 0
priority = 4, Hit
guardflag = MA
sparkno = -1
sparkxy = -4,-60
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = -3,-7
air.velocity =  -3,-7
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 6
envshake.ampl = 4
pausetime = 0,3
persistent = 0
getpower = 0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = unguardable

[State 0, VarSet]
type = VarSet
trigger1 = movehit && enemynear,name = "noroko" && enemynear,var(10)=1
trigger2 = movehit && enemynear,name = "animus" && enemynear,stateno = 3100
var(16)=1

;sangre
[State 0, Explod]
type = Explod
trigger1 = movehit && var(16)=0
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
anim = f 7008
pos = 0,ceil((enemynear, pos y)-100)
facing = ifelse(random<500,1,-1)
ontop = 1
shadow = -1
ownpal = 1
persistent = 0

;SPARK
[State 1010, 9]
type = explod
trigger1 = movehit && enemynear,name = "noroko" && enemynear,var(10)=1
trigger2 = movehit && enemynear,name = "animus" && enemynear,stateno = 3100
anim = f ifelse(random < 500,0,1)
pos = 0,ceil((enemynear, pos y)-100)
persistent = 0
ignorehitpause = 1
sprpriority = 4

;fatal move - id = 4000
;----------

[State 0, SprPriority]
type = SprPriority
trigger1 = ishelper(4000)
value = 3

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(4000) && !time
value = ifelse(random<333,4200,ifelse(random<500,4210,4220))

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(4000) && anim = 4200 && animelemtime(7)=3
value = 4201

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(4000) && anim = 4210 && animelemtime(7)=3
value = 4211

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ishelper(4000) && anim = 4220 && animelemtime(7)=3
value = 4221

;---------------------------------------------------
;---------------------------------------------------
;sangre constante - (helper)
[Statedef 6100]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 0,0
anim = 9123000
ctrl = 0
sprpriority = 5

[State 821, 2.2]
type = veladd
trigger1 = 1
y = 0.25

;gota de AIR
[State 0, Explod]
type = Explod
trigger1 = !time
anim = f 7000
ID = 7000
pos = 0,ceil(-2+(random/250))
scale = 1,1
sprpriority = 10
bindtime = -1
removetime = -1
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = pos Y >= -2 && vel y > 0
id = 7000

;charco
[State 0, Explod]
type = Explod
trigger1 = pos Y >= -2 && vel y > 0
anim = f ifelse(random/500,7001,7002)
ID = 7001
pos = 0,ceil(-2+(random/250))
scale = 1,1
sprpriority = -1
removetime = 1000
ownpal = 1

[State 700, 10]
type = destroyself
trigger1 = pos Y >= -2 && vel y > 0

;---------------------------------------------------
;---------------------------------------------------
;sangre VOLATIL - (helper)
[Statedef 6101]
type    = S
movetype= I
physics = N
poweradd= 0
velset = -4.5-(random/500.0),-3+(random/333.3)
anim = 9123000
ctrl = 0

[State 821, 2.2]
type = veladd
trigger1 = 1
y = 0.3

;gota de AIR
[State 0, Explod]
type = Explod
trigger1 = !time
anim = f 7007
ID = 7007
scale = 1,1
sprpriority = 10
bindtime = -1
removetime = -1
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = pos Y >= -2 && vel y > 0
id = 7007

;charco
[State 0, Explod]
type = Explod
trigger1 = pos Y >= -2 && vel y > 0
anim = f ifelse(random/500,7001,7002)
ID = 7001
pos = 0,ceil(-2+(random/250))
scale = 2,1
sprpriority = -1
removetime = 700
ownpal = 1

[State 700, 10]
type = destroyself
trigger1 = pos Y >= -2 && vel y > 0


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

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

[Statedef -2]

;[E]
; ai stuff
; Within StateDef -2, none of your own AI-related code should be placed
; above these next two controllers.

[State -2, StopAI]
type = VarSet
triggerall = var(58) > 0 && !IsHelper
trigger1 = RoundState != 2
trigger2 = !Alive
var(58) = -2
IgnoreHitPause = 1

; This controller is optional.  It allows you treat the AI flag as a boolean
; value rather than an integer value, letting you trigger your AI directives
; with "var(0)" instead of "var(58)>0", and letting you make moves usable only
; by humans by using "!var(0)" instead of "var(58)<1", thus slightly improving
; the size and efficiency of your code.
; Another benefit is that it makes it much easier for users to disable your AI,
; if they so choose.
[State -2, Simplifier]
type = VarSet
triggerall = !IsHelper
trigger1 = var(58) = 1
trigger2 = var(59):=0
var(59) = 1	; Another option is to replace 1 with something like MatchNo, if
		; you want to design your AI to have varying levels of difficulty.
IgnoreHitPause = 1
;-------------------------------------------------------

[State 0, VarSet]
type = VarSet
trigger1 = ctrl
var(25)=0

;fruti-toss
[State 0, VarSet]
type = VarSet
trigger1 = ctrl
var(2)=0

;grito cuando sufre
[State -2, 1]
type = PlaySnd
triggerall = time = 1 && alive
trigger1 = random < 500
trigger1 = (stateno = 5000)||(stateno = 5020)||(stateno = 5070)||(stateno = 5080)
value = 11,ifelse(random<333,1,ifelse(random<500,2,3))
channel = 15
volume = 250
freqmul = 0.9+(random/3333.3)
ignorehitpause = 1

;aerial rave off
[State 0, VarSet]
type = VarSet
trigger1 = stateno!=410 && stateno !=40 && stateno != 50
v = 15
value = 0

;troncazo roto off
[State 0, VarSet]
type = VarSet
trigger1 = stateno != 3000
var(9)=0

;aerial rave off
[State 0, VarSet]
type = VarSet
trigger1 = stateno!=3520
var(33)=0

;DF
;baja el poder mientras esta en DF
[State -2, PowerAdd]
type = PowerAdd
triggerall = var(10) = 1
trigger1 = roundstate = 2 && stateno != 3500
value = -3
ignorehitpause = 1

;DF florecita constante
[State 0, Helper]
type = Helper
trigger1 = var(10)=1 && life !=0 && roundstate = 2
trigger1 = numhelper(3501) <= 3 && stateno != 3500 && stateno != 3520
name = "florecita"
ID = 3501
pos = ceil(-30+(random/16.6)),0
stateno = 4200
ownpal = 1

;DF
;BG color
[State -2, BGPalFX]
type = BGPalFX
triggerall = roundstate = 2 && life != 0 && stateno !=3501
trigger1 = var(10) = 1
trigger2 = stateno = 3500 && anim = 3500 && time >=4
time = 1
add = -100,-0,-100
ignorehitpause = 1

;df - invisible
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = var(10)=1
flag = invisible

;df - recupera vida con fruto
[State 0, LifeAdd]
type = LifeAdd
trigger1 = numhelper(3500)>=1
trigger1 = helper(3500), anim = 3506 && helper(3500), animelemtime(1)=1
value = 80

;df - recupera power con fruto
[State 0, powerAdd]
type = poweradd
trigger1 = numhelper(3500)>=1
trigger1 = helper(3500), anim = 3506 && helper(3500), animelemtime(1)=1
value = 200

;DF
;muere y se cancela
[State 0, VarSet]
type = VarSet
trigger1 = !alive
var(10)=0

;DF - cancela grillos
[State 0, StopSnd]
type = StopSnd
trigger1 = var(10)=0
channel = 2

[State -2, mosca 1]
type = Helper
trigger1 = power >= 1000
trigger1 = NumHelper(8000) = 0
name = "mosca 1"
ID = 8000
pos = -20,-260
stateno = 8000
keyctrl = 0
ownpal = 1
sprpriority = 7

[State -2, mosca 2]
type = Helper
trigger1 = power >= 2000
trigger1 = NumHelper(8001) = 0
name = "mosca 2"
ID = 8001
pos = 0,-255
stateno = 8000
keyctrl = 0
ownpal = 1
sprpriority = 7

[State -2, mosca 3]
type = Helper
trigger1 = power >= 3000
trigger1 = NumHelper(8002) = 0
name = "mosca 3"
ID = 8002
pos = 20,-250
stateno = 8000
keyctrl = 0
ownpal = 1
sprpriority = 7

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numhelper(8000)=0
ID = 8010

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !(enemynear, Authorname = "Andres Borghi")
trigger1 = stateno != 170 && stateno != 185
flag = invisible



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

[Statedef -3]

;[E]
;ai stuff

;[StateDef -3]
;
; Kamek and Luchini appear to have been the first ones to use the IsHomeTeam AI
; activation concept.
; Feel free to move this controller to your character's intro state for slightly
; better efficiency.
[State -3, SetAI]
type = VarSet
triggerall = Alive && !IsHelper
triggerall = IsHomeTeam
trigger1 = TeamSide = 2
trigger2 = MatchNo > 1
var(58) = 1

[State -3, AI Helper - Compatibly Partnered Version]
type = Helper
trigger1 = !var(58) && !IsHelper
trigger1 = !NumHelper(9742)
trigger1 = Alive && RoundState = 2
trigger1 = NumPartner
trigger1 = Partner,SelfAnimExist(9741)
HelperType = normal
name = "AI Helper (Simul Version)"
ID = 9742
pos = 9999999,99999
StateNo = 9742
KeyCtrl = 1
PauseMoveTime = 2147483647
SuperMoveTime = 2147483647

; If you want to use the Guard mode, Dummy mode, Distance, or Button jam dummy
; control options in Training mode without activating the dummy's AI while
; working on the character, then all you need to do is temporarily disable
; this controller.  Or, if you want to permanently disable this controller in
; Training mode, then you could use the Training mode detection code available
; from my site ( http://www.mugenguild.net/~winane/ ), and then just add a
; "(var(59)&63)>30" triggerall to this controller.
; Alternatively, you can just set "Dummy control" to "Manual", press a P2 button
; to kill the AI helper, and then set dummy control back to "Cooperative".  (In
; fact, setting dummy control to manual isn't even necessary, if you press the
; P2 button prior to the first time you pause.)
[State -3, AI Helper]
type = Helper
triggerall = !var(58) && !IsHelper
triggerall = !NumHelper(9741)
triggerall = Alive && RoundState = 2
trigger1 = !NumPartner
trigger2 = !(Partner,SelfAnimExist(9741))
HelperType = normal
name = "AI Helper"
ID = 9741
pos = 9999999,99999
StateNo = 9741
KeyCtrl = 1
PauseMoveTime = 2147483647
SuperMoveTime = 2147483647

[State -3, TurnBackOnAI]
type = VarSet
trigger1 = var(58) = -2 && !IsHelper
trigger1 = Alive && RoundState = 2
var(58) = 1

; This method works somewhat in Linux Mugen version 2002.04.14,
; whereas the old humanly-impossible commands method does not.
; It is very important that this controller NOT be moved to State -2.
; Note that this part won't work nearly as well if AI.Cheat is turned off
; in mugen.cfg.
[State -3, XOR]
type = VarSet
triggerall = var(58)!=1 && !IsHelper
triggerall = !var(56)
triggerall = var(57) = GameTime-1
trigger1 = command = "a" ^^ command = "a2"
trigger2 = command = "b" ^^ command = "b2"
trigger3 = command = "c" ^^ command = "c2"
trigger4 = command = "x" ^^ command = "x2"
trigger5 = command = "y" ^^ command = "y2"
trigger6 = command = "z" ^^ command = "z2"
trigger7 = command = "start" ^^ command = "start2"
trigger8 = command = "holda" ^^ command = "holda2"
trigger9 = command = "holdb" ^^ command = "holdb2"
trigger10 = command = "holdc" ^^ command = "holdc2"
trigger11 = command = "holdx" ^^ command = "holdx2"
trigger12 = command = "holdy" ^^ command = "holdy2"
trigger13 = command = "holdz" ^^ command = "holdz2"
trigger14 = command = "holdstart" ^^ command = "holdstart2"
trigger15 = command = "holdfwd" ^^ command = "holdfwd2"
trigger16 = command = "holdback" ^^ command = "holdback2"
trigger17 = command = "holdup" ^^ command = "holdup2"
trigger18 = command = "holddown" ^^ command = "holddown2"
trigger19 = command = "recovery" ^^ command = "recovery2"
;Add more as desired. (See my notes in the CMD.)
var(58) = 1

; These next two controllers must be placed here, after the above XOR
; VarSet controller and before the below GameTime VarSet controller.
[State -3, fiXOR]
type = VarAdd
trigger1 = var(56) > 0 && !IsHelper
var(56) = -1

[State -3, fuXOR]
type = VarSet
trigger1 = var(57) < GameTime-1 && !IsHelper
var(56) = 31
IgnoreHitPause = 1

; It is very important that this controller NOT be moved to State -2, as putting
; it there would defeat the entire purpose of the controller, allowing the
; helper method or the XOR method to erroneously set the AI variable.
; And within State -3, don't put any ChangeState controllers before this
; controller, lest you unnecessarily delay your character's AI activation.
[State -3, GameTimeVar]
type = VarSet
trigger1 = !IsHelper
var(57) = GameTime
IgnoreHitPause = 1

; Within StateDef -3, none of your own AI-related code should come after the code
; provided here (and putting it before the code is also generally a bad idea).
; It's better to use State -1 (or, in special circumstances, State -2) instead.


;This controller plays a sound everytime KFM lands from a jump, or
;from his back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 100, 3
freqmul = 0.7+(random/3333.3)

;pasos
[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 20 && animelem = 3
trigger2 = anim = 20 && animelem = 8
trigger3 = anim = 21 && animelem = 2
trigger4 = anim = 21 && animelem = 6
trigger5 = anim = 100 && animelem = 3
trigger6 = anim = 100 && animelem = 8
value = 100,3
volume = -100
freqmul = 0.7+(random/2000.0)

;saltos
[State 0, PlaySnd]
type = PlaySnd
triggerall = time=1
trigger1 = stateno = 50
trigger2 = stateno = 105
value = 0,ifelse(random<500,1,2)
volume = -100
freqmul = 0.8+(random/6666.6)

[State 0, StopSnd]
type = StopSnd
trigger1 = stateno!=197 && stateno != 198
channel = 26

;DF - se cancela afterimage si muere
[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = life = 0
trigger2 = movetype = h && var(10)=0
time = 0

;DF cancela DF
[State -3, cancela]
type = ChangeState
triggerall = var(10) >0 && power > 0 && life !=0
triggerall = statetype !=A && command = "darkforce" && ctrl
trigger1 = var(24) = 0
trigger2 = var(24) = 3
trigger3 = var(24) = 1 && power <=1000
trigger4 = var(24) = 2 && power <=1000
value = 3501
ctrl = 0

;DF cancela DF
[State -3, cancela]
type = ChangeState
triggerall = var(10) >0 && alive && statetype !=A && ctrl
trigger1 = power = 0
trigger2 = roundstate != 2
value = 3501
ctrl = 0

;DF
;baja el poder mientras esta en DF si es golpeado
[State -3, PowerAdd]
type = PowerAdd
triggerall = var(10) > 0
trigger1 = movetype = H && !time
value = -60

;sangre constante
[State 0, Helper]
type = Helper
trigger1 = life <= 250 && random < 10
trigger1 = roundstate = 2 && movetype != H && alive = 1
trigger1 = stateno != 4000 && stateno != 4001
name = "sangre constante"
ID = 6100
stateno = 6100
pos = ceil(-8+(random/60)), ceil(ifelse(statetype != c,-40,-20)-(ifelse(statetype != c,(random/14),(random/25))))
facing = ifelse(random<500,1,-1)
ownpal = 1

;---------------------------------------------------------------------------
;MOSCA
[Statedef 8000]
type    = A
movetype= I
sprpriority = 7

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = parent, stateno = 4500
flag = invisible

[State 8000, 1]
type = PlayerPush
trigger1 = 1
value = 0

[State 0, Turn]
type = Turn
trigger1 = facing != root, facing

;velsets
;-------

;primer velset
[State 0, VelSet]
type = VelSet
trigger1 = !time
x = -2.0 + (random/250.0)
y = -2.0 + (random/250.0)

;adelante
[State 8000, 2]
type = VelSet
trigger1 = RootDist X > 30
x = 0.7+(random/1000.0)

;atras
[State 8000, 2]
type = VelSet
trigger1 = RootDist X < -30
x = -0.7-(random/1000.0)

;arriba
[State 8000, 2]
type = VelSet
trigger1 = RootDist y <= 30
y = -0.7-(random/1000.0)

;abajo
[State 8000, 2]
type = VelSet
trigger1 = RootDist y >= 120
y = 0.7+(random/1000.0)

;randoms

;adelante
[State 8000, 2]
type = VelSet
trigger1 = vel x < 0 && random < 10
x = 0.7+(random/1000.0)

;atras
[State 8000, 2]
type = VelSet
trigger1 = vel x > 0 && random < 10
x = -0.7-(random/1000.0)

;arriba
[State 8000, 2]
type = VelSet
trigger1 = vel y < 0 && random < 10
y = -0.7-(random/1000.0)

;abajo
[State 8000, 2]
type = VelSet
trigger1 = vel x > 0 && random < 10
y = 0.7+(random/1000.0)

;changeanims
;-----------

;derecha
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = vel x >= 1 && anim != 8000
value = 8000

;frente
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = vel x > -1 && vel x < 1 && anim != 8001
value = 8001

;izquierda
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = vel x <= -1 && anim != 8002
value = 8002

;explod 1
[State 0, Explod]
type = Explod
triggerall = ishelper(8000) && numexplod(8010)=0
triggerall = anim != 8003 && anim != 8004
trigger1 = root, var(10) = 1
trigger2 = root, stateno = 181
trigger3 = root, stateno = 183
trigger4 = root, stateno = 185
anim = 3507
ID = 8010
bindtime = -1
sprpriority = 1
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root, var(10) = 0
trigger1 = root, stateno !=181 && root, stateno !=183 && root, stateno !=185
trigger2 = ishelper(8000) && power <= 999
ID = 8010

;explod 2
[State 0, Explod]
type = Explod
triggerall = ishelper(8001) && numexplod(8011)=0
triggerall = anim != 8003 && anim != 8004
trigger1 = root, var(10) = 1
trigger2 = root, stateno = 181
trigger3 = root, stateno = 183
trigger4 = root, stateno = 185
anim = 3507
ID = 8011
bindtime = -1
sprpriority = 1
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root, var(10) = 0
trigger1 = root, stateno !=181 && root, stateno !=183 && root, stateno !=185
trigger2 = ishelper(8001) && power <= 1999
ID = 8011

;explod 3
[State 0, Explod]
type = Explod
triggerall = ishelper(8002) && numexplod(8012)=0
triggerall = anim != 8003 && anim != 8004
trigger1 = root, stateno = 181
trigger2 = root, stateno = 183
trigger3 = root, stateno = 185
anim = 3507
ID = 8012
bindtime = -1
sprpriority = 6
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root, var(10) = 0
trigger1 = root, stateno !=181 && root, stateno !=183 && root, stateno !=185
trigger2 = ishelper(8002) && power <= 2999
ID = 8012

;muere
;-----

[State a0, ChangeAnim]
type = ChangeAnim
triggerall = anim != 8003
trigger1 = ishelper(8000) && power <= 999
trigger2 = ishelper(8001) && power <= 1999
trigger3 = ishelper(8002) && power <= 2999
value = 8003

[State 0, VelSet]
type = VelSet
trigger1 = anim = 8003
x = 0
y = 2

[State e0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 8003 && pos y >=-3
value = 8004

[State 0, VelSet]
type = VelSet
trigger1 = anim = 8004
x = 0
y = 0

[State 0, posset]
type = posset
trigger1 = anim = 8004
y = 0

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = ifelse(anim = 8004,0,3)


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

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

; Var(1) - StateDef 180, 191, 1200, 1300
; Var(15) - StateDef 410, -2, 50
; Var(18) - StateDef 4101
; Var(19) - StateDef 4101
; Var(20) - StateDef 4101
; Var(21) - StateDef 3061
; Var(22) - StateDef -2

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

;[E]
; ai activation

;***************************************************************************
; ST
;***************************************************************************

; (Credit to ANMC, Bagaliao, and FlowaGirl for the basic helper method concept.)
;
;------------------
; AI Activation Helper State - Primary Version
; (Credit to YongMing for the basic HitPause bugfix concept.)
;
; var(1) - First tick button activation prevention.
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Persistent direction command detection enabler (due to 2002.04.14).
; var(9) - AutoTurn bug fixer.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(58) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9741]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9741, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 5050

[State 9741, UglyHack]
type = VarSet
trigger1 = !var(1)
var(2) = 2

[State 9741, PauseCheck]
type = VarSet
trigger1 = GameTime > Parent,var(57)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2
trigger4 = Parent,var(58)
trigger5 = var(3):=0
var(2) = (var(3):=1)+(var(4):=0)

[State 9741, Facing]
type = Turn
trigger1 = var(9):=(Facing != Parent,Facing)
trigger1 = !(var(4):=0)

[State 9741, DirTurnOnAI]
type = ParentVarSet
triggerall = !(var(3) || var(9))
trigger1 = Parent,command = "holdfwd"
trigger2 = Parent,command = "holdback"
trigger3 = Parent,command = "holdup"
trigger4 = Parent,command = "holddown"
trigger5 = !(var(4):=1)
var(58) = var(4)

[State 9741, DirTurnOffAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = Parent,var(58)
trigger1 = command = "holdfwd"
trigger1 = Parent,command = "holdfwd"
trigger2 = command = "holdback"
trigger2 = Parent,command = "holdback"
trigger3 = command = "holdup"
trigger3 = Parent,command = "holdup"
trigger4 = command = "holddown"
trigger4 = Parent,command = "holddown"
var(58) = var(4):=0

[State 9741, ButtonTurnOnAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = Parent,command = "a"
trigger2 = Parent,command = "b"
trigger3 = Parent,command = "c"
trigger4 = Parent,command = "x"
trigger5 = Parent,command = "y"
trigger6 = Parent,command = "z"
trigger7 = Parent,command = "start"
var(58) = 1

[State 9741, ButtonTurnOffAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = command = "a"
trigger1 = Parent,command = "a"
trigger2 = command = "b"
trigger2 = Parent,command = "b"
trigger3 = command = "c"
trigger3 = Parent,command = "c"
trigger4 = command = "x"
trigger4 = Parent,command = "x"
trigger5 = command = "y"
trigger5 = Parent,command = "y"
trigger6 = command = "z"
trigger6 = Parent,command = "z"
trigger7 = command = "start"
trigger7 = Parent,command = "start"
var(58) = -1

[State 9741, UnPauseCheck]
type = VarSet
triggerall = var(2)
trigger1 = Parent,command = "a"
trigger2 = Parent,command = "b"
trigger3 = Parent,command = "c"
trigger4 = Parent,command = "x"
trigger5 = Parent,command = "y"
trigger6 = Parent,command = "z"
trigger7 = Parent,command = "start"
trigger8 = var(2) = 2
trigger8 = var(2):=0
var(2) = 2

[State 9741, Goodbye]
type = DestroySelf
triggerall = var(1):=1
trigger1 = Parent,var(58)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2


;------------------
; AI Activation Helper State - Compatibly Partnered Version
;
; var(1) - First tick activation prevention
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Hitpause check.
; var(5) - No button on previous tick.
; var(6) - Any dir on this tick.
; var(7) - Any button on this tick.
; var(8) - Matching partner button detected.
; var(9) - AutoTurn bug fixer.
; var(10)- Buffered dir detection disabler.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(58) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9742]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9742, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 5050

[State 9742, UglyHack]
type = VarSet
trigger1 = !var(1)
var(2) = var(3):=2

[State 9742, PauseCheck]
type = VarSet
trigger1 = GameTime > Parent,var(57)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2
trigger4 = Parent,var(58)
trigger5 = var(1)
trigger5 = var(3):=0
var(2) = var(3):=1

[State 9742, Facing]
type = Turn
trigger1 = var(9):=(Facing != Parent,Facing)

[State 9742, ParentDirCheck]
type = VarSet
trigger1 = Parent,command = "holdfwd"
trigger2 = Parent,command = "holdback"
trigger3 = Parent,command = "holdup"
trigger4 = Parent,command = "holddown"
trigger5 = var(6):=0
var(6) = 1

[State 9742, BufferCheck]
type = VarSet
trigger1 = var(3) || var(4) || var(10)
var(10) = var(6)

[State 9742, ParentButtonCheck]
type = VarSet
trigger1 = Parent,command = "a"
trigger2 = Parent,command = "b"
trigger3 = Parent,command = "c"
trigger4 = Parent,command = "x"
trigger5 = Parent,command = "y"
trigger6 = Parent,command = "z"
trigger7 = Parent,command = "start"
trigger8 = var(7):=0
var(7) = 1

[State 9742, SameButtonCheck]
type = VarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = NumPartner
trigger1 = Parent,command = "a"
trigger1 = Partner,command = "a"
trigger2 = Parent,command = "b"
trigger2 = Partner,command = "b"
trigger3 = Parent,command = "c"
trigger3 = Partner,command = "c"
trigger4 = Parent,command = "x"
trigger4 = Partner,command = "x"
trigger5 = Parent,command = "y"
trigger5 = Partner,command = "y"
trigger6 = Parent,command = "z"
trigger6 = Partner,command = "z"
trigger7 = Parent,command = "start"
trigger7 = Partner,command = "start"
trigger8 = var(8):=0
var(8) = 1

[State 9742, DirTurnOnAI]
type = ParentVarSet
trigger1 = var(6)
trigger1 = !(var(9) || var(10))
var(58) = 1

[State 9742, DirTurnOffAI]
type = ParentVarSet
triggerall = var(6)
triggerall = !var(3)
triggerall = Parent,var(58)
trigger1 = command = "holdfwd"
trigger1 = Parent,command = "holdfwd"
trigger2 = command = "holdback"
trigger2 = Parent,command = "holdback"
trigger3 = command = "holdup"
trigger3 = Parent,command = "holdup"
trigger4 = command = "holddown"
trigger4 = Parent,command = "holddown"
var(58) = 0

[State 9742, ButtonTurnOnAI]
type = ParentVarSet
trigger1 = var(5) && var(7)
trigger1 = !(var(2) || var(8))
var(58) = 1

[State 9742, ButtonTurnOffAI]
type = ParentVarSet
triggerall = var(7)
triggerall = !(var(2) || var(8))
trigger1 = command = "a"
trigger1 = Parent,command = "a"
trigger2 = command = "b"
trigger2 = Parent,command = "b"
trigger3 = command = "c"
trigger3 = Parent,command = "c"
trigger4 = command = "x"
trigger4 = Parent,command = "x"
trigger5 = command = "y"
trigger5 = Parent,command = "y"
trigger6 = command = "z"
trigger6 = Parent,command = "z"
trigger7 = command = "start"
trigger7 = Parent,command = "start"
var(58) = -1

[State 9742, UnPauseCheck]
type = VarSet
triggerall = var(2)
triggerall = !var(4)
trigger1 = var(7)
trigger2 = var(2) = 2
trigger2 = var(2):=0
var(2) = 2

[State 9742, Goodbye]
type = DestroySelf
trigger1 = Parent,var(58)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2

[State 9742, HitPauseCheck]
type = VarSet
trigger1 = var(6) || var(7)
trigger2 = !(Parent,HitPauseTime)
var(4) = Parent,HitPauseTime

[State 9742, Delay]
type = VarSet
trigger1 = var(1):=1
var(5) = !var(7)
