;------------------------Kinetic Cookie Throw
[Statedef 1000]
type = S
movetype = A
physics = S
poweradd= 72
anim = 1000
ctrl = 0
velset = 0,0
juggle = 15

[State 1065, 1]
type = VarSet
trigger1 = Time = 0
var(31) = -20

[State 200,PlaySnd Normal]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = var(39) = 0
value = 1000,0
channel = 0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2 ;Time = 1
value = 0, 4

;[State 191, Dust]
;type = Explod
;trigger1 = AnimElem = 7
;anim = 7104 ;f60
;ID = 7104 ;60
;sprpriority = -2
;postype = p1
;scale = 1,1 ;0.5,0.5
;ownpal = 1
;pausemovetime = -1
;supermovetime = -1

;[State 190, 0]
;type = PlaySnd
;trigger1 = animelem = 7
;value = S40, 1

;Cookies
[State 1090, 1]
type = Projectile
trigger1 = AnimElem = 3
attr = S, SP
damage = 53,8 ;63,8
animtype = Medium
getpower = 80,20
givepower = 20
guardflag = MA
;hitflag = MA
pausetime = 0,11
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;2010
sparkxy = 85, -76 ;-10, -76 ;20,0
hitsound   = s5,9
guardsound = s6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -4
air.velocity = -4,-5
projpriority = 1
projcancelanim = 8003+random%3 ;2005+(random%2)
projid = 1001
projanim = 1001
projhitanim = -1
velocity = 3,0
projscale = 0.4,0.4
offset = 0,0 ;40,-66
;palfx.time = 27
;palfx.add = 39,0,78
;palfx.mul = 110,0,220
;palfx.color = 100

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

;------------------------EX Kinetic Cookie Throw
[Statedef 1050]
type = S
movetype = A
physics = S
;poweradd= 72
poweradd = -500
anim = 1000
ctrl = 0
velset = 0,0
juggle = 15

[State 1065, 1]
type = VarSet
trigger1 = Time = 0
var(31) = -20

[State 65002, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S7500,0

[State 65002, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 22
add = 29,29,0
mul = 256,256,256
sinadd = 58,58,0,3

[State 1050, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 7500
pos = -10,-115
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 65000, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 22
length = 10
paladd = 50,50,0
framegap = 2
trans = add

[State 200,PlaySnd Normal]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = var(39) = 0
value = 1000,0
channel = 0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2 ;Time = 1
value = 0, 4

;[State 191, Dust]
;type = Explod
;trigger1 = AnimElem = 7
;anim = 7104 ;f60
;ID = 7104 ;60
;sprpriority = -2
;postype = p1
;scale = 1,1 ;0.5,0.5
;ownpal = 1
;pausemovetime = -1
;supermovetime = -1

;[State 190, 0]
;type = PlaySnd
;trigger1 = animelem = 7
;value = S40, 1

;Cookies
[State 1090, 1]
type = Projectile
trigger1 = AnimElem = 3
;trigger1 = var(39) = 0
attr = S, SP
damage = 35,8
animtype = Medium
getpower = 25,5
givepower = 30
guardflag = MA
;hitflag = MA
pausetime = 5,11 ;3,11
;sparkno = S2005+(random%2)
;guard.sparkno = S2010
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;2010
sparkxy = 85, -76 ;20,0
hitsound   = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5
air.velocity = -4,-5
projid = 1001 ;5
projanim = 1001 ;5
projhitanim = -1
projpriority = 4 ;3
projscale = 0.4,0.4
projcancelanim = 8003+random%3 ;2005+(random%2)
velocity = 5,0
offset = 0,0 ;40,-66
projhits = 5
;;projmisstime = 2
;afterimage.time = -1
;afterimage.trans   =  add
;afterimage.framegap = 2
;afterimage.PalBright   =  128, 128, 128
;afterimage.PalContrast =  128, 128, 128
;afterimage.PalAdd      = 50,50,0 ;-128,128,0
;afterimage.PalMul      =  256,256,0 ;224,224,0
afterimage.time = -1
afterimage.length = 10
afterimage.paladd = 50,50,0
afterimage.framegap = 2
afterimage.trans = add

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

;---------------------------------------------------------------------
; 百式・鬼焼き（弱）
;------------------------開始動作
[Statedef 1060]
type = S
movetype = A
physics = S
poweradd= 72
anim = 1050 ;+ Var(39)*10000
ctrl = 0
velset = 0,0
sprpriority = 2
juggle = 15

[State 4050,0]
type = NotHitBy
trigger1 = Time < 6
value = SCA

;[State 200,PlaySnd]
;type = PlaySnd
;trigger1 = AnimElem = 3,=1
;value = 0,5 ;1,11

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 4,7+random%3 ;0,ifelse(Var(39)=1,108,14)
channel = 0

[State 1110, posadd]
type = posadd
trigger1 = AnimElem = 2,=2 || AnimElem = 3,=0
x = 13

[State -2, VarSet]
type = VarSet
trigger1 = Time = 0
var(15) = 0

[State -2, VarSet]
type = VarSet
trigger1 = MoveContact
var(15) = 1
ignorehitpause = 1

[State 440, HitDef]
type = HitDef
trigger1 = var(15) = 0
trigger1 = AnimElem = 2
attr = S, SA
damage    = 67,7 ;77,7
getpower = 40,10
givepower = 36
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 13,13
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = 0,-60
hitsound   = S5,2 ;s3,4
guardsound = S6,1 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -1.8,-11
air.hittime = 13
air.velocity = -1.8,-11
guard.velocity = -7
fall = 1
fall.recover = 0
yaccel = .55
;palfx.time = 52
;palfx.add = 39,0,78
;palfx.mul = 110,0,220
;palfx.color = 100

[State 440, HitDef]
type = HitDef
trigger1 = var(15) = 0
trigger1 = AnimElem = 3 || AnimElem = 4
attr = A, SA
damage    = 53,8 ;63,8
getpower = 72,18
givepower = 36
animtype = Hard
hitflag = MAF
guardflag = MA
pausetime = 13,13
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = 0,-ifelse((AnimElem = 3),65,75)
hitsound   = S5,2 ;s3,4
guardsound = S6,1 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -1.8,-11
air.hittime = 13
air.velocity = -1.8,-11
guard.velocity = -7
fall = 1
fall.recover = 0
yaccel = .55
;palfx.time = 52
;palfx.add = 39,0,78
;palfx.mul = 110,0,220
;palfx.color = 100

[State -2, MoveContact]
type = VarSet
trigger1 = MoveContact
var(12) = 1
ignorehitpause = 1

[State -2, MoveGuarded]
type = VarSet
trigger1 = MoveGuarded
var(30) = 1
ignorehitpause = 1

[State 1065, 1]
type = VarSet
trigger1 = AnimElem = 2 || AnimElem = 3 || AnimElem = 4
var(31) = -ifelse((AnimElem = 2),25,ifelse((AnimElem = 3),65,75))
ignorehitpause = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 105,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A
physics = N

[State 1110, posadd]
type = posadd
trigger1 = AnimElem = 4,=0
x = 2
y = -9

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 4,=1
x = 1
y = -5

[State 105,VelAdd]
type = VelAdd
trigger1 = AnimElem = 4,> 1
y = .55

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .80

[State 105,End]
type = ChangeState
trigger1 = AnimElem = 4, > 1
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1061

;------------------------ 着地
[Statedef 1061]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1051 ;+ Var(39)*10000
velset = 0, 0

[State 1102, PosSet]
type = PosSet
trigger1 = Time = 0
Y = 0

[State 191, Dust]
type = Explod
trigger1 = AnimElem = 1 ;31
anim = 7104 ;f60
ID = 7104 ;60
sprpriority = -2
postype = p1
scale = 1,1 ;0.5,0.5
ownpal = 1
pausemovetime = -1
supermovetime = -1

[State 190, 0]
type = PlaySnd
trigger1 = animelem = 1 ;31
value = S40, 1

[State 1102, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------
; 百式・鬼焼き（強）
;------------------------開始動作
[Statedef 1070]
type = S
movetype = A
physics = S
poweradd= 72
anim = 1060 ;+ Var(39)*10000
ctrl = 0
velset = 0,0
sprpriority = 2
juggle = 3

[State 4050,0]
type = NotHitBy
trigger1 = Time < 5
value = SCA

;[State 200,PlaySnd]
;type = PlaySnd
;trigger1 = AnimElem = 3,=1
;value = 0,5 ;1,11

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 4,7+random%3 ;0,ifelse(Var(39)=1,108,14)
channel = 0

[State 1110, posadd]
type = posadd
trigger1 = AnimElem = 2,=2 || AnimElem = 3,=0
x = 13

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
attr = S, SA
damage    = ifelse((AnimElem = 2),75,14),5
getpower = 60,30
givepower = 40
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 20,20
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = 0,-25
hitsound   = S5,2 ;s3,4
guardsound = S6,1 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -1.8
air.hittime = 13
air.velocity = -1.8,-11
guard.velocity = -7
;yaccel = .55
;palfx.time = 52
;palfx.add = 39,0,78
;palfx.mul = 110,0,220
;palfx.color = 100

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = A, SA
damage    = 9,5
getpower = 32,16
givepower = 40
animtype = Hard
hitflag = MAF
guardflag = MA
pausetime = 13,12
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = 0,-ifelse((AnimElem = 3),65,75)
hitsound   = S5,2 ;s3,4
guardsound = S6,1 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -1.8,-11
air.hittime = 13
air.velocity = -1.8,-11
guard.velocity = -7
fall = 1
fall.recover = 0
yaccel = .55
;palfx.time = 52
;palfx.add = 39,0,78
;palfx.mul = 110,0,220
;palfx.color = 100

[State -2, MoveContact]
type = VarSet
trigger1 = MoveContact
var(12) = 1
ignorehitpause = 1

[State -2, MoveGuarded]
type = VarSet
trigger1 = MoveGuarded
var(30) = 1
ignorehitpause = 1

[State 1065, 1]
type = VarSet
trigger1 = AnimElem = 2 || AnimElem = 3 || AnimElem = 4
var(31) = -ifelse((AnimElem = 2),25,ifelse((AnimElem = 3),65,75))
ignorehitpause = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 105,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A
physics = N

[State 1110, posadd]
type = posadd
trigger1 = AnimElem = 4,=0
x = 2
y = -9

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 4,=1
x = 2
y = -9.5

[State 105,VelAdd]
type = VelAdd
trigger1 = AnimElem = 4,> 1
y = .52

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .85

[State 105,End]
type = ChangeState
trigger1 = AnimElem = 4, > 1
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1061 ;1101

;------------------------開始動作
;EX Woohoo Whirlwind
[Statedef 1075]
type = S
movetype = A
physics = S
poweradd= -500
anim = 1060 ;+ Var(39)*10000
ctrl = 0
velset = 0,0
sprpriority = 2
juggle = 3

[State 4050,0]
type = NotHitBy
trigger1 = Time < 5
value = SCA

[State 200,PlaySnd EX Special]
type = PlaySnd
trigger1 = Time = 0
value = 7500,0 ;1

[State 65002, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 22
add = 29,29,0
mul = 256,256,256
sinadd = 58,58,0,3

[State 65000, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 22
length = 10
paladd = 50,50,0
framegap = 2
trans = add

[State 1050, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 7500
pos = -1,-115
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 4,7+random%3 ;0,ifelse(Var(39)=1,108,14)
channel = 0

[State 1110, posadd]
type = posadd
trigger1 = AnimElem = 2,=2 || AnimElem = 3,=0
x = 13

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
attr = S, SA
damage    = ifelse((AnimElem = 2),100,50),5
getpower = 60,30
givepower = 40
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 30,30
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = 0,-25
hitsound   = S5,2 ;s3,4
guardsound = S6,1 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -1.8
air.hittime = 13
air.velocity = -1.8,-11
guard.velocity = -7
;yaccel = .55
;palfx.time = 52
;palfx.add = 39,0,78
;palfx.mul = 110,0,220
;palfx.color = 100

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
trigger3 = AnimElem = 6
attr = A, SA
damage    = 20,5
getpower = 32,16
givepower = 40
animtype = Hard
hitflag = MAF
guardflag = MA
pausetime = 13,12
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = 0,-ifelse((AnimElem = 3),65,75)
hitsound   = S5,2 ;s3,4
guardsound = S6,1 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -1.8,-11
air.hittime = 13
air.velocity = -1.8,-11
guard.velocity = -7
fall = 1
fall.recover = 0
yaccel = .55
;palfx.time = 52
;palfx.add = 39,0,78
;palfx.mul = 110,0,220
;palfx.color = 100

[State -2, MoveContact]
type = VarSet
trigger1 = MoveContact
var(12) = 1
ignorehitpause = 1

[State -2, MoveGuarded]
type = VarSet
trigger1 = MoveGuarded
var(30) = 1
ignorehitpause = 1

[State 1065, 1]
type = VarSet
trigger1 = AnimElem = 2 || AnimElem = 3 || AnimElem = 4
var(31) = -ifelse((AnimElem = 2),25,ifelse((AnimElem = 3),65,75))
ignorehitpause = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 105,StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A
physics = N

[State 1110, posadd]
type = posadd
trigger1 = AnimElem = 4,=0
x = 2
y = -9

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 4,=1
x = 2
y = -9.5

[State 105,VelAdd]
type = VelAdd
trigger1 = AnimElem = 4,> 1
y = .52

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .85

[State 105,End]
type = ChangeState
trigger1 = AnimElem = 4, > 1
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1061 ;1101

;---------------------------------------------------------------------------
;ドナルドガール呼び出し

[Statedef 1080]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 80
anim = 1070
ctrl = 0
sprpriority = 2

[State 1060, ヘルパーを出す]
type = Helper
trigger1 = AnimElem = 4
Persistent = 0
name = "Ronald/Donald McDonald"
stateno = 1081 ;2100
ID = 1081 ;2100
pos = 400,-80
postype = P2
facing = -1
keyctrl = 0
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
helpertype = Normal

[State 1060, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 4
value = 4, 11 ;6, 2

[State 1060, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 610, 4]
type = CtrlSet
trigger1 = PalNo = 12 || Var(40) = 1
trigger1 = Time = 20
value = 1

;------------------
;ドナルドガール カカト落とし

[Statedef 1081]
type = A
movetype= A
physics = N
velset = 12,-12
ctrl = 0
anim = 1071 ;2100

[State 630, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 2
value = 1080, 0

[State 2100, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 5 ;3

[State 2100, ヒット定義]
type = HitDef
trigger1 = AnimElem = 5 ;3,4
attr = A, SA
animtype  = Hard
damage    = 70, 4
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -10,-70
;sparkno = 3
sparkno = s8003+random%3
guard.sparkno = s8011 ;-1
hitsound   = S5,12 ;s1,4
guardsound = S6,1 ;0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime  = 18
guard.ctrltime = 18
ground.velocity = -2,19
guard.velocity = -7
air.velocity = -2,19
envshake.time = 20
envshake.ampl = 5
envshake.freq = 170
fall = 1
fall.recover = 0


[State 2100, 速度加算]
type = VelAdd
trigger1 = 1
y = 1.0

[State 2100]
type = HitOverride
trigger1 = Time = 0
attr = SCA, NA, SA, HA, NP, SP, HP
stateno = 1084 ;2120
time = -1

[State 2100]
type = NotHitBy
trigger1 = Time = 0
value = , AT
time = -1

[State 2100]
type = Playerpush
trigger1 = time >= 0
value = 1

[State 2100, このヘルパーを消す]
type = DestroySelf
trigger1 = Time = 150

[State 2100,sift]
type = ChangeState
trigger1 = NumHelper(1081) >= 1
trigger1 = Pos Y >= -10
trigger1 = Vel Y > 0
value = 1082 ;2110

;---------------------------------------------------------------------------
;ドナルドガール帰る

[Statedef 1082]
type = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1072 ;2110

[State 1402, Landing Sound]
type = PlaySnd
trigger1 = Time = 1
value = S40, 2

[State 2100,sift]
type = posset
trigger1 = helper,Pos Y != 0
y=0

[State 2110]
type = HitOverride
trigger1 = Time = 0
attr = SCA, NA, SA, HA, NP, SP, HP
stateno = 1084 ;2120
time = -1

[State 2110]
type = NotHitBy
trigger1 = Time = 0
value = , AT
time = -1

[State 2110]
type = Playerpush
trigger1 = time >= 0
value = 1

[State 2110, ステート変更]
type = ChangeState
trigger1 = WinKO = 1
value = 1085 ;2105

[State 2110]
type = ChangeState
trigger1 = AnimTime = 0
value = 1083 ;1930
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 1083]
type     = A
movetype = I
physics  = N
ctrl     = 0
anim     = 1073 ;193
SprPriority = 5
velset   = -13,-14

[State 1930, 速度加算]
type = VelAdd
trigger1 = 1
y = .45

[State 1930, このヘルパーを消す]
type = DestroySelf
trigger1 = Time = 70

;---------------------------------------------------------------------------
;ドナルドガール喰らい

[Statedef 1084]
type = S
movetype= H
physics = N
velset = -10,-7
ctrl = 0
anim = 1074 ;2120

[State 2120, 速度加算]
type = VelAdd
trigger1 = 1
y = .45

[State 1055, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1 ;time = 0
value = S1081,0+random%3

[State 2120, このヘルパーを消す]
type = DestroySelf
trigger1 = Time = 70

;---------------------------------------------------------------------------
; ドナルドガール勝利ポーズへ
;
[Statedef 1085]
type = S
ctrl = 0
anim = 1075 ;2105
velset = 0,0

[State 2105, 変数をセットする]
type = ParentVarSet
trigger1 = Time = 0
v = 4
value = 1
IgnoreHitPause = 1
Persistent = 1

[State 2105, ステート変更]
type = ChangeState
trigger1 = Time = 150
value = 1086 ;2400

[State 2105, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; ドナルドガール勝利ポーズ
;
[Statedef 1086]
type = S
ctrl = 0
anim = 1076 ;2400
velset = 0,0

[State 2400, 変数をセットする]
type = ParentVarSet
trigger1 = Time = 0
v = 4
value = 0
IgnoreHitPause = 1
Persistent = 1

[State 181, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 1
value = 182, 0

[State 2400, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
;Assit Pocket Morrigan
[Statedef 1090]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 20
anim = 1080 ;+ Var(39)*10000
ctrl = 0
sprpriority = 1

[State 8100, 3]
type = Helper
trigger1 = animelem = 5 ;3
trigger1 = facing = 1
helpertype = normal
name = "Poc Morrigan"
id = 1091 ;1701
postype = left
pos = 0,-25
stateno = 1091 ;1701
facing = 1
ownpal = 1
size.xscale = 1 ;2 ;0.5
size.yscale = 1 ;2 ;0.5
supermovetime =1

[State 8100, 3]
type = Helper
trigger1 = animelem = 5 ;3
trigger1 = facing = -1
helpertype = normal
name = "Poc Morrigan"
id = 1091 ;1701
postype = right
pos = 0,-25
stateno = 1091 ;1701
facing = -1
ownpal = 1
size.xscale = 1 ;2 ;0.5
size.yscale = 1 ;2 ;0.5
supermovetime = 1

[State 1060, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 5 ;4
value = 1010, 0 ;6, 2

[State 8800, End1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 610, 4]
type = CtrlSet
trigger1 = PalNo = 12 || Var(40) = 1
trigger1 = Time = 20
value = 1

;---------------------------------------------------------------------------
;Pocket Morrigan Flying attack
[Statedef 1091]
type    = A
movetype= A
physics = N
velset = 0,0
juggle = 0
anim = 1081 ;1701
ctrl = 0

[State 25006, 1]
type = VelSet
trigger1 = time = 1
x = 12

[State 440, HitDef]
type = HitDef
trigger1 = time = 0
attr = A, SA
damage    = 120,10
getpower = 72,18
givepower = 36
animtype = Up
hitflag = MAF
guardflag = HA
pausetime = 12,12
;sparkno = S2005+(random%2)
;guard.sparkno = S2010
sparkno = s8003+random%3
guard.sparkno = s8011 ;-1
sparkxy = 0,-55
hitsound   = S5,2 ;s3,4
guardsound = S6,0 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -4,-8
air.hittime = 13
air.velocity = -4,-8
guard.velocity = -7
fall = 1
fall.recover = 0
yaccel = .5

[State 25006, 1]
type = HitOverride
trigger1 = Time = 1
attr = SCA, AA, AP, AT
stateno = 1092 ;1702
time = -1

[State 25002, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 1090,0
volume = 404

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 40
trigger1 = ScreenPos X <= 0
trigger2 = time = 140

;---------------------------------------------------------------------------
;Pocket Morrigan Hit
[Statedef 1092]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 1082 ;1702

[State 25006, 1]
type = VelSet
trigger1 = animelem = 1
x = -2
y = -7

[State 25006, 1]
type = VelSet
trigger1 = animtime = 5
x = -2
y = 7

[State 25006, 1]
type = VelSet
trigger1 = animtime = 8
x = -2
y = 4

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

[State 25004, 1]
type = SprPriority
trigger1 = Time = 0
value = -1

[State 1055, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1 ;time = 0
value = S1091,0+random%3

[State 1501,7]
type=ChangeState
trigger1 = Pos Y > 0
trigger1 = Vel Y >-35
value=1093 ;1703
;---------------------------------------------------------------------------
;Pocket Morrigan Liedead to hit
[Statedef 1093]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 1083 ;1703

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = s8,0 ;2

[State 5100,BGAire]
type=Explod
trigger1=Time
anim=7003
sprpriority=0
postype=p1
pos=0,-10
velocity=0,0
removetime=-2
scale=1,1 ;.65,.65
persistent=0
ownpal=1

[State 25004, 1]
type = SprPriority
trigger1 = Time = 0
value = 0 ;-1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 60
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------
; 百弐拾七式・葵花
;------------------------１段目
[Statedef 1100]
type = S
movetype = A
physics = N
poweradd= 72
anim = 1090 ;1300 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

[State 1065, 1]
type = VarSet
trigger1 = Time = 0
var(31) = -60

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3,=1
value = S0,4 ;2,1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = S4,12 ;0,ifelse(Var(39)=1,102,4)
channel = 0

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 2,=1
x = 6

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 6,=0
x = 0

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 5 ;4
attr = S, SA
damage    = 35,4 ;ifelse(Var(39)=1,42,35),4
getpower = 72,18
givepower = 36
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 13,13
;sparkno = S2005+(random%2)
;guard.sparkno = S2010
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = -10,-86
;hitsound   = s3,4
;guardsound = s4,0
hitsound   = S5,2 ;s3,4
guardsound = S6,0 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5
air.hittime = 13
air.velocity = -3,-5
guard.velocity = -7
air.fall = 1
fall.recover = 0
yaccel = .4

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .95

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

;------------------------二段目
[Statedef 1101]
type = S
movetype = A
physics = N
poweradd= 0
anim = 1091 ;+ Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

[State 1065, 1]
type = VarSet
trigger1 = Time = 0
var(31) = -60

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3,=1
value = 0,4 ;2,1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 4,13 ;0,ifelse(Var(39)=1,103,5)
channel = 0

[State 1301,VarSet(15)]
type = VarSet
trigger1  = Time = 0
var(15) = 0

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 2,=1
x = 6

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 5 ;4
attr = S, SA
damage    = 35,4 ;ifelse(Var(39)=1,42,35),4
getpower = 72,18
givepower = 36
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 20,27 ;ifelse(Var(39)=1,20,20),27
;sparkno = S2005+(random%2)
;guard.sparkno = S2010
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = -10,-86 ;0,-60
;hitsound   = s3,4
;guardsound = s4,0
hitsound   = S5,2 ;s3,4
guardsound = S6,0 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -3.75,0
air.hittime = 13
air.velocity = -3.75,-7.5
guard.velocity = -7
;fall = 1
fall.recover = 0
yaccel = .5

[State -2, MoveContact]
type = VarSet
trigger1 = MoveContact ;&& Var(39)
var(28) = 1
ignorehitpause = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 6,=0
x = 0

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .95

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

;------------------------三段目
[Statedef 1102]
type = A
movetype = A
physics = N
poweradd= 0
anim = 1092 ;+ Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 0

[State 1065, 1]
type = VarSet
trigger1 = Time = 0
var(31) = -55

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s0,4 ;2,1

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

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = s4, 14 ;0,ifelse(Var(39)=1,104,15)
channel = 0

[State 105,VelSet]
type = VelSet
trigger1 = Time = 0
x = 5
y = -7 ;-5 ;-6

[State 1301,VarSet(15)]
type = VarSet
trigger1  = Time = 0
var(15) = 0

[State 105, Veladd]
type = Veladd
trigger1 = Time > 0
y = .8 ;.6

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 4 ;3
attr = A, SA
damage    = 70,8 ;ifelse(Var(39)=1,63,70),8
getpower = 72,18
givepower = 36
animtype = Up
hitflag = MAF
guardflag = HA
pausetime = 12,12
;sparkno = S2005+(random%2)
;guard.sparkno = S2010
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011 ;S2010
sparkxy = -10,-35
hitsound   = S5,5 ;s3,4
guardsound = S6,1 ;s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -4,-8
air.hittime = 13
air.velocity = -4,-8
guard.velocity = -7
fall = 1
fall.recover = 0
yaccel = .5

[State 1000, ChangeState]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1103

;------------------------ 停止
[Statedef 1103]
type = S
movetype = I
physics = S
anim = 1093 ;+ Var(39)*10000
velset = 0, 0

[State 52, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = s40,1 ;1,4

[State 52, Dust]
type = Explod
trigger1 = !time
anim = 7104 ;F60 ;7104
ID = 7104 ;60 ;7104
sprpriority = -2
postype = p1
scale = 1,1 ;0.4,0.4
ownpal = 1
pausemovetime = -1
supermovetime = -1

[State 106, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Assist Carlos The Stickman
[Statedef 1110]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 30 ;110
velset = 0,0
anim = 1100 ;1100
ctrl = 0
sprpriority = 2

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 ;4 ;Time = 3
value = S1100,0
volume = 100

[State 1050, 4]
type = Helper
trigger1 = animelem = 5 ;4 ;Time = 0
trigger1 = facing = 1
trigger1 = numhelper(1111) = 0
helpertype = normal
name = "Carlos The Stickman"
id = 1111
size.xscale = 0.4 ;.38 ;0.3 ;1
size.yscale = 0.4 ;.38 ;0.3 ;10
postype = left
facing = 1
pos = 0,0
stateno = 1111
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1050, 5]
type = Helper
trigger1 = animelem = 5 ;4 ;Time = 0
trigger1 = facing = -1
trigger1 = numhelper(1111) = 0
helpertype = normal
name = "Carlos The Stickman"
id = 1111
size.xscale = 0.4 ;.38 ;0.3 ;1,5
size.yscale = 0.4 ;.38 ;0.3 ;1,5
postype = right
facing = -1
pos = 0,0
stateno = 1111
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 1100, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 610, 4]
type = CtrlSet
trigger1 = PalNo = 12 || Var(40) = 1
trigger1 = Time = 20
value = 1

;---------------------------------------------------------------------------
;Carlos The Stickman
[Statedef 1111]
type    = A
movetype= A
physics = N
velset = 4,0
ctrl = 0
anim = 1101

;[State 1051, PlaySnd]
;type = PlaySnd
;trigger1 = Time = 0
;value = S1051,0

[State 25002, Lose]
type = changestate
triggerall = time >= 30
trigger1 = LoseKo
trigger2 = RoundState = 4
value = 1116
ctrl = 0

[State 25002, Win]
type = changestate
triggerall = time >= 30
trigger1 = win
trigger2 = RoundState = 4
value = 1115 ;2400
ctrl = 0

[State 2100, 1]
type = HitOverride
trigger1 = Time = 1
attr = SCA, AA, AP, AT
stateno = 1113
time = -1

[State 2100, 3]
type = SprPriority
trigger1 = Time = 1
value = 43

[State 1051, ChangeState]
type = ChangeState
trigger1 = p2dist x < 40
value = 1112 ;2200

[State 1051, PlaySnd]
type = PlaySnd
trigger1 = Time = 25
value = S1100,1
volume = 100

;---------------------------------------------------------------------------
;Carlos Attack
[Statedef 1112]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 1102
ctrl = 0

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

[State 1102, 2]
type = PlaySnd
trigger1 = Time = 1
value = 0, 6 ;2

[State 220, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S1100,2
channel = 1

[State 1102, Lose]
type = changestate
triggerall = time >= 1
trigger1 = LoseKo
trigger2 = RoundState = 4
value = 1116
ctrl = 0

[State 1102, Win]
type = changestate
triggerall = time >= 30
trigger1 = win
trigger2 = RoundState = 4
value = 1115
ctrl = 0

[State 1052, 1]
type = HitOverride
trigger1 = Time = 1
attr = SCA, AA, AP, AT
stateno = 1113
time = -1

[State 1052, 5]
type = ChangeState
trigger1 = animtime = 0
value = 1114

;---------------------------------------------------------------------------
;Carlos Injured
[Statedef 1113]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 1103

[State 1103, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1500,0+random%12 ;3 ;4,11

;[State 25006, 1]
;type = VelSet
;trigger1 = time = 1
;x = -30

[State 1053, ScreenBound]
type = ScreenBound
trigger1 = time = 0
value = 1
movecamera = 0,0

[State 1053, 1]
type = SprPriority
trigger1 = Time = 0
value = -1

;[State 25004, 3]
;type = DestroySelf
;trigger1 = Time = 60

[State 1053, 2]
type = ChangeState
trigger1 = time = 16
value = 1114

;---------------------------------------------------------------------------
;Carlos Walks Away
[Statedef 1114]
type    = A
movetype= I
physics = N
velset = -4,0
anim = 1104 ;2300

[State 1104, Win]
type = changestate
triggerall = time >= 1
trigger1 = win
trigger2 = RoundState = 4
value = 1115
ctrl = 0

[State 1054, Lose]
type = changestate
triggerall = time >= 1
trigger1 = LoseKo
trigger2 = RoundState = 1
value = 1116
ctrl = 0

;[State 25006, 1]
;type = HitOverride
;trigger1 = Time = 0
;attr = SCA, AA, AP, AT
;stateno = 1053 ;2700
;time = -1

[State 1054, ScreenBound]
type = ScreenBound
trigger1 = time = 0
value = 1
movecamera = 0,0

[State 1104, 3]
type = DestroySelf
trigger1 = Time = 200

;--------------------------------------------------------------------------
;Carlos Win pose
[Statedef 1115]
type = S
anim = 1105
velset = 0,0
ctrl = 0

[State 1055, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 ;time = 0
value = S1100,3 ;1

[State 1055, 1]
type = velset
trigger1 = time >= 0
x = 0
y = 0

;--------------------------------------------------------------------------
;Carlos Lose Pose
[Statedef 1116]
type = S
movetype = I
physics = N
anim = 1106
velset = 0,0

[State 170, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S7,0

[State 170, 1]
type = PlaySnd
trigger1 = animelem = 7
value = S1100, 4 ;0

[State 1106, 1]
type = velset
trigger1 = time >= 0
x = 0
y = 0

;---------------------------------------------------------------------------
;リンゴ爆弾

[Statedef 1120]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
anim = 1110
ctrl = 0
sprpriority = 2

[State 1800, ヘルパーを出す]
type = Helper
trigger1 = AnimElem = 2
Persistent = 0
name = "Hot Potato"
stateno = 1121
ID = 1121
pos = 60,-110
postype = p1
keyctrl = 0
ownpal = 1
size.xscale = 0.4 ;1
size.yscale = 0.4 ;1
helpertype = Normal

[State 1800, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 1
value = S4,17 ;6, 4

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2 ;Time = 1
value = 0, 3

[State 1800, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

[Statedef 1121]
type = A
movetype= A
physics = N
velset = 7,17
ctrl = 0
anim = 1002 ;4200
sprpriority = 5

[State 1810, ヒット定義]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SA
animtype  = Light
damage    = 10, 4
priority  = 5
guardflag = MA
pausetime = 0,0
sparkxy = 0,0
;sparkno = 3
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011
hitsound   = s5,4 ;0
guardsound = S6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime  = 18
guard.ctrltime = 18
ground.velocity = -2
guard.velocity = -2
air.velocity = -2,-2
envshake.time = 20
envshake.ampl = 5
envshake.freq = 170
fall = 0
p1stateno = 1124 ;1813

[State 1810]
type = HitOverride
trigger1 = Time = 0
attr = SCA, NA, SA, HA, NP, SP, HP
stateno = 1125 ;1820
time = -1

[State 1810]
type = NotHitBy
trigger1 = Time = 0
value = , AT
time = -1

[State 1810,sift]
type = ChangeState
trigger1 = NumHelper(1121) >= 1
trigger1 = Pos Y >= -6
trigger1 = Vel Y > 0
value = 1122 ;1811

;---------------------------------------------------------------------------
; リンゴ跳ねる
;
[Statedef 1122]
type = A
ctrl = 0
anim = 1002 ;4200
velset = 1,-6
sprpriority = 5

[State 1811, 速度加算]
type = VelAdd
trigger1 = 1
y = .45

[State 1811]
type = HitOverride
trigger1 = Time = 0
attr = SCA, NA, SA, HA, NP, SP, HP
stateno = 1125 ;1820
time = -1

[State 1811]
type = NotHitBy
trigger1 = Time = 0
value = , AT
time = -1

[State 1811, ステート変更]
type = ChangeState
trigger1 = NumHelper(1121) >= 1
trigger1 = Pos Y >= -6
trigger1 = Vel Y > 0
value = 1123 ;1812

;---------------------------------------------------------------------------
; リンゴ静止
;
[Statedef 1123]
type = A
ctrl = 0
anim = 1002 ;4200
velset = 0,0
sprpriority = 5

[State 1812]
type = HitOverride
trigger1 = Time = 0
attr = SCA, NA, SA, HA, NP, SP, HP
stateno = 1125 ;1820
time = -1

[State 1812]
type = NotHitBy
trigger1 = Time = 0
value = , AT
time = -1

[State 1820]
type = Playerpush
trigger1 = time >= 0
value = 1

[State 1820]
type = null ;palfx
trigger1 = Time = 250
time = 50
add = 250,0,250
sinadd = 50,50,0,10
color = 0
invertall = 1

[State 200,PlaySnd Normal]
type = PlaySnd
trigger1 = Time = 250
;trigger1 = var(39) = 0
value = 1120,0
channel = 30 ;0

[State 191, PalFX]
type = PalFX
trigger1 = Time = 250
time = 10 ;50
mul = 256,256,256
sinadd = 0,-200,-200,120

[State 1120, PalFXWiz]
type = PalFX
trigger1 = Time = 260 ;300
time = 90 ;50
add = 0,-200,-200
mul = 256,256,256
sinadd = 40,80,40,10
invertall = 0
color = 0

[State 1812, ステート変更]
type = ChangeState
trigger1 = Time = 350 ;300
value = 1125 ;1820


;---------------------------------------------------------------------------
; リンゴHIT
;
[Statedef 1124]
type = A
ctrl = 0
anim = 1002 ;4200
velset = -1,-8
sprpriority = 5


[State 1811, 速度加算]
type = VelAdd
trigger1 = 1
y = .45

[State 1811]
type = HitOverride
trigger1 = Time = 0
attr = SCA, NA, SA, HA, NP, SP, HP
stateno = 1125 ;1820
time = -1


[State 1811]
type = NotHitBy
trigger1 = Time = 0
value = , AT
time = -1

[State 1811, ステート変更]
type = ChangeState
trigger1 = NumHelper(1121) >= 1
trigger1 = Pos Y >= -6
trigger1 = Vel Y > 0
value = 1123 ;1812

;---------------------------------------------------------------------------
;リンゴ爆発

[Statedef 1125]
type = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 4210

[State 1820]
type = EnvShake
trigger1 = AnimElem = 1
time = 50
freq = 100
ampl = 10

[State 1820, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 1
value = 800, 2

[State 0, StopSnd]
type = StopSnd
trigger1 = Time = 0
channel = 30 ;-1
persistent = 0

[State 1820, ヒット定義]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = up
damage    = 120, 4
affectteam = B
priority  = 5
guardflag = MA
pausetime = 0,15
sparkxy = 0,0
;sparkno = 3
sparkno = s8003+random%3 ;S2005+(random%2)
guard.sparkno = S8011
hitsound   = S5,12 ;s1,4
guardsound = S6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime  = 18
guard.ctrltime = 18
ground.velocity = 0,-13
guard.velocity = -7
air.velocity = 0,-13
envshake.time = 20
envshake.ampl = 5
envshake.freq = 170
palfx.time = 80
palfx.add = 150,0,-100
palfx.sinadd = 50,50,0,10
palfx.color = 0
palfx.invertall = 1
fall = 1
fall.recover = 0

[State 1820, このヘルパーを消す]
type = DestroySelf
trigger1 = AnimElem = 8

; Gun
[Statedef 1130]
type = S
movetype = A
physics = S
poweradd= 72
anim = 1115 ;1000 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1 ;9,=1
value = S1125,0 ;0,60

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3,=1 ;!Var(39) && AnimElem = 11,=1
;trigger2 = Var(39) && AnimElem = 3,= 1
value = S1125,1 ;0,ifelse(Var(39)=1,107,61)
channel = 0

[State 1000, Projectile: Bullet/Burns' head]
type = Projectile
trigger1 = AnimElem = 3 ;!Var(39) && AnimElem = 11
;trigger2 = Var(39) && AnimElem = 12
ProjID = 1116 ;1005
projanim = 1116 ;1005 + Var(39)*10000
projhitanim = -1
projremanim = -1
projcancelanim = -1
projscale = 0.1,0.1 ;1,1
projremove = 1
projremovetime = -1
velocity = 6,0 ;ifelse(Var(39),-2,0)
remvelocity = 0,0
accel = 0,0 ;ifelse(Var(39),0.15,0)
velmul = 1,1
projhits = 1
projmisstime = 0
projpriority = 1
projsprpriority = 3
projedgebound = 40
projstagebound = 40
projheightbound = -240,240
offset = 50,-82 ;0.-75 ;ifelse(Var(39),40,0),0
postype = p1         ;p2,front,back,left,right
projshadow = 0,0,0
supermovetime = 0
pausemovetime = 0
; HitDef
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MA        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 144,36
givepower = 36
affectteam = E          ;B,E,F
animtype = Medium          ;light,medium,hard,back,up,diagup
;air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 63,8
pausetime = 0,11
;guard.pausetime = 0
;sparkno = S2500
;guard.sparkno = S2505
sparkno = s8006+random%3
guard.sparkno = s8011 ;-1
sparkxy = 0,0 ;25,-58
hitsound = S5,2 ;s3,4
guardsound = S6,1 ;S8,1
ground.type = Low      ;Low,Trip,None
;air.type = High
ground.slidetime = 12
;guard.slide = 0
ground.hittime = 16
;guard.hit = 0
;air.hittime = 20
;guard.ctrl  = 0
;guard.dist = 320
;yaccel = 0.5
ground.velocity = -4,0;0,0
;guard.velocity = 0
air.velocity = -4,-5
;airguard.velocity = 0,0
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;down.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;airguard.ctrl = 0
;air.juggle = 0
;mindist = 0,0
;maxdist = 0,0
;snap = 0,0
;sprpriority = 1
;p1sprpriority = 0;(winmugen only)
;p2sprpriority = 0;(winmugen only)
;p1facing = 0
;p1getp2facing = 0
;p2facing = 1
;p1stateno = 0
;p2stateno = 0
;p2getp1state = 1
;forcestand = 0
;fall = 0
;fall.xvelocity = 0
;fall.yvelocity = -4.5
;fall.recover = 1
;fall.recovertime = 4
;fall.damage = 0
;air.fall = 0
;down.velocity = 0,0
;down.hit
;down.bounce = 0
;id = 0
;chainID = -1
;nochainID = -1
;hitonce = 1
;kill = 1
;guard.kill = 1
;fall.kill = 1
;numhits = 1
palfx.time = 8
palfx.mul = 164,32,50
palfx.add = 32,16,50
palfx.color = 100
;envshake.time = 0,0
;envshake.freq = 0
;envshake.ampl = 0
;envshake.phase = 0
;fall.envshake.time = 0,0
;fall.envshake.freq = 0
;fall.envshake.ampl = 0
;fall.envshake.phase = 0
;ignorehitpause =
;persistent =
;(afterimage winmugen only)
afterimage.time = -1
;afterimage.length =
;afterimage.palcolor =
;afterimage.palinvertall =
afterimage.palbright = 30,0,0
afterimage.palcontrast = 70,20,20
;afterimage.palpostbright =0,0,0
afterimage.paladd = -3,-3,-3
afterimage.palmul = .85,.50,.50
;afterimage.timegap =
afterimage.framegap = 2
afterimage.trans = add;none,add,add1,addalpha,sub
;ignorehitpause =
;persistent =

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

; Gun on Knee
[Statedef 1135]
type = S
movetype = A
physics = S
poweradd= 72
anim = 1125 ;1115 ;1000 + Var(39)*10000
ctrl = 0
velset = 0,0
juggle = 15

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2,=1 ;9,=1
value = S1125,0 ;0,60

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4,=1 ;!Var(39) && AnimElem = 11,=1
;trigger2 = Var(39) && AnimElem = 3,= 1
value = S1125,1 ;0,ifelse(Var(39)=1,107,61)
channel = 0

[State 1000, Projectile: Bullet/Burns' head]
type = Projectile
trigger1 = AnimElem = 4 ;3 ;!Var(39) && AnimElem = 11
;trigger2 = Var(39) && AnimElem = 12
ProjID = 1116 ;1005
projanim = 1116 ;1005 + Var(39)*10000
projhitanim = -1
projremanim = -1
projcancelanim = -1
projscale = 0.1,0.1 ;1,1
projremove = 1
projremovetime = -1
velocity = 6,0 ;ifelse(Var(39),-2,0)
remvelocity = 0,0
accel = 0,0 ;ifelse(Var(39),0.15,0)
velmul = 1,1
projhits = 1
projmisstime = 0
projpriority = 1
projsprpriority = 3
projedgebound = 40
projstagebound = 40
projheightbound = -240,240
offset = 50,-72 ;0.-75 ;ifelse(Var(39),40,0),0
postype = p1         ;p2,front,back,left,right
projshadow = 0,0,0
supermovetime = 0
pausemovetime = 0
; HitDef
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MA        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 144,36
givepower = 36
affectteam = E          ;B,E,F
animtype = Medium          ;light,medium,hard,back,up,diagup
;air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 63,8
pausetime = 0,11
;guard.pausetime = 0
;sparkno = S2500
;guard.sparkno = S2505
sparkno = s8003+random%3 ;s8006+random%3
guard.sparkno = s8011 ;-1
sparkxy = 0,0 ;25,-58
hitsound = S5,2 ;s3,4
guardsound = S6,1 ;S8,1
ground.type = Low      ;Low,Trip,None
;air.type = High
ground.slidetime = 12
;guard.slide = 0
ground.hittime = 16
;guard.hit = 0
;air.hittime = 20
;guard.ctrl  = 0
;guard.dist = 320
;yaccel = 0.5
ground.velocity = -4,0;0,0
;guard.velocity = 0
air.velocity = -4,-5
;airguard.velocity = 0,0
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;down.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;airguard.ctrl = 0
;air.juggle = 0
;mindist = 0,0
;maxdist = 0,0
;snap = 0,0
;sprpriority = 1
;p1sprpriority = 0;(winmugen only)
;p2sprpriority = 0;(winmugen only)
;p1facing = 0
;p1getp2facing = 0
;p2facing = 1
;p1stateno = 0
;p2stateno = 0
;p2getp1state = 1
;forcestand = 0
;fall = 0
;fall.xvelocity = 0
;fall.yvelocity = -4.5
;fall.recover = 1
;fall.recovertime = 4
;fall.damage = 0
;air.fall = 0
;down.velocity = 0,0
;down.hit
;down.bounce = 0
;id = 0
;chainID = -1
;nochainID = -1
;hitonce = 1
;kill = 1
;guard.kill = 1
;fall.kill = 1
;numhits = 1
palfx.time = 8
palfx.mul = 164,32,50
palfx.add = 32,16,50
palfx.color = 100
;envshake.time = 0,0
;envshake.freq = 0
;envshake.ampl = 0
;envshake.phase = 0
;fall.envshake.time = 0,0
;fall.envshake.freq = 0
;fall.envshake.ampl = 0
;fall.envshake.phase = 0
;ignorehitpause =
;persistent =
;(afterimage winmugen only)
afterimage.time = -1
;afterimage.length =
;afterimage.palcolor =
;afterimage.palinvertall =
afterimage.palbright = 30,0,0
afterimage.palcontrast = 70,20,20
;afterimage.palpostbright =0,0,0
afterimage.paladd = -3,-3,-3
afterimage.palmul = .85,.50,.50
;afterimage.timegap =
afterimage.framegap = 2
afterimage.trans = add;none,add,add1,addalpha,sub
;ignorehitpause =
;persistent =

[State 200, 4]
type = CtrlSet
trigger1 = palno = 12
trigger1 = Time = 30
value = 1

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


;---------------------------------------------------------------------------
; Teh Stage Trip
[Statedef 1410]
type    = C
movetype= A
physics = N
juggle  = ifelse(var(39) & floor(exp(5*ln(2)) + 0.5) ,1,0)
poweradd= 50
ctrl = 0
anim = 1410
sprpriority = 2
facep2 = 1
velset = 0,0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = anim = 1411
trigger1 = animelemtime(6) < 0
value = S,NT,ST
value2 = C,NT,ST
time = 1
ignorehitpause = 1

[State 0, Width]
type = Width
trigger1 = anim = 1411
trigger1 = animelemtime(5) >= 0
trigger1 = animelemtime(6) < 0
value = 10,0
ignorehitpause = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = anim = 1410
trigger1 = animelemtime(4) > 0
value = 0
ignorehitpause = 1

[State 0, Width]
type = Width
trigger1 = anim = 1410
trigger1 = animelemtime(4) > 0
value = 15,5
ignorehitpause = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1410
trigger1 = animelem = 4
statetype = A
physics = N
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1410
trigger1 = animelem = 4
x = 3.9
y = -4.6

[State 0, VelSet]
type = VelAdd
trigger1 = anim = 1410
trigger1 = animelemtime(4) > 0
y = 0.79

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1410
trigger1 = vel y > 0
trigger1 = vel y + pos y >= 0
value = 1411

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1411
statetype = C
physics = N
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1411
y = 0
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = PosSet
trigger1 = anim = 1411
y = 0
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = VelMul
trigger1 = anim = 1411
trigger1 = animelemtime(6) < 0
x = ifelse(animelemtime(5)>=0,0.91,0.95)
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
x = 0
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1411
value = S4,18 ;19 ;F7,1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1411
value = S8,0 ;F7,1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = anim = 1411
anim = 7003 ;F60
pos = ceil(80 * const(size.xscale)),0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
;pausemovetime = 65535
scale = 1,1
sprpriority = -4
ownpal = 1
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1410
trigger1 = time = 0
x = 32 * const(size.xscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1410
trigger1 = animelem = 4
x = 90 * const(size.xscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1410
trigger1 = animelem = 6 || AnimElem = 7 ;6 ;7 ;6
x = 28 * const(size.xscale)
y = -26 * const(size.yscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1410
trigger1 = animelem = 8 ;7
x = 16 * const(size.xscale)
y = -26 * const(size.yscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1411
trigger1 = animelem = 5 ;3
x = -20 * const(size.xscale)

;[State 0, Turn]
;type = Turn
;trigger1 = anim = 1411
;trigger1 = animelem = 3

[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
x = 24 * const(size.xscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
x = 18 * const(size.xscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
x = 32 * const(size.xscale)

[State Neo-Juggle-System-Flag]
type = VarSet
;trigger1 = !(var(40) & floor(exp(1*ln(2)) + 0.5) )
trigger1 = movehit = [1,2]
trigger1 = numtarget
trigger1 = (target,statetype = A) || (target,statetype = L)
var(39) = var(39) | floor(exp(5*ln(2)) + 0.5)
ignorehitpause = 1
persistent = 0
[State ProRation]
type = VarSet
trigger1 = var(21) = 1
fvar(13) = fvar(13) * 0.8
ignorehitpause = 1

[State 400, 1]
type = PlaySnd
trigger1 = anim = 1410
trigger1 = animelem = 3
value = S0, 3 ;2

[State 400, 2]
type = HitDef
triggerall = anim = 1410
trigger1 = animelem = 6 ;5
trigger2 = animelem = 7 ;6
;trigger3 = animelem = 7
attr = C, NA
damage = 60
animtype  = hard
hitflag = MAF
guardflag = MA ;L
pausetime = 6-var(49),6
sparkno = s8003+random%3
guard.sparkno = s8011 ;-1
sparkxy = -10,ceil(-110 * const(size.yscale) )
hitsound = S5,24 ;6
guardsound = S6,0
ground.type = high
ground.slidetime = ceil(25*ifelse(var(31),1.2,1))
ground.hittime  = ceil(25*ifelse(var(31),1.2,1))
ground.velocity = -11.9
guard.velocity = -11.9
air.velocity = -2,-13.9
air.fall = 1
fall.recovertime = 60
yaccel = .88
ground.cornerpush.veloff = 0
guard.ctrltime = 12

[State 400, 2]
type = HitDef
trigger1 = anim = 1411
attr = C, NA
damage = ifelse(movehit,40,60)
animtype  = hard
hitflag = MAF
guardflag = MA ;L
pausetime = 12-var(49),12
sparkno = s8003+random%3
guard.sparkno = s8011 ;-1
sparkxy = -10,0
hitsound = S5,25 ;7
guardsound = S6,0
ground.type = trip
ground.slidetime = ceil(20*ifelse(var(31),1.2,1))
ground.hittime  = ceil(20*ifelse(var(31),1.2,1))
ground.velocity = 4,-13.9
air.velocity = 4,-13.9
guard.velocity = -10
fall = 1
fall.recovertime = 60
yaccel = .88
ground.cornerpush.veloff = 0
guard.ctrltime = 13
persistent = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1411
trigger1 = animelem = 2
movetype = I
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
statetype = S

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

;---------------------------------------------------------------------------
; Teh Stage Trip EX
[Statedef 1412]
type    = C
movetype= A
physics = N
juggle  = ifelse(var(39) & floor(exp(5*ln(2)) + 0.5) ,1,0)
poweradd= -500 ;50
ctrl = 0
anim = 1410
sprpriority = 2
facep2 = 1
velset = 0,0

[State 65002, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S7500,0

[State 65002, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 22
add = 29,29,0
mul = 256,256,256
sinadd = 58,58,0,3

[State 65000, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 22
length = 10
paladd = 50,50,0
framegap = 2
trans = add

[State 1050, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 7500
pos = 0,-90 ;10,-105 ;50 ;100
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = anim = 1411
trigger1 = animelemtime(6) < 0
value = S,NT,ST
value2 = C,NT,ST
time = 1
ignorehitpause = 1

[State 0, Width]
type = Width
trigger1 = anim = 1411
trigger1 = animelemtime(5) >= 0
trigger1 = animelemtime(6) < 0
value = 11,0 ;10,0
ignorehitpause = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = anim = 1410
trigger1 = animelemtime(4) > 0
value = 0
ignorehitpause = 1

[State 0, Width]
type = Width
trigger1 = anim = 1410
trigger1 = animelemtime(4) > 0
value = 16,6 ;15,5
ignorehitpause = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1410
trigger1 = animelem = 4
statetype = A
physics = N
ignorehitpause = 1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1410
trigger1 = animelem = 4
x = 4.9 ;3.9
y = -5.6 ;-4.6

[State 0, VelSet]
type = VelAdd
trigger1 = anim = 1410
trigger1 = animelemtime(4) > 0
y = 0.89 ;0.79

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1410
trigger1 = vel y > 0
trigger1 = vel y + pos y >= 0
value = 1411

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1411
statetype = C
physics = N
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1411
y = 0
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = PosSet
trigger1 = anim = 1411
y = 0
ignorehitpause = 1
persistent = 0

[State 0, VelSet]
type = VelMul
trigger1 = anim = 1411
trigger1 = animelemtime(6) < 0
x = ifelse(animelemtime(5)>=0,0.91,0.95)
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
x = 0
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1411
value = S4,18 ;19 ;F7,1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1411
value = S8,3 ;0 ;F7,1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = anim = 1411
anim = 7003 ;F60
pos = ceil(80 * const(size.xscale)),0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
;pausemovetime = 65535
scale = 1,1
sprpriority = -4
ownpal = 1
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1410
trigger1 = time = 0
x = 33 * const(size.xscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1410
trigger1 = animelem = 4
x = 91 * const(size.xscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1410
trigger1 = animelem = 5 || animelem = 6 || AnimElem = 7 ;6 ;7 ;6
x = 29 * const(size.xscale)
y = -27 * const(size.yscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1410
trigger1 = animelem = 8 ;7
x = 17 * const(size.xscale)
y = -27 * const(size.yscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1411
trigger1 = animelem = 5 ;3
x = -21 * const(size.xscale)

;[State 0, Turn]
;type = Turn
;trigger1 = anim = 1411
;trigger1 = animelem = 3

[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
x = 25 * const(size.xscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
x = 19 * const(size.xscale)
[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
x = 33 * const(size.xscale)

[State Neo-Juggle-System-Flag]
type = VarSet
;trigger1 = !(var(40) & floor(exp(1*ln(2)) + 0.5) )
trigger1 = movehit = [1,2]
trigger1 = numtarget
trigger1 = (target,statetype = A) || (target,statetype = L)
var(39) = var(39) | floor(exp(5*ln(2)) + 0.5)
ignorehitpause = 1
persistent = 0
[State ProRation]
type = VarSet
trigger1 = var(21) = 1
fvar(13) = fvar(13) * 0.8
ignorehitpause = 1

[State 400, 1]
type = PlaySnd
trigger1 = anim = 1410
trigger1 = animelem = 3
value = S0, 3 ;2

[State 400, 2]
type = HitDef
triggerall = anim = 1410
trigger1 = animelem = 6 ;5
trigger2 = animelem = 7 ;6
trigger3 = animelem = 8 ;7
attr = C, NA
damage = 60
animtype  = hard
hitflag = MAF
guardflag = MA ;L
pausetime = 6-var(49),6
sparkno = s8003+random%3
guard.sparkno = s8011 ;-1
sparkxy = -10,ceil(-110 * const(size.yscale) )
hitsound = S5,24 ;6
guardsound = S6,0
ground.type = high
ground.slidetime = ceil(25*ifelse(var(31),1.2,1))
ground.hittime  = ceil(25*ifelse(var(31),1.2,1))
ground.velocity = -11.9
guard.velocity = -11.9
air.velocity = -2,-13.9
air.fall = 1
fall.recovertime = 60
yaccel = .88
ground.cornerpush.veloff = 0
guard.ctrltime = 12

[State 400, 2]
type = HitDef
trigger1 = anim = 1411
attr = C, NA
damage = ifelse(movehit,40,60)
animtype  = hard
hitflag = MAF
guardflag = MA ;L
pausetime = 12-var(49),12
sparkno = s8003+random%3
guard.sparkno = s8011 ;-1
sparkxy = -10,0
hitsound = S5,25 ;7
guardsound = S6,0
ground.type = trip
ground.slidetime = ceil(20*ifelse(var(31),1.2,1))
ground.hittime  = ceil(20*ifelse(var(31),1.2,1))
ground.velocity = 4,-13.9
air.velocity = 4,-13.9
guard.velocity = -10
fall = 1
fall.recovertime = 60
yaccel = .88
ground.cornerpush.veloff = 0
guard.ctrltime = 13
persistent = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1411
trigger1 = animelem = 2
movetype = I
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1411
trigger1 = animelem = 6 ;4
statetype = S

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

;-------------------------------------------------------------------------------
;Run To Choke Close
[Statedef 1500]
type = S
movetype = A
physics = N
poweradd= 72
anim = 1400 ;+ Var(39)*10000
ctrl = 0
velset = 0, 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1400, 0 ;0,ifelse(Var(39)=1,24,16)
channel = 0

[State 200,Anim]
type = ChangeAnim
trigger1 = var(40)
trigger1 = Time = 0
value = 14001

[State 100, Explod]
type = Explod
trigger1 = AnimElem = 2 ;1
trigger2 = AnimElem = 3 ;2
trigger3 = AnimElem = 4 ;3
trigger4 = animelem = 5 ;4
anim = 8500
ID = 8500
pos = -5,0
postype = p1
bindtime = 1
removetime = -2
scale = 1.1,1.1
sprpriority = 3
ownpal = 1

[State 100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2 ;time = 0
value = S100,0

[State 1501, VelSet]
type = VelSet
trigger1 = AnimElem = 2,=1
x = 6.5

[State 1501, NoWalk]
type = AssertSpecial
trigger1 = AnimElem = 2,>=1
flag = NoWalk

[State 1501,ChangeState]
type = ChangeState
trigger1 = AnimElem = 2,> 1
trigger1 = P2bodydist X < 18;30
trigger1 = P2bodydist Y >= -120
value = 1502

[State 1501, End]
type = ChangeState
trigger1 = Time >= 29
value = 1501

;-------------------------------------------------------------------------------
;Run To Choke Far
[Statedef 1510]
type = S
movetype = A
physics = N
poweradd= 72
anim = 1400 ;+ Var(39)*10000
ctrl = 0
velset = 0, 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1400, 0 ;0,ifelse(Var(39)=1,24,16)
channel = 0

[State 200,Anim]
type = VelAdd
trigger1 = time = 0 && var(40)=1
x= 9

[State 100, Explod]
type = Explod
trigger1 = AnimElem = 2 ;1
trigger2 = AnimElem = 3 ;2
trigger3 = AnimElem = 4 ;3
trigger4 = animelem = 5 ;4
anim = 8500
ID = 8500
pos = -5,0
postype = p1
bindtime = 1
removetime = -2
scale = 1.1,1.1
sprpriority = 3
ownpal = 1

[State 100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2 ;time = 0
value = S100,0

[State 1501, VelSet]
type = VelSet
trigger1 = AnimElem = 2,=1
x = 6.5

[State 1501, NoWalk]
type = AssertSpecial
trigger1 = AnimElem = 2,>=1
flag = NoWalk

[State 1501,ChangeState]
type = ChangeState
trigger1 = AnimElem = 2,> 1
trigger1 = P2bodydist X < 18;30
trigger1 = P2bodydist Y >= -120
value = 1502

[State 1501, End]
type = ChangeState
trigger1 = Time >= 50
value = 1501

;---------------
;Run To Choke End
[Statedef 1501]
type = S
movetype = I
physics = N
anim = 1401 ;+ Var(39)*10000
velset = 0, 0

[State 1502, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------
;Run To Choke Grab Attempt
[Statedef 1502]
type = S
movetype = A
physics = N
anim = 1402 ;+ Var(39)*10000
ctrl = 0
velset = 0, 0
juggle = 15

[State 1505, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1505, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7 ;4
movetype = I

[State 1505, HitDef]
type = HitDef
trigger1 = Time = 0 ;AnimElem = 3
attr = S, SA
animtype  = Hard
damage    = 28,4
getpower = 144,36
givepower = 36
guardflag = M
hitflag = MAF
priority = 5, Miss
pausetime = 0,0
guard.pausetime = 5,0
sparkxy = 0,-60
sparkno = -1 ;S2000
guard.sparkno = S8011 ;S2506;S2015
hitsound   = S1,1 ;S5,0;s3,4
guardsound = s6,0 ;S8,1;s4,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = 0
guard.velocity = -5
air.hittime = 13
air.velocity = -4,-4
yaccel = .4
p1stateno = 1504
p2stateno = 1506
p2facing = 1
p2getp1state = 1
hitonce = 1
Kill = 0

[State 1505, End]
type = ChangeState
trigger1 = MoveGuarded
value = 1503
ignorehitpause = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 1505, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------
;Run To Choke Grab Attempt 2
[Statedef 1503]
type = S
movetype = A
physics = N
anim = 1403 ;+ Var(39)*10000
ctrl = 0
velset = 0, 0
juggle = 15

[State 200,Anim]
type = ChangeAnim
trigger1 = var(40)
trigger1 = Time = 0
value = 14031

[State 1505, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1505, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 5 ;4
movetype = I

[State 1505, HitDef]
type = HitDef
trigger1 = AnimElem = 4 ;3
attr = S, SA
animtype  = Hard
damage    = 28,4
getpower = 144,36
givepower = 36
guardflag = M
hitflag = MAF
priority = 5, Miss
pausetime = 0,0
guard.pausetime = 5,0
sparkxy = 0,-60
sparkno = -1;S2000
guard.sparkno = S8011 ;S2506;S2015
hitsound   = S1,1 ;S5,0
guardsound = s6,0 ;S8,1;s4,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -5
guard.velocity = -5
air.hittime = 13
air.velocity = -3,-4
yaccel = .4
p1stateno = 1505
p2stateno = 1506
p2facing = 1
p2getp1state = 1
hitonce = 1
Kill = 0

[State 1505, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------
;Run To Grab Successful Part 1
[Statedef 1504]
type = S
movetype = A
physics = N
anim = 1404 ;+ Var(39)*10000
velset = 0, 0
poweradd = 0

[State 1506, TargetState]
type = TargetState
trigger1 = Time = 0
value = 1507

[State 1507, Width]
type = Width
trigger1 = AnimElem = 1 && FrontEdgeDist < 80
edge = 80,0

[State 1507, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1507, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1507, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = 50,0

[State 1507, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3
pos = 75,-90

[State 200,PlaySnd]
type = null;PlaySnd
trigger1 = AnimElem = 3
value = 5,0

[State 1507, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 1505

;---------------
;Run To Choke Successful Part 2
[Statedef 1505]
type = S
movetype = A
physics = N
anim = 1405 ;+ Var(39)*10000
velset = 0, 0
poweradd = 0

[State 1405, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S8,0 ;5,1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1400, 1+random%2 ;0,ifelse(Var(39)=1,110,17)

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 9,=0 ;&& !Var(39)
;trigger2 = AnimElem = 3,=1 ;&& Var(39)
;trigger3 = AnimElem = 5,=1 ;&& Var(39)
value = S5,26 ;S1,12

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 9,=0 ;&& !Var(39)
;trigger2 = AnimElem = 3,=1 && Var(39)
;trigger3 = AnimElem = 5,=1 && Var(39)
value = S5,7 ;5 ;ifelse(Var(39),7,9),2;S3,4

[State 1506, TargetState]
type = TargetState
trigger1 = Time = 0
value = 1508

[State 1507, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = 80,-25;80,-50

[State 1507, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = 75,-5;75,-10

[State 1507, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3
pos = 75,-5

[State 1507, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3,=5
pos = 75,-5

[State 1507, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4,=0;3,=12
pos = 75,-5

[State 1507, EnvShake] 
type = EnvShake
trigger1 = AnimElem = 4,=3;3,=12
time = 15

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 9,=0 ;&& !Var(39)
;trigger2 = AnimElem = 3,=1 && Var(39)
;trigger3 = AnimElem = 5,=1 && Var(39)
anim = 8003+random%3 ;2502
ID = 2502
pos = 55,-38 ;60,77 ;ifelse(!Var(39),60,77),ifelse(!Var(39),-40,-15)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermovetime = 9999999
pausemovetime = 9999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 4,=2 ;&& !Var(39)
;trigger2 = AnimElem = 3,=1 && Var(39)
;trigger3 = AnimElem = 5,=1 && Var(39) ;3,=12
anim = 7003 ;2060
ID = 2060
pos = 40,0
postype = p2  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermovetime = 9999999
pausemovetime = 9999999
scale = 1,1
sprpriority = -3;5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 1507, TargetState]
type = TargetState
trigger1 = AnimElem = 4,=3 ;&& !Var(39)
;trigger2 = AnimElem = 5,=8 && Var(39)
value = 1509

[State 1507, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 4,=3 ;&& !Var(39)
;trigger2 = AnimElem = 5,=3 && Var(39)
value = -112

[State 3030,HitAdd]
type = HitAdd
trigger1 = AnimElem = 4,=3 ;&& !Var(39)
;trigger2 = AnimElem = 5,=3 && Var(39)
value = 1

[State 1507, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
;Run To Choke Victum State Part 1
[Statedef 1506]
type = A
movetype = H
physics = N
ctrl = 0

[State 1505, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1506, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1509, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1506, ChangeAnim2]
type = ChangeAnim
trigger1 = Time = 0
value = 5000

[State 0, 1]
type = CtrlSet
trigger1 = Time = 100
value = 1

[State 5110, 11]
type = SelfState
trigger1 = Time >= 2
value = 5210

;---------------
;Run To Choke Victum State Part 2
[Statedef 1507]
type = A
movetype = H
physics = N
ctrl = 0

[State 1506, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1506, screenbound]
type = screenbound
Trigger1 = 1
value = 1
movecamera = 1,0

[State 1506, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 1406

[State 5110, 11]
type = SelfState
trigger1 = Time >= 15
value = 5210

;---------------
;Run To Choke Victum State Part 3
[Statedef 1508]
type = A
movetype = H
physics = N
ctrl = 0

[State 1506, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1506, screenbound]
type = screenbound
Trigger1 = 1
value = 1
movecamera = 1,0

[State 1506, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 1407

[State 5110, 11]
type = SelfState
trigger1 = Time >= 45
value = 5210

;---------------
;Run To Choke Victum State Part 4
[Statedef 1509]
type = A
movetype = H
physics = N
velset = -5,-4.5
ctrl = 0

[State 1509, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1506, ChangeAnim2]
type = ChangeAnim
trigger1 = Time = 0
value = 5030
persistent = 0

[State 1506, ChangeAnim2]
type = ChangeAnim
trigger1 = anim = 5030 && AnimTime = 0
value = 5050

[State 1509, Palfx]
type = null;Palfx
trigger1 = Time = 0
time = 20
add = 39,0,78
mul = 110,0,220
color = 100

[State 1509, veladd]
type = veladd
trigger1 = 1
y = .45

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

[State 1509, SelfState]
type = SelfState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5100


;---------------------------------------------------------------------
; 緊急回避動作
[Statedef 4000]
type = S
movetype = I
physics = N
ctrl = 0
anim = 4000 ;+ Var(39)*10000
velset = 4.55, 0

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 4, 10 ;5000, 25 ;0,ifelse(Var(39)=1,103,5)-------de lado a lado
channel = 0

[State 4050,0]
type = NotHitBy
trigger1 = AnimElem = 13,< 0
value = SCA

[State 4050,1]
type = HitBy
trigger1 = 1
value = SC, NT, ST, HT

[State 4050,2]
type = PlayerPush
trigger1 = AnimElem = 13,< 0
value = 0

[State 4050,4]
type = VelSet
trigger1 = AnimElem = 13,=0
x = 0

[State 4050, 6]
type = AfterImage
trigger1 = AnimElem = 2
time = 18
length = 10
framegap = 6 ;3
trans = add1
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1

[State 4050,8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
