[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 = 0;  60
FloatPersistIndex = 0;  40

[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 = -5, -90   ;Approximate position of head
mid.pos = -5, -60    ;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,-4.8 ;Hop backward (x, y)
jump.neu = 0,-9.7    ;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 = .60         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Variable usage:
; This is a record of the variables that KFM uses. Keeping a record of your
; variable usage helps you avoid careless mistakes later.
; var(1)  - Used in kfm.cmd for combo condition (updated every tick)
; var(2)  - Used in Kung Fu Throw (state 800) to remember if fwd was being
;           held (remembered from state 800 through state 810).


;---------------------------------------------------------------------------
; Lose by Time Over
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

[State 0, PalFX]
type = PalFX
trigger1 = animelemtime(3)=1
time = 5
add = 256,256,256
mul = 256,256,256
sinadd = -256,-256,-256,15

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 4
trigger2 = animelem = 5
time = 5
ampl = -6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 5
value = 23,1
freqmul = 1.3+(random/3333.3)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 23,ifelse(random<500,2,3)
freqmul = 1.1

;chispa 1
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
anim = 3170
pos = -30,-75
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

;chispa 2
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
anim = 3170
pos = -15,-60
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 21,3
volume = -100
freqmul = 0.8+(random/3333.3)

;cabeza
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1221
vel = -3+(random/166),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1

;torso
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1222
vel = -3+(random/166),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 1
ownpal = 1

;brazo 1
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1223
vel = -3+(random/166),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1

;brazo 2
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1224
vel = -3+(random/166),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 0
ownpal = 1

;pierna 1
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1225
vel = -3+(random/166),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1

;pierna 2
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1226
vel = -3+(random/166),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 0
ownpal = 1


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

;SURVIVAL SCORE
[State 0, ChangeState]
type = ChangeState
trigger1 = !(enemynear, Authorname = "Andres Borghi")
value = 182
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 = ChangeState
trigger1 = Time = 0
value = ifelse(random<333,181,ifelse(random<500,182,183))

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

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

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 176
pos = 350,0
vel = -9,0
removetime = 39
sprpriority = 5
shadow = -1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 177
pos = -350,0
vel = 9,0
removetime = 39
sprpriority = 0
shadow = -1
ownpal = 1

[State 440, 2]
type = PlaySnd
trigger1 = anim = 0 && time = 39
trigger2 = anim = 2 && time = 39
value = 5, 0
freqmul = 1.0+(random/5000.0)
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 39
value = 178

;chispa 1
[State 3900, 1]
type = Explod
trigger1 = time = 39
anim = 3170
pos = -5,-7
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

;chispa 1
[State 3900, 1]
type = Explod
trigger1 = time = 39
anim = 3170
pos = -3,-74
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

;chispa 1
[State 3900, 1]
type = Explod
trigger1 = time = 39
anim = 3170
pos = -4,-131
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

;ondita
[State 0, Explod]
type = Explod
trigger1 = time = 39
anim = f 61
sprpriority = 0
ownpal = 1
pos = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 23,4
freqmul = 1.2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 21,6
volume = 200

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 39
value = 23,1
volume = 200
freqmul = 0.7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 39
value = 22,0
freqmul = 0.7

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 39
time = 12
ampl = -7

;---------------------------------------------------------------------------
; Win pose 2 - Risa
[Statedef 182]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 180
elem = ifelse(anim = 2,2,1)

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

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

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

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 46
time = 4
ampl = -5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 5,7
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 46
value = f 7,0

;---------------------------------------------------------------------------
; Win pose 3 - lanza mina
[Statedef 183]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeState]
type = ChangeState
trigger1 = enemynear, alive
trigger2 = enemynear, name = "final"
trigger3 = enemynear, name = "noroko" && enemynear, anim = 3175
value = ifelse(random<500,181,182)
ctrl = 0

;cambia si nunca puede llegar al enemigo en team mode
[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 110 && anim = 20
value = 182
ctrl = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time && facing = -1 && Pos X < fvar(17)
trigger2 = !time && facing = 1 && Pos X > fvar(17)
value = 5

[State 0, Turn]
type = Turn
trigger1 = anim = 5 && animelem = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time && anim != 5
trigger2 = anim = 5 && animtime = 0
value = 20

[State 0, VelSet]
type = VelSet
trigger1 = anim = 20 && animelem = 1
x = 3

[State -3, Landing Sound]
type = PlaySnd
trigger1 = anim = 20 && animelem = 3
value = 40, 0
freqmul = 0.9+(random/3333.3)
volume = -100

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 20
trigger1 = Ifelse(facing = 1,Pos X >= fvar(17)-20, Pos X <= fvar(17)+20)
value = 910

[State 0, VelSet]
type = VelSet
trigger1 = anim = 910
x = 0

;nube morph
[State 0, Explod]
type = Explod
trigger1 = anim = 910 && animelem = 2
anim = 10000
ontop = 1
ownpal = 1
scale = 1,ifelse(parent,anim=440,.7,1)

;morph sonido
[State 440, 2]
type = PlaySnd
trigger1 = anim = 910 && animelem = 2
value = 20, 0
volume = -50

;lanza arriba
[State 0, Explod]
type = Explod
trigger1 = anim = 910 && animelem = 1
anim = 900
ownpal = 1
pos = -6,0
facing = -1
sprpriority = 2

;lanza abajo
[State 0, Explod]
type = Explod
trigger1 = anim = 910 && animelem = 1
anim = 901
ownpal = 1
pos = -6,0
shadow = -1
facing = -1
sprpriority = 0

[State 440, 2]
type = PlaySnd
trigger1 = anim = 910 && animelem = 1
value = 21, ifelse(random<500,0,1)
freqmul = 0.9+(random/3333.3)

;sangre constante
[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 910 && animelem = 1
value = 22,3
freqmul = 0.5+(random/3333.3)
volume = 100

[State 440, 2]
type = PlaySnd
trigger1 = anim = 910 && animelem = 1
value = 22, 0
freqmul = 0.8+(random/3333.3)
volume = 100

[State 0, EnvShake]
type = EnvShake
trigger1 = anim = 910 && animelem = 1
time = 12
ampl = -10

;parche
[State 0, Explod]
type = Explod
trigger1 = anim = 910 && animelem = 2
anim = 911
ownpal = 1
sprpriority = 6
removetime = -1

;sangre 1
[State 1010, 9]
type = explod
trigger1 = anim = 910 && animelem = 1
anim = f 7008
pos = 39,-4
sprpriority = 4
ownpal = 1
facing = ifelse(random<500,-1,1)

;sangre constante piso
[State 1010, 9]
type = explod
trigger1 = anim = 910 && animelemtime(1)>=0 && Time % 400 && random <200
anim = f ifelse(random<333,7003,ifelse(random<500,7008,7009))
pos = 39,-4
sprpriority = 4
ownpal = 1
facing = ifelse(random<500,-1,1)

;sangre constante HELPER
[State 0, Helper]
type = Helper
trigger1 = anim = 910 && animelemtime(2)>=0 && Time % 400 && random <20
name = "sangre constante"
ID = 6100
stateno = 6100
pos = ceil(-2+(random/250)),-180
facing = ifelse(random<500,1,-1)
ownpal = 1

;sangre constante HELPER
[State 0, Helper]
type = Helper
trigger1 = anim = 910 && animelemtime(2)>=0 && Time % 400 && random <20
name = "sangre constante"
ID = 6100
stateno = 6100
pos = ceil(-10+(random/250)),-200
facing = ifelse(random<500,1,-1)
ownpal = 1

[State 0, playsnd]
type = PlaySnd
trigger1 = anim = 910 && animelem = 2
value = 5,9+(random/250)
freqmul = 1.0+(random/3333.3)
channel = 0
persistent = 0

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

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

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

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = ifelse(random<500,192,195)

;---------------------------------------------------------------------------
; Introduction 1
[Statedef 192]
type = S
ctrl = 0
anim = 190
velset = 0,0
sprpriority = 1

[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 30,0
volume = -100
channel = 17
loop = 1
freqmul = 0.9+(random/3333.3)

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 2
value = 5, 5
freqmul = 1.0+(random/5000.0)
channel = 0
volume = 100

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 300
add = 0,0,-100
mul = 115,0,176
sinadd = 0,0,0,10
invertall = 0
color = 0

;cruz
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 192
sprpriority = 3
shadow = -1
ownpal = 1

;fuego cruz
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 193
sprpriority = 2
ownpal = 1

;parche
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 191
sprpriority = 4
shadow = -1
bindtime = -1

;fuego p1
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 3550
sprpriority = 1
ownpal = 1
bindtime = -1
pos = 12,0
id = 194
removetime = -1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 21
id = 194

[State 0, PosAdd]
type = PosAdd
trigger1 = time =1
x = 20
y = -68

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 204
trigger2 = time = 206
x = -6
y = 22

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 21
x = -8
y = 24

[State 0, SprPriority]
type = SprPriority
trigger1 = animelem = 21
value = 4

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

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

;ondota
[State 0, Explod]
type = Explod
trigger1 = animelem = 21
anim = f 62
sprpriority = 9
ownpal = 1
pos = 0,0

[State 0, MakeDust]
type = MakeDust
trigger1 = animelem = 21
pos = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 21
value = 30,1
channel = 17
volume = 250

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 19
value = 21, 0
freqmul = 0.9+(random/3333.3)
volume = 100

;sangre
[State 0, Explod]
type = Explod
trigger1 = animelem = 21
anim = f ifelse(random/500,7004,7005)
pos = 0, -10
facing = ifelse(random/500,1,-1)
sprpriority = 10
shadow = -1
ownpal = 1

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem = 21
time = 160
add = -256,-256,-256
mul = 256,256,256
sinadd = 256,256,256,150
invertall = 0
color = 256

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelemtime(22)=30
time = 0
add = 0,0,0
mul = 0,0,0
invertall = 0
color = 256

;sangre constante
[State 0, Helper]
type = Helper
trigger1 = animelemtime(18)<=1
trigger1 = random < 40
name = "sangre constante"
ID = 6100
stateno = 6100
pos = ceil(-10+(random/45)), 0-(random/20)
facing = ifelse(random<500,1,-1)
ownpal = 1
sprpriority = 0

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

;---------------------------------------------------------------------------
; Introduction 2
[Statedef 195]
type = S
ctrl = 0
velset = 0,0
sprpriority = 1

;195 animus
;196 anima
[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = !time
value = ifelse(random<500,195,196)

;helper morph
[State 0, Helper]
type = Helper
trigger1 = anim = 196 && animelem = 1 && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 100
value = ifelse(anim=195,195,196)
elem = 2

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

;chispa 1
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 5
anim = 3170
pos = 0,-105
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

;chispa 2
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 5
anim = 3170
pos = -5,-60
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 2
value = 23,ifelse(random<500,2,3)
freqmul = 0.9+(random/3333.3)

[State 440, 2]
type = PlaySnd
trigger1 = anim = 195 && animelem = 5
value = 5, 0
freqmul = 1.0+(random/5000.0)
channel = 0

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 5
value = 21,2
freqmul = 0.9+(random/3333.3)

;explosion
;---------

;cabeza
[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = 1227
vel = -5+(random/200),-2-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1

;torso
[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = ifelse(anim=195,1222,1228)
vel = -5+(random/200),-2-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1
pos = 15,-15

;brazo 1
[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = 1223
vel = -1-(random/250),-2-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1
pos = 15,-15

;brazo 2
[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = 1224
vel = 1+(random/250),-2-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 0
ownpal = 1
pos = 15,-15

;pierna 1
[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = 1225
vel = -1-(random/250),-2-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1

;pierna 2
[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = 1226
vel = 1+(random/250),-2-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 0
ownpal = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 180
trigger2 = time = 184
trigger3 = time = 188
trigger4 = time = 192
trigger5 = time = 196
trigger6 = time = 200
trigger7 = time = 204
x = 2

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 182
trigger2 = time = 186
trigger3 = time = 190
trigger4 = time = 194
trigger5 = time = 198
trigger6 = time = 202
trigger7 = time = 206
x = -2

[State 440, 2]
type = PlaySnd
trigger1 = time = 170
value = 23,3
freqmul = 0.6

[State 440, 2]
type = PlaySnd
trigger1 = time = 170
value = 23,2
freqmul = 0.6

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 5
id = 195

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

;---------------------------------------------------------------------------
; Introduction VS himself
[Statedef 196]
type = S
ctrl = 0
anim = 8055000
velset = 0,0
sprpriority = 1

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

;helper
[State 0, Helper]
type = Helper
trigger1 = !time
name = "animus himself"
ID = 300
stateno = ifelse(facing=1,300,310)
pos = 140,0
postype = left
ownpal = 1

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0 && facing = -1
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time && facing = 1
value = 30,0
volume = -100
channel = 17
loop = 1
freqmul = 0.9+(random/3333.3)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 208
value = 30,1
channel = 17
volume = 250

[State 191, 3]
type = Changeanim
trigger1 = time = 367
value = ifelse(numhelper(4666)=0,47,3203)

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 47 && animelem = 1
trigger2 = anim = 3203 && animelem = 1
value = 40,0

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

;---------------------------------------------------------------------------
; Introduction himself helper MALE
[Statedef 300]
type = S
ctrl = 0
anim = 300
velset = 0,0
sprpriority = 2

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 300
add = 0,0,-100
mul = 115,0,176
sinadd = 0,0,0,10
invertall = 0
color = 0

;cruz
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 192
sprpriority = 4
shadow = -1
ownpal = 1

;fuego cruz
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 193
sprpriority = 3
ownpal = 1

;parche
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 301
sprpriority = 5
shadow = -1
bindtime = -1

;fuego p1
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 3550
sprpriority = 2
ownpal = 1
bindtime = -1
pos = 12,0
id = 194
removetime = -1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 2
id = 194

[State 0, PosAdd]
type = PosAdd
trigger1 = time =1
x = 20
y = -68

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 204
trigger2 = time = 206
x = -6
y = 25

[State 0, PosAdd]
type = Posset
trigger1 = animelem = 2
y = 0

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

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

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

;ondota
[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = f 62
sprpriority = 9
ownpal = 1
pos = 0,0

[State 0, MakeDust]
type = MakeDust
trigger1 = animelem = 2
pos = 0,0

[State 440, 2]
type = PlaySnd
trigger1 = time = 204
value = 21, 0
freqmul = 0.9+(random/3333.3)
volume = 100

;sangre
[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = f ifelse(random/500,7004,7005)
pos = 0, -10
facing = ifelse(random/500,1,-1)
sprpriority = 10
shadow = -1
ownpal = 1

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem = 2
time = 0
add = 0,0,0
mul = 0,0,0
invertall = 0
color = 256

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 4
value = 5,0
freqmul = 1.0+(random/4000.0)
channel = 0

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

;busca cuerpo
[State 191, Snd 2]
type = velset
trigger1 = animelem = 15
x = ((rootdist x)/20.0)

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 15
y = -3

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

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

;---------------------------------------------------------------------------
; Introduction himself helper FEMALE
[Statedef 310]
type = S
ctrl = 0
anim = 310
velset = 0,0
sprpriority = 2

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

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 300
add = 0,0,-100
mul = 115,0,176
sinadd = 0,0,0,10
invertall = 0
color = 0

;parche 1
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 311
sprpriority = 6
shadow = -1
bindtime = -1

;parche 2
[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 312
sprpriority = 1
shadow = -1
bindtime = -1

[State 0, PosAdd]
type = PosAdd
trigger1 = time =1
x = -40
y = -125

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 204
trigger2 = time = 206
x = 6
y = 27

[State 0, PosAdd]
type = Posset
trigger1 = animelem = 2
y = 0

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

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem = 2
time = 0
add = 0,0,0
mul = 0,0,0
invertall = 0
color = 256

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 3
value = 5,9+(random/250)
freqmul = 1.0+(random/3333.3)
channel = 0

;busca cuerpo
[State 191, Snd 2]
type = velset
trigger1 = animelem = 15
x = ((rootdist x)/20.0)

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 15
y = -3

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

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

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 3
value = 5, 4
freqmul = 0.85+(random/5000.0)
channel = 0
volume = 100

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

;fuego 1
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 3 && var(10)=1
anim = 3560
pos = 0,-10
scale = 0.5,0.8
sprpriority = 3
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 3 && var(10)=1
time = 5
ampl = -4

;fuego 2
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 3 && var(10)=2
anim = 3560
pos = 0,-15
scale = 1,1
sprpriority = 3
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 3 && var(10)=2
time = 7
ampl = -6

;fuego 3
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 3 && var(10)=3
anim = 3560
pos = 0,-20
scale = 1.5,1.5
sprpriority = 3
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 3 && var(10)=3
time = 9
ampl = -8

;fuego 4
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 3 && var(10)=4
anim = 3560
pos = 0,-25
scale = 2,2
sprpriority = 3
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 3 && var(10)=4
time = 12
ampl = -10


;toasty!
;------

[State 0, Explod]
type = Explod
trigger1 = animelem = 3 && var(10) > 0 && random < 400
anim = 10001
pos = 0,240
postype = left
ontop = 1
ownpal = 1
bindtime = -1
id = 10001

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3 && numexplod(10001)=1
value = 31,0
volume = 200

;-----

[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 03
[State 3900, 1]
type = Explod
trigger1 = !time && partner, name = "peketo"
anim = f 3003
pos = 0,0
postype = left
ownpal = 1
sprpriority = 6
removetime = -1

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

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

;LETRA 03
[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 03
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "peketo"
anim = f 3221
pos = 195,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

;WALLPAPER 14
[State 3900, 1]
type = Explod
trigger1 = !time && partner, name = "hashi"
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 = "hashi"
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 = "hashi"
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 = "hashi"
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 = "hashi"
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 = "hashi"
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 = "hashi"
anim = f 3227
pos = 213,201
postype = left
ownpal = 1
sprpriority = 9
removetime = -1

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

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

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

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

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

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

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

;LETRA 15
[State 3900, 1]
type = Explod
trigger1 = time = 300 && partner, name = "noroko"
anim = f 3213
pos = 222,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
[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 = ifelse(var(10)=3,203,ifelse(var(10)=4,204,200))
sprpriority = 2                  ;Set p1's sprite 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
damage = ifelse(var(10)=0,23,ifelse(var(10)=1,30,ifelse(var(10)=2,40,ifelse(var(10)=3,50,60)))),0
animtype = Light
guardflag = MA
hitflag = MAF
Priority = 4, Hit
pausetime = 8, 8
sparkno = ifelse(var(10)>1,-1,0)
sparkxy = -10, -76
hitsound = 5, ifelse(var(10)<2,0,-1)
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
palfx.time = ifelse(var(10)<=1,0,40)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
getpower = 13.8*!var(10)

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

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)>=2
anim = 3565
pos = 50,-85
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y -80))
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

;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

;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = ifelse(var(10)=3,213,ifelse(var(10)=4,214,210))
sprpriority = 2

[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 = 4
value = 0, 3
freqmul = 0.9+(random/3333.3)

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 4 && random < 400
value = 5, ifelse(var(10)<3,(ifelse(random<500,2,3)),(ifelse(random<500,1,4)))
freqmul = 1.0+(random/5000.0)
channel = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 7

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage = ifelse(var(10)=0,57,ifelse(var(10)=1,65,ifelse(var(10)=2,75,ifelse(var(10)=3,85,95)))),0
guardflag = MA
pausetime = 10,12
sparkno = ifelse(var(10)>1,-1,1)
sparkxy = -10,-70
hitsound = 5, ifelse(var(10)<2,2,-1)
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 40
ground.velocity = -1.6,-5
air.velocity = -1.6,-5
envshake.time = 4
yaccel = .28
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
Priority = 4, Hit
getpower = 34.2*!var(10)

[State 210, 3]
type = ChangeAnim
trigger1 = AnimElemTime(4) > 0 && AnimElemTime(5) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 210
elem = 6

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)>=2
anim = 3566
pos = 28,-60
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y -70))
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

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

;---------------------------------------------------------------------------
; Standing light kick
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = ifelse(var(10)=3,233,ifelse(var(10)=4,234,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, ifelse(var(10)>=3,3,1)
freqmul = 0.9+(random/3333.3)

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage = ifelse(var(10)=0,26,ifelse(var(10)=1,32,ifelse(var(10)=2,41,ifelse(var(10)=3,50,60)))),0
guardflag = MA
pausetime = 12,12
sparkno = ifelse(var(10)>1,-1,0)
sparkxy = -10,-37
hitsound = 5, ifelse(var(10)<2,1,-1)
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = -5
air.velocity = -2.5,-3.5
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
Priority = 4, Hit
getpower = 15.6*!var(10)

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)>=2
anim = 3565
pos = 35,-50
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y -37))
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

;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

;---------------------------------------------------------------------------
; Standing strong kick
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
ctrl = 0
velset = 0,0
anim = ifelse(var(10)=3,243,ifelse(var(10)=4,244,240))
sprpriority = 2

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

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

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 4
x = 5

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 4 && random < 400
value = 5, ifelse(var(10)<3,(ifelse(random<500,2,3)),(ifelse(random<500,1,4)))
freqmul = 1.0+(random/5000.0)
channel = 0

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage = ifelse(var(10)=0,63,ifelse(var(10)=1,69,ifelse(var(10)=2,77,ifelse(var(10)=3,85,95)))),0
guardflag = MA
pausetime = 7,10
sparkno = ifelse(var(10)>1,-1,1)
sparkxy = -10,-60
hitsound = 5, ifelse(var(10)<2,2,-1)
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-2
air.velocity = -6.2,-3.2
envshake.time = 4
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
Priority = 4, Hit
getpower = 37.8*!var(10)

[State 240, 3]
type = PosAdd
trigger1 = AnimElem = 7
x = 12

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)>=2
anim = 3565
pos = 50,-65
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y -60))
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

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

;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
ctrl = 0
anim = ifelse(var(10)=3,403,ifelse(var(10)=4,404,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, ifelse(var(10)>=3,3,0)
freqmul = 0.9+(random/3333.3)

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = ifelse(var(10)=0,23,ifelse(var(10)=1,30,ifelse(var(10)=2,40,ifelse(var(10)=3,50,60)))),0
Priority = 4, Hit
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 8,11
sparkno = ifelse(var(10)>1,-1,0)
sparkxy = -10,-42
hitsound = 5, ifelse(var(10)<2,0,-1)
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 10
ground.velocity = -4
air.velocity = -1.5,-3
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
getpower = 13.8*!var(10)

[State 400, 3]
type = CtrlSet
trigger1 = Time = 5 && var(10) <=3
value = 1

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)>=2
anim = 3565
pos = 43,-48
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y -42))
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180
;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

;---------------------------------------------------------------------------
;Crouching strong punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
ctrl = 0
anim = ifelse(var(10)=3,413,ifelse(var(10)=4,414,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, ifelse(var(10)>=3,3,2)
freqmul = 0.9+(random/3333.3)

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 3 && random < 400
value = 5, ifelse(var(10)<3,(ifelse(random<500,2,3)),(ifelse(random<500,1,4)))
freqmul = 1.0+(random/5000.0)
channel = 0

[State 410, 3]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA
damage = ifelse(var(10)=0,36,ifelse(var(10)=1,42,ifelse(var(10)=2,51,ifelse(var(10)=3,60,70)))),0
animtype  = Medium
hitflag = MAF
guardflag = MA
pausetime = 12,12
sparkno = ifelse(var(10)>1,-1,1)
sparkxy = -10,-83
hitsound = 5, ifelse(var(10)<2,2,-1)
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -3,-4
fall = 1
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
Priority = 4, Hit
getpower = 22.2*!var(10)

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)>=2
anim = 3566
pos = 43,-50
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y -83))
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

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

;---------------------------------------------------------------------------
;Crouching light kick
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
ctrl = 0
anim = ifelse(var(10)=3,433,ifelse(var(10)=4,434,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, ifelse(var(10)>=3,3,1)
freqmul = 0.9+(random/3333.3)

[State 430, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = ifelse(var(10)=0,28,ifelse(var(10)=1,34,ifelse(var(10)=2,42,ifelse(var(10)=3,50,60)))),0
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = ifelse(var(10)>1,-1,0)
sparkxy = -10,-8
hitsound = 5, ifelse(var(10)<2,1,-1)
guardsound = 6,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5.5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
Priority = 4, Hit
getpower = 16.8*!var(10)

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)>=2
anim = 3565
pos = 43,-28
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y -8))
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

;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

;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 6
ctrl = 0
anim = ifelse(var(10)=3,443,ifelse(var(10)=4,444,440))
sprpriority = 2

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 3 && random <500
value = 5,15+(random<500)
freqmul = 0.9+(random/3333.3)
channel = 0

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 3
value = 0, ifelse(var(10)>=3,3,2)
freqmul = 0.9+(random/3333.3)

[State 440, 3]
type = HitDef
trigger1 = !time
attr = C, NA
damage = ifelse(var(10)=0,68,ifelse(var(10)=1,73,ifelse(var(10)=2,81,ifelse(var(10)=3,89,100)))),0
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = ifelse(var(10)>1,-1,1)
sparkxy = -5,-50
hitsound = 5, ifelse(var(10)<2,2,-1)
guardsound = 6,0
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2,-10
air.velocity = -2,-10
guard.velocity = -5
animtype = up
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
Priority = 4, Hit
fall = 1
fall.recover = 0
getpower = 43.2*!var(10)

[State 210, 3]
type = ChangeAnim
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(4) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 440
elem = 4

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 3 && var(10)>=2
anim = 3566
pos = 40,-33
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil(pos y -50)
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

;variable para aerial rave
[State 0, VarSet]
type = VarSet
trigger1 = movehit
var(15)=1
ignorehitpause = 1
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = animelem = 6
var(15)=0

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

;---------------------------------------------------------------------------
;Jump Light Punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = ifelse(var(10)=3,603,ifelse(var(10)=4,604,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, ifelse(var(10)>=3,3,0)
freqmul = 0.9+(random/3333.3)

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = ifelse(var(10)=0,20,ifelse(var(10)=1,28,ifelse(var(10)=2,39,ifelse(var(10)=3,50,60)))),0
guardflag = HA
Priority = 4, Hit
pausetime = 9,8
sparkno = ifelse(var(10)>1,-1,0)
sparkxy = -10,-46
hitsound = 5, ifelse(var(10)<2,0,-1)
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
getpower = 12.0*!var(10)

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)>=2
anim = 3565
pos = 58,-40
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil(pos y -46)
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

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

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

;---------------------------------------------------------------------------
;Jump Strong Punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = ifelse(var(10)=3,613,ifelse(var(10)=4,614,610))
sprpriority = 2

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

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 3 && random < 400
value = 5, ifelse(var(10)<3,(ifelse(random<500,2,3)),(ifelse(random<500,1,4)))
freqmul = 1.0+(random/5000.0)
channel = 0

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = ifelse(var(10)=0,68,ifelse(var(10)=1,73,ifelse(var(10)=2,81,ifelse(var(10)=3,89,100)))),0
guardflag = HA
Priority = 4, Hit
pausetime = 5,7
sparkno = ifelse(var(10)>1,-1,1)
sparkxy = -10,10
hitsound = 5, ifelse(var(10)<2,3,-1)
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -7,7
air.velocity = -8,11
fall = 1
envshake.time = 5
fall.envshake.time = 5
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
getpower = 43.2*!var(10)

[State 210, 3]
type = ChangeAnim
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(4) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 610
elem = 4

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 3 && var(10)>=2
anim = 3566
pos = 44,-21
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y +10))
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

;---------------------------------------------------------------------------
;Jump Light Kick
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 2
ctrl = 0
anim = ifelse(var(10)=3,633,ifelse(var(10)=4,634,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, ifelse(var(10)>=3,3,1)
freqmul = 0.9+(random/3333.3)

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = ifelse(var(10)=0,23,ifelse(var(10)=1,30,ifelse(var(10)=2,40,ifelse(var(10)=3,50,60)))),0
guardflag = HA
Priority = 4, Hit
pausetime = 9,8
sparkno = ifelse(var(10)>1,-1,1)
sparkxy = -5,-35
hitsound = 5, ifelse(var(10)<2,0,-1)
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -4
air.velocity = -2,-3
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
getpower = 15.6*!var(10)

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)>=2
anim = 3565
pos = 51,-43
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil(pos y -35)
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

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

;---------------------------------------------------------------------------
;Jump Strong Kick
[Statedef 640]
type    = A
movetype= A
physics = a
juggle  = 4
ctrl = 0
anim = ifelse(var(10)=3,643,ifelse(var(10)=4,644,640))
sprpriority = 2

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 3 && random <500
value = 5,15+(random<500)
freqmul = 0.9+(random/3333.3)
channel = 0

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

[State 640, 3]
type = HitDef
trigger1 = !time
attr = A, NA
damage = ifelse(var(10)=0,68,ifelse(var(10)=1,73,ifelse(var(10)=2,81,ifelse(var(10)=3,89,100)))),0
guardflag = HA
Priority = 4, Hit
pausetime = 5,7
sparkno = ifelse(var(10)>1,-1,1)
sparkxy = -10,10
hitsound = 5, ifelse(var(10)<2,3,-1)
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8,-2
air.velocity = -8,-2
fall = 1
envshake.time = 5
fall.envshake.time = 5
palfx.time = ifelse(var(10)>1,40,0)
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
getpower = 42.0*!var(10)

[State 210, 3]
type = ChangeAnim
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(4) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 640
elem = 4

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 3 && var(10)>=2
anim = 3566
pos = 51,-13
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit && var(10)>=2
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil(pos y +10)
scale = ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5)),ifelse(var(10)=2,0.5,ifelse(var(10)=3,1,1.5))
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3 && var(10)>1
value = 30,ifelse(random<500,3,4)
freqmul = ifelse(var(10)=2,1.4+(random/3333.3),ifelse(var(10)=3,1.1+(random/3333.3),0.8+(random/3333.3)))
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit && var(10)>=2
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

;---------------------------------------------------------------------------
;throw punch
[Statedef 800]
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
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
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 punch p1
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60
sprpriority = 1

[State 0, playsnd]
type = PlaySnd
trigger1 = !time
value = 20, 1
volume = -50
freqmul = 0.8

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

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

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
trigger2 = AnimElem = 4
trigger3 = AnimElem = 7
trigger4 = AnimElem = 10
pos = 32,-98

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
trigger3 = AnimElem = 8
trigger4 = AnimElem = 11
pos = 21,-103

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
trigger3 = AnimElem = 9
pos = 34,-91

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 60,0

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 9
trigger4 = animelem = 13
value = 0, 1
freqmul = 0.9+(random/3333.3)

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 9
trigger4 = animelem = 13
value = f 5, 4
freqmul = 0.9+(random/3333.3)

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 9
trigger4 = animelem = 13
value = 22,2
freqmul = 1.3+(random/3333.3)

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
trigger3 = AnimElem = 9
trigger4 = animelem = 13
time = 6
ampl = -10

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
trigger3 = AnimElem = 9
value = -35
kill = 0

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 13
value = -45

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
trigger3 = AnimElem = 9
trigger4 = animelem = 13
anim = f ifelse(random/500,7004,7005)
pos = 28, -85
facing = ifelse(random/500,1,-1)
sprpriority = 4
shadow = -1
ownpal = 1

;sangre constante P1
[State 0, Helper]
type = Helper
trigger1 = animelemtime(11)=1
trigger2 = animelemtime(12)=15
name = "sangre constante"
ID = 6100
stateno = 6100
pos = ceil(-20+(random/166)), ceil(-106-(random/166))
facing = ifelse(random<500,1,-1)
ownpal = 1

;sangre constante TARGET
[State 0, Helper]
type = Helper
trigger1 = animelemtime(12)=10
trigger2 = animelemtime(12)=25
name = "sangre constante"
ID = 6100
stateno = 6100
pos = 17+(random/125), ceil(-100-(random/166))
facing = ifelse(random<500,1,-1)
ownpal = 1

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 12
value = 5, 1
freqmul = 1.0+(random/5000.0)
channel = 0
volume = 100

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 13
value = 821

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

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

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

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

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

[State 0, target sufre sound]
type = PlaySnd
triggerall = Authorname = "Andres Borghi"
triggerall = random < 700
triggerall = anim = 820
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
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, target sufre sound]
type = PlaySnd
triggerall = Authorname = "Andres Borghi"
triggerall = anim = 820
trigger1 = animelem = 8
trigger1 = life >= 46
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 = 300
value = 821
ctrl = 0

;---------------------------------------------------------------------------
;throw 1 - p2 - 2
[Statedef 821]
type    = A
movetype= H
physics = N
velset = -4.8,-5
poweradd = 40
sprpriority = 1

[State 0, target sufre sound]
type = PlaySnd
triggerall = Authorname = "Andres Borghi"
trigger1 = !time && life >= 46
trigger1 = anim = 820
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, PosAdd]
type = PosAdd
trigger1 = !time && prevstateno = 820
x = 10
y = 90

[State 0, PosAdd]
type = PosAdd
trigger1 = !time && prevstateno = 870
x = 0
y = 0

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

[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

;---------------------------------------------------------------------------
;throw kick
[Statedef 850]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 862
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 860
p2stateno = 870
guard.dist = 0
fall = 1

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

;---------------------------------------------------------------------------
;throw kick p1
[Statedef 860]
type    = S
movetype= A
physics = N
anim = 860
poweradd = 60
sprpriority = 6

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

[State 0, playsnd]
type = PlaySnd
triggerall = random < 500
trigger1 = animelem = 6
trigger2 = animelem = 10
trigger3 = animelem = 14
value = 5,13+(random<1000)
volume = 100
freqmul = 0.9+(random/3333.3)

[State 0, playsnd]
type = PlaySnd
trigger1 = !time
value = 20, 1
volume = -70

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 38,0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 2
pos = 35,-33

;NO shar-makai
[State 810, Bind 1]
type = TargetBind
trigger1 = target, name != "shar-makai"
trigger1 = AnimElemtime(2) > 2
trigger1 = AnimElemtime(20) < 1
pos = 20,0

;SI shar-makai
[State 810, Bind 1]
type = TargetBind
trigger1 = target, name = "shar-makai"
trigger1 = AnimElem = 3
pos = 20,20

;SI shar-makai
[State 0, PosAdd]
type = PosAdd
trigger1 = target, name = "shar-makai"
trigger1 = animelem = 3
y = -20

;SI shar-makai
[State 0, PosAdd]
type = PosAdd
triggerall = target, name = "shar-makai"
trigger1 = animelem = 18
trigger2 = animelem = 19
trigger3 = animelem = 20
trigger4 = animelem = 21
y = 5

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 60,0

;parche manos y pies
[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 861
ID = 861
bindtime = -1
sprpriority = 1
shadow = -1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 3
value = f 7,0

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 3
trigger2 = AnimElem = 6
trigger3 = AnimElem = 10
trigger4 = AnimElem = 14
trigger5 = AnimElem = 21
time = 7
ampl = -8

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = f 61
sprpriority = 0
ownpal = 1
pos = 30,0

;sangre p1
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 6
trigger2 = AnimElem = 10
trigger3 = AnimElem = 14
anim = f ifelse(random/500,7004,7005)
pos = 34, -36
facing = ifelse(random/500,1,-1)
sprpriority = 5
shadow = -1
ownpal = 1

;sangre p2
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 6
trigger2 = AnimElem = 10
trigger3 = AnimElem = 14
anim = f ifelse(random/500,7004,7005)
pos = 38, -15
facing = ifelse(random/500,1,-1)
sprpriority = 4
shadow = -1
ownpal = 1

;spark
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 21
anim = f 2
pos = 36, -42
ontop = 1

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 21
value = 5,15+(random<500)
freqmul = 0.9+(random/3333.3)
channel = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 21
value = f 5,1

;lanza
[State 0, Explod]
type = Explod
trigger1 = animelemtime(5)=29
anim = 865
ownpal = 1
pos = 42,0
shadow = -1
facing = -1
sprpriority = 2

;lanza parche
[State 0, Explod]
type = Explod
trigger1 = animelem = 6
anim = 866
ownpal = 1
pos = 42,0
facing = -1
sprpriority = 5

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 6
trigger2 = animelem = 10
trigger3 = animelem = 14
value = 0, 1
freqmul = 0.9+(random/3333.3)

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 6
trigger2 = animelem = 10
trigger3 = animelem = 14
value = 21, ifelse(random<500,0,1)
freqmul = 0.9+(random/3333.3)

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 6
trigger2 = animelem = 10
trigger3 = animelem = 14
value = 22, 0
freqmul = 0.8+(random/3333.3)
volume = 100

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 10
value = -50
kill = 0

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 14
value = -50

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 22
value = 821

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

;---------------------------------------------------------------------------
;throw kick - p2
[Statedef 870]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 3

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

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

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

[State 0, target sufre sound]
type = PlaySnd
triggerall = Authorname = "Andres Borghi"
triggerall = random < 700
triggerall = anim = 870
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
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)

;---------------------------------------------------------------------------
; giro debil
[Statedef 1000]
type    = S
movetype= A
physics = n
juggle  = 4
poweradd= 110
anim = 1000
ctrl = 0
sprpriority = 2

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 4 && random < 500
value = 5,9+(random/250)
freqmul = 1.0+(random/3333.3)
channel = 0

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 4
value = 25, 1
freqmul = 1.1+(random/5000.0)

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 20
value = 0, 4
freqmul = 0.9+(random/5000.0)

[State 0, VelSet]
type = VelSet
trigger1 = animelem =4
x = 4.5

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

[State 0, MakeDust]
type = MakeDust
trigger1 = animelemtime(4)>=1
trigger1 = animelemtime(20)< 0
trigger1 = random <300
pos = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 6
value = 1000
elem = 12

[State 0, Explod]
type = Explod
trigger1 = animelem = 13
trigger2 = animelem = 19
anim = 1001
ID = 1001
sprpriority = 3
shadow = -1

;hit adelante
[State 240, 2]
type = HitDef
trigger1 = animelem = 13
trigger2 = animelem = 19
attr = S, NA
animtype  = heavy
damage    = 23,3
guardflag = MA
pausetime = 7,10
sparkno = 1
sparkxy = -10,-80
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4.5,-3
air.velocity = -4.4,-1.2
envshake.time = 7
envshake.ampl = 6
Priority = 4, Hit

;hit atras
[State 240, 2]
type = HitDef
trigger1 = animelem = 16
attr = S, NA
animtype  = heavy
damage    = 27,3
guardflag = MA
pausetime = 7,10
sparkno = 1
sparkxy = -10,-80
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 3.7,-4
air.velocity = 3.7,-4
envshake.time = 7
envshake.ampl = 6
Priority = 4, Hit

[State 240, 2]
type = HitDef
trigger1 = animelem = 23
attr = S, NA
animtype  = heavy
damage    = 29,5
guardflag = MA
pausetime = 7,10
sparkno = 2
sparkxy = -10,-100
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -12,4
air.velocity = -12,4
envshake.time = 7
envshake.ampl = 6
fall = 1
Priority = 4, Hit

[State 0, VelSet]
type = VelSet
trigger1 = animelem =22
x = 0

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 12
trigger2 = animelem = 18
trigger3 = animelem = 24
value = 30,1
freqmul = 2.1
volume = 150


[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 25
value = 25, 0
freqmul = 0.8

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

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

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

;---------------------------------------------------------------------------
; giro fuerte
[Statedef 1050]
type    = S
movetype= A
physics = n
juggle  = 4
poweradd= 110
anim = 1000
ctrl = 0
sprpriority = 2

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 4 && random < 500
value = 5,9+(random/250)
freqmul = 1.0+(random/3333.3)
channel = 0

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 4
value = 25, 1
freqmul = 0.9+(random/5000.0)

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 20
value = 0, 4
freqmul = 0.9+(random/5000.0)

[State 0, VelSet]
type = VelSet
trigger1 = animelem =4
x = 4.5

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

[State 0, MakeDust]
type = MakeDust
trigger1 = animelemtime(4)>=1
trigger1 = animelemtime(20)< 0
trigger1 = random <300
pos = 0,0

[State 0, Explod]
type = Explod
trigger1 = animelem = 7
trigger2 = animelem = 13
trigger3 = animelem = 19
anim = 1001
ID = 1001
sprpriority = 3
shadow = -1

;hit adelante
[State 240, 2]
type = HitDef
trigger1 = animelem = 7
trigger2 = animelem = 13
trigger3 = animelem = 19
attr = S, NA
animtype  = heavy
damage    = 27,3
guardflag = MA
pausetime = 7,10
sparkno = 1
sparkxy = -10,-80
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4.5,-3
air.velocity = -4.5,-1.3
envshake.time = 7
envshake.ampl = 6
Priority = 4, Hit

;hit atras
[State 240, 2]
type = HitDef
trigger1 = animelem = 10
trigger2 = animelem = 16
attr = S, NA
animtype  = heavy
damage    = 30,3
guardflag = MA
pausetime = 7,10
sparkno = 1
sparkxy = -10,-80
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 3.7,-4
air.velocity = 3.7,-4
envshake.time = 7
envshake.ampl = 6
Priority = 4, Hit

[State 240, 2]
type = HitDef
trigger1 = animelem = 23
attr = S, NA
animtype  = heavy
damage    = 33,5
guardflag = MA
pausetime = 7,10
sparkno = 2
sparkxy = -10,-100
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -12,4
air.velocity = -12,4
envshake.time = 7
envshake.ampl = 6
fall = 1
Priority = 4, Hit

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 22
x = 0

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 6
trigger2 = animelem = 12
trigger3 = animelem = 18
trigger4 = animelem = 24
value = 30,1
freqmul = 2.1
volume = 150

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 25
value = 25, 0
freqmul = 0.8

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

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

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

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

[State 1100, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(13) < 0
value = 5,0

[State 1100, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State 0, Helper]
type = Helper
trigger1 = !time
name = "lanzas"
ID = 1110
stateno = 1110
ownpal = 1
pos = -2,0

;parche
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1101
pos = 0,0
sprpriority = 7
id = 1101
bindtime = -1
removeongethit = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = animelemtime(4)=1
trigger2 = animelemtime(4)=3
trigger3 = helper(1110), animelem = 15
trigger4 = helper(1110), animelem = 17
x = 3

[State 0, PosAdd]
type = PosAdd
trigger1 = animelemtime(4)=2
trigger2 = animelemtime(4)=4
trigger3 = helper(1110), animelem = 14
trigger4 = helper(1110), animelem = 16
x = -3

;sangre
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = f 7004
pos = -31, -73
sprpriority = 4
shadow = -1
ownpal = 1

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 4
value = 22, 1
freqmul = 0.8+(random/3333.3)
volume = 100

[State 440, 2]
type = PlaySnd
trigger1 = helper(1110),movehit
value = 5, 0
freqmul = 1.0+(random/5000.0)
channel = 0
persistent = 0
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = helper(1110), animelem = 21
value = 1100
elem = 5
persistent = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = helper(1110), animelem = 21
id = 1101

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

;---------------------------------------------------------------------------
; Lanzas - helper
[Statedef 1110]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
velset = 0,0
anim = 1110
ctrl = 0

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 14
value = 21, ifelse(random<500,0,1)
freqmul = 0.9+(random/3333.3)

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 2
ignorehitpause = 1

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

[State 106, 3]
type = MakeDust
trigger1 = !time
pos = -60,0
spacing = 1

[State 1000, 5]
type = HitDef
trigger1 = !time
attr = S, SP
animtype  = Up
damage    = 100, 3
Priority = 4
guardflag = MA
sparkno = -1
sparkxy = -15,-140
hitsound   = -1
guardsound = 6,0
ground.type = High
ground.velocity = -4,-9
air.velocity = -4.5,-6
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 8
envshake.ampl = 7
pausetime = 5,7
sprpriority = 3

[State 440, 2]
type = PlaySnd
trigger1 = movehit
value = 22, 0
freqmul = 0.8+(random/3333.3)
persistent = 0
ignorehitpause = 1
volume = 100

;sangre lanza 1
[State 1010, 9]
type = explod
trigger1 = movehit && animelemtime(10)<0 && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
anim = f 7009
persistent = 0
pos = 0,ifelse((target, pos y <-50 && target, pos y >-260),(target, pos y-70),-120)
postype = p1
ignorehitpause = 1
sprpriority = 6
ownpal = 1
facing = 1

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

[State 1000, 5]
type = HitDef
trigger1 = animelem = 10
attr = S, SP
animtype  = Up
damage    = 100, 3
priority  = 6
guardflag = MA
sparkno = -1
sparkxy = -10,-120
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = -4,-9
air.velocity = -4.5,-6
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 8
envshake.ampl = 7
pausetime = 5,7
guard.pausetime = 5,20

;sangre lanza 2
[State 1010, 9]
type = explod
trigger1 = movehit && animelemtime(10)>0 && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
trigger2 = movehit && animelemtime(13)<0 && enemynear, name = "final"
anim = f 7009
persistent = 0
pos = 15,ifelse((target, pos y <-50 && target, pos y >-260),(target, pos y-70),-100)
postype = p1
ignorehitpause = 1
sprpriority = 6
ownpal = 1
facing = -1

;SPARK lanza 2
[State 1010, 9]
type = explod
triggerall = animelemtime(10)>0
trigger1 = movehit && enemynear,name = "noroko" && enemynear,var(10)=1
trigger2 = movehit && enemynear,name = "animus" && enemynear,stateno = 3100
anim = f ifelse(random < 500,0,1)
persistent = 0
pos = 15,ifelse((enemynear,name = "noroko" && enemynear,var(10)=1),-10,-90)
postype = p2
ignorehitpause = 1
sprpriority = 4

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

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 5
trigger2 = animelem = 14
time = 6
ampl = 4

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent, stateno != 1100
id = 1111

[State 440, 2]
type = PlaySnd
trigger1 = parent, stateno != 1100
trigger1 = animelemtime(6)>=1
trigger1 = animelemtime(20)<=0
value = 21, 3
freqmul = 0.9+(random/3333.3)
persistent = 0
volume = -100

;lanza partida 1
[State 0, Explod]
type = Explod
trigger1 = parent, stateno != 1100
trigger1 = animelemtime(6)>=1
trigger1 = animelemtime(20)<=0
anim = 1112
pos = ifelse(animelemtime(8)<1,0,50),ifelse(animelemtime(8)<1,-80,-140)
vel = -1+(random/333),-3-(random/333)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
persistent = 0

;lanza partida 2
[State 0, Explod]
type = Explod
trigger1 = parent, stateno != 1100
trigger1 = animelemtime(6)>=1
trigger1 = animelemtime(20)<=0
anim = 1113
pos = ifelse(animelemtime(8)<1,-24,-10),ifelse(animelemtime(8)<1,-70,-150)
vel = -2+(random/333),-3-(random/333)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
persistent = 0

;astilla 1
[State 0, Explod]
type = Explod
trigger1 = parent, stateno != 1100
trigger1 = animelemtime(6)>=1
trigger1 = animelemtime(20)<=0
anim = 1114
pos = ceil(-20+(random/100)),ceil(-90-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)

;astilla 2
[State 0, Explod]
type = Explod
trigger1 = parent, stateno != 1100
trigger1 = animelemtime(6)>=1
trigger1 = animelemtime(20)<=0
anim = 1114
pos = ceil(-20+(random/100)),ceil(-90-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)

;astilla 3
[State 0, Explod]
type = Explod
trigger1 = parent, stateno != 1100
trigger1 = animelemtime(6)>=1
trigger1 = animelemtime(20)<=0
anim = 1114
pos = ceil(-20+(random/100)),ceil(-90-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)

;astilla 4
[State 0, Explod]
type = Explod
trigger1 = parent, stateno != 1100
trigger1 = animelemtime(6)>=1
trigger1 = animelemtime(20)<=0
anim = 1114
pos = ceil(-20+(random/100)),ceil(-90-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)

[State 1110, 5]
type = destroyself
trigger1 = AnimTime = 0
trigger2 = parent, stateno != 1100

;---------------------------------------------------------------------------
; lanzas 2 cuchilla
[Statedef 1120]
type    = S
movetype= I
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1120
ctrl = 0
sprpriority = 1

[State 1100, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(13) < 0
value = 5,0

[State 1100, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State 0, Helper]
type = Helper
trigger1 = !time
name = "cuchilla"
ID = 1130
stateno = 1130
ownpal = 1
pos = 0,0
size.shadowoffset = -2

[State 0, PosAdd]
type = PosAdd
trigger1 = animelemtime(3)=1
trigger2 = animelemtime(3)=3
trigger3 = helper(1130), animelem = 15
trigger4 = helper(1130), animelem = 17
x = 3

[State 0, PosAdd]
type = PosAdd
trigger1 = animelemtime(3)=2
trigger2 = animelemtime(3)=4
trigger3 = helper(1130), animelem = 14
trigger4 = helper(1130), animelem = 16
x = -3

;parche
[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1121
pos = 0,0
sprpriority = 7
id = 1101
bindtime = -1
removeongethit = 1

;sangre 1
[State 1010, 9]
type = explod
trigger1 = animelem = 3
anim = f 7003
persistent = 0
pos = -12,-74
postype = p1
ignorehitpause = 1
sprpriority = 5
ownpal = 1
facing = -1

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 3
value = 22, 1
freqmul = 0.8+(random/3333.3)
volume = 100

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = helper(1130), animelem = 21
id = 1101

;sangre 2
[State 0, Explod]
type = Explod
trigger1 = helper(1130), animelem = 21
anim = f 7003
pos = -12,-74
sprpriority = 0
shadow = -1
ownpal = 1
facing = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = helper(1130), animelem = 21
value = 1120
elem = 4
persistent = 0

[State 440, 2]
type = PlaySnd
trigger1 = helper(1130),movehit
value = 5, 0
freqmul = 1.0+(random/5000.0)
channel = 0
persistent = 0
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; cuchilla - helper
[Statedef 1130]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
velset = 0,0
anim = 1130
ctrl = 0
sprpriority = 2

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 14
value = 21, ifelse(random<500,0,1)
freqmul = 0.9+(random/3333.3)

;inmune a throws
[State -3, NotHitBy]
type = NotHitBy
trigger1 = 1
value = ,AT
time = 1

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

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

[State 106, 3]
type = MakeDust
trigger1 = !time
pos = -75,0
spacing = 1

[State 106, 3]
type = MakeDust
trigger1 = animelem = 12
pos = 142,0
spacing = 1

[State 1000, 5]
type = HitDef
trigger1 = !time
attr = S, SP
animtype  = hard
damage    = 100, 3  ;15,2
Priority = 4
guardflag = MA
sparkno = -1
sparkxy = -4,-60
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = -4,-9
air.velocity = -4.5,-6
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 8
envshake.ampl = 7
pausetime = 5,7
guard.pausetime = 5,20
id = 1100

[State 440, 2]
type = PlaySnd
trigger1 = movehit
value = 22, 0
freqmul = 0.8+(random/3333.3)
persistent = 0
ignorehitpause = 1
volume = 100

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent, stateno != 1120
id = 1131

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 12
trigger2 = animelem = 14
time = 5
ampl = 6

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 12
value = 21, 2
freqmul = 0.9+(random/3333.3)

;sangre
[State 1010, 9]
type = explod
trigger1 = movehit && animelemtime(13)<0 && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
trigger2 = movehit && animelemtime(13)<0 && enemynear, name = "final"
anim = f 7003
persistent = 0
pos = -5,-70
postype = p2
ignorehitpause = 1
sprpriority = 6
ownpal = 1
facing = -1

;sangre volatil
[State 0, Helper]
type = Helper
trigger1 = movehit=1 && hitpausetime = 4 && random < 500 && animelemtime(13)<0 && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
trigger2 = movehit && hitpausetime = 4 && random < 500 && animelemtime(13)<0 && enemynear, name = "final"
name = "sangre volatil"
ID = 6101
stateno = 6101
pos = -5,-70
postype = p2
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = -1

;sangre volatil
[State 0, Helper]
type = Helper
trigger1 = movehit=1 && hitpausetime = 4 && random < 500 && var(16)=0 && animelemtime(13)<0 && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
trigger2 = movehit && hitpausetime = 4 && random < 500 && animelemtime(13)<0 && enemynear, name = "final"
name = "sangre volatil"
ID = 6101
stateno = 6101
pos = -5,-70
postype = p2
ownpal = 1
ignorehitpause = 1
persistent = 0
facing = -1

;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)
persistent = 0
pos = -5,-70
postype = p2
ignorehitpause = 1
sprpriority = 4

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

;cuchilla partida
[State 0, Explod]
type = Explod
triggerall = animelemtime(6)>=1
triggerall = animelemtime(20)<=0
trigger1 = parent, stateno != 1120
trigger2 = parent, movetype = h
anim = 1132
pos = 39,-80
vel = -1+(random/333),-3-(random/333)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
persistent = 0

;astilla 1
[State 0, Explod]
type = Explod
triggerall = animelemtime(6)>=1
triggerall = animelemtime(20)<=0
trigger1 = parent, stateno != 1120
trigger2 = parent, movetype = h
anim = 1114
pos = ceil(0+(random/100)),ceil(-70-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)

;astilla 2
[State 0, Explod]
type = Explod
triggerall = animelemtime(6)>=1
triggerall = animelemtime(20)<=0
trigger1 = parent, stateno != 1120
trigger2 = parent, movetype = h
anim = 1114
pos = ceil(0+(random/100)),ceil(-70-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)

;astilla 3
[State 0, Explod]
type = Explod
triggerall = animelemtime(6)>=1
triggerall = animelemtime(20)<=0
trigger1 = parent, stateno != 1120
trigger2 = parent, movetype = h
anim = 1114
pos = ceil(0+(random/100)),ceil(-70-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)

;astilla 4
[State 0, Explod]
type = Explod
triggerall = animelemtime(6)>=1
triggerall = animelemtime(20)<=0
trigger1 = parent, stateno != 1120
trigger2 = parent, movetype = h
anim = 1114
pos = ceil(0+(random/100)),ceil(-70-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)

[State 440, 2]
type = PlaySnd
triggerall = animelemtime(6)>=1
triggerall = animelemtime(20)<=0
trigger1 = parent, stateno != 1120
trigger2 = parent, movetype = h
value = 21, 3
freqmul = 0.9+(random/3333.3)
persistent = 0
volume = -100

[State 1110, 5]
type = destroyself
trigger1 = AnimTime = 0
trigger2 = parent, stateno != 1120; && animelemtime(22)<1
trigger3 = parent, movetype = h

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; decoy fuerte
[Statedef 1200]
type    = S
movetype= A
physics = s
juggle  = 4
poweradd= 110
anim = 1200
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
trigger2 = animelem = 20
value = 25,0
freqmul = 0.8+(random/3333.3)

[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = SAC, NA,SA
p1stateno = 1210
sparkno = 1
pausetime = 0,0

[State 800, Don't Guard]
type=attackdist
trigger1= 1
value=0

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

;---------------------------------------------------------------------------
; decoy debil
[Statedef 1201]
type    = S
movetype= A
physics = s
juggle  = 4
poweradd= 110
anim = 1200
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
trigger2 = animelem = 21
value = 25,0
freqmul = 0.8+(random/3333.3)

[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = SAC, NA,SA
p1stateno = 1210
sparkno = 1
pausetime = 0,0

[State 800, Don't Guard]
type=attackdist
trigger1= 1
value=0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 11
value = 1200
elem = 20

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

;--------------------------------------
; decoy - reaccion
[Statedef 1210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1210

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

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

[State 0, Helper]
type = Helper
trigger1 = !time
name = "decoy"
ID = 1200
stateno = 1220
pos = 0,0
ownpal = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !time
x = -35
y = -120

[State 0, Turn]
type = Turn
trigger1 = !time
trigger1 = enemynear, facing = facing

;cuchilla
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 1215
pos = 0,0
bindtime = -1
sprpriority = 3
shadow = -1
ownpal = 1
id = 1215
pausemovetime = -1

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = bgPalFX
trigger1 = !time
time = 50
add = -70,-70,-70
mul = 256,256,256

[State 0, Pause]
type = Pause
trigger1 = time=1
time = 50
movetime = 50

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 5,5
freqmul = 0.9+(random/3333.3)
channel = 0
volume = -50

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 21,6
freqmul = 0.8
channel = 17
volume = 200

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 52
value = 21,0
freqmul = 0.8
channel = 17
volume = 100

[State 0, VelSet]
type = VelSet
trigger1 = time = 52
y = 16

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
y = 0

[State 0, VelSet]
type = posset
trigger1 = animelem = 3
y = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 21,2
freqmul = 1.5
volume = 200

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

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

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

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

[State 0, MakeDust]
type = MakeDust
trigger1 = animelem = 3
pos = 125,0
spacing = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 3
time = 15
ampl = -12

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
animtype  = heavy
damage    = 107
guardflag = MA
pausetime = 0,0
sparkno = 7008
sparkxy = -10,-56
hitsound   = -1,-1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -6,-8
air.velocity = -6,-8
fall = 1
Priority = 4, Hit

[State 0, PlaySnd]
type = PlaySnd
trigger1 = movehit
value = 22,0
freqmul = 0.8
persistent = 0
ignorehitpause = 1
volume = 200

[State 0, Explod]
type = Explod
trigger1 = animelem = 8
anim = 1216
pos = -30,-170
vel = -7,-4
accel = 0,.3
removetime = 100
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = 0,2
freqmul = 0.8

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

;---------------------------------------------------------------------------
; Decoy - helper
[Statedef 1220]
type    = S
movetype= I
physics = S
anim = 1220
ctrl = 0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animtime = 0
value = 21,3
volume = -100
freqmul = 0.8+(random/3333.3)

;cabeza
[State 0, Explod]
type = Explod
trigger1 = animtime = 0
anim = 1221
vel = ifelse(root,facing=facing,-1-(random/200),1+(random/200)),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1

 ;torso
[State 0, Explod]
type = Explod
trigger1 = animtime = 0
anim = 1222
vel = ifelse(root,facing=facing,-1-(random/200),1+(random/200)),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 1
ownpal = 1

;brazo 1
[State 0, Explod]
type = Explod
trigger1 = animtime = 0
anim = 1223
vel = ifelse(root,facing=facing,-1-(random/200),1+(random/200)),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1

;brazo 2
[State 0, Explod]
type = Explod
trigger1 = animtime = 0
anim = 1224
vel = ifelse(root,facing=facing,-1-(random/200),1+(random/200)),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 0
ownpal = 1

;pierna 1
[State 0, Explod]
type = Explod
trigger1 = animtime = 0
anim = 1225
vel = ifelse(root,facing=facing,-1-(random/200),1+(random/200)),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 2
ownpal = 1

;pierna 2
[State 0, Explod]
type = Explod
trigger1 = animtime = 0
anim = 1226
vel = ifelse(root,facing=facing,-1-(random/200),1+(random/200)),-1-(random/200)
accel = 0,.3
removetime = 100
sprpriority = 0
ownpal = 1

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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;super lanzas
[Statedef 3000]
type    = S
movetype= I
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2

;nube morph
[State 0, Explod]
type = Explod
trigger1 = !time && prevstateno = 440
anim = 10000
ontop = 1
ownpal = 1
scale = 1,1

[State 0, VarSet]
type = VarSet
trigger1 = numhelper(3010)!=0
trigger1 = helper(3010),movehit
var(19)=1

[State 0, ScreenBound]
type = ScreenBound
trigger1 = var(19)= 1
value = 0
movecamera = 0,0

[State 3050, Width]
type = Width
trigger1 = animelemtime(1)>=1
trigger1 = animelemtime(5)<1 && anim = 3000
value = 30,0

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

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

[State 3900, 1]
type = Explod
trigger1 = AnimElem = 3 && anim = 3000
anim = 9999
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
ontop = 1
removetime = 30
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3 && anim = 3000
value = 24,0
volume = 100

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

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

[State 3050, Super D]
type = NotHitBy
trigger1 = AnimElem = 3 && anim = 3000
value = , NA, SA, AT
time = 6

[State 0, MakeDust]
type = MakeDust
trigger1 = animelem = 4 && anim = 3000
pos = 30,0
spacing = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
trigger2 = animelem = 9
trigger3 = animelem = 14
trigger4 = animelem = 19
trigger5 = animelem = 24
trigger6 = animelem = 29
anim = f ifelse(random<500,60,61)
pos = 30,0
sprpriority = 0

;lanza 1
[State 0, Helper]
type = Helper
trigger1 = animelem = 4
name = "lanza 1"
ID = 3010
stateno = 3010
pos = 45,0
ownpal = 1
persistent = 0

;lanza 2
[State 0, Helper]
type = Helper
trigger1 = animelem = 9
name = "lanza 2"
ID = 3010
stateno = 3010
pos = 85,0
ownpal = 1
persistent = 0

;lanza 3
[State 0, Helper]
type = Helper
trigger1 = animelem = 14
name = "lanza 3"
ID = 3010
stateno = 3010
pos = 125,0
ownpal = 1
persistent = 0

;lanza 4
[State 0, Helper]
type = Helper
trigger1 = animelem = 19
name = "lanza 4"
ID = 3010
stateno = 3010
pos = 165,0
ownpal = 1
persistent = 0

;lanza 5
[State 0, Helper]
type = Helper
trigger1 = animelem = 24
name = "lanza 5"
ID = 3010
stateno = 3010
pos = 205,0
ownpal = 1
persistent = 0

;lanza 6 CRUZ
[State 0, Helper]
type = Helper
trigger1 = animelem = 29
name = "cruz"
ID = 3010
stateno = 3011
pos = 265,0
ownpal = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 9
trigger3 = animelem = 14
trigger4 = animelem = 19
trigger5 = animelem = 24
trigger6 = animelem = 29
value = 23,0
volume = -100
freqmul = 1.2+(random/3333.3)

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 9
trigger3 = animelem = 14
trigger4 = animelem = 19
trigger5 = animelem = 24
value = 5, ifelse(random<500,2,3)
freqmul = 0.9+(random/5000.0)
channel = 0

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 30
value = 5, 4
freqmul = 0.85+(random/5000.0)
channel = 0
volume = 100

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3000 && backedgedist < -10 && AnimTime = 0
value = 3300
elem = 4

[State 0, PosSet]
type = PosSet
trigger1 = anim = 3300 && animelem = 4
x = ifelse(facing=1,-185,185)

[State 0, VelSet]
type = VelSet
trigger1 = anim = 3300 && animelem = 5
x = 6
y = -3

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3300 && animelem = 5
statetype = A
physics = n

[State 0, CtrlSet]
type = CtrlSet
trigger1 = anim = 3300 && animelem = 5
value = 1

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3300 && 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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3300 && animelem = 5
value = 0,3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 47 && animelem = 1
value = 40,0

[State 3050, 5]
type = ChangeState
trigger1 = anim = 3000 && backedgedist >= -10 && AnimTime = 0
trigger2 = anim = 47 && animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; super Lanzas - helper
[Statedef 3010]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
velset = 0,0
anim = 3010
ctrl = 0
sprpriority = 2

[State 440, 2]
type = PlaySnd
trigger1 = !time
value = 0,2
freqmul = 0.9+(random/2500.0)

[State 440, 2]
type = PlaySnd
trigger1 = !time
value = 21, ifelse(random<500,0,1)
freqmul = 0.9+(random/2500.0)

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

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

[State 1000, 5]
type = HitDef
trigger1 = !time
attr = S, SP
animtype  = heavy
damage    = 40, 5
Priority = 4
guardflag = MA
sparkno = -1
sparkxy = -4,-90
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = -6,-6
air.velocity = -8,-4
fall = 1
guard.slidetime = 5
guard.velocity = -11
airguard.velocity = -8
envshake.time = 8
envshake.ampl = 7
pausetime = 0,7
ground.hittime = 30
ground.cornerpush.veloff = 1
air.cornerpush.veloff = 1
down.cornerpush.veloff = 1
guard.cornerpush.veloff = 1
airguard.cornerpush.veloff = 1

[State 440, 2]
type = PlaySnd
trigger1 = movehit
value = 22, 0
freqmul = 0.8+(random/3333.3)
persistent = 0
ignorehitpause = 1
volume = 100

;oxido
[State 0, Explod]
type = Explod
trigger1 = movehit
anim = 3015
postype = left
pos = 0,0
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[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 1
[State 0, Explod]
type = Explod
trigger1 = movehit && var(16)=0 && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
anim = f 7003
pos = 0, -50
postype = p2
sprpriority = 4
shadow = -1
ownpal = 1
ignorehitpause = 1
facing = ifelse(random<500,1,-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)
persistent = 0
pos = 0, -50
postype = p2
ignorehitpause = 1
sprpriority = 4

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 6
ampl = 4

[State 1110, 5]
type = destroyself
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; cruz - helper
[Statedef 3011]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
velset = 0,0
anim = 3011
ctrl = 0
sprpriority = 2

[State 440, 2]
type = PlaySnd
trigger1 = !time
trigger2 = animelem = 10
trigger2 = frontedgedist >= 0
value = 0,3
freqmul = 0.9+(random/2500.0)

[State 440, 2]
type = PlaySnd
trigger1 = !time
trigger2 = animelem = 10
trigger2 = frontedgedist >= 0
value = 21, ifelse(random<500,0,1)
freqmul = 0.8+(random/3333.3)

;inmune a throws
[State -3, NotHitBy]
type = NotHitBy
trigger1 = 1
value = ,AT
time = 1

[State 0, afterimage]
type = AfterImage
trigger1 = !time
time = -1
FrameGap = 1
length = 5
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 = animelemtime(9)>=1
trigger1 = animelemtime(10)<1
time = 0

[State 106, 3]
type = MakeDust
trigger1 = !time
trigger2 = animelem = 10
pos = 0,0
spacing = 1

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 8
trigger1 = frontedgedist >= 0
value = 30, 0
volume = 100

[State 1000, 5]
type = HitDef
trigger1 = !time
attr = S, SP
animtype  = up
damage    = 50, 5
Priority = 4, Hit
guardflag = MA
sparkno = -1
sparkxy = -4,-90
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = -1.5,-20
air.velocity = -1.5,-20
fall = 1
guard.slidetime = 5
guard.velocity = -9
airguard.velocity = -7
envshake.time = 16
envshake.ampl = 10
pausetime = 0,16
fall.recover = 0
yaccel = 0.6
palfx.time = 90
palfx.mul = 250,240,120
palfx.add = 240,50,0
palfx.sinadd = 110,55,85,10
ground.cornerpush.veloff = 1
air.cornerpush.veloff = 1
down.cornerpush.veloff = 1
guard.cornerpush.veloff = 1
airguard.cornerpush.veloff = 1

[State 440, 2]
type = PlaySnd
trigger1 = movehit
value = 22, 0
freqmul = 0.5
persistent = 0
ignorehitpause = 1
volume = 100

;oxido
[State 0, Explod]
type = Explod
trigger1 = movehit
anim = 3015
postype = left
pos = 0,0
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[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 1
[State 0, Explod]
type = Explod
trigger1 = movehit && var(16)=0 && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
anim = f 7008
pos = 0, -80
postype = p2
sprpriority = 4
shadow = -1
ownpal = 1
ignorehitpause = 1
facing = ifelse(random<500,1,-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)
persistent = 0
pos = 0, -50
postype = p2
ignorehitpause = 1
sprpriority = 4

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 9
anim = 3030
pos = 0,0
bindtime = -1
sprpriority = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 6
ampl = 4

[State 1110, 5]
type = destroyself
trigger1 = AnimTime = 0


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Virgen de hierro 1
[Statedef 3100]
type    = S
movetype= A
physics = n
juggle  = 4
velset = 0,0
anim = 3100
ctrl = 0
sprpriority = 2

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = AnimElem = 7
sound = S12, 0
poweradd = -1000
movetime = 30

[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 9998
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
sprpriority = -2
removetime = 30
ownpal = 1

[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 9999
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
ontop = 1
removetime = 30
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 24,0
volume = 100

;parte cabeza
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 3115
pos = 5,-320
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
vel = 0,7

;parte brazo 1
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 3116
pos = -280,-145
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
vel = 9.5,2

;parte brazo 2
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 3117
pos = 300,-130
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
vel = -9.5,2

;parte pierna 1
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 3118
pos = -280,20
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
vel = 9.5,-2

;parte pierna 2
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 3119
pos = 285,40
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
vel = -9.5,-2

;parte pollera
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 3120
pos = -285,-60
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
vel = 9.5,0

;parte torso
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 7
anim = 3121
pos = 280,-80
supermovetime = 30
sprpriority = 3
removetime = 30
ownpal = 1
vel = -9.5,0

;chispa 1
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 8
anim = 3170
pos = 0,-105
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

;chispa 2
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 8
anim = 3170
pos = -5,-60
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

;chispa 3
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 8
anim = 3170
pos = 15,-25
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = 23,1
freqmul = 0.8+(random/3333.3)
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
trigger2 = animelem = 15
trigger3 = animelem = 21
value = 23,ifelse(random<500,2,3)
freqmul = 0.9+(random/3333.3)
volume = 100

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

;helper partes
[State 0, Helper]
type = Helper
trigger1 = animelem = 8
name = "partes"
ID = 3102
stateno = 3102
postype = p1
pos = 0,0
bindtime = -1

;helper anti proyectiles
[State 0, Helper]
type = Helper
trigger1 = animelem = 8
name = "antiproj"
ID = 3130
stateno = 3130
pos = 0,0
postype = p1
keyctrl = 0

;no le pegan proyectiles
[State 3100, nothitby]
type = NotHitBy
trigger1 = AnimElemtime(8)>=1
value = ,AP
time = 1

;brilla cuando le pega un proj
[State 0, PalFXWiz]
type = PalFX
trigger1 = numhelper(3130)!=0 && helper(3130), time = 0
time = 2
add = 100,100,100
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 9
trigger2 = animelem = 15
x = 1.2

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 14
trigger2 = animelem = 20
x = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 8
trigger2 = animelem = 14
trigger3 = animelem = 20
time = 10
ampl = -6

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

;chispa pasos
[State 3900, 1]
type = Explod
trigger1 = AnimElem = 14
trigger2 = AnimElem = 20
anim = 3170
pos = 18,0
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 14
trigger2 = AnimElem = 20
value = 23,0
freqmul = 0.8+(random/3333.3)
volume = 100

[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = SAC, NA,SA
p1stateno = 3149
sparkno = -1
pausetime = 30,30
attr = S,ST

[State 800, Don't Guard]
type=attackdist
trigger1= 1
value=0

[State 3050, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 3110
ctrl = 0

;---------------------------------------------------
;Virgen de hierro 2 - termina
[Statedef 3110]
type    = S
movetype= I
physics = n
juggle  = 4
velset = 0,0
ctrl = 0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 23,1
freqmul = 0.8+(random/3333.3)

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 10
ampl = -6

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

;fin parte cabeza
[State 3900, 1]
type = Explod
trigger1 = !time
anim = 3115
pos = 4,-113
sprpriority = 3
removetime = 50
ownpal = 1
vel = 0,-7

;fin parte brazo 1
[State 3900, 1]
type = Explod
trigger1 = !time
anim = 3116
pos = -9,-87
sprpriority = 3
removetime = 50
ownpal = 1
vel = -9.5,-2

;fin parte brazo 2
[State 3900, 1]
type = Explod
trigger1 = !time
anim = 3117
pos = -2,-74
sprpriority = 3
removetime = 50
ownpal = 1
vel = 9.5,-2

;fin parte pierna 1
[State 3900, 1]
type = Explod
trigger1 = !time
anim = 3118
pos = 1,-50
sprpriority = 3
removetime = 50
ownpal = 1
vel = -9.5,2

;fin parte pierna 2
[State 3900, 1]
type = Explod
trigger1 = !time
anim = 3119
pos = -5,-15
sprpriority = 3
removetime = 50
ownpal = 1
vel = 9.5,2

;fin parte pollera
[State 3900, 1]
type = Explod
trigger1 = !time
anim = 3120
pos = 6,-60
sprpriority = 3
removetime = 50
ownpal = 1
vel = -9.5,0

;fin parte torso
[State 3900, 1]
type = Explod
trigger1 = !time
anim = 3121
pos = 5,-82
sprpriority = 3
removetime = 50
ownpal = 1
vel = 9.5,0

[State 3050, 5]
type = ChangeState
trigger1 = !time
value = 0
ctrl = 1

;---------------------------------------------------
;Virgen de hierro ataca
[Statedef 3149]
type    = S
movetype= A
physics = s
juggle  = 4
anim = 3149
ctrl = 0
sprpriority = 2

[State 3050, Super D]
type = NotHitBy
trigger1 = 1
value = , NA, SA, AT, AP
time = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 23,3
freqmul = 0.6+(random/3333.3)
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 0,3
freqmul = 1.2+(random/3333.3)

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

[State 0, Turn]
type = Turn
trigger1 = !time
trigger1 = enemynear, facing = facing

[State 0, VelSet]
type = VelSet
trigger1 = time = 1
x = 8

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, ST
;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
p1facing = 1
p2facing = 1
p1stateno = 3150       ;On success, KFM changes to state 810
p2stateno = 3160       ;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
id = 3100

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

;---------------------------------------------------------------------------
;Virgen de hierro success P1
[Statedef 3150]
type    = S
movetype= A
physics = s
juggle  = 4
anim = 3150
ctrl = 0
sprpriority = 5

;si tiene poca vida y hay midnight bliss
[State 0, ChangeState]
type = ChangeState
trigger1 = !time && numtarget(3100)!=0
trigger1 = target(3100), life <=300 && target(3100), AnimExist(9020)
value = 3180
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 21,2
freqmul = 0.8+(random/3333.3)
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 23,4
freqmul = 1.15
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 15
value = 21,6
freqmul = 0.8
volume = 100

[State 210, Width]
type = Width
trigger1 = animelemtime(2)<1
value = 60,0

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(2)<1
time = 1
id = -1
pos = 50,0

;spark
[State 0, Explod]
type = Explod
trigger1 = !time
anim = f 2
pos = 70, -78
ontop = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelemtime(1)=10
time = 59
ampl = -2

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 1
trigger2 = animelem = 4
time = 14
ampl = -10

;ondita
[State 0, Explod]
type = Explod
trigger1 = !time
trigger2 = animelem = 4
anim = f 61
pos = 0,0
sprpriority = 0

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 69
add = 50,50,50
mul = 256,256,256
sinadd = 100,50,50,15
invertall = 0
color = 50

;sangre 1
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = f ifelse(random/500,7004,7005)
pos = 50, -70
sprpriority = 3
shadow = -1
ownpal = 1
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
scale = 1.5,1.5

;sangre 2
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = f 7008
pos = 60, -90
sprpriority = 3
shadow = -1
ownpal = 1
ignorehitpause = 1
facing = ifelse(random<500,1,-1)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 22,0
freqmul = 0.8+(random/3333.3)
volume = 100

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

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 5
value = 21, ifelse(random<500,0,1)
freqmul = 0.9+(random/3333.3)
volume = 100

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

;sangre pantalla
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 3175
pos = 0, 0
postype = left
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
removetime = 45

[State 0, BGPalFX]
type = BGPalFX
trigger1 = !time
time = 69
add = 0,-140,-140
color = 0

[State 0, BGPalFX]
type = BGPalFX
trigger1 = animelem=4
time = 43
add = -140,-140,-140
color = 70

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(4)=43
value = 0,3

[State 0, SprPriority]
type = SprPriority
trigger1 = animelem = 4
value = 1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 4
value = -300

;sangre constante
[State 1010, 9]
type = explod
trigger1 = animelemtime(4)>=46
anim = f ifelse(random<333,7003,ifelse(random<500,7008,7009))
pos = ifelse(facing=-1,(pos x -(target(3100), pos x)),((target(3100), pos x)-pos x)),(target(3100), pos y)
sprpriority = 3
ownpal = 1
facing = ifelse(random<500,-1,1)

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

;---------------------------------------------------------------------------
;virgen - p2
[Statedef 3160]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

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

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

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

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

[State 820, 1]
type = Changestate
Trigger1 = animelem = 3
value = 3161
ctrl = 0

;---------------------------------------------------------------------------
;virgen P2 - 2
[Statedef 3161]
type    = A
movetype= H
physics = N
velset = -12,-9
poweradd = 40
sprpriority = 1

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

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

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 14
ampl = -10

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

;---------------------------------------------------
;helper virgen partes
[Statedef 3102]
type    = S
movetype= I
physics = N
poweradd= 0
anim = 9123000
ctrl = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = parent, stateno != 3100 && parent, stateno != 3110 && parent, stateno != 3149
trigger1 = parent, stateno !=0
value = 21,3
freqmul = 0.8+(random/3333.3)

;fin parte cabeza
[State 3900, 1]
type = Explod
trigger1 = parent, stateno != 3100 && parent, stateno != 3110 && parent, stateno != 3149
trigger1 = parent, stateno !=0
anim = 3115
pos = 4,-113
sprpriority = 3
removetime = 100
ownpal = 1
vel = -2+(random/250),-5
accel = 0,.3

;fin parte brazo 1
[State 3900, 1]
type = Explod
trigger1 = parent, stateno != 3100 && parent, stateno != 3110 && parent, stateno != 3149
trigger1 = parent, stateno !=0
anim = 3116
pos = -9,-87
sprpriority = 3
removetime = 100
ownpal = 1
vel = -4.5,-2
accel = 0,.3

;fin parte brazo 2
[State 3900, 1]
type = Explod
trigger1 = parent, stateno != 3100 && parent, stateno != 3110 && parent, stateno != 3149
trigger1 = parent, stateno !=0
anim = 3117
pos = -2,-74
sprpriority = 3
removetime = 100
ownpal = 1
vel = 4.5,-2
accel = 0,.3

;fin parte pierna 1
[State 3900, 1]
type = Explod
trigger1 = parent, stateno != 3100 && parent, stateno != 3110 && parent, stateno != 3149
trigger1 = parent, stateno !=0
anim = 3118
pos = 1,-50
sprpriority = 3
removetime = 100
ownpal = 1
vel = -4.5,2
accel = 0,.3

;fin parte pierna 2
[State 3900, 1]
type = Explod
trigger1 = parent, stateno != 3100 && parent, stateno != 3110 && parent, stateno != 3149
trigger1 = parent, stateno !=0
anim = 3119
pos = -5,-15
sprpriority = 3
removetime = 100
ownpal = 1
vel = 4.5,2
accel = 0,.3

;fin parte pollera
[State 3900, 1]
type = Explod
trigger1 = parent, stateno != 3100 && parent, stateno != 3110 && parent, stateno != 3149
trigger1 = parent, stateno !=0
anim = 3120
pos = 6,-60
sprpriority = 3
removetime = 100
ownpal = 1
vel = -4.5,0
accel = 0,.3

;fin parte torso
[State 3900, 1]
type = Explod
trigger1 = parent, stateno != 3100 && parent, stateno != 3110 && parent, stateno != 3149
trigger1 = parent, stateno !=0
anim = 3121
pos = 5,-82
sprpriority = 3
removetime = 100
ownpal = 1
vel = 4.5,0
accel = 0,.3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno = 3110
trigger2 = parent, stateno != 3100

;---------------------------------------------------------------------------
;virgen - helper anti proyectiles
[Statedef 3130]
type    = S
movetype= I
physics = n
anim = 3130
ctrl = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1

;solo le pegan los proyectiles
[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AP
time = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AP
stateno = 3130
time = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 23,6
freqmul = 0.9+(random/3333.3)

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 3100

;---------------------------------------------------------------------------
;Virgen fatal alterno
[Statedef 3180]
type    = S
movetype= A
physics = s
juggle  = 4
anim = 3180
ctrl = 0
sprpriority = 5

[State 0, TargetState]
type = TargetState
trigger1 = !time
value = 3190
ID = 3100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 30,2
freqmul = 0.6

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 23,4
freqmul = 0.7

;movimiento virgen
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 5
value = 23,ifelse(random<500,2,3)
freqmul = 0.9+(random/3333.3)
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 20,1
freqmul = 0.9
volume = 150

;nube morph
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 10002
ontop = 1
ownpal = 1
scale = 2,1
pos = 50,0

;nube morph
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 10002
ontop = 1
ownpal = 1
scale = 3,0.5
pos = 50,0
facing = -1

;nube morph final
[State 0, Explod]
type = Explod
trigger1 = time = 419
anim = 10000
sprpriority = 3
ownpal = 1
scale = 1,0.5
pos = 20,20

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 1
trigger2 = animelem = 2
trigger3 = animelemtime(4)=54
trigger4 = time = 419
time = 10
ampl = -7

;ondita
[State 0, Explod]
type = Explod
trigger1 = !time
anim = f 61
pos = 25,0
sprpriority = 0
scale = 2,2

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = !time
time = 419
add = 50,0,0
mul = 256,256,256
sinadd = 50,0,0,10
invertall = 0

[State 0, BGPalFX]
type = BGPalFX
trigger1 = !time
time = 419
add = 0,-140,-140
color = 0

;spark
[State 0, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = f 2
pos = 52, -108
ontop = 1

;lanza
[State 0, Explod]
type = Explod
trigger1 = animelemtime(4)=50
anim = 3185
sprpriority = 2
ownpal = 0
pos = 15,0
shadow = -1

[State 440, 2]
type = PlaySnd
trigger1 = animelemtime(4)=50
trigger2 = animelemtime(7)=153
value = 21, ifelse(random<500,0,1)
freqmul = 0.9+(random/2500.0)

;fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(4)=50
value = 30,0
volume = -100
channel = 17
loop = 1
freqmul = 0.9+(random/3333.3)

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelemtime(4)=54
value = -300

;pega
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(4)=54
value = 22,0
volume = 200
freqmul = 0.9

;pega 2
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(4)=54
value = 23,0
freqmul = 0.8
volume = 100

;fuego cruz
[State 0, Explod]
type = Explod
trigger1 = animelemtime(4)=57
anim = 193
sprpriority = 4
ownpal = 1
pos = 15,0
removetime = 208

;fuego p1
[State 0, Explod]
type = Explod
trigger1 = animelemtime(4)=57
anim = 3550
sprpriority = 1
ownpal = 1
bindtime = -1
pos = 50,-100
id = 194
removetime = 208

;fuego golpe
[State 0, Explod]
type = Explod
trigger1 = animelemtime(4)=54
anim = 3567
pos = 30,-110
facing = ifelse(random/500,1,-1)
sprpriority = 4
ownpal = 1

;sangre 1
[State 0, Explod]
type = Explod
trigger1 = animelemtime(4)=54
anim = f 7008
pos = 30,-110
facing = ifelse(random/500,1,-1)
sprpriority = 4
shadow = -1
ownpal = 1

;sangre constante
[State 1010, 9]
type = explod
trigger1 = animelemtime(4)>=57 && animelemtime(7)<140
trigger1 = time % 5 && random <100
anim = f ifelse(random<333,7003,ifelse(random<500,7008,7009))
pos = 50,-150
sprpriority = 4
ownpal = 1
facing = ifelse(random<500,-1,1)

;sangre onstante 2
[State 0, Explod]
type = Explod
trigger1 = animelemtime(4)>=57 && animelemtime(7)<140
trigger1 = time % 5 && random <40
anim = f 7008
pos = 50,-150
facing = ifelse(random/500,1,-1)
sprpriority = 4
shadow = -1
ownpal = 1

;sangre constante
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(4)=65
trigger2 = animelemtime(7)=20
value = 22,3
freqmul = 0.6+(random/3333.3)
volume = 100

;fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 419
value = 30,1
;volume = -100
channel = 17

;ondota
[State 0, Explod]
type = Explod
trigger1 = time = 419
anim = f 62
sprpriority = 9
ownpal = 1
pos = 15,0

[State 0, MakeDust]
type = MakeDust
trigger1 = time = 419
pos = 15,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 419
value = 30,1
channel = 17
volume = 250

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(2)<0
time = 1
id = 3100
pos = 50,0

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(2)>=0
trigger1 = animelemtime(3)<=1
time = 1
id = 3100
pos = 46,-110

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(3)>=0
trigger1 = animelemtime(4)<=1
time = 1
id = 3100
pos = 42,-123

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(4)>=0
trigger1 = animelemtime(4)<54
time = 1
id = 3100
pos = 39,-130

;lanza

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(4)>=54
trigger1 = animelemtime(4)<55
time = 1
id = 3100
pos = 41,-143

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(4)>=55
trigger1 = animelemtime(4)<56
time = 1
id = 3100
pos = 43,-156

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(4)>=56
trigger1 = animelemtime(4)<57
time = 1
id = 3100
pos = 45,-169

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(4)>=57
trigger1 = animelemtime(7)<153
time = 1
id = 3100
pos = 47,-180

;baja lanza

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(7)>=153
trigger1 = animelemtime(7)<155
time = 1
id = 3100
pos = 41,-150

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(7)>=155
trigger1 = animelemtime(7)<157
time = 1
id = 3100
pos = 35,-120

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(7)>=157
trigger1 = animelemtime(7)<159
time = 1
id = 3100
pos = 29,-90

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(7)>=159
trigger1 = animelemtime(7)<161
time = 1
id = 3100
pos = 23,-60

[State 3050, 5]
type = ChangeState
trigger1 = time = 430
value = 3110
ctrl = 1

;---------------------------------------------------------------------------
;virgen fatal alterno - p2
[Statedef 3190]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

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

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

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

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

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem = 3
time = -1
add = -80,-150,-100
mul = 156,0,0
sinadd = 50,0,0,10
invertall = 0
color = 0

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 419
time = -1
add = -80,-150,-100
mul = 156,0,0
invertall = 0
color = 0

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

[State 0, SelfState]
type = SelfState
trigger1 = time = 419
value = 5150

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Sierra 1
[Statedef 3200]
type    = S
movetype= A
physics = n
juggle  = 4
velset = 0,0
anim = 3200
ctrl = 0
sprpriority = 2

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = anim = 3200 && AnimElem = 4
sound = S12, 0
poweradd = -1000
movetime = 0

[State 3900, 1]
type = Explod
trigger1 = anim = 3200 && AnimElem = 4
anim = 9998
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
sprpriority = -2
removetime = 30
ownpal = 1

[State 3900, 1]
type = Explod
trigger1 = anim = 3200 && AnimElem = 4
anim = 9999
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
ontop = 1
removetime = 30
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3200 && AnimElem = 4
value = 24,0
volume = 100

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3200 && animelem = 7
statetype = A

[State 0, VelSet]
type = VelSet
trigger1 = anim = 3200 && animelem = 7
x = 6
y = -8

[State 0, VelAdd]
type = VelAdd
trigger1 = anim = 3200 && animelemtime(7)>=1
trigger2 = anim = 3202
y = .45

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3200 && animelem = 7
trigger2 = anim = 3202 && animelem = 6
value = 0,3
freqmul = 0.9+(random/3333.3)

;sierra
[State 0, Helper]
type = Helper
trigger1 = anim = 3200 && animelem = 7
name = "sierra"
ID = 3210
stateno = 3210
postype = p1
pos = 0,4

[State 0, playsnd]
type = PlaySnd
trigger1 = anim = 3200 && animelem = 8
value = 5,9+(random/250)
freqmul = 1.0+(random/3333.3)
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = numhelper(3210)=1 && helper(3210), animelem = 5
value = 3201

[State 0, PosSet]
type = PosSet
trigger1 = anim = 3201 && numhelper(3210)=1
x = helper(3210), pos x
y = helper(3210), pos y -70

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = numhelper(3210)=1 && helper(3210), animelem = 10
value = 3202

[State 0, VelSet]
type = VelSet
trigger1 = anim = 3202 && animelem = 4
x = 0
y = -4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3202 && vel y > 0 && pos y >= 0
value = 3203

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

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

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

[State 0, afterimage]
type = AfterImage
trigger1 = animelem =5
time = 50
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 = 3202 && animelem = 5
time = 0

[State 640, 3]
type = HitDef
trigger1 = anim = 3202 && animelem = 6
attr = A, NA
damage    = 26,4
guardflag = MA
Priority = 4, Hit
pausetime = 5,7
sparkno = 1
sparkxy = -10,-50
hitsound   = 5,3
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8,-2
air.velocity = -8,-2
fall = 1
envshake.time = 5
fall.envshake.time = 5

[State 210, 3]
type = ChangeAnim
trigger1 = AnimElemTime(6) > 0 && AnimElemTime(7) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 3202
elem = 7

[State -3, Landing Sound]
type = PlaySnd
trigger1 = anim = 3203 && animelem = 1
value = 40, 0
freqmul = 0.8+(random/3333.3)

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

;---------------------------------------------------------------------------
; sierra - helper
[Statedef 3210]
type    = S
movetype= A
physics = n
juggle  = 4
poweradd= 0
velset = 6,0
anim = 3210
ctrl = 0
sprpriority = 2

[State 0, ScreenBound]
type = ScreenBound
trigger1 = animelemtime(11)<=0
value = 1
movecamera = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 21,0
freqmul = 0.8

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = 21,4
channel = 18
freqmul = 0.7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = 21,5
channel = 18
freqmul = 0.8

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 6
ampl = -6

;inmune a throws
[State -3, NotHitBy]
type = NotHitBy
trigger1 = 1
value = ,AT
time = 1

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

;chispa 1
[State 3900, 1]
type = Explod
trigger1 = time % 3 = 0
anim = 3170
pos = ceil(-35+(random/14.2)),0
ontop = 1
ownpal = 1
facing = ifelse(random/500,1,-1)
vfacing = ifelse(random/500,1,-1)

[State 106, 3]
type = MakeDust
trigger1 = time % 5 = 0
pos = ceil(-35+(random/14.2)),0
spacing = 1

[State 1000, 5]
type = HitDef
trigger1 = time % 2 = 0
attr = s, HP
animtype  = heavy
damage    = 20, 2
Priority = 4, Hit
guardflag = MA
sparkno = -1
sparkxy = -10,-50
hitsound   = s 22,0
guardsound = 6,0
ground.type = low
ground.velocity = -4,-1
air.velocity = -4,-2
fall = 1
guard.slidetime = 10
guard.velocity = -10
envshake.time = 6
envshake.ampl = 6
pausetime = 3,3
guard.pausetime = 3,0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall.recover = 0

;sangre
[State 1010, 9]
type = explod
trigger1 = time % 2 = 0 && movehit && numtarget
trigger1 = !(enemynear,name = "noroko" && enemynear,var(10)=1)
trigger1 = !(enemynear,name = "animus" && enemynear,stateno = 3100)
trigger2 = time % 2 = 0 && movehit && enemynear, name = "final"
anim = f ifelse(random<333,7003,ifelse(random<500,7005,7008))
pos = 30,-50
postype = p1
ignorehitpause = 1
sprpriority = 6
ownpal = 1
facing = -1

;SPARK
[State 1010, 9]
type = explod
triggerall = time % 2 = 0
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 = 30,-50
postype = p1
ignorehitpause = 1
sprpriority = 4

[State 0, MoveHitReset]
type = MoveHitReset
trigger1 = time % 2 = 0

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

;---------------------------------------------------------------------------
;fatal move
[Statedef 3300]
type    = S
movetype= A
physics = S
anim = 3300
ctrl = 0

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = AnimElem = 3
sound = S12, 0
poweradd = -3000
movetime = 30

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 5,1
channel = 0

[State 3900, 1]
type = Explod
trigger1 = AnimElem = 3
anim = 9998
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
sprpriority = -2
removetime = 30
ownpal = 1

[State 3900, 1]
type = Explod
trigger1 = AnimElem = 3
anim = 9999
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
ontop = 1
removetime = 30
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 24,0
volume = 100

[State 0, afterimage]
type = AfterImage
trigger1 = animelem =5
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

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

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

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

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

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3300 && 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 = 5
anim = f 61
pos = 0,0
sprpriority = 0

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

[State 3300, hit]
type = hitdef
trigger1 = anim = 3300 && animelem = 5
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 = 3300
numhits = 0
p2facing = 1

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

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

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

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

;---------------------------------------------------------------------------
;fatal move BLOQUEADA
[Statedef 3305]
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, PalFX]
type = PalFX
trigger1 = !time
time = 1
add = 0,0,0

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

;---------------------------------------------------------------------------
;fatal move p1
[Statedef 3310]
type    = S
movetype= A
physics = s
anim = 3310
ctrl = 0
sprpriority = 2

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

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

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

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

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

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

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

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

;------

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

;helper morph
[State 0, Helper]
type = Helper
trigger1 = !time && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

[State 0, playsnd]
type = PlaySnd
trigger1 = !time
trigger2 = animelem = 15
value = 20, 1
volume = -70

[State 0, Width]
type = Width
trigger1 = animelemtime(1)<= 15
edge = 50,0

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

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

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

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

[State 0, Posset]
type = posSet
trigger1 = !time
y = 0

[State 0, velset]
type = velSet
trigger1 = !time
y = 0

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(8)<=3
trigger2 = animelemtime(10)>=0
trigger2 = animelemtime(10)<=3
time = 1
pos = 44,-67

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(9)>=0
trigger1 = animelemtime(9)<=3
time = 1
pos = 47,-64

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(11)>=0
trigger1 = animelemtime(11)<=3
time = 1
pos = 33,-78

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

;lanza
[State 0, Explod]
type = Explod
trigger1 = time = 63
anim = 3350
ID = 3350
pos = 78,0
sprpriority = 0
shadow = -1
ownpal = 1
facing = -1

[State 440, 2]
type = PlaySnd
trigger1 = time = 63
trigger2 = numtarget
trigger2 = target, anim = 91240 && target, animelemtime(1)=217
value = 0, 1
freqmul = 0.9+(random/3333.3)

[State 440, 2]
type = PlaySnd
trigger1 = time = 63
trigger2 = numtarget
trigger2 = target, anim = 91240 && target, animelemtime(1)=217
value = 21, ifelse(random<500,0,1)
freqmul = 0.9+(random/3333.3)

;lanza
[State 0, Explod]
type = Explod
trigger1 = time = 70
anim = 3351
ID = 3351
pos = 78,0
sprpriority = 4
ownpal = 1
facing = -1

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 15
value = 5,15+(random<500)
freqmul = 0.9+(random/3333.3)
channel = 0

[State 440, 2]
type = PlaySnd
trigger1 = time = 70
trigger2 = animelemtime(19)=99
value = 22, 0
freqmul = 0.8+(random/3333.3)
volume = 100

[State 440, 2]
type = PlaySnd
trigger1 = animelemtime(19)=99
value = f 7, 1

[State 440, 2]
type = PlaySnd
trigger1 = animelemtime(15)=40
value = 22,3
;volume = -100
freqmul = 0.4

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 16
value = 0,3
freqmul = 0.7

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 16
value = 22,0
freqmul = 0.7
volume = 100

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 16
value = 22,2
volume = 100
freqmul = 0.7

[State 440, 2]
type = PlaySnd
trigger1 = animelem = 16
trigger2 = animelem = 17
trigger3 = animelemtime(18)=26
value = 22,3
freqmul = 0.6+(random/3333.3)

;sangre
[State 0, Explod]
type = Explod
trigger1 = time = 70
anim = f ifelse(random/500,7004,7005)
pos = 30, -185
facing = ifelse(random/500,1,-1)
sprpriority = 5
shadow = -1
ownpal = 1

;sangre
[State 0, Explod]
type = Explod
trigger1 = animelem = 16
trigger2 = animelemtime(16)>=2 && animelemtime(18)<=100
trigger2 = random < 20
anim = f 7008
pos = 25, -155
facing = ifelse(random/500,1,-1)
sprpriority = 5
shadow = -1
ownpal = 1

;sangre constante
[State 0, Explod]
type = Explod
trigger1 = animelem = 16
trigger2 = animelemtime(18)=26
trigger3 = animelemtime(16)>=2 && animelemtime(18)<=100
trigger3 = random < 60
anim = 3390
pos = 25, -147
sprpriority = 5
shadow = -1
ownpal = 1
scale = 0.9+(random/3333.3),1.05

;sangre charco
[State 0, Explod]
type = Explod
trigger1 = animelemtime(16) = 37
anim = 3391
pos = -40, 0
sprpriority = 0
removetime = -1
scale = 0.7,0.6
ownpal = 1

[State 810, Throw 11]
type = Targetlifeadd
trigger1 = time = 70
value = -50
kill = 0

[State 810, Throw 11]
type = Targetlifeadd
trigger1 = animelem = 16
value = -(target,lifemax)

[State 0, HitAdd]
type = HitAdd
trigger1 = time = 70
trigger2 = animelem = 16
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = roundstate = 3
trigger1 = animelem = 17
var(23) = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
trigger2 = time = 70
trigger3 = animelem = 16
trigger4 = animelemtime(19)=99
time = 10
ampl = -8

;sangre chica
[State 0, Explod]
type = Explod
trigger1 = animelemtime(19)=99
anim = f ifelse(random/500,7004,7005)
pos = 70, -10
facing = ifelse(random/500,1,-1)
sprpriority = 5
shadow = -1
ownpal = 1

;ondita
[State 0, Explod]
type = Explod
trigger1 = animelemtime(19)=99
anim = f 61
pos = 70,0
sprpriority = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = animelemtime(15)=40
time = 60
ampl = -2

;spark
[State 0, Explod]
type = Explod
trigger1 = animelem = 15
anim = f 2
pos = 30, -120
ontop = 1

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem = 46
time = 20
sinadd = 256,42,-39,36

[State 0, playsnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 23
value = 5,9+(random/250)
freqmul = 1.0+(random/3333.3)
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 46
value = 25,1
freqmul = 3.0

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

;---------------------------------------------------------------------------
;fatal - p2
[Statedef 3320]
type    = s
movetype= H
physics = N
velset = 0,0
sprpriority = 1

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

[State 0, SelfState]
type = SelfState
trigger1 = !time && life > 250
value = 5210

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

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time && anim != 6303
value = 3320

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
y = -8.3

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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
y = 0

[State 0, target sufre sound]
type = PlaySnd
triggerall = Authorname = "Andres Borghi"
trigger1 = animelem = 3
trigger1 = anim = 3320
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)

;ES Peketo DF
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 6303 && animtime = 0
value = 6304

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = anim = 3320 && animtime = 0
value = 91240

[State 0, Helper]
type = Helper
trigger1 = anim = 91240 && animelem = 1
trigger2 = anim = 6304 && animelem = 1
name = "piernas"
stateno = 91241
bindtime = 0
pos = 0,15

[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 91240 && animelemtime(1)>=217
trigger2 = anim = 6304 && animelemtime(1)>=217
x = -6
y = 25

[State 3000, 0]
type = BGPalfx
trigger1 = anim = 91240 && animelemtime(1)=223
trigger2 = anim = 6304 && animelemtime(1)=223
time = 1
add = 0,0,0

[State 0, ChangeAnim2]
type = Changestate
trigger1 = anim = 91240 && animelemtime(1)=223
trigger2 = anim = 6304 && animelemtime(1)=223
value = 5150
ctrl = 0

;------------------------
;fatal move custom Animus
;------------------------
;cortado al medio - piernas (helper)
;helper MORPH
[Statedef 91241]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = !time
value = 91242

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 3+(random/500.0)
y = -3

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

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = vel y > 0 && pos y > 0
value = 91243

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

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

;ondita
[State 0, Explod]
type = Explod
trigger1 = anim = 91243
anim = f 61
pos = 20,0
sprpriority = 0
persistent = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = anim = 91243
time = 10
ampl = -8
persistent = 0

[State 440, 2]
type = PlaySnd
trigger1 = anim = 91243
value = f 7, 1
persistent = 0

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;dark force comienza
[Statedef 3500]
type    = S
movetype= A
physics = S
anim = 3500
ctrl = 0

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = AnimElem = 3
sound = S12, 0
movetime = 30

[State 3900, 1]
type = Explod
trigger1 = AnimElem = 3
anim = 9998
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
sprpriority = -2
removetime = 30
ownpal = 1

[State 3900, 1]
type = Explod
trigger1 = AnimElem = 3
anim = 9999
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
ontop = 1
removetime = 30
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 24,0
volume = 100

[State 170, 1]
type = NotHitBy
trigger1 = animelemtime(6)>=1
trigger1 = animelemtime(9)<=0
value = SCA
time = 1

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

;enciende fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 30,2
freqmul = ifelse(var(10)=1,1.0,ifelse(var(10)=2,0.85,ifelse(var(10)=3,0.7,0.6)))
volume = 100

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 30,0
freqmul = ifelse(var(10)=1,0.7,ifelse(var(10)=2,1.0,ifelse(var(10)=3,1.2,1.5)))
channel = 3
volume = ifelse(var(10)=1,-150,ifelse(var(10)=2,-100,ifelse(var(10)=3,-20,50)))
loop = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 5,ifelse(var(10)<=2,ifelse(random<500,2,3),ifelse(var(10)=3,4,8))
freqmul = 0.8+(random/3333.3)

;fuego 1
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 7 && var(10)=1
anim = 3560
pos = 0,-10
scale = 0.5,0.8
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 7 && var(10)=1
anim = 3550
ID = 3550
pos = 0,-10
bindtime = -1
removetime = -1
scale = 0.5,0.8
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 7 && var(10)=1
time = 5
ampl = -4

;fuego 2
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 7 && var(10)=2
anim = 3560
pos = 0,-15
scale = 1,1
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 7 && var(10)=2
anim = 3550
ID = 3550;3552
pos = 0,-15
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 7 && var(10)=2
time = 7
ampl = -6

;fuego 3
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 7 && var(10)=3
anim = 3560
pos = 0,-20
scale = 1.5,1.5
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 7 && var(10)=3
anim = 3550
ID = 3550;3553
pos = 0,-20
bindtime = -1
removetime = -1
scale = 1.5,1.5
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 7 && var(10)=3
time = 9
ampl = -8

;fuego 4
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 7 && var(10)=4
anim = 3560
pos = 0,-25
scale = 2,2
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 7 && var(10)=4
anim = 3550
ID = 3550;3554
pos = 0,-25
bindtime = -1
removetime = -1
scale = 2,2
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 7 && var(10)=4
time = 12
ampl = -10

;----

[State 1000, 5]
type = HitDef
trigger1 = !time && life < 750
attr = S, SA
animtype  = hard
damage    = 50, 5
Priority = 4, Hit
guardflag = MA
sparkno = 1
sparkxy = 0,-60
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = -6,-2
air.velocity = -6,-2
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 12
envshake.ampl = 12
pausetime = 5,7

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

;---------------------------------------------------------------------------
;dark force cambia
[Statedef 3510]
type    = S
movetype= A
physics = S
anim = 3510
ctrl = 0
velset = 0,0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 2
id = 3550

;ondita
[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = f 61
sprpriority = 0
pos = 0,ceil((pos y -pos y -pos y))

;enciende fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 30,2
freqmul = ifelse(var(10)=1,1.0,ifelse(var(10)=2,0.85,ifelse(var(10)=3,0.7,0.6)))
volume = 100

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 30,0
freqmul = ifelse(var(10)=1,0.7,ifelse(var(10)=2,1.0,ifelse(var(10)=3,1.2,1.5)))
channel = 3
volume = ifelse(var(10)=1,-150,ifelse(var(10)=2,-100,ifelse(var(10)=3,-50,0)))
loop = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5,ifelse(var(10)<=2,ifelse(random<500,2,3),ifelse(var(10)=3,4,8))
freqmul = 0.8+(random/3333.3)

;fuego 1
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=1
anim = 3560
pos = 0,-10
scale = 0.5,0.8
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=1
anim = 3550
ID = 3550
pos = 0,-10
bindtime = -1
removetime = -1
scale = 0.5,0.8
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2 && var(10)=1
time = 5
ampl = -4

;fuego 2
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=2
anim = 3560
pos = 0,-15
scale = 1,1
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=2
anim = 3550
ID = 3550
pos = 0,-15
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2 && var(10)=2
time = 7
ampl = -6

;fuego 3
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=3
anim = 3560
pos = 0,-20
scale = 1.5,1.5
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=3
anim = 3550
ID = 3550
pos = 0,-20
bindtime = -1
removetime = -1
scale = 1.5,1.5
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2 && var(10)=3
time = 9
ampl = -8

;fuego 4
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=4
anim = 3560
pos = 0,-25
scale = 2,2
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=4
anim = 3550
ID = 3550
pos = 0,-25
bindtime = -1
removetime = -1
scale = 2,2
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2 && var(10)=4
time = 12
ampl = -10

;----

[State 1000, 5]
type = HitDef
trigger1 = !time && life < 750
attr = S, SA
animtype  = hard
damage    = 50, 5
Priority = 4, Hit
guardflag = MA
sparkno = 1
sparkxy = 0,-60
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = -6,-2
air.velocity = -6,-2
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 12
envshake.ampl = 12
pausetime = 5,7

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 8 && pos y != 0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 3510 && animelem = 8 && pos y = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;dark force termina
[Statedef 3520]
type    = S
movetype= I
physics = S
anim = 3510
ctrl = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem = 2
id = 3550

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

;sonido final fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 30,1
freqmul = ifelse(var(10)=1,1.3,ifelse(var(10)=2,1.0,ifelse(var(10)=3,0.8,0.6)))
volume = 100

;fuego 1
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=1
anim = 3560
pos = 0,-10
scale = 0.5,0.8
sprpriority = 3
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2 && var(10)=1
time = 5
ampl = -4

;fuego 2
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=2
anim = 3560
pos = 0,-15
scale = 1,1
sprpriority = 3
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2 && var(10)=2
time = 7
ampl = -6

;fuego 3
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=3
anim = 3560
pos = 0,-20
scale = 1.5,1.5
sprpriority = 3
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2 && var(10)=3
time = 9
ampl = -8

;fuego 4
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && var(10)=4
anim = 3560
pos = 0,-25
scale = 2,2
sprpriority = 3
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2 && var(10)=4
time = 12
ampl = -10

;----

[State 0, VarSet]
type = VarSet
trigger1 = animelem = 2
var(10)=0

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

;---------------------------------------------------------------------------
;dark force COMBO!
[Statedef 3530]
type    = S
movetype= A
physics = S
anim = 3530
ctrl = 0
velset = 0

[State 3050, Super A]
type = SuperPause
anim = -1
trigger1 = animelem = 3
sound = S12, 0
poweradd = -500

[State 3900, 1]
type = Explod
trigger1 = animelem = 3
anim = 9998
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
sprpriority = -2
removetime = 30
ownpal = 1

[State 3900, 1]
type = Explod
trigger1 = animelem = 3
anim = 9999
pos = 0,0
postype = left
supermovetime = 30
bindtime = -1
ontop = 1
removetime = 30
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 24,0
volume = 100

;enciende fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 30,2
freqmul = ifelse(var(10)=1,1.0,ifelse(var(10)=2,0.85,ifelse(var(10)=3,0.7,0.6)))
volume = 100

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 30,0
freqmul = ifelse(var(10)=1,0.7,ifelse(var(10)=2,1.0,ifelse(var(10)=3,1.2,1.5)))
channel = 3
volume = ifelse(var(10)=1,-150,ifelse(var(10)=2,-100,ifelse(var(10)=3,-20,50)))
loop = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 5,ifelse(var(10)<=2,ifelse(random<500,2,3),ifelse(var(10)=3,4,8))
freqmul = 0.8+(random/3333.3)

;fuego 1
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)=1
anim = 3560
pos = 0,-10
scale = 0.5,0.8
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)=1
anim = 3550
ID = 3550
pos = 0,-10
bindtime = -1
removetime = -1
scale = 0.5,0.8
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 4 && var(10)=1
time = 5
ampl = -4

;fuego 2
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)=2
anim = 3560
pos = 0,-15
scale = 1,1
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)=2
anim = 3550
ID = 3550
pos = 0,-15
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 4 && var(10)=2
time = 7
ampl = -6

;fuego 3
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)=3
anim = 3560
pos = 0,-20
scale = 1.5,1.5
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)=3
anim = 3550
ID = 3550
pos = 0,-20
bindtime = -1
removetime = -1
scale = 1.5,1.5
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 4 && var(10)=3
time = 9
ampl = -8

;fuego 4
;-------

[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)=4
anim = 3560
pos = 0,-25
scale = 2,2
sprpriority = 3
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && var(10)=4
anim = 3550
ID = 3550;3554
pos = 0,-25
bindtime = -1
removetime = -1
scale = 2,2
sprpriority = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 4 && var(10)=4
time = 12
ampl = -10

;ataque
;------

[State 1000, 5]
type = HitDef
trigger1 = !time
attr = S, SA
animtype  = hard
damage    = 260, 15
Priority = 4, Hit
guardflag = MA
sparkno = -1
sparkxy = 0,-60
hitsound   = S6,1
guardsound = 6,0
ground.type = High
ground.velocity = -6,-2
air.velocity = -6,-2
fall = 1
guard.slidetime = 0
guard.velocity = 0
envshake.time = 12
envshake.ampl = 12
pausetime = 12,12
palfx.time = 40
palfx.add = 140,20,0
palfx.sinadd = 140,20,0,50
getpower = 0,0

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 3566
pos = 30,-40
scale = 1.4,1.4
sprpriority = 3
ownpal = 1

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 3565
pos = 30,-40
scale = 1.4,1.4
sprpriority = 3
ownpal = 1

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 3566
pos = 10,-60
scale = 1,1
sprpriority = 3
ownpal = 1
facing = -1

;fuego
[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 3565
pos = 0,-40
scale = 1,1
sprpriority = 3
ownpal = 1
facing = -1

;spark fuego
[State 0, Explod]
type = Explod
trigger1 = movehit
anim = 3567
pos = ceil(ifelse(facing=-1,(pos x -(target, pos x)),((target, pos x)-pos x))),ceil((pos y -70))
scale = 1.4,1.4
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = ifelse(random<500,1,-1)
vfacing = ifelse(random<500,1,-1)

;sonido fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 30,ifelse(random<500,3,4)
freqmul = 0.8
volume = 50

;fuego hit
[State 200, 1]
type = PlaySnd
trigger1 = movehit
value = 30,5
freqmul = 0.7+(random/2500.0)
persistent = 0
ignorehitpause = 1
volume = 180

;----

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

;----------------------------------------------------------
;-----------------------------------------------------------
;helper MORPH (backup)
[Statedef 4666]
type    = S
movetype= I
physics = N
poweradd= 0
anim = 9123000
ctrl = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
;pos = 30,0

;nube morph
[State 0, Explod]
type = Explod
trigger1 = !time && parent,stateno !=195 && parent,stateno !=196
anim = 10000
ontop = 1
ownpal = 1
scale = 1,ifelse(parent,anim=440,.7,1)

;morph sonido
[State 440, 2]
type = PlaySnd
trigger1 = !time && parent,stateno !=195 && parent,stateno !=196
value = 20, 0
volume = -50

[State 0, VarSet]
type = VarSet
trigger1 = parent, stateno = 0 && random < 5
var(22)=1

;destruye
[State 0, Explod]
type = Explod
trigger1 = parent, stateno != 0
trigger1 = parent, stateno != 10
trigger1 = parent, stateno != 11
trigger1 = parent, stateno != 12
trigger1 = parent, stateno != 20
trigger1 = parent, stateno != 40
trigger1 = parent, stateno != 50
trigger1 = parent, stateno != 52
trigger1 = parent, stateno != 100
trigger1 = parent, stateno != 101
trigger1 = parent, stateno != 105
trigger1 = parent, stateno != 181
trigger1 = parent, stateno != 191
trigger1 = parent, stateno != 195
trigger1 = parent, stateno != 196
trigger1 = parent, stateno != 440
trigger1 = parent, stateno != 640
trigger1 = parent, stateno != 850
trigger1 = parent, stateno != 860
trigger1 = parent, stateno != 1000
trigger1 = parent, stateno != 1050
trigger1 = parent, stateno != 3100
trigger1 = parent, stateno != 3110
trigger1 = parent, stateno != 3149
trigger1 = parent, stateno != 3150
trigger1 = parent, stateno != 3180
trigger1 = parent, stateno != 3200
trigger1 = parent, stateno != 3310
trigger2 = var(22)=1
anim = 10000
ontop = 1
ownpal = 1
scale = 1, 1

;destruye
;morph sonido
[State 440, 1]
type = PlaySnd
trigger1 = parent, stateno != 0
trigger1 = parent, stateno != 10
trigger1 = parent, stateno != 11
trigger1 = parent, stateno != 12
trigger1 = parent, stateno != 20
trigger1 = parent, stateno != 40
trigger1 = parent, stateno != 50
trigger1 = parent, stateno != 52
trigger1 = parent, stateno != 100
trigger1 = parent, stateno != 101
trigger1 = parent, stateno != 105
trigger1 = parent, stateno != 181
trigger1 = parent, stateno != 191
trigger1 = parent, stateno != 195
trigger1 = parent, stateno != 196
trigger1 = parent, stateno != 440
trigger1 = parent, stateno != 640
trigger1 = parent, stateno != 850
trigger1 = parent, stateno != 860
trigger1 = parent, stateno != 1000
trigger1 = parent, stateno != 1050
trigger1 = parent, stateno != 3100
trigger1 = parent, stateno != 3110
trigger1 = parent, stateno != 3149
trigger1 = parent, stateno != 3150
trigger1 = parent, stateno != 3180
trigger1 = parent, stateno != 3200
trigger1 = parent, stateno != 3310
trigger2 = var(22)=1
value = 20, 0
volume = -50

;destruye
[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 0 ;common
trigger1 = parent, stateno != 10
trigger1 = parent, stateno != 11
trigger1 = parent, stateno != 12
trigger1 = parent, stateno != 20
trigger1 = parent, stateno != 40
trigger1 = parent, stateno != 50
trigger1 = parent, stateno != 52
trigger1 = parent, stateno != 100
trigger1 = parent, stateno != 101
trigger1 = parent, stateno != 105
trigger1 = parent, stateno != 181 ;winpose maiden
trigger1 = parent, stateno != 191 ;intro mu馿co
trigger1 = parent, stateno != 195
trigger1 = parent, stateno != 196;intro himself
trigger1 = parent, stateno != 440 ;crhk
trigger1 = parent, stateno != 640 ;jphk
trigger1 = parent, stateno != 850 ;throw 2
trigger1 = parent, stateno != 860
trigger1 = parent, stateno != 1000 ;giros
trigger1 = parent, stateno != 1050
trigger1 = parent, stateno != 3100 ;virgen
trigger1 = parent, stateno != 3110
trigger1 = parent, stateno != 3149
trigger1 = parent, stateno != 3150
trigger1 = parent, stateno != 3180
trigger1 = parent, stateno != 3200 ;sierra
trigger1 = parent, stateno != 3310 ;fatal move
trigger2 = var(22)=1

;---------------------------------------------------
;---------------------------------------------------
;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 = ifelse(parent,stateno=192,4,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

;---------------------------------------------------
;---------------------------------------------------
;---------------------------------------------------
;STAGES COMMON
;-------------

;Lanza Vhinna - (helper)
[Statedef 8500]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 0,0
anim = 9123000
ctrl = 0

;lanza
[State 0, Explod]
type = Explod
trigger1 = anim = 9123000 && !time
anim = f 8500
ID = ifelse(ishelper(8500),8500,8501)
sprpriority = 0
bindtime = -1
removetime = -1
ownpal = 1

;pega parent
[State 0, RemoveExplod]
type = changeanim
triggerall = parent, pos y - pos y = [-60,0]
triggerall = parent, pos x - pos x = [0,10]
triggerall = parent, movetype = h
triggerall = parent, stateno != [120,155]
triggerall = parent, pos y < 0
triggerall = anim = 9123000
trigger1 = parent, vel x < -3.5
trigger2 = parent, vel x > 3.5
value = 8055000

;pega enemy
[State 0, RemoveExplod]
type = changeanim
triggerall = enemynear, pos y - pos y = [-60,0]
triggerall = enemynear, pos x - pos x = [0,10]
triggerall = enemynear, movetype = h
triggerall = enemynear, stateno != [120,155]
triggerall = enemynear, pos y < 0
triggerall = anim = 9123000
trigger1 = enemynear, vel x < -3.5
trigger2 = enemynear, vel x > 3.5
value = 8055000

;pega partner
[State 0, RemoveExplod]
type = changeanim
triggerall = partner, pos y - pos y = [-60,0]
triggerall = partner, pos x - pos x = [0,10]
triggerall = partner, movetype = h
triggerall = partner, stateno != [120,155]
triggerall = partner, pos y < 0
triggerall = anim = 9123000
trigger1 = partner, vel x < -3.5
trigger2 = partner, vel x > 3.5
value = 8055000

;lanza 1
[State 0, RemoveExplod]
type = parentvarset
trigger1 = anim = 8055000
trigger1 = ishelper(8500)
var(30) = 0

;lanza 2
[State 0, RemoveExplod]
type = parentvarset
trigger1 = anim = 8055000
trigger1 = ishelper(8501)
var(31) = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = anim = 8055000
ID = ifelse(ishelper(8500),8500,8501)
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 8055000
value = f 50,0
volume = 100
freqmul = 1.0
loop = 0
pan = 0
persistent = 0

;base
[State 0, Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8501
ID = 8501
sprpriority = 0
removetime = -1
ownpal = 1
persistent = 0

;parte alta
[State 0, Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8502
ID = 8502
sprpriority = 0
removetime = 100
ownpal = 1
vel = -4+(random/125),-3-(random/333)
accel = 0,0.3
persistent = 0
facing = ifelse(random/500,1,-1)

;parte media
[State 0, Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8503
ID = 8503
sprpriority = 0
removetime = 100
ownpal = 1
vel = -4+(random/125),-3-(random/333)
accel = 0,0.3
persistent = 0
facing = ifelse(random/500,1,-1)

;astilla 1
[State 0, Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8504
ID = 8504
pos = ceil(-10+(random/100)),ceil(-20-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)
persistent = 0

;astilla 2
[State 0, Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8504
ID = 8504
pos = ceil(-10+(random/100)),ceil(-20-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)
persistent = 0

;astilla 3
[State 0, Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8504
ID = 8504
pos = ceil(-10+(random/100)),ceil(-20-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)
persistent = 0

;astilla 4
[State 0, Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8504
ID = 8504
pos = ceil(-10+(random/100)),ceil(-20-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)
persistent = 0

;astilla 5
[State 0, Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8504
ID = 8504
pos = ceil(-10+(random/100)),ceil(-20-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = 2
facing = ifelse(random/500,1,-1)
persistent = 0

;astilla 6
[State 0,Explod]
type = Explod
trigger1 = anim = 8055000
anim = f 8504
ID = 8504
pos = ceil(-10+(random/100)),ceil(-20-(random/100))
vel = -4+(random/125),-3-(random/125)
accel = 0,0.3
removetime = 100
ownpal = 1
sprpriority = -1
facing = ifelse(random/500,1,-1)
persistent = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = anim = 8055000
time = 6
ampl = 6
persistent = 0

[State 700, 10]
type = destroyself
trigger1 = anim = 8055000 && animtime = 0

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

;---------------------------------------------------------------------------
; 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

;almacena posicion de P2
[State -2, GetP2Pos]
type = VarSet
trigger1 = 1;RoundState <= 3
fvar(17) = enemynear, pos x

;grito cuando sufre
[State -2, 1]
type = PlaySnd
trigger1 = !time
trigger1 = random < 500
trigger1 = stateno = 5000 && alive
value = 11,ifelse(random<333,1,ifelse(random<500,2,3))
channel = 15
volume = 150
freqmul = 0.9+(random/3333.3)

;helper morph - backup intro 2
[State 0, Helper]
type = Helper
trigger1 = stateno = 0 && !time && prevstateno = 195 && numhelper(4666)=0
name = "morph"
ID = 4666
stateno = 4666
postype = p1
pos = 0,0
bindtime = -1

;aerial rave
[State 0, VarSet]
type = VarSet
trigger1 = stateno!=440 && stateno !=40 && stateno != 50
v = 15
value = 0

;remove parche lanzas
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 1100 && stateno != 1120
id = 1101

;remove cuchilla de decoy
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 1210
id = 1215

;apaga sonido de fuego en intro 1
[State 0, StopSnd]
type = StopSnd
trigger1 = stateno != 192 && stateno != 196 && stateno != 3180
channel = 17

;apaga var de lanzas para screenbound
[State 0, VarSet]
type = VarSet
trigger1 = stateno != 3000
var(19)=0

;Dark Force
;----------

;DF
;baja el poder mientras esta en DF
[State -3, PowerAdd]
type = PowerAdd
triggerall = var(10) > 0
trigger1 = 1
trigger1 = roundstate = 2
value = -3

;varsets

[State 0, VarSet]
type = VarSet
triggerall = life >=750
trigger1 = stateno = 3500 && animelem = 7
trigger2 = stateno = 3510 && animelem = 2
trigger3 = stateno = 3530 && animelem = 4
var(10)=1

;varset
[State 0, VarSet]
type = VarSet
triggerall = life >=500
triggerall = life <750
trigger1 = stateno = 3500 && animelem = 7
trigger2 = stateno = 3510 && animelem = 2
trigger3 = stateno = 3530 && animelem = 4
var(10)=2

;varset
[State 0, VarSet]
type = VarSet
triggerall = life >=250
triggerall = life <500
trigger1 = stateno = 3500 && animelem = 7
trigger2 = stateno = 3510 && animelem = 2
trigger3 = stateno = 3530 && animelem = 4
var(10)=3

;varset
[State 0, VarSet]
type = VarSet
triggerall = life < 250
trigger1 = stateno = 3500 && animelem = 7
trigger2 = stateno = 3510 && animelem = 2
trigger3 = stateno = 3530 && animelem = 4
var(10)=4

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(10)=1
time = 5
add = -25,-25,-25
color = 0
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(10)=2
time = 5
add = -50,-50,-50
color = 0
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(10)=3
time = 5
add = -75,-75,-75
color = 0
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(10)=4
time = 5
add = -100,-100,-100
color = 0
ignorehitpause = 1

;DF
;BG color
[State -2, BGPalFX]
type = BGPalFX
trigger1 = var(10)=1
time = 1
add = 0,-100,-100
color=0
ignorehitpause = 1

;DF
;BG color
[State -2, BGPalFX]
type = BGPalFX
trigger1 = var(10)=2
time = 1
add = 0,-140,-140
color=0
ignorehitpause = 1

;DF
;BG color
[State -2, BGPalFX]
type = BGPalFX
trigger1 = var(10)=3
time = 1
add = 0,-170,-170
color=0
ignorehitpause = 1

;DF
;BG color
[State -2, BGPalFX]
type = BGPalFX
trigger1 = var(10)=4
time = 1
add = 0,-200,-200
color=0
ignorehitpause = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = var(10)=4 && time % 4 = 0
time = 4
ampl = -4
ignorehitpause = 1

;paneo del sonido fuego
[State 0, SndPan]
type = SndPan
trigger1 = 1
channel = 3
pan = 0

;DF muere

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = life = 0
id = 3550

[State 0, StopSnd]
type = StopSnd
trigger1 = var(10)=0
channel = 3

;sonido final fuego
[State 0, PlaySnd]
type = PlaySnd
trigger1 = life = 0 && var(10)!=0
value = 30,1
freqmul = ifelse(var(10)=1,1.3,ifelse(var(10)=2,1.0,ifelse(var(10)=3,0.8,0.6)))
volume = 100

;fuego 1
[State 0, Explod]
type = Explod
trigger1 = life = 0 && var(10)=1
anim = 3560
pos = 0,-10
scale = 0.5,0.8
sprpriority = 3
ownpal = 1
persistent = 0

;fuego 2
[State 0, Explod]
type = Explod
trigger1 = life = 0 && var(10)=2
anim = 3560
pos = 0,-15
scale = 1,1
sprpriority = 3
ownpal = 1
persistent = 0

;fuego 3
[State 0, Explod]
type = Explod
trigger1 = life = 0 && var(10)=3
anim = 3560
pos = 0,-20
scale = 1.5,1.5
sprpriority = 3
ownpal = 1
persistent = 0

;fuego 4
[State 0, Explod]
type = Explod
trigger1 = life = 0 && var(10)=4
anim = 3560
pos = 0,-25
scale = 2,2
sprpriority = 3
ownpal = 1
persistent = 0

[State 0, VarSet]
type = VarSet
trigger1 = life = 0
var(10)=0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = !(enemynear, Authorname = "Andres Borghi")
trigger1 = stateno != 170 && stateno != 182
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
trigger3 = stateno = 641 ;Jp hk land
value = 40, 0
freqmul = 0.8+(random/3333.3)
volume = 50

[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)

;mina turn backup
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = numhelper(4666)=1
trigger1 = anim = 5
value = 6205

;sangre constante
[State 0, Helper]
type = Helper
trigger1 = life <= 250 && random < 10
trigger1 = roundstate = 2 && movetype != H && alive = 1
trigger1 = stateno != 3100 && stateno != 3110 && stateno != 3180 && stateno != 3149 && stateno != 3150 && stateno != 3310
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

;para apagar palfx de intro 1
[State 0, PalFX]
type = PalFX
trigger1 = stateno = 0 && prevstateno = 192
time = 1
add = 0,0,0

;se cancela afterimage si es golpeado
[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = movetype = h
time = 0

;dark force
;----------

;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 = 3520
ctrl = 0

;DF apaga
[State 0, ChangeState]
type = ChangeState
triggerall = ctrl && statetype !=A
trigger1 = var(10) > 0 && power = 0
trigger2 = var(10) > 0 && roundstate !=2
value = 3520
ctrl = 0

;dark force cambios
[State 0, changestate]
type = changestate
triggerall = var(10)!=0 && stateno != 3510
triggerall = stateno != 5110 && stateno != 5120
trigger1 = var(10)!=1
trigger1 = life >=750
trigger2 = var(10)!=2
trigger2 = life >=500
trigger2 = life <750
trigger3 = var(10)!=3
trigger3 = life >=250
trigger3 = life <500
trigger4 = var(10)!=4
trigger4 = life <250
value = 3510

;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

;[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)
