;=================================================================================
;擉晞
;=================================================================================
;撍晽乽墡揷旻偺愭摫乿
;=================================================================================
;抧忋
[Statedef 5800]
type = S
physics = N
movetype = A
Anim = 2001
ctrl = 0
VelSet = 0,0

[State -1]
type = NotHitBy
trigger1 = AnimElem = 4
Value = SCA
Time = 30

[State -1]
type = NotHitBy
trigger1 = time >= 40
trigger1 = time <= 67
Value = ,AP
Time = 1

[State -1]
type = PlayerPush
trigger1 = time >= 44
trigger1 = time <= 67
Value = 0

[State -1]
type = Explod
trigger1 = time >= 44
trigger1 = time <= 67
trigger1 = time%3 = 0
Anim = 7600
ID = 7600
Pos = -40,0
PosType = P1
ownpal = 1
SprPriority = 9999

[State -1]
type = poweradd
trigger1 = AnimElem = 4
value = -1000

[State -1]
type = VelSet
trigger1 = AnimElem = 6
X = 15

[State -1]
type = VelSet
trigger1 = AnimElem = 18
X = 2

[State -1]
type = Playsnd
trigger1 = AnimElem = 4
value = s300,0

[State -1]
type = helper
trigger1 = AnimElem = 4
Stateno = 10260
ID = 10260
pos = 0,-58
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = pause
trigger1 = AnimElem = 4
time = 30
movetime = 30

[State -1]
type = Playsnd
trigger1 = AnimElem = 6
value = s300,2

[State -1]
type = VarSet
trigger1 = AnimElem = 6
FV = 3
Value = 60

[State -1]
type = VarAdd
trigger1 = AnimElem = 6
FV = 1
Value = -500

[State -1]
type = helper
trigger1 = AnimElem = 6
Stateno = 6100
ID = 6100
pos = 0,0
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0

[State -1]
type = Hitdef
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,HA
damage    = floor((FVar(20)*2800)/10), 25
animtype = high
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
numhits = 1
guard.pausetime = 0,0
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.dist = 99999999
guard.velocity = -8
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = 0,0
airguard.velocity =  -2,-4   
air.velocity = 0,0
fall = 1
fall.recover = 0
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = TargetState
trigger1 = MoveHit = 1
Value = 5403

[State -1]
type = varset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 6
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 6
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 6
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
triggerall = (time>=44)*(time<=67)
trigger1 = MoveGuarded
trigger2 = FrontEdgeDist < 20
Value = 5802

[State -1]
type = changestate
trigger1 = Animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------
;嬻拞
[Statedef 5801]
type = A
physics = N
movetype = A
Anim = 2002
ctrl = 0
VelSet = 0,0

[State -1]
type = NotHitBy
trigger1 = AnimElem = 3
Value = SCA
Time = 29

[State -1]
type = NotHitBy
trigger1 = time >= 0
trigger1 = time <= 69
Value = ,AP
Time = 1

[State -1]
type = PlayerPush
trigger1 = time >= 41
trigger1 = time <= 69
Value = 0

[State -1]
type = Explod
trigger1 = time = 41
Anim = 7600
ID = 7600
Pos = -40,0
PosType = P1
ownpal = 1
SprPriority = 9999

[State -1]
type = pause
trigger1 = AnimElem = 3
time = 30
movetime = 30

[State -1]
type = poweradd
trigger1 = AnimElem = 3
value = -1000

[State -1]
type = Playsnd
trigger1 = AnimElem = 3
value = s300,0

[State -1]
type = helper
trigger1 = AnimElem = 3
Stateno = 10260
ID = 10260
pos = 0,-58
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VelSet
trigger1 = AnimElem = 5
X = 15

[State -1]
type = VelSet
trigger1 = AnimElem = 12
X = 2

[State -1]
type = Playsnd
trigger1 = AnimElem = 5
value = s300,2

[State -1]
type = VarSet
trigger1 = AnimElem = 5
FV = 3
Value = 60

[State -1]
type = VarAdd
trigger1 = AnimElem = 5
FV = 1
Value = -500

[State -1]
type = helper
trigger1 = AnimElem = 5
Stateno = 6100
ID = 6100
pos = 0,0
postype = P1
ownpal = 1
keyctrl = 0

[State -1]
type = Hitdef
triggerall = Var(18) = 0
trigger1 = time = 0
attr = S,HA
damage    = floor((FVar(20)*2800)/10), 25
animtype = high
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,0
numhits = 1
guard.pausetime = 0,0
guard.slidetime = 32
guard.hittime = 32
guard.ctrltime = 32
guard.dist = 100
guard.velocity = -8
ground.type = high
air.type = high
guardsound = s250,0
ground.slidetime = 33
ground.hittime  = 33
ground.velocity = 0,0
airguard.velocity =  -2,-4   
air.velocity = 0,0
fall = 1
fall.recover = 0
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = TargetState
trigger1 = MoveHit = 1
Value = 5403

[State -1]
type = varset
trigger1 = movehit = 1
v = 11
value = 1
ignorehitpause = 1

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos =  Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 6
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5) 
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 6
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(50+(-50+P2Dist x)*0.5),Floor(-50+(50+P2Dist Y)*0.5)
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 6
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VelAdd
trigger1 = time >= 70
Y = .2

[State -1]
type = ChangeState
triggerall = (time>=45)*(time<=69)
trigger1 = MoveGuarded
trigger2 = FrontEdgeDist < 20
Value = 5802

[State -1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 49
;---------------------------------------------------------------------------------
;撍恑媄 - 挼偹曉傝
[Statedef 5802]
type = A
physics = N
VelSet = -3,-8
ctrl = 0
Anim = 2003

[State -1]
type = VelAdd
trigger1 = Vel X < -0.05
X = 0.05

[State -1]
type = VelAdd
trigger1 = 1
Y = .26

[State -1]
type = ChangeState
triggerall = time >= 5
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 49
;=================================================================================
;堧晞
;=================================================================================
;晽晞乽揤嬬摴偺奐晽乿
;=================================================================================
[Statedef 5799]
type = S
movetype = A
physics = S
Anim = 2000
ctrl = 0
vel = 0,0

[State -1]
type = pause
trigger1 = AnimElem = 3
time = 30
movetime = 30

[State -1]
type = NotHitBy
trigger1 = time >= 0
trigger1 = time <= 15 
Value = SCA, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 1

[State -1]
type = poweradd
trigger1 = AnimElem = 3
value = -1000

[State -1]
type = Playsnd
trigger1 = AnimElem = 3
value = s300,0

[State -1]
type = VarSet
trigger1 = AnimElem = 6
FV = 3
Value = 60

[State -1]
type = VarAdd
trigger1 = AnimElem = 6
FV = 1
Value = -300

[State -1]
type = helper
trigger1 = AnimElem = 3
Stateno = 10250
ID = 10250
pos = 0,-58
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = AnimElem = 6
Stateno = 6090
ID = 6090
pos = 20,-60
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0

[State -1]
type = changestate
trigger1 = Animtime = 0
value = 0
ctrl = 1
;=================================================================================
;慁晞乽峠梩慁晽乿
;=================================================================================
[Statedef 5810]
type = S
movetype = A
physics = S
Anim = 2005
ctrl = 0
vel = 0,0

[State -1]
type = NotHitBy
trigger1 = AnimElem = 4
Value = SCA, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 30

[State -1]
type = pause
trigger1 = AnimElem = 4
time = 30
movetime = 30

[State -1]
type = poweradd
trigger1 = AnimElem = 4
value = -1000

[State -1]
type = helper
trigger1 = AnimElem = 4
Stateno = 10250
ID = 10250
pos = 0,-58
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Playsnd
trigger1 = AnimElem = 4
value = s300,0

[State -1]
type = VarSet
trigger1 = AnimElem = 8
FV = 3
Value = 60

[State -1]
type = VarAdd
trigger1 = AnimElem = 8
FV = 1
Value = -480

[State -1]
type = helper
trigger1 = AnimElem = 8
Stateno = 6105
ID = 6105
pos = 20,20
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0

[State -1]
type = changestate
trigger1 = Animtime = 0
value = 0
ctrl = 1
;==============================================================================
;棾姫乽揤懛崀椪偺摴偟傞傋乿
;==============================================================================
[Statedef 5815]
type = S
movetype = A
Anim = 2006
physics = S
ctrl = 0

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = 1

[State -1]
type = pause
trigger1 = AnimElem = 4
time = 30
movetime = 30

[State -1]
type = VarSet
trigger1 = time >= 51
FV = 3
Value = 60

[State -1]
type = VarAdd
trigger1 = FVar(2) = 0
trigger1 = time >= 51
FV = 1
Value = -10

[State -1]
type = PowerAdd
trigger1 = Time >= 51
Value = -30

[State -1]
type = Playsnd
trigger1 = AnimElem = 4
value = s300,0

[State -1]
type = EnvShake
trigger1 = time >= 51
trigger1 = time%5 = 0
time = 5
freq = 100
ampl = -3

[State -1]
type = helper
trigger1 = AnimElem = 4
Stateno = 10260
ID = 10260
pos = 0,-58
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = AnimElem = 8
Stateno = 6106
ID = 6106
pos = 0,20
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0

[State -1]
type = ChangeState
triggerall = time >= 30
trigger1 = Power = 0
trigger2 = RoundState = [3,4]
value = 5816
;-----------------------------------------------------------------------------
;揤懛崀椪廔椆
[Statedef 5816]
type = S
Anim = 2007
physics = S
ctrl = 0

[State -1]
type = VarSet
trigger1 = time = 0
V = 1
Value = 2

[State -1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 0
ctrl = 1
;=============================================================================
;杺廱乽姍陮儀亅儕儞僌乿
;=============================================================================
[Statedef 5820]
type = S
Physics = S
Anim = 2010
ctrl = 0

[State -1]
type = NotHitBy
trigger1 = AnimElem = 4
Value = SCA
time = 3

[State -1]
type = pause
trigger1 = AnimElem = 4
time = 30
movetime = 30

[State -1]
type = PowerAdd
trigger1 = AnimElem = 4
Value = -1000

[State -1]
type = Playsnd
trigger1 = AnimElem = 4
value = s300,0

[State -1]
type = helper
trigger1 = AnimElem = 4
Stateno = 10250
ID = 10250
pos = 0,-58
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = AnimElem = 9
Stateno = 6110
ID = 6110
pos = 0,0
postype = P1
scale = 1,1
ownpal = 1

[State -1]
type = PlaySnd
trigger1 = AnimElem = 9
Value = s300,4

[State -1]
type = VarSet
trigger1 = AnimElem = 9
V = 7
Value = 1

[State -1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 0
ctrl = 1
;----------------------------------------------------------------------------
;恖娫嬛惂偺摴
[Statedef 5825]
type = S
Physics = S
Anim = 2015
Ctrl = 0

[State -1]
type = NotHitBy
trigger1 = AnimElem = 4
Value = SCA, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time = 8

[State -1]
type = pause
trigger1 = AnimElem = 4
time = 30
movetime = 30

[State -1]
type = PowerAdd
trigger1 = AnimElem = 4
Value = -1000

[State -1]
type = Playsnd
trigger1 = AnimElem = 4
value = s300,0

[State -1]
type = helper
trigger1 = AnimElem = 4
Stateno = 10260
ID = 10260
pos = 0,-58
postype = P1
scale = 1,1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarSet
trigger1 = AnimElem = 9
V = 7
Value = 2

[State -1]
type = Playsnd
trigger1 = AnimElem = 9
value = s300,5

[State -1]
type = helper
trigger1 = AnimElem = 9
Stateno = 6117
ID = 6117
pos = 0,0
postype = Back
scale = 1,1
ownpal = 1
keyctrl = 0

[State -1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 0
ctrl = 1
;=============================================================================
;CPU愱梡僗儁儖堏峴
;=============================================================================
;僗儁儖堏峴慜
[Statedef 6095]
type = A
Physics = A
Anim = 5090
ctrl = 0

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = VelSet
trigger1 = time = 0
X = -5
Y = -4

[State -1]
type = ChangeState
trigger1 = time >= 10
trigger1 = Pos Y >= -5
Value = 6096
ctrl = 0

;揮搢
[Statedef 6096]
type = S
Physics = S
Anim = 5170

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = PlaySnd
trigger1 = Time = 0
value = s400,2

[State -1]
type = EnvShake
trigger1 = time = 0
trigger1 = !SysVar(0)
time = 10
freq = 120
ampl = -5

[State -1]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State -1]
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State -1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 6097

;愰尵捈慜
[Statedef 6097]
type = S
physics = S
Anim = 5110

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = ChangeState
trigger1 = time >= 60
Value = 6098

;婲偒忋偑傝
[Statedef 6098]
type = S
Physics = S
Anim = 5120

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = Explod
trigger1 = time = 7
anim = 6010
ID = 6010
Pos = 0,0
PosType = P1
Keyctrl = 0
ownpal = 1
SprPriority = 9

[State -1]
type = VarSet
trigger1 = Var(59) = [0,5]
V = 59
Value = 5

[State -1]
type = VarAdd
trigger1 = time = 0
V = 59
Value = 1

[State -1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 6099

;愰尵
[Statedef 6099]
type = S
Physics = S
ctrl = 0

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = ChangeAnim
trigger1 = time = 0
Value = 750

[State -1]
type = LifeAdd
trigger1 = AnimElem = 8
Value = 1000

[State -1]
type = playsnd
trigger1 = AnimElem = 8
value = s300, 0

[State -1]
type = helper
trigger1 = AnimElem = 8
Stateno = 10999
ID = 10999
postype = p1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 0
ctrl = 1
;=============================================================================
;CPU愱梡僗儁儖
;=============================================================================
;敧逅
;=============================================================================
[Statedef 6550]
type = S
movetype = I
physics = S
VelSet = 0,0
ctrl = 0
Anim = 3500

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA

[State -1]
type = PlayerPush
trigger1 = 1
Value = 0

[State -1]
type = PlaySnd
trigger1 = time >= 40
Value = s150,4
Channel = 3
persistent = 40

[State -1]
type = Helper
trigger1 = time >= 40
StateNo = 3510
ID = 3510
Pos = 5,-57
PosType = P1
Keyctrl = 0
OwnPal = 1
persistent = 40

[State -1]
type = Helper
trigger1 = time >= 40
StateNo = 3510
ID = 3511
Pos = 5,-57
PosType = P1
Keyctrl = 0
OwnPal = 1
persistent = 40

[State -1]
type = Helper
trigger1 = time >= 40
StateNo = 3510
ID = 3512
Pos = 5,-57
PosType = P1
Keyctrl = 0
OwnPal = 1
persistent = 40

[State -1]
type = Helper
trigger1 = time >= 40
StateNo = 3510
ID = 3513
Pos = 5,-57
PosType = P1
Keyctrl = 0
OwnPal = 1
persistent = 40

[State -1]
type = ChangeState
trigger1 = Time = 99999999999999999
Value = 0
Ctrl = 1
;=============================================================================
;揤懛崀椪
;=============================================================================
[Statedef 6600]
type = S
physics = S
VelSet = 0,0
Anim = 3400
ctrl = 0

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA

[State -1]
type = PlayerPush
trigger1 = 1
Value = 0

[State -1]
type = StateTypeSet
trigger1 = time = 5
StateType = A
Physics = N

[State -1]
type = VelSet
trigger1 = time = 5
X = (P2Dist X/8)/10
Y = -6

[State -1]
type = VelAdd
trigger1 = time >= 5
Y = .2

[State -1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -5
Value = 6605

;

[State -1]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA, NP, SP, HP
pauseTime = 0,0
numHits = 0

[State -1,僌儗僀僘屇傃弌偟]
type = helper
trigger1 = movehit = 1
stateno = 9998
ID = 9997
pos = 0,-40
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 4
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999
;-----------------------------------------------------------------------------
[Statedef 6605]
type = S
movetype = I
physics = S
VelSet = 0,0
ctrl = 0
Anim = 3550

[State -1]
type = VelSet
trigger1 = time = 0
X = 0
Y = 0

[State -1]
type = PosSet
trigger1 = time = 0
Y = 0

[State -1]
type = PlaySnd
trigger1 = time = 0
Value = s300,6

[State -1]
type = Helper
trigger1 = time <= 67
StateNo = 7725
ID = 7725
Pos = 0,-54
PosType = P1
OwnPal = 1
KeyCtrl = 0
persistent = 6

[State -1]
type = Helper
trigger1 = time >= 67
trigger1 = time <= 106
StateNo = 6610
ID = 6610
Pos = 0,-68
PosType = P1
ownpal = 1
keyctrl = 0
persistent = 3

[State -1]
type = PlaySnd
trigger1 = time >= 67
trigger1 = time <= 106
Value = s150,9
Channel = 5
persistent = 6

[State -1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 0
Ctrl = 1
;-----------------------------------------------------------------------------
[Statedef 6610]
Anim = 7800
movetype = A
SprPriority = 7

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA
time = -1

[State -1]
type = SprPriority
trigger1 = 1
value = 7

[State -1]
type = Trans
trigger1 = 1
Trans = Add

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow

[State -1]
type = VarRandom
trigger1 = 1
V = 0
Range = 0,360

[State -1]
type = AngleDraw
trigger1 = 1
Scale = 1+(0.5*Time),1+(0.5*Time)
Value = Var(0)

[State -1]
type = VarSet
triggerall = (EnemyNear,Name!="youmu_konpaku")*(EnemyNear,Name!="Yakumo Yukari")*(EnemyNear,Name!="Alice_Margatroid")*(EnemyNear,Name!="Alice Margatroid")*(EnemyNear,Name!="Hong Meirin")*(EnemyNear,Name!="Sakuya Izayoi")
triggerall = (EnemyNear,Name!="youmu konpaku")*(EnemyNear,Name!="Yukari Yakumo")*(EnemyNear,Name!="Reimu Hakurei")*(EnemyNear,Name!="Remilia_Scarlet")*(EnemyNear,Name!="Yuyuko Saigyouji")
triggerall = (EnemyNear,Name!="Yuyuko Saigyouji & Youmu Konpaku")*(EnemyNear,Name!="Marisa Kirisame")*(EnemyNear,Name!="Aya Syameimaru")*(EnemyNear,Name!="Suika Ibuki")*(EnemyNear,Name!="Patchouli")
triggerall = (EnemyNear,Name!="Patchouli Knowledge")
triggerall = P2StateNo != [120,155]
triggerall = AnimTime <= 40
trigger1 = (EnemyNear,Vel X>=EnemyNear,Const(velocity.run.fwd.x)-0.1)
trigger2 = (EnemyNear,Vel Y<=EnemyNear,Const(velocity.jump.y)-0.1)
trigger3 = P2StateNo=[100,119]
V = 59
Value = 1

[State -1]
type = VarSet
trigger1 = P2StateNo = [120,155]
trigger2 = AnimTime >= 40
trigger3 = (EnemyNear,Vel X<=EnemyNear,Const(velocity.run.fwd.x)-0.1)*(P2StateNo!=[100,119])
trigger4 = (EnemyNear,Vel Y>=EnemyNear,Const(velocity.jump.y)-0.1)*(P2StateType=A)
trigger5 = P2StateNo!=[100,119]
V = 59
Value = 0

[State -1]
type = hitdef
triggerall = Var(59) = 0
trigger1 = time = 0
attr = A,HP
damage    = floor((Parent,FVar(20)*300)/10),5
animtype = high
getpower = 0,0
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,2
guard.pausetime = 0,2
guard.slidetime = 22
guard.hittime = 22
guard.ctrltime = 22
guard.dist = 400
numhits = 1
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = IfElse(P2Dist X>0,-6,6),-3
guard.velocity = IfElse(P2Dist X>0,-8,8)
airguard.velocity = IfElse(P2Dist X>0,-2,2),-4
air.velocity = IfElse(P2Dist X>0,-6,6),-3
fall = 1
fall.recovertime = floor(60*Parent,FVar(20))
Guard.Kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State -1]
type = ParentVarSet
trigger1 = movehit
FV = 20
Value = Parent,FVar(20)*0.9
ignorehitpause = 1
persistent = 0

[State -1]
type = ParentVarSet
trigger1 = movehit = 1
V = 11
Value = 1

[State -1]
type = ParentVarSet
trigger1 = MoveGuarded = 1
V = 10
Value = 2

[State -1]
type = VarRandom
trigger1 = 1
V = 41
Range = 0,14

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14001
ID = 14001
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
scale = 0.25,0.5
SprPriority = 9999
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = MoveGuarded = 1
Anim = 14300+Var(41)
ID = 14300
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
scale = 0.5,0.5
ownpal = 1
SprPriority = 9999
keyctrl = 0
ignorehitpause = 1
persistent = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = movehit = 1
Stateno = 15002
ID = 15002
pos = Floor(P2Dist X),Floor(P2Dist Y + EnemyNear,const(Size.Mid.Pos.Y))
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1

[State -1]
type = DestroySelf
trigger1 = Animtime = 0
;=============================================================================
;晽恄彮彈
;=============================================================================
[Statedef 6650]
type = S
movetype = I
physics = S
VelSet = 0,0
ctrl = 0

[State -1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 0
Ctrl = 1
;=============================================================================
;乽尪憐晽阹乿
;=============================================================================
;奐巒儌乕僔儑儞
[Statedef 6700]
type = S
Physics = S
Anim = 2700
ctrl = 0

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = -1

[State -1]
type = assertspecial
trigger1 = 1
flag = timerfreeze

[State -1]
type = VarSet
trigger1 = time = 0
V = 30
Value = 0

[State -1]
type = VarSet
trigger1 = time = 0
FV = 5
Value = 0

[State -1]
type = VelSet
trigger1 = AnimElem = 6
X = 15

[State -1]
type = PlaySnd
trigger1 = AnimElem = 6
Value = s150,2

[State -1]
type = ChangeState
trigger1 = Animtime = 0
Value = 6701
ctrl = 0

;尪憐晽阹杮懱
[Statedef 6701]
type = A
Physics = N
Anim = 2701
ctrl = 0

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
type = AngleDraw
trigger1 = 1
Value = ATan(Vel Y/Vel X)*(-180/Pi)

[State -1]
type = assertspecial
trigger1 = 1
flag = noshadow
flag2 = timerfreeze

[State -1]
Type = AfterImage
Trigger1 = Var(30) >= 60
Length = 10
PalBright = 0, 0, 0
PalContrast = 200, 10, 10
PalAdd = -60, -60, -60
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
time = 8
FrameGap = 2
persistent = 0

[State -1]
type = ScreenBound
trigger1 = 1
value = 0

[State -1]
type = PosAdd
trigger1 = PrevStateNo = 6700
X = -6
Y = -30
persistent = 0

[State -1]
type = PlaySnd
triggerall = Var(30) <= 30
trigger1   = ScreenPos X!=[0,319]
Value = s150,2
channel = 8
persistent = 0

[State -1]
type = PlaySnd
triggerall = Var(30) >= 31
trigger1   = ScreenPos X!=[0,319]
Value = s150,4
channel = 8
persistent = 0

[State -1]
type = Helper
trigger1   = (time%10=0)*(Var(30)>=21)*(Var(30)<=40)
trigger2   = (time%5=0)*(Var(30)>=41)*(Var(30)<=60)
trigger3   = (time%2=0)*(Var(30)>=61)
Stateno = 16000
ID = 16000
Pos = 0,0
PosType = P1
ownpal = 1
keyctrl = 0

[State -1]
type = Helper
trigger1   = (time%10=0)*(Var(30)>=21)*(Var(30)<=40)
trigger2   = (time%5=0)*(Var(30)>=41)*(Var(30)<=60)
trigger3   = (time%2=0)*(Var(30)>=61)
Stateno = 16000
ID = 16000
Pos = 0,0
PosType = P1
ownpal = 1
keyctrl = 0

[State -1]
type = Helper
trigger1   = (time%2=0)*(Var(30)>=61)
Stateno = 16000
ID = 16000
Pos = 0,0
PosType = P1
ownpal = 1
keyctrl = 0

[State -1]
type = Helper
trigger1   = time=5&&Var(30)>=61
Stateno = 16010
ID = 16010
Pos = 0,0
PosType = P1
ownpal = 1
keyctrl = 0
persistent = 0

[State -1]
type = Helper
trigger1   = NumHelper(16005)=0
Stateno = 16005
ID = 16005
Pos = 0,0
PosType = P1
ownpal = 1
keyctrl = 0

[State -1]
type = ChangeState
trigger1   = FrontEdgeDist < -80
trigger2   = time = 90
Value = 6702

[Statedef 6702]
type = A
Anim = 8500
ctrl = 0
velset = 0,0

[State -1]
type = NotHitBy
trigger1 = 1
value = SCA

[State -1]
type = assertspecial
trigger1 = 1
flag = timerfreeze

[State -1]
type = ScreenBound
trigger1 = 1
value = 0

[State -1]
type = VarRandom
trigger1 = time = 0
V = 40
Range = -300,0

[State -1]
type = PosSet
trigger1 = time = 0
Y = Var(40)

[State -1]
type = turn
trigger1 = time = 0

[State -1]
type = VarAdd
trigger1 = Var(30)<=200
V = 30
Value = 3

[State -1]
type = VarSet
trigger1 = FVar(7) = 0
FV = 7
Value = 20

[State -1]
type = VarAdd
trigger1 = FVar(7)<=40
FV = 7
Value = 2
persistent = 0

[State -1]
type = VarSet
trigger1 = Time = 0
FV = 8
Value = FVar(7)*((P2Dist X-0)/(Abs(P2Dist X-0) + Abs(P2Dist Y+Var(17))+0.0000001))

[State -1]
type = VarSet
trigger1 = Time = 0
FV = 9
Value = FVar(7)*((P2Dist Y+Var(17))/(Abs(P2Dist X-0)+Abs(P2Dist Y+Var(17))+0.0000001))

[State -1]
type = VelSet
trigger1 = time = 0
X = FVar(8)+10
Y = FVar(9)

[State -1]
type = ChangeState
trigger1 = time = 1
Value = 6701
ctrl = 0

[State -1]
type = ChangeState
trigger1 = RoundState = [3,4]
Value = 6703

[State -1]
type = ChangeState
trigger1 = NumHelper(16005)!=0
trigger1 = Helper(16005),Var(1)>=9
Value = 6710
;===============================================================================
[Statedef 6703]
type = A
physics = A
VelSet = 0,0
movetype = I
Anim = 741

[State -1]
type = PosSet
trigger1 = time = 0
X = 0
Y = -400

[State -1]
type = Turn
trigger1 = P2Dist X < 0

[State -1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
Value = 52
;===============================================================================
;僷僷儔僢僠
;===============================================================================
[Statedef 6710]
type = A
physics = N
movetype = I
VelSet = 0,0
Anim = 741

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA

[State -1]
type = Explod
trigger1 = TeamSide = 1
trigger1 = time = 0
Anim = 11000
ID = 11000
Pos = 10,255
PosType = Left
scale = 0.5,0.5
Removetime = 61
ownpal = 1
SprPriority = 9999
BindTime = -1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = Explod
trigger1 = TeamSide = 2
trigger1 = time = 0
Anim = 11000
ID = 11000
Pos = -10,255
PosType = Right
scale = 0.5,0.5
Removetime = 61
ownpal = 1
facing = -1
SprPriority = 9999
BindTime = -1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = VarAdd
trigger1 = time = 10
V = 59
Value = 1

[State -1]
type = PlaySnd
trigger1 = time = 10
Value = s300,0

[State -1]
type = Turn
trigger1 = Vel X < 0

[State -1]
type = PosSet
trigger1 = time = 0
Y = -180

[State -1]
type = VelSet
trigger1 = time = 0
X = 4

[State -1]
type = ScreenBound
trigger1 = time <= 5
Value = 0

[State -1]
type = PlayerPush
trigger1 = 1
Value = 0

[State -1]
type = VelAdd
trigger1 = 1
Y = .2

[State -1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -8
Value = 6750
;===============================================================================
;僷僷儔僢僠嶣塭
;===============================================================================
[Statedef 6750]
type = S
physics = S
Anim = 3600
Ctrl = 0

[State -1]
type = VelSet
trigger1 = time = 0
Y = 0

[State -1]
type = PosSet
trigger1 = time = 0
Y = 0

[State -1]
type = VarSet
trigger1 = 1
FV = 25
Value = 0

[State -1]
type = Helper
trigger1 = time = 15
Stateno = 16019
ID = 16019
pos = 25,-60
postype = p1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeAnim
trigger1 = Anim!=3605&&NumHelper(16019)=0&&time>=15
Value = 3605

[State -1]
type = ChangeState
trigger1 = Anim = 3605&&AnimTime=0
Value = 0
ctrl = 1
;-----------------------------------------------------
[Statedef 6755]
type = S
physics = S
sprpriority = 0
Ctrl = 0

[State -1]
type = VelSet
trigger1 = Vel X=0
x = const(velocity.walk.fwd.x)

[State -1]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State -1]
type = Helper
trigger1 = !NumHelper(16015)
StateNo = 16015
ID = 16015
postype = p1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = time>=50
Value = 0
ctrl = 1
;-----------------------------------------------------
[Statedef 6760]
type = S
physics = S
anim = 3400
ctrl = 0

[State -1]
type = VelSet
trigger1 = time = 5
x = 5
y = -7

[State -1]
type = StateTypeSet
trigger1 = time = 5
StateType = A
Physics = N

[State -1]
type = VelAdd
trigger1 = time >= 5
Y = .2

[State -1]
type = Helper
trigger1 = !NumHelper(16015)
StateNo = 16015
ID = 16015
postype = p1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = time = 5
ID = 8050
postype = p1
stateno = 8011
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA

[State -1]
Type = AfterImage
Trigger1 = Time = 5
Time = -1
Length = 10
PalBright = 0, 0, 0
PalContrast = 192,0,0
PalAdd = -60, -60, -60
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA, NP, SP, HP
pauseTime = 0,0
numHits = 0

[State -1]
type = helper
trigger1 = movehit = 1
stateno = 9998
ID = 9997
pos = 0,-47
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 4
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -5
Value = 49
;-----------------------------------------------
[Statedef 6765]
type = S
physics = S
anim = 3450
ctrl = 0

[State -1]
type = VelSet
trigger1 = time = 5
x = -5
y = -7

[State -1]
type = StateTypeSet
trigger1 = time = 5
StateType = A
Physics = N

[State -1]
type = VelAdd
trigger1 = time >= 5
Y = .2

[State -1]
type = Helper
trigger1 = !NumHelper(16015)
StateNo = 16015
ID = 16015
postype = p1
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = helper
trigger1 = time = 5
ID = 8050
postype = p1
stateno = 8011
ownpal = 1
keyctrl = 0
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA

[State -1]
Type = AfterImage
Trigger1 = Time = 5
Time = -1
Length = 10
PalBright = 0, 0, 0
PalContrast = 192,0,0
PalAdd = -60, -60, -60
PalMul = 1, 1, 1
Trans = Add
TimeGap = 1
FrameGap = 3
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA, NP, SP, HP
pauseTime = 0,0
numHits = 0

[State -1]
type = helper
trigger1 = movehit = 1
stateno = 9998
ID = 9997
pos = 0,-50
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
persistent = 4
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -5
Value = 49
;-----------------------------------------------------
[Statedef 7000]
Anim = 4000

[State -1]
type = BindToParent
trigger1 = 1
Pos = 0,0
time = -1

[State -1]
type = NotHitBy
trigger1 = 1
Value = ,AT
time = -1

[State -1]
type = NotHitBy
trigger1 = (Parent,Anim=[3400,3450])+(Parent,Anim=[100,105])
Value = ,AP
time = 1

[State -1]
type = PlayerPush
trigger1 = 1
value = 0

[State -1]
type = HitOverRide
trigger1 = 1
Attr = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
StateNo = 7005
slot = 1
time = -1
ignorehitpause = 1
PauseMoveTime = 9999999999
SuperMoveTime = 9999999999

[State -1]
type = DestroySelf
trigger1 = !Parent,Alive
trigger2 = Root,StateNo = [6095,6099]
trigger3 = Root,StateNo = 6710
trigger4 = Root,Var(59) = 9
trigger5 = Root,FVar(10)<=1
trigger6 = Root,Anim = 5120

[Statedef 7005]
Anim = 8500
movetype = H
ctrl = 0

[State -1]
type = NotHitBy
trigger1 = 1
Value = SCA
time = -1

[State -1]
type = VarSet
trigger1 = time = 0&&Root,Var(59)!=10
FV = 10
Value = Floor(GetHitVar(Damage))

[State -1]
type = ParentVarAdd
trigger1 = time = 0&&Root,Var(59)!=10
FV = 10
Value = Floor(-FVar(10))

[State -1]
type = VarAdd
trigger1 = time = 0&&Root,Var(59)=10
FV = 10
Value = Floor(GetHitVar(Damage))

[State -1]
type = ChangeState
trigger1 = time = 1
value = 7000

[State -1]
type = DestroySelf
trigger1 = !Parent,Alive
trigger2 = Root,StateNo = [6095,6099]
trigger3 = Root,StateNo = 6710
trigger4 = Root,Var(59) = 9
trigger5 = Root,FVar(10)<=1
trigger6 = Root,Anim = 5120