;---------------------------------------------------------------------------
;勝利ポーズ
[Statedef 180]
type = S

[State 死祀3Win]
type=changestate
trigger1 = time = 0
trigger1 = Anim = 3705
value=3706

[State 250, 2]
type = VarRandom
trigger1 = time = 0
v = 11
range = 0,1

[State ラウンド勝利　残り体力70%以上]
type = ChangeState
trigger1 = prevstateno != 3705
trigger1 = !MatchOver
trigger1 = life = LifeMax
;trigger1 = (100*life/LifeMax) >= 70
value = 181
[State ラウンド勝利　残り体力70%未満]
type = ChangeState
trigger1 = prevstateno != 3705
trigger1 = !MatchOver
trigger1 = life != LifeMax
;trigger1 = (100*life/LifeMax) < 70
value = 183

[State 試合終了　残り体力50%以上]
type = ChangeState
trigger1 = prevstateno != 3705
trigger1 = MatchOver
trigger1 = (100*life/LifeMax) >= 50
value = 185

[State 試合終了　残り体力50%未満]
type = ChangeState
trigger1 = prevstateno != 3705
trigger1 = MatchOver
trigger1 = (100*life/LifeMax) < 50
value = 186

;---------------------------------------------------------------------------
; ラウンド勝利
[Statedef 181]
type = S
ctrl = 0
velset = 0,0

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State アニメ]
type = ChangeAnim
trigger1 = Anim = 0
trigger1 = Time = 0
trigger2 = Anim = 184
trigger2 = AnimTime = 0
value = 181

[State ラウンドノットオバ]
type = AssertSpecial
trigger1 = time <= 250
flag = RoundNotOver

[State ラウンド勝利(エフェクト)]
Type = Explod
trigger1 = anim = 181
trigger1 = animelem = 18
Anim = 182
id = 180
pos = -14,-87
postype = p1
BindTime = -1
scale = 0.5,0.5
Ownpal = 1
sprpriority = 2
IgnoreHitPause = 1
Persistent = 0

[State seクヌギ]
type = PlaySnd
trigger1 = anim = 181
trigger1 = animelem = 18
value = s3,0
channel = 6

[State voiceそのまま寝ていろ]
type = PlaySnd
trigger1 = anim = 181
trigger1 = animelem = 3
value = s110,5
channel = 5

;---------------------------------------------------------------------------
; ラウンド勝利なにもしない
[Statedef 183]
type = S
ctrl = 0
velset = 0,0

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State アニメ]
type = ChangeAnim
trigger1 = Anim = 184
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 完全勝利1
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State ラウンドノットオバ]
type = AssertSpecial
trigger1 = time = [0,320]
flag = RoundNotOver

[State voice世の理]
type = PlaySnd
trigger1 = animelem = 1
value = s110,7
channel = 5
volume = 255

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; 完全勝利1
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State ラウンドノットオバ]
type = AssertSpecial
trigger1 = time = [0,320]
flag = RoundNotOver

[State voice世の理]
type = PlaySnd
trigger1 = animelem = 1
value = s110,7
channel = 5
volume = 255

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; 完全勝利2
[Statedef 186]
type = S
ctrl = 0
Anim = 186
velset = 0,0

[State ラウンドノットオバ]
type = AssertSpecial
trigger1 = time = [0,280]
flag = RoundNotOver

[State seピーン]
type = PlaySnd
trigger1 = animelem = 2
value = s0,8
channel = 6

[State voice諦めよ]
type = PlaySnd
trigger1 = animelem = 10
value = s110,8
channel = 5
volume = 255

[State 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
;イントロ
;---------------------------------------------------------------------------
[Statedef 190]
type = S
ctrl = 0

[State アルカナセレクト]
Type = Helper
Trigger1 = var(53) = 0
Trigger1 = time = 0
StateNo 		= 11000
ID 				= 11000
name 			= "Arcana select"
PosType 		= P1
Ownpal 			= 1
IgnoreHitPause = 1
Persistent = 0

;[State 250, 2]
;type = VarRandom
;trigger1 = time = 0
;v = 11
;range = 0,3

;イントロのフラグ
[State 190,1]
type = AssertSpecial
trigger1 = 1
flag = Intro

;[State 40, 6]
;type = ChangeState
;triggerall = Time = 1
;triggerall = TeamMode = single || (TeamMode = turns && RoundNo = 1)
;trigger1 = Enemy,var(57) = 1
;Trigger1 = Enemy,AuthorName = "Ina"
;Trigger1 = Enemy,Name = "Saki_Tsuzura"
;value = 900
;
;[State 40, 6]
;type = ChangeState
;triggerall = Time = 1
;triggerall = TeamMode = single || (TeamMode = turns && RoundNo = 1)
;trigger1 = Enemy,var(57) = 1
;Trigger1 = Enemy,AuthorName = "Ina"
;Trigger1 = Enemy,Name = "Lilica_Felchenerow"
;value = 903
;
;[State 40, 6]
;type = ChangeState
;triggerall = Time = 1
;triggerall = TeamMode = single || (TeamMode = turns && RoundNo = 1)
;Trigger1 = Enemy,AuthorName = "Ina"
;Trigger1 = Enemy,Name = "Zenia_Valov"
;value = 905
;
;[State 40, 6]
;type = ChangeState
;triggerall = Time = 1
;triggerall = TeamMode = single || (TeamMode = turns && RoundNo = 1)
;Trigger1 = Enemy,AuthorName = "Ina"
;Trigger1 = Enemy,Name = "Clarice_Di_Lanza"
;value = 906

[State 40, 6]
type = ChangeState
trigger1 = Time = 1
;value = 191+var(11)
value = ifelse(random%2 = 0,191,194)

;---------------------------------------------------------------------------
;イントロ１
[Statedef 191]
type = S
Anim = 190
ctrl = 0

[State 250, 2]
type = VarRandom
trigger1 = 1
v = 11
range = -50,50

[State voiceハラド]
type = PlaySnd
trigger1 = anim != 0
trigger1 = animelem = 1
value = s110,0
channel = 5

;イントロのフラグ
[State 190,1]
type = AssertSpecial
trigger1 = Anim = 190
flag = Intro

[State 175, 1]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = anim != 0
value = 0

;---------------------------------------------------------------------------
;イントロ２
[Statedef 192]
type = S
Anim = 193
ctrl = 0

[State voice去れ]
type = PlaySnd
trigger1 = anim != 0
trigger1 = animelem = 1
value = s110,1
channel = 5
volume = 50

;イントロのフラグ
[State 190,1]
type = AssertSpecial
trigger1 = Anim = 193
flag = Intro

[State 175, 1]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = anim != 0
value = 0

;---------------------------------------------------------------------------
;イントロ３
[Statedef 193]
type = S
Anim = 195
ctrl = 0

[State voice引け]
type = PlaySnd
trigger1 = anim != 0
trigger1 = animelem = 5
value = s110,2
channel = 5
volume = 50

;イントロのフラグ
[State 190,1]
type = AssertSpecial
trigger1 = Anim = 195
flag = Intro

[State 175, 1]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = anim != 0
value = 0

;---------------------------------------------------------------------------
;イントロ４
[Statedef 194]
type = S
Anim = 196
ctrl = 0

[State voiceいざ参る]
type = PlaySnd
trigger1 = anim != 0
trigger1 = animelem = 1
value = s110,3
channel = 5
volume = 50

;イントロのフラグ
[State 190,1]
type = AssertSpecial
trigger1 = Anim = 196
flag = Intro

[State 175, 1]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = anim != 0
value = 0


;;---------------------------------------------------------------------------
;;特種イントロ(VS冴姫)
;[Statedef 900]
;type = S
;Anim = 900
;ctrl = 0
;
;[State -2, 1]
;type = PlaySnd
;trigger1 = Animelem = 2
;trigger1 = anim != 0
;value = s110,20
;channel = 5
;
;;イントロのフラグ
;[State 190,1]
;type = AssertSpecial
;trigger1 = var(59) = 0
;trigger1 = time = [0,525]
;trigger2 = var(59) != 0
;trigger2 = Anim != 0
;flag = Intro
;IgnoreHitPause = 1
;Persistent = 1
;
;[State 175, 1]
;type = ChangeAnim
;trigger1 = AnimTime = 0
;trigger1 = anim != 0
;value = 0
;
;;---------------------------------------------------------------------------
;;特種イントロ(VSリリカ)
;[Statedef 903]
;type = S
;Anim = 903
;ctrl = 0
;
;[State -2, 1]
;type = PlaySnd
;trigger1 = Animelem = 2
;trigger1 = anim != 0
;value = s110,23
;channel = 5
;
;;イントロのフラグ
;[State 190,1]
;type = AssertSpecial
;trigger1 = var(59) = 0
;trigger1 = time = [0,375]
;trigger2 = var(59) != 0
;trigger2 = Anim != 0
;flag = Intro
;IgnoreHitPause = 1
;Persistent = 1
;
;[State 175, 1]
;type = ChangeAnim
;trigger1 = AnimTime = 0
;trigger1 = anim != 0
;value = 0
;
;;---------------------------------------------------------------------------
;;特種イントロ(VSゼニア)
;[Statedef 905]
;type = S
;Anim = 905
;ctrl = 0
;
;[State -2, 1]
;type = PlaySnd
;trigger1 = Animelem = 4
;trigger1 = anim != 0
;value = s110,25
;channel = 5
;
;;イントロのフラグ
;[State 190,1]
;type = AssertSpecial
;trigger1 = var(59) = 0
;trigger1 = time = [0,325]
;trigger2 = var(59) != 0
;trigger2 = Anim != 0
;flag = Intro
;IgnoreHitPause = 1
;Persistent = 1
;
;[State 175, 1]
;type = ChangeAnim
;trigger1 = AnimTime = 0
;trigger1 = anim != 0
;value = 0
;
;;---------------------------------------------------------------------------
;;特種イントロ(VSクラリーチェ)
;[Statedef 906]
;type = S
;Anim = 906
;ctrl = 0
;
;[State -2, 1]
;type = PlaySnd
;trigger1 = Animelem = 4
;trigger1 = anim != 0
;value = s110,26
;channel = 5
;
;;イントロのフラグ
;[State 190,1]
;type = AssertSpecial
;trigger1 = var(59) = 0
;trigger1 = time = [0,425]
;trigger2 = var(59) != 0
;trigger2 = Anim != 0
;flag = Intro
;IgnoreHitPause = 1
;Persistent = 1
;
;[State 175, 1]
;type = ChangeAnim
;trigger1 = AnimTime = 0
;trigger1 = anim != 0
;value = 0

;---------------------------------------------------------------------------
; タイムオーバー
[Statedef 170]
type = S
ctrl = 0
anim = Ifelse(Matchover,172,171)
velset = 0,0

[State voice取り返せぬ・なんとしたことか]
type = PlaySnd
trigger1 = animelem = 4
value = s110,Ifelse(Matchover,13,12)
channel = 5
volume = 255

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; ドロー
[Statedef 175]
type = S
ctrl = 0
anim = Ifelse(Matchover,176,175)
velset = 0,0

[State voiceおもしろい・いたしかたあるまいな]
type = PlaySnd
trigger1 = animelem = 4
value = s110,Ifelse(Matchover,11,10)
channel = 5
volume = 255

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; コンテニュー？
[Statedef 5500]
type = S
ctrl = 0
velset = 0,0

[State 5500, 1] ;Use continue animation if available
type = ChangeAnim
trigger1 = time = 0
value = 5500
