;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 1] ;Clear all int variables
type = VarRangeSet
trigger1 = roundsexisted = 0
value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = roundsexisted = 0
fvalue = 0

;-----------------------------------------------------------------------------------------
;ここより前は変更してはいけない
;-----------------------------------------------------------------------------------------

;AI自動起動
[State 5900, AI_Set]
type = Varset
trigger1 = 0            ;「trigger1 = 1」にすると自動起動
var(31) = 1             ;この行は変えなくていい

;AIレベル設定
[State 5900, AI_Level]
type = Varset
trigger1 = 1
var(32) = 4             ;1-6で指定。詳しくは「AIレベル解説.txt」を参照

;足下のオーラの有無(ゲージ自動上昇のON/OFF)
[State 5900, Aura]
type = Varset
trigger1 = 1
var(33) = 0             ;0か1以上で指定。0ならオーラあり(ゲージ自動上昇)、1以上は無し

;AIレベルが低い時にLifeを減らして試合開始(Lv1:800 Lv2:1200 Lv3:1600 Lv4:2000)
[State 5900, Life]
type = Varset
trigger1 = 1
var(34) = 0             ;0か1以上で指定。0なら通常、1以上はAIレベルに応じて初期体力が少なくなる
                        ;AI起動時のみ。上の「AI自動起動」と併用を推奨

;勝利ポーズでホッパーとリッパーが来るかどうか
[State 5900, Win Pose 1]
type = Varset
trigger1 = 1
var(36) = 1             ;0か1以上で指定。0なら来ない、1以上は来る

;勝利ポーズでビリーが来るかどうか
;(対戦相手がビリーである場合は来ません)
[State 5900, Win Pose 2]
type = Varset
triggerall = !(p2name = "Billy"      || p4name = "Billy")
triggerall = !(p2name = "Billy Kane" || p4name = "Billy Kane")
triggerall = !(p2name = "Billy Karn" || p4name = "Billy Karn")
trigger1 = 1
var(37) = 1             ;0か1以上で指定。0なら来ない、1以上は来る

;-----------------------------------------------------------------------------------------
;ここより後は変更してはいけない
;-----------------------------------------------------------------------------------------

;---------------------------------------------------------
[State 5900]
type = LifeSet
trigger1 = var(31) = 1
trigger1 = var(33) < 4
trigger1 = var(34) = 1
value = LifeMax * 0.2 * (1 + var(32))

;---------------------------------------------------------
;対戦相手識別

[State 5900, Clear]
type = VarSet
trigger1 = enemy,RoundsExisted = 0
var(35) = 0

[State 5900, Rock]
type = VarSet
triggerall = var(35) = 0
trigger1 = p2name = "Rock Howard"  || p4name = "Rock Howard"
trigger2 = p2name = "CvsRock"      || p4name = "CvsRock"
trigger3 = p2name = "Rock" && enemy,authorname = "Kn"
trigger4 = numenemy = 2
trigger4 = p4name = "Rock" && enemy(1),authorname = "Kn"
trigger5 = p2name = "Rock" && enemy,authorname = "RYO 2005"
trigger6 = numenemy = 2
trigger6 = p4name = "Rock" && enemy(1),authorname = "RYO 2005"
trigger7 = p2name = "Rock" && enemy,authorname = "Marisa's Friend"
trigger8 = numenemy = 2
trigger8 = p4name = "Rock" && enemy(1),authorname = "Marisa's Friend"
trigger9 = p2name = "Rock" && enemy,authorname = "DD"
trigger10 = numenemy = 2
trigger10 = p4name = "Rock" && enemy(1),authorname = "DD"
trigger11 = p2name = "silver_wolf" || p4name = "silver_wolf"
trigger12 = p2name = "Rock" && enemy,authorname = "hatimitu"
trigger13 = numenemy = 2
trigger13 = p4name = "Rock" && enemy(1),authorname = "hatimitu"
var(35) = 1

[State 5900, G.B.H];「Geese Howard 」の最後の半角スペースは消してはいけない。
type = VarSet
triggerall = var(35) = 0
trigger1 = p2name = "Geese Howard " && enemy,authorname = "Nyan☆Kiryu"
trigger2 = numenemy = 2
trigger2 = p4name = "Geese Howard " && enemy(1),authorname = "Nyan☆Kiryu"
var(35) = 2

[State 5900, Ryo]
type = VarSet
triggerall = var(35) = 0
trigger1 = p2name = "Ryo"          || p4name = "Ryo"
trigger2 = p2name = "Ryo Sakazaki" || p4name = "Ryo Sakazaki"
trigger3 = p2name = "CvsRyo"       || p4name = "CvsRyo"
trigger4 = p2name = "Mrkarate-2nd" || p4name = "Mrkarate-2nd"
var(35) = 3

[State 5900, Terry,Andy,Joe]
type = VarSet
triggerall = var(35) = 0
trigger1 = p2name = "Terry"        || p4name = "Terry"
trigger2 = p2name = "Terry Bogard" || p4name = "Terry Bogard"
trigger3 = p2name = "CvsTerry"     || p4name = "CvsTerry"
trigger4 = p2name = "Andy"         || p4name = "Andy"
trigger5 = p2name = "Andy Bogard"  || p4name = "Andy Bogard"
trigger6 = p2name = "Joe"          || p4name = "Joe"
trigger7 = p2name = "Joe Higashi"  || p4name = "Joe Higashi"
trigger8 = p2name = "CvsJoe"       || p4name = "CvsJoe"
trigger9 = p2name = "Ultimate Joe" || p4name = "Ultimate Joe"
var(35) = 4

[State 5900, Krauser]
type = VarSet
triggerall = var(35) = 0
trigger1 = p2name = "Krauser"          || p4name = "Krauser"
trigger2 = p2name = "W.Krauser"        || p4name = "W.Krauser"
trigger3 = p2name = "W. Krauser"       || p4name = "W. Krauser"
trigger4 = p2name = "Wolfgang Krauser" || p4name = "Wolfgang Krauser"
var(35) = 5

[State -4, Mr.BIG,Yamazaki,Chonrei,Chonshu,White]
type = VarSet
triggerall = var(35) = 0
trigger1  = p2name = "Mr.Big"           || p4name = "Mr.Big"
trigger2  = p2name = "Mr Big"           || p4name = "Mr Big"
trigger3  = p2name = "MrBig"            || p4name = "MrBig"
trigger4  = p2name = "Yamazaki"         || p4name = "Yamazaki"
trigger5  = p2name = "Yamazaki Ryuji"   || p4name = "Yamazaki Ryuji"
trigger6  = p2name = "Ryuji Yamazaki"   || p4name = "Ryuji Yamazaki"
trigger7  = p2name = "CvsYamazaki"      || p4name = "CvsYamazaki"
trigger8  = p2Name = "Violent Yamazaki" || p4Name = "Violent Yamazaki"
trigger9  = p2name = "Jin Chonrei"      || p4name = "Jin Chonrei"
trigger10 = p2name = "Chonrei"          || p4name = "Chonrei"
trigger11 = p2name = "Jin Chonshu"      || p4name = "Jin Chonshu"
trigger12 = p2name = "Chonshu"          || p4name = "Chonshu"
trigger13 = p2name = "White"            || p4name = "White"
var(35) = 6

[State 5900, Iori,Joe,White]
type = VarSet
triggerall = var(40) = 0
trigger1  = p2name = "Iori"         || p4name = "Iori"
trigger2  = p2name = "Iori Yagami"  || p4name = "Iori Yagami"
trigger3  = p2name = "Iori_Yagami"  || p4name = "Iori_Yagami"
trigger4  = p2name = "Yagami Iori"  || p4name = "Yagami Iori"
trigger5  = p2name = "Yagami-AKOF"  || p4name = "Yagami-AKOF"
trigger6  = p2Name = "d-Yagami"     || p4Name = "d-Yagami"
trigger7  = p2name = "Joe"          || p4name = "Joe"
trigger8  = p2name = "Joe Higashi"  || p4name = "Joe Higashi"
trigger9  = p2name = "CvsJoe"       || p4name = "CvsJoe"
trigger10 = p2name = "Ultimate Joe" || p4name = "Ultimate Joe"
trigger11 = p2name = "White"        || p4name = "White"
var(40) = 1


;---------------------------------------------------------
[State 5900, 3]
type = ChangeState
trigger1 = RoundsExisted = 0
trigger2 = enemy,RoundsExisted = 0
trigger2 = var(35) > 0
value = 190
