

;Var(55)生死判別
;Var(56)超反応
;Var(57)ランダム
;Var(58)敵のヘルパー確認
;Var(59)AI判定

;FVar(10)夢想天生
;FVar(11)臓器破壊ヒット
;FVar(33)霊力
;FVar(35)攻撃力変動
;FVar(36)霊激


;===========================================================================
; 準常時監視ステート（−３）
;===========================================================================


[Statedef -3]

[State -3, 音を鳴らす];「ジャンプ」か「バックステップ」
type = PlaySnd
TriggerAll =!  isHelper
TriggerAll = Time = 1
Trigger1 = stateno = 52  ;着地ステート
Trigger2 = stateno = 106 ;バックステップ後の着地ステート
value = 0, 2



[State -3, 音を鳴らす];ジャンプ
type = PlaySnd
TriggerAll =!  isHelper
TriggerAll = Time = 1
Trigger1 = stateno = 40
Trigger2 = stateno = 45
value = 0, 1


;---------------------------------------------------------------------------
;不具合　修正
;---------------------------------------------------------------------------



[State -3, ステート変更]
type = ChangeState
TriggerAll =!isHelper
TriggerAll = Var(59) != 0
TriggerAll = pos Y < -5
TriggerAll = palno != 12
Trigger1 = StateNo = 120
Trigger2 = StateNo = 130
Trigger3 = StateNo = 131
value = 132
SuperMoveTime = 9999
PauseMoveTime = 9999



[State -3, ステート変更]
type = ChangeState
TriggerAll =!isHelper
TriggerAll = Statetype != A
TriggerAll = Statetype != L
TriggerAll = movetype != H 
TriggerAll = movetype != A 
TriggerAll = pos Y < -5
TriggerAll = RoundState = 2
TriggerAll = palno != 12
Trigger1 = 1
value = 50
SuperMoveTime = 9999
PauseMoveTime = 9999



[State -1,]
type = PosSet
TriggerAll =!isHelper
TriggerAll = Statetype != A
TriggerAll = Statetype != L
TriggerAll = movetype != H 
TriggerAll = movetype != A 
TriggerAll = RoundState = 2
TriggerAll = palno != 12
Trigger1 = pos Y > 10
y = 0


;---------------------------------------------------------------------------
;AI
;---------------------------------------------------------------------------




[State -3, AI]
type = VarSet
TriggerAll = Var(59) = 0
TriggerAll =!  isHelper
TriggerAll = RoundState = [1,2]
Trigger1   = command = "AI_0"
Trigger2   = command = "AI_1"
Trigger3   = command = "AI_2"
Trigger4   = command = "AI_3"
Trigger5   = command = "AI_4"
Trigger6   = command = "AI_5"
Trigger7   = command = "AI_6"
Trigger8   = command = "AI_7"
Trigger9   = command = "AI_8"
Trigger10   = command = "AI_9"
Trigger11   = command = "AI_10"
Trigger12   = command = "AI_11"
Trigger13   = command = "AI_12"
Trigger14   = command = "AI_13"
Trigger15   = command = "AI_14"
Trigger16   = command = "AI_15"
Trigger17   = command = "AI_16"
Trigger18   = command = "AI_17"
Trigger19   = command = "AI_18"
Trigger20   = command = "AI_19"
Trigger21   = command = "AI_20"
Trigger22   = command = "AI_21"
Trigger23   = command = "AI_22"
Trigger24   = command = "AI_23"
Trigger25   = command = "AI_24"
Trigger26   = command = "AI_25"
Trigger27   = command = "AI_26"
Trigger28   = command = "AI_27"
Trigger29   = command = "AI_28"
Trigger30   = command = "AI_29"
Trigger31   = command = "AI_30"
Trigger32   = command = "AI_31"
Trigger33   = command = "AI_32"
Trigger34   = command = "AI_33"
Trigger35   = command = "AI_34"
Trigger36   = command = "AI_35"
Trigger37   = command = "AI_36"
Trigger38   = command = "AI_37"
Trigger39   = command = "AI_38"
Trigger40   = command = "AI_39"
Trigger41   = command = "AI_40"
Trigger42   = command = "AI_41"
Trigger43   = command = "AI_42"
Trigger44   = command = "AI_43"
Trigger45   = command = "AI_44"
Trigger46   = command = "AI_45"
Trigger47   = command = "AI_46"
Trigger48   = command = "AI_47"
Trigger49   = command = "AI_48"
Trigger50   = command = "AI_49"
Trigger51   = command = "AI_50"
Trigger52   = command = "AI_51"
Trigger53   = command = "AI_52"
Trigger54   = command = "AI_53"
Trigger55   = command = "AI_54"
Trigger56   = command = "AI_55"
Trigger57   = command = "AI_56"
Trigger58   = command = "AI_57"
Trigger59   = command = "AI_58"
Trigger60   = command = "AI_59"
Trigger61   = command = "AI_60"
V = 59
Value = 1




[State -3, AI]
type = VarSet
TriggerAll = Var(59) >= 1
TriggerAll =!  isHelper
Trigger1   = RoundState >= 3
Trigger2   = Life = 0
V = 59
Value = 0





[State -3, ]
type = VarSet
TriggerAll = Var(58) = 0
TriggerAll =!isHelper
Trigger1   = EnemyNear, NumHelper > 0
Trigger1   = RoundState = 2
V = 58
Value = EnemyNear, NumHelper




[State -3, AI]
type = VarRandom
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
Trigger1   = Time = 1
Trigger2   = Time%60 = 1
Trigger2   = MoveType != I
Trigger3   = Time%1 = 1
Trigger3   = MoveType = I
Trigger4   = stateno = 1010
Trigger5   = stateno = 1080
v = 57
Range = 0,99
IgnoreHitPause = 1




[State -3, AI];超反応2
type = VarSet
TriggerAll = Var(56) = 0
TriggerAll =!  isHelper
Trigger1   =  EnemyNear,HitDefAttr != SCA
V = 56
Value = 0
IgnoreHitPause = 1


[State -3, AI];超反応
type = VarAdd
TriggerAll = Var(56) = 1
TriggerAll =!  isHelper
Trigger1   = EnemyNear,HitDefAttr = SCA
V = 56
Value = 1
IgnoreHitPause = 1




[State -3, 生死判別]
Type = VarSet
TriggerAll =!  isHelper
Trigger1 = NumEnemy = 1
Trigger2 = NumEnemy = 2
Trigger2 = EnemyNear,Life > 0
V = 55
Value = 0
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -3, 生死判別2]
Type = VarSet
TriggerAll =!  isHelper
Trigger1 = NumEnemy > 1
Trigger1 = EnemyNear,Life = 0
V = 55
Value = 1
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999



;---------------------------------------------------------------------------
;試験用ステ抜け
;---------------------------------------------------------------------------


[State -3, ヘルパー召喚];時間監視ヘルパー召喚
type = Helper
TriggerAll =! isHelper
TriggerAll =  root,Var(40) = 0
TriggerAll =  palno  = 12
TriggerAll =  NumHelper(111111) = 0
TriggerAll =  RoundState = [0,3]
TriggerAll =  Life != 0
Trigger1 = 1
ID = 111111
postype = p1
pos = 0,0
facing = 1
stateno = 111111
SuperMoveTime = 9999999999999999999999999999999999
PauseMoveTime = 9999999999999999999999999999999999
HelperType = Player





;試験用ステ抜け　ヘルパー
[State -3]
type = SelfState
TriggerAll = root,palno = 12
TriggerAll = root,life != 0
TriggerAll = isHelper(111111)
TriggerAll = root,Var(40) = 0
TriggerAll = RoundState = [0,3]
Trigger1 = 1
value = 111111
Persistent = 1
supermove = 1
IgnoreHitPause = 1
pausemovetime = 99999999
supermovetime = 99999999




[State -3, ]
Type = VarSet
TriggerAll =! isHelper
TriggerAll = root,palno  = 12
TriggerAll = root,life != 0
Trigger1 = 1
V = 37
Value = Gametime
IgnoreHitPause = 1
pausemovetime = 9999999999999999999999999999999
supermovetime = 9999999999999999999999999999999


[State -3, ヘルパー行動不可]
type = Ctrlset
Trigger1 =  isHelper
value = 0
pausemovetime = 99999999999
supermovetime = 99999999999
IgnoreHitPause = 1


[State -3, ヘルパー画面固定]
type = screenbound
Trigger1 = isHelper
value = 0
movecamera = 0
pausemovetime = 99999999999
supermovetime = 99999999999
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;１２用
;---------------------------------------------------------------------------


[State -3, たまに博麗拳術秘技『助っ人を呼ばざるを得ない』]
type = ChangeState
value = 3000
TriggerAll =!  isHelper
TriggerAll = var(59) = 1
TriggerAll = palno  = 12
TriggerAll = Random <= var(57)*3
TriggerAll = StateType != A
TriggerAll = NumHelper(23000) = 0
TriggerAll = FVar(33) > 99
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 100
Trigger1 = ctrl || stateno = 19|| stateno = 20




[State -3, たまに博麗拳術秘技『封魔宝玉』]
type = ChangeState
value = 2030
TriggerAll =!  isHelper
TriggerAll = var(59) = 1
TriggerAll = palno  = 12
TriggerAll = Random <= var(57)*1
TriggerAll = StateType != A
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 30
Trigger1 = ctrl || stateno = 19|| stateno = 20




[State -3, 博麗拳術『天掌』]
type = ChangeState
value = 1030
TriggerAll =!  isHelper
TriggerAll = var(59) = 1
TriggerAll = palno  = 12
TriggerAll = Random <= var(57)*3
TriggerAll = StateType = S
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 20
Trigger1 = ctrl || stateno = 19|| stateno = 20



[State -3, 博麗拳術『顎崩し』]
type = ChangeState
value = 1020
TriggerAll =!  isHelper
TriggerAll = var(59) = 1
TriggerAll = palno  = 12
TriggerAll = Random <= var(57)*5
TriggerAll = StateType != A
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 50
Trigger1 = ctrl || stateno = 19|| stateno = 20





[State -3, 博麗拳術『綿潰し』]
type = ChangeState
value = 1000
TriggerAll =!  isHelper
TriggerAll = var(59) = 1
TriggerAll = palno  = 12
TriggerAll = Random <= var(57)*10
TriggerAll = StateType != A
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 70
Trigger1 = ctrl || stateno = 19|| stateno = 20



[State -3, 博麗拳術『地祇抉り』]
type = ChangeState
value = 1040
TriggerAll = var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  = 12
TriggerAll = Random <= var(57)*5
TriggerAll = StateType != A
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 100
Trigger1 = ctrl || stateno = 19|| stateno = 20





[State -3, 博麗拳術秘技『一矢葬送』]
type = ChangeState
value = 2020
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  = 12
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 65
TriggerAll =  Random<=var(57)*40
TriggerAll = P2MoveType = A
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(33) > 70;余分に多いのは無駄使いさせない為
Trigger1 = stateno = 210 || stateno = 310 || stateno = 300 




[State -3, 『背面取り』から博麗拳術秘技『気功散戒』]
type = ChangeState
value = 2010
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  = 12
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-10,10]
TriggerAll =  Random<=var(57)*10
TriggerAll = EnemyNear(Var(55)),StateType != L
Trigger1 = (stateno = 1050) && time > 11



[State -3, 『背面取り』から博麗拳術秘技『封魔宝玉』]
type = ChangeState
value = 2030
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  = 12
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-30,30]
TriggerAll =  Random<=var(57)*20
TriggerAll = EnemyNear(Var(55)),StateType != L
Trigger1 = (stateno = 1050) && time > 11




[State -3, 『背面取り』から博麗拳術秘技『天地破砕』]
type = ChangeState
value = 2040
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  = 12
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-80,80]
TriggerAll =  Random<=var(57)*10
TriggerAll = EnemyNear(Var(55)),StateType != L
Trigger1 = (stateno = 1050) && time > 11




[State -3, 『背面取り』から博麗拳術秘技『一矢葬送』』]
type = ChangeState
value = 2020
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  = 12
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-100,100]
TriggerAll =  Random<=var(57)*200
TriggerAll = EnemyNear(Var(55)),StateType != L
Trigger1 = (stateno = 1050) && time > 11



[State -3, 距離があいたら博麗拳術『背面取り』]
type = ChangeState
value = 1050
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  = 12
TriggerAll = FVar(33) > 20
TriggerAll = StateType = S
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 120
TriggerAll = stateno != 1050
TriggerAll = EnemyNear(Var(55)),StateType != L
TriggerAll = P2stateno != [5020,5071]
TriggerAll =  Random<=var(57)*5
Trigger1 = ctrl || stateno = 19|| stateno = 20


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;追撃系
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------



[State -3, 敵がガード時に博麗剣術『頭砕き』]
type = ChangeState
value = 1080
TriggerAll = Var(59) = 1
TriggerAll = palno  != 12
TriggerAll = StateType != A
TriggerAll = P2BodyDist X > 5
TriggerAll = P2BodyDist X < 50
TriggerAll = P2StateType != A
TriggerAll = P2BodyDist Y-Ceil(Vel Y)-Ceil(EnemyNear(Var(55)),Vel Y) >= -40
TriggerAll =  Random<=var(57)*40
TriggerAll = P2MoveType != A
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20
trigger1 = P2stateno = [120,160]









[State -3, 裏に回ったらしゃがみ弱スライディング]
type = ChangeState
value = 300
TriggerAll = Var(59) = 1
TriggerAll = palno  != 12
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 0
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(Var(55)),StateType = S
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20



[State -1, 食らい時博麗拳術秘技『夢想天生』使用後];ゲージレベル１
type = SelfState
value = 2061
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  != 12
TriggerAll = FVar(10) != 0
TriggerAll = Alive
TriggerAll = FVar(33) > 10
TriggerAll = statetype != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 80
TriggerAll =  Random<=var(57)*20
Trigger1 = pos Y > -5
Trigger1 = StateNo=[5000,5001] 
Trigger2 = StateNo=[5010,5011] 
Persistent = 1
supermove = 1
IgnoreHitPause = 1
pausemovetime = 99999999
supermovetime = 99999999







[State -1, 博麗拳術秘技『霊激』];ゲージレベル１
type = SelfState
value = 2080
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  != 12
TriggerAll = Alive
TriggerAll = FVar(36) != 0
TriggerAll = FVar(33) > 80
TriggerAll = statetype != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 80
TriggerAll =  Random<=var(57)*10
Trigger1 = pos Y > -5
Trigger1 = StateNo=[5000,5001] 
Trigger2 = StateNo=[5010,5011] 
Persistent = 1
supermove = 1
IgnoreHitPause = 1
pausemovetime = 99999999
supermovetime = 99999999









[State -3, 博麗拳術秘技『夢想天生』使用後]
type = ChangeState
value = 2061
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  != 12
TriggerAll = StateType != A 
TriggerAll = p2movetype = A
TriggerAll = StateType = S
TriggerAll = RoundState = 2
TriggerAll = StateNo!=[120,155]
TriggerAll = FVar(10) != 0
TriggerAll = Life  < 500
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 0
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 80
TriggerAll = inguarddist
TriggerAll = Pos Y = 0
TriggerAll = EnemyNear(var(55)),P2BodyDist X <= 40
Trigger1 = Random<=var(57)*75||var(57)>9
Trigger2 = P2BodyDist X>90||EnemyNear,Time>50
Trigger2 = Random<=var(57)*16
Trigger3 = var(56) > 0
Trigger3 = P2BodyDist X = [0,60]
Trigger4 = InGuardDist || P2BodyDist X = [-40,28]
Trigger4 = EnemyNear,HitDefAttr = SA,AA,AP
Trigger4 = random <= 600
Trigger5 = var(56) > 0
Trigger5 = P2BodyDist X = [-20,60]
Trigger6 = EnemyNear,Time < 2
Trigger6 = inguarddist
Trigger6 = random <= 500
Trigger7 = EnemyNear,HitDefAttr = C,AA || EnemyNear,HitDefAttr = C,AP
Trigger7 = p2bodydist X = [-10,60]
Trigger7 = random <= 500
Trigger8 = var(56) > 0
Trigger8 = P2BodyDist X = [-20,60]
Trigger9 = P2MoveType = A
Trigger9 = P2BodyDist X = [-10,30]
 



[State -3, 博麗拳術『因果転掌』]
type = ChangeState
value = 1060
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  != 12
TriggerAll = FVar(33) > 20
TriggerAll = StateType != A 
TriggerAll = p2movetype = A
TriggerAll = StateType = S
TriggerAll = RoundState = 2
TriggerAll = StateNo!=[120,155]
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 0
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 60
TriggerAll = inguarddist
TriggerAll = Pos Y = 0
Trigger1 = Random<=var(57)*75||var(57)>9
Trigger2 = P2BodyDist X>90||EnemyNear,Time>50
Trigger2 = Random<=var(57)*16
Trigger3 = var(56) > 0
Trigger3 = P2BodyDist X = [0,60]
Trigger4 = InGuardDist || P2BodyDist X = [-40,28]
Trigger4 = EnemyNear,HitDefAttr = SA,AA,AP
Trigger4 = random <= 600
Trigger5 = var(56) > 0
Trigger5 = P2BodyDist X = [-20,60]
Trigger6 = EnemyNear,Time < 2
Trigger6 = inguarddist
Trigger6 = random <= 500
Trigger7 = EnemyNear,HitDefAttr = C,AA || EnemyNear,HitDefAttr = C,AP
Trigger7 = p2bodydist X = [-10,60]
Trigger7 = random <= 500
Trigger8 = var(56) > 0
Trigger8 = P2BodyDist X = [-20,60]
Trigger9 = P2MoveType = A
Trigger9 = P2BodyDist X = [-10,30]




[State -3, 『背面取り』から博麗拳術『顎崩し』]
type = ChangeState
value = 1020
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-40,40]
TriggerAll =  Random<=var(57)*10
TriggerAll = EnemyNear(Var(55)),StateType = A
Trigger1 = (stateno = 1050) && time > 11



[State -3, 『背面取り』から強攻撃]
type = ChangeState
value = 210
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-70,70]
TriggerAll =  Random<=var(57)*20
TriggerAll = EnemyNear(Var(55)),StateType != L
Trigger1 = (stateno = 1050) && time > 11



[State -3, 『背面取り』からしゃがみ強攻撃]
type = ChangeState
value = 310
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-70,70]
TriggerAll =  Random<=var(57)*20
TriggerAll = EnemyNear(Var(55)),StateType != L
Trigger1 = (stateno = 1050) && time > 11



[State -3, 『背面取り』からスライディング]
type = ChangeState
value = 300
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-130,130]
TriggerAll =  Random<=var(57)*200
TriggerAll = EnemyNear(Var(55)),StateType != L
Trigger1 = (stateno = 1050) && time > 11





[State -3, 仰け反っていたらしゃがみ弱スライディング]
type = ChangeState
value = 300
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2MoveType = H
TriggerAll = P2StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-130,130]
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(var(55)),stateno != [5080,120]
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20



[State -3, 特攻博麗拳術秘技『昇り星』]
type = ChangeState
value = 2050
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = FVar(33) > 50
TriggerAll = StateType != A
TriggerAll = P2MoveType = A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 120
TriggerAll =  Random<=var(57)*5
TriggerAll = EnemyNear(Var(55)),StateType = S
TriggerAll = EnemyNear(var(55)),HitDefAttr != ,HA
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20


[State -3, 博麗拳術『背面取り』]
type = ChangeState
value = 1050
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = FVar(33) > 20
TriggerAll = StateType = S
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 60
TriggerAll = stateno != 1050
TriggerAll = P2stateno != [5020,5071]
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 0
TriggerAll = ctrl || stateno = 19|| stateno = 20
TriggerAll = EnemyNear(Var(55)),BackEdgeBodyDist >= 20
Trigger1 = EnemyNear(var(55)),HitDefAttr = ,NT
Trigger2 = EnemyNear(Var(55)),MoveType = A
Trigger2 = Random<=var(57)*50
Trigger3 = var(56) > 0
Trigger4 = EnemyNear,MoveType = A
Trigger4 = EnemyNear,HitDefAttr = SA,AA,AP || Enemy,NumHelper > 0 || Enemy,NumProj > 0 || Enemy,NumHelper >Var(58)    
Trigger4 = ctrl || stateno = 19|| stateno = 20
Trigger5 = InGuardDist || (EnemyNear,MoveType = A && (EnemyNear,P2BodyDist X = [-20,120])) 
Trigger5 = Enemy,NumHelper > 0 
Trigger6 = InguardDist || P2MoveType = A
Trigger6 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 0
Trigger6 = EnemyNear,HitDefAttr = SA,AA,AP
Trigger6 = random <= 500
Trigger7 = InGuardDist
Trigger7 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 70
Trigger7 = EnemyNear,Vel X >= 0
Trigger8 = InguardDist
Trigger8 = EnemyNear,MoveType = A
Trigger8 = Enemy,NumHelper > 0 || Enemy,NumProj > 0
Trigger9 = P2MoveType = A
Trigger9 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-10,30]
Trigger10 = Enemy,HitDefAttr = ,NP,SP,HP
Trigger10 = Enemy,NumHelper >Var(53) || Enemy,NumHelper >Var(54)
Trigger11 = EnemyNear,HitDefAttr = ,NP,SP,HP
Trigger11 = EnemyNear,NumHelper >Var(54) || Enemy,NumHelper >Var(53)
Trigger12 = var(56) > 0
Trigger12 = Ctrl || stateno = 19 || stateno = 20












[State -3, 開幕博麗拳術秘技『昇り星』もどき]
type = ChangeState
value = 2050
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = FVar(33) > 50
TriggerAll = EnemyNear(Var(55)),StateType != L
TriggerAll = EnemyNear(Var(55)),p2bodydist X = [70,170]

TriggerAll = EnemyNear(Var(55)),stateno = 0
TriggerAll = P2stateno != [5020,5071]
Trigger1 　= ctrl





[State -3, 特攻しゃがみ弱スライディング]
type = ChangeState
value = 300
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2MoveType = A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-130,130]
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(Var(55)),StateType = S
TriggerAll = EnemyNear(var(55)),HitDefAttr != ,HA
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20




[State -3, 敵が倒れた時博麗拳術秘技『夢想天生』]
type = ChangeState
value = 2060
TriggerAll = var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  != 12
TriggerAll = Random <= var(57)*20
TriggerAll = FVar(10) = 0
TriggerAll = Life  < 500
TriggerAll = FVar(33) > 50
TriggerAll = StateType != A
Trigger1 = EnemyNear(var(55)),stateno = 5120
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(var(55)),P2BodyDist X > 40
Trigger1 = P2MoveType != A
Trigger1 = Random<=var(57)*60
Trigger2 = ctrl || stateno = 19|| stateno = 20
Trigger2 = P2StateType = A
Trigger2 = P2MoveType = H
Trigger2 = Random<=var(57)*60
Trigger2 = EnemyNear(var(55)),P2BodyDist X > 50




[State -3, おきぜめ博麗拳術秘技『封魔宝玉』]
type = ChangeState
value = 2030
TriggerAll = var(59) = 1
TriggerAll =!  isHelper
TriggerAll = Random <= var(57)*20
TriggerAll = FVar(33) > 50
TriggerAll = StateType != A
Trigger1 = EnemyNear(var(55)),stateno = 5120
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(var(55)),P2BodyDist X > 50
Trigger1 = EnemyNear(var(55)),P2BodyDist X < 90
Trigger1 = P2MoveType != A
Trigger1 = Random<=var(57)*60



[State -3, おきぜめ博麗拳術『幻幽』]
type = ChangeState
value = 1010
TriggerAll = var(59) = 1
TriggerAll =!  isHelper
TriggerAll = Random <= var(57)*20
TriggerAll = FVar(33) > 20
TriggerAll = StateType != A
Trigger1 = EnemyNear(var(55)),stateno = 5110
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(var(55)),P2BodyDist X > 30
Trigger1 = EnemyNear(var(55)),P2BodyDist X < 70
Trigger1 = P2MoveType != A
Trigger1 = Random<=var(57)*60







[State -3, 敵が倒れたらバックダッシュ]
type = ChangeState
value = 105
TriggerAll = var(59) = 1
TriggerAll =!  isHelper
TriggerAll = Random <= var(57)*20
TriggerAll = StateType != A
TriggerAll = BackEdgeBodyDist >= 40
Trigger1 = EnemyNear(var(55)),stateno = 5120
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(var(55)),P2BodyDist X < 50
Trigger1 = P2MoveType != A
Trigger1 = Random<=var(57)*60



[State -3, おきぜめ博麗拳術『地祇抉り』]
type = ChangeState
value = 1040
TriggerAll = var(59) = 1
TriggerAll =!  isHelper
TriggerAll = Random <= var(57)*20
TriggerAll = FVar(33) > 20
TriggerAll = StateType != A
Trigger1 = EnemyNear(var(55)),stateno = 5120
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(var(55)),P2BodyDist X > 50
Trigger1 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 130
Trigger1 = P2MoveType != A
Trigger1 = Random<=var(57)*60



[State -3, 調整ダッシュ]
type = ChangeState
value= 100
TriggerAll = var(59)= 1
TriggerAll =!  isHelper
TriggerAll = RoundState = 2
TriggerAll = StateType != A
TriggerAll = MoveType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 0
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = stateno != 100
TriggerAll = stateno != 105
Trigger1 = EnemyNear(var(55)),P2BodyDist X < 30
Trigger1 = BackEdgeBodyDist <= 20
Trigger1 = Random<=var(57)*60



[State -3, ジャンプ反応博麗拳術『天掌』]
type = ChangeState
value = 1030
TriggerAll = var(59) = 1
TriggerAll =!  isHelper
TriggerAll = Random <= var(57)*40
TriggerAll = StateType = S
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 40
TriggerAll = EnemyNear(var(55)),StateType = A
TriggerAll = Pos y >  -150
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = Pos y < 0
Trigger1 = Random<=var(57)*30


[State -3, ジャンプ反応博麗拳術『毛玉遊び』]
type = ChangeState
value = 1070
TriggerAll = var(59) = 1
TriggerAll =!  isHelper
TriggerAll = palno  != 12
TriggerAll = Random <= var(57)*40
TriggerAll = StateType = S
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 100
TriggerAll = EnemyNear(var(55)),StateType = A
TriggerAll = Pos y >  -150
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = Pos y < 0
Trigger1 = Random<=var(57)*30





[State -3, 小攻撃]
type = ChangeState
value = 200
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-30,30]
TriggerAll = P2BodyDist Y >= -100
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(Var(55)),StateType != L
TriggerAll = P2MoveType != A
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(Var(55)),movetype  != A


[State -3, 強攻撃]
type = ChangeState
value = 210
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-50,50]
TriggerAll = P2BodyDist Y >= -100
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(Var(55)),StateType != L
TriggerAll = P2MoveType != A
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(Var(55)),movetype  != A




[State -3, しゃがみ弱スライディング]
type = ChangeState
value = 300
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-110,110]
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(Var(55)),StateType = S
TriggerAll = P2MoveType != A
TriggerAll = EnemyNear(var(55)),stateno != [5080,120]
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20



[State -3, しゃがみ強]
type = ChangeState
value = 310
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-50,50]
TriggerAll = P2BodyDist Y >= -100
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(Var(55)),StateType != L
TriggerAll = P2MoveType != A
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(Var(55)),movetype  != A





[State -3, 博麗拳術『地祇抉り』]
type = ChangeState
value = 1040
TriggerAll = Var(59) = 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-120,120]
TriggerAll = P2BodyDist Y >= -100
TriggerAll =  Random<=var(57)*1
TriggerAll = EnemyNear(Var(55)),StateType != L
TriggerAll = P2MoveType != A
Trigger1 = statetype = S
Trigger1 = ctrl || stateno = 19|| stateno = 20
Trigger1 = EnemyNear(Var(55)),movetype  != A







[State -3,ジャンプ]
Type = ChangeState
Value = 39
TriggerAll = var(59)= 1
TriggerAll =!  isHelper
TriggerAll = RoundState = 2
TriggerAll = StateType != A
TriggerAll = MoveType != A
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = EnemyNear(var(55)),StateNo != 5120
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 10
TriggerAll = P2stateno != [5020,5071]
TriggerAll = palno  != 12
Trigger1 =   P2StateType  = A
Trigger1 = EnemyNear(var(55)),MoveType != H
Trigger1 =  Random<=var(57)*1
Trigger1 =  stateno = 0



[State -3, 博麗拳術『毛玉遊び』]
type = ChangeState
value = 1070
TriggerAll = Var(59) = 1
TriggerAll =!isHelper
TriggerAll = palno  != 12
TriggerAll = StateType != A
TriggerAll = FVar(33) > 20
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 100
TriggerAll = P2BodyDist Y >= -200
TriggerAll =  Random<=var(57)*6
TriggerAll = EnemyNear(var(55)),stateno != 5120
TriggerAll = EnemyNear,StateType != L
TriggerAll = Enemy,NumHelper < Var(58)
Trigger1 = ctrl || stateno = 19|| stateno = 20


;---------------------------------------------------------------------------
;始動系
;---------------------------------------------------------------------------









[State -3,ジャンプ]
Type = ChangeState
Value = 39
TriggerAll = var(59)= 1
TriggerAll =!isHelper
TriggerAll = RoundState = 2
TriggerAll = StateType != A
TriggerAll = MoveType != A
TriggerAll = EnemyNear(var(55)),StateNo != 5120
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = EnemyNear(var(55)),StateType != L
Trigger1 = P2bodydist X >= 20
Trigger1 = P2StateType  = A
Trigger1 = Random<=var(57)*60
Trigger1 = EnemyNear(var(55)),MoveType != H


[State -3,反応ジャンプ]
Type = ChangeState
Value = 39
TriggerAll = var(59)= 1
TriggerAll =!  isHelper
TriggerAll = StateType != A
TriggerAll = RoundState = 2
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = P2MoveType  != A
TriggerAll = EnemyNear(var(55)),MoveType != H
Trigger1 = P2stateno = [39,50]
Trigger1 = Random<=var(57)*100
Trigger2 = Pos y < 0
Trigger2 = Random<=var(57)*30


;---------------------------------------------------------------------------
;防御・移動系
;---------------------------------------------------------------------------




[State -3, 前移動]
type = ChangeState
value= 19
Triggerall = var(59)= 1
TriggerAll =!  isHelper
Triggerall = RoundState = 2
Triggerall = StateType = S
Triggerall = MoveType != A
TriggerAll = EnemyNear(Var(55)),P2StateType != A
TriggerAll =! inguarddist
Triggerall = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) > 0
Triggerall = Ctrl
Triggerall = Enemy,NumProj = 0 
Trigger1 = Random <= var(57)*300
Trigger1 = P2MoveType != A






[State -3, 後ろ移動]
type = ChangeState
value= 19
Triggerall = var(59)= 1
TriggerAll =!  isHelper
Triggerall = RoundState = 2
Triggerall = StateType = S
Triggerall = MoveType != A
TriggerAll = EnemyNear(Var(55)),P2StateType != A
TriggerAll =! inguarddist
Triggerall = EnemyNear(var(55)),StateType = L
Triggerall = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 160
Triggerall = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 200
Triggerall = Ctrl
Triggerall = Enemy,NumProj = 0 
Trigger1 = Random <= var(57)*10












[State -3, バックステップ]
type = ChangeState
value= 105
TriggerAll = var(59)= 1
TriggerAll =!  isHelper
TriggerAll = RoundState = 2
TriggerAll = StateType != A
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = BackEdgeBodyDist >= 70
TriggerAll = stateno != 100
TriggerAll = stateno != 105
TriggerAll =! inguarddist
Trigger1 = EnemyNear,HitDefAttr = ,NT,ST,HT
Trigger1 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 0
Trigger1 = P2BodyDist Y-Ceil(Vel Y)-Ceil(EnemyNear(Var(55)),Vel Y) = [-30,0]
Trigger1 = Random<=var(57)*35
Trigger2 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 70
Trigger2 = EnemyNear(var(55)),P2StateNo = 5120
Trigger2 = Random<=var(57)*60
Trigger3 = var(56) > 0
Trigger3 = Enemy,NumHelper > 0
Trigger3 = Enemy,NumHelper >Var(54)
Trigger3 = Random<=var(57)*40
Trigger4 = var(56) > 0
Trigger4 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) > 40
Trigger4 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 100
Trigger5 = P2stateno = 5120
Trigger5 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 40
Trigger6 = EnemyNear,HitDefAttr = C,AA,AP
Trigger6 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 50
Trigger7 = var(56) > 0
Trigger8 = MoveGuarded
Trigger8 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) > 70
Trigger9 = P2StateType = A
Trigger9 = P2MoveType = A
Trigger9 = EnemyNear(var(55)),P2BodyDist X <= 100
Trigger9 = EnemyNear(var(55)),P2BodyDist Y <= -40


[State -3, ダッシュ]
type = ChangeState
value= 100
TriggerAll = var(59)= 1
TriggerAll =!  isHelper
TriggerAll = RoundState = 2
TriggerAll = StateType != A
TriggerAll = MoveType != A
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = stateno != 100
TriggerAll = stateno != 105
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 0
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll =! inguarddist
Trigger1 = EnemyNear(var(55)),P2BodyDist X >= 150
Trigger1 = P2MoveType = A
Trigger2 = stateno = 0
Trigger2 = Random<=var(57)*10
Trigger3 = BackEdgeBodyDist <= 70
Trigger3 = EnemyNear(var(55)),P2StateNo = 5120
Trigger3 = Random<=var(57)*60




[State -3,ジャンプ]
Type = ChangeState
Value = 39
TriggerAll = var(59)= 1
TriggerAll =!  isHelper
TriggerAll = RoundState = 2
TriggerAll = StateType != A
TriggerAll = MoveType != A
TriggerAll = EnemyNear(var(55)),StateNo != 5120
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = EnemyNear(var(55)),MoveType != H
Trigger1 = EnemyNear(var(55)),HitDefAttr = ,NT
Trigger1 = inguarddist
Trigger1 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 15
Trigger1 = P2BodyDist Y-Ceil(Vel Y)-Ceil(EnemyNear(Var(55)),Vel Y) = [-30,0]
Trigger1 = Random<=var(57)*600
Trigger2 = P2BodyDist Y-Ceil(Vel Y)-Ceil(EnemyNear(Var(55)),Vel Y) <= -20
Trigger2 = P2bodydist X >= 50
Trigger2 = P2StateType  = A
Trigger2 = Random<=var(57)*600
Trigger3 = var(56) > 0
Trigger3 = enemynear,HitDefAttr = SC, NT,ST,HT
Trigger3 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 40






[State -3, 空中復帰]
type = ChangeState
TriggerAll = var(59)= 1
TriggerAll =!  isHelper
TriggerAll = RoundState = 2
TriggerAll = NumEnemy
TriggerAll = CanRecover
TriggerAll = life != 0
Trigger1 = (StateNo = 5030) && (Movetype = H) && (EnemyNear(var(55)),MoveType != A) && (Pos Y < -20)
Trigger2 = (StateNo = 5035) && (Movetype = H) && (EnemyNear(var(55)),MoveType != A) && (Pos Y < -20)
Trigger3 = (StateNo = 5050) && (Movetype = H) && (EnemyNear(var(55)),MoveType != A) && (Pos Y < -20)
Trigger4 = (StateNo = 5071) && (Movetype = H) && (EnemyNear(var(55)),MoveType != A) && (Pos Y < -20)
value = 5210
IgnoreHitPause = 1







;---------------------------------------------------------------------------
;コンボ系
;---------------------------------------------------------------------------






[State -3,  博麗拳術秘技『臓器破壊』]
type = ChangeState
value = 2070
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = palno  != 12
TriggerAll = StateType != A
TriggerAll = Life  < 800
TriggerAll =  Random<=var(57)*10
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(11) = 0
TriggerAll = FVar(33) > 50
TriggerAll = stateno != 210 && stateno != 310
Trigger1 = MoveHit
Trigger1 = var(1)




[State -3,  博麗拳術秘技『夢想封印』]
type = ChangeState
value = 2000
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType != A
TriggerAll = Life  < 500
TriggerAll =  Random<=var(57)*10
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(33) > 50
TriggerAll = stateno = 300
Trigger1 = MoveHit
Trigger1 = var(1)
Trigger2 = (stateno = [200,299]) || (stateno = [300,399]) || stateno = 401
Trigger2 = stateno != 440 ;[Statedef 440]（足払いのステート）ではない時
Trigger2 = movecontact
Trigger2 = palno  = 12




[State -3,  博麗拳術秘技『封魔宝玉』]
type = ChangeState
value = 2030
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType != A
TriggerAll =  Random<=var(57)*20
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(33) > 50
TriggerAll = stateno = 300
Trigger1 = MoveHit
Trigger1 = var(1)
Trigger2 = (stateno = [200,299]) || (stateno = [300,399]) || stateno = 401
Trigger2 = stateno != 440 ;[Statedef 440]（足払いのステート）ではない時
Trigger2 = movecontact
Trigger2 = palno  = 12



[State -3, 博麗拳術秘技『気功散戒』]
type = ChangeState
value = 2010
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 65
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(33) > 70;余分に多いのは無駄使いさせない為
TriggerAll = stateno != 210 && stateno != 310 
Trigger1 = MoveHit
Trigger1 = var(1)
Trigger2 = (stateno = [200,299]) || (stateno = [300,399]) || stateno = 401
Trigger2 = stateno != 440 ;[Statedef 440]（足払いのステート）ではない時
Trigger2 = movecontact
Trigger2 = palno  = 12



[State -3, 博麗拳術秘技『一矢葬送』]
type = ChangeState
value = 2020
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 65
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(33) > 70;余分に多いのは無駄使いさせない為
TriggerAll = stateno = 210 || stateno = 310 || stateno = 300 
Trigger1 = MoveHit
Trigger1 = var(1)
Trigger2 = (stateno = [200,299]) || (stateno = [300,399]) || stateno = 401
Trigger2 = stateno != 440 ;[Statedef 440]（足払いのステート）ではない時
Trigger2 = movecontact
Trigger2 = palno  = 12



[State -3, 博麗拳術秘技『昇り星』]
type = ChangeState
value = 2050
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 105
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(33) > 70;余分に多いのは無駄使いさせない為
TriggerAll = stateno != 210 && stateno != 310 
Trigger1 = MoveHit
Trigger1 = var(1)
Trigger2 = (stateno = [200,299]) || (stateno = [300,399]) || stateno = 401
Trigger2 = stateno != 440 ;[Statedef 440]（足払いのステート）ではない時
Trigger2 = movecontact
Trigger2 = palno  = 12



[State -3, 博麗拳術『顎崩し』]
type = ChangeState
value = 1020
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 35
TriggerAll =  Random<=var(57)*10
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(33) > 20
TriggerAll = stateno != 210 && stateno != 310 
Trigger1 = MoveHit
Trigger1 = var(1)
Trigger2 = (stateno = [200,299]) || (stateno = [300,399]) || stateno = 401
Trigger2 = stateno != 440 ;[Statedef 440]（足払いのステート）ではない時
Trigger2 = movecontact
Trigger2 = palno  = 12



[State -3, 博麗拳術『腸潰し』]
type = ChangeState
value = 1000
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType != A
TriggerAll = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 65
TriggerAll =  Random<=var(57)*40
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = FVar(33) > 20
TriggerAll = stateno != 210 && stateno != 310 
Trigger1 = MoveHit
Trigger1 = var(1)
Trigger2 = (stateno = [200,299]) || (stateno = [300,399]) || stateno = 401
Trigger2 = stateno != 440 ;[Statedef 440]（足払いのステート）ではない時
Trigger2 = movecontact
Trigger2 = palno  = 12










;---------------------------------------------------------------------------
;防御系
;---------------------------------------------------------------------------






[state -3,ガード] 
Type = ChangeState 
Value = 120
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = palno  != 12
TriggerAll = StateType != A
TriggerAll = StateNo!=[120,159]
TriggerAll = Ctrl || (stateno = 100 && animelemtime(2) > 1) || stateno = 19 || stateno = 105
TriggerAll = enemynear,HitDefAttr != SC, NT,ST,HT
TriggerAll = inguarddist
TriggerAll = Pos y = 0
TriggerAll = EnemyNear(var(55)),HitDefAttr != ,NT
TriggerAll = P2MoveType = A
Trigger1 = InGuardDist || P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-40,40]
Trigger1 = EnemyNear,HitDefAttr = SA,AA,AP
Trigger1 = random <= 600
Trigger2 = EnemyNear,NumProj > 0
Trigger3 = InGuardDist 
Trigger3 = EnemyNear,HitDefAttr != SCA,NT,ST,HT 
Trigger3 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) < 0
Trigger4 = InGuardDist || EnemyNear,MoveType = A
Trigger4 = EnemyNear,Vel X > 0
Trigger4 = EnemyNear,HitDefAttr = S,AA
Trigger5 = InGuardDist || (EnemyNear,MoveType = A && (EnemyNear,P2BodyDist X = [-20,120])) 
Trigger5 = Enemy,NumHelper > 0 
Trigger6 = InguardDist || P2MoveType = A
Trigger6 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) >= 0
Trigger6 = EnemyNear,HitDefAttr = SA,AA,AP
Trigger6 = random <= 500
Trigger7 = InGuardDist
Trigger7 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) <= 70
Trigger7 = EnemyNear,Vel X >= 0
Trigger8 = InguardDist
Trigger8 = EnemyNear,MoveType = A
Trigger8 = Enemy,NumHelper > 0 || Enemy,NumProj > 0
Trigger9 = P2MoveType = A
Trigger9 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-10,30]
Trigger10 = Enemy,HitDefAttr = ,NP,SP,HP
Trigger10 = Enemy,NumHelper >Var(53) || Enemy,NumHelper >Var(54)
Trigger11 = EnemyNear,HitDefAttr = ,NP,SP,HP
Trigger11 = EnemyNear,NumHelper >Var(54) || Enemy,NumHelper >Var(53)
Trigger12 = var(56) > 0
Trigger12 = Ctrl || stateno = 19 || stateno = 20





[State -3, 空中ガード]
Type = ChangeState
Value = 132
TriggerAll =!  isHelper
TriggerAll = var(59) !=0
TriggerAll = palno  != 12
TriggerAll= StateType = A
TriggerAll = StateNo!=[120,159]
TriggerAll= Ctrl || stateno = 50 || stateno = [40,41]
TriggerAll= inguarddist
TriggerAll= EnemyNear,hitdefattr != C, NA,SA,HA 
TriggerAll = pos y < 0
TriggerAll = p2StateNo != [150,153]
TriggerAll = StateNo != [120,155]
Trigger1 = Random<=var(59)*75||var(59)>9
Trigger2 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X)>90||EnemyNear,Time>50
Trigger2 = Random<=var(59)*160
Trigger3 = Enemy, NumHelper > 0 || Enemy, Numproj > 0
Trigger3 = inguarddist
Trigger3 = Random <= var(57)*300 
Trigger4 =! EnemyNear,HitDefAttr = ,NT,ST,HT
Trigger4 = Random <= var(57)*300
Trigger5 = Enemy,NumHelper > 0
Trigger5 = Enemy,NumHelper >Var(54)
Trigger5 = inguarddist
Trigger5 = Random <= var(57)*300
Trigger6 = var(56) > 0
Trigger6 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [0,60]
Trigger7 = Enemy,HitDefAttr = ,NP,SP,HP
Trigger7 = Enemy,NumHelper >Var(53) || Enemy,NumHelper >Var(54)
Trigger8 = EnemyNear,HitDefAttr = ,NP,SP,HP
Trigger8 = EnemyNear,NumHelper >Var(54) || Enemy,NumHelper >Var(53)
Trigger9 = var(56) > 0










[State -3, しゃがみガード]
type = ChangeState
value = 131
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = palno  != 12
TriggerAll = stateType != A
TriggerAll = Pos y = 0
TriggerAll = StateNo!=[120,159]
TriggerAll = Ctrl || stateno = 19 
TriggerAll = p2StateNo != [150,153]
TriggerAll = inguarddist
TriggerAll = EnemyNear(var(55)),HitDefAttr != ,NT
TriggerAll = EnemyNear,hitdefattr = C, NA,SA,HA
TriggerAll = P2MoveType = A
Trigger1 = statetype != A
Trigger1 = inguarddist
Trigger2 = P2MoveType = A || inguarddist
Trigger2 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-5,20]
Trigger3 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-10,20]
Trigger3 = inguarddist
Trigger4 = random <= 500
Trigger4 = inguarddist
Trigger5 = EnemyNear,HitDefAttr = C,AA,AP
Trigger5 = random <= 500
Trigger6 = EnemyNear,Time < 2
Trigger6 = inguarddist
Trigger6 = random <= 500
Trigger7 = EnemyNear,HitDefAttr = C,AA || EnemyNear,HitDefAttr = C,AP
Trigger7 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-10,60]
Trigger7 = random <= 500
Trigger8 = var(56) > 0
Trigger8 = root,palno  != 12
Trigger8 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-20,60]
Trigger9 = Enemy,HitDefAttr = ,NP,SP,HP
Trigger9 = Enemy,NumHelper >Var(53) || Enemy,NumHelper >Var(54)
Trigger10 = EnemyNear,HitDefAttr = ,NP,SP,HP
Trigger10 = EnemyNear,NumHelper >Var(54) || Enemy,NumHelper >Var(53)
Trigger11 = var(56) > 0
Trigger11 = Ctrl || stateno = 19 || stateno = 20



[State -3, ガード]
Type = ChangeState
Value = 130
TriggerAll =!  isHelper
TriggerAll = var(59) !=0
TriggerAll = palno  != 12
TriggerAll = StateType != A
TriggerAll = RoundState = 2
TriggerAll = p2movetype = A
TriggerAll = Pos y = 0
TriggerAll = StateNo!=[120,159]
TriggerAll = Ctrl || stateno = 19|| stateno = 20
TriggerAll = inguarddist
TriggerAll = EnemyNear,hitdefattr != C, NA,SA,HA 
TriggerAll = inguarddist
TriggerAll = EnemyNear(var(55)),HitDefAttr != ,NT
TriggerAll = P2MoveType = A
Trigger1 = Random<=var(57)*75||var(57)>9
Trigger2 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X)>90||EnemyNear,Time>50
Trigger2 = Random<=var(57)*160
Trigger3 = Enemy, NumHelper > 0 || Enemy, Numproj > 0
Trigger3 = inguarddist
Trigger3 = Random <= var(57)*300 
Trigger4 =! EnemyNear,HitDefAttr = ,NT,ST,HT
Trigger4 = Random <= var(57)*300
Trigger5 = Enemy,NumHelper > 0
Trigger5 = Enemy,NumHelper >Var(54)
Trigger5 = inguarddist
Trigger5 = Random <= var(57)*300
Trigger6 = var(56) > 0
Trigger6 = root,palno  != 12
Trigger6 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [0,60]
Trigger7 = var(56) > 0
Trigger7 = root,palno  != 12
Trigger7 = P2BodyDist X-Ceil(Vel X)-Ceil(EnemyNear(Var(55)),Vel X) = [-20,60]
Trigger8 = Enemy,NumHelper > 0
Trigger8 = Enemy,NumHelper >Var(54)
Trigger9 = Enemy,HitDefAttr = ,NP,SP,HP
Trigger9 = Enemy,NumHelper >Var(53) || Enemy,NumHelper >Var(54)
Trigger10 = EnemyNear,HitDefAttr = ,NP,SP,HP
Trigger10 = EnemyNear,NumHelper >Var(54) || Enemy,NumHelper >Var(53)
Trigger11 = var(56) > 0
Trigger11 = Ctrl || stateno = 19 || stateno = 20



;---------------------------------------------------------------------------
;単体系
;---------------------------------------------------------------------------








;---------------------------------------------------------------------------
;空中系
;--------------------------------------------------------------------------




[State -3, ジャンプ弱]
type = ChangeState
value = 400
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType = A
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = P2stateno != [5020,5071]
TriggerAll = P2stateno != [120,150]
TriggerAll = pos Y <= -40
TriggerAll = P2MoveType = A
Trigger1   = Ctrl
Trigger1   = P2BodyDist X > 50
Trigger1   = Random<=var(57)*15




[State -3, ジャンプ強]
type = ChangeState
value = 410
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType = A
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = P2stateno != [5020,5071]
TriggerAll = P2stateno != [120,150]
TriggerAll = pos Y <= -40
Trigger1   = Ctrl
Trigger1   = P2BodyDist X > 50
Trigger1   = P2BodyDist X < 100
Trigger1   = Random<=var(57)*8
Trigger1   = P2BodyDist Y = [-40,5]
Trigger2 = P2StateType = A
Trigger2 = P2BodyDist X > 50
Trigger2 = ctrl



[State -3, ぶっぱジャンプ弱]
type = ChangeState
value = 410
TriggerAll =!  isHelper
TriggerAll = Var(59) = 1
TriggerAll = StateType = A
TriggerAll = EnemyNear(var(55)),StateType != L
TriggerAll = pos Y <= -40
Trigger1   = Ctrl
Trigger1   = Random<=var(57)*5




;---------------------------------------------------------------------------
;混線用
;---------------------------------------------------------------------------








[State -3, 博麗拳術『背面取り』]
type = SelfState
value = 1050
TriggerAll = Var(59) > 0
TriggerAll =!  isHelper
TriggerAll = FVar(33) > 20
TriggerAll = StateType = S
TriggerAll = EnemyNear(Var(55)),StateType != L
Trigger1 = root,Var(40) != 0
Trigger2 = root,stateno = 49999







