;=========================================================================================================================================================
; システムカード
;=========================================================================================================================================================
;===============================================================================
;霊撃札
[statedef 1020]
type = S
movetype = A
physics = S
anim = 1020
ctrl = 0

[state 1020,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 1020, 無敵]
type = nothitby
trigger1 = time = [0,13]
value = SCA

[state 1020, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 1020, ]
type = playsnd
trigger1 = animelem = 5
value = 2,3

[state 1020, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 1020, effect1]
type = helper
trigger1 = animelem = 5
name = "reigeki1"
stateno = 11020
postype = p1
pos = 2,-56
ownpal = 1
ID = 11020

[state 1020, effect2]
type = helper
trigger1 = animelem = 5
name = "reigeki2"
stateno = 11020
postype = p1
pos = 2,-56
ownpal = 1
ID = 11021

[state 1020, effect3]
type = helper
trigger1 = animelem = 5
name = "reigeki3"
stateno = 11020
postype = p1
pos = 2,-56
ownpal = 1
ID = 11022

[state 1020, ヒット定義]
type = hitdef
trigger1 = animelem = 5
attr = S,SA
damage = 0,0
animtype = hard
guardflag = MA
hitflag = MAF
priority = 4,hit
pausetime = 6,5
hitsound = S0,2
guardsound = S2,0
ground.type = high
ground.slidetime = 20
ground.hittime  = 60
ground.velocity = -5, -5
guard.velocity = 3
air.velocity = -5,-5
ground.ctrltime = 120
guard.ctrltime = 20
airguard.velocity = -3,-3
fall = 1
fall.recovertime = 120

[state 1020, ステート変更]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;-------------------------------------------------------------------------------
;霊撃effect
[statedef 11020]
type = A
movetype = I
physics = N
anim = 20042
ctrl = 0
sprpriority = 3

[state 11020, 透過]
type = trans
trigger1 = time >= 0
trans = addalpha
alpha = 256-ceil(time*8.5),256

[state 11020, 角度]
type = angleset
trigger1 = time = 0
value = random/5.55

[state 11020, 実行]
type = angledraw
trigger1 = 1
scale = (0.1+time*0.1)*4,0.1+time*0.1

[state 11020, 消える]
type = destroyself
trigger1 = time = 30



;===============================================================================
;マジックポーション
[statedef 3000]
type = S
movetype = I
physics = S
anim = 3001
ctrl = 0

[state 3000,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3000, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3000, ON]
type = varset
trigger1 = time = 22
var(14) = (var(14) | (1))

[state 3000, 時間]
type = varset
trigger1 = time = 22
var(15) = (var(15) | (1023))-(1023)+(1)*(360)

[state 3000, 霊力割れ全快]
type = varset
trigger1 = time = 22
var(19) = 0

[state 3000, 回復停止時間回復]
type = varset
trigger1 = time = 22
var(11) = 0

[state 3000, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3000, ]
type = playsnd
trigger1 = time = 22
value = 4,3

[state 3000, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3000, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3000, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;===============================================================================
;ストップウォッチ
[statedef 3005]
type = S
movetype = I
physics = S
anim = 3004
ctrl = 0

[state 3005,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3005, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3005, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3005, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000
pausemovetime = 1000

[state 3005, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3005, ON]
type = varset
trigger1 = animtime = 0
var(14) = (var(14) | (2))

[state 3005, 時間]
type = null;varset
trigger1 = animtime = 0
var(15) = (var(15) | (1047552))-(1047552)+(1024)*(92)

[state 3005, 時間減少]
type = null;varadd
trigger1 = animtime = 0
var(15) = -(1024)

[state 3005, 時止め]
type = pause
trigger1 = animtime = 0
time = 90
movetime = 90

[state 3005, ]
type = playsnd
trigger1 = animtime = 0
value = 4,6

[state 3005, 背景]
type = helper
trigger1 = animtime = 0
name = "stop_watch"
stateno = 13005
postype = p1
pos = 0,0
ownpal = 1
ID = 13005
ignorehitpause = 1
supermovetime = 1000
pausemovetime = 1000

[state 3000, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;---------------------------------------
;背景
[statedef 13005]
type = A
movetype = I
physics = N
anim = 20116
ctrl = 0

[state 13005, ]
type = assertspecial
trigger1 = 1
flag = noshadow
flag2 = invisible

[state 13005, 背景]
type = explod
trigger1 = time = 0
anim = 20116
ID = 3005
pos = 160,120
postype = left
removetime = 90
pausemovetime = 1000
sprpriority = -10
ownpal = 1

[state 13005, 出現]
type = varadd
trigger1 = time < 15
trigger1 = var(0) < 256
var(0) = ceil(256/15)

[state 13005, 消失]
type = varadd
trigger1 = time > 70
trigger1 = var(0) > 0
var(0) = -ceil(256/20)

[state 13005, 背景変化]
type = modifyexplod
trigger1 = 1
ID = 3005
pos = 160,120
postype = left
sprpriority = -10
trans = addalpha
alpha = var(0),256-var(0)

[state 13005, 背景削除]
type = removeexplod
trigger1 = time = 90
ID = 3005

[state 13005, ]
type = destroyself
trigger1 = time = 92



;===============================================================================
;白楼剣
[statedef 3010]
type = S
movetype = I
physics = S
anim = 3005
ctrl = 0

[state 3010, ]
type = velset
trigger1 = time >= 0
x = const(velocity.run.fwd.x)*(1.00+0.05*ifelse((var(14) & (61440))/(4096) = 0, 0, log(2,(var(14) & (61440))/(4096) +1)))

[state 3010, effect]
type = helper
trigger1 = time = 0
name = "dash_effect"
stateno = 20020
postype = p1
pos = 17,-44
facing = 1
ownpal = 1
ID = 20020
pausemovetime = 1000

[state 3010, effect_線]
type = explod
trigger1 = time >= 0
anim = 20047
ID = 20047
postype = p1
pos = 0,ceil(random*-0.09+10)
facing = 1
scale = 1,1
vel = -4
ownpal = 1
sprpriority = 3
persistent = 6
pausemovetime = 1000

[state 3010,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3010, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3010, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3010, ]
type = playsnd
trigger1 = time = 1
value = 3, 1

[state 3010, 霊力消費]
type = varadd
trigger1 = time = 0
var(10) = -400

[state 3010, 霊力回復停止時間]
type = varset
trigger1 = time = 0
var(11) = 300

[state 3010, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3010, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3010, ]
type = changestate
trigger1 = time = 30
value = 52;40
ctrl = 1



;===============================================================================
;身代わり人形
[statedef 3015]
type = S
movetype = I
physics = S
anim = 3000
ctrl = 0

[state 3015,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3015, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3015, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3015, レベルアップ]
type = varset
trigger1 = time = 1
trigger1 = (var(14) & (60)) != (32)
var(14) = (var(14) | (60))-(60)+(4)*ifelse((var(14) & (60))/(4) = 0, 1, (var(14) & (60))/(4)*2)

[state 3015, レベル表示]
type = helper
trigger1 = time = 1
name = "level"
stateno = 13003
ID = 13004
postype = p1
pos = 0,-50
facing = ifelse(facing = -1, -1, 1)
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[state 3015, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3015, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3015, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;===============================================================================
;グリモワール
[statedef 3020]
type = S
movetype = I
physics = S
anim = 3000
ctrl = 0

[state 3020,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3020, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3020, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3020, レベルアップ]
type = varset
trigger1 = time = 1
trigger1 = (var(14) & (960)) != (512)
var(14) = (var(14) | (960))-(960)+(64)*ifelse((var(14) & (960))/(64) = 0, 1, (var(14) & (960))/(64)*2)

[state 3020, レベル表示]
type = helper
trigger1 = time = 1
name = "level"
stateno = 13003
ID = 13004
postype = p1
pos = 0,-50
facing = ifelse(facing = -1, -1, 1)
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[state 3020, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3020, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3020, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;===============================================================================
;特注の日傘
[statedef 3025]
type = S
movetype = I
physics = S
anim = 3006
ctrl = 0

[state 3025,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3025, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3025, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3025, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3025, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3025, ON]
type = varset
trigger1 = animelem = 5
var(14) = (var(14) | (1024))

[state 3025, 時間]
type = varset
trigger1 = animelem = 5
var(15) = (var(15) | (1072693248))-(1072693248)+(1048576)*(360)

[state 3025, 特注の日傘]
type = helper
trigger1 = animelem = 5
trigger1 = numhelper(130256) = 0
name = "umbrella"
stateno = 13025
ID = 13025
pos = 0,0
postype = p1
ownpal = 1
ignorehitpause = 1

[state 3025, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;---------------------------------------
;傘
[statedef 13025]
type = A
movetype = I
physics = N
anim = 20111
ctrl = 0
sprpriority = 6

[state 13025, ]
type = assertspecial
trigger1 = 1
flag = noshadow

[state 13025, 飛び道具以外無敵]
type = nothitby
trigger1 = 1
value = ,AA,AT

[state 13025, 戻る]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 13025

[state 13025, 振り返り]
type = turn
trigger1 = root,facing != facing

[state 13025, ]
type = posset
trigger1 = 1
x = root,pos x +root,facing*50
y = root,pos y -50

[state 13025, ]
type = destroyself
trigger1 = (((root,var(15)) & (1072693248))/(1048576)) = (0)



;===============================================================================
;人魂灯
[statedef 3030]
type = S
movetype = I
physics = S
anim = 3007
ctrl = 0

[state 3030,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3030, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3030, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3030, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3030, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3030, 人魂灯]
type = helper
trigger1 = animelem = 5
name = "jinkontou"
stateno = 13030
ID = 13030
pos = 2,-52
postype = p1
ownpal = 1
ignorehitpause = 1

[state 3030, 人魂灯]
type = helper
trigger1 = animelem = 5
name = "jinkontou"
stateno = 13030
ID = 13031
pos = 2,-52
postype = p1
ownpal = 1
ignorehitpause = 1

[state 3030, 人魂灯]
type = helper
trigger1 = animelem = 5
name = "jinkontou"
stateno = 13030
ID = 13032
pos = 2,-52
postype = p1
ownpal = 1
ignorehitpause = 1

[state 3030, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;---------------------------------------
;人魂
[statedef 13030]
type = A
movetype = A
physics = N
anim = 20117
ctrl = 0
sprpriority = 6

[state 13030, 影消し]
type = assertspecial
trigger1 = 1
flag = noshadow

[state 10310, 角度・速度変数保存]
type = varset
trigger1 = p2dist x != 0
fvar(0) = atan((-p2dist y - enemy,const(size.mid.pos.y))/(ifelse(p2dist x > 0, p2dist x, -p2dist x)))

[state 10310, 角度・速度変数保存]
type = varset
trigger1 = p2dist x = 0
fvar(0) = ifelse(p2dist y >= 0, -pi/2, pi/2)

[state 13030, 初速度]
type = velset
trigger1 = time = 0
trigger1 = ishelper(13030)
x = 0
y = -2

[state 13030, 減速]
type = veladd
trigger1 = time >= 10
trigger1 = time < 50
trigger1 = ishelper(13030)
x = 0
y = 0.05

[state 13030, 初速度]
type = velset
trigger1 = time = 0
trigger1 = ishelper(13031)
x = 2
y = 0

[state 13030, 減速]
type = veladd
trigger1 = time >= 10
trigger1 = time < 50
trigger1 = ishelper(13031)
x = -0.05
y = 0

[state 13030, 初速度]
type = velset
trigger1 = time = 0
trigger1 = ishelper(13032)
x = -2
y = 0

[state 13030, 減速]
type = veladd
trigger1 = time >= 10
trigger1 = time < 50
trigger1 = ishelper(13032)
x = 0.05
y = 0

[state 13030, 一時停止]
type = velset
trigger1 = time = 60
trigger2 = time < 60
trigger2 = vel x = 0
trigger2 = vel y = 0
x = 0
y = 0

[state 13030, 加速]
type = veladd
trigger1 = time > 60
x = 0.25*cos(fvar(0))
y = -0.25*sin(fvar(0))

[state 13030, もやもや]
type = explod
trigger1 = time%8 = 0
ID = 13033
anim = 20118
postype = p1
pos = 0,0
random = 16,16
ownpal = 1
velocity = 0,-2
sprpriority = 6
removetime = 60
scale = 0.6,0.6
ignorehitpause = 1

[state 13030, 攻撃設定]
type = hitdef
trigger1 = time = 0
attr = A,SP
damage = ceil((root,fvar(10)*50)*ifelse((root,var(14) & (3932160))/(262144) = 0, 1, 1.1*(log(2,(root,var(14) & (3932160))/(262144) +1)))),13
getpower = 50,25
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 4,hit
pausetime = 7,6
hitsound = S0,2
guardsound = S2,0
sparkno = S20070
sparkxy = 0,0
ground.slidetime = 3
ground.hittime = 15
ground.velocity = -2,-4
guard.hittime = 10
ground.ctrltime = 10
guard.velocity = -1
air.velocity = -2,-4
fall = 1
fall.recovertime = 45

[state 13030, ダメージ格納]
type = parentvaradd
triggerall = (root,var(8) & (1023)) / (1) > 0
trigger1 = movecontact = 1
trigger2 = movehit = 1
var(8) = (1024)*ifelse(movehit = 1,ceil(20*root,fvar(10)),0)
persistent = 0

[state 13030, 補正]
type = parentvarset
trigger1 = movehit = 1
fvar(10) = root,fvar(10)*0.95
ignorehitpause = 1
persistent = 0

[state 13030, 飛び道具だけにあたる]
type = nothitby
trigger1 = 1
value = ,AA,AT

[state 13030, ヘルパーを消す]
type = destroyself
triggerall = time > 90
trigger1 = screenpos x < 0
trigger2 = screenpos y < -164
trigger3 = screenpos y > 235
trigger4 = screenpos x > 340
trigger5 = movecontact

[state 13030, グレイズ有効]
type = statetypeset
triggerall = numenemy > 0
trigger1 = (enemynear,stateno) = [100,119]
trigger2 = (((enemynear,stateno) = [5210,5219]) && ((enemynear,time) < 10))
movetype = I

[state 13030, グレイズ無効]
type = statetypeset
triggerall = numenemy > 0
trigger1 = (enemynear,stateno) != [100,119]
trigger2 = (((enemynear,stateno) = [5210,5219]) && ((enemynear,time) >= 10))
movetype = A

[state 13030, グレイズ音]
type = playsnd
triggerall = numenemy > 0
triggerall = movetype = I
trigger1 = p2dist x = [-14-(enemynear,const(size.ground.front)), 14+(enemynear,const(size.ground.back))]
trigger1 = p2dist y = [-12, 12-(enemynear,const(size.head.pos.y))]
value = 3, 2

[state 13030, グレイズ]
type = changestate
triggerall = numenemy > 0
triggerall = movetype = I
trigger1 = p2dist x = [-14-(enemynear,const(size.ground.front)), 14+(enemynear,const(size.ground.back))]
trigger1 = p2dist y = [-12, 12-(enemynear,const(size.head.pos.y))]
value = 13032


[state 13030, ヘルパー相殺1]
type = hitoverride
trigger1 = 1
attr = SCA,AP
stateno = 13031
time = -1
;forceair = 1

[statedef 13031];ヘルパー相殺2
type = A
movetype = I
physics = N
anim = 20117
ctrl = 0
sprpriority = 5

[state 10301, ヘルパーを消す2]
type = destroyself
trigger1 = 1


[statedef 13032];グレイズ消滅
type = A
movetype = I
physics = N
ctrl = 0

[state 13032, ]
type = destroyself
trigger1 = 1



;===============================================================================
;左扇
[statedef 3035]
type = S
movetype = A
physics = S
anim = 3008
ctrl = 0

[state 3035,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3035, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3035, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3035, ]
type = playsnd
trigger1 = time = 0
value = 2,2

[state 3035, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3035, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3035, 集中線]
type = explod
trigger1 = animelem = 2
ID = 3035
anim = 20119
postype = p1
pos = 0,-47
ownpal = 1
velocity = 0,0
sprpriority = 6
removetime = 30
scale = 1,1
bindtime = -1
ignorehitpause = 1
removeongethit = 1

[state 3035, ]
type = velset
trigger1 = animelem = 3
x = 5

[state 3035, 攻撃設定]
type = hitdef
trigger1 = animelem = 4
attr = S,SA
damage = ceil((fvar(10)*1)*ifelse((var(14) & (3932160))/(262144) = 0, 1, 1.1*(log(2,(var(14) & (3932160))/(262144) +1)))),1
getpower = 15,5
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 4,hit
pausetime = 7,6
hitsound = S0,2
guardsound = S2,1
sparkno = -1;S20070
sparkxy = -1;0,0
ground.slidetime = 3
ground.hittime = 15
ground.velocity = -9,-7
guard.hittime = 10
ground.ctrltime = 10
guard.velocity = -1
airguard.velocity = -9,-7
air.velocity = -9,-7
fall = 1
fall.recovertime = 6000
ID = 3035

[state 3035, ステートを奪う]
type = targetstate
trigger1 = movehit
trigger1 = target,stateno != [15300,15301]
value = 6040
ID = 3035
persistent = 0
ignorehitpause = 1

[state 3035, ステートを奪う]
type = targetstate
trigger1 = moveguarded
trigger1 = target,stateno = [120,155]
trigger1 = target,statetype != A
value = 6045
ID = 3035
persistent = 0
ignorehitpause = 1

[state 3035, ステートを奪う]
type = targetstate
trigger1 = moveguarded
trigger1 = target,stateno = [120,155]
trigger1 = target,statetype = A
value = 6047
ID = 3035
persistent = 0
ignorehitpause = 1

[state 3035, ダメージ格納]
type = varadd
triggerall = (var(8) & (1023)) / (1) > 0
trigger1 = movecontact = 1
trigger2 = movehit = 1
var(8) = (1024)*ifelse(movehit = 1,ceil(100*fvar(10)),0)

[state 3035, 補正]
type = parentvarset
trigger1 = movecontact = 1
fvar(10) = fvar(10)*0.80
ignorehitpause = 1
persistent = 0

[state 3035, エフェクト表示]
type = explod
trigger1 = movehit = 1
ID = 3035
anim = 20075
postype = p1
pos = floor(fvar(12)),floor(fvar(13))
velocity = 0,0
ownpal = 1
sprpriority = 6
removetime = -2
ignorehitpause = 1
supermovetime = 999
pausemovetime = 999
persistent = 0

[state 3035, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;===============================================================================
;伊吹瓢
[statedef 3040]
type = S
movetype = I
physics = S
anim = 3002
ctrl = 0

[state 3040,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3040, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3040, ON]
type = varset
trigger1 = time = 22
var(14) = (var(14) | (2048))

[state 3040, 時間]
type = varset
trigger1 = time = 22
var(16) = (var(16) | (1023))-(1023)+(1)*(74)

[state 3040, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3040, ]
type = playsnd
trigger1 = time = 22
value = 4,3

[state 3040, ]
type = poweradd
trigger1 = time = 21
value = 1000

[state 3040, ]
type = poweradd
trigger1 = time = [22,55]
trigger1 = (var(14) & (2048)) = (2048)
value = 30

[state 3040, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3040, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3040, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;===============================================================================
;天狗団扇
[statedef 3045]
type = S
movetype = I
physics = S
anim = 3000
ctrl = 0

[state 3045,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3045, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3045, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3045, レベルアップ]
type = varset
trigger1 = time = 1
trigger1 = (var(14) & (61440)) != (32768)
var(14) = (var(14) | (61440))-(61440)+(4096)*ifelse((var(14) & (61440))/(4096) = 0, 1, (var(14) & (61440))/(4096)*2)

[state 3045, レベル表示]
type = helper
trigger1 = time = 1
name = "level"
stateno = 13003
ID = 13004
postype = p1
pos = 0,-50
facing = ifelse(facing = -1, -1, 1)
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[state 3045, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3045, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3045, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;===============================================================================
;符蝕薬
[statedef 3050]
type = S
movetype = A
physics = S
anim = 3009
ctrl = 0

[state 3050,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3050, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3050, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3050, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3050, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3050, 攻撃設定]
type = hitdef
trigger1 = animelem = 4
attr = S,SA
damage = ceil((fvar(10)*60)*ifelse((var(14) & (3932160))/(262144) = 0, 1, 1.1*(log(2,(var(14) & (3932160))/(262144) +1)))),10
getpower = 20,5
givepower = -1000,10
hitflag = MAFP
guardflag = HA
animtype = medium
priority = 4,hit
pausetime = 0,10
hitsound = S0,2
guardsound = S2,0
sparkno = -1;S20070
sparkxy = -1;0,0
ground.slidetime = 3
ground.hittime = 10
ground.velocity = -7,-5
guard.hittime = 10
ground.ctrltime = 10
guard.velocity = -2
air.velocity = -7,-5
fall = 1
fall.recovertime = 60

[state 3050, 補正]
type = parentvarset
trigger1 = movehit = 1
fvar(10) = fvar(10)*0.80
ignorehitpause = 1
persistent = 0

[state 3050, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;===============================================================================
;宵越しの銭



;===============================================================================
;龍魚の羽衣
[statedef 3060]
type = S
movetype = A
physics = S
anim = 3010
ctrl = 0

[state 2000, 暗転]
type = superpause
trigger1 = animelem = 1
anim = -1
sound = -1
time = 10
movetime = 0
darken = 0

[state 3060,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3060, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3060, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3060, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3060, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3060, 無敵]
type = nothitby
trigger1 = animelem = 3,< 0
value = SCA

[state 3035, ]
type = velset
trigger1 = animelem = 2
x = 5

[state 3050, 攻撃設定]
type = hitdef
trigger1 = animelem = 3
attr = S,SA
damage = 0,0
getpower = 0,0
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 4,hit
pausetime = 7,6
hitsound = S0,2
guardsound = S2,0
sparkno = -1;S20070
sparkxy = -1;0,0
ground.slidetime = 3
ground.hittime = 15
ground.velocity = -7,-5
guard.hittime = 10
ground.ctrltime = 10
guard.velocity = -2
air.velocity = -7,-5
fall = 1
fall.recovertime = 60

[state 3060, 補正]
type = parentvarset
trigger1 = movehit = 1
fvar(10) = fvar(10)*0.80
ignorehitpause = 1
persistent = 0

[state 3060, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1




;===============================================================================
;緋想の剣



;===============================================================================
;病気平癒守
[statedef 3070]
type = S
movetype = I
physics = S
anim = 3003
ctrl = 0

[state 3070,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3070, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3070, ON]
type = varset
trigger1 = time = 22
var(14) = (var(14) | (65536))

[state 3070, 時間]
type = varset
trigger1 = time = 22
var(16) = (var(16) | (1047552))-(1047552)+(1024)*(250)

[state 3070, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3070, ]
type = playsnd
trigger1 = time = 22
value = 4,3

[state 3070, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3070, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3070, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;===============================================================================
;冷凍カエル
[statedef 3075]
type = S
movetype = I
physics = S
anim = 3006
ctrl = 0

[state 3075,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3075, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3075, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3075, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3075, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3075, 冷凍カエル]
type = helper
trigger1 = animelem = 5
name = "fleez"
stateno = 13075
ID = 13075
pos = 80,0
postype = p1
ownpal = 1
ignorehitpause = 1

[state 3075, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;---------------------------------------
;氷
[statedef 13075]
type = A
movetype = A
physics = N
anim = 20120
ctrl = 0
sprpriority = 6

[state 13075, ]
type = varadd
trigger1 = time >= 0
var(0) = 1

[state 13075. ]
type = varset
trigger1 = time = 0
fvar(0) = 0.8

[state 13075, ]
type = varadd
trigger1 = fvar(0) < 1
fvar(0) = 0.005

[state 13075, ]
type = angledraw
trigger1 = 1
scale = fvar(0),fvar(0)
ignorehitpause = 1

[state 13075, ]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256,256
ignorehitpause = 1

[state 13075, ]
type = attackdist
trigger1 = 1
value = 0

[state 13075, ]
type = assertspecial
trigger1 = 1
flag = noshadow

[state 13075, ]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 13075

[state 13075, 攻撃設定]
type = hitdef
trigger1 = enemynear,statetype = A
trigger2 = enemynear,stateno = [40,105]
attr = A,SA
damage = 0,0
getpower = 0,0
hitflag = M
;guardflag = MA
affectteam = E
animtype = hard
priority = 4,hit
pausetime = 0,0
hitsound = S0,0
guardsound = -1;S2,0
sparkno = S20060
sparkxy = 0,0
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0,-4
guard.hittime = 10
ground.ctrltime = 10
guard.velocity = 0
air.velocity = 0,-4
fall = 1
fall.recovertime = 60
ID = 13075

[state 13075, 攻撃設定]
type = hitdef
trigger1 = root,statetype = A
trigger2 = root,stateno = [40,105]
attr = A,SA
damage = 0,0
getpower = 0,0
hitflag = M
;guardflag = MA
affectteam = F
animtype = hard
priority = 4,hit
pausetime = 0,0
hitsound = S0,0
guardsound = -1;S2,0
sparkno = S20060
sparkxy = 0,0
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0,-4
guard.hittime = 10
ground.ctrltime = 10
guard.velocity = 0
air.velocity = 0,-4
fall = 1
fall.recovertime = 60
ID = 13075

[state 13075, 攻撃設定]
type = hitdef
triggerall = numpartner > 0
trigger1 = partner,statetype = A
trigger2 = partner,stateno = [40,105]
attr = A,SA
damage = 0,0
getpower = 0,0
hitflag = M
;guardflag = MA
affectteam = F
animtype = hard
priority = 4,hit
pausetime = 0,0
hitsound = S0,0
guardsound = -1;S2,0
sparkno = S20060
sparkxy = 0,0
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0,-4
guard.hittime = 10
ground.ctrltime = 10
guard.velocity = 0
air.velocity = 0,-4
fall = 1
fall.recovertime = 60
ID = 13075

[state 13075. ]
type = varset
trigger1 = time = 0
fvar(0) = 0.8

[state 13075, ]
type = varadd
trigger1 = fvar(0) < 1
fvar(0) = 0.005

[state 3075, ステートを奪う]
type = targetstate
trigger1 = movehit
value = 6050
ID = 13075
persistent = 0
ignorehitpause = 1

[state 13075, ]
type = varadd
trigger1 = movehit = 1
var(1) = 1

[state 13075, ]
type = changestate
trigger1 = var(0) >= 600
trigger2 = var(1) >= 3
value = 13076



;-------------------------------------------------
;
[statedef 13076]
type = A
movetype = I
physics = N
anim = 20120
ctrl = 0

[state 13076. ]
type = varset
trigger1 = time = 0
fvar(0) = 1

[state 13076, ]
type = varadd
trigger1 = fvar(0) > 0.8
fvar(0) = -0.005

[state 13076, 影消し]
type = assertspecial
trigger1 = 1
flag = noshadow

[state 13075, ]
type = trans
trigger1 = 1
trans = addalpha
alpha = 256,256
ignorehitpause = 1

[state 13075, ]
type = angledraw
trigger1 = time > 0
scale = fvar(0),fvar(0)
ignorehitpause = 1

[state 13076, ]
type = destroyself
trigger1 = time > 20


;===============================================================================
;龍星
[statedef 3080]
type = S
movetype = I
physics = S
anim = 3000
ctrl = 0

[state 3080,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3080, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3080, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3080, ON]
type = varset
trigger1 = time = 0
var(14) = (var(14) | (131072))

[state 3080, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3080, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3080, 龍星アーマー]
type = helper
trigger1 = time = 0
name = "armer"
stateno = 13080
ID = 13080
pos = 0,0
postype = p1
ownpal = 1
ignorehitpause = 1

[state 3080, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;-------------------------------------------------
;龍星アーマー
[statedef 13080]
type = A
movetype = I
physics = N

[state 13080, 効果時間]
type = varadd
trigger1 = time >= 0
var(0) = 1

[state 13080, 影消し・見えない]
type = assertspecial
trigger1 = 1
flag = noshadow
flag2 = invisible
ignorehitpause = 1

[state 13080, 同じ当たり判定]
type = changeanim
trigger1 = 1
value = root,anim
elem = root,animelemno(0)
ignorehitpause = 1

[state 13080, 同じ場所]
type = bindtoroot
trigger1 = 1
ignorehitpause = 1

[state 13080, 同じ向き]
type = turn
trigger1 = facing != root,facing
ignorehitpause = 1

[state 13080, 投げ無敵]
type = nothitby
trigger1 = 1
value =  ,AT

[state 13080, アーマーはがれる]
type = nothitby
trigger1 = var(1) >= 2
value = SCA

[state 13080, アーマー復活]
type = varset
trigger1 = time >= 20
trigger1 = root,movetype != H
var(1) = 0

[state 13080, グレイズ判定]
type = null
trigger1 = root,stateno = [100,119]
trigger1 = var(2) := 1
trigger2 = root,stateno != [100,119]
trigger2 = var(2) := 0

[state 13080, グレイズ時飛び道具無敵]
type = nothitby
trigger1 = var(2) = 1
value =  ,AT,AP

[state 13080, 複数ヒット判定]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP
stateno = 13081
ignorehitpause = 1

[state 13080, Off]
type = parentvarset
trigger1 = var(0) >= 240
trigger2 = var(1) >= 2
trigger3 = var(2) = 1
var(14) = (root,var(14) | (131072))-(131072)

[state 13080, 消滅]
type = destroyself
trigger1 = var(0) > 240

;-------------------------------------------------
;複数ヒットカウント
[statedef 13081]
type = A
movetype = I
physics = N

[state 13081, カウント]
type = varadd
trigger1 = 1
var(1) = 1
persistent = 0

[state 13081, アーマーステートに移行]
type = changestate
trigger1 = 1
value = 13080



;===============================================================================
;制御棒
[statedef 3085]
type = S
movetype = I
physics = S
anim = 3000
ctrl = 0

[state 3085,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3085, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3085, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3085, レベルアップ]
type = varset
trigger1 = time = 1
trigger1 = (var(14) & (3932160)) != (2097152)
var(14) = (var(14) | (3932160))-(3932160)+(262144)*ifelse((var(14) & (3932160))/(262144) = 0, 1, (var(14) & (3932160))/(262144)*2)

[state 3085, レベル表示]
type = helper
trigger1 = time = 1
name = "level"
stateno = 13003
ID = 13004
postype = p1
pos = 0,-50
facing = ifelse(facing = -1, -1, 1)
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[state 3085, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3085, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3085, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;===============================================================================
;三粒の天滴
[statedef 3090]
type = S
movetype = I
physics = S
anim = 3000
ctrl = 0

[state 3090,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3090, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3090, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3090, レベルアップ]
type = varset
trigger1 = time = 1
trigger1 = (var(14) & (130023424)) != (67108864)
var(14) = (var(14) | (130023424))-(130023424)+(4194304)*ifelse((var(14) & (130023424))/(4194304) = 0, 1, (var(14) & (130023424))/(4194304)*2)

[state 3090, レベル3無敵]
type = varset
trigger1 = time = 1
trigger1 = (var(14) & (16777216)) = (16777216)
var(17) = (var(17) | (1023))-(1023)+(1)*480

[state 3090, レベル4無敵時間追加]
type = varset
trigger1 = time = 1
trigger1 = (var(14) & (33554432)) = (33554432)
var(17) = (var(17) | (1023))-(1023)+(1)*(480+(var(17) & (1023))/(1))

[state 3090, マジックポーション効果ON]
type = varset
triggerall = time = 1
trigger1 = (var(14) & (16777216)) = (16777216)
;trigger2 = (var(14) & (33554432)) = (33554432)
;trigger3 = (var(14) & (67108864)) = (67108864)
var(14) = (var(14) | (134217728))

[state 3090, 霊力割れ全快]
type = varset
trigger1 = time = 1
var(19) = 0

[state 3090, ]
type = null;palfx
trigger1 = time >= 0
trigger1 = ((var(17) & (1023))/(1)) != (0)
time = (var(17) & (1023))/(1)
add = 256*ceil(abs(cos(time*pi/180))),0,0
mul = 256,256,256
sinadd = 0,0,0,0
invertall = 0
color = 256

[state 3090, レベル表示]
type = helper
trigger1 = time = 1
name = "level"
stateno = 13003
ID = 13004
postype = p1
pos = 0,-50
facing = ifelse(facing = -1, -1, 1)
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[state 3090, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3090, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3090, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;===============================================================================
;ナマズの大地震
[statedef 3095]
type = S
movetype = I
physics = S
anim = 3000
ctrl = 0

[state 3095,使用枚数カウンター]
type = varset
trigger1 = time = 0
var(17) = (var(17) | (1047552)) - (1047552)+(1024)*ifelse((var(17) & (1047552))/(1024) = 0, 1, (var(17) & (1047552))/(1024)+1)

[state 3095, ]
type = poweradd
trigger1 = time = 0
value = -1000

[state 3095, ]
type = playsnd
trigger1 = time = 0
value = 4,2

[state 3095, ナマズ]
type = helper
trigger1 = time = 12
name = "namazu"
stateno = 13095
ID = 13095
pos = 120,-500
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
ignorehitpause = 1

[state 3095, スペカ名]
type = helper
trigger1 = time = 0
name = "spell_name"
stateno = 22001
postype = p1
pos = 0,0
ownpal = 1
ID = 22001
ignorehitpause = 1
supermovetime = 1000

[state 3095, カード使用]
type = helper
trigger1 = time = 0
name = "use_card"
stateno = 13002
ID = 13002
pos = 0,-50
ownpal = 1
ignorehitpause = 1

[state 3095, ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;----------------------------------------------------
;ナマズ
[statedef 13095]
type = A
movetype = A
physics = N
anim = 20115
ctrl = 0

[state 13095, ]
type = sprpriority
trigger1 = 1
value = -1

[state 13095, ]
type = assertspecial
trigger1 = 1
flag = noshadow

[state 13095, ]
type = null;trans
trigger1 = time = [0,72]
trans = addalpha
alpha = 0,256

[state 13095, ]
type = posset
trigger1 = time = 0
y = -700

[state 13095, ]
type = veladd
trigger1 = time >= 0
y = 0.1

[state 13095, ]
type = null;posset
trigger1 = time = [0,73]
y = -240

[state 13095, ]
type = playsnd
trigger1 = time = 73
value = 4,4

[state 13095, ]
type = null;velset
trigger1 = time = 73
y = 1

[state 13095, ]
type = null;veladd
trigger1 = time > 73
trigger1 = time < 207
y = 0.2

[state 13095, ]
type = velset
trigger1 = time < 207
trigger1 = pos y > -10
y = 0

[state 13095,]
type = posset
trigger1 = time < 207
trigger1 = pos y > -10
y = 0

[state 13095, ]
type = playsnd
trigger1 = time = 117
value = 4,5

[state 13095, ]
type = envshake
trigger1 = time = 117
time = 45
freq = 90
ampl = 4
phase = 90

[state 13095, ]
type = hitdef
trigger1 = animelem = 2
attr = A, SP 
damage = ceil((root,fvar(10)*200)*ifelse((root,var(14) & (3932160))/(262144) = 0, 1, 1.1*(log(2,(root,var(14) & (3932160))/(262144) +1)))),50
getpower = 75,25
animtype = hard
guardflag = L
hitflag = MF
priority = 4, Hit
pausetime = 0, 8
;sparkno = S20070
;sparkxy = -10, -58
hitsound = S0, 2
guardsound = S2, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
air.hittime = 20
ground.velocity = 0,-4
guard.velocity = -2
guard.ctrltime = 15
guard.dist = 320
airguard.velocity = -2,-1
ground.cornerpush.veloff = 2
guard.conerpush.veloff = 3
affectteam = B
fall = 1
fall.recover = 0

[state 13095, 補正]
type = parentvarset
trigger1 = movehit = 1
fvar(10) = fvar(10)*0.75
ignorehitpause = 1

[state 10395, ]
type = velset
trigger1 = time = 207
y = -6

[state 10395, ]
type = veladd
trigger1 = time >= 207
y = 0.3

[state 10395, ]
type = destroyself
trigger1 = pos y > 200


