;***************************************************************************
;===========================================================================
;---------------------------------------------------------------------------
[Statedef -2]; 常時監視ステ?ト
;---------------------------------------------------------------------------
;===========================================================================
;***************************************************************************
[State -2]
type=varset
trigger1 = 1
fvar(39) = .5
ignorehitpause=1

[State -2]
type=varset
trigger1 =fvar(39)>0&&fvar(39)<1
trigger1 =GetHitVar(damage)!=0
var(53) = GetHitVar(damage)
ignorehitpause=1

[State -2]
type=varset
trigger1 =fvar(39)>0&&fvar(39)<1
trigger1 =GetHitVar(hitcount)=1
trigger1 =life>=lifemax-ceil(gethitvar(damage)-(gethitvar(damage)*fvar(39)))
var(50) = 1-(gethitvar(damage)=life)
ignorehitpause=1

[State -2]
type=lifeadd
trigger1 =fvar(39)>0&&fvar(39)<1
trigger1 =GetHitVar(hitcount)=1
trigger1 =life!=GetHitVar(damage)
trigger1 =!var(50)
value = ceil(gethitvar(damage)-(gethitvar(damage)*fvar(39)))
ignorehitpause=1

[State -2]
type=DefenceMulSet
trigger1 =fvar(39)>0&&fvar(39)<1
value =fvar(39)
ignorehitpause=1

[State -2]
type = DisplayToClipBoard
trigger1 = 1
text = "DMS = %f flag1 = %d lifeadd = %d flag2 = %d GHV(DMG) = %d"
params = fvar(39),var(50),var(51),var(52),var(53)

[state -2]
type = null;lifeset
trigger1 = 1
value = lifemax


[state ]
type = SelfState
value = 0
triggerall = name ="G Mizchi"
triggerall = movetype = H || stateno =[5000,5999]
trigger1 = !time
trigger2 = MoveReversed
trigger3 = GetHitVar(damage) > 0 || GetHitVar(damage) <= 0
trigger4 = GetHitVar(hitcount) > 0 || GetHitVar(hitcount) <= 0
ignorehitpause = 1
supermovetime = 99999999999999999999
pausemovetime = 99999999999999999999

[state ]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = gametime%8
stateno = 0
time = -1
ignorehitpause = 1
supermovetime = 99999999999999999999
pausemovetime = 99999999999999999999

[State -2];
type = SelfState
;triggerall = Numhelper(1007) = 1
trigger1 = Palno = [7,12]
trigger1 = alive
trigger1 = stateno=[5150,5199]
trigger1 = movetype = H 
trigger1 = var(39) !=gametime+10005 
value = (statetype=S)*151+(statetype=C)*153+(statetype=A)*155+(statetype=L)*151
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

;---------------------------------------------------------------------------
;Config
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

;12P 変数リセットスイッ?。一部の超必殺技のみ
;ONにすると不具合が出る可?性があります
;ONにしても強さ的にはさほどかわりません
[State -2]
type = varset
trigger1 = palno = 12
fv = 26
value = 1            ;1on 0off

;ト?スイッ?
[State -2]
type = varset
trigger1 = palno = 12
fv = 19
value = 1            ;1on 0off

;---------------------------------------------------------------------------
;立ちモ?ションのエフェクト等
;---------------------------------------------------------------------------

[State -2]
type = null;helper
triggerall = roundstate = 2
triggerall = anim = 0
trigger1 = (GameTime%9) = 1
id = 2793
persistent = 1
name = "hikari"
pos = var(50),var(51)
postype = p1
stateno = 2793
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varrandom
trigger1 = 1
range = -40,30
v = 50

[State -2]
type = varrandom
trigger1 = 1
range = 0,-60
v = 51

[State -2]
type = varrandom
trigger1 = 1
range = -110,110
v = 43

[State -2]
type = varrandom
trigger1 = 1
range = 0,-170
v = 44

[state -2]
type = removeexplod
trigger1 = stateno!=[23000,23001]
id = 3060

[state -2]
type = removeexplod
trigger1 = stateno!=[2216,2217]
id = 3038

[state -2]
type = removeexplod
trigger1 = stateno!=[2216,2217]
id = 3039

[state -2]
type = removeexplod
trigger1 = stateno!=[2216,2217]
id = 3040

[state -2]
type = removeexplod
trigger1 = stateno!=[2216,2217]
id = 3041

[state -2]
type = removeexplod
trigger1 = stateno!=[2216,2217]
id = 3042

[state -2]
type = removeexplod
trigger1 = stateno!=[2216,2217]
id = 3043

[state -2]
type = removeexplod
trigger1 = stateno!=[2205,2210]
id = 3012

[state -2]
type = removeexplod
trigger1 = MoveType = H
id = 185

[State -2]
type = removeexplod
trigger1 = MoveType = H
ID = 1470

[State -2]
type = removeexplod
trigger1 = MoveType = H
ID = 4000

[state -2]
type = removeexplod
trigger1 = MoveType = H
id = 4200

[state -2]
type = removeexplod
trigger1 = MoveType = H
id = 1655

[state -2]
type = removeexplod
trigger1 = MoveType = H
id = 1860

[state -2]
type = removeexplod
trigger1 = stateno != 2216
id = 3038

[state -2]
type = removeexplod
trigger1 = stateno != 2216
id = 3035

[state -2]
type = removeexplod
trigger1 = stateno != 2216
id = 3042

[state -2]
type = removeexplod
trigger1 = stateno != 2216
id = 3043

[state -2]
type = removeexplod
trigger1 = stateno != 2205
id = 3012

[state -2]
type = removeexplod
trigger1 = movetype = H
id = 2200

[state -2]
type = removeexplod
trigger1 = anim != 0
id = 3011

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

[state -2]
type = varset
trigger1 = var(10) = 0
trigger1 = facing = 1
v = 10
value = 1

[state -2]
type = varset
trigger1 = var(10) = 0
trigger1 = facing = -1
v = 10
value = 2

[State -2]
type = varset
trigger1 = roundstate = 0
var(21) = 1

[State -2]
type = varset
trigger1 = roundstate = 0
var(22) = 1

[State -2]
type = varset
trigger1 = var(21) <= 1
var(22) = 3

[State -2]
type = varset
trigger1 = var(21) >= 150
var(22) = 2

[State -2]
type = varadd
trigger1 = 1
trigger1 = var(22) = 3
var(21) = 5

[State -2]
type = varadd
trigger1 = 1
trigger1 = var(22) = 2
var(21) = -5

[State -2]
type = PalFX
trigger1 = 1
trigger1 = stateno != [190,192]
trigger1 = stateno != [23000,23001]
trigger1 = roundstate != 0
time = 2
add = var(21),var(21),var(21)
ignorehitpause = 1

[State -2]
type = PalFX
trigger1 = 1
trigger1 = stateno != [190,192]
trigger1 = stateno != [23000,23001]
trigger1 = roundstate != 0
trigger1 = var(21) <= 40
time = 2
add = var(21)-40,var(21)-40,var(21)-40
ignorehitpause = 1
color = 0


;---------------------------------------------------------------------------
;回復系
;---------------------------------------------------------------------------

;パワ?自動回復
[State -2]
type = poweradd
triggerall = roundstate = 2
trigger1 = (GameTime%8) = 1
value =1+(var(1)*3)+((palno=12)*(8+((fvar(24)>=1000)*(powermax/60))))+((var(55)>=2&&palno=12&&(life<=(lifemax/2)))*(powermax/200))+(palno=12&&numenemy>=2)*10
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

;パワ?セット
[state -2]
type = powerset
trigger1 = palno=12&&!(stateno=1950||stateno =2000||stateno=2200||stateno=2215||stateno=2300||(stateno=[170000,170002]))&&fvar(27)-power>=1
value = ifelse((EnemyNear,HitDefAttr=SCA,NA),0,fvar(27)-power)
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

;体力自動回復
[State -2]
type = lifeadd
triggerall = roundstate = 2 && palno != 12 && alive
trigger1 = (GameTime%(16-((palno=11)*14)))=0
value = var(41)
ignorehitpause = 1

[State -2]
type = lifeadd
triggerall = roundstate = 2 && palno = 11 && alive
trigger1 = var(58)!=gametime&&fvar(20)-life>=1
value = -((fvar(20)-life)*2)
absolute = 1
;kill = var(58)=gametime
ignorehitpause = 1

[State -2] 
type = varset 
trigger1 = life >= 500
var(41) = 1 + (var(1)*2)                     ;強化モ?ド時は回復量UP

[State -2] 
type = varset 
trigger1 = life <= 499
var(41) = 2 + (var(1)*3)                     ;強化モ?ド時は回復量UP

[State -2] 
type = varset 
trigger1 = life <= 250
var(41) = 3 + (var(1)*4)                     ;強化モ?ド時は回復量UP

[state -2]
type = varset
trigger1 = roundstate != 2
v = 48
value = 0
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state -2]
type = varset
trigger1 = 1
v = 59
value = (palno=12)
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state -2]
type = varset
trigger1 = alive && ((stateno=[170000,170002])||roundstate<2) && palno = 12
trigger1 = var(57)=[0,(lifemax)]
v = 57
value = life
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state -2]
type = varset
trigger1 = alive&&((stateno!=[170000,170002])||roundstate<2) && palno = 12
trigger1 = var(52)=[0,(lifemax)]
v = 52
value = life
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = varset
triggerall = time=0
trigger1 = stateno=200||stateno=205||stateno=210||stateno=215||stateno=230||stateno=235
trigger2 = stateno=240||stateno=245||stateno=290||stateno=400||stateno=410||stateno=430
trigger3 = stateno=440||stateno=245||stateno=600||stateno=610||stateno=630||stateno=640||stateno=690
fv = 11
value = stateno
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = varset
trigger1 = palno=12&&stateno=fvar(11)&&time=1
fv = 12
value = enemynear,life
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = varset
trigger1 = palno=12&&roundstate!=2
fv = 13
value = 0
ignorehitpause = 1

[State -2]
type = varset
triggerall = palno=12
trigger1 = roundstate=2&&alive&&life<=0&&enemy,life>=enemy,lifemax*0
trigger2 = roundstate!=2||!alive
fv = 14
value =(fvar(14)+1)*(roundstate=2&&alive&&fvar(14)<=5)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varset
trigger1 = palno=12&&stateno!=23000
fv = 15
value = 0
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varset
trigger1 = palno=12&&(roundstate!=2||enemy,numprojid(97857373211)>=1||stateno=23001)
fv = 16
value = (roundstate=2)*(stateno!=23001)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varset
trigger1 = palno=12&&stateno!=23000
fv = 17
value = 0
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varset
trigger1 = palno = 12
fv = 18
value = (projcontact(320000)>=1)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varset
trigger1 = palno = 11 && (stateno!=[19000,19050])
fv = 20
value = life
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varset
trigger1 = palno = 12 && (GameTime%20) = 1
fv = 27
value = !(EnemyNear,HitDefAttr=SCA,NA)*power
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varset
trigger1 = palno = 12
fv = 28
value = ((roundstate=2)*(fvar(28)+1))
IgnoreHitPause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = varset
triggerall = fvar(29)=[0,(lifemax)]
trigger1 = palno=12&&roundstate<2
trigger2 = palno=12&&enemy,life<enemy,lifemax*0&&roundstate>=2
fv = 29
value = life*(roundstate<2)
IgnoreHitPause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = varset
triggerall = fvar(30)=[0,(lifemax)]
trigger1 = palno=12&&enemy,life<enemy,lifemax*0
fv = 30
value = (roundstate<=2)*life
IgnoreHitPause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = varset
triggerall = fvar(31)=[0,(lifemax)]
trigger1 = palno=12&&roundstate=2
fv = 31
value = life
IgnoreHitPause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2] 
type = targetstate
triggerall = palno=12&&roundstate>=3&&enemynear,alive
trigger1 = (enemynear,stateno=[805,806])||(enemynear,stateno=[2010,2013])
value = 26360

[State -2]
type = AssertSpecial
trigger1 = palno=12&&alive&&roundstate>=3&&enemy,alive
trigger2 = palno=12&&alive&&roundstate>=3&&numhelper(190000)
flag = invisible
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State -2]
type = AssertSpecial
trigger1 = palno = 12
flag = NoStandGuard
flag2 = NoCrouchGuard
flag3 = NoairGuard

[State -2]
type = helper
trigger1 = palno=12&&numhelper(190000)=0&&alive&&roundstate>=3&&enemy,alive
id = 190000
persistent = 1
name = "G Mizuchi"
pos = 0,0
postype = P1
stateno = 190000+statetype=A
helpertype = player
keyctrl = 0
ownpal = 0
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[state -2]
type = null;lifeset
trigger1 = alive&&palno=12&&roundstate<=2&&enemy,life>=enemy,lifemax*0
trigger1 = numhelper(1031)>=1&&(helper(1031),stateno!=[1031,1040])||helper(1031),movetype=H
value=lifemax
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state -2]
type = lifeadd
triggerall = alive&&palno=12&&enemy,life<enemy,lifemax*0
trigger1 = (stateno!=[170000,170002])&&var(57)-life>=1||(stateno=[170000,170002])&&var(52)-life>=(lifemax/9)
value = ((roundstate<=2)*(ifelse(((stateno!=[170000,170002])&&var(57)-life>=1),var(57)-life,(ifelse(((stateno=[170000,170002])&&var(52)-life>=(lifemax/9)),var(52)-life,lifemax)))))
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = targetLifeAdd
trigger1 = palno=12&&(stateno=23000||stateno!=23000&&projhit=1)
value = -9999999999999999999999999999999
absolute = 1
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = targetstate
trigger1 = palno=12&&(stateno=23000||stateno!=23000&&projhit=1)
value = 23000
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = null;targetLifeAdd
trigger1 = palno=12&&target(fvar(11)),time<=1&&movehit=1;target(fvar(11)),GetHitVar(hittime)
trigger1 = fvar(12)-(target(fvar(11)),life)<=(target(fvar(11)),lifemax)*fvar(10)
value = -(((((target(fvar(11)),lifemax)*fvar(10))-(target(fvar(11)),GetHitVar(damage)))*0.001)*(target(fvar(11)),lifemax))
absolute = 1
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = ChangeState
triggerall = palno = [11,12]
trigger1 = !alive && stateno = [5000,5080]
value = 169996
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = null;PalFX
triggerall = palno = 12 && fvar(28)>=6500
trigger1 = (GameTime%2) = 1
time = 1
add = 255,100,100
ignorehitpause = 1

[State -2]
type = ChangeState
triggerall = alive&&palno=11
trigger1 = StateNo = 5000
trigger2 = StateNo = 5010
trigger3 = StateNo = 5020
trigger4 = StateNo = 5070
trigger5 = movetype=H&&StateNo=40
value = 19000
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State -2]
type = defenceMulSet
trigger1 = palno!=12
value=1.0+((palno=11)*4.5)+(((palno=[1,10])&&var(55)<=0)*0.3)
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

;---------------------------------------------------------------------------
;状態異常関係
;---------------------------------------------------------------------------

[state -2]                      ;バニッシュ初期化
type = varset
trigger1 = roundstate != 2
v = 55
value = 0

[state -2]                      ;バニッシュカウント
type = varadd
trigger1 = var(55) >= 0
v = 55
value = -1

[state -2]                      ;行動封印カウント
type = varadd
trigger1 = 1
v = 28
value = -1

[state -2]                      ;歩き・ジャンプ封印カウント
type = varadd
trigger1 = 1
v = 29
value = -1

[state -2]                      ;スロウカウント
type = varadd
trigger1 = 1
v = 54
value = -1

[state -2]                      ;スロウ初期化
type = varset
trigger1 = roundstate != 2
v = 54
value = 0

[state -2]                      ;行動封印カウントセット
type = varset
triggerall = var(54) != [1,600]
trigger1 = numhelper(4000) = 1
v = 28
value = 800

[state -2]                      ;歩き・ジャンプ封印カウントセット
type = varset
triggerall = var(54) != [1,600]
trigger1 = numhelper(4008) = 1
v = 29
value = 500

[state -2]                      ;行動封印カウント初期化
type = varset
trigger1 = roundstate != 2
v = 28
value = 0

[state -2]                      ;歩き・ジャンプ封印カウント初期化
type = varset
trigger1 = roundstate != 2
v = 29
value = 0

[State -2] 
type = varset
triggerall = palno = 12
trigger1 = RoundState = 2 && (GameTime%50) = 1
trigger2 = RoundState != 2
fv = 22
value = 0+((RoundState = 2)*enemy,life)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2] 
type = varset
triggerall = palno = 12
trigger1 = RoundState = 2 && (GameTime%55) = 1
trigger1 = fvar(22) != 0 && enemy,life >= fvar(22)
trigger2 = fvar(22) != 0 && enemy,life < fvar(22)
trigger3 = RoundState != 2
fv = 23
value = IfElse((RoundState = 2),IfElse((fvar(22) != 0 && enemy,life < fvar(22)),0,1),0)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[state -2]
type = varadd
trigger1 = palno = 12 && roundstate = 2 && fvar(23) = 1
fv = 24
value = 1+((enemy,life>=enemy,lifemax&&enemy,power>=enemy,powermax)*50)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = varset
triggerall = palno = 12
trigger1 = roundstate != 2 || fvar(23) = 0 || numtarget
fv = 24
value = 0
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = nothitby 
trigger1 = var(28) >= 1
value = SCA,AT
ignorehitpause = 1

[State -2]
type = HitBy 
trigger1 = var(28) >= 1
value = SCA,AA,AP
ignorehitpause = 1

[State -2]
type = nothitby 
triggerall = palno =12
trigger1 = var(55)>=1||enemy,life>=enemy,lifemax*0||roundstate!=2
value = SCA,AA,AP,AT
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = null;AllPalfx
trigger1 = stateno = 23000 && time = 200
sinadd = 255, 255, 255, -100
time = 45
supermove = 1
pausemovetime = 99999999
supermovetime = 99999999

[State -2]
type = helper
triggerall = roundstate = 2
triggerall = var(28) >= 4
trigger1 = numhelper(3000)=0
id = 3000
persistent = 1
name = "da"
pos = 0,0
postype = p2
stateno = 3100
helpertype = player
keyctrl = 1
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = helper
triggerall = roundstate = 2
triggerall = var(28) = [1,3]
trigger1 = (GameTime%2) = 1
id = 3000
persistent = 1
name = "da"
pos = 0,0
postype = p2
stateno = 3107
helpertype = player
keyctrl = 1
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = helper
triggerall = roundstate = 2
triggerall = var(29) >= 0
trigger1 = (GameTime%3) = 1
id = 4009
persistent = 1
name = "da"
pos = 0,0
postype = p2
stateno = 4009
helpertype = player
keyctrl = 1
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = helper
trigger1 = palno = 12 && numhelper(169993) = 0 && var(55) >= 1
id = 169993
persistent = 1
name = "G Mizuchi"
pos = 0,0
postype = P1
stateno = 169993
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = helper
trigger1 = numhelper(195000)=0&&stateno=23000&&time=200
id = 195000
persistent = 1
name = "black"
pos = 0,0
postype = P1
stateno = 195000
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = helper
triggerall = palno=12&&(stateno=23000&&time<160)&&!ishelper&&fvar(19)!=0
trigger1 = numhelper(2636020)=0&&enemy,numprojid(26360100)>=1
id = 2636020
persistent = 0
name = "G Mizuchi"
pos = 0,0
postype = P1
stateno = 2636020
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = helper
trigger1 = palno=12&&numhelper(195020)=0&&enemy,life>=enemy,lifemax*0&&var(55)<=1&&(stateno!=[2000,2005])
id = 195020
persistent = 1
name = "bari"
pos = 0,0
postype = P1
stateno = 195020+(EnemyNear,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT)
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = helper
trigger1 = palno=12&&!(numhelper(195010)||numhelper(195011))&&helper(195020),stateno=195022
id = 195011-statetype=S
persistent = 0
name = "baef"
pos = 20,-(40+((statetype=A)*50)+((statetype=S)*45))
postype = P1
stateno = 195010
helpertype = player
keyctrl = 0
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State -2]
type = SelfState
triggerall = ishelper(2636020)
trigger1 = var(58) != gametime
trigger2 = stateno != 2636020
trigger3 = movetype = H
trigger4 = anim = [5000,5150]
trigger5 = stateno = [5000,5150]
value = 0
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = Explod
triggerall = palno!=12||palno=12&&!numhelper(200000)
triggerall = roundstate = 2
triggerall = enemy,statetype != L
triggerall = var(54) >= 1
trigger1 = (GameTime%18) = 1
anim = 3025
id = 3025
sprpriority = 11
postype = p2
pos = -40+(random%80),-90+(random%20)
vel = 0,4
trans = add
;bindtime = -1
removetime = 15
supermove = 1
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = Explod
triggerall = roundstate = 2
triggerall = var(28) >= 4 || var(29) >= 0
trigger1 = (GameTime%18) = 1
anim = 3024
id = 3024
sprpriority = 11
postype = p2
pos = -50+(random%100),0-(random%50)
vel = -1+(random%3),-3
trans = add
;bindtime = -1
removetime = 20
supermove = 1
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = Explod
triggerall = palno = 12
trigger1 = enemy,numprojid(21511198241)||enemy,numprojid(21511198242)
anim = IfElse((enemy,numprojid(21511198242)),7001,7011)
sprpriority = 120
postype = p2
pos = (enemy,const(size.mid.pos.x)),(enemy,const(size.mid.pos.y))
facing = -1
ownpal = 1
ontop = 1

[State -2]
type = PlaySnd
trigger1 =palno=12&&(enemy,numprojid(21511198241)||enemy,numprojid(21511198242))
value = 4000,3

[State -2]
type = null;PlaySnd
trigger1 =palno=12&&enemy,numprojid(21511198242)
value = 120,0

[State -2]
type = SuperPause
triggerall = palno!=12||palno=12&&!numhelper(200000)
triggerall = stateno != 2005
triggerall = roundstate = 2
triggerall = var(54) >= 1
trigger1 = (GameTime%2) = 1
time = 1
movetime = 1
darken = 0
anim = -1

[State -2]
type = Trans
trigger1 = var(55) >= 50
trans = addalpha
alpha = 50-((palno=12)*40),230+((palno=12)*200)

[State -2]
type = Trans
trigger1 = palno=12&&enemy,life>=enemy,lifemax*0&&var(55)<=49&&alive
trans = addalpha
alpha = 200,230

[State -2]
type = AssertSpecial
triggerall = var(55) = [0,49]
trigger1 = (GameTime%2) = 1
flag = invisible

[State -2]
type = stopSnd
trigger1 = stateno != 100
channel = 1

[state -2]
type = stopsnd
trigger1 = movetype = H
channel = 3

[state -2]
type = stopsnd
trigger1 = stateno != 1055
channel = 5

[State -2]
type = stopSnd
trigger1 = MoveType = H
channel = 2

[State -2]
type = varadd
trigger1 = 1
v = 15
value = -1

[State -2]
type = EnvColor
trigger1 = projhit20000 = 1
persistent = 0
ignorehitpause = 1
time = 1
value = 255,255,255
under = 1

[state -2]
type = varset
trigger1 = movetype = H
v = 13
value = 0

[State -2]
type = VarRandom
trigger1 = 1
v = 6
range = 0,2

[state -2]
type = varset
trigger1 = palno = 1
trigger2 = palno = 2
trigger3 = palno = 3
trigger4 = palno = 4
trigger5 = palno = 5
trigger6 = palno = 6
v = 1
value = 0

[state -2]
type = varset
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
trigger4 = palno = 10
trigger5 = palno = 11
trigger6 = palno = 12
v = 1
value = 1

[state -2]
type = varadd
trigger1 = 1
persistent = 0
ignorehitpause = 1
v = 4
value = -1

[state -2]
type = pause
trigger1 = var(4) >= 1
trigger1 = gametime % 2
persistent = 0
ignorehitpause = 1
time = 1

[state -2]
type = stopsnd
trigger1 = MoveType = H
channel = 1

[state -2]
type = afterimagetime
trigger1 = MoveType = H
time = 0

[State -2]
type = varset
trigger1 = RoundState != 2
v = 26
value = 0

[state -2]
type = stopsnd
trigger1 = RoundState = 2
channel = 2

[state -2]
type = varset
trigger1 = RoundState = 3
IgnoreHitPause = 1
v = 12
value = 1

[state -2]
type = varset
trigger1 = RoundState = 2
IgnoreHitPause = 1
v = 12
value = 0

[State -2]
type = helper
trigger1 = loseko
trigger1 = RoundState = 3
trigger1 = numhelper(195001)=0
id = 195001
persistent = 1
name = "losevo"
pos = 0,0
postype = P1
stateno = 195001
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

;***************************************************************************
;===========================================================================
;---------------------------------------------------------------------------
[Statedef -3]; 常時監視ステ?ト
;---------------------------------------------------------------------------
;===========================================================================
;***************************************************************************

[State -3]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 107 
trigger3 = stateno = 103 
value = 40, 0

[State -3]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) <= 0
value = 40, 1

[State -3]
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) > 1
value = 40, 2

[State -3]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 105 
value = 105, 0

[State -3]
type = stopSnd
trigger1 = stateno != 100
channel = 1

[State -3]
type = removeexplod
trigger1 = MoveType = H
ID = 2405

[State -3]
type = removeexplod
trigger1 = MoveType = H
ID = 1000

[state -3]
type = afterimagetime
trigger1 = movetype = H
time = 0

[State -3]
type = Width
trigger1 = 1
edge = 5,0

[State -3]
type = nothitby 
triggerall = var(1) = 1 && palno !=12
trigger1 = var(55) >= 0
value = SCA,AA,AP
ignorehitpause = 1

[State -3]
type = HitBy 
triggerall = var(1) = 1 && palno !=12
trigger1 = var(55) >= 0
value = SCA,AT
ignorehitpause = 1

[State -3] 
type = varset 
trigger1 = 1 
var(58) = gametime

[State -3] 
type = varset 
trigger1 = 1 
v = 39
value = gametime+10005 
ignorehitpause = 1

[State -3]
type = varset
trigger1 = stateno = 10
trigger1 = time = 0
trigger2 = stateno = 100
v = 15
value = 20

[State -3]
type = varset
trigger1 = stateno = 52
trigger1 = time = 0
v = 15
value = 0

[State -3]
type = varset
trigger1 = stateno = 40
trigger1 = command != "holdup"
v = 16
value = 1

[State -3]
type = varset
trigger1 = stateno = 40
trigger1 = command = "holdup"
v = 16
value = 0

[State -3]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 42
trigger1 = time = 1
trigger1 = var(15) >= 1
x = 5

[State -3]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 43
trigger1 = time = 1
trigger1 = var(15) >= 1
x = -5

[State -3]
type = veladd
trigger1 = stateno = 50
trigger1 = time = 1
trigger1 = var(16) = 1
y = 3

[State -3]
type = AfterImage
trigger1 = stateno = 50
trigger1 = time = 1
trigger1 = var(15) >= 1
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
