;---------------------------------------------------------------------------
; ここから下は-3のステートを書いてください、ここに書いたものはゲーム中
; に条件が成立すればいつでも開始するステートです。
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, T-O-S]
type = SelfState
trigger1 = !ishelper
value = 16000
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1=!ishelper
var(50) = 0;セイバーストライクダイス固定スイッチ(0でオフ、1でオン)
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
triggerall=var(50)
trigger1 =!ishelper
var(11) = 2;どの目で固定するかを0~5で指定する(設定値+1の目が出る)。固定スイッチ入れないと無意味
ignorehitpause = 1

[State -3, AI起動用ヘルパー]
type=helper
triggerall=var(41)!=-1
trigger1=!NumHelper(10000)
trigger1=roundstate=2
trigger1=alive
trigger1=var(59)=0
Trigger1=ctrl&&stateno=0
helpertype=normal
name="AI"
stateno=10000
ID=10000
pos=9999,9999
keyctrl=1
pausemovetime=2147483647
supermovetime=2147483647
persistent = 0

[State -3, Flag set];●AIを常時起動にするには「;trigger11  = 1 ;常時起動用」の先頭の ; を消してください
Type = VarSet
var(59) = 1;AIフラグ
TriggerAll = !Var(59) ;フラグが立っていない時。
TriggerAll = RoundState = [1,2]
Trigger1   = Command = "AI1" || Command = "AI2" || Command = "AI3" || Command = "AI4" || Command = "AI5"
Trigger2   = Command = "AI6" || Command = "AI7" || Command = "AI8" || Command = "AI9" || Command = "AI10"
Trigger3   = Command = "AI11" || Command = "AI12" || Command = "AI13" || Command = "AI14" || Command = "AI15"
Trigger4   = Command = "AI16" || Command = "AI17" || Command = "AI18" || Command = "AI19" || Command = "AI20"
Trigger5   = Command = "AI21" || Command = "AI22" || Command = "AI23" || Command = "AI24" || Command = "AI25"
Trigger6   = Command = "AI26" || Command = "AI27" || Command = "AI28" || Command = "AI29" || Command = "AI30"
Trigger7   = Command = "AI31" || Command = "AI32" || Command = "AI33" || Command = "AI34" || Command = "AI35"
Trigger8   = Command = "AI36" || Command = "AI37" || Command = "AI38" || Command = "AI39" || Command = "AI40"
Trigger9   = Command = "AI41" || Command = "AI42" || Command = "AI43" || Command = "AI44" || Command = "AI45"
Trigger10  = Command = "AI46" || Command = "AI47" || Command = "AI48" || Command = "AI49" || Command = "AI50"
Trigger11  = numhelper(10000)
Trigger11  = helper(10000),var(59)
;trigger12  = 1 ;常時起動用
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;ここから先は下手に弄るとﾀﾋります。仁藤が
;---------------------------------------------------------------------------

;ゲーム中に常にいつでも開始したいステート、ここでは「着地音」に使用しています
;下の条件は「52か106のステートに移動して１フレーム目に」と言う事です。
;52と106はバックステップとジャンプの着地のステートです。
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 106
trigger3 = stateno = 1401
value = 20000, 3

[State 4110, Explod]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 106 
anim = 10047
pos = 0,0
postype = P1
scale = .5,.5
sprpriority = -1
supermove=1
ownpal = 1

[State -3, タッグ用生死判別]
Type = VarSet
trigger1 = RoundState = 2
var(12) = 0 + (NumEnemy > 1 && EnemyNear(0),life <= 0)
IgnoreHitPause = 1

;===========================================================================
;---------------------------------------------------------------------------
[State -3, X-hone Rider Kick]
type = ChangeState
value = 1020
triggerall = Var(59) > 0 && roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerall = power >= 500 && StateType != A
trigger1 = (stateno = 1101 || stateno = 1111) && moveHit && frontedgebodydist <= 20 && (Enemynear(Var(12)),life>=400 || power <= 800)
;---------------------------------------------------------------------------
[State -3, X-hone Rider Kick]
type = ChangeState
value = 3000
triggerall = Var(59) > 0 && roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerall = power >= 1000 && StateType != A
trigger1 = (p2bodydist X = [75,125]) && Enemynear(Var(12)),movetype = A && Enemynear(Var(12)),ctrl = 0 && (ctrl || stateno = 21 || stateno = 22)
trigger1 = !inguarddist && Enemynear(Var(12)),statetype != A && frontedgebodydist >= 100 && ((Enemynear(Var(12)),life<=220) || (power >= 1500 && random <= 50))
trigger1 = Enemynear(Var(12)),animtime <= -16
trigger2 = (stateno = 1101 || stateno = 1111) && moveHit && Enemynear(Var(12)),life<=145
trigger3 = (p2bodydist X = [70,130]) && Enemynear(Var(12)),movetype != A && (ctrl || stateno = 21 || stateno = 22)
trigger3 = !inguarddist && Enemynear(Var(12)),statetype != A && (Enemynear(Var(12)),life<80)
trigger4 = (stateno = 210 || stateno = 410 || stateno = 420) && moveguarded && Enemynear(Var(12)),life<80
;---------------------------------------------------------------------------
[State -3, Shining Kick]
type = ChangeState
value = 3200
triggerall = Var(59) > 0 && roundstate = 2 && Enemynear(Var(12)),statetype != L && Enemynear(Var(12)),statetype != C
triggerall = power >= 2000 && StateType != A && (p2bodydist Y >= -80)
trigger1 = p2bodydist X >= 140 && Enemynear(Var(12)),movetype = A && Enemynear(Var(12)),ctrl = 0 && frontedgebodydist >= 150 && (ctrl || stateno = 21 || stateno = 22)
trigger1 = !inguarddist && Enemynear(Var(12)),animtime <= -15 && ((Enemynear(Var(12)),life<=400) || (random <= 150))
trigger2 = (stateno = 1101 || stateno = 1111) && moveHit
;---------------------------------------------------------------------------
[State -3, Shining Kick1]
type = ChangeState
value = 32002
triggerall = Var(59) > 0 && roundstate = 2 && Enemynear(Var(12)),statetype != L && Enemynear(Var(12)),statetype != C
triggerall = power >= 1000 && StateType != A && (p2bodydist Y >= -65)
trigger1 = p2bodydist X >= 160 && Enemynear(Var(12)),movetype = A && Enemynear(Var(12)),ctrl = 0 && frontedgebodydist >= 150 && (ctrl || stateno = 21 || stateno = 22)
trigger1 = !inguarddist && Enemynear(Var(12)),animtime <= -15 && ((Enemynear(Var(12)),life<=180) || (random <= 25))
trigger2 = (stateno = 1101) && moveHit

;---------------------------------------------------------------------------
[State -3, guard]
type = ChangeState
value = 120
triggerall = roundstate = 2
triggerall = inguarddist || (P2Dist X < 50 && Enemynear(var(12)),P2Dist X <= 0 && Enemynear(var(12)),MoveType = A)
triggerall = var(59) > 0
triggerall = stateno != [120,155]
triggerall = !(Enemynear(var(12)),HitDefAttr = SCA, NT,ST,HT)
trigger1 = (ctrl || stateno = 21 || stateno = 22)

;---------------------------------------------------------------------------
[State -3, Strong SS]
type = ChangeState
value = 1120
triggerall = power>=500
triggerall = var(59) > 0 && roundstate = 2 && Enemynear(Var(12)),statetype != L && StateType != A
triggerall = !(Enemynear(Var(12)),HitDefAttr = SCA,HA,HP,HT)
trigger1 = p2bodydist X >= 20 && p2bodydist X <= 150 && p2bodydist Y >= -5 && (ctrl || stateno = 21 || stateno = 22 || (stateno = [120,131]))
trigger1 = Enemynear(Var(12)),movetype = A && Enemynear(Var(12)),animtime <= -18 && !(Enemynear(Var(12)),HitDefAttr = SCA,HA,HP,NT,ST,HT)
trigger1 = ((Enemynear(Var(12)),life<=120) || (power >= 1500 && Enemynear(Var(12)),life<=250 && random <= 200) || (power >= 2500 && random <= 200) || (random <= 25))
trigger2 = (stateno = [200,420]) && movehit && !(Enemynear(Var(12)),stateno=[5000,5099]) && !(Enemynear(Var(12)),stateno=[120,159])
trigger2 = (enemynear(var(12)),p2bodydist X = [-1,110]) && (life <= 550 || power >= 2500)

;---------------------------------------------------------------------------
[State -3]
type = ChangeState
value = 1300
triggerall = var(59) > 0 && roundstate = 2 && statetype != A
triggerall = var(10) = 0
triggerall = stateno != 1301
trigger1 = p2bodydist X >= 0 && (ctrl || stateno = 21 || stateno = 22 || (stateno = [120,131]))
trigger1 = Enemynear(Var(12)),movetype = A && random <= 200
trigger1 = (Enemynear(Var(12)),animtime <= -38 || random <= 10)
trigger2 = p2bodydist X >= 0 && p2bodydist X <= 140 && (ctrl || stateno = 21 || stateno = 22 || (stateno = [120,131]))
trigger2 = Enemynear(Var(12)),movetype = A && (Enemynear(Var(12)),HitDefAttr = SCA,HA,HT) && random <= 200

;---------------------------------------------------------------------------
[State -3]
type = ChangeState
value = 1310
triggerall = var(59) > 0 && roundstate = 2 && statetype != A
triggerall = var(10) = 0 && power >= 500
triggerall = stateno != 1301
trigger1 = p2bodydist X >= 0 && (ctrl || stateno = 21 || stateno = 22 || (stateno = [120,131]))
trigger1 = Enemynear(Var(12)),movetype = A && ((Enemynear(Var(12)),life<=90) || (power >= 2800 && random <= 200) || (random <= 75))
trigger1 = (Enemynear(Var(12)),animtime <= -42 || random <= 75)

;---------------------------------------------------------------------------
[State -3, Strong SS]
type = ChangeState
value = 1210
triggerall = roundstate = 2 && Var(59) > 0 && StateType != A && power >= 1000 && (ctrl || stateno = 21 || stateno = 22)
trigger1 = numtarget(800)!=0 && frontedgebodydist >= 130 && life <= 500 && p2bodydist X >= 90
trigger1 = target(800),stateno = 803

;===========================================================================
;-----------------------------------------------------------------------------
;歩き
[State -3, run]
type = ChangeState
triggerall = roundstate = 2
triggerall = var(59) > 0
triggerall = !inguarddist
triggerall = statetype != A
triggerall = (ctrl || (stateno = 22 && time > 9 && random <= 100))
trigger1 = (p2bodydist X >= 30) && random <= 250
value = 21

[State -3, run]
type = ChangeState
triggerall = roundstate = 2
triggerall = var(59) > 0
triggerall = !inguarddist
triggerall = statetype != A && backedgebodydist >= 40
triggerall = (ctrl || (stateno = 21 && time > 11 && random <= 100))
trigger1 = (p2bodydist X = [0,130]) && Enemynear(Var(12)),movetype != H && random <= 150
trigger2 = Enemynear(Var(12)),statetype = L && p2bodydist X <= 20 && random <= 333
value = 22

[State -3, ]
type = ChangeState
triggerall = roundstate = 2
triggerall = !inguarddist && Enemynear(var(12)),movetype != A
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = (ctrl || stateno = 21 || stateno = 22)
trigger1 = p2bodydist X >= 90 && random <= 250
trigger1 = (Enemynear(var(12)),movetype = H || (Enemynear(var(12)),statetype = L && Enemynear(var(12)),stateno != 5120))
trigger2 = p2bodydist X >= 100 && random <= 100
trigger2 = Enemynear(var(12)),statetype = A && p2bodydist Y < -45
trigger3 = p2bodydist X < 180 && p2bodydist X >= 150 && random <= 10
trigger3 = Enemynear(var(12)),movetype != A
value = 100

;---------------------------------------------------------------------------
;ジャンプ
[State -3, step]
type = ChangeState
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerall = var(59) > 0
triggerall = (ctrl || stateno = 21 || stateno = 22 || stateno = [120,149])
triggerall = statetype != A
trigger1 = Enemynear(Var(12)),movetype = A && !(Enemynear(Var(12)),HitDefAttr = SC,AA,HP,AT)
trigger1 = P2bodydist X >= 65 && random <= 50
trigger2 = Enemynear(Var(12)),movetype = A && Enemynear(Var(12)),HitDefAttr = SC,NT,ST,HT
trigger2 = BackEdgeBodyDist <= 65 && P2bodydist X < 70
trigger3 = Enemynear(Var(12)),movetype != A && inguarddist
trigger3 = P2bodydist X > 70 && P2bodydist X < 150 && random <= 10
trigger4 = (P2bodydist X = [75,170]) && ((Enemynear(Var(12)),statetype = C && random <= 10) || (Enemynear(Var(12)),statetype != C && random<=1))
trigger5 = Enemynear(Var(12)),movetype = A && Enemynear(Var(12)),HitDefAttr = SCA,NT,ST,HT
trigger5 = p2bodydist X >= 70 && Enemynear(Var(12)),time <= 8
trigger6 = Enemynear(Var(12)),statetype = A && Enemynear(Var(12)),vel y < -4 && !(Enemynear(Var(12)),movetype = A)
trigger6 = p2bodydist X >= 70 && random <= 150
trigger7 = Enemynear(Var(12)),movetype = A && Enemynear(Var(12)),time <= 3 && !(Enemynear(Var(12)),HitDefAttr = SCA,HA,HP,HT)
trigger7 = (p2bodydist X = [80,150]) && ((Enemynear(Var(12)),statetype = C && random <= 25) || (Enemynear(Var(12)),statetype != C && random<=10))
trigger8 = p2bodydist X >= 75 && p2bodydist X <= 160 && !(Enemynear(Var(12)),movetype = H) && random <= 5
trigger9 = p2bodydist X >= 75 && p2bodydist X <= 160 && !(Enemynear(Var(12)),movetype = H) && !(Enemynear(Var(12)),movetype = A) && random <= 20
value = 39

;---------------------------------------------------------------------------
[State -3, 空中復帰]
Type = ChangeState
Value = 5210
triggerall = RoundState = 2
TriggerAll = Var(59) > 0
TriggerAll = Vel Y > -1
TriggerAll = Alive
TriggerAll = StateNo = 5050
TriggerAll = life != 0
Trigger1 = CanRecover
Trigger1 = Random = [0,650]

;===========================================================================
;---------------------------------------------------------------------------
[State -3, Light Rider Kick]
type = ChangeState
value = 1400
triggerall = var(59) > 0 && roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerall = statetype = A
trigger1 = p2bodydist Y > -15 && pos y <= -60 && pos y >= -110
trigger1 = p2bodydist X <= 130 && p2bodydist X >= 85 && random = [0,100]
trigger1 = (ctrl)
trigger2 = stateno = 620 && movecontact
trigger3 = stateno = 610 && movecontact && Enemynear(Var(12)),statetype != A
;trigger4 = stateno = 600 && movecontact && Enemynear(Var(12)),statetype != A && pos y <= -47

;---------------------------------------------------------------------------
[State -3, Strong Rider Kick]
type = ChangeState
value = 1010
triggerall = roundstate = 2 && Var(59) > 0 && StateType != A
trigger1 = (p2bodydist X = [-5,15]) && Enemynear(Var(12)),statetype = A && Enemynear(Var(12)),vel x >= 0 && (ctrl || stateno = 21 || stateno = 22)
trigger1 = p2bodydist Y >= -130 && p2bodydist Y <= -70 && Enemynear(Var(12)),movetype != H && random <= 250

;===========================================================================
;---------------------------------------------------------------------------
;後退ダッシュ
[State -3, step]
type = ChangeState
triggerall = roundstate = 2
triggerall = var(59) > 0
triggerall = (ctrl || stateno = 21 || stateno = 22 || stateno = [120,149])
triggerall = statetype != A
trigger1 = P2bodydist X > 90 && P2bodydist X < 100 && random <= 1
trigger1 = BackEdgeBodyDist >= 50 && !inguarddist && !(Enemynear(Var(12)),movetype = H)
trigger2 = Enemynear(Var(12)),movetype = A && Enemynear(Var(12)),HitDefAttr = SC,NT,ST,HT
trigger2 = BackEdgeBodyDist >= 50 && P2bodydist X < 70
trigger3 = p2bodydist Y <= -100 && (p2bodydist X = [-10,10]) && BackEdgeBodyDist >= 40 && random <= 250
trigger3 = Enemynear(Var(12)),vel x <= 0 && !(Enemynear(Var(12)),movetype = H)
value = 105

;投げ
[State -3, Throw]
type = ChangeState
value = 800
triggerall = statetype != A && var(59) > 0 && roundstate = 2 && (enemynear(var(12)),p2bodydist X = [-1,18]) && !(Enemynear(Var(12)),HitDefAttr = SCA,HA,HP,HT)
triggerall = (ctrl || stateno = 21 || stateno = 22 || stateno = [120,149])
triggerall = stateno != 100 && random <= 400
trigger1 = p2bodydist X = [-1,4]
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

;===========================================================================
;---------------------------------------------------------------------------
[State -3, Crouching Light Attack]
type = ChangeState
value = 400
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerAll = Var(59) > 0
triggerAll = StateType != A
trigger1 = p2bodydist Y > -25 && (p2bodydist X = [-2,30]) && !(Enemynear(Var(12)),HitDefAttr = SCA,HA,HP,HT) && random = [600,800]
trigger1 = (ctrl || stateno = 21 || stateno = 22)

;---------------------------------------------------------------------------
[State -3, Stand Strong Attack]
type = ChangeState
value = 210
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerAll = Var(59) > 0
triggerAll = StateType != A
trigger1 = p2bodydist Y > -35 && Enemynear(Var(12)),vel y >= 0 && p2bodydist X <= 63 && p2bodydist X > 24 && random = [200,400]
trigger1 = (Ctrl || stateno = 21 || stateno = 22)
trigger1 = ((Enemynear(Var(12)),movetype != A) || (random <= 500))
trigger2 = stateno = 200 && movehit
trigger3 = (Stateno = 410) && movecontact && p2bodydist X <= 48
trigger4 = (Stateno = 400) && movehit && Enemynear(Var(12)),statetype = A

;---------------------------------------------------------------------------
[State -3, Crouching Strong Attack]
type = ChangeState
value = 410
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerAll = Var(59) > 0
triggerAll = StateType != A
trigger1 = p2bodydist Y > -5 && (p2bodydist X = [31,68]) && !(Enemynear(Var(12)),HitDefAttr = SCA,HA,HP,HT) && random = [100,200]
trigger1 = (ctrl || stateno = 21 || stateno = 22)
trigger2 = (Stateno = 210) && movecontact && p2bodydist X <= 48 && Enemynear(Var(12)),statetype != A
trigger3 = (Stateno = 400) && movecontact && Enemynear(Var(12)),statetype != A

;---------------------------------------------------------------------------
[State -3, Stand Light Attack]
type = ChangeState
value = 200
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype = A
triggerAll = Var(59) > 0
triggerAll = StateType != A
trigger1 = p2bodydist Y > -65 && (p2bodydist X = [-2,25]) && Enemynear(Var(12)),movetype != A && !inguarddist && numtarget(800)=0 && random = [600,800]
trigger1 = (Ctrl || stateno = 21 || stateno = 22)

;---------------------------------------------------------------------------
[State -3, Standing Strong Attack]
type = ChangeState
value = 220
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerAll = Var(59) > 0
triggerAll = StateType != A
trigger1 = stateno = 210 && movehit && p2bodydist X <= 30 && p2bodydist Y > -35

;---------------------------------------------------------------------------
[State -3, Crouching Strong Attack]
type = ChangeState
value = 420
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerAll = Var(59) > 0
triggerAll = StateType != A
trigger1 = (Stateno = 200) && moveguarded
trigger2 = (Stateno = 210) && moveguarded
trigger3 = (Stateno = 410) && moveguarded
trigger4 = p2bodydist Y > -10 && Enemynear(Var(12)),vel y >= 0 && p2bodydist X <= 75 && p2bodydist X >= 90 && numtarget(800)=0 && random <= 25
trigger4 = !(Enemynear(Var(12)),HitDefAttr = SCA, HA,HP,HT) && ((Enemynear(Var(12)),movetype != A) || (p2bodydist X >= 80))
trigger4 = (Ctrl || stateno = 21 || stateno = 22)

;---------------------------------------------------------------------------
[State -3, Jump Light Kick]
type = ChangeState
value = 600
triggerall = roundstate = 2 && Enemynear(var(12)),statetype != L && (Enemynear(var(12)),statetype = A || vel y > 0)
triggerall = Var(59) > 0 && statetype = A
trigger1 = (p2bodydist X = [-1,35]) && random <= 400
trigger1 = (p2bodydist Y = [-20,30]) && ctrl 
trigger2 = (p2bodydist X = [-1,50]) && random <= 400
trigger2 = (p2bodydist Y = [-20,30]) && vel x > 0 && ctrl
trigger3 = (p2bodydist X = [-1,35]) && random <= 400
trigger3 = (p2bodydist Y = [-10,66]) && vel y > 0 && Enemynear(var(12)),statetype != A && ctrl 
trigger4 = (Stateno = 1001) && time > 8 && movehit && (p2bodydist Y = [-25,30])
trigger5 = (Stateno = 1021) && time > 12 && movehit

;---------------------------------------------------------------------------
[State -3, Jump Strong Kick]
type = ChangeState
value = 610
triggerall = roundstate = 2 && Enemynear(var(12)),statetype != L
triggerall = Var(59) > 0 && statetype = A
trigger1 = (p2bodydist X = [36,60]) && ((Enemynear(var(12)),movetype != A && random <= 200) || random <= 10)
trigger1 = (p2bodydist Y = [-10,75]) && vel x > 0 && vel y > 0 && Enemynear(var(12)),statetype != A && ctrl 
trigger2 = (Stateno = 600) && movecontact && (Enemynear(var(12)),statetype = A || (Enemynear(var(12)),statetype != A && pos y < -47))

;---------------------------------------------------------------------------
[State -3, Jump Strong Punch]
type = ChangeState
value = 620
triggerall = roundstate = 2 && Enemynear(var(12)),statetype != L && (Enemynear(var(12)),statetype = A || vel y > 0)
triggerall = Var(59) > 0 && statetype = A
trigger1 = (p2bodydist X = [60,85]) && random <= 200
trigger1 = (p2bodydist Y = [-20,30]) && ctrl 
trigger2 = (p2bodydist X = [60,120]) && random <= 200
trigger2 = (p2bodydist Y = [-20,30]) && vel x > 0 && ctrl
trigger3 = (p2bodydist X = [51,100]) && random <= 400
trigger3 = (p2bodydist Y = [-10,90]) && vel y > 0 && Enemynear(var(12)),statetype != A && ctrl 
trigger4 = (Stateno = 610) && movecontact && Enemynear(var(12)),statetype = A

;---------------------------------------------------------------------------
[State -3, Light SS]
type = ChangeState
value = 1120
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype != L && power >= 500
triggerall = var(59) > 0 && statetype != A
trigger1 = (stateno = 210) || (stateno = 220) || (stateno = 410) || (stateno = 420)
trigger1 = movehit
trigger1 = (power >= 2500) || (power >= 1500 && Enemynear(var(12)),life <= 250)

[State -3, Light SS]
type = ChangeState
value = 1100
triggerall = roundstate = 2 && Enemynear(Var(12)),statetype != L
triggerall = var(59) > 0 && statetype != A
trigger1 = (stateno = 210) || (stateno = 220) || (stateno = 410) || (stateno = 420)
trigger1 = movehit

