;--------------------------------------------------------------------------
[Statedef -2]
;--------------------------------------------------------------------------
; 棎晳墱媊敾掕

[State -2]
type = VarSet
trigger1 = var(41) <= 0
var(40) = 0
ignorehitpause = 1

[State -2]
type = VarAdd
trigger1 = (gametime%8) = 0
trigger1 = var(41) > 0
var(41) = -1
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(41) <= 0
var(41) = 0
ignorehitpause = 1

[State -2]
type = VarAdd
trigger1 = var(41) < var(42)
var(42) = -1
ignorehitpause = 1

;--------------------------------------------------------------------------
; 婥愨丒僈僋儔敾掕

[State -2]
type = VarSet
trigger1 = var(38) = 0
var(31) = 0
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(37) = 0
var(33) = 0
ignorehitpause = 1

[State -2]
type = VarAdd
trigger1 = stateno != 231
trigger1 = stateno != 237
trigger1 = var(33) > 0
trigger1 = enemy,gethitvar(hitshaketime) = 0
trigger1 = (gametime%10) = 0
trigger1 = p2movetype != H && p2stateno != [150,159]
var(33) = -2*(1+var(29))

[State -2]
type = VarAdd
trigger1 = p2stateno = 59200
trigger1 = time = 4
var(29) = 1

[State -2]
type = VarAdd
trigger1 = var(34) >= 1
var(34) = -1

[State -2]
type = VarSet
trigger1 = p2stateno = 59200
var(34) = 0

[State -2]
type = VarSet
trigger1 = var(34) >= 1
trigger2 = p2stateno = 59100 && p2movetype = H
trigger3 = p2stateno = 59200
var(33) = 0

[State -2]
type = VarSet
trigger1 = var(33) >= 180
var(34) = 241

[State -2]
type = VarAdd
triggerall = p2stateno = 59204
triggerall = enemy,command = "a" || enemy,command = "b" || enemy,command = "c" || enemy,command = "x" || enemy,command = "y" || enemy,command = "z"
trigger1 = teammode = single || teammode = turns
trigger2 = enemy,teammode = single || enemy,teammode = turns
var(28) = 1

[State -2]
type = VarSet
trigger1 = p2stateno != 59204
var(28) = 0

[State -2]
type = VarAdd
trigger1 = var(31) > 0
trigger1 = enemy,gethitvar(hitshaketime) = 0
trigger1 = (gametime%15) = 0
trigger1 = p2stateno != [150,159]
var(31) = -4*(1+var(32))

[State -2]
type = VarAdd
trigger1 = p2stateno = 59100
trigger1 = var(31) >= 200
var(32) = 1

[State -2]
type = Explod
trigger1 = p2stateno = 59100
trigger1 = var(31) >= 200
anim = 715
sprpriority = 5
postype = p2
pos = 20,-88
ownpal = 1

[State -2]
type = VarSet
trigger1 = var(31) < 0
trigger2 = p2stateno = 59100 && p2movetype = H
var(31) = 0

;--------------------------------------------------------------------------
; 僔僗僥儉宯曄悢

[State -2]
type = VarAdd
trigger1 = var(5) >= 0
var(5) = -1

[State -2]
type = VarSet
trigger1 = ctrl = 1
trigger2 = stateno = 0
var(9) = 0

[State -2];摨僉儍儔僞僢僌嬫暿梡
type = VarSet
trigger1 = roundstate = 0
trigger1 = numpartner
trigger1 = partner,authorname = "Ohgaki"
var(17) = (ifelse(p2dist x >= partner,p2dist x, 2, 1)-1)*10

[State -2]
type = VarSet
trigger1 = 1
fvar(14) = 3.90625

[State -2]
type = VarSet
trigger1 = 1
fvar(15) = 15.625

[State -2]
type = VarSet
trigger1 = 1
fvar(16) = 0.01*Const(data.attack)*0.12*ifelse(var(50)=1,ifelse(stateno<=230,0,1.0),1.0)

[State -2]
type = VarSet
trigger1 = 1
fvar(17) = ifelse(var(50)=2,1.5,1.0)

[State -2]
type = PowerSet
triggerall = power >= 1000
trigger1 = teammode = single
trigger2 = teammode = turns
value = 1000
ignorehitpause = 1

;--------------------------------------------------------------------------
; 崻惈抣曗惓

[State -2]
type = LifeAdd
triggerall = alive
triggerall = life != 0
triggerall = stateno != [120,159]
triggerall = var(10) - life > 1
trigger1 = var(7) = 0
trigger1 = ((1000*life)/lifemax) < 500
value = floor((var(10) - life) - ((var(10) - life) * 0.785))
absolute = 1
ignorehitpause = 1

[State -2]
type = DefenceMulSet
trigger1 = var(7) = 1
trigger1 = ((1000*life)/lifemax) < 500
value = 0.785
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = movetype != H
var(7) = 0
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = movetype = H
trigger1 = var(10) - life != 0
trigger2 = hitshakeover
trigger3 = stateno != [5000,5120]
var(7) = 1
ignorehitpause = 1

;--------------------------------------------------------------------------
; 僇僂儞僞乕敾掕

[State -2]
type = VarSet
trigger1 = p2movetype = A
trigger2 = p2stateno = 59204
trigger3 = p2stateno = 100
fvar(11) = 1.3

[State -2]
type = Explod
triggerall = movehit
trigger1 = numexplod(9990) = 0
trigger1 = teamside = 1
trigger1 = fvar(11) = 1.3
trigger1 = stateno != [700,714]
trigger1 = stateno != 730
anim = 9990
id = 9990
postype = left
bindtime = -1
ownpal = 1
ontop = 1
pos = 60,100
ignorehitpause = 1
pausemovetime = 123456789
supermovetime = 123456789

[State -2]
type = Explod
triggerall = movehit
trigger1 = numexplod(9990) = 0
trigger1 = teamside = 2
trigger1 = fvar(11) = 1.3
trigger1 = stateno != [700,714]
trigger1 = stateno != 730
anim = 9991
id = 9990
postype = right
bindtime = -1
ownpal = 1
ontop = 1
pos = -60,100
ignorehitpause = 1
pausemovetime = 123456789
supermovetime = 123456789

[State -2]
type = VarSet
trigger1 = p2movetype != A
trigger1 = p2stateno != 100
fvar(11) = 1.0

;--------------------------------------------------------------------------
; 僐儞儃曗惓

[State -2]
type = VarSet
trigger1 = p2movetype != H
trigger1 = p2stateno != 4100
var(2) = 0

[State -2]
type = VarSet
trigger1 = var(2) <= 0
fvar(10) = 1.0

[State -2]
type = VarSet
trigger1 = var(50) != 1
trigger1 = var(2) = 1
fvar(10) = 0.895
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(50) != 1
trigger1 = var(2) = [2,3]
fvar(10) = 0.795
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(50) != 1
trigger1 = var(2) >= 4
fvar(10) = 0.695
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(50) = 1
trigger1 = var(2) = [1,3]
fvar(10) = 0.895
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(50) = 1
trigger1 = var(2) = [4,6]
fvar(10) = 0.795
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(50) = 1
trigger1 = var(2) = [7,9]
fvar(10) = 0.695
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(50) = 1
trigger1 = var(2) = [10,13]
fvar(10) = 0.595
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(50) = 1
trigger1 = var(2) >= 14
fvar(10) = 0.5
ignorehitpause = 1

;--------------------------------------------------------------------------
; 僼儔僀儞僌懳嶔

[State -2]
type = NotHitBy
trigger1 = var(12) = 0
value = SCA,AA,AT,AP
time = 1

[State -2]
type = VarSet
triggerall = roundstate = 2
trigger1 = ctrl = 1
trigger2 = movetype = A
var(12) = 1

;--------------------------------------------------------------------------
; 擱從僄僼僃僋僩昞帵

[State -2]
type = Explod
triggerall = numexplod(4001) = 0
triggerall = p2movetype = H
triggerall = p2stateno != 88100
trigger1 = (movehit = 1 && stateno = 223+var(40))
trigger2 = (movehit = 1 && (stateno = [250+var(40),251+var(40)]))
trigger3 = (movehit = 1 && (stateno = [510,512]))
trigger4 = (movehit = 1 && (stateno = [520,523]))
trigger5 = numhelper(240) > 0
trigger5 = helper(240),movehit
trigger6 = numhelper(271) > 0
trigger6 = helper(271),movehit
trigger7 = numhelper(510) > 0
trigger7 = helper(510),movehit
trigger8 = numhelper(521) > 0
trigger8 = helper(521),movehit
trigger9 = numhelper(522) > 0
trigger9 = helper(522),movehit
trigger10= numhelper(523) > 0
trigger10= helper(523),movehit
trigger11= numhelper(525) > 0
trigger11= helper(525),movehit
anim = 4000
id = 4001
postype = p2
facing = -1
pos = -5,-20
bindtime = -1
ownpal = 1
removetime = -1
sprpriority = 3
ignorehitpause = 1
pausemovetime = 123456789
supermovetime = 123456789

[State -2]
type = Explod
trigger1 = numexplod(4002) = 0
trigger1 = numexplod(4001) >= 1
trigger1 = p2movetype = I || (p2stateno = [5100,5199]) || p2statetype = L || (p2stateno = 238 && p2movetype = H) 
anim = 4001
id = 4002
postype = p2
facing = -1
pos = 0,10
bindtime = -1
ownpal = 1
sprpriority = 3
ignorehitpause = 1
pausemovetime = 123456789
supermovetime = 123456789

[State -2]
type = RemoveExplod
trigger1 = p2stateno = [77000,77002]
trigger2 = p2stateno = 88100
trigger3 = numexplod(4002) = 1
id = 4001
ignorehitpause = 1
pausemovetime = 123456789
supermovetime = 123456789

;--------------------------------------------------------------------------
; 壒惡娗棟

[State -2]
type = PlaySnd
triggerall = movetype = H
triggerall = alive
triggerall = stateno != 8000
trigger1 = anim != 9020
trigger1 = stateno != [120,155]
trigger1 = var(10) - life > 0
trigger2 = stateno = 5100 || stateno = 5105
trigger2 = time = 1
value = 22,0+random%8
channel = 4
volume = 250

[State -2]
type = VarSet
triggerall = movetype = H
triggerall = alive
trigger1 = var(10) - life > 0
var(8) = 1

[State -2]
type = VarSet
trigger1 = var(10) - life != 0
var(10) = life
ignorehitpause = 1

[State -2]
type = PlaySnd
trigger1 = var(23) = 0
trigger1 = life = 0
trigger1 = stateno != 5150
trigger1 = matchover
value = 23,6
channel = 4
volume = 255

[State -2]
type = VarSet
trigger1 = life = 0
trigger1 = matchover
var(23) = 1
ignorehitpause = 1

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

[State -2]
type = Helper
triggerall = numhelper(10000) = 0
triggerall = roundstate < 4
triggerall = WinKO
trigger1 = movetype = A
stateno = 10000
id = 10000
helpertype = normal
name = "k.o._helper"
postype = p1
pos = 0,0
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 123456789
supermovetime = 123456789

[State -2]
type = Helper
trigger1 = numhelper(6000) = 0
stateno = 6000
id = 6000
helpertype = normal
name = "gauge_helper"
postype = p1
pos = 0,0
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 123456789
supermovetime = 123456789

[State -2]
type = Helper
trigger1 = numhelper(6001) = 0
stateno = 6001
id = 6001
helpertype = normal
name = "ai_learning_helper"
postype = p1
pos = 0,0
keyctrl = 0
ownpal = 1
persistent = 0
ignorehitpause = 1
pausemovetime = 123456789
supermovetime = 123456789

[State 200, 2]
type = AssertSpecial
trigger1 = matchover = 1
trigger1 = winko
flag = nomusic
ignorehitpause = 1

[State 200, 1]
type = AfterImageTime
trigger1 = movetype = H
trigger2 = stateno != 500
trigger2 = stateno != 520
trigger2 = stateno != 524
trigger2 = stateno != [100,101]
trigger2 = stateno != [105,106]
trigger2 = stateno != [223,224]
trigger2 = stateno != [240,241]
trigger2 = stateno != [510,511]
trigger2 = stateno != [510,511]
trigger2 = stateno != [700,799]
trigger2 = stateno != [1223,1224]
trigger2 = stateno != [1240,1241]
time = 0

;--------------------------------------------------------------------------
; 僎乕僕昞帵曄悢娗棟

[State -2]
type = VarSet
trigger1 = floor((256*life)/lifemax) < 65
var(16) = 1
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = floor((256*life)/lifemax) >= 65
var(16) = 0
ignorehitpause = 1

;--------------------------------------------------------------------------
; 僟僂儞僄僼僃僋僩昞帵

[State -2]
type = PlaySnd
trigger1 = (enemy(0),stateno = [234,235]) || (enemy(0),stateno = [59201,59202]) || enemy(0),stateno = 88721
trigger1 = enemy(0),movetype = H
trigger1 = enemy(0),time = 1
trigger2 = numenemy = 2
trigger2 = (enemy(1),stateno = [234,235]) || (enemy(1),stateno = [59201,59202]) || enemy(1),stateno = 88721
trigger2 = enemy(1),movetype = H
trigger2 = enemy(1),time = 1
value = 6,4
volume = 100
ignorehitpause = 1

[State -2]
type = Explod
trigger1 = enemy(0),stateno = 234 || enemy(0),stateno = 59201 || enemy(0),stateno = 88721
trigger1 = enemy(0),movetype = H
trigger1 = enemy(0),time = 1
trigger2 = numenemy = 2
trigger2 = enemy(1),stateno = 234 || enemy(1),stateno = 59201 || enemy(1),stateno = 88721
trigger2 = enemy(1),movetype = H
trigger2 = enemy(1),time = 1
anim = 10104
postype = p2
ownpal = 1
sprpriority = 5
pos = -35,5
ignorehitpause = 1

[State -2]
type = Explod
trigger1 = enemy(0),stateno = 234 || enemy(0),stateno = 59201 || enemy(0),stateno = 88721
trigger1 = enemy(0),movetype = H
trigger1 = enemy(0),time = 1
trigger2 = numenemy = 2
trigger2 = enemy(1),stateno = 234 || enemy(1),stateno = 59201 || enemy(1),stateno = 88721
trigger2 = enemy(1),movetype = H
trigger2 = enemy(1),time = 1
anim = 10103
postype = p2
ownpal = 1
sprpriority = 5
pos = 35,5
ignorehitpause = 1

[State -2]
type = RemoveExplod
trigger1 = statetype != A
id = 600

;--------------------------------------------------------------------------
; 嬻拞夞旔帪娫嶼弌

[State -2]
type = VarSet
trigger1 = gethitvar(hitshaketime) > 0
var(18) = gethitvar(fall.recovertime)
persistent = 0

[State -2]
type = VarSet
trigger1 = var(18) > 0
var(19) = var(18)

[State -2]
type = VarSet
trigger1 = var(18) = 0
var(19) = 0

[State -2]
type = VarAdd
trigger1 = var(18) > 0
var(18) = -1

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

[State -2]
type = PosAdd
trigger1 = animelem = 6
trigger1 = anim = 5950
x = 17

[State -2]
type = PosAdd
trigger1 = animelem = 7
trigger1 = anim = 5950
x = 19

[State -2]
type = PosAdd
trigger1 = animelem = 8
trigger1 = anim = 5950
x = 16

[State -2]
type = PosAdd
trigger1 = animelem = 2
trigger1 = anim = 5161
x = -13

[State -2]
type = PosAdd
trigger1 = animelem = 3
trigger1 = anim = 5161
x = -17

[State -2]
type = PosAdd
trigger1 = animelem = 5
trigger1 = anim = 5161
x = -12

[State -2]
type = AssertSpecial
trigger1 = var(39) != 0
flag = noshadow
ignorehitpause = 1

;--------------------------------------------------------------------------
; 僄僼僃僋僩揰柵

[State -2, 4A]
type = ModifyExplod
trigger1 = gametime%2 = 0
id = 2500
trans = none

[State -2, 4A]
type = ModifyExplod
trigger1 = gametime%2 = 1
id = 2500
trans = addalpha
alpha = 0,256

[State -2, 3B-1]
type = ModifyExplod
trigger1 = gametime%2 = 0
id = 2513
trans = none
ignorehitpause = 1

[State -2, 3B-1]
type = ModifyExplod
trigger1 = gametime%2 = 1
id = 2513
trans = addalpha
alpha = 0,256
ignorehitpause = 1

[State -2, 3B-2]
type = ModifyExplod
trigger1 = gametime%2 = 0
id = 2514
trans = none
ignorehitpause = 1

[State -2, 3B-2]
type = ModifyExplod
trigger1 = gametime%2 = 1
id = 2514
trans = addalpha
alpha = 0,256
ignorehitpause = 1

[State -2, Throw]
type = ModifyExplod
trigger1 = gametime%2 = 0
id = 2530
trans = none
ignorehitpause = 1

[State -2, Throw]
type = ModifyExplod
trigger1 = gametime%2 = 1
id = 2530
trans = addalpha
alpha = 0,256
ignorehitpause = 1

[State -2, 623A/B]
type = ModifyExplod
trigger1 = gametime%2 = 0
id = 2550
trans = none
ignorehitpause = 1

[State -2, 623A/B]
type = ModifyExplod
trigger1 = gametime%2 = 1
id = 2550
trans = addalpha
alpha = 0,256
ignorehitpause = 1

[State -2, 214A/B]
type = ModifyExplod
trigger1 = gametime%2 = 0
id = 2560
trans = none
ignorehitpause = 1

[State -2, 214A/B]
type = ModifyExplod
trigger1 = gametime%2 = 1
id = 2560
trans = addalpha
alpha = 0,256
ignorehitpause = 1

[State -2, 41236AB]
type = ModifyExplod
trigger1 = gametime%2 = 0
id = 2610
trans = none
ignorehitpause = 1

[State -2, 41236AB]
type = ModifyExplod
trigger1 = gametime%2 = 1
id = 2610
trans = addalpha
alpha = 0,256
ignorehitpause = 1

;--------------------------------------------------------------------------
; 嶴嶦戜帉梡彑棙敾掕

[State -2]
type = VarSet
trigger1 = RoundState >= 3
trigger1 = WinKO
trigger1 = StateNo = [500,599]
var(30) = 1
ignorehitpause = 1 

;--------------------------------------------------------------------------
; 僿儖僷乕儕僟僀儗僋僩

[State -2]
type = Helper
trigger1 = numhelper(99990) = 0
name = "helper_redirect"
stateno = 99990
id = 99990
helpertype = normal
keyctrl = 0
persistent = 0
pausemovetime = 123456789
supermovetime = 123456789

[State -2]
type = VarSet
trigger1 = !ishelper
trigger1 = numenemy = 1
v = 43
value = enemynear(0),id

[State -2]
type = VarSet
trigger1 = !ishelper
trigger1 = numenemy = 2
v = 43
value = ifelse(enemynear(0),alive, enemynear(0),id, enemynear(1),id)

;--------------------------------------------------------------------------
; 僨僶僢僌昞帵

[State -2]
type = DisplayToClipboard
trigger1 = 1
text = "v2:%d,v31:%d,v33:%d,v56:%d,v41:%d"
params = var(2),var(31),var(33),var(56),var(41)
ignorehitpause = 1

;昞帵傪墶偵壛偊傞
[State -2, DisplayToClipboard2]
Type = AppendToClipboard
trigger1 = 1
text = " P2Dist X=%d,Y=%d,Front=%d,PosY=%d"
params = floor(P2BodyDist X), ceil(P2BodyDist Y), floor(FrontEdgeBodyDist), ceil(Pos Y)
ignorehitpause = 1

;昞帵傪壓偵壛偊傞
[State -2, DisplayToClipboard3]
type = AppendToClipboard
trigger1 = numhelper(6001) > 0
text = "\nVel X=%d/10,Y=%d/10,     \tP2Vel X=%d/10,Y=%d/10        F=%d";
params = ceil(Vel X*10),floor(Vel Y*10),ceil(EnemyNear,Vel X*10),floor(EnemyNear,Vel Y*10),helper(6001),var(10)
ignorehitpause = 1

;--------------------------------------------------------------------------
;廱傪徟偑偡(崟廐梩)丂憡庤僗僥乕僞僗曄壔
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "tukemon&HAL" && enemy,name = "Akiha"
trigger1 = enemy,var(56) = 1
value = -8
absolute = 1
kill = 0

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "tukemon&HAL" && enemy,name = "Akiha"
trigger1 = enemy,var(51)%10 = 2
trigger1 = enemy,var(56) = 1
value = -33

;--------------------------------------------------------------------------
;棯扗/廱傪徟偑偡/廱傪媷傔傞丂憡庤梡
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Akiha_Vermilion"
trigger1 = enemy,var(47) = 1
value = -7
absolute = 1
kill = 0

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Akiha_Vermilion"
trigger1 = enemy,var(48) = 1 && enemy,numexplod(4005)
value = -7
absolute = 1
kill = 0

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Akiha_Vermilion"
trigger1 = enemy,var(47) = 1
value = -26

;--------------------------------------------------------------------------
;僷僂僟乕僗僲僂丂憡庤梡
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Len"
trigger1 = enemy,var(47) = 1 || enemy,var(48) = 1
value = -enemy,var(47)*4-enemy,var(48)*4
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;偠傚偆傠丂憡庤梡
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Hisui"
trigger1 = enemy,var(47) = 1
value = -10
absolute = 1
kill = 0

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Hisui"
trigger1 = enemy,var(47) = 1
value = -135

;---------------------------------------------------------------------------
;偑傫偽傝傑偟偨丅EX丂憡庤梡
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Hisui"
trigger1 = enemy,var(48) = 1
value = ifelse(gametime%2 = 0, -3, -4)
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;僽儔僢僋丒僋儔僢僋丂憡庤梡
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 1
value = -10
absolute = 1
kill = 0

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 2 || enemy,var(47) = 4
value = -15
absolute = 1
kill = 0

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 3
value = -30
absolute = 1
kill = 0

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 1
value = 6

[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Warachia"
trigger1 = enemy,var(47) = 2 || enemy,var(47) = 3 || enemy,var(47) = 4
value = 15

;--------------------------------------------------------------------------
;尰戙堛妛偺媇惖幰偱偡丅丂憡庤梡
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "嘓" && enemy,name = "Kohaku"
trigger1 = enemy,var(47) = 1
value = ifelse(gametime%2 = 0, -3, -4)
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;撆岠壥乮僪儘僂傿儞傾儖僇僫)
[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemy,authorname = "Drowin arcana"
triggerall = enemy,fvar(20) > 0
trigger1 = power > 0
value = -1

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "Drowin arcana"
triggerall = enemy,fvar(20) > 0
trigger1 = gametime % 7 = 0
value = -1
kill = 0

[State -2]
type = PalFX
triggerall = numenemy
triggerall = enemy,authorname = "Drowin arcana"
trigger1 = enemy,fvar(20) > 0
add = 100,0,110
mul = 220,220,220
time = 5
ignorehitpause = 1

;--------------------------------------------------------------------------
;仭惣峴帥桯乆巕丂楈晞媦傃庻柦憡庤僗僥乕僩
[State -2]
type       = LifeAdd
triggerall = numenemy
triggerall = enemy,authorname = "Souki" && enemy,name = "Yuyuko Saigyouji"
trigger1   = enemy,var(3) = 1 || enemy,var(3) = 2
trigger1   = gametime%6 = 0
value      = ifelse(enemy,var(3) = 1, -2, -3)
kill       = 0

;--------------------------------------------------------------------------
;偆偳傫偘丂撆墝枊梡乮僔儘僩偝傫乯
[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = enemynear,authorname = "Shiroto"
triggerall = enemynear,name = "Reisen Udongein Inaba"
trigger1 = enemynear,var(40) != 0
trigger1 = pos y = [-30,10]
trigger1 = gametime%3 = 0
value = -enemynear,var(40)
kill = 0

;--------------------------------------------------------------------------
;仭扙嵃偺媀 惂屼乮authorname = "mikage_th105"乯
[State pos moving]
type = AssertSpecial
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th105")*(teammode = single)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
flag = noautoturn

;堏摦
[State pos moving]
type = PosAdd
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th105")*(teammode = single)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
x = -ceil(enemynear,fvar(24))*facing*enemynear,facing
y = -ceil(enemynear,fvar(25))*(statetype != L)

;Statetype != A + Statetype != L 偺応崌嫮惂棊壓State傊
[State pos moving]
type = ChangeState
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th105")*(teammode = single)
triggerall = (statetype != A)*(pos y != 0)*(statetype != L)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
value = 50

;--------------------------------------------------------------------------
;仭扙嵃偺媀 惂屼乮authorname = "mikage_th"乯

;怳傝岦偒梷惂
[State pos moving]
type = AssertSpecial
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th")*(teammode = single)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
flag = noautoturn

;堏摦
[State pos moving]
type = PosAdd
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th")*(teammode = single)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
x = -ceil(enemynear,fvar(36))*facing*enemynear,facing
y = -ceil(enemynear,fvar(37))*(statetype != L)

;Statetype != A + Statetype != L 偺応崌嫮惂棊壓State傊
[State pos moving]
type = ChangeState
triggerall = (enemynear,name = "Komachi Onoduka")*(enemynear,authorname = "mikage_th")*(teammode = single)
triggerall = (statetype != A)*(pos y != 0)*(statetype != L)
trigger1 = (enemynear,stateno = 820)*(enemynear,anim = 823)*(enemynear,animelem = 6,13)
trigger2 = (enemynear,stateno = 821)*(enemynear,anim = 823)*(enemynear,animelem = 6,43)
value = 50

;--------------------------------------------------------------------------
;仭撆墝枊乽姠巣怐暔偺嬍乿 惂屼乮authorname = "mikage_th105"乯
[State LifeAdd]
type = LifeAdd
trigger1 = numenemy = 1
trigger1 = pos y > -240
trigger1 = (enemy(0),name = "Reisen Udongein Inaba")*(enemy(0),authorname = "mikage_th105")*(enemy(0),fvar(21))
value = -floor(enemy(0),fvar(21))*2
ignorehitpause = 1
absolute = 1
kill = 0

[State LifeAdd]
type = LifeAdd
triggerall = numenemy = 2
triggerall = pos y > -240
trigger1 = (enemy(0),name = "Reisen Udongein Inaba")*(enemy(0),authorname = "mikage_th105")*(enemy(0),fvar(21))
trigger2 = (enemy(1),name = "Reisen Udongein Inaba")*(enemy(1),authorname = "mikage_th105")*(enemy(1),fvar(21))
value = -floor(enemy(0),fvar(21))*2-floor(enemy(1),fvar(21))*2
ignorehitpause = 1
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;仭撆墝枊乽姠巣怐暔偺嬍乿 惂屼乮authorname = "mikage_th"乯
[State LifeAdd]
type = LifeAdd
trigger1 = numenemy = 1
trigger1 = pos y > -240
trigger1 = (enemy(0),name = "Reisen Udongein Inaba")*(enemy(0),authorname = "mikage_th")*(enemy(0),fvar(35))
value = -floor(enemy(0),fvar(35))*2
ignorehitpause = 1
absolute = 1
kill = 0

[State LifeAdd]
type = LifeAdd
triggerall = numenemy = 2
triggerall = pos y > -240
trigger1 = (enemy(0),name = "Reisen Udongein Inaba")*(enemy(0),authorname = "mikage_th")*(enemy(0),fvar(35))
trigger2 = (enemy(1),name = "Reisen Udongein Inaba")*(enemy(1),authorname = "mikage_th")*(enemy(1),fvar(35))
value = -floor(enemy(0),fvar(35))*2-floor(enemy(1),fvar(35))*2
ignorehitpause = 1
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;仭搚拝恄偺釳傝仌儈僔儍僌僕偝傑偺釳傝 惂屼

;搚拝恄偺釳傝
[State LifeAdd]
type = LifeAdd
trigger1 = numenemy
trigger1 = (enemynear,name = "Suwako Moriya")*(enemynear,authorname = "mikage_th")*(teammode = single)
trigger1 = floor((enemynear,var(42)%100)*0.1) = [0,1]
trigger1 = (floor(enemynear,fvar(38)))%1000 > 0
trigger1 = floor(enemynear,fvar(38)*0.001) = 2
value = floor(enemynear,fvar(36)*(lifemax/10000.000000))
ignorehitpause = 1
absolute = 1
kill = 0

;儈僔儍僌僕偝傑偺釳傝
[State LifeAdd]
type = LifeAdd
triggerall = numenemy
triggerall = (enemynear,name = "Suwako Moriya")*(enemynear,authorname = "mikage_th")*(teammode = single)
trigger1 = floor(enemynear,fvar(35)) = 1
trigger1 = movetype = H
trigger1 = stateno != [150,155]
trigger2 = floor(enemynear,fvar(35)) = 2
trigger2 = movetype = H
trigger2 = stateno = [150,155]
value = floor(enemynear,fvar(33))
ignorehitpause = 1
absolute = 1
kill = 0

;--------------------------------------------------------------------------
;恄旜娤楅丂庺偄岠壥晅壛
[State -2, LifeAdd]
type = LifeAdd
triggerall = (enemy,teammode = simul) = 0
triggerall = (teammode = simul) = 0
triggerall = numenemy
triggerall = enemy,authorname = "586"
triggerall = enemy,name = "Misuzu Kamio"
triggerall = enemy,fvar(11) > 0
trigger1 = enemy,var(13) = 1
trigger1 = gametime % 13 = 0
trigger2 = enemy,var(13) = 2
trigger2 = gametime % 11 = 0
trigger3 = enemy,var(13) = 3
trigger3 = gametime % 8  = 0
trigger4 = enemy,var(13) = 4
trigger4 = gametime % 6  = 0
trigger5 = enemy,var(13) = 5
trigger5 = gametime % 3  = 0
value = -1
kill = 0
ignorehitpause = 1

[State -2, PalFX]
type = PalFX
triggerall = (enemy,teammode = simul) = 0
triggerall = (teammode = simul) = 0
triggerall = numenemy
triggerall = enemy,authorname = "586"
triggerall = enemy,name = "Misuzu Kamio"
trigger1 = enemy,fvar(11) > 0
add = -50,150,150
time = 1
ignorehitpause = 1

;--------------------------------------------------------------------------
;僀僠僐儘撆乮SAIKEI儐僟乯
[State -2]
type = LifeAdd
triggerall = numenemy
trigger1 = enemy,name = "JUDA"
trigger1 = enemy,authorname = "SAIKEI"
trigger1 = enemy,fvar(23) > 0
trigger1 = floor(enemy,fvar(23))%4 = 0
trigger1 = enemy,var(0) <= 0
trigger1 = enemy,movetype != h || enemy,movetype = h && enemy,hitshakeover
value = -1
kill = 0

[State -2]
type = PalFX
triggerall = numenemy
triggerall = gametime%20 = 0
trigger1 = enemy,name = "JUDA"
trigger1 = enemy,authorname = "SAIKEI"
trigger1 = enemy,fvar(23) > 0
time = 8
add = 255,0,0

;-----------------------------------------------------------------------
;傾僌儕傾僗儌乕僌儕壎宐
[State -2]
type = PalFX
triggerall = numenemy
triggerall = !ishelper
trigger1 = roundstate = 2
trigger1 = alive = 1
trigger1 = numpartner = 1
trigger1 = partner,authorname = "ouchi" && partner,name = "Agrias_Oaks"
trigger1 = partner,var(25)%100 = 7
trigger1 = partner,var(10) = 100
time = 50
add = 0,0,54
mul = 256,256,256
sinadd = 0,0,108,100

[State -2]
type = LifeAdd
triggerall = numenemy
triggerall = !ishelper
trigger1 = roundstate = 2
trigger1 = alive = 1
trigger1 = numpartner = 1
trigger1 = partner,authorname = "ouchi" && partner,name = "Agrias_Oaks"
trigger1 = partner,var(25)%100 = 7
trigger1 = partner,var(10) > 0
value = 1
ignorehitpause = 1

;--------------------------------------------------------------------------
;垽尨撧搒旤乽挧敪乿懳墳僗僥乕僩
[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemynear,name = "AIHARA NATSUMI" && enemynear,authorname = "YU-TOHARU"
trigger1 = enemynear,stateno = 197 && enemynear,statetime = 70
value = -45

;--------------------------------------------------------------------------
;傾儖A僕僼乽挧敪乿懳墳僗僥乕僩
[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemynear,name = "AL AZIF" && enemynear,authorname = "YU-TOHARU"
trigger1 = enemynear,stateno = 195 && enemynear,statetime = 30
value = -45

;--------------------------------------------------------------------------
;儅儈儎乽挧敪乿懳墳僗僥乕僩
[State -2]
type = PowerAdd
triggerall = numenemy
triggerall = enemynear,name = "MAMIYA" && enemynear,authorname = "YU-TOHARU"
trigger1 = enemynear,stateno = 195 && enemynear,statetime = 30
value = 1000
