;================================================================================
; DESPERATION MOVES
;================================================================================
;Shining Crystal Bit
[Statedef 3000]
type    = S                     
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3000
poweradd=  ifelse(var(51),0,-1000)                       
sprpriority = 2 
velset=0,0

;============== Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(42):=0,0) || e ;Reset command
trigger1 = Helper(10371),cond(1,var(0):=0,0) || e ;Reset command
trigger1 = Helper(10371),cond(1,var(1):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = numhelper(10371)
trigger1 = helper(10371), var(26)
var(4) = 1

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
triggerall = numhelper(10371)
triggerall = helper(10371), Var(22)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) 
var(4) = 2

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
triggerall = numhelper(10371)
triggerall = helper(10371), Var(22)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(1) = [1,3]) 
var(4) = 3

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = 0
;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,28]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = !time
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
Trigger1 = !time
anim = 15200-(var(31)*200)
pos = 0,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
Trigger1 = !time
anim = 15201-(var(31)*200)
pos = 0,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3000 
trigger1 = animelemtime(30) < 0
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3000 || anim = 3001
value = anim+1

[State 1300, ChangeAnim];Command Cancel
type = ChangeAnim
triggerall = anim = 3001 && animelemtime(1)>= 0
trigger1 = var(4) = 1
value = anim+1
;==============Helpers 
[State 1000: Helper]
type = Helper
triggerall = anim = 3000
trigger1 = animelemtime(30) = 0
helpertype = Normal
name = "Crystal Bit 1"
id = 3005
pos = 1, -66 ;50
postype = p1
facing = 1
stateno = 3005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0  
[State 1000: Helper]
type = Helper
triggerall = anim = 3000
trigger1 = animelemtime(30) = 0
helpertype = Normal
name = "Crystal Bit 2"
id = 3005
pos = 1, -66 ;50
postype = p1
facing = 1
stateno = 3007
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0 
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
triggerall = anim = 3000
trigger1 = animelem = 1
value = 200,9
channel = 0

[State 220,2]
type = ChangeState
triggerall = anim = 3002
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 1300, ChangeAnim];Change To Shoot
type = ChangeState
triggerall = anim = 3001 && animelemtime(1)>= 0
trigger1 = var(4) >= 2
value = 3010


;Bit OH MY GOLD
[Statedef 3005]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 4
juggle = 10

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 0, Front]
type = SprPriority
trigger1 = animelem = 8
trigger2 = animelem = 22
trigger3 = animelem = 36
trigger4 = animelem = 50
value = 4

[State 0, Back]
type = SprPriority
trigger1 = animelem = 15
trigger2 = animelem = 29
trigger3 = animelem = 43
trigger4 = animelem = 57
value = -4


;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Effects
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 68
trigger3 = animelem = 139
value = 1000,7
channel = 5

;OH MY GOODNESS

[State 2000, BindToRoot]
type = BindToRoot
trigger1 = 1
pos = var(0),var(1)
time = 1

[State 1005, I REFUSE TO DIE BY YOUR HAND]
type = Null
trigger1 = animelemtime(1) = 0 && var(0) := 1
trigger2 = animelemtime(2) = 0 && var(0) := 2
trigger3 = animelemtime(3) = 0 && var(0) := 3
trigger4 = animelemtime(4) = 0 && var(0) := 4
trigger5 = animelemtime(5) = 0 && var(0) := 3
trigger6 = animelemtime(6) = 0 && var(0) := 3
trigger7 = animelemtime(7) = 0 && var(0) := 1
trigger8 = animelemtime(8) = 0 && var(0) := 1;0
trigger9 = animelemtime(9) = 0 && var(0) := -3
trigger10 = animelemtime(10) = 0 && var(0) := -6
trigger11 = animelemtime(11) = 0 && var(0) := -9
trigger12 = animelemtime(12) = 0 && var(0) := -12
trigger13 = animelemtime(13) = 0 && var(0) := -15
trigger14 = animelemtime(14) = 0 && var(0) := -18
trigger15 = animelemtime(15) = 0 && var(0) := -21;
trigger16 = animelemtime(16) = 0 && var(0) := -22
trigger17 = animelemtime(17) = 0 && var(0) := -23
trigger18 = animelemtime(18) = 0 && var(0) := -23
trigger19 = animelemtime(19) = 0 && var(0) := -22
trigger20 = animelemtime(20) = 0 && var(0) := -20
trigger21 = animelemtime(21) = 0 && var(0) := -16
trigger22 = animelemtime(22) = 0 && var(0) := -12
trigger23 = animelemtime(23) = 0 && var(0) := -7
trigger24 = animelemtime(24) = 0 && var(0) := 1;0
trigger25 = animelemtime(25) = 0 && var(0) := 6
trigger26 = animelemtime(26) = 0 && var(0) := 13;
trigger27 = animelemtime(27) = 0 && var(0) := 20
trigger28 = animelemtime(28) = 0 && var(0) := 27
trigger29 = animelemtime(29) = 0 && var(0) := 33
trigger30 = animelemtime(30) = 0 && var(0) := 38
trigger31 = animelemtime(31) = 0 && var(0) := 41
trigger32 = animelemtime(32) = 0 && var(0) := 44
trigger33 = animelemtime(33) = 0 && var(0) := 44;
trigger34 = animelemtime(34) = 0 && var(0) := 43
trigger35 = animelemtime(35) = 0 && var(0) := 40
trigger36 = animelemtime(36) = 0 && var(0) := 35
trigger37 = animelemtime(37) = 0 && var(0) := 28
trigger38 = animelemtime(38) = 0 && var(0) := 20
trigger39 = animelemtime(39) = 0 && var(0) := 10
trigger40 = animelemtime(40) = 0 && var(0) := 1;0
trigger41 = animelemtime(41) = 0 && var(0) := -11
trigger42 = animelemtime(42) = 0 && var(0) := -22
trigger43 = animelemtime(43) = 0 && var(0) := -33
trigger44 = animelemtime(44) = 0 && var(0) := -43
trigger45 = animelemtime(45) = 0 && var(0) := -52
trigger46 = animelemtime(46) = 0 && var(0) := -62
trigger47 = animelemtime(47) = 0 && var(0) := -64
trigger48 = animelemtime(48) = 0 && var(0) := -62
trigger49 = animelemtime(49) = 0 && var(0) := -59
trigger50 = animelemtime(50) = 0 && var(0) := -53
trigger51 = animelemtime(51) = 0 && var(0) := -45
trigger52 = animelemtime(52) = 0 && var(0) := -36
trigger53 = animelemtime(53) = 0 && var(0) := -25
trigger54 = animelemtime(54) = 0 && var(0) := -13
trigger55 = animelemtime(55) = 0 && var(0) := 1;0
trigger56 = animelemtime(56) = 0 && var(0) := 12
trigger57 = animelemtime(57) = 0 && var(0) := 24
trigger58 = animelemtime(58) = 0 && var(0) := 35
trigger59 = animelemtime(59) = 0 && var(0) := 44
trigger60 = animelemtime(60) = 0 && var(0) := 52
trigger61 = animelemtime(61) = 0 && var(0) := 58
trigger62 = animelemtime(62) = 0 && var(0) := 62
trigger63 = animelemtime(63) = 0 && var(0) := 63
trigger64 = animelemtime(64) = 0 && var(0) := 64
trigger65 = animelemtime(65) = 0 && var(0) := 58
trigger66 = animelemtime(66) = 0 && var(0) := 52
trigger67 = animelemtime(67) = 0 && var(0) := 44
trigger68 = animelemtime(68) = 0 && var(0) := 35
trigger69 = animelemtime(69) = 0 && var(0) := 24
trigger70 = animelemtime(70) = 0 && var(0) := 12
trigger71 = animelemtime(71) = 0 && var(0) := 1;0
trigger72 = animelemtime(72) = 0 && var(0) := -13
trigger73 = animelemtime(73) = 0 && var(0) := -25
trigger74 = animelemtime(74) = 0 && var(0) := -36
trigger75 = animelemtime(75) = 0 && var(0) := -45
trigger76 = animelemtime(76) = 0 && var(0) := -53
trigger77 = animelemtime(77) = 0 && var(0) := -59
trigger78 = animelemtime(78) = 0 && var(0) := -62
trigger79 = animelemtime(79) = 0 && var(0) := -64
trigger80 = animelemtime(80) = 0 && var(0) := -62
trigger81 = animelemtime(81) = 0 && var(0) := -59
trigger82 = animelemtime(82) = 0 && var(0) := -53
trigger83 = animelemtime(83) = 0 && var(0) := -45
trigger84 = animelemtime(84) = 0 && var(0) := -36
trigger85 = animelemtime(85) = 0 && var(0) := -25
trigger86 = animelemtime(86) = 0 && var(0) := -13
trigger87 = animelemtime(87) = 0 && var(0) := 1;0
trigger88 = animelemtime(88) = 0 && var(0) := 12
trigger89 = animelemtime(89) = 0 && var(0) := 24
trigger90 = animelemtime(90) = 0 && var(0) := 35
trigger91 = animelemtime(91) = 0 && var(0) := 44
trigger92 = animelemtime(92) = 0 && var(0) := 52
trigger93 = animelemtime(93) = 0 && var(0) := 58
trigger94 = animelemtime(94) = 0 && var(0) := 62
trigger95 = animelemtime(95) = 0 && var(0) := 63
trigger96 = animelemtime(96) = 0 && var(0) := 62
trigger97 = animelemtime(97) = 0 && var(0) := 58
trigger98 = animelemtime(98) = 0 && var(0) := 52
trigger99 = animelemtime(99) = 0 && var(0) := 44
trigger100 = animelemtime(100) = 0 && var(0) := 35
trigger101 = animelemtime(101) = 0 && var(0) := 24
trigger102 = animelemtime(102) = 0 && var(0) := 12
trigger103 = animelemtime(103) = 0 && var(0) := 1;0
trigger104 = animelemtime(104) = 0 && var(0) := -13
trigger105 = animelemtime(105) = 0 && var(0) := -25
trigger106 = animelemtime(106) = 0 && var(0) := -44
trigger107 = animelemtime(107) = 0 && var(0) := -51
trigger108 = animelemtime(108) = 0 && var(0) := -55
trigger109 = animelemtime(109) = 0 && var(0) := -57
trigger110 = animelemtime(110) = 0 && var(0) := -57
trigger111 = animelemtime(111) = 0 && var(0) := -54
trigger112 = animelemtime(112) = 0 && var(0) := -50
trigger113 = animelemtime(113) = 0 && var(0) := -44
trigger114 = animelemtime(114) = 0 && var(0) := -36
trigger115 = animelemtime(115) = 0 && var(0) := -28
trigger116 = animelemtime(116) = 0 && var(0) := -19
trigger117 = animelemtime(117) = 0 && var(0) := -9
trigger118 = animelemtime(118) = 0 && var(0) := 1;0
trigger119 = animelemtime(119) = 0 && var(0) := 8
trigger120 = animelemtime(120) = 0 && var(0) := 16
trigger121 = animelemtime(121) = 0 && var(0) := 23
trigger122 = animelemtime(122) = 0 && var(0) := 28
trigger123 = animelemtime(123) = 0 && var(0) := 32
trigger124 = animelemtime(124) = 0 && var(0) := 34
trigger125 = animelemtime(125) = 0 && var(0) := 35
trigger126 = animelemtime(126) = 0 && var(0) := 34
trigger127 = animelemtime(127) = 0 && var(0) := 32
trigger128 = animelemtime(128) = 0 && var(0) := 29
trigger129 = animelemtime(129) = 0 && var(0) := 25
trigger130 = animelemtime(130) = 0 && var(0) := 20
trigger131 = animelemtime(131) = 0 && var(0) := 15
trigger132 = animelemtime(132) = 0 && var(0) := 10
trigger133 = animelemtime(133) = 0 && var(0) := 4
trigger134 = animelemtime(134) = 0 && var(0) := 1;0
trigger135 = animelemtime(135) = 0 && var(0) := -5
trigger136 = animelemtime(136) = 0 && var(0) := -8
trigger137 = animelemtime(137) = 0 && var(0) := -11
trigger138 = animelemtime(138) = 0 && var(0) := -13
trigger139 = animelemtime(139) = 0 && var(0) := -14
ignorehitpause = 1

[State 1005, YURIAAAAAAAAAAAAA]
type = Null
trigger1 = animelemtime(1) = 0 && var(1) := -66
trigger2 = animelemtime(2) = 0 && var(1) := -67
trigger3 = animelemtime(3) = 0 && var(1) := -68
trigger4 = animelemtime(4) = 0 && var(1) := -69
trigger5 = animelemtime(5) = 0 && var(1) := -70;
trigger6 = animelemtime(6) = 0 && var(1) := -69
trigger7 = animelemtime(7) = 0 && var(1) := -69
trigger8 = animelemtime(8) = 0 && var(1) := -67
trigger9 = animelemtime(9) = 0 && var(1) := -65;
trigger10 = animelemtime(10) = 0 && var(1) := -62
trigger11 = animelemtime(11) = 0 && var(1) := -58
trigger12 = animelemtime(12) = 0 && var(1) := -54;
trigger13 = animelemtime(13) = 0 && var(1) := -50;
trigger14 = animelemtime(14) = 0 && var(1) := -46
trigger15 = animelemtime(15) = 0 && var(1) := -43
trigger16 = animelemtime(16) = 0 && var(1) := -40
trigger17 = animelemtime(17) = 0 && var(1) := -37
trigger18 = animelemtime(18) = 0 && var(1) := -37
trigger19 = animelemtime(19) = 0 && var(1) := -37
trigger20 = animelemtime(20) = 0 && var(1) := -38
trigger21 = animelemtime(21) = 0 && var(1) := -40
trigger22 = animelemtime(22) = 0 && var(1) := -45
trigger23 = animelemtime(23) = 0 && var(1) := -50
trigger24 = animelemtime(24) = 0 && var(1) := -56
trigger25 = animelemtime(25) = 0 && var(1) := -63
trigger26 = animelemtime(26) = 0 && var(1) := -70
trigger27 = animelemtime(27) = 0 && var(1) := -79
trigger28 = animelemtime(28) = 0 && var(1) := -87
trigger29 = animelemtime(29) = 0 && var(1) := -95
trigger30 = animelemtime(30) = 0 && var(1) := -102
trigger31 = animelemtime(31) = 0 && var(1) := -107
trigger32 = animelemtime(32) = 0 && var(1) := -112
trigger33 = animelemtime(33) = 0 && var(1) := -115
trigger34 = animelemtime(34) = 0 && var(1) := -116
trigger35 = animelemtime(35) = 0 && var(1) := -114
trigger36 = animelemtime(36) = 0 && var(1) := -111
trigger37 = animelemtime(37) = 0 && var(1) := -105
trigger38 = animelemtime(38) = 0 && var(1) := -98
trigger39 = animelemtime(39) = 0 && var(1) := -89
trigger40 = animelemtime(40) = 0 && var(1) := -78
trigger41 = animelemtime(41) = 0 && var(1) := -66
trigger42 = animelemtime(42) = 0 && var(1) := -53
trigger43 = animelemtime(43) = 0 && var(1) := -41
trigger44 = animelemtime(44) = 0 && var(1) := -28
trigger45 = animelemtime(45) = 0 && var(1) := -16
trigger46 = animelemtime(46) = 0 && var(1) := 1;0
trigger47 = animelemtime(47) = 0 && var(1) := 5
trigger48 = animelemtime(48) = 0 && var(1) := 7
trigger49 = animelemtime(49) = 0 && var(1) := 6
trigger50 = animelemtime(50) = 0 && var(1) := 2
trigger51 = animelemtime(51) = 0 && var(1) := -4
trigger52 = animelemtime(52) = 0 && var(1) := -12
trigger53 = animelemtime(53) = 0 && var(1) := -23
trigger54 = animelemtime(54) = 0 && var(1) := -35
trigger55 = animelemtime(55) = 0 && var(1) := -49
trigger56 = animelemtime(56) = 0 && var(1) := -62
trigger57 = animelemtime(57) = 0 && var(1) := -76
trigger58 = animelemtime(58) = 0 && var(1) := -89
trigger59 = animelemtime(59) = 0 && var(1) := -101
trigger60 = animelemtime(60) = 0 && var(1) := -113
trigger61 = animelemtime(61) = 0 && var(1) := -121
trigger62 = animelemtime(62) = 0 && var(1) := -128
trigger63 = animelemtime(63) = 0 && var(1) := -133
trigger64 = animelemtime(64) = 0 && var(1) := -135
trigger65 = animelemtime(65) = 0 && var(1) := -134
trigger66 = animelemtime(66) = 0 && var(1) := -130
trigger67 = animelemtime(67) = 0 && var(1) := -124
trigger68 = animelemtime(68) = 0 && var(1) := -116
trigger69 = animelemtime(69) = 0 && var(1) := -105
trigger70 = animelemtime(70) = 0 && var(1) := -93
trigger71 = animelemtime(71) = 0 && var(1) := -80
trigger72 = animelemtime(72) = 0 && var(1) := -66
trigger73 = animelemtime(73) = 0 && var(1) := -52
trigger74 = animelemtime(74) = 0 && var(1) := -39
trigger75 = animelemtime(75) = 0 && var(1) := -27
trigger76 = animelemtime(76) = 0 && var(1) := -15
trigger77 = animelemtime(77) = 0 && var(1) := -7
trigger78 = animelemtime(78) = 0 && var(1) := 1;0
trigger79 = animelemtime(79) = 0 && var(1) := 5
trigger80 = animelemtime(80) = 0 && var(1) := 7
trigger81 = animelemtime(81) = 0 && var(1) := 6
trigger82 = animelemtime(82) = 0 && var(1) := 2
trigger83 = animelemtime(83) = 0 && var(1) := -4
trigger84 = animelemtime(84) = 0 && var(1) := -12
trigger85 = animelemtime(85) = 0 && var(1) := -23
trigger86 = animelemtime(86) = 0 && var(1) := -35
trigger87 = animelemtime(87) = 0 && var(1) := -49
trigger88 = animelemtime(88) = 0 && var(1) := -62
trigger89 = animelemtime(89) = 0 && var(1) := -76
trigger90 = animelemtime(90) = 0 && var(1) := -89
trigger91 = animelemtime(91) = 0 && var(1) := -101
trigger92 = animelemtime(92) = 0 && var(1) := -113
trigger93 = animelemtime(93) = 0 && var(1) := -121
trigger94 = animelemtime(94) = 0 && var(1) := -128
trigger95 = animelemtime(95) = 0 && var(1) := -133
trigger96 = animelemtime(96) = 0 && var(1) := -135
trigger97 = animelemtime(97) = 0 && var(1) := -134
trigger98 = animelemtime(98) = 0 && var(1) := -130
trigger99 = animelemtime(99) = 0 && var(1) := -124
trigger100 = animelemtime(100) = 0 && var(1) := -116
trigger101 = animelemtime(101) = 0 && var(1) := -105
trigger102 = animelemtime(102) = 0 && var(1) := -93
trigger103 = animelemtime(103) = 0 && var(1) := -80
trigger104 = animelemtime(104) = 0 && var(1) := -66
trigger105 = animelemtime(105) = 0 && var(1) := -52
trigger106 = animelemtime(106) = 0 && var(1) := -27
trigger107 = animelemtime(107) = 0 && var(1) := -18
trigger108 = animelemtime(108) = 0 && var(1) := -10
trigger109 = animelemtime(109) = 0 && var(1) := -5
trigger110 = animelemtime(110) = 0 && var(1) := -2
trigger111 = animelemtime(111) = 0 && var(1) := -3
trigger112 = animelemtime(112) = 0 && var(1) := -4
trigger113 = animelemtime(113) = 0 && var(1) := -9
trigger114 = animelemtime(114) = 0 && var(1) := -16
trigger115 = animelemtime(115) = 0 && var(1) := -23
trigger116 = animelemtime(116) = 0 && var(1) := -32
trigger117 = animelemtime(117) = 0 && var(1) := -43
trigger118 = animelemtime(118) = 0 && var(1) := -53
trigger119 = animelemtime(119) = 0 && var(1) := -63
trigger120 = animelemtime(120) = 0 && var(1) := -72
trigger121 = animelemtime(121) = 0 && var(1) := -81
trigger122 = animelemtime(122) = 0 && var(1) := -87
trigger123 = animelemtime(123) = 0 && var(1) := -93
trigger124 = animelemtime(124) = 0 && var(1) := -98
trigger125 = animelemtime(125) = 0 && var(1) := -101
trigger126 = animelemtime(126) = 0 && var(1) := -101
trigger127 = animelemtime(127) = 0 && var(1) := -101
trigger128 = animelemtime(128) = 0 && var(1) := -99
trigger129 = animelemtime(129) = 0 && var(1) := -96
trigger130 = animelemtime(130) = 0 && var(1) := -92
trigger131 = animelemtime(131) = 0 && var(1) := -86
trigger132 = animelemtime(132) = 0 && var(1) := -81
trigger133 = animelemtime(133) = 0 && var(1) := -76
trigger134 = animelemtime(134) = 0 && var(1) := -70
trigger135 = animelemtime(135) = 0 && var(1) := -65
trigger136 = animelemtime(136) = 0 && var(1) := -60
trigger137 = animelemtime(137) = 0 && var(1) := -57
trigger138 = animelemtime(138) = 0 && var(1) := -54
ignorehitpause = 1

;Hitdef
[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [2,140])
attr = , HA
damage = floor(200*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 0,14
guard.pausetime = 0,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;persistent = 0
p2stateno = 15000
id = 3000

[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit = 1 && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit
trigger1 = numtarget(3000)
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State -2, Run Sound stop]
type = StopSnd
trigger1 = animtime = 0
trigger2 = root,anim = 3002
trigger3 = root,anim = 3052
trigger4 = root,stateno = 3010
trigger5 = root,stateno = 3060
channel = 4

;End
[State 1000, DestroySelf]
type = ChangeState
trigger1 = animtime = 0
trigger2 = root,anim = 3002
trigger3 = root,anim = 3052
value = stateno +1

[State 1000, DestroySelf]
type = ChangeState
trigger1 = root,stateno = 3010
trigger2 = root,stateno = 3060
value = 3020

[State 8200, Destroy]
type = DestroySelf
trigger1 = root,stateno != 3000
trigger1 = root,stateno != 3050

;Bit 1 End
[Statedef 3006]
type    = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 1

[State -3, Bit]
type = Explod
trigger1 = Numexplod(3000) = 0
anim = 3006
id = 3000
postype = P1
pos = 0,0
ownpal = 0
bindtime = -1
ignorehitpause = 1
ontop = 1
persistent = 1
removetime = 99999999999999
pausemovetime=-1

[State 4900, 16]
type = modifyExplod
trigger1 = Numexplod(3000)
Id = 3000
scale = 1-(time*.02),1-(time*.02)
ignorehitpause = 1

[State -2, ByeBye]
type = RemoveExplod
trigger1 = time = 31
ID = 3000

[State 100, 1]
type = posadd
trigger1 = 1
x = 48*cos(0.4*time)*time*.03125
y = 48*sin(0.4*time)*time*.03125
ignorehitpause = 1

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8200, Destroy]
type = DestroySelf
trigger1 = time = 31

;Bit 2 
[Statedef 3007]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = -4
juggle = 10

[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 10
movetype = A

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 0, back]
type = SprPriority
trigger1 = animelem = 8
trigger2 = animelem = 22
trigger3 = animelem = 36
trigger4 = animelem = 50
value = -4

[State 0, front]
type = SprPriority
trigger1 = animelem = 15
trigger2 = animelem = 29
trigger3 = animelem = 43
trigger4 = animelem = 57
value = 4

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit = 1 && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

;OH MY GOODNESS

[State 2000, BindToRoot]
type = BindToRoot
trigger1 = 1
pos = var(0)-4,var(1)+4
time = 1

[State 1005, Kenshiro...FAREWELL]
type = Null
trigger1 = animelemtime(1) = 0 && var(0) := -1
trigger2 = animelemtime(2) = 0 && var(0) := -2
trigger3 = animelemtime(3) = 0 && var(0) := -3
trigger4 = animelemtime(4) = 0 && var(0) := -4
trigger5 = animelemtime(5) = 0 && var(0) := -3
trigger6 = animelemtime(6) = 0 && var(0) := -3
trigger7 = animelemtime(7) = 0 && var(0) := -1
trigger8 = animelemtime(8) = 0 && var(0) := -1;0
trigger9 = animelemtime(9) = 0 && var(0) := 3
trigger10 = animelemtime(10) = 0 && var(0) := 6
trigger11 = animelemtime(11) = 0 && var(0) := 9
trigger12 = animelemtime(12) = 0 && var(0) := 12
trigger13 = animelemtime(13) = 0 && var(0) := 15
trigger14 = animelemtime(14) = 0 && var(0) := 18
trigger15 = animelemtime(15) = 0 && var(0) := 21;
trigger16 = animelemtime(16) = 0 && var(0) := 22
trigger17 = animelemtime(17) = 0 && var(0) := 23
trigger18 = animelemtime(18) = 0 && var(0) := 23
trigger19 = animelemtime(19) = 0 && var(0) := 22
trigger20 = animelemtime(20) = 0 && var(0) := 20
trigger21 = animelemtime(21) = 0 && var(0) := 16
trigger22 = animelemtime(22) = 0 && var(0) := 12
trigger23 = animelemtime(23) = 0 && var(0) := 7
trigger24 = animelemtime(24) = 0 && var(0) := -1;0
trigger25 = animelemtime(25) = 0 && var(0) := -6
trigger26 = animelemtime(26) = 0 && var(0) := -13;
trigger27 = animelemtime(27) = 0 && var(0) := -20
trigger28 = animelemtime(28) = 0 && var(0) := -27
trigger29 = animelemtime(29) = 0 && var(0) := -33
trigger30 = animelemtime(30) = 0 && var(0) := -38
trigger31 = animelemtime(31) = 0 && var(0) := -41
trigger32 = animelemtime(32) = 0 && var(0) := -44
trigger33 = animelemtime(33) = 0 && var(0) := -44;
trigger34 = animelemtime(34) = 0 && var(0) := -43
trigger35 = animelemtime(35) = 0 && var(0) := -40
trigger36 = animelemtime(36) = 0 && var(0) := -35
trigger37 = animelemtime(37) = 0 && var(0) := -28
trigger38 = animelemtime(38) = 0 && var(0) := -20
trigger39 = animelemtime(39) = 0 && var(0) := -10
trigger40 = animelemtime(40) = 0 && var(0) := -1;0
trigger41 = animelemtime(41) = 0 && var(0) := 11
trigger42 = animelemtime(42) = 0 && var(0) := 22
trigger43 = animelemtime(43) = 0 && var(0) := 33
trigger44 = animelemtime(44) = 0 && var(0) := 43
trigger45 = animelemtime(45) = 0 && var(0) := 52
trigger46 = animelemtime(46) = 0 && var(0) := 62
trigger47 = animelemtime(47) = 0 && var(0) := 64
trigger48 = animelemtime(48) = 0 && var(0) := 62
trigger49 = animelemtime(49) = 0 && var(0) := 59
trigger50 = animelemtime(50) = 0 && var(0) := 53
trigger51 = animelemtime(51) = 0 && var(0) := 45
trigger52 = animelemtime(52) = 0 && var(0) := 36
trigger53 = animelemtime(53) = 0 && var(0) := 25
trigger54 = animelemtime(54) = 0 && var(0) := 13
trigger55 = animelemtime(55) = 0 && var(0) := -1;0
trigger56 = animelemtime(56) = 0 && var(0) := -12
trigger57 = animelemtime(57) = 0 && var(0) := -24
trigger58 = animelemtime(58) = 0 && var(0) := -35
trigger59 = animelemtime(59) = 0 && var(0) := -44
trigger60 = animelemtime(60) = 0 && var(0) := -52
trigger61 = animelemtime(61) = 0 && var(0) := -58
trigger62 = animelemtime(62) = 0 && var(0) := -62
trigger63 = animelemtime(63) = 0 && var(0) := -63
trigger64 = animelemtime(64) = 0 && var(0) := -64
trigger65 = animelemtime(65) = 0 && var(0) := -58
trigger66 = animelemtime(66) = 0 && var(0) := -52
trigger67 = animelemtime(67) = 0 && var(0) := -44
trigger68 = animelemtime(68) = 0 && var(0) := -35
trigger69 = animelemtime(69) = 0 && var(0) := -24
trigger70 = animelemtime(70) = 0 && var(0) := -12
trigger71 = animelemtime(71) = 0 && var(0) := -1;0
trigger72 = animelemtime(72) = 0 && var(0) := 13
trigger73 = animelemtime(73) = 0 && var(0) := 25
trigger74 = animelemtime(74) = 0 && var(0) := 36
trigger75 = animelemtime(75) = 0 && var(0) := 45
trigger76 = animelemtime(76) = 0 && var(0) := 53
trigger77 = animelemtime(77) = 0 && var(0) := 59
trigger78 = animelemtime(78) = 0 && var(0) := 62
trigger79 = animelemtime(79) = 0 && var(0) := 64
trigger80 = animelemtime(80) = 0 && var(0) := 62
trigger81 = animelemtime(81) = 0 && var(0) := 59
trigger82 = animelemtime(82) = 0 && var(0) := 53
trigger83 = animelemtime(83) = 0 && var(0) := 45
trigger84 = animelemtime(84) = 0 && var(0) := 36
trigger85 = animelemtime(85) = 0 && var(0) := 25
trigger86 = animelemtime(86) = 0 && var(0) := 13
trigger87 = animelemtime(87) = 0 && var(0) := -1;0
trigger88 = animelemtime(88) = 0 && var(0) := -12
trigger89 = animelemtime(89) = 0 && var(0) := -24
trigger90 = animelemtime(90) = 0 && var(0) := -35
trigger91 = animelemtime(91) = 0 && var(0) := -44
trigger92 = animelemtime(92) = 0 && var(0) := -52
trigger93 = animelemtime(93) = 0 && var(0) := -58
trigger94 = animelemtime(94) = 0 && var(0) := -62
trigger95 = animelemtime(95) = 0 && var(0) := -63
trigger96 = animelemtime(96) = 0 && var(0) := -62
trigger97 = animelemtime(97) = 0 && var(0) := -58
trigger98 = animelemtime(98) = 0 && var(0) := -52
trigger99 = animelemtime(99) = 0 && var(0) := -44
trigger100 = animelemtime(100) = 0 && var(0) := -35
trigger101 = animelemtime(101) = 0 && var(0) := -24
trigger102 = animelemtime(102) = 0 && var(0) := -12
trigger103 = animelemtime(103) = 0 && var(0) := -1;0
trigger104 = animelemtime(104) = 0 && var(0) := 13
trigger105 = animelemtime(105) = 0 && var(0) := 25
trigger106 = animelemtime(106) = 0 && var(0) := 44
trigger107 = animelemtime(107) = 0 && var(0) := 51
trigger108 = animelemtime(108) = 0 && var(0) := 55
trigger109 = animelemtime(109) = 0 && var(0) := 57
trigger110 = animelemtime(110) = 0 && var(0) := 57
trigger111 = animelemtime(111) = 0 && var(0) := 54
trigger112 = animelemtime(112) = 0 && var(0) := 50
trigger113 = animelemtime(113) = 0 && var(0) := 44
trigger114 = animelemtime(114) = 0 && var(0) := 36
trigger115 = animelemtime(115) = 0 && var(0) := 28
trigger116 = animelemtime(116) = 0 && var(0) := 19
trigger117 = animelemtime(117) = 0 && var(0) := 9
trigger118 = animelemtime(118) = 0 && var(0) := -1;0
trigger119 = animelemtime(119) = 0 && var(0) := -8
trigger120 = animelemtime(120) = 0 && var(0) := -16
trigger121 = animelemtime(121) = 0 && var(0) := -23
trigger122 = animelemtime(122) = 0 && var(0) := -28
trigger123 = animelemtime(123) = 0 && var(0) := -32
trigger124 = animelemtime(124) = 0 && var(0) := -34
trigger125 = animelemtime(125) = 0 && var(0) := -35
trigger126 = animelemtime(126) = 0 && var(0) := -34
trigger127 = animelemtime(127) = 0 && var(0) := -32
trigger128 = animelemtime(128) = 0 && var(0) := -29
trigger129 = animelemtime(129) = 0 && var(0) := -25
trigger130 = animelemtime(130) = 0 && var(0) := -20
trigger131 = animelemtime(131) = 0 && var(0) := -15
trigger132 = animelemtime(132) = 0 && var(0) := -10
trigger133 = animelemtime(133) = 0 && var(0) := -4
trigger134 = animelemtime(134) = 0 && var(0) := -1;0
trigger135 = animelemtime(135) = 0 && var(0) := 5
trigger136 = animelemtime(136) = 0 && var(0) := 8
trigger137 = animelemtime(137) = 0 && var(0) := 11
trigger138 = animelemtime(138) = 0 && var(0) := 13
trigger139 = animelemtime(139) = 0 && var(0) := 14
ignorehitpause = 1

[State 1005, How did Yuria survive this fall...]
type = Null
trigger1 = animelemtime(1) = 0 && var(1) := -66
trigger2 = animelemtime(2) = 0 && var(1) := -67
trigger3 = animelemtime(3) = 0 && var(1) := -68
trigger4 = animelemtime(4) = 0 && var(1) := -69
trigger5 = animelemtime(5) = 0 && var(1) := -70;
trigger6 = animelemtime(6) = 0 && var(1) := -69
trigger7 = animelemtime(7) = 0 && var(1) := -69
trigger8 = animelemtime(8) = 0 && var(1) := -67
trigger9 = animelemtime(9) = 0 && var(1) := -65;
trigger10 = animelemtime(10) = 0 && var(1) := -62
trigger11 = animelemtime(11) = 0 && var(1) := -58
trigger12 = animelemtime(12) = 0 && var(1) := -54;
trigger13 = animelemtime(13) = 0 && var(1) := -50;
trigger14 = animelemtime(14) = 0 && var(1) := -46
trigger15 = animelemtime(15) = 0 && var(1) := -43
trigger16 = animelemtime(16) = 0 && var(1) := -40
trigger17 = animelemtime(17) = 0 && var(1) := -37
trigger18 = animelemtime(18) = 0 && var(1) := -37
trigger19 = animelemtime(19) = 0 && var(1) := -37
trigger20 = animelemtime(20) = 0 && var(1) := -38
trigger21 = animelemtime(21) = 0 && var(1) := -40
trigger22 = animelemtime(22) = 0 && var(1) := -45
trigger23 = animelemtime(23) = 0 && var(1) := -50
trigger24 = animelemtime(24) = 0 && var(1) := -56
trigger25 = animelemtime(25) = 0 && var(1) := -63
trigger26 = animelemtime(26) = 0 && var(1) := -70
trigger27 = animelemtime(27) = 0 && var(1) := -79
trigger28 = animelemtime(28) = 0 && var(1) := -87
trigger29 = animelemtime(29) = 0 && var(1) := -95
trigger30 = animelemtime(30) = 0 && var(1) := -102
trigger31 = animelemtime(31) = 0 && var(1) := -107
trigger32 = animelemtime(32) = 0 && var(1) := -112
trigger33 = animelemtime(33) = 0 && var(1) := -115
trigger34 = animelemtime(34) = 0 && var(1) := -116
trigger35 = animelemtime(35) = 0 && var(1) := -114
trigger36 = animelemtime(36) = 0 && var(1) := -111
trigger37 = animelemtime(37) = 0 && var(1) := -105
trigger38 = animelemtime(38) = 0 && var(1) := -98
trigger39 = animelemtime(39) = 0 && var(1) := -89
trigger40 = animelemtime(40) = 0 && var(1) := -78
trigger41 = animelemtime(41) = 0 && var(1) := -66
trigger42 = animelemtime(42) = 0 && var(1) := -53
trigger43 = animelemtime(43) = 0 && var(1) := -41
trigger44 = animelemtime(44) = 0 && var(1) := -28
trigger45 = animelemtime(45) = 0 && var(1) := -16
trigger46 = animelemtime(46) = 0 && var(1) := 1;0
trigger47 = animelemtime(47) = 0 && var(1) := 5
trigger48 = animelemtime(48) = 0 && var(1) := 7
trigger49 = animelemtime(49) = 0 && var(1) := 6
trigger50 = animelemtime(50) = 0 && var(1) := 2
trigger51 = animelemtime(51) = 0 && var(1) := -4
trigger52 = animelemtime(52) = 0 && var(1) := -12
trigger53 = animelemtime(53) = 0 && var(1) := -23
trigger54 = animelemtime(54) = 0 && var(1) := -35
trigger55 = animelemtime(55) = 0 && var(1) := -49
trigger56 = animelemtime(56) = 0 && var(1) := -62
trigger57 = animelemtime(57) = 0 && var(1) := -76
trigger58 = animelemtime(58) = 0 && var(1) := -89
trigger59 = animelemtime(59) = 0 && var(1) := -101
trigger60 = animelemtime(60) = 0 && var(1) := -113
trigger61 = animelemtime(61) = 0 && var(1) := -121
trigger62 = animelemtime(62) = 0 && var(1) := -128
trigger63 = animelemtime(63) = 0 && var(1) := -133
trigger64 = animelemtime(64) = 0 && var(1) := -135
trigger65 = animelemtime(65) = 0 && var(1) := -134
trigger66 = animelemtime(66) = 0 && var(1) := -130
trigger67 = animelemtime(67) = 0 && var(1) := -124
trigger68 = animelemtime(68) = 0 && var(1) := -116
trigger69 = animelemtime(69) = 0 && var(1) := -105
trigger70 = animelemtime(70) = 0 && var(1) := -93
trigger71 = animelemtime(71) = 0 && var(1) := -80
trigger72 = animelemtime(72) = 0 && var(1) := -66
trigger73 = animelemtime(73) = 0 && var(1) := -52
trigger74 = animelemtime(74) = 0 && var(1) := -39
trigger75 = animelemtime(75) = 0 && var(1) := -27
trigger76 = animelemtime(76) = 0 && var(1) := -15
trigger77 = animelemtime(77) = 0 && var(1) := -7
trigger78 = animelemtime(78) = 0 && var(1) := 1;0
trigger79 = animelemtime(79) = 0 && var(1) := 5
trigger80 = animelemtime(80) = 0 && var(1) := 7
trigger81 = animelemtime(81) = 0 && var(1) := 6
trigger82 = animelemtime(82) = 0 && var(1) := 2
trigger83 = animelemtime(83) = 0 && var(1) := -4
trigger84 = animelemtime(84) = 0 && var(1) := -12
trigger85 = animelemtime(85) = 0 && var(1) := -23
trigger86 = animelemtime(86) = 0 && var(1) := -35
trigger87 = animelemtime(87) = 0 && var(1) := -49
trigger88 = animelemtime(88) = 0 && var(1) := -62
trigger89 = animelemtime(89) = 0 && var(1) := -76
trigger90 = animelemtime(90) = 0 && var(1) := -89
trigger91 = animelemtime(91) = 0 && var(1) := -101
trigger92 = animelemtime(92) = 0 && var(1) := -113
trigger93 = animelemtime(93) = 0 && var(1) := -121
trigger94 = animelemtime(94) = 0 && var(1) := -128
trigger95 = animelemtime(95) = 0 && var(1) := -133
trigger96 = animelemtime(96) = 0 && var(1) := -135
trigger97 = animelemtime(97) = 0 && var(1) := -134
trigger98 = animelemtime(98) = 0 && var(1) := -130
trigger99 = animelemtime(99) = 0 && var(1) := -124
trigger100 = animelemtime(100) = 0 && var(1) := -116
trigger101 = animelemtime(101) = 0 && var(1) := -105
trigger102 = animelemtime(102) = 0 && var(1) := -93
trigger103 = animelemtime(103) = 0 && var(1) := -80
trigger104 = animelemtime(104) = 0 && var(1) := -66
trigger105 = animelemtime(105) = 0 && var(1) := -52
trigger106 = animelemtime(106) = 0 && var(1) := -27
trigger107 = animelemtime(107) = 0 && var(1) := -18
trigger108 = animelemtime(108) = 0 && var(1) := -10
trigger109 = animelemtime(109) = 0 && var(1) := -5
trigger110 = animelemtime(110) = 0 && var(1) := -2
trigger111 = animelemtime(111) = 0 && var(1) := -3
trigger112 = animelemtime(112) = 0 && var(1) := -4
trigger113 = animelemtime(113) = 0 && var(1) := -9
trigger114 = animelemtime(114) = 0 && var(1) := -16
trigger115 = animelemtime(115) = 0 && var(1) := -23
trigger116 = animelemtime(116) = 0 && var(1) := -32
trigger117 = animelemtime(117) = 0 && var(1) := -43
trigger118 = animelemtime(118) = 0 && var(1) := -53
trigger119 = animelemtime(119) = 0 && var(1) := -63
trigger120 = animelemtime(120) = 0 && var(1) := -72
trigger121 = animelemtime(121) = 0 && var(1) := -81
trigger122 = animelemtime(122) = 0 && var(1) := -87
trigger123 = animelemtime(123) = 0 && var(1) := -93
trigger124 = animelemtime(124) = 0 && var(1) := -98
trigger125 = animelemtime(125) = 0 && var(1) := -101
trigger126 = animelemtime(126) = 0 && var(1) := -101
trigger127 = animelemtime(127) = 0 && var(1) := -101
trigger128 = animelemtime(128) = 0 && var(1) := -99
trigger129 = animelemtime(129) = 0 && var(1) := -96
trigger130 = animelemtime(130) = 0 && var(1) := -92
trigger131 = animelemtime(131) = 0 && var(1) := -86
trigger132 = animelemtime(132) = 0 && var(1) := -81
trigger133 = animelemtime(133) = 0 && var(1) := -76
trigger134 = animelemtime(134) = 0 && var(1) := -70
trigger135 = animelemtime(135) = 0 && var(1) := -65
trigger136 = animelemtime(136) = 0 && var(1) := -60
trigger137 = animelemtime(137) = 0 && var(1) := -57
trigger138 = animelemtime(138) = 0 && var(1) := -54
ignorehitpause = 1

;Hitdef

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [2,140])
attr = , HA
damage = floor(200*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 0,14
guard.pausetime = 0,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;persistent = 0
p2stateno = 15000
id = 3000

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit
trigger1 = numtarget(3000)
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

;End
[State 1000, DestroySelf]
type = ChangeState
trigger1 = animtime = 0
trigger2 = root,anim = 3002
trigger3 = root,anim = 3052
value = stateno +1

[State 1000, DestroySelf]
type = ChangeState
trigger1 = root,stateno = 3010
trigger2 = root,stateno = 3060
value = 3021

[State 8200, Destroy]
type = DestroySelf
trigger1 = root,stateno != 3000
trigger1 = root,stateno != 3050

;Bit 2 End 
[Statedef 3008]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 1
juggle = 10

[State -3, Shrinking Bit]
type = Explod
trigger1 = Numexplod(3000) = 0
anim = 3006
id = 3000
postype = P1
pos = 0,0
ownpal = 0
bindtime = -1
ignorehitpause = 1
ontop = 1
persistent = 1
removetime = 99999999999999
pausemovetime=-1

[State 4900, 16]
type = modifyExplod
trigger1 = Numexplod(3000)
Id = 3000
scale = 1-(time*.02),1-(time*.02)
ignorehitpause = 1

[State -2, Power Chage]
type = RemoveExplod
trigger1 = time = 31
ID = 3000

[State 100, 1]
type = posadd
trigger1 = 1
x = -48*cos(0.4*time)*time*.03125
y = 48*sin(0.4*time)*time*.03125
ignorehitpause = 1

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 8200, Destroy]
type = DestroySelf
trigger1 = time = 31

;Crystal Shot
[Statedef 3010]
type    = S                     
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3010
poweradd=  0                      
sprpriority = 2 
velset=0,0

;============== Buffering
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),4,16)

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,28]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = !time
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
Trigger1 = !time
anim = 15200-(var(31)*200)
pos = -13,-139
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
Trigger1 = !time
anim = 15201-(var(31)*200)
pos = -13,-139
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3010 
trigger1 = animelemtime(30) < 0
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3010 && !animtime
value = anim+1

[State 1001, end]
type = ChangeAnim
triggerall = anim = 3011 && animelemtime(1)>0
trigger1 = !animtime
trigger2 = !var(5) && command != "hold_x" 
trigger3 = var(5) && command != "hold_y" 
value = ifelse(var(5),3013,3012)

[State 1000, VarSet]
type = VarSet
trigger1 = anim = 3012 && animelem = 1
trigger2 = anim = 3013 && animelem = 1
v = 5
value = ifelse(anim = 3012,0,1)
;==============Helpers 
[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3012
trigger1 = animelemtime(4) < 0
trigger2 = anim = 3013
trigger2 = animelemtime(4) < 0
value = SCA

[State 1000: Helper]
type = helper
trigger1 = anim = 3010 && animelem = 59
helpertype = Normal
id = 3015
pos = -12, -136 ;50
postype = p1
facing = 1
stateno = 3014
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
triggerall = anim = 3012 || anim = 3013
trigger1 = animelem = 1
value = 200,10
channel = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 3012 || anim = 3013
trigger1 = animelem = 1
value = 1000,8

[State 220,2]
type = ChangeState
triggerall = anim = 3012 || anim = 3013
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 3014]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0
anim = 3014

[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 999
length = 4
palbright = 16,0,32;,136
palcontrast = 128,128,128;,136
paladd = 0,0,0
timegap = 2
framegap = 1
trans = add
ignorehitpause = 1
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = add1
ignorehitpause = 1

[State 1352, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 100, 1]
type = bindtoroot
trigger1 = root,stateno = 3010
pos = -12,-136
ignorehitpause = 1
[State 100, 1]
type = bindtoroot
trigger1 = root,stateno = 3060
pos = -12,-144
ignorehitpause = 1

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1100, VarSet]
type = VarSet
trigger1 = root,anim = 3012
trigger2 = root,anim = 3013
trigger3 = root,anim = 3062
var(5) = root,var(5)

[State 8200, Fly]
type = ChangeState
triggerall = root,stateno = 3010
trigger1 = root,anim = 3012 
trigger2 = root,anim = 3013 
value = 3015

[State 8200, Fly]
type = ChangeState
triggerall = root,stateno = 3060
trigger1 = root,anim = 3062
value = 3015

[State 8200, Destroy]
type = DestroySelf
trigger1 = parent,stateno != 3010
trigger1 = parent,stateno != 3060
trigger1 = parent,stateno != 3110
trigger1 = parent,stateno != 3160

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,6])
attr = , HA
damage = floor(25*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -22
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 0,14
guard.pausetime = 0,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;persistent = 0
p2stateno = 15000
id = 3000

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit
trigger1 = numtarget(3000)
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit = 1 && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3000) && movehit
value = 15000
persistent = 0

[Statedef 3015]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0
juggle = 0

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3017
;=======================================;


[State 1000: Helper]
type = Helper
trigger1 = numhelper(3065) = 0
trigger1 = !time 
helpertype = Normal
name = "Projectile Guard"
id = 3065
pos = 50, 0 ;50
postype = p1
facing = 1
stateno = 3065
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 811, Anim]
Type = ChangeAnim
trigger1 = !time && prevstateno = 3014
Value = 3015

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, HP projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = stateno+1
time = -1
slot = 1
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(16) = 0
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = NumHelper(247)
text = "MoveHit = %d"
params = Var(5)

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit
trigger1 = numtarget(3000)
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 100, 1]
type = posadd
trigger1 = animelem = 3 
x = ifelse(var(5)=0,1,ifelse(var(5)=1,1,2))	
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,6))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 4 
x = ifelse(var(5)=0,5,ifelse(var(5)=1,5,4))		
y = ifelse(var(5)=0,13,ifelse(var(5)=1,13,13))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,8,ifelse(var(5)=1,8,7))		
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,12))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,10,ifelse(var(5)=1,10,16))		
y = ifelse(var(5)=0,11,ifelse(var(5)=1,11,16))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 6
x = ifelse(var(5)=0,13,ifelse(var(5)=1,13,5))		
y = ifelse(var(5)=0,9,ifelse(var(5)=1,9,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 7
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,6,ifelse(var(5)=1,6,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 8
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,4,ifelse(var(5)=1,4,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 9
x = ifelse(var(5)=0,24,ifelse(var(5)=1,24,5))	
y = ifelse(var(5)=0,1,ifelse(var(5)=1,1,4))	
ignorehitpause = 1
[State 1500, VelSet]
type = VelSet
trigger1 = (animelemno(0) = [9,18])
x = ifelse(var(5)=0,7,ifelse(var(5)=1,7,7))	
y = ifelse(var(5)=0,0,ifelse(var(5)=1,-4,7))	

[State 100, 1]
type = veladd
triggerall = var(5) = 1
trigger1 = animelemtime(9) > 0
y = -.6

[State 1500, VelSet]
type = VelSet
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
x = 7
y = 0	
[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
y = -.7

[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y <= 0
trigger1 = animelemtime(9) > 0 
y = -.15

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow


;Hitdef
[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,18])
attr = S, HP
damage = floor(208*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -22
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 0,14
guard.pausetime = 0,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;persistent = 0
;p2stateno = 15000
id = 3000

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3000) && movehit
value = 15000
persistent = 0

[State 8200, Destroy]
type = DestroySelf
trigger1 = frontedgedist < -10
ignorehitpause = 1

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= stateno
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1= movecontact && numtarget
value= 3016
ignorehitpause = 0
persistent = 0

[Statedef 3016]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3016
sprpriority = 4

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0

[State 3303, Explod]
type = Explod
triggerall = prevstateno = 3015
triggerall = numtarget
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

[Statedef 3017]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0
juggle = 0

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3015
;=======================================;

[State 811, Anim]
Type = ChangeAnim
trigger1 = !time && prevstateno != 3017
Value = 3015
elem = 12

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, HP projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = stateno+1
time = -1
slot = 1
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(16) = 0
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = NumHelper(247)
text = "MoveHit = %d"
params = Var(6)

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit
trigger1 = numtarget(3000)
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 100, 1]
type = posadd
trigger1 = animelem = 3 
x = ifelse(var(5)=0,1,ifelse(var(5)=1,1,2))	
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,6))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 4 
x = ifelse(var(5)=0,5,ifelse(var(5)=1,5,4))		
y = ifelse(var(5)=0,13,ifelse(var(5)=1,13,13))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,8,ifelse(var(5)=1,8,7))		
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,12))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,10,ifelse(var(5)=1,10,16))		
y = ifelse(var(5)=0,11,ifelse(var(5)=1,11,16))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 6
x = ifelse(var(5)=0,13,ifelse(var(5)=1,13,5))		
y = ifelse(var(5)=0,9,ifelse(var(5)=1,9,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 7
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,6,ifelse(var(5)=1,6,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 8
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,4,ifelse(var(5)=1,4,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 9
x = ifelse(var(5)=0,24,ifelse(var(5)=1,24,5))	
y = ifelse(var(5)=0,1,ifelse(var(5)=1,1,4))	
ignorehitpause = 1
[State 1500, VelSet]
type = VelSet
trigger1 = (animelemno(0) = [9,18])
x = ifelse(var(5)=0,7,ifelse(var(5)=1,7,7))	
y = ifelse(var(5)=0,0,ifelse(var(5)=1,-4,7))	

[State 100, 1]
type = veladd
triggerall = var(5) = 1
trigger1 = animelemtime(9) > 0
y = -.6

[State 1500, VelSet]
type = VelSet
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
x = 7
y = 0	
[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
y = -.7

[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y <= 0
trigger1 = animelemtime(9) > 0 
y = -.15

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow


;Hitdef
[State 210, 1]
type = HitDef
affectteam = F
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,18])
attr = S, HP
damage = floor(208*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -22
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 0,14
guard.pausetime = 0,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;persistent = 0
;p2stateno = 15000
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time && prevstateno != 3017
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;

[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget && movehit
value = 15000
persistent = 0

[State 8200, Destroy]
type = DestroySelf
trigger1 = frontedgedist < -10
ignorehitpause = 1

[State 1005, End]
type=changeState
trigger1 = movecontact && NumTarget
value= 3016
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse((numhelper(1005)=1),stateno,3016)
ignorehitpause = 0


[Statedef 3020]
type    = A
movetype = I
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0

[State 1352, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 100, 1]
type = varadd
trigger1 = 1
fvar(2)=(12*sin(0.2*(var(1)+time))*(29-time)*.0345)+((-18+ParentDist X)*.0345)
ignorehitpause = 1

[State 100, 1]
type = varadd
trigger1 = 1
fvar(3)=(-16*sin(0.2*(var(1)+time))*(29-time)*.0345)+((-168+ParentDist Y)*.0345)
ignorehitpause = 1

[State 100, 1]
type = bindtoroot
trigger1 = 1
pos = -3+fvar(2),-64+fvar(3)
ignorehitpause = 1

;Effects
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 8200, Destroy]
type = DestroySelf
trigger1 = time = 29
trigger2 = parent,stateno != 3010
trigger2 = parent,stateno != 3060
trigger2 = parent,stateno != 3210
trigger2 = parent,stateno != 3260

[Statedef 3021]
type    = A
movetype = I
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0

[State 1352, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 100, 1]
type = varadd
trigger1 = 1
fvar(2)=(12*sin(0.2*(var(1)+time))*(29-time)*.0345)-((-18+ParentDist X)*.0345)
ignorehitpause = 1

[State 100, 1]
type = varadd
trigger1 = 1
fvar(3)=(-16*sin(0.2*(var(1)+time))*(29-time)*.0345)+((-168+ParentDist Y)*.0345)
ignorehitpause = 1

[State 100, 1]
type = bindtoroot
trigger1 = 1
pos = -3-fvar(2),-64+fvar(3)
ignorehitpause = 1

;Effects
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 8200, Destroy]
type = DestroySelf
trigger1 = time = 29
trigger2 = parent,stateno != 3010
trigger2 = parent,stateno != 3060
trigger2 = parent,stateno != 3210
trigger2 = parent,stateno != 3260

;Shining Crystal Bit (AIR)
[Statedef 3050]
type    = A                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3050
poweradd=  ifelse(var(51),0,-1000)                       
sprpriority = 2 
velset=0,0
facep2 = 1

;============== Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(42):=0,0) || e ;Reset command
trigger1 = Helper(10371),cond(1,var(0):=0,0) || e ;Reset command
trigger1 = Helper(10371),cond(1,var(1):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = numhelper(10371)
trigger1 = helper(10371), var(26)
var(4) = 1


[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
triggerall = numhelper(10371)
triggerall = helper(10371), Var(22)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3])
var(4) = 2

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = 0,-88
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = 0,-88
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3050
trigger1 = animelemtime(30) < 0
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3050 || anim = 3051 || anim = 3052
value = anim+1

[State 1300, ChangeAnim];Command Cancel
type = ChangeAnim
triggerall = anim = 3051 && animelemtime(1)>= 0
trigger1 = var(4) = 1
value = anim+1
;============== Vels && Movement
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 3053 && animelem = 1
x = 0
y = 0 

[State 1030, 1]
type = VelAdd
trigger1 = anim = 3053 && animelemtime(1) > 0 
Y = 0.375
;==============Helpers 
[State 1000: Helper]
type = Helper
triggerall = anim = 3050
trigger1 = animelemtime(30) = 0
helpertype = Normal
name = "Crystal Bit 1"
id = 3005
pos = 1, -66 ;50
postype = p1
facing = 1
stateno = 3005
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0  
[State 1000: Helper]
type = Helper
triggerall = anim = 3050
trigger1 = animelemtime(30) = 0
helpertype = Normal
name = "Crystal Bit 2"
id = 3005
pos = 1, -66 ;50
postype = p1
facing = 1
stateno = 3007
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0 
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3050
trigger1 = animelem = 1
value = 200,9
channel = 0

[State 1000, 6]
type = ChangeState
trigger1 = anim = 3053
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

[State 1300, ChangeAnim];Change To Shoot
type = ChangeState
triggerall = anim = 3051 && animelemtime(1)>= 0
trigger1 = var(4) = 2
value = 3060


;Land
[Statedef 3051]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
facep2 = 1

;=============Anims and StateType
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3054

;============== Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;==============Effects

[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;Crystal Shot (AIR)
[Statedef 3060]
type    = A                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3060
poweradd=  0                  
sprpriority = 2 
velset=0,0

;============== Buffering
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 5
value = ifelse((helper(10371), var(0) = [1,3]),0,1) 
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),4,16)

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = -13,-144
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = -13,-144
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3060
trigger1 = animelemtime(30) < 0
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3060 && !animtime
trigger2 = anim = 3062 && !animtime
value = anim+1

[State 1001, end]
type = ChangeAnim
triggerall = anim = 3061 && animelemtime(1)>0
trigger1 = !animtime
trigger2 = !var(5) && command != "hold_x" 
trigger3 = var(5) && command != "hold_y" 
value = 3062

[State 1000, VarSet]
type = VarSet
trigger1 = anim = 3062 && animelem = 1
v = 5
value = 2
;============== Vels && Movement
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 3063 && animelem = 1
x = 0
y = 0 

[State 1030, 1]
type = VelAdd
trigger1 = anim = 3063 && animelemtime(1) > 0 
Y = 0.375
;==============Helpers 
[State 1000: Helper]
type = helper
trigger1 = anim = 3060 && animelem = 59
helpertype = Normal
id = 3015
pos = -12, -144 ;50
postype = p1
facing = 1
stateno = 3014
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3062
trigger1 = animelem = 1
value = 200,10
channel = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3062
trigger1 = animelem = 1
value = 1000,8

[State 1000, 6]
type = ChangeState
trigger1 = anim = 3063
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0


;Land
[Statedef 3061]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
facep2 = 1

;=============Anims and StateType
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3064

;============== Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;==============Effects

[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;DM Projectile Shield
[Statedef 3065]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0,0
ownpal = 1
anim = 3017

[State 100, 1]
type = bindtoparent
trigger1 = parent,stateno = 3015
ignorehitpause = 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = numhelper(3015) = 0
trigger2 = helper(3015),stateno != 3015

;Phoenix Fang Arrow
[Statedef 3100]
type    = A                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = ifElse((helper(10371), var(3) = [1,3]),3100,3110)
poweradd=  ifelse(var(51),0,-1000)                       
sprpriority = 2 
velset=0,0
facep2 = 1

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = -8,-96
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = -8,-96
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3100 
trigger1 = animelemtime(31) < 0
trigger2 = anim = 3100 || anim = 3110
trigger2 = animelemtime(47) >= 0 && animelemtime(50) < 0
trigger3 = anim = 3100 || anim = 3110
trigger3 = animelemtime(73) >= 0 && animelemtime(76) < 0
value = SCA

[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(3) = [1,3]),4,7)
;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3100 || anim = 3110
value = anim+1
;============== Vels && Movement
[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 3101 && animelem = 1
trigger2 = anim = 3111 && animelem = 1
y = -32
[State 1500, VelSet] ;45 degrees
type = VelSet
trigger1 = anim = 3101 && animelem = 1
x = 11*cos(0.785398)
y = 11*sin(0.785398)
;x = 7.7781829833984375
;y = 7.7781829833984375 

[State 1500, VelSet] ;33.75 degrees
type = VelSet
trigger1 = anim = 3111 && animelem = 1
x = 11*cos(0.58904862)
y = 11*sin(0.58904862)
;x = 9.1461334228515625
;y = 6.111297607421875 

[State 1000, 6]
type = PosAdd
triggerall = anim = 3101 || anim = 3111
trigger1 = Vel Y + Pos Y >= 0
x = vel x
;==============Helpers (OH BOY)
[State 1000: Helper]
type = helper
triggerall = anim = 3100 || anim = 3110
trigger1 = animelemtime(38) = 0
trigger2 = animelemtime(64) = 0
trigger3 = animelemtime(90) = 0
helpertype = Normal
id = 3105
pos = 8, -24 ;50
postype = p1
facing = 1
stateno = 3105
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
;==============Sounds and FX
[State 0, Explod]
type = Explod
triggerall = anim = 3101 || anim = 3111
trigger1 = animelem = 1
anim = 3107
ID = 3100
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 5
ignorehitpause = 0
ownpal = 1
removetime = -1

[State 1000: Helper]
type = Helper
triggerall = anim = 3101 || anim = 3111
trigger1 = animelem = 1
helpertype = Normal
id = 1409
pos = 0, 32 ;50
postype = p1
facing = 1
name = "Warp Effect"
stateno = 1409
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3100 || anim = 3110
trigger1 = animelem = 1
value = 200,11
channel = 0
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3101 || anim = 3111
trigger1 = animelem = 1
value = 200,12
channel = 0
persistent = 0

[State 200, Punch Attempt Sound]
type = Playsnd
trigger1 = anim = 3101 || anim = 3111
trigger1 = animelem = 1
value = 1000,9
persistent = 0

[State 3035, 1]
type = AfterImage
trigger1 = anim = 3101 || anim = 3101
trigger1 = AnimElem = 1, =4
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1
;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = anim = 3101 || anim = 3111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = anim = 3101 || anim = 3111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 0 && animelemtime(6) < 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = anim = 3101 || anim = 3111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(8) >= 0 && animelemtime(10) < 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = anim = 3101 || anim = 3111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(12) >= 0 && animelemtime(14) < 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = anim = 3101 || anim = 3111
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(16) >= 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400



[State 1000, 6]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0


;Land
[Statedef 3101]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;facep2 = 1

;=============Anims and StateType
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3102+(cond(anim=3111,10,0))

;============== Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1500, VelSet]
type = VelSet
trigger1 = anim = 3102 && animelem = 1
x = 6.5020751953125005
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 3102 && animelemtime(1)> 0
x = 0.835938
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 3112 && animelem = 1
x = 7.6455993652343745
[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 3112 && animelemtime(1)> 0
x = 0.835938

;==============Effects
[State 1000, remove fx]
type = RemoveExplod
trigger1 = !time
ID = 3100

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 3108
ID = 3101
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 5
ignorehitpause = 0
ownpal = 1


[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Fang Arrow Projectile
[Statedef 3105]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

[State 200, Punch Attempt Sound]
type = Playsnd
Trigger1 = !Time && !prevstateno 
value = 1000,9
persistent = 0

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3105
ignorehitpause = 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1

[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
ignorehitpause = 1

[State 1050, VelSet] ;45 degrees and 37.5 degrees
type = VelSet
trigger1 = time = 1
x = 11*ifelse(root,var(15)=4,cos(0.785398),cos(0.58904862))
y = 11*ifelse(root,var(15)=4,sin(0.785398),sin(0.58904862))
;x = ifelse(root,var(15)=4,7.7781829833984375,9.1461334228515625)
;y = ifelse(root,var(15)=4,7.7781829833984375,6.111297607421875)

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1305
ID = 3105
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 5
ignorehitpause = 0
ownpal = 1
removetime = -1

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact = 1 && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10000)),(17502+(root,var(31)*10000))))
ID = 1000
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 24, ceil(p2dist x), 14)),-22
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
ignorehitpause = 1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 0
attr = , HA
damage = floor(58*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,-2
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = high
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3105
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(4) >= 0 && animelemtime(6) < 0
attr = , HA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,42
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3105
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(8) >= 0 && animelemtime(10) < 0
attr = , HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,-2
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = high
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3105
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(12) >= 0 && animelemtime(14) < 0
attr = , HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,42
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3105
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(16) >= 0 
attr = , HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,-2
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = high
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3105
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact = 1 && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,3,13)
ignorehitpause = 1
channel = 4

[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit = 1 && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1

[State 1000, 6]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

[Statedef 3106]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3106
sprpriority = 4

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1

[State 1000, remove fx]
type = RemoveExplod
trigger1 = !time
ID = 3105

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1306
ID = 3106
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 5
ignorehitpause = 0
ownpal = 1

[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0

[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;Shining Crystal Bit MAX
[Statedef 3200]
type    = S                     
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3200
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0

;============== Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(42):=0,0) || e ;Reset command
trigger1 = Helper(10371),cond(1,var(0):=0,0) || e ;Reset command
trigger1 = Helper(10371),cond(1,var(1):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = numhelper(10371)
trigger1 = helper(10371), var(26)
var(4) = 1

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
triggerall = numhelper(10371)
triggerall = helper(10371), Var(22)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3])
var(4) = 2
;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,28]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = !time
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*6)
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
Trigger1 = !time
anim = 15300-(var(31)*200)
pos = 0,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
Trigger1 = !time
anim = 15301-(var(31)*200)
pos = 0,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3200 
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3200
value = ifelse((var(15)),3231,3201)

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3201 || anim = 3231
value = 3202

[State 1300, ChangeAnim];Command Cancel
type = ChangeAnim
trigger1 = anim = 3201 && animelemtime(1)>= 0
trigger2 = anim = 3231 && animelemtime(1)>= 0
triggerall = var(4) = 1
value = 3202

;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(15) = ifelse((random <= 125),1,0)
;==============Helpers 
[State 1000: Helper]
type = Helper
triggerall = anim = 3200
trigger1 = animelemtime(30) = 0
helpertype = Normal
name = "Crystal Bit 1"
id = 3205
pos = 1, -66 ;50
postype = p1
facing = 1
stateno = 3205
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0  
[State 1000: Helper]
type = Helper
triggerall = anim = 3200
trigger1 = animelemtime(30) = 0
helpertype = Normal
name = "Crystal Bit 2"
id = 3205
pos = 1, -66 ;50
postype = p1
facing = 1
stateno = 3207
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0 

[State 1000: Helper]
type = helper
trigger1 = anim = 3201 || anim = 3231
trigger1 = animelemtime(1) = 0
helpertype = Normal
id = 3203
pos = 0, 0
postype = p1
facing = 1
stateno = 3203
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3200
trigger1 = animelem = 1
value = 200,9
channel = 0

;==============Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3201
trigger1 = AnimElemtime(3) >= 0 && animelemtime(4) < 0
trigger2 = AnimElemtime(5) >= 0 && animelemtime(6) < 0
trigger3 = AnimElemtime(8) >= 0 && animelemtime(9) < 0
trigger4 = AnimElemtime(10) >= 0 && animelemtime(11) < 0
trigger5 = AnimElemtime(13) >= 0 && animelemtime(14) < 0
trigger6 = AnimElemtime(15) >= 0 && animelemtime(16) < 0
trigger7 = AnimElemtime(18) >= 0 && animelemtime(19) < 0
trigger8 = AnimElemtime(20) >= 0 && animelemtime(21) < 0
trigger9 = AnimElemtime(23) >= 0 && animelemtime(24) < 0
trigger10 = AnimElemtime(25) >= 0 && animelemtime(26) < 0
trigger11 = AnimElemtime(28) >= 0 && animelemtime(29) < 0
trigger12 = AnimElemtime(33) >= 0 && animelemtime(34) < 0
trigger13 = AnimElemtime(35) >= 0 && animelemtime(36) < 0
trigger14 = AnimElemtime(38) >= 0 && animelemtime(39) < 0
trigger15 = AnimElemtime(40) >= 0 && animelemtime(41) < 0
trigger16 = AnimElemtime(43) >= 0 && animelemtime(44) < 0
trigger17 = AnimElemtime(45) >= 0 && animelemtime(46) < 0
trigger18 = AnimElemtime(48) >= 0 && animelemtime(49) < 0
trigger19 = AnimElemtime(50) >= 0 && animelemtime(51) < 0
trigger20 = AnimElemtime(53) >= 0 && animelemtime(54) < 0
trigger21 = AnimElemtime(55) >= 0 && animelemtime(56) < 0
trigger22 = AnimElemtime(58) >= 0 && animelemtime(59) < 0
trigger23 = AnimElemtime(60) >= 0 && animelemtime(61) < 0
trigger24 = AnimElemtime(63) >= 0 && animelemtime(64) < 0
trigger25 = AnimElemtime(68) >= 0 && animelemtime(69) < 0
trigger26 = AnimElemtime(70) >= 0 && animelemtime(71) < 0
trigger27 = AnimElemtime(73) >= 0 && animelemtime(74) < 0
trigger28 = AnimElemtime(75) >= 0 && animelemtime(76) < 0
trigger29 = AnimElemtime(78) >= 0 && animelemtime(79) < 0
trigger30 = AnimElemtime(80) >= 0 && animelemtime(81) < 0
trigger31 = AnimElemtime(83) >= 0 && animelemtime(84) < 0
trigger32 = AnimElemtime(85) >= 0 && animelemtime(86) < 0
trigger33 = AnimElemtime(88) >= 0 && animelemtime(89) < 0
trigger34 = AnimElemtime(90) >= 0 && animelemtime(91) < 0
trigger35 = AnimElemtime(93) >= 0 && animelemtime(94) < 0
trigger36 = AnimElemtime(95) >= 0 && animelemtime(96) < 0
trigger37 = AnimElemtime(98) >= 0 && animelemtime(99) < 0
trigger38 = AnimElemtime(100) >= 0 && animelemtime(101) < 0
trigger39 = AnimElemtime(103) >= 0 && animelemtime(104) < 0
trigger40 = AnimElemtime(105) >= 0 && animelemtime(106) < 0
trigger41 = AnimElemtime(108) >= 0 && animelemtime(109) < 0
trigger42 = AnimElemtime(110) >= 0 && animelemtime(111) < 0
trigger43 = AnimElemtime(113) >= 0 && animelemtime(114) < 0
trigger44 = AnimElemtime(115) >= 0 && animelemtime(116) < 0
trigger45 = AnimElemtime(118) >= 0 && animelemtime(119) < 0
trigger46 = AnimElemtime(120) >= 0 && animelemtime(121) < 0
trigger47 = AnimElemtime(123) >= 0 && animelemtime(124) < 0
trigger48 = AnimElemtime(125) >= 0 && animelemtime(126) < 0
trigger49 = AnimElemtime(128) >= 0 && animelemtime(129) < 0
trigger50 = AnimElemtime(133) >= 0 && animelemtime(134) < 0
trigger51 = AnimElemtime(135) >= 0 && animelemtime(136) < 0
trigger52 = AnimElemtime(138) >= 0 && animelemtime(139) < 0
trigger53 = AnimElemtime(140) >= 0 && animelemtime(141) < 0
trigger54 = AnimElemtime(143) >= 0 && animelemtime(144) < 0
trigger55 = AnimElemtime(145) >= 0 && animelemtime(146) < 0
trigger56 = AnimElemtime(148) >= 0 && animelemtime(149) < 0
trigger57 = AnimElemtime(150) >= 0 && animelemtime(151) < 0
trigger58 = AnimElemtime(153) >= 0 && animelemtime(154) < 0
trigger59 = AnimElemtime(155) >= 0 && animelemtime(156) < 0
trigger60 = AnimElemtime(158) >= 0 && animelemtime(159) < 0
trigger61 = AnimElemtime(160) >= 0 && animelemtime(161) < 0
trigger62 = AnimElemtime(163) >= 0 && animelemtime(164) < 0
trigger63 = AnimElemtime(168) >= 0 && animelemtime(169) < 0
trigger64 = AnimElemtime(170) >= 0 && animelemtime(171) < 0
trigger65 = AnimElemtime(173) >= 0 && animelemtime(174) < 0
attr = S, HA
damage = floor(308*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17001+(var(31)*10000)
sparkxy = -10, -44
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13-(var(32));s2, 6
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 3200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 15000

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3231
trigger1 = AnimElemtime(3) >= 0 && animelemtime(4) < 0
trigger2 = AnimElemtime(5) >= 0 && animelemtime(6) < 0
trigger3 = AnimElemtime(8) >= 0 && animelemtime(9) < 0
trigger4 = AnimElemtime(10) >= 0 && animelemtime(11) < 0
trigger5 = AnimElemtime(13) >= 0 && animelemtime(14) < 0
trigger6 = AnimElemtime(15) >= 0 && animelemtime(16) < 0
trigger7 = AnimElemtime(18) >= 0 && animelemtime(19) < 0
trigger8 = AnimElemtime(20) >= 0 && animelemtime(21) < 0
trigger9 = AnimElemtime(23) >= 0 && animelemtime(24) < 0
trigger10 = AnimElemtime(25) >= 0 && animelemtime(26) < 0
trigger11 = AnimElemtime(28) >= 0 && animelemtime(29) < 0
trigger12 = AnimElemtime(33) >= 0 && animelemtime(34) < 0
trigger13 = AnimElemtime(35) >= 0 && animelemtime(36) < 0
trigger14 = AnimElemtime(38) >= 0 && animelemtime(39) < 0
trigger15 = AnimElemtime(40) >= 0 && animelemtime(41) < 0
trigger16 = AnimElemtime(43) >= 0 && animelemtime(44) < 0
trigger17 = AnimElemtime(45) >= 0 && animelemtime(46) < 0
trigger18 = AnimElemtime(48) >= 0 && animelemtime(49) < 0
trigger19 = AnimElemtime(50) >= 0 && animelemtime(51) < 0
trigger20 = AnimElemtime(53) >= 0 && animelemtime(54) < 0
trigger21 = AnimElemtime(55) >= 0 && animelemtime(56) < 0
trigger22 = AnimElemtime(58) >= 0 && animelemtime(59) < 0
trigger23 = AnimElemtime(60) >= 0 && animelemtime(61) < 0
trigger24 = AnimElemtime(63) >= 0 && animelemtime(64) < 0
trigger25 = AnimElemtime(68) >= 0 && animelemtime(69) < 0
trigger26 = AnimElemtime(70) >= 0 && animelemtime(71) < 0
trigger27 = AnimElemtime(73) >= 0 && animelemtime(74) < 0
trigger28 = AnimElemtime(75) >= 0 && animelemtime(76) < 0
trigger29 = AnimElemtime(78) >= 0 && animelemtime(79) < 0
trigger30 = AnimElemtime(80) >= 0 && animelemtime(81) < 0
trigger31 = AnimElemtime(83) >= 0 && animelemtime(84) < 0
trigger32 = AnimElemtime(85) >= 0 && animelemtime(86) < 0
trigger33 = AnimElemtime(88) >= 0 && animelemtime(89) < 0
trigger34 = AnimElemtime(90) >= 0 && animelemtime(91) < 0
trigger35 = AnimElemtime(93) >= 0 && animelemtime(94) < 0
trigger36 = AnimElemtime(95) >= 0 && animelemtime(96) < 0
trigger37 = AnimElemtime(98) >= 0 && animelemtime(99) < 0
trigger38 = AnimElemtime(100) >= 0 && animelemtime(101) < 0
trigger39 = AnimElemtime(103) >= 0 && animelemtime(104) < 0
trigger40 = AnimElemtime(105) >= 0 && animelemtime(106) < 0
trigger41 = AnimElemtime(108) >= 0 && animelemtime(109) < 0
trigger42 = AnimElemtime(110) >= 0 && animelemtime(111) < 0
trigger43 = AnimElemtime(113) >= 0 && animelemtime(114) < 0
trigger44 = AnimElemtime(115) >= 0 && animelemtime(116) < 0
trigger45 = AnimElemtime(118) >= 0 && animelemtime(119) < 0
trigger46 = AnimElemtime(120) >= 0 && animelemtime(121) < 0
trigger47 = AnimElemtime(123) >= 0 && animelemtime(124) < 0
trigger48 = AnimElemtime(125) >= 0 && animelemtime(126) < 0
trigger49 = AnimElemtime(128) >= 0 && animelemtime(129) < 0
trigger50 = AnimElemtime(133) >= 0 && animelemtime(134) < 0
trigger51 = AnimElemtime(135) >= 0 && animelemtime(136) < 0
trigger52 = AnimElemtime(138) >= 0 && animelemtime(139) < 0
trigger53 = AnimElemtime(140) >= 0 && animelemtime(141) < 0
trigger54 = AnimElemtime(143) >= 0 && animelemtime(144) < 0
trigger55 = AnimElemtime(145) >= 0 && animelemtime(146) < 0
trigger56 = AnimElemtime(148) >= 0 && animelemtime(149) < 0
trigger57 = AnimElemtime(150) >= 0 && animelemtime(151) < 0
trigger58 = AnimElemtime(153) >= 0 && animelemtime(154) < 0
trigger59 = AnimElemtime(155) >= 0 && animelemtime(156) < 0
trigger60 = AnimElemtime(158) >= 0 && animelemtime(159) < 0
trigger61 = AnimElemtime(160) >= 0 && animelemtime(161) < 0
trigger62 = AnimElemtime(163) >= 0 && animelemtime(164) < 0
trigger63 = AnimElemtime(168) >= 0 && animelemtime(169) < 0
trigger64 = AnimElemtime(170) >= 0 && animelemtime(171) < 0
trigger65 = AnimElemtime(173) >= 0 && animelemtime(174) < 0
attr = S, HA
damage = floor(400*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17001+(var(31)*10000)
sparkxy = -10, -44
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13-(var(32));s2, 6
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 3200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 15000

[State 220,2]
type = ChangeState
triggerall = anim = 3202
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 1300, ChangeAnim];Change To Shoot
type = ChangeState
trigger1 = anim = 3201 && animelemtime(1)>= 0
trigger2 = anim = 3231 && animelemtime(1)>= 0
triggerall = var(4) = 2
value = 3210

;Projectile Shield
[Statedef 3203]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 0
anim = 3203

[State 9100,BindToRoot]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,anim != 3201
trigger1 = root,anim != 3231 

;SDM Bit 1
[Statedef 3205]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 4
juggle = 10

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 0, Front]
type = SprPriority
trigger1 = animelem = 8
trigger2 = animelem = 22
trigger3 = animelem = 36
trigger4 = animelem = 50
value = 4

[State 0, Back]
type = SprPriority
trigger1 = animelem = 15
trigger2 = animelem = 29
trigger3 = animelem = 43
trigger4 = animelem = 57
value = -4


;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Effects
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit = 1 && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 68
trigger3 = animelem = 139
value = 1000,7
channel = 5

;OH MY GOODNESS

[State 2000, BindToRoot]
type = BindToRoot
trigger1 = 1
pos = var(0),var(1)
time = 1

[State 1005, I REFUSE TO DIE BY YOUR HAND]
type = Null
trigger1 = animelemtime(1) = 0 && var(0) := 1
trigger2 = animelemtime(2) = 0 && var(0) := 2
trigger3 = animelemtime(3) = 0 && var(0) := 3
trigger4 = animelemtime(4) = 0 && var(0) := 4
trigger5 = animelemtime(5) = 0 && var(0) := 3
trigger6 = animelemtime(6) = 0 && var(0) := 3
trigger7 = animelemtime(7) = 0 && var(0) := 1
trigger8 = animelemtime(8) = 0 && var(0) := 1;0
trigger9 = animelemtime(9) = 0 && var(0) := -3
trigger10 = animelemtime(10) = 0 && var(0) := -6
trigger11 = animelemtime(11) = 0 && var(0) := -9
trigger12 = animelemtime(12) = 0 && var(0) := -12
trigger13 = animelemtime(13) = 0 && var(0) := -15
trigger14 = animelemtime(14) = 0 && var(0) := -18
trigger15 = animelemtime(15) = 0 && var(0) := -21;
trigger16 = animelemtime(16) = 0 && var(0) := -22
trigger17 = animelemtime(17) = 0 && var(0) := -23
trigger18 = animelemtime(18) = 0 && var(0) := -23
trigger19 = animelemtime(19) = 0 && var(0) := -22
trigger20 = animelemtime(20) = 0 && var(0) := -20
trigger21 = animelemtime(21) = 0 && var(0) := -16
trigger22 = animelemtime(22) = 0 && var(0) := -12
trigger23 = animelemtime(23) = 0 && var(0) := -7
trigger24 = animelemtime(24) = 0 && var(0) := 1;0
trigger25 = animelemtime(25) = 0 && var(0) := 6
trigger26 = animelemtime(26) = 0 && var(0) := 13;
trigger27 = animelemtime(27) = 0 && var(0) := 20
trigger28 = animelemtime(28) = 0 && var(0) := 27
trigger29 = animelemtime(29) = 0 && var(0) := 33
trigger30 = animelemtime(30) = 0 && var(0) := 38
trigger31 = animelemtime(31) = 0 && var(0) := 41
trigger32 = animelemtime(32) = 0 && var(0) := 44
trigger33 = animelemtime(33) = 0 && var(0) := 44;
trigger34 = animelemtime(34) = 0 && var(0) := 43
trigger35 = animelemtime(35) = 0 && var(0) := 40
trigger36 = animelemtime(36) = 0 && var(0) := 35
trigger37 = animelemtime(37) = 0 && var(0) := 28
trigger38 = animelemtime(38) = 0 && var(0) := 20
trigger39 = animelemtime(39) = 0 && var(0) := 10
trigger40 = animelemtime(40) = 0 && var(0) := 1;0
trigger41 = animelemtime(41) = 0 && var(0) := -11
trigger42 = animelemtime(42) = 0 && var(0) := -22
trigger43 = animelemtime(43) = 0 && var(0) := -33
trigger44 = animelemtime(44) = 0 && var(0) := -43
trigger45 = animelemtime(45) = 0 && var(0) := -52
trigger46 = animelemtime(46) = 0 && var(0) := -62
trigger47 = animelemtime(47) = 0 && var(0) := -64
trigger48 = animelemtime(48) = 0 && var(0) := -62
trigger49 = animelemtime(49) = 0 && var(0) := -59
trigger50 = animelemtime(50) = 0 && var(0) := -53
trigger51 = animelemtime(51) = 0 && var(0) := -45
trigger52 = animelemtime(52) = 0 && var(0) := -36
trigger53 = animelemtime(53) = 0 && var(0) := -25
trigger54 = animelemtime(54) = 0 && var(0) := -13
trigger55 = animelemtime(55) = 0 && var(0) := 1;0
trigger56 = animelemtime(56) = 0 && var(0) := 12
trigger57 = animelemtime(57) = 0 && var(0) := 24
trigger58 = animelemtime(58) = 0 && var(0) := 35
trigger59 = animelemtime(59) = 0 && var(0) := 44
trigger60 = animelemtime(60) = 0 && var(0) := 52
trigger61 = animelemtime(61) = 0 && var(0) := 58
trigger62 = animelemtime(62) = 0 && var(0) := 62
trigger63 = animelemtime(63) = 0 && var(0) := 63
trigger64 = animelemtime(64) = 0 && var(0) := 64
trigger65 = animelemtime(65) = 0 && var(0) := 58
trigger66 = animelemtime(66) = 0 && var(0) := 52
trigger67 = animelemtime(67) = 0 && var(0) := 44
trigger68 = animelemtime(68) = 0 && var(0) := 35
trigger69 = animelemtime(69) = 0 && var(0) := 24
trigger70 = animelemtime(70) = 0 && var(0) := 12
trigger71 = animelemtime(71) = 0 && var(0) := 1;0
trigger72 = animelemtime(72) = 0 && var(0) := -13
trigger73 = animelemtime(73) = 0 && var(0) := -25
trigger74 = animelemtime(74) = 0 && var(0) := -36
trigger75 = animelemtime(75) = 0 && var(0) := -45
trigger76 = animelemtime(76) = 0 && var(0) := -53
trigger77 = animelemtime(77) = 0 && var(0) := -59
trigger78 = animelemtime(78) = 0 && var(0) := -62
trigger79 = animelemtime(79) = 0 && var(0) := -64
trigger80 = animelemtime(80) = 0 && var(0) := -62
trigger81 = animelemtime(81) = 0 && var(0) := -59
trigger82 = animelemtime(82) = 0 && var(0) := -53
trigger83 = animelemtime(83) = 0 && var(0) := -45
trigger84 = animelemtime(84) = 0 && var(0) := -36
trigger85 = animelemtime(85) = 0 && var(0) := -25
trigger86 = animelemtime(86) = 0 && var(0) := -13
trigger87 = animelemtime(87) = 0 && var(0) := 1;0
trigger88 = animelemtime(88) = 0 && var(0) := 12
trigger89 = animelemtime(89) = 0 && var(0) := 24
trigger90 = animelemtime(90) = 0 && var(0) := 35
trigger91 = animelemtime(91) = 0 && var(0) := 44
trigger92 = animelemtime(92) = 0 && var(0) := 52
trigger93 = animelemtime(93) = 0 && var(0) := 58
trigger94 = animelemtime(94) = 0 && var(0) := 62
trigger95 = animelemtime(95) = 0 && var(0) := 63
trigger96 = animelemtime(96) = 0 && var(0) := 62
trigger97 = animelemtime(97) = 0 && var(0) := 58
trigger98 = animelemtime(98) = 0 && var(0) := 52
trigger99 = animelemtime(99) = 0 && var(0) := 44
trigger100 = animelemtime(100) = 0 && var(0) := 35
trigger101 = animelemtime(101) = 0 && var(0) := 24
trigger102 = animelemtime(102) = 0 && var(0) := 12
trigger103 = animelemtime(103) = 0 && var(0) := 1;0
trigger104 = animelemtime(104) = 0 && var(0) := -13
trigger105 = animelemtime(105) = 0 && var(0) := -25
trigger106 = animelemtime(106) = 0 && var(0) := -44
trigger107 = animelemtime(107) = 0 && var(0) := -51
trigger108 = animelemtime(108) = 0 && var(0) := -55
trigger109 = animelemtime(109) = 0 && var(0) := -57
trigger110 = animelemtime(110) = 0 && var(0) := -57
trigger111 = animelemtime(111) = 0 && var(0) := -54
trigger112 = animelemtime(112) = 0 && var(0) := -50
trigger113 = animelemtime(113) = 0 && var(0) := -44
trigger114 = animelemtime(114) = 0 && var(0) := -36
trigger115 = animelemtime(115) = 0 && var(0) := -28
trigger116 = animelemtime(116) = 0 && var(0) := -19
trigger117 = animelemtime(117) = 0 && var(0) := -9
trigger118 = animelemtime(118) = 0 && var(0) := 1;0
trigger119 = animelemtime(119) = 0 && var(0) := 8
trigger120 = animelemtime(120) = 0 && var(0) := 16
trigger121 = animelemtime(121) = 0 && var(0) := 23
trigger122 = animelemtime(122) = 0 && var(0) := 28
trigger123 = animelemtime(123) = 0 && var(0) := 32
trigger124 = animelemtime(124) = 0 && var(0) := 34
trigger125 = animelemtime(125) = 0 && var(0) := 35
trigger126 = animelemtime(126) = 0 && var(0) := 34
trigger127 = animelemtime(127) = 0 && var(0) := 32
trigger128 = animelemtime(128) = 0 && var(0) := 29
trigger129 = animelemtime(129) = 0 && var(0) := 25
trigger130 = animelemtime(130) = 0 && var(0) := 20
trigger131 = animelemtime(131) = 0 && var(0) := 15
trigger132 = animelemtime(132) = 0 && var(0) := 10
trigger133 = animelemtime(133) = 0 && var(0) := 4
trigger134 = animelemtime(134) = 0 && var(0) := 1;0
trigger135 = animelemtime(135) = 0 && var(0) := -5
trigger136 = animelemtime(136) = 0 && var(0) := -8
trigger137 = animelemtime(137) = 0 && var(0) := -11
trigger138 = animelemtime(138) = 0 && var(0) := -13
trigger139 = animelemtime(139) = 0 && var(0) := -14
ignorehitpause = 1

[State 1005, YURIAAAAAAAAAAAAA]
type = Null
trigger1 = animelemtime(1) = 0 && var(1) := -66
trigger2 = animelemtime(2) = 0 && var(1) := -67
trigger3 = animelemtime(3) = 0 && var(1) := -68
trigger4 = animelemtime(4) = 0 && var(1) := -69
trigger5 = animelemtime(5) = 0 && var(1) := -70;
trigger6 = animelemtime(6) = 0 && var(1) := -69
trigger7 = animelemtime(7) = 0 && var(1) := -69
trigger8 = animelemtime(8) = 0 && var(1) := -67
trigger9 = animelemtime(9) = 0 && var(1) := -65;
trigger10 = animelemtime(10) = 0 && var(1) := -62
trigger11 = animelemtime(11) = 0 && var(1) := -58
trigger12 = animelemtime(12) = 0 && var(1) := -54;
trigger13 = animelemtime(13) = 0 && var(1) := -50;
trigger14 = animelemtime(14) = 0 && var(1) := -46
trigger15 = animelemtime(15) = 0 && var(1) := -43
trigger16 = animelemtime(16) = 0 && var(1) := -40
trigger17 = animelemtime(17) = 0 && var(1) := -37
trigger18 = animelemtime(18) = 0 && var(1) := -37
trigger19 = animelemtime(19) = 0 && var(1) := -37
trigger20 = animelemtime(20) = 0 && var(1) := -38
trigger21 = animelemtime(21) = 0 && var(1) := -40
trigger22 = animelemtime(22) = 0 && var(1) := -45
trigger23 = animelemtime(23) = 0 && var(1) := -50
trigger24 = animelemtime(24) = 0 && var(1) := -56
trigger25 = animelemtime(25) = 0 && var(1) := -63
trigger26 = animelemtime(26) = 0 && var(1) := -70
trigger27 = animelemtime(27) = 0 && var(1) := -79
trigger28 = animelemtime(28) = 0 && var(1) := -87
trigger29 = animelemtime(29) = 0 && var(1) := -95
trigger30 = animelemtime(30) = 0 && var(1) := -102
trigger31 = animelemtime(31) = 0 && var(1) := -107
trigger32 = animelemtime(32) = 0 && var(1) := -112
trigger33 = animelemtime(33) = 0 && var(1) := -115
trigger34 = animelemtime(34) = 0 && var(1) := -116
trigger35 = animelemtime(35) = 0 && var(1) := -114
trigger36 = animelemtime(36) = 0 && var(1) := -111
trigger37 = animelemtime(37) = 0 && var(1) := -105
trigger38 = animelemtime(38) = 0 && var(1) := -98
trigger39 = animelemtime(39) = 0 && var(1) := -89
trigger40 = animelemtime(40) = 0 && var(1) := -78
trigger41 = animelemtime(41) = 0 && var(1) := -66
trigger42 = animelemtime(42) = 0 && var(1) := -53
trigger43 = animelemtime(43) = 0 && var(1) := -41
trigger44 = animelemtime(44) = 0 && var(1) := -28
trigger45 = animelemtime(45) = 0 && var(1) := -16
trigger46 = animelemtime(46) = 0 && var(1) := 1;0
trigger47 = animelemtime(47) = 0 && var(1) := 5
trigger48 = animelemtime(48) = 0 && var(1) := 7
trigger49 = animelemtime(49) = 0 && var(1) := 6
trigger50 = animelemtime(50) = 0 && var(1) := 2
trigger51 = animelemtime(51) = 0 && var(1) := -4
trigger52 = animelemtime(52) = 0 && var(1) := -12
trigger53 = animelemtime(53) = 0 && var(1) := -23
trigger54 = animelemtime(54) = 0 && var(1) := -35
trigger55 = animelemtime(55) = 0 && var(1) := -49
trigger56 = animelemtime(56) = 0 && var(1) := -62
trigger57 = animelemtime(57) = 0 && var(1) := -76
trigger58 = animelemtime(58) = 0 && var(1) := -89
trigger59 = animelemtime(59) = 0 && var(1) := -101
trigger60 = animelemtime(60) = 0 && var(1) := -113
trigger61 = animelemtime(61) = 0 && var(1) := -121
trigger62 = animelemtime(62) = 0 && var(1) := -128
trigger63 = animelemtime(63) = 0 && var(1) := -133
trigger64 = animelemtime(64) = 0 && var(1) := -135
trigger65 = animelemtime(65) = 0 && var(1) := -134
trigger66 = animelemtime(66) = 0 && var(1) := -130
trigger67 = animelemtime(67) = 0 && var(1) := -124
trigger68 = animelemtime(68) = 0 && var(1) := -116
trigger69 = animelemtime(69) = 0 && var(1) := -105
trigger70 = animelemtime(70) = 0 && var(1) := -93
trigger71 = animelemtime(71) = 0 && var(1) := -80
trigger72 = animelemtime(72) = 0 && var(1) := -66
trigger73 = animelemtime(73) = 0 && var(1) := -52
trigger74 = animelemtime(74) = 0 && var(1) := -39
trigger75 = animelemtime(75) = 0 && var(1) := -27
trigger76 = animelemtime(76) = 0 && var(1) := -15
trigger77 = animelemtime(77) = 0 && var(1) := -7
trigger78 = animelemtime(78) = 0 && var(1) := 1;0
trigger79 = animelemtime(79) = 0 && var(1) := 5
trigger80 = animelemtime(80) = 0 && var(1) := 7
trigger81 = animelemtime(81) = 0 && var(1) := 6
trigger82 = animelemtime(82) = 0 && var(1) := 2
trigger83 = animelemtime(83) = 0 && var(1) := -4
trigger84 = animelemtime(84) = 0 && var(1) := -12
trigger85 = animelemtime(85) = 0 && var(1) := -23
trigger86 = animelemtime(86) = 0 && var(1) := -35
trigger87 = animelemtime(87) = 0 && var(1) := -49
trigger88 = animelemtime(88) = 0 && var(1) := -62
trigger89 = animelemtime(89) = 0 && var(1) := -76
trigger90 = animelemtime(90) = 0 && var(1) := -89
trigger91 = animelemtime(91) = 0 && var(1) := -101
trigger92 = animelemtime(92) = 0 && var(1) := -113
trigger93 = animelemtime(93) = 0 && var(1) := -121
trigger94 = animelemtime(94) = 0 && var(1) := -128
trigger95 = animelemtime(95) = 0 && var(1) := -133
trigger96 = animelemtime(96) = 0 && var(1) := -135
trigger97 = animelemtime(97) = 0 && var(1) := -134
trigger98 = animelemtime(98) = 0 && var(1) := -130
trigger99 = animelemtime(99) = 0 && var(1) := -124
trigger100 = animelemtime(100) = 0 && var(1) := -116
trigger101 = animelemtime(101) = 0 && var(1) := -105
trigger102 = animelemtime(102) = 0 && var(1) := -93
trigger103 = animelemtime(103) = 0 && var(1) := -80
trigger104 = animelemtime(104) = 0 && var(1) := -66
trigger105 = animelemtime(105) = 0 && var(1) := -52
trigger106 = animelemtime(106) = 0 && var(1) := -27
trigger107 = animelemtime(107) = 0 && var(1) := -18
trigger108 = animelemtime(108) = 0 && var(1) := -10
trigger109 = animelemtime(109) = 0 && var(1) := -5
trigger110 = animelemtime(110) = 0 && var(1) := -2
trigger111 = animelemtime(111) = 0 && var(1) := -3
trigger112 = animelemtime(112) = 0 && var(1) := -4
trigger113 = animelemtime(113) = 0 && var(1) := -9
trigger114 = animelemtime(114) = 0 && var(1) := -16
trigger115 = animelemtime(115) = 0 && var(1) := -23
trigger116 = animelemtime(116) = 0 && var(1) := -32
trigger117 = animelemtime(117) = 0 && var(1) := -43
trigger118 = animelemtime(118) = 0 && var(1) := -53
trigger119 = animelemtime(119) = 0 && var(1) := -63
trigger120 = animelemtime(120) = 0 && var(1) := -72
trigger121 = animelemtime(121) = 0 && var(1) := -81
trigger122 = animelemtime(122) = 0 && var(1) := -87
trigger123 = animelemtime(123) = 0 && var(1) := -93
trigger124 = animelemtime(124) = 0 && var(1) := -98
trigger125 = animelemtime(125) = 0 && var(1) := -101
trigger126 = animelemtime(126) = 0 && var(1) := -101
trigger127 = animelemtime(127) = 0 && var(1) := -101
trigger128 = animelemtime(128) = 0 && var(1) := -99
trigger129 = animelemtime(129) = 0 && var(1) := -96
trigger130 = animelemtime(130) = 0 && var(1) := -92
trigger131 = animelemtime(131) = 0 && var(1) := -86
trigger132 = animelemtime(132) = 0 && var(1) := -81
trigger133 = animelemtime(133) = 0 && var(1) := -76
trigger134 = animelemtime(134) = 0 && var(1) := -70
trigger135 = animelemtime(135) = 0 && var(1) := -65
trigger136 = animelemtime(136) = 0 && var(1) := -60
trigger137 = animelemtime(137) = 0 && var(1) := -57
trigger138 = animelemtime(138) = 0 && var(1) := -54
ignorehitpause = 1

;Hitdef
[State 230, 1]
type = hitdef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [2,140])
attr = , HA
damage = floor((ifelse(root,var(15),400,308))*ifelse(root,var(56),1.25,1)),10
animtype = D
air.animtype = D
ground.type = low
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = 19,-9
guard.velocity = -11.1796875
air.type = High
air.velocity = 19,-9
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall.recovertime = 120
hitonce = 1
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
p2stateno = 10250
ID = 3000

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit
trigger1 = numtarget(3000)
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

;End
[State 1000, DestroySelf]
type = ChangeState
trigger1 = animtime = 0
trigger2 = root,anim = 3202
trigger3 = root,anim = 3252
value = 3006

[State 1000, DestroySelf]
type = ChangeState
trigger1 = root,stateno = 3210
trigger2 = root,stateno = 3260
value = 3020

[State 8200, Destroy]
type = DestroySelf
trigger1 = root,stateno != 3200
trigger1 = root,stateno != 3250

;SDM Bit 2 
[Statedef 3207]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = -4
juggle = 10

[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 10
movetype = A

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 0, back]
type = SprPriority
trigger1 = animelem = 8
trigger2 = animelem = 22
trigger3 = animelem = 36
trigger4 = animelem = 50
value = -4

[State 0, front]
type = SprPriority
trigger1 = animelem = 15
trigger2 = animelem = 29
trigger3 = animelem = 43
trigger4 = animelem = 57
value = 4

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit = 1 && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

;OH MY GOODNESS

[State 2000, BindToRoot]
type = BindToRoot
trigger1 = 1
pos = var(0)-4,var(1)+4
time = 1

[State 1005, Kenshiro...FAREWELL]
type = Null
trigger1 = animelemtime(1) = 0 && var(0) := -1
trigger2 = animelemtime(2) = 0 && var(0) := -2
trigger3 = animelemtime(3) = 0 && var(0) := -3
trigger4 = animelemtime(4) = 0 && var(0) := -4
trigger5 = animelemtime(5) = 0 && var(0) := -3
trigger6 = animelemtime(6) = 0 && var(0) := -3
trigger7 = animelemtime(7) = 0 && var(0) := -1
trigger8 = animelemtime(8) = 0 && var(0) := -1;0
trigger9 = animelemtime(9) = 0 && var(0) := 3
trigger10 = animelemtime(10) = 0 && var(0) := 6
trigger11 = animelemtime(11) = 0 && var(0) := 9
trigger12 = animelemtime(12) = 0 && var(0) := 12
trigger13 = animelemtime(13) = 0 && var(0) := 15
trigger14 = animelemtime(14) = 0 && var(0) := 18
trigger15 = animelemtime(15) = 0 && var(0) := 21;
trigger16 = animelemtime(16) = 0 && var(0) := 22
trigger17 = animelemtime(17) = 0 && var(0) := 23
trigger18 = animelemtime(18) = 0 && var(0) := 23
trigger19 = animelemtime(19) = 0 && var(0) := 22
trigger20 = animelemtime(20) = 0 && var(0) := 20
trigger21 = animelemtime(21) = 0 && var(0) := 16
trigger22 = animelemtime(22) = 0 && var(0) := 12
trigger23 = animelemtime(23) = 0 && var(0) := 7
trigger24 = animelemtime(24) = 0 && var(0) := -1;0
trigger25 = animelemtime(25) = 0 && var(0) := -6
trigger26 = animelemtime(26) = 0 && var(0) := -13;
trigger27 = animelemtime(27) = 0 && var(0) := -20
trigger28 = animelemtime(28) = 0 && var(0) := -27
trigger29 = animelemtime(29) = 0 && var(0) := -33
trigger30 = animelemtime(30) = 0 && var(0) := -38
trigger31 = animelemtime(31) = 0 && var(0) := -41
trigger32 = animelemtime(32) = 0 && var(0) := -44
trigger33 = animelemtime(33) = 0 && var(0) := -44;
trigger34 = animelemtime(34) = 0 && var(0) := -43
trigger35 = animelemtime(35) = 0 && var(0) := -40
trigger36 = animelemtime(36) = 0 && var(0) := -35
trigger37 = animelemtime(37) = 0 && var(0) := -28
trigger38 = animelemtime(38) = 0 && var(0) := -20
trigger39 = animelemtime(39) = 0 && var(0) := -10
trigger40 = animelemtime(40) = 0 && var(0) := -1;0
trigger41 = animelemtime(41) = 0 && var(0) := 11
trigger42 = animelemtime(42) = 0 && var(0) := 22
trigger43 = animelemtime(43) = 0 && var(0) := 33
trigger44 = animelemtime(44) = 0 && var(0) := 43
trigger45 = animelemtime(45) = 0 && var(0) := 52
trigger46 = animelemtime(46) = 0 && var(0) := 62
trigger47 = animelemtime(47) = 0 && var(0) := 64
trigger48 = animelemtime(48) = 0 && var(0) := 62
trigger49 = animelemtime(49) = 0 && var(0) := 59
trigger50 = animelemtime(50) = 0 && var(0) := 53
trigger51 = animelemtime(51) = 0 && var(0) := 45
trigger52 = animelemtime(52) = 0 && var(0) := 36
trigger53 = animelemtime(53) = 0 && var(0) := 25
trigger54 = animelemtime(54) = 0 && var(0) := 13
trigger55 = animelemtime(55) = 0 && var(0) := -1;0
trigger56 = animelemtime(56) = 0 && var(0) := -12
trigger57 = animelemtime(57) = 0 && var(0) := -24
trigger58 = animelemtime(58) = 0 && var(0) := -35
trigger59 = animelemtime(59) = 0 && var(0) := -44
trigger60 = animelemtime(60) = 0 && var(0) := -52
trigger61 = animelemtime(61) = 0 && var(0) := -58
trigger62 = animelemtime(62) = 0 && var(0) := -62
trigger63 = animelemtime(63) = 0 && var(0) := -63
trigger64 = animelemtime(64) = 0 && var(0) := -64
trigger65 = animelemtime(65) = 0 && var(0) := -58
trigger66 = animelemtime(66) = 0 && var(0) := -52
trigger67 = animelemtime(67) = 0 && var(0) := -44
trigger68 = animelemtime(68) = 0 && var(0) := -35
trigger69 = animelemtime(69) = 0 && var(0) := -24
trigger70 = animelemtime(70) = 0 && var(0) := -12
trigger71 = animelemtime(71) = 0 && var(0) := -1;0
trigger72 = animelemtime(72) = 0 && var(0) := 13
trigger73 = animelemtime(73) = 0 && var(0) := 25
trigger74 = animelemtime(74) = 0 && var(0) := 36
trigger75 = animelemtime(75) = 0 && var(0) := 45
trigger76 = animelemtime(76) = 0 && var(0) := 53
trigger77 = animelemtime(77) = 0 && var(0) := 59
trigger78 = animelemtime(78) = 0 && var(0) := 62
trigger79 = animelemtime(79) = 0 && var(0) := 64
trigger80 = animelemtime(80) = 0 && var(0) := 62
trigger81 = animelemtime(81) = 0 && var(0) := 59
trigger82 = animelemtime(82) = 0 && var(0) := 53
trigger83 = animelemtime(83) = 0 && var(0) := 45
trigger84 = animelemtime(84) = 0 && var(0) := 36
trigger85 = animelemtime(85) = 0 && var(0) := 25
trigger86 = animelemtime(86) = 0 && var(0) := 13
trigger87 = animelemtime(87) = 0 && var(0) := -1;0
trigger88 = animelemtime(88) = 0 && var(0) := -12
trigger89 = animelemtime(89) = 0 && var(0) := -24
trigger90 = animelemtime(90) = 0 && var(0) := -35
trigger91 = animelemtime(91) = 0 && var(0) := -44
trigger92 = animelemtime(92) = 0 && var(0) := -52
trigger93 = animelemtime(93) = 0 && var(0) := -58
trigger94 = animelemtime(94) = 0 && var(0) := -62
trigger95 = animelemtime(95) = 0 && var(0) := -63
trigger96 = animelemtime(96) = 0 && var(0) := -62
trigger97 = animelemtime(97) = 0 && var(0) := -58
trigger98 = animelemtime(98) = 0 && var(0) := -52
trigger99 = animelemtime(99) = 0 && var(0) := -44
trigger100 = animelemtime(100) = 0 && var(0) := -35
trigger101 = animelemtime(101) = 0 && var(0) := -24
trigger102 = animelemtime(102) = 0 && var(0) := -12
trigger103 = animelemtime(103) = 0 && var(0) := -1;0
trigger104 = animelemtime(104) = 0 && var(0) := 13
trigger105 = animelemtime(105) = 0 && var(0) := 25
trigger106 = animelemtime(106) = 0 && var(0) := 44
trigger107 = animelemtime(107) = 0 && var(0) := 51
trigger108 = animelemtime(108) = 0 && var(0) := 55
trigger109 = animelemtime(109) = 0 && var(0) := 57
trigger110 = animelemtime(110) = 0 && var(0) := 57
trigger111 = animelemtime(111) = 0 && var(0) := 54
trigger112 = animelemtime(112) = 0 && var(0) := 50
trigger113 = animelemtime(113) = 0 && var(0) := 44
trigger114 = animelemtime(114) = 0 && var(0) := 36
trigger115 = animelemtime(115) = 0 && var(0) := 28
trigger116 = animelemtime(116) = 0 && var(0) := 19
trigger117 = animelemtime(117) = 0 && var(0) := 9
trigger118 = animelemtime(118) = 0 && var(0) := -1;0
trigger119 = animelemtime(119) = 0 && var(0) := -8
trigger120 = animelemtime(120) = 0 && var(0) := -16
trigger121 = animelemtime(121) = 0 && var(0) := -23
trigger122 = animelemtime(122) = 0 && var(0) := -28
trigger123 = animelemtime(123) = 0 && var(0) := -32
trigger124 = animelemtime(124) = 0 && var(0) := -34
trigger125 = animelemtime(125) = 0 && var(0) := -35
trigger126 = animelemtime(126) = 0 && var(0) := -34
trigger127 = animelemtime(127) = 0 && var(0) := -32
trigger128 = animelemtime(128) = 0 && var(0) := -29
trigger129 = animelemtime(129) = 0 && var(0) := -25
trigger130 = animelemtime(130) = 0 && var(0) := -20
trigger131 = animelemtime(131) = 0 && var(0) := -15
trigger132 = animelemtime(132) = 0 && var(0) := -10
trigger133 = animelemtime(133) = 0 && var(0) := -4
trigger134 = animelemtime(134) = 0 && var(0) := -1;0
trigger135 = animelemtime(135) = 0 && var(0) := 5
trigger136 = animelemtime(136) = 0 && var(0) := 8
trigger137 = animelemtime(137) = 0 && var(0) := 11
trigger138 = animelemtime(138) = 0 && var(0) := 13
trigger139 = animelemtime(139) = 0 && var(0) := 14
ignorehitpause = 1

[State 1005, How did Yuria survive this fall...]
type = Null
trigger1 = animelemtime(1) = 0 && var(1) := -66
trigger2 = animelemtime(2) = 0 && var(1) := -67
trigger3 = animelemtime(3) = 0 && var(1) := -68
trigger4 = animelemtime(4) = 0 && var(1) := -69
trigger5 = animelemtime(5) = 0 && var(1) := -70;
trigger6 = animelemtime(6) = 0 && var(1) := -69
trigger7 = animelemtime(7) = 0 && var(1) := -69
trigger8 = animelemtime(8) = 0 && var(1) := -67
trigger9 = animelemtime(9) = 0 && var(1) := -65;
trigger10 = animelemtime(10) = 0 && var(1) := -62
trigger11 = animelemtime(11) = 0 && var(1) := -58
trigger12 = animelemtime(12) = 0 && var(1) := -54;
trigger13 = animelemtime(13) = 0 && var(1) := -50;
trigger14 = animelemtime(14) = 0 && var(1) := -46
trigger15 = animelemtime(15) = 0 && var(1) := -43
trigger16 = animelemtime(16) = 0 && var(1) := -40
trigger17 = animelemtime(17) = 0 && var(1) := -37
trigger18 = animelemtime(18) = 0 && var(1) := -37
trigger19 = animelemtime(19) = 0 && var(1) := -37
trigger20 = animelemtime(20) = 0 && var(1) := -38
trigger21 = animelemtime(21) = 0 && var(1) := -40
trigger22 = animelemtime(22) = 0 && var(1) := -45
trigger23 = animelemtime(23) = 0 && var(1) := -50
trigger24 = animelemtime(24) = 0 && var(1) := -56
trigger25 = animelemtime(25) = 0 && var(1) := -63
trigger26 = animelemtime(26) = 0 && var(1) := -70
trigger27 = animelemtime(27) = 0 && var(1) := -79
trigger28 = animelemtime(28) = 0 && var(1) := -87
trigger29 = animelemtime(29) = 0 && var(1) := -95
trigger30 = animelemtime(30) = 0 && var(1) := -102
trigger31 = animelemtime(31) = 0 && var(1) := -107
trigger32 = animelemtime(32) = 0 && var(1) := -112
trigger33 = animelemtime(33) = 0 && var(1) := -115
trigger34 = animelemtime(34) = 0 && var(1) := -116
trigger35 = animelemtime(35) = 0 && var(1) := -114
trigger36 = animelemtime(36) = 0 && var(1) := -111
trigger37 = animelemtime(37) = 0 && var(1) := -105
trigger38 = animelemtime(38) = 0 && var(1) := -98
trigger39 = animelemtime(39) = 0 && var(1) := -89
trigger40 = animelemtime(40) = 0 && var(1) := -78
trigger41 = animelemtime(41) = 0 && var(1) := -66
trigger42 = animelemtime(42) = 0 && var(1) := -53
trigger43 = animelemtime(43) = 0 && var(1) := -41
trigger44 = animelemtime(44) = 0 && var(1) := -28
trigger45 = animelemtime(45) = 0 && var(1) := -16
trigger46 = animelemtime(46) = 0 && var(1) := 1;0
trigger47 = animelemtime(47) = 0 && var(1) := 5
trigger48 = animelemtime(48) = 0 && var(1) := 7
trigger49 = animelemtime(49) = 0 && var(1) := 6
trigger50 = animelemtime(50) = 0 && var(1) := 2
trigger51 = animelemtime(51) = 0 && var(1) := -4
trigger52 = animelemtime(52) = 0 && var(1) := -12
trigger53 = animelemtime(53) = 0 && var(1) := -23
trigger54 = animelemtime(54) = 0 && var(1) := -35
trigger55 = animelemtime(55) = 0 && var(1) := -49
trigger56 = animelemtime(56) = 0 && var(1) := -62
trigger57 = animelemtime(57) = 0 && var(1) := -76
trigger58 = animelemtime(58) = 0 && var(1) := -89
trigger59 = animelemtime(59) = 0 && var(1) := -101
trigger60 = animelemtime(60) = 0 && var(1) := -113
trigger61 = animelemtime(61) = 0 && var(1) := -121
trigger62 = animelemtime(62) = 0 && var(1) := -128
trigger63 = animelemtime(63) = 0 && var(1) := -133
trigger64 = animelemtime(64) = 0 && var(1) := -135
trigger65 = animelemtime(65) = 0 && var(1) := -134
trigger66 = animelemtime(66) = 0 && var(1) := -130
trigger67 = animelemtime(67) = 0 && var(1) := -124
trigger68 = animelemtime(68) = 0 && var(1) := -116
trigger69 = animelemtime(69) = 0 && var(1) := -105
trigger70 = animelemtime(70) = 0 && var(1) := -93
trigger71 = animelemtime(71) = 0 && var(1) := -80
trigger72 = animelemtime(72) = 0 && var(1) := -66
trigger73 = animelemtime(73) = 0 && var(1) := -52
trigger74 = animelemtime(74) = 0 && var(1) := -39
trigger75 = animelemtime(75) = 0 && var(1) := -27
trigger76 = animelemtime(76) = 0 && var(1) := -15
trigger77 = animelemtime(77) = 0 && var(1) := -7
trigger78 = animelemtime(78) = 0 && var(1) := 1;0
trigger79 = animelemtime(79) = 0 && var(1) := 5
trigger80 = animelemtime(80) = 0 && var(1) := 7
trigger81 = animelemtime(81) = 0 && var(1) := 6
trigger82 = animelemtime(82) = 0 && var(1) := 2
trigger83 = animelemtime(83) = 0 && var(1) := -4
trigger84 = animelemtime(84) = 0 && var(1) := -12
trigger85 = animelemtime(85) = 0 && var(1) := -23
trigger86 = animelemtime(86) = 0 && var(1) := -35
trigger87 = animelemtime(87) = 0 && var(1) := -49
trigger88 = animelemtime(88) = 0 && var(1) := -62
trigger89 = animelemtime(89) = 0 && var(1) := -76
trigger90 = animelemtime(90) = 0 && var(1) := -89
trigger91 = animelemtime(91) = 0 && var(1) := -101
trigger92 = animelemtime(92) = 0 && var(1) := -113
trigger93 = animelemtime(93) = 0 && var(1) := -121
trigger94 = animelemtime(94) = 0 && var(1) := -128
trigger95 = animelemtime(95) = 0 && var(1) := -133
trigger96 = animelemtime(96) = 0 && var(1) := -135
trigger97 = animelemtime(97) = 0 && var(1) := -134
trigger98 = animelemtime(98) = 0 && var(1) := -130
trigger99 = animelemtime(99) = 0 && var(1) := -124
trigger100 = animelemtime(100) = 0 && var(1) := -116
trigger101 = animelemtime(101) = 0 && var(1) := -105
trigger102 = animelemtime(102) = 0 && var(1) := -93
trigger103 = animelemtime(103) = 0 && var(1) := -80
trigger104 = animelemtime(104) = 0 && var(1) := -66
trigger105 = animelemtime(105) = 0 && var(1) := -52
trigger106 = animelemtime(106) = 0 && var(1) := -27
trigger107 = animelemtime(107) = 0 && var(1) := -18
trigger108 = animelemtime(108) = 0 && var(1) := -10
trigger109 = animelemtime(109) = 0 && var(1) := -5
trigger110 = animelemtime(110) = 0 && var(1) := -2
trigger111 = animelemtime(111) = 0 && var(1) := -3
trigger112 = animelemtime(112) = 0 && var(1) := -4
trigger113 = animelemtime(113) = 0 && var(1) := -9
trigger114 = animelemtime(114) = 0 && var(1) := -16
trigger115 = animelemtime(115) = 0 && var(1) := -23
trigger116 = animelemtime(116) = 0 && var(1) := -32
trigger117 = animelemtime(117) = 0 && var(1) := -43
trigger118 = animelemtime(118) = 0 && var(1) := -53
trigger119 = animelemtime(119) = 0 && var(1) := -63
trigger120 = animelemtime(120) = 0 && var(1) := -72
trigger121 = animelemtime(121) = 0 && var(1) := -81
trigger122 = animelemtime(122) = 0 && var(1) := -87
trigger123 = animelemtime(123) = 0 && var(1) := -93
trigger124 = animelemtime(124) = 0 && var(1) := -98
trigger125 = animelemtime(125) = 0 && var(1) := -101
trigger126 = animelemtime(126) = 0 && var(1) := -101
trigger127 = animelemtime(127) = 0 && var(1) := -101
trigger128 = animelemtime(128) = 0 && var(1) := -99
trigger129 = animelemtime(129) = 0 && var(1) := -96
trigger130 = animelemtime(130) = 0 && var(1) := -92
trigger131 = animelemtime(131) = 0 && var(1) := -86
trigger132 = animelemtime(132) = 0 && var(1) := -81
trigger133 = animelemtime(133) = 0 && var(1) := -76
trigger134 = animelemtime(134) = 0 && var(1) := -70
trigger135 = animelemtime(135) = 0 && var(1) := -65
trigger136 = animelemtime(136) = 0 && var(1) := -60
trigger137 = animelemtime(137) = 0 && var(1) := -57
trigger138 = animelemtime(138) = 0 && var(1) := -54
ignorehitpause = 1

;Hitdef
[State 230, 1]
type = hitdef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [2,140])
attr = , HA
damage = floor((ifelse(root,var(15),400,308))*ifelse(root,var(56),1.25,1)),10
animtype = D
air.animtype = D
ground.type = low
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = 19,-9
guard.velocity = -11.1796875
air.type = High
air.velocity = 19,-9
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall.recovertime = 120
hitonce = 1
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
p2stateno = 10250
ID = 3000

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10000)),(17502+(root,var(31)*10000))))
ID = 1020
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 22, ceil(p2dist x), 22)),-7
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 4
shadow = 0,0,0
ownpal = 1
persistent = 0

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit
trigger1 = numtarget(3000)
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

;End
[State 1000, DestroySelf]
type = ChangeState
trigger1 = animtime = 0
trigger2 = root,anim = 3202
trigger3 = root,anim = 3252
value = 3008

[State 1000, DestroySelf]
type = ChangeState
trigger1 = root,stateno = 3210
trigger2 = root,stateno = 3260
value = 3021

[State 8200, Destroy]
type = DestroySelf
trigger1 = root,stateno != 3200
trigger1 = root,stateno != 3250

;Crystal Shot
[Statedef 3210]
type    = S                     
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3210
poweradd=  0                      
sprpriority = 2 
velset=0,0

;============== Buffering
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 5
value = ifelse((helper(10371), var(0) = [1,3]),0,1) 
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),4,16)

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,28]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = !time
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*6)
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
Trigger1 = !time
anim = 15300-(var(31)*200)
pos = -13,-139
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
Trigger1 = !time
anim = 15301-(var(31)*200)
pos = -13,-139
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3210 
trigger1 = animelemtime(30) < 0
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3210 && !animtime
value = anim+1

[State 1001, end]
type = ChangeAnim
triggerall = anim = 3211 && animelemtime(1)>0
trigger1 = !animtime
trigger2 = !var(5) && command != "hold_x" 
trigger3 = var(5) && command != "hold_y" 
value = ifelse(var(5),3213,3212)

[State 1000, VarSet]
type = VarSet
trigger1 = anim = 3212 && animelem = 1
trigger2 = anim = 3213 && animelem = 1
v = 5
value = ifelse(anim = 3212,0,1)
;==============Helpers 
[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3212
trigger1 = animelemtime(4) < 0
trigger2 = anim = 3213
trigger2 = animelemtime(4) < 0
value = SCA

[State 1000: Helper]
type = helper
trigger1 = anim = 3210 && animelem = 59
helpertype = Normal
id = 3215
pos = -12, -136 ;50
postype = p1
facing = 1
stateno = 3214
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
triggerall = anim = 3212 || anim = 3213
trigger1 = animelem = 1
value = 200,10
channel = 0

[State 1000, 1]
type = PlaySnd
triggerall = anim = 3212 || anim = 3213
trigger1 = animelem = 1
value = 1000,8

[State 220,2]
type = ChangeState
triggerall = anim = 3212 || anim = 3213
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 3214]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0
anim = 3214

[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 999
length = 4
palbright = 16,0,32;,136
palcontrast = 128,128,128;,136
paladd = 0,0,0
timegap = 2
framegap = 1
trans = add
ignorehitpause = 1
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = add1
ignorehitpause = 1

[State 1352, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 100, 1]
type = bindtoroot
trigger1 = root,stateno = 3010
pos = -12,-136
ignorehitpause = 1
[State 100, 1]
type = bindtoroot
trigger1 = root,stateno = 3060
pos = -12,-144
ignorehitpause = 1

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1100, VarSet]
type = VarSet
trigger1 = root,anim = 3212
trigger2 = root,anim = 3213
trigger3 = root,anim = 3262
var(5) = root,var(5)

[State 8200, Fly]
type = ChangeState
triggerall = root,stateno = 3210
trigger1 = root,anim = 3212 
trigger2 = root,anim = 3213 
value = 3215

[State 8200, Fly]
type = ChangeState
triggerall = root,stateno = 3260
trigger1 = root,anim = 3262
value = 3215

[State 8200, Destroy]
type = DestroySelf
trigger1 = parent,stateno != 3210
trigger1 = parent,stateno != 3260
trigger1 = parent,stateno != 3210
trigger1 = parent,stateno != 3260

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,6])
attr = , HA
damage = floor(25*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 0,14
guard.pausetime = 0,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;persistent = 0
p2stateno = 15000
id = 3000

[State 1000, Sound]
type = PlaySnd
trigger1 = Movehit = 1 && NumTarget
value = 1000,13
;persistent = 0

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit
trigger1 = numtarget(3000)
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit = 1 && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3000) && movehit
value = 15000
persistent = 0

[Statedef 3215]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0
juggle = 0

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3225
;=======================================;

[State 1000: Helper]
type = Helper
trigger1 = numhelper(3265) = 0
trigger1 = !time 
helpertype = Normal
name = "Projectile Guard"
id = 3265
pos = 50, 0 ;50
postype = p1
facing = 1
stateno = 3265
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 811, Anim]
Type = ChangeAnim
trigger1 = !time && prevstateno = 3214
Value = 3215

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, HP projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = stateno+1
time = -1
slot = 2
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(16) = 500
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = movehit
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State 100, 1]
type = posadd
trigger1 = animelem = 3 
x = ifelse(var(5)=0,1,ifelse(var(5)=1,1,2))	
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,6))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 4 
x = ifelse(var(5)=0,5,ifelse(var(5)=1,5,4))		
y = ifelse(var(5)=0,13,ifelse(var(5)=1,13,13))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,8,ifelse(var(5)=1,8,7))		
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,12))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,10,ifelse(var(5)=1,10,16))		
y = ifelse(var(5)=0,11,ifelse(var(5)=1,11,16))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 6
x = ifelse(var(5)=0,13,ifelse(var(5)=1,13,5))		
y = ifelse(var(5)=0,9,ifelse(var(5)=1,9,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 7
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,6,ifelse(var(5)=1,6,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 8
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,4,ifelse(var(5)=1,4,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 9
x = ifelse(var(5)=0,24,ifelse(var(5)=1,24,5))	
y = ifelse(var(5)=0,1,ifelse(var(5)=1,1,4))	
ignorehitpause = 1
[State 1500, VelSet]
type = VelSet
trigger1 = (animelemno(0) = [9,18])
x = ifelse(var(5)=0,7,ifelse(var(5)=1,7,7))	
y = ifelse(var(5)=0,0,ifelse(var(5)=1,-4,7))	

[State 100, 1]
type = veladd
triggerall = var(5) = 1
trigger1 = animelemtime(9) > 0
y = -.6

[State 1500, VelSet]
type = VelSet
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
x = 7
y = 0	
[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
y = -.7

[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y <= 0
trigger1 = animelemtime(9) > 0 
y = -.15

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State -2, ground combos]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck

;Hitdef
[State 210, 1]
type = HitDef
;triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,18])
attr = S, HP
damage = floor(167*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;persistent = 0
;p2stateno = 15400
id = 3000

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget && movehit
value = 15400
persistent = 0

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit = 1 && numtarget
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 8200, Destroy]
type = DestroySelf
trigger1 = frontedgedist < -10
ignorehitpause = 1

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= stateno
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1= movecontact && numtarget
value= stateno+1
ignorehitpause = 0
persistent = 0

[Statedef 3216]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
juggle = 0

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3226
;=======================================;


[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, HP projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = stateno+1
time = -1
slot = 2
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(16) = 500
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = movehit
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State 100, 1]
type = posadd
trigger1 = animelem = 3 
x = ifelse(var(5)=0,1,ifelse(var(5)=1,1,2))	
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,6))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 4 
x = ifelse(var(5)=0,5,ifelse(var(5)=1,5,4))		
y = ifelse(var(5)=0,13,ifelse(var(5)=1,13,13))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,8,ifelse(var(5)=1,8,7))		
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,12))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,10,ifelse(var(5)=1,10,16))		
y = ifelse(var(5)=0,11,ifelse(var(5)=1,11,16))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 6
x = ifelse(var(5)=0,13,ifelse(var(5)=1,13,5))		
y = ifelse(var(5)=0,9,ifelse(var(5)=1,9,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 7
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,6,ifelse(var(5)=1,6,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 8
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,4,ifelse(var(5)=1,4,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 9
x = ifelse(var(5)=0,24,ifelse(var(5)=1,24,5))	
y = ifelse(var(5)=0,1,ifelse(var(5)=1,1,4))	
ignorehitpause = 1
[State 1500, VelSet]
type = VelSet
trigger1 = (animelemno(0) = [9,18])
x = ifelse(var(5)=0,7,ifelse(var(5)=1,7,7))	
y = ifelse(var(5)=0,0,ifelse(var(5)=1,-4,7))	

[State 100, 1]
type = veladd
triggerall = var(5) = 1
trigger1 = animelemtime(9) > 0
y = -.6

[State 1500, VelSet]
type = VelSet
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
x = 7
y = 0	
[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
y = -.7

[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y <= 0
trigger1 = animelemtime(9) > 0 
y = -.15

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State -2, ground combos]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck

;Hitdef
[State 210, 1]
type = HitDef
;triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,18])
attr = , HA
damage = floor(75*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
id = 3000

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget && movehit
value = 15400
persistent = 0

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit = 1 && numtarget
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 8200, Destroy]
type = DestroySelf
trigger1 = frontedgedist < -10
ignorehitpause = 1

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= stateno
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1= movecontact && numtarget
value= stateno+1
ignorehitpause = 0
persistent = 0

[Statedef 3217]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
juggle = 0

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3227
;=======================================;

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, HP projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = stateno+1
time = -1
slot = 2
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(16) = 500
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = movehit
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State 100, 1]
type = posadd
trigger1 = animelem = 3 
x = ifelse(var(5)=0,1,ifelse(var(5)=1,1,2))	
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,6))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 4 
x = ifelse(var(5)=0,5,ifelse(var(5)=1,5,4))		
y = ifelse(var(5)=0,13,ifelse(var(5)=1,13,13))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,8,ifelse(var(5)=1,8,7))		
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,12))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,10,ifelse(var(5)=1,10,16))		
y = ifelse(var(5)=0,11,ifelse(var(5)=1,11,16))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 6
x = ifelse(var(5)=0,13,ifelse(var(5)=1,13,5))		
y = ifelse(var(5)=0,9,ifelse(var(5)=1,9,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 7
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,6,ifelse(var(5)=1,6,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 8
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,4,ifelse(var(5)=1,4,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 9
x = ifelse(var(5)=0,24,ifelse(var(5)=1,24,5))	
y = ifelse(var(5)=0,1,ifelse(var(5)=1,1,4))	
ignorehitpause = 1
[State 1500, VelSet]
type = VelSet
trigger1 = (animelemno(0) = [9,18])
x = ifelse(var(5)=0,7,ifelse(var(5)=1,7,7))	
y = ifelse(var(5)=0,0,ifelse(var(5)=1,-4,7))	

[State 100, 1]
type = veladd
triggerall = var(5) = 1
trigger1 = animelemtime(9) > 0
y = -.6

[State 1500, VelSet]
type = VelSet
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
x = 7
y = 0	
[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
y = -.7

[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y <= 0
trigger1 = animelemtime(9) > 0 
y = -.15

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State -2, ground combos]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck

;Hitdef
[State 210, 1]
type = HitDef
trigger1 = (animelemno(0) = [1,18])
attr = , HA
damage = floor(33*ifelse(var(56),1.25,1)),0
animtype = D
air.animtype = D
ground.type = low
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = 19,-9
guard.velocity = -11.1796875
air.type = High
air.velocity = 19,-9
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall.recovertime = 120
hitonce = 1
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
;p2stateno = 10250
id = 3001

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget && movehit
value = 10250
persistent = 0

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit = 1 && numtarget
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 8200, Destroy]
type = DestroySelf
trigger1 = frontedgedist < -10
ignorehitpause = 1

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= stateno
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1= movecontact && numtarget
value= stateno+1
ignorehitpause = 0
persistent = 0

[Statedef 3218]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3216
sprpriority = 4

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0

[State 3303, Explod]
type = Explod
triggerall = prevstateno = 3217
triggerall = numtarget
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

[Statedef 3225]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
velset = 0,0
juggle = 0

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3215
;=======================================;

[State 811, Anim]
Type = ChangeAnim
trigger1 = !time && prevstateno = 3214
Value = 3215

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, HP projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = 3218
time = -1
slot = 2
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(16) = 500
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = movehit
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State 100, 1]
type = posadd
trigger1 = animelem = 3 
x = ifelse(var(5)=0,1,ifelse(var(5)=1,1,2))	
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,6))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 4 
x = ifelse(var(5)=0,5,ifelse(var(5)=1,5,4))		
y = ifelse(var(5)=0,13,ifelse(var(5)=1,13,13))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,8,ifelse(var(5)=1,8,7))		
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,12))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,10,ifelse(var(5)=1,10,16))		
y = ifelse(var(5)=0,11,ifelse(var(5)=1,11,16))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 6
x = ifelse(var(5)=0,13,ifelse(var(5)=1,13,5))		
y = ifelse(var(5)=0,9,ifelse(var(5)=1,9,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 7
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,6,ifelse(var(5)=1,6,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 8
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,4,ifelse(var(5)=1,4,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 9
x = ifelse(var(5)=0,24,ifelse(var(5)=1,24,5))	
y = ifelse(var(5)=0,1,ifelse(var(5)=1,1,4))	
ignorehitpause = 1
[State 1500, VelSet]
type = VelSet
trigger1 = (animelemno(0) = [9,18])
x = ifelse(var(5)=0,7,ifelse(var(5)=1,7,7))	
y = ifelse(var(5)=0,0,ifelse(var(5)=1,-4,7))	

[State 100, 1]
type = veladd
triggerall = var(5) = 1
trigger1 = animelemtime(9) > 0
y = -.6

[State 1500, VelSet]
type = VelSet
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
x = 7
y = 0	
[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
y = -.7

[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y <= 0
trigger1 = animelemtime(9) > 0 
y = -.15

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State -2, ground combos]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck

;Hitdef
[State 210, 1]
type = HitDef
affectteam = F
;triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,18])
attr = S, HP
damage = floor(167*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;persistent = 0
;p2stateno = 15400
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time && prevstateno != 3225
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;

[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget && movehit
value = 15400
persistent = 0

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit = 1 && numtarget
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 8200, Destroy]
type = DestroySelf
trigger1 = frontedgedist < -10
ignorehitpause = 1

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse((numhelper(1005)=1),stateno,3226)
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1= movecontact && numtarget
value= stateno+1
ignorehitpause = 0
persistent = 0

[Statedef 3226]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
juggle = 0

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3216
;=======================================;


[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, HP projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = 3218
time = -1
slot = 2
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(16) = 500
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = movehit
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State 100, 1]
type = posadd
trigger1 = animelem = 3 
x = ifelse(var(5)=0,1,ifelse(var(5)=1,1,2))	
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,6))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 4 
x = ifelse(var(5)=0,5,ifelse(var(5)=1,5,4))		
y = ifelse(var(5)=0,13,ifelse(var(5)=1,13,13))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,8,ifelse(var(5)=1,8,7))		
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,12))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,10,ifelse(var(5)=1,10,16))		
y = ifelse(var(5)=0,11,ifelse(var(5)=1,11,16))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 6
x = ifelse(var(5)=0,13,ifelse(var(5)=1,13,5))		
y = ifelse(var(5)=0,9,ifelse(var(5)=1,9,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 7
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,6,ifelse(var(5)=1,6,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 8
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,4,ifelse(var(5)=1,4,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 9
x = ifelse(var(5)=0,24,ifelse(var(5)=1,24,5))	
y = ifelse(var(5)=0,1,ifelse(var(5)=1,1,4))	
ignorehitpause = 1
[State 1500, VelSet]
type = VelSet
trigger1 = (animelemno(0) = [9,18])
x = ifelse(var(5)=0,7,ifelse(var(5)=1,7,7))	
y = ifelse(var(5)=0,0,ifelse(var(5)=1,-4,7))	

[State 100, 1]
type = veladd
triggerall = var(5) = 1
trigger1 = animelemtime(9) > 0
y = -.6

[State 1500, VelSet]
type = VelSet
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
x = 7
y = 0	
[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
y = -.7

[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y <= 0
trigger1 = animelemtime(9) > 0 
y = -.15

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State -2, ground combos]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck

;Hitdef
[State 210, 1]
type = HitDef
affectteam = F
;triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,18])
attr = , HA
damage = floor(75*ifelse(var(56),1.25,1)),0
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
animtype = up
air.animtype = up
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7;.25
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time && prevstateno != 3225
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;

[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget && movehit
value = 15400
persistent = 0

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit = 1 && numtarget
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 8200, Destroy]
type = DestroySelf
trigger1 = frontedgedist < -10
ignorehitpause = 1

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse((numhelper(1005)=1),stateno,3227)
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1= movecontact && numtarget
value= stateno+1
ignorehitpause = 0
persistent = 0

[Statedef 3227]
type    = A
movetype = A
physics = N
ctrl = 0
sprpriority = 4
juggle = 0

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3217
;=======================================;

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, HP projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = 3218
time = -1
slot = 2
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = movehit && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(16) = 500
ignorehitpause = 1
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1

[State 3303, Explod]
type = Explod
triggerall = numtarget
trigger1 = movehit
trigger1 = target, movetype = H 
trigger1 = target, statetype = L
anim = 12531
pos = 0,0
postype = p2  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0

[State 100, 1]
type = posadd
trigger1 = animelem = 3 
x = ifelse(var(5)=0,1,ifelse(var(5)=1,1,2))	
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,6))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 4 
x = ifelse(var(5)=0,5,ifelse(var(5)=1,5,4))		
y = ifelse(var(5)=0,13,ifelse(var(5)=1,13,13))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,8,ifelse(var(5)=1,8,7))		
y = ifelse(var(5)=0,14,ifelse(var(5)=1,14,12))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 5
x = ifelse(var(5)=0,10,ifelse(var(5)=1,10,16))		
y = ifelse(var(5)=0,11,ifelse(var(5)=1,11,16))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 6
x = ifelse(var(5)=0,13,ifelse(var(5)=1,13,5))		
y = ifelse(var(5)=0,9,ifelse(var(5)=1,9,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 7
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,6,ifelse(var(5)=1,6,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 8
x = ifelse(var(5)=0,15,ifelse(var(5)=1,15,5))		
y = ifelse(var(5)=0,4,ifelse(var(5)=1,4,5))	
ignorehitpause = 1
[State 100, 1]
type = posadd
trigger1 = animelem = 9
x = ifelse(var(5)=0,24,ifelse(var(5)=1,24,5))	
y = ifelse(var(5)=0,1,ifelse(var(5)=1,1,4))	
ignorehitpause = 1
[State 1500, VelSet]
type = VelSet
trigger1 = (animelemno(0) = [9,18])
x = ifelse(var(5)=0,7,ifelse(var(5)=1,7,7))	
y = ifelse(var(5)=0,0,ifelse(var(5)=1,-4,7))	

[State 100, 1]
type = veladd
triggerall = var(5) = 1
trigger1 = animelemtime(9) > 0
y = -.6

[State 1500, VelSet]
type = VelSet
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
x = 7
y = 0	
[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y > 0
trigger1 = animelemtime(9) > 0 
y = -.7

[State 100, 1]
type = veladd
triggerall = var(5) = 2
triggerall = Pos Y > -38
triggerall = Vel Y <= 0
trigger1 = animelemtime(9) > 0 
y = -.15

[State 9000, Assert]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State -2, ground combos]
type = AssertSpecial
trigger1 = 1
flag = NoJuggleCheck

;Hitdef
[State 210, 1]
type = HitDef
affectteam = F
trigger1 = (animelemno(0) = [1,18])
attr = , HA
damage = floor(33*ifelse(var(56),1.25,1)),0
animtype = D
air.animtype = D
ground.type = low
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s27007
sparkxy = -10, -7
hitsound = s4,18
guardsound = s3+(root,var(32)*2), 13-(root,var(32));s2, 7
guard.sparkno = s17502+(var(31)*10000)
pausetime = 1,14
guard.pausetime = 1,14
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 17
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = 19,-9
guard.velocity = -11.1796875
air.type = High
air.velocity = 19,-9
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall.recovertime = 120
hitonce = 1
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
;p2stateno = 10250
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time && prevstateno != 3225
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;

[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget && movehit
value = 10250
persistent = 0

[State 1000: Helper]
type = Helper
triggerall = numhelper(247)
trigger1 = movehit = 1 && numtarget
helpertype = Normal
name = "Small Expl"
id = 12520
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 12520
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID

[State 8200, Destroy]
type = DestroySelf
trigger1 = frontedgedist < -10
ignorehitpause = 1

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse((numhelper(1005)=1),stateno,3218)
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1= movecontact && numtarget
value= 3218
ignorehitpause = 0
persistent = 0

;Shining Crystal Bit SDM (AIR)
[Statedef 3250]
type    = A                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3250
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
facep2 = 1

;============== Buffering
[State 1600, VarSet]
type = VarSet
trigger1 = !time
trigger1 = Helper(10371),cond(1,var(42):=0,0) || e ;Reset command
trigger1 = Helper(10371),cond(1,var(0):=0,0) || e ;Reset command
trigger1 = Helper(10371),cond(1,var(1):=0,0) || e ;Reset command
var(4) = 0

[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
trigger1 = numhelper(10371)
trigger1 = helper(10371), var(26)
var(4) = 1


[State 1600, VarSet]
type = VarSet
trigger1 = time > 0
triggerall = numhelper(10371)
triggerall = helper(10371), Var(22)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3])
var(4) = 2

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*6)
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15300-(var(31)*200)
pos = 0,-88
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15301-(var(31)*200)
pos = 0,-88
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3250
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3250 
value = ifelse((var(15)),3231,3251)

[State 1300, ChangeAnim];Command Cancel
type = ChangeAnim
triggerall = var(4) = 1
trigger1 = anim = 3251 && animelemtime(1)>= 0
trigger2 = anim = 3231 && animelemtime(1)>= 0
value = 3252

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3251 || anim = 3231
value = 3252

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 3252 
value = 3253

;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(15) = ifelse((random <= 125),1,0)

;============== Vels && Movement
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 3253 && animelem = 1
x = 0
y = 0 

[State 1030, 1]
type = VelAdd
trigger1 = anim = 3253 && animelemtime(1) > 0 
Y = 0.375
;==============Helpers 
[State 1000: Helper]
type = Helper
triggerall = anim = 3250
trigger1 = animelemtime(30) = 0
helpertype = Normal
name = "Crystal Bit 1"
id = 3205
pos = 1, -66 ;50
postype = p1
facing = 1
stateno = 3205
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0  
[State 1000: Helper]
type = Helper
triggerall = anim = 3250
trigger1 = animelemtime(30) = 0
helpertype = Normal
name = "Crystal Bit 2"
id = 3205
pos = 1, -66 ;50
postype = p1
facing = 1
stateno = 3207
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0 

[State 1000: Helper]
type = helper
trigger1 = anim = 3251 || anim = 3281
trigger1 = animelemtime(1) = 0
helpertype = Normal
id = 3253
pos = 0, 0
postype = p1
facing = 1
stateno = 3253
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3250
trigger1 = animelem = 1
value = 200,9
channel = 0

;==============Hitdef
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3251  
trigger1 = AnimElemtime(3) >= 0 && animelemtime(4) < 0
trigger2 = AnimElemtime(5) >= 0 && animelemtime(6) < 0
trigger3 = AnimElemtime(8) >= 0 && animelemtime(9) < 0
trigger4 = AnimElemtime(10) >= 0 && animelemtime(11) < 0
trigger5 = AnimElemtime(13) >= 0 && animelemtime(14) < 0
trigger6 = AnimElemtime(15) >= 0 && animelemtime(16) < 0
trigger7 = AnimElemtime(18) >= 0 && animelemtime(19) < 0
trigger8 = AnimElemtime(20) >= 0 && animelemtime(21) < 0
trigger9 = AnimElemtime(23) >= 0 && animelemtime(24) < 0
trigger10 = AnimElemtime(25) >= 0 && animelemtime(26) < 0
trigger11 = AnimElemtime(28) >= 0 && animelemtime(29) < 0
trigger12 = AnimElemtime(33) >= 0 && animelemtime(34) < 0
trigger13 = AnimElemtime(35) >= 0 && animelemtime(36) < 0
trigger14 = AnimElemtime(38) >= 0 && animelemtime(39) < 0
trigger15 = AnimElemtime(40) >= 0 && animelemtime(41) < 0
trigger16 = AnimElemtime(43) >= 0 && animelemtime(44) < 0
trigger17 = AnimElemtime(45) >= 0 && animelemtime(46) < 0
trigger18 = AnimElemtime(48) >= 0 && animelemtime(49) < 0
trigger19 = AnimElemtime(50) >= 0 && animelemtime(51) < 0
trigger20 = AnimElemtime(53) >= 0 && animelemtime(54) < 0
trigger21 = AnimElemtime(55) >= 0 && animelemtime(56) < 0
trigger22 = AnimElemtime(58) >= 0 && animelemtime(59) < 0
trigger23 = AnimElemtime(60) >= 0 && animelemtime(61) < 0
trigger24 = AnimElemtime(63) >= 0 && animelemtime(64) < 0
trigger25 = AnimElemtime(68) >= 0 && animelemtime(69) < 0
trigger26 = AnimElemtime(70) >= 0 && animelemtime(71) < 0
trigger27 = AnimElemtime(73) >= 0 && animelemtime(74) < 0
trigger28 = AnimElemtime(75) >= 0 && animelemtime(76) < 0
trigger29 = AnimElemtime(78) >= 0 && animelemtime(79) < 0
trigger30 = AnimElemtime(80) >= 0 && animelemtime(81) < 0
trigger31 = AnimElemtime(83) >= 0 && animelemtime(84) < 0
trigger32 = AnimElemtime(85) >= 0 && animelemtime(86) < 0
trigger33 = AnimElemtime(88) >= 0 && animelemtime(89) < 0
trigger34 = AnimElemtime(90) >= 0 && animelemtime(91) < 0
trigger35 = AnimElemtime(93) >= 0 && animelemtime(94) < 0
trigger36 = AnimElemtime(95) >= 0 && animelemtime(96) < 0
trigger37 = AnimElemtime(98) >= 0 && animelemtime(99) < 0
trigger38 = AnimElemtime(100) >= 0 && animelemtime(101) < 0
trigger39 = AnimElemtime(103) >= 0 && animelemtime(104) < 0
trigger40 = AnimElemtime(105) >= 0 && animelemtime(106) < 0
trigger41 = AnimElemtime(108) >= 0 && animelemtime(109) < 0
trigger42 = AnimElemtime(110) >= 0 && animelemtime(111) < 0
trigger43 = AnimElemtime(113) >= 0 && animelemtime(114) < 0
trigger44 = AnimElemtime(115) >= 0 && animelemtime(116) < 0
trigger45 = AnimElemtime(118) >= 0 && animelemtime(119) < 0
trigger46 = AnimElemtime(120) >= 0 && animelemtime(121) < 0
trigger47 = AnimElemtime(123) >= 0 && animelemtime(124) < 0
trigger48 = AnimElemtime(125) >= 0 && animelemtime(126) < 0
trigger49 = AnimElemtime(128) >= 0 && animelemtime(129) < 0
trigger50 = AnimElemtime(133) >= 0 && animelemtime(134) < 0
trigger51 = AnimElemtime(135) >= 0 && animelemtime(136) < 0
trigger52 = AnimElemtime(138) >= 0 && animelemtime(139) < 0
trigger53 = AnimElemtime(140) >= 0 && animelemtime(141) < 0
trigger54 = AnimElemtime(143) >= 0 && animelemtime(144) < 0
trigger55 = AnimElemtime(145) >= 0 && animelemtime(146) < 0
trigger56 = AnimElemtime(148) >= 0 && animelemtime(149) < 0
trigger57 = AnimElemtime(150) >= 0 && animelemtime(151) < 0
trigger58 = AnimElemtime(153) >= 0 && animelemtime(154) < 0
trigger59 = AnimElemtime(155) >= 0 && animelemtime(156) < 0
trigger60 = AnimElemtime(158) >= 0 && animelemtime(159) < 0
trigger61 = AnimElemtime(160) >= 0 && animelemtime(161) < 0
trigger62 = AnimElemtime(163) >= 0 && animelemtime(164) < 0
trigger63 = AnimElemtime(168) >= 0 && animelemtime(169) < 0
trigger64 = AnimElemtime(170) >= 0 && animelemtime(171) < 0
trigger65 = AnimElemtime(173) >= 0 && animelemtime(174) < 0
attr = S, HA
damage = floor(308*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 13
guard.pausetime = 11,12
sparkno = s17001+(var(31)*10000)
sparkxy = -10, -44
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13-(var(32));s2, 6
guard.sparkno = s17501+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 3200
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
;persistent = 0
p2stateno = 15000

[State 1000, 6]
type = ChangeState
trigger1 = anim = 3253
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

[State 1300, ChangeAnim];Change To Shoot
type = ChangeState
trigger1 = anim = 3251 && animelemtime(1)>= 0
trigger2 = anim = 3231 && animelemtime(1)>= 0
triggerall = var(4) = 2
value = 3260

;Land
[Statedef 3251]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
facep2 = 1

;=============Anims and StateType
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3254

;============== Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;==============Effects

[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Projectile Shield
[Statedef 3253]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 0
anim = 3255

[State 9100,BindToRoot]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,anim != 3251
trigger1 = root,anim != 3281 

;Crystal Shot (AIR)
[Statedef 3260]
type    = A                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3260
poweradd=  0                     
sprpriority = 2 
velset=0,0

;============== Buffering
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 5
value = ifelse((helper(10371), var(0) = [1,3]),0,1) 
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = ifelse((helper(10371), var(0) = [1,3]),4,16)

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15300-(var(31)*200)
pos = -13,-144
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15301-(var(31)*200)
pos = -13,-144
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3260
trigger1 = animelemtime(30) < 0
value = SCA

;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3260 && !animtime
trigger2 = anim = 3262 && !animtime
value = anim+1

[State 1001, end]
type = ChangeAnim
triggerall = anim = 3261 && animelemtime(1)>0
trigger1 = !animtime
trigger2 = !var(5) && command != "hold_x" 
trigger3 = var(5) && command != "hold_y" 
value = 3262

[State 1000, VarSet]
type = VarSet
trigger1 = anim = 3262 && animelem = 1
v = 5
value = 2
;============== Vels && Movement
[State 1500, VelSet]
type = VelSet
trigger1 = anim = 3263 && animelem = 1
x = 0
y = 0 

[State 1030, 1]
type = VelAdd
trigger1 = anim = 3263 && animelemtime(1) > 0 
Y = 0.375
;==============Helpers 
[State 1000: Helper]
type = helper
trigger1 = anim = 3260 && animelem = 59
helpertype = Normal
id = 3215
pos = -12, -144 ;50
postype = p1
facing = 1
stateno = 3214
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3262
trigger1 = animelem = 1
value = 200,10
channel = 0
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3262
trigger1 = animelem = 1
value = 1000,8

[State 1000, 6]
type = ChangeState
trigger1 = anim = 3263
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0


;Land
[Statedef 3261]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
facep2 = 1

;=============Anims and StateType
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3264

;============== Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;==============Effects

[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;DM Projectile Shield
[Statedef 3265]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0,0
ownpal = 1
anim = 3017

[State 100, 1]
type = bindtoparent
trigger1 = parent,stateno = 3215
trigger2 = parent,stateno = 3216
trigger3 = parent,stateno = 3217
ignorehitpause = 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = numhelper(3215) = 0
trigger2 = helper(3215),stateno != 3215
trigger2 = helper(3215),stateno != 3216
trigger2 = helper(3215),stateno != 3217

;Phoenix Fang Arrow SDM
[Statedef 3300]
type    = A                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3300
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
facep2 = 1

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*6)
Pos = 14, -88
Darken = 0
UnHittAble = 1
poweradd = 0
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15300-(var(31)*200)
pos = -8,-96
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15301-(var(31)*200)
pos = -8,-96
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
triggerall = anim = 3300 
trigger1 = animelemtime(37) < 0
trigger2 = animelemtime(47) >= 0 && animelemtime(50) < 0
trigger3 = animelemtime(73) >= 0 && animelemtime(76) < 0
trigger4 = animelemtime(99) >= 0 && animelemtime(102) < 0
trigger5 = animelemtime(125) >= 0 && animelemtime(128) < 0
value = SCA

[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = 7
;============== Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = 3300
value = anim+1
;============== Vels && Movement
[State 1500, PosAdd]
type = PosAdd
trigger1 = anim = 3301 && animelem = 1
y = -32

[State 1500, VelSet] ; 33.75 degrees
type = VelSet
trigger1 = anim = 3301 && animelem = 1
x = 11*cos(0.58904862)
y = 11*sin(0.58904862)
;x = 9.1461334228515625
;y = 6.111297607421875 

[State 1000, 6]
type = PosAdd
triggerall = anim = 3301
trigger1 = Vel Y + Pos Y >= 0
x = vel x
;==============Helpers (OH BOY)
[State 1000: Helper]
type = helper
triggerall = anim = 3300
trigger1 = animelemtime(38) = 0
trigger2 = animelemtime(64) = 0
trigger3 = animelemtime(90) = 0
trigger4 = animelemtime(116) = 0
trigger5 = animelemtime(142) = 0
helpertype = Normal
id = 3305
pos = 8, -24 ;50
postype = p1
facing = 1
stateno = 3305
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
;==============Sounds and FX
[State 0, Explod]
type = Explod
triggerall = anim = 3301 
trigger1 = animelem = 1
anim = 3307
ID = 3100
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 5
ignorehitpause = 0
ownpal = 1
removetime = -1

[State 1000: Helper]
type = Helper
triggerall = anim = 3301 
trigger1 = animelem = 1
helpertype = Normal
id = 1409
pos = 0, 32 ;50
postype = p1
facing = 1
name = "Warp Effect"
stateno = 1409
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3300
trigger1 = animelem = 1
value = 200,11
channel = 0
[State 1000, 1]
type = PlaySnd
trigger1 = anim = 3301
trigger1 = animelem = 1
value = 200,12
channel = 0
persistent = 0

[State 3035, 1]
type = AfterImage
trigger1 = anim = 3301
trigger1 = AnimElem = 1, =4
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1
;==============Hitdefs
[State 210, 1]
type = HitDef
triggerall = anim = 3301 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = anim = 3301 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(4) >= 0 && animelemtime(6) < 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = anim = 3301 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(8) >= 0 && animelemtime(10) < 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = anim = 3301 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(12) >= 0 && animelemtime(14) < 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = anim = 3301 
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(16) >= 0 
attr = A, HA
damage = floor(92*ifelse(var(56),1.25,1)),8
animtype = u
air.animtype = u
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 3, 4
guard.pausetime = 3,4
sparkno = s17002+(var(31)*10000)
sparkxy = 0,-2
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -4.5,-7
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
fall = 1
id = 1000
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 10400

[State 1000, 6]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0


;Land
[Statedef 3301]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;facep2 = 1

;=============Anims and StateType
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3302

;============== Vels && Movement
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1500, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 7.6455993652343745
[State 1500, VelMul] 
type = VelMul
trigger1 = animelemtime(1)> 0
x = 0.835938

;==============Effects
[State 1000, remove fx]
type = RemoveExplod
trigger1 = !time
ID = 3100

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 3108
ID = 3101
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 5
ignorehitpause = 0
ownpal = 1


[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;================================================================================
;DIAGUP HIT SHAKE
[Statedef 10250]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1352, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 10200, Anim];Custom animation
type = ChangeAnim
trigger1 = selfanimexist(5052)
trigger1 = !time
value = 5052
[State 10200, Anim];No Custom animation
type = ChangeAnim
trigger1 = !selfanimexist(5052)
trigger1 = !time
value = 5030
[State 10200, Anim];loop
type = ChangeAnim
triggerall = anim = [5030,5052]
trigger1 = HitShakeOver != 1
value = anim

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 10900, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 10251

;================================================================================
;DIAGUP HIT FLYING 
[Statedef 10251]
type    = A
movetype= H
physics = N

[State 1352, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 10100, Anim]
type = ChangeAnim
triggerall = anim = 5030
trigger1 = !time 
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5052
trigger1 = (GetHitVar(animtype) = [0,3]) && time = 13 
value = 5050
persistent = 0

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = 5052
trigger1 = (GetHitVar(animtype) = [4,5]) && time = 25
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 10900, 1]
type = HitVelSet
trigger1 = !time
y = 1
[State 10900, 1]
type = VelSet
trigger1 = time < 6
x = ifelse((facing=enemynear,facing),((abs(gethitvar(xvel))*exp((-0.20763936477824450161544104426739)*(time+1)))),(-(abs(gethitvar(xvel))*exp((-0.20763936477824450161544104426739)*(time+1)))))

[State 10900, VelMul]
type = VelAdd
trigger1 = time > 0
y = GetHitVar(yaccel)

[State 5050, 4] ;Recover near ground
type = SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -30
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

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

[State 10900, Hit ground]
type = ChangeState
trigger1 = (GetHitVar(animtype) = [4,5])
trigger1 = Vel Y + Pos Y >= 0
value = 10202

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 10900, Hit ground]
type = SelfState
trigger1 = Vel Y + Pos Y >= 0
value = 5100

; Stand get-hit (shaking)
[Statedef 15000]
type    = S
movetype= H
physics = N
velset = 0,0

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 15001 ;Stand get-hit (knocked back)

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 15030

;---------------------------------------------------------------------------
; Stand get-hit (knocked back)
[Statedef 15001]
type    = S
movetype= H
physics = S

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = SelfState
trigger1 = HitOver
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Crouch get-hit (shaking)
[Statedef 15010]
type    = C
movetype= H
physics = N
velset = 0,0

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5010, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 5010, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5010, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5010, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5010, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
triggerall = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 15011 ;Crouch get-hit (knocked back)

[State 5010, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 15030

[State 5010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; Crouch get-hit (knocked back)
[Statedef 15011]
type    = C
movetype= H
physics = C

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5011, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

[State 5011, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5011, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5011, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5011, 6]
type = SelfState
trigger1 = HitOver
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Air get-hit (shaking)
[Statedef 15020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 15030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; Air get-hit (knocked away)
[Statedef 15030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5030, 1]
type = ChangeAnim
trigger1 = Anim != [5000, 5199]
trigger1 = SelfAnimExist(5030)
value = 5030

[State 5030, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 3]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 4]
type = SelfState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= Const(movement.air.gethit.groundlevel)
value = 5040 ;HITA_RECOV

[State 5030, 5]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= Const(movement.air.gethit.groundlevel)
value = 15050 ;HITA_FALL

[State 5030, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 15035 ;Air get-hit (transition)

;---------------------------------------------------------------------------
; Air get-hit (transition)
[Statedef 15035]
type    = A
movetype= H
physics = N

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 3]
type = SelfState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= Const(movement.air.gethit.groundlevel)
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;Air get-hit (recovering in air, not falling)

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= Const(movement.air.gethit.groundlevel)
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 15050 ;Air get-hit (falling)

;---------------------------------------------------------------------------
; Air get-hit (falling)
[Statedef 15050]
type    = A
movetype= H
physics = N

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, Const720p(4), Const720p(-8))
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 4] ;Recover near ground
type = SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= Const(movement.air.gethit.groundrecover.ground.threshold)
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;Air get-hit (fall recovery on ground)

[State 5050, 6]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, Const(movement.air.gethit.groundlevel))
value = 5100 ;Downed get-hit (hit ground from fall)

; Stand get-hit (shaking)
[Statedef 15100]
type    = S
movetype= H
physics = N
velset = 0,0

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 15101 ;Stand get-hit (knocked back)

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 15130

;---------------------------------------------------------------------------
; Stand get-hit (knocked back)
[Statedef 15101]
type    = S
movetype= H
physics = S

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = SelfState
trigger1 = HitOver
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Crouch get-hit (shaking)
[Statedef 15110]
type    = C
movetype= H
physics = N
velset = 0,0

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5010, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 5010, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5010, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5010, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5010, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
triggerall = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 15111 ;Crouch get-hit (knocked back)

[State 5010, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 15130

[State 5010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; Crouch get-hit (knocked back)
[Statedef 15111]
type    = C
movetype= H
physics = C

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5011, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

[State 5011, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5011, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5011, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5011, 6]
type = SelfState
trigger1 = HitOver
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Air get-hit (shaking)
[Statedef 15120]
type    = A
movetype= H
physics = N
velset = 0,0

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 15030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; Air get-hit (knocked away)
[Statedef 15130]
type    = A
movetype= H
physics = N
ctrl = 0

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5030, 1]
type = ChangeAnim
trigger1 = Anim != [5000, 5199]
trigger1 = SelfAnimExist(5030)
value = 5030

[State 5030, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 3]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 4]
type = SelfState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= Const(movement.air.gethit.groundlevel)
value = 5040 ;HITA_RECOV

[State 5030, 5]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= Const(movement.air.gethit.groundlevel)
value = 15050 ;HITA_FALL

[State 5030, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 15035 ;Air get-hit (transition)

;---------------------------------------------------------------------------
; Air get-hit (transition)
[Statedef 15135]
type    = A
movetype= H
physics = N

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 3]
type = SelfState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= Const(movement.air.gethit.groundlevel)
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;Air get-hit (recovering in air, not falling)

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= Const(movement.air.gethit.groundlevel)
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 15050 ;Air get-hit (falling)

;---------------------------------------------------------------------------
; Air get-hit (falling)
[Statedef 15150]
type    = A
movetype= H
physics = N

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, Const720p(4), Const720p(-8))
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 4] ;Recover near ground
type = SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= Const(movement.air.gethit.groundrecover.ground.threshold)
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;Air get-hit (fall recovery on ground)

[State 5050, 6]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, Const(movement.air.gethit.groundlevel))
value = 5100 ;Downed get-hit (hit ground from fall)

[Statedef 15400]
type = U
physics = N
movetype = H
ctrl = 0
velset = 0,0
facep2 = 1

[State 321321, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 1,1,1
sinadd = 96,96,96,4
mul = 256,256,256
invertall = 1
color = 64
persistent = 2

[State 1023, Air]
type = StateTypeSet
trigger1 = pos y >= 0
statetype = S
physics = N

[State 0, HitFallSet]
type = HitFallSet
trigger1 = !HitShakeOver
trigger1 = pos y >= 0
value = 0

[State 0, PosSet]
type = posset
trigger1 = pos y >= 0
y = 0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 0, HitFallSet]
type = HitFallSet
trigger1 = HitShakeOver
value = 1
[State 5000, 7]
type = SelfState
trigger1 = HitShakeOver
value = 5030

;Fang Arrow Projectile
[Statedef 3305]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

[State 200, Punch Attempt Sound]
type = Playsnd
Trigger1 = !Time && !prevstateno 
value = 1000,9
persistent = 0

[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3305
ignorehitpause = 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1

[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
ignorehitpause = 1

[State 1050, VelSet] ;45 degrees and 37.5 degrees
type = VelSet
trigger1 = time = 1
x = 11*ifelse(root,var(15)=4,cos(0.785398),cos(0.58904862))
y = 11*ifelse(root,var(15)=4,sin(0.785398),sin(0.58904862))

;x = ifelse(root,var(15)=4,7.7781829833984375,9.1461334228515625)
;y = ifelse(root,var(15)=4,7.7781829833984375,6.111297607421875)

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1305
ID = 3105
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 5
ignorehitpause = 0
ownpal = 1
removetime = -1

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact = 1 && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10000)),(17502+(root,var(31)*10000))))
ID = 1000
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 4, ceil(p2dist x), 2)),-22
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
ignorehitpause = 1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(1) >= 0 && animelemtime(2) < 0
attr = , HA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,-2
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = high
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3305
nochainid = 3305
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(3) >= 0 && animelemtime(5) < 0
attr = , HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,-2
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3306
nochainid = 3306
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(6) >= 0 && animelemtime(8) < 0
attr = , HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,-2
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = high
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3307
nochainid = 3307
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(9) >= 0 && animelemtime(11) < 0
attr = , HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,-2
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3308
nochainid = 3308
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = AnimElemtime(12) >= 0 
attr = , HA
damage = floor(8*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0, 6
guard.pausetime = 0,6
sparkno = -1
sparkxy = 0,-2
hitsound = -1;s3+(root,var(32)*2),3
guardsound = s3+(root,var(32)*2), 13
guard.sparkno = -1
ground.type = high
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = 0
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3309
nochainid = 3309
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
Air.fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1

[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact = 1 && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,3,13)
ignorehitpause = 1
channel = 4

[State 13000, EnvColor]
type = EnvColor
trigger1 = Movehit = 1 && NumTarget
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1

[State 1000, 6]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

[Statedef 3306]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3106
sprpriority = 4

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1

[State 1000, remove fx]
type = RemoveExplod
trigger1 = !time
ID = 3105

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1306
ID = 3106
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 5
ignorehitpause = 0
ownpal = 1

[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0

[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;NEO Psycho Ball Revolution
[Statedef 3400]
type    = S                     
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
anim = 3400
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0

;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
v = 15
value = 1

;============== Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,28]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
trigger1 = !time 
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*4)
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = !time
anim = 15400+(var(31)*100)
pos = 2,-78
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = !time 
anim = 15401+(var(31)*100)
pos = 2,-78
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 29
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = !time
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1
ignorehitpause = 1
[State -2, Helper]
type = Helper
triggerall = !numhelper(40004) 
trigger1 = !time 
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 2000, 0]
type = NotHitBy
trigger1 = animelemtime(5) < 0
value = SCA

;============== Animations and Statetype
;==============Movement
[State 310, PosAdd]
type = PosAdd
trigger1 = animelem = 9
trigger2 = animelem = 10
trigger3 = animelem = 11
trigger4 = animelem = 12
x = -4

[State 310, PosAdd]
type = PosAdd
trigger1 = animelem = 13
trigger2 = animelem = 14
trigger3 = animelem = 15
x = -3

[State 310, PosAdd]
type = PosAdd
trigger1 = animelem = 16
trigger2 = animelem = 17
trigger3 = animelem = 18
x = -2

[State 310, PosAdd]
type = PosAdd
trigger1 = animelem = 19
trigger2 = animelem = 20
trigger3 = animelem = 21
trigger4 = animelem = 22
trigger5 = animelem = 23
trigger6 = animelem = 24
trigger7 = animelem = 25
trigger8 = animelem = 26
trigger9 = animelem = 27
x = -1

;==============Helpers 
[State 1000: Helper]
type = helper
trigger1 = animelem = 7
helpertype = Normal
id = 3401
pos = 0, 0 ;50
postype = p1
facing = 1
stateno = 3401
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0


[State 1000: Helper]
type = helper
trigger1 = animelem = 9
helpertype = Normal
id = 3405
pos = 54, -20 ;50
postype = p1
facing = 1
stateno = 3405
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0

[State 3303, Explod]
type = Explod
trigger1 = animelem = 9
anim = 12005
pos = 24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1
facing = -1
;==============Sounds and FX
[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 8
value = 200,10
channel = 0

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;NEO Psycho Ball Revolution FX
[Statedef 3401]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3401
sprpriority = 4
juggle = 10

;General
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Anims

;Effects
[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Bindings
[State 1415, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1

;End
[State 1000, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 3400
trigger2 = animtime = 0

;NEO Psycho Ball Revolution Projectile
[Statedef 3405]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = time >= 0
text = "var(10) = %d  vel y = %f yes = %f"
params = var(10),vel y,sin(pi*time/45)

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3407
;=======================================;

[State 1000: Helper]
type = Helper
trigger1 = numhelper(3465) = 0
trigger1 = !time 
helpertype = Normal
name = "Projectile Guard"
id = 3465
pos = 50, 0 ;50
postype = p1
facing = 1
stateno = 3465
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

;Variables

[State 1, Hitpoints];Gosh darn it
type = VarSet
trigger1 = !time && prevstateno != 3405
var(25) = 3
[State 1, Hitpoints];Decrease only when state loops back
type = VarAdd
trigger1 = !time && prevstateno = 3405
var(25) = -1

[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
[State 3405, VarSet]
type = VarSet
triggerall = Time
trigger1 = abs(Vel Y) = 5.5
var(17) = !var(17)
[State 3405, VelAdd]
type = VelAdd
trigger1 = Time
y = cond(Var(17),-0.5,0.5)

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,0)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet];Cornerpush
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time 
Value = 3405
ignorehitpause = 1

;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, HP
ignorehitpause = 1

[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, HP
stateno = 3406
time = -1
ignorehitpause = 1

;Sounds and Effects

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, Sound]
type = PlaySnd
trigger1 = !time && !prevstateno
value = 1000,12
persistent = 0
channel = 4

[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
channel = 4

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10000)),(17502+(root,var(31)*10000))))
ID = 1000
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 14, ceil(p2dist x), 14)),-60
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Hitdef

[State 210, 1]
type = HitDef
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,12])
attr = S, HP
damage = floor(300*ifelse(var(56),1.25,1)),0
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3405
p1sprpriority = 4

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget(3405) && movehit
value = 10400
persistent = 0
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40

;End
[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse(var(25)<=1,3406,3405)
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1= movecontact && numtarget
value= stateno+1
ignorehitpause = 0
persistent = 0

;Recovery
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

[Statedef 3406]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3406 
sprpriority = 4

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0

[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;NEO Psycho Ball Revolution Projectile REFLECTED
[Statedef 3407]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3405
;=======================================;
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1

[State 1005, VarSet]
type = VarSet
trigger1 = !time 
var(54) = 0
persistent = 0


;Variables

[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
[State 3405, VarSet]
type = VarSet
triggerall = Time
trigger1 = abs(Vel Y) = 5.5
var(17) = !var(17)
[State 3405, VelAdd]
type = VelAdd
trigger1 = Time
y = cond(Var(17),-0.5,0.5)

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
var(16) = ifelse(root,var(51),60,0)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet];Cornerpush
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time 
Value = 3405
ignorehitpause = 1

;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, NP,SP, AT
stateno = 3406
time = -1
ignorehitpause = 1

;Sounds and Effects

[State 1050, Trans]
type = Trans
trigger1 = 1;root, var(27)
trans = add1
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1000, Sound]
type = PlaySnd
trigger1 = !time && !prevstateno
value = 1000,12
persistent = 0
channel = 4


[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
channel = 4


[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10000)),(17502+(root,var(31)*10000))))
ID = 1000
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 14, ceil(p2dist x), 14)),-60
postype = p1
facing = -1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0

[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

;Hitdef

[State 210, 1]
type = HitDef
affectteam = F
guard.dist = 0
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,12])
attr = S, HP
damage = floor(300*ifelse(var(56),1.25,1)),0
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
p1sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time && prevstateno != stateno
[State 1007, Turn]
type = Turn
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
persistent = 0
ignorehitpause = 1 
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;

[State -2, P2 get hit]
type = TargetState
trigger1 = numtarget && movehit
value = 10400
persistent = 0
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40

;End
[State 1005, End]
type=changeState
trigger1 = movecontact && numtarget 
value= stateno-1
ignorehitpause = 0

[State 1005, End]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse((numhelper(1005)=1),stateno,3406)
ignorehitpause = 0

;Recovery
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1

;DM Projectile Shield
[Statedef 3465]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0,0
ownpal = 1
anim = 3407

[State 100, 1]
type = bindtoparent
trigger1 = parent,stateno = 3405
ignorehitpause = 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = numhelper(3405) = 0
trigger2 = helper(3405),stateno != 3406