;亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂倄倧倳倣倳丂俠倧値倱倲倎値倲倱丂俥倝倢倕丂俶倧俀
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅

;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂昁嶦媄
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖

;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂斀幩壓奅巃
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
[Statedef 1000]
Type     = S
MoveType = A
Physics  = N
Anim     = 1000
Ctrl     = 0

[State 1000, 曄悢憹尭]
Type = VarAdd
Trigger1 = AnimElem = 3
fvar(5) = -250
IgnoreHitPause = 1
Persistent = 1

;**************************************************
[State 1000, 柍揋]
Type = NotHitBy
Trigger1 = Time = 5
Value = ,AP
Time = 30

;**************************************************
[State 1000, 僶儕傾]
Type = Helper
Trigger1 = AnimElem = 3
StateNo = 2004
ID = 2004
Name = "Barrier"
Pos = 40,-75
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .75
Size.YScale = 1.75

[State 1000, 僶儕傾敾掕]
Type = Helper
Trigger1 = AnimElem = 3
StateNo = 2004
ID = 2005
Name = "Barrier"
Pos = 40,-75
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = 1
Size.YScale = 1

;**************************************************
[State 1000, 壒]
Type = PlaySnd
Trigger1 = AnimElem = 3
Value = s1,3
Channel = 1
Persistent = 1

;**************************************************
[State 1000, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂尫寧巃乚揤奅朄椫巃
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
[Statedef 1001]
Type     = S
MoveType = A
Physics  = N
Ctrl     = 0

[State 1001, 庛嫮娗棟]
Type = VarSet
Trigger1 = var(59) = 0
Trigger1 = Time = 0
var(10) = IfElse(Command="b",1,0)

[State 1001, 庛嫮娗棟-AI]
Type = VarSet
Trigger1 = var(59) = 1
Trigger1 = Time = 0
var(10) = IfElse(P2StateType=A,1,0)

[State 1001, 庛嫮娗棟]
Type = VarSet
Trigger1 = (IsHelper(6400))
Trigger1 = Time = 0
var(10) = Root,var(10)

[State 1001, 傾僯儊]
Type = ChangeAnim
Trigger1 = Time = 0
Value = 1010+var(10)

[State 1001, 傾僯儊]
Type = ChangeAnim
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = [1010,1011]) && (AnimTime = 0)
Value = 41
Elem = 9

[State 1001, 堏摦懍搙]
Type = VelSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1010) && (AnimElem = 5)
X = 5.6
Y = -4.8

[State 1001, 堏摦懍搙]
Type = VelSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1011) && ((AnimElem = 2,>=0) && (AnimElem = 6,<0) || (AnimElem = 16))
X = IfElse((AnimElem=16),7.8,4.5)
Y = IfElse((AnimElem=16),-7.9,0)

[State 1001, 懍搙忔嶼]
Type = VelMul
TriggerAll = (!IsHelper(6400))
TriggerAll = Vel X > .5
Trigger1 = (Anim = 1010) && (AnimElem = 6,>=0)
Trigger2 = (Anim = 1011) && (AnimElem = 17,>=0)
X = .9

[State 1001, 懍搙壛嶼]
Type = VelAdd
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1010) && (AnimElem = 5,>=0)
Trigger2 = (Anim = 1011) && (AnimElem = 16,>=0)
Trigger3 = (Anim = 41)
Y = .34

[State 1001, 愙怗敾掕儕僙僢僩]
Type = MoveHitReset
Trigger1 = (IsHelper(6400))
Trigger1 = (Time = 0)

;**************************************************
[State 1001, 峌寕椡曗惓]
Type = VarAdd
Trigger1 = (!IsHelper(6400))
Trigger1 = MoveHit = 1
fvar(39) = -IfElse(var(10)=0,10,7)
IgnoreHitPause = 1
Persistent = 10

[State 1001, 峌寕椡曗惓]
Type = ParentVarAdd
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400))
Trigger1 = MoveHit = 1
fvar(39) = -IfElse(var(10)=0,10,7)
IgnoreHitPause = 1
Persistent = 10

[State 1001, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = MoveHit = 1
var(7) = 7
IgnoreHitPause = 1
Persistent = 10

[State 1001, 曄悢]
Type = ParentVarSet
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400))
Trigger1 = MoveHit = 1
var(7) = 7
IgnoreHitPause = 1
Persistent = 10

[State 1001, 峌寕椡]
Type = AttackMulSet
Trigger1 = (IsHelper(6400))
Value = IfElse(Root,fvar(39)<=3,.015,Root,fvar(39)/200.0)

;**************************************************
[State 1001, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1001
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1001, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1001
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1001, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (MoveGuarded = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo = [150,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1001
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1001, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (MoveGuarded = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo = [150,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1001
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

;**************************************************
[State 1001, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (!IsHelper(6400))
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H) && (var(19))
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1001
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

[State 1001, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (!IsHelper(6400))
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H) && (var(19))
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1001
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

;**************************************************
[State 1001, 敿恎峌寕]
Type = Helper
Trigger1 = (!IsHelper(6400))
Trigger1 = (Time = 0) && (var(12) = 1)
StateNo = 1001
ID = 6400
Name = "Attack"
Pos = 0,0
PosType = P1
IgnoreHitPause = 1

[State 1001, 傾僯儊]
Type = ChangeAnim
Trigger1 = (IsHelper(6400)) && (Time = 0)
Value = Anim+20000

[State 1001, 柍揋]
Type = NotHitBy
Trigger1 = (IsHelper(6400))
Value = SCA
IgnoreHitPause = 1

[State 1001, 摿庩岠壥]
Type = AssertSpecial
Trigger1 = (IsHelper(6400))
Flag = Invisible
IgnoreHitPause = 1

[State 1001, 杮懱偵晅偔埵抲]
Type = BindToRoot
Trigger1 = (IsHelper(6400))
Time = 1
Pos = 0,0
IgnoreHitPause = 1

[State 1001, 僿儖僷乕傪徚偡]
Type = DestroySelf
TriggerAll = (IsHelper(6400))
Trigger1 = (AnimTime = 0) || (Root,MoveType = H)

;**************************************************
[State 1001, 柍揋]
Type = NotHitBy
Trigger1 = (Time = 0) && (var(10) = 0)
Value = ,AA
Time = 18

[State 1001, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1010) && (AnimElem = 4)
Trigger2 = (Anim = 1011) && (AnimElem = 15)
StateType = A

[State 1001, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1010) && (AnimElem = 7)
Trigger2 = (Anim = 1011) && (AnimElem = 18)
MoveType = I

;**************************************************
[State 1001, 僄僼僃僋僩]
Type = Explod
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1010) && (AnimElem = 5)
Trigger2 = (Anim = 1011) && (AnimElem = 15)
Anim = 2012
ID = 2012
Pos = 30,-40
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
RemoveOnGetHit = 1
IgnoreHitPause = 1

[State 1001, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1011) && (AnimElem = 3)
Anim = 2013
ID = 2013
Pos = 0,-60
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
RemoveOnGetHit = 1
IgnoreHitPause = 1

[State 1001, 僄僼僃僋僩]
Type = Explod
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1010) && (AnimElem = 5)
Trigger2 = (Anim = 1011) && (AnimElem = 2)
Anim = 6105
ID = 6105
Pos = 0,0
Ownpal = 1
SprPriority = 5
IgnoreHitPause = 1

;**************************************************
[State 1001, 僌儗僀僘]
Type = Helper
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1011) && (Time = 0)
StateNo = 6110
ID = 6110
Name = "Graze"
Pos = 0,0
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
SuperMoveTime = 9
PauseMoveTime = 9

[State 1001, 旘傃摴嬶柍揋]
Type = NotHitBy
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1011) && (Time = 0)
Value2 = ,AP

;**************************************************
[State 1001, 壒]
Type = PlaySnd
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1010) && (AnimElem = 5)
Trigger2 = (Anim = 1011) && ((AnimElem = 3) || (AnimElem = 15))
Value = s1,4
Channel = 1

[State 1001, 壒]
Type = PlaySnd
Trigger1 = (!IsHelper(6400))
Trigger1 = (MoveHit = 1) && (var(19))
Value = s0,19
Channel = 20
IgnoreHitPause = 1
Persistent = 10

;**************************************************
[State 1001, 僸僢僩掕媊-1]
Type = HitDef
Trigger1 = (Anim = 1010) && (AnimElem = 4)
Trigger2 = (Anim = 1011) && (AnimElem = 15)
Trigger3 = (Anim = 21010) && (AnimElem = 4)
Trigger4 = (Anim = 21011) && (AnimElem = 15)
Attr              = A, SA
Damage            = IfElse(var(10)=0,80,75),2
GetPower          = 50,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 20
Guard.SlideTime   = 19
Ground.HitTime    = 20
Guard.HitTime     = 19
Air.HitTime       = 20
Ground.Velocity   = -3.5,-7
Air.Velocity      = -3.5,-6.5
AirGuard.Velocity = -3,-4.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil(62*(var(16)/1000.0))
ID = 1001

[State 1001, 僸僢僩掕媊-2]
Type = HitDef
Trigger1 = (Anim = 1011) && (AnimElem = 4)
Trigger2 = (Anim = 21011) && (AnimElem = 4)
Attr              = S, SA
Damage            = 75,2
GetPower          = 50,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 25
Guard.SlideTime   = 19
Ground.HitTime    = 25
Guard.HitTime     = 19
Air.HitTime       = 25
Ground.Velocity   = -3.5
Air.Velocity      = -3.5,-6.5
AirGuard.Velocity = -3,-4.5
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil(62*(var(16)/1000.0))
ID = 1001

;**************************************************
[State 1001, 憡庤僗僥乕僩曄峏]
Type = TargetState
Trigger1 = NumTarget != 0
Trigger1 = (Anim = 1011) && (AnimElem = 15,<0)
Trigger1 = (Target,StateType != A)
Trigger1 = (MoveHit = 1) && (var(19))
Value = 10025
ID = 1001
IgnoreHitPause = 1
Persistent = 10

;**************************************************
[State 1001, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = (Anim = 41) && (Pos Y >=0) && (Vel Y > 0)
Value = 13
Ctrl = 0

;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂揤奅朄椫巃丂幩
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
[Statedef 1002]
Type     = U
MoveType = A
Physics  = N
Ctrl     = 0

[State 1002, 傾僯儊]
Type = ChangeAnim
Trigger1 = (Time = 0) && (Anim != 1012)
Value = 1012

[State 1002, 傾僯儊]
Type = ChangeAnim
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && (AnimTime = 0)
Value = 41
Elem = 9

;**************************************************
[State 1002, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && (AnimElem = 1)
var(5) = 0

[State 1002, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && (AnimElem = 1)
var(22) = 1002

;**************************************************
[State 1002, 堏摦懍搙]
Type = VelSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && ((AnimElem = 4) || (AnimElem = 25) || (AnimElem = 47))
X = IfElse((AnimElem=47),4.0,5.3)
Y = IfElse((AnimElem=47),-7.9,0)

[State 1002, 懍搙忔嶼]
Type = VelMul
TriggerAll = (!IsHelper(6400))
TriggerAll = Vel X > .5
Trigger1 = (Anim = 1012) && (AnimElem = 49,>=0)
X = .9

[State 1002, 懍搙壛嶼]
Type = VelAdd
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && (AnimElem = 47,>=0)
Trigger2 = (Anim = 41)
Y = .34

[State 1004, 懍搙忔嶼]
Type = VelMul
TriggerAll = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (Anim = 1012) && (AnimElem = 49,<0)
Trigger1 = Vel X != [-1.0,1.0]
X = .93

[State 1004, 堏摦懍搙]
Type = VelSet
TriggerAll = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (Anim = 1012) && (AnimElem = 49,<0)
Trigger1 = Vel X = [-1.0,1.0]
X = 0

;**************************************************
[State 1002, 峌寕椡曗惓]
Type = VarAdd
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = MoveHit = 1
fvar(39) = -7
IgnoreHitPause = 1

[State 1002, 峌寕椡曗惓]
Type = ParentVarAdd
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (HitPauseTime = 9)
Trigger1 = MoveHit = 1
fvar(39) = -7
IgnoreHitPause = 1

[State 1002, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = MoveHit = 1
var(7) = 7
IgnoreHitPause = 1

[State 1002, 曄悢]
Type = ParentVarSet
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (HitPauseTime = 9)
Trigger1 = MoveHit = 1
var(7) = 7
IgnoreHitPause = 1

[State 1002, 峌寕椡]
Type = AttackMulSet
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Value = IfElse(Root,fvar(39)<=3,.015,Root,fvar(39)/200.0)

;**************************************************
[State 1002, 曄悢憹尭]
Type = VarSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = NumEnemy > 1
var(58) = !EnemyNear,Alive
IgnoreHitPause = 1

[State 1002, 曄悢憹尭]
Type = VarAdd
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
TriggerAll = NumEnemy
TriggerAll = var(59) < 41
Trigger1 = (EnemyNear(var(58)),StateNo=[100,119])&&(EnemyNear(var(58)),Vel X>=(EnemyNear(var(58)),Const(Velocity.Run.Fwd.X)*.85))
Trigger2 = (EnemyNear(var(58)),StateNo=[100,119])&&(EnemyNear(var(58)),Vel X<=(EnemyNear(var(58)),Const(Velocity.Run.back.X)*.85))
var(59) = 1+(EnemyNear,Time>40)*41
IgnoreHitPause = 1

[State 1002, 曄悢憹尭]
Type = VarSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
TriggerAll = NumEnemy
Trigger1 = (EnemyNear(var(58)),StateNo != [100,119])
Trigger2 = (EnemyNear(var(58)),Vel X<(EnemyNear,Const(Velocity.Run.Fwd.X)*.85))&&(EnemyNear(var(58)),Vel X>(EnemyNear(var(58)),Const(Velocity.Run.back.X)*.85))
var(59) = 0
IgnoreHitPause = 1

[State 1002, 忬懺曄峏]
Type = StateTypeSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = (var(59) = [1,40])
MoveType = I

[State 1002, 忬懺曄峏]
Type = StateTypeSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = (var(59) != [1,40])
MoveType = A

;**************************************************
[State 1002, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1002
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1002, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1002
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1002, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveGuarded = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo = [150,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1002
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1002, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveGuarded = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo = [150,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1002
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

;**************************************************
[State 1002, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H) && (var(19))
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1002
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

[State 1002, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H) && (var(19))
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1002
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

;**************************************************
[State 1002, 敿恎峌寕]
Type = Helper
Trigger1 = (!IsHelper(6400)) && (!IsHelper(6401))
Trigger1 = (var(12) = 1)
Trigger1 = var(5) = 0
Trigger1 = (Anim = 1012) && ((AnimElem = 10) || (AnimElem = 27) || (AnimElem = 49))
StateNo = 1002
ID = 6400
Name = "Attack"
Pos = 0,0
PosType = P1
IgnoreHitPause = 1

[State 1002, 傾僯儊]
Type = ChangeAnim
Trigger1 = (IsHelper(6400))
Trigger1 = (Time = 0)
Trigger1 = (Root,Anim = 1012) && ((Root,AnimElem = 1,>=0) && (Root,AnimElem = 49,<0))
Value = Root,Anim+20000

[State 1002, 傾僯儊]
Type = ChangeAnim
Trigger1 = (IsHelper(6400))
Trigger1 = (Time = 0)
Trigger1 = (Root,Anim = 1012) && (Root,AnimElem = 49,>=0)
Value = Root,Anim+20001

[State 1002, 柍揋]
Type = NotHitBy
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Value = SCA
IgnoreHitPause = 1

[State 1002, 摿庩岠壥]
Type = AssertSpecial
Trigger1 = (IsHelper(6400))
Flag = Invisible
IgnoreHitPause = 1

[State 1002, 杮懱偵晅偔埵抲]
Type = BindToRoot
Trigger1 = (IsHelper(6400))
Time = 1
Pos = 0,0
IgnoreHitPause = 1

[State 1002, 摟柧搙]
Type = Trans
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trans = AddAlpha
Alpha = 128,128
IgnoreHitPause = 1

[State 1002, 僈乕僪偵偝偣側偄]
Type = AttackDist
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = Root,var(56) > 0
Value = 0

[State 1002, 僿儖僷乕傪徚偡]
Type = DestroySelf
TriggerAll = (IsHelper(6400))
Trigger1 = (AnimTime = 0) || (Root,MoveType = H)

;**************************************************
[State 1002, 傗傜傟忋彂偒]
Type = HitOverride
Trigger1 = (Anim = 1012) && (AnimElem = 52,<0)
Attr = SCA,AA,AP,AT
StateNo = IfElse(var(56)=1,11000,11001)
Time = 1
IgnoreHitPause = 1

[State 1002, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1012) && (AnimElem = 47,<0)
StateType = S

[State 1002, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1012) && (AnimElem = 47)
StateType = A

[State 1002, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1012) && (AnimElem = 54)
MoveType = I

;**************************************************
[State 1002, 僄僼僃僋僩]
Type = Explod
TriggerAll = var(5) = 0
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && (AnimElem = 43)
Anim = 2012
ID = 2012
Pos = 30,-40
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
IgnoreHitPause = 1

[State 1002, 僄僼僃僋僩]
Type = Explod
TriggerAll = var(5) = 0
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && (AnimElem = 7)
Trigger2 = (Anim = 1012) && (AnimElem = 26)
Anim = 2013
ID = 2013
Pos = 0,-60
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
IgnoreHitPause = 1

[State 1002, 僄僼僃僋僩]
Type = Explod
TriggerAll = var(5) = 0
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && (AnimElem = 4)
Anim = 6105
ID = 6105
Pos = 0,0
Ownpal = 1
SprPriority = 5
IgnoreHitPause = 1

;**************************************************
[State 1002, 壒]
Type = PlaySnd
TriggerAll = var(5) = 0
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1012) && ((AnimElem = 7) || (AnimElem = 26) || (AnimElem = 43))
Value = s1,4
Channel = 1

[State 1002, 壒]
Type = PlaySnd
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (var(19))
Value = s0,19
Channel = 20
IgnoreHitPause = 1
Persistent = 1

;**************************************************
[State 1002, 僸僢僩掕媊-1]
Type = HitDef
TriggerAll = (!IsHelper(6401)) && (!IsHelper(6402)) && (!IsHelper(6403))
Trigger1 = var(5) = 0
Trigger1 = (Anim = 1012) && ((AnimElem = 10) || (AnimElem = 27))
Trigger2 = (Anim = 21012) && (AnimElem = 2)
Attr              = S, SA
Damage            = 75,2
GetPower          = 50,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 25+(var(19)*6)
Guard.SlideTime   = 19
Ground.HitTime    = 25+(var(19)*6)
Guard.HitTime     = 19
Air.HitTime       = 25+(var(19)*6)
Ground.Velocity   = -3.5-(var(19)*2)
Air.Velocity      = -3.5,-6.5-(var(19)*4)
AirGuard.Velocity = -3,-4.5
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil((62+(var(19)*70))*(var(16)/1000.0))
Guard.Kill = IfElse(var(56)>0,0,1)
ID = 1002

[State 1002, 僸僢僩掕媊-2]
Type = HitDef
TriggerAll = (!IsHelper(6401)) && (!IsHelper(6402)) && (!IsHelper(6403))
Trigger1 = var(5) = 0
Trigger1 = (Anim = 1012) && (AnimElem = 49)
Trigger2 = (Anim = 21013) && (AnimElem = 2)
Attr              = A, SA
Damage            = 80,2
GetPower          = 50,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 20+(var(19)*6)
Guard.SlideTime   = 19
Ground.HitTime    = 20+(var(19)*6)
Guard.HitTime     = 19
Air.HitTime       = 20+(var(19)*6)
Ground.Velocity   = -3.5,-7-(var(19)*4)
Air.Velocity      = -3.5,-6.5-(var(19)*4)
AirGuard.Velocity = -3,-4.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil((62+(var(19)*70))*(var(16)/1000.0))
Guard.Kill = IfElse(var(56)>0,0,1)
ID = 1002

[State 1002, 僸僢僩掕媊-3]
Type = HitDef
TriggerAll = ((IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403)))
Trigger1 = var(5) = 0
Trigger1 = (Anim = 1012) && ((AnimElem = 10) || (AnimElem = 27))
Attr              = S, NA
Damage            = 75,2
GetPower          = 50,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 25+(var(19)*6)
Guard.SlideTime   = 19
Ground.HitTime    = 25+(var(19)*6)
Guard.HitTime     = 19
Air.HitTime       = 25+(var(19)*6)
Ground.Velocity   = -3.5-(var(19)*2)
Air.Velocity      = -3.5,-6.5-(var(19)*4)
AirGuard.Velocity = -3,-4.5
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil((62+(Root,var(19)*70))*(Root,var(16)/1000.0))
Guard.Kill = 0
ID = 1002

[State 1002, 僸僢僩掕媊-4]
Type = HitDef
TriggerAll = ((IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403)))
Trigger1 = var(5) = 0
Trigger1 = (Anim = 1012) && (AnimElem = 49)
Attr              = A, NA
Damage            = 80,2
GetPower          = 50,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 20+(var(19)*6)
Guard.SlideTime   = 19
Ground.HitTime    = 20+(var(19)*6)
Guard.HitTime     = 19
Air.HitTime       = 20+(var(19)*6)
Ground.Velocity   = -3.5,-7-(var(19)*4)
Air.Velocity      = -3.5,-6.5-(var(19)*4)
AirGuard.Velocity = -3,-4.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil((62+(Root,var(19)*70))*(Root,var(16)/1000.0))
Guard.Kill = 0
ID = 1002

;**************************************************
[State 1002, 曄悢]
Type = VarSet
Trigger1 = (var(5) = 1)
var(5) = 0

;**************************************************
[State 1002, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = (Anim = 41) && (Pos Y >=0) && (Vel Y > 0)
Value = 13
Ctrl = 0

;**************************************************
[State 1002, 僿儖僷乕傪徚偡]
Type = DestroySelf
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (Root,StateNo = [790,793])

;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂惗巰棳揮巃
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
[Statedef 1003]
Type     = S
MoveType = A
Physics  = N
Ctrl     = 0

[State 1003, 曄悢]
Type = VarSet
Trigger1 = !MoveContact
var(4) = P2StateNo
IgnoreHitPause = 1

[State 1003, 曄悢]
Type = VarSet
Trigger1 = Time = 0
var(5) = 0

[State 1003, 曄悢]
Type = VarSet
Trigger1 = Time = 0
var(6) = 0

[State 1003, 曄悢]
Type = VarSet
Trigger1 = NumTarget != 0
Trigger1 = (var(4) = 131)
Trigger1 = MoveHit = 1
var(5) = 1
IgnoreHitPause = 1
Persistent = 0

[State 1003, 曄悢]
Type = VarSet
Trigger1 = NumTarget != 0
Trigger1 = (var(4) = 130)
Trigger1 = MoveHit = 1
var(6) = 1
IgnoreHitPause = 1
Persistent = 0

[State 1003, 庛嫮娗棟]
Type = VarSet
Trigger1 = var(59) = 0
Trigger1 = Time = 0
var(10) = IfElse(Command="b",1,0)

[State 1003, 庛嫮娗棟-AI]
Type = VarSet
Trigger1 = var(59) = 1
Trigger1 = Time = 0
var(10) = IfElse(P2Dist X>100,1,IfElse(Random<300,1,0))

[State 1003, 庛嫮娗棟]
Type = VarSet
Trigger1 = (IsHelper(6400))
Trigger1 = Time = 0
var(10) = Root,var(10)

[State 1003, 傾僯儊]
Type = ChangeAnim
Trigger1 = Time = 0
Value = IfElse(var(10)=0,1020,1023)

[State 1003, 傾僯儊]
Type = ChangeAnim
TriggerAll = var(59) = 0
TriggerAll = ((Command="a") && (Command="惗巰棳揮巃"))
Trigger1 = (!MoveContact)
Trigger1 = (Anim = 1020) && ((AnimElem = 7,>=1) && (AnimElem = 9,<0))
Trigger2 = (MoveContact)
Trigger2 = (Anim = 1020) && ((AnimElem = 8,>=0) && (AnimElem = 9,<0))
Trigger3 = (Anim = 1021) && ((AnimElem = 5,>=1) && (AnimElem = 7,<0))
Value = IfElse(Anim=1020,1021,1022)

[State 1003, 傾僯儊-AI]
Type = ChangeAnim
TriggerAll = var(59) = 1
Trigger1 = (MoveContact = [1,6])
Trigger1 = (Anim = 1020) && ((AnimElem = 8,>=0) && (AnimElem = 9,<0))
Trigger2 = (MoveHit = [1,6])
Trigger2 = (Anim = 1021) && ((AnimElem = 5,>=1) && (AnimElem = 7,<0))
Value = IfElse(Anim=1020,1021,1022)

[State 1003, 傾僯儊]
Type = ChangeAnim
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1022) && (AnimTime = 0)
Value = 41
Elem = 9

[State 1003, 堏摦懍搙]
Type = VelSet
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1020) && ((AnimElem = 6,>=0) && (AnimElem = 9,<0))
Trigger2 = (Anim = 1023) && ((AnimElem = 6,>=0) && (AnimElem = 9,<0))
X = IfElse(Anim=1020,5.3,12.3)

[State 1003, 堏摦懍搙]
Type = VelSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1022) && (AnimElem = 3)
X = 3.5
Y = -6

[State 1003, 堏摦懍搙]
Type = VelSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1021) && (AnimElem = 1)
X = 0

[State 1003, 懍搙壛嶼]
Type = VelAdd
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1022) && (AnimElem = 3,>=0)
Trigger2 = (Anim = 41)
Y = .34

;**************************************************
[State 1003, 峌寕椡曗惓]
Type = VarAdd
TriggerAll = (!IsHelper(6400))
TriggerAll = MoveHit = 1
Trigger1 = (Anim = 1020) || (Anim = 1021)
fvar(39) = -10
IgnoreHitPause = 1
Persistent = 10

[State 1003, 峌寕椡曗惓]
Type = VarAdd
TriggerAll = (!IsHelper(6400))
TriggerAll = MoveHit = 1
Trigger1 = (Anim = 1022) || (Anim = 1023)
fvar(39) = -15
IgnoreHitPause = 1
Persistent = 10

[State 1003, 峌寕椡曗惓]
Type = ParentVarAdd
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400))
Trigger1 = (Anim = 21020) || (Anim = 21021)
Trigger1 = MoveHit = 1
fvar(39) = -10
IgnoreHitPause = 1
Persistent = 10

[State 1003, 峌寕椡曗惓]
Type = ParentVarAdd
Trigger1 = (IsHelper(6400))
Trigger1 = (Anim = 21022) || (Anim = 21023)
Trigger1 = MoveHit = 1
fvar(39) = -15
IgnoreHitPause = 1
Persistent = 10

[State 1003, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = MoveHit = 1
var(7) = 701
IgnoreHitPause = 1
Persistent = 10

[State 1003, 曄悢]
Type = ParentVarSet
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400))
Trigger1 = MoveHit = 1
var(7) = 701
IgnoreHitPause = 1
Persistent = 10

[State 1003, 僎乕僕憹尭]
Type = PowerAdd
Trigger1 = (Anim = 1022) && (MoveHit = 1)
Value = IfElse(var(5),10,50)
IgnoreHitPause = 1
Persistent = 10

[State 1003, 僎乕僕憹尭]
Type = PowerAdd
Trigger1 = (Anim = 1023) && (MoveHit = 1)
Value = IfElse(var(6),10,50)
IgnoreHitPause = 1
Persistent = 10

[State 1003, 峌寕椡]
Type = AttackMulSet
Trigger1 = (IsHelper(6400))
Value = IfElse(Root,fvar(39)<=3,.015,Root,fvar(39)/200.0)

;**************************************************
[State 1003, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1003
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1003, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1003
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1003, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (MoveGuarded = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo = [150,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1003
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1003, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (MoveGuarded = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo = [150,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1003
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

;**************************************************
[State 1003, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim != 1022)
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H) && (var(19))
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1003
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

[State 1003, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim != 1022)
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H) && (var(19))
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1003
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

;**************************************************
[State 1003, 敿恎峌寕]
Type = Helper
TriggerAll = (!IsHelper(6400))
TriggerAll = (var(12) = 1)
Trigger1 = (Anim = 1020) && (AnimElem = 7)
Trigger2 = (Anim = 1021) && (AnimElem = 5)
Trigger3 = (Anim = 1022) && (AnimElem = 8)
Trigger4 = (Anim = 1023) && (AnimElem = 6)
StateNo = 1003
ID = 6400
Name = "Attack"
Pos = 0,0
PosType = P1
IgnoreHitPause = 1

[State 1003, 傾僯儊]
Type = ChangeAnim
Trigger1 = (IsHelper(6400)) && (Time = 0)
Value = Root,Anim+20000

[State 1003, 柍揋]
Type = NotHitBy
Trigger1 = (IsHelper(6400))
Value = SCA
IgnoreHitPause = 1

[State 1003, 摿庩岠壥]
Type = AssertSpecial
Trigger1 = (IsHelper(6400))
Flag = Invisible
IgnoreHitPause = 1

[State 1003, 杮懱偵晅偔埵抲]
Type = BindToRoot
Trigger1 = (IsHelper(6400))
Time = 1
Pos = 0,0
IgnoreHitPause = 1

[State 1003, 僿儖僷乕傪徚偡]
Type = DestroySelf
TriggerAll = (IsHelper(6400))
Trigger1 = (AnimTime = 0) || (Root,MoveType = H)

;**************************************************
[State 1003, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1022) && (AnimElem = 3)
StateType = A

[State 1003, 忬懺曄峏]
Type = StateTypeSet
TriggerAll = MoveType = I
Trigger1 = (Anim = 1021) && (AnimElem = 1)
Trigger2 = (Anim = 1022) && (AnimElem = 1)
MoveType = A

[State 1003, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = ((Anim = 1020) || (Anim = 1023)) && (AnimElem = 9)
Trigger2 = (Anim = 1021) && (AnimElem = 6)
Trigger3 = (Anim = 1022) && (AnimElem = 10)
MoveType = I

[State 1003, 墴偝側偄]
Type = PlayerPush
Trigger1 = (Anim = 1023) && (MoveHit = [1,6]) && (P2StateType = A)
Value = 0

;**************************************************
[State 1003, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = ((Anim = 1020) || (Anim = 1023)) && (AnimElem = 6)
Anim = 2014
ID = 2014
Pos = 20,-25
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
RemoveOnGetHit = 1
IgnoreHitPause = 1

[State 1003, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1021) && (AnimElem = 4)
Anim = 2016
ID = 2016
Pos = 10,-80
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
RemoveOnGetHit = 1
IgnoreHitPause = 1

[State 1003, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1022) && (AnimElem = 7)
Anim = 2017
ID = 2017
Pos = 53,-32
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
RemoveOnGetHit = 1
IgnoreHitPause = 1

[State 1003, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1020) && (AnimElem = 6)
Anim = 6106
ID = 6106
Pos = 0,0
Scale = 1,1
Ownpal = 1
SprPriority = 8
IgnoreHitPause = 1

[State 1003, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1022) && (AnimElem = 3)
Anim = 6105
ID = 6105
Pos = 0,0
Scale = 1,1
Ownpal = 1
SprPriority = 8
IgnoreHitPause = 1

;**************************************************
[State 1003, 壒]
Type = PlaySnd
TriggerAll = (!IsHelper(6400))
Trigger1 = ((Anim = 1020) || (Anim = 1023)) && (AnimElem = 6)
Trigger2 = (Anim = 1021) && (AnimElem = 4)
Trigger3 = (Anim = 1022) && (AnimElem = 7)
Value = s1,5
Channel = 1

[State 1003, 壒]
Type = PlaySnd
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim != 1022)
Trigger1 = (MoveHit = 1) && (var(19))
Value = s0,19
Channel = 20
IgnoreHitPause = 1
Persistent = 10

;**************************************************
[State 1003, 僸僢僩掕媊-1]
Type = HitDef
Trigger1 = (Anim = 1020) && (AnimElem = 7)
Trigger2 = (Anim = 21020) && (AnimElem = 2)
Attr              = S, SA
Damage            = 60,2
GetPower          = 50,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 16+(var(19)*6)
Guard.SlideTime   = 18
Ground.HitTime    = 16+(var(19)*6)
Guard.HitTime     = 18
Air.HitTime       = 16+(var(19)*6)
Ground.Velocity   = -3.5-(var(19)*2)
Air.Velocity      = -3.5-(var(19)*2),-7.0-(var(19)*2)
AirGuard.Velocity = -3,-5.5
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil(45*(var(16)/1000.0))
ID = 1003

[State 1003, 僸僢僩掕媊-2]
Type = HitDef
Trigger1 = (Anim = 1021) && (AnimElem = 5)
Trigger2 = (Anim = 21021) && (AnimElem = 2)
Attr              = S, SA
Damage            = 50,2
GetPower          = 50,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = MA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 18+(var(19)*6)
Guard.SlideTime   = 18
Ground.HitTime    = 18+(var(19)*6)
Guard.HitTime     = 18
Air.HitTime       = 18+(var(19)*6)
Ground.Velocity   = -2.5,-6.5-(var(19)*2)
Air.Velocity      = -2.5,-6.5-(var(19)*2)
AirGuard.Velocity = -3,-4.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil(130*(var(16)/1000.0))
ID = 1003

[State 1003, 僸僢僩掕媊-3]
Type = HitDef
Trigger1 = (Anim = 1022) && (AnimElem = 8)
Trigger2 = (Anim = 21022) && (AnimElem = 2)
Attr              = A, SA
Damage            = IfElse(Anim=1022,0,80),2
GetPower          = IfElse(Anim=1022,0,50),10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = HA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 18
Guard.SlideTime   = 18
Ground.HitTime    = 18
Guard.HitTime     = 18
Air.HitTime       = 18
Ground.Velocity   = -8.5
Air.Velocity      = -3.5,5.5
AirGuard.Velocity = -3,-2.5
Air.Fall = 1
Fall.Recover = 0
ID = 1003

[State 1003, 僸僢僩掕媊-4]
Type = HitDef
Trigger1 = (Anim = 1023) && (AnimElem = 6)
Trigger2 = (Anim = 21023) && (AnimElem = 2)
Attr              = S, SA
Damage            = IfElse(Anim=1023,0,120),2
GetPower          = IfElse(Anim=1023,0,50),10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = LA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 25+(var(19)*6)
Guard.SlideTime   = 19
Ground.HitTime    = 25+(var(19)*6)
Guard.HitTime     = 19
Air.HitTime       = 25+(var(19)*6)
Ground.Velocity   = 0,-5.5-(var(19)*2)
Air.Velocity      = 0,-5.5-(var(19)*2)
AirGuard.Velocity = -3,-2.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil(60*(var(16)/1000.0))
ID = 1003

;**************************************************
[State 1003, 憡庤儔僀僼憹尭-1]
Type = TargetLifeAdd
TriggerAll = NumTarget != 0
TriggerAll = MoveHit = 1
Trigger1 = (var(5) = 0)
Trigger1 = (Anim = 1022) && ((AnimElem = 8,>=0) && (AnimElem = 10,<0))
Trigger2 = (var(6) = 0)
Trigger2 = (Anim = 1023) && ((AnimElem = 7,>=0) && (AnimElem = 8,<0))
Value = Floor(IfElse(Anim=1022,-80,-120)*IfElse(fvar(39)<=3,.03,fvar(39)/100.0))
IgnoreHitPause = 1
Persistent = 10

[State 1003, 憡庤儔僀僼憹尭-2]
Type = TargetLifeAdd
TriggerAll = NumTarget != 0
TriggerAll = MoveHit = 1
Trigger1 = (var(5) = 1)
Trigger1 = (Anim = 1022) && ((AnimElem = 8,>=0) && (AnimElem = 10,<0))
Trigger2 = (var(6) = 1)
Trigger2 = (Anim = 1023) && ((AnimElem = 7,>=0) && (AnimElem = 8,<0))
Value = -2
IgnoreHitPause = 1
Persistent = 10

[State 1003, 憡庤僗僥乕僩曄峏-1]
Type = TargetState
TriggerAll = NumTarget != 0
Trigger1 = (MoveHit = 1) && (var(5) = 0)
Trigger1 = (Anim = 1022) && ((AnimElem = 8,>=0) && (AnimElem = 10,<0))
Value = 10025
ID = 1003
IgnoreHitPause = 1
Persistent = 0

[State 1003, 憡庤僗僥乕僩曄峏-2]
Type = TargetState
TriggerAll = NumTarget != 0
TriggerAll = MoveHit = 1
Trigger1 = (var(5) = 1)
Trigger1 = (Anim = 1022) && ((AnimElem = 8,>=0) && (AnimElem = 10,<0))
Trigger2 = (var(6) = 1)
Trigger2 = (Anim = 1023) && ((AnimElem = 7,>=0) && (AnimElem = 8,<0))
Value = 10020
ID = 1003
IgnoreHitPause = 1
Persistent = 0

;**************************************************
[State 1003, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = StateType != A
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[State 1003, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = StateType = A
Trigger1 = (Anim = 41) && (Pos Y >=0) && (Vel Y > 0)
Value = 13
Ctrl = 0

;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂惗巰棳揮巃丂幩
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
[Statedef 1004]
Type     = S
MoveType = A
Physics  = N
Ctrl     = 0

[State 1004, 傾僯儊]
Type = ChangeAnim
Trigger1 = (Time = 0) && (Anim != [1024,1025])
Value = 1024

[State 1004, 傾僯儊]
Type = ChangeAnim
Trigger1 = (Anim = 1024) && (AnimElem = 3,>=0)
Trigger1 = (var(6) >= 40)
Value = 101

[State 1004, 傾僯儊]
Type = ChangeAnim
Trigger1 = (Anim = 1024) && (AnimElem = 3,>=0)
Trigger1 = (P2Dist X < 100)
Value = 1025

[State 1004, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1024) && (AnimElem = 1)
var(4) = 0

[State 1004, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (MoveContact = 1)
var(4) = 1
IgnoreHitPause = 1

[State 1004, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1024) && (AnimElem = 1)
var(5) = 0

[State 1004, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1024) && (AnimElem = 1)
var(6) = 0

[State 1004, 曄悢憹尭]
Type = VarAdd
Trigger1 = (!IsHelper(6400))
Trigger1 = (var(5) = 0)
var(6) = 1

[State 1004, 曄悢]
Type = VarSet
Trigger1 = var(4) = 0
var(9) = P2StateNo
IgnoreHitPause = 1

[State 1004, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1024) && (AnimElem = 1)
var(10) = 0

[State 1004, 曄悢]
Type = VarSet
Trigger1 = NumTarget != 0
Trigger1 = (var(9) = 130)
Trigger1 = (MoveHit = 1) && (var(4) = 1)
var(10) = 1
IgnoreHitPause = 1

[State 1004, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1024) && (AnimElem = 1)
var(22) = 1004

[State 1004, 堏摦懍搙]
Type = VelSet
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1024) && (AnimElem = 3,>=0)
Trigger2 = (Anim = 1025) && (AnimElem = 24,<0)
X = 5.7

[State 1004, 懍搙忔嶼]
Type = VelMul
TriggerAll = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = Vel X != [-1.0,1.0]
X = .93

[State 1004, 堏摦懍搙]
Type = VelSet
TriggerAll = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = Vel X = [-1.0,1.0]
X = 0

;**************************************************
[State 1004, 峌寕椡曗惓]
Type = VarAdd
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = MoveHit = 1
fvar(39) = -15
IgnoreHitPause = 1

[State 1004, 峌寕椡曗惓]
Type = ParentVarAdd
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (HitPauseTime = 9)
Trigger1 = MoveHit = 1
fvar(39) = -15
IgnoreHitPause = 1

[State 1004, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = MoveHit = 1
var(7) = 701
IgnoreHitPause = 1

[State 1004, 曄悢]
Type = ParentVarSet
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (HitPauseTime = 9)
Trigger1 = MoveHit = 1
var(7) = 7
IgnoreHitPause = 1

[State 1004, 峌寕椡]
Type = AttackMulSet
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Value = IfElse(Root,fvar(39)<=3,.015,Root,fvar(39)/200.0)

;**************************************************
[State 1004, 曄悢憹尭]
Type = VarSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = NumEnemy > 1
var(58) = !EnemyNear,Alive
IgnoreHitPause = 1

[State 1004, 曄悢憹尭]
Type = VarAdd
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
TriggerAll = NumEnemy
TriggerAll = var(59) < 41
Trigger1 = (EnemyNear(var(58)),StateNo=[100,119])&&(EnemyNear(var(58)),Vel X>=(EnemyNear(var(58)),Const(Velocity.Run.Fwd.X)*.85))
Trigger2 = (EnemyNear(var(58)),StateNo=[100,119])&&(EnemyNear(var(58)),Vel X<=(EnemyNear(var(58)),Const(Velocity.Run.back.X)*.85))
var(59) = 1+(EnemyNear,Time>40)*41
IgnoreHitPause = 1

[State 1004, 曄悢憹尭]
Type = VarSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
TriggerAll = NumEnemy
Trigger1 = (EnemyNear(var(58)),StateNo != [100,119])
Trigger2 = (EnemyNear(var(58)),Vel X<(EnemyNear,Const(Velocity.Run.Fwd.X)*.85))&&(EnemyNear(var(58)),Vel X>(EnemyNear(var(58)),Const(Velocity.Run.back.X)*.85))
var(59) = 0
IgnoreHitPause = 1

[State 1004, 忬懺曄峏]
Type = StateTypeSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = (var(59) = [1,40])
MoveType = I

[State 1004, 忬懺曄峏]
Type = StateTypeSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = (var(59) != [1,40])
MoveType = A

;**************************************************
[State 1004, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1004
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1004, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1004
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1004, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveGuarded = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo = [150,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1004
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1004, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveGuarded = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo = [150,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1004
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

;**************************************************
[State 1004, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H) && (var(19))
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1004
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

[State 1004, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H) && (var(19))
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1004
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

;**************************************************
[State 1004, 敿恎峌寕]
Type = Helper
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1025) && (AnimElem = 13,=0)
Trigger1 = (var(12) = 1)
StateNo = 1004
ID = 6400
Name = "Attack"
Pos = 0,0
PosType = P1
IgnoreHitPause = 1

[State 1004, 傾僯儊]
Type = ChangeAnim
Trigger1 = (IsHelper(6400))
Trigger1 = (Time = 0)
Trigger1 = (Root,Anim = 1025)
Value = Root,Anim+20000

[State 1004, 柍揋]
Type = NotHitBy
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Value = SCA
IgnoreHitPause = 1

[State 1004, 摿庩岠壥]
Type = AssertSpecial
Trigger1 = (IsHelper(6400))
Flag = Invisible
IgnoreHitPause = 1

[State 1004, 杮懱偵晅偔埵抲]
Type = BindToRoot
Trigger1 = (IsHelper(6400))
Time = 1
Pos = 0,0
IgnoreHitPause = 1

[State 1004, 摟柧搙]
Type = Trans
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trans = AddAlpha
Alpha = 128,128
IgnoreHitPause = 1

[State 1004, 僈乕僪偵偝偣側偄]
Type = AttackDist
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = Root,var(56) > 0
Value = 0

[State 1004, 僿儖僷乕傪徚偡]
Type = DestroySelf
TriggerAll = (IsHelper(6400))
Trigger1 = (AnimTime = 0) || (Root,MoveType = H)

;**************************************************
[State 1004, 傗傜傟忋彂偒]
Type = HitOverride
Trigger1 = (Anim = 1024) && (AnimElem = 3,>=0)
Trigger1 = (var(6) < 38)
Trigger2 = (Anim = 1025) && (AnimElem = 21,<0)
Attr = SCA,AA,AP,AT
StateNo = IfElse(var(56)=1,11000,11001)
Time = 1
IgnoreHitPause = 1

[State 1004, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1025) && (AnimElem = 23)
MoveType = I

[State 1004, 墴偝側偄]
Type = PlayerPush
Trigger1 = (Anim = 1025) && ((AnimElem = 13,>=0) && (AnimElem = 24,<0))
Trigger1 = (P2StateType = A) && (P2MoveType = H) 
Value = 0

;**************************************************
[State 1004, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = (var(5) = 0)
Trigger1 = (Anim = 1025) && (AnimElem = 11)
Anim = 2014
ID = 2014
Pos = 20,-25
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
IgnoreHitPause = 1

;**************************************************
[State 1004, 壒]
Type = PlaySnd
TriggerAll = (!IsHelper(6400))
Trigger1 = (var(5) = 0)
Trigger1 = (Anim = 1024) && ((AnimElem = 7) || (AnimElem = 15))
Value = s0,26

[State 1004, 壒]
Type = PlaySnd
TriggerAll = (!IsHelper(6400))
Trigger1 = (var(5) = 0)
Trigger1 = (Anim = 1025) && (AnimElem = 11)
Value = s1,5
Channel = 1

[State 1004, 壒]
Type = PlaySnd
Trigger1 = (!IsHelper(6400))
Trigger1 = (HitPauseTime = 9)
Trigger1 = (var(4) = 1) && (var(5) = 0)
Trigger1 = (MoveHit = 1) && (var(19))
Value = s0,19
Channel = 20
IgnoreHitPause = 1
Persistent = 1

;**************************************************
[State 1004, 僸僢僩掕媊-1]
Type = HitDef
TriggerAll = ((!IsHelper(6401)) && (!IsHelper(6402)) && (!IsHelper(6403)))
Trigger1 = (var(4) = 0) && (var(5) = 0)
Trigger1 = (Anim = 1025) && (AnimElem = 13,=0)
Trigger2 = (Anim = 21025) && (AnimElem = 2)
Attr              = S, SA
Damage            = IfElse(Anim=1025,0,100),2
GetPower          = IfElse(Anim=1025,0,50),10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = LA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 25+(var(19)*6)
Guard.SlideTime   = 19
Ground.HitTime    = 25+(var(19)*6)
Guard.HitTime     = 19
Air.HitTime       = 25+(var(19)*6)
Ground.Velocity   = 0,-5.5-(var(19)*2)
Air.Velocity      = 0,-5.5-(var(19)*2)
AirGuard.Velocity = -3,-2.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil((60+(var(19)*20))*(var(16)/1000.0))
Guard.Kill = IfElse(var(56)>0,0,1)
ID = 1004

[State 1004, 僸僢僩掕媊-2]
Type = HitDef
TriggerAll = ((IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403)))
Trigger1 = (var(4) = 0) && (var(5) = 0)
Trigger1 = (Anim = 1025) && (AnimElem = 13,=0)
Attr              = S, NA
Damage            = 0,2
GetPower          = 0,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = LA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 25+(var(19)*6)
Guard.SlideTime   = 19
Ground.HitTime    = 25+(var(19)*6)
Guard.HitTime     = 19
Air.HitTime       = 25+(var(19)*6)
Ground.Velocity   = 0,-5.5-(var(19)*2)
Air.Velocity      = 0,-5.5-(var(19)*2)
AirGuard.Velocity = -3,-2.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil((60+(Root,var(19)*20))*(Root,var(16)/1000.0))
Guard.Kill = 0
ID = 1004

;**************************************************
[State 1004, 憡庤儔僀僼憹尭-1]
Type = TargetLifeAdd
TriggerAll = NumTarget != 0
TriggerAll = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (var(5) = 0)
Trigger1 = (var(4) = 1) && (var(10) = 0)
Value = Floor(-100*IfElse(fvar(39)<=3,.03,fvar(39)/100.0))
IgnoreHitPause = 1

[State 1004, 憡庤儔僀僼憹尭-1]
Type = TargetLifeAdd
TriggerAll = NumTarget != 0
TriggerAll = (HitPauseTime = 9)
Trigger1 = (MoveHit = 1) && (var(5) = 0)
Trigger1 = (var(4) = 1) && (var(10) = 1)
Value = -2
Kill = IfElse(var(56)>0,0,1)
IgnoreHitPause = 1

[State 1004, 憡庤僗僥乕僩曄峏]
Type = TargetState
TriggerAll = NumTarget != 0
TriggerAll = MoveHit = 1
TriggerAll = (HitPauseTime = 9)
Trigger1 = (var(4) = 1) && (var(5) = 0)
Trigger1 = (var(10) = 1)
Trigger1 = (Anim = 1025) && ((AnimElem = 13,>=0) && (AnimElem = 23,<0))
Value = 10020
ID = 1004
IgnoreHitPause = 1

;**************************************************
[State 1004, 曄悢]
Type = VarSet
Trigger1 = (var(5) = 1)
var(5) = 0

;**************************************************
[State 1004, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = (Anim = 1025) && (AnimTime = 0)
Trigger2 = (Anim = 101) && (AnimTime = 0)
Value = IfElse(var(56)=1,795,IfElse((IsHelper(6401)),795,0))
Ctrl = IfElse(var(56)=1,0,IfElse((IsHelper(6401)),0,1))

;**************************************************
[State 1004, 僿儖僷乕傪徚偡]
Type = DestroySelf
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (Root,StateNo = [790,793])

;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂愜暁柍娫
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
[Statedef 1005]
Type     = S
MoveType = A
Physics  = N
Ctrl     = 0

[State 1005, 庛嫮娗棟]
Type = VarSet
Trigger1 = var(59) = 0
Trigger1 = Time = 0
var(10) = IfElse(Command="b",1,0)

[State 1005, 庛嫮娗棟-AI]
Type = VarSet
Trigger1 = var(59) = 1
Trigger1 = Time = 0
var(10) = IfElse(Random<500,1,0)

[State 1005, 庛嫮娗棟]
Type = VarSet
Trigger1 = (IsHelper(6400))
Trigger1 = Time = 0
var(10) = Root,var(10)

[State 1005, 傾僯儊]
Type = ChangeAnim
Trigger1 = Time = 0
Value = 1030+var(10)

[State 1005, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = AnimElem = 4
MoveType = I

;**************************************************
[State 1005, 敿恎峌寕]
Type = Helper
Trigger1 = (!IsHelper(6400))
Trigger1 = (Time = 0) && (var(12) = 1)
StateNo = 1005
ID = 6400
Name = "Attack"
Pos = 0,0
PosType = P1
IgnoreHitPause = 1

[State 1005, 傾僯儊]
Type = ChangeAnim
Trigger1 = (IsHelper(6400)) && (Time = 0)
Value = Anim+20000

[State 1005, 柍揋]
Type = NotHitBy
Trigger1 = (IsHelper(6400))
Value = SCA
IgnoreHitPause = 1

[State 1005, 摿庩岠壥]
Type = AssertSpecial
Trigger1 = (IsHelper(6400))
Flag = Invisible
IgnoreHitPause = 1

[State 1005, 杮懱偵晅偔埵抲]
Type = BindToRoot
Trigger1 = (IsHelper(6400))
Time = 1
Pos = 0,0
IgnoreHitPause = 1

[State 1005, 僿儖僷乕傪徚偡]
Type = DestroySelf
TriggerAll = (IsHelper(6400))
Trigger1 = (AnimTime = 0) || (Root,MoveType = H)

;**************************************************
[State 1005, 僸僢僩掕媊]
Type = HitDef
Trigger1 = P2BodyDist X < 20
Trigger1 = AnimElem = 3
Attr              = S, ST
Damage            = 0
GetPower          = 40
AnimType          = Hard
HitFlag           = M-
GuardFlag         = N
Priority          = 4,Miss
PauseTime         = 0,0
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = 0,0
HitSound          = -1
GuardSound        = -1
Ground.Velocity   = 0,0
P1StateNo = 1006
P2StateNo = 10025
P2Facing = 1
NumHits = 1
Guard.Dist = 0
ID = 1005

;**************************************************
[State 1005, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

;亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅
;惉岟
[Statedef 1006]
Type     = S
MoveType = A
Physics  = N
Anim     = 1032+var(10)
Ctrl     = 0
VelSet   = 0,0
SprPriority = 1

[State 1006, 暔棟揑側暆]
Type = Width
Trigger1 = (Anim = 1032) && (AnimElem = 9,<0)
Edge = 60,0
IgnoreHitPause = 1

;**************************************************
[State 1006, 峌寕椡曗惓]
Type = VarAdd
Trigger1 = Time = 0
fvar(39) = -25

[State 1006, 怳傝曉傞]
Type = Turn
Trigger1 = Anim = 1033
Trigger1 = AnimElem = 5

;**************************************************
[State 1006, 憡庤偺埵抲-1]
Type = TargetBind
Trigger1 = Anim = 1032
Trigger1 = AnimElem = 1 || AnimElem = 3
Time = 2
Pos = IfElse((AnimElem=1),45,25),0

[State 1006, 憡庤偺埵抲-2]
Type = TargetBind
Trigger1 = Anim = 1032
Trigger1 = AnimElem = 7
Time = 1
Pos = 55,0

;**************************************************
[State 1006, 憡庤偺埵抲-1]
Type = TargetBind
Trigger1 = Anim = 1033
Trigger1 = AnimElem = 1 || AnimElem = 3
Time = 2
Pos = IfElse((AnimElem=1),45,25),0

[State 1006, 憡庤偺埵抲-2]
Type = TargetBind
Trigger1 = Anim = 1033
Trigger1 = AnimElem = 5 || AnimElem = 6
Time = 1
Pos = IfElse((AnimElem=5),0,25),0

[State 1006, 憡庤偺岦偒]
type = TargetFacing
Trigger1 = Anim = 1033
Trigger1 = AnimElem = 5
Value = -1
ID = 1005

;**************************************************
[State 1006, 壒]
Type = PlaySnd
TriggerAll = (!IsHelper(6400))
Trigger1 = Time = 0
Value = s1,6
Channel = 1

;**************************************************
[State 1006, 僿儖僷乕傪徚偡]
Type = DestroySelf
TriggerAll = (IsHelper(6400))
Trigger1 = (AnimTime = 0)

[State 1006, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
;丂廝揤巃
;亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖亖
[Statedef 1007]
Type     = S
MoveType = A
Physics  = N
Anim     = 1040
Ctrl     = 0

[State 1007, 曄悢]
Type = VarSet
Trigger1 = !MoveContact
var(4) = P2StateNo
IgnoreHitPause = 1

[State 1007, 曄悢]
Type = VarSet
Trigger1 = Time = 0
var(5) = 0

[State 1007, 曄悢]
Type = VarSet
Trigger1 = NumTarget != 0
Trigger1 = (var(4) = 131)
Trigger1 = MoveHit = 1
var(5) = 1
IgnoreHitPause = 1
Persistent = 0

[State 1007, 庛嫮娗棟]
Type = VarSet
Trigger1 = (!IsHelper(6401))
Trigger1 = var(59) = 0
Trigger1 = Time = 0
var(10) = IfElse(Command="b",1,0)

[State 1007, 庛嫮娗棟]
Type = VarSet
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = Time = 0
var(10) = 1

[State 1007, 庛嫮娗棟-AI]
Type = VarSet
Trigger1 = (!IsHelper(6401))
Trigger1 = var(59) = 1
Trigger1 = Time = 0
var(10) = IfElse(var(56)=1,1,IfElse(P2Dist X> 200,1,0))

[State 1007, 傾僯儊]
Type = ChangeAnim
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1040) && (AnimTime = 0)
Value = 41
Elem = 9

[State 1007, 堏摦懍搙]
Type = VelSet
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1040) && (AnimElem = 3)
X = 3.2+var(10)*1
Y = -6.7-var(10)*.5

[State 1007, 懍搙壛嶼]
Type = VelAdd
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1040) && (AnimElem = 3,>=0)
Trigger2 = (Anim = 41)
Y = .34

;**************************************************
[State 1007, 峌寕椡曗惓]
Type = VarAdd
Trigger1 = (!IsHelper(6400))
Trigger1 = MoveHit = 1
fvar(39) = -15
IgnoreHitPause = 1
Persistent = 10

[State 1007, 峌寕椡曗惓]
Type = ParentVarAdd
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = MoveHit = 1
fvar(39) = -15
IgnoreHitPause = 1
Persistent = 10

[State 1007, 曄悢]
Type = VarSet
Trigger1 = (!IsHelper(6400))
Trigger1 = MoveHit = 1
var(7) = 701
IgnoreHitPause = 1
Persistent = 10

[State 1007, 曄悢]
Type = ParentVarSet
Trigger1 = Time > 0
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = MoveHit = 1
var(7) = 7
IgnoreHitPause = 1
Persistent = 10

[State 1007, 峌寕椡]
Type = AttackMulSet
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Value = IfElse(Root,fvar(39)<=3,.015,Root,fvar(39)/200.0)

;**************************************************
[State 1007, 曄悢憹尭]
Type = VarSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = NumEnemy > 1
var(58) = !EnemyNear,Alive
IgnoreHitPause = 1

[State 1007, 曄悢憹尭]
Type = VarAdd
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
TriggerAll = NumEnemy
TriggerAll = var(59) < 41
Trigger1 = (EnemyNear(var(58)),StateNo=[100,119])&&(EnemyNear(var(58)),Vel X>=(EnemyNear(var(58)),Const(Velocity.Run.Fwd.X)*.85))
Trigger2 = (EnemyNear(var(58)),StateNo=[100,119])&&(EnemyNear(var(58)),Vel X<=(EnemyNear(var(58)),Const(Velocity.Run.back.X)*.85))
var(59) = 1+(EnemyNear,Time>40)*41
IgnoreHitPause = 1

[State 1007, 曄悢憹尭]
Type = VarSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
TriggerAll = NumEnemy
Trigger1 = (EnemyNear(var(58)),StateNo != [100,119])
Trigger2 = (EnemyNear(var(58)),Vel X<(EnemyNear,Const(Velocity.Run.Fwd.X)*.85))&&(EnemyNear(var(58)),Vel X>(EnemyNear(var(58)),Const(Velocity.Run.back.X)*.85))
var(59) = 0
IgnoreHitPause = 1

[State 1007, 忬懺曄峏]
Type = StateTypeSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = (var(59) = [1,40])
MoveType = I

[State 1007, 忬懺曄峏]
Type = StateTypeSet
TriggerAll = (IsHelper(6401) || IsHelper(6402) || IsHelper(6403))
Trigger1 = (var(59) != [1,40])
MoveType = A

;**************************************************
[State 1007, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1007
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1007, 僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1007
StateNo = 6000
ID = 6005
Name = "HitSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1007, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (MoveGuarded = 1) && (Enemy(0),Movetype = H)
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo = [150,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1007
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

[State 1007, 僈乕僪僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (MoveGuarded = 1) && (Enemy(1),Movetype = H)
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo = [150,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1007
StateNo = 6005
ID = 6000
Name = "GuardSpark"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
Size.XScale = .5
Size.YScale = .5
SuperMoveTime = 100
PauseMoveTime = 100

;**************************************************
[State 1007, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy != 0
Trigger1 = (!IsHelper(6400))
Trigger1 = (MoveHit = 1) && (Enemy(0),Movetype = H) && (var(19))
Trigger1 = (Enemy(0),StateNo != [5100,5150]) && (Enemy(0),StateNo != [120,155])
Trigger1 = Enemy(0),GetHitvar(ChainID) = 1007
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(0),Pos X - Pos X)*Facing,Ceil(Enemy(0),Pos Y - Pos Y)+(Enemy(0),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

[State 1007, 僇僂儞僞乕僸僢僩僄僼僃僋僩]
Type = Helper
Trigger1 = NumEnemy = 2
Trigger1 = (!IsHelper(6400))
Trigger1 = (MoveHit = 1) && (Enemy(1),Movetype = H) && (var(19))
Trigger1 = (Enemy(1),StateNo != [5100,5150]) && (Enemy(1),StateNo != [120,155])
Trigger1 = Enemy(1),GetHitvar(ChainID) = 1007
StateNo = 6155
ID = 6155
Name = "Counter"
Pos = Ceil(Enemy(1),Pos X - Pos X)*Facing,Ceil(Enemy(1),Pos Y - Pos Y)+(Enemy(1),Const(Size.Mid.Pos.Y))
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 10
SuperMoveTime = 100
PauseMoveTime = 100
Size.XScale = 1
Size.YScale = 1

;**************************************************
[State 1007, 敿恎峌寕]
Type = Helper
Trigger1 = (!IsHelper(6400))
Trigger1 = (Time = 0) && (var(12) = 1)
StateNo = 1007
ID = 6400
Name = "Attack"
Pos = 0,0
PosType = P1
IgnoreHitPause = 1

[State 1007, 傾僯儊]
Type = ChangeAnim
Trigger1 = (IsHelper(6400)) && (Time = 0)
Value = Anim+20000

[State 1007, 柍揋]
Type = NotHitBy
Trigger1 = (IsHelper(6400)) || (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Value = SCA
IgnoreHitPause = 1

[State 1007, 摿庩岠壥]
Type = AssertSpecial
Trigger1 = (IsHelper(6400))
Flag = Invisible
IgnoreHitPause = 1

[State 1007, 杮懱偵晅偔埵抲]
Type = BindToRoot
Trigger1 = (IsHelper(6400))
Time = 1
Pos = 0,0
IgnoreHitPause = 1

[State 1007, 摟柧搙]
Type = Trans
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trans = AddAlpha
Alpha = 128,128
IgnoreHitPause = 1

[State 1007, 僈乕僪偵偝偣側偄]
Type = AttackDist
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = Root,var(56) > 0
Value = 0

[State 1007, 僿儖僷乕傪徚偡]
Type = DestroySelf
TriggerAll = (IsHelper(6400))
Trigger1 = (AnimTime = 0) || (Root,MoveType = H)

;**************************************************
[State 1007, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1040) && (AnimElem = 3)
StateType = A

[State 1007, 忬懺曄峏]
Type = StateTypeSet
Trigger1 = (Anim = 1040) && (AnimElem = 17)
MoveType = I

;**************************************************
[State 1007, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1040) && (AnimElem = 14)
Anim = 2017
ID = 2017
Pos = 53,-32
BindTime = -1
Scale = 1.5,1.5
Ownpal = 1
SprPriority = 8
RemoveOnGetHit = 1
IgnoreHitPause = 1

[State 1007, 僄僼僃僋僩]
Type = Explod
Trigger1 = (!IsHelper(6400))
Trigger1 = (Anim = 1040) && (AnimElem = 3)
Anim = 6105
ID = 6105
Pos = 0,0
Scale = 1,1
Ownpal = 1
SprPriority = 8
IgnoreHitPause = 1

;**************************************************
[State 1007, 壒]
Type = PlaySnd
TriggerAll = (!IsHelper(6400))
Trigger1 = (Anim = 1040) && (AnimElem = 14)
Value = s1,5
Channel = 1

[State 1007, 壒]
Type = PlaySnd
Trigger1 = (!IsHelper(6400))
Trigger1 = (MoveHit = 1) && (var(19))
Value = s0,19
Channel = 20
IgnoreHitPause = 1
Persistent = 10

;**************************************************
[State 1007, 僸僢僩掕媊-1]
Type = HitDef
TriggerAll = ((!IsHelper(6401)) && (!IsHelper(6402)) && (!IsHelper(6403)))
Trigger1 = (Anim = 1040) && (AnimElem = 15)
Trigger2 = (Anim = 21040) && (AnimElem = 15)
Attr              = A, SA
Damage            = IfElse(Anim=1040,0,90),2
GetPower          = IfElse(Anim=1040,0,50),10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = HA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 18+(var(19)*6)
Guard.SlideTime   = 18
Ground.HitTime    = 18+(var(19)*6)
Guard.HitTime     = 18
Air.HitTime       = 18+(var(19)*6)
Ground.Velocity   = -12
Air.Velocity      = -3.5+(var(19)*2.5),5.5+(var(19)*2.5)
AirGuard.Velocity = -3,-2.5
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil((60+(var(19)*70))*(var(16)/1000.0))
Guard.Kill = IfElse(var(56)>0,0,1)
ID = 1007

[State 1007, 僸僢僩掕媊-2]
Type = HitDef
TriggerAll = ((IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403)))
Trigger1 = (Anim = 1040) && (AnimElem = 15)
Attr              = A, NA
Damage            = 0,2
GetPower          = 0,10
AnimType          = Hard
HitFlag           = MAF
GuardFlag         = HA
Priority          = 4,Hit
PauseTime         = 10,10
SparkNo           = -1
Guard.SparkNo     = -1
SparkXY           = -25,-25
HitSound          = -1
GuardSound        = -1
Ground.Type       = High
Air.Type          = High
Ground.SlideTime  = 18+(var(19)*6)
Guard.SlideTime   = 18
Ground.HitTime    = 18+(var(19)*6)
Guard.HitTime     = 18
Air.HitTime       = 18+(var(19)*6)
Ground.Velocity   = -12
Air.Velocity      = -3.5+(var(19)*2.5),5.5+(var(19)*2.5)
AirGuard.Velocity = -3,-2.5
Air.Fall = 1
Fall.Recover = 1
Fall.RecoverTime = Ceil((60+(Root,var(19)*70))*(Root,var(16)/1000.0))
Guard.Kill = 0
ID = 1007

;**************************************************
[State 1007, 憡庤儔僀僼憹尭-1]
Type = TargetLifeAdd
Trigger1 = NumTarget != 0
Trigger1 = (MoveHit = 1) && (var(5) = 0)
Value = Floor(-150*IfElse(fvar(39)<=3,.03,fvar(39)/100.0))
IgnoreHitPause = 1
Persistent = 10

[State 1007, 憡庤儔僀僼憹尭-2]
Type = TargetLifeAdd
Trigger1 = NumTarget != 0
Trigger1 = (MoveHit = 1) && (var(5) = 1)
Value = -2
Kill = IfElse(var(56)>0,0,1)
IgnoreHitPause = 1
Persistent = 10

[State 1007, 憡庤僗僥乕僩曄峏-1]
Type = TargetState
TriggerAll = NumTarget != 0
TriggerAll = MoveHit = 1
Trigger1 = (var(5) = 0) && (Target,StateType != A)
Trigger1 = (Anim = 1040) && ((AnimElem = 15,>=0) && (AnimElem = 17,<=0))
Value = 10025
ID = 1007
IgnoreHitPause = 1
Persistent = 0

[State 1007, 憡庤僗僥乕僩曄峏-2]
Type = TargetState
TriggerAll = NumTarget != 0
TriggerAll = (MoveHit = 1) && (var(19))
Trigger1 = (var(5) = 0) && (Target,StateType = A)
Trigger1 = (Anim = 1040) && ((AnimElem = 15,>=0) && (AnimElem = 17,<=0))
Value = 10002
ID = 1007
IgnoreHitPause = 1
Persistent = 0

[State 1007, 憡庤僗僥乕僩曄峏-3]
Type = TargetState
TriggerAll = NumTarget != 0
TriggerAll = MoveHit = 1
Trigger1 = (var(5) = 1)
Trigger1 = (Anim = 1040) && ((AnimElem = 15,>=0) && (AnimElem = 17,<=0))
Value = 10020
ID = 1007
IgnoreHitPause = 1
Persistent = 0

;**************************************************
[State 1007, 僗僥乕僩曄峏]
Type = ChangeState
Trigger1 = StateType = A
Trigger1 = (Pos Y >=0) && (Vel Y > 0)
Value = 13
Ctrl = 0

;**************************************************
[State 1007, 僿儖僷乕傪徚偡]
Type = DestroySelf
Trigger1 = (IsHelper(6401)) || (IsHelper(6402)) || (IsHelper(6403))
Trigger1 = (Root,StateNo = [790,793])

;亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅
;亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅
;亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅
;亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅
;亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅亅