[Statedef 5900]
type = S

;========================================================
;	SETTINGS
;========================================================

[State 0, Offense Multiplier]
type = VarSet
trigger1 = 1
fv = 20
value = 1.00

[State 0, Damage Dampening]
type = VarSet 
trigger1 = 1
fv = 15
value = 0.09

;========================================================
;	ELSE
;========================================================

[State 0, LBD Multiplier]
type = VarSet
trigger1 = 1
fv = 10
value = 1-(FVar(15)*1);0.91
[State 0, MBD Multiplier]
type = VarSet
trigger1 = 1
fv = 11
value = 1-(FVar(15)*2)
[State 0, HBD Multiplier]
type = VarSet
trigger1 = 1
fv = 12
value = 1-(FVar(15)*3)
[State 0, SD Multiplier]
type = VarSet
trigger1 = 1
fv = 13
value = 1-(FVar(15)*4)
[State 0, HD Multiplier]
type = VarSet
trigger1 = 1
fv = 14
value = 1-(FVar(15)*5)

[State 5900, 3]
type = ChangeState
trigger1 = !RoundsExisted
value = 190+random%9
[State 5900, 3]
type = ChangeState
trigger1 = 1
value = 0

;---------------------------------------------------------------------------
; OLD - Stand C
[Statedef 6666] ;320
type    = S
movetype= A
physics = S
ctrl = 0
anim = 320
;poweradd = ceil(88*FVar(25))
facep2 = 1

[State 200, Snd Swing]
type = PlaySnd
trigger1 = AnimElem = 4
value = S0, 4

[State 0, Width]
type = Width
trigger1 = AnimElem = 2, 3
player = 32,-32

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 0 
x = -8
[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 4
x = -8
[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 4
x = 38
[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 8
x = 2
[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 9 ;AnimTime = 0
x = 4

[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S,NA
hitflag = MAF
guardflag = MA
animtype = heavy
priority = 7,Hit
damage = Ceil(56*FVar(20)*FVar(21)),0
pausetime = 12,12
sparkno = -1 ;S8000
guard.sparkno = -1 ;S8100
sparkxy = -8,-64
hitsound = S1,5
guardsound = S3,2
ground.type = Low
ground.slidetime = 24
ground.hittime = 24
guard.hittime = 24
air.hittime = 28
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -7,0
air.velocity = -5,-4
airguard.velocity = -7,0
id = 220
getpower = 128,64
givepower = 32,16

[State 0, Explod Hit H]
type = Explod
trigger1 = !MoveReversed
trigger1 = Var(8) = 1
anim = ifelse(MoveGuarded,8022,8002)
ID = ifelse(MoveGuarded,8022,8002)
pos = 56,-72
postype = p1
vfacing = ifelse(random>500,1,-1)
removetime = -2
supermovetime = 666
pausemovetime = 666
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, Dampening H]
type = VarSet
triggerall = MoveHit
trigger1 = Var(8) = 1
fv = 21
value = FVar(21)*FVar(12)
ignorehitpause = 1

[State 0, MoveType Idle]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

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


;---------------------------------------------------------------------------
; OLD - SuperPunch, Init
[Statedef 6666] ;2000
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2000
velset = 0,0
poweradd = -1000
facep2 = 1

[State 0, ScreenBound]
type = ScreenBound
triggerall = Var(5) = 1
triggerall = !MoveContact
trigger1 = Time >= 32
;trigger1 = Anim = 2001
;trigger1 = AnimElemNo(0) <= 4
value = 0
movecamera = 0,1

[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 0
time = 32
anim = -1
sound = S4,0
movetime = 32
darken = 0
p2defmul = 1
unhittable = 1
[State 0, Helper]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "SuperPalHelper"
ID = 2900
stateno = 2900
pos = -16,-56
postype = p1
supermovetime = 99999
pausemovetime = 99999

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 30
value = 2001
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 2001
triggerall = AnimElemNo(0) = 4
triggerall = !MoveHit
trigger1 = MoveContact
value = 2001
elem = 5
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 2001
trigger1 = Var(5) = 1 && Var(6) = 0
trigger1 = AnimElemNo(0) = 4
value = 2001
elem = 4

[State 5100, Dash FX F]
type = Explod
triggerall = Anim = 2001
trigger1 = AnimElem = 2
anim = 8320
pos = 40, 0
scale = 0.5,0.5
ownpal = 1
sprpriority = 3
[State 5100, Dash FX B]
type = Explod
triggerall = Anim = 2001
trigger1 = AnimElem = 2
anim = 8325
pos = 40, 0
scale = 0.5,0.5
ownpal = 1
sprpriority = -3
[State 5100, Ring FX F]
type = Explod
triggerall = Anim = 2001
trigger1 = Time = 35
anim = 8670
pos = 0, 0
scale = 0.5,0.5
ownpal = 1
sprpriority = 3
[State 5100, Ring FX B]
type = Explod
triggerall = Anim = 2001
trigger1 = Time = 35
anim = 8675
pos = 0, 0
scale = 0.5,0.5
ownpal = 1
sprpriority = -3
[State 5100, Punch FX F]
type = Explod
triggerall = Anim = 2001
trigger1 = Time = 35
anim = 8660
pos = 64, -80
scale = 0.5,0.5
bindtime = 666
ownpal = 1
sprpriority = 3
removeongethit = 1
[State 5100, Punch FX B]
type = Explod
triggerall = Anim = 2001
trigger1 = Time = 35
anim = 8665
pos = 64, -80
scale = 0.5,0.5
bindtime = 666
ownpal = 1
sprpriority = -3
removeongethit = 1

[State 0, Turn]
type = Turn
triggerall = Var(5) = 1
triggerall = Anim = 2001
trigger1 = AnimElem = 2

[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 2001
trigger1 = AnimElem = 3
x = 19
[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 2001
trigger1 = AnimElem = 4
x = 2
[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 2001
trigger1 = AnimElem = 5
x = -12
[State 0, PosSet]
type = PosSet
triggerall = Anim = 2001
triggerall = AnimElemNo(0) = 4
trigger1 = FrontEdgeDist <= -56
x = ifelse(Pos X<0,248,-248)

[State 0, VelSet]
type = VelSet
triggerall = Anim = 2001
trigger1 = Var(5) != 1
trigger1 = AnimElemNo(0) = [3,4]
x = 14
[State 0, VelSet]
type = VelSet
triggerall = Var(5) = 1
triggerall = Var(6) = 0
triggerall = Anim = 2001
trigger1 = AnimElemNo(0) = [3,4]
x = 24
[State 0, VelSet]
type = VelSet
triggerall = Var(5) = 1
triggerall = Var(6) = 1
triggerall = Anim = 2001
trigger1 = AnimElemNo(0) = 4
x = 20
[State 0, VelMul]
type = VelMul
triggerall = Anim = 2001
trigger1 = AnimElemNo(0) = [5,10]
x = 0.8
[State 0, VelSet]
type = VelSet
triggerall = Anim = 2001
trigger1 = AnimElem = 11
x = 0

[State 200, Snd Swing]
type = PlaySnd
trigger1 = Anim = 2001
trigger1 = AnimElem = 2
value = S0, 4

[State 0, Var Strength]
type = VarSet
trigger1 = Time = 0
v = 5
value = var(9)
[State 0, Var Strength]
type = VarSet
trigger1 = Time = 0 && Var(15)
trigger1 = P2BodyDist X > 128
v = 5
value = 1
[State 0, Var Strength]
type = VarSet
trigger1 = Time = 0 && Var(15)
trigger1 = P2BodyDist X <= 128
trigger1 = Var(5) = 1
v = 5
value = 0
[State 0, Var Flip Check]
type = VarSet
trigger1 = Time = 0
v = 6
value = 0
[State 0, Var Flip Check]
type = VarSet
triggerall = Anim = 2001
triggerall = AnimElemNo(0) = 4
trigger1 = FrontEdgeDist <= -48 + Vel X
v = 6
value = 1
[State 0, Var Z Timer Reset]
type = VarSet
trigger1 = Time = 0
v = 7
value = 0

[State 0, HitDef]
type = HitDef
triggerall = Var(5) != 2
trigger1 = !MoveContact
trigger1 = AnimElemNo(0) = 4
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = heavy
priority = 5,Hit
damage = 80+Ceil(80*FVar(20)*FVar(21)),25
pausetime = 1,1
guard.pausetime = 8,8
sparkno = -1 ;S8000
guard.sparkno = -1 ;S8100
sparkxy = -8,-64
hitsound = S1,6
guardsound = S3,2
ground.type = High
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 20
air.hittime = 20
yaccel = 0.5
ground.velocity = -8,0
air.velocity = -8,-1
airguard.velocity = -8,0
p2stateno = 2005
p2facing = 1
kill = 0
snap = 48,0
id = 2000
getpower = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 8
envshake.freq = 120
envshake.ampl = -12
envshake.phase = 120

[State 0, HitDef]
type = HitDef
triggerall = Var(5) = 2
trigger1 = !MoveContact
trigger1 = AnimElemNo(0) = 4
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = heavy
priority = 5,Hit
damage = Ceil(16*FVar(20)*FVar(21)),25
pausetime = 1,1
guard.pausetime = 8,8
sparkno = -1 ;S8000
guard.sparkno = -1 ;S8100
sparkxy = -8,-64
hitsound = S1,3
guardsound = S3,2
ground.type = High
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 20
air.hittime = 20
yaccel = 0.5
ground.velocity = -4,0
air.velocity = -4,0
airguard.velocity = -4,0
p2stateno = 2006
p2facing = 1
kill = 0
snap = 48,0
id = 2000
getpower = 0,0
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
envshake.time = 8
envshake.freq = 120
envshake.ampl = -12
envshake.phase = 120

[State 0, Explod Hit H]
type = Explod
trigger1 = !MoveReversed
trigger1 = Var(8) = 1
anim = ifelse(MoveGuarded,8022,8002)
ID = ifelse(MoveGuarded,8022,8002)
pos = 48,-76
postype = p1
vfacing = ifelse(random>500,1,-1)
removetime = -2
supermovetime = 666
pausemovetime = 666
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time <= 32
value = ,NA,SA,HA,NP,SP,HP
time = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time = 32
value = ,NP,SP,HP
time = 8

[State 0, MoveType Idle]
type = StateTypeSet
triggerall = Anim = 2001
trigger1 = AnimElem = 5
movetype = I
[State 0, CtrlSet]
type = CtrlSet
triggerall = Anim = 2001
trigger1 = AnimElem = 14
value = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveHit
value = ifelse(var(5)!=2,2001,2002)
[State 0, ChangeState]
type = ChangeState
trigger1 = Anim = 2001
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; OLD - SuperPunch XY, Hit
[Statedef 6666] ;2001
type    = S
movetype= A
physics = N
anim = 2002
ctrl = 0
velset = 0,0

[State 0, TargetBind]
type = TargetBind
trigger1 = Time <= 16
time = 1
pos = 48,0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = Time <= 24
value = 0
movecamera = 1,1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = Time <= 24
value = 0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time <= 32
value = SCA
time = 1

[State 0, Offset]
type = Offset
trigger1 = Time = [1,16]
x = (Ceil(Time*-0.25))+random%(Ceil(Time*0.5))
;y = (Time/2)+random%(Time)

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 6
[State 0, VelMul]
type = VelMul
trigger1 = AnimElemNo(0) = [3,8]
x = 0.85

[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = back
priority = 9,Hit
damage = 24+Ceil(24*FVar(20)*FVar(21)),0
pausetime = 1,1
guard.pausetime = 8,8
sparkno = -1 ;S8000
guard.sparkno = -1 ;S8100
sparkxy = -8,-64
hitsound = S1,7
guardsound = S3,2
ground.type = High
ground.slidetime = 32
ground.hittime = 32
guard.hittime = 32
air.hittime = 32
yaccel = 0.4
fall = 1
fall.recover = 0
ground.velocity = -4,-6
air.velocity = -4,-6
airguard.velocity = -8,0
id = 2001
getpower = 0,0
envshake.time = 4
envshake.freq = 80
envshake.ampl = -8
envshake.phase = 80

[State 0, Explod Hit H]
type = Explod
trigger1 = !MoveReversed
trigger1 = Var(8) = 1
anim = ifelse(MoveGuarded,8022,8012)
ID = ifelse(MoveGuarded,8022,8012)
pos = 52,-80
postype = p1
vfacing = ifelse(random>500,1,-1)
removetime = -2
supermovetime = 666
pausemovetime = 666
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, MoveType Idle]
type = StateTypeSet
triggerall = Anim = 2001
trigger1 = AnimElem = 3
movetype = I
[State 0, CtrlSet]
type = CtrlSet
triggerall = Anim = 2001
trigger1 = AnimElem = 12
value = 1

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


;---------------------------------------------------------------------------
; OLD - SuperPunch EX, Init
[Statedef 6666] ;2050
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2000
velset = 0,0
poweradd = -2000
facep2 = 1

[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 0
time = 32
anim = -1
sound = S4,1
movetime = 32
darken = 0
p2defmul = 1
unhittable = 1
[State 0, Helper]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "SuperPalHelper"
ID = 2910
stateno = 2910
pos = -16,-56
postype = p1
supermovetime = 99999
pausemovetime = 99999

[State 0, Width]
type = Width
triggerall = Anim = 2001
trigger1 = AnimElemNo(0) = [1,4]
player = 16,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 28
value = 2001
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 2001
triggerall = AnimElemNo(0) = 4
triggerall = !MoveHit
trigger1 = MoveContact
value = 2001
elem = 5

[State 5100, Dash FX F]
type = Explod
triggerall = Anim = 2001
trigger1 = AnimElem = 2
anim = 8320
pos = 40, 0
scale = 0.5,0.5
ownpal = 1
sprpriority = 3
[State 5100, Dash FX B]
type = Explod
triggerall = Anim = 2001
trigger1 = AnimElem = 2
anim = 8325
pos = 40, 0
scale = 0.5,0.5
ownpal = 1
sprpriority = -3
[State 5100, Ring FX F]
type = Explod
triggerall = Anim = 2001
trigger1 = AnimElem = 4
anim = 8675
pos = 0, 0
scale = 0.5,0.5
ownpal = 1
sprpriority = 3
[State 5100, Ring FX B]
type = Explod
triggerall = Anim = 2001
trigger1 = AnimElem = 4
anim = 8670
pos = 0, 0
scale = 0.5,0.5
ownpal = 1
sprpriority = -3
[State 5100, Punch FX F]
type = Explod
triggerall = Anim = 2001
trigger1 = AnimElem = 4
anim = 8660
pos = 64, -80
scale = 0.5,0.5
bindtime = 666
ownpal = 1
sprpriority = 3
[State 5100, Punch FX B]
type = Explod
triggerall = Anim = 2001
trigger1 = AnimElem = 4
anim = 8665
pos = 64, -80
scale = 0.5,0.5
bindtime = 666
ownpal = 1
sprpriority = -3

[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 2001
trigger1 = AnimElem = 3
x = 19
[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 2001
trigger1 = AnimElem = 4
x = 2
[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 2001
trigger1 = AnimElem = 5
x = -12

[State 0, VelSet]
type = VelSet
triggerall = Anim = 2001
trigger1 = AnimElemNo(0) = [3,4]
x = 16
[State 0, VelMul]
type = VelMul
triggerall = Anim = 2001
trigger1 = AnimElemNo(0) = [5,10]
x = 0.8
[State 0, VelSet]
type = VelSet
triggerall = Anim = 2001
trigger1 = AnimElem = 11
x = 0

[State 200, Snd Swing]
type = PlaySnd
trigger1 = Anim = 2001
trigger1 = AnimElem = 2
value = S0, 4

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact
trigger1 = AnimElemNo(0) = 4
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = heavy
priority = 9,Hit
damage = 104+Ceil(104*FVar(20)*FVar(21)),32
pausetime = 1,1
guard.pausetime = 8,8
sparkno = -1 ;S8000
guard.sparkno = -1 ;S8100
sparkxy = -8,-64
hitsound = S1,6
guardsound = S3,2
ground.type = High
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 20
air.hittime = 20
yaccel = 0.5
ground.velocity = -8,0
air.velocity = -8,-1
airguard.velocity = -8,0
p2stateno = 2055
p2facing = 1
kill = 0
snap = 48,0
id = 2000
getpower = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 12
envshake.freq = 160
envshake.ampl = -16
envshake.phase = 160

[State 0, Explod Hit H]
type = Explod
trigger1 = !MoveReversed
trigger1 = Var(8) = 1
anim = ifelse(MoveGuarded,8022,8012)
ID = ifelse(MoveGuarded,8022,8012)
pos = 48,-76
postype = p1
vfacing = ifelse(random>500,1,-1)
removetime = -2
supermovetime = 666
pausemovetime = 666
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time <= 36
value = ,NA,SA,HA,NP,SP,HP
time = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time = 36
value = ,NP,SP,HP
time = 8

[State 0, MoveType Idle]
type = StateTypeSet
triggerall = Anim = 2001
trigger1 = AnimElem = 5
movetype = I
[State 0, CtrlSet]
type = CtrlSet
triggerall = Anim = 2001
trigger1 = AnimElem = 14
value = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveHit
value = 2051
[State 0, ChangeState]
type = ChangeState
trigger1 = Anim = 2001
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; OLD - SuperPunch EX, Hit
[Statedef 6666] ; 2051
type    = S
movetype= A
physics = N
anim = 2050
ctrl = 0
velset = 0,0

[State 0, TargetBind]
type = TargetBind
trigger1 = Time <= 32
time = 1
pos = 48,0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = Time <= 32
value = 0
movecamera = 1,1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = Time <= 48
value = 0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time <= 32
value = SCA
time = 1

[State 0, Offset]
type = Offset
trigger1 = Time = [1,8]
x = (-8+Time)+random%(1+ceil(16-Time*2))
y = (-8+Time)+random%(1+ceil(16-Time*2))
[State 0, Offset]
type = Offset
trigger1 = Time = [16,32]
x = (Ceil((Time-16)*-0.5))+random%(Ceil((Time-16)*1))
y = (Ceil((Time-16)*-0.5))+random%(Ceil((Time-16)*1))

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 6
[State 0, VelMul]
type = VelMul
trigger1 = AnimElemNo(0) = [3,8]
x = 0.85

[State 200, Snd Exp 1]
type = PlaySnd
trigger1 = Time = 26
value = S2, 10
[State 200, Snd Exp 2]
type = PlaySnd
trigger1 = Time = 32
value = S2, 9

[State 0, Explod]
type = Explod
trigger1 = Time = 26
anim = 8610
ID = 8610
pos = 0,0
postype = p1
removetime = -2
scale = 0.5,0.5
sprpriority = 9
ownpal = 1
[State 0, Explod]
type = Explod
trigger1 = Time = 26
anim = 8610
ID = 8610
pos = 0,0
postype = p1
facing = -1
removetime = -2
scale = 0.5,0.5
sprpriority = -2
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 32
anim = 2055
ID = 2055
pos = 150,75
postype = left
bindtime = 666
removetime = -2
pausemovetime = 666
scale = 50,50
sprpriority = 9
ontop = 1
ownpal = 1

[State 0, PalFX]
type = PalFX
trigger1 = Time = [16,32]
time = 1
add = 16*(Time-16),16*(Time-16),16*(Time-16)
;[State 0, PalFX]
;type = PalFX
;trigger1 = Time = [32,64]
;time = 1
;add = 256-(8*(Time-32)),256-(8*(Time-32)),256-(8*(Time-32))
;[State 0, PalFX]
;type = BgPalFX
;trigger1 = Time = [32,64]
;time = 4
;add = 256-(8*(Time-32)),256-(8*(Time-32)),256-(8*(Time-32))

[State 0, Pause]
type = Pause
trigger1 = Time%4 != 0
trigger1 = Time = [32,64]
trigger2 = Time%2 != 0
trigger2 = Time = [64,72]
trigger3 = Time%4 = 0
trigger3 = Time = [72,80]
time = 1
movetime = 0
[State 0, Pause]
type = Pause
trigger1 = Time = 32
time = 16
movetime = 0

[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = back
priority = 9,Hit
damage = 64+Ceil(64*FVar(20)*FVar(21)),0
pausetime = 1,1
guard.pausetime = 8,8
sparkno = -1 ;S8000
guard.sparkno = -1 ;S8100
sparkxy = -8,-64
hitsound = S1,8
guardsound = S3,2
ground.type = High
ground.slidetime = 32
ground.hittime = 32
guard.hittime = 32
air.hittime = 32
yaccel = 0.2
fall = 1
fall.recover = 0
ground.velocity = -1.5,-6
air.velocity = -1.5,-6
airguard.velocity = -8,0
id = 2001
getpower = 0,0
envshake.time = 48
envshake.freq = 80
envshake.ampl = -16
envshake.phase = 80

[State 0, Explod Hit H]
type = Explod
trigger1 = !MoveReversed
trigger1 = Var(8) = 1
anim = ifelse(MoveGuarded,8022,8012)
ID = ifelse(MoveGuarded,8022,8012)
pos = 52,-80
postype = p1
vfacing = ifelse(random>500,1,-1)
removetime = -2
supermovetime = 666
pausemovetime = 666
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, MoveType Idle]
type = StateTypeSet
triggerall = Anim = 2001
trigger1 = AnimElem = 3
movetype = I
[State 0, CtrlSet]
type = CtrlSet
triggerall = Anim = 2001
trigger1 = AnimElem = 12
value = 1

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

;---------------------------------------------------------------------------
; OLD - SuperPunch EX, Victim
[Statedef 6666] ; 2055
type = S
movetype = H
physics = N
velset = 0,0
sprpriority = 1

[State 0, Offset]
type = Offset
trigger1 = Time = [1,32]
x = -4+random%9;(-16+Time)+random%(1+ceil(32-Time*2))
y = -4+random%9;(-16+Time)+random%(1+ceil(32-Time*2))

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time < 32
value = SCA
time = 1

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = 1
value = 5030

[State 0, PalFX]
type = PalFX
trigger1 = Time = 32
time = 64
add = 128,64,48
mul = 128,96,32
sinadd = 128,96,16,5
color = 0

[State 0, SelfState]
type = SelfState
trigger1 = Time = 40
value = 5030


;---------------------------------------------------------------------------
; OLD - Win - Yup
[Statedef 6666] ;182
type = S
ctrl = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 181
value = 181
elem = 1+((random%16)*2)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time%4 = 0
value = 181
elem = AnimElemNo(0)-2;Floor(Floor(AnimElemNo(0)-1)*0.5)*2

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

;[State 0, Helper]
;type = Helper
;triggerall = NumHelper(7180) < 12
;trigger1 = Time = 0
;trigger2 = Time%4 = 0 && Random < 500
;name = "YUP"
;ID = 7180 
;stateno = 7180

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = ifelse(random<500,(-500-random)*0.01,(500+random)*0.01)
y = (-2000-random)*0.01
[State 0, VelAdd]
type = VelAdd
trigger1 = Time
y = 2

[State 0, PosSet]
type = PosSet
trigger1 = Pos Y + Vel Y > 0
y = 0

[State 0, Snd Yup]
type = PlaySnd
trigger1 = Pos Y + Vel Y > 0
trigger2 = !Time
value = S181,0
channel = 0

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y + Vel Y > 0
y = (-2000-random)*0.01
[State 0, VelSet]
type = VelSet
trigger1 = BackEdgeDist < 8
trigger1 = Vel X < 0
trigger2 = FrontEdgeDist < 8
trigger2 = Vel X > 0
x = Vel X * -1

[State 181, 0]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
[State 181, 0]
type = AssertSpecial
trigger1 = Time < 280
flag = RoundNotOver

;---------------------------------------------------------------------------
; OLD - H - YUP
[Statedef 6666] ;7180
type = S
anim = 666

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 181
value = 181
elem = 1+((random%16)*2)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time%4 = 0
value = 181
elem = AnimElemNo(0)-2;Floor(Floor(AnimElemNo(0)-1)*0.5)*2

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = ifelse(random<500,(-500-random)*0.01,(500+random)*0.01)
y = (-2000-random)*0.01
[State 0, VelAdd]
type = VelAdd
trigger1 = Time
y = 2

[State 0, PosSet]
type = PosSet
trigger1 = Pos Y + Vel Y > 0
y = 0

[State 0, Snd Yup]
type = PlaySnd
trigger1 = Pos Y + Vel Y > 0
value = S181,0
channel = 0

;[State 0, VelSet]
;type = VelSet
;trigger1 = Pos Y + Vel Y > 0
;y = (-2000-random)*0.01
[State 0, VelSet]
type = VelSet
trigger1 = BackEdgeDist < 8
trigger1 = Vel X < 0
trigger2 = FrontEdgeDist < 8
trigger2 = Vel X > 0
x = Vel X * -1

[State 181, 0]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 0, DestroySelf]
type = DestroySelf
trigger1 = RoundState != 4
trigger2 = Pos Y + Vel Y >= 0
trigger3 = Time > 8 && Root,NumHelper(7180) > 8


;---------------------------------------------------------------------------
; OLD - Onslaught
[Statedef 6666] ;2100
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2100
velset = 0,0
poweradd = -1000
facep2 = 1

[State 0, Var Hits Reset]
type = VarSet
trigger1 = Time = 0
v = 5
value = 0
[State 0, Var Hits Reset]
type = VarAdd
trigger1 = Var(8) = 1
v = 5
value = 1
ignorehitpause = 1

[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 10
time = 32
anim = -1
sound = S4,ifelse(PrevStateNo=2250,1,0)
movetime = 32
darken = 0
p2defmul = 1
unhittable = 1
[State 0, Helper]
type = Helper
trigger1 = Time = 10
helpertype = normal
name = "SuperPalHelper"
ID = 2900
stateno = ifelse(PrevStateNo=2250,2910,2900)
pos = -8,-72
postype = p1
supermovetime = 99999
pausemovetime = 99999

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 2101
x = 12
[State 0, VelMul]
type = VelMul
trigger1 = Anim = 2102
x = 0.9

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 42
value = 2101
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 2101
trigger1 = Time = 80
trigger2 = MoveGuarded && !MoveHit
trigger3 = MoveReversed
trigger4 = Var(5) >= 9
value = 2102

[State 0, HitDef]
type = HitDef
trigger1 = Anim = 2101
trigger1 = Time%2 = 0
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = medium
priority = 9,Miss
damage = 8+Ceil(8*FVar(20)*FVar(21)),1
pausetime = 1,1
sparkno = -1 ;S8000
guard.sparkno = -1 ;S8100
sparkxy = -8,-80
hitsound = S1,4
guardsound = S3,2
ground.type = High
ground.slidetime = 18
ground.hittime = 18
guard.hittime = 16
air.hittime = 18
yaccel = 0.5
ground.velocity = -6,0
air.velocity = -8,-0.4
airguard.velocity = -3,0
id = 2100
getpower = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 0, HitDef]
type = HitDef
triggerall = !MoveGuarded
triggerall = !MoveReversed
trigger1 = Anim = 2102
trigger1 = AnimElem = 1, 1
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = diagup
priority = 9,Hit
damage = 32+Ceil(32*FVar(20)*FVar(21)),6
pausetime = 4,4
sparkno = -1 ;S8000
guard.sparkno = -1 ;S8100
sparkxy = -8,-80
hitsound = S1,6
guardsound = S3,2
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.hittime = 16
air.hittime = 24
yaccel = 0.6
ground.velocity = -3,-8
air.velocity = -3,-7
fall = 1
fall.recover = 0
airguard.velocity = -3,0
id = 2100
getpower = 0,0

[State 0, Explod Hit L]
type = Explod
trigger1 = !MoveReversed
trigger1 = Var(8) = 1
anim = ifelse(MoveGuarded,8022,ifelse(Anim=2101,8001,8012))
ID = ifelse(MoveGuarded,8022,8002)
pos = 28+random%5,-64-random%17
postype = p1
vfacing = ifelse(random>500,1,-1)
removetime = -2
supermovetime = 666
pausemovetime = 666
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, Helper]
type = Helper
trigger1 = Anim = 2100
trigger1 = AnimElem = 4
helpertype = normal
name = "Clone 1"
ID = 2120
stateno = 2120
ownpal = 1
supermovetime = 66666
;pausemovetime = 66666
[State 0, Helper]
type = Helper
trigger1 = Anim = 2100
trigger1 = AnimElem = 4
helpertype = normal
name = "Clone 2"
ID = 2121
stateno = 2121
ownpal = 1
supermovetime = 66666
;pausemovetime = 66666
[State 0, Helper]
type = Helper
trigger1 = Anim = 2100
trigger1 = AnimElem = 4
helpertype = normal
name = "Clone 3"
ID = 2122
stateno = 2122
ownpal = 1
supermovetime = 66666
;pausemovetime = 66666
[State 0, Helper]
type = Helper
trigger1 = Anim = 2100
trigger1 = AnimElem = 4
helpertype = normal
name = "Clone 4"
ID = 2123
stateno = 2123
ownpal = 1
supermovetime = 66666
;pausemovetime = 66666

[State 0, PalFX]
type = PalFX
trigger1 = Time = [16,36]
time = 1
add = 248-12*(Time-16),248-12*(Time-16),248-12*(Time-16)

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = Anim = 2102
trigger1 = AnimElem = 2
trigger2 = !MoveHit
movetype = I
[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time = [11,48]
value = ,NA,SA,NP,SP,HP
time = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time = [0,10]
value = ,NP,SP,HP
time = 1

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

;---------------------------------------------------------------------------
; OLD - Onslaught Clone 1
[Statedef 6666] ;2120
type    = S
movetype= I
physics = N
ctrl = 0
anim = 666
sprpriority = 3

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 5
value = 1
[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -2
y = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 2125

;---------------------------------------------------------------------------
; OLD - Onslaught Clone 2
[Statedef 6666] ;2121
type    = S
movetype= I
physics = N
ctrl = 0
anim = 666
sprpriority = 2

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 5
value = 2
[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -1
y = 0.5

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 2125

;---------------------------------------------------------------------------
; OLD - Onslaught Clone 3
[Statedef 6666]  ; 2122
type    = S
movetype= I
physics = N
ctrl = 0
anim = 666
sprpriority = -1

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 5
value = 3
[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 1
y = -0.5

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 2125

;---------------------------------------------------------------------------
; OLD - Onslaught Clone 4
[Statedef 6666] ;2123
type    = S
movetype= I
physics = N
ctrl = 0
anim = 666
sprpriority = -2

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 5
value = 4
[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = 2
y = -1

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 2125

;---------------------------------------------------------------------------
; OLD - Onslaught Clone Run
[Statedef 6666] ;2125
type    = S
movetype= I
physics = N
ctrl = 0

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

[State 0, VarSet]
type = VarSet
trigger1 = Time = 0
v = 4
value = 248
[State 0, VarSet]
type = VarAdd
trigger1 = Var(4) > 0
v = 4
value = -12
[State 0, VarSet]
type = VarSet
trigger1 = Var(5) = 1 || Var(5) = 4
trigger1 = Time = 34
trigger2 = Var(5) = 2 || Var(5) = 3
trigger2 = Time = 30
v = 6
value = floor(ParentDist X)
[State 0, VarSet]
type = VarSet
trigger1 = Var(5) = 1 || Var(5) = 4
trigger1 = Time = 34
trigger2 = Var(5) = 2 || Var(5) = 3
trigger2 = Time = 30
v = 7
value = floor(ParentDist Y)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(5) = 1 || Var(5) = 4
trigger1 = Time <= 4
trigger2 = Var(5) = 2 || Var(5) = 3
trigger2 = Time <= 2
value = 2100
elem = 4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(5) = 1 || Var(5) = 4
trigger1 = Time = 34
trigger2 = Var(5) = 2 || Var(5) = 3
trigger2 = Time = 30
value = 2101

[State 0, VelSet]
type = VelSet
trigger1 = Time = 12
x = 0
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = Parent,Anim = 2102
trigger2 = Parent,StateNo != 2100
x = 12
[State 0, BindToParent]
type = BindToParent
triggerall = Parent,Anim = 2101
trigger1 = Var(5) = 1 || Var(5) = 4
trigger1 = Time >= 34
trigger2 = Var(5) = 2 || Var(5) = 3
trigger2 = Time >= 30
time = 1
pos = -Var(6),-Var(7)
persistent = 1

[State 5100, Smoke FX]
type = Explod
triggerall = Var(5) = 1
triggerall = Anim = 2101
trigger1 = Time%4 = 0
;trigger1 = NumHelper(8630) <= 16 || Random < 250
anim = 8630+random%2
id = 8630
pos = -8+random%37, -8+random%17
vel = 4,0
scale = 0.66,0.66
sprpriority = -3+random%7
ownpal = 1

[State 0, EnvShake]
type = EnvShake
triggerall = Anim = 2101
trigger1 = Time%4 = 0
time = 8
freq = 40
ampl = -4
phase = 40

;[State 0, Trans]
;type = Trans
;trigger1 = 1
;trans = addalpha
;alpha = 192+random%64,32+random%224
[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = Var(4)+64+random%128,Var(4)+128+random%128,Var(4)+248
mul = Var(4)+64+random%128,Var(4)+128+random%128,Var(4)+248
color = 0

[State 0, DestroySelf]
type = DestroySelf
triggerall = Time >= 64
trigger1 = FrontEdgeDist <= -48
