; _____________________________________
;| Rare Akuma by Phantom.of.the.Server |
;ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
;edited by thelordanon (AKA Anonymous)
;==============================================================================================
;=======================================<COMMON STATES>========================================
;==============================================================================================

;==========<PARRY>==========
[Statedef 700]
type=U
physics=N
movetype=I
anim=700
velset=0,0
ctrl=0
sprpriority=2
poweradd=78

[State 700, hb]
type=hitby
trigger1=1
value=SCA,AT
time=1
[State 700, stop]
type=posfreeze
trigger1=1
value=1

[State 700, pause]
type=pause
trigger1=!time && var(20)<=0
time=15
movetime=15
endcmdbuftime=15
pausebg=0
[State 700, pause]
type=pause
trigger1= !time && numenemy && var(20)<=0
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 700, blueflash]
type=palfx
trigger1= !time
add=0,50,255
sinadd=0,-50,-255,60
time=15
[State 700, snd]
type=playsnd
trigger1= !time
value=3,(random<500)
channel=0
freqmul=ifelse(ishelper, 1.5, 1)

[State 700, snd]
type=playsnd
trigger1= !time
value=7,3
[State 700, spark]
type=explod
trigger1= animelem=2
anim=7200
ID=7200
sprpriority=5
postype=p1
pos=36,-65
pausemovetime=60
ownpal=1
scale=.5,.5

[State 700, nowalk]
type=assertspecial
trigger1=1
flag=nowalk
[State 700, end]
type=changestate
trigger1= !animtime
value=ifelse(statetype=A, 51, 0)
ctrl=1


;==========<POWER CHARGE>==========
[Statedef 740]
type=S
physics=S
movetype=I
anim=740
ctrl=0
velset=0,0

[State 740, power]
type=poweradd
triggerall= anim=740 && power<powermax
trigger1= var(59)<=0 && (command="holdb" && command="holdy")
trigger2= var(59)>=1
value=50

[State 740, snd]
type=playsnd
trigger1= !time
value=3,2
channel=0
freqmul=ifelse(ishelper, 1.5, 1)

[State 740, shake]
type=envshake
trigger1= anim=740 && !(time%4)
time=4
freq=80
ampl=2
[State 740, flash]
type=palfx
trigger1= anim=740 && !(time%12)
add=80,20,0
sinadd=80,20,0,12
time=12
[State 740, flash]
type=palfx
trigger1= anim=741
add=0,0,0
time=1
persistent=0

[State 740, fx]
type=helper
trigger1= anim=740 && !numhelper(7240) && !ishelper
helpertype=normal
stateno=7240
ID=7240
name="Power Charge"
postype=p1
ownpal=1
persistent=0
pausemovetime=65535
supermovetime=65535
[State 740, aura]
type=helper
trigger1= anim=740 && !ishelper
trigger1= animelemtime(5)>=0 && !numhelper(6000)
helpertype=normal
stateno=6000
ID=6000
postype=p1
pausemovetime=65535
supermovetime=65535
ownpal=1

[State 740, anim]
type=changeanim
triggerall= anim=740
trigger1= var(59)<=0 && (command!="holdb" || command!="holdy")
trigger2= roundstate!=2
trigger3= var(59)>=1 && (inguarddist || p2movetype=A || p2bodydist x<160)
value=741

[State 740, ctrl]
type=ctrlset
trigger1=anim=741
value=1

[State 740, stopsnd]
type=stopsnd
trigger1= anim=741
channel=0
freqmul=ifelse(ishelper, 1.5, 1)
persistent=0
[State 740, end]
type=changestate
trigger1= anim=741 && !animtime
value=0
ctrl=1


;====================<STANDING>====================
[Statedef 0]
type=S
physics=S
movetype=I
velset=0,0
sprpriority=0

[State 0, gone]
type=removeexplod
trigger1= ishelper && !ishelper
[State 0, gone]
type=destroyself
trigger1= ishelper && !ishelper
[State 0, gone]
type=destroyself
triggerall= ishelper
trigger1= !ishelper(1)
trigger2= root, name != "Rare Akuma"
trigger2= root, authorname="Phantom.of.the.Server"
ignorehitpause = 0

[State 0, anim]
type=changeanim
trigger1= anim!=0 && anim!=5
trigger2= anim=5 && !animtime
value=0

[State 0, dead]
type=changestate
trigger1= !alive
value=5050


;===================<JUMPING>================
[Statedef 40]
type=S
physics=S
anim=40
ctrl=0
sprpriority=1
facep2=1

[State 40, var]
type=varset
trigger1= var(59)>=1
sysvar(1)=ifelse((enemynear,movetype!=A || backedgebodydist<=10),1,ifelse((enemynear,movetype=A),-1,0))
[State 40, var]
type=varset
trigger1= var(59)<=0
sysvar(1)=ifelse(!time,0,ifelse(command="holdfwd",1,ifelse(command="holdback",-1,sysvar(1))))

[State 40, var]
type=varset
trigger1= !time
var(3)=0
[State 40, var]
type=varset
trigger1= !time
trigger1= var(59)<=0 && command="superjump"
trigger2= prevstateno=240
var(3)=1

[State 40, vel]
type=velset
trigger1= !animtime
x=ifelse(!sysvar(1),const(velocity.jump.neu.x),ifelse(sysvar(1)=1,const(velocity.jump.fwd.x),const(velocity.jump.back.x)))
y= ifelse(var(3)=1, 1.33, 1) * const(velocity.jump.y)

[State 40, end]
type=changestate
trigger1= !animtime
value=50
ctrl=1

[Statedef 50]
type=A
physics=A
anim= ifelse(!(vel x), 41, ifelse((vel x)>0, 42, 43))
[State 50, snd]
type=playsnd
trigger1= !time
value=0,ifelse(ishelper,42,40)
[State 50]
type=turn
trigger1= var(3)=1 && p2dist x<0


[Statedef 51]
type=A
physics=A
[State 51, anim]
type=changeanim
trigger1=!time
value=51
[State 51, vel]
type=velmul
trigger1=!ctrl
x=.9

[State 51, sts]
type=statetypeset
trigger1= 1
physics=A
[State 51, sts]
type=statetypeset
trigger1= prevstateno=1507 && pos y<-32 && time<=8
physics=N


[Statedef 52]
type=S
physics=S
ctrl=0
anim=47
ctrl=1
velset=0,0
[State 52, pos]
type=posset
trigger1= 1
y=0

[State 52, anim48]
type=changeanim
trigger1= !time && (prevstateno=222 || prevstateno=1050 || (prevstateno=[1200,1250]) || (prevstateno=[1301,1310]) || prevstateno=3050)
value=48
[State 52, anim283]
type=changeanim
trigger1= !time && prevstateno=282
value=283
[State 52, anim1102]
type=changeanim
trigger1= !time && ((prevstateno=[1100,1110]) || prevstateno=3100)
value=1102
[State 52, anim1103]
type=changeanim
trigger1= !time && prevstateno=4302
value=1103

[State 52, snd]
type=playsnd
trigger1= !time
value=0,52
[State 52, dust]
type=explod
trigger1= !time
anim=7102
ID=7102
sprpriority=-2
postype=p1
scale=.5,.5
pausemovetime=-1
supermovetime=-1
ownpal=1

[State 52, end]
type=changestate
trigger1= !animtime
value=0
ctrl=1


;======================<RUN>===========================
[Statedef 100]
type=S
physics=S
anim=100
ctrl=1
sprpriority=1
[State 100,as]
type=assertspecial
trigger1= 1
flag=nowalk
flag2=noautoturn
[State 100, vel]
type=velSet
trigger1= anim=100
x=const(velocity.run.fwd.x)
[State 100, steps]
type=playsnd
trigger1= anim=100 && (animelem=3 || animelem=6)
value=0,100
[State 100, change]
type=changeanim
triggerall= time>7 && anim=100
trigger1= var(59)<=0 && command!="holdfwd"
trigger2= var(59)>=1 && p2dist x<60
value=101
persistent=0
[State 100, snd]
type=playsnd
trigger1= anim=101
value=0,101
persistent=0
[State 100, end]
type=changestate
trigger1= anim=101 && !animtime
value=0
ctrl=1


;========================<FORWARD DASH>==========================
[Statedef 102]
type=S
movetype=I
physics=S
velset=0,0
anim=102
ctrl=0
sprpriority=1
[State 102, vel]
type=velset
trigger1= animelem=2
x=-1.2*const(velocity.run.back.x)
y=const(velocity.run.back.y)
[State 102, snd]
type=playsnd
trigger1= animelem=2
value=0,105
[State 102, dust]
type=explod
trigger1= animelem=2
anim=7103
ID=7103
sprpriority=3
postype=p1
vel=1,0
pausemovetime=-1
supermovetime=-1
ownpal=1
[State 102, end]
type=changestate
trigger1= !animtime
value=0
ctrl=1
[State 102, end]
type=changestate
triggerall= (animelemtime(2)>4) && (animelemtime(3)<0)
trigger1= var(59)<=0 && command="holdfwd"
trigger2= var(59)>=1 && p2dist x>=60
value=100


;========================<BACK DASH>==========================
[Statedef 105]
type=S
movetype=I
physics=S
velset=0,0
anim=105
ctrl=0
sprpriority=1
[State 105, vel]
type=velset
trigger1= animelem=2
x=const(velocity.run.back.x)
y=const(velocity.run.back.y)
[State 105, snd]
type=playsnd
trigger1= animelem=2
value=0,105
[State 105, dust]
type=explod
trigger1= animelem=2
anim=7103
ID=7103
sprpriority=3
postype=p1
pos=-17,0
vel=-1,0
pausemovetime=-1
supermovetime=-1
ownpal=1
[State 105, end]
type=changestate
trigger1= !animtime
value=0
ctrl=1


;==========<GUARD>==========
;---START---
[Statedef 120]
type=U
physics=U
[State 120, vel]
type=velset
trigger1= !time && statetype!=A
x=0
y=0
[State 120, anim]
type=changeanim
trigger1= !time
value=120+(statetype=C)+(statetype=A)*2
[State 120, sts]
type=statetypeset
trigger1= !time && statetype=S
physics=S
[State 120, sts]
type=statetypeset
trigger1= !time && statetype=C
physics=C
[State 120, sts]
type=statetypeset
trigger1= !time && statetype=A
physics=A
[State 120, Hi to Lo]
type=statetypeset
trigger1= var(59)<=0 && statetype=S && command="holddown"
trigger2= var(59)>=1 && statetype=S && (enemynear,movetype=A) && (enemynear,statetype=C)
statetype=C
physics=C
[State 120, Lo to Hi]
type=statetypeset
trigger1= var(59)<=0 && statetype=C && command!="holddown"
trigger2= var(59)>=1 && statetype=C && (enemynear,movetype=A) && (enemynear,statetype!=C)
statetype=S
physics=S
[State 120, end]
type=changestate
trigger1= !animtime || var(59)>=1
value=130+(statetype=C)+(statetype=A)*2
[State 120, stop]
type=changestate
trigger1= (var(59)<=0 && command!="holdback")
trigger2= !inguarddist
value=140


;---STAND GUARD (guarding)---
[Statedef 130]
type=S
physics=S
[State 130, anim]
type=changeanim
trigger1= anim!=130
value=130
[State 130, Hi to Lo]
type=changestate
trigger1= var(59)<=0 && command="holddown"
trigger2= var(59)>=1 && (enemynear,movetype=A) && (enemynear,statetype=C)
value=131
[State 130, Stop Guarding]
type=changestate
trigger1= (var(59)<=0 && command!="holdback")
trigger2= !inguarddist
value=140


;---CROUCH GUARD (guarding)---
[Statedef 131]
type=C
physics=C
[State 131, anim]
type=changeanim
trigger1= anim!=131
value=131
[State 131, Lo to Hi]
type=changestate
trigger1= var(59)<=0 && command!="holddown"
trigger2= var(59)>=1 && (enemynear,movetype=A) && (enemynear,statetype!=C)
value=130
[State 131, Stop Guarding]
type=changestate
trigger1= (var(59)<=0 && command!="holdback")
trigger2= !inguarddist
value=140


;---AIR GUARD (guarding)---
[Statedef 132]
type=A
physics=A
[State 132, anim]
type=changeanim
trigger1= anim!=132
value=132
[State 132, grav]
type=veladd
trigger1= 1
y=const(movement.yaccel)
[State 132, var]
type=varset
trigger1= 1
sysvar(0)=(pos y>=0) && (vel y>0)
[State 132, vel]
type=velset
trigger1= sysvar(0)
y=0
[State 132, pos]
type=posset
trigger1= sysvar(0)
y=0
[State 132, end]
type=changestate
trigger1= sysvar(0) && inguarddist
trigger1= (var(59)<=0 && command="holdback") || var(59)>=1
value=130
[State 132, end]
type=changestate
trigger1= sysvar(0)
value=52
[State 132, stop guarding]
type=changestate
trigger1= (var(59)<=0 && command!="holdback")
trigger2= !inguarddist
value=140


;---GUARD (end)---
[Statedef 140]
type=U
physics=U
ctrl=1
[State 140, anim]
type=changeanim
trigger1= !time
value=140+(statetype=C)+(statetype=A)*2
[State 140, sts]
type=statetypeset
trigger1= !time && statetype=S
physics=S
[State 140, sts]
type=statetypeset
trigger1= !time && statetype=C
physics=C
[State 140, sts]
type=statetypeset
trigger1= !time && statetype=A
physics=A
[State 140, Hi to Lo]
type=statetypeset
trigger1= var(59)<=0 && statetype=S && command="holddown"
trigger2= var(59)>=1 && statetype=S && (enemynear,movetype=A) && (enemynear,statetype=C)
statetype=C
physics=C
[State 140, Lo to Hi]
type=statetypeset
trigger1= var(59)<=0 && statetype=C && command!="holddown"
trigger2= var(59)>=1 && statetype=C && (enemynear,movetype=A) && (enemynear,statetype!=C)
statetype=S
physics=S
[State 140, 5]
type=changestate
trigger1= !animtime
value=(statetype=C)*11+(statetype=A)*51

;---SGUARDHIT (shaking)---
[Statedef 150]
type=S
movetype=H
physics=N
velset=0,0
[State 150, anim]
type=changeanim
trigger1= 1
value=150
[State 150, end]
type=changestate
trigger1= hitshakeover
value=151+2*((var(59)<=0 && command="holddown") || (var(59)>=1 && (enemynear,movetype=A) && (enemynear,statetype=C)))
[State 150, Hi to Lo]
type=statetypeset
trigger1= var(59)<=0 && statetype=S && command="holddown"
trigger2= var(59)>=1 && statetype=S && (enemynear,movetype=A) && (enemynear,statetype=C)
statetype=C
physics=C
[State 150, Lo to Hi]
type=statetypeset
trigger1= var(59)<=0 && statetype=C && command!="holddown"
trigger2= var(59)>=1 && statetype=C && (enemynear,movetype=A) && (enemynear,statetype!=C)
statetype=S
physics=S

;---SGUARDHIT2 (knocked back)---
[Statedef 151]
type=S
movetype=H
physics=S
anim=150
[State 151, vel]
type=hitvelset
trigger1= !time
x=1
[State 151, vel]
type=velset
trigger1= time=gethitvar(slidetime)
trigger2= hitover
x=0
[State 151, ctrl]
type=ctrlset
trigger1= time=gethitvar(ctrltime)
value=1
[State 151, Hi to Lo]
type=statetypeset
trigger1= var(59)<=0 && statetype=S && command="holddown"
trigger2= var(59)>=1 && statetype=S && (enemynear,movetype=A) && (enemynear,statetype=C)
statetype=C
physics=C
[State 151, Lo to Hi]
type=statetypeset
trigger1= var(59)<=0 && statetype=C && command!="holddown"
trigger2= var(59)>=1 && statetype=C && (enemynear,movetype=A) && (enemynear,statetype!=C)
statetype=S
physics=S
[State 151, end]
type=changestate
trigger1= hitover
value=130
ctrl=1

;---CGUARDHIT (shaking)---
[Statedef 152]
type=C
movetype=H
physics=N
velset=0,0
[State 152, anim]
type=changeanim
trigger1= 1
value=151
[State 152, end]
type=changestate
trigger1= hitshakeover
value=151+2*((var(59)<=0 && command="holddown") || (var(59)>=1 && (enemynear,movetype=A) && (enemynear,statetype=C)))
[State 152, Hi to Lo]
type=statetypeset
trigger1= var(59)<=0 && statetype=S && command="holddown"
trigger2= var(59)>=1 && statetype=S && (enemynear,movetype=A) && (enemynear,statetype=C)
statetype=C
physics=C
[State 152, Lo to Hi]
type=statetypeset
trigger1= var(59)<=0 && statetype=C && command!="holddown"
trigger2= var(59)>=1 && statetype=C && (enemynear,movetype=A) && (enemynear,statetype!=C)
statetype=S
physics=S

;---CGUARDHIT2 (knocked back)---
[Statedef 153]
type=C
movetype=H
physics=C
anim=151
[State 153, vel]
type=hitvelset
trigger1= !time
x=1
[State 153, vel]
type=velset
trigger1= time=gethitvar(slidetime)
trigger2= hitover
x=0
[State 153, ctrl]
type=ctrlset
trigger1= time=gethitvar(ctrltime)
value=1
[State 153, Hi to Lo]
type=statetypeset
trigger1= var(59)<=0 && statetype=S && command="holddown"
trigger2= var(59)>=1 && statetype=S && (enemynear,movetype=A) && (enemynear,statetype=C)
statetype=C
physics=C
[State 153, Lo to Hi]
type=statetypeset
trigger1= var(59)<=0 && statetype=C && command!="holddown"
trigger2= var(59)>=1 && statetype=C && (enemynear,movetype=A) && (enemynear,statetype!=C)
statetype=S
physics=S
[State 153, end]
type=changestate
trigger1= hitover
value=131
ctrl=1

;---AGUARDHIT (shaking)---
[Statedef 154]
type=A
movetype=H
physics=N
velset=0,0
[State 154, anim]
type=changeanim
trigger1= 1
value=152
[State 154, end]
type=changestate
trigger1= hitshakeover
value=155


;---AGUARDHIT2 (knocked away)---
[Statedef 155]
type=A
movetype=H
physics=N
anim=152
[State 155, vel]
type=hitvelset
trigger1= !time
x=1
y=1
[State 155, vel]
type=veladd
trigger1= 1
y=const(movement.yaccel)
[State 155, ctrl]
type=ctrlset
trigger1= time=gethitvar(ctrltime)
value=1
[State 155, var]
type=varset
trigger1= 1
sysvar(0)=(pos y>=0) && (vel y>0)
[State 155, vel]
type=velset
trigger1= sysvar(0)
y=0
[State 155, pos]
type=posset
trigger1= sysvar(0)
y=0
[State 155, end]
type=changestate
trigger1= sysvar(0) && inguarddist
trigger1= (var(59)<=0 && command="holdback") || var(59)>=1
value=130
[State 155, end]
type=changestate
trigger1= sysvar(0)
value=52


;==========<TAUNT>==========
[Statedef 195]
type=S
movetype=A
physics=S
juggle=0
anim=195
velset=0,0
sprpriority=1
poweradd=500
ctrl=0

[State 195, hit]
type=hitdef
trigger1= animelem=5
attr=S,NA 
damage=35,7
animtype=Up
guardflag=MA 
hitflag=MAFD
priority=4,Hit 
pausetime=8,8
sparkno=0
guard.sparkno=40
sparkxy=-10,-34
hitsound=s2,3
guardsound=s2,0
ground.type=High
ground.slidetime=9
ground.hittime=12
ground.velocity=-4,-16
guard.velocity=-12
air.type=Low
air.velocity=-4,-16
getpower= ifelse(p2movetype=H,96,192), 48
givepower=0
envshake.time=9
envshake.freq=60
envshake.ampl=2
palfx.sinadd=64,64,64,4
palfx.mul=128,128,128
palfx.time=110
fall=1
airguard.ctrltime= 16
airguard.velocity= -8, -1.5

[State 195, rocks]
type=projectile
trigger1= animelemtime(5)=[0,7]
ProjID=195
projanim=6130+(random%5)
projhitanim=-1
projremove=0
projscale= ifelse(random<500,-1,1)*(.5+(random/2000.0)), ifelse(random<500,-1,1)*(.5+(random/2000.0))
velocity= 0, 2
accel=0,.25
projsprpriority=4
projedgebound=80
projheightbound=-9999,0
postype=back
offset= ceil(random/3.125), ceil(pos y-screenpos y)-40
attr=S,NP
damage=14,0
animtype=Hard
guardflag=MH 
hitflag=MAFD
priority=7,Hit
pausetime=0,12
sparkno=2
guard.sparkno=40 
sparkxy=-10,0
hitsound=s2,1
guardsound=s2,0
ground.type=High
ground.slidetime=10
ground.hittime=10
ground.velocity=0,0
down.velocity=0,0
air.velocity=0,-4
getpower= ifelse(p2movetype=H,96,192), 48
fall=0
fall.recover=1
pausemovetime=1
supermovetime=1

[State 195, flames]
type=helper
triggerall= movehit && numtarget && !numhelper(7181)
trigger1= !(target,time) && (target,movetype=H)
helpertype=normal
stateno=7181
ID=7181
name="flames"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
pausemovetime=var(20)
ignorehitpause=1
persistent=0

[State 195, aura]
type=helper
trigger1= animelem=5 && !ishelper
helpertype=normal
stateno=6000
ID=6000
postype=p1
ownpal=1
persistent=0
pausemovetime=65535
supermovetime=65535
ignorehitpause=1
[State 195, metsu]
type=helper
trigger1= animelem=5 && !ishelper
helpertype=normal
stateno=6002
ID=6002
postype=p1
pos=-5,-132
facing=ifelse(facing=1,1,-1)
ownpal=1
persistent=0
pausemovetime=65535
supermovetime=65535
ignorehitpause=1
[State 195, orochi] ;I added this -- thelordanon
type=helper
trigger1= animelem=5 && !ishelper && random > 750
helpertype=normal
stateno=101134
ID=101134
name="Orochi"
postype=p1
pos=0,0
ownpal=1
ignorehitpause = 1
persistent=0
pausemovetime=9999999999999999999
supermovetime=9999999999999999999

[State 195, snd]
type=playsnd
trigger1= animelem=5
value=4,10
channel=0
freqmul=ifelse(ishelper, 1.5, 1)
ignorehitpause=1
[State 195, snd]
type=playsnd
trigger1= animelem=5
value=5,4
ignorehitpause=1
[State 195, dust]
type=explod
trigger1= animelem=5
anim=7104
ID=7104
sprpriority=-2
postype=p1
pos=-34,0
scale=.75,.75
pausemovetime=-1
supermovetime=-1
ownpal=1
ignorehitpause=1
[State 195, shake]
type=envshake
trigger1= animelem=5
time=18
freq=60
ampl=4
ignorehitpause=1

[State 195, end]
type=changestate
trigger1= !animtime
value=0
ctrl=1


;==========<LOSE (Time over)>==========
[Statedef 170]
type=S
ctrl=0
anim=170
velset=0,0
[State 170, nhb]
type=nothitby
trigger1= 1
value=SCA
time=1
[State 170, dust]
type=explod
trigger1= animelem=2
anim=7104
ID=7104
sprpriority=-2
postype=p1
pos=-6,0
ownpal=1
pausemovetime=-1
supermovetime=-1
scale=.5,.5
[State 170, snd]
type=playsnd
trigger1= animelem=2
value=0,52


;==========<DRAWGAME (Time over)>==========
[Statedef 175]
type=S
ctrl=0
anim=170
velset=0,0
[State 175, end]
type=changestate
trigger1= 1
value=170


;==========<INITIALIZE>==========
[Statedef 5900]
type=S
[State 5900, varreset]
type=varrangeset
trigger1= !roundsexisted
value=0
[State 5900, varreset]
type=varrangeset
trigger1= !roundsexisted
fvalue=0

[State 5900, intro]
type=changestate
trigger1= roundno=1 || !roundsexisted
trigger1= command="holdfwd" && command="holdup"
value=196
[State 5900, intro]
type=changestate
trigger1= roundno=1 || !roundsexisted
trigger1= command="holdfwd" && command="holdback"
value=188
[State 5900, intro]
type=changestate
trigger1= roundno=1 || !roundsexisted
trigger1= command="holdup" && command="holddown"
value=191
[State 5900, intro]
type=changestate
trigger1= roundno=1 || !roundsexisted
trigger1= command="holdfwd" || command="holdback"
value=192
[State 5900, intro]
type=changestate
trigger1= roundno=1 || !roundsexisted
trigger1= command="holddown"
value=194
[State 5900, intro]
type=changestate
trigger1= roundno=1 || !roundsexisted
trigger1= command="holdup"
value=177

;[State 5900, intro]
;type=changestate
;trigger1= roundno=1 || !roundsexisted
;value=ifelse(random<143,181,ifelse(random<167,182,ifelse(random<200,187,ifelse(random<250,188,ifelse(random<333,191,ifelse(random<500,192,194))))))

[State 5900, intro]
type=changestate
trigger1= (roundno=1 || !roundsexisted) && random>980
value=196
[State 5900, intro]
type=changestate
trigger1= (roundno=1 || !roundsexisted) && random<500
value=ifelse(random<250,177,ifelse(random<333,181,ifelse(random<500,182,187)))
[State 5900, intro]
type=changestate
trigger1= (roundno=1 || !roundsexisted)
value=ifelse(random<250,188,ifelse(random<333,191,ifelse(random<500,192,194)))


[State 5900, end]
type=changestate
trigger1= 1
value=0


;==========<PREINTRO>==========
[Statedef 190]
type=S
ctrl=0
velset=0,0
[State 190, intro]
type=changestate
trigger1= 1
value=0


;==========<INTRO 3>==========
[Statedef 181]
type=S
anim=181
[State 181, intro]
type=assertspecial
trigger1= 1
flag=intro

[State 181, kanji]
type=explod
trigger1= !time && !ishelper
anim=6010
ID=6010
sprpriority=1
postype=p1
facing=ifelse(facing=1,1,-1)
pos=ifelse(facing=1,0,32)
bindtime=-1
removeongethit=1
ownpal=1

[State 181, snd]
type=playsnd
trigger1= time=15
value=4,3
channel=0
freqmul=ifelse(ishelper, 1.5, 1)
[State 181, snd]
type=playsnd
trigger1= time=5
value=9,11
channel=7

[State 181, end]
type=changestate
trigger1= !animtime
value=0


;==========<INTRO 1>==========
[Statedef 182]
type=S
anim=182
[State 182, intro]
type=assertspecial
trigger1= 1
flag=intro

[State 182, aura]
type=helper
trigger1= animelem=7 && !ishelper
helpertype=normal
stateno=6000
ID=6000
postype=p1
ownpal=1
persistent=0
[State 182, metsu]
type=helper
trigger1= animelem=7 && !ishelper
helpertype=normal
stateno=6002
ID=6002
postype=p1
pos=-5,-132
facing=ifelse(facing=1,1,-1)
ownpal=1
persistent=0
[State 182, snd]
type=playsnd
trigger1= animelem=7
value=3,5
channel=0
freqmul=ifelse(ishelper, 1.5, 1)

[State 182, orochi] ;I added this -- thelordanon
type=helper
trigger1 = animelem=7 && !ishelper && random > 500
helpertype=normal
stateno=101155
ID=101155
name="Orochi"
postype=p1
pos=0,0
ownpal=1
ignorehitpause = 1
pausemovetime=9999999999999999999
supermovetime=9999999999999999999

[State 182, snd]
type=playsnd
trigger1= animelem=7
value=5,4

[State 182, dust]
type=explod
trigger1= animelem=7
anim=7104
ID=7104
sprpriority=-2
postype=p1
pos=-34,0
pausemovetime=-1
supermovetime=-1
scale=.75,.75
ownpal=1

[State 182, shake]
type=envshake
trigger1= animelemtime(7)>=0 && animelemtime(26)<0 && !(animelemtime(7)%12)
time=12
freq=60
ampl=4
[State 182, end]
type=changestate
trigger1= !animtime
value=0


;==========<INTRO 2>==========
[Statedef 187]
type=S
anim=187
[State 187, intro]
type=assertspecial
trigger1= 1
flag=intro

[State 187, snd]
type=playsnd
trigger1= !time
value=7,0
[State 187, hadou]
type=explod
trigger1= !time && !ishelper
anim=6000
ID=6020
sprpriority=2
postype=p1
pos=14,0
removetime=320
removeongethit=1
ownpal=1

[State 187, grow]
type=modifyexplod
trigger1= time<40
ID=6020
scale=2,2
trans=addalpha
alpha=256,256
[State 187, normal]
type=modifyexplod
trigger1= time>=40 && time<=240
ID=6020
scale=2-(.005*(time-40)),2-(.005*(time-40))
trans=addalpha
alpha=256,256
[State 187, shrink]
type=modifyexplod
trigger1= time>240 && time<=320
ID=6020
scale=1,1
trans=addalpha
alpha=256-ceil(2.13*(time-240)),256

[State 187, dust]
type=explod
trigger1= time>120 && time<=240
trigger1= ifelse(animelemtime(4)>=0,!(time%12),!(time%9))
anim=7104
ID=7104
sprpriority=-2
postype=p1
pos=ifelse(animelemtime(4)>=0,16,20),0
ownpal=1
pausemovetime=-1
supermovetime=-1
scale=.75,.75

[State 187, snd]
type=playsnd
trigger1= time=60
value=5,12
channel=4
loop=1
[State 187, snd]
type=stopsnd
trigger1= time>=320
channel=4

[State 187, snd]
type=playsnd
trigger1= time=200
value=4,7
channel=0
freqmul=ifelse(ishelper, 1.5, 1)

[State 187, snd]
type=playsnd
trigger1= animelem=11
value=5,4
[State 182, dust]
type=explod
trigger1= animelem=11
anim=7104
ID=7104
sprpriority=-2
postype=p1
pos=-34,0
scale=.75,.75
pausemovetime=-1
supermovetime=-1
ownpal=1

[State 187, shake]
type=envshake
trigger1= animelem=11
time=8
freq=60
ampl=4
[State 187, shake]
type=envshake
trigger1= time>120 && time<=210 && !(time%12)
time=12
freq=60
ampl=ifelse(animelemtime(4)>=0,3,4)

[State 187, orochi] ;I added this -- thelordanon
type=helper
trigger1 = animelem=11 && !ishelper && random > 500
helpertype=normal
stateno=101155
ID=101155
name="Orochi"
postype=p1
pos=0,0
ownpal=1
ignorehitpause = 1
pausemovetime=9999999999999999999
supermovetime=9999999999999999999

[State 187, end]
type=changestate
trigger1= !animtime
value=0


;========================<INTRO FLYING>=============================
[Statedef 177]
type=A
physics=N
movetype=I
anim=177
ctrl=0
sprpriority=-1
[State 177, intro]
type=assertspecial
trigger1= 1
flag=intro

[State 177, bound]
type=screenbound
trigger1=1
value=1
movecamera=1,0
[State 177, pos]
type=posset
trigger1= !time
y=-360

[State 177, snd]
type=playsnd
trigger1= time=5
value=9,17
channel=7
[State 177]
type=assertspecial
trigger1= time>=5 && animelemtime(2)<0
flag=nomusic

[State 177, vel]
type=changeanim
trigger1=pos y<0
value=177
elem=1
[State 177, vel]
type=changeanim
trigger1= pos y>=0 && animelemtime(2)<0
value=177
elem=2

[State 177, vel]
type=velset
trigger1= animelemtime(2)<0
y=1
[State 177, vel]
type=velset
trigger1= animelemtime(2)>=0
y=0
[State 177, stop]
type=posset
trigger1= animelemtime(2)>=0
y=0

[State 177, flash]
type=explod
trigger1= animelemtime(2)<0 && (time%3)=0
anim=6104
sprpriority=-2
postype=p1
pos=0,ceil(-screenpos y+120)
facing=ifelse(random<500,-1,1)
random=80,240
scale=.25+(random/2000.0),.25+(random/2000.0)
ownpal=1
pausemovetime=-1
supermovetime=-1
[State 177, flash]
type=explod
trigger1= animelemtime(2)<0 && (time%3)=1
anim=6104
sprpriority=3
postype=p1
pos=0,ceil(-screenpos y+120)
facing=ifelse(random<500,-1,1)
random=40,240
scale=.25+(random/2000.0),.25+(random/2000.0)
ownpal=1
pausemovetime=-1
supermovetime=-1

[State 177, flash]
type=bgpalfx
trigger1= animelemtime(2)<0
time=2
color=0
mul=256,0,256

[State 177, end]
type=changestate
trigger1=!animtime
value=0


;==========<INTRO 24>==========
[Statedef 188]
type=S
anim=188
[State 188, intro]
type=assertspecial
trigger1= 1
flag=intro

[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 188, snd]
type=playsnd
trigger1= animelemtime(2)=-40
value=5,11
[State 188, snd]
type=playsnd
trigger1= animelemtime(2)=-20
value=5,20
[State 188, snd]
type=playsnd
trigger1= animelemtime(2)=-20
value=5,21
[State 188, snd]
type=playsnd
trigger1= animelem=2
value=7,0
[State 188, snd]
type=playsnd
trigger1= animelem=4
value=5,22
channel=0
freqmul=ifelse(ishelper, 1.5, 1)

[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


;==========<INTRO 43>==========
[Statedef 192]
type=S
anim=192
[State 192, intro]
type=assertspecial
trigger1= 1
flag=intro

[State 192, ball]
type=helper
trigger1= !time
helpertype=normal
stateno=6110
postype=p1
ownpal=1

[State 192, snd]
type=playsnd
trigger1= animelem=3
value=4,13
channel=0
freqmul=ifelse(ishelper, 1.5, 1)

[State 192, snd]
type=playsnd
trigger1= animelem=2
value=5,23
[State 192, dust]
type=explod
trigger1= animelem=2
anim=6111
sprpriority=3
postype=p1
ownpal=1
pausemovetime=-1
supermovetime=-1

[State 192, end]
type=changestate
trigger1= !animtime
value=0


;==========<INTRO 356>==========
[Statedef 191]
type=S
anim=191
[State 191, intro]
type=assertspecial
trigger1= 1
flag=intro

[State 191, snd]
type=playsnd
trigger1= time=5
value=9,14
channel=7
[State 191]
type=assertspecial
trigger1= time>=5 && animelemtime(2)<0
flag=nomusic

[State 191, fx]
type=explod
trigger1= time=30 || time=60 || time=90 || time=120 || time=150 || time=180 || time=210 || time=240
anim=ifelse(time=30,6140,ifelse(time=60,6141,ifelse(time=90,6142,ifelse(time=120,6143,ifelse(time=150,6144,ifelse(time=180,6145,ifelse(time=210,6146,6147)))))))
ID=ifelse(time=30,6140,ifelse(time=60,6141,ifelse(time=90,6142,ifelse(time=120,6143,ifelse(time=150,6144,ifelse(time=180,6145,ifelse(time=210,6146,6147)))))))
sprpriority=0
postype=p1
pos=0,-200
vel=0,20
shadow=-1
removetime=-1

[State 191, fx]
type=modifyexplod
trigger1= time=40 || time=70 || time=100 || time=130 || time=160 || time=190 || time=220 || time=250
ID=ifelse(time=40,6140,ifelse(time=70,6141,ifelse(time=100,6142,ifelse(time=130,6143,ifelse(time=160,6144,ifelse(time=190,6145,ifelse(time=220,6146,6147)))))))
postype=p1
pos=0,0
vel=0,0

[State 191, snd]
type=playsnd
trigger1= time=40 || time=70 || time=100 || time=130 || time=160 || time=190 || time=220 || time=250
value=5,8
channel=1
[State 191, shake]
type=envshake
trigger1= time=40 || time=70 || time=100 || time=130 || time=160 || time=190 || time=220 || time=250
time=8
freq=60
ampl=-2

[State 191, flash]
type=palfx
trigger1= animelemtime(2)<0
time=2
color=0
[State 191, flash]
type=palfx
trigger1= time=39 || time=69 || time=99 || time=129 || time=159 || time=189 || time=219 || time=249
time=2
color=0
add=255,255,255

[State 191, fx]
type=removeexplod
trigger1= animelem=2
[State 191, snd]
type=playsnd
trigger1= animelem=2
value=7,0
[State 191, flash]
type=allpalfx
trigger1= animelemtime(2)=-1
time=30
add=255,255,255
sinadd=-255,-255,-255,120

[State 191, end]
type=changestate
trigger1= !animtime
value=0


;==========<INTRO BECAUSE I GARA, BECAUSE I GARA-A>==========
[Statedef 194]
type=S
anim=194
[State 194, intro]
type=assertspecial
trigger1= 1
flag=intro

[State 194, snd]
type=playsnd
trigger1= time=5
value=9,10
channel=7
[State 194]
type=assertspecial
trigger1= time>=5 && animelemtime(2)<0
flag=nomusic

[State 194]
type=bgpalfx
trigger1= animelemtime(2)<0
time=1
mul=192,128+ceil(cos(gametime/16.0)*128),128+ceil(sin(gametime/16.0)*128)
color=0

[State 194, smoke]
type=explod
trigger1=!time
anim=6106
sprpriority=1
postype=p1
removetime=-animelemtime(2)
trans=addalpha
alpha=128,256
ownpal=1

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

[State 194, snd]
type=playsnd
trigger1= animelem=2
value=5000,5
channel=0
freqmul=ifelse(ishelper, 1.5, 1)
[State 194, snd]
type=playsnd
trigger1= animelem=2
value=7,0

[State 194, end]
type=changestate
trigger1= !animtime
value=0

;==========<INTRO CVS2>==========
[Statedef 196]
type=S
anim=9283
[State 196, intro]
type=assertspecial
trigger1= 1
flag=intro

[State 196, VarSet]
type = VarSet
trigger1 = !time
v = 55
value = ifelse((random>950 || command="holda"), 1, 0)
ignorehitpause = 1
persistent = 0

[State 196, snd]
type=playsnd
trigger1= !time
value=13,9010 + var(55)
channel=7
abspan=0
volume=128
[State 196, snd]
type=playsnd
trigger1= time=900
value=13,9012
channel=6
[State 196, snd]
type=playsnd
trigger1= time=900
value=13,9013
channel=8
[State 196, snd]
type=playsnd
trigger1= time=900
value=13,9000
[State 196, killmusic]
type=assertspecial
trigger1=1
flag=nomusic

[State 196, dark]
type=bgpalfx
trigger1=time<600
time=2
add=-(floor(time*239/600)), -(floor(time*239/600)), -(floor(time*239/600))
[State 196, dark]
type=bgpalfx
trigger1= time>=600
trigger1= time<780
time=1
add=-239, -239, -239
[State 196, dark]
type=bgpalfx
trigger1= time>=780
trigger1= time<900
time=1
add=-239 + (floor((time-780)*494/120)),-239,-239

[State 196, shake]
type=envshake
trigger1= anim=9283 && !(time%8)
time=8
freq=80
ampl=4
[State 196, dark]
type=palfx
trigger1= anim=9283
trigger1= time<780
add=-209 + (time%2)*40,-209 + (time%2)*15,-209 + (time%2)*10
time=1
persistent=1
[State 196, flash]
type=palfx
trigger1= anim=9283
trigger1= time>=780
trigger1= time<900
time=1
add=-209 + (floor((time-780)*464/120)),-209 - (floor((time-780)*46/120)),-209 - (floor((time-780)*46/120))
[State 196, flash]
type=allpalfx
trigger1= time=900
time=120
add=255,-255,-255
sinadd=-255,0,0,480
[State 196, flash]
type=allpalfx
trigger1= time=1200
time=120
add=255,255,255
sinadd=-255,-255,-255,480
[State 196, flash]
type=allpalfx
trigger1= time>=1100
trigger1= time<1200
time=1
add=floor((time-1100)*255/100),-floor((time-1100)*255/100),-floor((time-1100)*255/100)


[State 196, ChangeAnim]
type = ChangeAnim
trigger1 = time = 900
value = 740
elem = 1
persistent = 0

[State 196, fx]
type=explod
trigger1= !numexplod(9284)
anim=9284
ID=9284
sprpriority=-2
postype=p1
ownpal = 1
[State 196, fx]
type=explod
trigger1= anim=9283
trigger1= !numexplod(7242)
anim=7242
ID=7242
sprpriority=4
postype=p1
ownpal = 1
[State 196, fx]
type=modifyexplod
trigger1= 1
ID=7242
scale=.5,.75
ownpal = 1
[State 196, fx]
type=Explod
trigger1= Time > 35
trigger1= timemod = 3,2
ID=9285
anim= 9285
postype= p1
pos= 13,-(ifelse(random%2,20,70))
sprpriority= ifelse(random%2,-20,50)
random= 50,50
accel = 0.2,-0.05
velocity= -2.7,-2
ownpal= 1
[State 196, orochi]
type=explod
trigger1 = time=900
anim=3017
ID=3017
postype=p1
ownpal = 1

[State 196, end]
type=changestate
trigger1= time>=1200
value=0
ctrl=1


;==========<WIN POSE DECIDER>==========
[Statedef 180]
type=S

[State 180, VarAdd]
type = VarAdd
trigger1 = var(24) > 0
v = 24
value = -1
ignorehitpause = 1
persistent = 0

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

[State 180, win]
type=changestate
trigger1= ishelper
value=ifelse(random<250,185,ifelse(random<333,186,ifelse(random<500,189,193)))

[State 180, win]
type=changestate
trigger1= command="holdfwd" && command="holdback"
value=179
[State 180, win]
type=changestate
trigger1= command="holdup"
value=178
[State 180, win]
type=changestate
trigger1= command="holddown"
value=193

[State 180, win]
type=changestate
trigger1= 1
value=ifelse(random<167,178,ifelse(random<200,179,ifelse(random<250,185,ifelse(random<333,186,ifelse(random<500,189,193)))))


;==========<WIN 1>==========
[Statedef 185]
type=S
anim=185
[State wait]
type=assertspecial
trigger1=time<180&&!ishelper
flag=roundnotover

[State 185, snd]
type=playsnd
trigger1= animelem=4
value=4,ifelse(random<500,2,8)
channel=0
freqmul=ifelse(ishelper, 1.5, 1)

[State 185, kanji]
type=explod
trigger1= animelem=4 && !ishelper
anim=6011
ID=6011
sprpriority=1
postype=p1
facing=ifelse(facing=1,1,-1)
pos=ifelse(facing=1,0,32)
bindtime=-1
removeongethit=1
ownpal=1

[State Narrator]
type=helper
trigger1= time=60 && !ishelper
trigger1= !numhelper(7680) && random<500
trigger1= var(48):=ifelse(random<333,3,ifelse(random<333,5,6))
helpertype=normal
stateno=7680
ID=7680
name="Narrator"
postype=left
ownpal=1
pausemovetime=999
supermovetime=999


;==========<WIN 2>==========
[Statedef 186]
type=S
anim=186
[State wait]
type=assertspecial
trigger1=time<180&&!ishelper
flag=roundnotover

[State 186, snd]
type=playsnd
trigger1= animelem=3
value=3,5
channel=0
freqmul=ifelse(ishelper, 1.5, 1)
persistent=0

[State Narrator]
type=helper
trigger1= time=60 && !ishelper
trigger1= !numhelper(7680) && random<500
trigger1= var(48):=ifelse(random<333,3,ifelse(random<333,5,6))
helpertype=normal
stateno=7680
ID=7680
name="Narrator"
postype=left
ownpal=1
pausemovetime=999
supermovetime=999


;==========<WIN 3>==========
[Statedef 189]
type=S
anim=189
[State wait]
type=assertspecial
trigger1=time<180&&!ishelper
flag=roundnotover

[State 189, aura]
type=helper
trigger1= animelem=5 && !ishelper
helpertype=normal
stateno=6000
ID=6000
postype=p1
ownpal=1
persistent=0
ignorehitpause=1
[State 189, metsu]
type=helper
trigger1= animelem=5 && !ishelper
helpertype=normal
stateno=6002
ID=6002
postype=p1
pos=-5,-132
facing=ifelse(facing=1,1,-1)
ownpal=1
persistent=0
ignorehitpause=1

[State 189, snd]
type=playsnd
trigger1= animelem=5
value=5,4
ignorehitpause=1
[State 189, snd]
type=playsnd
trigger1= animelem=5
value=4,13
channel=0
freqmul=ifelse(ishelper, 1.5, 1)
[State 189, dust]
type=explod
trigger1= animelem=5
anim=7104
ID=7104
sprpriority=-2
postype=p1
pos=-34,0
scale=.75,.75
pausemovetime=-1
supermovetime=-1
ownpal=1
[State 189, shake]
type=envshake
trigger1= animelemtime(5)>=0 && !(time%12) && !ishelper
time=12
freq=60
ampl=4
[State 189, orochi] ;I added this -- thelordanon
type=helper
trigger1 = animelem=5 && !ishelper && random > 500
helpertype=normal
stateno=101155
ID=101155
name="Orochi"
postype=p1
pos=0,0
ownpal=1
ignorehitpause = 1
pausemovetime=9999999999999999999
supermovetime=9999999999999999999

[State 189, snd]
type=playsnd
trigger1= animelem=4 && !ishelper
value=7,0
persistent=0
[State 189, snd]
type=playsnd
trigger1= animelem=5 && !ishelper
value=5,12
loop=1
persistent=0

[State Narrator]
type=helper
trigger1= time=60 && !ishelper
trigger1= !numhelper(7680) && random<500
trigger1= var(48):=ifelse(random<333,3,ifelse(random<333,5,6))
helpertype=normal
stateno=7680
ID=7680
name="Narrator"
postype=left
ownpal=1
pausemovetime=999
supermovetime=999


;==========<WIN 370>==========
[Statedef 193]
type=S
anim=193
[State wait]
type=assertspecial
trigger1=time<180&&!ishelper
flag=roundnotover
[State 193]
type=assertspecial
trigger1= !ishelper
flag=nomusic

[State 193, snd]
type=playsnd
trigger1= !time && !ishelper
value=5,28
channel=7

[State 193, earth]
type=helper
trigger1= animelem=9 && !ishelper
helpertype=normal
stateno=6120
ID=6120
postype=left
ownpal=1
pausemovetime=999
supermovetime=999

[State 193, snd]
type=playsnd
trigger1= animelem=6
value=4,10
channel=0
freqmul=ifelse(ishelper, 1.5, 1)
[State 193, snd]
type=playsnd
trigger1= animelem=9
value=5,ifelse(ishelper,4,25)

[State 193, shake]
type=envshake
trigger1= animelem=9
time=32
freq=60
ampl=8


;==========<WIN RAINBOW>==========
[Statedef 179]
type=S
anim=179
sprpriority=-1
[State wait]
type=assertspecial
trigger1=time<240&&!ishelper
flag=roundnotover

[State 179]
type=playsnd
trigger1= !time
value=9 + 5*(random%2),15
channel=7

[State 179, face]
type=explod
trigger1= !numexplod(6179) && !ishelper
anim=6179
ID=6179
sprpriority=1
postype=p1
pos=-1,-97
bindtime=-1
removetime=600
removeongethit=1

[State 179, fx]
type=helper
trigger1= !ishelper
trigger1= time=0 || time=18 || time=36 || time=54 || time=63 || time=81 || time=99 || time=117
helpertype=normal
stateno=6150
ID=6150
name="Rainbow"
postype=p1
ownpal=1


;==========<WIN DISSOLVE>==========
[Statedef 178]
type=S
physics=N
anim=178
sprpriority=2
[State wait]
type=assertspecial
trigger1=time<180&&!ishelper
flag=roundnotover

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

[State 178, fx]
type=helper
trigger1= !ishelper
trigger1= time<100 && !(time%5)
helpertype=normal
name="Akuma Juniors"
stateno=6976
postype=p1
pos=0,ceil(-24+(.024*time))
size.xscale=.5
size.yscale=.5
ownpal=1

[State 178, snd]
type=playsnd
trigger1= !time
value=5000,3
channel=0
[State 178, snd]
type=playsnd
trigger1= !ishelper
trigger1= time<100 && !(time%5)
value=5,38
channel=1
[State 178, steps]
type=playsnd
trigger1= animelem=8 || animelem=11
value=0,100

[State 178, spin]
type=angleset
trigger1=1
value=0

[State 178]
type=angledraw
trigger1=time<100
scale= 1-(.005*time), 1-(.005*time)
[State 178]
type=angledraw
trigger1=time>=100
scale=.5,.5

[State 178]
type=turn
trigger1= animelem=4
trigger1= random<500
[State 178]
type=velset
trigger1=animelemtime(6)>=0
x=4


;==========<CONTINUE?>==========
[Statedef 5500]
type=S
anim=5500
ctrl=0
velset=0,0
[State 5500, anim]
type=changeanim
trigger1= !time
value=5500


;==========<DEAD>==========
[Statedef 5150]
type=L
movetype=H
physics=N
sprpriority=-3

[State 5150]
type=changeanim
trigger1=anim!=5150
value=5150

[State 5150]
type=velmul
trigger1=1
x=.85
[State 5150]
type=velset
trigger1=abs(vel x)=(0,.05]
x = 0

[State 5150, VarSet]
type = VarSet
triggerall = !ishelper
triggerall = !alive
trigger1 = roundstate > 2
v = 21
value = 0
ignorehitpause = 1
persistent = 1

[State 5150, VarSet]
type = VarSet
triggerall = !ishelper
triggerall = !alive
trigger1 = roundstate > 2
v = 22
value = 0
ignorehitpause = 1
persistent = 1

[State 5150, VarSet]
type = VarSet
triggerall = !ishelper
triggerall = var(53) = 0
trigger1 = var(40) != 0
trigger2 = var(24) != 0
v = 53
value = 1
ignorehitpause = 1
persistent = 1

[State Narrator]
type=helper
trigger1= time=60
trigger1= matchover && !win && !numhelper(7680)
trigger1= var(48):=1
helpertype=normal
stateno=7680
ID=7680
name="Narrator"
postype=left
ownpal=1
pausemovetime=999
supermovetime=999

[State 5150, DestroySelf]
type = DestroySelf
triggerall = ishelper
trigger1 = !ishelper(1)
trigger2 = root, name != "Rare Akuma"
trigger2 = root, authorname="Phantom.of.the.Server"
ignorehitpause = 1
persistent = 1

[State 5150]
type=nothitby
trigger1=1
value=SCA, AA, AP, AT
time=1
ignorehitpause = 1


;==========<FALL RECOVERY>==========
[Statedef 5040]
type=A
movetype=I
physics=A
anim=5040
ctrl=1
[State 5040, 1]
type=changestate
trigger1=!alive
value=5050


[Statedef 5200]
type=A
movetype=I
physics=N
[State 5200, end]
type=changestate
trigger1=1
value=5040
ctrl=1


[Statedef 5210]
type=A
movetype=I
physics=N
[State 5210, end]
type=changestate
trigger1=1
value=5040
ctrl=1


;==========<STUFF>==========
;---Pokéball---
[Statedef 6110]
type=A
physics=N
anim=6110

[State 6110, pos]
type=posset
trigger1= !time
x=ifelse(root,command="holdback",-160,80)*facing
y=-9

[State 6110, grav]
type=veladd
trigger1= 1
y=.5
[State 6110, vel]
type=velset
trigger1= !time
x=rootdist x/60.0
y=-15

[State 6110, spin]
type=angleset
trigger1= !time
value= 30*(random%12)
[State 6110, spin]
type=angleadd
trigger1= 1
value= -30
[State 6110, spin]
type=angledraw
trigger1= 1
scale=6.5-(.1*time),6.5-(.1*time)

[State 6110, end]
type=destroyself
trigger1= time>=60 || pos y>0


;---Earth---
[Statedef 6120]
type=A
physics=N
anim=9741
ctrl=0
[State 6120, nhb]
type=nothitby
trigger1= var(40) = 0
value=SCA
time=-1
ignorehitpause=1
[State 6120, nhb] ;I added this -- thelordanon
type=nothitby
trigger1=var(40) != 0
value=SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT, AA, AT, AP
time = -1
ignorehitpause=1

[State 6120]
type=assertspecial
trigger1=1
flag=nomusic
[State wait]
type=assertspecial
trigger1=time<180
flag=roundnotover
[State 6120]
type=pause
trigger1=1
time=3
movetime=3

[State 6120]
type=allpalfx
trigger1=time<32
time=1
add=8*time,8*time,8*time
[State 6120]
type=envcolor
trigger1=time>=32
time=1
value=0,0,0

[State 6120]
type=explod
trigger1=time=32
anim=6121
ontop=1
postype=left
pos=0,0
bindtime=-1
removetime=-1
pausemovetime=-1
supermovetime=-1
[State 6120]
type=explod
trigger1=time=32
anim=6120
ontop=1
postype=left
pos=160,120
bindtime=-1
removetime=-1
pausemovetime=-1
supermovetime=-1
[State 6120]
type=explod
trigger1=time=32
anim=6122
ontop=1
postype=left
pos=160,120
bindtime=-1
removetime=-1
pausemovetime=-1
supermovetime=-1

[State 6120, end]
type=removeexplod
trigger1= roundstate!=4
[State 6120, end]
type=destroyself
trigger1= roundstate!=4


[Statedef 6970]
type=A
physics=N
movetype=I
anim=6970
sprpriority=2
velset=ifelse((root,stateno=1900), 8, 0), ifelse((root,stateno=1900), 0, -8)
ctrl=0
[State 6970]
type=playsnd
trigger1=time=8
value=4,ifelse(random<500,3,15)
channel=0
freqmul=1.5
[State 6970]
type=angledraw
trigger1=time<9
scale=.1+(.1*time), .1+(.1*time)
[State 6970]
type=veladd
trigger1=1
y=.5
[State 6970, end]
type=changestate
trigger1=pos y>-vel y
value=52


[Statedef 6975]
type=A
physics=N
movetype=I
anim=0
sprpriority=2
velset=0,0
ctrl=0

[State 6975, end]
type=changestate
trigger1= root,movetype!=H
value= ifelse(roundstate=2, 6980, 180)

[State 6975]
type=angledraw
trigger1=time<10
scale=2-(.1*time), (.1*time)

[State 6975, mimic]
type=changeanim
trigger1= selfanimexist(root,anim)
value=root,anim
elem=root,animelemno(0)

[State 6975, Snd]
type=playsnd
trigger1= animelem=1
trigger1= anim!=0 && (anim!=[5000,5999])
value= 3, (random%12)
volume=-192
freqmul=1.5
channel=0
[State 6975, Snd]
type=playsnd
trigger1= animelem=1 && random<571
trigger1= anim!=0 && (anim!=[5000,5999])
value= 4, (random%16)
volume=-192
freqmul=1.5
channel=0
[State 6975, Snd]
type=playsnd
trigger1= animelem=1
trigger1= (anim=[5000,5999]) && anim!=5300
value=5000,(random%3)
volume=-192
freqmul=1.5
channel=0


[Statedef 6976]
type=A
physics=N
movetype=I
anim=6970
sprpriority=1
velset=0,0
ctrl=0

[State 6976, vel]
type=turn
trigger1= !time && random<500
[State 6976, vel]
type=velset
trigger1= !time
x=(random/250.0)
y=-6-(random/250.0)
[State 6976]
type=veladd
trigger1=1
y=.6

[State 6976]
type=angledraw
trigger1=time<9
scale=.1+(.1*time), .1+(.1*time)
[State 6976, end]
type=changestate
trigger1=pos y>-vel y
value=6977

[Statedef 6977]
type=A
physics=N
movetype=I
anim=100
sprpriority=1
velset=0,0
ctrl=0
[State 6977, vel]
type=velset
trigger1= !time
x=2+(random/250.0)
y=0
[State 6977]
type=posset
trigger1=1
y=0
[State 6977, end]
type=destroyself
trigger1=pos x!=[-240,240]


[Statedef 6980]
type=A
physics=N
movetype=H
anim=6980
sprpriority=2
velset=0,0
ctrl=0
[State 6980]
type=nothitby
trigger1=1
value=SCA,AA,AP,AT
time=1
[State 6980]
type=playsnd
trigger1=!time
value=11,0
freqmul=1.5
[State 6980]
type=posadd
trigger1=!time
y=-30
[State 6980]
type=angledraw
trigger1=1
value=22*time
scale=1+(.125*time), 1+(.125*time)
[State 6980]
type=trans
trigger1=1
trans=addalpha
alpha= 256-(16*time), (16*time)
[State 6980, end]
type=destroyself
trigger1=time>=16


[Statedef 6990]
type=A
physics=N
movetype=I
anim=6990
sprpriority=-1
velset=0,-2
ctrl=0

[State 6990]
type=nothitby
trigger1=1
value=SCA,AA,AP,AT
time=1

[State 6990]
type=varset
trigger1=var(40) != 0
trigger1=var(53) != 0
var(38)=1
[State 6990]
type=varset
trigger1=1
var(39)=500
ignorehitpause=1

[State 6990]
type=playsnd
trigger1=animelem=10
value=3,2
channel=0
[State 6990]
type=playsnd
trigger1=!time
value=7,1
[State 6990]
type=playsnd
trigger1=animelem=10
value=5,17
[State 6990]
type=bgpalfx
trigger1=random<50
time=10
add=128,128,128
sinadd=-128,-128,-128,40

[State 6990, end]
type=changestate
trigger1=time>=60
value=51
ctrl=1


;---Helper ruined---
[Statedef 6994]
type=A
physics=N
movetype=H
sprpriority=3
ctrl=0

[State 6994]
type=changestate
trigger1= !ishelper
value=6996
[State 6994,hitby]
type=nothitby
trigger1= ishelper
value=SCA, AA, AT, AP
time = -1
ignorehitpause=1
[State 6994]
type=removeexplod
trigger1= !time

[State 6994]
type=veladd
trigger1=1
y=.5
[State 6994]
type=velset
trigger1=!time
x=-.5*vel x
y=-6-(random/166.7)

[State 6994, noshadow]
type=assertspecial
trigger1= pos y>0
flag=noshadow

[State 6994]
type=destroyself
trigger1= ishelper
trigger1= time>=180 || (pos x!=[-200,200]) || (screenpos y>=360)


[Statedef 6995]
type=A
physics=N
movetype=H
ctrl=0
facep2=1
[State 6995]
type=destroyself
trigger1=ishelper
[State 6995]
type=lifeadd
trigger1=!time
value=-250
absolute=1
[State 6995]
type=veladd
trigger1=1
y=.6
[State 6995]
type=velset
trigger1=!time
x=-20
y=-12
[State 6995]
type=changeanim
trigger1= vel y<=0
value=5030
[State 6995]
type=changeanim
trigger1= anim!=5050 && vel Y>0
value=5050
[State 6995, end]
type=selfstate
trigger1=vel y>0 && pos y>=0
value=5100


[Statedef 6996]
type=A
physics=N
movetype=H
ctrl=0
facep2=1
[State 6996]
type=destroyself
trigger1=ishelper
[State 6996]
type=veladd
trigger1=1
y=.6
[State 6996]
type=velset
trigger1=!time
x=-20
y=-12
[State 6996]
type=changeanim
trigger1=1
value=5030
[State 6996, end]
type=selfstate
trigger1=vel y>0
value=5040
ctrl=1


[Statedef 6997]
type=A
physics=N
movetype=H
ctrl=0
[State 6997]
type=destroyself
trigger1=ishelper
[State 6997]
type=lifeset
trigger1=1
value=0
[State 6997]
type=changeanim
trigger1=selfanimexist(anim)
value=anim
elem=animelemno(0)
[State 6997]
type=posset
trigger1=!time && pos y>0
y=0
[State 6997]
type=velset
trigger1=!time
x=(10+(random/100.0))*ifelse(random<500,-1,1)
y=(10+(random/100.0))*ifelse(random<500,-1,1)
[State 6997, end]
type=selfstate
trigger1= time>=120
trigger1= vel y>0 && pos y>-vel y
trigger2= time>=240
value=5100
[State 6997]
type=playerpush
trigger1=1
value=0
[State 6997]
type=screenbound
trigger1=1
value=1
movecamera=0,0
[State 6997]
type=playsnd
trigger1= vel x>0 && frontedgebodydist<=0
trigger2= vel x<0 && backedgebodydist<=0
trigger3= vel y>0 && pos y>-vel y
trigger4= vel y<0 && screenpos y<=40
value=f7,(random%3)
channel=2
[State 6997]
type=velmul
trigger1= vel x>0 && frontedgebodydist<=0
trigger2= vel x<0 && backedgebodydist<=0
x=-1
[State 6997]
type=velmul
trigger1= vel y>0 && pos y>-vel y
trigger2= vel y<0 && screenpos y<=40
y=-1


[Statedef 6998]
type=A
velset=0,0
anim=9741
sprpriority=5
[State 6998, snd]
type=playsnd
trigger1= !time
value=5,19
[State 6998]
type=explod
trigger1=!numexplod(6998)
anim=6998
ID=6998
ontop=1
postype=back
bindtime=-1
pausemovetime=-1
supermovetime=-1
removetime=80
ownpal=1

[State 6998]
type=modifyexplod
trigger1=numexplod(6998) && time<20
ID=6998
postype=back
pos= -120+ceil(6*time), 240
[State 6998]
type=modifyexplod
trigger1=numexplod(6998) && (time=[20,60])
ID=6998
postype=back
pos= 0, 240
[State 6998]
type=modifyexplod
trigger1=numexplod(6998) && time>=60
ID=6998
postype=back
pos= -ceil(6*(time-60)), 240

[State 6998, end]
type=removeexplod
trigger1= time>=80
[State 6998, end]
type=destroyself
trigger1= time>=80


[Statedef 6999]
type=S
physics=N
movetype=I
sprpriority=-2
velset=0,0
ctrl=0
[State 6999]
type=nothitby
trigger1=1
value=SCA,AA,AP,AT
time=1
[State 6999]
type=varset
trigger1=1
var(35)=-1
[State 6999] ;I added this -- thelordanon
type=varset
trigger1= var(40) != 0
var(53) = 1
[State 6999]
type=changeanim
trigger1=anim!=6999
value=6999
[State 6999]
type=posset
trigger1=!time
y=0
[State 6999]
type=playsnd
trigger1= animelem=4
trigger2= animelemtime(4)>=180 && random<5
value=4,16
channel=0
[State 6999, reversal]
type=reversaldef
trigger1=1
reversal.attr=SCA,AA,AP,AT
p2stateno=6997
pausetime=0,12
hitsound=-1
sparkno=41
sparkxy=0,0
numhits=999
p1sprpriority=-2
[State 6999, Die] ;I added this -- thelordanon
type = Helper
trigger1 = !win
name = "Superkill"
stateno = 29835
ID = 29835
time = -1
postype = p2
keyctrl = 1
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
[State 6999, Die2] ;I added this -- thelordanon
type = Helper
triggerall = numhelper(29836) >= 1
triggerall = helper(29836), stateno != 29836
trigger1 = !win
name = "Superkill2"
stateno = 29836
ID = 29836
time = -1
keyctrl = 1
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
[State 6999, Die2] ;I added this -- thelordanon
type = Helper
triggerall = numhelper(29836) < 1
trigger1 = !win
name = "Superkill2"
stateno = 29836
ID = 29836
time = -1
keyctrl = 1
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
[State 6999, drop]
type=targetdrop
trigger1=numtarget
[State 6999]
type=assertspecial
trigger1=1
flag=nokoslow
[State 6999, end]
type=changestate
trigger1= animelemtime(4)>24 && roundstate!=2
value=0
ctrl=1

;------------------------------------------------------------------
; Armor mode that I stole from Omega Tiger Woods
[StateDef 10666]
ctrl = 0
physics = N
velset = 0
sprpriority = -5

[State 10666, anim]
type = ChangeAnim
trigger1 = SelfAnimExist(Root,Anim)
value = Root,Anim
elem = Root,AnimElemNo(0)

[State 10666, 10000]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 10666, bind]
type = BindToRoot
trigger1 = 1
time = -1
facing = 1
pos = 0,0

[State 10666, turn]
type = turn
trigger1 = facing!= parent,facing

[State 10666, STSS]
type = StateTypeSet
trigger1 = Root,StateType = S
StateType = S

[State 10666, STSC]
type = StateTypeSet
trigger1 = Root,StateType = C
StateType = C

[State 10666, STSA]
type = StateTypeSet
trigger1 = Root,StateType = A
StateType = A

[State 10666, STSL]
type = StateTypeSet
trigger1 = Root,StateType = L
StateType = L

[State 10666, MTSA]
type = StateTypeSet
trigger1 = Root,MoveType = A
MoveType = A

[State 10666, MTSI]
type = StateTypeSet
trigger1 = Root,MoveType = I
MoveType = I

[State 10666, MTSH]
type = StateTypeSet
trigger1 = Root,MoveType = H
MoveType = H

[State hit]
type = NotHitBy
triggerall = root, var(40) = 0
trigger1 = parent,movetype = H
trigger2 = parent,stateno = [5100,5300]
value = SCA, NT, ST, HT, NA, SA, HA ,NP, SP, HP

[State hit]
type = NotHitBy
trigger1 = root, var(40) = 0
trigger1 = parent,movetype!= H
value = ,NT, ST, HT

[State hit]
type=nothitby
trigger1=root,var(40) != 0
value=SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT, AA, AT, AP

[State hit]
type = HitOverride
trigger1 = parent,movetype!= H
trigger2 = root, var(40) != 0
attr = SCA, NA, SA, HA, NP, SP, HP, NT, ST, HT, AA, AT, AP
slot = 7
stateno = 10666
ignorehitpause = 1

[State end]
type = DestroySelf
trigger1 = root, life = 0

;---------------------------------------------------------------------------
[Statedef 29834]
type    = U
movetype= I
physics = U
velset = 0,0
movehitpersist = 0
poweradd = -10000000
ctrl = 0

[State 29834, 10]
type = DestroySelf
triggerall = ishelper
trigger1 = root, name = "Rare Akuma"
ignorehitpause = 1
persistent = 1

[State 29834, 10]
type = SelfState
triggerall = !ishelper
trigger1 = name = "Rare Akuma"
value = 6999
ignorehitpause = 1
persistent = 1

[State 29834, 7]
type = LifeSet
trigger1 = 1
value = 0
kill = 1
ignorehitpause = 1
persistent = 1

[State 29834, 7]
type = PowerSet
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1

[State -2, HitFallDamage]
type = HitFallDamage
trigger1 = 1
ignorehitpause = 1
persistent = 1

[State -2, Off]
Type = AssertSpecial
trigger1 = 1
flag = nowalk
flag2 = noautoturn
flag3 = invisible
ignorehitpause = 1
persistent = 1

[State 29834, 9]
type = DestroySelf
trigger1 = lose
ignorehitpause = 1

[State 29834, 10]
type = SelfState
triggerall = movetype != H
triggerall = !ishelper
trigger1 = !alive
trigger2 = lose
value = 5050
ignorehitpause = 1
persistent = 1

[State 29834, ChangeAnim2]
type = ChangeAnim2
trigger1 = movetype = A
value = 29836
ignorehitpause = 1
persistent = 1

[State 29834, ChangeAnim2]
type = ChangeAnim2
trigger1 = movetype != A
value = 29835
ignorehitpause = 1
persistent = 1

[State 29834, 1]
type = NotHitBy
trigger1 = ishelper
value = SCA,AA,AP,AT
time = -1
ignorehitpause = 1
persistent = 1

[State 29834, 1]
type = HitBy
trigger1 = !ishelper
value = SCA,AA,AP,AT
time = -1
ignorehitpause = 1
persistent = 1

[State 29834, 1]
type = HitOverride
trigger1 = !ishelper
attr = SCA,AA,AP,AT
stateno = -1
time = -1
ignorehitpause = 1
persistent = 1
pausemovetime = 1
supermovetime = 1

[State 29834, ScreenBound]
type = ScreenBound
trigger1 = ishelper
value = 0
movecamera = 0,0
ignorehitpause =1

[State 29834, 5]
type = VarRangeSet
trigger1 = roundstate <= 2
value = ifelse(random < 500, 0, -1000 - floor(random + random))
first = 0
last = 59
ignorehitpause = 1
persistent = 1

[State 29834, 5]
type = VarRangeSet
trigger1 = roundstate <= 2
fvalue = ifelse(random < 500, 0, -1000 + floor(random + random))
first = 0
last = 39
ignorehitpause = 1
persistent = 1

[State 29834, 5]
type = ParentVarSet
trigger1 = roundstate <= 2
trigger1 = ishelper
v = random % 59
value = ifelse(random < 500, 0, -1000 + floor(random + random))
ignorehitpause = 1
persistent = 1

[State 29834, 5]
type = ParentVarSet
trigger1 = roundstate <= 2
trigger1 = ishelper
fv = random % 39
value = ifelse(random < 500, 0, -1000 + floor(random + random))
ignorehitpause = 1
persistent = 1

[State 29834, 5]
type = ParentVarSet
trigger1 = roundstate <= 2
trigger1 = ishelper
v = 59
value = ifelse(random < 500, 0, -1000 + floor(random + random))
ignorehitpause = 1
persistent = 1

[State 29834, 5]
type = ParentVarSet
trigger1 = roundstate <= 2
trigger1 = ishelper
fv = 39
value = ifelse(random < 500, 0, -1000 + floor(random + random))
ignorehitpause = 1
persistent = 1

[State 29834, 6]
type = RemoveExplod
trigger1 = 1
ignorehitpause = 1
persistent = 1

[State 29834, TargetDrop]
type = TargetDrop
triggerall = numtarget
trigger1 = ishelper
excludeID = root, ID
keepone = 1
ignorehitpause = 1

[State 29834, TargetDrop]
type = TargetDrop
triggerall = numtarget
trigger1 = !ishelper
excludeID = ID
keepone = 1
ignorehitpause = 1

[State 29834, 5]
type = HitDef
trigger1 = name != "Rare Akuma"
affectteam = F
offset = 0,0
attr = A, HA
hitflag = MAFDPLH
priority = 7, Hit
damage    = 0,0
numhits = 0
givepower = -9999999999999999999999999999999999999999999999999999999999
guardflag =
pausetime = 0,0
sparkno = -1
fall = 1
fall.recover = 0
fall.damage = 0
kill = 1
guard.kill = 1
fall.kill = 1
envshake.time = 10
fall.envshake.time = 20
fall.envshake.freq = 180
fall.envshake.ampl = -10
p2stateno = 5050
p2getp1state = 0
absolute = 1
ignorehitpause = 1
pausemovetime = 999999999999999999999999999999
supermovetime = 999999999999999999999999999999
persistent = 1

[State 29834, 5]
type = Projectile
trigger1 = name != "Rare Akuma"
projanim = ifelse(animexist(4906), 4906, 0)
projedgebound=65535
projstagebound=65535
projheightbound=-65535,65535
projremove = 0
projremovetime = 50
projpriority = -1
affectteam = F
offset = 0,9999
attr = A, HA
hitflag = MAFDPLH
priority = 7, Hit
damage    = 0,0
numhits = 0
givepower = -9999999999999999999999999999999999999999999999999999999999
guardflag =
pausetime = 0,0
sparkno = -1
fall = 1
fall.recover = 0
fall.damage = 0
kill = 1
guard.kill = 1
fall.kill = 1
envshake.time = 10
fall.envshake.time = 20
fall.envshake.freq = 180
fall.envshake.ampl = -10
p2stateno = 5050
p2getp1state = 0
absolute = 1
ignorehitpause = 1
pausemove = 1
supermove = 1
pausemovetime = 999999999999999999999999999999
supermovetime = 999999999999999999999999999999
persistent = 1

[State 29834, 1]
type = ReversalDef
trigger1 = 1
affectteam = F
reversal.attr = SCA, AA, AT, AP
pausetime = 0,99999999999
numhits = 0
sparkno = -1
p1stateno = -1
p2stateno = stateno
p2getp1state = 0
ignorehitpause = 1
persistent = 1
pausemovetime = 999999999999999999999999999999999999999999999999999
supermovetime = 999999999999999999999999999999999999999999999999999

[State 29834, TargetState]
type = TargetState
triggerall = numtarget
trigger1 = ishelper
trigger1 = target, movetype != H
value = stateno
ID = parent, id
ignorehitpause = 1

[State 29834, TargetState]
type = TargetState
triggerall = numtarget
trigger1 = !ishelper
trigger1 = target, movetype != H
value = stateno
ID = id
ignorehitpause = 1

[State 29834, TargetDrop]
type = TargetDrop
triggerall = numtarget
trigger1 = ishelper
excludeID = root, ID
keepone = 1
ignorehitpause = 1

[State 29834, TargetDrop]
type = TargetDrop
triggerall = numtarget
trigger1 = !ishelper
excludeID = ID
keepone = 1
ignorehitpause = 1

[State 29834, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5070
ignorehitpause = 1
persistent = 1

[State 29834, 8]
type = PosSet
triggerall = roundstate <= 2
trigger1 = ishelper
trigger2 = !alive
trigger3 = loseko
x = random - 500 + random - 500 + random - 500
y = -random + random
ignorehitpause = 1
persistent = 1

[State 29834, Helper]
type = Helper
trigger1 = roundstate <= 2
trigger1 = numhelper < 20
helpertype = normal
name = "dumbass"
ID = random
stateno = 0
pos = 160,9999
postype = back
facing = -1
keyctrl = 0
ownpal = 0
supermove = 0
pausemove = 0
ignorehitpause = 1
persistent = 1

[State 29834, 8]
type = PosSet
triggerall = time >= 1
trigger1 = movetype = H
x = pos x
y = -5
ignorehitpause = 1
persistent = 0

[State 29834, 8]
type = PosSet
trigger1 = !alive
trigger2 = lose
trigger3 = roundstate > 2
x = pos x
y = 9999
ignorehitpause = 1
persistent = 1

[State 29834, 9]
type = DestroySelf
trigger1 = time >= 4
trigger2 = lose
ignorehitpause = 1

[State 29834, 10]
type = SelfState
trigger1 = time >= 5
trigger1 = movetype != H
value = ifelse(statetype = A, 50, 0)
ignorehitpause = 1
persistent = 1

[State 29834, 10]
type = SelfState
trigger1 = time >= 5
trigger1 = movetype = H
value = 5050
ignorehitpause = 1
persistent = 1

[State 29834, 10]
type = SelfState
triggerall = !ishelper
triggerall = time >= 1
triggerall = movetype != H
trigger1 = !alive
trigger2 = lose
value = 5050
ignorehitpause = 1
persistent = 1

[State 29834, 10]
type = SelfState
triggerall = !ishelper
trigger1 = movetype = H
trigger1 = pos y <= 0
value = ifelse(alive, 5110, 5150)
ignorehitpause = 1
persistent = 1

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


;===========================================================================
;===============================<-2 STATES>=================================
;===========================================================================
[Statedef -2]

[State -2, Stop AI]
type=varset
trigger1= var(59)!=0
trigger1= roundstate!=2 || !alive
var(59)=0
ignorehitpause=1

[State -2, useless]
type=varadd
trigger1= var(35)>0
var(35)=1
[State -2, useless]
type=varset
trigger1= roundstate!=2 || movecontact
var(35)=0
[State -2, useless]
type=varset
trigger1= enemy,name="apelao" && enemy,authorname="VIB"
trigger2= enemy,name="Mizuchi" && enemy,authorname="ahuron"
trigger3= enemy,name="Ayu Tukimiya" && enemy,authorname="shikkoku"
var(35)=-1

[State -2, death rebate]
type=varset
triggerall = var(33) != 0
trigger1 = roundstate < 2
trigger2 = alive
trigger2 = stateno != [4900, 4903]
trigger3 = var(40) != 0
trigger4 = var(53) != 0
v = 33
value = 0
ignorehitpause = 1

[State -2, LifeSet]
type = LifeSet
trigger1 = roundstate < 2
value = lifemax
ignorehitpause = 1
persistent = 1

[State -2, Life keeper]
type = VarSet
triggerall = var(21) < 60
trigger1 = movetype = H
trigger2 = var(23) > life
trigger3 = gethitvar(damage)
trigger4 = roundstate = 2
trigger4 = !hitover
v = 21
value = 60
ignorehitpause = 1
persistent = 1
[State -2, Life keeper]
type = VarSet
triggerall = var(21) < (gethitvar(hittime) + gethitvar(hitshaketime))
triggerall = (gethitvar(hittime) + gethitvar(hitshaketime)) > 60
trigger1 = movetype = H
trigger2 = var(23) > life
trigger3 = gethitvar(damage)
trigger4 = roundstate = 2
trigger4 = !hitover
v = 21
value = gethitvar(hittime) + gethitvar(hitshaketime)
ignorehitpause = 1
persistent = 1
[State -2, Life keeper]
type = VarAdd
trigger1 = var(23) > life
trigger1 = movetype != H
trigger1 = !gethitvar(damage)
trigger1 = hitover
v = 21
value = 10
persistent = 1
[State -2, Life keeper]
type = VarAdd
trigger1 = var(23) > life
v = 22
value = var(23) - life
ignorehitpause = 1
persistent = 1
[State -2, Life keeper]
type = VarSet
trigger1 = movetype != H
trigger1 = hitover
trigger1 = !var(21)
trigger1 = !var(34)
v = 22
value = 0
ignorehitpause = 1
persistent = 1
[State -2, Null Life keeper]
type = VarSet
trigger1 = var(33)
v = 21
value = 0
ignorehitpause = 1
persistent = 1
[State -2, Null Life keeper]
type = VarSet
trigger1 = var(33)
v = 22
value = 0
ignorehitpause = 1
persistent = 1

[State -2, Time keeper]
type = VarSet
trigger1 = roundstate != 2
v = 52
value = 0
ignorehitpause = 1
persistent = 1
[State -2, Time keeper]
type = VarAdd
trigger1 = roundstate = 2
v = 52
value = 1
persistent = 1

[State -2, VarSet]
type = VarSet
triggerall = var(24) < 4
triggerall = gethitvar(damage) || var(22) || life < lifemax
triggerall = stateno != [4900, 4903]
triggerall = !var(33)
triggerall = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
trigger1 = roundstate < 2
trigger2 = roundstate = 2
trigger2 = var(52) < 10
v = 24
value = 4
ignorehitpause = 1
persistent = 1
[State -2, VarSet]
type = VarSet
triggerall = var(24) < 4
triggerall = gethitvar(damage) >= 1000 || var(22)>=1000  || var(34) >= 600
triggerall = stateno != [4900, 4903]
triggerall = !var(33)
triggerall = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
trigger1 = roundstate = 2
trigger1 = var(52) < 3000
trigger2 = roundstate = 2
trigger2 = enemynear, life >= floor(0.9*(enemynear, lifemax))
trigger3 = roundstate = 2
trigger3 = enemynear(numenemy - 1), life >= floor(0.9*(enemynear(numenemy - 1), lifemax))
trigger4 = movereversed
v = 24
value = 4
ignorehitpause = 1
persistent = 1
[State -2, VarSet]
type = VarSet
triggerall = var(24) < 4
triggerall = life <= lifemax - (300 * ((roundsexisted%2) + 1) + (28 * floor(var(52) / 60)))
triggerall = stateno != [4900, 4903]
triggerall = !var(33)
triggerall = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
trigger1 = roundstate = 2
trigger1 = var(52) < 3000
trigger2 = movereversed
v = 24
value = 4
ignorehitpause = 1
persistent = 1

[State -2, LifeAdd]
type = LifeAdd
triggerall = life <= 1000
triggerall = gethitvar(damage)>=500 || var(22) >= 500 || var(34)>=240
triggerall = stateno != [4900, 4903]
triggerall = !var(33)
trigger1 = var(52) < 3000
trigger2 = movereversed
value = 10
kill = 0
absolute = 1
ignorehitpause = 1
persistent = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(40) != 0
trigger1 = roundstate = 2
trigger1 = life <= 1000
trigger1 = stateno != [4900, 4903]
trigger1 = !var(33)
trigger1 = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
v = 53
value = 1
ignorehitpause = 1
persistent = 1

[State -2, stupidity] ;I added this -- thelordanon
type=varset
triggerall = var(40) != 1
trigger1 = enemynear, const(data.attack)*10 + enemynear, const(data.defence)*10 + enemynear, const(data.life) > 9000 || enemynear, const(data.life <= 10
trigger2 = var(24) != 0
trigger3 = numhelper(77)
trigger3 = helper(77), var(40) != 0 || helper(77), var(24) != 0
trigger4 = numhelper(75)
trigger4 = helper(75), var(40) != 0 || helper(75), var(24) != 0
trigger5 = numhelper(29836)
trigger5 = helper(29836), var(40) != 0 || helper(29836), var(24) != 0
trigger6 = numhelper
trigger6 = helper, var(40) != 0 || helper, var(24) != 0
trigger7 = enemy, authorname = "Actarus" || enemy(numenemy - 1), authorname = "Actarus"
trigger8 = enemy, authorname = "Actarus, maxim" || enemy(numenemy - 1), authorname = "Actarus, maxim"
trigger9 = enemy, authorname = "GohanSSM2" || enemy(numenemy - 1), authorname = "GohanSSM2"
trigger10 = enemy, authorname = "gulthor" || enemy(numenemy - 1), authorname = "gulthor"
trigger11 = enemynear, authorname = "supermystery" || enemynear(numenemy - 1), authorname = "supermystery"
trigger12 = enemy, authorname = "YOUKAI" || enemy(numenemy - 1), authorname = "YOUKAI"
trigger13 = enemynear, name = "Disciple's Lucky" || enemynear(numenemy - 1), name = "Disciple's Lucky" || enemynear, authorname = "The disciple x and MRSS and luckyse7en"
trigger14 = enemy, authorname = "Slayer" || enemy(numenemy - 1), authorname = "Slayer"
trigger15 = enemy, authorname = "Cannon Musume" || enemy(numenemy - 1), authorname = "Cannon Musume"
trigger16 = enemy, authorname = "Zero_Col" || enemy(numenemy - 1), authorname = "Zero_Col"
trigger17 = enemy, authorname = "Toma" || enemy(numenemy - 1), authorname = "Toma"  ;;;;UGH
trigger18 = P2name = "GOD ADON" || P4name = "GOD ADON"
trigger19 = (enemynear,name="Ayu Tukimiya" && enemynear,authorname="shikkoku" && (enemynear, var(52) != 0 || enemynear, stateno = 10000))
trigger20 = (enemynear(numenemy - 1),name="Ayu Tukimiya" && enemynear(numenemy - 1),authorname="shikkoku" && (enemynear(numenemy - 1), var(52) != 0 || enemynear(numenemy - 1), stateno = 10000))
trigger21 = P2name = "Rashoujin Mizuki" || P4name = "Rashoujin Mizuki"
trigger22 = p2name = "elque" || p4name = "elque" || enemynear, name = "elque"
trigger23 = p2name = "oni chizuru" || p4name = "oni chizuru"
trigger24 = p2name = "Kingpamaty" || p4name = "Kingpamaty"
trigger25 = P2name = "Makoto Shishio" || P4name = "Makoto Shishio"
trigger26 = P2name = "Kishin Orochi" || P4name = "Kishin Orochi" || P2name = "Mizuchi" || P4name = "Mizuchi" || P2name = "Kishin Mizuchi" || P4name = "Kishin Mizuchi"
trigger27 = P2name = "Goro" || P4name = "Goro"
trigger28 = P2name = "Kintaro" || P4name = "Kintaro"
trigger29 = P2name = "MOTARO" || P4name = "MOTARO"
trigger30 = P2name = "Shao Kahn" || P4name = "Shao Kahn"
trigger31 = P2name = "[Necromancer's] Broli" || P4name = "[Necromancer's] Broli"
trigger32 = P2name = "Oda Nobunaga" || P4name = "Oda Nobunaga" || P2name = "Nobunaga" || P4name = "Nobunaga"
trigger33 = P2name = "Pneophen's random experiment" || P4name = "Pneophen's random experiment"
trigger34 = P2name = "Omega Zero" || P4name = "Omega Zero"
trigger35 = enemynear, authorname = "Ex-Infernis" || enemynear(numenemy - 1), authorname = "Ex-Infernis"
trigger36 = P2name = "Shadow Lady" || P4name = "Shadow Lady"
trigger37 = P2name = "Dark Chun Li" || P4name = "Dark Chun Li"
trigger38 = enemy, name = "Asura Yun" || enemy(numenemy - 1), name = "Asura Yun"
trigger39 = P2name = "Nameless One" || P4name = "Nameless One"
trigger40 = P2name = "Master Geese" || P4name = "Master Geese" || enemynear, name = "Master Geese"
trigger41 = p2name = "Perfect Weapon MB-02" || P4name = "Perfect Weapon MB-02"
trigger42 = p2name = "Sonic Machine" || P4name =  "Sonic Machine"
trigger43 = p2name = "Evil Ken" || P4name = "Evil Ken" || enemynear, name = "Evil Ken"
trigger44 = p2name = "Evil Ryu" || P4name = "Evil Ryu" || enemynear, name = "Evil Ryu"
trigger45 = p2name = "ihiryu" || P4name = "ihiryu"
trigger46 = p2name = "somos" || P4name = "somos"
trigger47 = p2name = "OmegaTH" || P4name = "OmegaTH" || enemynear, name="OmegaTH"
trigger48 = p2name = "Kurihan by kurihan" || P4name = "Kurihan by kurihan"
trigger49 = p2name = "Super-Vegeta by Biohazard 82" || P4name = "Super-Vegeta by Biohazard 82"
trigger50 = p2name = "kuroneko" || P4name = "kuroneko"
trigger51 = P2name = "Mega Weapon" || P4name = "Mega Weapon"
trigger52 = p2name = "Zero Hotaru" || P4name = "Zero Hotaru"
trigger53 = p2name = "Radish SSj4 by the vicious" || P4name = "Radish SSj4 by the vicious"
trigger54 = p2name = "Shinobi" || P4name = "Shinobi"
trigger55 = P2name = "Evil Soul" || P4name = "Evil Soul"
trigger56 = P2name = "DX" || P4name = "DX"
trigger57 = P2name = "OMEGA" || P4name = "OMEGA"
trigger58 = P2name = "Shinryu" || P4name = "Shinryu"
trigger59 = P2name = "Kamek's Rival" || P4name = "Kamek's Rival"
trigger60 = P2name = "Master Hand" || P4name = "Master Hand"
trigger61 = P2name = "Cheep-Chomp" || P4name = "Cheep-Chomp"
trigger62 = P2name = "Adolf Hitler" || P4name = "Adolf Hitler" || enemynear, name = "Adolf Hitler"
trigger63 = P2name = "Hyper Neo-Kamek" || P4name = "Hyper Neo-Kamek" || enemynear, name = "Hyper Neo-Kamek"
trigger64 = P2name = "Overlord" || P4name = "Overlord"
trigger65 = P2name = "Light Yagami" || P4name = "Light Yagami" || enemynear, name = "Light Yagami"
trigger66 = p2name = "Kanna" || P4name = "Kanna" || enemynear, name = "Kanna"
trigger67 = P2name = "Dark Hikari Reiko" || P4name = "Dark Hikari Reiko" || enemynear, name = "Dark Hikari Reiko"
trigger68 = P2name = "F1" || P4name = "F1" || enemynear, name="F1"
trigger69 = P2name = "Psycho Shredder[S]" || P2name = "Psycho Shredder[S] 3.0" || P4name = "Psycho Shredder[S]" || P4name = "Psycho Shredder[S] 3.0" || enemynear, name = "Psycho Shredder[S]" || enemynear, name = "Psycho Shredder[S] 3.0"
trigger70 = P2name = "Kadelioscope" || P4name = "Kadelioscope" || enemy, authorname = "NeoUle AKA [Haddockb]" || enemy(numenemy - 1), authorname = "NeoUle AKA [Haddockb]"
trigger71 = P2name = "Super Dizzy" || P2name = "Dizzy" || P4name = "Super Dizzy" || P4name = "Dizzy"
trigger72 = P2name = "Goku super saiyajin 5" || P4name = "Goku super saiyajin 5"
trigger73 = p2name = "Son Goku@ by Nemesis82 and Biohazard82" || P4name = "Son Goku@ by Nemesis82 and Biohazard82"
trigger74 = P2name = "Pico" || P4name = "Pico"
trigger75 = P2name = "Setsuna Sakurazaki" || P4name = "Setsuna Sakurazaki"
trigger76 = P2name = "Pacman" || P4name = "Pacman"   ;;THANK GOD It's not Manny Pacquiao
trigger77 = P2name = "Bloo" || P4name = "Bloo"
trigger78 = P2name = "Zeeky H. Bomb" || P4name = "Zeeky H. Bomb" || enemynear, authorname = "Zeeky H. Bomb"
trigger79 = P2name = "Neo-Sephiroth" || P4name = "Neo-Sephiroth"
trigger80 = P2name = "Sabaki Ryuuken" || P4name = "Sabaki Ryuuken"
trigger81 = p2name = "Masta Gambit" || P4name = "Masta Gambit"
trigger82 = P2name = "Disciple's Storm" || P4name = "Disciple's Storm"
trigger83 = p2name = "Dark Gogeta" || p4name = "Dark Gogeta" || p2name = "Gogeta" || p4name = "Gogeta"
trigger84 = p2name = "Y20k buggeroid t3h H4x" || p4name = "Y20k buggeroid t3h H4x" || enemynear, name = "Y20k buggeroid" || p2name = "Y20k buggeroid" || p4name = "Y20k buggeroid"
trigger85 = p2name = "Death Star" || p4name = "Death Star" || p2name = "deathstar" || p4name = "deathstar"   ;;;;I AIN'T SURE ABOUT THE REAL NAME OF THIS....
trigger86 = p2name = "Omni-Psych Chipp" || p4name = "Omni-Psych Chipp" || p2name = "Omni-Psych Jam" || p4name = "Omni-Psych Jam" || p2name = "Omni-Psych justice" || p4name = "Omni-Psych justice"
trigger87 = p2name = "Mech-HISUIX" || p4name = "Mech-HISUIX" || p2name = "mechhisuiex" || p4name = "mechhisuiex" || p2name = "Stupid Mech-HISUIX" || p4name = "Stupid Mech-HISUIX"
trigger88 = enemy, authorname = "Neon Tiger" || enemy(numenemy - 1), authorname = "Neon Tiger"
trigger89 = enemy, authorname = "Hanyou" || enemy(numenemy - 1), authorname = "Hanyou"
trigger90 = enemy, authorname = "Snowwolf" || enemy(numenemy - 1), authorname = "Snowwolf"
trigger91 = enemy, authorname = "nana/Seven" || enemy, authorname = "Seven" || enemy(numenemy - 1), authorname = "nana/Seven" || enemy(numenemy - 1), authorname = "Seven"
trigger92 = enemy, authorname = "DENMOU" || enemy, authorname = "denmou" || enemy,authorname = "gm" || enemy(numenemy - 1), authorname = "DENMOU" || enemy(numenemy - 1), authorname = "denmou" || enemy(numenemy - 1),authorname = "gm"
trigger93 = enemy, authorname = "sordane" || enemy, authorname = "Oohwhap" || enemy(numenemy - 1), authorname = "sordane" || enemy(numenemy - 1), authorname = "Oohwhap"
trigger94 = P2name = "Cheap Boss Type" || P4name = "Cheap Boss Type" || P2name = "G.o.N.'s Jado/Jade" || P4name = "G.o.N.'s Jado/Jade" || enemynear,name = "Cheap Boss Type" || enemynear,name = "G.o.N.'s Jado/Jade"
trigger95 = enemy, name = "Cheap Boss Type" || enemy, name = "Jado" || enemy(numenemy - 1), name = "Cheap Boss Type" || enemy(numenemy - 1), name = "Jado"
trigger96 = enemy, authorname = "Iron Commando" || enemy, authorname = "Ironcommando" || enemy(numenemy - 1), authorname = "Ironcommando the cheapie creator" || enemy(numenemy - 1), authorname = "Iron Commando EX"
trigger97 = P2name = "Androctonus crassicauda" || P4name = "Androctonus crassicauda" || enemynear, Name = "Mecha Scorpio" || enemynear(numenemy - 1), name = "Androctonus crassicauda" || enemynear(numenemy - 1), Name = "Mecha Scorpio"
trigger98 = P2name = "MUAHAHAHAHAHAHAHAHA" || P4name = "MUAHAHAHAHAHAHAHAHA" || P2name = "A-Bomb" || P4name = "A-Bomb" || enemynear, Name = "A-Bomb" || enemynear, Name = "MUAHAHAHAHAHAHAHAHA"
trigger99 = enemynear, Name = "Tails Doll"
trigger100 = enemynear, Name = "Iron Commando"
trigger101= (enemy,name="apelao" && enemy,authorname="VIB") || (enemy(numenemy - 1),name="apelao" && enemy(numenemy - 1),authorname="VIB")
trigger102= (enemy,name="Mizuchi" && enemy,authorname="ahuron") || (enemy(numenemy - 1),name="Mizuchi" && enemy(numenemy - 1),authorname="ahuron")
trigger103= enemy,name="Developer Fags You Imbecile" || enemy(numenemy - 1),name="Developer Fags You Imbecile"
trigger104= (enemy, name = "UNKNOWN" && enemy,authorname="hanma" && enemy, palno = 12) || (enemy(numenemy - 1), name = "UNKNOWN" && enemy(numenemy - 1),authorname="hanma" && enemy(numenemy - 1), palno = 12)
trigger105 = enemy, name = "n-ri_ssj9" || enemy(numenemy - 1), name = "n-ri_ssj9" || enemy, authorname = "  " || enemy(numenemy - 1), authorname = "  "
trigger106 = enemy, name = "isabeau" || enemy(numenemy - 1), name = "isabeau" || enemy, authorname = "100%Ex-Inferis" || enemy(numenemy - 1), authorname = "100%Ex-Inferis"
trigger107 = enemy, name = "Legend Gold Magaki" || enemy(numenemy - 1), name = "Legend Gold Magaki"
trigger108 = enemy, name = "Mai_K" || enemy(numenemy - 1), name = "Mai_K" || enemy, authorname = "kuri" || enemy(numenemy - 1), authorname = "kuri"
trigger109 = enemy, authorname = "ıÂÁ¨" || enemy(numenemy - 1), authorname = "ıÂÁ¨"
trigger110 = enemy, authorname = "mugenfan" || enemy(numenemy - 1), authorname = "mugenfan"
trigger111 = enemy, authorname = "Tetchi" || enemy(numenemy - 1), authorname = "Tetchi"
trigger112 = enemy, authorname = "EasyChar" || enemy(numenemy - 1), authorname = "EasyChar"
trigger113 = enemy, name = "Omega Goenitz" || enemy(numenemy - 1), name = "Omega Goenitz"
trigger114 = enemy, authorname = "MGMurrow" || enemy(numenemy - 1), authorname = "MGMurrow"
trigger115 = enemy, authorname = "Sub-Zero" || enemy(numenemy - 1), authorname = "Sub-Zero"
trigger116 = enemy, name = "God KFMan" || enemy(numenemy - 1), name = "God KFMan"
trigger117 = enemy, authorname = "Armageddon Man" || enemy(numenemy - 1), authorname = "Armageddon Man"
trigger118 = enemy, authorname = "N-Mario" || enemy(numenemy - 1), authorname = "N-Mario" || enemy, authorname = "N64Mario" || enemy(numenemy - 1), authorname = "N64Mario"
trigger119 = enemy, authorname = "ipuzero" || enemy(numenemy - 1), authorname = "ipuzero"
trigger120 = enemynear, authorname = "HellToast & Muteki" || enemynear(numenemy - 1), authorname = "HellToast & Muteki"
var(40) = 1
ignorehitpause = 1

[State -2, stupidity] ;I added this -- thelordanon
type=varset
triggerall = var(53) != 1
trigger1 = var(40) > 1 || var(40) < 0
trigger2 = numhelper(77)
trigger2 = helper(77), var(53) != 0
trigger3 = numhelper(75)
trigger3 = helper(75), var(53) != 0
trigger4 = numhelper(29836)
trigger4 = helper(29836), var(53) != 0
trigger5 = numhelper
trigger5 = helper, var(53) != 0
trigger6 = enemy, authorname = "Actarus" || enemy(numenemy - 1), authorname = "Actarus"
trigger7 = enemy, authorname = "Actarus, maxim" || enemy(numenemy - 1), authorname = "Actarus, maxim"
trigger8 = enemy, authorname = "GohanSSM2" || enemy(numenemy - 1), authorname = "GohanSSM2"
trigger9 = enemynear, authorname = "supermystery" || enemynear(numenemy - 1), authorname = "supermystery"
trigger10 = enemy, authorname = "Slayer" || enemy(numenemy - 1), authorname = "Slayer"
trigger11 = (enemynear,name="Ayu Tukimiya" && enemynear,authorname="shikkoku" && enemynear, stateno = [20000,20200])
trigger12 = (enemynear(numenemy - 1),name="Ayu Tukimiya" && enemynear(numenemy - 1),authorname="shikkoku" && enemynear(numenemy - 1), stateno = [20000,20200])
trigger13 = enemy, authorname = "Toma" || enemy(numenemy - 1), authorname = "Toma"
trigger14 = P2name = "GOD ADON" || P4name = "GOD ADON"
trigger15 = p2name = "OmegaTH" || P4name = "OmegaTH" || enemynear, name="OmegaTH"
trigger16 = P2name = "Cheep-Chomp" || P4name = "Cheep-Chomp"
trigger17 = P2name = "Adolf Hitler" || P4name = "Adolf Hitler" || enemynear, name = "Adolf Hitler"
trigger18 = P2name = "Hyper Neo-Kamek" || P4name = "Hyper Neo-Kamek" || enemynear, name = "Hyper Neo-Kamek"
trigger19 = P2name = "Overlord" || P4name = "Overlord"
trigger20 = P2name = "Light Yagami" || P4name = "Light Yagami" || enemynear, name = "Light Yagami"
trigger21 = p2name = "Kanna" || P4name = "Kanna" || enemynear, name = "Kanna"
trigger22 = P2name = "Dark Hikari Reiko" || P4name = "Dark Hikari Reiko" || enemynear, name = "Dark Hikari Reiko"
trigger23 = P2name = "F1" || P4name = "F1" || enemynear, name= "F1"
trigger24 = P2name = "Psycho Shredder[S]" || P2name = "Psycho Shredder[S] 3.0" || P4name = "Psycho Shredder[S]" || P4name = "Psycho Shredder[S] 3.0" || enemynear, name = "Psycho Shredder[S]" || enemynear, name = "Psycho Shredder[S] 3.0"
trigger25 = P2name = "Kadelioscope" || P4name = "Kadelioscope" || enemy, authorname = "NeoUle AKA [Haddockb]" || enemy(numenemy - 1), authorname = "NeoUle AKA [Haddockb]"
trigger26 = P2name = "Super Dizzy" || P2name = "Dizzy" || P4name = "Super Dizzy" || P4name = "Dizzy" || enemynear, name= "Super Dizzy"
trigger27 = P2name = "Goku super saiyajin 5" || P4name = "Goku super saiyajin 5"
trigger28 = P2name = "Neo-Sephiroth" || P4name = "Neo-Sephiroth"
trigger29 = p2name = "Y20k buggeroid t3h H4x" || p4name = "Y20k buggeroid t3h H4x"
trigger30 = p2name = "Death Star" || p4name = "Death Star" || p2name = "deathstar" || p4name = "deathstar"   ;;;;I AIN'T SURE ABOUT THE REAL NAME OF THIS....
trigger31 = p2name = "Omni-Psych Chipp" || p4name = "Omni-Psych Chipp" || p2name = "Omni-Psych Jam" || p4name = "Omni-Psych Jam" || p2name = "Omni-Psych justice" || p4name = "Omni-Psych justice"
trigger32 = p2name = "Mech-HISUIX" || p4name = "Mech-HISUIX" || p2name = "mechhisuiex" || p4name = "mechhisuiex" || p2name = "Stupid Mech-HISUIX" || p4name = "Stupid Mech-HISUIX"
trigger33 = enemy, authorname = "Neon Tiger" || enemy(numenemy - 1), authorname = "Neon Tiger"
trigger34 = enemy, authorname = "Hanyou" || enemy(numenemy - 1), authorname = "Hanyou"
trigger35 = enemy, authorname = "nana/Seven" || enemy, authorname = "Seven" || enemy(numenemy - 1), authorname = "nana/Seven" || enemy(numenemy - 1), authorname = "Seven"
trigger36 = enemy, authorname = "DENMOU" || enemy, authorname = "denmou" || enemy,authorname = "gm" || enemy(numenemy - 1), authorname = "DENMOU" || enemy(numenemy - 1), authorname = "denmou" || enemy(numenemy - 1),authorname = "gm"
trigger37 = enemy, authorname = "sordane" || enemy, authorname = "Oohwhap" || enemy(numenemy - 1), authorname = "sordane" || enemy(numenemy - 1), authorname = "Oohwhap"
trigger38 = enemy, authorname = "Iron Commando" || enemy, authorname = "Ironcommando" || enemy, authorname = "Ironcommando the cheapie creator"
trigger39 = P2name = "Androctonus crassicauda" || P4name = "Androctonus crassicauda" || enemynear, Name = "Mecha Scorpio" || enemynear(numenemy - 1), name = "Androctonus crassicauda" || enemynear(numenemy - 1), Name = "Mecha Scorpio"
trigger40 = P2name = "MUAHAHAHAHAHAHAHAHA" || P4name = "MUAHAHAHAHAHAHAHAHA" || P2name = "A-Bomb" || P4name = "A-Bomb" || enemynear, Name = "A-Bomb" || enemynear, Name = "MUAHAHAHAHAHAHAHAHA"
trigger41 = (enemy, name = "UNKNOWN" && enemy,authorname="hanma" && enemy, palno = 12) || (enemy(numenemy - 1), name = "UNKNOWN" && enemy(numenemy - 1),authorname="hanma" && enemy(numenemy - 1), palno = 12)
trigger42 = enemy, name = "n-ri_ssj9" || enemy(numenemy - 1), name = "n-ri_ssj9" || enemynear, authorname = "  " || enemynear(numenemy - 1), authorname = "  "
trigger43 = enemy, name = "Legend Gold Magaki" || enemy(numenemy - 1), name = "Legend Gold Magaki"
trigger44 = enemynear, authorname = "HellToast & Muteki" || enemynear(numenemy - 1), authorname = "HellToast & Muteki"
trigger45 = enemy, authorname = "Ex-Infernis" || enemy(numenemy - 1), authorname = "Ex-Infernis"
trigger46 = enemy, authorname = "Tetchi" || enemy(numenemy - 1), authorname = "Tetchi"
trigger47 = enemy, authorname = "EasyChar" || enemy(numenemy - 1), authorname = "EasyChar"
var(53) = 1
ignorehitpause = 1
persistent = 1

[State -2, VarSet]
type = VarSet
trigger1 = win
trigger2 = enemynear, name = "Rare Akuma" && enemynear(numenemy - 1), name = "Rare Akuma"
trigger3 = enemy, name = "Rare Akuma" && enemy(numenemy - 1), name = "Rare Akuma"
v = 40
value = 0
ignorehitpause = 1
persistent = 1

[State -2, VarSet]
type = VarSet
trigger1 = win
trigger2 = enemynear, name = "Rare Akuma" && enemynear(numenemy - 1), name = "Rare Akuma"
trigger3 = enemy, name = "Rare Akuma" && enemy(numenemy - 1), name = "Rare Akuma"
v = 53
value = 0
ignorehitpause = 1
persistent = 1




[State -2, hitby]
type=hitby
trigger1=var(40) = 0
value=SCA,AA
time=-1
ignorehitpause=1
[State -2, hitby]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=5000
slot=0
time=-1
ignorehitpause = 1
persistent = 1
[State -2, hitby]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=5000
slot=1
time=-1
ignorehitpause = 1
persistent = 1
[State -2, hitby]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=5000
slot=2
time=-1
ignorehitpause = 1
persistent = 1
[State -2, hitby]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=5000
slot=3
time=-1
ignorehitpause = 1
persistent = 1
[State -2, hitby]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=5000
slot=4
time=-1
ignorehitpause = 1
persistent = 1
[State -2, hitby]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=5000
slot=5
time=-1
ignorehitpause = 1
persistent = 1
[State -2, hitby]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=5000
slot=6
time=-1
ignorehitpause = 1
persistent = 1
[State -2, hitby]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=5000
slot=7
time=-1
ignorehitpause = 1
persistent = 1
[State -2, eye for an eye]
type=nothitby
trigger1 = var(35)
trigger1 = var(40) = 0
value= SCA, AA, AP, AT
time=-1
ignorehitpause=1
;I added this crap -- thelordanon
[State -2, unhitable]
type = NotHitBy
trigger1 = numhelper(10666) = 1
trigger1 = var(40) = 0
value = SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
ignorehitpause = 1
[State -2, hitby]
type=hitoverride
trigger1= var(40) != 0
trigger2 = var(53) != 0
attr=SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
stateno = -1
slot=0
time=-1
pausemovetime = 99999
supermovetime = 99999
[State -2, hitby]
type=hitoverride
trigger1= var(40) != 0
trigger2 = var(53) != 0
attr=SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
stateno = -1
slot=1
time=-1
pausemovetime = 99999
supermovetime = 99999
[State -2, hitby]
type=hitoverride
trigger1= var(40) != 0
trigger2 = var(53) != 0
attr=SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
stateno = -1
slot=2
time=-1
pausemovetime = 99999
supermovetime = 99999
[State -2, hitby]
type=hitoverride
trigger1= var(40) != 0
trigger2 = var(53) != 0
attr=SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
stateno = -1
slot=3
time=-1
pausemovetime = 99999
supermovetime = 99999
[State -2, hitby]
type=hitoverride
trigger1= var(40) != 0
trigger2 = var(53) != 0
attr=SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
stateno = -1
slot=4
time=-1
pausemovetime = 99999
supermovetime = 99999
[State -2, hitby]
type=hitoverride
trigger1= var(40) != 0
trigger2 = var(53) != 0
attr=SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
stateno = -1
slot=5
time=-1
pausemovetime = 99999
supermovetime = 99999
[State -2, hitby]
type=hitoverride
trigger1= var(40) != 0
trigger2 = var(53) != 0
attr=SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
stateno = -1
slot=6
time=-1
pausemovetime = 99999
supermovetime = 99999
[State -2, hitby]
type=hitoverride
trigger1= var(40) != 0
trigger2 = var(53) != 0
attr=SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
stateno = -1
slot=7
time=-1
pausemovetime = 99999
supermovetime = 99999
[State -2, Crazy Unhitable]
type = NotHitBy
trigger1 = var(40) != 0
trigger2 = var(53) != 0
value = SCA, AA, AP, AT, NA, SA, HA, NP, SP, HP, NT, ST, HT
time=-1
ignorehitpause = 1
[State -2, Crazy Unhitable]
type = HitBy
trigger1 = var(40) != 0
trigger2 = var(53) != 0
value =
ignorehitpause = 1
persistent = 1

;I added a lot of crap at random places in the following -- thelordanon
[State -2, Helper]
type = Helper
trigger1 = life > 0
trigger1 = !ishelper
trigger1 = var(40) != 0 && var(53) = 0
trigger1 = numhelper(10666) < 1
name = "armor2"
stateno = 10666
ID = 10666
keyctrl = 1
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1

[State -2, Die]
type = Helper
trigger1 = var(53) != 0
trigger1 = roundstate = 2
trigger2 = enemy, authorname = "supermystery" || enemy(numenemy - 1), authorname = "supermystery"
trigger3 = P2name = "Psycho Shredder[S]" || P2name = "Psycho Shredder[S] 3.0" || P4name = "Psycho Shredder[S]" || P4name = "Psycho Shredder[S] 3.0" || enemynear, name = "Psycho Shredder[S]" || enemynear, name = "Psycho Shredder[S] 3.0"
trigger4 = enemy, authorname = "HellToast & Muteki" || enemy(numenemy - 1), authorname = "HellToast & Muteki"
name = "Superkill"
postype = p2
stateno = 29835
ID = 29835
time = -1
keyctrl = 1
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1

[State -2, Die2]
type = Helper
triggerall = numhelper(29836) >= 1
triggerall = helper(29836), stateno != 29836
trigger1 = var(53) != 0
trigger1 = roundstate = 2
trigger2 = enemy, authorname = "supermystery" || enemy(numenemy - 1), authorname = "supermystery"
trigger3 = P2name = "Psycho Shredder[S]" || P2name = "Psycho Shredder[S] 3.0" || P4name = "Psycho Shredder[S]" || P4name = "Psycho Shredder[S] 3.0" || enemynear, name = "Psycho Shredder[S]" || enemynear, name = "Psycho Shredder[S] 3.0"
trigger4 = enemy, authorname = "HellToast & Muteki" || enemy(numenemy - 1), authorname = "HellToast & Muteki"
name = "Superkill2"
stateno = 29836
ID = 29836
time = -1
keyctrl = 1
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1

[State -2, Die2]
type = Helper
triggerall = numhelper(29836) < 1
trigger1 = var(53) != 0
trigger1 = roundstate = 2
trigger2 = enemy, authorname = "supermystery" || enemy(numenemy - 1), authorname = "supermystery"
trigger3 = P2name = "Psycho Shredder[S]" || P2name = "Psycho Shredder[S] 3.0" || P4name = "Psycho Shredder[S]" || P4name = "Psycho Shredder[S] 3.0" || enemynear, name = "Psycho Shredder[S]" || enemynear, name = "Psycho Shredder[S] 3.0"
trigger4 = enemy, authorname = "HellToast & Muteki" || enemy(numenemy - 1), authorname = "HellToast & Muteki"
name = "Superkill2"
stateno = 29836
ID = 29836
time = -1
keyctrl = 1
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1

[State -2, life-]
type = lifeadd
triggerall = life >= lifemax / 4
triggerall = numhelper(10666) = 1
triggerall = helper(10666),Gethitvar(Damage) >= 10
trigger1 = var(40) = 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
trigger1 = var(40) = 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
trigger1 = var(40) = 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
trigger1 = var(40) = 0
value = -10
absolute = 1

[State -2, Damage]
type = LifeSet
trigger1 = var(40) != 0
trigger2 = var(53) != 0
value = lifemax
kill = 0
ignorehitpause = 1

[State -2, Damage2]
type = PowerSet
trigger1 = var(40) != 0
trigger2 = var(53) != 0
value = const(data.power)
kill = 0
ignorehitpause = 1

[State -2, No Fall Down]
type = SelfState
triggerall = !ishelper
triggerall = var(40) != 0 || var(53) != 0
triggerall = alive
triggerall = !var(33)
trigger1 = movetype = H
trigger2 = movereversed
trigger3 = life <= 1
value = 1505
ignorehitpause = 1
pausemovetime = 9999999999999999999999999999
supermovetime = 9999999999999999999999999999

[State -2, No Reversing]
type = SelfState
triggerall = !ishelper
triggerall = var(40) = 0 && var(53) = 0
triggerall = alive || life >= 1
triggerall = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
triggerall = !(numenemy = 1 && enemy,name="JAM KURADOBERI" && enemy,authorname="AOAO")
triggerall = !(numenemy = 1 && enemy,name="Catwalk" && enemy,authorname="Phantom.of.the.Server")
triggerall = !(numenemy = 1 && enemy,name="Dan Hibiki" && enemy,authorname="Phantom.of.the.Server")
triggerall = !(numenemy = 1 && enemy,name="Morrigan Aensland" && enemy,authorname="Phantom.of.the.Server")
triggerall = !(numenemy = 1 && enemy,name="MJJ" && enemy,authorname="RyuUi SinYongKwon")
trigger1 = movetype = H
trigger1 = stateno != [5000, 5210]
trigger1 = stateno != [150, 155]
trigger1 = stateno != 4020
trigger1 = stateno != [4900, 4903]
trigger2 = movereversed
value = 1505
ignorehitpause = 1
pausemovetime = 9999999999999999999999999999
supermovetime = 9999999999999999999999999999

[State -2, Hitlock]
type = VarAdd
triggerall = stateno != 1505
trigger1 = hitpausetime
trigger2 = !hitover
v = 54
value = 1
ignorehitpause = 1
persistent = 1

[State -2, NoHitlock]
type = VarSet
trigger1 = hitover
trigger1 = !hitpausetime
trigger2 = stateno = 1505
v = 54
value = 0
ignorehitpause = 1
persistent = 1

[State -2, Reversing]
type = ReversalDef
trigger1 = movetype = H
trigger1 = random > 980
trigger1 = stateno != [4900, 4903]
trigger1 = !var(33)
trigger1 = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
reversal.attr = SCA, AA, AT, AP
pausetime = 0,0
time = 1
numhits = 0
sparkno = -1
p1stateno = 1505
p2stateno = 6996
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State -2, Reversing]
type = ReversalDef
trigger1 = var(35) || var(40)
trigger1 = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
reversal.attr = SCA, AA, AT, AP
pausetime = 0,0
time = 1
numhits = 0
sparkno = -1
hitsound=s2,10
p1stateno = 1505
p2stateno = 6996
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State -2, Reversing]
type = ReversalDef
trigger1 = var(53) != 0
trigger1 = !ishelper
reversal.attr = SCA, AA, AT, AP
pausetime = 0,0
time = 1
numhits = 0
sparkno = -1
p1stateno = 1505
p2stateno = 29834
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State -2, Breaker2]
type=reversaldef
trigger1= var(54) >= 300
trigger1 = stateno != [4900, 4903]
trigger1 = !var(33)
trigger1 = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
reversal.attr=SCA,AA,AP,AT
p1stateno = 1505
p2stateno=6996
pausetime=0,0
hitsound=s2,10
sparkno=3
sparkxy=0,0
numhits=0
pausemovetime = 99999
supermovetime = 99999

[State -2, Escape hitlock]
type = SelfState
triggerall = !ishelper
triggerall = alive || life >= 1
triggerall = stateno != [4900, 4903]
triggerall = !var(33)
trigger1 = enemynear, name != "Rare Akuma" || enemynear(numenemy - 1), name != "Rare Akuma"
trigger1 = var(54) >= 300
time = 1
value = 1505
ignorehitpause = 1
pausemovetime = 99999999999999999999999999
supermovetime = 99999999999999999999999999

[State -2, HitEscape clear]
type = VarSet
trigger1 = roundstate != 2
v = 34
value = 0
ignorehitpause = 1
persistent = 1

[State -2, Death to all]
type = TargetState
triggerall = var(53) != 0
triggerall = !win
trigger1 = numenemy = 1
trigger1 = enemy, alive
trigger2 = numenemy = 1
trigger2 = enemy, movetype != H
trigger3 = numenemy = 2
trigger3 = enemynear, alive
trigger3 = enemynear(1), alive
trigger4 = numenemy = 2
trigger4 = enemynear, movetype != H
trigger4 = enemynear(1), movetype != H
value = 29834
ignorehitpause = 1

[State -2, Phasing]
type = PlayerPush
trigger1 = var(53) != 0
value = 0
time = 1
ignorehitpause = 1

[State give him the moves]
type=hitby
triggerall= numenemy=1
triggerall= enemy,movetype!=H
trigger1= enemy,name="Catwalk" && enemy,authorname="Phantom.of.the.Server"
trigger2= enemy,name="Dan Hibiki" && enemy,authorname="Phantom.of.the.Server" && enemy,stateno=4000
trigger3= enemy,name="Morrigan Aensland" && enemy,authorname="Phantom.of.the.Server" && enemy,stateno=4100
trigger4= enemy,name="JAM KURADOBERI" && enemy,authorname="AOAO" && enemy,stateno=6001
trigger5= enemy,name="MJJ" && enemy,authorname="RyuUi SinYongKwon" && enemy,stateno=3000
value=SCA,AA,AP,AT
time=-1
ignorehitpause=1
[State give him the moves]
type=hitoverride
triggerall= numenemy=1
triggerall= enemy,movetype!=H
trigger1= enemy,name="Catwalk" && enemy,authorname="Phantom.of.the.Server"
trigger2= enemy,name="Dan Hibiki" && enemy,authorname="Phantom.of.the.Server" && enemy,stateno=4000
trigger3= enemy,name="Morrigan Aensland" && enemy,authorname="Phantom.of.the.Server" && enemy,stateno=4100
trigger4= enemy,name="JAM KURADOBERI" && enemy,authorname="AOAO" && enemy,stateno=6001
trigger5= enemy,name="MJJ" && enemy,authorname="RyuUi SinYongKwon" && enemy,stateno=3000
attr=
stateno=5000
slot=1
time=-1

[State -2]
type=assertspecial
trigger1= gethitvar(damage)>=var(39)
trigger2= movereversed
trigger3= !var(38)
trigger3= stateno != [4900, 4903]
trigger3= !var(33)
trigger3= life <= 1
flag=noko
ignorehitpause=1

[State -2]
type=assertspecial
trigger1= var(40) != 0
flag=unguardable
flag2=nojugglecheck
time = -1
ignorehitpause=1
persistent = 1

[State -2]
type=assertspecial
trigger1= var(53) != 0
trigger1= roundstate = 2
flag=unguardable
flag2=nojugglecheck
flag3=invisible
time = -1
ignorehitpause=1
persistent = 1

[State -2, Staring Contest]
type = Projectile
triggerall = roundstate = 2
trigger1 = enemynear, name = "Rare Akuma"
trigger1 = enemynear, authorname = "Phantom.of.the.Server"
trigger2 = enemynear(numenemy - 1), name = "Rare Akuma"
trigger2 = enemynear(numenemy - 1), authorname = "Phantom.of.the.Server"
projanim=4906
velocity=0,0
projedgebound=65535
projstagebound=65535
projheightbound=-65535,65535
affectteam = B
projremove = 0
projremovetime=2
postype=p2
offset = 0,0
projpriority = -1
attr = A, HA
hitflag = MAFDPLH
priority = 7, Hit
damage    = 0,0
numhits = 0
getpower = 0
givepower = -999999999999999999,-999999999999999999
guardflag =
pausetime = 0,0
sparkno = -1
kill = 1
guard.kill = 1
fall.kill = 1
envshake.time = 10
fall.envshake.time = 20
fall.envshake.freq = 180
fall.envshake.ampl = -10
absolute = 1
ignorehitpause = 1
supermove = 1
pausemove = 1
pausemovetime = 999999999999999999999999999999
supermovetime = 999999999999999999999999999999
persistent = 1
forcestand = 1

[State -2, Reflect High Damage]
type = Projectile
triggerall = gethitvar(damage)>=1000 || roundstate != 2
triggerall = gethitvar(hittime) = 1
trigger1 = var(52) < 300
trigger2 = var(40) != 0
trigger3 = var(53) != 0
projanim=4906
velocity=0,0
projedgebound=65535
projstagebound=65535
projheightbound=-65535,65535
projremove = 0
projremovetime=1
postype=p2
offset = 0,0
projpriority = -1
attr = A, HA
hitflag = MAFDPLH
priority = 7, Hit
damage    = ceil(gethitvar(damage)/2),ceil(gethitvar(damage)/2)
numhits = 0
givepower = -gethitvar(damage)
guardflag =
pausetime = 0,gethitvar(hitshaketime)
sparkno = -1
hitsound=s5,24
fall = gethitvar(fall)
fall.recover = 0
fall.damage = -gethitvar(fall.damage)
ground.hittime = gethitvar(hittime)
ground.slidetime = gethitvar(slidetime)
ground.velocity = gethitvar(xvel), gethitvar(yvel)
yaccel = gethitvar(yaccel)
envshake.time = 10
fall.envshake.time = 20
fall.envshake.freq = 180
fall.envshake.ampl = -10
absolute = 1
ignorehitpause = 1
supermove = 1
pausemove = 1
pausemovetime = 999999999999999999999999999999
supermovetime = 999999999999999999999999999999
persistent = 1

[State -2, Die Die Die]
type = Projectile
trigger1 = var(53) != 0
trigger1 = roundstate = 2
trigger2 = enemy, authorname = "supermystery" || enemy(numenemy - 1), authorname = "supermystery"
trigger3 = P2name = "Psycho Shredder[S]" || P2name = "Psycho Shredder[S] 3.0" || P4name = "Psycho Shredder[S]" || P4name = "Psycho Shredder[S] 3.0" || enemynear, name = "Psycho Shredder[S]" || enemynear, name = "Psycho Shredder[S] 3.0"
trigger4 = enemy, authorname = "HellToast & Muteki" || enemy(numenemy - 1), authorname = "HellToast & Muteki"
projanim=4906
velocity=0,0
projedgebound=65535
projstagebound=65535
projheightbound=-65535,65535
projremovetime=2
postype=p2
offset = 0,0
projpriority = -1
attr = A, HA
hitflag = MAFDPLH
priority = 7, Hit
damage    = 999999999999999999999999999999999,9999999999999999999999999999999999
numhits = 999
givepower = -9999999999999999999999999999999999999999999999999999999999
guardflag =
pausetime = 0,10
sparkno = -1
fall = 1
fall.recover = 0
fall.damage = 99999999999999999999999999999999999999999999999999999999999
kill = 1
guard.kill = 1
fall.kill = 1
envshake.time = 10
fall.envshake.time = 20
fall.envshake.freq = 180
fall.envshake.ampl = -10
p2stateno = 29834
absolute = 1
ignorehitpause = 1
supermove = 1
pausemove = 1
pausemovetime = 999999999999999999999999999999
supermovetime = 999999999999999999999999999999
persistent = 1

[State -2]
type=varadd
trigger1= !(gametime%10)
trigger1= alive && movetype!=H && roundstate=2 && stateno!=6990
var(39)=1
ignorehitpause=1
[State -2]
type=poweradd
trigger1= alive && roundstate=2 && movetype!=H
value= ifelse(var(35), 15, 3)
ignorehitpause=1

[State -2]
type=varset
trigger1= roundstate<2
trigger2= roundstate!=2 && alive
trigger3= var(39)>lifemax
var(39)=lifemax
ignorehitpause=1
[State -2]
type=varset
trigger1= var(39)<life
var(39)=life
ignorehitpause=1
[State -2]
type=varset
triggerall = var(40) = 0
triggerall = var(53) = 0
trigger1= roundstate!=2 && !alive
trigger2= var(39)<0
var(39)=0
ignorehitpause=1

[State -2, damage]
type=varadd
trigger1=var(37)
var(39)=var(37)
ignorehitpause=1
[State -2, damage]
type=varset
trigger1=1
var(37)=0
ignorehitpause=1

[State -2, damage]
type=varadd
trigger1= gethitvar(damage) && stateno!=700 && numenemy
var(37)= -gethitvar(damage) / ifelse(gethitvar(hitcount)<=1, 1, gethitvar(hitcount))
ignorehitpause=1
[State -2, damage]
type=varset
trigger1= var(37)<-250
var(37)= -250
ignorehitpause=1

[State -2, limit]
type=varset
trigger1= p2movetype=H
var(36)= 0
[State -2, limit]
type=varadd
trigger1= var(36) && hitshakeover
var(36)= ifelse(var(36)>0, -1, 1)
[State -2, limit]
type=varadd
trigger1= var(37)
var(36)= -var(37)
ignorehitpause=1
[State -2, limit]
type=varset
trigger1= var(36)>500 || var(36)<0 || movetype=A
var(36)= ifelse(var(36)>500, 500, 0)
ignorehitpause=1

[State -2, I'm not rare!]
type=varadd
trigger1= 1
var(37)= -2*(!(name="Rare Akuma") + !(authorname="Phantom.of.the.Server"))
[State -2, I'm not rare!]
type=varadd
triggerall= numenemy
trigger1= (enemy,name="Rare Akuma" || enemy(numenemy - 1), name="Rare Akuma")
trigger1= (enemy,authorname="Phantom.of.the.Server" || enemy(numenemy - 1),authorname="Phantom.of.the.Server")
trigger2= (enemy,name="Rare Akuma " || enemy(numenemy - 1), name="Rare Akuma ")
trigger2= (enemy,authorname="Phantom.of.the.Server " || enemy(numenemy - 1),authorname="Phantom.of.the.Server ")
var(37)= -1

[State -2, RESURRECTION!]
type=varset
trigger1= roundstate<2
var(38)=0
ignorehitpause=1
[State -2, RESURRECTION!]
type=changestate
trigger1= !var(38)
trigger1= gethitvar(damage)>=var(39) || life <= 1
trigger1= roundstate=2 && (stateno!=6990 || movetype=H)
value=6990
ignorehitpause=1

[State -2]
type=lifeset
trigger1=1
value=var(39)
ignorehitpause=1
[State -2]
type=lifeset
trigger1=var(35)=-1
value=lifemax
ignorehitpause=1

[State lol owned]
type=targetlifeadd
trigger1= numtarget && stateno!=4001
trigger1= target,name="Broly 'le cauchemar' super saiyen nv3" && target,life<=500
value=-9000
kill=1
absolute=1
ignorehitpause=1
[State you can air block it]
type=targetstate
trigger1= numtarget
trigger1= !(target,hitshakeover) && (target,stateno!=6997)
trigger1= (target,authorname="Jango" || target,authorname="Jesuszilla") && target,stateno=154
value=6997
ignorehitpause=1

[State -2]
type=helper
trigger1= !numhelper(75)
helpertype=normal
stateno=75
ID=75
name="Holinessness"
postype=p1
pausemovetime=65535
supermovetime=65535

[State -2]
type=helper
trigger1= !numhelper(77)
helpertype=normal
stateno=77
ID=77
name="Holiness"
postype=p1
pausemovetime=65535
supermovetime=65535

[State -2, Za Warudo]
type=varset
trigger1= roundstate!=2 || movetype=H || var(20)<0
trigger2= var(59)<=0 && stateno!=3500 && command="warudo"
trigger3= stateno=4001 && animelemtime(2)>=0
trigger4= numhelper(3405)
trigger4= helper(3405),movecontact
var(20)=0
ignorehitpause=1
[State -2, Za Warudo]
type=varadd
trigger1= var(20)>0
var(20)=-1
ignorehitpause=1
[State -2, Za Warudo]
type=pause
trigger1= var(20)>0 && roundstate=2
time=2
movetime=2
ignorehitpause=1
unhittable = (var(40) != 0)
[State -2, Za Warudo again]
type=pause
triggerall = roundstate = 2
trigger1= var(34)>=2*60
trigger1= movetype != A
trigger2= var(34)>=4*60
time=2
movetime=2
ignorehitpause=1
unhittable = 1
[State -2, Za Warudo]
type=bgpalfx
trigger1= roundstate=2 && var(20)>0 && !numhelper(7500)
time=2
color=0
add=-16-ceil(cos(gametime/60.0*pi)*16),-16-ceil(cos(gametime/60.0*pi)*16),-16-ceil(cos(gametime/60.0*pi)*16)
ignorehitpause=1
[State -2, Za Warudo]
type=assertspecial
trigger1= roundstate=2 && var(20)>0
flag=timerfreeze
flag2=nomusic
ignorehitpause=1

[State -2, Duckage]
type=helper
triggerall= numhelper(6160)<3
triggerall= (roundstate=[2,3]) && !numhelper(7500)
trigger1= movetype=A && screenpos y<0 && random<25
trigger1= (stateno!=[4300,4311])
trigger2= stateno=3050 && animelemtime(5)>=0 && animelemtime(31)<0 && random<10
trigger3= stateno=3100 && animelemtime(4)>=0 && screenpos y<0 && random<100
trigger4= stateno=4101 && random<20
trigger5= stateno=4201 && time>=30 && random<10
trigger6= stateno=4902 && random<10
helpertype=normal
stateno=6160
ID=6160
name="Duck"
postype=p1
pos= ceil(p2dist x-40+(random/12.5)), 0
facing=ifelse(random<500,1,-1)
size.xscale=1
size.yscale=1
ownpal=1

[State -2, attackvarbyhits]
type=varset
trigger1= numenemy
fvar(12)= ifelse(enemynear,gethitvar(hitcount)<3, 36, ifelse(enemynear,gethitvar(hitcount)>=34, 2, 36-enemynear,gethitvar(hitcount)))/36.0
ignorehitpause=1
[State -2, attackvarbyhitsreset]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
fvar(12)=1
ignorehitpause=1
[State -2, attackvar]
type=varset
trigger1= numenemy
fvar(12)= fvar(12) * ifelse((enemynear,lifemax<=2000), 2000, (enemynear,lifemax)) / 2000.0
ignorehitpause=1
[State -2, Use the Force]
type=varset
triggerall= numenemy
trigger1= enemy,name="Death Star" && enemy,authorname="TROY"
trigger2= (enemy,name="Pico" || enemy,name="Pico1") && enemy,authorname="christopher moore"
fvar(12)=50
ignorehitpause=1
[State -2, dampener]
type=attackmulset
trigger1= 1
value=fvar(12)
ignorehitpause=1

[State -2, Juggle]
type=assertspecial
trigger1= 1
flag=nojugglecheck
ignorehitpause=1
[State -2, Awesome]
type=assertspecial
trigger1= random<100
flag= unguardable
ignorehitpause=1
[State -2, Wha? On a rare char? O_o]
type=assertspecial
trigger1= 1
flag=nostandguard
flag2=nocrouchguard
flag3=noairguard
ignorehitpause=1

[State -2, No Dizzy >:)]
type=selfstate
trigger1= anim=5300
trigger1= numenemy && !pos y
trigger1= enemynear,movetype!=A
trigger1= ((enemy,name="Catwalk") + (enemy,authorname="Phantom.of.the.Server")) != 2
value=0
ctrl=1

[State -2, Akumettes]
type=helper
trigger1= !ishelper
trigger1= numenemy=1 && numhelper(6975)<2
trigger1= enemy,name="Catwalk" && enemy,authorname="Phantom.of.the.Server"
trigger1= movetype=H && stateno=2000
helpertype=normal
ID=6975
stateno=6975
name="Akumette"
postype=p1
pos=ifelse(numhelper(6975)=1, -40, 40)
keyctrl=0
size.xscale=.5
size.yscale=.5
ownpal=1

[State lol]
type=playsnd
triggerall= numenemy=1 && movetype=H
triggerall= enemy,name="JAM KURADOBERI" && enemy,authorname="AOAO"
triggerall= enemy,movetype!=H && (enemy,stateno=[6002,6010])
triggerall= movetype=H
trigger1= stateno=6304 && anim=6304 && animelem=2
trigger2= stateno=6305 && anim=6305 && animelem=2
trigger3= stateno=6307 && anim=6306 && animelem=2
value= 5000, ifelse(anim=6304, 3, 2)
freqmul=ifelse(ishelper, 1.5, 1)
channel=0
[State lol]
type=playsnd
trigger1= numenemy=1 && movetype=H
trigger1= enemy,name="JAM KURADOBERI" && enemy,authorname="AOAO"
trigger1= enemy,movetype!=H && enemy,stateno=6004
trigger1= stateno=6303 && time=90
value= 4, 7
freqmul=ifelse(ishelper, 1.5, 1)
channel=0
[State lol]
type=playsnd
trigger1= numenemy=1 && movetype=H
trigger1= enemy,name="JAM KURADOBERI" && enemy,authorname="AOAO"
trigger1= enemy,movetype!=H && enemy,stateno=6010
trigger1= stateno=6303 && time=8
value= 4, 12
freqmul=ifelse(ishelper, 1.5, 1)
channel=0

[State -2, stopsnd]
type=stopsnd
trigger1= !time && prevstateno=187
channel=4

[State -2, Voice Pos]
type=sndpan
trigger1= 1
channel=0
pan=0
ignorehitpause=1
[State -2, Music Pos]
type=sndpan
trigger1= 1
channel=7
abspan=0
ignorehitpause=1

;remove if it causes problems
[State -2, Cheapdeath]
type = TargetLifeAdd
trigger1 = var(53) != 0
value = -Ceil(enemy,const(data.life))
time = 1
kill = 1
absolute = 1
ID = enemynear, ID
ignorehitpause = 1
persistent = 1

[State -2, Cheapdeath]
type = TargetPowerAdd
trigger1 = var(53) != 0
value = -Ceil(enemy,const(data.power))
time = 1
absolute = 1
ID = enemynear, ID
ignorehitpause = 1
persistent = 1

[State -2, Life keeper]
type = VarSet
trigger1 = 1
v = 23
value = life
ignorehitpause = 1
persistent = 1

[State -2, Debug]
type=displaytoclipboard
trigger1= 1
text="Piss off, debug flood.  Srsly. %d %d %d"
params = var(21), var(22), var(23)
[State -2, Debug]
type=appendtoclipboard
trigger1= var(59)<=-1 && !var(35)
text="\nY HALO THAR"
[State -2, Debug]
type=appendtoclipboard
trigger1= var(59)>=1 && !var(35)
text="\nHA HA HA, OH WOW"
[State -2, Debug]
type=appendtoclipboard
trigger1= var(35)
text="\nMAKE READY MY SHIP GENERAL, IT'S TIME TO SHOW THOSE DOGS WHAT WE ARE MADE OF"

;===========================================================================
;===============================<-3 STATES>=================================
;===========================================================================
[Statedef -3]

[State -3, AI]
type=varset
trigger1= alive && ishometeam
trigger1= teamside=2 || matchno>1
var(59)=1
[State -3, AI Helper]
type=helper
trigger1= !var(59) && !numhelper(9741) && !ishelper
trigger1= alive && roundstate=2
helpertype=normal
name="Rare Akuma's AI"
ID=9741
pos=99999,99999
stateno=9741
keyctrl=1
pausemovetime=65535
supermovetime=65535
[State -3, Gametime Var]
type=varset
trigger1= 1
var(58)=gametime
ignorehitpause=1

[State -3, Watch those stun times]
type=selfstate
trigger1= time>=24
trigger1= stateno=5000 || stateno=5010 || stateno=5020 || stateno=5070 || stateno=5080
value=ifelse(statetype=S, 5001, ifelse(statetype=C, 5011, 5030))
[State -3, Watch those stun times]
type=selfstate
trigger1= time>=24
trigger1= stateno=5001 || stateno=5011
value=ifelse(statetype=C, 11, 0)
ctrl=1

[State -3, c-c-c-combo breaker]
type=changestate
value=1505
triggerall= movetype=H && alive
triggerall= time=0
trigger1= gethitvar(hitcount)>1 && random<=(100*gethitvar(hitcount))
trigger2= random < 10

[State -2, Life keeper]
type = VarAdd
trigger1 = var(21)
trigger1 = movetype != H
trigger1 = var(23) <= life
trigger1 = !gethitvar(damage)
trigger1 = hitover
v = 21
value = -1
persistent = 1
[State -3, VarAdd]
type = VarAdd
trigger1 = var(34)
trigger1 = movetype != H
trigger1 = stateno != 1505
v = 34
value = -1
ignorehitpause = 0
persistent = 1

[State -3, GetHit Snd]
type=playsnd
triggerall= alive && time=1
triggerall= stateno=5000 || stateno=5010
trigger1= gethitvar(animtype)>=2 && random<500
trigger2= gethitvar(animtype)=1 && random<375
trigger3= gethitvar(animtype)=0 && random<250
value=5000,1+(random%5)
channel=0
ignorehitpause=1

[State -3, GetHit Snd]
type=playsnd
triggerall= alive && time=1
trigger1= (stateno=5000 || stateno=5010) && numenemy
trigger1= gethitvar(fall) || (enemynear,hitdefattr=SCA,SA,HA)
trigger2= (stateno=5020 || stateno=5070 || stateno=5080)
trigger3= (stateno=5050 || stateno=5100) && (prevstateno!=[5000,5199])
value=5000,1+(random%5)
channel=0
ignorehitpause=1

[State -3, Auto Recover]
type=changestate
trigger1= stateno=5050
trigger1= time && alive
value=5040
ctrl=1
