; Constants and state file.
; There are comments scattered through this file, so you may like to
; take a look if would like to learn more about the cns.

[Data]
life = 1150			;Amount of life to start with
power = 9001		;Amount of maximum power
attack = 120		;attack power (more is stronger)
defence = 80		;defensive power (more is stronger)
fall.defence_up = 99	;Percentage to increase defense everytime player is knocked down
liedown.time = 60		;Time which player lies down for, before getting up
airjuggle = 99		;Number of points for juggling
sparkno = 2			;Default hit spark number for HitDefs
guard.sparkno = 0	;Default guard spark number
KO.echo = 0			;1 to enable echo on KO
volume = 255			;Volume offset (negative for softer)
IntPersistIndex = 60	;Variables with this index and above will not have their values
FloatPersistIndex = 40  ;reset to 0 between rounds or matches. There are 60 int variables,
  				;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
  				;If omitted, then it defaults to 60 and 40 for integer and float
  				;variables repectively, meaning that none are persistent, i.e. all
  				;are reset. If you want your variables to persist between matches,
  				;you need to override state 5900 from common1.cns.


[Size]
xscale = 1			;Horizontal scaling factor.
yscale = 1			;Vertical scaling factor.
ground.back = 15		;Player width (back, ground)
ground.front = 16		;Player width (front, ground)
air.back = 12		;Player width (back, air)
air.front = 12		;Player width (front, air)
height = 30			;Height of player (for opponent to jump over)
attack.dist = 160		;Default attack distance
proj.attack.dist = 90	;Default attack distance for projectiles
proj.doscale = 0		;Set to 1 to scale projectiles too
head.pos = -5, -90	;Approximate position of head
mid.pos = -5, -60		;Approximate position of midsection
shadowoffset = 0		;Number of pixels to vertically offset the shadow
draw.offset = 0,0		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2.6		;Walk forward
walk.back = -2.2		;Walk backward
run.fwd  = 4.6, 0		;Run forward (x, y)
run.back = -4.5,-3.8	;Hop backward (x, y)
jump.neu = 0,-8.4		;Neutral jumping velocity (x, y)
jump.back = -2.55		;Jump back Speed (x, y)
jump.fwd = 2.5		;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1;Running jump speeds (opt)
runjump.fwd = 4,-8.1	;.
airjump.neu = 0,-8.1	;.
airjump.back = -2.55	;Air jump speeds (opt)
airjump.fwd = 2.5		;.

[Movement]
airjump.num = 2		;Number of air jumps allowed (opt)
airjump.height = 35	;Minimum distance from ground before you can air jump (opt)
yaccel = .44		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .82	;Friction coefficient when crouching

[Quotes]
; Up to 100 victory quotes can be specified per language (victory0 - victory99)
victory1 = "You seem very strong, someday you will become a champion."
victory2 = "You are a decent fighter, but you lack the proper true power."
victory3 = "As a legendary dragon, I sense you might be able to unlock true power some day..."
victory4 = "Power is something not to be tampered with unless you really know how to handle it."
victory5 = "You think you can beat me in 1 second? Chances of that happening are 0%"
victory6 = "Your moves are too predictable, you need to practice your timing a bit more."
victory7 = "No one said I would go easy on you."

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...
;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
ctrl = 1

[State 10000]
type = AssertSpecial
trigger1 = name != "White Kyurem"
flag = invisible

[State 10000]
type = Projectile
trigger1 = ishelper
projanim = anim
projremove = 1
projremovetime = 1
affectteam = F
attr = A,HA
hitflag = MAFPD
P1stateno = prevstateno

[State 999]
type = changeanim2
trigger1 = ishelper
trigger1 = time > 0
value = 11600

[State 0, 1]
type = ChangeAnim
triggerall = name = "White Kyurem"
triggerall = Life > 250
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 11]
type = ChangeAnim
triggerall = name = "White Kyurem"
triggerall = Life <= 250
triggerall = palno = [1,6]
trigger1 = Anim != 11345 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 11345

[State ]
type = Explod
triggerall = name = "White Kyurem"
triggerall = palno = [1,6]
triggerall = numexplod(17172) = 0
trigger1 = life <= 250
trigger1 = animelem = 1
anim = 17172
ID = 17172
bindtime = -1
removetime = -1
pos = 33,-30
scale = .5,.5
sprpriority = 3
ownpal = 1

[State 0, 2]
type = VelSet
triggerall = name = "White Kyurem"
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
triggerall = name = "White Kyurem"
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = name = "White Kyurem"
trigger1 = !alive
value = 5050

[State 0]
type = statetypeset
trigger1 = name != "White Kyurem"
statetype = S
movetype = H
physics = N

[State 0]
type = ctrlset
trigger1 = name != "White Kyurem"
value = 0

[State ○○,○]
type = posset
trigger1 = name != "White Kyurem"
y = 9999

[State 0]
type = LifeAdd
trigger1 = name != "White Kyurem"
value = -999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
absolute = 1

[State ○○,○]
type = changestate
trigger1 = name != "White Kyurem"
trigger1 = !alive
value = 944

[State 0]
type = changestate
trigger1 = roundstate = 2
trigger1 = palno = 12
trigger1 = name = "White Kyurem"
value = 37564

[State ○○,○]
type = destroyself
trigger1 = time > 1
trigger2 = name = "White Kyurem"
;---------------------------------------------------------------------------
[statedef 24640]
movetype = I
ctrl = 1

[State 24640]
type = lifeadd
triggerall = palno = [1,6]
triggerall = name = "White Kyurem"
trigger1 = 1
value = lifemax
kill = 0
ignorehitpause = 1

[State 24640]
type = lifeadd
triggerall = palno = [11,12]
triggerall = name = "White Kyurem"
trigger1 = life < lifemax/4
value = lifemax/4
kill = 0
ignorehitpause = 1

[state 24640]
type = destroyself
trigger1 = ishelper
ignorehitpause = 1

[State 24640]
type = poweradd
trigger1 = name = "White Kyurem"
value = powermax
ignorehitpause = 1

[state 24640]
type = varset
trigger1 = 1
var(55) = gametime+123456789

[State 24640]
type = NotHitBy
trigger1 = !ishelper
trigger1 = time = 0
value = SCA,AA,AT,AP
time = 120

[state 24640]
type = selfstate
trigger1 = time >= 0
trigger1 = pos Y >= 0
value = 0
ctrl = 1

[state 24640]
type = selfstate
trigger1 = time >= 0
trigger1 = alive
trigger1 = pos Y < 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 170
value = 0,0
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
[Statedef 180]
type = S

[State 180, win]
type=changestate
trigger1= prevstateno=4312
value=4312

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = ifelse(random>500,181,9800)

;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

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

[State wait]
type = assertspecial
trigger1 = !ishelper
flag = roundnotover

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 180
value = 0,1
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State wait]
type = changestate
trigger1 = time = 80
value = 9800
;==========< BENNY HILL >==========
[Statedef 9800]
type = S
physics = N
anim = 9800
sprpriority = 1
ctrl = 0
[State wait]
type = assertspecial
trigger1 = !ishelper
flag = roundnotover



[State 9800]
type = changestate
trigger1 = time >= 45
value = 9801
[Statedef 9801]
type = S
physics = N
anim = 9801
sprpriority = 1
ctrl = 0
[State wait]
type = assertspecial
trigger1 = time < 255 && !ishelper
flag = roundnotover

[State 9801, Camera]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1
;[State 9801, Camera]
;type = helper
;trigger1 = !numhelper(7650) && !ishelper
;helpertype = normal
;stateno = 7650
;ID = 7650
;name = "Camera"
;postype = p1

[State 9800, snd]
type = playsnd
trigger1 = time = 180
value = S666, 28
channel = 9

[State 9800, snd]
type = playsnd
trigger1 = time = 40
value = S666, 29
channel = 9

[State 9801, FX]
type = helper
trigger1 = !time
helpertype = normal
name = "Possy"
stateno = 6180
postype = p1
pos = -480, 0
size.xscale = 1
size.yscale = 1
ownpal = 1

[State 9801, FX]
type = helper
trigger1 = !(time % 4)
trigger1 = time >= 180 && random < 750
helpertype = normal
name = "Possy"
stateno = 6181
postype = back
pos = -160, 0
size.xscale = 0.375 + (random / 2666.6)
size.yscale = 0.375 + (random / 2666.6)
ownpal = 1

[State 9801, fx]
type=helper
triggerall = roundstate = 4
trigger1= time = 140
helpertype = normal ;player
name="Homer"
stateno=6182
ID=6182
postype=p1
pos=-480,0
size.xscale=1
size.yscale=1
ownpal=1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 9801, fx]
type=helper
triggerall = roundstate = 4
trigger1= time = 160
helpertype = normal ;player
name="DIO"
stateno=6183
ID=6183
postype=p1
pos=-480,0
size.xscale=1
size.yscale=1
ownpal=1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 9801]
type = turn
trigger1 = time = 120
[State 9801]
type = velset
trigger1 = 1
x = 8

;---------------------------------------------------------------------------
; PREINTRO
;
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 2] ;Special intro for Dark Palette.
type = ChangeState
triggerall = Time = 0
trigger1 = palno = 11
value = 192

[State 190, 2] ;Special intro for Death Star palette.
type = ChangeState
triggerall = Time = 0
trigger1 = palno = 12
value = 193

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 191
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 190
value = 0,6
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 470
trigger1 = Anim = 190
value = 0,2
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 535
trigger1 = Anim = 190
value = 0,7
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[Statedef 192]
type = S
anim = 188
[State 188, intro]
type = assertspecial
trigger1 = 1
flag = intro

[State 188, selfstate]
type = changestate
trigger1 = ishelper(8901)
value = 10001

[State 188, I'll form the arms]
type = explod
trigger1 = animelemtime(2) = -40
anim = 6100
ID = 6100
sprpriority = 2
postype = p1
pos = -448, 0
vel = 16, 0
facing = -1
removetime = -animelemtime(2)
ownpal = 1
[State 188, I'll form the legs]
type = explod
trigger1 = animelemtime(2) = -40
anim = 6101
ID = 6101
sprpriority = 2
postype = p1
pos = 448, 0
vel = -16, 0
facing = 1
removetime = -animelemtime(2)
ownpal = 1

[State 188, Flash]
type = allpalfx
trigger1 = animelemtime(2) = -16
time = 4
add = 255, 255, 255
sinadd = -255, -255, -255, 16
[State 188, Flash]
type = bgpalfx
trigger1 = animelemtime(2) = [ -16, -1]
time = 1
color = 0

[State 188]
type = modifyexplod
trigger1 = animelemtime(2) = [ -16, 0]
ID = 6100
postype = p1
pos = (animelemtime(2) * 4)
facing = -1
[State 188]
type = modifyexplod
trigger1 = animelemtime(2) = [ -16, 0]
ID = 6101
postype = p1
pos = -(animelemtime(2) * 4)
facing = 1

[State 2300]
type = Explod
trigger1 = time = 65
anim = 3062
sprpriority = -4
postype = p1
pos = 0,-35
bindtime = -1
supermove = 1
under = 0
ownpal = 1

[State 2300]
type = helper
trigger1 = time = 65 ;|| time = 0 ;|| AnimElemTime(6) = 1 || AnimElemTime(7) = 14
id = 26380
persistent = 1
name = "wakka"
pos = 0,-35
postype = P1
stateno = 26380
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 2300]
type = PlaySnd
trigger1 = time = 65;animelemtime(2) = -40
value = 4000,19

[State 2300]
type = PlaySnd
trigger1 = time = 65;animelemtime(2) = -20
value = 3000,3

[State 2300]
type = PlaySnd
trigger1 = time = 65 ;animelemtime(2) = -20
value = 4000,18

[State 188, Flash]
type = allpalfx
trigger1 = animelemtime(2) = -1
time = 120
add = 255, 255, 255
sinadd = -255, -255, -255, 480

[State 188, End]
type = changestate
trigger1 = !animtime
value = 0

;-------------------------------------------------------------------------------
;12p intro
[Statedef 193]
type = S
ctrl = 0
anim = 4
velset = 0,0
sprpriority = 2

[State 180, 1]
type = explod
trigger1 = Time = 0
trigger2 = Time = 11
trigger3 = Time = 22
trigger4 = Time = 33
trigger5 = Time = 44
trigger6 = Time = 55
trigger7 = Time = 66
trigger8 = Time = 77
trigger9 = Time = 88
trigger10 = Time = 99
trigger11 = Time = 110
trigger12 = Time = 121
trigger13 = Time = 132
trigger14 = Time = 143
trigger15 = Time = 154
trigger16 = Time = 165
trigger17 = Time = 176
anim = 2791
pos = 0,-69
postype = p1
ontop = 1
supermovetime = -1

[State 180, 1]
type = playsnd
trigger1 = Time = 0
value = s0,27

[State 180, 1]
type = playsnd
trigger1 = Time = 187
value = s2700,5

[State 180, 1]
type = explod
trigger1 = Time = 178
anim = 52
ontop = 1
pos = 0,-69
postype = p1
supermovetime = -1

[state -1]
type = assertspecial
trigger1 = 1
flag = intro
flag2 = nobardisplay

[State 180, 1]
type = changestate
trigger1 = Time = 330
value = 37564
;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 195
value = 0,3
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 1				;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 200				;Change animation (Def: no change)
poweradd = 20			;Power to add (Def: 0)
sprpriority = 2			;Set layering priority to 2 (in front)

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 23, 0			;Damage that move inflicts, guard damage
animtype = Light			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default
					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 1, 8			;Time attacker pauses, time opponent shakes
sparkno = 0				;Spark anim no (Def: set above)
sparkxy = -10, -76		;X-offset for the "hit spark" rel. to p2,
					;Y-offset for the spark rel. to p1
hitsound = 5, 0			;Sound to play on hit
guardsound = 6, 0			;Sound to play on guard
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5		;Time that the opponent slides back
ground.hittime  = 12		;Time opponent is in hit state
ground.velocity = -4		;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8	;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High			;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3		;X-velocity at which opponent is pushed,
					;Y-velocity at which opponent is pushed
air.hittime = 12			;Time before opponent regains control in air

[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Medium Punch
; CNS difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 200

[State 210, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 40
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 1
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 210, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Strong Punch
; CNS difficulty: easy
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 200

[State 220, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 45
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Light Kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 200

[State 230, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 23
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 230, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 230, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Medium Kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 200

[State 240, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 40
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 1
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 240, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 240, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Standing Strong Kick
; CNS difficulty: easy
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 200

[State 250, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 45
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 250, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 250, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Light Punch
; CNS difficulty: easy
; Description: Simple crouching attack. The HitDef's guardflag parameter
;     is set to "L", meaning that the move can only be guarded low
;     (crouching), and not by standing or jumping opponents.
;     Like for all light attacks, it's a good idea to keep the slidetime
;     and hittime parameters at a smaller number, so the opponent isn't
;     stunned for too long. For all crouching attacks you have to
;     remember to set the attr parameter to indicate that it is crouching
;     attack. In this case, "C, NA" stands for "crouching, normal attack".
;     The HitDef's priority is set at 3, instead of the default of 4,
;     so this attack has a lower priority than most others, meaning the
;     player will get hit instead of trading hits with the opponent if
;     their attack collision boxes (Clsn1) intersect each other's Clsn2
;     boxes at the same time.
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 200

[State 400, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 23
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 400, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 400, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 200

[State 410, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 40
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 1
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 410, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Strong Punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 200

[State 420, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 45
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 420, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 420, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Light Kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 200

[State 430, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 23
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 430, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 430, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouching Medium Kick
; CNS difficulty: easy
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 200

[State 440, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 40
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 1
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 440, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 440, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Crouch Strong Kick
; CNS difficulty: easy
; Description: This move uses "Trip" for the "ground.type" parameter in
;     its HitDef. It's a special type that puts the opponent in a tripped
;     animation as he falls. Also, the hitflag parameter in the HitDef
;     is set to "MAFD". The "D" indicates that a downed opponent can be
;     hit by the attack.
[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 450

[State 450, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 45
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 1, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 450, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 450, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 200
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600

[State 600, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage = 45
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 2
guardsound = 6, 0
ground.type = Trip
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = Trip
air.velocity = -1.4,-3
air.hittime = 12

[State 600, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 600
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Jump Spin Punch
; CNS difficulty: easy
[Statedef 601]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 5
ctrl = 0
anim = 601

[State 600, 1]
type = HitDef
trigger1 = time = 1
attr = S, NA
damage = 15
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 2
guardsound = 6, 0
ground.type = Trip
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = Low
air.velocity = -1.4,-3
air.hittime = 12

[State 600, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Time = 1
trigger1 = Anim = 601
value = 0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =
;---------------------------------------------------------------------------
; Throwing the opponent
; Description: In this state, the player throws the opponent by binding him to
;     various offsets based on his current frame of animation. For
;     example, [State 810, Bind 1] binds the opponent to an offset of
;     28 pixels in front of the player. That puts him around where the hand
;     is at. Is is important to keep the opponent bound using a
;     TargetBind controller at all times, until you let him go. This
;     is especially important if your player has a Clsn2 box that
;     allows him to get hit while throwing someone. Each time a player
;     gets hit, all his bound targets will be set to a fall state. If
;     the opponent is not bound, then he might get stuck in his thrown
;     state when his attacker is knocked out of the throw halfway.
; Notes: There is a TargetLifeAdd controller to decrease the opponent's
;     life, and a TargetState controller to change his state to a
;     falling state when KFM lets go of him.
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
pos = 28, 0

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 60,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(5) < 0
pos = 58, 0

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = 47, 0

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = 41, -60

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 25, -75

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = 15, -90

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = -5, -96

[State 810, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = -14, -90

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = -50, -50

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 11
value = -78

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 11
value = 821

[State 810, Turn 12]
type = Turn
trigger1 = AnimElem = 12

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -10

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 4300
ctrl = 1

;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

;---------------------------------------------------------------------------
; Opponent thrown into the air
; (a custom gethit state)
; Description: This state has the opponent flying through the air and
;     falling down onto the ground. The SelfState controller sets the
;     opponent back using to his own state file when he his the ground.
;     Controllers 821,2 and 821,3 allow the opponent to recover by
;     hitting his recovery command when he is falling.
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 2.8,-7
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;----------------------
;basic parry
[StateDef 209]
type = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 209
poweradd = 0
sprpriority = 2

[State 209, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 8, 18
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =


[State 209, ReversalDef]
type = ReversalDef
trigger1 = AnimElem = 3
reversal.attr = SA,NA,SA
sparkno = 0
pausetime = 10, 10
hitsound = s1150, 0
p1stateno = 3002
p2stateno = 3003

;when opponent hits from the air
[State 209, ReversalDef]
type = ReversalDef
trigger1 = AnimElem = 3
trigger1 = p2bodydist y < 0
reversal.attr = SA,NA,SA
sparkno = 0
pausetime = 10, 10
hitsound = s1150, 0
p1stateno = 3002
p2stateno = 3003

[State 209, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;player 1 recovers from successful parry
[StateDef 3002]
type = S
physics = S
velset = 0,0
ctrl = 0
anim = 3002
poweradd = 300
sprpriority = 2

[State 3000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;p2 recovers from successful parry
[Statedef 3003]
type    = S
movetype= I
physics = S
velset = 0,0
poweradd = -100

[State 3001, end]
type = DestroySelf
trigger1 = IsHelper
ignorehitpause = 1

[State 3001, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3001

[State 3001,1]
type = VelSet
trigger1 = animelem = 1
x = -3

[State 3001,1]
type = VelAdd
trigger1 = time = 2
x = 2

[State 3001, end]
type = SelfState
trigger1 = AnimTime = 0 && life = [250, 1000]
value = 0
ctrl = 1

[State 3001, end]
type = SelfState
trigger1 = AnimTime = 0 && life = [1,250]
value = 5110
ctrl = 1

;opponent recovers from parry in air
[StateDef 3004]
type = A
movetype = H
physics = A
velset = 0,0
ctrl = 0
sprpriority = 2
poweradd = -100
fall = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value =  5030
;elem = 1
;ignorehitpause =
;persistent =


[State 3001, end]
type = DestroySelf
trigger1 = IsHelper
ignorehitpause = 1

[State 3002, Veladd]
type = Veladd
trigger1 = AnimElem = 1
x = -3
y = -5

[State 3002, end]
type = SelfState
trigger1 = Time = 20
value = 5210
ctrl = 1
;---------------------------------------------------------------------
; 3x rush
;------------------------１段目
[Statedef 1300]
type = S
movetype = A
physics = N
poweradd= 72
anim = 1300
ctrl = 0
velset = 0,0
juggle = 15

[State 1065, 1]
type = VarSet
trigger1 = Time = 0
var(31) = -60

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3,=1
value = 2,1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,ifelse(Var(39)=1,102,4)
channel = 0

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 2,=1
x = 6

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 5,=0
x = 0

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
damage    = ifelse(Var(39)=1,42,35),4
getpower = 72,18
givepower = 36
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 13,13
sparkno = 2
guard.sparkno = S2010
sparkxy = 0,-60
hitsound   = s5,121
guardsound = s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5
air.hittime = 13
air.velocity = -3,-5
guard.velocity = -7
air.fall = 1
fall.recover = 0
yaccel = .4

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .95

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

;------------------------二段目
[Statedef 1301]
type = S
movetype = A
physics = N
poweradd= 0
anim = 1301
ctrl = 0
velset = 0,0
juggle = 15

[State 1065, 1]
type = VarSet
trigger1 = Time = 0
var(31) = -60

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3,=1
value = 2,1

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,3;ifelse(Var(39)=1,103,5)
channel = 0

[State 1301,VarSet(15)]
type = VarSet
trigger1  = Time = 0
var(15) = 0

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 2,=1
x = 6

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
damage    = ifelse(Var(39)=1,42,35),4
getpower = 72,18
givepower = 36
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = ifelse(Var(39)=1,20,20),27
sparkno = 2
guard.sparkno = S2010
sparkxy = 0,-60
hitsound   = s5,121
guardsound = s4,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -3.75,0
air.hittime = 13
air.velocity = -3.75,-7.5
guard.velocity = -7
;fall = 1
fall.recover = 0
yaccel = .5

[State -2, MoveContact]
type = VarSet
trigger1 = MoveContact && Var(39)
var(28) = 1
ignorehitpause = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

[State 105,VelSet]
type = VelSet
trigger1 = AnimElem = 5,=0
x = 0

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .95

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

;------------------------三段目
[Statedef 1302]
type = A
movetype = A
physics = N
poweradd= 0
anim = 1302
ctrl = 0
velset = 0,0
juggle = 0

[State 1065, 1]
type = VarSet
trigger1 = Time = 0
var(31) = -55

[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1200,4

[State 200,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=1
value = 0,3;0,ifelse(Var(39)=1,104,15)
channel = 0

[State 105,VelSet]
type = VelSet
trigger1 = Time = 0
x = 5
y = -5 ;-6

[State 1301,VarSet(15)]
type = VarSet
trigger1  = Time = 0
var(15) = 0

[State 105, Veladd]
type = Veladd
trigger1 = Time > 0
y = .6

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = A, SA
damage    = ifelse(Var(39)=1,63,70),8
getpower = 72,18
givepower = 36
animtype = Up
hitflag = MAF
guardflag = HA
pausetime = 12,12
sparkno = S9001+(random%2)
guard.sparkno = 2
sparkxy = 0,-55
hitsound   = s0,8
guardsound = s5,121
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -4,-8
air.hittime = 13
air.velocity = -4,-8
guard.velocity = -7
fall = 1
fall.recover = 0
yaccel = .5

[State 1000, ChangeState]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1303

;------------------------ 停止
[Statedef 1303]
type = S
movetype = I
physics = S
anim = 1303
velset = 0, 0

[State 52, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 1,4

[State 106, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; PRUNE JUICE
[StateDef 500]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 500
poweradd = 30
sprpriority = 2

[State 330, Helper]
type = Helper
trigger1 = AnimElem = 3
helpertype = normal
name = "Prunes Juice"
ID = 504
stateno = ifelse(random>900,505,504);504
pos = 40,-40
postype = p1
facing = 1
ownpal = 0

[State 300, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; PRUNE JUICE AIR
[StateDef 501]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 602
poweradd = 30
sprpriority = 2

[State 330, Helper]
type = Helper
trigger1 = AnimElem = 3
helpertype = normal
name = "Prunes Juice"
ID = 504
stateno = ifelse(random>900,505,504);504
pos = 40,-40
postype = p1
facing = 1
ownpal = 0

[State 600, 5]
type = Changestate
trigger1 = animtime = 0
value = 50
;-----------------------------------------------------------------------------;

[StateDef 504]
type = S
movetype= A
physics = N
juggle  = 1
velset = 2,0
ctrl = 0
anim = 504

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 3
range = 2,6

[State 0, AngleSet]
type = AngleSet
trigger1 = movecontact = 0
value = 90

[State 0, AngleSet]
type = AngleAdd
trigger1 = movecontact
value = 10*var(3)

[State 0, VelAdd]
type = VelAdd
trigger1 = movecontact
y = .3

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .6

[State 0, VelSet]
type = VelSet
trigger1 = movecontact = 1
x = Var(3)*-1
y = -8

[State 0, PlaySnd]
type = PlaySnd
trigger1 = movecontact = 1
value = S666,27+random%3
freqmul = 0.5 + (Parent,var(11)*0.1)

[State 300, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NA
damage = ifelse(root,palno=11,40,2),4;10
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 0
sparkno = 2
sparkxy = -10, -76
hitsound = S1, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 16
ground.velocity = -2
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 999
trigger2 = Pos Y > 0

;-----------------------------------------------------------------------------;
[Statedef 505];bloodring
type    = A
movetype= A
physics = N
juggle  = 0
ctrl = 0
anim = 4252
sprpriority = 3

[State 1000, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, Width]
type = Width
trigger1 = 1
value = 0,0

[State 210, ]
type = playerpush
trigger1 = 1
value = 0

[State 1000, 0]
type = PosSet
trigger1 = Pos y >= 6
y = 6

[State 1000, 0]
type = VelSet
trigger1 = 1
y = ifelse(Pos y <= -1,5,0)

[State 1000, 0]
type = VelSet
trigger1 = 1
x = 8

[State 1000, 0]
type = Changestate
trigger1 = pos x >= 130
trigger2 = pos x <= -130
trigger3 = time >= 100
value = 4251
ignorehitpause = 1

[State 210, 2]
type = HitDef
trigger1 = time = 1
attr = C, HA
animtype  = Diaguo
damage    = 1;+ceil(random%10)
guardflag = MA
hitflag = MALF
pausetime = 0,0
hitsound   = s1040,5
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,-1
air.velocity = -5,-1
sparkno = 1+ceil(random%4)
sparkxy = 0,-50
fall.recover = 0

;---------------------------------
[Statedef 4251];bloodring4
type    = A
movetype= A
physics = N
juggle  = 0
ctrl = 0
anim = 4251
sprpriority = 3

[State 200, 1]
type = PlaySnd
trigger1 = time = 0
value = 333, 1

[State 200, 1]
type = PlaySnd
trigger1 = time = 0
value = 30, 180
volume = 255

[State 1000, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 210, Width]
type = Width
trigger1 = 1
value = 0,0

[State 1000, 0]
type = PosSet
trigger1 = pos x >= 0
x = 152

[State 1000, 0]
type = PosSet
trigger1 = pos x <= 0
x = -152

[State 1000, 0]
type = VelSet
trigger1 = 1
y = (0-(vel x))

[State 210, 2]
type = HitDef
trigger1 = 1
attr = A, HA
animtype  = Diagup
damage    = 1+ceil(random%10)
guardflag = H
hitflag = MALF
pausetime = 0,0
hitsound   = s1040,5
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 5,-1
air.velocity = 5,-1
sparkno = 1+ceil(random%4)
sparkxy = 0,-50
fall = 1
p2stateno = ifelse(random>500,2800,7600)

[State 1000, 0]
type = DestroySelf
trigger1 = time >= 200
trigger2 = Pos y <= -300
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
; Downed get-hit (getting up)
[Statedef 5120]
type    = L
movetype= I
physics = N

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = anim != 5120
trigger1 = !numhelper(950) || !numhelper(951) || !numhelper(952) || !numhelper(953) || !numhelper(954) || !numhelper(955)
trigger2 = numhelper(950)
trigger2 = abs(helper(950),parentdist x)<=4
trigger2 = numhelper(951)
trigger2 = abs(helper(951),parentdist x)<=4
trigger2 = numhelper(952)
trigger2 = abs(helper(952),parentdist x)<=4
trigger2 = numhelper(953)
trigger2 = abs(helper(953),parentdist x)<=4
trigger2 = numhelper(954)
trigger2 = abs(helper(954),parentdist x)<=4
trigger2 = numhelper(955)
trigger2 = abs(helper(955),parentdist x)<=4
value = 5120

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

[State 5120, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5120, 4]
type = HitFallSet
trigger1 = anim = 5120
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = anim = 5120
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = anim = 5120
trigger1 = AnimTime = 0
value2 = SCA
time = 3

[State 5120, 7]
type = ChangeState
trigger1 = anim = 5120
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Init
[Statedef 950]
type = S
ctrl = 0
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 0,8

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 950
elem = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 959

;---------------------------------------------------------------------------
; Init
[Statedef 951]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 950
elem = 2

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 959

;---------------------------------------------------------------------------
; Init
[Statedef 952]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 950
elem = 3

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 959

;---------------------------------------------------------------------------
; Init
[Statedef 953]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 950
elem = 4

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 959

;---------------------------------------------------------------------------
; Init
[Statedef 954]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 950
elem = 5
scale = .4, .4


[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 959

;---------------------------------------------------------------------------
; Init
[Statedef 955]
type = S
ctrl = 0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 950
elem = 6

[State 0, ChangeState]
type = ChangeState
trigger1 = 1
value = 959


;---------------------------------------------------------------------------
; Break
[Statedef 959]
type = A
movetype= I
physics = N
ctrl = 0
velset = 0,0
sprpriority = 1+random%10

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
fvar(0) = 10+random%200
[State 0, VarSet]
type = VarSet
trigger1 = time = 0
fvar(1) = 10+random%200
[State 0, VarSet]
type = VarSet
trigger1 = time = 0
fvar(2) = -200+random%400
[State 0, VarSet]
type = VarSet
trigger1 = time = 0
fvar(3) = 0-random%612

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = (parent,vel x)*(fvar(0)/100)+(fvar(2)/100)
y = 0 - abs((parent,vel y)*(fvar(1)/100))+(fvar(3)/100)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
ignorehitpause = 1
[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = (abs(vel x)+abs(vel y))*2
ignorehitpause = 1

[State 0, VelMul]
type = VelMul
triggerall = var(5) = 0
trigger1 = vel x > 0
trigger1 = frontedgedist < -8
trigger2 = vel x < 0
trigger2 = backedgedist < -8
x = -1
[State Krusty]
type = PlaySnd
trigger1 = vel y > 0
trigger1 = vel y + pos y >= 0
value = S3,0+random%5
persistent = 0
[State Krusty]
type = PlaySnd
trigger1 = var(5) = 1
value = S3,0+random%5
persistent = 0
[State 0, VelMul]
type = VelMul
trigger1 = vel y > 0
trigger1 = vel y + pos y >= 0
x = 0.8
y = -0.6
persistent = 0
[State 0, VarSet]
type = VarSet
trigger1 = var(5) = 0
trigger1 = vel y > 0
trigger1 = vel y + pos y >= 0
var(5) = 1
[State 0, VelMul]
type = PosSet
trigger1 = var(5) = 1
y = 0
[State 0, VelMul]
type = VelSet
trigger1 = var(5) = 1
x = 0
y = 0
[State 0, VelAdd]
type = VelMul
trigger1 = time
trigger1 = var(5) = 0
x = 0.98
[State 0, VelAdd]
type = VelAdd
trigger1 = time
trigger1 = var(5) = 0
y = 0.79
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time
value = anim
elem = animelemno(0)

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = parent,stateno=5150
trigger1 = time >= 260
trigger1 = (time%3)=0
flag = invisible

[State 0, VarSet]
type = VarSet
trigger1 = parent,alive
trigger1 = parent,stateno != 5120
fvar(11) = 0.09
[State 0, VarSet]
type = VarAdd
trigger1 = parent,alive
trigger1 = parent,stateno = 5120
fvar(11) = 0.01
[State 0, PosAdd]
type = PosAdd
trigger1 = parent,alive
trigger1 = parent,stateno != 5120
x = (parentdist x)*0.001
[State 0, PosAdd]
type = PosAdd
trigger1 = parent,alive
trigger1 = parent,stateno = 5120
x = (parentdist x)*fvar(11)

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,statetype!=L
trigger1 = parent,anim != [5080,5190]
trigger2 = parent,stateno = 5120
trigger2 = parent,anim = 5120
;---------------------------------------------------------------------------
; Power Charge
[Statedef 730]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 730
sprpriority = 2

[State 40, Afterimage]
type = PalFX
trigger1 = Anim = 730
length = 13
add = 0,50,240
mul = 120,224,150
sinadd = 85,55,110,10
time = 5

[State 730, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 4533
id = 730
pos = 0,-35
postype = p1
supermovetime = 99999999
pausemovetime = 99999999
sprpriority = 3
removetime = -1
bindtime = -1
ownpal = 1
removeongethit = 1

[State 730, Power]
type = PowerAdd
trigger1 = Time >= 8
value = 2

[State 730, Power]
type = PowerAdd
trigger1 = Time >= 28
value = 2

[State 730, Power]
type = PowerAdd
trigger1 = Time >= 48
value = 2

[State 730, Power]
type = PowerAdd
trigger1 = Time >= 68
value = 4

[State 730, Power]
type = PowerAdd
trigger1 = Time >= 88
value = 5

[State 730, Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = S730,1
channel = 5

[State 730, voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = S2562,4
channel = 0

[State 730, Modify]
type = ModifyExplod
trigger1 = NumExplod(730) && power < 3000
ID = 730
scale = 0.75,0.1 + 0.00013 * (power)
[State 731, Stop]
type = StopSnd
trigger1 = Time = 0
channel = 10
[State 730, Modify]
type = ModifyExplod
trigger1 = NumExplod(730) && power >= 3000
ID = 730
scale = 0.75,0.5

[State 730, Stop]
type = ChangeState
triggerall = Time >= 8
trigger1 = !var(0) && (Command != "hold_a")
trigger2 = var(0) && RoundState = 2 && (inguarddist || P2bodydist X <= 50)
trigger3 = power >= powermax
value = 731
ctrl = 1

[Statedef 731]
type    = S
movetype= I
physics = S
anim = 731

[State 731, Stop]
type = StopSnd
trigger1 = Time = 0
channel = 5

[State 731, Stop]
type = StopSnd
trigger1 = Time = 0
channel = 0

[State 730, voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = S730,2
channel = 10
[State 731, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
id = 730

[State 731, Done]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

[Statedef -2]
;-------------------------------------------------------------------------------
;CONFIG
;1 = ON
;0 = OFF
[State -2] ;NC striker and Monsyou is auto in Dark palette.
type = VarSet
trigger1 = palno = 11
ignorehitpause = 1
var(41) = 0

[State -2] ;ONI-MIKO follows Kyurem around in Dark Palette.
type = VarSet
trigger1 = palno = 11
ignorehitpause = 1
var(42) = 1
;-------------------------------------------------------------------------------
[State -2]
type = helper
triggerall = roundstate = 2
triggerall = anim = 0
trigger1 = palno = 11 || palno = 10 || palno = 1 || palno = 2 || palno = 3 || palno = 4 || palno = 5 || palno = 6 || palno = 9
trigger1 = (GameTime%9) = 1
trigger1 = life >= 250
trigger1 = life <= (lifemax)
id = 2793
persistent = 1
name = "hikari"
pos = var(50),var(51)
postype = p1
stateno = 2793
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2]
type = selfstate
trigger1 = movereversed && palno = [1,6]
trigger1 = Life > 250
value = 1302

[State -2]
type = varrandom
trigger1 = 1
range = -40,30
v = 50

[State -2]
type = varrandom
trigger1 = 1
range = 0,-60
v = 51

[State -2]
type = varrandom
trigger1 = 1
range = -110,110
v = 43

[State -2]
type = varrandom
trigger1 = 1
range = 0,-170
v = 44

[State -2]
type = helper
trigger1 = numhelper(100000) = 0 && palno=11 && stateno != 2401 && !(EnemyNear,HitDefAttr = SCA,NA,SA,HA,NP,SP,HP)
id = 100000
persistent = 0
name = "godfild"
pos = 0,0
postype = P1
stateno = 100000
helpertype = normal
keyctrl = 0
ownpal = 1

[state -2, ONI MIKO]
type = Helper
triggerall = NumHelper(8901) = 0
trigger1 = Time = 0
trigger1 = palno = 11
trigger1 = var(42) = 1
ID = 8901
pos = -80,0
postype = p1
stateno = 10000
helpertype = normal
name = "ONI-MIKO-REIMU"
size.xscale = 1
size.yscale = 1
ownpal = 1
keyctrl = 0
ignorehitpause = 0

[State -2, LifeAdd]
type = LifeAdd
triggerall = PalNo = 11
triggerall = life >= 1
triggerall = life <= 250
trigger1 = 1
value = 5
ignorehitpause = 1
persistent = 1

[State -2, LifeAdd]
type = LifeAdd
triggerall = PalNo = 11
triggerall = life >= 1
triggerall = life <= 50
trigger1 = 1
value = 10
ignorehitpause = 1
persistent = 1

[State -2, LifeAdd]
type = LifeAdd
triggerall = PalNo = 11
triggerall = life >= 250
triggerall = life <= 500
trigger1 = 1
value = 3
ignorehitpause = 1
persistent = 1

[State -2, LifeAdd]
type = LifeAdd
triggerall = PalNo = 11
triggerall = life >= 1
triggerall = life <= (lifemax)
trigger1 = 1
value = 10
ignorehitpause = 1
persistent = 1

[State 0, AssertSpecial]
type = AssertSpecial
triggerall = Palno = 11
trigger1 = enemy,life!=0
trigger2 = life=0
flag = noko
flag2 = noko
flag3 = noko
ignorehitpause = 1
persistent = 1

[State 0, VarSet]
type = VarSet
trigger1 = enemy,time<= 100
trigger1 = life = 0
trigger1 = palno = 11
trigger2 = gethitvar(damage)>=100
v = 24 ;fv = 10
value = 1
ignorehitpause = 1
persistent = 1

[State -2, LifeSet]
type = LifeSet
triggerall = PalNo = 11
triggerall = life = 0
trigger1 = var(24)=1
value = lifemax
ignorehitpause = 1
persistent = 1

[State -2, LifeSet] ;Prevent F1 in intro.
type = LifeSet
trigger1 = roundstate = 0
trigger2 = roundstate = 1
value = lifemax
ignorehitpause = 1

[State -2, Debug]
type = displaytoclipboard
trigger1 = life = 0
text = "Well, this is pointless as I've seen you've beat White Kyurem..."

[State -2, Debug]
type = displaytoclipboard
trigger1 = life = 250
text = "Can't..keep..up..so..tired.."

[State -2, Debug]
type = displaytoclipboard
trigger1 = enemy,name = "Kyurem, Wiju Dragon"
text = "AT LAST WE MEET! PROPARE TO DIE!"

[State -2, Debug]
type = displaytoclipboard
trigger1 = enemy,name = "Dan"
text = "OMG IS DANIEL THE NOOB"

[State -2, Debug]
type = displaytoclipboard
trigger1 = palno = 8
text = "I'm a ghost."

[State -2, TargetState]
type = TargetState
trigger1 = enemynear,life = 0
trigger2 = enemynear,name = "Dan" ;FOR MANY REASONS BUT YOUR STILL COOL
value = 944

[State 153, Effect]
type = Explod
trigger1 = enemynear,authorname = "GarchompMatt" ;ROTOM IS STILL COOL
anim = 6667
id = 6667
scale = 1,1
pos = 0, 0
postype = left
sprpriority = 999999999999999999
hitpause = 1
bindtime = -1
trans=add
ontop = 1
pausemovetime=880000000000000000000000

[State -2, PowAdd]
type = PowerAdd
trigger1 = palno = 11
trigger1 = !(gametime%5)
value = 10
ignorehitpause =1
persistent =1

[State -2, Red PaletteFX]
type = PalFX
triggerall = Palno = 11
trigger1 = (GameTime%40) = 0
time = 100
add = 0,0,0
mul = 256,100,100
sinadd = 70,0,0,40
invertall = 0
color = 256

[State ]
type = selfstate
triggerall = Palno = [1,6]
trigger1 = life <= 250
trigger1 = movereversed
value = 5110

[State 0, DefenceMulSet]
type = DefenceMulSet
triggerall = Palno = [1,6]
trigger1 = life <= 250
value = 0.8

[State 0, AttackMulSet]
type = AttackMulSet
triggerall = Palno = [1,6]
trigger1 = life <= 250
value = 0.5

[state -2]
type = varset
triggerall = palno != 11
trigger1 = var(11) = 1
var(29) := 2

[state -2]
type = varadd
triggerall = palno != 11
trigger1 = var(11) != 1
v = 29
value = -1

[State -2]
type = Helper
trigger1 = RoundState = 2
trigger1 = palno = 11
trigger1 = var(41) = 1
trigger1 = Random = [300,399]
trigger1 = facing = 1
trigger1 = numhelper(4350) = 0
helpertype = normal
name = "NC"
id = 4350
postype = left
facing = 1
pos = 0,-60
stateno = 4350
keyctrl = 0

[State -2]
type = Helper
trigger1 = RoundState = 2
trigger1 = palno = 11
trigger1 = var(41) = 1
trigger1 = Random = [300,399]
trigger1 = facing = -1
trigger1 = numhelper(4350) = 0
helpertype = normal
name = "NC"
id = 4350
postype = right
facing = -1
pos = 0,-60
stateno = 4350
keyctrl = 0

[State 0, ]
type = Helper
trigger1 = RoundState = 2
trigger1 = palno = 11
trigger1 = var(41) = 1
trigger1 = Random = [300,399]
trigger1 = numhelper(16500) = 0
helpertype = normal
name = "Monsyou"
id = 16500
postype = p1
size.xscale = 0.7
size.yscale = 0.7
stateno = 18103
keyctrl = 0

[State -2, 1]
type = Helper
triggerall = numHelper(9998) = 0
trigger1 = life <= 100
trigger1 = ctrl
trigger1 = PalNo = 11
helpertype=normal
name = "OTHK"
ID = 9998
stateno = 9998
ignorehitpause=1
persistent = 1

[State -2]
Type = Helper
Triggerall = NumHelper(13713) = 0
trigger1 = life <= 100
trigger1 = ctrl
trigger1 = PalNo = 11
OwnPal = 1
ID = 13713
StateNo = 13713
keyctrl = 1
PauseMoveTime = 999999
SuperMoveTime = 999999
Name = "HIPERHIZZ'S CODE USED AGAINST HIM"

[State -2, 1]
type = Helper
triggerall = numHelper(9998) = 0
trigger1 = enemy, name = "WLANMANIAX AND THEIRANSONIC'S CHARS IN A NUTSHELL"
trigger2 = enemy, name = "Luggy"
trigger3 = enemy, name = "Dan"
trigger4 = enemy, name = "Omega Tom Hanks"
trigger5 = enemy, name = "OmegaTomHanks"
trigger6 = enemy, name = "Josh Geary"
trigger7 = enemy, name = "Weegee"
trigger8 = enemy, name = "The Pacifer"
trigger9 = enemy, name = "Barbatos_Goetia" && enemy,palno = 12
trigger10 = enemy, name = "Rare Akuma"
trigger11 = enemy, name = "G Mizuchi" && enemy,palno = 12
trigger12 = enemy, name = "G OROCHI" && enemy,palno = 12
trigger13 = enemy, name = "Kyurem, Wiju Dragon"
helpertype=normal
name = "OTHK"
ID = 9998
stateno = 9998
ignorehitpause=1
persistent = 1

[State -2]
type = helper
trigger1 = palno=11&&numhelper(195020)=0&&enemy,life>=enemy,lifemax*0.9&&var(55)<=1&&(stateno!=[2000,2005])
id = 195020
persistent = 1
name = "bari"
pos = 0,0
postype = P1
stateno = 195020+(EnemyNear,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT)
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = Trans
trigger1 = palno=11&&enemy,life>=enemy,lifemax*0.9&&var(55)<=49&&alive
trans = addalpha
alpha = 200,230

;[State -2, クリップボード]
type = DisplayToClipboard
trigger1 = NumHelper(7000)
text = "pp0x=%f, pp1x=%f"
params = (Helper(7000),Pos X), (Helper(7001),Pos X)

[State -2, 画面端判定発射]
type = Helper
trigger1 = RoundState = 2
trigger1 = !NumHelper(7000)
stateno = 7000
ID = 7000

[State -2, 画面端判定発射]
type = Helper
trigger1 = RoundState = 2
trigger1 = !NumHelper(7001)
stateno = 7000
ID = 7001

[State GIVE ME SOMETHING TO BREAK]
type = Helper
trigger1 = pos y <= 1234 || stateno != 5150 || alive
trigger1 = statetype = L || (anim = [5080,5190])
trigger1 = !numhelper(950)
trigger1 = stateno != 5120
trigger1 = anim != 5120
helpertype = normal
name = "Piece"
ID = 950
stateno = 950
pos = -111,-61
postype = p1
facing = 1
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
[State GIVE ME SOMETHING TO BREAK]
type = Helper
trigger1 = pos y <= 1234 || stateno != 5150 || alive
trigger1 = statetype = L || (anim = [5080,5190])
trigger1 = !numhelper(951)
trigger1 = stateno != 5120
trigger1 = anim != 5120
helpertype = normal
name = "Piece"
ID = 951
stateno = 951
pos = -88,-61
postype = p1
facing = 1
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
[State GIVE ME SOMETHING TO BREAK]
type = Helper
trigger1 = pos y <= 1234 || stateno != 5150 || alive
trigger1 = statetype = L || (anim = [5080,5190])
trigger1 = !numhelper(952)
trigger1 = stateno != 5120
trigger1 = anim != 5120
helpertype = normal
name = "Piece"
ID = 952
stateno = 952
pos = -65,-61
postype = p1
facing = 1
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
[State GIVE ME SOMETHING TO BREAK]
type = Helper
trigger1 = pos y <= 1234 || stateno != 5150 || alive
trigger1 = statetype = L || (anim = [5080,5190])
trigger1 = !numhelper(953)
trigger1 = stateno != 5120
trigger1 = anim != 5120
helpertype = normal
name = "Piece"
ID = 953
stateno = 953
pos = -42,-61
postype = p1
facing = 1
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
[State GIVE ME SOMETHING TO BREAK]
type = Helper
trigger1 = pos y <= 1234 || stateno != 5150 || alive
trigger1 = statetype = L || (anim = [5080,5190])
trigger1 = !numhelper(954)
trigger1 = stateno != 5120
trigger1 = anim != 5120
helpertype = normal
name = "Piece"
ID = 954
stateno = 954
pos = -19,-61
postype = p1
facing = 1
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1
[State GIVE ME SOMETHING TO BREAK]
type = Helper
trigger1 = pos y <= 1234 || stateno != 5150 || alive
trigger1 = statetype = L || (anim = [5080,5190])
trigger1 = !numhelper(955)
trigger1 = stateno != 5120
trigger1 = anim != 5120
helpertype = normal
name = "Piece"
ID = 955
stateno = 955
pos = -4,-61
postype = p1
facing = 1
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = palno = 11 || palno = 12 || palno = 7
trigger1 = life > 0
trigger1 = numhelper(10666) = 0
name = "armor2"
stateno = 10666
ID = 10666
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1

[State -2, Unhit]
type = NotHitBy
trigger1 = numhelper(10666) = 1
value = SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT
ignorehitpause = 1

[State -2, life-]
type = lifeadd
triggerall = life >= lifemax / 4
triggerall = numhelper(10666) = 1
triggerall = helper(10666),Gethitvar(Damage) >= 10
triggerall = stateno != [3900,4999]
trigger1 = var(30) = 0
trigger1 = var(35) = 0
value = -helper(10666),Gethitvar(Damage)
absolute = 1

[State -2, life-]
type = lifeadd
triggerall = life < lifemax / 4
triggerall = numhelper(10666) = 1
triggerall = helper(10666),Gethitvar(Damage) >= 10
triggerall = stateno != [3900,4999]
trigger1 = var(30) = 0
trigger1 = var(35) = 0
value = -helper(10666),Gethitvar(Damage)

[State -2, life-]
type = lifeadd
triggerall = life >= lifemax / 4
triggerall = numhelper(10666) = 1
triggerall = helper(10666),Gethitvar(Damage) >= 10
triggerall = stateno != [3900,4999]
trigger1 = var(30) = 1
trigger1 = var(35) = 0
value = -helper(10666),Gethitvar(Damage)

[State -2, life-]
type = lifeadd
triggerall = life < lifemax / 4
triggerall = numhelper(10666) = 1
triggerall = helper(10666),Gethitvar(Damage) >= 10
triggerall = stateno != [3900,4999]
trigger1 = var(30) = 1
trigger1 = var(35) = 0
value = -10
absolute = 1

[State -2, Damage]
type = LifeSet
trigger1 = numhelper(10666) = 1
trigger1 = var(30) = 1
trigger1 = var(35) = 1
value = ceil(9*const(data.life))

[State -2, Damage]
type = PowerSet
trigger1 = numhelper(10666) = 1
trigger1 = var(30) = 1
trigger1 = var(35) = 1
value = ceil(const(data.power))

[State -2, CannotReversed]
type = SelfState
triggerall = alive || life >= 1
triggerall = numhelper(10666) = 1
trigger1 = movetype = H
trigger2 = movereversed
value = ifelse(statetype=A,1916,1915)
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State ]
type = AssertSpecial
trigger1 = 1
flag = nostandguard
flag2 = noairguard
flag3 = nocrouchguard

[state -2]
type = varadd
trigger1 = 1
persistent = 0
v = 4
value = -1
ignorehitpause = 1

[state -2]
type = pause
trigger1 = var(4) >= 1
trigger1 = gametime % 2
persistent = 0
ignorehitpause = 1
time = 1
ignorehitpause = 1

[State -2]
type = pause
triggerall = name = "White Kyurem"
triggerall = palno = [7,12]
triggerall = P2name = "Kyurem, Wiju Dragon" || P4name = "Kyurem, Wiju Dragon"
trigger1 = roundstate != 2
time = 2147483647
movetime = 2147483647
ignorehitpause = 1

[State -2]
type = superpause
triggerall = name = "White Kyurem"
triggerall = palno = [7,12]
triggerall = P2name = "Kyurem, Wiju Dragon" || P4name = "Kyurem, Wiju Dragon"
trigger1 = roundstate != 2
anim = -1
time = 2147483647
movetime = 2147483647
darken = 0
ignorehitpause = 1

[State -2, NotHitBy]
type = NotHitBy
trigger1 = P2name = "Kyurem, Wiju Dragon" || P4name = "Kyurem, Wiju Dragon"
trigger2 = P2name = "" || P4name = ""
trigger3 = root,P2name = "" || root,P4name = ""
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;-------------------------------------------------------------------------------
;12p (SECRET PALLETE)
[State -2]
type = HitOverride
trigger1 = palno = 12
attr = SCA,AA,AT,AP
slot = 1
stateno = 702
time = -1
forceair = 0

[State -2, 無敵]
type = NotHitBy
trigger1 = palno = 12
value = ,AT,AP
time = -1

;[State ]
;type = varadd
;triggerall = !ishelper
;triggerall = numhelper(10666)
;triggerall = palno = 12
;trigger1 = helper(10666),gethitvar(damage)
;sysvar(4) = -1
;ignorehitpause = 1

;[State ]
;type = varset
;triggerall = !ishelper
;triggerall = palno = 12
;trigger1 = roundstate < 2
;sysvar(4) = 500
;ignorehitpause = 1
;SuperMoveTime = 99999999999
;PauseMoveTime = 99999999999

;[state ]
;type = lifeset
;triggerall = !ishelper
;triggerall = sysvar(4) >= 0
;triggerall = palno = 12
;trigger1 = roundstate > 2
;value = random+50
;ignorehitpause=1
;SuperMoveTime = 99999999999
;PauseMoveTime = 99999999999

;[State ]
;type = lifeset
;triggerall = roundstate = 2
;triggerall = !ishelper
;triggerall = palno = 12
;trigger1 = !(sysvar(4) <= 0)
;value = random+10
;ignorehitpause=1
;SuperMoveTime = 99999999999
;PauseMoveTime = 99999999999

;[State ]
;type = lifeset
;triggerall = Roundstate != 2
;trigger1 = palno = 12
;value = (lifemax)
;ignorehitpause=1
;SuperMoveTime = 99999999999
;PauseMoveTime = 99999999999

[State -2, ]
type = LifeSet
trigger1 = palno = 12
triggerall = ALIVE
value = ifelse(roundstate=2,ifelse(gametime%67=37,201,200),lifemax)
ignorehitpause=1

[State -2]
type = PowerSet
trigger1 = palno = 12
value = powermax

[State -2, フラグ設定記述例]
type = AssertSpecial
trigger1 = palno = 12
flag  = nokoslow

[State -2, フラグ設定記述例]
type = AssertSpecial
trigger1 = palno = 12
flag  = nostandguard
flag2 = nocrouchguard
flag3 = noairguard

[State -2, NotHitBy]
type = NotHitBy
trigger1 = palno = 12
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT

[State -2, CannotReversed]
type = SelfState
triggerall = alive || life >= 1
trigger1 = movereversed
trigger1 = palno = 12
value = 702
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State -2]
type = helper
trigger1 = numhelper(100000) = 0 && palno=12 && stateno != 2401 && roundstate = 2 ;!(EnemyNear,HitDefAttr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT) && roundstate = 2
id = 100000
persistent = 0
name = "hypergodfild"
pos = 0,0
postype = P1
stateno = 100000
helpertype = normal
keyctrl = 0
ownpal = 1

[state -3]
type = explod
trigger1 = numexplod(17) <= 0
trigger1 = palno = 12 && roundstate = 2
anim = 6600
ID = 17
bindtime = -1
supermovetime = -1
pausemovetime = -1
sprpriority = 4
ontop = 1

[State -2]
Type = Helper
Triggerall = NumHelper(13713) = 0
Trigger1 = palno = 12
OwnPal = 1
ID = 13713
StateNo = 13713
keyctrl = 1
PauseMoveTime = 999999
SuperMoveTime = 999999
Name = "HIPERHIZZ'S CODE USED AGAINST HIM"

[State -2]
type = PowerSet
trigger1 = palno = 12
value = PowerMax
;-------------------------------------------------------------------------------
;7p (CLONE PALETTE)
[State 192, ]
type = ScreenBound
trigger1 = ishelper
trigger1 = !ishelper(0)
trigger1 = !ishelper(1)
trigger1 = !ishelper(2)
trigger1 = !ishelper(3)
trigger1 = !ishelper(4)
trigger1 = !ishelper(5)
value = 0

[State 192, ]
type = turn
trigger1 = ishelper(0)
trigger2 = ishelper(1)
trigger3 = ishelper(2)
trigger4 = ishelper(3)
trigger5 = ishelper(4)
trigger6 = ishelper(5)
triggerall=((enemynear,screenpos X-screenpos X)*facing)<-1
triggerall=movetype=I
triggerall=statetype=S||statetype=C
triggerall=ctrl
value=1

[State -2, ヘルパーを出す]
type = Helper
triggerall=var(37)!=13
triggerall = NumHelper(0) = 0
trigger1 = palno = 7
name = "Kyurem0"  ;ヘルパーの名前
stateno = 3      ;ヘルパーが最初に行くステート
ID = 0            ;ヘルパーのＩＤナンバー
pos = 230         ;ヘルパーの出現位置
postype = p1         ;ヘルパーの最初に出る軸位置の属性（Explodのpostypeと書き方は同じだが効果が少し違う）
facing = -1
keyctrl = 1          ;ヘルパーがコントロール可能かどうか（0=操作不可・1=操作可能）
ownpal = 1           ;ヘルパーが(PalFXなどで)本体の色が変わった時に一緒に変わるかどうか（Explodのownpalと一緒）
size.xscale = 1      ;ヘルパーの横のサイズ
size.yscale = 1      ;ヘルパーの縦のサイズ
helpertype = Player  ;ヘルパーの属性：画面スクロールの影響を受けるか否かを決める
                     ;（Player=影響有り・画面外に出られない　Normal=影響無し・画面外に出られる）

[State -2, ヘルパーを出す]
type = Helper
triggerall=var(37)!=13
triggerall = NumHelper(1) = 0
trigger1 = palno = 7
name = "Kyurem1"  ;ヘルパーの名前
stateno = 3       ;ヘルパーが最初に行くステート
ID = 1            ;ヘルパーのＩＤナンバー
pos = 200         ;ヘルパーの出現位置
postype = p1         ;ヘルパーの最初に出る軸位置の属性（Explodのpostypeと書き方は同じだが効果が少し違う）
facing = -1
keyctrl = 1          ;ヘルパーがコントロール可能かどうか（0=操作不可・1=操作可能）
ownpal = 1           ;ヘルパーが(PalFXなどで)本体の色が変わった時に一緒に変わるかどうか（Explodのownpalと一緒）
size.xscale = 1     ;ヘルパーの横のサイズ
size.yscale = 1      ;ヘルパーの縦のサイズ
helpertype = Player  ;ヘルパーの属性：画面スクロールの影響を受けるか否かを決める
                     ;（Player=影響有り・画面外に出られない　Normal=影響無し・画面外に出られる）

[State -2, ヘルパーを出す]
type = Helper
triggerall=var(37)!=13
triggerall = NumHelper(5) = 0
trigger1 = palno = 7
name = "Kyurem5"  ;ヘルパーの名前
stateno = 3       ;ヘルパーが最初に行くステート
ID = 5            ;ヘルパーのＩＤナンバー
pos = 170         ;ヘルパーの出現位置
postype = p1         ;ヘルパーの最初に出る軸位置の属性（Explodのpostypeと書き方は同じだが効果が少し違う）
facing = -1
keyctrl = 1         ;ヘルパーがコントロール可能かどうか（0=操作不可・1=操作可能）
ownpal = 1           ;ヘルパーが(PalFXなどで)本体の色が変わった時に一緒に変わるかどうか（Explodのownpalと一緒）
size.xscale = 1     ;ヘルパーの横のサイズ
size.yscale = 1     ;ヘルパーの縦のサイズ
helpertype = Player  ;ヘルパーの属性：画面スクロールの影響を受けるか否かを決める
                     ;（Player=影響有り・画面外に出られない　Normal=影響無し・画面外に出られる）


[State -2, ヘルパーを出す]
type = Helper
triggerall=var(37)!=13
triggerall = NumHelper(2) = 0
trigger1 = palno = 7
name = "Kyurem2"  ;ヘルパーの名前
stateno = 3       ;ヘルパーが最初に行くステート
ID = 2            ;ヘルパーのＩＤナンバー
pos = -30         ;ヘルパーの出現位置
postype = p1         ;ヘルパーの最初に出る軸位置の属性（Explodのpostypeと書き方は同じだが効果が少し違う）
keyctrl = 1          ;ヘルパーがコントロール可能かどうか（0=操作不可・1=操作可能）
ownpal = 1           ;ヘルパーが(PalFXなどで)本体の色が変わった時に一緒に変わるかどうか（Explodのownpalと一緒）
size.xscale = 1      ;ヘルパーの横のサイズ
size.yscale = 1      ;ヘルパーの縦のサイズ
helpertype = Player  ;ヘルパーの属性：画面スクロールの影響を受けるか否かを決める
                     ;（Player=影響有り・画面外に出られない　Normal=影響無し・画面外に出られる）

[State -2, ヘルパーを出す]
type = Helper
triggerall=var(37)!=13
triggerall = NumHelper(3) = 0
trigger1 = palno = 7
name = "Kyurem3"  ;ヘルパーの名前
stateno = 3       ;ヘルパーが最初に行くステート
ID = 3            ;ヘルパーのＩＤナンバー
pos = -60         ;ヘルパーの出現位置
postype = p1         ;ヘルパーの最初に出る軸位置の属性（Explodのpostypeと書き方は同じだが効果が少し違う）
keyctrl = 1          ;ヘルパーがコントロール可能かどうか（0=操作不可・1=操作可能）
ownpal = 1           ;ヘルパーが(PalFXなどで)本体の色が変わった時に一緒に変わるかどうか（Explodのownpalと一緒）
size.xscale = 1      ;ヘルパーの横のサイズ
size.yscale = 1      ;ヘルパーの縦のサイズ
helpertype = Player  ;ヘルパーの属性：画面スクロールの影響を受けるか否かを決める
                     ;（Player=影響有り・画面外に出られない　Normal=影響無し・画面外に出られる）
[State -2, デバッグ表示]
type = DisplayToClipboard
trigger1 = ishelper
text = "ID=%d,TGT=%d,V13=%d,V31=%d"
params = id,numtarget,var(13),var(31)

;Ctrl+Dの白い文字のデバッグモード表示を加える
[State -2, デバッグ表示]
type = DisplayToClipboard
trigger1 = !ishelper
text = "Var(5)-Button=%d,Pos X=%d,Y=%d,deprivedstate=%d,numh=%d"
params = var(5),floor(Pos X),floor(Pos Y),ifelse(var(13)=var(31)+13,0,1),numhelper

[State -2, 黒ドナルドライフ回復]
type = lifeadd
triggerall = 1
triggerall = Life >= 1
triggerall = Life <= 200
trigger1 = palno = 7
value = 10

[State -2, 黒ドナルドライフ回復]
type = lifeadd
triggerall = Time = 1
triggerall = Life >= 200
trigger1 = palno = 7
value = 10

[State -2, 黒ドナルドゲージ回復]
type = poweradd
triggerall = 1
triggerall = Life <= 300
trigger1 = palno = 7
value = 50

[State -2, 黒ドナルドゲージ回復]
type = poweradd
triggerall = 1
triggerall = Life >= 300
triggerall = Life <= 600
trigger1 = palno = 7
value = 5

[State -2, 黒ドナルドゲージ回復]
type = poweradd
triggerall = 1
triggerall = Life >= 600
trigger1 = palno = 7
value = 1

[State -2, 黒ドナルド攻撃力アップ]
type = attackmulset
triggerall = 1
triggerall = Life <= 250
trigger1 = palno = 7
value = 10

[State -2, 黒ドナルド攻撃力アップ]
type = attackmulset
triggerall = 1
triggerall = Life >= 250
triggerall = Life <= 500
trigger1 = palno = 7
value = 5

[State -2, 黒ドナルド攻撃力アップ]
type = attackmulset
triggerall = 1
triggerall = Life >= 500
trigger1 = palno = 7
value = 1.5

[State -2, 黒ドナルド防御力アップ]
type = defencemulset
triggerall = 1
triggerall = Life <= 250
trigger1 = palno = 7
trigger2 = parent,palno = 7
value = ifelse((palno=7),0.1,0.00000000000000000001)

[State -2, 黒ドナルド防御力アップ]
type = defencemulset
triggerall = 1
triggerall = Life >= 250
triggerall = Life <= 500
trigger1 = palno = 7
value = 0.5

[State -2, 黒ドナルド防御力アップ]
type = defencemulset
triggerall = 1
triggerall = Life >= 500
trigger1 = palno = 7
value = 1

[State -2, ]
type = lifeadd
trigger1 = 1
trigger1 = palno = 7
trigger1 = GetHitVar(damage) >= 200
value = 0 + (GetHitVar(damage))

[State -2]
type = HitOverride
trigger1 = palno = 7
attr = SCA,AA,AT,AP
slot = 1
stateno = 702
time = -1
forceair = 0

[State -2]
type = helper
trigger1 = palno=7&&numhelper(195020)=0&&enemy,life>=enemy,lifemax*0.9&&var(55)<=1&&(stateno!=[2000,2005])
id = 195020
persistent = 1
name = "bari"
pos = 0,0
postype = P1
stateno = 195020+(EnemyNear,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT)
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 0, Green PalFX]
type = PalFX
trigger1 = palno = 7
trigger1 = (GameTime%40) = 0
time = 300
add = 0,0,0
mul = 100,256,100
sinadd = 70,0,40,50
invertall = 0
color = 256

[State -2]
type = Trans
trigger1 = palno=7&&enemy,life>=enemy,lifemax*0.9&&var(55)<=49&&alive
trans = addalpha
alpha = 200,230

[State -2, Helper]
type = Helper
trigger1 = numhelper(23001) = 0
trigger1 = ctrl
trigger1 = PalNo = 7
helpertype = normal
name = "ABOMBKILLER"
ID = 23000
stateno = 23000
pos = 0,0
postype = p1
supermove = 999999
pausemove = 999999

[State -2, Helper]
type = Helper
trigger1 = numhelper(23001) = 0
trigger1 = ctrl
trigger1 = PalNo = 7
helpertype = normal
name = "ABOMBKILLER"
ID = 23001
stateno = 23001
pos = 0,0
postype = p1
supermove = 999999
pausemove = 999999

;-------------------------------------------------------------------------------
;8P (CRAZY GHOST PALETTE)

[State -2];オリコン状態
type = CtrlSet
trigger1 = Movetype = H
trigger2 = movecontact
triggerall = alive
triggerall = PalNo = 8
value = 1

[State -2, イントロ終了攻撃対策]
type = NotHitBy
triggerall = PalNo = 8
trigger1 = Movetype = H
value = SCA
time = 2
supermovetime = 99999
pausemovetime = 99999
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = Palno = 8
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = Palno = 8
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = Palno = 8
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = Palno = 8
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = Palno = 8
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State -2, 10]
type = Offset
triggerall = Palno = 8
triggerall = Alive = 1
trigger1 = 1
trigger2 = 1
trigger3 = 1
trigger4 = 1
trigger5 = 1
trigger6 = 1
trigger7 = 1
trigger8 = 1
trigger9 = 1
trigger10 = 1
trigger11 = 1
trigger12 = 1
trigger13 = Life < 500
trigger14 = Life < 500
trigger15 = Life < 500
trigger16 = Life < 500
trigger17 = Life < 500
trigger18 = Life < 500
trigger19 = Life < 500
trigger20 = Life < 500
trigger21 = Life < 500
trigger22 = Life < 500
trigger23 = Life < 500
trigger24 = Life < 500
trigger25 = Life < 500
trigger26 = Life < 500
trigger27 = Life < 500
trigger28 = Life < 500
trigger29 = Life < 500
trigger30 = Life < 500
trigger31 = Life < 500
trigger32 = Life < 500
trigger33 = Life < 500
trigger34 = Life < 500
trigger35 = Life < 500
trigger36 = Life < 500
x = -Random%600+300
y = -Random%480+240
IgnoreHitPause = 1

[State 701, 残像]
type = AfterImage
triggerall = Alive = 1
trigger1 = Palno = 8
trigger1 = time = 0
time = -1
trans = sub
timegap = 1
framegap = 2
length = 60
paladd = 0,0,0
palmul = 1,1,1

[State 3002]
type = PalFX
trigger1 = Palno = 8
Time = 1
mul = 100,100,100
IgnoreHitPause = 1

[State 3002]
type = lifeadd
trigger1 = Palno = 8
Time = 1
value = 1

;-------------------------------------------------------------------------------
;9P (METAL PALETTE)

[State -2];移動速度DOWN
type = VelMul
triggerall = 1
trigger1 = PalNo = 9
x = 0.9
y = 0.9
ignorehitpause = 1

[State -2];移動速度DOWN
type = VelMul
triggerall = Vel Y > 0
trigger1 = PalNo = 9
y = 1.3
ignorehitpause = 1

[State -2];攻撃力1.5倍
type = attackmulset
triggerall = 1
triggerall = Vel Y < 0
trigger1 = PalNo = 9
value = 1.2
ignorehitpause = 1

[State 52, Shaking]
type = EnvShake
triggerall = time = 1
trigger1 = stateno = 52
trigger1 = PalNo = 9
time = 20
ignorehitpause = 1

[State -2]
type = AssertSpecial
trigger1 = 1
trigger1 = PalNo = 9
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State 1020, 2]
type = Projectile
triggerall = time = 1
trigger1 = stateno = 52
trigger1 = PalNo = 9
projID = 989
projanim = 989
offset = 0, 0
velocity = 0, 0
attr = S, HA
damage = 30,30
projremovetime = 20         ;飛び道具が消えるまでの時間（-1なので画面外に出るか当たるまで消えない）
animtype = Medium
pausetime = 0,0
sparkxy = 0, 0
sparkno = s99999
hitsound = 6,0
guardsound = 6,0
ground.type = Trip
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -4,90
air.animtype = Back
air.velocity = -4,90
air.juggle = 3
projedgebound = 200
projstagebound = 200
fall = 1
fall.recover=0

[State -2];移動速度DOWN
type = attackmulset
triggerall = Vel Y > 0
trigger1 = PalNo = 9
value = 2
ignorehitpause = 1

[State -2,体力]
type = LifeAdd
trigger1 = Palno = 9
trigger1 = !Ishelper
trigger1 = NumHelper(888) = 1
trigger1 = Helper(888),Time = 1
value = Helper(888),Var(8)/4
kill = 1
IgnoreHitPause = 1
ignorehitpause = 1

[State 4020, 1]
type = NotHitBy
trigger1 = Palno = 9
value = SCA
time = -1
ignorehitpause = 1

[State -2,ヘルパー]
type = Helper
trigger1 = Palno = 9
trigger1 = NumHelper(888) = 0
helpertype = Player
name = "Hit Box"
ID = 888
stateno = 8888
pos = 0,0
postype = p1
facing = 1
ownpal = 1
ignorehitpause = 1

[State 0, METAL FX]
type = PalFX
trigger1 = Palno = 9
time = 1000
add = 100,100,180
mul = 256,256,256
sinadd = 0,0,0,10
invertall = 1
color = 0

;-------------------------------------------------------------------------------
;10P (OVERPOWERED PALETTE)
[State -2, CannotReversed]
type = SelfState
triggerall = alive || life >= 1
trigger1 = movereversed
trigger1 = palno = 10
value = 703
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State -2];オリコン状態
type = CtrlSet
trigger1 = Movetype = H
trigger2 = movecontact
triggerall = alive
triggerall = PalNo = 10
value = 1

[State -3, ひかる]
type = PalFX
triggerall = palno = 10
trigger1 = (GameTime%60)=0
time = 100
sinadd = 60, 60, 60, 60
ignorehitpause=1

[State -2,体力]
type = LifeAdd
trigger1 = Palno = 10
trigger1 = Life < 500
value = 30
IgnoreHitPause = 1

[State -2,体力]
type = powerAdd
trigger1 = Palno = 10
value = 70
IgnoreHitPause = 1

[State -2];はやい
type = VelMul
triggerall = 1
trigger1 = PalNo = 10
x = 1.2
ignorehitpause = 1

[State -2]
type = HitOverride
trigger1 = palno = 10
attr = SCA,AA,AT,AP
slot = 1
stateno = 703
time = -1
forceair = 0
;------------------------------------------------------------------
; A-BOMB KILLER
[State -2, HitDef]
type = Projectile
trigger1 = palno = 11 && numproj = 0 && time >= 46
projanim = 2
projremove = 1
projremovetime = 9999
projid = 8903
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
sparkno = -1
postype = p2
offset = 0,-60
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S892, 2
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State -2, HitDef]
type = Projectile
trigger1 = palno = 11 && numproj = 0 && time >= 46
projanim = 2
projremove = 1
projremovetime = 9999
projid = 8904
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p2
offset = 0,-60
sparkno = -1
Attr = S, NA
HitFlag = MAFPD
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 35+random%65,35+random%65
PauseTime = 10, 15
HitSound = S892, 2
Ground.Type = Low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 10, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1

[State -2, HitDef]
type = Projectile
trigger1 = palno = 11 && numproj = 0 && time >= 46
projanim = 2
projremove = 1
projremovetime = 9999
projpriority = 999999999999999
projheightbound = -2000000000, 2000000000
ProjEdgeBound = 2000000000
ProjStageBound = 2000000000
postype = p2
offset = 0,-60
Attr = S, NA
HitFlag = MAFD
sparkno = -1
AnimType = Hard
Air.AnimType = Back
Priority = 7, Hit
Damage = 15,15
PauseTime = 10, 15
Ground.Type = low
Ground.SlideTime = 43
Ground.HitTime = 52
Guard.HitTime = 25
Air.HitTime  = 36
Guard.CtrlTime = 27
Guard.Dist = 70
Ground.Velocity = -4, 15
Guard.Velocity = -6
Air.Velocity = -4, 15
AirGuard.Velocity = -3,-4
AirGuard.CtrlTime = 24
Fall = 0
Air.Fall = 0
getpower = 0, 0
GivePower = 0, -5120
palfx.time = 60
palfx.add = 100,-180,-180
palfx.sinadd = -80,-80,-80,10
ignorehitpause = 1
;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

;This controller plays a sound everytime the player lands from a jump, or
;from a back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0

[State ]
type = RemoveExplod
trigger1 = anim != 11345
id = 17172
