;===========================================
;基本データ
;===========================================
[Data]
life = 1500
attack = 99
defence = 99
power = 10000
fall.defence_up = 50
liedown.time = 60
airjuggle = 28
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 0
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 15
ground.front = 15
air.back = 12
air.front = 12
height = 70
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = -5, -130
mid.pos = -5, -60 
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 3.5
walk.back = -3.5
run.fwd  = 6.5,0
run.back = -6.5,0
jump.neu = 0,-10
jump.back = -4
jump.fwd = 4
runjump.back = -4,-10
runjump.fwd = 4,-10
airjump.neu = 0,-8
airjump.back = -4
airjump.fwd = 4

[Movement]
airjump.num = 1
airjump.height = 35
yaccel = .55
stand.friction = .85
crouch.friction = .82
;===========================================
;ステート：基本動作・コモン上書き
;===========================================
;---------------------------------------------------------------------------
;時間切れ敗北
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 191, 1]
type = varadd
trigger1 = time = 0
trigger1 = var(58) = [1,2]
var(58) = (random%2)

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;挑発
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;上書き・通常立ち
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0]
type = lifeset
trigger1 = Name != "Mind of creation and destruction"
value = 0
ignorehitpause = 1

[state 0]
type=assertspecial
trigger1 = Name != "Mind of creation and destruction"
flag=invisible
flag2=noshadow
ignorehitpause=1

[State 0, 3.5]
type = Destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 107, 2]
type = ChangeState
trigger1 = Name != "Mind of creation and destruction"
value = 5150
ctrl = 0

[State 0]
type = Posset
trigger1 = name != "Mind of creation and destruction"
trigger1 = !ishelper
trigger1 = !alive
y = 999999
ignorehitpause = 1

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050
;---------------------------------------------------------------------------
;上書き：バックステップ
[Statedef 105]
type = S
physics = S
anim = 105
velset = 0
ctrl = 0

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

[Statedef 106]
type = A
physics = N
anim = 106
ctrl = 0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 2

[State -3, 5]
type = PlaySnd
trigger1 = Time = 0
value = S0,23

[State 106, 0]
type = VelSet
trigger1 = var(5) = 0
trigger1 = Time = 0
x = -10
y = -3

[State 106, 1]
type = VelAdd
trigger1 = Time > 0
x = .3
y = .2

[State 106, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 107
;---------------------------------------------------------------------
;上書き：バックステップ着地
[Statedef 107]
type = S
physics = S
anim = 107
velset = 0,0

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

[State 107, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------
;上書き：倒れ
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 191, 1]
type = varadd
trigger1 = Name = "Mind of creation and destruction"
trigger1 = time = 0
trigger1 = var(58) = [1,2]
trigger1 = !Alive
var(58) = (random%2)

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150]
type = Posset
trigger1 = name != "Mind of creation and destruction"
y = 999999
ignorehitpause = 1

[state 0]
type=assertspecial
trigger1 = Name != "Mind of creation and destruction"
trigger1 = enemy,var(59) = 0
flag=invisible
flag2=noshadow
ignorehitpause=1
[State 0]
type = lifeset
trigger1 = Name != "Mind of creation and destruction"
trigger1 = Alive
value = 0
ignorehitpause = 1

[State 107, 2]
type = SelfState
trigger1 = Name != "Mind of creation and destruction"
trigger1 = Alive
value = 5150
ctrl = 1

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 0, 2]
type = Veladd
trigger1 = Name != "Mind of creation and destruction"
trigger1 = enemy,var(59) = 1
trigger1 = gametime%2 = 0
y = -0.01

[State 0] 
type = AngleDraw 
trigger1 = Name != "Mind of creation and destruction"
trigger1 = enemy,var(59) = 1
trigger1 = gametime%2 = 0
[State 0] 
type = Angleadd
trigger1 = Name != "Mind of creation and destruction"
trigger1 = enemy,var(59) = 1
trigger1 = gametime%2 = 0
value = random%4

[State 0]
type = lifeset
trigger1 = Name != "Mind of creation and destruction"
trigger1 = Alive
value = 0
ignorehitpause = 1
[State 0]
type = lifeadd
trigger1 = Name != "Mind of creation and destruction"
trigger1 = enemy,var(59) = 1
trigger1 = gametime%2 = 0
trigger1 = !Alive
value = random-400
ignorehitpause = 1
[State 0]
type = poweradd
trigger1 = Name != "Mind of creation and destruction"
trigger1 = enemy,var(59) = 1
trigger1 = gametime%2 = 0
trigger1 = !Alive
value = random-400
ignorehitpause = 1

[State 0]
type = PalFX
trigger1 = Name != "Mind of creation and destruction"
trigger1 = enemy,var(59) = 1
trigger1 = gametime%2 = 0
time = 1
add = random/4,random/4,random/4
mul = random/4,random/4,random/4
sinadd = 256,256,256,10
invertall = 0
color = 256
ignorehitpause = 1

[State 1000]
type = PlaySnd
trigger1 = Name != "Mind of creation and destruction"
trigger1 = enemy,var(59) = 1
trigger1 = gametime%15 = 0
value = 11,0
freqmul = (random%21)/10.0

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 8]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;上書き：ダウン回避
[Statedef 5201]
type = S
physics = N
movetype = I
anim = 5200
ctrl = 0
velset = -2,0
facep2 = 1

[State 5201,3]
type = PosSet
trigger1 = 1
y = 0

[State 5201,4]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 5201,5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;===========================================
;ステート：通常攻撃
;===========================================
;---------------------------------------------------------------------------
;立ちA
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 200
poweradd = 0
sprpriority = 2

[State 200]
type = Projectile
trigger1 = time = 0
projanim = 200
projID = 200
projremove = 0
projremovetime = 12
projscale = 0,0
offset = 0,0
attr = S, NA
damage   = 50,0
animtype  = Medium
pausetime = 2,4
guardflag = M
hitflag = MA
hitsound = s0,15
guardsound = s0,24
sparkxy = 60,-76
sparkno = s500+random%8
guard.sparkno = s508
ground.slidetime = 10
ground.hittime  = 8
ground.velocity = -2
airguard.velocity = -5,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
air.juggle  = 1
ignorehitpause = 1

[State 191, 1]
type = playsnd
trigger1 = time = 0
value = S0,13

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;立ちB
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd = 10
ctrl = 0
velset = 0,0
anim = 210
sprpriority = -1

[State 191, 1]
type = playsnd
trigger1 = AnimElem = 1
value = S0,13

[State 240, 4]
type = Explod
trigger1 = AnimElem = 6
anim = 241
postype = p1
pos = 60,-77
sprpriority = 4
ownpal = 1
removeongethit = 1

[State 200]
type = Projectile
trigger1 = time = 0
projanim = 210
projID = 210
projremove = 0
projremovetime = 21
projscale = 0,0
offset = 0,0
attr = S, NA
damage    = 82,9
animtype  = hard
pausetime = 4,13
guardflag = M
hitflag = MA
hitsound   = s0,17
guardsound = s0,24
sparkxy = 60,-70
sparkno = s500+random%8
guard.sparkno = s508
ground.slidetime = 15
ground.hittime  = 10
ground.velocity = -7
airguard.velocity = -5,-.8
air.type = High
air.velocity = -6,-4
air.hittime = 12
air.fall = 1
air.juggle  = 2
ignorehitpause = 1

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;立ちC
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd = 0
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 2

[State 191, 1]
type = playsnd
trigger1 = time = 0
value = S0,14

[State 240, 4]
type = Explod
trigger1 = AnimElem = 2
anim = 221
postype = p1
pos = 0,0
sprpriority = 4
ownpal = 1
removeongethit = 1

[State 200]
type = Projectile
trigger1 = time = 0
projanim = 220
projID = 220
projremove = 0
projremovetime = 14
projscale = 0,0
offset = 0,0
attr = S, NA
damage    = 120,10
animtype  = hard
pausetime = 12,12
guardflag = M
hitflag = MA
hitsound   = s0,17
guardsound = s0,24
sparkxy = 63,-75
sparkno = s500+random%8
guard.sparkno = s508
ground.type = high
ground.slidetime = 20
ground.hittime  = 18
ground.velocity = -1,-4
airguard.velocity = -5,-.8
air.type = High
air.fall = 1
air.velocity = -1.5,-5
air.hittime = 12
air.juggle  = 3
ignorehitpause = 1

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;立ちX
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 230
poweradd = 0
sprpriority = 2

[State 230]
type = Projectile
trigger1 = time = 0
projanim = 230
projID = 230
projremove = 0
projremovetime = 30
projscale = 0,0
offset = 0,0
attr = S, NA
damage   = 42,0
animtype  = Medium
pausetime = 2,4
guardflag = M
hitflag = MA
hitsound = s0,15
guardsound = s0,24
sparkxy = 55,-76
sparkno = s500+random%8
guard.sparkno = s508
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2
airguard.velocity = -5,0
air.type = High
air.velocity = -1.4,0
air.hittime = 12
air.juggle  = 1
ignorehitpause = 1
[State 230]
type = Projectile
trigger1 = time = 0
projanim = 231
projID = 231
projremove = 0
projremovetime = 30
projscale = 0,0
offset = 0,0
attr = S, NA
damage   = 42,0
animtype  = Medium
pausetime = 2,4
guardflag = M
hitflag = MA
hitsound = s0,15
guardsound = s0,24
sparkxy = 55,-76
sparkno = s500+random%8
guard.sparkno = s508
ground.slidetime = 10
ground.hittime  = 8
ground.velocity = -3
airguard.velocity = -5,0
air.type = High
air.velocity = -1.4,0
air.hittime = 12
air.juggle  = 1
ignorehitpause = 1

[State 191, 1]
type = playsnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 9
value = S0,14

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;立ちY
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd = 10
ctrl = 0
velset = 0,0
anim = 240
sprpriority = -1

[State 191, 1]
type = playsnd
trigger1 = AnimElem = 1
value = S0,13

[State 240, 4]
type = Explod
trigger1 = AnimElem = 5
anim = 241
postype = p1
pos = 35,-80
sprpriority = 4
ownpal = 1
removeongethit = 1

[State 200]
type = Projectile
trigger1 = time = 0
projanim = 240
projID = 240
projremove = 0
projremovetime = 19
projscale = 0,0
offset = 0,0
attr = S, NA
damage    = 88,11
animtype  = hard
pausetime = 5,12
guardflag = M
hitflag = MA
hitsound   = s0,17
guardsound = s0,24
sparkxy = 60,-70
sparkno = s500+random%8
guard.sparkno = s508
ground.slidetime = 15
ground.hittime  = 10
ground.velocity = -11
airguard.velocity = -5,-.4
air.type = High
air.velocity = -6,-2
air.hittime = 12
air.fall = 1
air.juggle  = 2
ignorehitpause = 1

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;立ちZ
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd = 0
ctrl = 0
velset = 0,0
anim = 250
sprpriority = 2

[State 191, 1]
type = playsnd
trigger1 = AnimElem = 5
value = S0,14

[State 200]
type = Projectile
trigger1 = time = 0
projanim = 250
projID = 250
projremove = 0
projremovetime = 28
projscale = 0,0
offset = 0,0
attr = S, NA
damage    = 117,6
animtype  = hard
pausetime = 5,8
guardflag = M
hitflag = MA
hitsound   = s0,17
guardsound = s0,24
sparkxy = 63,-75
sparkno = s500+random%8
guard.sparkno = s508
ground.type = high
ground.slidetime = 20
ground.hittime  = 18
ground.velocity = -6,0
airguard.velocity = -6,-.8
air.type = High
air.fall = 1
air.velocity = -6,-5
air.hittime = 12
air.juggle  = 3
ignorehitpause = 1

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------