
;############################ 必殺技 #######################################
;---------------------------------------------------------------------------
; トルネードスピン

; main
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1111
poweradd = 40
sprpriority = 4

[State 210, 3]
type = varadd
trigger1 = var(51) = 1000
trigger1 = time = 0
v = 52
value = 1

[State 210, 3]
type = varset
trigger1 = var(51) != 1000
trigger1 = time = 0
v = 52
value = 0

[State 210, 3]
type = varset
trigger1 = var(51) != 1000
trigger1 = time = 0
v = 51
value = 1000

[State 210, 3]
type = ChangeState
trigger1 = helper(2),stateno = 1001
trigger1 = helper(2),animtime = 0
trigger2 = (time > 2) && helper(2),stateno != 1001
value = 0
ctrl = 1


;======================================

; arm
[Statedef 1001]
type    = S
movetype= A
physics = S
juggle  = 5
ctrl = 0
sprpriority = 4

[State -2, VarSet]
Type = VarSet
Trigger1 = Var(19) < 14
V = 19
Value = helper(2),AnimElemNo(0)

[state -2,0]
type = varset
trigger1 = 1
v = 20
value = 1001

[State -2, ChangeAnim]
Type = ChangeAnim
Trigger1 = time = 1
Value = Var(20)
Elem = Var(19)

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = , NT, ST, HT
time = 1

[State 10011, 4]
type = HitOverride
trigger1 = 1
attr = SCA, NA, SA, HA,NP,SP,HP
stateno = 5

[State -2, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 0, 0]
type = BindToParent
trigger1 = 1
time = 2
pos = 0,0

[State 1000, 0]
type = PlaySnd
trigger1 = time = 3
value = 0, 5

[State 0]
type = Helper
trigger1 = Numhelper(1006) = 0
trigger1 = AnimElem = 10
helpertype = normal
name = "supin"
postype = p1
pos = 140,0
stateno = 1006
ownpal = 0
id = 1006
keyctrl = 0

[State 211]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 0
channel = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 21
value = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 20
value = 2

[State 211, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2

;body

[Statedef 1002]
type = S
physics = S
sprpriority = -4

[State 0, ChangeAnim]
Type = ChangeAnim
Trigger1 = 1
Value = 5

[State 211, 3]
type = ChangeState
trigger1 = Time > 53
value = 1

[Statedef 1006]
type = S
movetype = A
physics = N
sprpriority = 3
anim = 1006 

[State 0]
type = Velset
trigger1 = 1
x = 2.5

[State 0]
type = Varadd
trigger1 = ScreenPos X != [0,239]
v = 18
value = 1

[State 1300, 飛び道具]
type = Hitdef
trigger1 = time%8 = 1
attr = S, SP 
damage = 10,3 
getpower = 10
animtype = light
pausetime = 0,3
priority = 4 
guardflag = MA
hitflag = MA
priority = 3
sparkno = 2
sparkxy = 0,-40
hitsound = 5,3
guardsound = 6,0
guard.dist = 30
ground.type = High
ground.slidetime = 14
ground.hittime = 16
ground.velocity = -.5,-3
air.velocity = -.5,-2
air.juggle = 1

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150
trigger2 = Var(18) >= 50

;---------------------------------------------------------------------------
; stand punchA

; main
[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1111
poweradd = 60
sprpriority = 4

[State 210, 3]
type = varadd
trigger1 = var(51) = 1010
trigger1 = time = 0
v = 52
value = 1

[State 210, 3]
type = varset
trigger1 = var(51) != 1010
trigger1 = time = 0
v = 52
value = 0

[State 210, 3]
type = varset
trigger1 = var(51) != 1010
trigger1 = time = 0
v = 51
value = 1010

[State 210, 3]
type = ChangeState
trigger1 = helper(2),stateno = 1011
trigger1 = helper(2),animtime = 0
trigger2 = (time > 2) && helper(2),stateno != 1011
value = 0
ctrl = 1


;======================================

; arm
[Statedef 1011]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
sprpriority = 4

;[State -2, VarAdd]
;Type = VarAdd
;Triggerall = stateno != 5
;Trigger1 = Time > 0
;Trigger2 = Time = 0
;Trigger2 = Var(21) = 1
;V = 19
;Value = 1

[State -2, 当身抜け]
type = Varset
trigger1 = 1
v = 30
value = gametime

[State -2, VarSet]
Type = VarSet
Trigger1 = Var(19) < 44
V = 19
Value = helper(2),AnimElemNo(0)

[state -2,0]
type = varset
trigger1 = 1
v = 20
value = 1011

[State 0, ChangeAnim]
Type = ChangeAnim
Trigger1 = time = 1
Value = Var(20)
Elem = Var(19)

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = , NT, ST, HT
time = 1

[State 10011, 4]
type = HitOverride
trigger1 = 1
attr = SCA, NA, SA, HA,NP,SP,HP
stateno = 5

[State -2, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 0, 0]
type = BindToParent
trigger1 = 1
time = 2
pos = 0,0

[State 1000, 0]
type = PlaySnd
triggerall = Var(32) = 0
trigger1 = AnimElem = 16
trigger2 = AnimElem = 28
trigger3 = AnimElem = 40
value = 15, 3

[State 1000, 0]
type = EnvShake
triggerall = Var(32) = 0
trigger1 = AnimElem = 16
trigger2 = AnimElem = 28
time = 15
freq = 80
ampl = 8

[State 1000, 0]
type = EnvShake
triggerall = Var(32) = 0
trigger1 = AnimElem = 40
time = 20
freq = 70
ampl = 12

[state 0,0]
type = varset
trigger1 = AnimElemTime(16) = 1
trigger2 = AnimElemTime(28) = 1
trigger3 = AnimElemTime(40) = 1
v = 32
value = 1

[state 0,0]
type = varset
trigger1 = AnimElem = 17
trigger2 = AnimElem = 29
trigger3 = AnimElem = 41
v = 32
value = 0

[State 211]
type = HitDef
triggerall = parent,Var(3) = 1
triggerall = !AnimElem >= 35
trigger1 = AnimElem >= 11
trigger2 = AnimElem >= 23
attr = S, SA
damage = 96, 18
getpower = 90
givepower = 50
animtype = hard
air.animtype = hard
guardflag = MA
hitflag = MAFD
affectteam = B
priority = 6, Hit
pausetime = 0,30;12, 20
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = S15,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = 0
air.velocity = -2,30
fall.recover = 0
fall.damage = 20 
fall.envshake.ampl = 6 
fall.envshake.freq = 178
fall.envshake.time = 15

[State 211]
type = HitDef
triggerall = parent,Var(3) = 0
triggerall = !AnimElem >= 35
trigger1 = AnimElem >= 11
trigger2 = AnimElem >= 23
attr = S, SA
damage = 80, 15
getpower = 90
givepower = 50
animtype = hard
air.animtype = hard
guardflag = MA
hitflag = MAFD
affectteam = B
priority = 6, Hit
pausetime = 0,20;12, 20
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = S15,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = 0
air.velocity = -2,30
fall.recover = 0
fall.damage = 20 
fall.envshake.ampl = 6 
fall.envshake.freq = 178
fall.envshake.time = 15

[State 211]
type = HitDef
trigger1 = parent,Var(3) = 1
trigger1 = AnimElem >= 35
attr = S, SA
damage = 144, 30
getpower = 90
givepower = 50
animtype = Back
air.animtype = hard
guardflag = MA
hitflag = MAFD
affectteam = B
priority = 6, Hit
pausetime = 0,12;18, 12
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = S15,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = 0
air.velocity = -2,30
fall = 1
fall.recover = 0
fall.damage = 20 
fall.envshake.ampl = 9 
fall.envshake.freq = 178
fall.envshake.time = 15

[State 211]
type = HitDef
trigger1 = parent,Var(3) = 0
trigger1 = AnimElem >= 35
attr = S, SA
damage = 120, 25
getpower = 90
givepower = 50
animtype = Back
air.animtype = hard
guardflag = MA
hitflag = MAFD
affectteam = B
priority = 6, Hit
pausetime = 0,12;18, 12
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = S15,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = 0
air.velocity = -2,30
fall = 1
fall.recover = 0
fall.damage = 20 
fall.envshake.ampl = 9 
fall.envshake.freq = 178
fall.envshake.time = 15

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

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 21
value = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 20
value = 2

[State 211, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2

;body

[Statedef 1012]
type = S
physics = S
sprpriority = -4

[State 0, ChangeAnim]
Type = ChangeAnim
Trigger1 = 1
Value = 5

[State 211, 3]
type = ChangeState
trigger1 = Time > 139
value = 1

;---------------------------------------------------------------------------
; キノコ落とし

; main
[Statedef 1040]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1111
poweradd = 40
sprpriority = 4

[State 210, 3]
type = varadd
trigger1 = var(51) = 1040
trigger1 = time = 0
v = 52
value = 1

[State 210, 3]
type = varset
trigger1 = var(51) != 1040
trigger1 = time = 0
v = 52
value = 0

[State 210, 3]
type = varset
trigger1 = var(51) != 1040
trigger1 = time = 0
v = 51
value = 1040

[State 210, 3]
type = ChangeState
trigger1 = helper(2),stateno = 1041
trigger1 = helper(2),animtime = 0
trigger2 = (time > 2) && helper(2),stateno != 1041
value = 0
ctrl = 1


;======================================

; arm
[Statedef 1041]
type    = S
movetype= A
physics = S
juggle  = 5
ctrl = 0
sprpriority = 4

;[State -2, VarAdd]
;Type = VarAdd
;Triggerall = stateno != 5
;;Trigger1 = AnimElemTime(1) = 0
;Trigger1 = AnimElemNo(0) = var(17)
;Trigger2 = Time = 0
;Trigger2 = Var(21) = 1
;V = 19
;Value = 1

[State -2, 当身抜け]
type = Varset
trigger1 = 1
v = 30
value = gametime

[State -2, VarSet]
Type = VarSet
Trigger1 = Var(19) < 14
V = 19
Value = helper(2),AnimElemNo(0)

[state -2,0]
type = varset
trigger1 = 1
v = 20
value = 1001

[State -2, ChangeAnim]
Type = ChangeAnim
Trigger1 = time = 1
Value = Var(20)
Elem = Var(19)

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = , NT, ST, HT
time = 1

[State 10011, 4]
type = HitOverride
trigger1 = 1
attr = SCA, NA, SA, HA,NP,SP,HP
stateno = 5

[State -2, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 0, 0]
type = BindToParent
trigger1 = 1
time = 2
pos = 0,0

[State 1000, 0]
type = PlaySnd
trigger1 = time = 3
value = 0, 5

[State 0]
type = Helper
trigger1 = AnimElem = 10
trigger1 = Numhelper(1046) = 0
helpertype = normal
name = "kino"
postype = p1
pos = 150,-50
stateno = 1046
ownpal = 0
id = 1046
keyctrl = 0
size.xscale = 1 
size.yscale = 1

[State 211]
type = PlaySnd
trigger1 = time = 1
value = 2, 5
channel = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 21
value = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 20
value = 2

[State 211, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2

;キノコ
[Statedef 1046]
type    = U
movetype= A
physics  = N
juggle  = 5
ctrl = 0
sprpriority = 5
anim = 1046

[State 211]
type = posadd
trigger1 = pos y != 0
y = 2

[State 211]
type = HitDef
trigger1 = 1
attr = S, SP
damage = 10,0
givepower = 15
animtype = light
guardflag = MA
hitflag = MA
priority = 3, Hit
pausetime = 0, 6
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = 5,3
guardsound = 6,0
guard.dist = 0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = -5
air.velocity = -2,-3
ID = 1046

[State -2, 4]
type = HitOverride
trigger1 = 1
attr = SCA, NA,SA,HA,NP,SP,HP
stateno = 9999
Time = -1

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150
trigger2 = time >= 500
trigger3 = MoveContact >= 1

;---------------------------------------------------------------------------
; キーボードアタックA

; main
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1111
poweradd = 60
sprpriority = 4

[State 0]
type = VarAdd
trigger1 = time = 1
trigger1 = var(18) <= 4
v = 18
value = 1

[State 0]
type = Varset
trigger1 = time = 1
trigger1 = var(18) >= 5
v = 18
value = 5

[State 210, 3]
type = varadd
trigger1 = var(51) = 1050
trigger1 = time = 0
v = 52
value = 1

[State 210, 3]
type = varset
trigger1 = var(51) != 1050
trigger1 = time = 0
v = 52
value = 0

[State 210, 3]
type = varset
trigger1 = var(51) != 1050
trigger1 = time = 0
v = 51
value = 1050

[State 210, 3]
type = ChangeState
trigger1 = helper(2),stateno = 1051
trigger1 = helper(2),animtime = 0
trigger2 = (time > 2) && helper(2),stateno != 1051
value = 0
ctrl = 1


;======================================

; arm
[Statedef 1051]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
sprpriority = 4

;[State -2, VarAdd]
;Type = VarAdd
;Triggerall = stateno != 5
;Trigger1 = Time > 0
;Trigger2 = Time = 0
;Trigger2 = Var(21) = 1
;V = 19
;Value = 1

[State -2, 当身抜け]
type = Varset
trigger1 = 1
v = 30
value = gametime

[State -2, VarSet]
Type = VarSet
Trigger1 = Var(19) < 22
V = 19
Value = helper(2),AnimElemNo(0)

[State 1000, 0]
type = PlaySnd
trigger1 = AnimElem = 11
trigger1 = Var(32) = 0
value = 15, 5

[state 0,0]
type = varset
trigger1 = AnimElemTime(11) = 1
v = 32
value = 1

[state 0,0]
type = varset
trigger1 = AnimElem = 12
v = 32
value = 0

[state -2,0]
type = varset
trigger1 = 1
v = 20
value = 1051

[State 0, ChangeAnim]
Type = ChangeAnim
Trigger1 = time = 1
Value = Var(20)
Elem = Var(19)

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = , NT, ST, HT
time = 1

[State 10011, 4]
type = HitOverride
trigger1 = 1
attr = SCA, NA, SA, HA,NP,SP,HP
stateno = 5

[State -2, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 0, 0]
type = BindToParent
trigger1 = 1
time = 2
pos = 0,0

[State 1000, 0]
type = PlaySnd
trigger1 = time = 3
value = 0, 5

[State 0]
type = Helper
trigger1 = Numhelper(1056) = 0
trigger1 = AnimElem = 11
helpertype = normal
name = "key"
postype = p1
pos = 0,0
stateno = 1056
ownpal = 0
id = 1056
keyctrl = 0
size.xscale = .8
size.yscale = .8

[State 211]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 7
channel = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 21
value = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 20
value = 2

[State 211, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2

;body

[Statedef 1052]
type = S
physics = S
sprpriority = -4

[State 0, ChangeAnim]
Type = ChangeAnim
Trigger1 = 1
Value = 4

[State 211, 3]
type = ChangeState
trigger1 = Time > 56
value = 1

;key

[Statedef 1056]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1056
sprpriority = 4

[State 0, 1ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(11) >= 0
Value = 1056
Elem = 1

[State 0, 1PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(11) >= 0
time = 15
facing = 1
pos = 76,-270.4

[State 0, 2ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(12) >= 0
Value = 1056
Elem = 2

[State 0, 2PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(12) >= 0
time = 15
facing = 1
pos = 120.8,-224.8

[State 0, 3ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(13) >= 0
Value = 1056
Elem = 3

[State 0, 3PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(13) >= 0
time = 15
facing = 1
pos = 145.6,-166.4

[State 0, 4ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(14) >= 0
Value = 1056
Elem = 4

[State 0, 4PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(14) >= 0
time = 15
facing = 1
pos = 160.8,-111.2

[State 0, 5ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(15) >= 0
Value = 1056
Elem = 5

[State 0, 5PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(15) >= 0
time = 15
facing = 1
pos = 164,-76

[State 211]
type = HitDef
trigger1 = root,Var(3) = 1
trigger1 = AnimElem = 1
attr = S, SA
damage = 144, 30
getpower = 80
givepower = 30
animtype = hard
guardflag = MA
hitflag = MAFD
affectteam = B
priority = 5, Hit
pausetime = 0, 12
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = S15,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = -5
air.velocity = -2,-3
envshake.time = 15
envshake.freq = 80
envshake.ampl = 8
envshake.phase = 95
ID = 1056

[State 211]
type = HitDef
trigger1 = root,Var(3) = 0
trigger1 = AnimElem = 1
attr = S, SA
damage = 120, 25
getpower = 80
givepower = 30
animtype = hard
guardflag = MA
hitflag = MAFD
affectteam = B
priority = 5, Hit
pausetime = 0, 6
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = S15,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = -5
air.velocity = -2,-3
envshake.time = 15
envshake.freq = 80
envshake.ampl = 8
envshake.phase = 95
ID = 1056

[State 0, 無敵化]
type = nothitby
trigger1 = 1
value = SCA,AA,AT,AP

[State 0]
type = varSet
trigger1 = 1
v = 19
value = -1*(target(1056),ScreenPos Y)

[State 0]
type = varSet
trigger1 = parent,facing = 1
v = 20
value = target(1056),ScreenPos X

[State 0]
type = varSet
trigger1 = parent,facing = -1
v = 20
value = 239-(target(1056),ScreenPos X)

[State 0]
type = Varset
trigger1 = 1
v = 18
value = 0

[State 0, 5PosSet]
Type = BindToParent
Trigger1 = Var(18) <= 0
trigger1 = MoveContact >= 1
time = 1
facing = 1
pos = Var(20),Var(19)

[State 0, 5PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(16) = 0
time = 1
facing = 1
pos = 248,-16

[State 211, 3]
type = ChangeState
trigger1 = helper(2),AnimElemTime(16) = 0
trigger2 = MoveContact >= 1
value = 1067
ignorehitpause=1

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150
;trigger2 = helper(2),AnimElemTime(16) >= 0

;---------------------------------------------------------------------------
; キーボードアタックB

; main
[Statedef 1060]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1111
poweradd = 60
sprpriority = 4

[State 0]
type = VarAdd
trigger1 = time = 1
trigger1 = var(18) <= 4
v = 18
value = 1

[State 0]
type = Varset
trigger1 = time = 1
trigger1 = var(18) >= 5
v = 18
value = 5

[State 210, 3]
type = varadd
trigger1 = var(51) = 1060
trigger1 = time = 0
v = 52
value = 1

[State 210, 3]
type = varset
trigger1 = var(51) != 1060
trigger1 = time = 0
v = 52
value = 0

[State 210, 3]
type = varset
trigger1 = var(51) != 1060
trigger1 = time = 0
v = 51
value = 1060

[State 210, 3]
type = ChangeState
trigger1 = helper(2),stateno = 1061
trigger1 = helper(2),animtime = 0
trigger2 = (time > 2) && helper(2),stateno != 1061
value = 0
ctrl = 1


;======================================

; arm
[Statedef 1061]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
sprpriority = 4

;[State -2, VarAdd]
;Type = VarAdd
;Triggerall = stateno != 5
;Trigger1 = Time > 0
;Trigger2 = Time = 0
;Trigger2 = Var(21) = 1
;V = 19
;Value = 1

[State -2, 当身抜け]
type = Varset
trigger1 = 1
v = 30
value = gametime

[State -2, VarSet]
Type = VarSet
Trigger1 = Var(19) < 16
V = 19
Value = helper(2),AnimElemNo(0)

[State 1000, 0]
type = PlaySnd
trigger1 = AnimElem = 9
trigger1 = Var(32) = 0
value = 15, 5

[state 0,0]
type = varset
trigger1 = AnimElemTime(9) = 1
v = 32
value = 1

[state 0,0]
type = varset
trigger1 = AnimElem = 10
v = 32
value = 0

[state -2,0]
type = varset
trigger1 = 1
v = 20
value = 1061

[State 0, ChangeAnim]
Type = ChangeAnim
Trigger1 = time = 1
Value = Var(20)
Elem = Var(19)

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = , NT, ST, HT
time = 1

[State 10011, 4]
type = HitOverride
trigger1 = 1
attr = SCA, NA, SA, HA,NP,SP,HP
stateno = 5

[State -2, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 0, 0]
type = BindToParent
trigger1 = 1
time = 2
pos = 0,0

[State 1000, 0]
type = PlaySnd
trigger1 = time = 3
value = 0, 5

[State 0]
type = Helper
trigger1 = Numhelper(1056) = 0
trigger1 = AnimElem = 9
helpertype = normal
name = "key"
postype = p1
pos = 0,0
stateno = 1066
ownpal = 0
id = 1056
keyctrl = 0
size.xscale = .8
size.yscale = .8

[State 211]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 2
channel = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 21
value = 0

[state -2,0]
type = varset
trigger1 = AnimTime = 0
v = 20
value = 2

[State 211, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2

;body

[Statedef 1062]
type = S
physics = S
sprpriority = -4

[State 0, ChangeAnim]
Type = ChangeAnim
Trigger1 = 1
Value = 4

[State 211, 3]
type = ChangeState
trigger1 = Time > 42
value = 1

;key
[Statedef 1066]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 1056
sprpriority = 4

[State 0, 1ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(9) >= 0
trigger1 = MoveContact = 0
Value = 1056
Elem = 1

[State 0, 1PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(9) >= 0
trigger1 = MoveContact = 0
time = 15
facing = 1
pos = 199.2,-50.4

[State 0, 2ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(10) >= 0
trigger1 = MoveContact = 0
Value = 1056
Elem = 2

[State 0, 2PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(10) >= 0
trigger1 = MoveContact = 0
time = 15
facing = 1
pos = 169.6,-80.8

[State 0, 3ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(11) >= 0
trigger1 = MoveContact = 0
Value = 1056
Elem = 3

[State 0, 3PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(11) >= 0
trigger1 = MoveContact = 0
time = 15
facing = 1
pos = 117.6,-88

[State 0, 4ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(12) >= 0
trigger1 = MoveContact = 0
Value = 1056
Elem = 4

[State 0, 4PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(12) >= 0
trigger1 = MoveContact = 0
time = 15
facing = 1
pos = 95.2,-80

[State 0, 5ChangeAnim]
Type = ChangeAnim
Trigger1 = helper(2),AnimElemTime(13) >= 0
trigger1 = MoveContact = 0
Value = 1056
Elem = 5

[State 0, 5PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(13) >= 0
trigger1 = MoveContact = 0
time = 15
facing = 1
pos = 87.2,-52

[State 211]
type = HitDef
trigger1 = root,Var(3) = 1
trigger1 = AnimElem = 1
attr = S, SA
damage = 108,12
getpower = 85
givepower = 35
animtype = hard
guardflag = MA
hitflag = MAFD
affectteam = B
priority = 5, Hit
pausetime = 0, 12
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = S15,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = -5
air.velocity = -2,-3
envshake.time = 15
envshake.freq = 80
envshake.ampl = 8
envshake.phase = 95
ID = 1056

[State 211]
type = HitDef
trigger1 = root,Var(3) = 0
trigger1 = AnimElem = 1
attr = S, SA
damage = 90,10
getpower = 85
givepower = 35
animtype = hard
guardflag = MA
hitflag = MAFD
affectteam = B
priority = 5, Hit
pausetime = 0, 6
guard.sparkno = 40
sparkno = 2
sparkxy = -20, -26
hitsound = S15,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 20
ground.velocity = -5
air.velocity = -2,-3
envshake.time = 15
envshake.freq = 80
envshake.ampl = 8
envshake.phase = 95
ID = 1056

[State 0, 無敵化]
type = nothitby
trigger1 = 1
value = SCA,AA,AT,AP

[State 0]
type = varSet
trigger1 = 1
v = 19
value = -1*(target(1056),ScreenPos Y)

[State 0]
type = varSet
trigger1 = parent,Facing = 1
v = 20
value = target(1056),ScreenPos X

[State 0]
type = varSet
trigger1 = parent,Facing = -1
v = 20
value = 239-(target(1056),ScreenPos X)

[State 0]
type = Varset
trigger1 = 1
v = 18
value = 0

[State 0, 5PosSet]
Type = BindToParent
Trigger1 = Var(18) <= 0
trigger1 = MoveContact >= 1
time = 1
facing = 1
pos = Var(20),Var(19)

[State 0, 5PosSet]
Type = BindToParent
Trigger1 = helper(2),AnimElemTime(14) = 0
time = 1
facing = 1
pos = 248,-16

[State 211, 3]
type = ChangeState
trigger1 = helper(2),AnimElemTime(14) = 0
trigger2 = MoveContact >= 1
value = 1067
ignorehitpause=1

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150

[Statedef 1067]
type    = A
movetype= I
physics = S
sprpriority = 4
anim = 1057

[State 4000, 51]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 4000, 51]
type = turn
trigger1 = facing != parent,facing
trigger1 = Var(18) = 0

[State 0, 4ChangeAnim]
Type = ChangeAnim
Trigger1 = Anim != 1057
Value = 1057
ignorehitpause=1

[State 0]
type = VelAdd
trigger1 = Var(18) > 41
;x = -0.1
y = .9

[State 0]
type = Velset
trigger1 = Var(18) > 0
trigger1 = Var(18) <= 41
;x = -3+(Var(18)*.075)
y = -9+(Var(18)*.225)

[State 0]
type = VarAdd
trigger1 = 1
v = 18
value = 1

[State 0]
type = AngleDraw
trigger1 = 1

[State 0]
type = AngleSet
trigger1 = 1
value = 8*(Var(18))

[State 211, 3]
type = ChangeState
trigger1 = time = 2
value = 1067

[state 0,0]
type = destroyself
trigger1 = parent,stateno = 5150
trigger2 = Var(18) >= 100
