
;===========================================================================
;Marvel vs. Capcom - Eternity of Heroes - Constants Template
;by REDHOT, Acey & eSkRo
;===========================================================================
[Data]
life = 1000
attack = 120
defence = 120
fall.defence_up = 50
liedown.time = 50
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 555
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 20
ground.front = 20
air.back = 18
air.front = 22
height = 60
attack.dist = 160
attack.width = 4,4   
proj.dist = 90
proj.attack.dist = 90 
proj.doscale = 0
head.pos = 1, -83
mid.pos = 1, -53
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 5
walk.back = -5
run.fwd  = 7,.5
run.back = -4.5,-3.8
jump.neu = 0,-8.4
jump.back = -2.55
jump.fwd = 2.5
runjump.back = -2.55,-8.1
runjump.fwd = 4,-8.1
airjump.neu = 0,-8.1
airjump.back = -2.55
airjump.fwd = 2.5

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .44
stand.friction = .85
crouch.friction = .85
air.friction = .80

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = N
anim = 100
sprpriority = 1
velset = 7, 0
ctrl = 1

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
trigger1 = prevstateno != 10000
anim = 661
pos = -25,-50
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 = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


;smoke trails
[State 0, Explod]
type = Explod
trigger1 = random < 100
anim = 1170
ID =  1172
pos = -40,-58
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,.5
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
trans = add



[State 0, Explod]
type = Explod
trigger1 = animelem = 1
trigger1 = prevstateno = 10000
anim = 661
pos = -50,-50
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 = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =



[State 100, 3]
type = PlaySnd
trigger1 = time = 3
value = S15,6
channel = 0

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

[State 100, 9]
type = Explod
trigger1 = time = [16,35]
trigger1 = (time % 4) = 0
ID = 43
anim = 6000
postype = p1
pos = 10, 0
bindtime = 1
removetime = -2
vel = -.2, 0
ownpal = 1
sprpriority = 2 

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; RUN_FWD_AIR
[Statedef 101]
type    = A
physics = N
anim = 100
sprpriority = 1
velset = 7, 0
ctrl = 1

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 661
pos = -50,-50
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 = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =


[State 100, 3]
type = PlaySnd
trigger1 = time = 3
value = S15,6
channel = 0

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 40


;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 105, VelSet]
type = VelSet
trigger1 = Time = 2
x = -10
y = const(velocity.run.back.y)

[State 100, 3]
type = PlaySnd
trigger1 = time = 3
value = S15,9
channel = 0

[State 105, Flash]
type = Explod
trigger1 = time > 4 && (time%4) = 1
ID = 8500
anim = 2222
postype = P1
pos = 10,-51
bindtime = 1
vel = -2.2
ownpal = 1
random = 18,48
removetime = -2
sprpriority = 2

[State 105, Flash]
type = Explod
trigger1 = time > 4 && (time % 4) = 0
ID = 8501
anim = 2222
postype = p1
pos = 10,-49
bindtime = 1
vel = -2
ownpal = 1
random = 18,48
removetime = -2
sprpriority = 2

[State 105, ChangeState]
type = ChangeState
trigger1 = Time > 15
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106


;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106
sprpriority = 1

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

[State 106, posset]
type = posset
trigger1 = time = 0
y = 0

[State 106, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 8100,0


[State 106, VelSet]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Win Poses

[Statedef 180]
type = S

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,500

[State 180, 2]
type = ChangeState
trigger1 = Var(1) = [0,100]
value = 181

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [101,200]
value = 182

[State 180, 4]
type = ChangeState
trigger1 = Var(1) = [201,300]
value = 183

[State 180, 5]
type = ChangeState
trigger1 = Var(1) = [301,400]
value = 181

[State 180, 5]
type = ChangeState
trigger1 = Var(1) = [401,500]
value = 196



;---------------------------------------------------------------------------------------------
;Win Pose 1

[Statedef 181]
type = S
movetype = I
physics = S
ctrl = 0
anim = 180
velset = 0,0

[State 1100, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1171
pos = -90,-180
postype = p1
facing = 1
vfacing = 1
bindtime = 1
sprpriority = 2
persistent = 0
ignorehitpause = 1

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 6
value = S15,11
persistent = 0
channel = 0

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

;---------------------------------------------------------------------------------------------
;Win Pose 2

[Statedef 182]
type = S
movetype = I
physics = S
ctrl = 0
anim = 180
velset = 0,0

[State 1100, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1171
pos = -90,-180
postype = p1
facing = 1
vfacing = 1
bindtime = 1
sprpriority = 2
persistent = 0
ignorehitpause = 1

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 6
value = S15,12
persistent = 0
channel = 0

[State 182, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------------------------
;Win Pose 3

[Statedef 183]
type = S
movetype = I
physics = S
ctrl = 0
anim = 180
velset = 0,0

[State 1100, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1171
pos = -90,-180
postype = p1
facing = 1
vfacing = 1
bindtime = 1
sprpriority = 2
persistent = 0
ignorehitpause = 1

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 6
value = S15,12
persistent = 0
channel = 0

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

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



[State 190, Dance_off]
type = ChangeState
trigger1 = Time < 3
trigger1 = random <= 500
trigger1 = p2name = "boomerang"
value = 185


[State 190, Jump On]
type = ChangeState
trigger1 = Time < 3
trigger1 = random <= 100
value = 197

[State 190, fly_overhead]
type = ChangeState
trigger1 = Time  < 3
trigger1 = random <= 100
value = 196


[State 190, GreenGoblin_fly_down]
type = ChangeState
trigger1 = Time < 3
trigger1 = random <= 100
value = 199

[State 190, Glider-hits-goblin]
type = ChangeState
trigger1 = Time < 3
trigger1 = random <= 100
value = 189


[State 190, Gwen]
type = ChangeState
trigger1 = Time < 3
trigger1 = random <= 100
value = 198

[State 190, Decend]
type = ChangeState
trigger1 = Time = 4
value = 194



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

[State 190, 4]
type = ChangeState
trigger1 = Time = 100
value = 198
 ;----------------------------------------------------another intro with greengoblin-------
[Statedef 189]
type = S
ctrl = 0
anim = 196
velset = 0,0



[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
x = -100


[State 189, 1]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = time > 150
x = .3

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = time > 150
x = -.3

[State 189, Explod]
type = Explod
trigger1 = time = 0
anim = 189
ID = 189
pos = 90,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0

[State 0, Explod]
type = Explod
trigger1 = animelem = 10
anim = 9101
ID = 9100
pos = 0,-5
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 350
value = S8000,4
volume = 0
channel = -1
;lowpriority = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 310
value = S1100,1
volume = 0
channel = -1
;lowpriority = -1



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







[State 0, ChangeState]
type = ChangeState
trigger1 = time = 500
value = 197
ctrl = 0





[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 5,0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = .1

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -.1

[State 20, 2]
type = VelSet
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = time > 100
trigger1 = time < 1000
x = 0


[State 0, PosSet]
type = Posadd
trigger1 =  time = 0
x = -200


[State 0, VelSet]
type = VelSet
trigger1 = time = 45
x = 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 83
x = 4
y = -2

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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 86
x = 3
y = -2

 [State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 86
value = S8100,0
volume = 0
channel = -1


 [State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1500
trigger2 = time = 1600
value = S15,6
volume = 0
channel = -1


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

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

[State 10452, PlaySnd]
type = PlaySnd
trigger1 =  time = 1590
trigger2 =  time = 1605
trigger3 =  time = 1615
trigger4 =  time = 1695
trigger5 =  time = 1715
trigger6 =  time = 1725
value = 15,3
volume = -200

[State 10452, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 82
value = 15,3

[State 10452, PlaySnd]
type = PlaySnd
trigger1 = time = 300
value = 15,18


[State 10452, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = 15,9

[State 194, Explod]
type = Explod
trigger1 = time = 120
anim =  188
pos = -100,0
postype = p1  ;p2,front,back,left,right
removetime = 1830
sprpriority = 0
ontop = 0
shadow = 0,0,0
velset = 4,0

[State 194, Explod]
type = Explod
trigger1 = time = 1520
trigger2 = time = 1530
anim =  186
pos = -30,-100
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 0
ontop = 1
shadow = 0,0,0

[State 194, Explod]
type = Explod
trigger1 = time = 1535
trigger2 = time = 1525
anim =  186
pos = -50,-80
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 0
ontop = 0
shadow = 0,0,0


[State 194, Explod]
type = Explod
trigger1 = time = 1570
anim =  198
pos = -30,-100
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 0
ontop = 1
shadow = 0,0,0

[State 194, Explod]
type = Explod
trigger1 = time = 1575
anim =  198
pos = -50,-80
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 0
ontop = 0
shadow = 0,0,0


[State 194, Explod]
type = Explod
trigger1 = time = 1570
anim =  198
pos = -60,-100
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 0
ontop = 1
shadow = 0,0,0

[State 194, Explod]
type = Explod
trigger1 = time = 1575
anim =  198
pos = -40,-70
postype = p1  ;p2,front,back,left,right
removetime = -2
sprpriority = 0
ontop = 0
shadow = 0,0,0

[State 0, PosSet]
type = Velset
trigger1 = animelem = 98
y = 0
x = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 99
y = 0

[State 0, PosAdd]
type = Posset
trigger1 =  animelem = 99
x = 000

[State 0, PosAdd]
type = Posadd
trigger1 =  animelem = 100
x = -100

[State 194, PlaySnd]
type = PlaySnd
trigger1 =  time = 2000
value = S15,13

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


[State 194, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = time >340
flag = nomusic

[State 19, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 193

;---------------------------------------------------------------------------
; Introduction 01 - Gwen Stacey
[Statedef 198]
type = S
ctrl = 0
anim = 191
velset = 0,0

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

 [State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = .2

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -.2

[State 198, 4]
type = ChangeState
trigger1 = Time = 100
value = 191
;---------------------------------------------------------------------------
;fly over head intro  3d
[Statedef 196]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 1200

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
trigger1 = prevstateno != 180
x = 0
y = 3


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

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
trigger1 = prevstateno != 180
x = 0
y = -400

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 40
trigger1 = prevstateno != 180
value = 0
scale = .1,.1

[State 0, VelSet]
type = VelSet
trigger1 = time = 100
x = 0
y = 0

[State 0, AngleDraw]
type = Angledraw
trigger1 = prevstateno != 180
trigger1 = time <= 60
trigger1 = time > 40
value = 1
scale = .2,.2
persistent = 1

[State 0, AngleDraw]
type = Angledraw
trigger1 = prevstateno != 180
trigger1 = time <= 75
trigger1 = time > 60
value = 2
scale = .3,.3
persistent = 1

[State 0, AngleDraw]
type = Angledraw
trigger1 = prevstateno != 180
trigger1 = time <= 95
trigger1 = time > 75
value = 3
scale = .4,.4
persistent = 1

[State 0, AngleDraw]
type = Angledraw
trigger1 = prevstateno != 180
trigger1 = time <= 110
trigger1 = time > 95
value = 4
scale = .5,.5
persistent = 1

[State 0, AngleDraw]
type = Angledraw
trigger1 = prevstateno != 180
trigger1 = time <= 120
trigger1 = time > 110
value = 5
scale = .6,.6
persistent = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 60
value = S54,19



[State 0, AngleDraw]
type = Angledraw
trigger1 = prevstateno != 180
trigger1 = time <= 130
trigger1 = time > 120
value = 4
scale = .7,.7

[State 0, AngleDraw]
type = Angledraw
trigger1 = prevstateno != 180
trigger1 = time <= 135
trigger1 = time > 130
value = 3
scale = .8,.8

[State 0, AngleDraw]
type = Angledraw
trigger1 = prevstateno != 180
trigger1 = time <= 140
trigger1 = time > 135
value = 2
scale = .9,.9

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = prevstateno = 180
value = 1200



[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 145
trigger1 = time > 140
value = 1
scale = 1.3,1.3

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 150
trigger1 = time > 145
value = -1
scale = 2.5,2.5

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 155
trigger1 = time > 150
value = -2
scale = 3.5,3.5

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 160
trigger1 = time > 155
value = -1
scale = 4,4

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 170
trigger1 = time > 160
value = -1
scale = 5,5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time >= 170
flag = invisible

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

[State 0, PosAdd]
type = PosAdd
trigger1 = time > 70
trigger1 = prevstateno != 180
x = -.5




[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = time < 50
x = .5

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = time < 50
x = -.5



[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = time > 50
trigger1 = time < 120
x = 1

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = time > 50
trigger1 = time < 120
x = -1



[State 0, ChangeState]
type = ChangeState
trigger1 = time = 181
value = 194
ctrl = 0

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





; Introduction 01b - Gwen Stacey
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 5,-5

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

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

;[State 190, 4] ;Change to stand state
;type = Changeanim
;trigger1 = AnimTime = 0
;value = 2
[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = animtime = 0;time = 60
value = 192
;---------------------------------------------------------------------------
; Introduction 01c  - Gwen Stacey
[Statedef 192]
type = S
ctrl = 0
anim = 190
velset = 0,0


[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = .2

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -.2


[State 192, 1]
type = PosAdd
trigger1 = time = 0
x = -215
y = 209;300;209

[State 192, Explod]
type = Explod
trigger1 = time = 30
anim =  7320
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = 300
sprpriority = 0
ontop = 0
shadow = 0,0,0

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

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

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

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 193

;---------------------------------------------------------------------------
; Introduction 02 - Decend
[Statedef 194]
type = S
ctrl = 0
anim = 190
velset = 0,0

;[State 192, 1]
;type = PosAdd
;trigger1 = time = 0
;x = -215
;y = 209;300;209

[State 194, Explod]
type = Explod
trigger1 = time = 30
anim =  7320
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = 300
sprpriority = 0
ontop = 0
shadow = 0,0,0

[State 194, PlaySnd]
type = PlaySnd
trigger1 =  time = 100
value = S15,1


[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = .2

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -.2


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

[State 19, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 193

;---------------------------------------------------------------------------
; Introduction 03 - Jump on Glider
[Statedef 197]
type = S
ctrl = 0
anim = 197
velset = 0,0

[State 197, PlaySnd]
type = PlaySnd
trigger1 = animelem=6
value = S1100,1

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

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

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

[State 190, 4]
type = ChangeState
trigger1 = animelem = 12
value = 193
;----------------------------------------Intro 199---Green Goblin Intro---
[Statedef 199]
type = S
ctrl = 0
anim = 199
velset = 0,0


[State 199, Explod]
type = Explod
trigger1 = time = 30
anim =  7320
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = 300
sprpriority = 0
ontop = 0
shadow = 0,0,0

[State 199, Explod]
type = Explod
trigger1 = time = 310
anim =  198
pos = -100,-80
postype = p1  ;p2,front,back,left,right
removetime = 144
sprpriority = 0
ontop = 1
shadow = 0,0,0


 [State 199, Explod]
type = Explod
trigger1 = time = 510
anim =  1977
pos = 00,0
postype = p1  ;p2,front,back,left,right
removetime = 137
sprpriority = 0
ontop = 1
shadow = 0,0,0


[State 199, PlaySnd]
type = PlaySnd
trigger1 =  time = 560
value = S15,9


[State 199, PlaySnd]
type = PlaySnd
trigger1 =  time = 350
value = S15,6

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

[State 199, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 193




;-----------------------------------------------
[Statedef 193]; Move around before match
type = S
physics =S
sprpriority = 0

[State 0]
type = varset
trigger1 = time = 1
var(50) = 0

[State 0]
type = posset
trigger1 = 1
y = 0

[State 0]
type = VelSet
trigger1 = Time = 0
y = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = 2.4

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -2.0

[State 2]
type = ChangeAnim
trigger1 = command = "holdfwd"
trigger1 = Anim != 20
value = 20

[State 2]
type = ChangeAnim
trigger1 = command = "holdback"
trigger1 = Anim != 21
value = 21

[State 2]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 0
value = 0

[State 20, 2]
type = VelSet
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
x = 0

[State var]
type = VarSet
trigger1 = roundstate != 2
var(9) = floor(pos x)

[State F]
type = posset
trigger1 = roundstate = 2
trigger1 = var(9) != 0
x = var(9)

[State F]
type = varset
trigger1 = roundstate = 2
var(9) = 0

[State F]
type = changestate
trigger1 = ctrl
value = ifelse((command = "holdfwd") || (command ="holdback"),20,0)

;--------------------------------------------------------------------------------
;Jump Start
[Statedef 40]
type    = a
physics = n
anim = 0
ctrl = 1
sprpriority = 1

[State 40, 4]
type = VelSet
trigger1 = command != "holdfwd"
trigger2 = command != "holdback"
trigger3 = command != "holdup"
trigger4 = command != "holddown"
x = 0
y = 0

[State 40, 4]
type = VelSet
trigger1 = command = "holdfwd"
x = 5

[State 40, 4]
type = VelSet
trigger1 = command = "holdback"
x = -5

[State 40, 4]
type = VelSet
triggerall = command = "holdup"
trigger1 = Pos Y >= -120
y = -5

[State 40, 4]
type = VelSet
triggerall = command = "holddown"
trigger1 = Pos Y <= -5
y = 5

[State -2, turn]
type = turn
trigger1 = P2Dist x <= -10
[State 370, end]
type = changestate
trigger1=Lose=1
trigger2 = Win=1
trigger3 =DrawGame=1
value = 50


;posset added to fix char falling through floor
[State -2, PosSet]
type = PosSet
trigger1 = p2dist y > 1000
x = 0
y = 0
ignorehitpause = 1
persistent =1

[State -2, PosSet2]
type = PosSet
trigger1 = pos y > 0000
x = 0
y = 0
ignorehitpause = 1
persistent =1




;---------------------------------------------------------------------------------------------
;Taunt

[Statedef 195]
type = A
movetype = I
physics = N
ctrl = 0
anim = 195
velset = 0,0
sprpriority = 0

;[State 0, PlaySnd]
;type = PlaySnd
;trigger1 = animelem=1
;value = S15,14
;volume = 0
;channel = -1
;temporarily changed taunt (for testing purposes)


[State 195, VarSet]
type = VarRandom
trigger1 = time =0
v = 28
range = 6,8


[state 195, varrangeset]
type = VarRangeSet
trigger1 = 1
value = 27
first = 0
last =  1
;fvalue = 0
;first = 0
;last = 39
;ignorehitpause =
;persistent =




[State 195, ChangeState]
type = ChangeState
trigger1 = prevstateno != 10000
;trigger1 = AnimTime = 0
value = 10000
;value = 0
ctrl = 1

 [State 195, Helper]
type = Helper
trigger1 =  prevstateno = 10000
trigger1 = var(27) >= 1
helpertype = normal ;player
name = "hellfire"    ;animation stolen from blackheart
ID =  10011
stateno =   10001
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove

[State 195, ChangeState]
type = ChangeState
trigger1 = prevstateno = 10000
value = 10000
ctrl = 1


;---------------------------------------------------------------------------
;Basic Attacks
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Standing Light Punch

[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 200
poweradd = 25
sprpriority = 2

[State 200, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 200, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,11
;pausetime = 5,10
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 8000,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 200]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7770
scale = 1,1

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

;---------------------------------------------------------------------------
; Standing Medium Punch

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 210
poweradd = 45
sprpriority = 2

[State 210, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 210, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 10,14
sparkno = s6667
sparkxy = -10,-90
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 210]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7771
scale = 1,1

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

;---------------------------------------------------------------------------
; Heavy Punch

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

[State 220, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 220, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 420, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 45,1
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 14,12
pausetime = 19,22
sparkno = s6668
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = 5,4
ground.type = High
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = 0, -17
air.velocity = 0,-14
airguard.velocity = -6,0
;yaccel = 0.39+(enemynear,const(movement.yaccel)/2)

[State 450, 4]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4444
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, 5]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4445
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 220]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7772
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Standing light kick

[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 230
poweradd = 25
sprpriority = 2

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

[State 230, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 230, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = -1
sparkxy = -10, -40
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

[State 230]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x - -10,p2dist y - 5
anim = 7770
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Standing medium kick

[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 240
poweradd = 45
sprpriority = 2

[State 240, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 240, HitDef]
type = HitDef
trigger1 = time =0
attr = S,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = s6667
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

[State 240]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x - -10,p2dist y - 5
anim = 7771
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Standing strong Kick

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

[State 250, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 250, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 250, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 55,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,14
;pausetime = 13,14
sparkno = s6668
sparkxy = -10, -70
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -8,0
air.type = Low
air.hittime = 5
air.velocity = -7,0

[State 250]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7772
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Crouching light punch

[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 400
poweradd = 25
sprpriority = 2

[State 400, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 400, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = -1
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

[State 400]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x - -10,p2dist y - 5
anim = 7770
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Crouching medium punch

[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 410
poweradd =45
sprpriority = 2

[State 410, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 410, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 1,14
sparkno = s6667
sparkxy = -10,-58
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

[State 410]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x - -10,p2dist y - 5
anim = 7771
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Crouching strong punch

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

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 420, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 420, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 220, HitDef]
type = HitDef
trigger1 = animelem=3
attr = S,NA
damage = 35,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = s6668
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10
air.type = Low
air.hittime = 18
air.velocity = -6,-7
envshake.time = 2
envshake.ampl = 2

[State 420]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x - -10,p2dist y - 5
anim = 7772
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Crouching light kick

[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 430
poweradd = 25
sprpriority = 2

[State 430, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 430, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 430, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 15,1
animtype = Light
hitflag = MA
guardflag = L
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = -1
sparkxy = -10, -30
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

[State 430]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x - -10,p2dist y - 5
anim = 7770
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Crouching medium kick

[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 440
poweradd = 45
sprpriority = 2

[State 440, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 440, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 440, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 35,1
animtype = Medium
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 8,14
;pausetime = 13,14
sparkno = s6667
sparkxy = -10,-30
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

[State 440]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x - -10,p2dist y - 5
anim = 7771
scale = 1,1

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

;---------------------------------------------------------------------------------------------
;Crouching strong kick

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



;This code here will allow the missiles to be used in air
;without pushing the character through the floor by holding 'down'
;also, the counter-push up only applies if the statetype is in the air
[State 450, PosAdd1]
type = PosAdd
trigger1 = pos y < 0
trigger1 = pos y > -100
trigger1 = statetype != A
x = 0
y = -5


;This is a control just for when you are really high and using missiles
;to prevent the move from sending you TOO high.
[State 450, PosAdd1]
type = PosAdd
trigger1 = pos y < -400
y = 40




[State 450, PosAdd2]
type = PosAdd
trigger1 = pos y > 0
x = 0
y = -15




[State 450, PlaySnd Lock]
type = PlaySnd
trigger1 =  AnimElem = 1
value = S15,5

[State 450, PlaySnd Load]
type = PlaySnd
trigger1 =  AnimElem = 14
trigger1 = NumHelper(10451) <2
value = S15,6


[State 450, ChangeState]
type = ChangeState
trigger1 = AnimElem = 15
trigger1 = NumHelper(10451) <=2         ;this another, unneccesary limit on the missile count
value = 10451         ; you know... just to be safe.
ctrl = 0




;heat seeking
[Statedef 10451]
type = C
movetype = I
physics = N
ctrl = 0
;anim = 450
velset = 0,0
sprpriority = 0

[State 10451, Helper]
type = Helper
;trigger1 =  AnimElem = 14
trigger1 = NumHelper(10451) <= 1 ;this is a limit on missile count
helpertype = normal ;player      ;Because hey, I believe in a freeze
name = "heatseek"                ;on the Arms race....
ID =  10451                      ;
stateno =   451
pos = -60,-26
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove

[State 10451, Helper]
type = Helper
;trigger1 =  AnimElem = 15
trigger1 = NumHelper(10451) <= 1 ;higher number means more missiles
helpertype = normal ;player
name = "heatseek"
ID =  10451
stateno =   451
pos = 10,-25
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove



;heat seeking missile launch ends
[State 10451, ChangeState]
type = ChangeState
trigger1 = animelem >= 15
trigger1 = pos y >= -10
value = 0
ctrl = 1

[State 10451, changestate]
type = ChangeState
trigger1 = pos  y <= -150
value = 10453      ;new code to fix stuck-in-air-after-move bug
ctrl = 0



[State 10451, changestate]
type = ChangeState
trigger1 = pos  y <= -10
trigger1 = pos y > -150
value = 1201    ;new code to fix stuck-in-air-after-move bug
ctrl = 0



[Statedef 10453]
type = C
movetype = I
physics = N
ctrl = 0
anim = 650
velset = 0,6
sprpriority = 0

[State 10453, changestate]
type = ChangeState
trigger1 = pos y >= -15
value = 0
ctrl = 1



[Statedef 451]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 451
poweradd = -15
sprpriority = 2



;heat seeking code...
;this part changes the angle of the missile

[State 451, AngleDraw]
type = AngleDraw
trigger1 = p2dist y > 79
trigger1 = time >= 5
value = (79-(p2dist y))/2
;scale =  (winmugen only)
;ignorehitpause =
;persistent =


[State 451, AngleDraw]
type = AngleDraw
trigger1 = p2dist y < 79
trigger1 = time >= 28
value = ((p2dist y)+79)/2


;this stuff makes the missile helpers fly towards their target
[State 451, heatseekx]
type = PosAdd
trigger1 = p2dist x >= 0
x = 3

[State 451, heatseeky]
type = PosAdd
trigger1 = p2dist y >= 80
y = 2

;[State 451, heatseekxx]
;type = PosAdd
;trigger1 = p2dist x <= 0
;x = -3

[State 451, heatseekyy]
type = PosAdd
trigger1 = p2dist y <= 80
y = -2


[State 451, heatseekxxxx]
type = PosAdd
trigger1 = p2dist x > 200
x = 3


;facing ... makes missiles face target
[State 451, turn]
type = turn
trigger1 = P2Dist x <= -20

;smoke trails
[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 1172
ID =  1172
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,.5
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
trans = add



;Change to exploding animation
[State 451, ChangeState]
type = ChangeState
trigger1 = p2dist x >= -1
trigger1 = p2dist x <= 1
trigger1 = p2dist y <= 82
trigger1 = p2dist y >= 70
trigger2 = time > 130
value = 10452
ctrl = 0
;anim = 10452
;ignorehitpause =1
;persistent =     1
;please note that I had some problems with this changestate.
;The narrow range for X of just 1 to -1 is a band-aide fix to an issue
;which involved multiple helper copies being created of this character
;if the missiles were shot at point-blank range.



[State 451, 2]
type = DestroySelf
trigger1 = animelem = 10
trigger1 = prevstateno = 10452
trigger2 = prevstateno = 451
trigger3 = time > 145


[Statedef 10452]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 10451
poweradd = 15
sprpriority = 1

[State 10452, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 15,3

[State 10452, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = A,NA
damage = 50,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = -1
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -6
air.fall = 0
air.velocity = -3.2, -10.5

[State 10452, destroyself]
type = DestroySelf
trigger1 = animelem = 10
trigger2 = time > 20




;---------------------------------------------------------------------------------------------
;Jumping light punch

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

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

[State 600, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = -1
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -6
air.fall = 0
air.velocity = -3.2, -10.5

[State 600]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7770
scale = 1,1

;adds to air-combo ability
[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelem = 3
trigger1 = movecontact
value = 1

[State 600, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201

;---------------------------------------------------------------------------------------------
;Jumping medium punch

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

[State 610, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 610, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 35,1
animtype = medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = s6667
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity = -3.2, -7.5

[State 610]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7771
scale = 1,1


;adds to air-combo ability
[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelem = 3
trigger1 = movecontact
value = 1

[State 610, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201

;---------------------------------------------------------------------------------------------
;Jumping strong punch

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

[State 620, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 620, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 45,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = s6668
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -12,10
air.hittime = 25
air.fall = 1

[State 620]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7772
scale = 1,1


;adds to air-combo ability
[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelem = 4
trigger1 = movecontact
value = 1



[State 620, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201

;---------------------------------------------------------------------------------------------
;Jumping light kick

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

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

[State 630, HitDef]
type = HitDef
triggerall = anim = 630
trigger1 = time = 0
attr = A,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,14
;pausetime = 13,14
sparkno = -1
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.fall = 0
air.velocity = -3.2, -10.5
air.hittime = 25

[State 630, HitDef]
type = HitDef
triggerall = anim = 631
trigger1 = AnimElem = 2
attr = A,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,14
;pausetime = 13,14
sparkno = -1
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.fall = 0
air.velocity = -3.2, -10.5
air.hittime = 25

[State 630]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7770
scale = 1,1

;adds to air-combo ability
[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelem = 3
trigger1 = movecontact
value = 1


[State 630, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201


;---------------------------------------------------------------------------------------------
;Jumping medium kick

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

[State 640, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 640, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
;pausetime = 13,14
sparkno = s6667
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity = -3.2, -7.5
air.hittime = 25

[State 640]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7771
scale = 1,1


;adds to air-combo ability
[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelem = 4
trigger1 = movecontact
value = 1

[State 640, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201

;---------------------------------------------------------------------------
; Jump Strong Kick
; CNS difficulty: easy
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 70
ctrl = 0
anim = 650

[State 650, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NA
animtype  = Medium
damage    = 35
guardflag = MA
pausetime = 3,11
;pausetime = 11,11
sparkno = 2
sparkxy = -10,-10
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

[State 630, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 650, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1


;---------------------------------------------------------------------------
;Falling

[Statedef 1201]
type    = A
movetype= I
physics = A
anim = 1201
sprpriority = 1

[State 1201, Ctrl]
type = CtrlSet
trigger1 = prevstateno = 4100
value = 0

[State 1201, Ctrl]
type = CtrlSet
triggerall = prevstateno != 4100
trigger1 = Var(12) = 0
value = 0

[State 1201, Ctrl]
type = CtrlSet
triggerall = prevstateno != 4100
trigger1 = Var(12) = 1
value = 1

[State 1201, Turn]
type = Turn
trigger1 = P2Dist X < -5

[State 1201, VelSet]
type = VelSet
trigger1 = FrontEdgeBodyDist <= 0
x = 0

[State 1201, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 52

;---------------------------------------------------------------------------
;Super Moves
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Standing Throw Bomb X
; CNS difficulty: easy
[Statedef 1000]
type = S
movetype = A
physics = S
juggle = 1
ctrl = 0
anim = 1000

[State 1000, 1]
type = Projectile
trigger1 = AnimElem = 3
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 5,0
attr = S, SP
damage = 30,5
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,2
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;---------------------------------------------------------------------------
; Standing Throw Bomb Y
; CNS difficulty: easy
[Statedef 1001]
type = S
movetype = A
physics = S
juggle = 4
ctrl = 0
anim = 1000

[State 1001, 1]
type = Projectile
trigger1 = AnimElem = 3
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 7,0
attr = S, SP
damage = 30,7
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = s15,3
guardsound = S15,2
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;---------------------------------------------------------------------------
; Standing Throw Bomb Z
; CNS difficulty: easy
[Statedef 1002]
type = S
movetype = A
physics = S
juggle = 4
ctrl = 0
anim = 1000

[State 1002, 1]
type = Projectile
trigger1 = AnimElem = 3
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 10,0
attr = S, SP
damage = 30,12
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,3
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;---------------------------------------------------------------------------
; Flying Throw Bomb X
; CNS difficulty: easy
[Statedef 1003]
type = A
movetype = A
physics = S
juggle = 4
ctrl = 0
anim = 1000

[State 1003, 1]
type = Projectile
trigger1 = AnimElem = 3
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 5,6
attr = S, SP
damage = 30,4
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,2
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;---------------------------------------------------------------------------
; Flying Throw Bomb Y
; CNS difficulty: easy
[Statedef 1004]
type = A
movetype = A
physics = S
juggle = 4
ctrl = 610 ;0
anim = 1000

[State 1004, 1]
type = Projectile
trigger1 = AnimElem = 3
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 6,4
attr = S, SP
damage = 17,5
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,2
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;---------------------------------------------------------------------------
; Flying Throw Bomb Z
; CNS difficulty: easy
[Statedef 1005]
type = A
movetype = A
physics = S
juggle = 4
ctrl = 0
anim = 1000

[State 1005, 1]
type = Projectile
trigger1 = AnimElem = 3
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 8,0
attr = S, SP
damage = 22,6
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,3
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1

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

;---------------------------
;Goblin Wire a
[statedef 1100]
type = S
movetype = A
physics = S
anim = 1100
poweradd = 24
velset = 0,0
ctrl = 0

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

[State 1100, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1170
pos = 8,-50
postype = p1
facing = 1
vfacing = 1
bindtime = 1
sprpriority = 2
persistent = 0
ignorehitpause = 1

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 4
value = S15,10
persistent = 0
channel = 0

[State 1100, Hitdef]
type = HitDef
trigger1 = animelem = 4
trigger1 = moveguarded = 0
attr = S,ST
hitflag = MAF
guardflag = MA
sparkxy = 0,-55
sparkno = 1
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
p1stateno = 1103
p2stateno = 1108

[State 1100, Hitdef]
type = HitDef
trigger1 = animelem = 5
trigger1 = moveguarded = 0
attr = S,ST
hitflag = MAF
guardflag = MA
sparkxy = 0,-55
sparkno = 1
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
p1stateno = 1104
p2stateno = 1108

[State 1100, Hitdef]
type = HitDef
trigger1 = animelem = 6
trigger1 = moveguarded = 0
attr = S,ST
hitflag = MAF
guardflag = MA
sparkxy = 0,-55
sparkno = 1
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
guard.dist = 200
p1stateno = 1105
p2stateno = 1108

[State 1100, Hitdef]
type = HitDef
trigger1 = animelem = 7
trigger1 = moveguarded = 0
attr = S,ST
hitflag = MAF
guardflag = MA
sparkxy = 0,-55
sparkno = 1
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
guard.dist = 230
p1stateno = 1106
p2stateno = 1108

[State 1100, Hitdef]
type = HitDef
trigger1 = animelem = 8
trigger1 = moveguarded = 0
attr = S,ST
hitflag = MAF
guardflag = MA
sparkxy = 0,-55
sparkno = 1
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
guard.dist = 250
p1stateno = 1107
p2stateno = 1108

[State 1100, Pullback]
type = ChangeAnim
trigger1 = moveguarded = 1
trigger2 = movehit = 0
trigger2 = animtime = 0
value = 1107
elem = 9
ignorehitpause = 1
persistent = 0

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

[statedef 1103]
type = S
movetype = A
physics = S
anim = 1103
sprpriority = -1
velset = 0,0
ctrl = 0

[State 1103, TaregtBind]
type = TargetBind
trigger1 = stateno = 1103
time = 1
pos = 115,-55

[State 1103, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 1104

[statedef 1104]
type = S
movetype = A
physics = S
anim = 1104
sprpriority = -1
velset = 0,0
ctrl = 0

[State 1104, TaregtBind]
type = TargetBind
trigger1 = stateno = 1104
time = 1
pos = 175,-55

[State 1104, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 1105

[statedef 1105]
type = S
movetype = A
physics = S
anim = 1105
sprpriority = -1
velset = 0,0
ctrl = 0

[State 1105, TaregtBind]
type = TargetBind
trigger1 = stateno = 1105
time = 1
pos = 215,-55

[State 1105, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 1106

[statedef 1106]
type = S
movetype = A
physics = S
anim = 1106
sprpriority = -1
velset = 0,0
ctrl = 0

[State 1106, TaregtBind]
type = TargetBind
trigger1 = stateno = 1106
time = 1
pos = 230,-55

[State 1106, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 1107

[statedef 1107]
type = S
movetype = A
physics = S
anim = 1107
velset = 0,0
sprpriority = -1
ctrl = 0

[State 1107, ScreenBound]
type = ScreenBound
trigger1 = time >= 0
value = 1
movecamera = 1,1
ignorehitpause = 1
persistent = 1

[State 1107, TaregtBind]
type = TargetBind
trigger1 = animelem = 1
time = 4
pos = 130,-35

[State 1107, TaregtBind]
type = TargetBind
trigger1 = animelem = 2
time = 4
pos = 100,-35

[State 1107, TaregtBind]
type = TargetBind
trigger1 = animelem = 3
time = 4
pos = 70,-35

[State 1107, TaregtBind]
type = TargetBind
trigger1 = animelem = 4
time = 4
pos = 40,-35

[State 1107, TaregtBind]
type = TargetBind
trigger1 = animelem = 5
time = 4
pos = 10,-35

[State 1107, ChangeState]
type = ChangeState
trigger1 = animelem = 6
value = 1102
ctrl = 1

[Statedef 1102]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 1102
poweradd = 45
sprpriority = 2

[State 1102, VelMul]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 1102, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 1102, HitDef]
type = HitDef
trigger1 = time =0
attr = S,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = s6667
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -15,-10
air.type = Low
air.hittime = 5
air.velocity = -5,-4
fall=1

[State 1102, Explode]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x - -10,p2dist y - 5
anim = 7771
scale = 1,1

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

[Statedef 1108]
type = S
movetype = H
physics = S
ctrl = 0
anim = 5015
velset = 0,0
sprpriority = 0

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

[State 1108, ChangeAnim]
type = ChangeAnim2
trigger1 = time = 0
value = 1108

[Statedef 1109]
type = S
movetype = H
physics = S
ctrl = 0
anim = 5015
velset = -10,-1.25
sprpriority = 0

[State 1109, ChangeAnim]
type = ChangeAnim2
trigger1 = time = 0
value = 5015

;---------------------------------------------------------------------------------------------
;Special2_b
[Statedef 1110]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 1100
juggle  = 4

[State 1110, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 1110, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1170
pos = 8,-50
postype = p1
facing = 1
vfacing = 1
bindtime = 1
sprpriority = 2
persistent = 0
ignorehitpause = 1

[State 1110, 3]
type = PlaySnd
trigger1 = animelem = 4
value = S15,10
persistent = 0
channel = 0

[State 1110, HitDef]
type = HitDef
trigger1 = time =0
attr = S,NA
damage = 50,2
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 8,14
sparkno = s6667
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -15,-5
air.type = Low
air.hittime = 5
air.velocity = -15,-5
fall=1


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

;---------------------------------------------------------------------------------------------
;Special2_c
[Statedef 1120]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 1100
juggle  = 4

[State 1120, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 1120, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1170
pos = 8,-50
postype = p1
facing = 1
vfacing = 1
bindtime = 1
sprpriority = 2
persistent = 0
ignorehitpause = 1

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 4
value = S15,10
persistent = 0
channel = 0

[State 1120, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 50,2
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,14
;pausetime = 13,14
sparkno = s6667
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -15,-5
air.type = Low
air.hittime = 5
air.velocity = -15,-5
p2stateno = 7600

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


;--------------------------------1200 3D fly at screen move----
[Statedef 1200]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 0
velset = 3,-1

[State 0, VelAdd]
type = VelAdd
triggerall = time < 90
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
y = -2

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

[State 0, AngleDraw]
type = Angleadd
trigger1 = time > 1
trigger1 = time < 90
value = 10

[State 0, AngleDraw]
type = Angleadd
trigger1 = time > 10
trigger1 = time < 90
value = 20

[State 0, AngleDraw]
type = Angleadd
trigger1 = time > 30
trigger1 = time < 90
value = 30

[State 0, AngleDraw]
type = Angleset
trigger1 = time > 40
trigger1 = time < 90
value = 70

[State 0, VelSet]
type = VelSet
trigger1 = time = 90
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 =  time = 95
x = 0
y = -280

 [State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 93
value = 1200

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time > 90
;value =  (winmugen only)
scale = .01,.01

[State 0, ChangeAnim]
type = Changestate
trigger1 = time = 191
value = 1202

;---------------------------------------------
[Statedef 1202]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 1200
velset = 0,2
sprpriority = -3

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = time > 120
x = 2.0

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = time > 120
x = -2.0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = time < 50
x = .5

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = time < 50
x = -.5

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = time > 50
trigger1 = time < 120
x = 1

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = time > 50
trigger1 = time < 120
x = -1

[State 20, 1]
type = VelSet
trigger1 = command = "holddown"
trigger1 = time > 70
y = 2

[State 20, 2]
type = VelSet
trigger1 = command = "holdup"
trigger1 = time > 70
y = -.3

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 40
value = 0
scale = .1,.1

[State 0, VelSet]
type = VelSet
trigger1 = time = 100
x = 0
y = 0

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 60
trigger1 = time > 40
value = 2
scale = .2,.2
persistent = 1

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 75
trigger1 = time > 60
value = 4
scale = .3,.3
persistent = 1

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 95
trigger1 = time > 75
value = 6
scale = .4,.4
persistent = 1


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 110
trigger1 = time > 95
value = 8
scale = .5,.5
persistent = 1

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 120
trigger1 = time > 110
value = 6
scale = .6,.6
persistent = 1

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 130
trigger1 = time > 120
value = 4
scale = .7,.7

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 135
trigger1 = time > 130
value = 0
scale = .8,.8

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 140
trigger1 = time > 135
value = -2
scale = .9,.9

[State 0, AngleDraw]
type = Angledraw
trigger1 = time = 142
value = -6
scale = 1.2,1.2
sprpriority = -3

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 145
trigger1 = time > 141
value = -10
scale = 1.3,1.3

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 150
trigger1 = time > 145
value = -8
scale = 2.5,2.5

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 155
trigger1 = time > 150
value = -2
scale = 3.5,3.5

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 160
trigger1 = time > 155
value = 3
scale = 4,4

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 170
trigger1 = time > 160
value = 5
scale = 5,5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time > 170
flag = invisible

[State 0, PosSet]
type = PosSet
trigger1 = time > 170
trigger1 = prevstateno = 1202
x = 0
y = -400

[State 0, PosSet]
type = PosSet
trigger1 = time > 170
trigger1 = prevstateno != 1202
x = 0
y = -300



[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 60
value = S54,19

[State 1202, HitDef]
type = HitDef
trigger1 = animelem = 2
attr = A,ST        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = A         ;HLA
pausetime =2,2
damage = 146,50
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
kill = 0




[State 810, TargetState]
type = TargetState
trigger1 = movecontact
value = 1203

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 260
trigger1 = prevstateno = 1202
trigger2 = time = 90
trigger2 = prevstateno = 180
value = 1201
ctrl = 1
;note that 1201 is falling animation


[State 0, ChangeState]
type = ChangeState
trigger1 = time = 265
trigger1 = prevstateno != 1202
value = 1202


;---

[Statedef 1203]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 5000




[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 30
value = 1
scale = 1.1,1.1


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 40
trigger1 = time > 30
;value = -5
scale = 1.2,1.2


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 45
trigger1 = time > 40
;value = -10
scale = 1.3,1.3

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 50
trigger1 = time > 45
;value = -16
scale = 2.5,2.5


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 55
trigger1 = time > 50
;value = -20
scale = 3.5,3.5


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 60
trigger1 = time > 55
;value = -26
scale = 4,4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time =60
value = 5011

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time =120
value = 5052


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 60
value = S54,21
volume = 200


[State 0, LifeAdd]
type = LifeAdd
trigger1 = time = 120
value = -100
kill = 0

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 95
trigger1 = time > 60
;value = -30
scale = 5,5


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 100
trigger1 = time > 95
;value = -35
scale = 4.5,4.5


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 105
trigger1 = time > 100
;value = -35
scale = 4,4


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 110
trigger1 = time > 105
;value = -30
scale = 3.5,3.5


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 115
trigger1 = time > 110
;value = -30
scale = 3,3


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 120
trigger1 = time > 115
;value = -25
scale = 2.5,2.5


[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 125
trigger1 = time > 120
;value = -25
scale = 2,2

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 128
trigger1 = time > 125
;value = -20
scale = 1.8,1.8

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 131
trigger1 = time > 128
;value = -20
scale = 1.5,1.5

[State 0, AngleDraw]
type = Angledraw
trigger1 = time <= 135
trigger1 = time > 131
;value = -20
scale = 1.2,1.2

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time > 100
value = -1

[State 0, PosSet]
type = PosSet
trigger1 = time = 40
y = 200

[State 0, PosSet]
type = PosSet
trigger1 = time = 50
x = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 135
value = 1201
ctrl = 0
anim = 5012

[State 0, PosSet]
type = PosSet
trigger1 = time = 90
y = -70








;---------------------------------------------------------------------------
;Hypers
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------------------------
;Hyper1
[Statedef 3000]
 type    = S
movetype= A
physics = N
juggle  = 1
velset = -5,-10
poweradd = 0
anim = 3000
ctrl = 0
sprpriority = 2

[State 210, HitDef]
type = HitDef
trigger1 = animelem=1
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 19,70
sparkno = s6667
sparkxy = -10,-90
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 3000, End]
type = ChangeState
trigger1 = time = 10
value = 3001
ctrl = 0

[Statedef 3001]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3001
ctrl = 0
sprpriority = 2

[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 0
anim = 1080
postype = back
sprpriority = -3
supermovetime = -1
removetime = 60
pos = 0,0
bindtime = -1
removeongethit = 1

[State 3000, assertspecial]
type = assertspecial
trigger1 = time = [0,40]
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 0
Time = 60
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 40

[State 3100, HyperBg]
type = Explod
trigger1 = time = 42
anim = 750
pos = 0,0
sprpriority = -4
postype = front
bindtime = -1
removetime = 135
removeongethit = 1
pos = ifelse(facing = -1,-1,0),0
facing = facing
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1

[State 3000, HyperBg]
type = Explod
trigger1 = time = 42
anim = 753
pos = 0,0
sprpriority = -3
postype = front
bindtime = -1
removetime = 135
removeongethit = 1
pos = ifelse(facing = -1,-1,0),0
facing = facing
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1

[State 3000, Hyper Explode]
type = Explod
trigger1 = time = 15;AnimElem = 1
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, Hyper Circle]
type = Explod
trigger1 = Time = 30
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, som]
type = PlaySnd
trigger1 = Time = 12
value = 8889,0

[State 3000, Ground Flash]
type = Explod
trigger1 = time = 15
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 0

[State 3000, End]
type = ChangeState
trigger1 = animtime=0
trigger1 = BackEdgeBodyDist > -1
value = 3002
ctrl = 0

[Statedef 3002]
 type    = S
movetype= A
physics = N
juggle  = 1
velset = 8,7
poweradd = 0
anim = 3002
ctrl = 0
sprpriority = 2


[State 3002, HitDef]
type = HitDef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 17,30
sparkno = s6667
sparkxy = -10,-90
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 3000, End]
type = ChangeState
trigger1 = time = 15
value = 3003
ctrl = 0

[Statedef 3003]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3003
ctrl = 0
sprpriority = 2




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

[State 0, VelAdd]
type = VelAdd
trigger1 =  animelem = 2
x = 10
y = 0


[State 3002, HitDef]
type = HitDef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 15,30
sparkno = s6667
sparkxy = -10,-90
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 3002, HitDef]
type = HitDef
trigger1 = animelem = 4
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 15,30
sparkno = s6667
sparkxy = -10,-90
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1
fall = 1

[State 3002, PosSet]
type = PosSet
trigger1 = animelem = 5
y = -1

 ;keyword

[State 3000, End]
type = ChangeState
trigger1 = animelem = 5
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Hyper2

[Statedef 3100]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = -1000
ctrl = 0
sprpriority = 2

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 1
value = S15,12
persistent = 0
channel = 0

[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 0
anim = 1080
postype = back
sprpriority = -3
supermovetime = -1
removetime = 60
pos = 0,0
bindtime = -1
removeongethit = 1



[State 3100, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 0
Time = 60
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 40

[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 15
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Hyper Circle]
type = Explod
trigger1 = Time = 30
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 12
value = 8889,0

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 15
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 0




[State 3100, End]
type = ChangeState
trigger1 = time = 50
value = 3101
ctrl = 0

;----------------------------
;Non working pumpkin super / hyper
;

[Statedef 3600]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 0
ctrl = 0
sprpriority = 2

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 1
value = S15,15
persistent = 0
channel = 0

[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 0
anim = 1080
postype = back
sprpriority = -3
supermovetime = -1
removetime = 60
pos = 0,0
bindtime = -1
removeongethit = 1

[State 3100, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 0
Time = 60
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 40

[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 15
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Hyper Circle]
type = Explod
trigger1 = Time = 30
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 12
value = 8889,0

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 15
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 0

[State 3600, End]
type = ChangeState
trigger1 = time = 50
value = 3101
ctrl = 0

;----------------------------
;hyper3
;;hyper 3 is when you zoom in, kick butt, then attack with glider


[Statedef 3400]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 740
ctrl = 0
sprpriority = 2


[State 3400, Hyper Portrait]
type = explod
trigger1 = time = 0
anim = 1080
postype = back
sprpriority = -3
supermovetime = -1
removetime = 60
pos = 0,0
bindtime = -1
removeongethit = 1

[State 3400, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 0
Time = 60
pos = 9999,-9951
sound = 8889,0
poweradd = -1
movetime = 40

[State 3400, Hyper Explode]
type = Explod
trigger1 = time = 15
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3400, Hyper Circle]
type = Explod
trigger1 = Time = 30
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3400, Sound]
type = PlaySnd
trigger1 = Time = 12
value = 8889,0

[State 3400, Ground Flash]
type = Explod
trigger1 = time = 15
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 0

[State 3400, End]
type = ChangeState
trigger1 = time = 50
value = 3402
ctrl = 0

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 1
value = S15,12
persistent = 0
channel = 0



  ;
[Statedef 3402, 0]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 30,0
poweradd = 0
anim = 3402
ctrl = 0
sprpriority = 2


[State 3202, heatseekx]
type = PosAdd
trigger1 = p2dist x > 80
x = 2

[State 3202, not_too_close]
type = PosAdd
trigger1 = p2dist x < 60
x = -1


[State 3202, heatseeky]
type = PosAdd
trigger1 = p2dist y > 10
y = 10

;super-stun-pumpkin-bomb of other hyper
[State 3402,1]
type = projectile
trigger1 = AnimElem = 3
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 10,0
attr = S, SP
damage = 15,3
getpower = 6
givepower = 40
guardflag = MA
pausetime = 10,20
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,3
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime = 0
ground.velocity = -0
airguard.velocity =  -0,-2.75
air.velocity = -.5,-.5
air.juggle = 3
air.fall = 1


[State 3402, 2]
type = PlaySnd
trigger1 =  AnimElem = 6
trigger2 =  AnimElem = 12
trigger3 =  AnimElem = 15
value = s8000, 3

[State 3402, 3]
type = PlaySnd
trigger1 =  AnimElem = 9
trigger2 =  AnimElem = 19
value = s8000, 2

[State 3402, 4]
type = PlaySnd
trigger1 =  AnimElem = 11
trigger2 =  AnimElem = 18
value = s8000, 4

[State 3402, 4]
type = PlaySnd
trigger1 =  AnimElem = 22
value = s15, 14

[State 3402, 5]
type = PlaySnd
trigger1 =  AnimElem = 27
value = s8000, 8










[State 3402, 6]
type = HitDef
trigger1 =  AnimElem = 6
attr = S,NA
damage = 1,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,21
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -1
air.type = Low
air.hittime = 15
air.velocity = -0,-5
envshake.time = 1
envshake.ampl = 1



[State 3402, 6]
type = HitDef
trigger1 = animelem = 9
attr = S,NA
damage = 1,1
animtype = medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,19
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 1
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1



[State 3402, 6]
type = HitDef
trigger1 = animelem = 12
attr = S,NA
damage = 1,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,19
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -0
air.type = Low
air.hittime = 15
air.velocity = -0,-5
envshake.time = 1
envshake.ampl = 1





[State 3402, 6]
type = HitDef
trigger1 = animelem = 15
attr = S,NA
damage = 1,1
animtype = medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,19
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 2
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 4

[State 3402, 6]
type = HitDef
trigger1 = animelem = 18
attr = S,NA
damage = 1,1
animtype = medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,19
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = high
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 1
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 4



[State 3402, 6]
type = HitDef
trigger1 = animelem = 19
attr = S,NA
damage = 1,1
animtype = high
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,50
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 35
ground.velocity = 0, -7
air.type = Low
air.hittime = 45
air.velocity = -0,-5
envshake.time = 1
envshake.ampl = 1

[State 3402, Turn]
type = Turn
trigger1 = p2dist x < 1
ctrl = 0


[State 3402, End]
type = ChangeState
trigger1 = animelem = 22
value = 1200
ctrl = 0

;----------------------------------------------------------------------
;another hyper
;
[Statedef 3101]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 9,-5
poweradd = -1000
anim = 3100
ctrl = 0
sprpriority = 2

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 3100, HyperBg]
type = Explod
trigger1 = time = 0
anim = 750
pos = 0,0
sprpriority = -4
postype = front
bindtime = -1
removetime = 330
removeongethit = 1
pos = ifelse(facing = -1,-1,0),0
facing = facing
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1

[State 3100, HyperBg]
type = Explod
trigger1 = time = 0
anim = 753
pos = 0,0
sprpriority = -3
postype = front
bindtime = -1
removetime = 330
removeongethit = 1
pos = ifelse(facing = -1,-1,0),0
facing = facing
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1

[State 3100, 1]
type = Projectile
trigger1 = AnimElem = 3
trigger2 = AnimElem = 15
trigger3 = AnimElem = 27
trigger4 = AnimElem = 39
trigger5 = AnimElem = 51
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 10,0
attr = S, SP
damage = 15,3
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,3
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 1
;air.fall = 1

[State 3100, 1]
type = Projectile
trigger1 = AnimElem = 11
trigger2 = AnimElem = 23
trigger3 = AnimElem = 35
trigger4 = AnimElem = 47
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 10,2
gravity = 20
attr = S, SP
damage = 15,3
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,3
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 1
;air.fall = 1

[State 3100, 1]
type = Projectile
trigger1 = AnimElem = 7
trigger2 = AnimElem = 19
trigger3 = AnimElem = 31
trigger4 = AnimElem = 39
trigger5 = AnimElem = 43
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 10,-2
attr = S, SP
damage = 15,3
getpower = 60
givepower = 40
guardflag = MA
pausetime = 0,12
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,3
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 1
;air.fall = 1

[State 3100, 1]
type = Projectile
trigger1 = AnimElem = 55
projanim = 1700
projhitanim = 1701
projhits = 1
offset = 23, -82
velocity = 10,-2
attr = S, SP
damage = 15,3
getpower = 60
givepower = 40
guardflag = MA
pausetime = 40,120
;sparkno = 3
;sparkxy = 82,0
hitsound = S15,3
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8
airguard.velocity = -3.5,-2.75
air.velocity = -2.5,-5.5
air.juggle = 3
air.fall = 1
;fall = 1

;getting ready to make new super

[State 3101, End]
type = ChangeState
trigger1 = animtime = 0
;value = 100
value = 3102
ctrl = 0

[State 1015, 2]
type = PosAdd
trigger1 = p2dist x > 100
x = 1

[Statedef 3102]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 30,0
poweradd = 0
anim = 16000
;anim = 3102
ctrl = 0
sprpriority = 2


[State 100, 3]
type = PlaySnd
trigger1 = animelem = 6
value = S8000,0
persistent = 0
channel = 0



[State 3102, End]
type = ChangeState
trigger1 = animtime = 40
value = 400
ctrl = 0

[State 100, 3]
type = PlaySnd
trigger1 = animelem = 2
value = S15,11
persistent = 0
channel = 0




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

;---------------------------------------------------------------------------------------------
;Beginning of the super jump
[Statedef 7000]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdfwd"
v = 11
value = 1

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdback"
v = 11
value = -1

[State 7000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 7001
ctrl = 1

;---------------------------------------------------------------------------------------------
[Statedef 4210]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,-16
sprpriority = 0

[State 4210, VelSet 2]
type = VelSet
trigger1 = (Pos Y >= 10) && (Vel Y > 0)
y = 0

[State 4210, VelSet]
type = VelSet
trigger1 = (Pos Y >= 10) && (Vel Y > 0)
y = 10

[State 4210, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 4210

[State 4210, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

[State 4210, ChangeState]
type = ChangeState
trigger1 = Time = 40
value = 4211
ctrl = 0

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

[Statedef 4211]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 3

[State 4211, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 4211

[State 4211, VelAdd]
type = VelAdd
trigger1 = Time > 49
y = 0.5

[State 4211, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

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

[Statedef 4212]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 0

[State 4212, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 4212

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

[Statedef 4213]
type    = L
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 0

[State 4213, SelfState]
type = SelfState
trigger1 = Time = 0
value = 5100
ctrl = 0


;---------------------------------------------------------------------------------------------
;Backbreaker

[Statedef 4551]
type    = A
movetype= A
physics = N
anim = 871
ctrl = 0

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

[State 4551, Explod]
type = Explod
trigger1 = time = 0
anim = 8396
ID = 8396
postype = P2
pos  =  -5,-23
sprpriority = 3
ignorehitpause = 1
ownpal = 1

[State 4551, Width]
type = Width
trigger1 = Time >= 0
value = 25,10

[State 4551, PosFreeze]
type = PosFreeze
trigger1 = Time = [0,5]
value = 1

[State 4551, Jumping Up 1]
type = VelSet
trigger1 = Time = [0, 34]
x = 0
y = -24

[State 4551, Jumping Up 2]
type = VelSet
trigger1 = Time = 34
x = 0
y = 26

[State 4551, Jumping Up 2]
type = VelSet
trigger1 = Time >= 35
x = 0
y = 28

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

[State 4551, PlaySnd 2]
type = PlaySnd
trigger1 = Time = 5
value = 9999,2

[State 4551, Bind 1]
type = TargetBind
trigger1 = Time >= 0
pos = 45,-85

[State 4551, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 20
value = 4552
ctrl = 0

[Statedef 4552]
type    = S
movetype= A
physics = S
anim = 872
velset = 0,0
poweradd = 0
sprpriority = -1

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

[State 4552, TargetBind]
type = TargetBind
trigger1 = Time = 0
pos = 10,-34

[State 4552, PosSet]
type = PosSet
trigger1 = Time = 0
Y = 0

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

[State 4552, EnvShake]
type = EnvShake
trigger1 = Time = 0
ampl = -35
time = 15

[State 4552, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Time = 0
value = -70

[State 4552, TargetState]
type = TargetState
trigger1 = Time = 15
value = 4556

[State 4552, Explod]
type = Explod
trigger1 = time = 0
anim = 8394
ID = 8394
postype = P2
pos  =  0,0
sprpriority = 2
ignorehitpause = 1
ownpal = 1

[State 4552, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 4553
ctrl = 0

[Statedef 4553]
type = A
movetype = A
physics = A
anim = 4006
velset = -9,-14


[State 4006, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 4006, Vel]
type = VelAdd
trigger1 = 1
y = .02

[State 4006,ChangeState]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;---------------------------------------------------------------------------------------------
;Backbreaker - p2

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

[State 4555,SprPriority]
type = SprPriority
trigger1 = P2StateNo = 872
value = 3

[State 4555, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 875

[State 4555, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time > 0 && P2StateNo = 872
value = 4556

[Statedef 4556]
type    = A
movetype= H
physics = N
velset = 10,-14
poweradd = 40
sprpriority = 2

[State 4556, VelAdd]
type = VelAdd
Trigger1 = 1
y = .4

[State 4556, SelfState]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------------------------
;Super Jump

[Statedef 7001]
type = A
physics = A
ctrl = 1
anim = 41
velset = 0,-16.3

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 42
trigger1 = Time = [0,5]
x = 4

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 43
trigger1 = Time = [0,5]
x = -3.5

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 0
trigger1 = Time = [0,4]
value = 41

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 1
trigger1 = Time = [0,4]
value = 42

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = -1
trigger1 = Time = [0,4]
value = 43

[State 7001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5

[State 7001, Explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 6669
postype = p1
pos = 10, 60
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 1.20 - (time * 0.15), 1.54 - (time * 0.15)

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 6699
postype = p1
pos = 10, 60
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 1.20 - (time * 0.15), 1.54 - (time * 0.15)

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9006
postype = p1
pos = 0, 20
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 2, 2

[State 7001, Variavelzinha muito útil]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

;----------------------------------------------------------------
; Electricity
[Statedef 7600]
type = A
physics = N
movetype = H
velset = 0,0
ctrl = 0
anim = 5030
juggle = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=1
trigger2 = time = 20
trigger3 = time = 40
value = S15,7
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0

[State 5030, Glider]
type = Helper
triggerall = P1Name = "Green Goblin"
trigger1 = NumHelper(9100) = 0
trigger1 = animelem = 1
pos = facing = 1
pos = 0, 0
postype = p1
stateno = 9100
helpertype = normal
name = "Glider"
id=9100
keyctrl = 0

[State 7600, Shock Animation]
type = ChangeAnim
trigger1 = AnimExist(7696)
trigger1 = Anim != 7696
value = 7696

[State 7600, Fau-Shock]
type = Palfx
trigger1 = !AnimExist(7696) && TimeMod = 3, 1
time = 2
mul = 199,198,226

[State 7600, Fau-Shock]
type = Palfx
trigger1 = !AnimExist(7696) && TimeMod = 4, 2
time = 3
mul = 50,26,50

[State 7600, No hit]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 7600, Fall Back]
type = velset
trigger1 = Time = 30
x = -1.8
y = -9.4

[State 7600, Fall Back]
type = gravity
trigger1 = Time >= 30

[State 7600, Change]
type = Selfstate
trigger1 = Pos Y > 0
value = 5100

;---------------------------------------------------------------------------------------------
;Super Jump

[Statedef 7002]
type    = A
physics = A
ctrl = 1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25


;---------------------------------------------------------------------------------------------
[Statedef 8882]
type = S
physics = S
anim = 0
sprpriority = 1
ctrl = 0

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

[State 8882, ChangeState]
type = Changestate
trigger1 = time = 30
value = 8883

[Statedef 8883]
type = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 8883, PlaySnd]
type = PlaySnd
trigger1 = (AnimElem = 5) || (AnimElem = 9)
value = 8100,0

[State 8883, VelSet]
type = VelSet
trigger1 = 1
x = 8

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

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 8883, ChangeState]
type = ChangeState
trigger1 = p2bodydist x <= 190
value = 101
ctrl = 0

;---------------------------------------------------------------------------------------------
[Statedef -3]

[State -3, VarAdd]
type = VarAdd
trigger1 = (HitPauseTime = 1) && (P2MoveType = H) && (MoveHit = 1) && (StateNo < 3000)
trigger2 = ProjHitTime(0) = 1
v = 21
value = 1
ignorehitpause = 1

[State -3, VarReset]
type = VarSet
trigger1 = P2MoveType != H
v = 21
value = 0

[State -3, AttackMulSet]
type = AttackMulSet
trigger1 = StateNo >= 3000
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) <= 1
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 2
value = 0.8

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 3
value = 0.6

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 4
value = 0.4

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) >= 5
value = .2


[State 8510, Pó]
type = Explod
trigger1 = Stateno = 52 && time = 1
trigger2 = Stateno = 240 && animelem = 8
trigger3 = Stateno = 1102 && time = 1
trigger4 = Stateno = 1112 && time = 1
trigger5 = Stateno = 1122 && time = 1
trigger6 = Stateno = 106 && time = 1
trigger7 = Stateno = 352 && AnimElemTime(2) = 1
anim = 8510
ID = 8510
postype = P1
pos = 0,4
sprpriority = -1
ownpal = 1
scale = 1.4, 1.2

[State -3, Aterrisagem]
type = PlaySnd
trigger1 = StateNo = 52 && Time = 1 
value = 8100,0

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8900

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8901

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8900

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8999

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8999

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8999

[State -3, MSSM]
type = VarRandom
trigger1 = 1
v = 23
range = 0,8

[State -3, Super Jump]
type = VarSet
trigger1 = Stateno = 0
v = 12
value = 0

[State -3, Afterimagetime]
type = Afterimagetime
trigger1 = stateno != [3000,4999] 
time = 0

[State -3, ctrl set]
type = ctrlset
trigger1 = roundstate = 4
value = 0

;---------------------------------------------------------------------------
;Guard Push (Stand)
[Statedef 6300]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 1111
sprpriority = 2

[State 6300, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6300, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6300, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6300, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6300, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6300, a6]
type = Explod
trigger1 = Time = 0
anim = 3333
postype = p1
pos = 53,-50
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6300, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6300, a8]
type = PlaySnd
trigger1 = Time = 0
value = 1,0
channel = 0

[State 6300, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 6310];--------------crouch
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 121
sprpriority = 2

[State 6310, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6310, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6310, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6310, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6310, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6310, a6]
type = Explod
trigger1 = Time = 0
anim = 3333
postype = p1
pos = 33,-45
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6310, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6310, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6310, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1


[Statedef 6320];------------air
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 122
sprpriority = 2

[State 6320, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6320, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6320, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6320, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6320, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6320, a6]
type = Explod
trigger1 = Time = 0
anim = 3333
postype = p1
pos = 33,-55
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6320, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6320, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6320, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1

[Statedef 6350];guard push helper
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 1112
sprpriority = -4

[State 6350, a1]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 6350, a2]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 6350, a3]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 6350, a4]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 6350, a6]
type = DestroySelf
trigger1 = Time >= 18



;---------------------------------------------------------------------------
;--------------------------------- Roll ------------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Roll

[Statedef 890]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 890, 1]
type = VelSet
trigger1 = Time != 1
x = 4

[State 890, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 890, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 890, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 890, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 890, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 890, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Medium Roll

[Statedef 895]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 895, 1]
type = VelSet
trigger1 = Time != 1
x = 5

[State 895, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 815, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 895, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 895, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 895, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 895, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Far Roll

[Statedef 898]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 898, 1]
type = VelSet
trigger1 = Time != 1
x = 6

[State 898, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 898, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 898, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 898, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 898, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 898, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 898, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;------------------------------ Helper - Glider-----------------------------
;---------------------------------------------------------------------------

[State 3, Helper]
type = Helper
trigger1 = 1
helpertype = normal ;player
name = "Glider"
ID =  3
stateno = 3
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
;size.xscale (float)
;size.yscale (float)
;size.ground.back (int)
;size.ground.front (int)
;size.air.back (int)
;size.air.front (int)
;size.height (int)
;size.proj.doscale (int)
;size.head.pos (int,int)
;size.mid.pos (int,int)
;size.shadowoffset (int)
;ignorehitpause =
;persistent =



;---------------------------------------------------------------------------
;------------------------------ Recovery Roll ------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Foward Recovery Roll

[Statedef 831]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 831
sprpriority = -1

[State 831, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 831, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 831, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 831, 5]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 831, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Medium Foward Recovery Roll

[Statedef 832]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 832
sprpriority = -1

[State 832, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 832, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 832, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 832, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 832, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 832, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Far Foward Recovery Roll

[Statedef 840]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 840
sprpriority = -1

[State 840, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 840, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 840, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 840, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 840, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 840, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Near Backward Recovery Roll

[Statedef 850]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 850
sprpriority = -1

[State 850, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 850, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 850, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 850, 5]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

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

;---------------------------------------------------------------------------
; Medium Backward Recovery Roll

[Statedef 855]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 855
sprpriority = -1

[State 855, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 855, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 855, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 855, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 855, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 855, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Far Backward Recovery Roll

[Statedef 860]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 860
sprpriority = -1

[State 860, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 860, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 860, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 860, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 860, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 860, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Recovery Roll - Variable "Reset"

[State -2, 1]
type = VarSet
trigger1 = (StateNo != 5050) && (StateNo != 5071)
v = 30
value = 0

;-------------------------------------------------------------------------
; A.I. - Far Foward Recovery Roll

[State -2, 2]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType != L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (Pos Y = [-10,0])
triggerall = (StateNo = 5050)||(StateNo = 5071)||(StateNo = 50700)
trigger1 = (P2Dist X)+(BackEdgeDist) <= 160
trigger2 = (Enemy, NumProj > 0)
value = 840

;-------------------------------------------------------------------------
; A.I. - Far Backward Recovery Roll

[State -2, 3]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType != L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (Pos Y = [-10,0])
trigger1 = (StateNo = 5050)||(StateNo = 5071)||(StateNo = 50700)
trigger1 = (P2Dist X)+(BackEdgeDist) > 160
value = 55

;-------------------------------------------------------------------------
; A.I. - Lie Down Forward Recovery Roll

[State -2, 4]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType = L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (StateNo = 5120)&&(StateNo = 51200)
trigger1 = Time = 1
trigger1 = (P2Dist X)+(BackEdgeDist) <= 160
trigger2 = (Enemy, NumProj > 0)
value = 832

;-------------------------------------------------------------------------
; A.I. - Lie Down Backward Recovery Roll

[State -2, 5]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType = L)
triggerall = (P2Life != 0)&&(Alive = 1)
trigger1 = (StateNo = 5120)&&(StateNo = 51200)
trigger1 = Time = 1
trigger1 = (P2Dist X)+(BackEdgeDist) > 160
value = 855

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]



[State 0, AngleDraw]
type = AngleDraw
trigger1 = vel x > 0
value =  -(vel x)
;scale =  (winmugen only)
;ignorehitpause =
;persistent =
[State 0, AngleDraw]
type = AngleDraw
trigger1 = vel x < 0
value =  -(vel x)


[State 0, AngleDraw]
type = AngleDraw
trigger1 = vel y > 0
value =  -(vel y)
;scale =  (winmugen only)
;ignorehitpause =
;persistent =
[State 0, AngleDraw]
type = AngleDraw
trigger1 = vel y < 0
value =  -(vel y)





[State -2, TargetVelSet]
type = TargetVelSet
trigger1 = var(27) >= 1  ;If in demogoblin mode, hit them further!
x = -10
y = 0
ID = -1



;Haste/V-ism
;this code came from a post on infinity mugen site
;checks if in demogoblin mode, and if so, speeds up hobgoblin a bit.
[State -3, Speed]
type = ChangeAnim
triggerall = (RoundState = 2) && (MoveType != H)
triggerall = var(27) >= 1
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
trigger1 = AnimElemTime(AnimElemNo(0)) > floor ((AnimElemTime(AnimElemNo(0)) - AnimElemTime(AnimElemNo(0) + 1))/2)
ignorehitpause = 1
value = anim
elem = AnimElemNo(0) + 1



;if in demogoblin mode, make glider appear
[State -3, Explod]
type = Explod
trigger1 = var(27) >= 1
trigger1 = anim != 10000
anim = 10052
ID =   10052
pos = -12,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 10
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 1
ignorehitpause = 1




;if in demogoblin mode deal extra damage
[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(27) >= 1
time = -1
value = 1.5  ;demogoblin mode damage multiplier

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(27) < 1
time = -1
value = 1

[State -2, PowerMinus]
type = PowerAdd
trigger1 = var(27) >=1
trigger1 = stateno !=10000
value = -3


[State -2, PowerMinus]
type = PowerAdd
trigger1 = var(27) >=1
trigger1 = power > 1000
trigger1 = stateno !=10000
value = -2


[State -2, PowerMinus]
type = PowerAdd
trigger1 = var(27) >=1
trigger1 = power > 2000
trigger1 = stateno !=10000
value = -1


[State -2, PowerAdd]
type = PowerAdd
trigger1 = stateno = 10000
trigger1 = var(27) <1
value = 1

;Demogoblin mode drains life too now
[State -2, LifeMinus]
type = LifeAdd
trigger1 = var(27) >=1
trigger1 = stateno !=10000
trigger1 = random < 450
value = -1


[State -2, VarAdd]
type = VarAdd
trigger1 = power <= 5
v = 27    ;fv =
value = -1


[State -2, PlaySnd] ;NoooO!
type = PlaySnd
trigger1 = power <= 10
trigger1 = var(27) >= 1
value = 3400,1
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0


[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 460
trigger1 = stateno = 10000
anim = 1081
postype = back
sprpriority = -3
supermovetime = -1
removetime = 60
pos = 0,0
bindtime = -1
removeongethit = 1


[State -2, EnvShake]
type = EnvShake
trigger1 = Time = 480
trigger1 = stateno = 10000
time = 10
freq = 60
ampl = -4
phase = 90



[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 480
trigger1 = stateno = 10000
value = 8889,0







[State -2, PalFX]
type = PalFX
trigger1 = var(27) >= 1
time = -1
add = 136,136,136
mul = 46,46,46
;sinadd = 0,0,0,10
invertall = 0
color = 46
ctrl = 1
           ;demogoblin_mode


[State -2, PalFX]
type = PalFX
trigger1 = var(27) = 0
time = 0
add = 256,256,256
mul = 0,0,0
;sinadd = 0,0,0,10
invertall = 0
color = 256

[State -2, VarSet]
type = Varset
trigger1 = stateno = 10000
trigger1 = time  <= 476
v = 27    ;fv = 10
value = 0
ctrl = 0

[State -2, VarSet]
type = Varadd
trigger1 = stateno = 10000
trigger1 = var(27) <= 1
trigger1 = time = 477
v = 27    ;fv = 10
value = 1

[State -2, VarSet]
type = Varset
trigger1 = stateno = 10000
trigger1 = var(27) >1
trigger1 = time = 458
v = 27    ;fv = 10
value = 0

 ;variable demogoblin mode




;For debugging purposes
[State -2, Debug Info]
type = DisplayToClipboard
trigger1 = roundstate > 0
text = "Hits: %d, Win or DOS? %d, AI On %d, Super Jump %d, Recovery Roll %d"
;text = "Intro No. %d, Win No. %d, Enemy Proj: %d, Enemy Helpers: %d"
;text = "Score %d"
;text = "P2 Distance X from P1 %f, P2 Distance Y from P1 %f"
params = var(8), var(17), var(59), var(0), var(5)
;params = var(1), var(2), var(7), var(6)
;params = var(11)
;params = P2BodyDist X, P2BodyDist Y

;---------------------------------------------------------------------------
;Is DOS or Win?
[State -2, Detect System]
type = Varadd
trigger1 = (var(17)%2 = 0) && (movecontact) > (movecontact = 1)
v = 17
value = 1

;screenpack mvsc2?
[State -2, Detect Screeenpack]
type = Varadd
trigger1 = var(17) < 10 && roundstate < 2 && numexplod(8522) != 0
v = 17
value = 10

;---------------------------------------------------------------------------
; - mvsc2 screen pack
[State -2, Is MvC2 Screeenpack]
type = Explod
trigger1 = var(17) < 10 && roundstate < 2 && numexplod(8522) = 0
id = 8522
anim = 9001
pos = 0,240
postype = p1
removetime = 1
bindtime = -1
sprpriority = -1
ownpal = 1

;---------------------------------------------------------------------------
; - Press Start leyend (from the Mvc2 screen pack)
[State -2, Press Start Label]
type = Explod
triggerall = var(59) = 1 && roundstate >= 0
trigger1 = (gametime%60) = id && life != 0
id = 8620
anim = 9001
pos = ((enemy, id)<id)*172, 0
postype = Left
removetime = 30
bindtime = -1
sprpriority = -1
ownpal = 1
ontop = 1

; Super FX Section ==================================================


; Misc SCtrls Section ==================================================
[State -2, Lie Down Snd]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 5300
value = 3,21
channel = 0

; ----------------------------------------------------------------------
[State -2, NoHitBy]
Type = NotHitBy
trigger1 = (NumHelper(9985) = 1) && (NumHelper(9986) = 1)
trigger1 = Time = 0
value = SCA
Time = 30

[State -2, PalFX]
type = PalFX
trigger1 = (NumHelper(9985) = 1) && (NumHelper(9986) = 1)
time = 1
add = 0, 0, 256
mul = 256,256,256
persistent = 0

; ----------------------------------------------------------------------
;
[State -2, PosAdd]
type = PosAdd
trigger1 = Stateno = [5030, 5040]
trigger1 = (anim = 5040) && (AnimElem = 1, < 2)
y = -20
persistent = 0

; Reset Super Jump var every time that Felicia lands
[State -2, Super Jump Reset]
type = VarSet
trigger1 = stateno = 52
trigger2 = stateno = 0
var(0) = 0

; Remove Explods Section ==============================================
; Remove Special BG if ------------------------------------------------
; State != 3100:
[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 3100
id = 9052

; Combo Messages and Score control =====================================
; 
[State -2, VS_Combo]
type = VarSet
trigger1 = var(8) >= 3
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(9) = 1+(var(8)>4)+(var(8)>5)+(var(8)>7)+(var(8)>9)+(var(8)>29)+(var(8)>49)+(var(8)>69)-(var(8)=-1)
ignorehitpause = 1

[State -2, Danger]
type = VarSet
trigger1 = var(10) !=1 && roundstate=2 && life = [1,250]
var(9) = 9
ignorehitpause = 1

; sound First attack
[State -2, First Attack]
type = PlaySnd
triggerall = var(8)=-1
triggerall = NumExplod(8701) = 0
trigger1 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
persistent = 0
value = 230,0
volume=255
ignorehitpause = 1

; Telop sound
[State -2, Combo Sound]
type = PlaySnd
trigger1 = NumExplod(8701) = 0
trigger1 = var(8)=0 && var(9)!=0
persistent = 0;1
value = 230,var(9)
volume=255
ignorehitpause = 1

[State -2, Left]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 1 && NumExplod(8701) = 0
anim = (8000 + var(9))
ID = 8701
postype = left
pos = 0,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 2 && NumExplod(8701) = 0
anim = (8100+ var(9));8011;8720;
ID = 8701
postype = right
pos = -1,80;130;82
ontop = 1
bindtime = -1
removetime = 60;90
supermovetime = 60;90
pausemovetime = 60;90
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[State -2, VS_Combo]
type = VarAdd
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(8) = 1 + (var(8)=-1)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
trigger1 = var(8)!=-1 && (p2movetype!=H || enemynear, ctrl)
trigger2 = var(8)=-1 && stateno = [5000,5899]
var(8) = 0 - (roundstate<2)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
triggerall = numexplod(8701)!=0
trigger1 = var(8)=0
var(9) = 0
ignorehitpause = 1

[State -2, Score]
type = Varadd
trigger1 = enemynear, time=0
trigger1 = enemynear, Hitshakeover=0
trigger1 = moveguarded || p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
trigger3 = roundstate=4 && time=0 && stateno = [180,189]
var(11) = ceil(stateno/50)*var(8) + (life)*(roundstate=4) + (moveguarded)
ignorehitpause = 1

[State -2, Normalize Score]
type = Varset
triggerall = numpartner=1
trigger1 = var(11)< partner, var(11)
var(11) = partner, var(11)

[State -2, Is Danger]
type = VarSet
trigger2 = var(10) = 0 && life <= 250
trigger1 = var(10) = 1 && roundstate!=2
var(10) = (roundstate>1)
ignorehitpause = 1

[State -2, Is First Attack p3]
type = VarSet
triggerall = numpartner=1
trigger1 = partner, movehit
trigger1 = partner, var(8) != -1
var(8) = 0
ignorehitpause = 1



; ---------------------------------------------------------
; Down message (Appears when partner dies)
; sound First attack
[State -2, Finish]
type = PlaySnd
triggerall = numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
persistent = 0
value = f8560, 0
volume = 255
ignorehitpause = 1

[State -2, Left]
type = explod
triggerall = teamside = 2 && numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
anim = f221
ID = 8580
postype = left
pos = 0,100
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
triggerall = teamside = 1 && numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
anim = f222
ID = 8580
postype = right
pos = -9,100;130;82
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60;90
pausemovetime = 60;90
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[state 19]
type = varadd
trigger1 = RoundState = 2
var(17) = 1

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

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

;**********************************
; super-fundo
[Statedef 8500]
physics = N
anim = 8500
sprpriority = -3

[State 8500, 5] 
type = Varadd 
trigger1 = roundstate=3
v=1
value=1 

[State 8500, 5] 
type = VarSet 
trigger1 = Time = 0 
var(2) = root, ID 

[State 8500, 5] 
type = VarSet 
trigger1 = Time = 0 
var(17) = root, var(17) 

[State 8500, 9] ;Sem fundo e frente
type        = AssertSpecial 
trigger1 = anim=8500;1
flag = noBG 
flag2 = noFG 
ignorehitpause = 1

[State 8500, 9] ;Efeito de fundo azul (com partner)
type     = PalFx
triggerall = numpartner != 0 && roundstate=2
trigger1 = partner, stateno!=[4400,4499]
trigger1 = (time%30)=0
time = 30
sinadd = ceil(random/16),ceil(random/16),ceil(random/16),50
add = 0,0,0

[State 8500, 9] ;Efeito de fundo azul (sem partner)
type     = PalFx
triggerall = numpartner != 0 && roundstate=2
trigger1 = partner, stateno=[4400,4499]
trigger2 = partner, life=0
triggerall = (time%30)=0
time = 30
add = 0,0,0
sinadd = 0,0,100,50

[State 8500, 9] ;Efeito de fundo azul (sem partner)
type     = PalFx
triggerall = numpartner = 0 && roundstate=2
trigger1 = (time%30)=0
time = 30
add = 0,0,0
sinadd = 0,0,100,50

[State 8500, 9] ;animação de fundo
type        = Explod 
triggerall = p2life >0
trigger1 = numexplod(8510)=0
anim = 8888 
postype = left
ID = 8510 
sprpriority = -4
supermovetime = 1 
removetime = 123
pos = -30,0
scale = 1.20 , 1.5
bindtime = -1

[State 8500, 9] ;animação de fundo
type        = Explod 
triggerall = p2life >0
trigger1 = numexplod(8511)=0
anim = 8888
postype = right
ID = 8511 
sprpriority = -4
supermovetime = 1 
removetime = 123
pos = 31,0
scale = 1.20 , 1.5
bindtime = -1
facing=-1

[State 8500, 9] ;animação de fundo
type        = Explod 
triggerall = p2life >0
trigger1 = numexplod(8500)=0
anim = 8888
postype = left
ID = 8500
sprpriority = -4
supermovetime = 1 
removetime = 123
pos = -30,334
scale = 1.20 , 1.5
bindtime = -1
vfacing=-1

[State 8500, 9] ;animação de fundo
type        = Explod 
triggerall = p2life >0
trigger1 = numexplod(8513)=0
anim = 8888
postype = right
ID = 8513 
sprpriority = -4
supermovetime = 1 
removetime = 123
pos = 31,334 
scale = 1.20 , 1.5
bindtime = -1
facing=-1
vfacing=-1

[State 8500, 9] ;Efeito de fundo
type     = bgPalFx
trigger1 = anim=8500 && roundstate=3 && var(17)<10 && p2life=0
time = 120;70;45;
add = 192,192,192;0,0,0;
sinadd = 190,190,190,150;150;75;
persistent=1;0;
ignorehitpause=1

[State 8000, 1] ;Anim for Super KO FX
type = ChangeAnim
trigger1 = anim=8500 && roundstate=3 && p2life=0
value = 8550

[State 8500, 7] 
Type = RemoveExplod 
triggerall = root, var(9)<=0
triggerall = anim=8500
trigger1 = root, stateno!=[3000,3003]
trigger1 = root, stateno!=3100
trigger1 = root, stateno!=[3700,3704]
trigger2 = anim=8500 && roundstate=3

[State 8500, 7] 
Type = destroyself 
triggerall = root, var(9)<=0
triggerall = anim=8500 && roundstate!=3
trigger1 = root, stateno!=[3000,3003]
trigger1 = root, stateno!=3100
trigger1 = root, stateno!=[3700,3704]
;trigger2 = root, Numhelper(8550)!=0

;;---------------------------------------------------------
;; Super KO FX
;;[Statedef 8550]
;type = A
;movetype = I
;physics = N
;anim = 8550

[State 8550, hiper combo finish!]
type = PlaySnd
triggerall = roundstate=3 && var(17)>=10 && p2life=0
trigger1 = var(1)=2
trigger2 = var(1)=3
trigger3 = var(1)=4
trigger4 = var(1)=1
value = 9999,6
;persistent=0
;channel=0
volume=255

[State 8550, 1]
type = null;AssertSpecial
trigger1 = 1;(time%2)=0;roundstate=3;1
flag = NoBG
flag2 = nobardisplay
flag3 = NoFG;nokoslow;nomusic;nokosnd;
persistent=1;0;
ignorehitpause=1

[State 8550, 2] ;Hiper fundo finish (com MvsC2SP)
type = Explod
trigger1 = anim=8550 && animelemtime(1)=0 && var(17)>=10
ID = 222
anim = 9003
postype = left
pos = 0, 0
bindtime = -1
removetime = -2;6
;ownpal = 1
sprpriority = -2
ignorehitpause=1

[State 8550, 2] ;Hiper fundo finish (com MvsC2SP)
type = Explod
trigger1 = anim=8550 && animelemtime(1)=0 && var(17)>=10
ID = 222
anim = 9004
postype = right
pos = -1, 0
bindtime = -1
removetime = -2;6
;ownpal = 1
sprpriority = -2
ignorehitpause=1

[State 8550, 2] ;Hiper fundo finish (com MvsC2SP)
type = Explod
trigger1 = anim=8550 && animelemtime(1)=0 && var(17)>=10
ID = 222
anim = 9005
postype = left
pos = 0, 239
bindtime = -1
removetime = -2;6
;ownpal = 1
sprpriority = -2
ignorehitpause=1

[State 8550, 2] ;Hiper fundo finish (com MvsC2SP)
type = Explod
trigger1 = anim=8550 && animelemtime(1)=0 && var(17)>=10
ID = 222
anim = 9006
postype = right
pos = -1, 239
bindtime = -1
removetime = -2;6
;ownpal = 1
sprpriority = -2
ignorehitpause=1

[State 8550, 7] 
Type = destroyself 
trigger1 = animelemtime(1)=120 && anim=8550
trigger2 = roundstate=4


;;---------------------------------------------------------
; Super KO FX
[Statedef 8550]
type = A
movetype = I
physics = N
anim = 8550

[State 8500, 7] 
Type = destroyself 
trigger1 = 1


[Statedef 10000]
type = S
movetype= A
physics = N
anim = 10001
poweradd = 6

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 450
value = 10000
;elem = 1
;ignorehitpause =
;persistent =


[State 10000, 1]
type = PlaySnd
trigger1 = time = 0  ;I can't let you live
value = S15,0
channel = 0

[State 10000, 1]
type = PlaySnd
trigger1 = time = 530  ;Says "I am demogoblin" and turns black
value = S3400,7
channel = 0




;[State 10000, 2]
;type = DestroySelf
;trigger1 = Time = 918  ;this is not needed


[State 10000, end]
type = ChangeState
trigger1 = AnimTime = 1
value = 10000
ctrl = 1
anim =  1000
;ignorehitpause =
persistent = 1


[State 195, Helper]
type = Helper
trigger1 =  prevstateno = 10000
helpertype = normal ;player
name = "hellfire"  ;permanent non-stolen animation pending
ID =  10011
stateno =   10001
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove


[Statedef 10001]
type = S
movetype= A
physics = N
anim = 10011
poweradd = 60


[State 10000, 1]
type = PlaySnd
trigger1 = time = 2
value = S3400,5
channel = 0

[State 10001, HitDef]
type = HitDef
trigger1 Animtime = 25
attr = S,NA
damage = 1,0
animtype = high
projhits = 1
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
;pausetime = 5,10
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -16
air.type = Low
air.hittime = 20
air.velocity = -16,-15
envshake.time = 16
envshake.ampl = 16
air.fall = 1




[State 10012, DestroySelf]
type = DestroySelf
trigger1 = Time = 10
;value = 10001
;ctrl = 0
;anim =  10011
;ignorehitpause = 1
;persistent = 1



[State 10451, Helper]
type = Helper
trigger1 =  prevstateno = 10000
helpertype = normal ;player
name = "hellfire"
ID =  10011
stateno =   10001
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove



[Statedef 10001]
type = S
movetype= A
physics = N
anim = 10011
poweradd = 60

[State 10000, 1]
type = PlaySnd
trigger1 = time = 2
value = S3400,5
channel = 0

[State 10001, HitDef]
type = HitDef
trigger1 Animtime = 35

attr = S,NA
damage = 1,0
animtype = high
projhits = 9
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
;pausetime = 5,10
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -16
air.type = Low
air.hittime = 20
air.velocity = -16,-15
envshake.time = 16
envshake.ampl = 16
air.fall = 1




[State 10012, DestroySelf]
type = DestroySelf
trigger1 = Time = 100
;value = 10001
;ctrl = 0
;anim =  10011
ignorehitpause = 1
persistent = 1





[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1000
;facing = 0
pos = -90,-20
;ignorehitpause =
;persistent =

 [State 10012, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 10000
ctrl = 0
anim =  100012
;ignorehitpause =
persistent = 1

; Here a variable, var(2), is used to remember whether or not the
; player was holding forward at the start of the state. This variable
; is checked later on to turn KFM around if necessary.
[State 10011, Holding fwd?]
type = VarSet
trigger1 = Time = 0
var(2) = command = "holdfwd"

;[State 10011, State End]
;type = ChangeState
;trigger1 = AnimTime = 0
;value = 0
;ctrl = 1
;------------------------------------10100 AI stuff--------
[Statedef 10100]
type    = A
movetype= A
physics = C
juggle  = 1
ctrl = 0
anim = 20
poweradd = 0
sprpriority = 2

;The Ai needs a little help, so we're going to give it to him.
[State 451, heatseekx]
type = PosAdd
trigger1 = p2dist x >= 0
x = 5

[State 451, heatseeky]
type = PosAdd
trigger1 = p2dist y >= 8
y = 1

;[State 451, heatseekxx]
;type = PosAdd
;trigger1 = p2dist x <= 0
;x = -3

[State 451, heatseekyy]
type = PosAdd
trigger1 = p2dist y <= 8
y = -1


[State 451, heatseekxxxx]
type = PosAdd
trigger1 = p2dist x > 200
x = 4


;facing ... makes missiles face target
[State 451, turn]
type = turn
trigger1 = P2Dist x <= -20


;Change to exploding animation
[State 451, ChangeState]
type = ChangeState
trigger1 = p2dist x >= -15
trigger1 = p2dist x <= 15
trigger1 = p2dist y <= 15
trigger1 = p2dist y >= -15
;trigger2 = time > 100
value = 10101
ctrl = 0

;--

[Statedef 10101]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 200
poweradd = 25
sprpriority = 2



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

[State 200, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,21
;pausetime = 5,10
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 25
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

[State 200]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7770
scale = 1,1

[State 451, heatseekyy]
type = PosAdd
trigger1 = p2dist y <= -18
y = -2

[State 451, heatseekyy]
type = PosAdd
trigger1 = p2dist y >= 18
y = 2

[state 451, try_to_stay_on_screen]
type = Posset
trigger1 = pos y >= 20
y = 0
x = 0



[State 200, ChangeState]
type = ChangeState
trigger1 = movehit
value = 10102
ctrl = 0

[state 10101, randomchange]
type = changestate
trigger1 = random <= 300
value = 1000
ctrl = 0

[state 10101, randomchange]
type = changestate
trigger1 = random <= 300
value = 10601
ctrl = 1

[state 10101, randomchange]
type = changestate
trigger1 = random <= 300
value = 10105
ctrl = 1

    ;--

[Statedef 10102]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 220
poweradd = 65
sprpriority = 2

[State 220, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 220, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 420, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 45,1
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 14,12
pausetime = 15,20
sparkno = s6668
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = 5,4
ground.type = High
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = 0, -8
air.velocity = 0,-2
airguard.velocity = -6,0
;yaccel = 0.39+(enemynear,const(movement.yaccel)/2)
fall =1


[State 450, 4]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4444
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, 5]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4445
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 220]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7772
scale = 1,1

[State 220, ChangeState]
type = ChangeState
trigger1 = Time > 15
value = 10104
ctrl = 0

[State 220, ChangeState]
type = ChangeState
trigger1 = random < 200
value = 1000
ctrl = 1


;need code change




;Jumping light punch

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

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

[State 600, HitDef]
type = HitDef
trigger1 = time > 10
attr = A,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 22,34
sparkno = -1
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -0, -2
air.fall = 0
air.velocity = -0, -10.5

[State 600, ChangeState]
type = ChangeState
trigger1 = movehit  = 1
value = 450

[state 10105, whatever]
type = changestate
trigger1 = movehit = 0
value = 10102

[State 600]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7770
scale = 1,1


;---------------------------------------------------------------------------------------------
;Jumping medium punch

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

[State 610, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 610, HitDef]
type = HitDef
trigger1 = 1
attr = A,NA
damage = 35,1
animtype = medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 22,24
sparkno = s6667
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime  = 20
ground.velocity = -1,-4
air.fall = 0
air.velocity = -0, -7.5

[State 610]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 65
anim = 7771
scale = 1,1


[State 610, ChangeState]
type = ChangeState
trigger1 = movehit < 1
value = 10101

;end of ai addition
;--------------------------------------------------------


[Statedef 10601]
type = C
movetype = I
physics = N
ctrl = 0
anim = 10601
velset = 0,0
sprpriority = 0

[State 10601, Helper]
type = Helper
trigger1 =  AnimElem = 3
trigger1 = NumHelper(10600) <= 3 ;this is a limit on missile count
helpertype = normal ;player      ;Because hey, I believe in a freeze
name = "pumpkinpatch"                ;on the Arms race....
ID =  10600                      ;
stateno =   10600
pos = 6,-29
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove


[State 10601, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos y > -10
value = 00
ctrl = 1
;anim =
;ignorehitpause =
;persistent =
[State 10601, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos  y <= -10
value = 10603      ;new code to fix stuck-in-air-after-move bug
ctrl = 0
;anim =
;ignorehitpause =
;persistent =
;----------------------high velocity pumpkinpatch bombs---
[Statedef 10621]
type = C
movetype = I
physics = N
ctrl = 0
anim = 10601
velset = 0,0
sprpriority = 0

[State 10621, Helper]
type = Helper
trigger1 =  AnimElem = 3
trigger1 = NumHelper(10600) <= 3 ;this is a limit on missile count
helpertype = normal ;player      ;Because hey, I believe in a freeze
name = "pumpkinpatch"                ;on the Arms race....
ID =  10600                      ;
stateno =   10620
pos = 6,-29
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove


[State 10621, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos y > -10
value = 00
ctrl = 1
;anim =
;ignorehitpause =
;persistent =
[State 10621, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos  y <= -10
value = 10603      ;new code to fix stuck-in-air-after-move bug
ctrl = 0
;anim =
;ignorehitpause =
;persistent =

;--------------------------------very high velocity pumpkinpatch---
[Statedef 10631]
type = C
movetype = I
physics = N
ctrl = 0
anim = 1000
velset = 0,0
sprpriority = 0

[State 10631, Helper]
type = Helper
trigger1 =  AnimElem = 3
trigger1 = NumHelper(10600) <= 3 ;this is a limit on missile count
helpertype = normal ;player      ;Because hey, I believe in a freeze
name = "pumpkinpatch"                ;on the Arms race....
ID =  10600                      ;
stateno =   10630
pos = 6,-129
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove


[State 10631, changestate]
type = ChangeState
trigger1 = animtime = 0
trigger1 = pos y > -10
value = 00
ctrl = 1
;anim =
;ignorehitpause =
;persistent =
[State 10631, changestate]
type = ChangeState
trigger1 = animtime = 0
trigger1 = pos  y <= -10
value = 10603      ;new code to fix stuck-in-air-after-move bug
ctrl = 0
;anim =
;ignorehitpause =
;persistent =

;----------





[Statedef 10603]
type = C
movetype = I
physics = N
ctrl = 0
anim = 650
velset = 0,9
sprpriority = 0

[State 10603, changestate]
type = ChangeState
trigger1 = pos y >= -1
value = 0
ctrl = 1



[Statedef 10602]
type = C
movetype = I
physics = N
ctrl = 0
anim = 10601
velset = 0,0
sprpriority = 0

[State 10602, Gravity]
type = Gravity
trigger1 =  1
;ignorehitpause =
;persistent =

[State 10602, changestate]
type = ChangeState
trigger1 = AnimElem = 1
value = 0
ctrl = 1


[Statedef 10620]
type = C
movetype = A
physics = N
ctrl = 0
anim = 10600
velset = 0,0
sprpriority = 1


;note that if gravity works when y is less than -100
;then that means that gravity will take effect only
;when the pumpkin is 100 pixels off the ground
[State 10620, Gravity]
type = Gravity
trigger1 =  pos y < 0
trigger1 = time < 100

[State 10620, PosAdd]
type = PosAdd
trigger1 = time < 100
x = .8

[State 10620, VelAdd]
type = VelAdd
;trigger1 = pos y < -20
trigger1 = pos y >= -1
trigger1 = time < 100
x = 0
y = -(100/(time)+1)


[State 10620, VelMul]
type = VelMul
trigger1 = time > 60
trigger1 = time < 90
x = .9
y = .9


[State 10620, VelMul] ;this slows the pumpkin down when it's too high
type = VelMul
trigger1 = pos y < -200
y = .9


[State 10620, VelSet]
type = VelSet
trigger1 = time = 90
trigger1 = vel y < 2
y = 2

;make clank sound when it bounces
[State 10620, sound]
type = PlaySnd
trigger1 = pos y > -1
trigger1 = time < 105
value = S15,15



[State 10620, VelSet]
type = PosSet
trigger1 = time = 101
y = -8

[State 10620, VelSet]
type = VelSet
trigger1 = time = 102
y = 0
x = 0



[State 10620,fuseup]
type = AngleDraw
trigger1 = pos y >= -10
trigger1 = time+(Random/10) >= 400
value =  (random/100)+(time-350)/10


[State 10620, ChangeAnim]
type = ChangeAnim
trigger1 = time = 400
value = 10451
;elem = 1
;ignorehitpause =
;persistent =

[State 10620, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger1 = anim = 10451
value = 15,2


;this makes the bomb hurt!
[State 10620, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 145,1      ;low block damage... because it's kinda cheap
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,11
;pausetime = 5,10
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

;I decided this bomb does NOT blow up on proximity
;[State 10600]
;type = explod;d4
;trigger1 = movehit
;persistent = 0
;ignorehitpause = 1
;sprpriority = 2
;pos = p2dist x -10,p2dist y - 65
;anim = 7770
;scale = 1,1







[State 10620, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,ST
slot = 1
stateno = 10600
time = -1
forceair = 1


;sixth day code... aka anti-clone code
[State 10620, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,HA
slot = 2
stateno = 10600
time = -1
forceair = 1

[State 10620, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;A,SA
slot = 6
stateno = 10600
time = -1
forceair = 1

[State 10620, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,NA
slot = 3
stateno = 10600
time = -1
forceair = 1
;

;making sure bombs are attackable and don't turn into clones of hobby
[State 10620, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;C,NA
slot = 4
stateno = 10600
time = -1
forceair = 1

[State 10620, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;A,NA
slot = 5
stateno = 10600
time = -1
forceair = 1


;make pumpkin bomb move when hit
[State 10620, HitVelSet]
type = HitVelSet
trigger1 = time < 150
x = 1
;ignorehitpause =
;persistent =

[State 10620, ScreenBound]
type = ScreenBound
trigger1 = time <= 100
value = 1
movecamera = 0,0
;ignorehitpause =
;persistent =

[State 10620, DestroySelf]
type = DestroySelf
trigger1 = time > 430
trigger1 = anim = 10451

;-------------------pumpkin bombs with more velocity-------

[Statedef 10630]
type = C
movetype = A
physics = N
ctrl = 0
anim = 10600
velset = 3,0
sprpriority = 1


;note that if gravity works when y is less than -100
;then that means that gravity will take effect only
;when the pumpkin is 100 pixels off the ground
[State 10600, Gravity]
type = Gravity
trigger1 =  pos y < 0
trigger1 = time < 100

[State 10630, PosAdd]
type = posadd
trigger1 = time < 70
X = 4.5


[State 10630, PosAdd]
type = posadd
trigger1 = time < 110
trigger1 = time > 70
X = -1.5

[State 10620, VelMul]
type = VelMul
trigger1 = time > 60
trigger1 = time < 120
x = .9
y = .9

;slow pumpkin downy when it's too ...high-ee
[State 10620, VelMul]
type = VelMul
trigger1 = pos y < -200
y = .9

[State 10620, VelMul]
type = VelMul
trigger1 = pos y < -200
y = .9


[State 10630, VelAdd]
type = VelAdd
;trigger1 = pos y < -20
trigger1 = pos y >= -1
trigger1 = time < 100
x = 2
y = -(200/(time)+1)


[State 10630, VelSet]
type = VelSet
trigger1 = time = 80
trigger1 = pos y < 0
y = -(pos y)/11




;make clank sound when it bounces
[State 10630, sound]
type = PlaySnd
trigger1 = pos y > -1
trigger1 = time < 105
value = S15,15



[State 10630, VelSet]
type = PosSet
trigger1 = time = 101
y = -5

[State 10630, VelSet]
type = VelSet
trigger1 = time = 101
y = 0
x = 0



[State 10630, fuseup]
type = AngleDraw
trigger1 = pos y >= -15
trigger1 = time+(Random/10) >= 500
value =  (random/100)+(time-450)/10


[State 10630, ChangeAnim]
type = ChangeAnim
trigger1 = time = 500
value = 10451
;elem = 1
;ignorehitpause =
;persistent =

[State 10630, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger1 = anim = 10451
value = 15,2


;this makes the bomb hurt!
[State 10630, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 175,1      ;low block damage... because it's kinda cheap
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,11
;pausetime = 5,10
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

;I decided this bomb does NOT blow up on proximity
;[State 10600]
;type = explod;d4
;trigger1 = movehit
;persistent = 0
;ignorehitpause = 1
;sprpriority = 2
;pos = p2dist x -10,p2dist y - 65
;anim = 7770
;scale = 1,1


[State 10630, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,HA
slot = 2
stateno = 10600
time = -1
forceair = 1

[State 10630, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; A,SA
slot = 6
stateno = 10600
time = -1
forceair = 1

[State 10630, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,NA
slot = 3
stateno = 10600
time = -1
forceair = 1



[State 10630, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; S,NA
slot = 3
stateno = 10600
time = -1
forceair = 1
;

;making sure bombs are attackable and don't turn into clones of hobby
[State 10630, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;C,NA
slot = 4
stateno = 10630
time = -1
forceair = 1
                                  ;Anti clone code
[State 10630, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;A,NA
slot = 5
stateno = 10630
time = -1
forceair = 1


;make pumpkin bomb move when hit
[State 10630, HitVelSet]
type = HitVelSet
trigger1 = time < 200
x = 1
;ignorehitpause =
;persistent =

[State 10630, ScreenBound]
type = ScreenBound
trigger1 = time <= 100
value = 1
movecamera = 0,0
;ignorehitpause =
;persistent =

[State 10630, DestroySelf]
type = DestroySelf
trigger1 = time > 540
trigger1 = anim = 10451

;---------pumpkin patch-------


[Statedef 10600]
type = C
movetype = A
physics = N
ctrl = 0
anim = 10600
velset = 3,0
sprpriority = 1


;note that if gravity works when y is less than -100
;then that means that gravity will take effect only
;when the pumpkin is 100 pixels off the ground
[State 10600, Gravity]
type = Gravity
trigger1 =  pos y < 0
trigger1 = time < 100


[State 10600, VelAdd]
type = VelAdd
;trigger1 = pos y < -20
trigger1 = pos y >= -1
trigger1 = time < 100
x = 0
y = -(100/(time)+1)


[State 10600, VelSet]
type = VelSet
trigger1 = time = 90
trigger1 = vel y < 2
y = 2

;make clank sound when it bounces
[State 10600, sound]
type = PlaySnd
trigger1 = pos y > -1
trigger1 = time < 105
value = S15,15



[State 10600, posSet]
type = PosSet
trigger1 = time = 101
y = -8 ;changed

[State 10600, VelSet]
type = VelSet
trigger1 = time = 102
y = 0
x = 0


[State 10600, fuseup]
type = AngleDraw
trigger1 = pos y >= -15
trigger1 = time+(Random/10) >= 200
value =  (Random/100)+(time/20)


[State 10600, ChangeAnim]
type = ChangeAnim
trigger1 = time = 200
value = 10451
;elem = 1
;ignorehitpause =
;persistent =

[State 10600, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger1 = anim = 10451
value = 15,2


;this makes the bomb hurt!
[State 10600, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 155,21      ;low block damage... because it's kinda cheap
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,11
;pausetime = 5,10
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

;I decided this bomb does NOT blow up on proximity
;[State 10600]
;type = explod;d4
;trigger1 = movehit
;persistent = 0
;ignorehitpause = 1
;sprpriority = 2
;pos = p2dist x -10,p2dist y - 65
;anim = 7770
;scale = 1,1

;sixth day violation code... anti-clone laws

[State 10600, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,NA
slot = 3
stateno = 10600
time = -1
forceair = 1
;

[State 10600, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,HA
slot = 2
stateno = 10600
time = -1
forceair = 1

[State 10600, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;A,SA
slot = 6
stateno = 10600
time = -1
forceair = 1

[State 10600, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,NA
slot = 3
stateno = 10600
time = -1
forceair = 1



;making sure bombs are attackable and don't turn into clones of hobby
[State 10600, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; C,NA
slot = 4
stateno = 10600
time = -1
forceair = 1

[State 10600, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; A,NA
slot = 5
stateno = 10600
time = -1
forceair = 1


;make pumpkin bomb move when hit
[State 10600, HitVelSet]
type = HitVelSet
trigger1 = time < 100
x = 1
;ignorehitpause =
;persistent =

[State 10600, ScreenBound]
type = ScreenBound
trigger1 = time <= 100
value = 1
movecamera = 0,0
;ignorehitpause =
;persistent =

[State 10600, DestroySelf]
type = DestroySelf
trigger1 = time > 210
trigger1 = anim = 10451





;--------jump off glider hyper---  ... hyper4

[Statedef 10700]
 type    = S
movetype= A
physics = N
juggle  = 1
velset = -10,0
poweradd = 0
anim = 5
ctrl = 0
sprpriority = 2



[State 10700, End]
type = ChangeState
trigger1 = time = 10
value = 10701
ctrl = 0

[Statedef 10701]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 5
ctrl = 0
sprpriority = 2

[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 0
anim = 1080
postype = back
sprpriority = -3
supermovetime = -1
removetime = 60
pos = 0,0
bindtime = -1
removeongethit = 1

[State 3000, assertspecial]
type = assertspecial
trigger1 = time = [0,40]
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 0
Time = 60
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 40

[State 3100, HyperBg]
type = Explod
trigger1 = time = 22
anim = 750
pos = 0,0
sprpriority = -4
postype = front
bindtime = -1
removetime = 135
removeongethit = 1
pos = ifelse(facing = -1,-1,0),0
facing = facing
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1

[State 3000, HyperBg]
type = Explod
trigger1 = time = 22
anim = 753
pos = 0,0
sprpriority = -3
postype = front
bindtime = -1
removetime = 135
removeongethit = 1
pos = ifelse(facing = -1,-1,0),0
facing = facing
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1

[State 3000, Hyper Explode]
type = Explod
trigger1 = time = 5;AnimElem = 1
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, Hyper Circle]
type = Explod
trigger1 = Time = 13
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, som]
type = PlaySnd
trigger1 = Time = 2
value = 8889,0

[State 3000, Ground Flash]
type = Explod
trigger1 = time = 5
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 0

[State 3000, End]
type = ChangeState
trigger1 = time=15
;trigger1 = BackEdgeBodyDist > -1
value = 10702
ctrl = 0





[statedef 10702]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 10700
ctrl = 0
sprpriority = 2





[State 10702, Glider_super_helper]
type = Helper
trigger1 =  time = 35
helpertype = normal
name = "glider"
ID = 3
stateno =  10703
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
;size.xscale (float)
;size.yscale (float)
;size.ground.back (int)
;size.ground.front (int)
;size.air.back (int)
;size.air.front (int)
;size.height (int)
;size.proj.doscale (int)
;size.head.pos (int,int)
;size.mid.pos (int,int)
;size.shadowoffset (int)
;ignorehitpause =
;persistent =

[State 10702, ChangeAnim]
type = ChangeAnim
trigger1 = time = 750
value = 197
;elem = 1
;ignorehitpause =
;persistent =


[State 10702, ChangeState]
type = ChangeState
trigger1 = time = 815
value = 0
ctrl = 1
anim = 197


[Statedef 10703]
type    = A
movetype= A
physics = A
juggle  = 7
ctrl = 0
anim = 9100
poweradd = 15
sprpriority = 1



[State 10703, HitDef]
type = HitDef
trigger1 = stateno = 10703
attr = S,NA
damage = 8,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,17
sparkno = s6667
sparkxy = -10,-90
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 45
ground.velocity = -16
air.type = Low
air.hittime = 45
air.velocity = -16,-4
envshake.time = 1
envshake.ampl = 4
fall = 1




[State 451, AngleDraw]
type = AngleDraw
trigger1 = p2dist y > 40
trigger1 = time >= 1
value = (40-(p2dist y))/2
;scale =  (winmugen only)
;ignorehitpause =
;persistent =


[State 451, AngleDraw]
type = AngleDraw
trigger1 = p2dist y < 40
trigger1 = time >= 2
value = -((p2dist y)+40)/2



[State 451, heatseekx]
type = PosAdd
trigger1 = p2dist x >= 0
x = 8

[State 451, heatseeky]
type = PosAdd
trigger1 = p2dist y >= 50
y = 6


[State 451, heatseekyy]
type = PosAdd
trigger1 = p2dist y <= 50
y = -6


[State 451, heatseekxxxx]
type = PosAdd
trigger1 = p2dist x > 200
x = 8


;facing ... makes missiles face target
[State 451, turn]
type = turn
trigger1 = P2Dist x <= -20


;Change to exploding animation
[State 10703, Changevel]
type = Velset
trigger1 = p2dist x >= -35
trigger1 = p2dist x <= 35
trigger1 = p2dist y <= 82
trigger1 = p2dist y >= 70
x = -10
y = 0

[State 10703, not_too_high]
type = posadd
trigger1 = pos y < -100
trigger1 = p2dist x > 35 || time > 700
x = 0
y = 6

[State 10703, not_too_high]
type = posadd
trigger1 = pos y < -200
trigger1 = p2dist x > 35
x = 0
y = 6

 [State 10703, Extra Pumpkin bombs]
type = Helper
trigger1 = pos y < -345
trigger1 = numhelper(10600) < 9
trigger1 = random < 650
trigger1 = time > 550
trigger1 = time < 800
trigger1 = p2dist x < 70
helpertype = normal ;player
name =  "pumpkinpatch"
ID = 10600
stateno = 10600
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove




;move glider away after hit
[State 10703, PosAdd]
type = PosAdd
trigger1 = movehit
trigger1 = p2dist x < 200
x = -20
y = 1


[State 10703, PosAdd]
type = PosAdd
trigger1 = MoveGuarded
x = -15
y = 0



;but let it come back for another run
[State 10703, MoveHitReset]
type = MoveHitReset
trigger1 = p2dist x >= 200
;ignorehitpause =
;persistent =


[State 10703, VelSet]
type = VelSet
trigger1 = BackEdgeBodyDist > -1
x = 0
y = 0



[State 10703, posSet]
type = Posadd
trigger1 = time >= 750
x = -26
y = 8


[State 10703, DestroySelf]
type = DestroySelf
trigger1 = time = 805








;------------------------poison gas code starts---------
;launch the gas bomb.....

[Statedef 10721]
type = C
movetype = I
physics = N
ctrl = 0
anim = 10601
velset = 0,0
sprpriority = 0

[State 10721, Helper]
type = Helper
trigger1 =  AnimElem = 3
trigger1 = NumHelper(10700) <=1 ;Now, we don't want too much poison...
helpertype = normal ;player      ;because that's polution!
name = "pumpkinpatch"
ID =  10700
stateno =   10720
pos = 6,-29
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove

[State 10721, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos y > -10
value = 00
ctrl = 1
;anim =
;ignorehitpause =
;persistent =
[State 10721, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos  y <= -10
value = 10603      ;new code to fix stuck-in-air-after-move bug
ctrl = 0


;------------------OK, now the gas bomb!-------------





[Statedef 10720]
type = C
movetype = A
physics = N
ctrl = 0
anim = 10600
velset = 0,0
sprpriority = 1


;note that if gravity works when y is less than -100
;then that means that gravity will take effect only
;when the pumpkin is 100 pixels off the ground
[State 10720, Gravity]
type = Gravity
trigger1 =  pos y < 0
trigger1 = time < 100

[State 10720, PosAdd]
type = PosAdd
trigger1 = time < 100
x = .8

[State 10720, VelAdd]
type = VelAdd
;trigger1 = pos y < -20
trigger1 = pos y >= -1
trigger1 = time < 100
x = 0
y = -(100/(time)+1)


[State 10720, VelMul]
type = VelMul
trigger1 = time > 60
trigger1 = time < 90
x = .9
y = .9


[State 10720, VelMul] ;this slows the pumpkin down when it's too high
type = VelMul
trigger1 = pos y < -200
y = .9


[State 10720, VelSet]
type = VelSet
trigger1 = time = 90
trigger1 = vel y < 2
y = 2

;make clank sound when it bounces
[State 10720, sound]
type = PlaySnd
trigger1 = pos y > -1
trigger1 = time < 105
value = S15,15



[State 10720, VelSet]
type = PosSet
trigger1 = time = 101
y = -7

[State 10720, VelSet]
type = VelSet
trigger1 = time = 102
y = 0


;right now, I feel that poison gas shouldn't rumble very much,
;so I'm commenting this out.
;[State 10720,fuseup]
;type = AngleDraw
;trigger1 = pos y >= -10
;trigger1 = time+(Random/10) >= 400
;value =  (random/100)+(time-350)/10


;[State 10720, ChangeAnim]
;type = ChangeAnim
;trigger1 = time > 140
;trigger1 = p2dist x < 30
;trigger1 = p2dist y < 30
;value = 10800

;[State 10720, PlaySnd]
;type = PlaySnd
;trigger1 =  AnimElem = 1
;trigger1 = anim = 10451
;value = 15,3

[State 10720, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger1 = anim = 10451
value = 54,22




[State 10720, VarSet]
type = VarSet
trigger1 = time = 1
v = 13    ;fv = 10
value = 0
;ignorehitpause =
;persistent =



[State 10720, VarSet]
type = Varadd
trigger1 = time > 140
trigger1 = var(13) < 1
trigger1 = p2dist x < 30
trigger1 = p2dist y < 30
v = 13    ;fv = 10
value = 1



;I decided this bomb blow up on proximity
[State 10720, smoke]
type = explod
trigger1 = var(13) = 1
trigger2 = time = 990
;persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = 10, -80
anim = 10800
ontop = 1
scale = .2,4





[State 10720, smoke]
type = changestate
trigger1 = var(13) = 1
anim = 10800
;scale = .2,4
value = 10725


[State 10720, more smoke]
type = explod
trigger1 = time = 90
trigger2 = time = 220
;trigger3 = time = 360
trigger4 = time = 420
;trigger5 = time = 500
;persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = 10, 15
anim = 10800
scale = .1,.1


[State 10720, more smoke]
type = explod
trigger1 = time = 630
trigger2 = time = 700
trigger3 = time = 800
trigger4 = time = 900
trigger5 = time = 1000
sprpriority = 2
pos = 10, 5
anim = 10800
scale = .2,.5




[State 10720, HitOverride]
type = HitOverride
trigger1 = 1
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; S,ST
slot = 1
stateno = 10600
time = -1
forceair = 1


;sixth day code... aka anti-clone code
[State 10720, HitOverride]
type = HitOverride
trigger1 = 1
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; S,HA
slot = 2
stateno = 10600
time = -1
forceair = 1

[State 10720, HitOverride]
type = HitOverride
trigger1 = 1
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; A,SA
slot = 6
stateno = 10600
time = -1
forceair = 1

[State 10620, HitOverride]
type = HitOverride
trigger1 = 1
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; S,NA
slot = 3
stateno = 10600
time = -1
forceair = 1
;

;making sure bombs are attackable and don't turn into clones of hobby
[State 10720, HitOverride]
type = HitOverride
trigger1 = 1
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; C,NA
slot = 4
stateno = 10600
time = -1
forceair = 1

[State 10720, HitOverride]
type = HitOverride
trigger1 = 1
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; A,NA
slot = 5
stateno = 10600
time = -1
forceair = 1


;make pumpkin bomb move when hit
[State 10720, HitVelSet]
type = HitVelSet
trigger1 = time < 400
x = 1
;ignorehitpause =
;persistent =

[State 10720, ScreenBound]
type = ScreenBound
trigger1 = time < 100
value = 1
movecamera = 0,0
;ignorehitpause =
;persistent =


[State 10720, VarAdd]
type = VarAdd
trigger1 = time > 1000
trigger2 = time > 500
trigger2 = var(13) = 1
v = 13    ;fv =
value = 1



[State 10720, DestroySelf]
type = DestroySelf
trigger1 = var(13) >= 2
trigger1 = time > 10000




[Statedef 10725]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 10800
poweradd = 15
sprpriority = 1

[State 10725, PlaySnd]
type = PlaySnd
trigger1 =  time = 1
value = 54,22

[State 0, DestroySelf]
type = destroyself
trigger1 =  time  = 6
trigger1 = movecontact !=1





[State 10725, HitDef]
type = HitDef
trigger1 = 1
attr = A,NA
damage = 1,1
animtype = light
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 2,1
sparkno = -1
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -1, 0
ground.slidetime = 2
ground.hittime = 1
ground.velocity = 0,0
air.fall = 0
air.velocity = -13.2, -10.5
;palfx.time = 200
;palfx.mul = 206,256,206
;palfx.add = 0,20,0



[State 10725, poisoncounter]
type = VarSet
trigger1 =  movecontact
v = 14    ;fv =
value = 1


[state 10725, changestate]
type = changestate
trigger1 = var(14) = 1
value = 10726
;value = 10726


;[State 10725, DestroySelf]
;type = DestroySelf
;trigger1 = time > 4
;trigger2 = movehit = 1

[Statedef 10726]
type = C
movetype = A
physics = N
ctrl = 0
anim = 10800
velset = 0,0
sprpriority = 1



[State 10726, HitDef]
type = HitDef
trigger1 = animelem = 1
attr = A,NA
damage = 1,1
animtype = light
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 2,1
sparkno = -1
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -1, 0
ground.slidetime = 2
ground.slidetime = 2
ground.hittime = 1
ground.velocity = 0,0
air.fall = 0
air.velocity = -1.2, -1.5
;palfx.time = 300
;palfx.mul = 200,256,200
;palfx.add = 0,40,0



[State 10726, BindTotarget]
type = BindTotarget
trigger1 = time = 20
time = 500
facing = 1
pos = 0,0

[State 10726, PosAdd]
type = PosAdd
trigger1 = time < 500
x = (p2dist x)
y = (p2dist y)-40


[State 10726, HitDef]
type = HitDef
trigger1 = time < 500
trigger1 = random < 15
attr = A,NA
damage = 6,6
animtype =  light
guardflag =  MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = 5
sparkxy = -0, 0
guard.sparkno = 5
hitsound = 0,0
guardsound = 0,0
ground.type = low
ground.slidetime = 0
ground.hittime  = 00
ground.velocity = 0, 0
ground.slidetime = 0
ground.hittime = 0
ground.velocity = 0,0
air.fall = 0
air.velocity = 0, 0
;palfx.time = 240
;palfx.mul = 200,256,200
;palfx.add = 0,30,0


[State 10726, HitDef]
type = HitDef
trigger1 = time < 500
trigger1 = random < 10
trigger1 = time > 100
attr = A,NA
damage = 6,6
animtype =  medium
guardflag =  MA
hitflag = MAF
priority = 4, Hit
pausetime = 20,20
sparkno = 5
sparkxy = -0, 0
guard.sparkno = 5
hitsound = s15,17
guardsound = 0,0
ground.type = high
ground.slidetime = 1
ground.hittime = 1
ground.velocity = -1,0
air.fall = 0
air.velocity = 0, 0
;palfx.time = 240
;palfx.mul = 200,256,200
;palfx.add = 0,30,0



 [State 10726, HitDef]
type = HitDef
trigger1 = time = 1
attr = A,NA
damage = 6,6
animtype =  light
guardflag =  MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = 5
sparkxy = -0, 0
guard.sparkno = 5
hitsound = 0,0
guardsound = 0,0
ground.type = high
ground.slidetime = 1
ground.hittime = 1
ground.velocity = -1,0
air.fall = 0
air.velocity = 0, 0
palfx.time = 600
palfx.mul = 200,256,200
palfx.add = 0,30,0




  [State 10727, PlaySnd]
type = PlaySnd
trigger1 =  time = 1
value = S230,10
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0


[state 10726, destroyself]
type = destroyself
trigger1 = time > 500

;----------------------end of poison code----------------------
;------------------------start of velocity bomb code---------


[Statedef 10821]
type = C
movetype = I
physics = N
ctrl = 0
anim = 10601
velset = 0,0
sprpriority = 0


[State 10821, Helper]
type = Helper
trigger1 =  AnimElem = 3
trigger1 = NumHelper(10700) <= 1 ;this is a limit on missile count
helpertype = normal ;player      ;Because hey, I believe in a freeze
name = "pumpkinpatch"                ;on the Arms race....
ID =  10700                      ;
stateno =   10820
pos = 6,-29
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove


[State 10821, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos y > -10
value = 00
ctrl = 1
;anim =
;ignorehitpause =
;persistent =
[State 10821, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos  y <= -10
value = 10603      ;new code to fix stuck-in-air-after-move bug
ctrl = 0


;
;
;
;


[Statedef 10820]
type = C
movetype = A
physics = N
ctrl = 0
anim = 10600
velset = 0,0
sprpriority = 1


;note that if gravity works when y is less than -1
;then that means that gravity will take effect only
;when the pumpkin is 1 pixel off the ground
[State 10820, Gravity]
type = Gravity
trigger1 =  pos y < -1
trigger1 = time < 100

[State 10820, PosAdd]
type = PosAdd
trigger1 = time < 100
x = 1

[State 10820, VelAdd]
type = VelAdd
;trigger1 = pos y < -20
trigger1 = pos y >= -1
trigger1 = time < 100
x = 0
y = -(100/(time)+1)


[State 10820, VelMul]
type = VelMul
trigger1 = time > 60
trigger1 = time < 90
x = .9
y = .9


[State 10820, VelMul] ;this slows the pumpkin down when it's too high
type = VelMul
trigger1 = pos y < -200
y = .9


[State 10820, VelSet]
type = VelSet
trigger1 = time = 90
trigger1 = vel y < 2
y = 2

;make clank sound when it bounces
[State 10820, sound]
type = PlaySnd
trigger1 = pos y > -1
trigger1 = time < 105
value = S15,15



[State 10820, VelSet]
type = PosSet
trigger1 = time = 101
y = -4

[State 10820, VelSet]
type = VelSet
trigger1 = time = 102
y = 0
x = 0

[State 10820,fuseup]
type = Angledraw
trigger1 = p2dist x <= 150
trigger1 = p2dist x >= -150
value =  (random/100)



 ;yay, blow up on proximity!!
[State 10820, ChangeAnim]
type = changeanim
trigger1 = p2dist x < 30
trigger1 = p2dist x > -30
trigger1 = time > 50
trigger1 = anim != 10451
value = 10451



[State 10820, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger1 = anim = 10451
value = 15,2


;this makes the bomb hurt!
[State 10820, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 10,0          ;this is more of a push-back bomb
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 20,21
;pausetime = 5,10
sparkno = -1
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 150
ground.hittime  = 100       ;these values are fun, but they don't fit
ground.velocity = -20, 0    ;with my poison gas motif.
fall = 1
air.fall = 1
air.type = Low
air.hittime = 15
air.velocity = -16,-15
envshake.time = 2
envshake.ampl = 3



[State 10820, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; S,ST
slot = 1
stateno = 10600
time = -1
forceair = 1


;sixth day code... aka anti-clone code
[State 10820, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; S,HA
slot = 2
stateno = 10600
time = -1
forceair = 1

[State 10820, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; A,SA
slot = 6
stateno = 10600
time = -1
forceair = 1

[State 10820, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;S,NA
slot = 3
stateno = 10600
time = -1
forceair = 1
;

;making sure bombs are attackable and don't turn into clones of hobby
[State 10820, HitOverride]
type = HitOverride
trigger1 = ishelper
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT;C,NA
slot = 4
stateno = 10600
time = -1
forceair = 1

[State 10820, HitOverride]
type = HitOverride
trigger1 = ishelper
attr =SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT; A,NA
slot = 5
stateno = 10600
time = -1
forceair = 1


;make pumpkin bomb move when hit
[State 10820, HitVelSet]
type = HitVelSet
trigger1 = time < 150
x = 1

[State 10820, ScreenBound]
type = ScreenBound
trigger1 = time <= 100
value = 1
movecamera = 0,0



;if bomb hits ---> then personal injury is funny = laugh
[State 10820, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
trigger1 = anim = 10451
trigger1 = movehit
value = S15,16
volume = 0
channel = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =

;BIG BOOM!!!!!  ... is that enough exclamation marks?!?!?!!!!!
[State 10820]
type = explod;d4
;trigger1 = movehit
trigger1 = anim = 10451
trigger1 = animelem = 4
sprpriority = 2
anim = 10451
scale = 1.5,1.5

[State 10820, DestroySelf]
type = DestroySelf
trigger1 = animelem = 10
trigger1 = anim = 10451



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

;------------------------poison gas shooting code starts---------
;launch the gas shooter

[Statedef 10921]
type = C
movetype = I
physics = N
ctrl = 0
anim = 10601
velset = 0,0
sprpriority = 0

[State 10921, Helper]
type = Helper
trigger1 = AnimElem = 3
trigger2 = Animelem = 4
trigger3 = Animelem = 5
trigger4 = Animelem = 6
trigger5 = Animelem = 7
trigger6 = Animelem = 8
helpertype = normal ;player
name = "poisongas"
ID =  10900
stateno =   10920
pos = 16,-25
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove


[State 10921, Helper]
type = Helper
trigger1 = AnimElem = 3
trigger2 = Animelem = 4
trigger3 = Animelem = 5
trigger4 = Animelem = 6
trigger5 = Animelem = 7
trigger6 = Animelem = 8
helpertype = normal ;player
name = "poisongas"
ID =  10900
stateno =   10920
pos = 6,-20
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove


[State 10720, PlaySnd]
type = PlaySnd
trigger1 =  time = 10
value = 54,23




[State 10921, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos y > -10
value = 00
ctrl = 1
;anim =
;ignorehitpause =
;persistent =
[State 10921, changestate]
type = ChangeState
trigger1 = AnimElem = 7
trigger1 = pos  y <= -10
value = 10603      ;new code to fix stuck-in-air-after-move bug
ctrl = 0



;------------------The poison gas itself-------------



[Statedef 10920]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1173
velset = 1.5,-.5
sprpriority = 1


[State 0, Helper]
type = Helper
trigger1 = p2dist x < 50
trigger1 = numhelper(10901) < 1
helpertype = normal ;player
name = "poison"
ID = 10901
stateno = 10926
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove
pausemove



[State 10920, DestroySelf]
type = DestroySelf
trigger1 = time > 70
trigger2 = p2dist x < 50
trigger2 = numhelper(10901) >2


[Statedef 10926]
type = C
movetype = A
physics = N
ctrl = 0
anim = 10800
velset = 0,0
sprpriority = 1




[State 10926, HitDef]
type = HitDef
trigger1 = animelem = 1
attr = A,NA
damage = 1,1
animtype = light
guardflag = MA
hitflag = MAF
priority = 4, Hit
;pausetime = 13,14
pausetime = 2,1
sparkno = -1
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -1, 0
ground.slidetime = 2
ground.slidetime = 2
ground.hittime = 1
ground.velocity = 0,0
air.fall = 0
air.velocity = -1, -1
palfx.time = 300
palfx.mul = 200,256,200
palfx.add = 0,40,0


[State 10926, BindTotarget]
type = BindTotarget
trigger1 = time = 20
time = 500
facing = 1
pos = 0,0

[State 10926, PosAdd]
type = PosAdd
trigger1 = time < 500
x = (p2dist x)
y = (p2dist y)-40


[State 10726, HitDef]
type = HitDef
trigger1 = time < 500
trigger1 = random < 15
attr = A,NA
damage = 6,6
animtype =  light
guardflag =  MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = 5
sparkxy = -0, 0
guard.sparkno = 5
hitsound = 0,0
guardsound = 0,0
ground.type = low
ground.slidetime = 0
ground.hittime  = 00
ground.velocity = 0, 0
ground.slidetime = 0
ground.hittime = 0
ground.velocity = 0,0
air.fall = 0
air.velocity = 0, 0
;palfx.time = 240
;palfx.mul = 200,256,200
;palfx.add = 0,30,0



[State 10726, HitDef]
type = HitDef
trigger1 = time < 500
trigger1 = random < 10
trigger1 = time > 100
attr = A,NA
damage = 6,6
animtype =  medium
guardflag =  MA
hitflag = MAF
priority = 4, Hit
pausetime = 20,20
sparkno = 5
sparkxy = -0, 0
guard.sparkno = 5
hitsound = s15,17
guardsound = 0,0
ground.type = high
ground.slidetime = 1
ground.hittime = 1
ground.velocity = -1,0
air.fall = 0
air.velocity = 0, 0
;palfx.time = 240
;palfx.mul = 200,256,200
;palfx.add = 0,30,0


 [State 10726, HitDef]
type = HitDef
trigger1 = time = 1
attr = A,NA
damage = 6,6
animtype =  hard
guardflag =  MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = 5
sparkxy = -0, 0
guard.sparkno = 5
hitsound = 0,0
guardsound = 0,0
ground.type = high
ground.slidetime = 1
ground.hittime = 1
ground.velocity = -1,0
air.fall = 0
air.velocity = 0, 0
palfx.time = 600
palfx.mul = 200,256,200
palfx.add = 0,30,0



[State 10927, PlaySnd]
type = PlaySnd
trigger1 =  time = 1
value = S230,10
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0


[state 10926, destroyself]
type = destroyself
trigger1 = time > 500

