
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	忢帪娔帇僗僥乕僩
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[Statedef -2]

[State -2, VarSet];晞柤ON,OFF
Type = VarSet
Trigger1 = 1
V = 54
Value = 1

[State -2]
Type     = Helper
triggerall = palno = [7,12]
TriggerAll = NumHelper(7222) = 0
Trigger1 = time = 0
Stateno  = 7222
ID       = 7222
persistent = 0
Pos      = 0,0
PosType  = P1
OwnPal   = 1
Keyctrl  = 0
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999
Size.XScale = 1.05
Size.YScale = 1.05

[State -2]
Type     = Helper
triggerall = palno = [7,12]
Triggerall = NumHelper(7220) = 0
Trigger1 = time = 0
Stateno  = 7220
ID       = 7220
OwnPal   = 1
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999
Size.XScale = 1.025
Size.YScale = 1.025








;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	僆僾僔儑儞娭學
;--------------------------------------------------
[State -2, VarSet];楈椡僎乕僕昞帵埵抲 X
Type = VarSet
Trigger1 = 0
V = 36
Value = 109

[State -2, VarSet];楈椡僎乕僕昞帵埵抲 Y
Type = VarSet
Trigger1 = 0
V = 37
Value = 234

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	僔僗僥儉娭學
;--------------------------------------------------

[State -2, Helper];楈椡昞帵梡僿儖僷乕屇傃弌偟
Type = Helper
Trigger1 = NumHelper(6900) = 0
OwnPal = 1
PosType = P1
Pos = 0, 0
ID = 6900
StateNo = 6900
PauseMoveTime = 999999
SuperMoveTime = 999999
Name = " "

[State -2, Helper]
Type = Helper
Trigger1 = NumHelper(6960) = 0
Trigger1 = Var(16) = 1
OwnPal = 1
PosType = P1
Pos = 0, 0
ID = 6960
StateNo = 6960
PauseMoveTime = 999999
SuperMoveTime = 999999
Name = " "


[State -2, VarSet];嬻拞僟僢僔儏惂屼丂弶婜壔
Type = VarSet
Trigger1 = Time = 0
Trigger1 = StateType != A
V = 10
Value = 40

[State -2, VarSet];崅懍僕儍儞僾丂擖椡帪娫愝掕
Type = VarSet
Trigger1 = Command = "2"
V = 11
Value = 10

[State -2, VarAdd];崅懍僕儍儞僾丂擖椡帪娫尭彮
Type = VarAdd
Trigger1 = Var(11) > 0
V = 11
Value = -1

[State -2, AfterImage];僟儊乕僕帪巆憸徚嫀
Type = AfterImage
Trigger1 = MoveType = H
Trigger2 = StateNo = [0,40]
Trigger3 = StateNo = 52
Time = 0
IgnoreHitPause = 1

[State -2, AssertSpecial];嬻拞杊屼晄壜擻乮楈椡柍偟偺帪乯
Type = AssertSpecial
Trigger1 = Var(41) = 1
Flag = NoAirGuard

[State -2, VarSet];僈乕僪僋儔僢僔儏敾掕丂弶婜壔
Type = VarSet
Trigger1 = MoveType = H
Trigger2 = Ctrl
V = 33
Value = 0

[State -2, VarSet];僇僂儞僞乕僸僢僩敾掕丂弶婜壔
Type = VarSet
Trigger1 = MoveType = H
Trigger2 = Ctrl
V = 35
Value = 0

[State -2, VarSet];婲偒忋偑傝抶墑帪娫偺愝掕
Type = VarSet
Trigger1 = MoveType != H
V = 9
Value = 60

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	僌儗僀僘張棟乮懳 搶曽僉儍儔梡乯
;--------------------------------------------------
[State -2, VarSet];僌儗僀僘ON
Type = VarSet
TriggerAll = NumEnemy > 0
TriggerAll = Var(16) = 0
TriggerAll = StateNo = [100,119]
Trigger1   = (EnemyNear,Name="Marisa Kirisame")		&&(EnemyNear,AuthorName="Toma")
Trigger2   = (EnemyNear,Name="Patchouli")		&&(EnemyNear,AuthorName="Toma")
Trigger3   = (EnemyNear,Name="remilia")			&&(EnemyNear,AuthorName="kuri")
Trigger4   = (EnemyNear,Name="youmu_konpaku")		&&(EnemyNear,AuthorName="rouge noir")
Trigger5   = (EnemyNear,Name="Yakumo Yukari")		&&(EnemyNear,AuthorName="Daiya (Diamond)")
Trigger6   = (EnemyNear,Name="Hong Meirin")		&&(EnemyNear,AuthorName="Daiya(Diamond)")
Trigger7   = (EnemyNear,Name="Alice_Margatroid")	&&(EnemyNear,AuthorName="SUI")
Trigger8   = (EnemyNear,Name="Alice Margatroid")	&&(EnemyNear,AuthorName="Souki")
Trigger9   = (EnemyNear,Name="Sakuya Izayoi")		&&(EnemyNear,AuthorName="nukenashi")
Trigger10  = (EnemyNear,Name="Yukari Yakumo")		&&(EnemyNear,AuthorName="Shiroto")
Trigger11  = (EnemyNear,Name="Izayoi Sakuya Brando")	&&(EnemyNear,AuthorName="GATT")
Trigger12  = (EnemyNear,Name="Reimu_Hakurei")		&&(EnemyNear,AuthorName="Kurogane")
Trigger13  = (EnemyNear,Name="Yukari_Yakumo")		&&(EnemyNear,AuthorName="Kurogane")
Trigger14  = (EnemyNear,Name="Yuyuko_Saigyouji")	&&(EnemyNear,AuthorName="Kurogane")
Trigger15  = (EnemyNear,Name="Youmu_Konpaku")		&&(EnemyNear,AuthorName="Kurogane")
Trigger16  = (EnemyNear,Name="Patchouli_Knowledge")	&&(EnemyNear,AuthorName="Kurogane")
Trigger17  = (EnemyNear,Name="Sakuya_Izayoi")		&&(EnemyNear,AuthorName="Aotsuki")
Trigger18  = (EnemyNear,Name="Suika_Ibuki")		&&(EnemyNear,AuthorName="Aotsuki")
Trigger19  = (EnemyNear,Name="Aya_Syameimaru")		&&(EnemyNear,AuthorName="Aotsuki")
Trigger20  = (EnemyNear,Name="Hong_Meirin")		&&(EnemyNear,AuthorName="Aotsuki")
V = 16
Value = 1

[State -2, VarSet];僌儗僀僘OFF
Type = VarSet
TriggerAll = Var(16) = 1
Trigger1   = StateNo != [100,119]
V = 16
Value = 0



;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	楈椡娗棟
;--------------------------------------------------
[State -2, VarSet];楈椡嵟掅抣偼 0
Type = VarSet
Trigger1 = Var(40) < 1000
IgnoreHitPause = 1
V = 40
Value = 1000

[State -2, VarSet];楈椡嵟戝抣偼 1000
Type = VarSet
Trigger1 = Var(40) > 1000
IgnoreHitPause = 1
V = 40
Value = 1000

[State -2, PlaySnd];楈椡夞暅捠抦
Type = PlaySnd
Trigger1 = Var(40) = 1000
Trigger1 = Var(41) = 1
IgnoreHitPause = 1
Value = S100, 34

[State -2, VarSet];1000偵側偭偨傜楈椡巊梡壜擻乮惂屼 0乯
Type = VarSet
Trigger1 = Var(40) = 1000
Trigger1 = Var(41) = 1
IgnoreHitPause = 1
V = 41
Value = 0

[State -2, PlaySnd];楈椡愗傟捠抦
Type = PlaySnd
Trigger1 = RoundState = 2
Trigger1 = Var(40) = 0
Trigger1 = Var(41) = 0
IgnoreHitPause = 1
Value = S100, 30

[State -2, VarSet];0傑偱尭偭偨傜楈椡巊梡晄壜乮惂屼 1乯
Type = VarSet
Trigger1 = Var(40) = 0
Trigger1 = Var(41) = 0
IgnoreHitPause = 1
V = 41
Value = 0

[State -2, VarAdd];0傑偱尭偭偨傜忋徃
Type = VarAdd
Trigger1 = Var(41) = 1
IgnoreHitPause = 1
V = 40
Value = 2

[State -2, VarAdd];帺摦夞暅
Type = VarAdd
Trigger1 = Var(42) = 0
Trigger1 = Var(40) < 1000
Trigger1 = Var(41) = 0
IgnoreHitPause = 1
V = 40
Value = 3

[State -2, VarAdd];楈椡夞暅柍岠帪娫
Type = VarAdd
Trigger1 = Var(42) > 0
IgnoreHitPause = 1
V = 42
Value = -1

;	暻抂挼傃墇偟杊巭慬抲
;丂仸揤抧巵偺俫俹傪嶲峫偵偝偣偰偄偨偩偒傑偟偨
;--------------------------------------------------
[State -2, Width]
Type = Width
TriggerAll = FrontEdgeDist < 8
TriggerAll = MoveType != H
Trigger1 = StateNo != [3040,3043]
Trigger1 = StateNo != [3050,3053]
Trigger1 = StateNo != [3525,3527]
Edge = 3,

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	僈乕僪僄僼僃僋僩昞帵
;--------------------------------------------------
[State -2, Explod];棫偪僈乕僪僄僼僃僋僩
Type = Explod
TriggerAll = Time = 0
TriggerAll = NumExplod(6950) < 3
Trigger1 = StateNo = 150
Anim = 6950
ID = 6950
Pos = 14, -40
PosType = P1
Facing = 1
BindTime = -1
SprPriority = 10
OwnPal = 1

[State -2, Explod];孅僈乕僪僄僼僃僋僩
Type = Explod
TriggerAll = Time = 0
TriggerAll = NumExplod(6950) < 3
Trigger1 = StateNo = 152
Anim = 6950
ID = 6950
Pos = 20, -24
PosType = P1
Facing = 1
BindTime = -1
SprPriority = 10
OwnPal = 1

[State -2, Explod];嬻拞僈乕僪僄僼僃僋僩
Type = Explod
TriggerAll = Time = 0
TriggerAll = NumExplod(6950) < 3
Trigger1 = StateNo = 154
Anim = 6950
ID = 6950
Pos = 31, -48
PosType = P1
Facing = 1
BindTime = -1
SprPriority = 10
OwnPal = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	峌寕僄僼僃僋僩徚嫀
;--------------------------------------------------
[State -2, RemoveExplod];儗僶乕対
Type = RemoveExplod
Trigger1 = StateNo != [210,211]
Trigger1 = NumExplod(210) > 0
IgnoreHitPause = 1
ID = 210

[State -2, RemoveExplod];儗僶乕対
Type = RemoveExplod
Trigger1 = StateNo != [210,211]
Trigger1 = NumExplod(211) > 0
IgnoreHitPause = 1
ID = 211

[State -2, RemoveExplod];僋儔僢僔儏対
Type = RemoveExplod
Trigger1 = StateNo != 240
Trigger1 = NumExplod(240) > 0
IgnoreHitPause = 1
ID = 240

[State -2, RemoveExplod];僋儔僢僔儏廟
Type = RemoveExplod
Trigger1 = StateNo != 440
Trigger1 = NumExplod(440) > 0
IgnoreHitPause = 1
ID = 440

[State -2, RemoveExplod];嬻拞対
Type = RemoveExplod
Trigger1 = StateNo != 600
Trigger1 = NumExplod(600) > 0
IgnoreHitPause = 1
ID = 600

[State -2, RemoveExplod];嬻拞対
Type = RemoveExplod
Trigger1 = StateNo != 600
Trigger1 = NumExplod(600) > 0
IgnoreHitPause = 1
ID = 600

[State -2, RemoveExplod];僨乕儌儞儘乕僪僋儗僀僪儖俙
Type = RemoveExplod
Trigger1 = StateNo != [1021,1022]
Trigger1 = NumExplod(6220) > 0
IgnoreHitPause = 1
ID = 6220

[State -2, RemoveExplod];僨乕儌儞儘乕僪僋儗僀僪儖俛
Type = RemoveExplod
Trigger1 = StateNo != [1031,1032]
Trigger1 = NumExplod(6230) > 0
IgnoreHitPause = 1
ID = 6230

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	儌乕僪暿巇條
;--------------------------------------------------

[State -2]
type = AssertSpecial
triggerall = palno = [7,12]
trigger1 = 1
trigger1 = !ishelper
flag  = nostandguard
flag2 = nocrouchguard
flag3 = noairguard


[State -2, PowerSet];僷儚乕MAX
Type = null;PowerSet
Trigger1 = PalNo = 12
Value = PowerMax

[State -2, VarSet]
Type = VarSet
Trigger1 = 1
V = 58
Value = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	攕杒敾掕
;--------------------------------------------------
[State -2, VarSet]
Type = VarSet
Trigger1 = StateNo = 5150
Trigger1 = Lose
V = 51
Value = 1


;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	僎乕僕僆僼
;--------------------------------------------------
[State -2, VarAdd]
Type = Null;VarAdd
TriggerAll = Var(30)%10 = 0
Trigger1 = Var(46) = 1
Trigger1 = Var(52) = 9
V = 30
Value = 1

[State -2, AssertSpecial]
Type = AssertSpecial
Trigger1 = Var(30)%10 = 1
Flag = NoBarDisplay
IgnoreHitPause = 1

[State -2, VarAdd]
Type = VarAdd
TriggerAll = (Var(30)/10)%10 = 0
TriggerAll = NumEnemy > 0
Trigger1 = Enemy,Name = "Reimu_Hakurei"
Trigger1 = Enemy,AuthorName = "Nachel"
Trigger1 = Enemy,Var(30)%10 = 1
;Trigger2 = Var(46) = 1
;Trigger2 = Var(52) = 9
V = 30
Value = 10

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	儘乕僇儖儖乕儖
;--------------------------------------------------
;
;丂丂奺惢嶌幰偑梡堄偟偨僗僥僐儞傪捛壛偟傑偟偨偑丄
;丂堦晹曄峏傕偟傑偟偨丅
;
;丂丂丂曄峏丄傑偨偼捛壛偟偨僩儕僈乕
;丂丂丂丒亀TriggerAll = NumEnemy > 0亁
;丂丂丂丒亀Enemy,亁仺亀EnemyNear,亁
;
;--------------------------------------------------
;	嘓巵偺愒庨廐梩偺乽廱傪徟偑偡乿
;--------------------------------------------------

[State -2, Local-Rules]
Type = PowerAdd
TriggerAll = NumEnemy > 0
TriggerAll = EnemyNear,AuthorName = "嘓"
TriggerAll = EnemyNear,Name = "Akiha_Vermilion"
Trigger1   = EnemyNear,Var(47) = 1
Value = -26

;--------------------------------------------------
;	憈婱巵偺桯乆巕偺乽楈晞丒庻柦乿
;--------------------------------------------------


;--------------------------------------------------
;	悈塭巵偺渎崄偺乽婼敍傝偺弍 & 巤夓婼敍傝偺弍乿
;--------------------------------------------------
[State -2, Local-Rules]
Type = VarAdd
TriggerAll = Var(41) = 0; 僋儔僢僔儏拞偼彍奜
TriggerAll = NumEnemy > 0
TriggerAll = EnemyNear,Name = "Suika Ibuki"
TriggerAll = EnemyNear,AuthorName = "Mikage"
Trigger1 = EnemyNear,FVar(23) > 0
Trigger2 = EnemyNear,FVar(24) > 0
V = 40
Value = -3

[State -2, Local-Rules]
Type = VarSet
TriggerAll = NumEnemy > 0
TriggerAll = EnemyNear,Name = "Suika Ibuki"
TriggerAll = EnemyNear,AuthorName = "Mikage"
Trigger1 = EnemyNear,FVar(23) > 0
Trigger2 = EnemyNear,FVar(24) > 0
V = 42
Value = 1

;--------------------------------------------------
;	僪儘僂傿儞巵偺傾儖僇僫僉儍儔偺杺傾儖僇僫偺撆岠壥
;--------------------------------------------------
[State -2, Local-Rules]
Type = PowerAdd
TriggerAll = NumEnemy > 0
TriggerAll = EnemyNear,AuthorName = "Drowin arcana"
TriggerAll = EnemyNear,FVar(20) > 0
Trigger1 = Power > 0
Value = -1


[State -2, Local-Rules]
Type = PalFx
TriggerAll = NumEnemy > 0
TriggerAll = EnemyNear,Authorname = "Drowin arcana"
Trigger1 = EnemyNear,FVar(20) > 0
Add = 100,0,110
Mul = 220,220,220
Time = 5
IgnoreHitPause = 1

[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%20) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = 0,-25
bindtime = -1 
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%35) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = 20,-20
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%30) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = -20,-50
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%40) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = -10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%46) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = -10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%49) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = 0,-30
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999



[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%46) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 10,-10
bindtime = -1 
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%38) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -2]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%42) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 0,-20
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -2,Explod]
type = Explod
triggerall = anim = 0
triggerall = time >= 17
trigger1 = (GameTime%5) = 0
anim = 22125;22063
sprpriority = 11
scale = 0.9,0.85
postype = p1
pos = 0,0
bindtime = 100
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999
trans = add



[State -2,Explod]
type = Explod
triggerall = palno = [7,12]
triggerall = anim = 0
triggerall = time >= 17
trigger1 = (GameTime%5) = 0
anim = 22126;22063
sprpriority = -4
postype = p1
pos = 0,-5
bindtime = 100
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999
trans = add

[State -2,Explod]
type = Explod
triggerall = palno = [7,12]
triggerall = anim = 0
triggerall = time >= 17
trigger1 = (GameTime%5) = 0
anim = 22300;22063
scale = 0.9,0.9
sprpriority = -1
postype = p1
pos = -5,-12
bindtime = 100
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999
trans = add

[state -2]
type = nothitby
triggerall = palno = [7,12]
trigger1 = 1
value= SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = -1
ignorehitpause = 1
pausemovetime = 9999999999999999999
supermovetime = 9999999999999999999

[State -2]
type = PalFX
triggerall = palno = [7,12]
trigger1 = time = 0
time = 9999999999999999999999
add = 5,5,25
;mul = 0,0,0
sinadd = 60,60,70,70


[State a] 
type = null;Afterimage
triggerall = stateno != [190,194]
trigger1 = TIME = 0
trans = add
PalContrast =  250, 250, 250
PalBright = 0,0,0
time    =  -1
length  = 13
TimeGap = 1
FrameGap = 1


[State -2, ]
type = poweradd
triggerall = palno = 12
trigger1 = time >= 0
value = 15

[State -2, ]
type = poweradd
triggerall = palno = [7,12]
trigger1 = time >= 0
value = 18

[State -2,]
type = lifeadd
triggerall = palno = [7,12]
trigger1 = roundstate = 3
value = 200

[State -2,]
type = lifeadd
triggerall = palno = [7,11]
trigger1 = power >= 3000
trigger1 = time >= 0
value = 3+(random%2)

[State -2,]
type = lifeadd
triggerall = palno =12
trigger1 = power >= 3000
trigger1 = time >= 0
value = 10 +(random%2)

[State -2,]
type = lifeadd
triggerall = palno = [7,12]
trigger1 = roundstate = 2
trigger1 = life >= 20
trigger1 = (GameTime%2) = 0
value = -2

[State -2, ]
type = attackmulset
triggerall = palno = [1,6]
trigger1 = time >= 0
value = 0.8



[State -2]
type = LifeAdd
triggerall = roundstate = 2
;trigger1 = !ishelper
trigger1 = Helper(450000),GetHitVar(Damage)
value = -1
absolute = 1
ignorehitpause = 1
pausemovetime = 9999999999999999999
supermovetime = 9999999999999999999
;---------------------------------------------------------------------


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


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

;---------------------------------------------------------------------
;---------------------------------------------------------------------
[state -2]
type = helper
triggerall = roundstate = 2
triggerall =  palno = [7,12]
trigger1 = numhelper(450000) = 0
name = "hit"
helpertype = normal
id = 450000
stateno = 450000
pos = 0,0
postype = p1
ownpal= 1

[State -2]
type = helper
Triggerall = palno = 12
Triggerall = roundno >= 2
trigger1 = numhelper(288888)=0
id = 288888
persistent = 0
name = "god"
pos = 0,0
postype = P1
stateno = 288888
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[Statedef 288888]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22132
ownpal = 1

[State 1]
type = BindToroot
trigger1 = 1
pos = 0,0

[State 1]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA,AT,AP,ST,NA,SA,HA,NP,SP,HP
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s7034
hitsound = s400,35
p1stateno = 288889-(power>=powermax*0.5&&(root,var(30)!=1||root,var(30)!=0&&root,fvar(28)=0))
p2stateno = IfElse((root,var(29)>=1),103999,13121)
;p1getp2state = (root,var(30)!=1||root,var(30)!=0&&root,fvar(28)=0)
getpower = (Const(data.power))/8

[state 1]
type = targetdrop
trigger1 = root,alive=0||roundstate>=3&&enemy,alive=0
;excludeid = 288888

[state 1]
type = null;targetstate
triggerall = root,var(29) >= 1
trigger1 = target,stateno != [103999,104007]
value = 103999

[State 1]
type = targetLifeAdd
trigger1 = (gametime%10)=1
value = -(enemy,lifemax*(0.004+((enemy,movetype=A)*0.02)))
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1]
type = targetLifeAdd
trigger1 = enemy,life<=enemy,lifemax*0.3
value = -9999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 1]
type = nothitby
trigger1 = 1
value = SCA

[State 1]
type = ChangeState
trigger1 = (root,stateno=2999||root,stateno=2205)
value = 288890+(root,stateno=2205)

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

[Statedef 288889]
type    = S
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22132
ownpal = 1

[State 1]
type = BindToroot
trigger1 = 1
pos = 0,0

[state 2901,1]
type = nothitby
trigger1 = 1
value = SCA

[state -2]
type = parentvarset
trigger1 = RoundState <= 2 && root,anim = 0 && root,ctrl = 0 && root,var(54) <= 40
fv = 25
value = 1
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 2]
type = destroyself
trigger1 = time>=(root,var(54)<=40)

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

[Statedef 288890]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22177
ownpal = 1

[State 1]
type = BindToroot
trigger1 = 1
pos = 0,0

[state 1]
type = varset
trigger1 = numtarget&&target,ishelper=0||root,fvar(20)!=0
v = 10
value = (RoundState<=2)
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[state 1]
type = varset
trigger1 = root,fvar(38)=2
trigger1 = root,time<150&&enemy,movereversed
trigger2 = root,time>=150
v = 11
value = (root,time<150)
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s7034
hitsound = s400,35
p2stateno = 169995

[State 1]
type = AttackDist
trigger1 = 1
value = 0

[State 1]
type = targetpowerAdd
trigger1 = 1
value = -(enemy,Const(data.power))
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1]
type = targetLifeAdd
trigger1 = (gametime%(1+((root,time<150)*3)))=1
value = -9999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 1]
type = targetstate
trigger1 = root,stateno=22050&&root,time>=150
value = 169995
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 1]
type = targetstate
trigger1 = var(11)!=0&&root,fvar(38)=2
trigger1 = enemy,alive&&root,time<150
value = 169995
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1]
type = Projectile
trigger1 = root,palno=12&&root,stateno=22050&&(root,time=[30,170])&&var(10)!=0
trigger1 = (GameTime%6)=1
attr = S, NA
projanim = 22177
projhitanim = -1
projid = 22177
projpriority = 9999999999
projsprpriority = 5
projremove = 1
projremovetime = 2
postype = p1
offset = 0,0
velocity = 0
animtype  = hard
numhits = 0
damage    = 21474836
getpower = 0,0
givepower = -(enemy,Const(data.power))
hitflag = MAFD
guardflag = 
pausetime = 2,1
guard.pausetime = 2,1
sparkno = -1
sparkxy = 40,-74
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = high
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -0.2,-0.5
air.velocity = -0.2,-0.5
fall = 1
fall.recover = 0
yaccel = .7
p2stateno = 49000
ignorehitpause = 1

[state 1]
type = nothitby
trigger1 = 1
value = SCA

[State 1]
type = ChangeState
trigger1 = !(root,stateno=22050||root,stateno=2999)
value = 288888

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

[Statedef 288891]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 22177
ownpal = 1

[State 1]
type = BindToroot
trigger1 = 1
pos = 0,0

[State 1]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s7034
hitsound = s400,35
p2stateno = 2636

[State 1]
type = AttackDist
trigger1 = 1
value = 0

[State 1]
type = targetpowerAdd
trigger1 = 1
value = -(enemy,Const(data.power))
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1]
type = targetLifeAdd
trigger1 = root,stateno=2205&&(root,time=[20,220])
value = -9999999999
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 1]
type = targetstate
trigger1 = root,stateno=2205&&(root,time=[20,220])&&(GameTime%3) = 1
value = 2636
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[state 1]
type = nothitby
trigger1 = 1
value = SCA

[State 1]
type = ChangeState
trigger1 = root,stateno!=2205
value = 288888

[Statedef 103999]
type    = A
movetype= I
physics = N
sprpriority = 4
velset = -2,-6

[State 1]
type = lifeadd
triggerall = prevstateno != [19000,19035]
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.1 * Const(data.life)))
absolute = 1

[state a]
type = destroyself
trigger1 = ishelper

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

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 5050, 1]
type = ChangeAnim
trigger1 = time = 0
value = 5070

[State 821, 1]
type = VelAdd
Trigger1 = time > 0
y = .39

[State -2]
type = SelfState
trigger1 = time >= 200
value = 0
ctrl = 1

[State 821, 4]
type = changeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 104000

;---------------------------------------------------------------------------
;憡庤惂屼
;憡庤抧柺
;---------------------------------------------------------------------------

[Statedef 104000]
type    = L
movetype= I
physics = N

[state a]
type = destroyself
trigger1 = ishelper

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

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 10382]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 10382]
type = FallEnvShake
trigger1 = Time = 0

[State 10382]
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 10382]
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 10382]
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 10382]
type = PosSet
trigger1 = Time = 0
y = 0

[State 10382]
type = VelSet
trigger1 = Time = 0
y = 0

[State 10382]
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 10382]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 104002

[State 10382]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 10382]
type = HitFallDamage
trigger1 = Time = 3

[State 10382]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 10382]
type = PosFreeze
trigger1 = 1

[State -2]
type = SelfState
trigger1 = time >= 300
value = 0
ctrl = 1

[State 10382]
type = ChangeState
trigger1 = AnimTime = 0
value = 104001

;---------------------------------------------------------------------------
;憡庤抧柺
;---------------------------------------------------------------------------

[Statedef 104001]
type    = L
movetype= I
physics = N

[state a]
type = destroyself
trigger1 = ishelper

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

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 10383]
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 10383]
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 10383]
type = HitFallVel
trigger1 = Time = 0

[State 10383]
type = PosSet
trigger1 = Time = 0
y = 20

[State 10383]
type = VelAdd
trigger1 = 1
y = .4

[State 10383]
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 104002

;---------------------------------------------------------------------------
;憡庤抧柺
;---------------------------------------------------------------------------

[Statedef 104002]
type    = L
movetype= I
physics = N

[state a]
type = destroyself
trigger1 = ishelper

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

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 10384]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 10384]
type = FallEnvShake
trigger1 = Time = 0

[State 10384]
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 10384]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 10384]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 10384]
type = HitFallDamage
trigger1 = Time = 0

[State 10384]
type = PosSet
trigger1 = Time = 0
y = 0

[State 10384]
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 10384]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 10384]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 10384]
type = VelSet
trigger1 = Time = 0
y = 0

[State 10384]
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
value = 5110 + (anim % 10)

[State 10384]
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
value = 5110

[State 10384]
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
trigger3 = Anim = [5110,5119]
value = 5150

[State 10384]
type = ChangeState
triggerall = alive
trigger1 = Time >= 30
value = 104004

[State -2]
type = SelfState
trigger1 = time >= 300
value = 0
ctrl = 1

[State 10384]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 10384]
type = VelMul
trigger1 = 1
x = 0.85

;---------------------------------------------------------------------------
;憡庤婲偒忋偑傝
;---------------------------------------------------------------------------

[Statedef 104004]
type    = L
movetype= I
physics = N

[state a]
type = destroyself
trigger1 = ishelper

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 10385]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 10385] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 10385]
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 10385]
type = VelSet
trigger1 = Time = 0
x = 0

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

[State 10385]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 10385]
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 10385]
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

[State -2]
type = SelfState
trigger1 = time >= 300
value = 0
ctrl = 1

[State 10385]
type = ChangeState
trigger1 = AnimTime = 0
value = 104005
ctrl = 0

;---------------------------------------------------------------------------
; 棫偪
;---------------------------------------------------------------------------

[Statedef 104005]
type = S
physics = S
sprpriority = 0
movetype = I
ctrl = 0

[State a] 
type = Afterimage
trigger1 = 1
trans = add
PalContrast =  0, 0, 0
PalBright = 0,0,0
time    =  0

[state a]
type = destroyself
trigger1 = ishelper

[State 1] 
type = turn 
trigger1 = p2dist x< 0 
value = 1

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

[State a]
type = PalFX
trigger1 = (GameTime%2) = 1
time = 1
add = 100,100,180
ignorehitpause = 1

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(4) = 0
IgnoreHitPause = 1

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 1]
type = lifeset
trigger1 = command = "holdup" || command = "holddown" && Random <= 25
ignorehitpause = 1
value = life - (Ceil((IfElse((command = "holdup"),0.004,1.0)) * Const(data.life)))

[State 1]
type = lifeset
trigger1 = alive
ignorehitpause = 1
value = life - (Ceil(0.002 * Const(data.life)))

[State 1]
type = lifeset
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 1]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 0, 1]
type = ChangeAnim
trigger1 = time = 0
value = 0

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

[State 0, 3] 
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

[State 0, 4]
type = ChangeState
triggerall = alive
trigger1 = command = "holdfwd" || command = "holdback"
value = 104006
ctrl = 0

[State 0, 4]
type = selfState
triggerall = alive
trigger1 = time >= 500
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 曕偒
;---------------------------------------------------------------------------

[Statedef 104006]
type    = S
physics = N
sprpriority = 0
movetype = I
ctrl = 0

[State a] 
type = Afterimage
trigger1 = 1
trans = add
PalContrast =  0, 0, 0
PalBright = 0,0,0
time    =  0

[state a]
type = destroyself
trigger1 = ishelper

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

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(4) = 0
IgnoreHitPause = 1

[State a]
type = PalFX
trigger1 = (GameTime%2) = 1
time = 1
add = 100,100,180
ignorehitpause = 1

[State -1]
type = CtrlSet
trigger1 = ctrl = 1
value = 0

[State 1]
type = lifeset
trigger1 = command = "holdup" || command = "holddown" && Random <= 25
ignorehitpause = 1
value = life - (Ceil((IfElse((command = "holdup"),0.004,1.0)) * Const(data.life)))

[State 1]
type = lifeset
trigger1 = (GameTime%4) = 1
ignorehitpause = 1
value = life - (Ceil(0.001 * Const(data.life)))

[State 1]
type = lifeset
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 1]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21
value = 21

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

[State 0, 4]
type = ChangeState
triggerall = alive
trigger1 = !(command = "holdfwd" || command = "holdback")
value = 104005
ctrl = 0

[State 0, 4]
type = selfState
triggerall = alive
trigger1 = time >= 500
value = 0
ctrl = 1

[Statedef 169995]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = 0,0

[State 169995]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0

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

[State 169995]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[State 169995]
type = lifeset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 169995]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[state 169995]
type = varset
trigger1 = ishelper && time = 0
v = 2
value = prevstateno

[state 169995]
type = varset
trigger1 = ishelper && time = 0
v = 3
value = anim

[State 169995]
type = ChangeAnim
trigger1 = time = 0 && !ishelper
value = 5070

[state 169995]
type = changestate
trigger1 = IfElse((ishelper),(time>=1),(time>=2))
value = IfElse((ishelper),169994,0)

[Statedef 49000]
type    = S
movetype= H
physics = N
velset = 0,0

[state a]
type = destroyself
trigger1 = ishelper

[State 1]
type = AssertSpecial
trigger1 = enemynear,name="Remilia_Scarlet"
flag = invisible

[State 1]
type = lifeadd
trigger1 = 1
value = -9999999999
absolute = 1

[State 1]
type = lifeset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 1]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(4) = 0
IgnoreHitPause = 1

[State 1];僇儊儔屌掕
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 9000, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

[State 9000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 9000, 3]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 9000, 4]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 9000, 5]
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 9000, 6]
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
value = a

[State 9000, 7]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 49001

[State 9000, 8]
type = ChangeState
trigger1 = HitShakeOver
value = 49030

[state a]
type = Changestate
trigger1 = !alive
value = 104010

[State 9000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 9000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 9000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

[Statedef 49001]
type    = S
movetype= H
physics = S

[State 1]
type = AssertSpecial
trigger1 = enemynear,name="Remilia_Scarlet"
flag = invisible

[State 1];僇儊儔屌掕
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 9001, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

[State 9001, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 9001, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 9001, 4]
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 9001, 5]
type = VelSet
trigger1 = HitOver
x = 0

[State 9001, 6]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[state a]
type = Changestate
trigger1 = !alive
value = 104010

[State 9001, 7]
type = SelfState
trigger1 = HitOver
value = 0
ctrl = 1

[Statedef 104010]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = 0,80

[State a] 
type = Afterimage
trigger1 = 1
trans = add
PalContrast =  0, 0, 0
PalBright = 0,0,0
time    =  0

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

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 1]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[state a]
type = destroyself
trigger1 = ishelper

[State 13121]
type = lifeset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
trigger1 = 1
ignorehitpause = 1
value = 0

[State 5050, 1]
type = ChangeAnim
trigger1 = time = 0
value = 5070

[State 821, 1]
type = VelAdd
Trigger1 = time > 0
y = .39

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5150

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

[State 1]
type = AssertSpecial
trigger1 = enemynear,name="Remilia_Scarlet"
flag = invisible

[State 1];僇儊儔屌掕
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 9030, 1]
type = PalFX
trigger1 = GameTime % 2
time = 1
add = 0,15,75
color = 0
invertall = 1

[State 9030, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 9030, 3]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 9030, 4]
type = SelfState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0
trigger2 = Pos Y >= 10
value = 5040

[State 9030, 5]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0
trigger2 = Pos Y >= 10
value = 49050

[State 9030, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 49035

[state a]
type = Changestate
trigger1 = !alive
value = 104010

[Statedef 13121]
type    = A
poweradd = 0
ctrl = 0
velset = 0,0
sprpriority = -1
movetype = H

[State 13121]
type = lifeadd
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.1 * Const(data.life)))
absolute = 1

[State 13121]
type = lifeset
triggerall = enemynear,name="Remilia_Scarlet"
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Remilia_Scarlet"
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = VarRangeSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
value = 0

[State 1]
type = VarRangeSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1&&!ishelper&&name!="Remilia_Scarlet"
sysvar(4) = 0
IgnoreHitPause = 1

[State 1]
type = changestate
triggerall = time = 0
trigger1 = enemynear,name="Remilia_Scarlet"&&enemynear,fvar(37)=1
trigger1 = (ishelper(1120)||ishelper(2000)||ishelper(2222))
trigger1 = root,var(46)>=1&&root,palno=12
value = 2229902

[State 1]
type = AssertSpecial
trigger1 = ishelper
flag = invisible
flag2 = noshadow
flag3 = globalnoshadow

[State 1]
type = statetypeset
trigger1 = time = 0
trigger1 = pos y = 0
value = S

[State 812,4]
type = changeanim
trigger1 =!ishelper
trigger1 = selfanimexist(anim)
value = anim
elem = animelemno(-1)

[state 1]
type = varset
trigger1 = ishelper&&time=0&&enemynear,name="Remilia_Scarlet"&&enemynear,fvar(38)=2
v = 2
value = prevstateno

[state 1]
type = varset
trigger1 = ishelper&&time=0&&enemynear,name="Remilia_Scarlet"&&enemynear,fvar(38)=2
v = 3
value = anim

[state 1]
type = destroyself
trigger1 = ishelper&&time>=1&&enemynear,name="Remilia_Scarlet"&&enemynear,fvar(19)!=0&&enemynear,fvar(38)=2
trigger2 = ishelper&&time>=1&&enemynear,name="Remilia_Scarlet"&&enemynear,fvar(38)=1
trigger3 = ishelper&&time>=5

[state 1]
type = changestate
trigger1 = ishelper&&time>=1&&enemynear,name="Remilia_Scarlet"&&enemynear,fvar(19)!=1&&enemynear,fvar(38)=2
value = 2229900

[State 1]
type = changestate
trigger1 = time >=1&&!ishelper
value = 10380

[Statedef 10380]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = -4,-6

[state a]
type = destroyself
trigger1 = ishelper

[State 13121]
type = lifeset
triggerall = enemynear,name="Remilia_Scarlet"
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = enemynear,name="Remilia_Scarlet"
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 5050, 1]
type = ChangeAnim
trigger1 = time=0
value = 5070

[State 821, 1]
type = VelAdd
Trigger1 = time > 0
y = .39

[State 821, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	僨僶僢僋
;--------------------------------------------------
[State -2, DisplayToClipboard]
Type = DisplayToClipboard
Trigger1 = 1
Text = "AI:%1d, DMG:%6.2f, P2-X:%3.0f, P2B-X:%3.0f, P2-Y:%3.0f"
Params = Var(49), FVar(10)*100, P2Dist X, P2BodyDist X, P2Dist Y
IgnoreHitPause = 1

[State -2, AppendToClipboard]
Type = AppendToClipboard
Trigger1 = 1
Text = "\nPOW:%2d, BOMB:%4d"
Params = Var(42), Var(44)
IgnoreHitPause = 1

;-----庡側娔帇懳徾-----
;
;  Var(16)	僌儗僀僘壜斲
;  Var(33)	僈乕僪僋儔僢僔儏敾掕
;  Var(35)	僇僂儞僞乕僸僢僩敾掕
;  Var(40)	楈椡巆検
;  Var(41)	楈椡惂屼僼儔僌乮0:捠忢丄1:僋儔僢僔儏帪乯
;  Var(42)	楈椡夞暅掆巭帪娫
;  Var(43)	儃儉僗僩僢僋悢
;  Var(44)	儃儉夞暅帪娫
;  Var(49)	AI僼儔僌乮0:僆僼丄1:僆儞乯
;
; FVar(10)	僟儊乕僕曗惓
;
; NumExplod	昞帵偟偰偄傞Explod偺悢
;


[Statedef -3]; 忢帪娔帇僗僥乕僩

[State -3] 
type = varset 
trigger1 = 1 
v = 1
value = gametime 
ignorehitpause = 1
superMoveTime = 999999999
pauseMoveTime = 999999999

;--------------------------------------
[Statedef 1009]
type    = S
movetype= I
physics = S
anim = 10001

[State 1007]
type = NotHitBy 
trigger1 = 1
value = SCA
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1007]
type = BindToroot
trigger1 = 1
pos=0,-25
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State 1007]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

;杮懱偑僗僥乕僩扗傢傟偰偄傞帪娫傪僇僂儞僩
[state 1007]
type = varset
trigger1 =1
v = 0
value =(roundstate=2)*(root,var(1)!=gametime)*(var(0)+1)
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

;杮懱儔僀僼曐懚偦偺1
;偙偺婰弎偩偲roundstate>2帪偵弶婜壔偝傟傑偡
[state 1007]
type = varset
trigger1 =roundstate=2&&(gametime%5=0)||roundstate!=2
v = 1
value =(roundstate<=2)*(ifelse((roundstate<2),root,lifemax,(ifelse((var(1)-root,life>root,lifemax*0.2),var(2),root,life))))
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

;忋婰value愢柧
;roundstate<2側傜偽root,lifemax傪僙僢僩丅
;roundstate<2偱側偄側傜(曐懚偟偨儔僀僼偐傜杮懱尰嵼儔僀僼傪堷偄偨悢偑杮懱儔僀僼嵟戝抣偺2妱傛傝戝偒偄)側傜var(2)傪僙僢僩
;偦偆偱側偄側傜杮懱尰嵼儔僀僼傪僙僢僩

;杮懱儔僀僼曐懚偦偺2
;偙偺婰弎偩偲roundstate>2帪偵弶婜壔偝傟傑偡
[state 1007]
type = varset
trigger1 =roundstate=2&&(gametime%10=0&&var(2)-root,life<root,lifemax*0.2)||roundstate!=2
v = 2
value =(roundstate<=2)*(ifelse((roundstate<2),root,lifemax,root,life))
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999


[State 1000, 0]
type = DestroySelf
trigger1 = root,stateno = 100501

[Statedef 600000]
type = U
movetype = U
physics = U
poweradd = -powermax

[State 1];僇儊儔屌掕
type = screenbound
trigger1 = 1
value = 1
movecamera = 0,0

[state a]
type = velset
trigger1 = time = 0
x = 0
y = 0

[State 0]
type = powerset
trigger1 = 1
value = 0
ignorehitpause = 1

[State 50]
type = AssertSpecial
trigger1 = name !="Remilia_Scarlet"
flag = invisible
ignorehitpause = 1

[State 40]
type = posset
trigger1 = time = 0
y = 9999999
ignorehitpause = 1

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

[State r]
type = ReversalDef
trigger1 = ishelper
trigger1 = root,name !="Remilia_Scarlet"
reversal.attr = SCA,AA,AP,AT,HP
priority = 7,hit
pausetime = 0,2
p2stateno = 100998;100201
ignorehitpause = 1


[State 0]
type = statetypeset
trigger1 = name !="Remilia_Scarlet"
statetype = S
movetype = H
physics = N
ignorehitpause = 1

[State 0]
type = ctrlset
triggerall = !ishelper
trigger1 = name !="Remilia_Scarlet"
value = 0
ignorehitpause = 1

[State 0]
type = LifeAdd
trigger1 = name !="Remilia_Scarlet"
value = -99999999999999
absolute = 1
ignorehitpause = 1

[State 0]
type = LifeSET
trigger1 = name !="Remilia_Scarlet"
value = -99999999999999
absolute = 1
ignorehitpause = 1

[state 13, 1]
type = varset
trigger1 = ishelper
trigger1 = root,name !="Remilia_Scarlet"
var(39) = prevstateno
ignorehitpause = 1

[state 13, 1]
type = varset
trigger1 = ishelper
trigger1 = root,name !="Remilia_Scarlet"
var(38) = anim
ignorehitpause = 1

[State 1]
type = Projectile
triggerall = ishelper
trigger1 = root,name !="Remilia_Scarlet"
projanim = var(38)
projremove = 1
projremovetime = 15
affectteam = F
attr = C,HP
hitflag = MAFPD
P2stateno = enemy,stateno = 100998
ignorehitpause = 1

[State 1]
type = Projectile
triggerall = ishelper
trigger1 = root,name !="Remilia_Scarlet"
projanim = var(38)
projremove = 1
projremovetime = 15
affectteam = F
attr = C,AA
hitflag = MAFPD
P1stateno = var(0)
ignorehitpause = 1

[State 1]
type = null;Projectile
triggerall = ishelper
trigger1 = root,name !="Remilia_Scarlet"
projid=1000000000000
projanim = var(38)
projremove = 1
projremovetime = 15
affectteam = F
attr = C,HP
hitflag = MAFPD
P1stateno = var(0)
ignorehitpause = 1

[State 999]
type = changeanim2
triggerall = name !="Remilia_Scarlet"
trigger1 = root,name != "Remilia_Scarlet"
value = 31300
ignorehitpause = 1

[state 0] 
type = destroyself 
triggerall = ishelper
trigger1 = time >= 200
trigger2 = root,name ="Remilia_Scarlet"
trigger3 = !alive
trigger4 = root,alive = 0
ignorehitpause = 1

[State 0]
type = selfstate;changestate
triggerall = 1
trigger1 = name !="Remilia_Scarlet"
trigger1 = !alive
value = 5150
ignorehitpause = 1

[State 0]
type = null;changestate
trigger1 = name !="Remilia_Scarlet"
trigger1 = root,name !="Remilia_Scarlet"
trigger1 = time 
trigger1  = prevstateno !=600000
value = 600000
ignorehitpause = 1

[State 0]
type = SelfState
triggerall = name !="Remilia_Scarlet"
triggerall = !ishelper
trigger1 = Time >= 60
value = 5150
ignorehitpause = 1



