;---------------------------------------------------------------------------
; Regular moves
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Stand Jab
[Statedef 200]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 0                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 200                       ;Change animation (Def: no change)
poweradd = 0                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = ceil(10 * fvar(3)), 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 10                 ;Time attacker pauses, time opponent shakes
sparkno = S201 ;0                      ;Spark anim no (Def: set above)
sparkxy = -10, -100;-10, -76               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S2, 0                  ;Sound to play on hit
guardsound = S1, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 5             ;Time opponent is in hit state
ground.velocity = -4             ;Velocity at which opponent is pushed
airguard.velocity = -2.4,-1.6     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3,-6           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 10                 ;Time before opponent regains control in air
getpower = 0,0

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

[state 200, combodamage]
type = varset
trigger1 = movecontact
persistent = 0
var(5) = var(5) + 10
ignorehitpause = 1

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


;---------------------------------------------------------------------------
; Standing punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
velset = 0,0
anim = 210

[state 210, dexvar]
type = varset
trigger1 = time = 0
var(4) = var(4) + 1

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 5
value = 0, 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Medium
damage    = ceil(20 * fvar(3)), ceil(5 * fvar(3))
guardflag = MA
pausetime = 12,17
sparkno = S201
sparkxy = -20,-100
hitsound   = S2,1
guardsound = S1,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 13
ground.velocity = -8
air.velocity = -4,-6
getpower = 0,0

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

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


;---------------------------------------------------------------------------
; Standing slash
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 2

[State 220, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 0

[State 220, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = ceil(15 * fvar(3))
guardflag = MA
priority = 2, miss
pausetime = 12,12
sparkno = S201
sparkxy = 0,-34
hitsound   = S2,2
guardsound = S1,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = -6
air.velocity = -4,-6
getpower = 0,0

[state 220, combodamage]
type = varset
trigger1 = movecontact
persistent = 0
var(5) = var(5) + 25
ignorehitpause = 1

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


;---------------------------------------------------------------------------
; Standing stab
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

[state 230, dexvar]
type = varset
trigger1 = time = 0
var(4) = var(4) + 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 7
value = 0, 1

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = ceil(25 * fvar(3)), ceil(7 * fvar(3))
guardflag = MA
pausetime = 12,12
sparkno = S201
sparkxy = -30,-40
hitsound   = S2,3
guardsound = S1,0
ground.type = Low
ground.slidetime = 7
ground.hittime  = 15
ground.velocity = -8
air.velocity = -4,-6
getpower = 0,0

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


;---------------------------------------------------------------------------
;Crouching jab
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 0
ctrl = 0
anim = 400

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

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = ceil(10 * fvar(3))
priority  = 3, hit
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,10
sparkno = S201
sparkxy = -10,-40
hitsound   = S2,0
guardsound = S1,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.5,-3
getpower = 0,0

[state 400, combodamage]
type = varset
trigger1 = movecontact
persistent = 0
var(5) = var(5) + 10
ignorehitpause = 1

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


;---------------------------------------------------------------------------
;Crouching Flick Energy
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 0
ctrl = 0
anim = 410

[state 410, dexvar]
type = varset
trigger1 = time = 0
var(4) = var(4) + 1

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

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 10100
ID = 41
pos = 40,-20
facing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 0.2,0.2
ownpal = 1
sprpriority = 5
removeongethit = 1

;This is the first hit, triggered on the 3rd element of animation.
[State 410, 2]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage    = ceil(20 * fvar(3)), ceil(5 * fvar(3))
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,20
sparkno = -1 ;11
sparkxy = -20,-60
hitsound   = S100,0
guardsound = S1,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -8
air.velocity = -6,-8
getpower = 0,0

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


;---------------------------------------------------------------------------
;Crouching stab
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 0
ctrl = 0
anim = 420
sprpriority = 2

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

[State 420, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = ceil(15 * fvar(3))
priority  = 2, Dodge
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = S201 ;23
sparkxy = -20,-50
hitsound   = S2,2
guardsound = S1,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -8
air.velocity = -2,-3
down.velocity = -10,0
down.hittime = 20
getpower = 0,0

[state 420, combodamage]
type = varset
trigger1 = movecontact
persistent = 0
var(5) = var(5) + 25
ignorehitpause = 1

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


;---------------------------------------------------------------------------
;Crouch Upward Stab
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 0
ctrl = 0
anim = 430
sprpriority = 2

[state 430, dexvar]
type = varset
trigger1 = time = 0
var(4) = var(4) + 1

[State 430, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 430, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = ceil(25 * fvar(3)), ceil(7 * fvar(3))
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = S201
sparkxy = -20,-110
hitsound   = S2,3
guardsound = S1,0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2.4,-12
air.velocity = -2.4,-12
guard.velocity = -10
fall = 1
getpower = 0,0

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


;---------------------------------------------------------------------------
;Jump jab
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 0
ctrl = 0
anim = 600
sprpriority = 2

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

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = ceil(20 * fvar(3))
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = S201
sparkxy = -40,-70
hitsound   = S2,0
guardsound = S1,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -8
air.velocity = -2.6,-6
getpower = 0,0

[state 600, combodamage]
type = varset
trigger1 = movecontact
persistent = 0
var(5) = var(5) + 20
ignorehitpause = 1

[state 50, gravity]
type = veladd
trigger1 = fvar(1) != 0
y = fvar(1) - const(movement.yaccel)
persistent = 1


;---------------------------------------------------------------------------
;Lightening Hammer Strike
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 0
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 2]
type = PlaySnd
trigger1 = Animelem = 5
value = 0, 2

[State 610, 2]
type = PlaySnd
trigger1 = Animelem = 7
value = 3, 0

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = ceil(52 * fvar(3)), ceil(13 * fvar(3))
guardflag = HA
priority = 5, hit
pausetime = 15,15
sparkno = S201
sparkxy = -20,0
hitsound   = S2,1
guardsound = S1,0
animtype = hard
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0
air.velocity = -4,14
air.fall = 1
fall.recover = 0
down.bounce = 1
getpower = 0,0

[state 610, lightening]
type = Explod
trigger1 = Animelem = 7
anim = 615
ID = 615
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -2
removetime = -2
ownpal = 1
scale = const(size.xscale), const(size.yscale)
sprpriority = 3
;persistent = 0
;ignorehitpause = 1

[state 610, 4]
type = velset
trigger1 = movecontact
persistent = 0
x = -2
y = -8

[state 610, 4]
type = varset
trigger1 = movecontact
persistent = 0
fv = 1
value = 0.72

[state 610, End]
type = changestate
trigger1 = animtime = 0
value = 611

[state 50, gravity]
type = veladd
trigger1 = fvar(1) != 0
y = fvar(1) - const(movement.yaccel)
persistent = 1

; Lightening  Hammer after (fall)
[Statedef 611]
type    = A
movetype= A
physics = A
anim = 611
sprpriority = 2

[state 611, 1]
type = ctrlset
trigger1 = time = 6
value = 1

[state 50, gravity]
type = veladd
trigger1 = fvar(1) != 0
y = fvar(1) - const(movement.yaccel)
persistent = 1


;---------------------------------------------------------------------------
;Jump Slash
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 0
ctrl = 0
anim = 620
sprpriority = 2

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

[State 620, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = ceil(17 * fvar(3))
guardflag = HA
priority = 2, Miss
pausetime = 8,8
sparkno = S201
sparkxy = -10,-70
hitsound   = S2,2
guardsound = S1,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -8
air.velocity = -4,-6
getpower = 0,0

[state 620, combodamage]
type = varset
trigger1 = movecontact
persistent = 0
var(5) = var(5) + 17
ignorehitpause = 1

[state 50, gravity]
type = veladd
trigger1 = fvar(1) != 0
y = fvar(1) - const(movement.yaccel)
persistent = 1


;---------------------------------------------------------------------------
;Jump Spinning Dagger
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 0
ctrl = 0
anim = 630
sprpriority = 2

[state 630, dexvar]
type = varset
trigger1 = time = 0
var(4) = var(4) + 1

[State 630, 2]
type = PlaySnd
trigger1 = AnimElem = 5
trigger2 = AnimElem = 17
value = 0, 1

[State 630, 3]
type = HitDef
trigger1 = time % 6 = 0
attr = A, NA
damage    = ceil(20 * fvar(3)), ceil(5 * fvar(3))
guardflag = HA
priority = 4
pausetime = 15,15
sparkno = S201
sparkxy = (p2dist x) - 40,-40
hitsound   = S2,3
guardsound = S1,0
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -2
air.velocity = -2,0
getpower = 0,0

[state 630, varset]
type = varset
trigger1 = movehit > 3
var(7) = hitcount

[state 630, resetvar]
type = varset
trigger1 = time = 0
var(7) = 0

[state 50, gravity]
type = veladd
trigger1 = fvar(1) != 0
y = fvar(1) - const(movement.yaccel)
persistent = 1
