[Statedef 2900];ピースアーマー
movetype= I
sprpriority = 0
movehitpersist = 1

[State ]
type = varadd
triggerall = Ishelper
triggerall = GetHitVar(damage)=[(-15+parent,var(11))*500,(15-parent,var(11))*500]
triggerall = root,Palno=1||root,Palno=2||root,Palno=3||root,Palno=4
triggerall = parent,var(9)<1
trigger1 = parent,stateno!=2900
trigger1 = helper(1),stateno!=2900||ishelper(1)
trigger1 = helper(2),stateno!=2900||ishelper(2)
trigger1 = helper(3),stateno!=2900||ishelper(3)
trigger1 = helper(4),stateno!=2900||ishelper(4)
trigger1 = helper(5),stateno!=2900||ishelper(5)
trigger1 = helper(6),stateno!=2900||ishelper(6)
trigger1 = helper(7),stateno!=2900||ishelper(7)
trigger1 = helper(8),stateno!=2900||ishelper(8)
trigger1 = helper(9),stateno!=2900||ishelper(9)
trigger1 = helper(10),stateno!=2900||ishelper(10)
trigger1 = helper(11),stateno!=2900||ishelper(11)
trigger1 = helper(12),stateno!=2900||ishelper(12)
trigger1 = helper(13),stateno!=2900||ishelper(13)
trigger1 = helper(14),stateno!=2900||ishelper(14)
var(9) = GetHitVar(damage)/(1+parent,var(10)*0.1)
ignorehitpause=1
[State ]
type = varadd
triggerall = Ishelper
triggerall = GetHitVar(damage)=[(-15+parent,var(11))*500,(15-parent,var(11))*500]
triggerall = root,Palno=5||root,Palno=6||root,Palno=7||root,Palno=8
triggerall = parent,var(9)<1
trigger1 = parent,stateno!=2900
trigger1 = helper(1),stateno!=2900||ishelper(1)
trigger1 = helper(2),stateno!=2900||ishelper(2)
trigger1 = helper(3),stateno!=2900||ishelper(3)
trigger1 = helper(4),stateno!=2900||ishelper(4)
trigger1 = helper(5),stateno!=2900||ishelper(5)
trigger1 = helper(6),stateno!=2900||ishelper(6)
trigger1 = helper(7),stateno!=2900||ishelper(7)
trigger1 = helper(8),stateno!=2900||ishelper(8)
trigger1 = helper(9),stateno!=2900||ishelper(9)
trigger1 = helper(10),stateno!=2900||ishelper(10)
trigger1 = helper(11),stateno!=2900||ishelper(11)
trigger1 = helper(12),stateno!=2900||ishelper(12)
trigger1 = helper(13),stateno!=2900||ishelper(13)
trigger1 = helper(14),stateno!=2900||ishelper(14)
var(9) = (GetHitVar(damage)*0.9)/(1+parent,var(10)*0.1)
ignorehitpause=1
[State ]
type = varadd
triggerall = Ishelper
triggerall = GetHitVar(damage)=[(-15+parent,var(11))*500,(15-parent,var(11))*500]
triggerall = root,Palno=9||root,Palno=10||root,Palno=11||root,Palno=12
triggerall = parent,var(9)<1
trigger1 = parent,stateno!=2900
trigger1 = helper(1),stateno!=2900||ishelper(1)
trigger1 = helper(2),stateno!=2900||ishelper(2)
trigger1 = helper(3),stateno!=2900||ishelper(3)
trigger1 = helper(4),stateno!=2900||ishelper(4)
trigger1 = helper(5),stateno!=2900||ishelper(5)
trigger1 = helper(6),stateno!=2900||ishelper(6)
trigger1 = helper(7),stateno!=2900||ishelper(7)
trigger1 = helper(8),stateno!=2900||ishelper(8)
trigger1 = helper(9),stateno!=2900||ishelper(9)
trigger1 = helper(10),stateno!=2900||ishelper(10)
trigger1 = helper(11),stateno!=2900||ishelper(11)
trigger1 = helper(12),stateno!=2900||ishelper(12)
trigger1 = helper(13),stateno!=2900||ishelper(13)
trigger1 = helper(14),stateno!=2900||ishelper(14)
var(9) = (GetHitVar(damage)*0.8)/(1+parent,var(10)*0.1)
ignorehitpause=1

[State ]
type = varset
triggerall = Ishelper
triggerall = GetHitVar(damage)!=[(-15+parent,var(11))*500,(15-parent,var(11))*500]
trigger1 = 1
var(9) = 0
ignorehitpause=1

[State ]
type = lifeadd
triggerall = !Ishelper
triggerall = GetHitVar(damage)=[(-15+var(11))*500,(15-var(11))*500]
triggerall = Palno=1||Palno=2||Palno=3||Palno=4
triggerall = var(9)<1
trigger1 = helper(1),stateno!=2900
trigger1 = helper(2),stateno!=2900
trigger1 = helper(3),stateno!=2900
trigger1 = helper(4),stateno!=2900
trigger1 = helper(5),stateno!=2900
trigger1 = helper(6),stateno!=2900
trigger1 = helper(7),stateno!=2900
trigger1 = helper(8),stateno!=2900
trigger1 = helper(9),stateno!=2900
trigger1 = helper(10),stateno!=2900
trigger1 = helper(11),stateno!=2900
trigger1 = helper(12),stateno!=2900
trigger1 = helper(13),stateno!=2900
trigger1 = helper(14),stateno!=2900
value = -GetHitVar(damage)/(1+var(10)*0.1)
ignorehitpause=1
[State ]
type = lifeadd
triggerall = !Ishelper
triggerall = GetHitVar(damage)=[(-15+var(11))*500,(15-var(11))*500]
triggerall = Palno=5||Palno=6||Palno=7||Palno=8
triggerall = var(9)<1
trigger1 = helper(1),stateno!=2900
trigger1 = helper(2),stateno!=2900
trigger1 = helper(3),stateno!=2900
trigger1 = helper(4),stateno!=2900
trigger1 = helper(5),stateno!=2900
trigger1 = helper(6),stateno!=2900
trigger1 = helper(7),stateno!=2900
trigger1 = helper(8),stateno!=2900
trigger1 = helper(9),stateno!=2900
trigger1 = helper(10),stateno!=2900
trigger1 = helper(11),stateno!=2900
trigger1 = helper(12),stateno!=2900
trigger1 = helper(13),stateno!=2900
trigger1 = helper(14),stateno!=2900
value = -(GetHitVar(damage)*0.9)/(1+var(10)*0.1)
ignorehitpause=1
[State ]
type = lifeadd
triggerall = !Ishelper
triggerall = GetHitVar(damage)=[(-15+var(11))*500,(15-var(11))*500]
triggerall = Palno=9||Palno=10||Palno=11||Palno=12
triggerall = var(9)<1
trigger1 = helper(1),stateno!=2900
trigger1 = helper(2),stateno!=2900
trigger1 = helper(3),stateno!=2900
trigger1 = helper(4),stateno!=2900
trigger1 = helper(5),stateno!=2900
trigger1 = helper(6),stateno!=2900
trigger1 = helper(7),stateno!=2900
trigger1 = helper(8),stateno!=2900
trigger1 = helper(9),stateno!=2900
trigger1 = helper(10),stateno!=2900
trigger1 = helper(11),stateno!=2900
trigger1 = helper(12),stateno!=2900
trigger1 = helper(13),stateno!=2900
trigger1 = helper(14),stateno!=2900
value = -(GetHitVar(damage)*0.8)/(1+var(10)*0.1)
ignorehitpause=1

[State ]
type = lifeset
triggerall = !Ishelper
triggerall = GetHitVar(damage)!=[(-15+parent,var(11))*500,(15-parent,var(11))*500]
trigger1 = 1
value = lifemax
ignorehitpause=1

[State ]
type = NotHitBy
triggerall = Palno=1||Palno=2||Palno=3||Palno=4
trigger1 = !Ishelper
value = SCA,AA,AT,AP
time = var(12)
[State ]
type = NotHitBy
triggerall = root,Palno=1||root,Palno=2||root,Palno=3||root,Palno=4
trigger1 = Ishelper
value = SCA,AA,AT,AP
time = parent,var(12)
[State ]
type = NotHitBy
triggerall = Palno=5||Palno=6||Palno=7||Palno=8
trigger1 = !Ishelper
value = SCA,AA,AT,AP
time = var(12)*2
[State ]
type = NotHitBy
triggerall = root,Palno=5||root,Palno=6||root,Palno=7||root,Palno=8
trigger1 = Ishelper
value = SCA,AA,AT,AP
time = parent,var(12)*2
[State ]
type = NotHitBy
triggerall = Palno=9||Palno=10||Palno=11||Palno=12
trigger1 = !Ishelper
value = SCA,AA,AT,AP
time = var(12)*3
[State ]
type = NotHitBy
triggerall = root,Palno=9||root,Palno=10||root,Palno=11||root,Palno=12
trigger1 = Ishelper
value = SCA,AA,AT,AP
time = parent,var(12)*3

[State ]
type = Changestate
trigger1 = Ishelper
trigger1 = var(9)>500
trigger1 = var(10)=0
value = 2903
ignorehitpause=1
[State ]
type = Changestate
trigger1 = !Ishelper
trigger1 = life<1
value = 2902
ignorehitpause=1

[State ]
type = Changestate
trigger1 = 1
value = var(1)
ignorehitpause=1

[Statedef 2901];ピース誕生
movetype= I
sprpriority = 0

[State ]
type = VarSet
trigger1 = Ishelper
fvar(0) = -parentdist x*facing
ignorehitpause=1
[State ]
type = VarSet
trigger1 = Ishelper
fvar(1) = -parentdist y+parent,pos y
ignorehitpause=1
[State ]
type = Changestate
trigger1 = 1
value = 5150
ignorehitpause=1

[Statedef 2902];キング死亡
movetype= I
sprpriority = 0
anim = 5700
movehitpersist = 1

[State ];摩擦
type = Veladd
trigger1 = time=0
x = GetHitVar(xvel)*0.9
y = GetHitVar(yvel)*0.9
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = time=1
value = 6, 0
freqmul = 0.7
volume=100

[State ]
type = varset
trigger1 = fvar(2)=0
trigger1 = statetype=S
fvar(2) = 1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = time<52
time = 1
add = 0,0,0
mul = 256-time*2,256-time*2,256-time*2
sinadd = 256,256,256,10
invertall = 0
color = 256-time*5
ignorehitpause=1
[state -2]
type = AngleDraw
trigger1 = 1
value = fvar(2)
ignorehitpause=1
[State ]
type = PalFX
trigger1 = time>=52
time = 1
add = 0,0,0
mul = 152,152,152
sinadd = 256,256,256,10
invertall = 0
color = 0
ignorehitpause=1

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarAdd
triggerall = !Ishelper
trigger1 = HitPauseTime = 0
trigger1 = var(4)=0
trigger1 = var(4):=1
fv = 0
value = vel x*facing

[State ]
type = varadd
trigger1 = fvar(2)<80
fvar(2) = fvar(2)*0.1
ignorehitpause=1

[State ]
type = varset
trigger1 = fvar(2)>80
fvar(2) = 80
ignorehitpause=1

[State ]
type = StateTypeSet
trigger1 = pos y <0
statetype = A
movetype = I
physics = N
ignorehitpause=1

[State ]
type = StateTypeSet
trigger1 = pos y >=0
statetype = S
movetype = I
physics = N
ignorehitpause=1

[State ]
type = Gravity
trigger1 = statetype=A
ignorehitpause=1

[State -2]
type = EnvShake
trigger1 = fvar(2)=80
time = vel Y+5
freq = 90
ampl = vel Y*0.1+2
phase = 0
ignorehitpause = 1

[State -2]
type = PlaySnd
trigger1 = fvar(2)=80
value = S40, 0
;channel = 10
freqmul = (1-1000/((vel Y+1)*1000))+0.5

[State ]
type = Velset
trigger1 = pos y >=0
y = 0
[State ]
type = posset
trigger1 = pos y >=0
y = 0

[State ]
type = Velset
trigger1 = fvar(2) = 80
y = -2

[State ]
type = Changestate
trigger1 = fvar(2) = 80
value = 5150
ignorehitpause=1


[Statedef 2903];ピース死亡
movetype= I
sprpriority = var(4)
anim = 2300
movehitpersist = 1

[State ]
type = VarSet
trigger1 = var(1)!=5150
var(1) = 5150
ignorehitpause=1

[State ]
type = ChangeAnim
trigger1 = Anim != 2300
value = 2300
ignorehitpause=1

[State ]
type = VarSet
trigger1 = 1
var(10) = 1
ignorehitpause=1

[State ];摩擦
type = Veladd
trigger1 = time=0
x = GetHitVar(xvel)*0.9
y = GetHitVar(yvel)*0.9-2
ignorehitpause=1

[State ]
type = varset
trigger1 = fvar(2)=0
fvar(2) = -GetHitVar(xvel)-0.5
ignorehitpause=1

[state -2]
type = AngleDraw
trigger1 = 1
value = fvar(2)
ignorehitpause=1
[State ]
type = PalFX
trigger1 = 1
time = 1
add = 0,0,0
mul = 256,256,256
sinadd = 256,256,256,10
invertall = 0
color = 0
ignorehitpause=1

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1

[State ]
type = varadd
trigger1 = 1
fvar(2) = fvar(2)/time
ignorehitpause=1

[State ];摩擦
type = Veladd
trigger1 = statetype=A
y = 0.3
ignorehitpause=1

[State ]
type = StateTypeSet
trigger1 = pos y <-17
statetype = A
movetype = I
physics = N
ignorehitpause=1

[State ]
type = StateTypeSet
trigger1 = pos y >=-17
statetype = S
movetype = I
physics = N
ignorehitpause=1

[State -2]
type = EnvShake
trigger1 = pos y >=-17
time = vel Y+5
freq = 90
ampl = vel Y*0.1+2
phase = 0
ignorehitpause = 1

[State -2]
type = PlaySnd
trigger1 = pos y >=-17
value = S40, 0
;channel = 10
freqmul = (1-1000/((vel Y+1)*1000))+0.5

[State ]
type = Velset
trigger1 = pos y >=-17
y = 0
[State ]
type = posset
trigger1 = pos y >=-17
y = -17

[State ]
type = VarSet
trigger1 = Ishelper
trigger1 = parentdist x*facing <0
trigger1 = pos y >=-17
fvar(0) = Ceil(parent,fvar(0)-parentdist x*facing)
ignorehitpause=1
[State ]
type = VarSet
trigger1 = Ishelper
trigger1 = parentdist x*facing >=0
trigger1 = pos y >=-17
fvar(0) = floor(parent,fvar(0)-parentdist x*facing)
ignorehitpause=1
[State ]
type = VarSet
trigger1 = Ishelper
trigger1 = pos y >=-17
fvar(1) = floor(-parentdist y+parent,pos y)
ignorehitpause=1

[state -2]
type = AngleDraw
trigger1 = 1
value = fvar(2)
ignorehitpause=1

[State -2]
type = EnvShake
trigger1 = pos y = -17
time = vel Y+5
freq = 90
ampl = vel Y*0.1+2
phase = 0
ignorehitpause = 1

[State -2]
type = PlaySnd
trigger1 = pos y = -17
value = S40, 0
;channel = 10
freqmul = (1-1000/((vel Y+1)*1000))+0.5
volume=100

[State ]
type = Changestate
trigger1 = pos y = -17
value = 5150
ignorehitpause=1


;---------------------------------------------------------------------------
;待ち時間
[Statedef 2001]
type    = S
movetype= I
physics = N
juggle  = 1
velset = 0,0
movehitpersist = 1
ctrl = 0

[State ]
type = selfstate
trigger1 = Ishelper
trigger1 = var(9)>500
trigger1 = var(10)=0
value = 2903
ignorehitpause=1

[State ]
type = VarSet
trigger1 = Ishelper
trigger1 = parentdist x*facing <0
fvar(0) = Ceil(parent,fvar(0)-parentdist x*facing)
ignorehitpause=1
[State ]
type = VarSet
trigger1 = Ishelper
trigger1 = parentdist x*facing >=0
fvar(0) = floor(parent,fvar(0)-parentdist x*facing)
ignorehitpause=1
[State ]
type = VarSet
trigger1 = Ishelper
fvar(1) = floor(-parentdist y+parent,pos y)
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != [2000,2015]
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != [2000,2015]
ignorehitpause=1
[State ]
type = ChangeAnim
triggerall = Anim != 2000
triggerall = var(6)=0||var(6)=4
trigger1 = Ishelper(1)
trigger2 = Ishelper(2)
trigger3 = Ishelper(3)
trigger4 = Ishelper(4)
trigger5 = Ishelper(5)
trigger6 = Ishelper(6)
trigger7 = Ishelper(7)
trigger8 = Ishelper(8)
value = 2000
ignorehitpause=1
[State ]
type = ChangeAnim
triggerall = Anim != 2005
trigger1 = Ishelper(9)
trigger2 = Ishelper(10)
trigger3 = var(6)=1
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
value = 2005
ignorehitpause=1
[State ]
type = ChangeAnim
triggerall = Anim != 2010
trigger1 = Ishelper(11)
trigger2 = Ishelper(12)
trigger3 = var(6)=2
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
value = 2010
ignorehitpause=1
[State ]
type = ChangeAnim
triggerall = Anim != 2015
trigger1 = Ishelper(13)
trigger2 = Ishelper(14)
trigger3 = var(6)=3
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
value = 2015
ignorehitpause=1


[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2001
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = VarSet
trigger1 = var(3)>=51
var(1) = 5150
ignorehitpause=1
[State 200, 7]
type = ChangeState
trigger1 = var(3)>=51
value = 5150
ctrl = 0

[State ]
type = PalFX
trigger1 = Ishelper
time = 1
add = 0,0,0
mul = 256,256,256
sinadd = 256,256,256,10
invertall = 0
color = 256-var(3)*5
ignorehitpause=1

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;グライディング
[Statedef 2200]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
movehitpersist = 1
ctrl = 0
[State ]
type = PalFX
trigger1 = Anim != 2200
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2200
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2200
trigger1 = p2dist x<0
var(0) = 1
ignorehitpause=1

[State ]
type = Turn
triggerall = var(0)=1
trigger1 = Anim != 2200

[State ]
type = Varset
trigger1 = Anim != 2200
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2200
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2200
value = 2200
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 101, 2
freqmul = 1.2
volume=100

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2200
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=30
value = 2201
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;グライディング
[Statedef 2201]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
movehitpersist = 1
ctrl = 0

[State ]
type = Varset
trigger1 = Anim != 2201
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = var(3)%6=0
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2201
value = 2201
ignorehitpause=1

[State ]
type = Explod
trigger1 = var(3)%6=0
anim = 7000
ID = 7000
pos = 36, 0
postype = p1
facing = 0
vfacing = 0
bindtime = 1
vel = 4, 0
accel = -0.2, 0
random = 0, 30
removetime = -2
supermovetime = 0
pausemovetime = 0
scale = 0.5, 0.5
sprpriority = var(4)+1
ontop = 0
shadow = 0, 0, 0
ownpal = 1
removeongethit = 0


[State 200, 1]
type = HitDef
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 20, 5                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6000                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 3                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;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
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 0
air.fall = 0
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)%6=1
value = 200, 0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2201
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = Turn
triggerall = var(0)=1
trigger1 = var(3)>=30

[State ]
type = Varset
trigger1 = var(3)>=30
var(0) = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=30
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1



;---------------------------------------------------------------------------
;歩兵の行進
[Statedef 2020]
type    = S
movetype= I
physics = N
juggle  = 1
velset = 0.4,0
movehitpersist = 1
ctrl = 0
[State ]
type = PalFX
trigger1 = Anim != 2020
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2020
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2020
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2020
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2020
value = 2020
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = anim=2020
trigger1 = animelem=2 || animelem=4
time = 4
freq = 90
ampl = 1
phase = 0
[State -2]
type = PlaySnd
Trigger1 = anim=2020
trigger1 = animelem=2 || animelem=4
value = S40, 0
;channel = 10
freqmul = 1
volume=-150

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2020
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
triggerall = var(3)!=0
trigger1 = P2bodydist x =[0,40]
trigger1 = var(5):=1
value = 2040
ctrl = 0
[State 200, 7]
type = ChangeState
triggerall = var(3)!=0
trigger1 = P2bodydist x =[0,80]
trigger1 = enemynear,vel x >0
trigger1 = var(5):=1
value = 2041
ctrl = 0

[State -1];
type = changestate
value = 2100
triggerall = parent,var(59)=0
triggerall = var(5)=0
triggerall = parent,command="start"
triggerall = parent,stateno=1000
triggerall = var(5):=1
trigger1 = ishelper(1)
trigger1 = parent,var(5)=1
trigger2 = ishelper(2)
trigger2 = parent,var(5)=2
trigger3 = ishelper(3)
trigger3 = parent,var(5)=3
trigger4 = ishelper(4)
trigger4 = parent,var(5)=4
ignorehitpause=1
[State -1];
type = changestate
value = 2100
triggerall = parent,var(59)=0
triggerall = var(5)=0
triggerall = parent,command="start"
triggerall = parent,stateno=1001
triggerall = var(5):=1
trigger1 = ishelper(5)
trigger1 = parent,var(5)=1
trigger2 = ishelper(6)
trigger2 = parent,var(5)=2
trigger3 = ishelper(7)
trigger3 = parent,var(5)=3
trigger4 = ishelper(8)
trigger4 = parent,var(5)=4
ignorehitpause=1

[State -1];
type = changestate
value = 2100
triggerall = parent,var(59)=1
triggerall = var(5)=0
triggerall = P2dist x >80
triggerall = parent,stateno=1000
triggerall = var(5):=1
trigger1 = ishelper(1)
trigger1 = parent,var(5)=1
trigger2 = ishelper(2)
trigger2 = parent,var(5)=2
trigger3 = ishelper(3)
trigger3 = parent,var(5)=3
trigger4 = ishelper(4)
trigger4 = parent,var(5)=4
ignorehitpause=1
[State -1];
type = changestate
value = 2100
triggerall = parent,var(59)=1
triggerall = var(5)=0
triggerall = P2dist x >80
triggerall = parent,stateno=1001
triggerall = var(5):=1
trigger1 = ishelper(5)
trigger1 = parent,var(5)=1
trigger2 = ishelper(6)
trigger2 = parent,var(5)=2
trigger3 = ishelper(7)
trigger3 = parent,var(5)=3
trigger4 = ishelper(8)
trigger4 = parent,var(5)=4
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=100
trigger1 = var(5):=1
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;歩兵の突撃
[Statedef 2040]
type    = S
movetype= A
physics = N
juggle  = 1
;velset = 0,0
movehitpersist = 1
ctrl = 0

[State ]
type = Varset
trigger1 = Anim != 2040
var(3) = 0
ignorehitpause=1

[State ]
type = Veladd
trigger1 = 1
y = 0.4

[State ]
type = MoveHitReset
trigger1 = Anim != 2040
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 2040
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 75, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 15                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6001                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 2                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -3,0             ;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 = -3,-4           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 0
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2040
value = 2040
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 210, 0
freqmul = 0.9

[State ]
type = VarSet
trigger1 = 1
var(1) = 2040
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = VelSet
trigger1 = pos Y >=-17
x = 0
y = 0
[State ]
type = VelSet
trigger1 = var(3)=0
x = 2.5
y = -4
[State ]
type = VelSet
trigger1 = movecontact=1
x = -1.5
y = -2

[State -2]
type = EnvShake
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
time = vel Y+5
freq = 90
ampl = vel Y*0.1+2
phase = 0
[State -2]
type = PlaySnd
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
value = S40, 0
;channel = 10
freqmul = (1-1000/((vel Y+1)*1000))+0.5
[State 200, 7]
type = ChangeState
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;アンパッサン
[Statedef 2041]
type    = S
movetype= A
physics = N
juggle  = 1
;velset = 0,0
movehitpersist = 1
ctrl = 0

[State ]
type = Varset
trigger1 = Anim != 2040
var(3) = 0
ignorehitpause=1

[State ]
type = Veladd
trigger1 = 1
y = 0.4

[State ]
type = MoveHitReset
trigger1 = Anim != 2040
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 2040
trigger1 = movecontact=0
attr = , NT                     ;Attribute: Standing, Normal Attack
damage = 0, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
;guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S1                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 1                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = 0,0             ;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 = 0,0           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
p1stateno=2500
p2stateno=5300
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2040
value = 2040
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 210, 0
freqmul = 0.9

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2041
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = VelSet
trigger1 = pos Y >=-17
x = 0
y = 0
[State ]
type = VelSet
trigger1 = var(3)=0
x = 2.5
y = -4
[State ]
type = VelSet
trigger1 = movecontact=1
x = -1.5
y = -2

[State ]
type = Varset
trigger1 = 1
fvar(3) = P2dist x
ignorehitpause=1
[State ]
type = Varset
trigger1 = 1
fvar(4) = P2dist y
ignorehitpause=1

[State -2]
type = EnvShake
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
time = vel Y+5
freq = 90
ampl = vel Y*0.1+2
phase = 0
[State -2]
type = PlaySnd
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
value = S40, 0
;channel = 10
freqmul = (1-1000/((vel Y+1)*1000))+0.5
[State 200, 7]
type = ChangeState
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;歩兵の速攻
[Statedef 2100]
type    = S
movetype= I
physics = N
juggle  = 1
velset = 1.6,0
movehitpersist = 1
ctrl = 0

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2100
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2100
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2100
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2100
value = 2100
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = anim=2100
trigger1 = animelem=1 || animelem=2
time = 4
freq = 90
ampl = 2
phase = 0
[State -2]
type = PlaySnd
Trigger1 = anim=2100
trigger1 = animelem=1 || animelem=2
value = S40, 0
;channel = 10
freqmul = 0.9
volume=-150

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2100
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)!=0
trigger1 = P2bodydist x =[0,31]
value = 2040
ctrl = 0

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=50
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1




;---------------------------------------------------------------------------
;戦車の突進
[Statedef 2400]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 8,0
movehitpersist = 1
ctrl = 0
[state -2]
type = AfterImage
trigger1 = Anim != 2400
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 2400
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2400
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2400
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2400
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 2400
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 125, 12                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, -5               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 4                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -8,-4             ;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 = -8,-4           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2400
value = 2400
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 1
freqmul = 1.7
volume=-200

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2400
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=0
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,command!="holdfwd"
trigger1 = parent,command!="holdback"
trigger2 = FrontEdgeBodyDist=0
trigger3 = movecontact
trigger4 = parent,stateno=[1250,1251]
value = 2401
ctrl = 0
[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=1
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,var(57)=0
trigger2 = FrontEdgeBodyDist=0
trigger3 = movecontact
trigger4 = parent,stateno=[1250,1251]
value = 2401
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;突進終了
[Statedef 2401]
type    = S
movetype= I
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = AfterImage
trigger1 = Anim != 2200
time = 1

[State ]
type = Varset
trigger1 = Anim != 2200
var(3) = 0
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
trigger1 = FrontEdgeBodyDist>0
x = -0.4
y = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2200
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2200
value = 2200
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 101, 2
freqmul = 1
volume=0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2401
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=40
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1



;---------------------------------------------------------------------------
;戦車の突進上
[Statedef 2410]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,-8
movehitpersist = 1
ctrl = 0
[state -2]
type = AfterImage
trigger1 = Anim != 2410
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 2410
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2410
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2410
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2410
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 2410
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 125, 12                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 4                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -1,-8             ;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,-8           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2410
value = 2410
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 1
freqmul = 1.7
volume=-200

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2410
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=0
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,command!="holdup"
trigger2 = pos Y<=-137 
trigger3 = movecontact
value = 2411
ctrl = 0
[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=1
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,var(56)!=1
trigger2 = pos Y<=-137 
trigger3 = movecontact
value = 2411
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;突進終了
[Statedef 2411]
type    = S
movetype= I
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = AfterImage
trigger1 = Anim != 2200
time = 1

[State ]
type = Varset
trigger1 = Anim != 2200
var(3) = 0
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
trigger1 = pos Y >-137
x = 0
y = 0.4
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
trigger1 = pos Y <=-137
x = 0
y = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2200
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2200
value = 2200
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 101, 2
freqmul = 1
volume=0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2411
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=40
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1



;---------------------------------------------------------------------------
;戦車の突進下
[Statedef 2420]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,8
movehitpersist = 1
ctrl = 0
[state -2]
type = AfterImage
trigger1 = Anim != 2420
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 2420
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2420
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2420
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2420
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 2420
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 125, 12                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 4                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -1,8             ;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,8           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1
fall.xvelocity = -1
fall.yvelocity = -4
fall.envshake.time =10
fall.envshake.freq =90
fall.envshake.ampl =2

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2420
value = 2420
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 1
freqmul = 1.7
volume=-200

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2420
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=0
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,command!="holddown"
trigger2 = pos Y>=-17 
trigger3 = movecontact
value = 2421
ctrl = 0
[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=1
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,var(56)!=-1
trigger2 = pos Y>=-17 
trigger3 = movecontact
value = 2421
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;突進終了
[Statedef 2421]
type    = S
movetype= I
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = AfterImage
trigger1 = Anim != 2200
time = 1

[State ]
type = Varset
trigger1 = Anim != 2200
var(3) = 0
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
trigger1 = pos Y <-17
x = 0
y = -0.4
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
trigger1 = pos Y >=-17
x = 0
y = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2200
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2200
value = 2200
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 101, 2
freqmul = 1
volume=0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2421
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=40
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1




;---------------------------------------------------------------------------
;キャスリング
[Statedef 2600]
type    = S
movetype= I
physics = N
juggle  = 1
velset = 0,0
movehitpersist = 1
ctrl = 0
[State ]
type = PalFX
trigger1 = Anim != 2600
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2600
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2600
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2600
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2600
value = 2600
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100


[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2600
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = animtime=0
value = 2601
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;キャスリング
[Statedef 2601]
type    = S
movetype= I
physics = N
juggle  = 1
velset = 0,0
movehitpersist = 1
ctrl = 0
[State ]
type = PalFX
trigger1 = Anim != 2601
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2601
time = 1
facing = 1
pos = -40, -57
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2601
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2601
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2601
value = 2601
ignorehitpause=1

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2601
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = VarSet
trigger1 = Ishelper
trigger1 = animtime=0
trigger1 = parentdist x*facing <0
fvar(0) = Ceil(parent,fvar(0)-parentdist x*facing)
ignorehitpause=1
[State ]
type = VarSet
trigger1 = Ishelper
trigger1 = animtime=0
trigger1 = parentdist x*facing >=0
fvar(0) = floor(parent,fvar(0)-parentdist x*facing)
ignorehitpause=1
[State ]
type = VarSet
trigger1 = Ishelper
trigger1 = animtime=0
fvar(1) = floor(-parentdist y+parent,pos y)
ignorehitpause=1


[State 200, 7]
type = ChangeState
trigger1 = animtime=0
value = 2400
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1



;---------------------------------------------------------------------------
;騎兵の奇襲下
[Statedef 3000]
type    = S
movetype= A
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = Velset
trigger1 = var(3)=10
trigger1 = pos y <-17
x = 4
y = 8
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3)=20
x = 0
y = 0
ignorehitpause=1
[state -2]
type = AngleDraw
trigger1 = var(3)>=10
value = -fvar(2)-25
ignorehitpause=1
[State ]
type = Varset
trigger1 = var(3)=1
fvar(2) = 0
ignorehitpause=1
[State ]
type = Varadd
trigger1 = var(3)>=10
fvar(2) = 100/(var(3)-10)*0.1
ignorehitpause=1
[state -2]
type = AfterImage
trigger1 = var(3)=10
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 3000
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 3000
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 3000
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 3000
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 3000
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 200, 20                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 5                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -4,8             ;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 = -4,8           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1
fall.xvelocity = -2
fall.yvelocity = -4
fall.envshake.time =10
fall.envshake.freq =90
fall.envshake.ampl =2

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 3000
value = 3000
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=10
value = 101, 1
freqmul = 1.7
volume=-200
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 3000, 1
freqmul = 0.6
volume=-100

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 3000
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = AfterImage
trigger1 = var(3)>=60
time = 1
[State 200, 7]
type = ChangeState
trigger1 = var(3)>=60
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;騎兵の奇襲中下
[Statedef 3001]
type    = S
movetype= A
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = Velset
trigger1 = var(3)=10
trigger1 = pos y <-17
x = 8
y = 4
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3)=20
x = 0
y = 0
ignorehitpause=1
[state -2]
type = AngleDraw
trigger1 = var(3)>=10
value = -fvar(2)+20
ignorehitpause=1
[State ]
type = Varset
trigger1 = var(3)=1
fvar(2) = 0
ignorehitpause=1
[State ]
type = Varadd
trigger1 = var(3)>=10
fvar(2) = 100/(var(3)-10)*0.1
ignorehitpause=1
[state -2]
type = AfterImage
trigger1 = var(3)=10
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 3001
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 3001
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 3001
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 3001
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 3001
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 200, 20                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 5                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -8,4             ;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 = -8,4           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1
fall.xvelocity = -4
fall.yvelocity = -2
fall.envshake.time =10
fall.envshake.freq =90
fall.envshake.ampl =2

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 3001
value = 3001
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=10
value = 101, 1
freqmul = 1.7
volume=-200
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 3000, 1
freqmul = 0.6
volume=-100

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 3001
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = AfterImage
trigger1 = var(3)>=60
time = 1
[State 200, 7]
type = ChangeState
trigger1 = var(3)>=60
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;騎兵の奇襲中上
[Statedef 3002]
type    = S
movetype= A
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = Velset
trigger1 = var(3)=10
trigger1 = pos y >-137
x = 8
y = -4
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3)=20
x = 0
y = 0
ignorehitpause=1
[state -2]
type = AngleDraw
trigger1 = var(3)>=10
value = -fvar(2)+20
ignorehitpause=1
[State ]
type = Varset
trigger1 = var(3)=1
fvar(2) = 0
ignorehitpause=1
[State ]
type = Varadd
trigger1 = var(3)>=10
fvar(2) = 100/(var(3)-10)*0.1
ignorehitpause=1
[state -2]
type = AfterImage
trigger1 = var(3)=10
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 3002
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 3002
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 3002
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 3002
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 3002
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 200, 20                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 5                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -8,-4             ;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 = -8,-4           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 3002
value = 3002
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=10
value = 101, 1
freqmul = 1.7
volume=-200
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 3000, 1
freqmul = 0.6
volume=-100

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 3002
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = AfterImage
trigger1 = var(3)>=60
time = 1
[State 200, 7]
type = ChangeState
trigger1 = var(3)>=60
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;騎兵の奇襲上
[Statedef 3003]
type    = S
movetype= A
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = Velset
trigger1 = var(3)=10
trigger1 = pos y >-137
x = 4
y = -8
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3)=20
x = 0
y = 0
ignorehitpause=1
[state -2]
type = AngleDraw
trigger1 = var(3)>=10
value = -fvar(2)+65
ignorehitpause=1
[State ]
type = Varset
trigger1 = var(3)=1
fvar(2) = 0
ignorehitpause=1
[State ]
type = Varadd
trigger1 = var(3)>=10
fvar(2) = 100/(var(3)-10)*0.1
ignorehitpause=1
[state -2]
type = AfterImage
trigger1 = var(3)=10
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 3003
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 3003
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 3003
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 3003
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 3003
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 200, 20                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 5                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -4,-8             ;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 = -4,-8           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 3003
value = 3003
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=10
value = 101, 1
freqmul = 1.7
volume=-200
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 3000, 1
freqmul = 0.6
volume=-100

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 3003
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = AfterImage
trigger1 = var(3)>=60
time = 1
[State 200, 7]
type = ChangeState
trigger1 = var(3)>=60
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;ビショップの突進
[Statedef 2700]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 8,-8
movehitpersist = 1
ctrl = 0
[state -2]
type = AfterImage
trigger1 = Anim != 2700
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 2700
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2700
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2700
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2700
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 2700
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 125, 12                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 4                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -8,-8             ;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 = -8,-8           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2700
value = 2700
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 1
freqmul = 1.7
volume=-200

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2700
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = Velset
trigger1 = FrontEdgeBodyDist<0
trigger2 = pos y <=-137
x = 0
y = 0
ignorehitpause=1


[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=0
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,command!="holdfwd"
trigger1 = parent,command!="holdback"
trigger2 = FrontEdgeBodyDist=0
trigger3 = movecontact
trigger4 = pos Y<=-137 
value = 2701
ctrl = 0
[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=1
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,var(57)=0
trigger2 = FrontEdgeBodyDist=0
trigger3 = movecontact
trigger4 = pos Y<=-137 
value = 2701
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;突進終了
[Statedef 2701]
type    = S
movetype= I
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = AfterImage
trigger1 = Anim != 2200
time = 1

[State ]
type = Varset
trigger1 = Anim != 2200
var(3) = 0
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
x = 0
y = 0
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
trigger1 = FrontEdgeBodyDist>0
trigger1 = pos y >-137
x = -0.4
y = 0.4
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2200
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2200
value = 2200
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 101, 2
freqmul = 1
volume=0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2701
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=40
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;ビショップの突進
[Statedef 2710]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 8,8
movehitpersist = 1
ctrl = 0
[state -2]
type = AfterImage
trigger1 = Anim != 2710
FrameGap = 1
timegap =1
palbright =0,0,0
palcontrast =256,0,0
paladd =1,1,1
palmul =0.7,0.7,0.7
trans = add
length = 10
time = -1
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 2710
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2710
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2710
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2710
ignorehitpause=1

[State 200, 1]
type = HitDef
trigger1 = Anim = 2710
trigger1 = movecontact=0
attr = , NA                     ;Attribute: Standing, Normal Attack
damage = 125, 12                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10, 10                 ;Time attacker pauses, time opponent shakes                ;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, (random%30)-15               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S100, 4                  ;Sound to play on hit
guardsound = S120, 1                ;Sound to play on guard
ground.type = high               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -8,8             ;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 = -8,8           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff =0
getpower = 0,0
givepower = 0, 0
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
sprpriority =var(4)
ignorehitpause = 1
fall.xvelocity = -4
fall.yvelocity = -4
fall.envshake.time =10
fall.envshake.freq =90
fall.envshake.ampl =2

[State ];当身回避の当身
type = ReversalDef
trigger1 = movecontact
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2710
value = 2710
ignorehitpause=1

[State -2]
type = EnvShake
Trigger1 = var(3)=0
time = 15
freq = 90
ampl = 3
phase = 0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 1
freqmul = 1.7
volume=-200

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2710
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = Velset
trigger1 = FrontEdgeBodyDist<=0
trigger2 = pos y >=-17
x = 0
y = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=0
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,command!="holdfwd"
trigger1 = parent,command!="holdback"
trigger2 = FrontEdgeBodyDist=0
trigger3 = movecontact
trigger4 = pos Y>=-17 
value = 2711
ctrl = 0
[State 200, 7]
type = ChangeState
triggerall = parent,var(59)=1
triggerall = var(3)%5=3
triggerall = var(3)>5
trigger1 = parent,var(57)=0
trigger2 = FrontEdgeBodyDist=0
trigger3 = movecontact
trigger4 = pos Y>=-17 
value = 2711
ctrl = 0


[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;---------------------------------------------------------------------------
;突進終了
[Statedef 2711]
type    = S
movetype= I
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = AfterImage
trigger1 = Anim != 2200
time = 1

[State ]
type = Varset
trigger1 = Anim != 2200
var(3) = 0
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
x = 0
y = 0
ignorehitpause=1
[State ]
type = Velset
trigger1 = var(3) = 0
trigger1 = FrontEdgeBodyDist>0
trigger1 = pos y <-17
x = -0.4
y = -0.4
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2200
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2200
value = 2200
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 101, 2
freqmul = 1
volume=0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2711
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=40
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;ビショップの弓術
[Statedef 2800]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
movehitpersist = 1
ctrl = 0

[State ]
type = projectile
trigger1 = var(3)=50 
attr = A, NP			;Attribute: Standing, Normal Attack
damage = 200,20			;Damage that move inflicts, guard damage
animtype = Light			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 10, 20			;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, -15               ;X-offset for the "hit spark" rel. to p2,
hitsound = S100, 5			;Sound to play on hit
guardsound = S120, 0			;Sound to play on guard
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 6		;Time that the opponent slides back
ground.hittime  = 15		;Time opponent is in hit state
ground.velocity = -12,-12		;Velocity at which opponent is pushed
airguard.velocity = -4,-4	;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 = -12,-12		;X-velocity at which opponent is pushed,
air.hittime = 15			;Time before opponent regains control in air
getpower = 0,0
givepower = 0, 0
projID = 2800
projanim = 2805
projremove =0
projremovetime = 300
projhits =1
projmisstime =301
projedgebound =999999
projstagebound=999999
projheightbound = -999999,999999
offset =10,-17
velocity =4,-4
accel = 1, -1
projscale =1,1
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
projsprpriority =var(4)+1
supermovetime = 0
pausemovetime = 0
afterimage.time=-1
afterimage.length=100
afterimage.palbright=0,0,0
afterimage.palcontrast=256,0,0
afterimage.paladd=1,1,1
afterimage.palmul=0.9,0.9,0.9
afterimage.timegap=1
afterimage.framegap=1
afterimage.trans=add
;ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 2800
trigger1 = Anim != 2801
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2800
trigger1 = Anim != 2801
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2800
trigger1 = Anim != 2801
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2800
trigger1 = Anim != 2801
ignorehitpause=1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2800
trigger1 = Anim != 2801
value = 2800
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = var(3)=50
value = 2801
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=6
value = 2800, 0
freqmul = 0.8
volume=0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=50
value = 2800, 1
freqmul = 0.5
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=50
value = 2800, 2
freqmul = 0.7
volume=0

[State -2]
type = EnvShake
Trigger1 = var(3)=50
time = 20
freq = 90
ampl = 4
phase = 0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2800
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[state -2]
type = AngleDraw
trigger1 = var(3)>=6
value = 45
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=90
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


;ビショップの弓術
[Statedef 2801]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
movehitpersist = 1
ctrl = 0

[State ]
type = projectile
trigger1 = var(3)=50 
attr = A, NP			;Attribute: Standing, Normal Attack
damage = 200,20			;Damage that move inflicts, guard damage
animtype = Light			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 10, 20			;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, -15               ;X-offset for the "hit spark" rel. to p2,
hitsound = S100, 5			;Sound to play on hit
guardsound = S120, 0			;Sound to play on guard
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 6		;Time that the opponent slides back
ground.hittime  = 15		;Time opponent is in hit state
ground.velocity = -12,12		;Velocity at which opponent is pushed
airguard.velocity = -4,4	;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 = -12,12		;X-velocity at which opponent is pushed,
air.hittime = 15			;Time before opponent regains control in air
getpower = 0,0
givepower = 0, 0
projID = 2800
projanim = 2806
projremove =0
projremovetime = 300
projhits =1
projmisstime =300
projedgebound =999999
projstagebound=999999
projheightbound = -999999,999999
offset =10,4
velocity =4,4
accel = 1, 1
projscale =1,1
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
projsprpriority =var(4)+1
supermovetime = 0
pausemovetime = 0
afterimage.time=-1
afterimage.length=100
afterimage.palbright=0,0,0
afterimage.palcontrast=256,0,0
afterimage.paladd=1,1,1
afterimage.palmul=0.9,0.9,0.9
afterimage.timegap=1
afterimage.framegap=1
afterimage.trans=add
;ignorehitpause=1
fall.xvelocity = -6
fall.yvelocity = -6
fall.envshake.time =10
fall.envshake.freq =90
fall.envshake.ampl =3

[State ]
type = PalFX
trigger1 = Anim != 2800
trigger1 = Anim != 2801
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = BindToParent
trigger1 = ishelper
trigger1 = Anim != 2800
trigger1 = Anim != 2801
time = 1
facing = 0
pos = (fvar(0)-parent,fvar(0))*parent,facing, fvar(1)-parent,pos y
ignorehitpause=1

[State ]
type = Varset
trigger1 = Anim != 2800
trigger1 = Anim != 2801
var(3) = 0
ignorehitpause=1

[State ]
type = MoveHitReset
trigger1 = Anim != 2800
trigger1 = Anim != 2801
ignorehitpause=1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2800
trigger1 = Anim != 2801
value = 2800
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = var(3)=50
value = 2801
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6000, 2
freqmul = 0.8
volume=-100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 101, 2
freqmul = 1.2
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=6
value = 2800, 0
freqmul = 0.8
volume=0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=50
value = 2800, 1
freqmul = 0.5
volume=100
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=50
value = 2800, 2
freqmul = 0.7
volume=0

[State -2]
type = EnvShake
Trigger1 = var(3)=50
time = 20
freq = 90
ampl = 4
phase = 0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2800
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[state -2]
type = AngleDraw
trigger1 = var(3)>=6
value = -45
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=90
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1




;---------------------------------------------------------------------------
;プロモーション
[Statedef 3100]
type    = S
movetype= I
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = AfterImage
trigger1 = Anim != 2900
time = 1

[State ]
type = Varset
trigger1 = Anim != 2900
var(3) = 0
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 2900
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = MoveHitReset
trigger1 = Anim != 2900
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2900
value = 2900
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 101, 2
freqmul = 1
volume=0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=30
value = 6000, 0
freqmul = 1.4
volume=0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=30
value = 4000, 0
freqmul = 1.5
volume=0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 3100
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = Varset
triggerall = var(6)=0
triggerall = var(3)<=30
trigger1 = parent,var(59)=0
trigger1 = parent,command="a"
trigger2 = parent,var(59)!=0
trigger2 = helper(9),var(10)=1
trigger2 = helper(10),var(10)=1
trigger2 = helper(1),var(6)!=1
trigger2 = helper(2),var(6)!=1
trigger2 = helper(3),var(6)!=1
trigger2 = helper(4),var(6)!=1
trigger2 = helper(5),var(6)!=1
trigger2 = helper(6),var(6)!=1
trigger2 = helper(7),var(6)!=1
trigger2 = helper(8),var(6)!=1
var(6) = 1
ignorehitpause=1
[State ]
type = Varset
triggerall = var(6)=0
triggerall = var(3)<=30
trigger1 = parent,var(59)=0
trigger1 = parent,command="b"
trigger2 = parent,var(59)!=0
trigger2 = helper(11),var(10)=1
trigger2 = helper(12),var(10)=1
trigger2 = helper(1),var(6)!=2
trigger2 = helper(2),var(6)!=2
trigger2 = helper(3),var(6)!=2
trigger2 = helper(4),var(6)!=2
trigger2 = helper(5),var(6)!=2
trigger2 = helper(6),var(6)!=2
trigger2 = helper(7),var(6)!=2
trigger2 = helper(8),var(6)!=2
var(6) = 2
ignorehitpause=1
[State ]
type = Varset
triggerall = var(6)=0
triggerall = var(3)<=30
trigger1 = parent,var(59)=0
trigger1 = parent,command="x"
trigger2 = parent,var(59)!=0
trigger2 = helper(13),var(10)=1
trigger2 = helper(14),var(10)=1
trigger2 = helper(1),var(6)!=3
trigger2 = helper(2),var(6)!=3
trigger2 = helper(3),var(6)!=3
trigger2 = helper(4),var(6)!=3
trigger2 = helper(5),var(6)!=3
trigger2 = helper(6),var(6)!=3
trigger2 = helper(7),var(6)!=3
trigger2 = helper(8),var(6)!=3
var(6) = 3
ignorehitpause=1
[State ]
type = Varset
triggerall = var(6)=0
trigger1 = var(3)>=30
trigger2 = parent,var(59)=0
trigger2 = parent,command="y"
var(6) = 4
ignorehitpause=1

[State ]
Type = Explod
Trigger1 = var(3)=30
ID = 4000
Anim = 4000+var(6)
Pos = 0,-10
PosType = P1
OwnPal = 1
SprPriority = var(4)+1
removeongethit = 0
[State ]
Type = ModifyExplod
Trigger1 = 1
ID = 4000
Scale = 0.5 + (1-1000/((1+(var(3)-30)*0.1)*1000))*0.1 , 0.5 + (1-1000/((1+(var(3)-30)*0.1)*1000))*0.1
Trans = AddAlpha
Alpha = 128-(var(3)-30)*2.5,256
[State ]
Type = Explod
Trigger1 = var(3)=30
ID = 4001
Anim = 4000+var(6)
Pos = 0,-10
PosType = P1
OwnPal = 1
SprPriority = var(4)+1
removeongethit = 0
[State ]
Type = ModifyExplod
Trigger1 = 1
ID = 4001
Scale = 0.5 + (1-1000/((1+(var(3)-30)*0.1)*1000))*0.3 , 0.5 + (1-1000/((1+(var(3)-30)*0.1)*1000))*0.3
Trans = AddAlpha
Alpha = 128-(var(3)-30)*2.5,256

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=90
value = 2001
ctrl = 0

[State -1];
type = Turn
trigger1 = var(3)=0
ignorehitpause=1

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1



;---------------------------------------------------------------------------
;ギャンビット
[Statedef 2300]
type    = S
movetype= I
physics = N
juggle  = 1
movehitpersist = 1
ctrl = 0
[State ]
type = AfterImage
trigger1 = Anim != 2900
time = 1

[State ]
type = Varset
trigger1 = Anim != 2900
var(3) = 0
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim != 2900
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = MoveHitReset
trigger1 = Anim != 2900
ignorehitpause=1
[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2900
value = 2900
ignorehitpause=1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=1
value = 101, 2
freqmul = 1
volume=0
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=30
value = 6000, 0
freqmul = 1.4
volume=0

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2300
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=25
value = 2301
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


[Statedef 2301]
type    = S
movetype= A
physics = N
juggle  = 1
;velset = 0,0
movehitpersist = 1
ctrl = 0

[State ]
type = Varset
trigger1 = Anim != 2301
var(3) = 0
ignorehitpause=1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2301
value = 2301
ignorehitpause=1

[State ];当身
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA,AT
hitsound = -1
p2stateno = 5300
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State -2]
type = EnvShake
trigger1 = var(3)=0
time = 25
freq = 90
ampl = 5
phase = 0
ignorehitpause = 1

[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 2300, 0
freqmul = 0.5
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 6, 1
freqmul = 0.6
[State 200, 1]
type = PlaySnd
trigger1 = var(3)=0
value = 1700, 1
freqmul = 1
volume=-100

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 5150
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = BGPalFX
trigger1 = var(3)=0
time = 60
add = 250,250,250
mul = 256,256,256
sinadd = -250,-250,-250,240
invertall = 0
color = 256

[State ];摩擦
type = Velset
trigger1 = var(3)>=5
y = -5
ignorehitpause=1
[State 200, 7]
type = varset
trigger1 = var(3)>=5
fvar(2)=27

[State 200, 7]
type = varset
trigger1 = 1
var(9)=100000

[State ];摩擦
type = posadd
trigger1 = var(3)>=5
y = -70
ignorehitpause=1

[State ]
type = projectile
trigger1 = var(3)=0 
attr = A, NP			;Attribute: Standing, Normal Attack
damage = 333,333			;Damage that move inflicts, guard damage
animtype = Light			;Animation type: Light, Medium, Heavy, Back (def: Light)
;guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAFD			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0, 40			;Time attacker pauses, time opponent shakes
sparkno = S6002                      ;Spark anim no (Def: set above)
sparkxy = -15, -15               ;X-offset for the "hit spark" rel. to p2,
hitsound = S6, 3			;Sound to play on hit
guardsound = S120, 0			;Sound to play on guard
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 6		;Time that the opponent slides back
ground.hittime  = 15		;Time opponent is in hit state
ground.velocity = -5,-20		;Velocity at which opponent is pushed
airguard.velocity = -4,4	;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 = -5,-20		;X-velocity at which opponent is pushed,
air.hittime = 15			;Time before opponent regains control in air
getpower = 0,0
givepower = 0, 0
projID = 2302
projanim = 2302
projremove =0
projremovetime = 10
projhits =1
projmisstime =300
projedgebound =999999
projstagebound=999999
projheightbound = -999999,999999
offset =0,0
velocity =0,0
accel = 0, 0
projscale =1,1
kill = 1
fall = 1
air.fall = 1
fall.recover = 0
hitonce = 1
projsprpriority =var(4)+1
supermovetime = 0
pausemovetime = 0
;ignorehitpause=1

[State 10410, エフェクト1]
Type = Explod
Trigger1 = var(3)=0
ID = 10410
Anim = 7001
Pos = 0,0
PosType = P1
OwnPal = 1
SprPriority = var(4)+2
removeongethit = 0
[State 10410, エフェクト2]
Type = Explod
Trigger1 = var(3)=0
ID = 10411
Anim = 7002
Pos = 0,0
PosType = P1
OwnPal = 1
SprPriority = var(4)+2
removeongethit = 0
[State 10410, Explod修正]
Type = ModifyExplod
Trigger1 = 1
ID = 10410
Scale = 2 + var(3)*0.1 , 2 + var(3)*0.1
Trans = AddAlpha
Alpha = 256 - animelemtime(4)*256/30,256
[State 10410, Explod修正]
Type = ModifyExplod
Trigger1 = 1
ID = 10411
Scale = 2 + var(3)*0.2 , 2 + var(3)*0.2
Trans = AddAlpha
Alpha = 256 - animelemtime(4)*256/30,256

[State ];ポーン
type = ParentVarAdd
triggerall = var(3)>=5
triggerall = var(6)=0
trigger1 = Ishelper(1)
trigger2 = Ishelper(2)
trigger3 = Ishelper(3)
trigger4 = Ishelper(4)
trigger5 = Ishelper(5)
trigger6 = Ishelper(6)
trigger7 = Ishelper(7)
trigger8 = Ishelper(8)
v = 10
value = 1
[State ];ルーク
type = ParentVarAdd
triggerall = var(3)>=5
trigger1 = Ishelper(9)
trigger2 = Ishelper(10)
trigger3 = var(6)=1
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
v = 10
value = 5
[State ];ナイト
type = ParentVarAdd
triggerall = var(3)>=5
trigger1 = Ishelper(11)
trigger2 = Ishelper(12)
trigger3 = var(6)=2
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
v = 10
value = 3
[State ];ビショップ
type = ParentVarAdd
triggerall = var(3)>=5
trigger1 = Ishelper(13)
trigger2 = Ishelper(14)
trigger3 = var(6)=3
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
v = 10
value = 3
[State ];クィーン
type = ParentVarAdd
triggerall = var(3)>=5
triggerall = var(6)=4
trigger1 = Ishelper(1)
trigger2 = Ishelper(2)
trigger3 = Ishelper(3)
trigger4 = Ishelper(4)
trigger5 = Ishelper(5)
trigger6 = Ishelper(6)
trigger7 = Ishelper(7)
trigger8 = Ishelper(8)
v = 10
value = 9

[State 200, 7]
type = ChangeState
trigger1 = var(3)>=5
value = 2903
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

[Statedef 2500];捕獲
movetype= A
sprpriority = 0
anim = 2500
velset = 0,0
movehitpersist = 1

[State ]
type = Varset
trigger1 = time=0
var(3) = 0
ignorehitpause=1

[State ];永続タゲ
type = ReversalDef
trigger1 = 1
reversal.attr = A,HT
hitsound = -1
sparkno = S-1
sparkxy = 0, 0
pausetime = 0,0
Ignorehitpause = 1

[State ]
type = Varset
trigger1 = time=0
var(1) = 2500
ignorehitpause=1

[State ]
type = TargetBind
trigger1 = 1
time = 1
pos = fvar(3), fvar(4)

[State ]
type = TargetState
trigger1 = time=0
value = 5300
ignorehitpause=1

[State ]
type = varset
trigger1 = fvar(2)=0
fvar(2) = -GetHitVar(xvel)
ignorehitpause=1

[State ]
type = Veladd
trigger1 = statetype=A
y = 0.3
ignorehitpause=1

[State ]
type = StateTypeSet
trigger1 = pos y< -fvar(4)
statetype = A
movetype = I
physics = N
ignorehitpause=1

[State ]
type = StateTypeSet
trigger1 = pos y>= -fvar(4)
statetype = S
movetype = I
physics = N
ignorehitpause=1

[State -2]
type = EnvShake
trigger1 = pos y> -fvar(4)
time = vel Y+5
freq = 90
ampl = vel Y*0.1+2
phase = 0
ignorehitpause = 1

[State -2]
type = PlaySnd
trigger1 = pos y> -fvar(4)
value = S40, 0
;channel = 10
freqmul = (1-1000/((vel Y+1)*1000))+0.5

[State ]
type = velSet
triggerall = ishelper
trigger1 = pos y> -fvar(4)
y = 0
[State ]
type = PosSet
trigger1 = ishelper
trigger1 = pos y> -fvar(4)
y = -fvar(4)

[State ]
type = Changestate
trigger1 = target,stateno!=5300
value = 2501
ignorehitpause=1

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1

;---------------------------------------------------------------------------
;歩兵の突撃
[Statedef 2501]
type    = S
movetype= I
physics = N
juggle  = 1
;velset = 0,0
movehitpersist = 1
ctrl = 0

[State ]
type = TargetDrop
trigger1 = 1

[State ]
type = Varset
trigger1 = Anim != 2040
var(3) = 0
ignorehitpause=1

[State ]
type = Veladd
trigger1 = 1
y = 0.4

[State ]
type = MoveHitReset
trigger1 = Anim != 2040
ignorehitpause=1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 2040
value = 2040
ignorehitpause=1

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 2501
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

[State ]
type = VelSet
trigger1 = pos Y >=-17
x = 0
y = 0
[State ]
type = VelSet
trigger1 = var(3)=0
x = -1.5
y = -2

[State -2]
type = EnvShake
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
time = vel Y+5
freq = 90
ampl = vel Y*0.1+2
phase = 0
[State -2]
type = PlaySnd
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
value = S40, 0
;channel = 10
freqmul = (1-1000/((vel Y+1)*1000))+0.5
[State 200, 7]
type = ChangeState
trigger1 = var(3)!=0
trigger1 = pos Y >=-17
value = 2001
ctrl = 0

[State ]
type = Varadd
trigger1 = 1
var(3) = 1
ignorehitpause=1


[Statedef 5300];ビリビリステート
type		= A
movetype	= A
physics		= N
ctrl		= 0
anim            = 5000
hitdefpersist	= 1
movehitpersist	= 1
hitcountpersist	= 1

[State ]
type = TargetState
trigger1 = time=0
value = 5300
ignorehitpause=1

[State 170]
type = StateTypeSet
trigger1 = time >0
movetype=H
ignorehitpause=1

[State ]
type = LifeAdd
trigger1 = time = 0
value = -75
kill = 1
absolute = 1

[state -2]
type = ChangeAnim
trigger1 = anim!=5000
value = 5000
elem = 1
ignorehitpause=1

[State 170]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 10

[State 170]
type = StateTypeSet
trigger1 = Pos Y >=0
statetype=S
physics = S

[State ]
type = Gravity
trigger1 = Pos Y <0

[State ]
type = velset
trigger1 = Pos Y >0
y = 0
[State ]
type = Posset
trigger1 = Pos Y >0
y = 0

[State 200];ステ移動
type = selfState
trigger1 = Time >= 180
trigger2 = alive=0
value = 5020
ctrl = 0
ignorehitpause=1


;---------------------------------------------------------------------------
;復活
[Statedef 3200]
type    = S
movetype= I
physics = N
juggle  = 1
velset = 0,0
movehitpersist = 1
ctrl = 0

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

[State ]
type = PlaySnd
trigger1 = Anim !=[2000,2015]
value = 101, 2
freqmul = 1
volume=0
[State ]
type = PlaySnd
trigger1 = Anim !=[2000,2015]
value = 190, 0
freqmul = 1.4
volume=0
[State ]
type = AfterImage
trigger1 = Anim !=[2000,2015]
time = 1

[State ]
type = Varset
trigger1 = Anim !=[2000,2015]
var(3) = 0
ignorehitpause=1

[State ]
type = PalFX
trigger1 = Anim !=[2000,2015]
time = 20
add = 200,0,0
mul = 256,256,256
sinadd = -200,0,0,80
invertall = 0
color = 256

[State ]
type = ChangeAnim
triggerall = Anim != 2000
triggerall = var(6)=0||var(6)=4
trigger1 = Ishelper(1)
trigger2 = Ishelper(2)
trigger3 = Ishelper(3)
trigger4 = Ishelper(4)
trigger5 = Ishelper(5)
trigger6 = Ishelper(6)
trigger7 = Ishelper(7)
trigger8 = Ishelper(8)
value = 2000
ignorehitpause=1
[State ]
type = ChangeAnim
triggerall = Anim != 2005
trigger1 = Ishelper(9)
trigger2 = Ishelper(10)
trigger3 = var(6)=1
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
value = 2005
ignorehitpause=1
[State ]
type = ChangeAnim
triggerall = Anim != 2010
trigger1 = Ishelper(11)
trigger2 = Ishelper(12)
trigger3 = var(6)=2
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
value = 2010
ignorehitpause=1
[State ]
type = ChangeAnim
triggerall = Anim != 2015
trigger1 = Ishelper(13)
trigger2 = Ishelper(14)
trigger3 = var(6)=3
trigger3 = Ishelper(1)||Ishelper(2)||Ishelper(3)||Ishelper(4)||Ishelper(5)||Ishelper(6)||Ishelper(7)||Ishelper(8)
value = 2015
ignorehitpause=1

[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = FrontEdgeBodyDist <=vel x
x = FrontEdgeBodyDist
ignorehitpause=1
[State ];摩擦
type = Velset
triggerall = !Ishelper
trigger1 = BackEdgeBodyDist <= vel x*-1
x = BackEdgeBodyDist*-1
ignorehitpause=1
[State ]
type = VarSet
trigger1 = 1
var(1) = 3200
ignorehitpause=1
[State ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 2900
time = 1
forceair = 0
ignorehitpause=1

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

[State ]
type = Varset
trigger1 = 1
var(9) = 0
ignorehitpause=1
[State ]
type = Varset
trigger1 = 1
var(10) = 0
ignorehitpause=1

[State ]
type = Varset
trigger1 = 1
fvar(2) = fvar(2)*0.9
ignorehitpause=1
[State ]
type = Varset
trigger1 = fvar(2)=[-1,1]
fvar(2) = 0
ignorehitpause=1

[State ]
type = Velset
triggerall = pos y >-58
trigger1 = ishelper(9)
trigger2 = ishelper(10)
trigger3 = ishelper(11)
trigger4 = ishelper(12)
trigger5 = ishelper(13)
trigger6 = ishelper(14)
y = (-58-pos y)*0.1
ignorehitpause=1

[state -2]
type = AngleDraw
trigger1 = 1
value = fvar(2)
ignorehitpause=1

[State 200, 7]
type = ChangeState
trigger1 = fvar(2)=0
value = 2001
ctrl = 0

