[Data]
;Amount of life to start with
life = 1000
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 = 60
FloatPersistIndex = 40

[Size]
xscale = 0.45 ;Horizontal scaling factor.
yscale = 0.33 ;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 = 1 ;Set to 1 to scale projectiles too
head.pos = -5, -52 ;Approximate position of head
mid.pos = -5, -36 ;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.8 ;Walk forward
walk.back = -2.8 ;Walk backward
run.fwd = 7.4, 0 ;Run forward (x, y)
run.back = -4.7,-3.8 ;Hop backward (x, y)
jump.neu = 0,-8.6 ;Neutral jumping velocity (x, y)
jump.back = -2.55 ;Jump back Speed (x, y)
jump.fwd = 2.8 ;Jump forward Speed (x, y)
runjump.back = -2.55,-6.2 ;Running jump speeds (opt)
runjump.fwd = 4,-6.2 ;.
airjump.neu = 0,-7.2 ;.
airjump.back = -2.55 ;Air jump speeds (opt)
airjump.fwd = 2.5 ;.

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

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



;------------------------------------------------------------------------
[StateDef 200, a]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 200
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 2224
ID = 2224
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
pos= 35,-47
scale= .2,.3


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S1,1
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 221, 1]
type = HitDef
trigger1 = !time
attr = C, NA
damage = 20, 5
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 5
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -21, -36
hitsound = S1, 4
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -3.3,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.3, 1.3
air.hittime = 10
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36
ground.cornerpush.veloff = -7
[State 0, CtrlSet]
type = CtrlSet
trigger1 = time = 8
value = 1
[State 200, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------
[StateDef 210, b]
type = S
movetype= A
physics = S
juggle  = 3
velset = 0,0
ctrl = 0
anim = 210
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = time = 3
anim = 211
ID = 211
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=-2,-5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S1,1
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 230,***]
type = AssertSpecial
trigger1 =1
flag = noautoturn

[State 221, 1]
type = HitDef
trigger1 = !time
attr = S, NA
damage = 20,5
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 5
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -8, -52
hitsound = S1, 4
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -3.3,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.3, 1.3
air.hittime = 10
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36
ground.cornerpush.veloff = -7

[State 0, CtrlSet]
type = CtrlSet
trigger1 = time = 16
value = 1
[State 200, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------
[StateDef 220, c]
type = S
movetype= A
physics = S
juggle  = 5
velset = 0,0
ctrl = 0
anim = 220
poweradd = 0
sprpriority = 2



[State 0, Explod]
type = Explod
trigger1 = time = 3
anim = 221
ID = 221
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=-2,-5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S2,ifelse(random >= 500, 3,4)

[State 221, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 30,10
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 6
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -8, -34
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -4.56, 0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -4.56, 0
air.hittime = 20
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36

[State 0, CtrlSet]
type = CtrlSet
trigger1 = time = 21
value = 1
[State 230, end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

; abajo  a ------------------------------------------------------------------------
[StateDef 400]
type = C
movetype= A
physics = S
juggle  = 3
velset = 0,0
ctrl = 0
anim = 410
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 2224
ID = 2224
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .2,.3
pos= 35,-38


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S1,1
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 221, 1]
type = HitDef
trigger1 = !time
attr = C, NA
damage = 20, 5
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 5
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -21, -36
hitsound = S1, 4
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -3.3,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.3, 1.3
air.hittime = 10
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36
ground.cornerpush.veloff = -7

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


;abajo b  -------------------------------------------------------------------
[StateDef 410]
type = C
movetype= A
physics = S
juggle  = 3
velset = 0,0
ctrl = 0
anim = 400
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 2224
ID = 2224
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .2,.3
pos= 35,-40


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S1,1
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 221, 1]
type = HitDef
trigger1 = !time
attr = C, NA
damage = 20, 5
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 5
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -21, -36
hitsound = S1, 4
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -3.3,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.3, 1.3
air.hittime = 10
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36
ground.cornerpush.veloff = -7

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

;abajo c ---------------------------------------------------------------------
[StateDef 420]
type = S
movetype= A
physics = S
juggle  = 5
velset = 0,0
ctrl = 0
anim = 420
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 421
ID = 421
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .5,.6
pos=-2,-10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S2,ifelse(random >= 500, 3,4)

[State 221, 1]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage = 30,10
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 6
sparkno = s10010 + random%7
guard.sparkno = s10060
sparkxy = -8, -56
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime = 30
ground.velocity = -1, -9
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1, -9
air.hittime = 30
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36

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

; abanico espada


[Statedef 430]
type    = c
movetype= A
physics = s
juggle  = 3
velset = 0,0
ctrl = 0
anim = 430
poweradd = 0



[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S430,0
volume = 200

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 2227
ID = 2227
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .5,.5
pos= 10,-10

[State 221, 1]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage = 40, 15
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 6
sparkno = s10010 + random%7
guard.sparkno = s10060
sparkxy = -8, -56
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime = 30
ground.velocity = -1, -9
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1, -9
air.hittime = 30
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36


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



;aire a---------------------------------------------------------
[Statedef 600]
type = A
movetype = A
physics = A
juggle = 2
poweradd = 0
ctrl = 0
anim = 600
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S1,0
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 0,1)

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 2224
ID = 2224
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
pos= 30,-60
scale= .2,.3

[State 600, 1]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage = 25,6
animtype = light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno = s10000 + random%8
guard.sparkno = s10060
sparkxy = -8, -53
hitsound = S1, 3
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -3, -3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3,-3
air.hittime = 12
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36

[State 1000, end]
type = ctrlset
trigger1 = animtime = 0
value = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime = 0
value = 45

;aire b ---------------------------------------------------------
[Statedef 610]
type = A
movetype = A
physics = A
juggle = 2
poweradd = 0
ctrl = 0
anim = 610
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = time = 3
anim = 611
ID = 611
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=-2,-15


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1,1
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S2,ifelse(random >= 500, 2,3)

[State 600, 1]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage = 20, 5
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 5
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -8, -54
hitsound = S1, 4
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -3, -2
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3,-2
air.hittime = 20
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36

[State 1000, end]
type = ctrlset
trigger1 = animtime = 0
value = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime = 0
value = 45

;aire c ---------------------------------------------------------------------
[StateDef 620,]
type = A
movetype = A
physics = A
juggle = 5
ctrl = 0
anim = 620
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = time = 3
anim = 621
ID = 621
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=0,-25

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S2,ifelse(random >= 500, 3,4)

[State 221, 1]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage = 30,10
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10,10
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -8, -40
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -1, 5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1, 5
air.hittime = 20
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36

[State 1000, end]
type = ctrlset
trigger1 = animtime = 0
value = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime = 0
value = 45

;teleport-------------------------------------------------------------------
[StateDef 700]
type = S
movetype= A
physics = S
juggle  = 3
velset = 0,0
ctrl = 0
anim = 700
poweradd = 0
sprpriority = 2

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

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 11000
ID = 11000
pos = 0,3
bindtime = 1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, VarSet]
type = VarSet
trigger1 = command = "dda"
var(3) = 1
[State 0, VarSet]
type = VarSet
trigger1 = command = "ddb"
var(3) = 2
[State 0, VarSet]
type = VarSet
trigger1 = command = "ddc"
var(3) = 3
[State 0, VarSet]
type = VarSet
trigger1 = var(50) = 1
var(3) = 1+random%3

[State 0, PosSet]
type = Posadd
trigger1 = animelem = 4 && var(3) = 1
x = 150
[State 0, PosSet]
type = Posadd
trigger1 = animelem = 4 && var(3) = 2
x = 0
y = -105
[State 0, PosSet]
type = Posadd
trigger1 = animelem = 4 && var(3) = 3
x = 150
y = -105

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 && random <= 333
value = S3,5
volume = 100
channel = 2
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S4,2
volume = 100

[State 0, Turn]
type = Turn
trigger1 = p2bodydist x <= -5

[State 200, end]
type = ChangeState
trigger1 = animtime = 0
value = 51
ctrl = 1
anim = 45

;guard normal
[Statedef 800]
type = S
physics = S
movetype = I
anim = 120
velset = 0,0
ctrl = 0
sprpriority = 2
poweradd = 78

[State 700, hb]
type = hitby
trigger1 = 1
value = SCA,AT
time = 1
[State 700, stop]
type=posfreeze
trigger1 = 1
value = 1

[State 700, pause]
type = pause
trigger1 = !time
time = 15
movetime = 15
endcmdbuftime = 15
pausebg = 0
[State 700, pause]
type=pause
trigger1 = !time && numenemy
trigger1 = (enemynear, movehit = 1)
time = ifelse((enemynear, hitpausetime = [0,15]), 15 - (enemynear, hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 700, blueflash]
type=palfx
trigger1= !time
add=0,50,255
sinadd=0,-50,-255,60
time=15
[State 700, snd]
type=playsnd
trigger1= !time&& random <= 333
value=3,6
channel=2
[State 700, snd]
type=playsnd
trigger1= !time
value=0,700
[State 700, spark]
type=explod
trigger1= !time
anim=11200
ID=11200
sprpriority=5
postype=p1
pos=0,-63
pausemovetime=60
ownpal=1
scale=.5,.5

[State 700, nowalk]
type=assertspecial
trigger1=1
flag=nowalk
[State 700, end]
type=changestate
trigger1= time = 20
value=0
ctrl=1


;guard abajo
[Statedef 801]
type=C
physics=C
movetype=I
anim=121
velset=0,0
ctrl=0
sprpriority=2
poweradd=78

[State 701, hb]
type=hitby
trigger1=1
value=SCA,AT
time=1
[State 701, stop]
type=posfreeze
trigger1=1
value=1

[State 701, pause]
type=pause
trigger1=!time
time=15
movetime=15
endcmdbuftime=15
pausebg=0
[State 701, pause]
type=pause
trigger1= !time && numenemy
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 701, blueflash]
type=palfx
trigger1= !time
add=0,50,255
sinadd=0,-50,-255,60
time=15

[State 701, snd]
type=playsnd
trigger1= !time&& random <= 333
value=3,6
channel=2
[State 701, snd]
type=playsnd
trigger1= !time
value=0,700

[State 701, spark]
type=explod
trigger1= !time
anim=11200
ID=11200
sprpriority=5
postype=p1
pos=32,-25
pausemovetime=60
ownpal=1
scale=.5,.5

[State 701, nowalk]
type=assertspecial
trigger1=1
flag=nowalk
[State 701, end]
type=changestate
trigger1= time = 20
value=11
ctrl=1


;guard aerea
[Statedef 802]
type=A
physics=A
movetype=I
anim=120
ctrl=0
sprpriority=2
poweradd=78

[State 702, hb]
type=hitby
trigger1=time<15
value=SCA,AT
time=1

[State 702, pause]
type=pause
trigger1=!time
time=15
movetime=15
endcmdbuftime=15
pausebg=0
[State 702, pause]
type=pause
trigger1= !time && numenemy
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 702, sts]
type=statetypeset
trigger1= time<15
physics=N
[State 702, stop]
type=posfreeze
trigger1= time<15
value=1

[State 702, vel]
type=velset
trigger1= time=15
x=ifelse(vel x>2,2,ifelse(vel x<-2,-2,vel x))
y=ifelse(vel y<-2,vel y,-2)
[State 702, sts]
type=statetypeset
trigger1= time>=15
physics=A
[State 702, ctrl]
type=ctrlset
trigger1= time>=15
value=1

[State 702, blueflash]
type=palfx
trigger1= !time
add=0,64,255
sinadd=0,-64,-255,60
time=15

[State 702, snd]
type=playsnd
trigger1= !time&& random <= 333
value=3,6
channel=2
[State 702, snd]
type=playsnd
trigger1= !time
value=0,700

[State 701, spark]
type=explod
trigger1= !time
anim=11200
ID=11200
sprpriority=5
postype=p1
pos=-6,-64
pausemovetime=60
ownpal=1
scale=.5,.5


; ---------------------------------------------------------------------------
[Statedef 900]
type = S
movetype = I
physics = S
juggle = 3
velset = 0,0
ctrl = 0
anim = 193
poweradd = 0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1,8
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 30
value = S4,1 ; aura
channel = 1
loop = 1






[State 0, EnvShake]
type = EnvShake
trigger1 = time >= 30 && time%2
time = 2
freq = 60
ampl = -2
phase = 90
[State 0, Explod]
type = Explod
trigger1 = time = 30
anim = 11100 ; circulo suelo
ID = 11100
bindtime = -1
removetime = -1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = time = 35
anim = 2223
ID = 11100
bindtime = -1
removetime = -1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = time = 30
anim = 11110 ; circulo suelo
ID = 11100
bindtime = -1
removetime = -1
removeongethit = 1
scale = 0.4,0.4
sprpriority = 4







[State 0, PowerAdd]
type = PowerAdd
trigger1 = time%2
value = 16

[State 191, 1]
type = ChangeState
trigger1 = (command != "holda" || command!= "holdb") && var(50)=0
trigger2 = power = 3000
trigger3 = var(50) && p2bodydist x <= 80
Value = 902

;---------------------------------------------------------------------------
; INTRO (override this state to give character an intro)
[Statedef 901]
type = S
ctrl = 0
anim = 11110
sprpriority = 4

[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 0,0

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(2) = 0.1
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(2) = 0.03
[State 0, VarSet]
type = VarSet
trigger1 = fvar(2) >= 1
fvar(2) = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,fvar(2)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 191, 1]
type = destroyself
trigger1 = root, stateno != 900

;---------------------------------------------------------------------------
[Statedef 902]
type = S
movetype= I
physics = S
juggle  = 3
velset = 0,0
ctrl = 1
anim = 194

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1,8
[State 0, PlaySnd]
type = stopSnd
trigger1 = !time
channel = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 11100
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 11101
ID = 11101
removetime = -2

[State 191, 1]
type = ChangeState
trigger1 = !animtime
Value = 0
ctrl = 1

;poder suelo avanza ------------------------------------------------------------------------
[StateDef 1000]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1000
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem =3
anim = 1001
ID = 1001
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=-15,-5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 0, VarSet]
type = VarSet
trigger1 = command = "qcfa"
fvar(2) = 3.45
[State 0, VarSet]
type = VarSet
trigger1 = command = "qcfb"
fvar(2) = 5.67
[State 0, VarSet]
type = VarSet
trigger1 = command = "qcfc"
fvar(2) = 7.18

[State 0, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "wave"
ID = 1001
stateno = 1001
pos = 34,0
ownpal = 1

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

;------------------------------------------------------------------------
[StateDef 1001]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1002
poweradd = 0
sprpriority = 3

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

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 0.5
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(1) = 0.2
[State 0, VarSet]
type = VarSet
trigger1 = Fvar(1) >= 1
fvar(1) = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1), fvar(1)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 0, VelSet]
type = VelSet
trigger1 = root, var(50) != 1
x = parent, fvar(2)
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = root, var(50) = 1
x = 7
y = 0

[State 1005, strengthvar]
type=varset
trigger1 = !time
var(10) = root, var(10)

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, SP
damage = ceil(90*root, fvar(12)), 22
animtype = Hard
guardflag = MA
hitflag = MAF
numhits = 1
priority = 3, Hit
pausetime = 4, 4
sparkno = s10030 + random%8
guard.sparkno = s10070
sparkxy = -8, -44
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -3.66,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.66,0
air.hittime = 18
fall = ifelse(p2movetype = A,1,0)
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36

[State 200, end]
type = destroyself
trigger1 = time = 100

;espada levantada ------------------------------------------------------------------------
[StateDef 1010]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1010
poweradd = -1000
sprpriority = 2

[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 210
id = 211
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 220
id = 221
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 410
id = 411
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 420
id = 421
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 610
id = 611
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 620
id = 621

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "super"
ID = 14000
stateno = 14000
pos = 0,0
postype = back    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

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

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 11100
ID = 11100
bindtime = -1
removetime = 65
removeongethit = 1
supermovetime = 999
pausemovetime = 999
[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "reiatsu"
ID = 1012
stateno = 1012
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999

[State 0, PlaySnd]
type = stopSnd
trigger1 = time = 65
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,2
volume = 100
[State 0, SuperPause]
type = SuperPause
trigger1 = !time
time = 50
anim = s15000
sound = s0,10000
pos = -3,-134

[State 0, Explod]
type = Explod
trigger1 = animelem =5
anim = 1001
ID = 1001
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1
scale= .5,.5


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S1,2
volume = 200

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 11500
ID = 11500
bindtime = -1
removetime = -2
removeongethit = 1
ontop = 1
pos = 56,2
supermovetime = 999
pausemovetime = 999
[State 0, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "wave"
ID = 1011
stateno = 1011
pos = 34,0
ownpal = 1
scale=1.5,1.5

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

;------------------------------------------------------------------------
[StateDef 1011]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1002
poweradd = 0
sprpriority = 3
scale=1.5,1.5


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

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(1) = 0.2
[State 0, VarSet]
type = VarSet
trigger1 = Fvar(1) >= 1.5
fvar(1) = 1.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1), fvar(1)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

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

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

[State 1005, strengthvar]
type=varset
trigger1= !time
var(10) = root,var(10)
[State 3005, movehitvar]
type=varset
trigger1=movecontact&&numtarget
trigger1=!(target,ishelper)
var(3)=1
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = var(1) < 8
attr = S, HP
damage = ceil(27*root, fvar(12)),5
animtype = Hard
guardflag = MA
hitflag = MAF
numhits = 1
priority = 3, Hit
pausetime = 4, 4
sparkno = s10050 + random%8
guard.sparkno = s10070
sparkxy = -8, -44
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -5.47,-10
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -5.47,-10
air.hittime = 18
getpower = 0,0
givepower = 36, 36
fall = 1
p2stateno = 5600
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4

[State 200, end]
type = destroyself
trigger1 = time = 100

;---------------------------------------------------------------------------
[Statedef 1012]
type = S
ctrl = 0
anim = 11110
sprpriority = 4

[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 0,0

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(2) = 0.1
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(2) = 0.03
[State 0, VarSet]
type = VarSet
trigger1 = fvar(2) >= 1
fvar(2) = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 0.5,fvar(2)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

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

[State 191, 1]
type = destroyself
trigger1 = time = 65

;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 5600]
type    = A
movetype= H
physics = N
velset = 0,0

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 1
freq = 30
ampl = -3
phase = 50

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 5030

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 5601

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 5601]
type    = A
movetype= H
physics = N

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

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
;movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 5602

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

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 5602]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
;movecamera = 0,1

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 5030

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

[State 1027, State]
type = ChangeState
trigger1 = time = 1
value = 5603
;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 5603]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

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

;--------------------------------------------------------
;arriba y abajo ---------------------------------------------------------------------
[StateDef 1100]
type = S
movetype= A
physics = S
juggle  = 5
velset = 0,0
ctrl = 0
anim = 1100
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1101
ID = 1101
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=-2,-5

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 3
y = -5

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 4
statetype = A
movetype = A
physics = A

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 || animelem = 9
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S2,ifelse(random >= 500, 3,4)

[State 221, 1]
type = HitDef
trigger1 = animelem = 4
attr = A, SA
damage = 45,11
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 6
sparkno = s10030 + random%8
guard.sparkno = s10070
sparkxy = -8, -59
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -3, -7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3, -7
air.hittime = 20
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4
[State 221, 1]
type = HitDef
trigger1 = animelem = 9
attr = A, SA
damage = 45,11
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 6
sparkno = s10030 + random%8
guard.sparkno = s10070
sparkxy = -8, -38
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -3, 7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3, 7
air.hittime = 20
fall = 1
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4

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

;arriba y abjo teleprt ---------------------------------------------------------------------
[StateDef 1110]
type = S
movetype= A
physics = S
juggle  = 5
velset = 0,0
ctrl = 0
anim = 1110
poweradd = -1000
sprpriority = 2

[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 210
id = 211
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 220
id = 221
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 410
id = 411
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 420
id = 421
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 610
id = 611
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 620
id = 621

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "super"
ID = 14000
stateno = 14000
pos = 0,0
postype = back    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

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

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 11100
ID = 11100
bindtime = -1
removetime = 65
removeongethit = 1
supermovetime = 999
pausemovetime = 999
[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal
name = "reiatsu"
ID = 1012
stateno = 1012
ownpal = 1
supermovetime = 999
pausemovetime = 999

[State 0, PlaySnd]
type = stopSnd
trigger1 = time = 15
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,2
volume = 100
[State 0, SuperPause]
type = SuperPause
trigger1 = !time
time = 50
anim = s15000
sound = s0,10000
pos = -38,-21

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1111
ID = 1111
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1
scale= .5,.5


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 || animelem = 17
value = S1,2
volume = 200

[State 0, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "wave"
ID = 1112
stateno = 1112
pos = 63,-39
ownpal = 1


[State 0, Explod]
type = Explod
trigger1 = time = 29
anim = 11000
ID = 11000
pos = 0,3
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 0

[State 0, PosSet]
type = Posadd
trigger1 = animelem = 12
x = 50
y = -170
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 12
value = S4,2
volume = 100

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 16
statetype = A
movetype = A
physics = A

[State 0, Helper]
type = Helper
trigger1 = animelem = 17
helpertype = normal
name = "wave"
ID = 1113
stateno = 1113
pos = 48,-53
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S2,ifelse(random >= 500, 3,4)

[State 230, end]
type = ChangeState
trigger1 = animtime = 0
value = 51
ctrl = 0

;helper ondas expansiva 1 sube ------------------------------------------------------------------------
[StateDef 1112]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1112
poweradd = 0
sprpriority = 3
scale= .3,.3

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

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 0.5
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(1) = 0.2
[State 0, VarSet]
type = VarSet
trigger1 = fvar(1) >= 1
fvar(1) = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1), fvar(1)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 4
y = -4

[State 1005, strengthvar]
type=varset
trigger1= !time
var(10) = root,var(10)
[State 3005, movehitvar]
type=varset
trigger1=movecontact&&numtarget
trigger1=!(target,ishelper)
var(3)=1
ignorehitpause=1

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

[State 200, 1]
type = HitDef
trigger1 = var(1) < 8
attr = A, HP
damage = ceil(12*root, fvar(12)),6
animtype = Hard
guardflag = MA
hitflag = MAF
numhits = 1
priority = 3, Hit
pausetime = 4, 3
sparkno = s10050 + random%8
guard.sparkno = s10070
sparkxy = -8, -45
hitsound = S1, 3
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -3.66,-7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.66,-7
air.hittime = 18
fall = 1
getpower = 0,0
givepower = 36, 36
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4

[State 200, end]
type = destroyself
trigger1 = time = 100

;helper ondas expansiva 2 baja------------------------------------------------------------------------
[StateDef 1113]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1113
poweradd = 0
sprpriority = 3
scale= .3,.3

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

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 0.5
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(1) = 0.2
[State 0, VarSet]
type = VarSet
trigger1 = fvar(1) >= 1
fvar(1) = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1), fvar(1)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

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

[State 1005, strengthvar]
type=varset
trigger1= !time
var(10) = root,var(10)
[State 3005, movehitvar]
type=varset
trigger1=movecontact&&numtarget
trigger1=!(target,ishelper)
var(3)=1
ignorehitpause=1

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

[State 200, 1]
type = HitDef
trigger1 = var(1) < 8
attr = A, HP
damage = ceil(13*root, fvar(12)),6
animtype = Hard
guardflag = MA
hitflag = MAFD
numhits = 1
priority = 3, Hit
pausetime = 4, 3
sparkno = s10050 + random%8
guard.sparkno = s10070
sparkxy = -8, 41
hitsound = S1, 3
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -7,7
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -7,7
air.hittime = 18
fall = 1
getpower = 0,0
givepower = 36, 36
envshake.time=12
envshake.freq=100
envshake.ampl=4
sprpriority=4

[State 200, end]
type = destroyself
trigger1 = time = 100


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

;lanzar espada



[Statedef 510]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 510
ctrl = 0

[State 510, 1]
type = PlaySnd
trigger1 = Time = 9
value = 0, 3

[State 510, 2]
type = helper
trigger1 = AnimElem = 4
id = 1
postype = P1
pos = 100,-30
stateno = 1015
helpertype = normal
size.xscale = 1
size.yscale = 1
size.shadowoffset = 0


[State 510, 3]
type = PlaySnd
trigger1 = AnimElem = 16
value = 999, 21

[State 510, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


; =======================
; Helper

[Statedef 1015]
type = A
movetype = A
physics = S
anim = 99999

[State 1015, 1]
type = SprPriority
trigger1 = hitcount >= 2
value = -2

[State 1015, 1]
type = PlaySnd
trigger1 = TimeMod = 6, 1
value = 999, 15


[State 1015, 2]
type = posadd
trigger1 = Time > 1
trigger1 = frontedgedist > -300
x = 16

[State 1015, 3]
type = posadd
trigger1 = Time > 5
trigger1 = Pos Y < 20
y = 6

[State 1015, 6]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SP
animtype  = Hard
damage    = 40,10
priority  = 2, Hit
hitflag = MAFD
guardflag = LA
pausetime = 0,6
hitsound   = s1,4
guardsound = s0, 120
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -2,-8
air.velocity = -2,-6
fall = 1
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -21, -36
getpower		= 0
givepower		= 25





[State 1015, 6]
type = HitDef
trigger1 = Time = 60
attr = S, SP
animtype  = Hard
damage    = 40,10
priority  = 2, Hit
hitflag = MAFD
guardflag = HA
pausetime = 0,6
hitsound   = s1,4
guardsound = s0, 120
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 2,0
air.velocity = 2,-3
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -21, -36
getpower		= 0
givepower		= 25


[State 1015,3]
type = veladd
trigger1 = Time > 60
trigger1 = ParentDist x <= -150
x = -8

[State 1015,3]
type = PosAdd
trigger1 = Time > 60
trigger1 = ParentDist y < 20
y = -8

[State 1015,3]
type = PosAdd
trigger1 = Time > 60
trigger1 = ParentDist y > 20
y = 8

[State 1015,4]
type = DestroySelf
trigger1 = ParentDist x > -148
trigger1 = time > 60
trigger2 = movetype = H
;------------------------------------------------------------------------------------------

; Helper

[Statedef 1016]
type = A
movetype = A
physics = S
anim = 1016







[State 1015, 1]
type = SprPriority
trigger1 = hitcount >= 2
value = -2




[State 1015, 2]
type = posadd
trigger1 = Time > 1
trigger1 = frontedgedist > -300
x = 16

[State 1015, 3]
type = posadd
trigger1 = Time > 5
trigger1 = Pos Y < 20
y = 6








[State 1015,3]
type = veladd
trigger1 = Time > 60
trigger1 = ParentDist x <= -150
x = -8

[State 1015,3]
type = PosAdd
trigger1 = Time > 60
trigger1 = ParentDist y < 20
y = -8

[State 1015,3]
type = PosAdd
trigger1 = Time > 60
trigger1 = ParentDist y > 20
y = 8

[State 1015,4]
type = DestroySelf
trigger1 = ParentDist x > -148
trigger1 = time > 60
trigger2 = movetype = H
;levantar rocas con la espada ------------------------------------------------------------------------
[StateDef 1200]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 420
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem =4
anim = 421
ID = 1200
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1
scale= .5,.6
pos=-2,-10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 0, VarSet]
type = VarSet
trigger1 = command = "hcba"
fvar(2) = 1.56
[State 0, VarSet]
type = VarSet
trigger1 = command = "hcbb"
fvar(2) = 2.74
[State 0, VarSet]
type = VarSet
trigger1 = command = "hcbc"
fvar(2) = 4.26

[State 0, Helper]
type = Helper
trigger1 = animelemtime(4) = [2,3]
helpertype = normal
name = "rock"
ID = 1201
stateno = 1201
pos = 34,-2
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = animelemtime(4) = [1,3]
helpertype = normal
name = "srock"
ID = 1202
stateno = 1202
pos = 34,-2
ownpal = 1

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

; rocas ------------------------------------------------------------------------
[StateDef 1201]
type = A
movetype= A
physics = A
juggle  = 1
velset = 0,0
ctrl = 0
anim = ifelse(random>=500,1201,1202)
poweradd = 0
sprpriority = 3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = time*(-10)

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = parent, fvar(2)+random%3
y = -7

[State 1005, strengthvar]
type=varset
trigger1= !time
var(10) = root,var(10)

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = A, SP
damage = ceil(90*root, fvar(12)),22
animtype = Hard
guardflag = MA
hitflag = MAFD
numhits = 1
priority = 3, Hit
pausetime = 4, 4
sparkno = s10020 + random%8
guard.sparkno = s10070
sparkxy = -8, -0
hitsound = S1, 7
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -3.66,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.66,0
air.hittime = 18
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36

[State 200, end]
type = changestate
trigger1 = pos y >= -6 && time > 5
value = 1203

;rocas ------------------------------------------------------------------------
[StateDef 1202]
type = A
movetype= A
physics = A
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1203+random%4
poweradd = 0
sprpriority = 3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = time*(-10)

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = parent, var(2)+random%5
y = -7

[State 200, end]
type = changestate
trigger1 = pos y >= -6 && time > 5
value = 1203

;------------------------------------------------------------------------
[StateDef 1203]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
poweradd = 0
sprpriority = 3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = prevstateno = 1211
scale = 1.5,1.5

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S4,3
volume = 100

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time =15
freq = 60
ampl = -4
phase = 90

[State 0, Trans]
type = Trans
trigger1 = 1
trans = add1
alpha = 256-time*6

[State 200, end]
type = destroyself
trigger1 = time = 30

;levantar rocas 2 ------------------------------------------------------------------------
[StateDef 1210]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 420
poweradd = -1000
sprpriority = 2

[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 210
id = 211
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 220
id = 221
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 410
id = 411
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 420
id = 421
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 610
id = 611
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 620
id = 621

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "super"
ID = 14000
stateno = 14000
pos = 0,0
postype = back    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

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

[State 0, SuperPause]
type = SuperPause
trigger1 = !time
time = 50
anim = s15000
sound = s0,10000
pos = -38,-21
movetime = 0
darken = 1
p2defmul = 0
poweradd = 0
unhittable = 1

[State 0, Explod]
type = Explod
trigger1 = animelem =4
anim = 421
ID = 1200
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale= .5,.6
pos=-2,-10
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,2
volume = 200

[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 0, VarSet]
type = VarSet
trigger1 = command = "hcba"
v = 2    ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = command = "hcbb"
v = 2    ;fv = 10
value = 2

[State 0, VarSet]
type = VarSet
trigger1 = command = "hcbc"
v = 2    ;fv = 10
value = 3

[State 0, Helper]
type = Helper
trigger1 = animelemtime(4) = [1,3]
trigger2 = animelem = 4
helpertype = normal ;player
name = "rock"
ID = 1211
stateno = 1211
pos = 34,-2
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = animelemtime(4) = [1,3]
helpertype = normal ;player
name = "srock"
ID = 1202
stateno = 1202
pos = 34,-2
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

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

;------------------------------------------------------------------------
[StateDef 1211]
type = A
movetype= A
physics = A
juggle  = 1
velset = 0,0
ctrl = 0
anim = ifelse(random>=500,1201,1202)
poweradd = 0
sprpriority = 3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = time*(-10)
scale = 1.5,1.5

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = random%10
y = -7

[State 1005, strengthvar]
type=varset
trigger1= !time
var(10) = root,var(10)
[State 3005, movehitvar]
type=varset
trigger1=movecontact&&numtarget
trigger1=!(target,ishelper)
var(3)=1
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = A, HP
damage = ceil(64*root, fvar(12)),11
animtype = Hard
guardflag = MA
hitflag = MAF
numhits = 1
priority = 3, Hit
pausetime = 4, 4
sparkno = s10040 + random%8
guard.sparkno = s10070
sparkxy = -8, -0
hitsound = S1, 7
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -3.66,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.66,0
air.hittime = 18
getpower = 0,0
givepower = 36, 36
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4

[State 200, end]
type = changestate
trigger1 = pos y >= -6 && time > 5
value = 1203

;avanza onda expansiva---------------------------------------------------------------------
[StateDef 1300]
type = S
movetype= A
physics = S
juggle  = 5
velset = 0,0
ctrl = 0
anim = 1300
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1301
ID = 1301
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1
scale= .3,.3
pos=30,0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S2,ifelse(random >= 500, 3,4)

[State 221, 1]
type = HitDef
trigger1 = time = 0
attr = S, SA
damage = 90,23
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 6
sparkno = s10030 + random%8
guard.sparkno = s10070
sparkxy = -8, -41
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -4.56, 0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -4.56, 0
air.hittime = 20
fall = 1
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4

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

;helper ondas ---------------------------------------------------------------------
[StateDef 1310]
type = S
movetype= A
physics = S
juggle  = 5
velset = 0,0
ctrl = 0
anim = 1310
poweradd = -1000
sprpriority = 2

[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 210
id = 211
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 220
id = 221
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 410
id = 411
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 420
id = 421
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 610
id = 611
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 620
id = 621

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "super"
ID = 14000
stateno = 14000
pos = 0,0
postype = back    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

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

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 11100
ID = 11100
bindtime = -1
removetime = 65
removeongethit = 1
supermovetime = 999
pausemovetime = 999
[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "reiatsu"
ID = 1012
stateno = 1012
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999

[State 0, PlaySnd]
type = stopSnd
trigger1 = time = 65
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,2
volume = 100
[State 0, SuperPause]
type = SuperPause
trigger1 = !time
time = 50
anim = s15000
sound = s0,10000
pos = -24,-55

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1301
ID = 1301
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=30,0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,2
volume = 200

[State 221, 1]
type = HitDef
trigger1 = time = 0
attr = S, HA
damage = 90,23
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 6
sparkno = s10050 + random%8
guard.sparkno = s10070
sparkxy = -8, -41
hitsound = S1, 5
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -4.56, 0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -4.56, 0
air.hittime = 20
getpower = 0,0
givepower = 36, 36
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4

[State 0, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal ;player
name = "wave"
ID = 1311
stateno = 1311
pos = 117,-47
ownpal = 1
scale=.5,.5


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

;------------------------------------------------------------------------
[StateDef 1311]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1311
poweradd = 0
sprpriority = 3
scale=.5

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

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(1) = 0.2
[State 0, VarSet]
type = VarSet
trigger1 = fvar(1) >= 1.5
fvar(1) = 1.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1), fvar(1)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

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

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

[State 1005, strengthvar]
type=varset
trigger1= !time
var(10) = root,var(10)
[State 3005, movehitvar]
type=varset
trigger1=movecontact&&numtarget
trigger1=!(target,ishelper)
var(3)=1
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = var(1) < 8
attr = S, HP
damage = ceil(28*root, fvar(12)),6
animtype = Hard
guardflag = MA
hitflag = MAF
numhits = 1
priority = 3, Hit
pausetime = 4, 4
sparkno = s10050 + random%8
guard.sparkno = s10070
sparkxy = -8, 0
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -3.66,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.66,0
air.hittime = 18
fall = 1
getpower = 0,0
givepower = 36, 36
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4

[State 200, end]
type = destroyself
trigger1 = time = 100

;arriba onda ------------------------------------------------------------------------
[StateDef 2000]
type = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 620
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = animelem =2
anim = 621
ID = 2001
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=0,-25


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1,2
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 0, VarSet]
type = VarSet
trigger1 = command = "qcfa"
var(2) = 4
[State 0, VarSet]
type = VarSet
trigger1 = command = "qcfb"
var(2) = 5
[State 0, VarSet]
type = VarSet
trigger1 = command = "qcfc"
var(2) = 6

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "wave"
ID = 2001
stateno = 2001
pos = 57,-66
ownpal = 1
scale=.5,.5

[State 200, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1
anim = 45

;------------------------------------------------------------------------
[StateDef 2001]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 2001
poweradd = 0
sprpriority = 3



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

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 0.5
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(1) = 0.2
[State 0, VarSet]
type = VarSet
trigger1 = Fvar(1) >= 0.7
fvar(1) = 0.7

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1), fvar(1)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

[State 0, VelSet]
type = VelSet
trigger1 = root, var(50) != 1
x = parent, var(2)
y = parent, var(2)
[State 0, VelSet]
type = VelSet
trigger1 = root, var(50) = 1
x = 7
y = 7

[State 1005, strengthvar]
type=varset
trigger1 = !time
var(10) = root, var(10)

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, SP
damage = ceil(90*root, fvar(12)), 22
animtype = Hard
guardflag = MA
hitflag = MAF
numhits = 1
priority = 3, Hit
pausetime = 4, 4
sparkno = s10030 + random%8
guard.sparkno = s10070
sparkxy = -8, 40
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -3.66,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.66,0
air.hittime = 18
fall = ifelse(p2movetype = A,1,0)
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36

[State 200, end]
type = destroyself
trigger1 = time = 100

;arriba onda 2------------------------------------------------------------------------
[StateDef 2010]
type = A
movetype= A
physics = A
juggle  = 1
velset = 0,0
ctrl = 0
anim = 620
poweradd = -1000
sprpriority = 2

[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 210
id = 211
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 220
id = 221
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 410
id = 411
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 420
id = 421
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 610
id = 611
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 620
id = 621
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 1101
id = 1101

[State 0, Helper]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "super"
ID = 14000
stateno = 14000
pos = 0,0
postype = back    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,2
volume = 100
[State 0, SuperPause]
type = SuperPause
trigger1 = !time
time = 50
anim = s15000
sound = s0,10000
pos = -19,-86

[State 0, Explod]
type = Explod
trigger1 = animelem =2
anim = 621
ID = 2010
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S1,2
volume = 200

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = -3
y = -3
[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal
name = "wave"
ID = 2011
stateno = 2011
pos = 57,-66
ownpal = 1
scale=.5,.5

[State 200, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 0
anim = 45

;------------------------------------------------------------------------
[StateDef 2011]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1113
poweradd = 0
sprpriority = 3

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

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 1
[State 0, VarAdd]
type = VarAdd
trigger1 = time%2
fvar(1) = 0.2
[State 0, VarSet]
type = VarSet
trigger1 = Fvar(1) >= 1.5
fvar(1) = 1.5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = fvar(1), fvar(1)
[State 0, Trans]
type = Trans
trigger1 = 1
trans = add

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

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

[State 1005, strengthvar]
type=varset
trigger1= !time
var(10) = root,var(10)
[State 3005, movehitvar]
type=varset
trigger1=movecontact&&numtarget
trigger1=!(target,ishelper)
var(3)=1
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = var(1) < 8
attr = S, HP
damage = ceil(27*root, fvar(12)),5
animtype = Hard
guardflag = MA
hitflag = MAFD
numhits = 1
priority = 3, Hit
pausetime = 4, 4
sparkno = s10050 + random%8
guard.sparkno = s10070
sparkxy = -8, 41
hitsound = S1, 5
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -3.66,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.66,0
air.hittime = 18
fall = 1
getpower = 0,0
givepower = 36, 36
envshake.time = 12
envshake.freq = 100
envshake.ampl = 4
envshake.phase = 90
sprpriority=4

[State 200, end]
type = destroyself
trigger1 = time = 100



;---------------------------------------------------
;---------------------------------------------------------------------------
; FireBall
[Statedef 2222]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0,0
poweradd= -100
anim = 706

[State 2222,1]
type = playsnd
trigger1 = AnimElem = 2
value = 700,0
volume = 255

[State 2222: magia(mao)]
type = Explod
trigger1 = AnimElem = 2
anim = 4550 ; onda mano
ID = 4550
pos = 6,-35
postype = p1
facing = 1
bindtime = -1
removetime = 12
supermove = -1
removeongethit = 1
scale = 0.50,0.50
sprpriority = 3
ontop = 1

[State 2222,2]
type = Helper
trigger1 = AnimElem = 2
helpertype = normal
name = "Fire_ball"
id = 701
pos = 10,-35
stateno = 701
keyctrl = 1
ownpal = 1

[State 2222, 3]
type=ChangeState
trigger1=AnimTime=0
trigger1=Pos Y < 0
value=900

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

[Statedef 701]
type 			= A
movetype		= A
physics		= N
anim			= 701
;velset		= 0,0
ctrl			= 0
poweradd		= 0
juggle		= 0
facep2		= 0
hitdefpersist	= 0
movehitpersist	= 0
hitcountpersist	= 0
sprpriority		= 3

[State 701:	NotHitBy]
type			= NotHitBy
trigger1		= 1
value			= SCA

[State 701:	VelSet]
type			= VelSet
trigger1		= (!Time)
x			= 10
y			= IfElse(Random <= 499,-0.8,0.8)

[State 701:	PalFX]
type			= PalFX
trigger1		= (!Time)
time			= 40
add			= 100,100,100
mul			= 256,256,256
sinadd		= -100,-100,-100,40
invertall		= 0
color			= 256

[State 701:	BGPalFX]
type			= BGPalFX
trigger1		= (MoveHit)
time			= 5
add			= 75,75,75
mul			= 256,256,256
sinadd		= 80,80,80,4
invertall		= 0
color			= 256
persistent		= 0
ignorehitpause	= 1

[State 701: 	AfterImage]
type 			= AfterImage
trigger1 		= (!Time)
time 			= 20
framegap 		= 2
length 		= 15
paladd 		= 0, 0, 0
palmul 		= .50, .50, .50
palcontrast 	= 100, 100, 100
trans 		= add

[State 701:	Explod]
type			= Explod
trigger1		= (Pos Y >= 1)
anim			= 701
id			= 701
pos			= 0,0
postype		= p1
facing		= 1
vfacing		= 1
bindtime		= 1
vel			= 0,0
accel			= 0,0
random		= 0,0
removetime		= -2
supermove		= 0
supermovetime	= 0
pausemovetime	= 0
scale			= 1,1
sprpriority		= 3
ontop			= 0
shadow		= 0,0,0
ownpal		= 1
removeongethit	= 0

[State 701:	Helper]
type			= Helper
trigger1		= (!Time)
helpertype		= Normal
name			= "Projectile Tail"
id			= 704
pos			= 11,0
postype		= p1
facing		= 1
stateno		= 704
keyctrl		= 0
ownpal		= 1
supermovetime	= 0
pausemovetime	= 0

[State 701:	HitDef]
type			= HitDef
trigger1		= 1
attr			= S, NA
hitflag		= MAFDP
guardflag		= MA
animtype		= Hard
priority		= 7, Hit
damage		= 10,5
pausetime		= 1,1
guard.pausetime	= 15,20
sparkno		= S1234
guard.sparkno	= S1234
sparkxy		= 0,-40
hitsound		= S100,3
guardsound		= S100,3
ground.type		= High
air.type		= Trip
ground.slidetime	= 25
ground.hittime	= 25
air.hittime		= 25
ground.velocity	= -8
guard.velocity	= -8
air.velocity	= -8,-3.5
airguard.velocity	= -8,-3.5
ground.cornerpush.veloff = 0
fall.xvelocity	= -1
fall.yvelocity	= -3
fall.recover	= 0
air.fall		= 1
down.velocity	= -1,-2
down.bounce		= 1
id			= 701
getpower		= 0
givepower		= 25
palfx.time		= 12
palfx.mul		= 256,256,256
palfx.add		= 200,50,10
palfx.sinadd	= 175,25,5,4
envshake.time 	= 12
envshake.freq 	= 120
envshake.ampl 	= -4
persistent		= 0
kill = !var(58) || 1*p2stateno = 003

[State 701:	DestroySelf]
type			= DestroySelf
trigger1		= (MoveContact) || (FrontEdgeBodyDist < -10)
ignorehitpause	= 1

;cola
[Statedef 704]
type 			= A
movetype		= I
physics		= N
anim			= 704
;velset		= 0,0
ctrl			= 0
poweradd		= 0
juggle		= 0
facep2		= 0
hitdefpersist	= 0
movehitpersist	= 0
hitcountpersist	= 0
sprpriority		= 2

[State 704:	AssertSpecial]
type			= AssertSpecial
trigger1		= 1
flag			= NoShadow
flag2			= Invisible

[State 704:	NotHitBy]
type			= NotHitBy
trigger1		= 1
value			= SCA

[State 704:	PlayerPush]
type			= PlayerPush
trigger1		= 1
value			= 0

[State 704:	VelSet]
type			= VelSet
trigger1		= 1
x			= Parent, Vel X
y			= Parent, Vel Y

[State 704: 	AfterImage]
type 			= AfterImage
trigger1 		= (!Time)
time 			= 30
timegap		= 1
framegap 		= 3
length 		= 60
paladd 		= 0, 0, 0
palmul 		= .50, .50, .50
palcontrast 	= 100, 100, 100
trans 		= add

[State 704:	DestroySelf]
type			= DestroySelf
trigger1		= (Parent, MoveContact) || (Parent, FrontEdgeBodyDist < -10) || (Parent, StateNo != 701)




;MASENKO------------------------------------
[Statedef 1900]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0
anim = 1900 ;SOLO CARGA

[State 0]
type = Explod
trigger1 = timemod = 52,0
anim = 7804 ;RAYOS
pos = 0,-50
postype = p1
id = 7030
supermove = -1
pausemove  = -1
facing = 1
vfacing = 1
bindtime = -1
scale = 0.8,0.9
sprpriority = 30
removeongethit = 1

;PONER AURA NORMAL AQUI

[State 0]
type = Explod
triggerall = pos y = 0
trigger1 = timemod = 15,0
anim = 3340 ;CIRCULO PISO
pos = 0,0
supermove = -1
pausemove  = -1
postype = p1
facing = 1
vfacing = 1
sprpriority = -1
removeongethit = 1

[State 0]
type = Explod
trigger1 = time = 60
anim = 7803 ;ANILLO EXPANSIBLE COPIAR AINIMACION
pos = 0,-50
postype = p1
facing = 1
supermove = -1
pausemove  = -1
vfacing = 1
bindtime = -1
sprpriority = 30
removeongethit = 1

[State 0]
type = EnvShake
trigger1 = time = 20
time = 90
ampl = 4
phase = 18
[State 0]

type = Explod
trigger1 = time = 20
anim = 2095 ;PODER COPIAR ANIMACION
pos = 5,-75
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = -1
pausemove  = -1
scale = 0.4,0.4
sprpriority = 20
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=0
value = S3,0 ;GRITO BUSCAR EN ESPAÑOL
volume = 255
channel = -1

[State 0]
type = SuperPause
trigger1 = time = 0
time = 115
anim = S12300
movetime = 115
sound = S1800,0
pos = 43,-44
darken = 0
unhittable = 1

[State 0]
type = Varset
trigger1 = time = 0
v = 12
value = -200

[State 0]
type = VarAdd
trigger1 = time >= 45 && Var(12) < 0
v = 12
value = 6

[State 0]
type = BGPalFX
trigger1 = Time > 0
time = 1
add = Var(12),Var(12),Var(12)

[State 0]
Type = PowerAdd
Trigger1 = time >= 1
value = -10
[State 0]

Type = VelSet
Trigger1 = Time = 0
y = 0
[State 0]

type = ChangeState
trigger1 = animTime = 0
value = 1901
ctrl = 1

[Statedef 1901]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0
anim = 1901 ;TIRAR PODER

[State 0]
type = Explod
triggerall = pos y = 0
trigger1 = time = 0
anim = 7800 ;CIRCULO SUELO
pos = 0,0
supermove = -1
pausemove  = -1
removetime = 50
postype = p1
facing = 1
vfacing = 1
sprpriority = -1
removeongethit = 1

[State 0]
type = PlaySnd
trigger1 = time = 5
value = 1000,0
volume = 255

[State 0]
type = Helper
trigger1 = Time = 1
name = "KiBeam"
stateno = 12400
postype = p1
pos = 38, -54
keyctrl = 0
ownpal = 1
id = 12400

[State 0]
type = BGPalFX
trigger1 = time = 45
time = 15
add = 255,239,57

[State 0]
type = ChangeState
trigger1 = AnimTime = 0 && power = 0
value = 5300
ctrl = 1

[State 0]
type = ChangeState
trigger1 = Time = 60
value	= IfElse(BackEdgeBodydist >= 0, 0, 100)
ctrl = 1

[Statedef 1905]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0
anim = 1900 ;CARGA MASENKO

[State 0]
type = SuperPause
trigger1 = time = 0
time = 50
anim = S12300
sound = S1800,0
pos = 20,-35
darken = 1
unhittable = 1

[State 0]
Type = VelSet
Trigger1 = Time = 0
y = 0

[State 0]
type = ChangeState
trigger1 = Time = 2
value = 1901
ctrl = 1

[StateDef 12400]
type = A
physics = N
movetype = A
velset = 0, 0
anim = 12400 ;PODER DESCARGADO
ctrl = 0
sprpriority = 4

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S99,8 ;PODER
volume = 255
channel = -1

[State 0]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
[State 0]

type = HitDef
trigger1 = time >= 0
attr = S, HP
animtype  = Hard
Damage = 10,3
guard.pausetime = 1,20
guardflag = MA
pausetime = 1,1
sparkno = -1
sparkxy = -5,0
hitsound   = -1
guardsound = -1
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -25, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.velocity = -25, -4
fall = 1
fall.recover = 1
kill = 1
guard.kill = 1

[State 0]
type = EnvShake
trigger1 = time = 0
time = 70
ampl = 6
phase = 18

[State 0]
type = Explod
trigger1 = time = 42
Anim = 10022 ;EXPLOSION
Pos = 200,160
sprpriority = 5
removeongethit = 1
bindtime = 1
Postype = p1
scale = 1.5,1.5

[State 0]
type = Explod
trigger1 = time = 6
Anim = 10022 ;EXPLOSION
Pos = 200,160
sprpriority = 5
removeongethit = 1
bindtime = 1
Postype = p1
scale = 2,2

[State 0]
type = Explod
trigger1 = time = 40
Anim = 124001 ;PODER
Pos = 0,0
velocity = 0,0
sprpriority = 3
removeongethit = 1
bindtime = 1
Postype = p1
SuperMove = 1
ownpal = 1
scale = 0.8, 0.8

[State 0]
type = ScreenBound
trigger1 = p2movetype = H || (BackEdgeBodydist < -1 && BackEdgeBodydist > -30)
movecamera = 0,0
value	= 0

[State 12400, DestroySelf]
type = DestroySelf
trigger1 = time = 42

;ACABA--------------------------------------



;kame------------------------------------



[Statedef 1906]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0
anim = 1906 ;SOLO CARGA;-------------- Generated by Fighter Factory -------------


[State 0]
type = Explod
trigger1 = timemod = 52,0
anim = 7804 ;RAYOS
pos = 0,-40
postype = p1
id = 7030
supermove = -1
pausemove  = -1
facing = 1
vfacing = 1
bindtime = -1
scale = 0.8,0.9
sprpriority = 30
removeongethit = 1

;PONER AURA NORMAL AQUI

[State 0]
type = Explod
triggerall = pos y = 0
trigger1 = timemod = 15,0
anim = 3340 ;CIRCULO PISO
pos = 0,0
supermove = -1
pausemove  = -1
postype = p1
facing = 1
vfacing = 1
sprpriority = -1
removeongethit = 1

[State 0]
type = Explod
trigger1 = time = 60
anim = 7803 ;ANILLO EXPANSIBLE COPIAR AINIMACION
pos = -10,-40
postype = p1
facing = 1
supermove = -1
pausemove  = -1
vfacing = 1
bindtime = -1
sprpriority = 30
removeongethit = 1

[State 0]
type = EnvShake
trigger1 = time = 20
time = 90
ampl = 4
phase = 18
[State 0]

type = Explod
trigger1 = time = 20
anim = 2093 ;PODER COPIAR ANIMACION listo
pos = -10,-40
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = -1
pausemove  = -1
scale = 0.4,0.4
sprpriority = 20
removeongethit = 1

type = Explod
trigger1 = time = 20
anim = 6008 ;RAYOS CONCENTRICOS
pos = -10,-40
postype = p1
facing = 1
vfacing = 1
bindtime = -1
supermove = -1
pausemove  = -1
scale = 1,1
sprpriority = 20
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=0
value = S3,0 ;GRITO BUSCAR EN ESPAÑOL
volume = 255
channel = -1
[State 0]
type = SuperPause
trigger1 = time = 0
time = 115
anim = S12300
movetime = 115
sound = S1800,0
pos = 43,-44
darken = 0
unhittable = 1

[State 0]
type = Varset
trigger1 = time = 0
v = 12
value = -200

[State 0]
type = VarAdd
trigger1 = time >= 45 && Var(12) < 0
v = 12
value = 6

[State 0]
type = BGPalFX
trigger1 = Time > 0
time = 1
add = Var(12),Var(12),Var(12)

[State 0]
Type = PowerAdd
Trigger1 = time >= 1
value = -10
[State 0]

Type = VelSet
Trigger1 = Time = 0
y = 0
[State 0]

type = ChangeState
trigger1 = animTime = 0
value = 1907
ctrl = 1

[Statedef 1907]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0
anim = 1907 ;TIRAR PODER

[State 0]
type = Explod
triggerall = pos y = 0
trigger1 = time = 0
anim = 7800 ;CIRCULO SUELO
pos = 0,0
supermove = -1
pausemove  = -1
removetime = 50
postype = p1
facing = 1
vfacing = 1
sprpriority = -1
removeongethit = 1

[State 0]
type = PlaySnd
trigger1 = time = 5
value = 1000,0
volume = 255

[State 0]
type = Helper
trigger1 = Time = 1
name = "KiBeam"
stateno = 12401
postype = p1
pos = 38, -54
keyctrl = 0
ownpal = 1
id = 12401

[State 0]
type = BGPalFX
trigger1 = time = 45
time = 15
add = 255,239,57

[State 0]
type = ChangeState
trigger1 = AnimTime = 0 && power = 0
value = 5300
ctrl = 1

[State 0]
type = ChangeState
trigger1 = Time = 60
value	= IfElse(BackEdgeBodydist >= 0, 0, 100)
ctrl = 1

[Statedef 1908]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0
anim = 1906 ;CARGA kame

[State 0]
type = SuperPause
trigger1 = time = 0
time = 50
anim = S12300
sound = S1800,0
pos = 20,-35
darken = 1
unhittable = 1

[State 0]
Type = VelSet
Trigger1 = Time = 0
y = 0

[State 0]
type = ChangeState
trigger1 = Time = 2
value = 1901
ctrl = 1

[StateDef 12401]
type = A
physics = N
movetype = A
velset = 0, 0
anim = 6007 ;PODER DESCARGADO
ctrl = 0
sprpriority = 4

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S99,8 ;PODER
volume = 255
channel = -1

[State 0]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
[State 0]

type = HitDef
trigger1 = time >= 0
attr = S, HP
animtype  = Hard
Damage = 15,7
guard.pausetime = 1,20
guardflag = MA
pausetime = 1,1
sparkno = -1
sparkxy = -5,0
hitsound   = -1
guardsound = -1
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -25, -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.velocity = -25, -4
fall = 1
fall.recover = 1
kill = 1
guard.kill = 1

[State 0]
type = EnvShake
trigger1 = time = 0
time = 70
ampl = 6
phase = 18

[State 0]
type = Explod
trigger1 = time = 42
Anim = 10022 ;EXPLOSION
Pos = 200,160
sprpriority = 5
removeongethit = 1
bindtime = 1
Postype = p1
scale = 1.5,1.5

[State 0]
type = Explod
trigger1 = time = 6
Anim = 10022 ;EXPLOSION
Pos = 200,160
sprpriority = 5
removeongethit = 1
bindtime = 1
Postype = p1
scale = 2,2

[State 0]
type = Explod
trigger1 = time = 40
Anim = 124001 ;PODER
Pos = 0,0
velocity = 0,0
sprpriority = 3
removeongethit = 1
bindtime = 1
Postype = p1
SuperMove = 1
ownpal = 1
scale = 0.8, 0.8

[State 0]
type = ScreenBound
trigger1 = p2movetype = H || (BackEdgeBodydist < -1 && BackEdgeBodydist > -30)
movecamera = 0,0
value	= 0

[State 12400, DestroySelf]
type = DestroySelf
trigger1 = time = 42

;ACABA--------------------------------------

;-----------------------------------
;combo1 bbb

[StateDef 1910]
type = S
movetype= A
physics = S
juggle  = 3
velset = 0,0
ctrl = 0
anim = 1017
poweradd = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = time = 3
anim = 211
ID = 211
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1
scale= .5,.5
pos=-2,-5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S1,1
volume = 200
[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S2,ifelse(random >= 500, 2,3)

[State 230,***]
type = AssertSpecial
trigger1 =1
flag = noautoturn

[State 221, 1]
type = HitDef
trigger1 = animelem = 2 || animelem = 9 || animelem = 21
attr = S, NA
damage = 20,5
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5, 5
sparkno = s10010 + random%8
guard.sparkno = s10060
sparkxy = -8, -52
hitsound = S1, 4
guardsound = s0, 120
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -3.3,0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3.3, 1.3
air.hittime = 10
getpower = ifelse(p2movetype = H, 144, 72),36
givepower = 36, 36
ground.cornerpush.veloff = -7

[State 0, CtrlSet]
type = CtrlSet
trigger1 = time = 16
value = 1
[State 200, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

;renshin san --------------------------------------------------------------------------------------
[Statedef 2200]
type    = A
movetype= A
physics = N
anim = 2200
ctrl = 0
sprpriority = 2
velset = 0,0

[State 2200, 1]
type = PlaySnd
trigger1 = time = 0
value = 2200,(var(2)=2)
channel = 30

[State 2200, 2]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,2; viento al brincar

[State 2200, 3]
type = Velset
trigger1 = AnimElem = 2
X = (var(2) = 0)*3.5 + (var(2) = 1)*6 + (var(2) = 2)*(P2bodydist X - 50)*0.02
Y = -(var(2) = 0)*7 - (var(2) = 1)*9 - (var(2) = 2)*14

[State 2200, 4]
type = Gravity
trigger1 = AnimElem = 2,>=0

[State 2200, 5]
type = NotHitBy
trigger1 = var(2) >= 1
trigger1 = AnimElem = 6,<0
value = SCA
time = 1

[State 2200, 6]
type = ChangeState
trigger1 = AnimElem = 8,>=1
trigger1 = Vel Y > 0
value = 2210


;

;--------------------------------------------
; giro y golpe
[Statedef 2210]
type    = A
movetype= A
physics = N
anim = 2210
juggle = 9 + var(2)*3

[State 2210, 1]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel) * 4

[State 2210, 2]
type = HitDef
trigger1 = time = 0
attr = A, SA
getpower =  -200 - (100*var(2)),-100 - (50*var(2))
damage    = floor((116 + var(2)*100) * fvar(1)),floor((29 + var(2)*25) * fvar(1))
fall.damage = floor(fvar(1) + var(42))
animtype  = Hard
hitflag = MAFDP
guardflag = H
pausetime = 0,30
sparkno = S10051
guard.sparkno = S10051
sparkxy = 0,-floor(Const(size.yscale)*25)
hitsound   = S1,4 + (random % 3) ; cambiar po el otro
guardsound = S1,4
ground.type = Low
ground.slidetime = 45
ground.hittime  = 45
guard.hittime  = 10
ground.velocity = -1,14
air.velocity = -1,14
down.velocity = 0,0
ground.cornerpush.veloff = -1.3
fall = 1
fall.recover = 0

[State 2210, 3]
type = Poweradd
trigger1 = time = 0
value = -(var(2)+1)*250

[State 2210, 4]
type = ChangeState
trigger1 = Pos Y > 0
value = 2220

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

[Statedef 2220]
type    = C
movetype= A
physics = N
anim = 2220
velset = 0,0
juggle = 9 + var(2)*3

[State 2220, 1]
type = Posset
trigger1 = time = 0
Y = 0

[State 2220, 2]
type = PlaySnd
trigger1 = time = 0
value = 2200,10 ; sonido de azotado

[State 2220, 3]
type = EnvShake
trigger1 = time = 0
time = (var(2)+1) * 16
freq = 120 + var(2)*40
ampl = -4 - var(2)

[State 2220, 4]
type = Explod
trigger1 = time = 0
anim = F61
ID = 2200
postype = p1
pos = 50, 0
ownpal = 1
sprpriority = 0
scale = var(2) + 1,var(2) + 1

[State 2220, 5]
type = HitDef
trigger1 = time = 0
attr = S, SA
getpower =  -200 - (100*var(2)),-100 - (50*var(2))
damage    = floor((100 + var(2)*80) * fvar(1)),floor((25 + var(2)*20) * fvar(1))
fall.damage = floor(fvar(1) + var(42))
animtype  = Hard
hitflag = MAFDP
guardflag = M
pausetime = 0,30
sparkno = 10007 ;poner la nuestra
guard.sparkno = 10007
sparkxy = 0,0
hitsound   = S1,4 + (random % 3); sonido corte
guardsound = S1,4
ground.type = Low
ground.slidetime = 45
ground.hittime  = 45
guard.hittime  = 10
ground.velocity = -1,14
guard.velocity = -16
air.velocity = -1,14
down.velocity = 0,0
fall = 1
fall.recover = 0

[State 2220, 6]
type = Projectile
trigger1 = var(2) = 2
trigger1 = AnimElem = 2
ProjAnim = 2230
ProjID = 2200
Projhitanim = -1
Projremove = 1
Projremovetime = 2*(var(2)+1)
projpriority = 5+var(2)
projedgebound = 1000
projstagebound = 1000
offset = 50,0
velocity = 0,0
accel = 0, 0
air.juggle = 3

attr = S, SA
getpower = 0,0
damage    = floor((60 + var(2)*20) * fvar(1)),floor((15 + var(2)*5) * fvar(1))
fall.damage = floor(fvar(1) + var(42))
animtype  = Hard
hitflag =  MAFDP
guardflag = M
pausetime = 0,30
sparkno = 3
sparkxy = floor(P2Dist X),0
hitsound   = 2200,10
guardsound = 2200,10 ; azotado
ground.type = Trip
ground.slidetime = 45
ground.hittime  = 45
guard.hittime  = 10
ground.velocity = 0,-5
guard.velocity = -16
air.velocity = 0,-5
down.velocity = 0,0
fall = 1
fall.recover = 0

[State 2220, 7]
type = ChangeState
trigger1 = time >= 48 + var(2) * 8
value = 11
ctrl = 1


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





;------------------------------------------------------------------------
[StateDef 11600, ko fx]
type = S
movetype= I
physics = N
juggle  = 1
anim = 0
poweradd = 0
sprpriority = 0

[State 0, PosSet]
type = PosSet
trigger1 = !time
x = 9999
y = 9999
;ignorehitpause =
;persistent =


[State 0, Explod]
type = Explod
trigger1 = !time
anim = 11600
ID = 11600
pos = 160,120
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1.5,1.5
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

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

[State 200, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S0,10001
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
flag3 = noshadow
[State 200, end]
type = destroyself
trigger1 = Time = 50

;------------------------------------------------------------------------
[StateDef 14000, super portrait]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 14000
poweradd = 0
sprpriority = 1

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 249-ceil(screenpos Y)
[State 0, PosSet]
type = Posadd
trigger1 = !time
x = -100

[State 0, VelSet]
type = VelSet
trigger1 = time < 15
x = 9
[State 0, VelSet]
type = VelSet
trigger1 = time > 30
x = 9

[State 0, VarSet]
type = VarSet
trigger1 = !time
fvar(1) = 1
[State 0, VarSet]
type = Varadd
trigger1 = time%2 && time >= 30
fvar(1) = 0.07

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time >= 30
scale = fvar(1),fvar(1)
[State 0, Trans]
type = Trans
trigger1 = time >= 30
trans = add1
alpha = ceil(256-fvar(1)*50)

[State 200, end]
type = destroyself
trigger1 = time = 50

;------------------------------------------------------------------
[statedef -2]

[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 210
id = 211
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 220
id = 221
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 410
id = 411
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 420
id = 421
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 610
id = 611
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 620
id = 621
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20200
id = 20201
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20210
id = 20211
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20220
id = 20221
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20400
id = 20401
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20410
id = 20411
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20420
id = 20421
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20600
id = 20601
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20610
id = 20611
[State 197, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 20620
id = 20621

[State 0, PlaySnd]
type = stopSnd
trigger1 = stateno != 193 && stateno != 1010 && stateno != 1110 && stateno != 1310
trigger1 = stateno != 900 && stateno != 3001
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !alive && var(1)=0
trigger1 = var(1) := 1
value = S11,0
volume = 100
channel = 0
ignorehitpause = 1
persistent = 10

[State -2, attackvarbyhits]
type=varset
trigger1= numenemy
fvar(10)= ifelse(enemynear,gethitvar(hitcount)<3, 24, ifelse(enemynear,gethitvar(hitcount)>=24, 2, 26-enemynear,gethitvar(hitcount)))/24.0
ignorehitpause=1
[State -2, attackvarbyhits]
type=varset
trigger1= numenemy && var(20)
fvar(10)= .72 * (10-ifelse(enemynear,gethitvar(hitcount)>=3, 8, enemynear,gethitvar(hitcount))) / 10.0
ignorehitpause=1
[State -2, attackvarbyhitsreset]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
fvar(10)= ifelse(var(20), .72, 1)
ignorehitpause=1
[State -2, attackvarbypower]
type=varset
trigger1= 1
fvar(11)= ifelse(var(20), 0, ifelse(power>=3000, .05, ifelse(power>=2000, .02, ifelse(power>=1000, .01, 0))))
ignorehitpause=1

[State -2, attackincreasereset]
type=varset
triggerall= var(37)
trigger1= movecontact || movereversed
trigger1= stateno!=1500 && (stateno!=1505 || time)
trigger2= (stateno=[801,849]) || (stateno=[851,899]) || (stateno=[1320,1339])
trigger3= stateno=4001 || stateno=4100
var(37)=0
ignorehitpause=1

[State -2, dampener var]
type=varset
trigger1=numenemy
fvar(12)= fvar(10) + fvar(11) + (fvar(13)*!var(20)) + (var(29)*.2)
ignorehitpause=1
[State -2, dampener]
type=attackmulset
trigger1= 1
value=fvar(12) + .4*(var(37)>0)
ignorehitpause=1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "attackmul = %f"
params = (fvar(12) + .5*(var(37)>0))
;ignorehitpause =
;persistent =

[State 0, HitOverride]
type = HitOverride
trigger1 = 1 && var(9)=1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 9999
time = 1
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1 && var(9)=1
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard

[State 0, PowerAdd]
type = PowerAdd
trigger1 = var(9) = 1
value = -10

[State 0, ChangeState]
type = ChangeState
trigger1 = statetype = S && var(9) = 1 && power = 0
value = 3010
ctrl = 0

[State 0, Helper]
type = Helper
triggerall = winko
triggerall = numhelper(11600) = 0 && var(6) = 0
trigger1 = numhelper(1011)
trigger1 = helper(1011), var(3)
trigger1 = var(6) := 1
trigger2 = numhelper(1112)
trigger2 = helper(1112), var(3)
trigger2 = var(6) := 1
trigger3 = numhelper(1113)
trigger3 = helper(1113), var(3)
trigger3 = var(6) := 1
trigger4 = numhelper(1211)
trigger4 = helper(1211), var(3)
trigger4 = var(6) := 1
trigger5 = numhelper(1311)
trigger5 = helper(1311), var(3)
trigger5 = var(6) := 1
trigger6 = numhelper(2011)
trigger6 = helper(2011), var(3)
trigger6 = var(6) := 1
trigger7 = stateno = 20200 && movecontact
trigger7 = var(6) := 1
trigger8 = stateno = 20210 && movecontact
trigger8 = var(6) := 1
trigger9 = stateno = 20220 && movecontact
trigger9 = var(6) := 1
trigger10 = numhelper(20211)
trigger10 = helper(20211), var(3)
trigger10 = var(6) := 1
trigger11 = numhelper(20221)
trigger11 = helper(20221), var(3)
trigger11 = var(6) := 1
trigger12 = stateno = 20400 && movecontact
trigger12 = var(6) := 1
trigger13 = stateno = 20410 && movecontact
trigger13 = var(6) := 1
trigger14 = stateno = 20420 && movecontact
trigger14 = var(6) := 1
trigger12 = stateno = 20600 && movecontact
trigger12 = var(6) := 1
trigger13 = stateno = 20610 && movecontact
trigger13 = var(6) := 1
trigger14 = stateno = 20620 && movecontact
trigger14 = var(6) := 1
trigger15 = numhelper(20611)
trigger15 = helper(20611), var(3)
trigger15 = var(6) := 1
trigger16 = numhelper(20621)
trigger16 = helper(20621), var(3)
trigger16 = var(6) := 1
helpertype = normal ;player
name = "ko fx"
ID = 11600
stateno = 11600
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, shunpo counter reset]
type = Varset
trigger1 = statetype = S && stateno != 700
var(7) = 0

;-------------- Generated by Fighter Factory -------------

;--------------------- Variable List ----------------------

; Var(1) - StateDef 20221, 20621, 1011, 1311, 2011, -2
; Var(2) - StateDef 1000, qcf abc, 1200, hcb abc, 1210, hcb c ex, 2000, qcf abc
; Var(3) - StateDef 700, dd abc, 1011, 1112, 1113, 1211, 1311, 2011
; Var(4) - StateDef 3000, a
; Var(5) - StateDef 20200, a, 20210, b, 20220, c, 20400, a, 20410, b, 20420, c, 20600, a, 20610, b, 20620, c
; Var(6) - StateDef -2
; Var(9) - StateDef 3008, a, 3010, a
; Var(10) - StateDef 20211, 20221, 20611, 20621, 1001, 1011, 1112, 1113, 1201, 1211, 1311, 2001, 2011
; Var(37) - StateDef -2
; Var(50) - StateDef -3

;--------------------- Float Variable List ----------------------

; fVar(1) - StateDef 20211, 20221, 20611, 20621, 1001, 1011, 1112, 1113, 1311, 2001, 2011, 3004, 3005, 3006, 3007, 14000
; fVar(2) - StateDef 901, 1012, 3002, 3003, 3011
; fVar(4) - StateDef 3000, a
; fVar(5) - StateDef 3000, a
; fVar(10) - StateDef -2
; fVar(11) - StateDef -2
; fVar(12) - StateDef -2
