
[Statedef -2]

[State ]
type = ctrlset
trigger1 = roundstate = 0
value = 0
ignorehitpause = 1

[State ]
type = varset
trigger1 = 1
v = 59
value = 1   ;ここを０にするとBGMが鳴らなくなる。＆ステージBGM消去、ステージ占領を解除する。
ignorehitpause = 1
supermovetime = 99999999999
pausemovetime = 99999999999


[State ]
type = AssertSpecial
trigger1 = var(59) = 1
flag = nomusic
flag2 = nofg
ignorehitpause = 1
supermovetime = 99999999999
pausemovetime = 99999999999

[State ]
type = BGpalfx
trigger1 = var(59) = 1
time = -1
add = 60,60,60
invertall = 1
color = 0
ignorehitpause = 1

[State ]
type = PlaySnd
triggerall = stateno = 5900
trigger1 = var(59) = 1
value = 10000,0
loop = 1
voulme = 255
persistent = 0
channel = 8

[State ]
type = varset
trigger1 = !Ishelper
trigger1 = roundstate = 2
var(30) = 1 ;0にすれば人操作可。動画撮るときは1にしてくださいね
ignorehitpause = 1

[State ]
type = Helper
triggerall = !IsHelper
trigger1 = numhelper(10000) = 0
stateno = 10000
name = "Aura"
id = 10000
persistent = 0
pos = 0,0
helpertype = player
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State ]
type = Helper
triggerall = !IsHelper
trigger1 = numhelper(10001) = 0
stateno = 10000
name = "Aura"
id = 10001
persistent = 0
pos = 0,0
helpertype = player
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State ]
type = Helper
triggerall = !IsHelper
trigger1 = numhelper(10002) = 0
stateno = 10000
name = "Aura"
id = 10002
persistent = 0
pos = 0,0
helpertype = player
postype = p1
ownpal = 1
keyctrl = 0
size.xscale = 1.05
size.yscale = 1.05
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State ] 
type = Afterimage
trigger1 = stateno != 3100 && !ishelper
trigger1 = !Time
trans = sub
palinvertall = 1
PalContrast =  255, 255, 255
PalBright = 255,255,255
palcolor = 0
paladd = 18,18,18
palmul = 0.7,0.7,0.7
time    =  -1
length  = 9
TimeGap = 1
FrameGap = 1

[State ]
type = Selfstate
triggerall = stateno = 5900
trigger1 = 1
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;未完成な相手キャラによって、不具合が起きても自己解決するシステ?(仮)
[State -2, Y座標自己修復]
type = PosSet
triggerall = RoundState = 2
trigger1 = stateno = [0,12]      ;立ち＆屈み時
trigger1 = floor(Pos Y) = [-2,3] ;立ち位置が僅かにずれていたらすぐ修正
y = 0
[State -2, Y座標自動修正]
type = PosAdd
triggerall = RoundState = 2
triggerall = Life < Var(22)  ;トレ?ニングでCtrl+Iを使うときに配慮
trigger1 = stateno = [0,30]  ;歩きも含める
trigger1 = floor(Pos Y) < -2 ;立ち位置が大きくずれていたら移動する
y = 2
[State -2, Y座標自動修正]
type = PosAdd
triggerall = RoundState = 2
triggerall = Life < Var(22)
trigger1 = stateno = [0,30]
trigger1 = floor(Pos Y) > 2 ;同じく
y = -2
[State -2, Y座標強制修復]               ;GATTより一言…
type = ChangeState                      ;この辺のシステ?は
triggerall = RoundState = 2             ;うちの咲夜に搭載しているもので
triggerall = ctrl = 0                   ;かなりオリジナルな設定です。
triggerall = alive = 1                  ;いらない、または重い処理を使う際は削除してください
triggerall = !Lose
trigger1 = Pos Y < -1800 ;空高く飛ばされてしまっても体勢を立て直して落下する
trigger1 = GameTime % 10 = 0
trigger2 = Pos Y > 480   ;地中?くに埋められてしまっても這い上がってくる
trigger2 = GameTime % 10 = 0
value = 40

[State 192, ]
type = AssertSpecial
trigger1 = enemy,movetype = H
trigger1 = enemy,stateno = 3360
trigger1 = enemy,anim = 3360
flag = nojugglecheck

[State 1100, ]
type = Varset
triggerall = var(30) != 0
trigger1 = enemy,movetype = H
trigger1 = enemy,Gethitvar(hitcount) >= 2
fvar(1) = enemy,Gethitvar(hitcount)

[State 1100, ]
type = Varset
trigger1 = var(30) = 0
trigger2 = stateno = 0
fvar(1) = 0

[State 1100, ]
type = Varset
trigger1 = fvar(1) >= 14
fvar(1) = 14

[State 1100, ]
type = AttackMulSet
trigger1 = var(30) != 0
value = ((10.0-(((fvar(1))*3.2)/10)*2)/10.0)

[State 1100, ]
type = AttackMulSet
trigger1 = stateno = 0
value = 1

[State 1100, ]
type = Varadd
trigger1 = (GameTime%2) = 0 && var(30) != 0
var(30) = -1
persistent = 0

[State 1100, ]
type = Varadd
trigger1 = (GameTime%2) = 0 && var(40) != 0
var(40) = -1
persistent = 0

[State 1001,]
type = RemoveExplod
trigger1 = Anim != 2000
trigger2 = Movetype != A
ID = 2000

[State 1001,]
type = RemoveExplod
trigger1 = Anim != 3300
trigger2 = Movetype != A
ID = 3300

[State 1001,]
type = RemoveExplod
trigger1 = Anim != 3310
trigger2 = Movetype != A
ID = 3310

[State 1001,]
type = RemoveExplod
trigger1 = enemy,movetype = H
trigger1 = enemy,stateno != 3360
ID = 3360

[State 700, エフェクト?示]
type = Explod
trigger1 = enemy,movetype = H
trigger1 = enemy,stateno = 3360
trigger1 = projhit3350 = 1
trigger1 = numExplod(3360) != 1
anim = 3340
postype = P2
pos = 0, 0
persistent = 0
sprpriority = -5
ownpal = 1
bindtime = -1
removetime = -1
removeongethit = 1
ID = 3360

[State 700, エフェクト?示]
type = Explod
triggerall = enemy,movetype = H
triggerall = enemy,prevstateno = 3360
trigger1 = enemy,stateno = 3365
trigger1 = enemy,time = 1
trigger2 = enemy,time = 1
anim = 3345
postype = P2
pos = 0, 0
persistent = 0
sprpriority = -5
ownpal = 1
removeongethit = 1
ID = 3365

[State -3, 成功したときの残像]
type = AfterImagetime
trigger1 = Movetype = H
time = 0

[State 100,]
type = StopSnd
trigger1 = command != "holdfwd"
trigger2 = Anim != 100
channel = 6

;---------------------------------------------------------------------------------
[Statedef -3];常時監視ステ?ト(p2statenoなどで相手に行動を制御された時は実行しない)
;---------------------------------------------------------------------------------

[State ]
type = varset
triggerall = !Ishelper
triggerall = !var(30)
triggerall = roundstate = 2
trigger1 = command = "AI0"
trigger2 = command = "AI1"
trigger3 = command = "AI2"
trigger4 = command = "AI3"
trigger5 = command = "AI4"
trigger6 = command = "AI5"
trigger7 = command = "AI6"
trigger8 = command = "AI7"
trigger9 = command = "AI8"
trigger10 = command = "AI9"
trigger11 = command = "AI10"
trigger12 = command = "AI11"
trigger13 = command = "AI12"
trigger14 = command = "AI13"
trigger15 = command = "AI14"
trigger16 = command = "AI15"
trigger17 = command = "AI16"
trigger18 = command = "AI17"
trigger19 = command = "AI18"
trigger20 = command = "AI19"
trigger21 = command = "AI20"
trigger22 = command = "AI21"
trigger23 = command = "AI22"
trigger24 = command = "AI23"
trigger25 = command = "AI24"
trigger26 = command = "AI25"
trigger27 = command = "AI26"
trigger28 = command = "AI27"
trigger29 = command = "AI28"
trigger30 = command = "AI29"
trigger31 = command = "AI30"
trigger32 = command = "AI31"
trigger33 = command = "AI32"
trigger34 = command = "AI33"
trigger35 = command = "AI34"
trigger36 = command = "AI35"
trigger37 = command = "AI36"
trigger38 = command = "AI37"
trigger39 = command = "AI38"
trigger40 = command = "AI39"
trigger41 = command = "AI40"
trigger42 = command = "AI41"
trigger43 = command = "AI42"
trigger44 = command = "AI43"
trigger45 = command = "AI44"
trigger46 = command = "AI45"
trigger47 = command = "AI46"
trigger48 = command = "AI47"
trigger49 = command = "AI48"
trigger50 = command = "AI49"
trigger51 = command = "AI50"
var(30) = 1

[state ]
type = varset
triggerall = !Ishelper
trigger1 = roundstate >= 3
var(30) = 0
ignorehitpause = 1

[State ]
type = ChangeState
value = 105
triggerall = var(30) = 1
triggerAll = statetype != A
TriggerAll = P2Statetype = L
TriggerAll = P2Bodydist X <= 70
TriggerAll = BackEdgeBodydist >= 30
trigger1 = ctrl

[State ]
type = ChangeState
value = ifelse((random<500),1001,1051)
triggerall = alive = 1
triggerall = !Ishelper
triggerall = var(30) = 1
triggerall = statetype != A
triggerall = p2movetype != H
triggerall = roundstate = 2
triggerall = p2bodydist X = [160,320]
trigger1 = ctrl = 1

[State ]
type = ChangeState
value = ifelse((random<500),1400,1450)
triggerall = alive = 1
triggerall = !Ishelper
triggerall = var(30) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2bodydist X = [80,120]
trigger1 = ctrl = 1
trigger1 = random <= 400
Trigger2 = P2Statetype = A
Trigger2 = P2Movetype = H
Trigger2 = StateNo = 400 && movecontact >= 1
Trigger2 = P2Bodydist X = [80,120]
trigger2 = ctrl

[State ]
type = ChangeState
value = 400
TriggerAll = Var(30) = 1
triggerAll = statetype != A
TriggerAll = P2Statetype != L
TriggerAll = P2Bodydist X = [0,34]
trigger1 = ctrl
Trigger1 = P2Statetype != A
trigger2 = stateno = 430 && movecontact >= 1

[State ]
type = ChangeState
value = 430
TriggerAll = Var(30) = 1
triggerAll = statetype != A
TriggerAll = P2Statetype != L
TriggerAll = P2Statetype != A
Trigger1 = P2Bodydist X = [0,34]
trigger1 = ctrl
Trigger2 = StateNo = 100
Trigger2 = P2Bodydist X = [-2,10]
trigger2 = ctrl

[State ]
type = ChangeState
value = 410
triggerall = statetype != A
TriggerAll = Var(59) = 4
TriggerAll = P2Statetype != L
TriggerAll = P2Bodydist X = [-2,40]
trigger1 = StateNo = 400 && AnimElem = 4
Trigger1 = MoveGuarded
Trigger1 = Var(58) = [0,49]
trigger2 = StateNo = 400 && AnimElem = 4
Trigger2 = Movehit
Trigger2 = Var(58) = [40,59]
Trigger2 = Power < 3000

[State ]
type = ChangeState
value = 440
triggerall = statetype != A
TriggerAll = Var(30) = 1
TriggerAll = P2Statetype != L
TriggerAll = P2Bodydist X = [-2,40]
trigger1 = StateNo = 400 && AnimElem = 4
Trigger1 = MoveGuarded
Trigger1 = Var(58) = [50,99]
trigger2 = StateNo = 400 && AnimElem = 4
Trigger2 = Movehit
Trigger2 = Var(58) = [60,79]
Trigger2 = Power < 3000

[State ]
type = ChangeState
value = 320
triggerall = statetype != A
TriggerAll = Var(30) = 1
TriggerAll = P2Statetype != L
TriggerAll = !InGuardDist
trigger1 = ctrl || StateNo = 100
Trigger1 = P2Bodydist X = [80,100]
Trigger1 = Random <= 100
Trigger1 = P2Statetype != A
Trigger1 = P2Movetype != H
Trigger2 = StateNo = 410
Trigger2 = MoveGuarded
Trigger2 = Var(58) = [0,49]
Trigger3 = StateNo = 410
Trigger3 = Movehit
Trigger3 = Var(58) = [50,74]

[State ]
type = ChangeState
value = 310
triggerall = statetype != A
TriggerAll = Var(30) = 1
TriggerAll = P2Statetype != L
Trigger1 = Power < 3000
trigger1 = stateno = 400 && Time = 4
Trigger1 = movehit
Trigger1 = Var(58) = [80,89]

[State ]
type = ChangeState
value = 330
TriggerAll = Var(30) = 1
triggerall = statetype != A
TriggerAll = P2Statetype != L
trigger1 = ctrl
Trigger1 = P2Bodydist X = [0,40]
Trigger1 = Random <= 100
Trigger1 = P2Statetype != A

[State ]
type = ChangeState
value = 650
TriggerAll = Var(30) = 1
triggerall = statetype = A
TriggerAll = P2Statetype != L
TriggerAll = P2StateNo < 5000
TriggerAll = P2Bodydist X <= 60
TriggerAll = Pos Y >= -30
trigger1 = ctrl

[State ]
type = ChangeState
value = 640
TriggerAll = Var(30) = 1
triggerall = stateno != 105
TriggerAll = P2Statetype != L
TriggerAll = P2Bodydist X <= 70
trigger1 = statetype = A
trigger1 = ctrl


[State ]
type = ChangeState
value = ifelse((random<500),1101,1151)
triggerall = alive = 1
triggerall = var(30) = 1
triggerall = !Ishelper
triggerall = statetype != A
triggerall = p2movetype != H
triggerall = roundstate = 2
Trigger1 = P2Bodydist X = [-2,30]
trigger1 = ctrl
Trigger2 = StateNo = 400 && movecontact >= 1
Trigger2 = P2Bodydist X = [-2,30]
trigger2 = ctrl
Trigger3 = StateNo = 430 && movecontact >= 1
Trigger3 = P2Bodydist X = [-2,30]
trigger3 = ctrl

[State ]
type = ChangeState
value = 2000
triggerall = power >= 1000
triggerall = numprojID(2000) = 0
TriggerAll = P2Statetype != L
TriggerAll = P2Bodydist X <= 200
triggerall = alive = 1
triggerall = var(30) = 1
triggerall = !Ishelper
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = P2Movetype = A
trigger1 = P2Life <= 150
trigger2 = stateno = 215 && movecontact
trigger2 = ctrl
trigger2 = P2Movetype = A
trigger2 = P2Life <= 150
trigger3 = stateno = 235 && movecontact
trigger3 = ctrl
trigger3 = P2Movetype = A
trigger3 = P2Life <= 150
trigger4 = stateno = 400 && movecontact
trigger4 = ctrl
trigger4 = P2Movetype = A
trigger4 = P2Life <= 150
trigger5 = stateno = 410 && movecontact
trigger5 = ctrl
trigger5 = P2Movetype = A
trigger5 = P2Life <= 150
trigger6 = stateno = 300 && movecontact
trigger6 = ctrl
trigger6 = P2Movetype = A
trigger6 = P2Life <= 150
trigger7 = stateno = 1101 && AnimElemtime(3) >= 0 && AnimElemtime(4) < 0 &&  movecontact
trigger7 = ctrl
trigger7 = P2Movetype = A
trigger7 = P2Life <= 150
trigger8 = stateno = 1151 && AnimElemtime(3) >= 0 && AnimElemtime(4) < 0 &&  movecontact
trigger8 = ctrl
trigger8 = P2Movetype = A
trigger8 = P2Life <= 150

[State ]
type = ChangeState
value = 2100
triggerall = power >= 1000
TriggerAll = P2Statetype != L
TriggerAll = P2Bodydist X <= 70
triggerall = alive = 1
triggerall = var(30) = 1
triggerall = !Ishelper
trigger1 = statetype != A
trigger1 = ctrl
Trigger1 = P2Movetype = A
Trigger1 = P2Life <= 150
trigger2 = stateno = 400 && movehit
Trigger2 = Random <= 50
Trigger2 = Life < 500
trigger3 = stateno = 1101 && AnimElemtime(3) >= 0 && AnimElemtime(4) < 0 &&  movehit
Trigger3 = Random <= 50
Trigger3 = Life < 500
trigger4 = stateno = 1151 && AnimElemtime(3) >= 0 && AnimElemtime(4) < 0 &&  movehit
Trigger4 = Random <= 50
Trigger4 = Life < 500
trigger5 = stateno = 1151 && AnimElemtime(3) >= 0 && AnimElemtime(4) < 0 &&  movehit
Trigger5 = Power >= 3000
Trigger5 = P2Life <= 350

[State ]
type = ChangeState
value = ifelse((random<500),3100,4000)
triggerall = power >= 1000
triggerall = var(30) = 1
triggerAll = statetype != A
TriggerAll = P2Statetype != L
trigger1 = ctrl || StateNo = 100
Trigger1 = P2Bodydist Y >= -50
Trigger1 = P2Movetype = A
Trigger2 = StateNo = 1101 && movecontact >= 1
Trigger2 = P2Bodydist X = [-2,100]
trigger2 = ctrl
Trigger2 = P2Statetype = A
Trigger2 = P2Movetype = H
Trigger3 = P2Statetype = A
Trigger3 = P2Movetype = H
Trigger3 = StateNo = 1151 && movecontact >= 1
Trigger3 = P2Bodydist X = [-2,100]
trigger3 = ctrl

[State -3, 投げ]
type  = ChangeState
value = 800
triggerall = var(30) = 1
triggerall = !Ishelper
triggerall = roundstate = 2
triggerall = Random = [0,59]
triggerall = statetype = S
triggerall = ctrl
trigger1   = P2BodyDist X = [-3,3]
trigger1   = p2statetype != A
trigger1   = p2statetype != L
trigger1   = p2movetype != H

;---------------------------------------------------------------------------
[Statedef 3200]
type     = A
movetype = I
physics  = N
juggle   = 0
ctrl     = 0
anim     = 3200
sprpriority = 5

[State 820, 1]
type = ChangeAnim
triggerall = root,var(40) != 0
triggerall = enemy,movetype != H
triggerall = p2stateno != [5000,5999]
triggerall = enemy,anim != [5000,5999]
triggerall = root,movetype != A
trigger1 = p2stateno >= 1000
trigger2 = p2stateno = 0 && enemy,prevstateno = [5000,5999]
trigger2 = enemy,Anim = 0
value = 3210

[State 820, 1]
type = ChangeAnim
trigger1 = Anim = 3210
trigger1 = AnimTime = 0
value = 3200

[State 820, 1]
type = Statetypeset
triggerall = root,var(40) != 0
trigger1 = Anim = 3210
movetype = A

[State 820, 1]
type = Statetypeset
triggerall = root,var(40) != 0
trigger1 = Anim = 3200
movetype = I

[State 200, ヒット定?]
type = HitDef
triggerall = Anim = 3210
triggerall = enemy,movetype != H
triggerall = p2stateno != [5000,5999]
trigger1 = root,var(40) != 0
attr = A, HA
damage = 0,0
numhits = 0
hitflag = MAFD
priority = 5, Hit
pausetime = 0, 0
sparkno = -1
palfx.time = (root,var(40))*2
palfx.add = 0,80,0
palfx.color = 0

[State 1001, ]
type = TargetState
triggerall = enemy,statetype != A
trigger1 = Movehit
value = 3210

[State 1001, ]
type = TargetState
triggerall = enemy,statetype = A
trigger1 = Movehit
value = 3220

[State 1001, このヘルパ?を消す]
type = DestroySelf
trigger1 = root,var(40) = 0
trigger2 = root,WinKO

;---------------------------------------------------------------------------
;封印状態

[Statedef 3210]
type    = A
movetype= H
physics = N
ctrl = 0
anim = 0

[State 192, ]
type = HitBy
trigger1 = 1
value = SCA

[State 1000, ]
type = Posset
trigger1 = time = 0
y = 0

[State 820, 1]
type = SelfState
trigger1 = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;封印状態(空中)

[Statedef 3220]
type    = A
movetype= H
physics = A
ctrl = 0

[State 192, ]
type = HitBy
trigger1 = 1
value = SCA

[State 1000, ]
type = Veladd
trigger1 = time >= 0
y = .4

[State 820, 1]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 47
