; Thanks to Falchion22 for this code
;------------------------------| AI Code Combo|-----------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; STAND_LIGHT_PUNCH
[Statedef 10000]
type = S
movetype = A
physics = S
anim = 200
poweradd = 5
velset = 0
ctrl = 0

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

[State 200, 2]
type = PlaySnd
trigger1 = Time = 0
trigger1 = Random < 500
value = 1,0

[State 200, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype = Light
damage = 10, 1
getpower = 20, 10
givepower = 10, 5
guardflag = M
pausetime = 8,9
sparkxy = -19,-37
sparkno = 0
hitsound = S2,0
guardsound = 6,0
ground.type = High
ground.slidetime = 8
ground.hittime = 8
ground.velocity = -3.5
air.velocity = -2,-3
airguard.velocity = -3,-2.5

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 10001

;---------------------------------------------------------------------------
; STAND LIGHT KICK
[Statedef 10001]
type = S
movetype = A
physics = S
anim = 220
poweradd = 20
juggle = 8
velset = 0
ctrl = 0

[State 220, 1]
type = PlaySnd
trigger1 = AnimELem = 2
value = 0,0

[State 220, 2]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500
value = 1,0

[State 220, 3]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype = Light
damage = 10, 1
guardflag = M
getpower = 25, 12
givepower = 12, 6
pausetime = 10,10
sparkxy = -39,-42
hitsound = S2,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime = 15
ground.velocity = -4
air.velocity = -1.3,-1

[State 220, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 10002

;---------------------------------------------------------------------------
; STAND HARD KICK
[Statedef 10002]
type = S
movetype = A
physics = S
anim = 230
poweradd = 30
ctrl = 0
velset = 0

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

[State 230, 3]
type = PlaySnd
trigger1 = Time = 0
trigger1 = Random < 500
value = 1,1

[State 230, 4]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype = Medium
damage = 15,2
getpower = 32, 16
givepower = 16, 8
guardflag = M
pausetime = 12,12
sparkno = 1
sparkxy = -27,-34
hitsound = S2,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 20
ground.hittime = 23
ground.velocity = -5
air.velocity = -3.5,-3

[State 230, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 10005

;---------------------------------------------------------------------------
; RABBIT COMBINATION (01)
[Statedef 10005]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1000
poweradd = 40
velset = 0,0

[State 1000, Fix1]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

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

[State 1000, 0b]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,2
channel = 1

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

[State 1000, 2]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
x = 3

[State 1000, 3]
type = VelAdd
trigger1 = Time >= 16
trigger1 = Vel X > 0
x = -.3 

[State 1000, Vel]
type = VelSet
trigger1 = Vel X <= 0
trigger1 = AnimElem != 1 || AnimELem != 2 || AnimElem != 3 || AnimElem != 4
x = 0

[State 1000, 3b]
type = HitDef
trigger1 = AnimElem = 5
attr = S, SA
animtype = Hard
getpower = 20, 10
givepower = 10, 5
guardflag = MA
damage = 30, 12
pausetime = 5, 22
sparkno = 2
sparkxy = -13,-16
hitsound = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 8
ground.hittime = 13
ground.velocity = -3
air.velocity = -3,-1.25

[State 1000, Command]
type = ChangeState
trigger1 = AnimElem = 6, = 1
value = 10006

;---------------------------------------------------------------------------
; RABBIT COMBINATION (02)
[Statedef 10006]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1005
poweradd = 40
velset = 0,0

[State 1001, Fix1]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

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

[State 1001, 0b]
type = PlaySnd
trigger1 = Time = 0
value = 0,2
channel = 1

[State 1001, 2a]
type = PosAdd
trigger1 = AnimElem = 2
x = 6

[State 1001, 2b]
type = VelSet
trigger1 = AnimElem = 2
x = 4
y = 0

[State 1000, 3]
type = VelAdd
trigger1 = Time >= 15
trigger1 = Vel X > 0
x = -.3 

[STate 1000, Vel]
type = VelSet
trigger1 = Vel X <= 0
trigger1 = AnimElem != 1 || AnimELem != 2 || AnimELem != 3
x = 0

[State 1001, 3b]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA
animtype = Hard
getpower = 20, 10
givepower = 10, 5
damage = 22,12
guardflag = M
pausetime = 5,17
sparkno = 2
sparkxy = -22,-29
hitsound = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 9
ground.hittime = 14
ground.velocity = -2,-5
air.velocity = -2,-5

[State 1001, Command]
type = ChangeState
trigger1 = AnimElem = 3, = 1
value = 10007

;---------------------------------------------------------------------------
; RABBIT COMBINATION (03) (ground)
[Statedef 10007]
number = 5
type    = S
movetype= A
physics = N
juggle  = 3
poweradd = 40
velset = 0
ctrl = 0
anim = 1010

[State 1002, Fix]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

[State 1002, 1]
type = PlaySnd
trigger1 = Time = 0
value = 40,0
volume = 0
channel = 0

[State 1002, 3]
type = ChangeState
trigger1 = AnimElem = 2
value = 10008

; RABBIT COMBINATION (03) (going up)
[Statedef 10008]
number = 8
type   = A
movetype = A
velset = 2,-3
juggle = 15

[State 1003, Sound Wind]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,2
channel = 1

[State 1003, 2] ;Gravity
type = VelAdd
trigger1 = Time >= 2
y = .39

[State 1003, 3]
type = Width
trigger1 = AnimElem = 2, >= 0
trigger1 = AnimElem = 4, < 0
value = 20

[State 1001, 3b]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
animtype = Hard
getpower = 20, 10
givepower = 10, 5
damage = 22,12
guardflag = M
pausetime = 5,17
sparkno = 2
sparkxy = -22,-29
hitsound = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime = 16
ground.velocity = 2.15,-2.5
air.velocity = 2.15,-2.5

[State 1003, 5]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
y = -8

[State 1001, Command]
type = ChangeState
trigger1 = AnimElem = 5, = 1
value = 10009

[State 1003, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
type = ChangeState
value = 52
ctrl = 1

;---------------------------------------------------------------------------
; RABBIT COMBINATION (04) (going up)
[Statedef 10009]
number = 8
type   = A
movetype = A
velset = 2.5,-.8
juggle = 15
anim = 1015

[State 1002, Fix]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

[State 1003, Voice]
type = PlaySnd
trigger1 = Time = 0
value = 1,2
channel = 0

[State 1003, Sound Wind]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,2
channel = 1

[State 1003, PP]
type = PlayerPush
trigger1 = Time = [0, 16]
value = 0

[State 1003, 1]
type = VelSet
trigger1 = AnimElem = 2
x = 0
y = 0

[State 1003, 2] ;Gravity
type = VelAdd
trigger1 = Time >= 15
x = .1
y = .39

[State 1003, 3]
type = Width
trigger1 = AnimElem = 1, >= 0
trigger1 = AnimElem = 3, < 0
value = 20

[State 1100, 3] ; Hard KICK!!!!
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
animtype  = DiagUp
damage    = 45, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -18,-46
hitsound   = S2,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = 4,-9.5
guard.velocity = 4
air.velocity = 4,-7.5
airguard.velocity = 4,-4.5
p2facing = 1
fall = ifelse(p2name = "Mercedes Benz",0, 1)                   ;Make p2 fall down
fall.recovertime = 40      ;40 ticks before p2 can recover from fall
yaccel = .4                ;p2 will accelerate down at .4 pixels/sec^2 when falling

[State 1003, 5]
type = PosAdd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
x = 6
y = -2

[State 1003, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
type = ChangeState
value = 52
ctrl = 1

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