;Shaq
;Creator: The_None
;Story by: Alosson
;Backstory;
;So one day BK was in the park, he saw a guy playing basketball and asked to be friends
;so the guy said he would if he won in a game of basketball so he played and lost
;he figured out the guy was Shaq, ever through he lost Shaq agreed to be his friend
;so now Black Kyurem and Shaq are a tag-team team in the MUGEN world.
;Shaq shows up as an assit, he uses 500 power to summon him, but he has quite
;a few attacks on hand, making him a useful partner.
;---------------------------------------------------------------------------
; Shaq = running
[Statedef 730]
type    = S
movetype= I
physics = N
velset = 3,0
poweradd = -500
anim = 730
ctrl = 0

[State 0, ]
type = DisplayToClipboard
trigger1 = 1
text = "dist = %d"
params = floor(p2bodydist x)

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

[State 0, ]
type = ChangeState
trigger1 = time = [55,65]
trigger1 = p2bodydist x >= 70
trigger1 = random < 60
value = 731

[State 0, ]
type = ChangeState
trigger1 = time >= 30
trigger1 = p2bodydist x = [143,153]
trigger1 = random < 110
trigger2 = time >= 8
trigger2 = p2bodydist x <= 160
trigger2 = p2statetype=A
value = 732

[State 0, ]
type = ChangeState
trigger1 = time > 12
trigger1 = p2bodydist x < 50
value = 7301

;---------------------------------------------------------------------------
; Shaq = halting
[Statedef 7301]
type    = S
movetype= I
physics = N
anim = 7301
ctrl = 0

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

[State 0, ]
type = VelMul
trigger1 = 1
x = 0.9

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = ifelse(random<500,735,736)+ifelse(random<500,0,1)

;---------------------------------------------------------------------------
; Shaq teleport
[Statedef 731]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 731
ctrl = 0

[State 0, ]
type = PlaySnd
trigger1 = time = 0
value = 0,13

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

[State 0, ]
type = PosAdd
trigger1 = animelem = 3
x = p2bodydist x - 30

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = ifelse(random<500,735,736)+ifelse(random<500,0,1)

;---------------------------------------------------------------------------
; Shaq = running again goodbye
[Statedef 7302]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 730
ctrl = 0

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

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

[State 0, ]
type = DestroySelf
trigger1 = frontedgedist < -30

; JUMP! JUMP!
[Statedef 732]
type    = S
movetype= I
physics = N
velset = 2,0
anim = 732
ctrl = 0

[State 0, ]
type = HitOverride
trigger1 = animelemtime(4) < 0
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

[State 0, ]
type = HitOverride
trigger1 = animelemtime(4) >= 0
slot = 0
attr = SCA,AA,AP,AT
stateno = 739
time = -1
ignorehitpause = 1

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

[State 0, ]
type = VelSet
trigger1 = animelem = 4
x = 3.8
y = -8

[State 0, ]
type = Gravity
trigger1 = animelemtime(4) >= 0

[State 0, ]
type = ChangeState
trigger1 = animelemtime(4) >= 0
trigger1 = pos y >= 0
trigger1 = vel y >= 0
value = 734

[State 0, ]
type = ChangeState
trigger1 = time > 30
trigger1 = pos y >= -80
trigger1 = vel y >= 0
trigger2 = time > 9
trigger2 = p2statetype = A
trigger2 = p2bodydist x <= 40
value = 733

; SHOOP DA WHOOP
[Statedef 733]
type    = A
movetype= A
physics = N
anim = 733
ctrl = 0

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

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 739
time = -1
ignorehitpause = 1

[State 0, ]
type = Gravity
trigger1 = 1

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage = 38
guardflag = HA
pausetime = 8,8
sparkno = 0
sparkxy = -5,-55
hitsound   = 5,1
guardsound = 5,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 20
ground.velocity = -3
air.velocity = -3,-3
air.fall = 1

[State SHAQ!!!!]
type = Explod
trigger1 = winko
trigger1 = movehit
anim = 969
id = 666
pos = 0,0
postype = left
bindtime = -1
supermovetime = 65535
pausemovetime = 65535
scale = 1,1
sprpriority = -666
ownpal = 1
ignorehitpause = 1
persistent = 0

[State SHAQ!!!!]
type = SuperPause
trigger1 = winko
trigger1 = movehit
time = 16
anim = -1
sound = S1111,6
darken = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = vel y >= 0
value = 734

;---------------------------------------------------------------------------
; Shaq landing
[Statedef 734]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 734
ctrl = 0

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

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

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = ifelse( random<500 ,7302 , ifelse(random<500,735,736)+ifelse(random<500,0,1) )

;---------------------------------------------------------------------------
; Shaq's crouching kick
[Statedef 735]
type    = C
movetype= A
physics = C
velset = 0,0
anim = 735
ctrl = 0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 3, 0
freqmul = 0.8

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage = 50
animtype = hard
guardflag = L
hitflag = MAFD
priority = 2, Hit
pausetime = 8, 8
sparkno = 0
sparkxy = -10, -18
hitsound = 5, 2
guardsound = 6, 0
ground.type = trip
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = 0,-2
air.type = High
air.velocity = 0,-2
air.hittime = 12
guard.dist = 75
fall = 1
down.bounce = 0
down.velocity = 0
down.time = 11

[State SHAQ!!!!]
type = Explod
trigger1 = winko
trigger1 = movehit
anim = 969
id = 666
pos = 0,0
postype = left
bindtime = -1
supermovetime = 65535
pausemovetime = 65535
scale = 1,1
sprpriority = -666
ownpal = 1
ignorehitpause = 1
persistent = 0

[State SHAQ!!!!]
type = SuperPause
trigger1 = winko
trigger1 = movehit
time = 16
anim = -1
sound = S1111,6
darken = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = 7302

;---------------------------------------------------------------------------
; Shaq's roundhouse kick
[Statedef 736]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 736
ctrl = 0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 3, 0
freqmul = 0.85

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 50
animtype = hard
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 8, 8
sparkno = 0
sparkxy = -10, -61
hitsound = 5, 2
guardsound = 6, 0
ground.type = high
ground.slidetime = 5
ground.hittime = 20
ground.velocity = -4,-4
air.type = High
air.velocity = -6,-4
air.hittime = 20
guard.dist = 75
fall = 1

[State SHAQ!!!!]
type = Explod
trigger1 = winko
trigger1 = movehit
anim = 969
id = 666
pos = 0,0
postype = left
bindtime = -1
supermovetime = 65535
pausemovetime = 65535
scale = 1,1
sprpriority = -666
ownpal = 1
ignorehitpause = 1
persistent = 0

[State SHAQ!!!!]
type = SuperPause
trigger1 = winko
trigger1 = movehit
time = 16
anim = -1
sound = S1111,6
darken = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = 7302

;---------------------------------------------------------------------------
; Shaq's short kick
[Statedef 737]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 737
ctrl = 0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 3, 0
freqmul = 0.9

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 738
time = -1
ignorehitpause = 1

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 25
animtype = medium
guardflag = L
hitflag = MAF
priority = 2, Hit
pausetime = 8, 8
sparkno = 0
sparkxy = -10, -46
hitsound = 5, 1
guardsound = 6, 0
ground.type = low
ground.slidetime = 5
ground.hittime  = 24
ground.velocity = -3
air.type = low
air.velocity = -3
air.hittime = 21
guard.dist = 75

[State 0, ]
type = ChangeState
trigger1 = animelem = 9
trigger1 = random < 500
value = ifelse(random<500,735,736)

[State SHAQ!!!!]
type = Explod
trigger1 = winko
trigger1 = movehit
anim = 969
id = 666
pos = 0,0
postype = left
bindtime = -1
supermovetime = 65535
pausemovetime = 65535
scale = 1,1
sprpriority = -666
ownpal = 1
ignorehitpause = 1
persistent = 0

[State SHAQ!!!!]
type = SuperPause
trigger1 = winko
trigger1 = movehit
time = 16
anim = -1
sound = S1111,6
darken = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = 7302

;---------------------------------------------------------------------------
; Shaq is hit
[Statedef 738]
type    = L
movetype= H
physics = N
velset = 0,0
anim = 738
ctrl = 0

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 739
time = -1
ignorehitpause = 1

[State 0, ]
type = ChangeAnim
trigger1 = !hitshakeover
value = 738

[State 0, ]
type = PlaySnd
trigger1 = animelem = 5
value = 11,0

[State 0, ]
type = ChangeState
trigger1 = gethitvar(yvel)
value = 739

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

;---------------------------------------------------------------------------
; Shaq is in trouble
[Statedef 739]
type    = A
movetype= H
physics = N
anim = 739
velset = -4,-4
ctrl = 0

[State 0, ]
type = ChangeAnim
trigger1 = !hitshakeover
value = 739

[State 0, ]
type = PosFreeze
trigger1 = !hitshakeover

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 739
time = -1
ignorehitpause = 1

[State 0, ]
type = HitVelSet
trigger1 = hitshakeover
x = 1
y = 1
persistent = 0

[State 0, ]
type = VelSet
trigger1 = time = 0
x = gethitvar(xvel) * ((enemy,facing)*-1)
y = gethitvar(yvel)

[State 0, ]
type = Gravity
trigger1 = 1

[State 0, ]
type = ChangeState
trigger1 = hitshakeover
trigger1 = pos y >= 0
trigger1 = vel y >= 0
value = 7391

[Statedef 7391]
type    = S
movetype= H
physics = N
anim = 7391
velset = 0,0
ctrl = 0

[State 0, ]
type = HitOverride
trigger1 = 1
slot = 0
attr = SCA,AA,AP,AT
stateno = 739
time = -1
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = time = 0
value = F7,0

[State 0, ]
type = Explod
trigger1 = time = 0
anim = F60
pos = 0,0
postype = p1
supermovetime = 65535
pausemovetime = 65535
sprpriority = -1
ownpal = 1

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

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