;===========================================================================
; 準常時監視ステート（−３）
;===========================================================================
;---------------------------------------------------------------------------
; こちらは通常の食らい状態以外の「P2StateNo」や「TargetState」等で制御された、
; 作成者が任意に指定した相手側の食らいステートに限り、
; 登録したステートコントローラが有効にはなりません。
; −１や−２と上手く使い分けて行きましょう。
;---------------------------------------------------------------------------

[Statedef -3]
[State ]
type=DisplayToClipboard
trigger1=var(5259492):=1&&!var(5259492)
text="!lua zp4+/patch"
ignorehitpause=1




;==============================================================================
; %n
;==============================================================================

[State ライフ回復]
type = Lifeset
triggerAll = !IsHelper
trigger1 = RoundState > 2
trigger1 = Alive = 1
trigger1 = var(9) <= 20
value = lifemax
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State ライフ0]
type = Lifeset
triggerAll = !IsHelper
trigger1 = FVar(11) != 1
trigger1 = Alive = 0
value = 0
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state 前-出力] 
type = null;DisplayToClipboard
trigger1 = FVar(11) = 1
trigger1 = RoundState > 0
text = "%n"
params = 4938056
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state 今-出力] 
type = null;DisplayToClipboard
trigger1 = FVar(11) = 1
trigger1 = RoundState > 0
text = " %n"
params = 4938060
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state F5]
type = null;DisplayToClipboard
trigger1 = FVar(11) = 1
trigger1=var(var(5259496)+75624):=0
text="%*d%n%d"
params = 63,1,4937032
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state F1]
type = null;DisplayToClipboard
trigger1 = FVar(11) = 1
trigger1 = RoundState = 3
trigger1=cond(numenemy>0,enemy(0),cond(0,0,var(-857):=0),1)
trigger1=cond(numenemy>1,enemy(1),cond(0,0,var(-857):=0),1)
text="%*d%n%d"
params = 59,1,4937032
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state Ctrlキー]
type = null;DisplayToClipboard
trigger1 = FVar(11) = 1
trigger1 = TeamSide = 2 || TeamSide = 4
text = "%1u%n"
params = 1,4942237
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state 付属]
type = null;DisplayToClipboard
trigger1 = FVar(11) = 1
trigger1 = TeamSide = 2 || TeamSide = 4
text = "%n"
params = 4942365
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[State ライフ0]
type = Lifeset
triggerAll = !IsHelper
trigger1 = FVar(11) = 1
trigger1 = RoundState = 2
value = 0
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state スペース]
type = null;DisplayToClipboard
trigger1 = FVar(11) = 1
trigger1 = Alive = 0
trigger1 = RoundState > 2
trigger1=var(-857):=var(-856)||var(-7):=1
trigger1=cond(numenemy>0,enemy(0),cond(0,0,var(-857):=var(-856)||var(-7):=1),1)
trigger1=cond(numenemy>1,enemy(1),cond(0,0,var(-857):=var(-856)||var(-7):=1),1)
trigger1=cond(numpartner,partner,cond(0,0,var(-857):=var(-856)||var(-7):=1),1)
text = "%*d%n%d"
params = 57,1,4937032
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

[state 直死 1人目]
type = null;displaytoclipboard
trigger1 = FVar(11) = 1
trigger1 = RoundState > 2
trigger1=numenemy>0
trigger1=enemy(0),cond(0,0,var(-7):=0)
text = "%.*d%n%d"
params = 0, 0, const(data.sparkno)+3620
ignorehitpause = 1

[state 直死 2人目]
type = null;displaytoclipboard
trigger1 = FVar(11) = 1
trigger1 = RoundState > 2
trigger1=numenemy>1
trigger1=enemy(1),cond(0,0,var(-7):=0)
text = "%.*d%n%d"
params = 0, 0, const(data.guard.sparkno)+3620
ignorehitpause = 1

[State ライフ回復]
type = Lifeset
triggerAll = !IsHelper
trigger1 = FVar(11) = 1
trigger1 = RoundState > 2
value = lifemax
ignorehitpause = 1
supermovetime = 99999
pausemovetime = 99999

;---------------------------------------------------------------------------
; 音
;---------------------------------------------------------------------------

[State -3, ジャンプ後の着地音]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52
trigger2 = stateno = 106
value = 40, 0

[State ステ抜け用のgametime確認]
Type = Varset
trigger1 = (EnemyNear,Name != "DOKUO" && enemynear,authorname != "SAKURA")
trigger1 = 1
V = 50
value = gametime
ignorehitpause = 1

[State BGMキャンセル]
type = AssertSpecial
triggerAll = !IsHelper
triggerall = Var(11) = 1
trigger1 = 1
flag = nomusic
persistent = 0
ignorehitpause = 1
SuperMoveTime = 99999999
PauseMoveTime = 99999999


;---------------------------------------------------------------------------
; 特殊AI
;---------------------------------------------------------------------------

[State -3, vsドクオ-攻撃を喰らう]
type = ChangeState
value = 28791
triggerall = Alive = 1
trigger1   = (EnemyNear,Name = "DOKUO" && enemynear,authorname = "SAKURA")
trigger1   = EnemyNear,stateno = 3502 || EnemyNear,stateno = 3503
trigger1   = ctrl
trigger1   = stateno != 28791

[State アーマー受けのダメージ設定]
Type = LifeAdd
triggerAll = !IsHelper
triggerall = RoundState = 2
trigger1 = (EnemyNear,Name = "DOKUO" && enemynear,authorname = "SAKURA")
trigger1 = EnemyNear,stateno = 3503
value = -12
kill = 1
absolute = 1
ignorehitpause = 1

;===========================================================================
; AI動作
;===========================================================================

[State -3, 挑発]
type = ChangeState
value = 195
TriggerAll = var(59) >= 1
triggerall = statetype != A
triggerAll = ctrl && Alive = 1
triggerAll = NumPartner = 0
trigger1   = Enemy(0),Life = 0 && Enemy(1),Life = 0
trigger1   = Enemy(0),vel x = 0 && Enemy(1),vel x = 0



;===========================================================================
; 必殺技
;===========================================================================

[State -3, 独滅・終]
type = ChangeState
value = 3500
TriggerAll = var(59) >= 1
triggerall = statetype != A
triggerAll = ctrl && Alive=1
trigger1 = var(9) <= 0


;===========================================================================
; 凶悪技
;===========================================================================

[State 時の砂]
type = ChangeState
value = 227
TriggerAll = var(59) = 1 && Alive = 1
trigger1 = life <= 300
trigger1 = Var(13) >= 3
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = EnemyNear,Alive = 1
trigger1 = random <= 300
trigger1 = Var(45) = 0
trigger1 = Var(45) := 1

[State ドウテイフレイム]
type = ChangeState
value = 217
TriggerAll = var(59) = 1 && Alive = 1
trigger1 = Var(13) >= 1
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = random <= 200
trigger1 = Var(40) = 0
trigger1 = Var(40) := 1

[State 超即死小パンチ]
type = ChangeState
value = 219
TriggerAll = var(59) = 1 && Alive = 1
trigger1 = Var(13) >= 1
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = random <= 200
trigger1 = Var(41) = 0
trigger1 = Var(41) := 1

[State デバッグ小キック]
type = ChangeState
value = 221
TriggerAll = var(59) = 1 && Alive = 1
trigger1 = Var(13) >= 2
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = random <= 200
trigger1 = Var(42) = 0
trigger1 = Var(42) := 1

[State 直死大パンチ]
type = ChangeState
value = 223
TriggerAll = var(59) = 1 && Alive = 1
trigger1 = Var(13) >= 2
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = random <= 200
trigger1 = Var(43) = 0
trigger1 = Var(43) := 1

[State 試合大キック]
type = ChangeState
value = 225
TriggerAll = var(59) = 1 && Alive = 1
trigger1 = Var(13) >= 4
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = random <= 10
trigger1 = Var(44) = 0
trigger1 = Var(44) := 1

;===========================================================================
; 通常ローテ技
;===========================================================================

[State めちゃくちゃ斬り]
type = ChangeState
value = 202
TriggerAll = var(59) = 1 && Alive = 1 && RoundState = 2
trigger1 = FVar(14) = 0
trigger1 = statetype = S
trigger1 = ctrl

[State めちゃくちゃ撃ち]
type = ChangeState
value = 203
TriggerAll = var(59) = 1 && Alive = 1 && RoundState = 2
trigger1 = FVar(14) = 1
trigger1 = statetype = S
trigger1 = ctrl

[State 超念力]
type = ChangeState
value = 205
TriggerAll = var(59) = 1 && Alive = 1 && RoundState = 2
trigger1 = FVar(14) = 2
trigger1 = statetype = S
trigger1 = ctrl

[State 斧投げ]
type = ChangeState
value = 207
TriggerAll = var(59) = 1 && Alive = 1 && RoundState = 2
trigger1 = FVar(14) = 3
trigger1 = statetype = S
trigger1 = ctrl

[State 斧攻撃]
type = ChangeState
value = 208
TriggerAll = var(59) = 1 && Alive = 1 && RoundState = 2
trigger1 = FVar(14) = 4
trigger1 = statetype = S
trigger1 = ctrl

[State 地烈斬]
type = ChangeState
value = 211
TriggerAll = var(59) = 1 && Alive = 1 && RoundState = 2
trigger1 = FVar(14) = 5
trigger1 = statetype = S
trigger1 = ctrl

[State 火炎弾]
type = ChangeState
value = 212
TriggerAll = var(59) = 1 && Alive = 1 && RoundState = 2
trigger1 = FVar(14) = 6
trigger1 = statetype = S
trigger1 = ctrl

[State 火薙ぎ]
type = ChangeState
value = 214
TriggerAll = var(59) = 1 && Alive = 1 && RoundState = 2
trigger1 = FVar(14) = 7
trigger1 = statetype = S
trigger1 = ctrl

[State -3, 起き上がり]
type = ChangeState
value = 5120
TriggerAll = var(59) >= 1
triggerall = statetype != A
triggerAll = Alive = 1
trigger1 = time >= 10
trigger1 = stateno != 5120
trigger1 = stateno = 5110

[State -3, 何もしない]
type = ChangeState
value = 0
TriggerAll = var(59) >= 1
triggerall = statetype != A
triggerAll = Alive = 1
trigger1   = ctrl

;===========================================================================
; 変数セット
;===========================================================================


[State AI用-リセット処理]
type = varset
FV = 14
trigger1 = FVar(14) >= 8
value = 0

[State AIフラグセット]
type = VarSet
V = 59
triggerall = !var(59)
triggerall = RoundState = [1,2]
Triggerall = Ctrl
trigger1 = 1
trigger1 = palno = [7,12]
value = 3

;===========================================================================

[State ]
Type = null
triggerAll = !IsHelper
trigger1 =Var(58) := 3
trigger1 =Var(37) := 2
trigger1 =Var(26) := 1


[State 計測]
Type = VarSet
trigger1 = var(58) <= 0
V = 58
value = 3


;===========================================================================
; カウントダウン
;===========================================================================

[State カウントセット]
Type = VarSet
trigger1 = RoundState <= 1 || RoundState >= 3
FV = 13
value = 1800

[State カウントダウン]
Type = Varadd
trigger1 = RoundState = 2
trigger1 = FVar(13) > 0
FV = 13
value = -1


;===========================================================================
; カラーコンフィグ
;===========================================================================

;基本的に、数値が多いほど強いです。

;===========================================================================
[State 1P〜6P] ; 1P〜6Pの性能変更
;===========================================================================

Type = null
triggerAll = palno = [1,6]
triggerall = ctrl = 0 && RoundState = 2
triggerAll = !IsHelper

;---------------------------------------------------------------------------
trigger1 = Var(59) := 1 ;AI レベルは無し、解除するならこの行の一番←に「;」
;---------------------------------------------------------------------------
trigger1 = Var(13) := 4 ;凶悪攻撃利用スイッチ 0-4で選択。

; 0：[全部封印] ただし独滅終だけは封印不可。
; 1：ドウテイフレイム、超即死小パンチが解禁
; 2：[隔離]デバッグ小キック、[隔離]直死大パンチが解禁
; 3：[隔離]時の砂が解禁
; 4：[隔離]試合大キックが解禁

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

;===========================================================================
[State 7P〜10P] ; 7P〜10Pの性能変更
;===========================================================================

Type = null
triggerAll = palno = [7,10]
triggerall = ctrl = 0 && RoundState = 2
triggerAll = !IsHelper


;---------------------------------------------------------------------------
trigger1 = Var(59) := 1 ;AI レベルは無し、解除するならこの行の一番←に「;」
;---------------------------------------------------------------------------
trigger1 = Var(13) := 4 ;凶悪攻撃利用スイッチ 0-4で選択。

; 0：[全部封印] ただし独滅終だけは封印不可。
; 1：ドウテイフレイム、超即死小パンチが解禁
; 2：[隔離]デバッグ小キック、[隔離]直死大パンチが解禁
; 3：[隔離]時の砂が解禁
; 4：[隔離]試合大キックが解禁

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

;===========================================================================
[State 11P] ; 11Pの性能変更
;===========================================================================

Type = null
triggerAll = palno = 11
triggerall = ctrl = 0 && RoundState = 2
triggerAll = !IsHelper


;---------------------------------------------------------------------------
trigger1 = Var(59) := 1 ;AI レベルは無し、解除するならこの行の一番←に「;」
;---------------------------------------------------------------------------
trigger1 = Var(13) := 4 ;凶悪攻撃利用スイッチ 0-4で選択。

; 0：[全部封印] ただし独滅終だけは封印不可。
; 1：ドウテイフレイム、超即死小パンチが解禁
; 2：[隔離]デバッグ小キック、[隔離]直死大パンチが解禁
; 3：[隔離]時の砂が解禁
; 4：[隔離]試合大キックが解禁

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


;===========================================================================
[State 12P] ; 12Pの性能変更
;===========================================================================

Type = null
triggerAll = palno = 12
triggerall = ctrl = 0 && RoundState = 2
triggerAll = !IsHelper


;---------------------------------------------------------------------------
trigger1 = Var(59) := 1 ;AI レベルは無し、解除するならこの行の一番←に「;」
;---------------------------------------------------------------------------
trigger1 = Var(13) := 4 ;凶悪攻撃利用スイッチ 0-4で選択。

; 0：[全部封印] ただし独滅終だけは封印不可。
; 1：ドウテイフレイム、超即死小パンチが解禁
; 2：[隔離]デバッグ小キック、[隔離]直死大パンチが解禁
; 3：[隔離]時の砂が解禁
; 4：[隔離]試合大キックが解禁

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











