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

[Size]
xscale = 1           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 20     ;Player width (back, ground)
ground.front = 34    ;Player width (front, ground)
air.back = 20        ;Player width (back, air)
air.front = 22       ;Player width (front, air)
height = 200         ;Height of player (for opponent to jump over)
attack.dist = 215    ;Default attack distance
proj.attack.dist = 100 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too
head.pos = 83, -160 ;Approximate position of head
mid.pos = -1, -84  ;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). Recommended 0,0

[Velocity]
walk.fwd  = 4      ;Walk forward
walk.back = -3.4    ;Walk backward
run.fwd  = 18.4, 0   ;Run forward (x, y)
run.back = -18,0 ;Hop backward (x, y)
jump.neu = 0,-14.6   ;Neutral jumping velocity (x, y)
jump.back = -10.2,-14.6 ;Jump back Speed (x, y)
jump.fwd = 10,-14.6     ;Jump forward Speed (x, y)
runjump.back = -10.2,-15.4 ;Running jump speeds (opt)
runjump.fwd = 16,-15.4    ;.
airjump.neu = 0,-12.4     ;.
airjump.back = -10.2      ;Air jump speeds (opt)
airjump.fwd = 10          ;.
air.gethit.groundrecover = -.6,-14    ;Velocity for ground recovery state (x, y) **MUGEN 1.0**
air.gethit.airrecover.mul = .5,.2     ;Multiplier for air recovery velocity (x, y) **MUGEN 1.0**
air.gethit.airrecover.add = 0,-18     ;Velocity offset for air recovery (x, y) **MUGEN 1.0**
air.gethit.airrecover.back = -4       ;Extra x-velocity for holding back during air recovery **MUGEN 1.0**
air.gethit.airrecover.fwd = 0         ;Extra x-velocity for holding forward during air recovery **MUGEN 1.0**
air.gethit.airrecover.up = -8         ;Extra y-velocity for holding up during air recovery **MUGEN 1.0**
air.gethit.airrecover.down = 6        ;Extra y-velocity for holding down during air recovery **MUGEN 1.0**

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 140 ;Minimum distance from ground before you can air jump (opt)
yaccel = 1.76         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching
stand.friction.threshold = 8          ;If player's speed drops below this threshold while standing, stop his movement **MUGEN 1.0**
crouch.friction.threshold = .2        ;If player's speed drops below this threshold while crouching, stop his movement **MUGEN 1.0**
air.gethit.groundlevel = 100          ;Y-position at which a falling player is considered to hit the ground **MUGEN 1.0**
air.gethit.groundrecover.ground.threshold = -80 ;Y-position below which falling player can use the recovery command **MUGEN 1.0**
air.gethit.groundrecover.groundlevel = 40   ;Y-position at which player in the ground recovery state touches the ground **MUGEN 1.0**
air.gethit.airrecover.threshold = -4  ;Y-velocity above which player may use the air recovery command **MUGEN 1.0**
air.gethit.airrecover.yaccel = 1.4    ;Vertical acceleration for player in the air recovery state **MUGEN 1.0**
air.gethit.trip.groundlevel = 60      ;Y-position at which player in the tripped state touches the ground **MUGEN 1.0**
down.bounce.offset = 0, 80            ;Offset for player bouncing off the ground (x, y) **MUGEN 1.0**
down.bounce.yaccel = 1.6              ;Vertical acceleration for player bouncing off the ground **MUGEN 1.0**
down.bounce.groundlevel = 48          ;Y-position at which player bouncing off the ground touches the ground again **MUGEN 1.0**
down.friction.threshold = .2          ;If the player's speed drops below this threshold while lying down, stop his movement **MUGEN 1.0**

;Default language victory quotes **MUGEN 1.0**
;The default language victory quotes must be implemented in English.
[Quotes]
; Up to 100 victory quotes can be specified per language (victory0 - victory99)
victory1 = "You must defeat Tu Shou to stand a chance."
victory2 = "You need a lot of training. Come back in ten years."
victory3 = "You look familiar. Did I see you on TV?"
victory4 = "Your moves are too predictable. You want to learn Kung Fu Palm? It's not for novices."
victory5 = "That was a good workout."
victory6 = "I want to challenge more skilled fighters."
victory7 = "What do you mean my girlfriend is in another temple?"

;---------------------------------------------------------------------------
; Let's fight like gentlemen
[Statedef 1000]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1000
poweradd = 100 + (var(0):=0)

[State 200, 2]
type = PlaySnd
trigger1 = Time = 0
value = 1000, 0
channel = 0

[State 1000, Chain Flag]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 1110]
Type = PowerAdd
trigger1 = time > 10
trigger1 = (time - 10) % 10 = 0
value = 15

[State 1110, Var(0)]
Type = VarAdd
trigger1 = time > 10
var(0) = 1

[State 1000, ChangeState]
Type = ChangeState
trigger1 = time >= 30
trigger1 = command != "hold_x"
trigger2 = time = 150
value = 1001

;---------------------------------------------------------------------------
; Rose toss
[Statedef 1001]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1001

[State 1000, Projectile]
Type = Helper
trigger1 = time = 0
name = "Rose"
id = 1000
pos = 98, -160
StateNo = 1002
ownpal = 1

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

;---------------------------------------------------------------------------
; Rose Fireball
[Statedef 1002]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1002
SprPriority = 2

[State 1001, AssertSpecial]
Type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1001, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = 0, 1
channel = 0

[State 1001, VelSet]
Type = VelSet
trigger1 = time = 0
x = 18
y = -7

[State 1001, HitOverride]
Type = HitOverride
trigger1 = 1
attr = SCA, AP
stateno = 1003

[State 1001, NotHitBy]
Type = NotHitBy
trigger1 = 1
value = , AA, AT

[State 1001, Gravity]
Type = VelAdd
trigger1 = 1
y = 0.8

;HitDef
[State 1001, HitDef]
type = HitDef
trigger1 = time = 0
trigger1 = parent, var(0) < 140
attr = S, SP
damage = 4, 0
animtype = Heavy
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 0, 18
air.pausetime = 0, 8
guard.pausetime = 0,36
sparkno = 2
guard.sparkno = 0
sparkxy = -5, 0
hitsound = 5, 2
guardsound = 6, 0
ground.type = High
ground.hittime = 40
ground.slidetime = 40
ground.velocity = -4.68145
air.velocity = -6.97923, -9.00000
air.hittime = 50
air.type = High
getpower = 40, 60
givepower = 40, 60
fall = 0
air.fall = 1
ground.cornerpush.veloff = 0

[State 1001, HitDef]
type = HitDef
trigger1 = time = 0
trigger1 = parent, var(0) = 140
attr = S, SP
damage = 4, 0
animtype = Heavy
guardflag = 
hitflag = MAF
priority = 4, Hit
pausetime = 0, 18
air.pausetime = 0, 8
guard.pausetime = 0,36
sparkno = 2
guard.sparkno = 0
sparkxy = -5, 0
hitsound = 5, 2
guardsound = 6, 0
ground.type = High
ground.hittime = 40
ground.slidetime = 40
ground.velocity = -4.68145
air.velocity = -6.97923, -9.00000
air.hittime = 50
air.type = High
getpower = 40, 60
givepower = 40, 60
fall = 0
air.fall = 1
ground.cornerpush.veloff = 0

[State 1001, ChangeState]
Type = ChangeState
trigger1 = MoveContact = 1
trigger2 = pos y >= 0
value = 1003
ignorehitpause = 1

;---------------------------------------------------------------------------
;Rose end
[Statedef 1003]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
SprPriority = 2
anim = 1003

[State 1102, VelSet]
Type = VelSet
trigger1 = time = 0
x = ifelse(pos y >= 0, -4, -2)
y = -4

[State 1102, VelSet]
Type = VelSet
trigger1 = time > 0
trigger1 = pos y >= 0
x = 0
y = 0

[State 1102, Gravity]
Type = Gravity
trigger1 = pos y < 0

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

;---------------------------------------------------------------------------
; Jump Punch
[Statedef 1100]
type    = A
movetype= A
physics = N
juggle  = 5
poweradd= 100
velset = 9,-12
anim = 1100
ctrl = 0
sprpriority = 2

[State 0, Moveability]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 200, 2]
type = PlaySnd
trigger1 = Time = 0
value = 1100, 0
channel = 0

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

[State 0, NotHitBy]
Type = NotHitBy
trigger1 = 1
value = , AP

[State 1100, Gravity]
Type = VelAdd
trigger1 = 1
y = 1

[State 1100, Width]
Type = Width
trigger1 = 1
player = 55, 22

[State 1010, 6]
type = HitDef
trigger1 = AnimElem = 3
attr = A, SA
animtype  = Hard
damage    = 45, 10
priority  = 5
guardflag = H
Hitflag = MAFD
pausetime = 7,12
sparkno = 1
sparkxy = -40,-30
hitsound   = 5,3
guardsound = 6,0
getpower = 50, 30
givepower = 50, 30
ground.type = Low
ground.slidetime = 14
ground.hittime  = 22
ground.velocity = -12
air.velocity = -12,-10
fall = 0

[State 1000, 7]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = time > 0
value = 1110

;---------------------------------------------------------------------------
; Jump Punch Land
[Statedef 1110]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 1110
ctrl = 0
sprpriority = 2

[State 1110, PosSet]
Type = PosSet
trigger1 = time = 0
y = 0

[State 1110, Moveability]
Type = VarSet
trigger1 = time = 0
var(55) = 65024

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

;---------------------------------------------------------------------------
; Double Punch
[Statedef 1200]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 120
velset = 12,0
anim = 1200
ctrl = 0
sprpriority = 2

[State 1000, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = 1200, 0
channel = 0

[State 1200, 1]
type = PlaySnd
trigger1 = animelemtime(3) = 0
value = 0, 2

[State 1200, Moveability]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 1200, Moveability]
Type = VarSet
trigger1 = animelemtime(3) = 0
var(55) = 65408

[State 1200, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SP
animtype  = Medium
damage    = 40, 8
guardflag = L
Hitflag = MAF
pausetime = 5,10
priority = 5, hit
sparkno = 2
sparkxy = -40,-60
hitsound   = 5,2
guardsound = 6,0
getpower = 50, 30
givepower = 50, 30
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8, -14
air.velocity = -7,-12
fall = 1
fall.recover = 0

[State 1200, ChangeState]
Type = ChangeState
trigger1 = animtime = 0
value = 1210

;---------------------------------------------------------------------------
; Purse End
[Statedef 1210]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 0
velset = 4,0
anim = 1210
ctrl = 0
sprpriority = 2

[State 1200, 1]
type = PlaySnd
trigger1 = animelemtime(3) = 0
value = 0, 2

[State 1200, Moveability]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 1200, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Medium
damage    = 60, 8
guardflag = L
Hitflag = MAF
pausetime = 8,10
priority = 5, hit
sparkno = 2
sparkxy = -40,-120
hitsound   = 5,2
guardsound = 6,0
getpower = 40, 20
givepower = 40, 20
ground.type = High
ground.slidetime = 20
ground.hittime  = 16
ground.velocity = -12, -16
air.velocity = -17,-12
fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
; Star Punch
[Statedef 1300]
type    = S
movetype= A
physics = S
juggle  = ifelse(prevstateno>= 1000, 15, 8)
poweradd= 100
velset = 0,0
anim = 1300
ctrl = 0
sprpriority = 2

[State 1000, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = 1300, 0
channel = 0

[State 0, Moveability]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 0, NotHitBy]
Type = NotHitBy
trigger1 = time = 0
value = , AP
time = 15

[State 1300, ChangeState]
Type = ChangeState
Trigger1 = animelemtime(3) = 0
value = 1310

;---------------------------------------------------------------------------
; Star Punch
[Statedef 1310]
type    = A
movetype= A
physics = N
juggle  = 5
velset = 6,-22
ctrl = 0
sprpriority = 2

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

[State 1310, Gravity]
Type = Gravity
trigger1 = 1

[State 1310, VelMul]
Type = VelAdd
trigger1 = time < 6
x = -1.5

[State 1310, VelMul]
Type = VelMul
trigger1 = vel x < 0
x = 0.9

[State 1010, 6]
type = HitDef
trigger1 = AnimElem = 3
attr = A, SA
animtype  = Hard
damage    = 50, 10
priority  = 5, hit
guardflag = M
pausetime = 7,8
id = 1300
nochainid = 1300
sparkno = 2
sparkxy = -40,-240
hitsound   = 5,3
guardsound = 6,0
getpower = 70, 50
givepower = 70, 50
ground.type = Low
ground.slidetime = 14
ground.hittime  = 17
ground.velocity = -8,-16
air.velocity = -10,-17
fall = 1

[State 1000, 7]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = time > 0
value = 1320

;---------------------------------------------------------------------------
; Star Punch Land
[Statedef 1320]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 1320
ctrl = 0
sprpriority = 2

[State 1320, PosSet]
Type = PosSet
trigger1 = time = 0
y = 0

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

;---------------------------------------------------------------------------
; Spin Punch
[Statedef 1400]
type    = S
movetype= A
physics = S
juggle  = 10
poweradd= 150
velset = 0,0
anim = 1400 + 10 * !(random % 10)
ctrl = 0
sprpriority = 2

[State 1000, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = 1400, 0
channel = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 1400
trigger1 = animelemtime(2) = 0
value = 0, 3


[State 1000, 1]
type = PlaySnd
triggerall = anim = 1410
trigger1 = animelemtime(2) = 0
trigger2 = animelemtime(9) = 0
trigger3 = animelemtime(16) = 0
trigger4 = animelemtime(23) = 0
trigger5 = animelemtime(30) = 0
value = 0, 3

[State 0, Moveability]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 230, 2]
type = HitDef
trigger1 = anim = 1400
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 90, 15
guardflag = M
pausetime = 12,14
priority = 6, Hit
sparkno = 3
sparkxy = -40,-128
hitsound   = 5,4
guardsound = 6,0
getpower = 100, 80
givepower = 100, 80
ground.type = Low
ground.slidetime = 20
ground.hittime  = 16
ground.velocity = -25, -10
air.velocity = -25,-12
fall = 1
fall.recover = 0

[State 230, 2]
type = HitDef
triggerall = anim = 1410
trigger1 = animelemtime(2) = 0
trigger2 = animelemtime(9) = 0
trigger3 = animelemtime(16) = 0
trigger4 = animelemtime(23) = 0
trigger5 = animelemtime(30) = 0
attr = S, NA
animtype  = Medium
damage    = 90 - 50 * (hitcount > 0), 15
hitflag = MAF
guardflag = M
pausetime = 12,14
priority = 6, Hit
sparkno = 3
sparkxy = -40,-128
hitsound   = 5,4
guardsound = 6,0
getpower = 100, 80
givepower = 100, 80
ground.type = Low
ground.slidetime = 20
ground.hittime  = 16
ground.velocity = -25, -10
air.velocity = -25,-12
fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
;Dreamland
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 14
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2

[State 3000, PowerAdd]
Type = PowerAdd
trigger1 = time = 0
value = ifelse(life > 250, -2000, -1000)

[State 3000, Chain Flag]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 3000, After Image]
Type = AfterImage
trigger1 = time = 0
time = 2
length = 9
timegap = 3
trans = add

[State 3000, AfterImagetime]
Type = AfterImageTime
trigger1 = time % 2
time = 3

[State 1000, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = 3000, 0
channel = 0

[State 3000, NotHitBy]
Type = NotHitBy
trigger1 = 1
value = , AP

[State 3000, SuperPause]
Type = SuperPause
trigger1 = time = 0
time = 40
anim = 100
pos = 0, -128
movetime = 5
sound = 20, 0
p2defmul = 1

[State 3000, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Heavy
damage    = 140, 30
guardflag = M
Hitflag = MA
pausetime = 6,16
sparkno = 3
sparkxy = -40,-148
hitsound   = 5,4
guardsound = 6,0
getpower = 0, 0
givepower = 80, 60
ground.type = High
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = 0
air.velocity = -9,-18
fall = 0
fall.recover = 0
air.fall = 1
kill = ifelse(p2statetype = A, 1, 0)

[State 3100, ChangeState]
Type = ChangeState
trigger1 = animelemtime(6) = 0
value = 3010

;---------------------------------------------------------------------------
;Dreamland Punch 2
[Statedef 3010]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3000, AfterImagetime]
Type = AfterImageTime
trigger1 = time % 2
time = 3

[State 3010, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Heavy
damage    = 140, 30
guardflag = M
hitflag = MA
pausetime = 6,16
sparkno = 3
sparkxy = -40,-148
hitsound   = 5,4
guardsound = 6,0
getpower = 0, 0
givepower = 80, 60
ground.type = High
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = 0
air.velocity = -9,-18
fall = 0
fall.recover = 0
air.fall = 1
kill = ifelse(p2statetype = A, 1, 0)

[State 3010, ChangeState]
Type = ChangeState
trigger1 = animelemtime(9) = 0
value = 3020

;---------------------------------------------------------------------------
;Dreamland Punch 3
[Statedef 3020]
type    = S
movetype= A
physics = S
juggle = 15
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3000, AfterImagetime]
Type = AfterImageTime
trigger1 = time % 2
trigger1 = animtime > -5
time = 3

[State 3010, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Heavy
damage    = 140, 30
guardflag = M
hitflag = M
pausetime = 4,16
sparkno = 3
sparkxy = -40,-148
hitsound   = 5,4
guardsound = 6,0
getpower = 0, 0
givepower = 80, 60
ground.type = High
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = 0
air.velocity = 0,0
fall = 1
fall.recover = 0
p2stateno = 3050

[State 3010, ChangeState]
Type = ChangeState
trigger1 = movehit
trigger1 = animelemtime(12) = 5
value = 3030

[State 3010, TargetState]
Type = TargetState
trigger1 = movehit
trigger1 = target, stateno != 3050
value = 3050

[State 3010, ChangeState]
Type = ChangeState
trigger1 = animtime = 0
trigger1 = movehit = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Dreamland Punch KO
[Statedef 3030]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3030
ctrl = 0
sprpriority = 2

[State 1000, PlaySnd]
Type = PlaySnd
trigger1 = animelemtime(10) = 0
value = 3000, ifelse(target, alive, 1, 2)
channel = 0

[State 3030, Mario]
Type = Helper
trigger1 = time = 0
stateno = 3040
pos = ifelse (frontedgedist > 60, 40, -40), 0
ownpal = 1

[State 3030, VelSet]
Type = VelSet
trigger1 = animelemtime(2) >= 0
trigger1 = animelemtime(10) < 0
x = const(velocity.walk.back.x)

[State 3030, VelSet]
Type = VelSet
trigger1 = animelemtime(10) = 0
x = 0

[State 3030, ChangeState]
Type = ChangeState
trigger1 = numtarget = 0
value = 0
ctrl = 1

[State 3030, ChangeState]
Type = ChangeState
trigger1 = target, stateno = 5150
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Dreamland Mario
[Statedef 3040]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3040
ctrl = 0
sprpriority = -4

[State 3040, Pipe]
Type = Explod
Trigger1 = time = 0
id = 3040
anim = 3043
pos = -12,30
sprpriority = -3
scale = 1.3, 1.3

[State 3040, Pipe]
Type = Explod
Trigger1 = time = 0
id = 3040
anim = 3044
pos = -12,30
scale = 1.3, 1.3
sprpriority = -5

[State 3040, PosAdd]
Type = PosAdd
trigger1 = time < 10
y = -20

[State 3040, PosAdd]
Type = AssertSpecial
trigger1 = time < 10
trigger2 = anim = 3041
trigger2 = animelemtime(1) >= 0
flag = noshadow
ignorehitpause = 1

[State 3040, Sprpriority]
Type = Sprpriority
trigger1 = time = 10
value = -3

[State 3030, ChangeState]
Type = ChangeAnim
trigger1 = Parent, numtarget = 0
trigger1 = anim = 3040
trigger1 = animtime < -1
trigger1 = !win
value = 3041
ctrl = 1

[State 3030, ChangeState]
Type = ChangeAnim
trigger1 = anim = 3040
trigger1 = animtime = 0
trigger1 = win
value = 3042
ctrl = 1

[State 3040, Sprpriority]
Type = Sprpriority
trigger1 = anim = 3041
value = -4

[State 3040, PosAdd]
Type = PosAdd
trigger1 = anim = 3041
trigger1 = animelemtime(1) < 10
y = 20

[State 3040, RemoveExplod]
Type = RemoveExplod
trigger1 = anim = 3041
trigger1 = animtime = 0
id = 3040

[State 3040, Destroyself]
Type = DestroySelf
trigger1 = anim = 3041
trigger1 = animtime = 0

;---------------------------------------------------------------------------
;Hit by Dreamland Punch KO
[Statedef 3050]
type    = S
movetype= H
physics = S
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3050, ChangeAnim2]
Type = ChangeAnim2
trigger1 = time = 0
value = 3050

[State 3030, VelSet]
Type = VelSet
trigger1 = animelemtime(1) >= 5
trigger1 = animelemtime(3) < 0
x = -9

[State 3030, VelSet]
Type = VelSet
trigger1 = animelemtime(3) = 0
x = 0

[State 3030, PlaySnd]
Type = PlaySnd
trigger1 = animelemtime(3) = 0
value = F7, 1

[State 3030, Dust]
type = Explod
trigger1 = animelemtime(3) = 0
anim = F61
pos = 0, 0
sprpriority = 10

[State 3030, ChangeState]
Type = SelfState
trigger1 = alive
trigger1 = animelemtime(3) = 249
value = 5120
ctrl = 1

[State 3030, ChangeState]
Type = SelfState
trigger1 = !alive
trigger1 = animelemtime(3) = 309
value = 5150

;---------------------------------------------------------------------------
;Tryis Flare
[Statedef 3100]
type    = S
movetype= A
physics = S
juggle  = 14
velset = 0,0
anim = 3100
ctrl = 0
sprpriority = 2

[State 3000, PowerAdd]
Type = PowerAdd
trigger1 = time = 0
value = -2000

[State 3000, Chain Flag]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 1000, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = 3100, 0
channel = 0

[State 3000, After Image]
Type = AfterImage
trigger1 = time = 0
time = 2
length = 9
timegap = 3
trans = add

[State 3000, AfterImagetime]
Type = AfterImageTime
trigger1 = time % 2
time = 3

[State 3000, NotHitBy]
Type = NotHitBy
trigger1 = 1
value = , AP

[State 3000, Width]
Type = Width
trigger1 = 1
edge = 100, 20

[State 3000, SuperPause]
Type = SuperPause
trigger1 = time = 0
time = 120
anim = 100
pos = 0, -128
movetime = 0
sound = 20, 0
p2defmul = 1

[State 3000, Gnome]
Type = Helper
Trigger1 = time = 0
stateno = 3110
name = "Gnome"
ownpal = 1
id = 3110
pos = -backedgedist - 80, 0

[State 3000, ChangeAnim]
Type = ChangeAnim
trigger1 = animelemtime(3) >= 0
trigger1 = helper, rootdist x <= -120
value = 3101
persistent = 0

[State 3100, ChangeState]
Type = ChangeState
trigger1 = animtime = 0
value = 3105

;---------------------------------------------------------------------------
;Tryis Flare
[Statedef 3105]
type    = S
movetype= A
physics = S
juggle  = 14
velset = 0,0
anim = 3105
ctrl = 0
sprpriority = 2

[State 3105, Plant]
Type = Helper
trigger1 = animelemtime(2) = 0
postype = left
pos = ifelse(facing = 1, -140, 780), -600
stateno = 3120
name = "Plant"
ownpal = 1
id = 3120
facing = facing

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

;---------------------------------------------------------------------------
;Gnome
[Statedef 3110]
type    = S
movetype= A
physics = S
juggle  = 14
velset = 0,0
anim = 3110
ctrl = 0
sprpriority = 2

[State 3110, VelSet]
Type = velset
trigger1 = rootdist x > -120
trigger2 = parent, stateno != 3100
x = 12

[State 3110, VelSet]
Type = velset
trigger1 = parent, stateno = 3100
trigger1 = rootdist x <= -120
x = 0

[State 3110, ChangeAnim]
Type = ChangeAnim
trigger1 = vel x = 0
trigger1 = anim = 3110
value = 3111

[State 3111, ChangeState]
Type = ChangeState
trigger1 = anim = 3111
trigger1 = parent, anim = 3101
value = 3112

[State 3111, ChangeState]
Type = DestroySelf
trigger1 = frontedgedist < -40
trigger1 = vel x > 0

;---------------------------------------------------------------------------
;Gnome
[Statedef 3112]
type    = S
movetype= A
physics = N
juggle  = 14
velset = 0,0
anim = 3112
ctrl = 0
sprpriority = 2

[State 3112, Explod]
Type = Explod
trigger1 = time = 0
anim = F2
pos = 0, -45
sprpriority = 3

[State 3112, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = F5,2

[State 3112, VelSet]
Type = VelSet
trigger1 = time = 5
x = 10
y = -12

[State 3112, Explod]
Type = Explod
trigger1 = time = 5
anim = 3130
ownpal = 1
removetime = 24
pos = 0, -70
vel = -4, -16
accel = 0, 1.25
ownpal = 1
sprpriority = 3

[State 3112, Gravity]
Type = Gravity
trigger1 = time > 5

[State 3112, ChangeState]
Type = ChangeState
trigger1 = pos y >= 0
trigger1 = time > 5
value = 3113

;---------------------------------------------------------------------------
;Gnome
[Statedef 3113]
type    = S
movetype= A
physics = N
juggle  = 14
velset = 20,0
anim = 3113
ctrl = 0
sprpriority = 2

[State 3112, VelSet]
Type = PosSet
trigger1 = time = 0
y = 0

[State 3112, DestroySelf]
Type = DestroySelf
trigger1 = frontedgedist < -40

;---------------------------------------------------------------------------
;Plant
[Statedef 3120]
type    = S
movetype= A
physics = S
juggle  = 14
velset = 0,0
anim = 3120
ctrl = 0
sprpriority = 4

[State 3110, VelSet]
Type = velset
trigger1 = time < 10
x = 15
y = 25

[State 3110, VelSet]
Type = velset
trigger1 = time = 10
x = 0
y = 0

[State 3105, Plant]
Type = Helper
trigger1 = time = 20
pos = 70,70
name = "Fireball"
stateno = 3150
size.xscale = 0.5
size.yscale = 0.5

[State 3110, VelSet]
Type = velset
trigger1 = time >= 30
x = -15
y = -25

[State 3120, DestroySelf]
Type = DestroySelf
trigger1 = animtime = 0

;---------------------------------------------------------------------------
;Fireball
[Statedef 3150]
type    = S
movetype= A
physics = N
ctrl = 0
SprPriority = 3
hitcountpersist = 1

[State 3150, ChangeAnim]
Type = ChangeAnim
trigger1 = var(1) = 0
value = 3150

[State 3150, VelSet]
Type = VelSet
trigger1 = var(1) = 0
x = 6.5
y = 12

[State 3150, VarAdd]
Type = VarAdd
trigger1 = 1
var(1) = 1

[State 3150, VarAdd]
Type = VarAdd
trigger1 = time = 0
trigger1 = var(1) > 0
var(2) = 1

[State 3150, AssertSpecial]
Type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 3150, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = 1000, 1
channel = 0

[State 3150, Hit The Floor]
Type = VarSet
trigger1 = pos y >= 0
var(0) = 1

[State 3150, VelSet]
Type = VelSet
trigger1 = pos y >= 0
y = -18

[State 3150, Gravity]
Type = Gravity
trigger1 = var(0)

[State 3150, HitOverride]
Type = HitOverride
trigger1 = 1
attr = SCA, AP
stateno = ifelse(var(2) >= 5, 3160, 3150)

[State 3150, NotHitBy]
Type = NotHitBy
trigger1 = 1
value = , AA, AT

;HitDef
[State 3150, HitDef]
type = HitDef
trigger1 = !(movehit % 3) && (!moveguarded)
trigger1 = hitcount < 10
trigger2 = !(moveguarded % 3) && (!movehit)
attr = S, SP
damage = 38, 10
animtype = Heavy
guardflag = M
hitflag = MAFD
priority = 4, Hit
pausetime = 0, 5
guard.pausetime = 0, 5
sparkno = 2
guard.sparkno = 0
sparkxy = -5, 0
hitsound = 5, 3
guardsound = 6, 0
ground.type = High
air.type = High
getpower = 0, 0
givepower = 20, 10
ground.cornerpush.veloff = 0
ground.velocity = -5
guard.velocity = -4.68145
air.velocity = -2.67923, -14.00000
air.hittime = 40
palfx.add = 128, 64, 64
palfx.mul = 192, 192, 64
palfx.sinadd = 64, 32, 16, 15
palfx.color = 32
palfx.time = 28
fall = 0
air.fall = 1
ground.hittime = 20
ground.slidetime = 15
ignorehitpause = 1
down.bounce = 1

[State 1301, ChangeState]
Type = ChangeState
trigger1 = FrontEdgeDist < -100
trigger2 = hitcount = 10
value = 3160
ignorehitpause = 1

;---------------------------------------------------------------------------
;Fireball end
[Statedef 3160]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
SprPriority = 2
anim = 3160

[State 3160, AssertSpecial]
Type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

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


;---------------------------------------------------------------------------
; At the count of three, you're down
[Statedef 3200]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3200
poweradd = (var(0):=0)

[State 3000, PowerAdd]
Type = PowerAdd
trigger1 = time = 0
value = ifelse(life > 250, -2000, -1000)

[State 3000, Chain Flag]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 3000, After Image]
Type = AfterImage
trigger1 = time = 0
time = 2
length = 9
timegap = 3
trans = add

[State 3000, AfterImagetime]
Type = AfterImageTime
trigger1 = time % 2
time = 3

[State 200, 2]
type = PlaySnd
trigger1 = Time = 0
value = 3200, 0
channel = 0

[State 3000, SuperPause]
Type = SuperPause
trigger1 = time = 0
time = 60
anim = 100
pos = -75, -252
movetime = 0
sound = 20, 0
p2defmul = 1

[State 1000, Chain Flag]
Type = VarSet
trigger1 = time = 0
var(55) = 0

[State 1000, ChangeState]
Type = ChangeState
trigger1 = time >= 5
trigger1 = command != "hold_x"
trigger2 = time = 180
value = 3210

;---------------------------------------------------------------------------
; Bull Charge!
[Statedef 3210]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3210

[State 3000, AfterImagetime]
Type = AfterImageTime
trigger1 = time % 2
time = 3

[State 1000, Projectile]
Type = Helper
trigger1 = animelemtime(3) = 0
name = "Bull Charge"
id = 3200
pos = 98, -80
StateNo = 3220
ownpal = 1

[State 3210, VelSet]
Type = VelSet
trigger1 = animelemtime(3) = 0
x = -25

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

;---------------------------------------------------------------------------
; Bull!
[Statedef 3220]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 3220
SprPriority = 2

[State 1001, AssertSpecial]
Type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1001, PlaySnd]
Type = PlaySnd
trigger1 = time = 0
value = 0, 1
channel = 0

[State 1001, VelSet]
Type = VelSet
trigger1 = time = 0
x = 45

[State 1001, NotHitBy]
Type = NotHitBy
trigger1 = 1
value = , AA, AT

;HitDef
[State 1001, HitDef]
type = HitDef
trigger1 = time = 0
attr = S, SP
damage = 280, 30
animtype = Heavy
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 0, 24
guard.pausetime = 0,24
sparkno = 3
guard.sparkno = 0
sparkxy = -5, 0
hitsound = 5, 3
guardsound = 6, 0
ground.type = High
ground.hittime = 20
ground.slidetime = 20
ground.velocity = -28.68145, -11
air.velocity = -28.68145, -11
air.hittime = 50
air.type = High
getpower = 0, 0
givepower = 40, 60
fall = 1
air.fall = 1
ground.cornerpush.veloff = 0
envshake.time = 24

[State 1001, ChangeState]
Type = DestroySelf
trigger1 = Animtime = 0

