; Lose by Time Over
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 0, ]
type = PlaySnd
trigger1 = Time = 100
value = S11,12
freqmul = 0.9
volume = 255

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

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 180]
type = S

[State 180, 1]
type = VarSet
trigger1 = Time = 0
v = 54
value = 1

[state a]
type = ChangeState
trigger1 = var(54) = 1
trigger1 = PrevStateNo = 4017
value = ifelse(matchover,4018,4019)

[state a]
type = ChangeState
trigger1 = PrevStateNo = 3903
value = 3904

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
trigger1 = MatchOver = 1
value = 11800+var(46)

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181+(random%3)
;---------------------------------------------------------------------------
; Win pose 1 - Bow
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 180, 1]
type = VarSet
trigger1 = Time = 0
v = 54
value = 1

[State 0, ]
type = PlaySnd
trigger1 = Animelem = 6
value = S0,2

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 7
value = S2,9

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

;---------------------------------------------------------------------------
; Win pose 2 - You suck
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 180, 1]
type = VarSet
trigger1 = Time = 0
v = 54
value = 1

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 3
value = S2,20

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

;---------------------------------------------------------------------------
; Win pose 3 - Groaning Anger
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 180, 1]
type = VarSet
trigger1 = Time = 0
v = 54
value = 1

[State 0, ]
type = PlaySnd
trigger1 = Time = 10
value = S2,16
volume = 255
freqmul = 0.9

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

;---------------------------------------------------------------------------
; Kfm Win POse
[Statedef 11800]
type = S
ctrl = 0
anim = 11800
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,500]
flag = roundnotover
flag2 = nobardisplay

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S2,ifelse(random%2,26,35)
volume = 255

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

;---------------------------------------------------------------------------
; Kfm Win POse
[Statedef 11801]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,500]
flag = roundnotover

[State 0, ]
type = PlaySnd
trigger1 = Time = 17
value = S55,0+(random%2)
volume = 255

[State 0, ]
type = PlaySnd
trigger1 = Time = 317
value = S48,0+(random%3)
volume = 255

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

;---------------------------------------------------------------------------
; Win Pose against some EFZ chars and Vince McMahon....
[Statedef 11802]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,560]
flag = roundnotover

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S2,23
volume = 255

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S2,23
volume = 255

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

;---------------------------------------------------------------------------
; Win Pose against Omega tom hanks, Omega tiger woods and Tokinokuni Kei's Chars.
[Statedef 11803]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,525]
flag = roundnotover

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S2,33

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

;---------------------------------------------------------------------------
; Win Pose against, shiki tohno. (GIVE MY REGARDS TO HELL YOU S.O.B!)
[Statedef 11804]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,450]
flag = roundnotover

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S2,ifelse(random%2,25,28)

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; It's is final and official.... MELTY BLOOD SUCKS!!!!! (seriously...i'am saying this....)
[Statedef 11805]
type = S
ctrl = 0
anim = 9741
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,500]
flag = roundnotover

[State 0, ]
type = Explod
trigger1 = Time = 0
anim = 20
pos = 0,0
postype = p1
facing = -1
vel = -2,0
removetime = 200
shadow = 255,255,255
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S77,(random%4)
volume = 255
freqmul = 0.9

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

;---------------------------------------------------------------------------
; Win pose 3 - vs. Our Leaders!
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 11806]
type = S
ctrl = 0
anim = 184
velset = 0,0

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

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 4
value = S2,37

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,950]
flag = roundnotover

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nomusic

;---------------------------------------------------------------------------
; Win Pose against, Haruhi and Other SOS Brigade. (THEY ARE NOTHING!!!!)
[Statedef 11807]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,450]
flag = roundnotover

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S78,0+(random%4)
freqmul = 0.9
volume = 255

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win Pose against, Any School Days Chars. (SPONGE THE MOP, AND DISAPPEAR!!!)
[Statedef 11808]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,450]
flag = roundnotover

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S85,0
freqmul = 0.9

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

;---------------------------------------------------------------------------
; YOU CANNON STAND AGAINST US
[Statedef 11809]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,450]
flag = roundnotover

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S2,22

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

;---------------------------------------------------------------------------
; Win Pose against some AIR chars....
[Statedef 11810]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,360]
flag = roundnotover

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S2,31
volume = 255

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

;---------------------------------------------------------------------------
; A Message To Gurren Laggan Team...
[Statedef 11811]
type = S
ctrl = 0
anim = 9741
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = time = [0,500]
flag = roundnotover

[State 0, ]
type = Explod
trigger1 = Time = 0
anim = 20
pos = 0,0
postype = p1
facing = -1
vel = -2,0
removetime = 250
shadow = 255,255,255
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S88,ifelse(random%2,1,2)
volume = 255

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

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

[State 190, 2] ; SOS Brigade...meet your worst NIGHTMARE BITCHES...LOL!!!
type = ChangeState
triggerall = Time = 0
trigger1 = p2name = "Haruhi Suzumiya" || p4name = "Haruhi Suzumiya"
trigger2 = p2name = "Nagato Yuki" || p4name = "Nagato Yuki"
trigger3 = p2name = "Yuki Nagato" || p4name = "Yuki Nagato"
trigger4 = p2name = "asakura ryouko" || p4name = "asakura ryouko"
trigger5 = p2name = "Ryoko Asakura" || p4name = "Ryoko Asakura"
trigger6 = p2name = "Mikuru Asahina" || p4name = "Mikuru Asahina"
trigger7 = p2name = "asahina mikuru" || p4name = "asahina mikuru"
trigger8 = p2name = "koizumi itsuki" || p4name = "koizumi itsuki"
trigger9 = p2name = "kyon" || p4name = "kyon"
trigger10 = p2name = "tsuruya-san" || p4name = "tsuruya-san"
trigger11 = p2name = "God Haruhi" || p4name = "God Haruhi"
trigger12 = p2name = "Aku no Tamashi Haruhi" || p4name = "Aku no Tamashi Haruhi"
trigger13 = p2name = "Totally Pissed off Haruhi" || p4name = "Totally Pissed off Haruhi"
trigger14 = p2name = "Pinakamaduming tao sa balat ng lupa" || p4name = "Pinakamaduming tao sa balat ng lupa"
trigger15 = p2name = "Kyoukon Haruhi" || p2name = "Kyoukon Haruhi"
value = 197

[State 190, 2] ; Special Intros
type = ChangeState
triggerall = Time = 0
trigger1 = p2name = "Kyo Kusanagi" || p4name = "Kyo Kusanagi"
trigger2 = p2name = "Ryo Sakazaki" || p4name = "Ryo Sakazaki"
trigger3 = p2name = "Ryu" || p4name = "Ryu"
trigger4 = p2name = "Terry Bogard" || p4name = "Terry Bogard"
trigger5 = p2name = "Ken" || p4name = "Ken" || p2name = "Ken Masters" || p4name = "Ken Masters"
trigger6 = p2name = "Andy Bogard" || p4name = "Andy Bogard"
trigger7 = p2name = "Robert Garcia" || p4name = "Robert Garcia"
trigger8 = p2name = "Geese Howard" || p4name = "Geese Howard"
trigger9 = p2name = "Geese" || p4name = "Geese"
trigger10 = p2name = "Rock Howard" || p4name = "Rock Howard"
trigger11 = p2name = "Kim Kaphwan" || p4name = "Kim Kaphwan"
trigger12 = p2name = "Master Cheese" || p4name = "Master Cheese" || p2name = "Master Geese" || p4name = "Master Geese"
trigger13 = p2name = "Nightmare Geese" || p4name = "Nightmare Geese"
value = 198

[State 190, 2] ; Special Intros
type = ChangeState
triggerall = Time = 0
trigger1 = p2name = "Ultimate Ken" || p4name = "Ulitmate Ken" || p2name = "Evil Ken" || p4name = "Evil Ken"
trigger2 = p2name = "Songoku" || p4name = "Songoku" || p2name = "Vegeta" || p4name = "Vegeta"
trigger3 = p2name = "Sonic Machine" || p4name = "Sonic Machine"
trigger4 = p2name = "Kohaku" || p4name = "Kohaku"
trigger5 = p2name = "Mech-HISUI" || p4name = "Mech-HISUI"
trigger6 = p2name = "Flandre" || p4name = "Flandre" || p2name = "Flandre_Scarlet" || p4name = "Flandre_Scarlet"
trigger7 = p2name = "Patchouli_Knowledge" || p4name = "Patchouli_Knowledge" || p2name = "Patchouli" || p4name = "Patchouli"
trigger8 = p2name = "Alice Margatroid" || p4name = "Alice Margatroid"
trigger9 = p2name = "Akiha_Tohno" || p4name = "Akiha_Tohno" || p2name = "Akiha_Vermilion" || p4name = "Akiha_Vermilion"
trigger10 = p2name = "Kung Fu Man" || p4name = "Kung Fu Man" || p2name = "Joe Mayama" || p4name = "Joe Mayama"
trigger11 = p2name = "Remilia" || p4name = "Remilia" || p2name = "Remilia_Scarlet" || p4name = "Remilia_Scarlet"
trigger12 = p2name = "Alice Margatroid" || p4name = "Alice Margatroid"
trigger13 = p2name = "Kishima_kouma" || p4name = "Kishima_kouma" || p2name = "Kishima Kouma" || p4name = "Kishima Kouma"
trigger14 = p2name = "Warachia" || p4name = "Warachia"
trigger15 = p2name = "Dink Smallwood" || p4name = "Dink Smallwood"
trigger16 = p2name = "Len" || p4name = "Len"
trigger17 = p2name = "Kung Fu Dude" || p4name = "Kung Fu Dude"
trigger18 = p2name = "Developer Fags You Imbecile" || p4name = "Developer Fags You Imbecile"
trigger19 = p2name = "Dirty Kung Fu Man" || p4name = "Dirty Kung Fu Man" || p2name = "Shadow Alpha" || p4name = "Shadow Alpha"
trigger20 = p2name = "RoboCop" || p4name = "RoboCop"
trigger21 = p2name = "Spider-man" || p4name = "Spider-man" || p2name = "Spiderman" || p4name = "Spiderman"
trigger22 = p2name = "Popeye" || p4name = "Popeye"
trigger23 = p2name = "White_Len" || p4name = "White_Len" || p2name = "White_Len(CPU)" || p4name = "White_Len(CPU)"
trigger24 = p2name = "Warcueid" || p4name = "Warcueid" || p2name = "Warcueid_T" || p4name = "Warcueid_T"
trigger25 = p2name = "Sonsaku Hakufu" || p4name = "Sonsaku Hakufu"
trigger26 = p2name = "Akira Honjoji" || p4name = "Akira Honjoji"
trigger27 = p2name = "Dragon" || p4name = "Dragon"
trigger28 = p2name = "War Machine" || p4name = "War Machine"
trigger29 = p2name = "Dragon Claw" || p4name = "Dragon Claw"
trigger30 = p2name = "Mayu Shiina" || p4name = "Mayu Shiina"
trigger31 = p2name = "Misaki Kawana" || p4name = "Misaki Kawana"
trigger32 = p2name = "Mio Kouzuki" || p4name = "Mio Kouzuki"
trigger33 = p2name = "Akane Satomura" || p4name = "Akane Satomura"
trigger34 = p2name = "Rumi Nanase" || p4name = "Rumi Nanase"
trigger35 = p2name = "Shiiko Yuzuki" || p4name = "Shiiko Yuzuki"
trigger36 = p2name = "Nayuki Minase" || p4name = "Nayuki Minase"
trigger37 = p2name = "Shiori Misaka" || p4name = "Shiori Misaka" || p2name = "Shiori" || p4name = "Shiori"
trigger38 = p2name = "Ultimate Ryu" || p4name = "Ultimate Ryu" || p2name = "Evil Ryu" || p4name = "Evil Ryu"
trigger39 = p2name = "Marvin the Martian" || p4name = "Marvin the Martian"
trigger40 = p2name = "Kaori Misaka" || p4name = "Kaori Misaka"
trigger41 = p2name = "Mizuka Nagamori" || p4name = "Mizuka Nagamori" || p2name = "Valsion Ultra" || p4name = "Valsion Ultra"
trigger42 = p2name = "Team Nicktoon" || p4name = "Team Nicktoon"
trigger43 = p2name = "Spongebob Squarepants" || p4name = "Spongebob Squarepants"
trigger44 = p2name = "Invader Zim" || p4name = "Invader Zim"
trigger45 = p2name = "Patrick" || p4name = "Patrick"
trigger46 = p2name = "Mr_crabs" || p4name = "Mr_crabs"
trigger47 = p2name = "Squidward" || p4name = "Squidward"
trigger48 = p2name = "Sandy_Cheeks" || p4name = "Sandy_Cheeks"
trigger49 = p2name = "Dib" || p4name = "Dib"
trigger50 = p2name = "TOKI" || p4name = "TOKI"
trigger51 = p2name = "THOUTHER" || p4name = "THOUTHER"
trigger52 = p2name = "REI" || p4name = "REI"
trigger53 = p2name = "SHIN" || p4name = "SHIN"
trigger54 = p2name = "Mai Tokiha" || p4name = "Mai Tokiha" || p2name = "Kagotsuchi" || p4name = "Kagotsuchi"
trigger55 = p2name = "Natsuki Kuga" || p4name = "Natsuki Kuga" || p2name = "Duran" || p4name = "Duran"
trigger56 = p2name = "Mikoto Minagi" || p4name = "Mikoto Minagi" || p2name = "Miroku" || p4name = "Miroku"
trigger57 = p2name = "Shiki_Nanaya" || p4name = "Shiki_Nanaya"
trigger58 = p2name = "Shiki_Tohno" || p4name = "Shiki_Tohno" || p2name = "Tohno_Shiki" || p4name = "Tohno_Shiki"
trigger59 = p2name = "Hisui" || p4name = "Hisui"
trigger60 = p2name = "Superman" || p4name = "Superman"
trigger61 = p2name = "Eve Original" || p4name = "Eve Original"
trigger62 = p2name = "ingrid" || p4name = "ingrid"
trigger63 = p2name = "Aya Syameimaru" || p4name = "Aya Syameimaru" || p2name = "Aya Shameimaru" || p4name = "Aya Shameimaru"
trigger64 = p2name = "Marisa Kirisame" || p4name = "Marisa Kirisame"
trigger65 = p2name = "Arcueid Brunestud" || p4name = "Arcueid Brunestud" || p2name = "Arcueid_Brunestud" || p4name = "Arcueid_Brunestud"
trigger66 = p2name = "Akaitsuki" || p4name = "Akaitsuki"
trigger67 = p2name = "Big Albert T-Lechy" || p4name = "Big Albert T-Lechy"
trigger68 = p2name = "Captain Caveman" || p4name = "Captain Caveman"
trigger69 = p2name = "Red Arcueid" || p4name = "Red Arcueid" || p2name = "Red_Arcueid" || p4name = "Red_Arcueid"
trigger70 = p2name = "Kung Fu girl" || p4name = "Kung Fu girl"
trigger71 = p2name = "KungFuGirl UZUKI" || p4name = "KungFuGirl UZUKI"
trigger72 = p2name = "Kung Fu Bender" || p4name = "Kung Fu Bender"
trigger73 = p2name = "Ayu Tukimiya" || p4name = "Ayu Tukimiya"
trigger74 = p2name = "Himeko Kurusugawa" || p4name = "Himeko Kurusugawa" || p2name = "Himiko" || p4name = "Himiko"
trigger75 = p2name = "Chikane Himemiya" || p4name = "Chikane Himemiya" || p2name = "Kaon" || p4name = "Kaon"
trigger76 = p2name = "OmegaTH" || p4name = "OmegaTH"
trigger77 = p2name = "Misuzu_K" || p4name = "Misuzu_K" || p2name = "Misuzu" || p4name = "Misuzu" || p2name = "Misuzu_M" || p4name = "Misuzu_M"
trigger78 = p2name = "Youmu_Konpaku" || p4name = "Youmu_Konpaku" || p2name = "Youmu Konpaku" || p4name = "Youmu Konpaku"
trigger79 = p2name = "Sakuya Izayoi" || p4name = "Sakuya Izayoi" || p2name = "Sakuya_Izayoi" || p4name = "Sakuya_Izayoi"
trigger80 = p2name = "Mishio Amano" || p4name = "Mishio Amano" || p2name = "Hyperlion_DeaBN" || p4name = "Hyperlion_DeaBN"
trigger81 = p2name = "Ikumi Amasawa" || p4name = "Ikumi Amasawa"
trigger82 = p2name = "Misuzu Kamio" || p4name = "Misuzu Kamio" || p2name = "Seiryuu no Misuzu" || p4name = "Seiryuu no Misuzu" || p2name = "Misuzu_G" || p4name = "Misuzu_G"
trigger83 = p2name = "Eien no Mizuka" || p4name = "Eien no Mizuka" || p2name = "UNKNOWN" || p4name = "UNKNOWN" || p2name = "Septuagint" || p4name = "Septuagint"
trigger84 = p2name = "Kannabi no Mikoto" || p4name = "Kannabi no Mikoto" || p2name = "kanna" || p4name = "kanna"
trigger85 = p2name = "Kano Kirishima" || p4name = "Kano Kirishima"
trigger86 = p2name = "Adolf Hitler" || p4name = "Adolf Hitler"
trigger87 = p2name = "KENSHIRO" || p4name = "KENSHIRO"
trigger88 = p2name = "RAOH" || p4name = "RAOH"
trigger89 = p2name = "Iggman" || p4name = "Iggman"
trigger90 = p2name = "Omega Tiger Woods" || p4name = "Omega Tiger Woods"
trigger91 = p2name = "Arcueid The Stinkbag" || p4name = "Arcueid The Stinkbag"
trigger92 = p2name = "Shiki Asshole" || p4name = "Shiki Asshole"
trigger93 = p2name = "The Dirtiest SOB" || p4name = "The Dirtiest SOB"
trigger94 = p2name = "Evil Kung Fu Man" || p4name = "Evil Kung Fu Man"
trigger95 = p2name = "Miyako Arima" || p4name = "Miyako Arima" || p2name = "Arima_Miyako" || p4name = "Arima_Miyako"
trigger96 = p2name = "Dark Arcueid" || p4name = "Dark Arcueid" || p2name = "Dark Arcueid mk2" || p4name = "Dark Arcueid mk2"
trigger97 = p2name = "Shizuru Fujino" || p4name = "Shizuru Fujino" || p2name = "Kiyohime" || p4name = "Kiyohime"
trigger98 = p2name = "Nao Yuuki" || p4name = "Nao Yuuki" || p2name = "Julia" || p4name = "Julia"
trigger99 = p2name = "廃棄物　440号" || p4name = "廃棄物　440号"  || p2name = "Emperor Leo" || p4name = "Emperor Leo"
trigger100 = p2name = "Mr.Bean" || p4name = "Mr.Bean"
trigger101 = p2name = "Kyoukon Haruhi" || p2name = "Kyoukon Haruhi"
trigger102 = p2name = "Shana" || p4name = "Shana"
trigger103 = p2name = "Mai Kawasumi" || p4name = "Mai Kawasumi" || p2name = "Vysaga_Miroku" || p4name = "Vysaga_Miroku"
trigger104 = p2name = "Minagi Tohno" || p4name = "Minagi Tohno" || p2name = "Genbu no Minagi" || p4name = "Genbu no Minagi"
trigger105 = p2name = "Sayuri Kurata" || p4name = "Sayuri Kurata"
trigger106 = p2name = "Makoto Sawatari" || p4name = "Makoto Sawatari"
trigger107 = p2name = "michiru" || p4name = "michiru"
trigger108 = p2name = "Shiki Kageya" || p4name = "Shiki Kageya" || p2name = "Nanaya-Satsujinki" || p4name = "Nanaya-Satsujinki"
trigger109 = p2name = "Moon Rabbit" || p4name = "Moon Rabbit" || p2name = "Reisen Dono" || p4name = "Reisen Dono"
trigger110 = p2name = "Reisen Udongein Inaba" || p4name = "Reisen Udongein Inaba"
trigger111 = p2name = "Yuyuko Saigyouji" || p4name = "Yuyuko Saigyouji"
trigger112 = p2name = "Bloosom Ghost" || p4name = "Bloosom Ghost"
trigger113 = p2name = "Yukari Yakumo" || p4name = "Yukari Yakumo"
trigger114 = p2name = "The Fat Bug" || p4name = "The Fat Bug"
trigger115 = p2name = "Reimu_Hakurei" || p4name = "Reimu_Hakurei" || p2name = "Reimu Hakurei" || p4name = "Reimu Hakurei"
trigger116 = p2name = "Suika Ibuki" || p4name = "Suika Ibuki"
trigger117 = p2name = "Tenshi Hinanai" || p4name = "Tenshi Hinanai"
trigger118 = p2name = "Satsuki Yumizuka" || p4name = "Satsuki Yumizuka" || p2name = "Satsuki_Yumiduka" || p4name = "Satsuki_Yumiduka"
trigger119 = p2name = "Sion TATARI" || p4name = "Sion TATARI" || p2name = "Sion_Eltnam_Atlasia" || p4name = "Sion_Eltnam_Atlasia"
trigger120 = p2name = "Aoko Aozaki" || p4name = "Aoko Aozaki" || p2name = "Aozaki_Aoko(CPU)"  || p4name = "Aozaki_Aoko(CPU)"
trigger121 = p2name = "Ciel" || p4name = "Ciel"
trigger122 = p2name = "Batman" || p4name = "Batman"
trigger123 = p2name = "Mickey Mouse" || p4name = "Mickey Mouse"
trigger124 = p2name = "Iku_Nagae" || p4name = "Iku_Nagae"
trigger125 = p2name = "Rare Akuma" || p4name = "Rare Akuma"
trigger126 = p2name = "Himan version beta"  || p4name = "Himan version beta" 
trigger127 = p2name = "Broly 'le cauchemar' super saiyen nv3"  || p4name = "Broly 'le cauchemar' super saiyen nv3" 
trigger128 = p2name = "seph" || p4name = "seph"
trigger129 = p2name = "7th Heaven Ciel" || p4name = "7th Heaven Ciel" || p2name = "Full Armor Ciel" || p4name = "Full Armor Ciel"
trigger130 = p2name = "Satsuki_Yumiduka" || p4name = "Satsuki_Yumiduka" || p2name = "Yumiduka_Satsuki" || p4name = "Yumiduka_Satsuki"
trigger131 = p2name = "Michael_Roa_Valdamjong" || p4name = "Michael_Roa_Valdamjong" || p2name = "Roa" || p4name = "Roa"
trigger132 = p2name = "Kung Fu Mako" || p4name = "Kung Fu Mako"
trigger133 = enemy,authorname = "DDR"
value = 199

[State 190, 2] ; 
type = ChangeState
triggerall = Time = 0
trigger1 = p2name = "Duke Nukem" || p4name = "Duke Nukem"
value = 19194

[State 190, 2] ; OH NO!!!
type = ChangeState
triggerall = Time = 0
trigger1 = p2name = "Mang Ambo" || p4name = "Mang Ambo" || p2name = "Misao Kotoshiro" || p4name = "Misao Kotoshiro"
trigger2 = p2name = "Manny Pacquiao" || p4name = "Manny Pacquiao"
trigger3 = p2name = "Hikaru Shidou" || p4name = "Hikaru Shidou"
trigger4 = p2name = "T-H-M-A" || p4name = "T-H-M-A"
trigger5 = p2name = "Nazgarld" || p4name = "Nazgarld"
trigger6 = p2name = "FPJ" || p4name = "FPJ" || p2name = "Fernando Poe Jr" || p4name = "Fernando Poe Jr"
trigger7 = p2name = "Erap" || p4name = "Erap" || p2name = "Joseph Ejercito Estrada" || p4name = "Joseph Ejercito Estrada"
trigger8 = p2name = "Siopaoman" || p4name = "Siopaoman" || p2name = "Yae Mizushima" || p4name = "Yae Mizushima"
trigger9 = p2name = "Unknown_Hand" || p4name = "Unknown_Hand"
trigger10 = p2name = "Primeus_Too_Poynt_Ohh" || p4name = "Primeus_Too_Poynt_Ohh"
trigger11 = p2name = "cvsyoko" || p4name = "cvsyoko"
trigger12 = p2name = "Katalina Philadelphia Lavan" || p4name = "Katalina Philadelphia Lavan"
trigger13 = p2name = "Juan Mauricio De Vega" || p4name = "Juan Mauricio De Vega"
trigger14 = p2name = "Tsubaki Kurokawa" || p4name = "Tsubaki Kurokawa"
trigger15 = p2name = "nia" || p4name = "nia"
value = 19199

[State 190, 2] ; SHUT UP!!!!
type = ChangeState
triggerall = Time = 0
trigger1 = p2name = "Konata Izumi" || p4name = "Konata Izumi" || p2name = "Konata" || p4name = "Konata"
trigger2 = p2name = "Tsukasa Hiiragi" || p4name = "Tsukasa Hiiragi" || p2name = "tsukasa" || p4name = "tsukasa"
trigger3 = p2name = "Kagami Hiiragi" || p4name = "Kagami Hiiragi" || p2name = "kagamin" || p4name = "kagamin"
trigger4 = p2name = "rena_lv5" || p4name = "rena_lv5" || p2name = "ryuuguu rena" || p4name = "ryuuguu rena"
trigger5 = p2name = "Maebara_keiichi" || p4name = "Maebara_keiichi"
trigger6 = p2name = "furude_rika" || p4name = "furude_rika"
trigger7 = p2name = "kotonoha katsura" || p4name = "kotonoha katsura" || p2name = "katsura" || p4name = "katsura"
trigger8 = p2name = "Saionzi Sekai"  || p4name = "Saionzi Sekai"  || p2name = "Sekai" || p4name = "Sekai"
trigger9 = p2name = "Takano_Miyo" || p4name = "Takano_Miyo"
trigger10 = p2name = "sonozaki mion" || p4name = "sonozaki mion"
trigger11 = p2name = "Hojo Satoko" || p4name = "Hojo Satoko"
trigger12 = p2name = "Sonozaki_Mion" || p4name = "Sonozaki_Mion" || p2name = "sonozaki mion" || p4name = "sonozaki mion"
trigger13 = p2name = "Sonozaki_Shion" || p4name = "Sonozaki_Shion"
trigger14 = p2name = "hanyu" || p4name = "hanyu"
trigger15 = p2name = "Chie_Rumiko" || p4name = "Chie_Rumiko"
trigger16 = p2name = "beatrice" || p4name = "beatrice"
value = 19198

[State 190, 2] ; LEAVE SEOLA ALONE DAMN IT!!!
type = ChangeState
triggerall = Time = 0
trigger1 = p2name = "HATSUNE MIKU" || p4name = "HATSUNE MIKU"
value = 19196

[State 190, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(190)
value = 190

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 11900 + (random%5)
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 11900]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

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

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[State 191, Wood 1]
type = Explod
trigger1 = RoundState != 0
persistent = 0
anim = 191
postype = p1
pos = 260, -90
velocity = -4.2, -7
accel = 0, .32
removetime = 48

[State 191, Wood 2]
type = Explod
trigger1 = AnimElemTime(7) = 1
anim = 192
postype = p1
pos = 60, -70
velocity = 2, -4
accel = 0, .32
removetime = 35

; You can delete the following two controllers if you're building your own
; character using KFM. These play back the sounds of the wood block being
; broken.
[State with voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = F5,3
volume = -40

[State 191, Snd 2]
type = PlaySnd
trigger1 = AnimElemTime(7) = 3
value = F5,2
volume = -80

[State with voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = S2,ifelse(random<500,0,1)
channel = 0

;---------------------------------------------------------------------------
; Intro 2
[Statedef 11901]
type = S
ctrl = 0
anim = 195
velset = 0,0

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

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

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[State 0, ]
type = PlaySnd
trigger1 = Time = 10
value = S2,ifelse(Random%2,10,32)
channel = 0

;---------------------------------------------------------------------------
; Intro 3
[Statedef 11902]
type = S
ctrl = 0
anim = 193
velset = 0,0

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

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

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 2
value = S2,21
channel = 0

;---------------------------------------------------------------------------
; イントロ - Intro (If any Name is Misplaced)
[Statedef 11903]
type = A
ctrl = 0
velset = 0,0
anim = 11902

[State 192, 0]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = Intro

[State 1]
type = Posset
Trigger1 = Time = 150
y = -800

[State 1]
type = Velset
Trigger1 = Time >= 151
y = 25

[State 1]
type = VelAdd
Trigger1 = Time >= 151
y = .5

[State 1]
type = VelAdd
Trigger1 = Time >= 151
y = .5

[State 40000, Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 81, 0
volume = 255
channel = 14

[State 40000, Sound]
type = PlaySnd
trigger1 = Time = 151
value = 81, ifelse(random%2,1,2)
volume = 255
channel = 14
freqmul = 0.9

[State 6500, 5.2]
type = Helper
trigger1 = time = 151
Helpertype = normal
name = "Effect"
id = 3630
postype = P1
pos = -3,-90
stateno = 1945
ownpal = 1
ignorehitpause = 1

[State 810, 1]
type = explod
trigger1 = Time = 0
anim = 11904
id = 11904
ownpal = 0
sprpriority = 1
postype = p1
pos = 0,0
supermove = 1
shadow = -255,-255,-255
removetime = -1

[State 190, 2]
type = ChangeState
trigger1 = time >= 153
trigger1 = pos y >= 0
trigger1 = vel Y > 0
value = 11941
;---------------------------------------------------------------------------
; The projectile that makes the intro funny
[Statedef 11941]
type = S
movetype = A
physics = S
ctrl = 0
anim = 11903
velset = 0,0

[State 192, 0]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = Intro

[State 810, 1]
type = RemoveExplod
trigger1 = Time = 0
id = 11904

[State 0, ]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 0, ]
type = NotHitBy
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1020, 4]
type = EnvShake
trigger1 = time = 0
time = 30
ampl = -5
freq = 95
phase = 95

[state a]
type = posset
trigger1 = time = 0
y = 0

[State 0, ]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; イントロ - Intro (If any Name is Misplaced)
[Statedef 11904]
type = A
ctrl = 0
velset = 0,0
anim = 11908

[State 192, 0]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = Intro

[State 1]
type = Posset
Trigger1 = Time = 240
y = -800

[State 1]
type = Velset
Trigger1 = Time >= 241
y = 25

[State 1]
type = VelAdd
Trigger1 = Time >= 241
y = .5

[State 1]
type = VelAdd
Trigger1 = Time >= 241
y = .5

[State 40000, Sound]
type = PlaySnd
trigger1 = Time = 241
value = 81, ifelse(random%2,1,2)
volume = 255
freqmul = 0.9
channel = 14

[State 6500, 5.2]
type = Helper
trigger1 = time = 0
Helpertype = normal
name = "TheDoucheBag"
id = 3630
postype = P1
pos = 0, 0
stateno = 11947
ownpal = 1
ignorehitpause = 1

[State 6500, 5.2]
type = Helper
trigger1 = time = 241
Helpertype = normal
name = "Effect"
id = 3630
postype = P1
pos = -3,-90
stateno = 1945
ownpal = 1
ignorehitpause = 1

[State 190, 2]
type = ChangeState
trigger1 = time >= 243
trigger1 = pos y >= 0
trigger1 = vel Y > 0
value = 11941

;---------------------------------------------------------------------------
; 開始前の動作
[Statedef 11947]
Type = S
Ctrl = 0
Anim = 11905
VelSet = 0,0

[State -1] 
Type = AssertSpecial
Trigger1 = 1
Flag = Intro

[State -1]
Type = VarRandom
Trigger1 = Anim = 11905
Trigger1 = Time = 60
V = 0
Range = 0,3
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -1]
Type = PlaySnd
Trigger1 = Var(0) = 0
Trigger1 = Anim = 11905
Trigger1 = Time = 60
Value = s656, 0
Channel = 14
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -1]
Type = PlaySnd
Trigger1 = Var(0) = 1
Trigger1 = Anim = 11905
Trigger1 = Time = 60
Value = s656, 1
Channel = 14
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -1]
Type = PlaySnd
Trigger1 = Var(0) = 2
Trigger1 = Anim = 11905
Trigger1 = Time = 60
Value = s656, 2
Channel = 14
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -1]
Type = PlaySnd
Trigger1 = Var(0) = 3
Trigger1 = Anim = 11905
Trigger1 = Time = 60
Value = s656, 3
Channel = 14
IgnoreHitPause = 1
Persistent = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -1] 
Type = ChangeAnim
Trigger1 = Anim = 11905
Trigger1 = Var(0) = 0
Trigger1 = Time = 180
Trigger2 = Var(0) = 1
Trigger2 = Time = 240
Trigger3 = Var(0) = 2
Trigger3 = Time = 270
Trigger4 = Var(0) = 3
Trigger4 = Time = 240
Value = 11906

[State -1] 
Type = ChangeState
trigger1 = Time >= 240
trigger1 = root,pos y >= 0
trigger1 = root,vel Y > 0
Value = 11948
;---------------------------------------------------------------------------
; 開始前の動作
[Statedef 11948]
Type = S
Ctrl = 0
Anim = 11907
VelSet = 0,0

[State -1] 
Type = DestroySelf
trigger1 = Time = 50
;------------------------------------------------------------------------------------------
; Shin Misogi - Effect Helper - Type 1
[Statedef 1945]
type = A
movetype = A
ctrl = 0
anim = 3621
velset = 0,0

[State 6505, 1.1]
type = VelSet
trigger1 = Time >= 0
y = 25

[State 6505, 1.2]
type = VelAdd
trigger1 = Time >= 0
y = .5

[State 6505, 1.3]
type = SprPriority
trigger1 = 1
value = 100

[State 6505, 2]
type = Nothitby
trigger1 = 1
value = SCA

[State 6505, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3631
;---------------------------------------------------------------------------
[Statedef 1946]
type = S
movetype = H
physics = S
ctrl = 0
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 0, ]
type = Turn
trigger1 = Time = 0

[State 0, ]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = selfanimexist(5)
value = 5

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger2 = !selfanimexist(5)
value = 1947

;---------------------------------------------------------------------------
[Statedef 1947]
type = S
movetype = H
physics = S
ctrl = 0
velset = 0,0

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 0, ]
type = ChangeAnim
trigger1 = Time = 0
value = 20

[State 0, ]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)

;---------------------------------------------------------------------------
[Statedef 1949]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0

[State 0, ]
type = Turn
trigger1 = Time = 0

[State 0, ]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = selfanimexist(5)
value = 5

[State 0, ]
type = SelfState
triggerall = Time >= 5
trigger1 = animtime = 0
trigger2 = !selfanimexist(5)
value = 0
ctrl = 0
;---------------------------------------------------------------------------
; Special Intro vs. Haruhi and the SOS Brigade
[Statedef 197]
type = S
ctrl = 0
anim = ifelse(p2name="Haruhi Suzumiya"||p4name="Haruhi Suzumiya",1993,1994)
velset = 0,0

[State 0, ]
type = PlaySnd
trigger1 = Anim = 197
trigger1 = AnimElemTime(7) = 0
value = S0,23
volume = 255

[State 0, ]
type = PlaySnd
trigger1 = Anim = 197
trigger1 = AnimElemTime(7) = 1
value = S79,0
volume = 255

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

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = Anim = 197
trigger1 = AnimElemTime(7) = [0,100]
flag = NoBarDisplay
flag2 = NoBG
flag3 = NoFG

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = Anim = 1993
trigger2 = Anim = 1994
flag = NoBarDisplay

[State 40024, Nuked]
type = Explod
trigger1 = Anim = 197
trigger1 = AnimElemTime(7) = 0
anim = 6969
ID = 6969
postype = left
pos = 0,0
facing = 1
bindtime = -1
removetime = 100
ownpal = 0
ontop = 1
supermovetime = 9999
pausemovetime = 9999
scale = 0.5,0.5

[State 160, 14]
type = PowerSet
trigger1 = AnimTime = 0
value = ifelse(p2name="Haruhi Suzumiya"||p4name="Haruhi Suzumiya",6000,4500)

[State 1200, Shake Screen]
type = EnvShake
trigger1 = Anim = 1993
trigger1 = AnimElemTime(7) = 0
time = 380
ampl = 2
freq = 180

[State 1200, Shake Screen]
type = EnvShake
trigger1 = Anim = 1994
trigger1 = AnimElemTime(7) = 0
time = 560
ampl = 2
freq = 180

[State 0, ]
type = PlaySnd
trigger1 = Anim = 1993
trigger1 = AnimElemTime(7) = 0
trigger1 = p2name = "Haruhi Suzumiya" || p4name = "Haruhi Suzumiya"
value = S669,(random%4)
volume = 255
freqmul = 0.85

[State 0, ]
type = PlaySnd
trigger1 = Anim = 1994
trigger1 = AnimElemTime(7) = 0
trigger1 = p2name != "Haruhi Suzumiya" && p4name != "Haruhi Suzumiya"
value = S666,ifelse(random<500,87,88)
volume = 255
freqmul = 0.9

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Special Intro 2
[Statedef 198]
type = S
ctrl = 0
anim = 1988
velset = 0,0

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 1988

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 5
value = S2,18
volume = 255
freqmul = 0.95
channel = 0

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

[State 160, 14]
type = PowerAdd
triggerall = AnimTime = 0
trigger1 = p2name = "Master Cheese" || p4name = "Master Cheese"
trigger2 = p2name = "Master Geese" || p4name = "Master Geese"
value = 9000

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Special Intro 1
[Statedef 199]
type = S
ctrl = 0
anim = 198
velset = 0,0

[State 0, ]
type = Explod
trigger1 = Time = 40
anim = 199
pos = 0,-123
postype = p1
ontop = 1
ownpal = 1
scale = .5,.5

[State 0, ]
type = PlaySnd
trigger1 = Time = 40
value = S0,22

;What Does he saying?

[State 0, KFM]
type = Explod
triggerall = numexplod(1999) = 0
trigger1 = AnimTime = 0
trigger1 = p2name = "Kung Fu Man" || p4name = "Kung Fu Man" || p2name = "Joe Mayama" || p4name = "Joe Mayama"
anim = 19900
ID = 19999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, KFM Pic]
type = Explod
trigger1 = AnimTime = 0
trigger1 = p2name = "Kung Fu Man" || p4name = "Kung Fu Man" || p2name = "Joe Mayama" || p4name = "Joe Mayama"
anim = 19990
ID = 19995
pos = 8,ifelse(numpartner && partner,name = "Evil Kung Fu Man",165,5)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, Little Civilians AKA EFZ Chars -AIR Excluded-]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Ayu Tukimiya" || p4name = "Ayu Tukimiya"
trigger2 = p2name = "Mizuka Nagamori" || p4name = "Mizuka Nagamori"
trigger3 = p2name = "Rumi Nanase" || p4name = "Rumi Nanase"
trigger4 = p2name = "Ikumi Amasawa" || p4name = "Ikumi Amasawa"
trigger5 = p2name = "Shiiko Yuzuki" || p4name = "Shiiko Yuzuki"
trigger6 = p2name = "Akane Satomura" || p4name = "Akane Satomura"
trigger7 = p2name = "Mai Kawasumi" || p4name = "Mai Kawasumi" || p2name = "Mai_K" || p4name = "Mai_K"
trigger8 = p2name = "Makoto Sawatari" || p4name = "Makoto Sawatari"
trigger9 = p2name = "Kaori Misaka" || p4name = "Kaori Misaka"
trigger10 = p2name = "Shiori Misaka" || p4name = "Shiori Misaka" || p2name = "Shiori" || p4name = "Shiori"
trigger11 = p2name = "Misaki Kawana" || p4name = "Misaki Kawana"
trigger12 = p2name = "Nayuki Minase" || p4name = "Nayuki Minase"
trigger13 = p2name = "Mio Kouzuki" || p4name = "Mio Kouzuki" || p2name = "Mio" || p4name = "Mio"
trigger14 = p2name = "Mayu Shiina" || p4name = "Mayu Shiina" || p2name = "Mayu" || p4name = "Mayu"
trigger15 = p2name = "Nayuki Minase" || p4name = "Nayuki Minase"
trigger16 = p2name = "Sayuri Kurata" || p4name = "Sayuri Kurata"
trigger17 = p2name = "Mishio Amano" || p4name = "Mishio Amano" || p2name = "Hyperlion_DeaBN" || p4name = "Hyperlion_DeaBN"
trigger18 = p2name = "UNKNOWN" || p4name = "UNKNOWN" || p2name = "Eien no Mizuka" || p4name = "Eien no Mizuka"
anim = ifelse(random%2,19901,19934)
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, Eastern Witches AKA Gensoukyo Inhabitants]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Moon Rabbit" || p4name = "Moon Rabbit" || p2name = "Reisen Dono" || p4name = "Reisen Dono"
trigger2 = p2name = "Reisen Udongein Inaba" || p4name = "Reisen Udongein Inaba"
trigger3 = p2name = "Yuyuko Saigyouji" || p4name = "Yuyuko Saigyouji"
trigger4 = p2name = "Bloosom Ghost" || p4name = "Bloosom Ghost"
trigger5 = p2name = "Yukari Yakumo" || p4name = "Yukari Yakumo"
trigger6 = p2name = "The Fat Bug" || p4name = "The Fat Bug"
trigger7 = p2name = "Reimu_Hakurei" || p4name = "Reimu_Hakurei" || p2name = "Reimu Hakurei" || p4name = "Reimu Hakurei"
trigger8 = p2name = "Suika Ibuki" || p4name = "Suika Ibuki"
trigger9 = p2name = "Tenshi Hinanai" || p4name = "Tenshi Hinanai"
trigger10 = p2name = "Remilia" || p4name = "Remilia" || p2name = "Remilia_Scarlet" || p4name = "Remilia_Scarlet"
trigger11 = p2name = "Youmu_Konpaku" || p4name = "Youmu_Konpaku" || p2name = "Youmu Konpaku" || p4name = "Youmu Konpaku"
trigger12 = p2name = "Sakuya Izayoi" || p4name = "Sakuya Izayoi" || p2name = "Sakuya_Izayoi" || p4name = "Sakuya_Izayoi"
trigger13 = p2name = "Alice Margatroid" || p4name = "Alice Margatroid"
trigger14 = p2name = "Iku_Nagae" || p4name = "Iku_Nagae"
trigger15 = p2name = "Flandre" || p4name = "Flandre" || p2name = "Flandre_Scarlet" || p4name = "Flandre_Scarlet"
trigger16 = p2name = "Patchouli_Knowledge" || p4name = "Patchouli_Knowledge" || p2name = "Patchouli" || p4name = "Patchouli"
trigger17 = p2name = "Alice Margatroid" || p4name = "Alice Margatroid"
trigger18 = p2name = "Aya Syameimaru" || p4name = "Aya Syameimaru" || p2name = "Aya Shameimaru" || p4name = "Aya Shameimaru"
trigger19 = p2name = "Marisa Kirisame" || p4name = "Marisa Kirisame"
anim = ifelse(random%2,19925,19927)
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, SUPER HEROES]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Perfect Weapon Mb-02" || p4name = "Perfect Weapon Mb-02"
trigger2 = p2name = "RoboCop" || p4name = "RoboCop"
trigger3 = p2name = "Spider-man" || p4name = "Spider-man" || p2name = "Spiderman" || p4name = "Spiderman"
trigger4 = p2name = "Superman" || p4name = "Superman"
trigger5 = p2name = "Batman" || p4name = "Batman"
anim = ifelse(random%2,19937,19938)
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, REU IS DEAD]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Ultimate Ken" || p4name = "Ultimate Ken" || p2name = "Evil Ken" || p4name = "Evil Ken" 
trigger2 = p2name = "Ultimate Ryu" || p4name = "Ultimate Ryu" || p2name = "Evil Ryu" || p4name = "Evil Ryu"
trigger3 = p2name = "Dragon Claw" || p4name = "Dragon Claw"
anim = ifelse(random%2,19903,19933)
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1


[State 0, I HATE YOU MON, THE TRUE ENEMIES OF MUGEN WORLD]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Shiki_Tohno" || p4name = "Shiki_Tohno" || p2name = "Tohno_Shiki" || p4name = "Tohno_Shiki"
trigger2 = p2name = "Shiki_Nanaya" || p4name = "Shiki_Nanaya"
trigger3 = p2name = "Shiki Tohno" || p4name = "Shiki Tohno"
trigger4 = p2name = "Shiki Asshole" || p4name = "Shiki Asshole"
trigger5 = p2name = "The Dirtiest SOB" || p4name = "The Dirtiest SOB"
trigger6 = p2name = "Nanaya_T" || p4name = "Nanaya_T"
trigger7 = p2name = "Nanaya_Shiki" || p4name = "Nanaya_Shiki"
trigger8 = p2name = "Shiki Kageya" || p4name = "Shiki Kageya" || p2name = "Nanaya-Satsujinki" || p4name = "Nanaya-Satsujinki"
trigger9 = p2name = "Mech-HISUI" || p4name = "Mech-HISUI"
trigger10 = p2name = "Arcueid Brunestud" || p4name = "Arcueid Brunestud" || p2name = "Arcueid_Brunestud" || p4name = "Arcueid_Brunestud"
trigger11 = p2name = "Warcueid" || p4name = "Warcueid"
trigger12 = p2name = "Akaitsuki" || p4name = "Akaitsuki"
trigger13 = p2name = "Red Arcueid" || p4name = "Red Arcueid" || p2name = "Red_Arcueid" || p4name = "Red_Arcueid"
trigger14 = p2name = "Arcueid The Stinkbag" || p4name = "Arcueid The Stinkbag"
trigger15 = p2name = "Akiha_Tohno" || p4name = "Akiha_Tohno" || p2name = "Akiha_Vermilion" || p4name = "Akiha_Vermilion"
trigger16 = p2name = "Miyako Arima" || p4name = "Miyako Arima" || p2name = "Arima_Miyako" || p4name = "Arima_Miyako"
trigger17 = p2name = "Dark Arcueid" || p4name = "Dark Arcueid" || p2name = "Dark Arcueid mk2" || p4name = "Dark Arcueid mk2"
trigger18 = p2name = "Akiha_Tohno" || p4name = "Akiha_Tohno"
trigger19 = p2name = "Shana" || p4name = "Shana"
trigger20 = p2name = "Len" || p4name = "Len"
trigger21 = p2name = "White_Len" || p4name = "White_Len" || p2name = "White_Len(CPU)" || p4name = "White_Len(CPU)"
trigger22 = p2name = "Hisui" || p4name = "Hisui"
trigger23 = p2name = "Kohaku" || p4name = "Kohaku"
trigger24 = p2name = "Satsuki Yumizuka" || p4name = "Satsuki Yumizuka" || p2name = "Satsuki_Yumiduka" || p4name = "Satsuki_Yumiduka"
trigger25 = p2name = "Sion TATARI" || p4name = "Sion TATARI" || p2name = "Sion_Eltnam_Atlasia" || p4name = "Sion_Eltnam_Atlasia"
trigger26 = p2name = "Aoko Aozaki" || p4name = "Aoko Aozaki" || p2name = "Aozaki_Aoko(CPU)"  || p4name = "Aozaki_Aoko(CPU)"
trigger27 = p2name = "Ciel" || p4name = "Ciel"
trigger28 = p2name = "Kishima_kouma" || p4name = "Kishima_kouma" || p2name = "Kishima Kouma" || p4name = "Kishima Kouma"
trigger29 = p2name = "Warachia" || p4name = "Warachia"
trigger30 = p2name = "7th Heaven Ciel" || p4name = "7th Heaven Ciel" || p2name = "Full Armor Ciel" || p4name = "Full Armor Ciel"
trigger31 = p2name = "Satsuki_Yumiduka" || p4name = "Satsuki_Yumiduka" || p2name = "Yumiduka_Satsuki" || p4name = "Yumiduka_Satsuki"
trigger32 = p2name = "Michael_Roa_Valdamjong" || p4name = "Michael_Roa_Valdamjong" || p2name = "Roa" || p4name = "Roa"
anim = ifelse(random%2,19912,19904)
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, Vs Other KF Warriors]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Kung Fu Dude" || p4name = "Kung Fu Dude"
trigger2 = p2name = "Kung Fu girl" || p4name = "Kung Fu girl"
trigger3 = p2name = "Kung Fu Bender" || p4name = "Kung Fu Bender"
trigger4 = p2name = "KungFuGirl UZUKI" || p4name = "KungFuGirl UZUKI"
trigger5 = p2name = "Kung Fu Mako" || p4name = "Kung Fu Mako"
anim = 19905
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, The Four Heavenly Princesses and the Queen -Chars from AIR- or Mai HiME Chars or KnM Chars]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Misuzu Kamio" || p4name = "Misuzu Kamio" || p2name = "Seiryuu no Misuzu" || p4name = "Seiryuu no Misuzu"
trigger2 = p2name = "Kannabi no Mikoto" || p4name = "Kannabi no Mikoto" || p2name = "kanna" || p4name = "kanna"
trigger3 = p2name = "Kano Kirishima" || p4name = "Kano Kirishima"
trigger4 = p2name = "Minagi Tohno" || p4name = "Minagi Tohno"
trigger5 = p2name = "Michiru" || p4name = "Michiru"
trigger6 = p2name = "Misuzu_G" || p4name = "Misuzu_G"
trigger7 = p2name = "Mai Tokiha" || p4name = "Mai Tokiha" || p2name = "Kagotsuchi" || p4name = "Kagotsuchi"
trigger8 = p2name = "Natsuki Kuga" || p4name = "Natsuki Kuga" || p2name = "Duran" || p4name = "Duran"
trigger9 = p2name = "Mikoto Minagi" || p4name = "Mikoto Minagi" || p2name = "Miroku" || p4name = "Miroku"
trigger10 = p2name = "Shizuru Fujino" || p4name = "Shizuru Fujino" || p2name = "Kiyohime" || p4name = "Kiyohime"
trigger11 = p2name = "Nao Yuuki" || p4name = "Nao Yuuki" || p2name = "Julia" || p4name = "Julia"
trigger12 = p2name = "Himeko Kurusugawa" || p4name = "Himeko Kurusugawa" || p2name = "Himiko" || p4name = "Himiko"
trigger13 = p2name = "Chikane Himemiya" || p4name = "Chikane Himemiya" || p2name = "Kaon" || p4name = "Kaon"
anim = ifelse(random%2,19906,19926)
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, You're not Fun Anymore]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Popeye" || p4name = "Popeye"
trigger2 = p2name = "Underdog" || p4name = "Underdog"
trigger3 = p2name = "Big Albert T-Lechy" || p4name = "Big Albert T-Lechy"
trigger4 = p2name = "Captain Caveman" || p4name = "Captain Caveman"
trigger5 = p2name = "Marvin the Martian" || p4name = "Marvin the Martian"
trigger6 = p2name = "Opera Elmer" || p4name = "Opera Elmer"
trigger7 = p2name = "Mr.Bean" || p4name = "Mr.Bean"
trigger8 = p2name = "Mickey Mouse" || p4name = "Mickey Mouse"
trigger9 = p2name = "Team Nicktoon" || p4name = "Team Nicktoon"
trigger10 = p2name = "Spongebob Squarepants" || p4name = "Spongebob Squarepants"
trigger11 = p2name = "Invader Zim" || p4name = "Invader Zim"
trigger12 = p2name = "Patrick" || p4name = "Patrick"
trigger13 = p2name = "Mr_crabs" || p4name = "Mr_crabs"
trigger14 = p2name = "Squidward" || p4name = "Squidward"
trigger15 = p2name = "Sandy_Cheeks" || p4name = "Sandy_Cheeks"
trigger16 = p2name = "Dib" || p4name = "Dib"
trigger17 = enemy,authorname = "DDR"
anim = ifelse(random%2,19939,19936)
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, The Greatest Warriors]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "KENSHIRO" || p4name = "KENSHIRO"
trigger2 = p2name = "RAOH" || p4name = "RAOH"
trigger3 = p2name = "TOKI" || p4name = "TOKI"
trigger4 = p2name = "THOUTHER" || p4name = "THOUTHER"
trigger5 = p2name = "REI" || p4name = "REI"
trigger6 = p2name = "SHIN" || p4name = "SHIN"
trigger7 = p2name = "Songoku" || p4name = "Songoku"
trigger8 = p2name = "Vegeta" || p4name = "Vegeta"
anim = ifelse(random%2,19913,19930)
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Sonsaku Hakufu" || p4name = "Sonsaku Hakufu"
trigger2 = p2name = "Akira Honjoji" || p4name = "Akira Honjoji"
trigger3 = p2name = "Dragon" || p4name = "Dragon"
trigger4 = p2name = "ingrid" || p4name = "ingrid"
anim = 19924
ID = 1999
pos = 0,ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0)
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, EKFM]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Evil Kung Fu Man" || p4name = "Evil Kung Fu Man"
anim = 19945
ID = 1999
pos = 0,0
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, DKFM]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
triggerall = ishometeam = 1
trigger1 = p2name = "Dirty Kung Fu Man" || p4name = "Dirty Kung Fu Man"
trigger2 = p2name = "Shadow Alpha" || p4name = "Shadow Alpha"
anim = 19908
ID = 1999
pos = 0,0
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, GULP!...MONSTERS]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Rare Akuma" || p4name = "Rare Akuma"
trigger2 = p2name = "Himan version beta"  || p4name = "Himan version beta" 
trigger3 = p2name = "Broly 'le cauchemar' super saiyen nv3"  || p4name = "Broly 'le cauchemar' super saiyen nv3" 
trigger4 = p2name = "廃棄物　440号" || p4name = "廃棄物　440号"  || p2name = "Emperor Leo" || p4name = "Emperor Leo"
trigger5 = p2name = "seph" || p4name = "seph"
anim = ifelse(random%2,19931,19932)
ID = 1999
pos = ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0),0
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, I Never know them anyway...]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Dink Smallwood" || p4name = "Dink Smallwood"
trigger2 = p2name = "Sonic Machine" || p4name = "Sonic Machine"
trigger3 = p2name = "War Machine" || p4name = "War Machine"
trigger4 = p2name = "Eve Original" || p4name = "Eve Original"
anim = ifelse(random%2,19911,19935)
ID = 1999
pos = ifelse(numpartner && partner,name = "Evil Kung Fu Man",160,0),0
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, Omega Series]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "OmegaTH" || p4name = "OmegaTH"
trigger2 = p2name = "Adolf Hitler" || p4name = "Adolf Hitler"
trigger3 = p2name = "Omega Tiger Woods" || p4name = "Omega Tiger Woods"
trigger4 = p2name = "Developer Fags You Imbecile" || p4name = "Developer Fags You Imbecile"
anim = 19907
ID = 1999
pos = 0,0
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, Yu are not Misuzu]
type = Explod
triggerall = numexplod(1999) = 0
triggerall = AnimTime = 0
trigger1 = p2name = "Misuzu_M" || p4name = "Misuzu_M"
anim = 19914
ID = 1999
pos = 0,0
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
ignorehitpause = 1


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

[State 0, ]
type = AssertSpecial
trigger1 = p2name = "Kung Fu Man" || p4name = "Kung Fu Man" || p2name = "Joe Mayama" || p4name = "Joe Mayama"
flag = nobardisplay
flag2 = nomusic
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = AnimTime = 0
trigger1 = p2name = "Kung Fu Man" || p4name = "Kung Fu Man" || p2name = "Joe Mayama" || p4name = "Joe Mayama"
value = S1999,0
volume = 255

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Special Intro 2
[Statedef 1989]
type = S
ctrl = 0
anim = 1989
velset = 0,0

[State 0, Temporarly shut-off AI]
type = VarSet
trigger1 = var(58) = 1
trigger1 = AnimElem = 1
v = 58
value = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = animelemtime(1) = [0,300]
time = 10
add = time * 2,0,0
color = 256 - time
ignorehitpause = 1

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 1989

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = var(40) = 1
value = S16,0+(random%4)
volume = 255

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = var(40) != 1
value = S18,0+(random%3)
volume = 255

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = NoMusic
flag3 = NoBarDisplay

[State 160, 14]
type = PowerAdd
trigger1 = AnimTime = 0
value = 9000

[State 160, 14]
type = varset
trigger1 = AnimTime = 0
v = 38
value = 1

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Special Intro vs. Friends of Haruhi
[Statedef 19198]
type = S
ctrl = 0
anim = 1995
velset = 0,0

[State 0, ]
type = VarRandom
trigger1 = 1
v = 0
range = 1,4

[State 0, PalFXWiz]
type = PalFX
trigger1 = animelemtime(1) = [0,300]
time = 2
add = time * 2,0,0
color = 256 - time
ignorehitpause = 1

[State 1200, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 7
time = 100
ampl = 2
freq = 180

[State 0, SHUT UP]
type = PlaySnd
trigger1 = var(0) = 1
trigger1 = AnimElem = 7
value = S83,0
volume = 255
freqmul = 0.9

[State 0, SHUT UP]
type = PlaySnd
trigger1 = var(0) = 2
trigger1 = AnimElem = 7
value = S83,1
volume = 255

[State 0, SHUT UP]
type = PlaySnd
trigger1 = var(0) = 3
trigger1 = AnimElem = 7
value = S83,2
volume = 255
freqmul = 0.9

[State 0, SHUT UP]
type = PlaySnd
trigger1 = var(0) = 4
trigger1 = AnimElem = 7
value = S81,2
volume = 255
freqmul = 0.9

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = NoBarDisplay

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Special Intro vs. Friends of Haruhi
[Statedef 19196]
type = S
ctrl = 0
anim = 1996
velset = 0,0

[State 0, ]
type = VarRandom
trigger1 = 1
v = 0
range = 1,3

[State 0, PalFXWiz]
type = PalFX
trigger1 = animelemtime(9) = [0,500]
time = 2
add = time * 1,0,0
color = 256 - time
ignorehitpause = 1

[State 0, SHUT UP]
type = PlaySnd
trigger1 = animelemtime(9) = 10
value = S89,0
volume = 255
freqmul = 0.9

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = NoBarDisplay
flag3 = NoMusic

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Special Intro vs. ?
[Statedef 19194]
type = S
ctrl = 0
anim = 1997
velset = 0,0

[State 0, ]
type = PlaySnd
trigger1 = Time = 30
value = f1666,66
volume = 255
channel = 18

[State 0, ]
type = PlaySnd
trigger1 = Time = 2120
value = S1999,20
volume = 255
channel = 10

;[State 0, ]
;type = PlaySnd
;trigger1 = Anim = 19198
;trigger1 = AnimElem = 8
;value = S2,39
;volume = 25

;[State 0, ]
;type = PlaySnd
;trigger1 = Anim = 19196
;trigger1 = AnimElem = 8
;value = S88,0
;volume = 255

;[State 0, ]
;type = PlaySnd
;trigger1 = Anim = 19198
;trigger1 = Time = 550
;value = S11,99
;volume = 255

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = NoBarDisplay
flag3 = NoMusic

;[State 0, ]
;type = StopSnd
;trigger1 = AnimTime = 0
;value = S1999,0
;channel = 10

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Special Intro vs. ?
[Statedef 19199]
type = S
ctrl = 0
anim = 19198
velset = 0,0

[State 190, 2]
type = ChangeAnim
triggerall = Time = 0
trigger1 = p2name = "cvsyoko" || p4name = "cvsyoko"
trigger2 = p2name = "simon" || p4name = "simon"
trigger3 = p2name = "nia" || p4name = "nia"
trigger4 = p2name = "kanata" || p4name = "kanata"
value = 19196

[State 0, ]
type = Explod
trigger1 = Time = 40
anim = 199
pos = 0,-123
postype = p1
ontop = 1
ownpal = 1
scale = .5,.5

[State 0, ]
type = PlaySnd
trigger1 = Time = 40
value = S0,22

[State 0, ]
type = PlaySnd
trigger1 = Time = 120
value = S1999,0
volume = 255
channel = 10

[State 0, ]
type = PlaySnd
trigger1 = Anim = 19198
trigger1 = AnimElem = 8
value = S2,39
volume = 25

[State 0, ]
type = PlaySnd
trigger1 = Anim = 19196
trigger1 = AnimElem = 8
value = S88,0
volume = 255

[State 0, ]
type = PlaySnd
trigger1 = Anim = 19198
trigger1 = Time = 550
value = S11,99
volume = 255

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = NoBarDisplay
flag3 = NoMusic

[State 0, ]
type = StopSnd
trigger1 = AnimTime = 0
value = S1999,0
channel = 10

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, ]
type = PlaySnd
triggerall = prevstateno != 3901
trigger1 = Time = 0
trigger1 = random < 500
value = S2,10
channel = 0

[State 0, ]
type = PlaySnd
triggerall = prevstateno = 3901
trigger1 = Time = 0
trigger1 = random < 500
value = S2,13
channel = 0

[State 160, 14]
type = PowerAdd
trigger1 = time = 0
trigger1 = power < 6001
value = Ceil(IfElse(random>500,(0.04*const(data.power)),(0.02*const(data.power))))
absolute = 1

[State 0, ]
type = NotHitBy
trigger1 = prevstateno = 1855
trigger2 = prevstateno = 1856
trigger3 = prevstateno = 3901
value = SCA
time = 5

[State 195, 1]
type = CtrlSet
trigger1 = Time = 40
value = 1

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

;---------------------------------------------------------------------------
; Insta-kill switch
[Statedef 19666]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, ]
type = SuperPause
trigger1 = time = 0
time = 40
anim = -1
movetime = 40

[State 0, ]
type = VarSet
trigger1 = time = 0
v = 30
value = 1
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S0,26
channel = 0

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

[State 195, 1]
type = CtrlSet
trigger1 = Time = 40
value = 1

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

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

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,2
channel = 0

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

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

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

;---------------------------------------------------------------------------
; Standing strong punch
; CNS difficulty: easy
; Note the width controller. It makes KFM's push box larger, so he doesn't
; stand so close to the opponent. Hit Ctrl-C and look at the red bar at his
; feet.
; The sprpriority for this state is at -1, instead of the usual 2 for
; attacks. This makes KFM appear behind the opponent initially.
; The SprPriority controller in [State 210, 4] brings KFM to the front when
; his arm has swung over.
; To stop KFM from pausing in his swing frame, there is a ChangeAnim in
; [State 210, 3] that detects if the hit has come in contact with the
; opponent during that frame, and switches to the next animation element
; (notice the elem=6 parameter). If you don't see what I mean, try commenting
; out that controller, then hit someone with this attack.
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
velset = 0,0
anim = 210
sprpriority = -1

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,3
channel = 0

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (7) < 0)
value = 15,0

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 4

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 55
guardflag = MA
pausetime = 12,12
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -10,-70
hitsound = s5,2
guardsound = s6,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 210, 3]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 210
elem = 6

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

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

;---------------------------------------------------------------------------
; KnockDown Move
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 0
ctrl = 0
velset = 0,0
anim = 220
sprpriority = -1

[State 0, ]
type = PowerAdd
trigger1 = Time = 0
trigger1 = prevstateno = [120,169]
value = -500
ignorehitpause = 1

[State 0, PalFXWiz] ;Generated by MEE PalFX Editor
type = PalFX
trigger1 = Time = 0
trigger1 = prevstateno = [120,169]
time = 15
add = 0,0,0
mul = 256,256,256
sinadd = 512,512,512,3
invertall = 0
color = 256

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,17
channel = 0

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (3) >= 0) && (AnimElemTime (6) < 0)
value = 60,-27

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 3

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 80
guardflag = MA
pausetime = 12,13
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -10,-70
hitsound = S5,2
guardsound = s6,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -5.5
air.velocity = -2.5,-4
fall = 1
fall.recover = 0
p2stateno = 225
p2facing = 1

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 3
value = 2

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

;---------------------------------------------------------------------------
; KnockDown Move
[Statedef 242]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 0
ctrl = 0
velset = 0,0
anim = 220
sprpriority = -1

[State 0, ]
type = PowerAdd
trigger1 = Time = 0
value = -1500
ignorehitpause = 1

[State 0, PalFXWiz] ;Generated by MEE PalFX Editor
type = PalFX
trigger1 = Time = 0
trigger1 = prevstateno = [120,169]
time = 15
add = 0,0,0
mul = 256,256,256
sinadd = 512,512,512,3
invertall = 0
color = 256

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,17
channel = 0

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (3) >= 0) && (AnimElemTime (6) < 0)
value = 60,-27

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 3

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage  = 60
guardflag = MA
pausetime = 12,13
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -10,-70
hitsound = S5,2
guardsound = s6,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -5.5
air.velocity = -2.5,-4
fall = 1
fall.recover = 0
p2stateno = 225
p2facing = 1

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 3
value = 2

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 225]
type    = A
movetype= H
physics = N
velset = 0,0

[State ****: AfterImage]
type = AfterImage
trigger1 = 1
time = 150
timegap = 1
framegap = 1
length = 60
paladd = 0, 0, 0
palmul = .80, .80, .80
palcontrast = 100,100,100
trans = add
persistent = 0

[State 1025, Anim] ;Custom animation
type = ChangeAnim
trigger1 = 1
value = 5017

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 226

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 226]
type    = A
movetype= H
physics = N

[State 0, ]
type = AfterImageTime
trigger1 = 1
time = 15

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = Time = 0
value = 225

[State 0, ]
type = VelSet
trigger1 = 1
x = -15
ignorehitpause = 1

[State 1026, No scroll]
type = null;ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 10
trigger2 = time >= 300
value = 227

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 227]
type    = A
movetype= H
physics = N

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 10 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim
trigger1 = 1
value = 5017

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F5,4

[State 1027, State]
type = ChangeState
trigger1 = time >= 15
value = 228

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 228]
type    = A
movetype= H
physics = N

[State 0, ]
type = ChangeAnim
trigger1 = Time = 0
value = 5070

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = ,NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;---------------------------------------------------------------------------
; Go To the screen
[Statedef 229]
type    = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 0, ]
type = Turn
trigger1 = frontedgedist <= -10
ignorehitpause = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x) * 3

[State 0, ]
type = ScreenBound
trigger1 = 1
value = 0

[State 100, 4]
type = ChangeState
trigger1 = animtime = 0
trigger1 = screenpos x = [0,320]
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 20
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,2
channel = 0

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage  = 25
guardflag = MA
pausetime = 12,12
sparkno = s7000+(random%4)
guard.sparkno = s7100
sparkxy = -10,-37
hitsound  = s5,1
guardsound = s6,1
ground.type = Low
ground.slidetime = 10
ground.hittime  = 14
ground.velocity = -5
air.velocity = -2.5,-3.5

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

;---------------------------------------------------------------------------
; Standing strong kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd = 60
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S2,4
channel = 0

[State 240, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage = 60
guardflag = MA
pausetime = 12,12
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -10,-60
hitsound = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -6
air.velocity = -2.2,-3.2

[State 240, 3]
type = PosAdd
trigger1 = AnimElem = 7
x = 12

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


;---------------------------------------------------------------------------
;;Juat Defence -Stand-
[Statedef 160]
type    = S
physics = S
anim = 160
ctrl = 0
velset = 0,0
SprPriority = -1

[State 160]
type = PosFreeze
trigger1 = time >= 0

[State 161]
type = PosSet
trigger1 = time >= 0
y = 0

[State 161]
type = VelSet
trigger1 = time >= 0
y = 0

[State 160]
type = Explod
trigger1 = time = 0
anim = 8400
pos = -10,-70
postype = p1
ownpal = 1
ignorehitpause = 1
persistent = 0
sprpriority = 10
bindtime = 1
pausemovetime = 65535
supermovetime = 65535
supermove = 1

[State 160]
type = Pause
trigger1 = time = 0
time = 20
movetime = 20
ignorehitpause = 1

[State 160]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = s120,1
Volume = 999
persistent = 0

[State 810, Hurt 11]
type = LifeAdd
trigger1 = time = 0
value = 5
absolute = 1

[State 160, 14]
type = PowerAdd
trigger1 = time = 0
trigger1 = power < 6001
value = Ceil(0.01*const(data.power))

[State 160]
type = ChangeState
Trigger1 = AnimTime = 0
value = 130
ctrl = 1

;---------------------------------------------------------------------------
;;Recoil Guard -crouch-
[Statedef 161]
type    = C
physics = C
anim = 161
ctrl = 0
velset = 0,0
SprPriority = -1

[State 161]
type = PosFreeze
trigger1 = time >= 0

[State 161]
type = PosSet
trigger1 = time >= 0
y = 0

[State 161]
type = VelSet
trigger1 = time >= 0
y = 0

[State 161]
type = Explod
trigger1 = time = 0
anim = 8400
pos = -10,-40
postype = p1
ownpal = 1
ignorehitpause = 1
persistent = 0
sprpriority = 10
bindtime = 1
pausemovetime = 65535
supermovetime = 65535
supermove = 1

[State 161]
type = Pause
trigger1 = time = 0
time = 20
movetime = 20
ignorehitpause = 1

[State 161]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = s120,1
Volume = 999
persistent = 0

[State 810, Hurt 11]
type = LifeAdd
trigger1 = time = 0
value = 5
absolute = 1

[State 160, 14]
type = PowerAdd
trigger1 = time = 0
trigger1 = power < 6001
value = Ceil(0.01*const(data.power))

[State 161]
type = ChangeState
Trigger1 = AnimTime = 0
value = 131
ctrl = 1

;---------------------------------------------------------------------------
;; Recoil Guard -Mid-Air-
[Statedef 162]
type    = A
physics = N
anim = 162
ctrl = 0
SprPriority = -1

[State 162]
type = PosFreeze
trigger1 = time >= 0

[State 162]
type = Explod
trigger1 = time = 0
anim = 8400
pos = -10,-70
postype = p1
ownpal = 1
ignorehitpause = 1
persistent = 0
sprpriority = 10
bindtime = 1
pausemovetime = 65535
supermovetime = 65535
supermove = 1

[State 162]
type = Pause
trigger1 = time = 0
time = 20
movetime = 20
ignorehitpause = 1

[State 162]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = s120,1
Volume = 999
persistent = 0

[State 810, Hurt 11]
type = LifeAdd
trigger1 = time = 0
value = 5
absolute = 1

[State 160, 14]
type = PowerAdd
trigger1 = time = 0
trigger1 = power < 6001
value = Ceil(0.01*const(data.power))

[State 162]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52
ctrl = 0

[State 162]
type = ChangeState
Trigger1 = AnimTime = 0
value = 132
ctrl = 1
;---------------------------------------------------------------------------
; Evasion
[Statedef 250]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = N                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 250                       ;Change animation (Def: no change)
sprpriority = 0                  ;Set layering priority to 2 (in front)

[State 0, ]
type = PowerAdd
trigger1 = Time = 0
trigger1 = prevstateno = [120,169]
value = -500
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time = 0
trigger1 = prevstateno = [120,169]
time = 15
add = 0,0,0
mul = 256,256,256
sinadd = 512,512,512,3
invertall = 0
color = 256

[State 0, ]
type = AfterImage
trigger1 = Time = 0
time = 20
length = 30
palcolor = 128
palbright = 30,30,30
palcontrast = 120,120,220
palpostbright = 5,5,5
paladd = 10,10,10
palmul = .65,.65,.65
timegap = 1
framegap = 4
trans = add

[State 0, ]
type = SprPriority
trigger1 = AnimElem = 2
value = -1

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

[State 0, ]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 0, ]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP
time = 1
ignorehitpause = 1

[State 0, ]
type = PlayerPush
trigger1 = vel x != 0
value = 0
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Back Evasion
[Statedef 255]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = N                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 250                       ;Change animation (Def: no change)
sprpriority = 0                  ;Set layering priority to 2 (in front)

[State 0, ]
type = PowerAdd
trigger1 = Time = 0
trigger1 = prevstateno = [120,169]
value = -500
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time = 0
trigger1 = prevstateno = [120,169]
time = 15
add = 0,0,0
mul = 256,256,256
sinadd = 512,512,512,3
invertall = 0
color = 256

[State 0, ]
type = AfterImage
trigger1 = Time = 0
time = 20
length = 30
palcolor = 128
palbright = 30,30,30
palcontrast = 120,120,220
palpostbright = 5,5,5
paladd = 10,10,10
palmul = .65,.65,.65
timegap = 1
framegap = 4
trans = add

[State 0, ]
type = SprPriority
trigger1 = AnimElem = 2
value = -1

[State 0, ]
type = VelSet
trigger1 = AnimElem = 2
x = -6

[State 0, ]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 0, ]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP
time = 1
ignorehitpause = 1

[State 0, ]
type = PlayerPush
trigger1 = vel x != 0
value = 0
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Back Evasion
[Statedef 257]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = N                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 250                       ;Change animation (Def: no change)
sprpriority = 0                  ;Set layering priority to 2 (in front)

[State 0, ]
type = SprPriority
trigger1 = AnimElem = 2
value = -1

[State 0, ]
type = VelSet
trigger1 = AnimElem = 2
x = -6

[State 0, ]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 0, ]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP
time = 1
ignorehitpause = 1

[State 0, ]
type = PlayerPush
trigger1 = vel x != 0
value = 0
ignorehitpause = 1

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Special Back Evasion
[Statedef 258]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = N                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 250                       ;Change animation (Def: no change)
sprpriority = 0                  ;Set layering priority to 2 (in front)

[State 1000, 1]
type = Pause
trigger1 = p2movetype = A
trigger1 = GameTime % 2 = 0
time = 3
movetime = 0
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time = 0
time = 15
add = 0,0,0
mul = 256,256,256
sinadd = 512,512,512,3
invertall = 0
color = 256

[State 0, ]
type = AfterImage
trigger1 = Time = 0
time = 20
length = 30
palcolor = 128
palbright = 30,30,30
palcontrast = 120,120,220
palpostbright = 5,5,5
paladd = 10,10,10
palmul = .65,.65,.65
timegap = 1
framegap = 4
trans = add

[State 0, ]
type = SprPriority
trigger1 = AnimElem = 2
value = -1

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

[State 0, ]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 0, ]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1
ignorehitpause = 1

[State 0, ]
type = PlayerPush
trigger1 = vel x != 0
value = 0
ignorehitpause = 1

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Safe Fall
[Statedef 705]
poweradd= 0
ctrl = 0
anim = 705
sprpriority = 2
velset = 0,0

[state a]
type = posset
trigger1 = time = 0
y = 0

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

[state a]
type = playerpush
trigger1 = animelem = 4,<=0
value = 0

;[State 600, 1]
;type = PlaySnd
;trigger1 = Time = 1
;value = 700, 0

[State 600, 1]
type = velset
trigger1 = Time = 0
x = -6

[State 600, 1]
type = veladd
trigger1 = vel x <= 0
trigger1 = gametime % 2
x = 0.4

[state a]
type = velset
trigger1 = vel x >= 0
x = 0

[State 50, 4]
type = AfterImage
trigger1 = time = 0
time = 30
trans = add1
timegap = 2
framegap = 2
length = 6
palbright = 0,0,0
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

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

;---------------------------------------------------------------------------
[Statedef 299]
type = A
movetype = I
physics = N
velset = 0,0
ctrl = 0
poweradd = 0
velset = 0,0

[State 3550, 1]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[state 3550, 1]
type = Nothitby
trigger1 = 1
value = SCA

[state 3550, 9]
type = changeanim
trigger1 = time = 0 
value = 5002

[state 3550, 9]
type = selfstate
trigger1 = pos y >= 0 && vel y > 0 && time > 5
value = 5030

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

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,2
channel = 0

[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 25
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = s7000+(random%4)
guard.sparkno = s7100
sparkxy = -10,-42
hitsound = s5,0
guardsound = s6,1
ground.type = Low
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.5,-3

[State 400, 3]
type = CtrlSet
trigger1 = Time = 5
value = 1

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
;Crouching strong punch
; CNS difficulty: easy
; Description: This is a 2-hit move. It is done by having two HitDefs
;     triggered, one for each frame of animation that hits.
;     Notice how the first hit cannot be guarded by an opponent in the
;     air, because of the "M" in the guardflag, meaning it can only
;     be guarded "middle". The second hit has an "MA" guardflag, so
;     it can be guarded both on the ground and in the air.
; CNS レベル: 易
; 詳細: これは殴打が二発ある攻撃です。
; 殴打できるアニメーションの枚は一々HitDefを登録しています。
; 一発目の攻撃のHitDefにはguardflagが「M」（middle＝中段ガード）
; にセットされているので、相手は空中でガードできません。二発目
; の攻撃のguardflagは「MA」（middle+air＝中段＋空中ガード）で、
; 地上、空中でもガードすることができます。
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd = 50
ctrl = 0
anim = 410
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S2,5
channel = 0

[State 410, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

;This is the first hit, triggered on the 3rd element of animation.
[State 410, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 35
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,12
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -10,-55
hitsound = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -4
air.velocity = -3,-4

;This is the second hit, triggered on the 4th element of animation.
[State 410, 3]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA
damage  = 38
animtype  = Medium
hitflag = MAF
guardflag = MA
pausetime = 12,12
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -10,-83
hitsound = s5,2
guardsound = s6,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -7
air.velocity = -3,-4

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

;---------------------------------------------------------------------------
; Crouching light kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd = 20
ctrl = 0
anim = 430
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,2
channel = 0

[State 430, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 430, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 28
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = s7000+(random%4)
guard.sparkno = s7100
sparkxy = -10,-8
hitsound = s5,1
guardsound = s6,1
ground.type = Low
ground.slidetime = 6
ground.hittime  = 20
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

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

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

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S2,6
channel = 0

[State 440, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 440, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 70
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -5,-10
hitsound = s5,2
guardsound = s6,1
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 25
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
guard.velocity = -5
fall = 1

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

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

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 20
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = s7000+(random%4)
guard.sparkno = s7100
sparkxy = -10,-58
hitsound = s5,0
guardsound = s6,1
ground.type = High
ground.slidetime = 5
ground.hittime  = 25
ground.velocity = -4
air.velocity = -1.3,-3

[State 600, 3]
type = CtrlSet
trigger1 = Time = 17
value = 1

;---------------------------------------------------------------------------
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd = 60
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 70
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -10,-55
hitsound = s5,2
guardsound = s6,1
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 25
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd = 20
ctrl = 0
anim = 630
sprpriority = 2

[State 630, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 25
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = s7000+(random%4)
guard.sparkno = s7100
sparkxy = -5,-35
hitsound = s5,0
guardsound = s6,1
ground.type = High
ground.slidetime = 6
ground.hittime  = 15
ground.velocity = -4
air.velocity = -2,-3

;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd = 60
ctrl = 0
anim = 640
sprpriority = 2

[State 640, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 70
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = s7010+(random%4)
guard.sparkno = s7100
sparkxy = -10,-40
hitsound = s5,2
guardsound = s6,1
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -3,-4


;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd = 60
anim = 1055
ctrl = 0
sprpriority = 2

[State 650, 2]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 3

[State 650, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = high
damage  = 100
priority  = 4
guardflag = MA
pausetime = 10,10
sparkxy = 0,-90
sparkno = s7010+(random%4)
guard.sparkno = s7100
hitsound = S5,3
guardsound = s6,1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -4,-4.5
air.velocity = -4,-4.8
fall = 1
fall.recover = 0
ID = 650

;---------------------------------------------------------------------------
;Kung Fu Throw - Attempt
; CNS difficulty: medium-advanced
; Description: Throws are not difficult to make, although then can be
;     tedious at times. Throw attempt states have a HitDef of a
;     special format. The key parameters in a throw are p1stateno
;     and p2stateno. If the HitDef successfully connects, then
;     the attacker will change to the state number specified by
;     p1stateno, and the opponent will be change to the state
;     number assigned to p2stateno. The special thing about p2stateno
;     is that the opponent will be temporarily brought into the
;     attacker's state file. In this case, no matter who the
;     opponent is, he will be taken to state 820 of this file (kfm.cns)
;     and remain here until the end of the throw (look at his debug
;     information when he is being thrown; the text changes to yellow
;     to mean that he is in another player's state file).
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents KFM from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 810       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S2,7
channel = 0

; Here a variable, var(2), is used to remember whether or not the
; player was holding forward at the start of the state. This variable
; is checked later on to turn KFM around if necessary.
[State 810, Holding fwd?]
type = VarSet
trigger1 = Time = 0
var(2) = command = "holdfwd"

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800, 0

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

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

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

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

[State 810, holdfwd - Turn 6] ;If was holding fwd before, turn now
type = Turn
trigger1 = var(2)
trigger1 = AnimElem = 6

[State 810, holdfwd - Pos 6] ;If was holding fwd before, move a little
type = PosAdd
trigger1 = var(2)
trigger1 = AnimElem = 6
x = -37

[State 810, holdfwd - Turn Target 6] ;If was holding fwd before, turn target too
type = TargetFacing
trigger1 = var(2)
trigger1 = AnimElem = 6
value = -1

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

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

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

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

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

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

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 11
value = Ceil(-0.1*enemy,Const(data.life))
absolute = 1

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

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

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

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

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

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

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

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

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

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

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------
; Kung Fu Palm
; CNS difficulty: medium
; Description: This is like a standard attack, but with some differences.
;   There are two HitDefs in this attack. One is triggered when the
;   opponent is near (using a p2bodydist trigger), and the other
;   when the opponent is farther away. The main differences between
;   the near and far versions of the HitDefs is that the near version
;   has a "fall" parameter set to 1, causing the opponent to be knocked
;   down. Other minor differences are the damage, and the velocity to
;   give the opponent.
;   The line "attr = S, SA" line means this is a Standing, Special Attack.
;   It is important you have the attr parameter set correctly for all
;   you HitDefs.
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,8
channel = 0

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 3

[State 1000, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 1000, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 12
x = 10

[State 1000, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = AnimElem = 5
trigger1 = p2bodydist X < 40
attr = S, SA
animtype  = Hard
damage = 85, 4
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
sparkno = s7010+(random%4)
guard.sparkno = s7101
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1

[State 1000, 6] ;Opponent not near
type = HitDef
trigger1 = AnimElem = 5
trigger1 = p2bodydist X >= 40
attr = S, SA
animtype  = Hard
damage = 80, 4
priority  = 4
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
sparkno = s7010+(random%4)
hitsound   = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 12
ground.hittime = 18
ground.velocity = -7
air.velocity = -4,-2.5
fall = 0

[State 1000, 6]
type = PosAdd
trigger1 = AnimElem = 8
x = -5

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

;---------------------------------------------------------------------------
; Strong Kung Fu Palm
; CNS difficulty: medium
[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 120
velset = 0,0
anim = 1010
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,8
channel = 0

[State 1010, 1]
type = PlaySnd
trigger1 = Time = 9
value = 0, 3

[State 1010, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 1010, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 12
x = 10

[State 1010, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 1010, 5]
type = VelSet
trigger1 = AnimElem = 5
x = 4

[State 1010, 6] ;Opponent near
type = HitDef
trigger1 = AnimElem = 5
trigger1 = p2bodydist X < 40
attr = S, SA
animtype  = Hard
damage  = 95, 4
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound   = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1

[State 1010, 7] ;Opponent not near
type = HitDef
trigger1 = AnimElem = 5
trigger1 = p2bodydist X >= 40
attr = S, SA
animtype  = Hard
damage  = 90, 4
priority  = 4
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound   = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -4,-2.5

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

;---------------------------------------------------------------------------
; Fast Kung Fu Palm
; CNS difficulty: advanced
; Description: This is a complicated attack move. If you're a beginner,
;     you should skip looking at this for now and check it later when
;     you are more comfortable with the cns.
;     This move puts the other player in a custom get-hit state.
;     The line "p2stateno = 1025" in the HitDef does this. KFM has some
;     palette effects as well as after-image effects.
[Statedef 1020]
type    = S
movetype= A
physics = N
juggle  = 6
poweradd= -500
velset = 0,0
anim = 1020
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,6
channel = 0

[State 1020, Friction]
type = VelMul
trigger1 = 1
x = .85 * ifelse (AnimElemTime(6) < 0, 1, .8)

[State 1020, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 1020, Afterimage]
type = AfterImageTime
trigger1 = AnimElemTime(8) < 0
time = 2

[State 1020, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 1020, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 3

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 2
anim = 4301
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = -1
removeongethit = 1

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 2
anim = 4305
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = 10
removeongethit = 1

[State 1020, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 1020, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 11
x = 10

[State 1020, 4]
type = PosAdd
trigger1 = AnimElem = 4
x = 5

[State 1020, 5]
type = VelSet
trigger1 = AnimElem = 4
x = 13

[State 1020, 6]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Hard
damage  = 100, 5
getpower  = 0
priority  = 4
guardflag = MA
pausetime = 8,7
sparkxy = -10,-60
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8,-7
guard.velocity = -7
air.velocity = -8,-7
airguard.velocity = -5, -4
fall = 1
p2stateno = 1025

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

;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1025]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1025

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1026

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 1026]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1027]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1028

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 1028]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;---------------------------------------------------------------------------
; Kung Fu Knee
; CNS difficulty: medium
; Description: Like the Kung Fu Palm, this is a special attack. This attack
;     begins on the ground, launches KFM into the air, then ends when KFM
;     lands on the ground. To achieve this, we use three states. The first
;     has KFM starting on the ground (note that type = S in the Statedef).
;     The ChangeState controller brings KFM into the second state (state
;     1051) when his ground animation ends. The second state controls KFM's
;     movement into the air and back towards the ground. The last state
;     (state 1052) stops KFM from moving when he touches the ground, and
;     brings him back to his stand state (state 0) when the animation is
;     over. More details are given in comments before each of the following
;     states.
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2

[State 1050, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2

[State 1050, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 15

[State 1050, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1050, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
damage  = 80, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 1

[State 1050, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1051

;------------------
; Light Kung Fu Knee - jump
; Description: This state uses a velset parameter in the Statedef to make
;     KFM move upwards. A value of 2,-6 means 2 pixels/tick forwards, and
;     6 pixels/tick upwards. Since this is an aerial state, the type is set
;     to A in the Statedef.
;     Notice that physics = N (N for None) here. This means we are not using
;     the built-in aerial physics model (physics = A), so we have complete
;     control over what KFM does in this state. Since we do not have
;     physics = A to take care of gravity for us, we need to put in our own
;     controller for that. Controller 1051,1 does the work of pulling KFM
;     down towards the ground. Controller 1051,2 checks if KFM has reached
;     the ground, and changes to state 1052 if so.
;     In this state's Statedef, we will use the hitdefpersist parameter to
;     retain the HitDef information from the last state. If we did not have
;     hitdefpersist, the HitDef will be turned off between state changes.
[Statedef 1051]
type    = A
movetype= A
physics = N
velset = 2,-6
anim = 1051
hitdefpersist = 1 ;Keep the HitDef from previous state active

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,2
channel = 0

[State 1051, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .45

[State 1051, 2]
type = ChangeState
trigger1 = Command = "a" || Command = "b"
trigger1 = Vel y < -1
value = 1055

[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;------------------
; Light Kung Fu Knee - land
; Description: This is KFM's landing state. There is a velset in the
;     Statedef to stop KFM from moving. Since KFM's y-position can be any
;     number greater than -10 upon entering this state (see the ChangeState
;     controller in State 1051), we need to reset it to 0, the ground
;     level. That is what controller 1052,1 is for.
[Statedef 1052]
type    = S
movetype= I
physics = S
anim = 1052
sprpriority = 1
velset = 0,0

[State 1052, 1] ;Reset y-position to ground level
type = PosSet
trigger1 = Time = 0
y = 0

[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = Time = 0
value = 40, 0

[State 1052, 3] ;Give KFM back control early
type = CtrlSet
trigger1 = AnimElem = 3, -1
value = 1

[State 1052, 4] ;Move KFM back a little
type = PosAdd
trigger1 = AnimElem = 4
x = -15

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

;------------------
; Kung Fu Knee - kick
[Statedef 1055]
type    = A
movetype= A
physics = N
anim = 1055

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,3
channel = 0

[State 1055, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0, 1

[State 1055, 3]
type = PosAdd
trigger1 = Time = 0
x = 10
y = -10

[State 1055, 4] ;Gravity
type = VelAdd
trigger1 = 1
y = .45

[State 1055, 5]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype = Med
damage = 35+(prevstateno = 1061)*5, 2
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = 0,-90
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,2
guardsound = s6,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -6
guard.velocity = -8
guard.ctrltime = 12
air.velocity = -4,-5
airguard.velocity = -4,-4.5
air.fall = 1

[State 1055, 6] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -5
value = 1056

;------------------
; Kung Fu Knee - land from kick
[Statedef 1056]
type    = S
movetype= I
physics = S
anim = 1056
sprpriority = 1
velset = 0,0

[State 1056, 1] ;Reset y-position to ground level
type = PosSet
trigger1 = Time = 0
y = 0

[State 1056, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = Time = 0
value = 40, 0

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

;---------------------------------------------------------------------------
; Strong Kung Fu Knee
[Statedef 1060]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 120
velset = 0,0
anim = 1060
ctrl = 0
sprpriority = 2

[State 1060, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2

[State 1060, 2]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 14

[State 1060, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1060, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
damage = 95, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound   = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-7.5
guard.velocity = -7
air.velocity = -3.5,-7.5
fall = 1

[State 1060, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1061

;------------------
; Strong Kung Fu Knee - jump
[Statedef 1061]
type    = A
movetype= A
physics = N
velset = 2.5,-7.5
anim = 1061
hitdefpersist = 1 ;Keep the HitDef from previous state active

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,2
channel = 0

[State 1061, 1]
type = VelAdd
trigger1 = 1
y = .45

[State 1061, 2]
type = ChangeState
trigger1 = Command = "a" || Command = "b"
trigger1 = Vel y < -1
value = 1055

[State 1061, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
; Fast Kung Fu Knee
; Description: This version of the Kung Fu Knee hits up to 3 times (including
;     the kick).
[Statedef 1070]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd= -500
velset = 0,0
anim = 1070
ctrl = 0
sprpriority = 2

[State 1070, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 1070, Afterimage]
type = AfterImageTime
trigger1 = 1
time = 2

[State 1070, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 1070, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2

[State 1070, 2]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 14

[State 1070, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1070, 4]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Medium
getpower  = 0
damage = 35, 3
priority  = 5
hitflag   = MA
guardflag = MA
pausetime = 8,7
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound   = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -2,-6
guard.velocity = -7
air.velocity = -2,-6
fall = 1
fall.animtype = Med
fall.recovertime = 30

[State 1070, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1071

;------------------
; Fast Kung Fu Knee - jump
[Statedef 1071]
type    = A
movetype= A
physics = N
velset = 2.5,-9
anim = 1071

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,6
channel = 0

[State 1071, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 18
add = 32,16,0
sinadd = 64,32,5,3

[State 1071, Afterimage]
type = AfterImageTime
trigger1 = Vel Y < 0
time = 2

[State 1071, 1]
type = VelAdd
trigger1 = 1
y = .5

[State 1071, 2]
type = VelAdd
trigger1 = Vel Y >= -1
y = .2

[State 1071, 3]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
getpower  = 0
damage = 65, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3,-9.5
guard.velocity = -7
air.velocity = -3,-9.5
fall = 1
fall.recovertime = 30

[State 1071, 4]
type = ChangeState
trigger1 = Command = "a" || Command = "b"
trigger1 = Vel y < -1
trigger1 = Time > 0
value = 1075

[State 1071, 5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;------------------
; Fast Kung Fu Knee - kick
[Statedef 1075]
type    = A
movetype= A
physics = N
anim = 1055

[State 1075, Afterimage]
type = AfterImageTime
trigger1 = 1
time = 2

[State 1075, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,7
channel = 0

[State 1075, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0, 1

[State 1075, 3]
type = PosAdd
trigger1 = Time = 0
x = 10
y = -10

[State 1075, 4] ;Gravity
type = VelAdd
trigger1 = 1
y = .45

[State 1075, 5]
type = VelAdd
trigger1 = Vel Y >= -1
y = .2

[State 1075, 6]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype = Medium
damage = 40, 2
getpower  = 0
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = 0,-90
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,2
guardsound = s6,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -6
guard.velocity = -6
air.velocity = -4,-6
airguard.velocity = -4,-4.5
air.fall = 1

[State 1075, 7] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -5
value = 1056


;---------------------------------------------------------------------------
; Light Kung Fu Upper
; CNS difficulty: easy
; Description: This is a simple special attack that can hit twice. Notice
;     the use of the Width controller to keep opponents from getting too
;     close to KFM during his uppercut (press Ctrl-C, and look at the
;     yellow bar at KFM's feet during the move).
;     The second HitDef has some interesting parameters. fall.recovertime
;     is used to prevent the opponent (p2) from recovering immediately
;     after being hit (eg. press x+y with KFM to recover). This gives the
;     attacking KFM a chance to follow up with an extra attack, such as
;     a Kung Fu Knee. The yaccel parameter, set at 0.4, makes p2 fall at a
;     greater value of acceleration than the default, which is 0.35.
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,6
channel = 0

[State 1100, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(13) < 0
value = 5,0

[State 1100, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State 1100, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Medium
damage = 50, 4
priority  = 5
guardflag = MA
pausetime = 4,8
sparkxy = 0,-48
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 1100, 3]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Up
damage = 50, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = 0,-110
sparkno = s7020+(random%4)
hitsound   = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -1,-9.5
guard.velocity = -6
air.velocity = -1,-7.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1                   ;Make p2 fall down
fall.recovertime = 40      ;40 ticks before p2 can recover from fall
yaccel = .4                ;p2 will accelerate down at .4 pixels/sec^2 when falling

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

;---------------------------------------------------------------------------
; Strong Kung Fu Upper
[Statedef 1110]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 120
velset = 0,0
anim = 1110
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,6
channel = 0

[State 1110, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(14) < 0
value = 5,0

[State 1110, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State 1110, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Med
damage = 55, 4
priority  = 5
guardflag = MA
pausetime = 4,8
sparkxy = 0,-48
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound   = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 1110, 3]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Up
damage = 60, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = 0,-110
sparkno = s7020+(random%4)
hitsound = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -1,-10.5
guard.velocity = -6
air.velocity = -1,-8.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 50
yaccel = .4

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

;---------------------------------------------------------------------------
; Fast Kung Fu Upper
[Statedef 1120]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd= -500
velset = 0,0
anim = 1120
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
;trigger1 = random < 500
value = S2,6
channel = 0

[State 1120, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(14) < 0
value = 5,0

[State 1120, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 1120, Afterimage]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

[State 1120, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 1120, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State 1120, 2]
type = HitDef
trigger1 = Time = 0
trigger2 = AnimElem = 4
attr = S, SA
animtype = Med
damage  = 30, 4
getpower = 0
priority  = 5
guardflag = MA
pausetime = 6,10
sparkno = s7020+(random%4)
sparkxy = 0, ifelse(Time = 0, -48, -55)
guard.sparkno = s7101
hitsound   = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 21
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 1120, 3]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype = Up
damage = 65, 4
getpower = 0
priority = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = 0,-110
hitsound   = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 21
ground.velocity = -1.2,-11
guard.velocity = -6
air.velocity = -1.2,-9
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 60
yaccel = .4

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

;---------------------------------------------------------------------------
; Light Kung Fu Blow
; CNS difficulty: easy
; Notes: This uses the EnvShake controller to shake the screen. It makes the
;        move look stronger.
[Statedef 1200]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1200
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,6
channel = 0

[State 1200, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State 1200, Width 1]
type = Width
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
value = 10,0

[State 1200, Width 2]
type = Width
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(9) < 0
value = 20,0

[State 1200, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 6
time = 4     ;Time to shake screen
ampl = 2     ;Amount to shake
freq = 180   ;A frequency of 180 shakes the screen rapidly

[State 1200, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Hard
damage = 100, 6
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = 0,-65
hitsound  = s5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5

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

;---------------------------------------------------------------------------
; Strong Kung Fu Blow
; CNS difficulty: easy
[Statedef 1210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 120
velset = 0,0
anim = 1210
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,ifelse(random<500,3,6)
channel = 0

[State 1210, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State 1210, Width 1]
type = Width
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
value = 10,0

[State 1210, Width 2]
type = Width
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(9) < 0
value = 20,0

[State 1210, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 6
time = 8
ampl = 2
freq = 170   ;A frequency of less than 180 causes a dampening effect

[State 1210, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Hard
damage = 120, 9
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = 0,-65
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = -15 ;To push far away when p2 is in corner
guard.velocity = -8
air.velocity = -4,-4.5
airguard.velocity = -4,-4.5

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

;---------------------------------------------------------------------------
; Fast Kung Fu Blow
; CNS difficulty: easy
[Statedef 1220]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd= -500
velset = 0,0
anim = 1220
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,ifelse(random<500,3,6)
channel = 0

[State 1220, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 1220, Afterimage]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

[State 1220, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 1220, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State 1220, Width 1]
type = Width
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
value = 10,0

[State 1220, Width 2]
type = Width
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(9) < 0
value = 20,0

[State 1220, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 6
time = 8
ampl = 3
freq = 170

[State 1220, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Hard
damage = 130, 10
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = 0,-65
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 30
ground.velocity = -15
ground.cornerpush.veloff = -20 ;To push far away when p2 is in corner
guard.velocity = -9
air.velocity = -5,-5
airguard.velocity = -5,-5
air.fall = 1
fall.animtype = Hard           ;Show "hard" animtype when hit for a fall
yaccel = .4                    ;Fall faster

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

;---------------------------------------------------------------------------
; Kung Fu Laser
[Statedef 1250]
type    = S
movetype= I
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1250
ctrl = 0
;sprpriority = 2

[State 0, ]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "Beam"
pos = 0,0
postype = p1
facing = 1
stateno = 1251
ID = 11251
ownpal = 1
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Beam Itself
[Statedef 1251]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 1251
ctrl = 0
sprpriority = 2

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S0,8

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = Time = 0
attr = S, SP
animtype = Hard
damage = 80*(parent,fvar(8)), 4
priority  = 5
guardflag = MA
pausetime = 0,15
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = -1
guardsound = s6,1
ground.type = Low
ground.slidetime = 0
ground.hittime  = 25
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 1000, 7]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = root, stateno != [1250,1270]

;---------------------------------------------------------------------------
; Kung Fu Laser
[Statedef 1260]
type    = S
movetype= I
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1260
ctrl = 0
;sprpriority = 2

[State 0, ]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "Beam"
pos = 0,0
postype = p1
facing = 1
stateno = 1261
ID = 11251
ownpal = 1
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Beam Itself
[Statedef 1261]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 1261
ctrl = 0
sprpriority = 2

[State 0, ]
type = ReversalDef
trigger1 = animelem = 6 < 1
reversal.attr = SCA,AA
ignorehitpause = 1
hitsound = S2,10
pausetime = 0,20

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S0,8
freqmul = 0.95
volume = 255

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = Time = [0,10]
trigger1 = Timemod = 3,0
attr = S, SP
animtype  = Hard
damage = 30*(parent,fvar(8)), 4
priority  = 5
guardflag = MA
pausetime = 0,15
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = -1
guardsound = s6,1
ground.type = Low
ground.slidetime = 0
ground.hittime  = 25
ground.velocity = -30,-1
air.velocity = -30,-1
fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 1000, 7]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = root, stateno != [1250,1270]

;---------------------------------------------------------------------------
; Kung Fu Laser
[Statedef 1270]
type    = S
movetype= I
physics = S
juggle  = 4
poweradd= -500
velset = 0,0
anim = 1270
ctrl = 0
;sprpriority = 2

[State 1220, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 1220, Afterimage]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

[State 1220, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 0, ]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "Beam"
pos = 0,20
postype = p1
facing = 1
stateno = 1271
ID = 11251
ownpal = 1
ignorehitpause = 1
size.xscale = 1.0
size.yscale = 1.4

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

;---------------------------------------------------------------------------
; Beam Itself
[Statedef 1271]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 1271
ctrl = 0
sprpriority = 2

[State 0, ]
type = ReversalDef
trigger1 = animelem = 6 < 1
reversal.attr = SCA,AA
ignorehitpause = 1
hitsound = S2,10
pausetime = 0,20

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S0,7
freqmul = 0.9
volume = 255

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = Time = [0,20]
trigger1 = Timemod = 3,0
attr = S, SP
animtype  = Hard
damage = 20*(parent,fvar(8)), 4
priority  = 5
guardflag = MA
pausetime = 0,10
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S800,0
guardsound = S0,3
ground.type = Low
ground.slidetime = 0
ground.hittime  = 25
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 1000, 7]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = root, stateno != [1250,1270]

;---------------------------------------------------------------------------
; Power Stomp
; CNS difficulty: easy
; Notes: This uses the EnvShake controller to shake the screen. It makes the
;        move look stronger.
[Statedef 1300]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1300
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,14
channel = 0

[State 1200, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 6

[State 1200, Width 1]
type = null;Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(7) < 0
value = 74,0

[State 1200, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 4
time = 10     ;Time to shake screen
ampl = 2     ;Amount to shake
freq = 180   ;A frequency of 180 shakes the screen rapidly

[State 0, ]
type = Explod
trigger1 = AnimElem = 4
anim = 4306
pos = 58,0
postype = p1
facing = 1
bindtime = 1
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 1200, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Hard
damage = 80, 10
priority = 5
guardflag = LA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = 0,0
hitsound = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5

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

;---------------------------------------------------------------------------
; Strong Power Stomp
; CNS difficulty: easy
; Notes: This uses the EnvShake controller to shake the screen. It makes the
;        move look stronger.
[Statedef 1310]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1310
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,14
channel = 0

[State 1200, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 6

[State 1200, Width 1]
type = null;Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(7) < 0
value = 74,0

[State 1200, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 4
time = 10     ;Time to shake screen
ampl = 4     ;Amount to shake
freq = 180   ;A frequency of 180 shakes the screen rapidly

[State 0, ]
type = Explod
trigger1 = AnimElem = 4
anim = 4306
pos = 58,0
postype = p1
facing = 1
bindtime = 1
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 4
anim = 4307
pos = 58,0
postype = p1
facing = -1
bindtime = 1
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 1200, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Hard
damage = 100, 10
priority  = 5
guardflag = LA
pausetime = 12,12
sparkxy = 0,0
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 16
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5

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

;---------------------------------------------------------------------------
; Fast Power Stomp
; CNS difficulty: easy
; Notes: This uses the EnvShake controller to shake the screen. It makes the
;        move look stronger.
[Statedef 1320]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = -500
velset = 0,0
anim = 1320
ctrl = 0
sprpriority = 2

[State 1220, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 1220, Afterimage]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

[State 1220, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,14
channel = 0

[State 1200, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 5

[State 1200, Width 1]
type = null;Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(7) < 0
value = 74,0

[State 1200, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 4
time = 20     ;Time to shake screen
ampl = 6     ;Amount to shake
freq = 210   ;A frequency of 180 shakes the screen rapidly

[State 0, ]
type = Explod
trigger1 = AnimElem = 4
anim = 4306
pos = 58,0
postype = p1
facing = 1
bindtime = 1
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 4
anim = 4307
pos = 58,0
postype = p1
facing = -1
bindtime = 1
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 4
anim = 4307
pos = 58,0
postype = p1
facing = 1
bindtime = 1
ontop = 1
ownpal = 1
ignorehitpause = 1


[State 1200, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Hard
damage = 100, 11
priority  = 7
guardflag = 
pausetime = 6,20
sparkxy = 0,0
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,4
guardsound = s6,1
ground.type = trip
ground.slidetime = 16
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5
fall = 1

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

;---------------------------------------------------------------------------
; Reversi
[Statedef 1350]
type    = S
movetype= I
physics = S
poweradd = 20
ctrl = 0
velset = 0,0
anim = 1350
sprpriority = -1

[State 0, ]
type = ReversalDef
trigger1 = p2name != "7th Heaven Ciel"
trigger1 = p2name != "Full Armor Ciel"
trigger1 = p4name != "7th Heaven Ciel"
trigger1 = p4name != "Full Armor Ciel"
reversal.attr = SCA, NA, SA, HA
ignorehitpause = 1
persistent = 1
priority = 7, hit
pausetime = 0, 2
p1stateno = 1351
p2stateno = 1357

[State 0, ]
type = ReversalDef
trigger1 = p2name = "7th Heaven Ciel"
trigger2 = p2name = "Full Armor Ciel"
trigger3 = p4name = "7th Heaven Ciel"
trigger4 = p4name = "Full Armor Ciel"
reversal.attr = SCA, NA, SA, HA, NP, SP, HP
ignorehitpause = 1
persistent = 1
priority = 7, hit
pausetime = 0, 2
p1stateno = 1351
p2stateno = 9353

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Slap
[Statedef 1351]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1352                       ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

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

[State with voice]
type = PlaySnd
trigger1 = target,stateno = 1357
trigger1 = Time = 0
value = S0,9

[State with voice]
type = PlaySnd
triggerall = Time = 0
trigger1 = p2name = "7th Heaven Ciel"
trigger2 = p2name = "Full Armor Ciel"
trigger3 = p4name = "7th Heaven Ciel"
trigger4 = p4name = "Full Armor Ciel"
value = S0,9

[State 0, ]
type = EnvColor
trigger1 = time = 0
value = 255,255,255
time = 10

[State 3000, 5]
type = Projectile
triggerall = Time = 0
trigger1 = p2name != "7th Heaven Ciel"
trigger1 = p2name != "Full Armor Ciel"
trigger1 = p4name != "7th Heaven Ciel"
trigger1 = p4name != "Full Armor Ciel"
projanim = 1353
projID = 1359
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 5
offset = 0, 0
priority = 7, Hit
projpriority = 999999
projsprpriority = -1
velocity = 0, 0
attr = S, SA
animtype = Hard
damage = 50,50
getpower = 0
priority = 6
guardflag = N
pausetime = 0,5
sparkxy = -10,-50
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s0,9
guardsound = S0,9
ground.type = Low
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = 0, -30
air.velocity = 0, -30
air.fall = 1
fall = 1
fall.recover = 0
fall.animtype = Hard
fall.damage = Ceil(IfElse(random<500,(0.05*enemy,const(data.life)),(0.04*enemy,const(data.life))))
p2stateno = 1355
p2facing = 1
getpower = 50,0

[State 180,]
type = VarRandom
trigger1 = 1
v = 35
range = 0,4

[State with voice]
type = PlaySnd
triggerall = var(35) = 1
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255
freqmul = 0.5

[State with voice]
type = PlaySnd
triggerall = var(35) = 1
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255
freqmul = 0.75

[State with voice]
type = PlaySnd
triggerall = var(35) = 2
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255

[State with voice]
type = PlaySnd
triggerall = var(35) = 3
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255
freqmul = 1.25

[State with voice]
type = PlaySnd
triggerall = var(35) = 4
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255
freqmul = 1.50

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Blown Away
[Statedef 1355]
type    = A
movetype= H
physics = N
velset = 0,-30

[State 3004,8]
type = Veladd
trigger1 = 1
y = .4

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

[State 3111, 1]
type = ScreenBound
trigger1 = 1
Value = 1

[State 802, 4]
type = SelfState
trigger1 = Pos Y > 0
trigger1 = Vel Y > 0
value = 5110

;---------------------------------------------------------------------------
;Blown Away
[Statedef 1357]
type    = A
movetype= H
physics = N
velset = 0,-30

[State 820, 1]
type = ChangeState
trigger1 = name = "7th Heaven Ciel"
trigger2 = name = "Full Armor Ciel"
value = 9359

[State 3004,8]
type = Veladd
trigger1 = 1
y = .4

[State 3004,8]
type = LifeAdd
trigger1 = Time = 0
value = Ceil(-0.09*const(data.life))
absolute = 1

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

[State 3111, 1]
type = ScreenBound
trigger1 = 1
Value = 1

[State 802, 4]
type = SelfState
trigger1 = Pos Y > 0
trigger1 = Vel Y > 0
value = 5110

[State 3004,8]
type = DestroySelf
triggerall = time >= 0
trigger1 = ishelper = 1
trigger2 = ishelper

;---------------------------------------------------------------------------
;Blown Away
[Statedef 9359]
type    = S
movetype= I
physics = S
velset = 0,0

[State 3004,8]
type = posset
trigger1 = 1
y = 0

[State 3004,8]
type = velset
trigger1 = 1
x = 0
y = 0

[State 3004,8]
type = LifeAdd
trigger1 = Time = 0
value = Ceil(-0.1*const(data.life))
absolute = 1

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

[State 3111, 1]
type = ScreenBound
trigger1 = 1
Value = 1

[State 3004,8]
type = DestroySelf
triggerall = time >= 0
trigger1 = ishelper = 1
trigger2 = ishelper

[State 802, 4]
type = SelfState
trigger1 = Time > 1000
value = 5110
;---------------------------------------------------------------------------
; Stunner
[Statedef 1400]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1550
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 3

;[State 1000, 1]
;type = PlaySnd
;trigger1 = AnimElem = 8
;value = 0, 10

[State 1000, 2]
type = VelAdd
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
x = 2

[State 1000, 2]
type = VelAdd
trigger1 = Anim = 1550
trigger1 = AnimElem = 4
trigger2 = Anim = 1551
trigger3 = Anim = 1552
x = 0

[State 3052, Flash]
type = Explod
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
anim = 4301
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = -1
removeongethit = 1

[State 1200, 2]
type = Projectile
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
projanim = 1555
projID = 1555
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 5
projremove = 0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = vel x, vel y
attr = S, SA
animtype  = Hard
damage = 40, 0
priority = 7
hitflag = MAF
guardflag = M
pausetime = 0,0
guard.pausetime = 0,30
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = 30 + (floor(p2bodydist X)), -50
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = 0 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5
p2stateno = 1402

[State 3052, Flash]
type = Explod
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
anim = 2015
bindtime = -1
postype = p1
ownpal = 1
pos = 30,-65
scale = 0.5,0.5
sprpriority = 6

[State 0, ]
type = ChangeAnim
trigger1 = movecontact
trigger2 = projcontact1555 = 1
value = ifelse(!numtarget,1552,1551)
persistent = 0
ignorehitpause = 1

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Get spanked
[Statedef 1402]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 4

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 1620

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Anim = 1620
trigger1 = Time = 40
value = 1621

[State 4206, Anim2]
type = VelSet
trigger1 = Anim = 1621
trigger1 = Time = 41
y = 3

[State 4206, Anim2]
type = VelAdd
trigger1 = Anim = 1621
trigger1 = Time >= 40
y = 0.5

[state 4206, Fim]
type = ChangeState
trigger1 = Anim = 1621
trigger1 = pos y >= 0
trigger1 = vel y > 0
value = 1406
;---------------------------------------------------------------------------
; Dizzy p2
[Statedef 1406]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 4

[State 0, ]
type = ChangeAnim
trigger1 = Time = 0
value = 5300

[State 4206, Anim2]
type = Posset
trigger1 = 1
y = 0

[State 4206, Anim2]
type = VelSet
trigger1 = 1
y = 0

[State 0, ]
type = SelfState
trigger1 = Time >= 100
value = 5100
;---------------------------------------------------------------------------
; Strong Stunner
[Statedef 1410]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1550
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 3

[State 1000, 2]
type = VelAdd
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
x = 4

[State 1000, 2]
type = VelAdd
trigger1 = Anim = 1550
trigger1 = AnimElem = 4
trigger2 = Anim = 1551
trigger3 = Anim = 1552
x = 0

[State 3052, Flash]
type = Explod
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
anim = 4305
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = -1
removeongethit = 1

[State 1200, 2]
type = Projectile
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
projanim = 1555
projID = 1555
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 5
projremove = 0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = vel x, vel y
attr = S, SA
animtype  = Hard
damage = 50, 0
priority = 7
hitflag = MAF
guardflag = M
pausetime = 0,0
guard.pausetime = 0,30
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = 30 + (floor(p2bodydist X)), -50
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = 0 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5
p2stateno = 1402

[State 3052, Flash]
type = Explod
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
anim = 2015
bindtime = -1
postype = p1
ownpal = 1
pos = 0,-65
scale = 0.75,0.75
sprpriority = 6

[State 0, ]
type = ChangeAnim
trigger1 = movecontact
trigger2 = projcontact1555 = 1
value = ifelse(!numtarget,1552,1551)
persistent = 0
ignorehitpause = 1

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Fast Stunner
[Statedef 1420]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= -500
velset = 0,0
anim = 1550
ctrl = 0
sprpriority = 2

[State 1220, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 1220, Afterimage]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

[State 1220, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 3

;[State 1000, 1]
;type = PlaySnd
;trigger1 = AnimElem = 8
;value = 0, 10

[State 1000, 2]
type = VelAdd
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
x = 4

[State 1000, 2]
type = VelAdd
trigger1 = Anim = 1550
trigger1 = AnimElem = 4
trigger2 = Anim = 1551
trigger3 = Anim = 1552
x = 0

[State 3052, Flash]
type = Explod
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
anim = 4305
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = -1

[State 1200, 2]
type = Projectile
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
projanim = 1555
projID = 1555
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 5
projremove = 0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = 5, 0
accel = 0.5,0
attr = S, SA
animtype  = Hard
damage = 80, 0
priority = 7
hitflag = MAF
guardflag = 
pausetime = 0,0
guard.pausetime = 0,30
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = 30 + (floor(p2bodydist X)), -50
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = 0 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5
p2stateno = 1402

[State 3052, Flash]
type = Explod
trigger1 = Anim = 1550
trigger1 = AnimElem = 2
anim = 2015
postype = p1
ownpal = 1
pos = 0,-65
vel = 5,0
accel = 0.5,0
sprpriority = 6

[State 0, ]
type = ChangeAnim
trigger1 = movecontact
trigger2 = projcontact1555 = 1
value = ifelse(!numtarget,1552,1551)
persistent = 0
ignorehitpause = 1

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Rugal Excusion
[Statedef 1450]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1450
sprpriority = 2

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 0, ]
type = AfterImage
trigger1 = animelem = 1
time = 20
length = 60
palcolor = 240
paladd = 10,10,10
palmul = .8,.8,.8
timegap = 1
framegap = 4
trans = add
ignorehitpause = 1

[State 1041, Hitdef]
type = Hitdef
trigger1 = Time = 0
attr = S, ST
hitflag = MA
guardflag = 
animtype = Heavy
air.animtype = Back
priority = 1
damage = 0,0
pausetime = 1, 1
sparkno = -1
guard.sparkno = s7101
sparkxy = 10, -70
hitsound = -1
guardsound = S6,2
ground.type = high
ground.slidetime = 9
ground.hittime = 10
guard.ctrltime = 10
ground.velocity = -1.5, -10
air.velocity = -5, -5
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 1460       ;On success, KFM changes to state 810
p2stateno = 1470       ;If hit, p2 changes to state 820 in KFM's cns
getpower = 0
kill = 0

[State 800, 2]
type = ChangeState
trigger1 = time >= 20
trigger2 = moveguarded
value = ifelse(moveguarded,1457,1455)
;---------------------------------------------------------------------------
; Rugal Excusion
[Statedef 1455]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 1455
sprpriority = 2

[State 100, 1]
type = VelSet
trigger1 = 1
x = 0 

[State 800, 2]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Rugal Excusion - Guarded
[Statedef 1457]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 1457
sprpriority = 2

[State 100, 1]
type = VelSet
trigger1 = 1
x = 0 

[State 800, 2]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Rugal Excusion p1
[Statedef 1460]
type    = S
movetype= A
physics = S
anim = 1451
poweradd = 50
velset = 0,0
sprpriority = 0

[State 810, Grab Sound]
type = PlaySnd
triggerall = anim = 1451
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
triggerall = anim = 1451
trigger1 = AnimElem = 3
value = 2, 16
channel = 0

[State 810, Bind 1]
type = TargetBind
triggerall = anim = 1451
trigger1 = AnimElemTime(4) < 0
pos = 4, -60

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 1451
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(6) < 0
pos = 34, -51

[State 810, Bind 5]
type = TargetBind
triggerall = anim = 1451
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = 39, -85

[State 810, Bind 6]
type = TargetBind
triggerall = anim = 1451
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 38, -132

[State 810, Bind 7]
type = TargetBind
triggerall = anim = 1451
trigger1 = time < 100
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 38, -130

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = time = 100
value = Ceil(-0.12*enemy,Const(data.life))
absolute = 1

[State 810, Hurt 11]
type = LifeAdd
trigger1 = time = 100
value = Ceil(0.04*enemy,Const(data.life))
absolute = 1

[State 810, Throw 11]
type = TargetState
trigger1 = Time = 100
value = 1471

[State 810, Throw 11]
type = ChangeAnim
trigger1 = anim != 1453
trigger1 = Time >= 100
value = 1453

[State 810, Throw Sound]
type = StopSnd
trigger1 = Time = 100
channel = 0

[State 0, ]
type = PlaySnd
trigger1 = Time = 100
value = s5, 4

[State 0, ]
type = EnvColor
trigger1 = Time = 100
value = 255,0,0
time = 10
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Rugal Excusion p2
[Statedef 1470]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

[State 0, PalFXWiz] ;Generated by MEE PalFX Editor
type = PalFX
trigger1 = 1
time = 10
add = time * 2,0,0
color = 256 - time
ignorehitpause = 1

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

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, 2]
type = SelfState
trigger1 = time>200;!gethitvar(isbound);
value = 5050

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

[State 0, PalFXWiz] ;Generated by MEE PalFX Editor
type = PalFX
trigger1 = Time = 0
time = 10
add = 256,0,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 1
color = 256

[State 0, ]
type = ChangeAnim2
trigger1 = Time = 0
value = 1454

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

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

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

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

;---------------------------------------------------------------------------
; Chain Saw
[Statedef 1500]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 70
ctrl = 0
velset = 0,0
anim = 1500
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
trigger5 = AnimElem = 11
trigger6 = AnimElem = 13
trigger7 = AnimElem = 15
trigger8 = AnimElem = 17
trigger9 = AnimElem = 19
trigger10 = AnimElem = 21
trigger11 = AnimElem = 23
trigger12 = AnimElem = 25
trigger13 = AnimElem = 27
value = 0, 2

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
trigger5 = AnimElem = 11
trigger6 = AnimElem = 13
trigger7 = AnimElem = 15
trigger8 = AnimElem = 17
trigger9 = AnimElem = 19
trigger10 = AnimElem = 21
trigger11 = AnimElem = 23
trigger12 = AnimElem = 25
trigger13 = AnimElem = 27
attr = S, SA
animtype  = Hard
damage = 8,1
guardflag = MA
pausetime = 8,10
sparkno = s7010+(random%4)
guard.sparkno = s7101
sparkxy = -10,-60
hitsound = S5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -3
air.velocity = -2,-3
ground.cornerpush.veloff = 0

[State 240, 3]
type = Velset
trigger1 = AnimElem = 3
x = 1

[State 240, 3]
type = Velset
trigger1 = AnimElem = 28
x = 0

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

;---------------------------------------------------------------------------
; Kung-Fu Gattling Kick
[Statedef 1500]
type    = S
movetype= A
physics = N
poweradd= 70
ctrl = 0
velset = 0,0
anim = 1500
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
trigger5 = AnimElem = 11
trigger6 = AnimElem = 13
trigger7 = AnimElem = 15
trigger8 = AnimElem = 17
trigger9 = AnimElem = 19
trigger10 = AnimElem = 21
trigger11 = AnimElem = 23
trigger12 = AnimElem = 25
trigger13 = AnimElem = 27
value = 0, 2

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
trigger5 = AnimElem = 11
trigger6 = AnimElem = 13
trigger7 = AnimElem = 15
trigger8 = AnimElem = 17
trigger9 = AnimElem = 19
trigger10 = AnimElem = 21
trigger11 = AnimElem = 23
trigger12 = AnimElem = 25
trigger13 = AnimElem = 27
attr = S, SA
animtype = Hard
damage = 8,2
guardflag = MA
pausetime = 8,9
sparkno = s7010+(random%4)
guard.sparkno = s7101
sparkxy = -10,-60
hitsound = S5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -2.5
air.velocity = -2.5,-2
ground.cornerpush.veloff = 0

[State 240, 3]
type = Velset
trigger1 = AnimElem = 3
x = 1

[State 240, 3]
type = Velset
trigger1 = AnimElem = 28
x = 0

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

;---------------------------------------------------------------------------
; Powered Kung-Fu Gattling Kick
[Statedef 1502]
type    = S
movetype = A
physics = N
poweradd = -500
ctrl = 0
velset = 0,0
anim = 1502
sprpriority = 2

[State 1220, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 43
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 1220, Afterimage]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

[State 1220, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 50
add = 32,16,0
sinadd = 64,32,5,3

[State 240, 1]
type = PlaySnd
triggerall = Anim = 1502
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
value = 0, 2
channel = 12

[State 240, 2]
type = HitDef
triggerall = Anim = 1502
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
attr = S, SA
animtype = Hard
damage = 8,1
guardflag = MA
pausetime = 4,5
sparkno = s7010+(random%4)
guard.sparkno = s7101
sparkxy = -10,-60
hitsound = S5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -2.5
air.velocity = -2.5,-2.5
ground.cornerpush.veloff = 0

[State 240, 3]
type = Velset
trigger1 = Anim = 1502
trigger1 = AnimElem = 3
x = 1

[State 240, 3]
type = ChangeAnim
trigger1 = Anim = 1502
trigger1 = Time >= 60
trigger1 = AnimTime = 0
value = 1504

[State 240, 3]
type = Velset
trigger1 = Anim = 1504
x = 0

[State 1071, 3]
type = HitDef
trigger1 = Anim = 1504
trigger1 = AnimElem = 7
attr = S, SA
animtype = Back
getpower = 0
damage = 20,10
priority = 5
guardflag = MA
pausetime = 20,20
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,4
guardsound = s6,1
ground.type = High
ground.velocity = -6,-1
envshake.time = 25           ;Parameters for shaking the screen on hit
envshake.ampl = 7
envshake.freq = 176
fall = 1
fall.recovertime = 60

[State 810, State End]
type = ChangeState
trigger1 = Anim = 1504
trigger1 = AnimTime = 0
value = 1669
;---------------------------------------------------------------------------
; Bomb Smash
[Statedef 1650]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1650
sprpriority = 2

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents KFM from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, ST
hitflag = M-
priority = 3, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 1660       ;On success, KFM changes to state 810
p2stateno = 1670       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Bomb Smash p1
[Statedef 1660]
type    = S
movetype= A
physics = S
anim = 1451
poweradd = 50
velset = 0,0
sprpriority = 0

[State 810, Grab Sound]
type = PlaySnd
triggerall = anim = 1451
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
triggerall = anim = 1451
trigger1 = AnimElem = 3
value = 2, ifelse(random<500,10,11)
channel = 0
volume = 255

[State 810, Bind 1]
type = TargetBind
triggerall = anim = 1451
trigger1 = AnimElemTime(4) < 0
pos = 4, -60

[State 810, Bind 2-4]
type = TargetBind
triggerall = anim = 1451
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(6) < 0
pos = 34, -51

[State 810, Bind 5]
type = TargetBind
triggerall = anim = 1451
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = 39, -85

[State 810, Bind 6]
type = TargetBind
triggerall = anim = 1451
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 38, -132

[State 810, Bind 7]
type = TargetBind
triggerall = anim = 1451
trigger1 = time < 60
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 38, -130

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = time = 60
value = Ceil(-0.15*enemy,Const(data.life))
absolute = 1

[State 810, Throw 11]
type = TargetState
trigger1 = Time = 60
value = 1671

[State 810, Throw 11]
type = ChangeAnim
trigger1 = anim != 1453
trigger1 = Time >= 60
value = 1453

[State 0, ]
type = PlaySnd
trigger1 = Time = 60
value = S5000, 6

[State 0, ]
type = EnvColor
trigger1 = Time = 60
value = 255,0,0
time = 10
ignorehitpause = 1

[State 4207, Magia]
type = Explod
trigger1 = Time = 60
anim = 3410
ownpal = 1
sprpriority = 6
postype = p1
removeongethit = 1
pos = 38, -132

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

;---------------------------------------------------------------------------
; Rugal Excusion p2
[Statedef 1670]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

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

[State 820, 2]
type = SelfState
trigger1 = time > 100
value = 5050

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

[State 3430, brilho]
type = PalFX
trigger1 = time = 0
time = 25
add = 80,-70,-200
sinadd = 0,30,0,10
invertall = 1
color = 0
ignorehitpause = 1

[State 0, ]
type = ChangeAnim2
trigger1 = Time = 0
value = 1454

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

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

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

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

;---------------------------------------------------------------------------
; Slap
[Statedef 1800]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1600                       ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

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

[State 0, ]
type = PlaySnd
trigger1 = Time = 5
value = S5, 8
volume = 255

[State 0, ]
type = PowerAdd
trigger1 = time = 0
value = -1500

[State 0, ]
type = EnvColor
trigger1 = time = 0
value = 255,255,255
time = 10

[State 7001, HitEffect]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Effect"
postype = p1
pos = 40,-65
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
stateno = 1890
ID = 1891
ignorehitpause = 1
persistent = 0

[State 7001, HitEffect]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Effect"
postype = p1
pos = 40,-65
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
stateno = 1891
ID = 1892
ignorehitpause = 1
persistent = 0

[State 3000, 5]
type = Projectile
trigger1 = Time = 0
projanim = 1615
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 10
offset = 0, 0
priority = 7, Hit
projpriority = 99999
projsprpriority = -1
velocity = 0, 0
attr = S, HA
animtype = Hard
damage = 50,50
getpower = 0
priority = 6
guardflag = N
pausetime = 0,50
sparkno = s7020+(random%4)
sparkxy = -10,-60
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
p2stateno = 1850

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

;---------------------------------------------------------------------------
; Slap
[Statedef 1810]
type    = A                     ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = A                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1610                       ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

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

[State 0, ]
type = PowerAdd
trigger1 = time = 0
value = -1500

[State 7001, HitEffect]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Effect"
postype = p1
pos = 40,-65
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
stateno = 1890
ID = 1891
ignorehitpause = 1
persistent = 0

[State 7001, HitEffect]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Effect"
postype = p1
pos = 40,-65
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
stateno = 1891
ID = 1892
ignorehitpause = 1
persistent = 0

[State 0, ]
type = StateTypeSet
trigger1 = AnimElem = 4
movetype = A
physics = N
ignorehitpause = 1

[State 0, ]
type = Velset
trigger1 = Time = [0,25]
y = 0

[State 0, ]
type = Velset
trigger1 = Time = 26
y = 1

[State 0, ]
type = Veladd
trigger1 = Time >= 26
y = 0.4

[State 0, ]
type = EnvColor
trigger1 = time = 0
value = 255,255,255
time = 10

[State 3000, 5]
type = Projectile
trigger1 = Time = 0
projanim = 1615
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 10
offset = 0, 0
priority = 7, Hit
projpriority = 99999
projsprpriority = -1
velocity = 0, 0
attr = S, HA
animtype = Hard
damage = 50,50
getpower = 0
priority = 6
guardflag = N
pausetime = 0,50
sparkno = s7020+(random%4)
sparkxy = -10,-60
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
p2stateno = 1859

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
; Slap
[Statedef 1805]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1600                       ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

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

[State 7001, HitEffect]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Effect"
postype = p1
pos = 40,-65
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
stateno = 1890
ID = 1891
ignorehitpause = 1
persistent = 0

[State 7001, HitEffect]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Effect"
postype = p1
pos = 40,-65
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
stateno = 1891
ID = 1892
ignorehitpause = 1
persistent = 0

[State 0, ]
type = EnvColor
trigger1 = time = 0
value = 255,255,255
time = 10

[State 3000, 5]
type = Projectile
trigger1 = Time = 0
projanim = 1615
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 10
offset = 0, 0
priority = 7, Hit
projpriority = 99999
projsprpriority = -1
velocity = 0, 0
attr = S, HA
animtype = Hard
damage = 75,75
getpower = 0
priority = 6
guardflag = N
pausetime = 0,50
sparkno = s7020+(random%4)
sparkxy = -10,-60
hitsound   = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
p2stateno = 1850

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

;---------------------------------------------------------------------------
; Slap
[Statedef 1815]
type    = A                     ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = A                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1610                       ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

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

[State 7001, HitEffect]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Effect"
postype = p1
pos = 40,-65
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
stateno = 1890
ID = 1891
ignorehitpause = 1
persistent = 0

[State 7001, HitEffect]
type = Helper
trigger1 = Time = 0
helpertype = normal
name = "Effect"
postype = p1
pos = 40,-65
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
stateno = 1891
ID = 1892
ignorehitpause = 1
persistent = 0

[State 0, ]
type = StateTypeSet
trigger1 = AnimElem = 4
movetype = A
physics = N
ignorehitpause = 1

[State 0, ]
type = Velset
trigger1 = Time = [0,25]
y = 0

[State 0, ]
type = Velset
trigger1 = Time = 26
y = 1

[State 0, ]
type = Veladd
trigger1 = Time >= 26
y = 0.4

[State 0, ]
type = EnvColor
trigger1 = time = 0
value = 255,255,255
time = 10

[State 3000, 5]
type = Projectile
trigger1 = Time = 0
projanim = 1615
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 10
offset = 0, 0
priority = 7, Hit
projpriority = 99999
projsprpriority = -1
velocity = 0, 0
attr = S, HA
animtype = Hard
damage = 75,75
getpower = 0
priority = 6
guardflag = N
pausetime = 0,50
sparkno = s7020+(random%4)
sparkxy = -10,-60
hitsound   = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
p2stateno = 1859

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
; Get spanked
[Statedef 1850]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 4

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 1620

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Anim = 1620
trigger1 = Time = 60
value = 1621

[State 4206, Anim2]
type = VelAdd
trigger1 = Anim = 1621
trigger1 = Time >= 60
y = 0.5

[state 4206, Fim]
type = SelfState
trigger1 = Anim = 1621
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
;------------------------------------------------------------------------------
[Statedef 1855]
type     = S
movetype = I
physics  = N
anim = 1630

[State 809, Speed]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 809, Speed]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 0, ]
type = EnvColor
trigger1 = projhit1858 = 1
value = 255,255,255
time = 10

[State -2, Try to do that, you'll see]
type = SelfState
trigger1 = p2name = "Akaitsuki" || p4name = "Akaitsuki" || enemy,name = "Akaitsuki"
trigger1 = movetype = H
trigger1 = stateno = 2306
trigger2 = Time >= 5
value = 1805
;------------------------------------------------------------------------------
[Statedef 1856]
type     = A
movetype = I
physics  = N
anim = 1632

[State 809, Speed]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State -2, Try to do that, you'll see]
type = SelfState
trigger1 = p2name = "Akaitsuki" || p4name = "Akaitsuki" || enemy,name = "Akaitsuki"
trigger1 = movetype = H
trigger1 = stateno = 2306
trigger2 = Time >= 5
value = 1815

;---------------------------------------------------------------------------
[Statedef 1859]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 3

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

[state a]
type = velset
trigger1 = time = 0
x = -3
y = 3

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

[State 821, 3] 
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3155

;----------------------------------------------------------------------
; Ring
[Statedef 1890]
type = A
movetype = I
physics = N
anim = 4388
ctrl = 0
sprpriority = 88

[State 10291, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 10291, VarAdd];Scale initialize
type = VarSet
trigger1 = Time = 0
fvar(20) = 0.5

[State 10291, VarAdd];Scale
type = VarAdd
trigger1 = Time = [1,10]
fvar(20) = 0.1

[State 10291, VarAdd];Scale
type = VarAdd
trigger1 = Time > 10
fvar(20) = 0.01

[State 10291, VarAdd];Transition
type = VarAdd
trigger1 = Time = [10,35]
var(9) = 10

[State 10291, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 45
scale = fvar(20),fvar(20)/5

[State 10291, Trans]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 255-var(9),256

[State 10291, DestroySelf]
type = DestroySelf
trigger1 = Time > 35

;----------------------------------------------------------------------
; Ring
[Statedef 1891]
type = A
movetype = I
physics = N
anim = 4388
ctrl = 0
sprpriority = 88

[State 10291, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow
ignorehitpause = 1

[State 10291, VarAdd];Scale initialize
type = VarSet
trigger1 = Time = 0
fvar(20) = 0.5

[State 10291, VarAdd];Scale
type = VarAdd
trigger1 = Time = [1,10]
fvar(20) = 0.1

[State 10291, VarAdd];Scale
type = VarAdd
trigger1 = Time > 10
fvar(20) = 0.01

[State 10291, VarAdd];Transition
type = VarAdd
trigger1 = Time = [10,35]
var(9) = 10

[State 10291, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 135
scale = fvar(20),fvar(20)/5

[State 10291, Trans]
type = Trans
trigger1 = 1
trans = AddAlpha
alpha = 255-var(9),256

[State 10291, DestroySelf]
type = DestroySelf
trigger1 = Time > 35
;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
; CNS difficulty: medium
; Notes: Notice that the HitDefs in supers have "getpower = 0". This makes
;        sure KFM doesn't recharge his super guage as he hits.
;        Also, the attributes for the HitDefs is "HA" for "hyper attack",
;        ie. "attr = S, HA".
;        Notice how the first HitDef is reused twice by allowing it to
;        trigger on two animation elements.
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2
poweradd = 0

[State 3000, Width]
type = PowerAdd
trigger1 = Animelem = 2
value = -1000
persistent = 0

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2, 1
pos = 25, -57
anim = s7200
sound = s20, 0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
trigger1 = palno = [1,11]
value = , NA, SA, AT
time = 15

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 18
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State with voice]
type = PlaySnd
trigger1 = animelem = 11
value = S2,3
channel = 0

[State with voice]
type = PlaySnd
trigger1 = animelem = 18
value = S2,6
channel = 0

[State 3000, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 3000, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 10
trigger3 = AnimElem = 12
trigger4 = AnimElem = 17
trigger5 = AnimElem = 19
trigger4 = AnimElem = 29
x = 10

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 5
trigger2 = AnimElem = 12
trigger3 = AnimElem = 19
x = 6

[State 3000, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 3000, 5]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 12
attr = S, HA
animtype  = Hard
damage = 70,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 15,15
sparkno = s7020+(random%4)
guard.sparkno = s7102
sparkxy = -10,-60
hitsound   = s5,4
guardsound = s6,2
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0

[State 3000, 6]
type = HitDef
trigger1 = AnimElem = 19
attr = S, HA
animtype  = Hard
damage = 75,4
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
sparkno = s7030+(random%4)
guard.sparkno = s7102
hitsound = s5,4
guardsound = s6,2
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -5, -4
guard.velocity = -12
air.velocity = -5,-4
airguard.velocity = -3,-3
fall.animtype = Hard
fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
; 5x Kung Fu Palm (hyper)
; CNS difficulty: medium
[Statedef 3010]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3010
ctrl = 0
sprpriority = 2
poweradd = 0

[State 3000, Width]
type = PowerAdd
trigger1 = Animelem = 2
value = -2000
persistent = 0

[State 3000, 2]
type = VarSet
trigger1 = time = 0
v = 15
value = 1

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2, 1
pos = 25, -57
anim = s7201
sound = s20, 1
p2defmul = 1

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
trigger1 = palno = [1,11]
value = , NA, SA, AT
time = 15

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 18
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State with voice]
type = PlaySnd
trigger1 = animelem = 11
value = S2,3
channel = 0

[State with voice]
type = PlaySnd
trigger1 = animelem = 18
value = S2,5
channel = 0

[State with voice]
type = PlaySnd
trigger1 = animelem = 27
value = S2,6
channel = 0

[State 3000, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 3000, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 10
trigger3 = AnimElem = 12
trigger4 = AnimElem = 17
trigger5 = AnimElem = 19
trigger6 = AnimElem = 29
trigger7 = AnimElem = 31
x = 10

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 5
trigger2 = AnimElem = 12
trigger3 = AnimElem = 19
trigger4 = AnimElem = 27
x = 6

[State 3000, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 3000, 5]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 12
trigger3 = AnimElem = 19
trigger4 = AnimElem = 27
attr = S, HA
animtype  = Hard
damage = 64,4
getpower = 0
priority = 6
guardflag = MA
pausetime = 10,10
sparkno = s7020+(random%4)
guard.sparkno = s7102
sparkxy = -10,-60
hitsound = s5,4
guardsound = s6,2
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
kill = 0

[State 810, Bind 7]
type = PlayerPush
trigger1 = AnimElemTime(34) >= 0 && AnimElemTime(42) < 0
value = 0

[State 0, ]
type = VelAdd
trigger1 = AnimElem = 34
x = 13

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 34
anim = 4301
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = -1
removeongethit = 1

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 34
anim = 4305
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = 10
removeongethit = 1

[State 3000, 6]
type = HitDef
trigger1 = AnimElem = 34
attr = S, HA
animtype  = Hard
damage = 96,4
getpower = 0
priority = 5
guardflag = MA
pausetime = 9,8
sparkxy = -10,-60
sparkno = s7020+(random%4)
guard.sparkno = s7102
hitsound = s5,5
guardsound = s6,2
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -12, -8
guard.velocity = -9
air.velocity = -12,-8
airguard.velocity = -7,-6
fall.animtype = Hard
fall = 1
p2stateno = 1025

[State 3000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Smash Kung Fu Upper (hyper)
; CNS difficulty: medium
; Description: This is very similar to KFM's Strong and Light Kung Fu Uppers.
;     There is just one HitDef, for a screen-shaking hit. The envshake
;     parameters are used to make this effect. You can find out more about
;     each parameter in the CNS documentation.
;     The fall.recover parameter is set at 0, meaning that p2 cannot recover
;     from the fall by entering his recovery command (for KFM, that is x+y).
;     This gives the attacking KFM a chance to follow up with another attack,
;     such as the Fast Kung Fu Palm.
;     Note that there is a ChangeState controller used to make KFM change to
;     a success state if he hits. The success state has KFM hold his arm
;     up longer for a dramatic effect.
[Statedef 3050]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3050
ctrl = 0
sprpriority = 2
poweradd = 0

[State 3000, Width]
type = PowerAdd
trigger1 = Animelem = 2
value = -1000
persistent = 0

[State 3050, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(16) < 0
value = 5,0

[State 3050, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = -5, -55
anim = s7200
sound = s20, 0

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
trigger1 = palno = [1,11]
value = , NA, SA, AT
time = 15

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3050, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State with voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = S2,8
channel = 0

[State 3050, 2]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Up               ;Make p2 use "Up" type animation on hit
damage = ifelse(prevstateno>=3000,120,160),10
getpower = 0
priority  = 5
guardflag = M
pausetime = 30,30
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = 0,-110
hitsound = s5,5
guardsound = s6,2
ground.type = Low
ground.slidetime = 26
ground.hittime  = 26
ground.velocity = -1.3,-25
guard.velocity = -11
air.velocity = -1.3,-25
airguard.velocity = -4.5,-5
envshake.time = 25           ;Parameters for shaking the screen on hit
envshake.ampl = 7
envshake.freq = 176
p2facing = 1                 ;Force p2 to face p1 on hit
fall = 1
fall.recover = 0             ;Prevent p2 from recovering
fall.damage = 70             ;p2 will take 70 damage on hitting the ground
fall.envshake.ampl = 6       ;Parameters for shaking the screen on fall
fall.envshake.freq = 178
fall.envshake.time = 15
mindist = 50,-100            ;Keep p2 a minimum of 50 pixels away from p1, and no higher than 100 pixels up
maxdist = 100,-10            ;Keep p2 a maximum of 100 pixels away from p1, and no lower than 10 pixels below
yaccel = .8                  ;Accelerate p2 downwards rapidly

;This controller below makes Kung Fu man change to a success state if he
;successfully hits the Smash Kung Fu Upper.
[State 3050, 4]
type = ChangeState
trigger1 = MoveHit
value = 3051

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

;------------------
; Smash Kung Fu Upper (success)
; Description: This is the state that KFM changes to if he successfully hits
;     with Smash Kung Fu Upper. KFM holds his arm high for a short while
;     longer, then changes back to his idle stand state.
[Statedef 3051]
type    = S
movetype= A
physics = S
anim = 3051

[State 3051, 1]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

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

;---------------------------------------------------------------------------
; Super Smash Kung Fu Upper (hyper)
[Statedef 3060]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3050
ctrl = 0
sprpriority = 2
poweradd = 0

[State 3000, Width]
type = PowerAdd
trigger1 = Animelem = 2
value = -2000
persistent = 0

[State 3050, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(16) < 0
value = 5,0

[State 3050, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = -5, -55
anim = s7201
sound = s20, 1
p2defmul = 1

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
trigger1 = palno = [1,11]
value = , NA, SA, AT
time = 15

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3050, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State with voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = S2,8
channel = 0

[State 3050, Flash]
type = EnvColor
trigger1 = MoveHit = 1
value = 255,0,0
ignorehitpause = 1
persistent = 0
under = 1
time = 2

[State 3050, 2]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Up
damage = ifelse(prevstateno>=3000,240,320),40
getpower = 0
priority  = 5
guardflag = A
pausetime = 30,30
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = 0,-110
hitsound = S5,6
guardsound = s6,2
ground.type = Low
ground.slidetime = 26
ground.hittime  = 26
ground.velocity = -1.3,-30
guard.velocity = -11
air.velocity = -1.3,-30
airguard.velocity = -4.5,-5
envshake.time = 25           ;Parameters for shaking the screen on hit
envshake.ampl = 7
envshake.freq = 176
p2facing = 1                 ;Force p2 to face p1 on hit
fall = 1
fall.recover = 0             ;Prevent p2 from recovering
fall.damage = Ceil(0.08*enemy,const(data.life))             ;p2 will take 70 damage on hitting the ground
fall.envshake.ampl = 6       ;Parameters for shaking the screen on fall
fall.envshake.freq = 178
fall.envshake.time = 15
mindist = 50,-100            ;Keep p2 a minimum of 50 pixels away from p1, and no higher than 100 pixels up
maxdist = 100,-10            ;Keep p2 a maximum of 100 pixels away from p1, and no lower than 10 pixels below
yaccel = .8                  ;Accelerate p2 downwards rapidly


;This controller below makes Kung Fu man change to a success state if he
;successfully hits the Smash Kung Fu Upper.
[State 3050, 4]
type = ChangeState
trigger1 = MoveHit
value = 3061

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

;------------------
; Smash Kung Fu Upper (success)
; Description: This is the state that KFM changes to if he successfully hits
;     with Smash Kung Fu Upper. KFM holds his arm high for a short while
;     longer, then changes back to his idle stand state.
[Statedef 3061]
type    = S
movetype= A
physics = S
anim = 3051

[State 3051, 1]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

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

;---------------------------------------------------------------------------
; Dragon Palm (hyper)
; CNS difficulty: medium
[Statedef 3100]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3120
ctrl = 0
sprpriority = 2
poweradd = 0

[State 3000, Width]
type = PowerAdd
trigger1 = Animelem = 2
value = -1000
persistent = 0

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State with voice]
type = PlaySnd
trigger1 = animelem = 2
value = S2,ifelse(random%2,5,30)
channel = 0

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2, 1
pos = 25, -57
anim = s7200
sound = s20, 0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
trigger1 = palno = [1,11]
value = , NA, SA, AT
time = 15

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State with voice]
type = PlaySnd
trigger1 = Time = [5,95]
trigger1 = Timemod = 5,0
value = S0,4
channel = 13
volume = 255
freqmul = 1.1

[State with voice]
type = PlaySnd
trigger1 = AnimElem = 34
value = S0,3
channel = 13
volume = 255

[State 3052, Flash]
type = Explod
trigger1 = Time = [5,95]
trigger1 = Timemod = 10,0
trigger2 = AnimElem = 34
anim = 4306
bindtime = -1
postype = p1
ownpal = 1
pos = 0,0
sprpriority = -1

[State 3052, Flash]
type = Explod
trigger1 = Time = [5,95]
trigger1 = Timemod = 10,0
trigger2 = AnimElem = 34
anim = 4307
bindtime = -1
postype = p1
ownpal = 1
pos = -30,0
sprpriority = 8

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 34
anim = 4305
bindtime = -1
postype = p1
ownpal = 1
pos = -30,0
sprpriority = 10

[State 1002, 1]
type = Projectile
trigger1 = Time = [5,95]
trigger1 = Timemod = 5,0
projanim = 3104
projID = 3104
offset = 0,0
velocity = 0,0
projpriority = 9999
projsprpriority = -1
projremovetime = 2
projremove = 0
projhitanim = -1
projremanim = -1
attr = S, HP
damage = 10, 3
animtype  = Hard
hitflag = MAFD
guardflag = MA
priority = 7, hit
pausetime = 0, 0
sparkno = s7030+(random%4)
guard.sparkno = s7100
sparkxy = 10 + (floor(p2bodydist X)), -60
hitsound = s5, 3
guardsound = s6, 1
ground.type = Low
air.type = Low
ground.slidetime = 30
ground.hittime  = 30
air.hittime = 20
ground.velocity = -6,-2
air.velocity = -6,-2
kill = 1 
fall = 1
fall.animtype = Hard
air.fall = 1
fall.recover = 0
getpower = 0 
p2stateno = 1025

[State 1002, 1]
type = Projectile
trigger1 = AnimElem = 34
projanim = 3104
projID = 3104
offset = 0,0
velocity = 0,0
projpriority = 9999
projsprpriority = -1
projremovetime = 2
projremove = 0
projhitanim = -1
projremanim = -1
attr = S, HP
damage = 20, 3
animtype  = Hard
hitflag = MAFD
guardflag = MA
priority = 7, hit
pausetime = 0, 0
sparkno = s7030+(random%4)
guard.sparkno = 42
sparkxy = 10 + (floor(p2bodydist X)), -60
hitsound = s5, 6
guardsound = s6, 1
ground.type = Low
air.type = Low
ground.slidetime = 30
ground.hittime  = 30
air.hittime = 20
ground.velocity = -12,-6
air.velocity = -12,-8
kill = 1 
fall = 1
fall.animtype = Hard
air.fall = 1
fall.recover = 0
getpower = 0 
p2stateno = 1025

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

;---------------------------------------------------------------------------
; Dragon Palm (hyper)
; CNS difficulty: medium
[Statedef 3110]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3130
ctrl = 0
sprpriority = 2
poweradd = 0

[State 3000, Width]
type = PowerAdd
trigger1 = Animelem = 2
value = -2000
persistent = 0

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State with voice]
type = PlaySnd
trigger1 = animelem = 2
value = S2,ifelse(random%2,5,30)
channel = 0

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2, 1
pos = 25, -57
anim = s7201
sound = s20, 1

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
trigger1 = palno = [1,11]
value = , NA, SA, AT
time = 15

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State with voice]
type = PlaySnd
trigger1 = Time = [5,140]
trigger1 = Timemod = 5,0
value = S0,4
channel = 13
volume = 255
freqmul = 1.1

[State with voice]
type = PlaySnd
trigger1 = AnimElem = 49
value = S0,3
channel = 13
volume = 255

[State 3052, Flash]
type = Explod
trigger1 = Time = [5,140]
trigger1 = Timemod = 10,0
trigger2 = AnimElem = 49
anim = 4306
bindtime = -1
postype = p1
ownpal = 1
pos = -30,0
sprpriority = -1

[State 3052, Flash]
type = Explod
trigger1 = Time = [5,140]
trigger1 = Timemod = 10,0
trigger2 = AnimElem = 49
anim = 4307
bindtime = -1
postype = p1
ownpal = 1
pos = -30,0
sprpriority = 8

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 49
anim = 4305
bindtime = -1
postype = p1
ownpal = 1
pos = -30,0
sprpriority = 10

[State 1002, 1]
type = Projectile
trigger1 = Time = [5,140]
trigger1 = Timemod = 5,0
projanim = 3104
projID = 3104
offset = 0,0
velocity = 0,0
projpriority = 9999
projsprpriority = -1
projremovetime = 2
projremove = 0
projhitanim = -1
projremanim = -1
attr = S, HP
damage = 12, 3
animtype  = Hard
hitflag = MAFD
guardflag = MA
priority = 7, hit
pausetime = 0, 0
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = 10 + (floor(p2bodydist X)), -60
hitsound = s5, 3
guardsound = s6, 1
ground.type = Low
air.type = Low
ground.slidetime = 30
ground.hittime  = 30
air.hittime = 20
ground.velocity = -6,-2
air.velocity = -6,-2
kill = 1 
fall = 1
fall.animtype = Hard
air.fall = 1
fall.recover = 0
getpower = 0 
p2stateno = 1025

[State 1002, 1]
type = Projectile
trigger1 = AnimElem = 49
projanim = 3104
projID = 3104
offset = 0,0
velocity = 0,0
projpriority = 9999
projsprpriority = -1
projremovetime = 2
projremove = 0
projhitanim = -1
projremanim = -1
attr = S, HP
damage = 30, 3
animtype  = Hard
hitflag = MAFD
guardflag = MA
priority = 7, hit
pausetime = 0, 0
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = 10 + (floor(p2bodydist X)), -60
hitsound = s5, 5
guardsound = s6, 1
ground.type = Low
air.type = Low
ground.slidetime = 30
ground.hittime  = 30
air.hittime = 20
ground.velocity = -12,-6
air.velocity = -12,-8
kill = 1 
fall = 1
fall.animtype = Hard
air.fall = 1
fall.recover = 0
getpower = 0 
p2stateno = 1025

[State 3000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Destructive Stomp
[Statedef 3150]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3150
ctrl = 0
sprpriority = 2
poweradd = 0

[State 3000, Width]
type = PowerAdd
trigger1 = Animelem = 2
value = -1000
persistent = 0

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2
time = 30
movetime = 30
pos = 25, -57
anim = s7200
sound = s20, 0

[State 3000, Super B]
type = AfterImage
trigger1 = Time = [31,110]
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = Time = [31,110]
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = [1,11]
trigger1 = Time = [0,32]
value = , NA, SA, AT
time = 1

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 1200, 1]
type = PlaySnd
trigger1 = AnimElem = 9
value = 3170, 0
volume = 255

[State 1200, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 9
time = 10     ;Time to shake screen
ampl = 5     ;Amount to shake
freq = 180   ;A frequency of 180 shakes the screen rapidly

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 4306
pos = 58,0
postype = p1
facing = 1
sprpriority = -1
bindtime = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 3170
pos = 58,0
postype = p1
facing = 1
sprpriority = 15
bindtime = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 4305
pos = 68,0
postype = p1
facing = -1
sprpriority = 15
bindtime = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 4305
pos = 48,0
postype = p1
facing = 1
sprpriority = 15
bindtime = 1
ownpal = 1
ignorehitpause = 1

[State 1200, 2]
type = Projectile
trigger1 = AnimElem = 9
projanim = 3166
projID = 3166
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 2
projremove = 0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = vel x, vel y
attr = S, HA
animtype  = Hard
damage = ifelse(enemynear,statetype = L,240,180), 10
priority = 7
hitflag = MAFLD
guardflag = LA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7102
sparkxy = 30,0
hitsound = s5,5
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5
p2stateno = 3155

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

;---------------------------------------------------------------------------
;;;BLAM-ED
[Statedef 3155]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -1

;[State 700, 2]
;type = NotHitBy
;trigger1 = prevstateno = 2323
;value = SCA

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

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[state a]
type = velset
trigger1 = time = 0
x = -2
y = -15

[State 821, 1]
type = VelAdd
Trigger1 = 1
y = .5

[State 821, 3] 
type = SelfState
triggerall = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
; Beam Itself
[Statedef 3151]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3151
ctrl = 0
sprpriority = 10

[State Smoke, reika recomended me to put the smoke]
type = Explod
trigger1 = Time = 0
anim = 3152
pos = 0,0
postype = p1
sprpriority = -9
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S0,15
freqmul = 0.5

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = timemod = 3,2
attr = S, HP
animtype  = Hard
damage = 6*(parent,fvar(8)),3
priority  = 7
guardflag = 
pausetime = 0,0
sparkno = -1
sparkxy = 0,0
hitsound   = S0,3
guardsound = S0,3
ground.type = Low
ground.slidetime = 0
ground.hittime  = 15
ground.velocity = -1,-1.5
air.velocity = -1,-1
fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
sprpriority = 10
getpower = 0

[State 1000, 7]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = root, stateno != 3150
;---------------------------------------------------------------------------
; Destructive Stomp -Maximum Power-
[Statedef 3160]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3150
ctrl = 0
sprpriority = 2
poweradd = 0

[State 3000, Width]
type = PowerAdd
trigger1 = Animelem = 2
value = -2000
persistent = 0

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = 25, -57
anim = s7201
sound = s20, 1
time = 30
movetime = 30

[State 3000, Super B]
type = AfterImage
trigger1 = Time = [31,110]
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = Time = [31,110]
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = [1,11]
trigger1 = Time = [0,32]
value = , NA, SA, AT
time = 1

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 1200, 1]
type = PlaySnd
trigger1 = AnimElem = 9
value = 3170, 1
volume = 255

[State 1200, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 9
time = 10     ;Time to shake screen
ampl = 5     ;Amount to shake
freq = 180   ;A frequency of 180 shakes the screen rapidly

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 4306
pos = 58,0
postype = p1
facing = 1
sprpriority = -1
bindtime = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 3170
pos = 58,0
postype = p1
facing = 1
sprpriority = 15
bindtime = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 3180
pos = 58,0
postype = p1
facing = 1
sprpriority = 11
bindtime = 1
ownpal = 1
ignorehitpause = 1
scale = 0.5,0.5

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 4305
pos = 68,0
postype = p1
facing = -1
sprpriority = 15
bindtime = 1
ownpal = 1
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = AnimElem = 9
anim = 4305
pos = 48,0
postype = p1
facing = 1
sprpriority = 15
bindtime = 1
ownpal = 1
ignorehitpause = 1

[State 1200, 2]
type = Projectile
trigger1 = AnimElem = 9
projanim = 3166
projID = 3166
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 2
projremove = 0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = vel x, vel y
attr = S, HA
animtype  = Hard
damage = ifelse(enemynear,statetype = L,350,280), 10
priority = 7
hitflag = MAFLD
guardflag = LA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7102
sparkxy = 30,0
hitsound = s5,5
guardsound = s6,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -10
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = -7
air.velocity = -3.5,-4.5
airguard.velocity = -3.5,-4.5
p2stateno = 3155

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

;---------------------------------------------------------------------------
; FlameBall 1
[Statedef 3201]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 2,-4
anim = 3200
sprpriority = 2

[State 0, ]
type = Gravity
trigger1 = 1

[State 0, ]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = vel y >= 0
value = 3205

;---------------------------------------------------------------------------
; FlameBall 2
[Statedef 3202]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 3,-3
anim = 3200
sprpriority = 2

[State 0, ]
type = Gravity
trigger1 = 1

[State 0, ]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = vel y >= 0
value = 3205

;---------------------------------------------------------------------------
; FlameBall 3
[Statedef 3203]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 4,-2
anim = 3200
sprpriority = 2

[State 0, ]
type = Gravity
trigger1 = 1

[State 0, ]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = vel y >= 0
value = 3205

;---------------------------------------------------------------------------
; FlameBall 4
[Statedef 3204]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 5,-1
anim = 3200
sprpriority = 2

[State 0, ]
type = Gravity
trigger1 = 1

[State 0, ]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = vel y >= 0
value = 3205

;---------------------------------------------------------------------------
; FlameBall Burn State
[Statedef 3205]
type    = C
movetype= A
physics = C
ctrl = 0
velset = 0,0
anim = 3201
sprpriority = 2

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

[State 0, ]
type = HitOverRide
trigger1 = 1
time = -1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = -1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S0,18
volume = 255
freqmul = 0.8

[State 3000, 5]
type = HitDef
trigger1 = 1
attr = C, HP
animtype = Hard
damage = ifelse(random<300,1,0),ifelse(random<300,1,0)
getpower = 0
priority = 7
guardflag = N
getpower = 1,1
givepower = -1,-1
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = -1
guardsound = -1
ground.type = Low
ground.slidetime = 0
ground.hittime  = 0
ground.velocity = 0
air.velocity = 0
air.fall = 1
fall.animtype = Hard
fall.recover = 0
p2stateno = 3209

[State 0, ]
type = DestroySelf
trigger1 = time >= 120
trigger1 = animtime = 0
;---------------------------------------------------------------------------
; Crispy p2
[Statedef 3209]
type    = A
movetype= H
physics = N
velset = 0,-0.5
poweradd = -5

[State 0, ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = !selfanimexist(7697)
value = 5070

[State 0, PalFXWiz] ;Generated by MEE PalFX Editor
type = PalFX
trigger1 = time = 0
trigger1 = !selfanimexist(7697)
time = 40
add = 40,-70,-200
sinadd = 40,30,0,10
invertall = 1
color = 0
ignorehitpause = 1

[State 0, ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = selfanimexist(7697)
value = 7697

[State 821, 1] ;Gravity
type = Gravity
Trigger1 = 1

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

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

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

;---------------------------------------------------------------------------
; Crappy Fireball (Hah, Not any more...)
; CNS difficulty: medium
[Statedef 3250]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = 3220
sprpriority = -1

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 6
value = S3000,2
volume = 255

[State 3200, 40]
type = NotHitBy
trigger1 = time = 0
trigger1 = palno = [1,11]
value = SCA, AP, AA, AT
time = 30
ignorehitpause = 1

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
trigger2 = var(38) = 1
value = SCA, AA, AP, AT
time = 1

[State 3550, Effect]
type = Explod
trigger1 = AnimElem = 6
anim = 8019
pos = 60, -56
postype = p1
sprpriority = 3
ownpal = 1

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = 25, -57
anim = s7203
sound = s20, 3
poweradd = -4000
p2defmul = 1

[State 3550, Help]
type = Helper
trigger1 = AnimElem = 6
trigger1 = Life >= 250
trigger1 = Palno < 12
helpertype = normal
name = "Destruct"
ID = 3251
pos = 60, -57
postype = p1
stateno = 3251
ownpal = 1
size.xscale = 1.2
size.yscale = 1.2
keyctrl = 0
pausemovetime = 0

[State 3550, Help]
type = Helper
trigger1 = AnimElem = 6
trigger1 = Life < 250
trigger1 = Palno < 12
helpertype = normal
name = "Destruct"
ID = 3255
pos = 60, -57
postype = p1
stateno = 3255
ownpal = 1
size.xscale = 1.1
size.yscale = 1.1
keyctrl = 0
pausemovetime = 0

[State 3550, Help]
type = Helper
trigger1 = AnimElem = 6
trigger1 = Palno = 12
helpertype = normal
name = "Destruct"
ID = 3255
pos = 60, -57
postype = p1
stateno = 3255
ownpal = 1
size.xscale = 1.1
size.yscale = 1.1
keyctrl = 0
pausemovetime = 0


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

;---------------------------------------------------------------------------
; Destructive Fireball Itself
; CNS difficulty: medium
[Statedef 3251]
type    = A
movetype= A
physics = N
ctrl    = 0
velset  = 0,0
anim    = 3251
sprpriority = 7

[state a]
type = velset
trigger1 = prevstateno != 3251
trigger2 = time = 0
x = 10

[State 12500, 0]
type = HitOverRide
trigger1 = 1
time = -1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = -1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = A, HP
animtype  = Hard
damage = 666*(parent,fvar(8)),66
guardflag = MA
pausetime = 0,0
sparkno = S3105
guard.sparkno = s7102
sparkxy = 0,-35
hitsound = S5000,6
guardsound = s6,1
ground.type = Trip
ground.slidetime = 12
ground.hittime = 13
guard.velocity = -1
airguard.velocity = 0, 20
ground.velocity = -1,-100
air.velocity = -1,-100
fall = 1
fall.recover = 0
yaccel = 2
envshake.time = 60
envshake.freq = 255
envshake.ampl = -24
fall.animtype = hard
Palfx.time = 50
Palfx.add = 40,-70,-200
Palfx.sinadd = 40,30,0,10
Palfx.color = 0
Palfx.invertall = 1
givepower = 0
getpower = 0
priority = 7, Hit
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 4000, 15]
type = TargetState
triggerall = root,var(38) = 1
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,155]
value = 3259
ignorehitpause = 1

[State 210, 5]
type = DestroySelf
trigger1 = Time = 100
trigger1 = frontedgedist < -40
;---------------------------------------------------------------------------
; Destructive Fireball Itself (Near Fatal)
; CNS difficulty: medium
[Statedef 3255]
type    = A
movetype= A
physics = N
ctrl    = 0
velset  = 0,0
anim    = 3255
sprpriority = 7

[state a]
type = velset
trigger1 = prevstateno != 3255
trigger2 = time = 0
x = 20

[State 12500, 0]
type = HitOverRide
trigger1 = 1
time = -1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = -1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = A, HP
animtype  = Hard
damage = 999*(parent,fvar(8)),99
guardflag = M
pausetime = 0,0
sparkno = S3410
guard.sparkno = s7102
sparkxy = 0,-16
hitsound = S5000,5
guardsound = s6,1
ground.type = high
ground.slidetime = 12
ground.hittime  = 13
guard.velocity = -1
airguard.velocity = 1, 50
ground.velocity = -1,-500
air.velocity = -1,-500
fall = 1
fall.recover = 0
yaccel = 5
envshake.time = 60
envshake.freq = 255
envshake.ampl = -24
fall.animtype = hard
palfx.time = 300
Palfx.add  = 40,-70,-200                               
Palfx.sinadd  = 40,30,0,10                                
palfx.color = 0
palfx.invertall = 1
givepower = 0
getpower = 0
priority = 7, Hit

[State 4000, 15]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,155]
value = 3259

[State 210, 5]
type = DestroySelf
trigger1 = Time = 100
trigger1 = frontedgedist < -40
;---------------------------------------------------------------------------
[Statedef 3259]
type = A
movetype = H
physics = N
ctrl = 0

[State 4217, 0]
type = ChangeAnim2
trigger1 = Vel Y <= 0
value = 5630

[State 4217, 1]
type = VelSet
trigger1 = time = 0
x = 0
y = -20*Const(movement.yaccel)

[State 4217, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 4217, 3]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 3710, 11]
type = DestroySelf
trigger1 = ishelper
trigger2 = ishelper = 1

[State 4217, 4]
type = SelfState
trigger1 = time >= 30
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100
;---------------------------------------------------------------------------
; Shun Goku Satsu
[Statedef 3900]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 3900
ctrl = 0
sprpriority = 2

[State 3200, Super A]
type = SuperPause
trigger1 = Time = 1
pos = 10, -80
time = 30
anim = s7202
sound = s20, 2
poweradd = -3000

[State 3200, Super B]
type = AfterImage
trigger1 = Time = 0
time = 2

[State 3200, Super C]
type = AfterImageTime
trigger1 = 1
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = [1,11]
value = ,NA, SA, AT
time = 1

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
trigger2 = var(38) = 1
value = SCA, AA, AP, AT
time = 1

[State 3000, Super E]
type = NotHitBy
trigger1 = palno = [1,11]
value = C, NA
time = 1

[State 3200, 1]
type = VelSet
trigger1 = Time = 2
x = ifelse(palno=12,12,3)

[State 3000, 5]
type = HitDef
trigger1 = time != 0
attr = S, HT
animtype  = Hard
damage = 0,0
getpower  = 0
givepower = 0
priority  = 7
guardflag = 
pausetime = 0,0
sparkno = -1
sparkxy = 0,0
hitsound = s1,1
guardsound = s1,1
ground.type = Low
ground.slidetime = 0
ground.hittime  = 0
ground.velocity = 0
air.velocity = 0
air.fall = 1
fall.animtype = Hard
fall.recover = 0
p1stateno = 3901
p2stateno = 3908
p2facing = 1

[State 3000, 7]
type = ChangeState
trigger1 = Time >= 50
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Shun Goku Satsu p1
[Statedef 3901]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3901
ctrl = 0
sprpriority = 2

[State 810, Grab Sound]
type = PlaySnd
trigger1 = Time = 0
value = S15, 0+(random%3)
volume = 255
channel = 0

[State 0, ]
type = TargetBind
trigger1 = Time = 0
time = 1
pos = 62,-66
ignorehitpause = 1

[State 0, ]
type = VarRandom
trigger1 = 1
v = 0
range = 0,3

[State 0, ]
type = VarRandom
trigger1 = 1
v = 1
range = -20,20

[State 0, ]
type = VarRandom
trigger1 = 1
v = 2
range = -20,20

[State 1100, 2]
type = PlaySnd
trigger1 = time = 35
trigger2 = time = 42
trigger3 = time = 55
trigger4 = time = 65
trigger5 = time = 71
trigger6 = time = 77
trigger7 = time = 97
trigger8 = time = 105
trigger9 = time = 110
trigger10= time = 120
trigger11= time = 124
trigger12= time = 128
trigger13= time = 132
trigger14= time = 136
trigger15= time = 140
trigger16= time = 143
trigger17= time = 144
trigger18= time = 146
trigger19= time = 149
trigger20= time = 152
trigger21= time = 155
trigger22= time = 158
trigger23= time = 161
trigger24= time = 164
trigger25= time = 167
trigger26= time = 170
trigger27= time = 173
trigger28= time = 176
trigger29= time = 179
trigger30= time = 182
trigger31= time = 185
trigger32= time = 188
trigger33= time = 191
trigger34= time = 194
trigger35= time = 197
trigger36= time = 200
trigger37= time = 203
trigger38= time = 206
trigger39= time = 209
value = s5, 3

[State 1100, 2]
type = PlaySnd
trigger1 = time = 212
value = s5, 6

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = time = 35
trigger2 = time = 42
trigger3 = time = 55
trigger4 = time = 65
trigger5 = time = 71
trigger6 = time = 77
trigger7 = time = 97
trigger8 = time = 105
trigger9 = time = 110
trigger10= time = 120
trigger11= time = 124
trigger12= time = 128
trigger13= time = 132
trigger14= time = 136
trigger15= time = 140
trigger16= time = 143
trigger17= time = 144
trigger18= time = 146
trigger19= time = 149
trigger20= time = 152
trigger21= time = 155
trigger22= time = 158
trigger23= time = 161
trigger24= time = 164
trigger25= time = 167
trigger26= time = 170
trigger27= time = 173
trigger28= time = 176
trigger29= time = 179
trigger30= time = 182
trigger31= time = 185
trigger32= time = 188
trigger33= time = 191
trigger34= time = 194
trigger35= time = 197
trigger36= time = 200
trigger37= time = 203
trigger38= time = 206
trigger39= time = 209
value = Ceil(IfElse(palno=12,(-0.02*enemy,Const(data.life)),(-0.01*enemy,Const(data.life))))
absolute = 1
kill = 0

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = Time = 212
value = Ceil(-0.05*enemy,Const(data.life))
absolute = 1

[State 0, ]
type = HitAdd
trigger1 = time = 35
trigger2 = time = 42
trigger3 = time = 55
trigger4 = time = 65
trigger5 = time = 71
trigger6 = time = 77
trigger7 = time = 97
trigger8 = time = 105
trigger9 = time = 110
trigger10= time = 120
trigger11= time = 124
trigger12= time = 128
trigger13= time = 132
trigger14= time = 136
trigger15= time = 140
trigger16= time = 143
trigger17= time = 144
trigger18= time = 146
trigger19= time = 149
trigger20= time = 152
trigger21= time = 155
trigger22= time = 158
trigger23= time = 161
trigger24= time = 164
trigger25= time = 167
trigger26= time = 170
trigger27= time = 173
trigger28= time = 176
trigger29= time = 179
trigger30= time = 182
trigger31= time = 185
trigger32= time = 188
trigger33= time = 191
trigger34= time = 194
trigger35= time = 197
trigger36= time = 200
trigger37= time = 203
trigger38= time = 206
trigger39= time = 209
trigger40= time = 212
value = 1

[State 0, ]
type = Explod
trigger1 = time = 35
trigger2 = time = 42
trigger3 = time = 55
trigger4 = time = 65
trigger5 = time = 71
trigger6 = time = 77
trigger7 = time = 97
trigger8 = time = 105
trigger9 = time = 110
trigger10= time = 120
trigger11= time = 124
trigger12= time = 128
trigger13= time = 132
trigger14= time = 136
trigger15= time = 140
trigger16= time = 143
trigger17= time = 144
trigger18= time = 146
trigger19= time = 149
trigger20= time = 152
trigger21= time = 155
trigger22= time = 158
trigger23= time = 161
trigger24= time = 164
trigger25= time = 167
trigger26= time = 170
trigger27= time = 173
trigger28= time = 176
trigger29= time = 179
trigger30= time = 182
trigger31= time = 185
trigger32= time = 188
trigger33= time = 191
trigger34= time = 194
trigger35= time = 197
trigger36= time = 200
trigger37= time = 203
trigger38= time = 206
trigger39= time = 209
anim = 7020+(random%4)
pos = var(1),var(2)
postype = p2
facing = 1
vfacing = 1
ontop = 1
ownpal = 1
ignorehitpause = 1
;persistent = 1
bindtime = 1
supermove = 1
under = 0

[State -1]
Type = SuperPause
Trigger1 = Time = 30
Time = 179
MoveTime = 179
Anim = -1
Darken = 0

[State 810, Throw 11]
type = TargetState
trigger1 = Time = 212
value = 3909

[State 0, ]
type = EnvColor
trigger1 = Time = [30,214]
value = 0,0,0
time = 1
ignorehitpause = 1
persistent = 1

[State 1]
type = AssertSpecial
trigger1 = winko
flag = NoMusic
flag2 = NoBarDisplay
flag3 = NoBG

[State 810, State End]
type = ChangeState
trigger1 = Time >= 214
value = ifelse(winko,3903,195)
ctrl = 0

[Statedef 3903]
type    = S
movetype= I
physics = S
velset = 0,0
anim = ifelse(random%2,3907,3903)
ctrl = 0

[state a]
type = turn
trigger1 = facing = -1

[State 2000, 6]
type = PlaySnd
trigger1 = Time = 1
value = 3909,9
volume = 255

[State 1]
type = AssertSpecial
trigger1 = 1
flag = NoMusic
flag2 = NoBarDisplay
flag3 = NoBG

[State 180,]
type = VarRandom
trigger1 = 1
v = 35
range = 0,1

[State 1000, LONG LEB]
type = Explod
trigger1 = Time = 0
trigger1 = anim = 3903
anim = 19998
ID = 19998
sprpriority = -10
postype = left
pos = 0,0
bindtime = -1
supermove = 1
under = 0
scale = 0.5,0.5

[State 1000, Welcome to Democracy]
type = Explod
trigger1 = time = 0
trigger1 = anim = 3907
anim = 19999
ID = 19999
sprpriority = -10
postype = left
pos = 0,0
bindtime = -1
supermove = 1
under = 0
scale = 0.5,0.5

[State 191, 3]
type = PlaySnd
trigger1 = Time = 30
value = ifelse(numexplod(19999)=1,1999,2),26
freqmul = 0.95
volume = 255

[State 3906, 017]
type = Explod
trigger1 = time = 0
trigger1 = numexplod(19778) = 0
anim = 4819
ID = 19778
pos = 0,0
postype = left
sprpriority = 98
ontop = 1
ownpal = 1
bindtime = -1
pausemovetime = 999999999
supermovetime = 999999999

[State 801, 2]
type = TargetBind
trigger1 = time = 0
pos = 20,0

[state a]
type = ctrlset
trigger1 = time = 100
value = 1

[Statedef 3904]
type    = S
movetype= I
physics = S
velset = 0,0
juggle = 8
anim = ifelse(numexplod(19999)=1,3907,3903)
ctrl = 0

[State 1]
type = AssertSpecial
trigger1 = 1
flag = NoMusic
flag2 = NoBarDisplay
flag3 = NoBG

[State 1]
type = AssertSpecial
trigger1 = time = [0,500]
flag = Roundnotover

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


[Statedef 3908]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 4288, 07]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 0, ]
type = SelfState
trigger1 = Time >= 250
value = 5000

[Statedef 3909]
type    = A
movetype= H
physics = N
velset = 0,0

[State 4288, 07]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 0, ]
type = PosSet
trigger1 = pos y != 0
y = 0

[State 0, ]
type = SelfState
trigger1 = 1
value = 5110

[Statedef 3918]
Type     = S
MoveType = I
Physics  = N
Ctrl     = 0
VelSet   = 0,0

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SCA, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
Type     = PalFx
Trigger1 = Time = 30
Time     = 1
Add      = 0,0,0
Mul      = 225,225,225

[State -1]
Type     = PalFx
Trigger1 = Time = 31
Time     = 1
Add      = 0,0,0
Mul      = 200,200,200

[State -1]
Type     = PalFx
Trigger1 = Time = 32
Time     = 1
Add      = 0,0,0
Mul      = 175,175,175

[State -1]
Type     = PalFx
Trigger1 = Time = 33
Time     = 1
Add      = 0,0,0
Mul      = 150,150,150

[State -1]
Type     = PalFx
Trigger1 = Time = 34
Time     = 1
Add      = 0,0,0
Mul      = 125,125,125

[State -1]
Type     = PalFx
Trigger1 = Time = 35
Time     = 1
Add      = 0,0,0
Mul      = 100,100,100

[State -1]
Type     = PalFx
Trigger1 = Time = 36
Time     = 1
Add      = 0,0,0
Mul      = 75,75,75

[State -1]
Type     = PalFx
Trigger1 = Time = 37
Time     = 1
Add      = 0,0,0
Mul      = 50,50,50

[State -1]
Type     = PalFx
Trigger1 = Time = 38
Time     = 1
Add      = 0,0,0
Mul      = 25,25,25

[State -1]
Type     = PalFx
Trigger1 = Time >= 39
Time     = 1
Add      = 0,0,0
Mul      = 0,0,0

[State -1]
Type     = PosSet
Trigger1 = Time = 0
Y        = 0

[State -1]
Type = ChangeAnim2
Trigger1 = Time = 0
Value = 3908

[State -1]
type = ChangeState
Trigger1 = Time = 120
Value = 3919

[Statedef 3919]
Type     = S
MoveType = I
Physics  = N
Ctrl     = 0
VelSet   = 0,0

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
Time     = 1

[State -1]
Type     = PalFx
Trigger1 = Time = 8
Time     = 1
Add      = 0,0,0
Mul      = 225,225,225

[State -1]
Type     = PalFx
Trigger1 = Time = 7
Time     = 1
Add      = 0,0,0
Mul      = 200,200,200

[State -1]
Type     = PalFx
Trigger1 = Time = 6
Time     = 1
Add      = 0,0,0
Mul      = 175,175,175

[State -1]
Type     = PalFx
Trigger1 = Time = 5
Time     = 1
Add      = 0,0,0
Mul      = 150,150,150

[State -1]
Type     = PalFx
Trigger1 = Time = 4
Time     = 1
Add      = 0,0,0
Mul      = 125,125,125

[State -1]
Type     = PalFx
Trigger1 = Time = 3
Time     = 1
Add      = 0,0,0
Mul      = 100,100,100

[State -1]
Type     = PalFx
Trigger1 = Time = 2
Time     = 1
Add      = 0,0,0
Mul      = 75,75,75

[State -1]
Type     = PalFx
Trigger1 = Time = 1
Time     = 1
Add      = 0,0,0
Mul      = 50,50,50

[State -1]
Type     = PalFx
Trigger1 = Time = 0
Time     = 1
Add      = 0,0,0
Mul      = 25,25,25

[State -1]
Type = ChangeAnim2
Trigger1 = Time = 0
Value = 5110

[State -1]
type = SelfState
Trigger1 = Time >= 60
Value = 5120
;---------------------------------------------------------------------------
; Explosion that can harm...
[Statedef 4513]
type     = S
movetype = A
Physics  = N
velset   = 0,0
sprpriority = 25
anim = 9741


[State 8220, Disperse]
type = ChangeState
trigger1 = Winko
trigger1 = time >= 10
value = 4514
;---------------------------------------------------------------------------
; Explosion that can harm...
[Statedef 4514]
type     = S
movetype = A
Physics  = N
velset   = 0,0
sprpriority = 25
anim = 3525

[State 8220, Sound]
type = PlaySnd
trigger1 = Time = 0
value = 5200,2
channel = 7

[State 8220, Explod]
type = Explod
trigger1 = Time = 0
postype = p1
anim = 3417
ownpal = 1
sprpriority = 20
removeongethit = 1
pos = 0,25
scale = 1.4,1.4
ontop = 1
bindtime = -1

[State 8210, Explosion]
type = Explod
trigger1 = Time = 0
anim = 3415
ownpal = 1
sprpriority = 36
postype = p1
removeongethit = 1
pos = 0,-10
scale = 1.5,1.5
ontop = 1

[State 8210, Explosion]
type = Explod
trigger1 = Time = 0
anim = 3415
ownpal = 1
sprpriority = 36
postype = p1
removeongethit = 1
pos = 0,-110
scale = 1.5,1.5
ontop = 1

[State 8210, Explosion]
type = Explod
trigger1 = Time = 0
anim = 3415
ownpal = 1
sprpriority = 36
postype = p1
removeongethit = 1
pos = 0,-210
scale = 1.5,1.5
ontop = 1

[State 8220, Sound]
type = PlaySnd
trigger1 = Time = 0
value = 5200,2
channel = 7

[State 810,]
type = EnvShake
trigger1 = Time = 0
ampl = -20
freq = 255
time = 60

[State 3000, 5]
type = Projectile
trigger1 = Time = [0,10]
projanim = 4810
projID = 4566
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 1
offset = 0, 0
priority = 7, Hit
projpriority = 999
projsprpriority = -1
velocity = 0, 0
attr = S, HA
animtype = Hard
damage = 9999999,9999999
getpower = 0
priority = 6
guardflag = N
pausetime = 0,5
sparkxy = -10,-50
sparkno = -1
hitsound = -1
guardsound = -1
ground.type = Low
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = 0, -30
air.velocity = 0, -30
air.fall = 1
fall = 1
fall.recover = 0
fall.animtype = Hard
fall.damage = (9*enemy,const(data.life))
p2stateno = 4288
p2facing = 1
getpower = 0,0
givepower = -10000,-10000

[State 8210, TargetState]
type = targetstate
trigger1 = Time = [0,10]
value = 4288

[State 8210, LifeAddDeduct]
type = TargetLifeAdd
trigger1 = Time = [0,10]
value = Ceil(-100*enemy,const(data.life))
absolute = 1

[State 10000]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermove = 1
pausemovetime = 99999
supermovetime = 99999

[State 8220, Immune]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AP, AT

[State 8220, Disperse]
type = DestroySelf
trigger1 = AnimTime = 0


;---------------------------------------------------------------------------
;Hit By Nuke 1
[Statedef 4288]
type = A
movetype = H
physics = N
ctrl = 0

[State 4288, 01]
type = PalFX
trigger1 = time = 0
time = -1
add = 0,0,0
add = 80,-70,-200
sinadd = 0,30,0,10
color = 1
ignorehitpause = 1

[State 4288, 02]
type = ChangeAnim
trigger1 = 1
value = 5010

[State 4288, 03]
type = VelSet
trigger1 = time = 0
x = -10
y = 0

[State 4288, 04]
type = PosSet
trigger1 = time = 0
y = 9999

[State 4288, 05]
type = LifeSet
trigger1 = 1
value = 0

[State 31600, 06]
type = PlaySnd
trigger1 = time = 0
trigger1 = life = 0
value = f19,1
channel = 8
volume = 255

[State 4288, 07]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 4288, 08]
type = PlayerPush
trigger1 = 1
value = 0

[State 4288, 09]
type = ChangeState
triggerall = Alive
trigger1 = BackEdgeBodyDist <= 0
trigger2 = FrontEdgeBodyDist <= 0
value = 4289

[State 4288, 10]
type = ChangeState
trigger1 = !Alive
value = 5150
;---------------------------------------------------------------------------
; Hit By Nuke 2
[Statedef 4289]
type = A
movetype = H
physics = N
ctrl = 0

[State 4289, brilho]
type = PalFX
trigger1 = time = 0
time = -1
add = 0,0,0
add = 80,-70,-200
sinadd = 0,30,0,10
color = 1
ignorehitpause = 1

[State 4289, 0]
type = ChangeAnim
trigger1 = time = 0
value = 5050

[State 4289, 1]
type = VelSet
trigger1 = time = 0
x = 3
y = 0

[State 4289, 2]
type = VelAdd
trigger1 = Vel X > 0
x = -0.3

[State 4289, 3]
type = VelSet
trigger1 = Vel X < 0
x = 0

[State 4289, 7]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 4289, 8]
type = PlayerPush
trigger1 = 1
value = 0

[State 4289, 9]
type = SelfState
trigger1 = Alive
trigger1 = Pos Y = 0
value = 5100

[State 4289, 10]
type = ChangeState
trigger1 = !Alive
value = 5150

;;=====================================================================
;; New Mode
;;=====================================================================
; New Move
[Statedef 1150]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 100
velset = 0,0
anim = 1150
ctrl = 0
sprpriority = 2

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,6
channel = 0

[State 1100, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(13) < 0
value = 5,0

[State 1100, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State 1100, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Medium
damage = 50, 4
priority  = 5
guardflag = MA
pausetime = 4,8
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = 0,-48
hitsound = s5,2
guardsound = s6,1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 1061, 2]
type = ChangeState
trigger1 = movehit
trigger1 = Command = "a" || Command = "b"
value = 1151

[State 1100, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Flying Dragon Kick
[Statedef 1151]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 0,0
poweradd = 150
anim = 40
ctrl = 0
sprpriority = 2

[State 1600, VelSet]
type = VelSet
trigger1 = Anim = 40
trigger1 = AnimTime = 0
x = 4
y = -4

[State 1600, Anim]
type = ChangeAnim
trigger1 = Anim = 40
trigger1 = AnimTime = 0
value = 1151

[State 1600, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1151
trigger1 = AnimElem = 3
value = 4, 0
channel = 0

[State 1600, PlaySnd]
type = PlaySnd
trigger1 = Anim = 1151
trigger1 = AnimElem = 3
ignorehitpause = 1
value = 0, 3

[State 1600, Anim]
type = ChangeAnim
trigger1 = Anim = 1151
trigger1 = AnimElem = 3, >= 0
trigger1 = Vel Y < 0
value = 1151
elem = 3

[State 1600, Hit]
type = HitDef
trigger1 = Anim = 1151
trigger1 = AnimElem = 2
attr = A, SA
damage = 90,10
animtype  = Medium
guardflag = MA
hitflag = MAF
pausetime = 10,10
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = 0,-70
hitsound = s5,3
guardsound = S6,0
forcestand = 1
ground.type = High
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = -8,-2
airguard.velocity = -4,-1
air.type = Low
fall.animtype  = Heavy
air.velocity = -8,-2
air.juggle = 1
air.fall = 1
fall = 1

[State 1600, VelAdd]
type = VelAdd
trigger1 = Anim = 1151
trigger1 = AnimElem = 3, >= 0
y = .4

[State 1600, VelMul]
type = VelMul
trigger1 = Anim = 1151
trigger1 = AnimElem = 4, >= 0
x = .9

[State 1600, 7]
type = ChangeState
trigger1 = Time > 10
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 50
ctrl = 1

;===========================================================================
;Another New Move
[Statedef 1340]
type     = S
movetype = A
physics  = N
juggle   = 2
poweradd = 0
ctrl     = 0
anim     = 1375
velset   = 0,0

[State 1012, アニメ変更]
type = ChangeAnim
trigger1 = Time > 24
value = 42
elem = 7
Persistent = 0

[State 1012, 状態変更]
type = StateTypeSet
trigger1 = (Anim = 42)
MoveType = I
IgnoreHitPause = 1
Persistent = 1

[State 1012, 状態変更]
type = StateTypeSet
trigger1 = (Time > 4)
StateType = A
IgnoreHitPause = 1
Persistent = 1

[State 1012, 埃]
type = MakeDust
trigger1 = Time = 4
pos = 10,0
spacing = 1

;***********************************
[State 1012, 軸位置]
type = PosSet
trigger1 = Time = [0,6]
y = 0

[State 1012, 軸位置移動]
type = PosAdd
trigger1 = Time = 4
x = 12

[State 1012, 移動速度]
type = VelSet
trigger1 = Time = [0,6]
y = 0

[State 1012, 移動速度]
type = VelSet
trigger1 = Time = 7
x = 2
y = -7

[State 1012, 速度加算]
type = VelAdd
trigger1 = (Time > 7)
y = 0.4

[State 1012, 速度乗算]
type = VelMul
trigger1 = (Anim = 42)
x = 0.95

;***********************************
[State 1012, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 5
value = 0,2
channel = 1

;***********************************
[State 1012, ヒット定義]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype = Up
damage = 80,5
getpower = 30,0
guardflag = MA
priority = 5
pausetime = 15,15
sparkxy = -10,-70
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s5,3
guardsound = 0,6
ground.type = High
ground.slidetime = 16
ground.hittime   = 19
ground.velocity  = -1.8,-8
guard.velocity   = -7
air.velocity     = -1.8,-8
airguard.velocity= -6,-1.5
yaccel           = 0.6
fall             = 1
fall.recover     = 0
envshake.time    = 12
envshake.ampl    = 6
envshake.freq    = 100

;***********************************
[State 1012, ステート変更]
type = ChangeState
trigger1 = (Time > 8) && (Pos Y >= 0)
value = 1349
;===========================================================================
;Another New Move
[Statedef 1341]
type     = S
movetype = A
physics  = N
juggle   = 2
poweradd = 0
ctrl     = 0
anim     = 1375
velset   = 0,0

[State 1012, アニメ変更]
type = ChangeAnim
trigger1 = Time > 24
value = 42
elem = 7
Persistent = 0

[State 1012, 状態変更]
type = StateTypeSet
trigger1 = (Anim = 42)
MoveType = I
IgnoreHitPause = 1
Persistent = 1

[State 1012, 状態変更]
type = StateTypeSet
trigger1 = (Time > 4)
StateType = A
IgnoreHitPause = 1
Persistent = 1

[State 1012, 埃]
type = MakeDust
trigger1 = Time = 4
pos = 10,0
spacing = 1

[State 1012, 軸位置]
type = PosSet
trigger1 = Time = [0,6]
y = 0

[State 1012, 軸位置移動]
type = PosAdd
trigger1 = Time = 4
x = 12

[State 1012, 移動速度]
type = VelSet
trigger1 = Time = [0,6]
y = 0

[State 1012, 移動速度]
type = VelSet
trigger1 = Time = 7
x = 2
y = -8.5

[State 1012, 速度加算]
type = VelAdd
trigger1 = (Time > 7)
y = 0.4

[State 1012, 速度乗算]
type = VelMul
trigger1 = (Anim = 42)
x = 0.95

[State 1012, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 5
value = 0,2
channel = 1

[State 1012, ヒット定義]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype = Up
damage = 100,5
getpower = 30,0
guardflag = MA
priority = 5
pausetime = 15,15
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
guard.sparkno = 42
hitsound = s5,3
guardsound = 0,6
ground.type = High
ground.slidetime = 16
ground.hittime = 19
ground.velocity = -1.8,-8
guard.velocity = -7
air.velocity = -1.8,-8
airguard.velocity= -6,-1.5
yaccel = 0.6
fall = 1
fall.recover = 0
envshake.time = 12
envshake.ampl = 6
envshake.freq = 100

[State 1012, ステート変更]
type = ChangeState
trigger1 = (Time > 8) && (Pos Y >= 0)
value = 1349

;===========================================================================
;Another New Move
[Statedef 1342]
type     = S
movetype = A
physics  = N
juggle   = 2
poweradd = -500
ctrl     = 0
anim     = 1375
velset   = 0,0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time = 0
time = 15
add = 0,0,0
mul = 256,256,256
sinadd = 512,512,512,3
invertall = 0
color = 256

[State 0, ]
type = AfterImage
trigger1 = Time = 0
time = 20
length = 30
palcolor = 128
palbright = 30,30,30
palcontrast = 120,120,220
palpostbright = 5,5,5
paladd = 10,10,10
palmul = .65,.65,.65
timegap = 1
framegap = 4
trans = add

[State 1012, アニメ変更]
type = ChangeAnim
trigger1 = Time > 24
value = 42
elem = 7
Persistent = 0

[State 1012, 状態変更]
type = StateTypeSet
trigger1 = (Anim = 42)
MoveType = I
IgnoreHitPause = 1
Persistent = 1

[State 1012, 状態変更]
type = StateTypeSet
trigger1 = (Time > 4)
StateType = A
IgnoreHitPause = 1
Persistent = 1

[State 1012, 埃]
type = MakeDust
trigger1 = Time = 4
pos = 10,0
spacing = 1

[State 1012, 軸位置]
type = PosSet
trigger1 = Time = [0,6]
y = 0

[State 1012, 軸位置移動]
type = PosAdd
trigger1 = Time = 4
x = 12

[State 1012, 移動速度]
type = VelSet
trigger1 = Time = [0,6]
y = 0

[State 1012, 移動速度]
type = VelSet
trigger1 = Time = 7
x = 3
y = -10

[State 1012, 速度加算]
type = VelAdd
trigger1 = (Time > 7)
y = 0.4

[State 1012, 速度乗算]
type = VelMul
trigger1 = (Anim = 42)
x = 0.95

[State 1012, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 5
value = 0,2
channel = 1

[State 1012, ヒット定義]
type = HitDef
trigger1 = Time = [7,12]
attr = A, SA
animtype = Up
damage = 20,5
getpower = 30,0
guardflag = MA
priority = 5
pausetime = 8,8
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
guard.sparkno = 42
hitsound = s5,3
guardsound = 0,6
ground.type = High
ground.slidetime = 16
ground.hittime = 19
ground.velocity = -1.8,-8
guard.velocity = -7
air.velocity = -1.8,-8
airguard.velocity= -6,-1.5
yaccel = 0.6
fall = 1
fall.recover = 0
envshake.time = 12
envshake.ampl = 6
envshake.freq = 100

[State 1012, ステート変更]
type = ChangeState
trigger1 = (Time > 8) && (Pos Y >= 0)
value = 1349


;飛び蹴りと追加入力攻撃の着地
[Statedef 1349]
type     = S
movetype = I
physics  = S
ctrl     = 0
anim     = 1376

[State 1004, 軸位置]
type = PosSet
trigger1 = 1
y = 0

[State 1004, 移動速度]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 1004, エフェクト]
type = null ;;;Explod
trigger1 = Time = 0
anim = 4020
postype = p1
pos = 0,0
scale = 0.5,0.5
sprpriority = -1
ownpal = 1
ID = 4020

[State 1004, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 0
value = 0,19

[State 1004, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;===========================================================================
;---------------------------------------------------------------------------
; カンフーニー・改の前転突進後の飛び上がりが、７Ｐ以降のカラーの場合は
; このステートに変わるようにしてる。他は特にこれと言って特徴無し。
;---------------------------------------------------------------------------
;穿弓腿（７Ｐカラー以降専用）
[Statedef 1012]
type     = S
movetype = A
physics  = N
juggle   = 2
poweradd = 0
ctrl     = 0
anim     = 1015
velset   = 0,0

[State 1012, アニメ変更]
type = ChangeAnim
trigger1 = Time > ceil(24+var(53)+6)
value = 42
elem = 7
Persistent = 0

[State 1012, 状態変更]
type = StateTypeSet
trigger1 = (Anim = 42)
MoveType = I
IgnoreHitPause = 1
Persistent = 1

[State 1012, 状態変更]
type = StateTypeSet
trigger1 = (Time > 4)
StateType = A
IgnoreHitPause = 1
Persistent = 1

[State 1012, 埃]
type = MakeDust
trigger1 = Time = 4
pos = 10,0
spacing = 1

;***********************************
[State 1012, 軸位置]
type = PosSet
trigger1 = Time = [0,6]
y = 0

[State 1012, 軸位置移動]
type = PosAdd
trigger1 = Time = 4
x = 12

[State 1012, 移動速度]
type = VelSet
trigger1 = Time = [0,6]
y = 0

[State 1012, 移動速度]
type = VelSet
trigger1 = Time = 7
x = 2+var(53)
y = -7-(var(53)*1.5)

[State 1012, 速度加算]
type = VelAdd
trigger1 = (Time > 7)
y = 0.4

[State 1012, 速度乗算]
type = VelMul
trigger1 = (Anim = 42)
x = 0.95

;***********************************
[State 1012, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 5
value = 0,2
channel = 1

;***********************************
[State 1012, ヒット定義]
type = HitDef
trigger1 = Time = 7
attr             = A, SA
animtype         = Up
damage           = ceil(40+(var(53)*10)),ceil(4+(var(53)))
getpower         = ifelse(var(35)=1,0,30),ifelse(var(35)=1,0,10)
guardflag        = MA
priority         = 5
pausetime        = 12,12
sparkno          = s7020+(random%4)
guard.sparkno    = s7101
sparkxy          = -10,-70
hitsound         = s0,5
guardsound       = s0,10
ground.type      = High
ground.slidetime = 16
ground.hittime   = 19
ground.velocity  = ifelse(var(35)=1,-1.8,-4.5),-8
guard.velocity   = -7
air.velocity     = ifelse(var(35)=1,-1.8,-4.5),-8
airguard.velocity= -6,-1.5
yaccel           = 0.6
fall             = 1
fall.recover     = 0
envshake.time    = 12
envshake.ampl    = 6
envshake.freq    = 100

;***********************************
[State 1012, ステート変更]
type = ChangeState
trigger1 = (Time > 8) && (Pos Y >= 0)
value = 1004
;===========================================================================
[Statedef 1530]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1530
ctrl = 0
sprpriority = 2

[State 700, 2]
type = playsnd
trigger1 = animelemtime(5) =0
value = 0,3

[State 721, 1]
type = Velset
trigger1 = animelemtime(5)>=0
x = 12
y = 7

[State 1071, 3]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Hard
getpower  = 0
damage = 70,5
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound = s5,3
guardsound = s6,1
sparkno = s7020+(random%4)
guard.sparkno = s7101
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5,-3
guard.velocity = -7
air.velocity = -5,-2
fall = 1
fall.recovertime = 30

[State 721, 2]
type = ChangeState
trigger1 = Pos Y >= -10 && Vel Y > 0
value = 1052

;#############################################################
;
[Statedef 1532]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= 130
velset = 0,0
anim = 1530
ctrl = 0
sprpriority = 2

[State 700, 2]
type = playsnd
trigger1 = animelemtime(5) =0
value = 0,3

[State 721, 1]
type = Velset
trigger1 = animelemtime(5)>=0
x = 12
y = 7

[State 1071, 3]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Hard
getpower  = 0
damage = 70,5
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound = s5,3
guardsound = s6,1
sparkno = s7020+(random%4)
guard.sparkno = s7101
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5,-3
guard.velocity = -7
air.velocity = -5,-2
fall = 1
fall.recovertime = 30

[State 721, 2]
type = ChangeState
trigger1 = Pos Y >= -10 && Vel Y > 0
value = 1052

;============================================================================
[Statedef 1535]
type    = A
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 1530
ctrl = 0
sprpriority = 2

[State 700, 2]
type = playsnd
trigger1 = animelemtime(5) =0
value = 0,3

[State 1075, Afterimage]
type = poweradd
trigger1 = prevstateno != 1075
trigger1 = time = 0
value = -500

[State 1075, Afterimage]
type = AfterImageTime
trigger1 = 1
time = 2

[State 1075, Blink Yellow]
type = PalFX
trigger1 = time =0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 721, 1]
type = Velset
trigger1 = animelemtime(5)>=0
x = 12
y = 7

[State 1071, 3]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype  = Hard
getpower  = 0
damage = 50,5
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5,-2
guard.velocity = -7
air.velocity = -5,-1
fall = 1
fall.recovertime = 30

[State 1071, 3]
type = HitDef
trigger1 = Time%5 = 0
trigger1 = movecontact
attr = A, SA
animtype  = Hard
getpower  = 0
damage = 50,5
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5,-2
guard.velocity = -7
air.velocity = -5,-1
fall = 1
fall.recovertime = 40

[State 721, 2]
type = ChangeState
trigger1 = Pos Y >= -10 && Vel Y > 0
value = 1052

;=======================================================================
[Statedef 1540]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 1,-9
anim = 1531
ctrl = 0
sprpriority = 2

[State 700, 2]
type = playsnd
trigger1 = animelemtime(5) =0
value = 0,3

[State 721, 1]
type = Veladd
trigger1 = animelemtime(3)<0
y = .45

[State 721, 1]
type = Velset
trigger1 = animelemtime(3)>=0 && animelemtime(5)<0
x = 0
y = 0

[State 721, 1]
type = Velset
trigger1 = animelemtime(5)>=0
x = 12
y = 7

[State 1071, 3]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Hard
getpower  = 0
damage = 50,5
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5,-2
guard.velocity = -7
air.velocity = -5,-1.5
fall = 1
fall.recovertime = 40

[State 721, 2]
type = ChangeState
trigger1 = Pos Y >= -10 && Vel Y > 0
value = 1052

;==================================================================
[Statedef 1542]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= 130
velset = 1,-10
anim = 1531
ctrl = 0
sprpriority = 2

[State 700, 2]
type = playsnd
trigger1 = animelemtime(5) =0
value = 0,3

[State 721, 1]
type = Veladd
trigger1 = animelemtime(3)<0
y = .45

[State 721, 1]
type = Velset
trigger1 = animelemtime(3)>=0 && animelemtime(5)<0
x = 0
y = 0

[State 721, 1]
type = Velset
trigger1 = animelemtime(5)>=0
x = 12
y = 7

[State 1071, 3]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype = Hard
getpower = 0
damage = 70,5
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5,-2.5
guard.velocity = -7
air.velocity = -5,-2
fall = 1
fall.recovertime = 40

[State 721, 2]
type = ChangeState
trigger1 = Pos Y >= -10 && Vel Y > 0
value = 1052
;====================================================================
[Statedef 1545]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= -500
velset = 1,-10
anim = 1531
ctrl = 0
sprpriority = 2

[State 700, 2]
type = playsnd
trigger1 = animelemtime(5) =0
value = 0,3

[State 1075, Afterimage]
type = AfterImageTime
trigger1 = 1
time = 2

[State 1075, Blink Yellow]
type = PalFX
trigger1 = time =0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 721, 1]
type = Veladd
trigger1 = animelemtime(3)<0
y = .45

[State 721, 1]
type = Velset
trigger1 = animelemtime(3)>=0 && animelemtime(5)<0
x = 0
y = 0

[State 721, 1]
type = Velset
trigger1 = animelemtime(5)>=0
x = 12
y = 7

[State 1071, 3]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype  = Hard
getpower  = 0
damage = 40,5
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5,-1
guard.velocity = -7
air.velocity = -5,-1
fall = 1
fall.recovertime = 40

[State 1071, 3]
type = HitDef
trigger1 = Time%5 = 0
trigger1 = movecontact
attr = A, SA
animtype  = Medium
getpower  = 0
damage    = 38 + ((PalNo = 12)*var(12)), 2 + ((PalNo = 12)*var(12))
priority  = 5
guardflag = MA
pausetime = 12,12
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,3
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5,-2
guard.velocity = -7
air.velocity = -5,-2.5
fall = 1
fall.recovertime = 40

[State 721, 2]
type = ChangeState
trigger1 = Pos Y >= -10 && Vel Y > 0
value = 1052

;---------------------------------------------------------------------------
; Grab n' Smash
[Statedef 1655]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1650
sprpriority = 2

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents KFM from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, ST
hitflag = M
priority = 3, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
hitsound = s1,1
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 1665       ;On success, KFM changes to state 810
p2stateno = 1675       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;
[Statedef 1665]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 1660
ctrl = 0
sprpriority = 2

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

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

[State 50, 4];←成功したときの残像
type = AfterImage
trigger1 = animelemtime(3) = 0
time = 13
trans = add1
timegap = 2
framegap = 2
length = 8
palbright = 20,20,20
palcontrast = 50,50,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 1071, 3]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype = Back
getpower = 80
sparkno = s7020+(random%4)
guard.sparkno = s7101
damage = 120
priority = 5
guardflag =
pausetime = 12,12
sparkxy = -10,-70
hitsound = s5,4
guardsound = s6,1
ground.type = High
ground.velocity = -6,-1
envshake.time = 25           ;Parameters for shaking the screen on hit
envshake.ampl = 7
envshake.freq = 176
fall = 1
fall.recovertime = 60

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

;;=====================================================================
[Statedef 1675]
movetype = H
ctrl = 0
velset = 0,0

[State 650, HitPause]
type = PosFreeze
trigger1 = 1
ignorehitpause = 1

[State 650, HitPause]
type = ChangeAnim2
trigger1 = 1
value = 5010
elem = 1

[State 1033, End]
type = SelfState
trigger1 = vel x > 0
value = 5030

[State 1033, End]
type = SelfState
trigger1 = time >= 60
value = 5030


;---------------------------------------------------------------------------
; Rush and Knee
[Statedef 1667]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1450
sprpriority = 2

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 0, ]
type = AfterImage
trigger1 = Time = 0
time = 30
length = 60
palcolor = 240
paladd = 10,10,10
palmul = .8,.8,.8
timegap = 1
framegap = 4
trans = add
ignorehitpause = 1

[State 1041, Hitdef]
type = Hitdef
trigger1 = Time = 0
attr = S, ST
hitflag = M
guardflag = L 
animtype = Heavy
air.animtype = Back
priority = 1
damage = 0,0
pausetime = 1, 1
sparkno = -1
guard.sparkno = s7101
sparkxy = 10, -70
hitsound = -1
guardsound = S6,2
ground.type = high
ground.slidetime = 9
ground.hittime = 10
guard.ctrltime = 10
ground.velocity = -1.5, -10
guard.velocity = 0
air.velocity = -5, -5
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 1668       ;On success, KFM changes to state 810
p2stateno = 1675       ;If hit, p2 changes to state 820 in KFM's cns
getpower = 0
kill = 0

[State 800, 2]
type = ChangeState
trigger1 = time >= 20
trigger2 = moveguarded
value = ifelse(moveguarded,1457,1455)
;---------------------------------------------------------------------------
; Rush and Knee p1
[Statedef 1668]
type    = S
movetype= A
physics = S
anim = 1458
poweradd = 50
velset = 0,0
sprpriority = 0

[State 810, Grab Sound]
type = PlaySnd
trigger1 = Time = 0
value = 1, 1

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

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

[State 50, 4];←成功したときの残像
type = AfterImage
trigger1 = animelemtime(3) = 0
time = 13
trans = add1
timegap = 2
framegap = 2
length = 8
palbright = 20,20,20
palcontrast = 50,50,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 1071, 3]
type = HitDef
trigger1 = time = 0
attr = A, SA
animtype = Back
getpower = 80
damage = 110
priority = 6
guardflag =
pausetime = 20,20
sparkno = s7020+(random%4)
guard.sparkno = s7101
sparkxy = -10,-70
hitsound = s5,4
guardsound = s6,1
ground.type = High
ground.velocity = -6,-1
envshake.time = 25           ;Parameters for shaking the screen on hit
envshake.ampl = 7
envshake.freq = 176
fall = 1
fall.recovertime = 60

[State 810, Hurt 11]
type = null ;;;TargetLifeAdd
trigger1 = time = 100
value = Ceil(-0.15*enemy,Const(data.life))
absolute = 1

[State 810, Throw 11]
type = null ;;;TargetState
trigger1 = Time = 100
value = 1471

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 1669
;------------------
; Light Kung Fu Knee - jump
[Statedef 1669]
type    = A
movetype= A
physics = N
velset = 2,-4
anim = 1051
hitdefpersist = 1 ;Keep the HitDef from previous state active

[State with voice]
type = PlaySnd
trigger1 = Time = 0
trigger1 = random < 500
value = S2,2
channel = 0

[State 1051, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .4

[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
;Hadouken
[Statedef 2000]
type     = S
movetype = A
physics  = N
poweradd = 60
ctrl     = 0
anim     = 2000

[State 1000, 物理的なキャラの幅]
type = Width
triggerall = (StateType != A)
trigger1 = (AnimElemTime(5) > 0) && (AnimElemTime(12) < 0)
player = 30,0
edge = 45,0

[State 1000, 埃]
type = MakeDust
triggerall = (StateType != A)
trigger1 = Time = 10
pos = 40,0
spacing = 1

;***********************************
[State 1000, 軸位置]
type = PosSet
trigger1 = (StateType != A)
y = 0

[State 1000, 移動速度]
type = VelSet
trigger1 = (StateType != A)
x = 0
y = 0

;***********************************
[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 11
value = 3700,1
volume = 255
freqmul = 1.65
channel = 1


[State 1000, Proj]
type = Projectile
trigger1 = Time = 11
attr = S, SP
damage = 70,7
getpower = 30,30
animtype = Back
pausetime = 0,12
offset = 60,-65
velocity = 4,0
accel = 0,0
projID = 1500       
projanim = 2010           
projhitanim = 2015          
projremanim = 2015 
projscale = 0.5,0.5 
projshadow = 0,0,0  
projhits = 1 
projmisstime = 1  
projpriority = 3 
projremovetime = 180
projsprpriority = 4
guardflag = MA
priority = 5
sparkno = s7010+(random%4)
sparkxy = 30,0
guard.sparkno = s7101
hitsound = s5,3
guardsound = s6,2
ground.type = High
ground.slidetime = 16
ground.hittime = 19
ground.velocity = -6,0
air.velocity = -4.2,-4
air.juggle = 4


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

;---------------------------------------------------------------------------
;Hadouken
[Statedef 2020]
type     = S
movetype = A
physics  = N
poweradd = -500
ctrl     = 0
anim     = 2000

[State 1000, 物理的なキャラの幅]
type = Width
triggerall = (StateType != A)
trigger1 = (AnimElemTime(5) > 0) && (AnimElemTime(12) < 0)
player = 30,0
edge = 45,0

[State 1000, 埃]
type = MakeDust
triggerall = (StateType != A)
trigger1 = Time = 10
pos = 40,0
spacing = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time = 0
time = 20
add = 0,0,0
mul = 256,256,256
sinadd = 512,512,512,3
invertall = 0
color = 256

[State 0, ]
type = AfterImage
trigger1 = Time = 0
time = 20
length = 30
palcolor = 128
palbright = 30,30,30
palcontrast = 120,120,220
palpostbright = 5,5,5
paladd = 10,10,10
palmul = .65,.65,.65
timegap = 1
framegap = 4
trans = add

;***********************************
[State 1000, 軸位置]
type = PosSet
trigger1 = (StateType != A)
y = 0

[State 1000, 移動速度]
type = VelSet
trigger1 = (StateType != A)
x = 0
y = 0

;***********************************
[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 11
value = 3700,1
volume = 255
freqmul = 1.5
channel = 1

;***********************************
[State 1000, Proj]
type = Projectile
trigger1 = Time = 11
attr = S, SP
damage = 110,11
getpower = 0,0
animtype = Back
pausetime = 0,12
offset = 60,-65
velocity = 5,0
accel = 0.5,0
projID = 1500       
projanim = 2010           
projhitanim = 2015          
projremanim = 2015 
projscale = 0.6,0.6 
projshadow = 0,0,0  
projhits = 1 
projmisstime = 1  
projpriority = 15
projremovetime = 180 
projsprpriority = 7
guardflag = MA
priority = 5
sparkno = s7010+(random%4)
sparkxy = 30,0
guard.sparkno = s7101
hitsound = s5,3
guardsound = s6,2
ground.type = high
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7,-3
guard.velocity = -7
air.velocity = -7,-4
airguard.velocity = -4, -2
fall = 1
afterimage.time = 180
afterimage.length = 5
afterimage.palcolor = 1
afterimage.palinvertall = 0
afterimage.palbright = 250,125,0
afterimage.palcontrast = 125,25,0
afterimage.palpostbright =250,100,0
afterimage.paladd = 250,120,0
p2stateno = 1025

[State 1000, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; New Counter (
[Statedef 2100]
type     = S
movetype = I
physics  = S
poweradd = 0
ctrl     = 0
anim     = 2100
velset   = 0,0

[State 3011, 軸位置]
type = PosSet
trigger1 = 1
y = 0

[State 3011, 受け止め定義]
type = ReversalDef
trigger1 = Time = 6
trigger1 = p2name != "7th Heaven Ciel"
trigger1 = p2name != "Full Armor Ciel"
trigger1 = p4name != "7th Heaven Ciel"
trigger1 = p4name != "Full Armor Ciel"
reversal.attr = SCA, NA, SA, HA
pausetime = 0,0
numhits = 0
sparkno = s7020+(random%4)
sparkxy = 25,0
hitsound = -1   ;s0,15
P1Facing = 1
P1StateNo = 2101
P2Facing = 1
P2StateNo = 2107


[State 3011, 受け止め定義]
type = ReversalDef
trigger1 = p2name = "7th Heaven Ciel"
trigger2 = p2name = "Full Armor Ciel"
trigger3 = p4name = "7th Heaven Ciel"
trigger4 = p4name = "Full Armor Ciel"
reversal.attr = SCA, NA, SA, HA, NP, SP, HP
pausetime = 0,0
numhits = 0
sparkno = s7020+(random%4)
sparkxy = 25,0
hitsound = -1   ;s0,15
P1Facing = 1
p1stateno = 1351
P2Facing = 1
P2StateNo = 9353

[State 3011, ステート変更]
type = ChangeState
trigger1 = (Time > 45)
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;当て身投げ成功（掴んで水平投げ）
[Statedef 2101]
type     = S
movetype = A
physics  = N
poweradd = 0
ctrl     = 0
velset   = 0,0

[State 3012, アニメ変更]
type = ChangeAnim
trigger1 = Time = 0
value = 2105

[State 3012, アニメ変更]
type = ChangeState
trigger1 = !NumTarget
trigger2 = target,movetype != H
trigger3 = p2movetype != H
trigger4 = (Target,IsHelper)
value = 2110
Persistent = 0

[State 3012, アニメ変更]
type = ChangeAnim
triggerall = (NumTarget)
trigger1 = Time = 20
value = ifelse((Target,StateType=A),2102,2101)
Persistent = 0

[State 3012, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 3012, 残像]
type = AfterImage
trigger1 = Time = 0
Time = 104
PalBright   = 90,90,150
PalContrast = 180,180,256
Trans = Add1

[State 3012, 残像表示時間];掴んだ相手が「ヘルパー」だった時
type = AfterImageTime
triggerall = (NumTarget)     ;相手が自分のターゲット（制御を奪っている状態）の時
trigger1 = (Target,IsHelper) ;ターゲットが「ヘルパー」だった時
Time = 0

[State 3012, 軸位置]
type = PosSet
trigger1 = 1
y = 0

;***********************************
[State 3012, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 26
value = 1,1

;[State 3012, 音を鳴らす]
;type = PlaySnd
;trigger1 = Time = 50
;value = 0,2

;*********************************** 相手が地上
[State 3012, 掴んだ相手の位置]
type = TargetBind
triggerall = (Anim = 2014)
trigger1 = Time = [26,34]
pos = 52,0

[State 3012, 掴んだ相手の位置]
type = TargetBind
triggerall = (Anim = 2014)
trigger1 = Time = [35,40]
pos = 21,-8

;+++++++++++++++++++++++++++++++++++ 相手が空中
[State 3012, 掴んだ相手の位置]
type = TargetBind
triggerall = (Anim = 2015)
trigger1 = Time = [26,31]
pos = 28,-60

[State 3012, 掴んだ相手の位置]
type = TargetBind
triggerall = (Anim = 2015)
trigger1 = Time = [32,34]
pos = 24,-50

[State 3012, 掴んだ相手の位置]
type = TargetBind
triggerall = (Anim = 2015)
trigger1 = Time = [35,40]
pos = 18,-24

;+++++++++++++++++++++++++++++++++++ 水平チョップで投げる部分
[State 3012, 掴んだ相手の位置]
type = TargetBind
trigger1 = Time = [41,46]
pos = 0,-16

[State 3012, 掴んだ相手の位置]
type = TargetBind
trigger1 = Time = [47,49]
pos = 1,-13

[State 3012, 掴んだ相手の位置]
type = TargetBind
trigger1 = Time = [50,53]
pos = 45,-10

;***********************************
[State 3012, 掴んだ相手のライフ増減]
type = TargetLifeAdd
triggerall = (NumTarget)
trigger1 = (Target,BackEdgeDist <= 5)
value = -120
Persistent = 0

[State 3012, 掴んだ相手のステート変更]
type = TargetState
trigger1 = Time = 53
value = 2108
;***********************************

[State 3012, ステート変更]
type = ChangeState
trigger1 = Time > 103
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Slap
[Statedef 2110]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1352                       ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

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

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S5,6

[State 3000, 5]
type = Projectile
trigger1 = Time = 0
projanim = 1353
projID = 1359
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 5
offset = 0, 0
priority = 7, Hit
projpriority = 999999
projsprpriority = -1
velocity = 0, 0
attr = S, SA
animtype = Hard
damage = 50,50
getpower = 0
priority = 6
guardflag = N
pausetime = 0,5
sparkxy = -10,-50
sparkno = s7020+(random%4)
guard.sparkno = s7101
hitsound = s0,9
guardsound = S0,9
ground.type = Low
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = 0, -30
air.velocity = 0, -30
air.fall = 1
fall = 1
fall.recover = 0
fall.animtype = Hard
fall.damage = Ceil(IfElse(random<500,(0.05*enemy,const(data.life)),(0.04*enemy,const(data.life))))
p2stateno = 2108
p2facing = 1
getpower = 50,0

[State 180,]
type = VarRandom
trigger1 = 1
v = 35
range = 0,4

[State with voice]
type = PlaySnd
triggerall = var(35) = 1
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255
freqmul = 0.5

[State with voice]
type = PlaySnd
triggerall = var(35) = 1
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255
freqmul = 0.75

[State with voice]
type = PlaySnd
triggerall = var(35) = 2
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255

[State with voice]
type = PlaySnd
triggerall = var(35) = 3
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255
freqmul = 1.25

[State with voice]
type = PlaySnd
triggerall = var(35) = 4
trigger1 = projhit1359 = 1
trigger2 = target,stateno = 1357
trigger2 = Time = 2
value = f12,0+(Random%36)
channel = 4
volume = 255
freqmul = 1.50

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;===========================================================================
;---------------------------------------------------------------------------
; ここではReversalDefで誤ってヘルパーを掴んでしまった場合の
;「ヘルパー分身バグ」を防ぐ処理もしている。
; あくまでも応急処置なので、他に良い方法があるかもしれない。
;---------------------------------------------------------------------------
;カンフーアベンジャー相手側（掴まれる）
[Statedef 2107]
type     = U
movetype = H
physics  = N
ctrl     = 0
velset   = 0,0

[State 15007, Destory Helpers]
type = DestroySelf
trigger1 = IsHelper
trigger2 = IsHelper = 1
IgnoreHitPause = 1

[State 15007, アニメ変更]
type = ChangeAnim
trigger1 = Time = [0,25]
value = floor(Anim)         ;相手のその時のアクションナンバーで固定
elem = floor(AnimElemNo(0)) ;相手のその時のコマでアニメを固定
IgnoreHitPause = 1

[State 15007, 相手のアニメ変更]
type = ChangeAnim2
trigger1 = Time = 26
value = 2106

[State 15007, スクロール]
type = ScreenBound
trigger1 = 1
value = 1
MoveCamera = 0,0

[State 15007, 相手ステートに戻す];停止バグ対策
type = SelfState
triggerall = !(IsHelper)
trigger1 = (!GetHitVar(IsBound)) && (Time > 55)
trigger2 = (Time > 70)
value = 5050

[State 15007, 相手ステートに戻す];ヘルパー分身バグ対策
type = SelfState
trigger1 = (IsHelper)      ;制御下に置いたこのステートのプレイヤーが「ヘルパー」だった時
value = floor(PrevStateNo) ;相手ヘルパーの直前のステートに戻す
IgnoreHitPause = 1
;---------------------------------------------------------------------------
[Statedef 2108]
type     = A
movetype = H
physics  = N
ctrl     = 0

[State 15008, 相手アニメ]
type = ChangeAnim2
trigger1 = Time = 0
value = 2107

[State 15008, スクロール]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 15008, 押し判定]
type = PlayerPush
trigger1 = 1
value = 0

[State 15008, 速度]
type = VelSet
trigger1 = Time = 0
x = -15

[State 15008, ステート変更]
type = ChangeState
trigger1 = (BackEdgeDist <= 5)
value = 2109

;---------------------------------------------------------------------------
[Statedef 2109]
type     = A
movetype = H
physics  = N
ctrl     = 0

[State 15009, HitAnim]
type = ChangeAnim2
trigger1 = Time = 0
value = 2108

[State 15009, HitAnim]
type = ChangeAnim2
trigger1 = Time = 10
value = 2109

[State 15009, Unhittable]
type = NotHitBy
trigger1 = 1
value = ,NA,SA,NP,SP,AT

[State 15009, Scroll]
type = ScreenBound
trigger1 = Time = [0,10]
value = 1
movecamera = 0,1

[State 15009, ENV]
type = EnvShake
trigger1 = Time = 0
time  = 15
ampl  = 6
freq  = 100
phase = 100

[State 15009, Velset]
type = VelSet
trigger1 = Time = [0,10]
x = 0
y = 0

[State 15009, Velset]
type = VelSet
trigger1 = Time = 11
x = 1.5
y = -5

[State 15009, Veladd]
type = VelAdd
trigger1 = (Time > 11)
y = 0.35

[State 15009, effect]
type = Explod
trigger1 = Time = 0
anim = f72
scale = 1,1
postype = p1
pos = -20,-58
sprpriority = 4
supermove = 1
ownpal = 1
ID = 72

[State 15009, add]
type = PlaySnd
trigger1 = Time = 0
value = f7,2

[State 15009, finish]
type = SelfState
trigger1 = (Time > 14) && (Pos Y >= 0)
value = 5100
;======================================================================
; SRK
[Statedef 3170]
type    = A
movetype= A
physics = S
juggle  = 4
velset = 13,0
anim = 3155
ctrl = 0
sprpriority = 3

[State 3050, Super A]
type = SuperPause
trigger1 = time = 0
pos = -5, -55
anim = s7200
sound = 20, 0
poweradd = -1000

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 700, 2]
type = playsnd
trigger1 = animelemtime(2) = 0
value = 5,0

[State 700, 2]
type = playsnd
trigger1 = time = 10
value = 0,3

[State 721, 1]
type = velset
trigger1 = 1
x = 13

[State 3050, All]
type = NotHitBy
trigger1 = 1
value = SCA, NP, SP, HP, NT, ST, HT
time = 1

[State 3050, Butthis]
type = HitBy
trigger1 = 1
value = SCA, NA, SA, HA
time = 1

[State 1071, 3]
type = HitDef
trigger1 = time = 0
attr = A, HA
animtype  = Back
air.animtype = DiagUp
fall.animtype = DiagUp
getpower = 0
damage  = 170,18
priority = 5,Dodge
guardflag = MA
hitflag = MAFP
pausetime = 15,15
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = -10,-70
hitsound = s5,5
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -7,-5
guard.velocity = -7
air.velocity = -9,-3
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0


[State 721, 2]
type = ChangeState
trigger1 = time > 30
value = 1052

;#############################################################
;
[Statedef 3172]
type    = A
movetype= A
physics = S
juggle  = 4
velset = 13,0
anim = 3155
ctrl = 0
sprpriority = 3

[State 3050, Super A]
type = SuperPause
trigger1 = time = 0
pos = -5, -55
anim = s7201
sound = 20, 1
poweradd = -2000

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 700, 2]
type = playsnd
trigger1 = animelemtime(2) = 0
value = 5,0

[State 700, 2]
type = playsnd
trigger1 = time = 10
value = 0,3

[State 3050, All]
type = NotHitBy
trigger1 = 1
value = SCA, NP, SP, HP, NT, ST, HT
time = 1

[State 3050, Butthis]
type = HitBy
trigger1 = 1
value = SCA, NA, SA, HA
time = 1

[State 721, 1]
type = velset
trigger1 = 1
x = 13

[State 1071, 3]
type = HitDef
trigger1 = Time < 30
trigger1 = Timemod = 2, 0
attr = A, HA
animtype  = Back
air.animtype  = DiagUp
fall.animtype = DiagUp
getpower = 0
damage = 30,4
priority = 5,Dodge
guardflag = MA
hitflag = MAFP
pausetime = 8,8
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = -10,-70
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -7,-5
guard.velocity = -7
air.velocity = -9,-3
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 1071, 3]
type = HitDef
trigger1 = time = 30
attr = A, HA
animtype  = Back
air.animtype  = DiagUp
fall.animtype = DiagUp
getpower = 0
sparkno = s7030+(random%4)
guard.sparkno = s7102
damage = 60,6
priority  = 5,Dodge
guardflag = MA
hitflag = MAFP
pausetime = 15,15
sparkxy = -10,-70
hitsound = s5,5
guardsound = s6,1
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -7,-5
guard.velocity = -7
air.velocity = -9,-3
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 721, 2]
type = ChangeState
trigger1 = time > 35
;trigger1 = Pos Y >= -10 && Vel Y > 0
value = 1052
;---------------------------------------------------------------------------
; Crappy Fireball (Hah, Not any more...)
; CNS difficulty: medium
[Statedef 3270]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = 3220
sprpriority = -1

;[State 0, ]
;type = PlaySnd
;trigger1 = AnimElem = 6
;value = S3000,2
;volume = 255

[State 3200, 40]
type = NotHitBy
trigger1 = time = 0
trigger1 = palno = [1,11]
value = SCA, AP, AA, AT
time = 30
ignorehitpause = 1

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
trigger2 = var(38) = 1
value = SCA, AA, AP, AT
time = 1

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = 25, -57
anim = s7200
sound = s20, 0
poweradd = -1000
p2defmul = 1

[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 6
value = 3700,1
volume = 255
freqmul = 1.2
channel = 1

[State 1000, Proj]
type = Projectile
trigger1 = AnimElem = 6
attr = S, HP
damage = 220,22
getpower = 30,30
animtype = up
pausetime = 0,12
offset = 52,-55
velocity = 6,0
accel = 0,0
projID = 3277
projanim = 2010
projhitanim = 2015
projremanim = -1
projscale = 0.9,0.9
projshadow = 0,0,0 
projhits = 1
projmisstime = 1
projpriority = 30
projremovetime = 180
projsprpriority = 4
guardflag = MA
priority = 5
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = 30,-10
hitsound = s5,5
guardsound = s6,2
ground.type = High
ground.slidetime = 16
ground.hittime = 19
ground.velocity = -4,-5
air.velocity = -4,-5
air.juggle = 4
air.fall = 1
fall = 1
fall.recover = 0
afterimage.time = 180
afterimage.length = 5
afterimage.palcolor = 1
afterimage.palinvertall = 0
afterimage.palbright = 250,125,0
afterimage.palcontrast = 125,25,0
afterimage.palpostbright =250,100,0
afterimage.paladd = 250,120,0
ownpal = 1

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Crappy Fireball (Hah, Not any more...)
; CNS difficulty: medium
[Statedef 3275]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = 3240
sprpriority = -1

;[State 0, ]
;type = PlaySnd
;trigger1 = AnimElem = 6
;value = S3000,2
;volume = 255

[State 3200, 40]
type = NotHitBy
trigger1 = time = 0
trigger1 = palno = [1,11]
value = SCA, AP, AA, AT
time = 30
ignorehitpause = 1

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
trigger2 = var(38) = 1
value = SCA, AA, AP, AT
time = 1

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = 25, -57
anim = s7201
sound = s20, 1
poweradd = -2000
p2defmul = 1

[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 9
trigger3 = AnimElem = 12
value = 3700,1
volume = 255
freqmul = 1.2
channel = 1

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 12
anim = 4301
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = -1

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 12
anim = 4305
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = 10

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 6
trigger2 = AnimElem = 9
attr = S, HP
projhits = 2
projanim = 2010
projhitanim = 2015
projid = 3277
projpriority = 45
projsprpriority = 9
projedgebound = 220
projscale = 0.9,0.9
offset = 52,-55
postype = p1
getpower = 0,0
velocity = 16
damage = 60,5
animtype = Hard
guardflag = MA
pausetime = 1,13
sparkno = s7020+(random%4)
guard.sparkno = s7102
sparkxy = 30,-20
hitsound = s5,4
guardsound = s6,1
ground.type = high
ground.slidetime = 14
ground.hittime = 16
ground.velocity = 0,0
air.velocity = -3,-4
air.fall = 1
fall = 0
fall.recover = 0
ownpal = 1

[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 12
attr = S, HP
projhits = 2
projanim = 2010
projhitanim = 2015
projid = 3277
projpriority = 45
projsprpriority = 9
projedgebound = 220
projscale = 1,1
offset = 52,-55
postype = p1
getpower = 0,0
offset = 52,-55
velocity = 16
damage = 100,5
animtype = diagup
guardflag = MA
pausetime = 1,13
sparkno = s7020+(random%4)
guard.sparkno = S7102
sparkxy = 30,-10
hitsound = S5,6
guardsound = s6,1
ground.type = high
ground.slidetime = 14
ground.hittime = 16
ground.velocity = -5,-6
air.velocity = -5,-6
air.fall = 1
fall = 1
fall.recover = 0
ownpal = 1
envshake.time = 20
envshake.ampl = -4
envshake.freq = 92
envshake.phase = 92
afterimage.time = 180
afterimage.length = 5
afterimage.palcolor = 1
afterimage.palinvertall = 0
afterimage.palbright = 250,125,0
afterimage.palcontrast = 125,25,0
afterimage.palpostbright =250,100,0
afterimage.paladd = 250,120,0

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

;---------------------------------------------------------------------------
; Deadli Reib (hyper)
[Statedef 3500]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3500
ctrl = 0
sprpriority = 2

[State 3000, 2]
type = VarSet
trigger1 = time = 0
v = 15
value = 1

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 2, 1
pos = 25, -57
anim = s7202
sound = s20, 2
poweradd = -3000

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
trigger1 = palno = [1,11]
value = , NA, SA, AT
time = 15

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 3000, 3]
type = PosAdd
trigger1 = AnimElem = 3
x = 10

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 5
x = 6

[State 3000, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 12,15
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = -10,-60
hitsound = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 1000,]
type = ChangeState
triggerall = Time >= 5
trigger1 = MoveContact
trigger1 = command = "x"
trigger1 = var(58) = 0
trigger2 = Movehit
trigger2 = var(58) != 0
value = 3501

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

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3501]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3501
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 12,15
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = -10,-60
hitsound   = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "x"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3502

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

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3502]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3502
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 12,15
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = -10,-60
hitsound   = s5,4
guardsound = s6,1
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "a"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3503

[State 3000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3503]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3503
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
sparkno = s7030+(random%4)
guard.sparkno = s7102
pausetime = 12,15
sparkxy = -10,-60
hitsound   = s5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "a"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3504

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

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3504]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3504
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
sparkno = s7030+(random%4)
guard.sparkno = s7102
guardflag = MA
pausetime = 12,15
sparkxy = -10,-60
hitsound = s5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "y"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3505

[State 3000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3505]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3505
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = numproj >= 1
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
sparkno = s7030+(random%4)
guard.sparkno = s7102
pausetime = 12,15
sparkxy = -10,-60
hitsound   = s5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "y"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3506

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

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3506]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3506
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 12,15
sparkno = s7030+(random%4)
sparkxy = -10,-60
hitsound   = s5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "b"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3507

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

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3507]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3507
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 12,15
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = -10,-60
hitsound   = s5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "b"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3508

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

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3508]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3508
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 12,15
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = -10,-60
hitsound   = s5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "c"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3509

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

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3509]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3509
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
guardflag = MA
sparkno = s7030+(random%4)
guard.sparkno = s7102
pausetime = 12,15
sparkxy = -10,-60
hitsound   = s5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "c"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3510

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

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
[Statedef 3510]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3510
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = palno = 12
value = SCA, AA, AP, AT
time = 1

[State 3000, 1]
type = null ;;;PlaySnd
trigger1 = AnimElem = 4
value = 0, 3

[State with voice]
type = PlaySnd
trigger1 = animelem = 4
value = S2,2
channel = 0

[State 3000, 5]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Hard
damage = 40,4
getpower  = 0
priority  = 6
sparkno = s7030+(random%4)
guard.sparkno = s7102
guardflag = MA
pausetime = 12,15
sparkxy = -10,-60
hitsound   = s5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime = 30
ground.velocity = 0,0
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 1900, 7]
type = TargetState
trigger1 = MoveHit
trigger1 = NumTarget > 0
trigger1 = Target,isHelper = 0
trigger1 = Target,stateno != [120,165]
value = 3540

[State 1000,]
type = ChangeState
triggerall = MoveContact
triggerall = Time >= 5
trigger1 = command = "BAM"
trigger1 = var(58) = 0
trigger2 = var(58) != 0
value = 3511

[State 3000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Super Smash Kung Fu Upper (hyper)
[Statedef 3511]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3511
ctrl = 0
sprpriority = 2

[State 3050, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(16) < 0
value = 5,0

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AP, AT
time = 1

[State 3050, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State with voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = S2,8
channel = 0

[State 3050, Flash]
type = EnvColor
trigger1 = MoveHit = 1
value = 255,255,255
ignorehitpause = 1
persistent = 0
under = 1
time = 2

[State 3050, 2]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Up
damage = 100,10
getpower = 0
priority  = 5
guardflag = A
pausetime = 30,30
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = 0,-110
hitsound = s5,6
guardsound = s6,1
ground.type = Low
ground.slidetime = 26
ground.hittime  = 26
ground.velocity = -1.3,-30
guard.velocity = -11
air.velocity = -1.3,-30
airguard.velocity = -4.5,-5
envshake.time = 25           ;Parameters for shaking the screen on hit
envshake.ampl = 7
envshake.freq = 176
p2facing = 1                 ;Force p2 to face p1 on hit
fall = 1
fall.recover = 0             ;Prevent p2 from recovering
fall.damage = Ceil(0.01*enemy,const(data.life))             ;p2 will take 70 damage on hitting the ground
fall.envshake.ampl = 6       ;Parameters for shaking the screen on fall
fall.envshake.freq = 178
fall.envshake.time = 15
mindist = 50,-100            ;Keep p2 a minimum of 50 pixels away from p1, and no higher than 100 pixels up
maxdist = 100,-10            ;Keep p2 a maximum of 100 pixels away from p1, and no lower than 10 pixels below
yaccel = .8                  ;Accelerate p2 downwards rapidly
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 3000, 0]
type = BGPalFx
trigger1 = MoveHit
time = 2
add = 255,255,255
mul = 255,255,255
color = 0
invertall = 1
ignorehitpause = 1
persistent = 0

[State 3050, 4]
type = ChangeState
trigger1 = MoveHit
value = 3061

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

[Statedef 3540]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 6]
type = DestroySelf
trigger1 = IsHelper

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

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

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

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

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

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

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

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

[State 5000, 6]
type = SelfState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 5001

[State 5500, 4] 
type = SelfState
trigger1 = HitShakeOver
value = 5030
;---------------------------------------------------------------------------
; Death From Above
[Statedef 3600]
type    = S
movetype= A
physics = S
velset = 0,0
juggle = 8
anim = 3600
ctrl = 0

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

[State 1]
type = PlayerPush
trigger1 = 1
value = 0

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

[State 4000, Super A]
type = SuperPause
trigger1 = Time = 1
pos = 10, -80
time = 30
movetime = 30
anim = s7203
sound = S20, 3
poweradd = -4000

[State 4000, Super B]
type = AfterImage
trigger1 = Time = 0
time = 2

[State 4000, Super C]
type = AfterImageTime
trigger1 = 1
time = 2

[State 9]
type = PosAdd
trigger1 = time = 32
x = (floor(P2BodyDist X))+20
y = -400

[State 9]
type = Changestate
trigger1 = time = 32
value = 3601


; WATCH OUT
[Statedef 3601]
type    = A
movetype= A
physics = N
velset = 0,0
juggle = 8
anim = 3601
ctrl = 0

[State 1]
type = PlayerPush
trigger1 = 1
value = 0

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

[state a]
type = VelSet
trigger1 = time = 0
y = 20

[state a]
type = Veladd
trigger1 = time = 0
y = 0.5

[State 6500, 5.2]
type = Helper
trigger1 = time = 0
Helpertype = normal
name = "Effect"
id = 3630
postype = P1
pos = -3,-90
stateno = 3630
ownpal = 1
ignorehitpause = 1

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[state a]
type = ChangeState
trigger1 = vel y >=0 && pos y >0
value = 3602  ;;;;ifelse(palno>=7,3612,3602)

; Landed
[Statedef 3602]
type    = S
movetype= A
physics = S
velset = 0,0
juggle = 8
anim = 3602
sprpriority = -1
ctrl = 0

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

[State 0, ]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1

[state a]
type = posset
trigger1 = time = 0
y = 0

[state a]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

; Landed
[Statedef 3612]
type    = S
movetype= A
physics = S
velset = 0,0
juggle = 8
anim = 3604
sprpriority = -1
ctrl = 0

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

[State 0, ]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1

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

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
anim = 3620
bindtime = -1
postype = p1
ownpal = 1
pos = -20,0
sprpriority = 9
facing = 1

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
anim = 3620
bindtime = -1
postype = p1
ownpal = 1
pos = 20, 0
sprpriority = 9
facing = -1

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
anim = 3625
bindtime = -1
postype = p1
ownpal = 1
pos = 0, 0
sprpriority = 8

[State 3052, Flash]
type = Explod
trigger1 = Timemod = 26, 0
anim = 3627
bindtime = -1
postype = p1
ownpal = 1
pos = 0, 0
sprpriority = 6

[State 1020, 4]
type = EnvShake
trigger1 = time = 0
time = 30
ampl = -5
freq = 95
phase = 95

[state a]
type = posset
trigger1 = time = 0
y = 0

[state a]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


[Statedef 3607]
type    = S
movetype= H
physics = N
velset = 0,0

[State 52, 1]
type = VelSet
trigger1 = time = 0
y = 10

[State 52, 2]
type = Veladd
trigger1 = time >= 1
y = 1

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

[state a]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100

[Statedef 3609]
type    = S
movetype= H
physics = N
velset = 0,0

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

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

[state a]
type = SelfState
trigger1 = AnimTime = 0
value = 5100
;---------------------------------------------------------------------------
[Statedef 3608]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1830]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 52, 1]
type = VelSet
trigger1 = time = 0
x = 0
y = -100

[State 52, 2]
type = Veladd
trigger1 = time >= 1
y = 1

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 4251

[State 1830]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100

;------------------------------------------------------------------------------------------
; Shin Misogi - Effect Helper - Type 1
[Statedef 3630]
type = A
movetype = A
ctrl = 0
anim = 3621
velset = 0,0

[State 6505, 1.1]
type = VelSet
trigger1 = Time =  0
y = 20

[State 6505, 1.2]
type = VelAdd
trigger1 = Time =  0
y = 0.5

[State 6505, 1.3]
type = SprPriority
trigger1 = 1
value = 100

[State 6505, 2]
type = Nothitby
trigger1 = 1
value = SCA

[State 3000, 5]
type = Projectile
trigger1 = Time = 0
projanim = 3622
projID = 3622
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 80
projheightbound = -9999,0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = vel x, vel y
attr = S, HA
animtype = Hard
damage = 50,50
priority = 7, Hit
guardflag = N
pausetime = 0,5
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = 0 + (floor(p2bodydist X)),-50 + (floor(p2bodydist Y))
hitsound = s5,6
guardsound = s6,0
ground.type = high
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = 0, -80
air.velocity = 0, -80
air.fall = 1
fall = 1
fall.recover = 0
fall.animtype = Hard
p2stateno = 1850
getpower = 0,0
palfx.time = 70
palfx.add = 200,80,0
palfx.mul = 220,110,110
palfx.sinadd = 100,20,20,5

[State 6505, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3631
;------------------------------------------------------------------------------------------
; Dropped
[Statedef 3631]
type = A
movetype = A
ctrl = 0
anim = 9741
velset = 0,0

[State 6506, 1.1]
type = PosSet
trigger1 = 1
y = 0

[State 6506, 2]
type = Nothitby
trigger1 = 1
value = SCA

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
anim = 3628
postype = p1
ownpal = 1
pos = 40,0
sprpriority = 9
facing = 1

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
anim = 3628
postype = p1
ownpal = 1
pos = -40, 0
sprpriority = 9
facing = -1

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
trigger1 = parent,life < 250
anim = 3620
postype = p1
ownpal = 1
pos = -40,0
sprpriority = 12
facing = 1

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
trigger1 = parent,life < 250
anim = 3620
postype = p1
ownpal = 1
pos = 40, 0
sprpriority = 12
facing = -1

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
anim = 3625
postype = p1
ownpal = 1
pos = 0, 0
sprpriority = 8

[State 3052, Flash]
type = Explod
trigger1 = Time = 0
trigger2 = Time = 26
trigger3 = Time = 52
anim = 3627
bindtime = -1
postype = p1
ownpal = 1
pos = 0, 0
sprpriority = 6

[State 1020, 4]
type = EnvShake
trigger1 = time = 0
time = 30
ampl = -5
freq = 95
phase = 95

[State 0, ]
type = NotHitBy
trigger1 = 1
value = 0
ignorehitpause = 1

[State 3000, 5]
type = Projectile
trigger1 = Time = 0
projanim = 3606
projID = 3606
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 12
projremove = 0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = 0, 0
attr = S, HA
animtype = Hard
damage = 700,50
priority = 7, Hit
guardflag = N
pausetime = 0,5
sparkno = S3410
sparkxy = 0 + (floor(p2bodydist X)),-50 + (floor(p2bodydist Y))
hitsound = -1
guardsound = -1
ground.type = high
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = 0, -80
air.velocity = 0, -80
air.fall = 1
fall = 1
fall.recover = 0
fall.animtype = Hard
p2stateno = 3608
getpower = 0,0
palfx.time = 70
palfx.add = 200,80,0
palfx.mul = 220,110,110
palfx.sinadd = 100,20,20,5

[State 40000, Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1, 20
volume = 255

[State 6505, 4]
type = DestroySelf
trigger1 = Time = 5
;---------------------------------------------------------------------------
; Big Fraggin Wave 500K....LOL
; CNS difficulty: medium
[Statedef 3700]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 3700
sprpriority = 5

[State 0, ]
type = PlaySnd
trigger1 = anim = 3700
trigger1 = AnimElem = 6
value = S3700,0
volume = 255

[State 0, ]
type = PlaySnd
trigger1 = anim = 3700
trigger1 = AnimElem = 6
value = S3700,1
volume = 255

[State 3200, 40]
type = NotHitBy
trigger1 = time = 0
value = SCA,AP,AA,AT
time = 35
ignorehitpause = 1

[State 3200, 40]
type = NotHitBy
trigger1 = time >= 0
trigger1 = var(38) = 1
value = SCA

[State 3550, Super A]
type = SuperPause
trigger1 = anim = 3700 && AnimElem = 2,1
pos = 25, -57
time = 30
movetime = 30
anim = -1
poweradd = -5000
p2defmul = 1

[State 0, ]
type = PlaySnd
trigger1 = anim = 3700 && AnimElem = 2,1
value = S20, 4
volume = 255

[State 4500, 6]
type = Explod
trigger1 = anim = 3700 && AnimElem = 2,1
anim = 7204
sprpriority = 3
postype = p1
pos = 25, -57
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 3550, Help]
type = Helper
trigger1 = anim = 3700 && AnimElem = 6
helpertype = normal
name = "Destruct"
ID = 3735
pos = 60, -57
postype = p1
stateno = 3735
ownpal = 1
keyctrl = 0
sprpriority = 20
Size.XScale = .5
Size.YScale = .5

[State 3050, anim]
type = ChangeAnim
trigger1 = Anim = 3700
trigger1 = Time >= 95
trigger1 = numhelper(3735) = 0
value = 3701

[State 1000, 3]
type = ChangeState
trigger1 = Anim = 3701
trigger1 = Animtime = 0
value = 0
ctrl = 1
;====================================================
; The Big Beam
[Statedef 3735]
type    = S
movetype= A
physics = N
poweradd = 0
ctrl = 0
anim = 3730
sprpriority = 20

[State 2020, 変数増減]
Type = VarAdd
Trigger1 = ((Time = 0) || (Time > 130))
fvar(10) = IfElse(Time=0,1.25,-.25)

[State 2020, 変数増減]
Type = VarSet
Trigger1 = (Time = [0,130])
fvar(10) = IfElse(Time=0,1,IfElse(Time=130,1,.5+Random/666.0))

[State 2020, 変数]
Type = VarSet
Trigger1 = Time = [0,130]
fvar(11) = 0
Persistent = 10

[State 2020, 変数増減]
Type = VarAdd
Trigger1 = 1
fvar(11) = .25

[State 2020, 角度を有効]
Type = AngleDraw
Trigger1 = 1
Scale = fvar(10),fvar(10)

[State 603, Explod-1]
type = varset
trigger1 = Time = [0,100]
fv = 15
value = 0.6

[State 2020, 透明度]
Type = Trans
Trigger1 = 1
Trans = Add

[State 2020, 特殊効果]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow

[State 230, 1]
type = PlaySnd
trigger1 = time = 0
value = s3, 11
volume = 255

[State 2020, エフェクト]
Type = Explod
Trigger1 = Time = [0,130]
Trigger1 = Timemod = 3,0
Anim = IfElse(Facing=1,3731,3731)
ID = 3739
Pos = -3,0
Facing = IfElse(Facing=1,1,-1)
Ownpal = 1
SprPriority = IfElse(Facing=1,22,5)
IgnoreHitPause = 1

[State 2020, エフェクト]
Type = Explod
Trigger1 = Time = [0,130]
Trigger1 = Timemod = 3,0
Anim = IfElse(Facing=1,3732,3732)
ID = 3740
Pos = -3,0
Facing = IfElse(Facing=1,1,-1)
Ownpal = 1
SprPriority = IfElse(Facing=1,5,22)
IgnoreHitPause = 1

[State 603, Explod-1]
type = Explod
trigger1 = Time = 0
anim = 3720
ID = 3720
sprpriority = 19
postype = p1
pos = 0, 0
removetime = 160
ownpal = 1
persistent = 0
scale = 0.6, fvar(15)

[State 603, Explod-1]
type = Explod
trigger1 = Time = 0
anim = 3725
ID = 3725
sprpriority = 12
postype = p1
pos = 60, 0
removetime = 160
ownpal = 1
persistent = 0
scale = 0.6, fvar(15)

[State 3800, 11]
type = assertspecial
trigger1 = Time >= 0
flag = noshadow
IgnoreHitPause = 1
pausemovetime = 99999
supermovetime = 99999

[State 3800, 11]
type = bindtoparent
trigger1 = 1
pos = 60, -57

[State 3055, hitoverride]
type = hitoverride
trigger1 = 1
time = 1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 0, Projectile]
type = Projectile
trigger1 = time = [0,100]
trigger1 = timemod = 2,0
attr = S, HA
projID = 3726
projanim = 3726
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 4
projpriority = 99999999
offset = 0, 0
velocity = 0
ownpal = 1
damage = 25*(root,fvar(8)),ifelse(random<100,1,0)
pausetime = 0,30
animtype = Hard
hitflag = MAFDP
guardflag = M
sparkno = -1      ;S7040
guard.sparkno = -1   ;S7080
sparkxy = 0, 0
hitsound = -1
guardsound = -1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -10,-5
air.velocity = -10,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
getpower = 0,0
givepower = 0,0
palfx.time = 100
palfx.add = 0,0,0
palfx.mul = 250,250,250
palfx.sinadd = 100,100,100,5
palfx.color = 1
guard.kill = 0
p2stateno = 3750

[State 603, Explod-1]
type = varadd
trigger1 = Time >= 101
fv = 15
value = -0.01

[State 603, Explod-1]
type = ModifyExplod
trigger1 = Time >= 101
ID = 3720
scale = 0.6, fvar(15)

[State 603, Explod-1]
type = ModifyExplod
trigger1 = Time >= 101
ID = 3725
scale = 0.6, fvar(15)

[State 2020, エフェクト操作]
Type = ModifyExplod
Trigger1 = NumExplod(3739) > 0
ID = 3739
Scale = .35+fvar(11)/3.0,1+fvar(11)

[State 2020, エフェクト操作]
Type = ModifyExplod
Trigger1 = NumExplod(3740) > 0
ID = 3740
Scale = .35+fvar(11)/3.0,1+fvar(11)

[State 2020, エフェクトを消す]
Type = RemoveExplod
Trigger1 = NumExplod(3739) > 0
Trigger1 = (Root,MoveType = H)
ID = 3739
IgnoreHitPause = 1

[State 2020, エフェクトを消す]
Type = RemoveExplod
Trigger1 = NumExplod(3740) > 0
Trigger1 = (Root,MoveType = H)
ID = 3740
IgnoreHitPause = 1

[State 2020, エフェクトを消す]
Type = RemoveExplod
Trigger1 = NumExplod(3720) > 0
Trigger1 = (Root,MoveType = H)
ID = 3720
IgnoreHitPause = 1

[State 2020, エフェクトを消す]
Type = RemoveExplod
Trigger1 = NumExplod(3725) > 0
Trigger1 = (Root,MoveType = H)
ID = 3725
IgnoreHitPause = 1

[State 220, Debug]
type = ChangeState
trigger1 = root,movetype != A
trigger2 = root,stateno != 3700
trigger3 = root,stateno = 3700
trigger3 = root,animelem = 1
value = 3779

[State 220, 2]
type = ChangeAnim
trigger1 = anim = 3730
trigger1 = Time = 130
value = 9741

[State 220, 2]
type = DestroySelf
trigger1 = Time = 160
;====================================================
; if not been 
[Statedef 3779]
type    = S
movetype= A
physics = N
poweradd = 0
ctrl = 0
anim = 9741
sprpriority = 20

[State 2020, エフェクトを消す]
Type = RemoveExplod
Trigger1 = Time = 0
ID = 3720
IgnoreHitPause = 1

[State 2020, エフェクトを消す]
Type = RemoveExplod
Trigger1 = Time = 0
ID = 3725
IgnoreHitPause = 1

[State 2020, エフェクトを消す]
Type = RemoveExplod
Trigger1 = Time = 0
ID = 3739
IgnoreHitPause = 1

[State 2020, エフェクトを消す]
Type = RemoveExplod
Trigger1 = Time = 0
ID = 3740
IgnoreHitPause = 1

[State 2020, 変数増減]
Type = VarSet
Trigger1 = Time = 0
fvar(10) = 0

[State 2020, 変数]
Type = VarSet
Trigger1 = Time = 0
fvar(11) = 0

[State 2020, 変数]
Type = VarSet
Trigger1 = Time = 0
fvar(15) = 0

[State 220, 2]
type = DestroySelf
trigger1 = Time = 1
;---------------------------------------------------------------------------
[Statedef 3750]
type = A
movetype = H
physics = N
ctrl = 0

[State 35973, 0]
type = ChangeAnim2
trigger1 = time = 0
value = 3751

[State 35973, 0]
type = ChangeAnim2
trigger1 = time >= 40
trigger1 = Anim = 3751
value = 3752

[State 35973, 2]
type = VelSet
trigger1 = time = 0
trigger2 = Anim = 3752
trigger2 = Animelemtime(6) >= 0
trigger2 = Pos Y >= 0
x = 0
y = 0

[State 35973, 3]
type = VelSet
trigger1 = time = 40
x = -6
y = -20*Const(movement.yaccel)

[State 35973, 4]
type = VelAdd
trigger1 = time > 40
y = Const(movement.yaccel)

[State 35973, 5]
type = PosSet
trigger1 = Anim = 3752
trigger1 = Animelemtime(6) >= 0
trigger1 = Pos Y >= 0
y = 0

[State 35973, 6]
type = SelfState
trigger1 = Anim = 3752
trigger1 = Animelemtime(6) >= 0
trigger1 = Pos Y >= 0
value = 5100

;;=====================================================================
;; THE ULTIMATE MOVES
;;=====================================================================
;----------------------------------------------------------------------
; Dark Ambush
; CNS difficulty: medium-advanced
[Statedef 4000]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 4000
sprpriority = 2

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S0,23
channel = 0

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S0,50
channel = 9
volume = 255

[State 0, ]
type = VarSet
trigger1 = time = 0
trigger1 = var(38) = 0
trigger1 = palno = [1,11]
v = 31
value = 1

[State 0, ]
type = VarSet
trigger1 = time = 0
trigger1 = var(38) = 0
trigger1 = palno = [1,11]
v = 30
value = 0

[State 0, ]
type = EnvColor
trigger1 = Time = 0
value = 255,0,0
time = 60
under = 1

[State 8300, NOTHITBY]
type = Nothitby
trigger1 = time = 0
value = SCA, AA, AP, AT
time = 30

[State 0, ]
type = SuperPause
trigger1 = Time = 0
time = 60
anim = -1
darken = 0
poweradd = -7000


; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents KFM from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, HT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 4010       ;On success, KFM changes to state 810
p2stateno = 4020       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;LOL
[Statedef 4060]
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 9741
sprpriority = 2

[State 8300, NOTHITBY]
type = Nothitby
trigger1 = 1
value = SCA, AA, AP, AT
time = 1

[State 0, ]
type = AllPalFX
trigger1 = time >= 220
time = 1
mul = 0,0,0

[State 4010, HitSecondary]
type = Projectile
trigger1 = time = [220,999]
projanim = 4810
projID = 4011
offset = 0,0
velocity = 0,0
projpriority = 999999
projhitanim = -1
projremanim = -1
projsprpriority = -1
projremovetime = 1
projremove = 0
priority = 7
attr = A, HA
damage = 0,0
numhits = 0
givepower = 0,0
guardflag = N
pausetime = 0,200
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = 0,0
guardsound = 0,0
getpower = 0
ownpal = 1
ground.type = Trip
ground.slidetime = 0
ground.hittime = 0
ground.velocity = 0, 0
air.velocity = 0, 0
air.fall = 1
yaccel = 3
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
supermove = 1
pausemovetime = 999999
supermovetime = 999999
p1stateno = 4061
p2stateno = 4020

[State 800, 2]
type = ChangeState
Trigger1 = Time = 1000
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;LOL
[Statedef 4080]
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 4080
sprpriority = 2

[State 8300, NOTHITBY]
type = Nothitby
trigger1 = 1
value = SCA, AA, AP, AT
time = 1

[State 1200, Reversal]
type = ReversalDef
trigger1 = Time >= 80
attr = S, HT
reversal.attr = SCA, NA, SA ,HA ,NT ,ST, HT
pausetime = 0, 0
sparkno = -1
sparkxy = 0, 0
numhits = 0
p1facing = 1
p1stateno = 4082
p2stateno = 4020

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Dark Ambush - Success
[Statedef 4010]
type    = S
movetype= A
physics = N
anim = 4010

[State 0, ]
type = SuperPause
trigger1 = Time = 0
time = 360
anim = -1
movetime = 360
darken = 0

[State 0, ]
type = AllPalFX
trigger1 = time = [0,149]
trigger2 = time = [160,169]
trigger3 = time = [180,189]
trigger4 = time = [200,209]
trigger5 = time = [220,234]
trigger6 = time = [240,360]
time = 1
mul = 0,0,0

[State 0, ]
type = ChangeAnim
trigger1 = time = 150
value = 4011

[State 0, ]
type = ChangeAnim
trigger1 = time = 170
value = 4012

[State 0, ]
type = ChangeAnim
trigger1 = time = 190
value = 4013

[State 0, ]
type = ChangeAnim
trigger1 = time = 210
value = 4014

[State 0, ]
type = ChangeAnim
trigger1 = time = 235
value = 4015

[State 180,]
type = VarRandom
trigger1 = time = 10
v = 33
range = 0,5

[State 0, ]
type = Explod
trigger1 = Time = 235
trigger1 = var(33) = 0
anim = 9991
id = 9990
pos = ifelse(facing=-1,0,-320),0
postype = front
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 65535
pausemovetime = 65535

[State 0, ]
type = Explod
trigger1 = Time = 235
trigger1 = var(33) = 1
anim = 9992
id = 9993
pos = ifelse(facing=-1,0,-320),0
postype = front
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 65535
pausemovetime = 65535

[State 0, ]
type = Explod
trigger1 = Time = 235
trigger1 = var(33) = 2
anim = 9993
id = 9990
pos = ifelse(facing=-1,0,-320),0
postype = front
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 65535
pausemovetime = 65535

[State 0, ]
type = Explod
trigger1 = Time = 235
trigger1 = var(33) = 3
anim = 9994
id = 9991
pos = ifelse(facing=-1,0,-320),0
postype = front
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 65535
pausemovetime = 65535

[State 0, ]
type = Explod
trigger1 = Time = 235
trigger1 = var(33) = 4
anim = 9995
id = 9992
pos = ifelse(facing=-1,0,-320),0
postype = front
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 65535
pausemovetime = 65535

[State 0, ]
type = Explod
trigger1 = Time = 235
trigger1 = var(33) = 5
anim = 9996
id = 9991
pos = ifelse(facing=-1,0,-320),0
postype = front
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 65535
pausemovetime = 65535

[State 0, ]
type = EnvColor
trigger1 = time = [0,149]
trigger2 = time = [240,360]
value = 0,0,0
time = 1
under = 0

[State 0, ]
type = EnvColor
trigger1 = time = [150,234]
value = 255,255,255
time = 1
under = 1

[State 0, ]
type = EnvColor
trigger1 = time = [235,239]
trigger1 = NumExplod(9993) = 1
value = 255,255,255
time = 1
under = 1

[State 3400, Flame]
type = PlaySnd
trigger1 = NumExplod(9990) = 1
trigger1 = Time = 235
value = S45,0
channel = 3
volume = 255

[State 3400, Flame]
type = PlaySnd
trigger1 = NumExplod(9991) = 1
trigger1 = Time = 235
value = S45,1
channel = 3
volume = 255

[State 3400, Flame]
type = PlaySnd
trigger1 = NumExplod(9992) = 1
trigger1 = Time = 235
value = S666,0
channel = 3
volume = 255

[State 3400, Flame]
type = PlaySnd
trigger1 = NumExplod(9993) = 1
trigger1 = Time = 235
value = S45,2
channel = 3
volume = 255
freqmul = 1.2

;[State 0, ]
;type = PalFX
;trigger1 = time >= 0
;time = 1
;add = -200, -200, -200
;ignorehitpause = 1

[State 0, ]
type = TargetLifeAdd
trigger1 = time = 245
trigger1 = var(36) = 0
value = Ceil(-9*enemy,const(data.life))
absolute = 1

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S0,24
channel = 0

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S0,51
channel = 9
volume = 255

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = nobardisplay
flag3 = noFG

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nokosnd
flag2 = nokoslow
flag3 = timerfreeze

[State 0, ]
type = TargetState
triggerall = time = 350
trigger1 = var(33) = 0
trigger2 = var(33) = 2
trigger3 = var(33) = 4
value = 4021

[State 0, ]
type = TargetState
triggerall = time = 350
trigger1 = var(33) = 1
trigger2 = var(33) = 3
trigger3 = var(33) = 5
value = 4022

[State 810, State End]
type = ChangeState
trigger1 = time >= 360
value = ifelse(var(54),4017,4011)
ctrl = 0
;---------------------------------------------------------------------------
[Statedef 4061]
type    = S
movetype= A
physics = N
anim = 4010
poweradd = 0

[State 0, ]
type = SuperPause
trigger1 = Time = 0
time = 519
anim = -1
movetime = 519
darken = 0

[State 0, ]
type = AllPalFX
trigger1 = time >= 0
time = 1
mul = 0,0,0

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

[State 0, ]
type = TargetBind
trigger1 = time = 520
time = 1
pos = 60, 0
ignorehitpause = 1

[State 0, ]
type = TargetLifeAdd
trigger1 = time = 520
value = Ceil(-100*enemy,const(data.life))
absolute = 1

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S666,77
volume = 255
freqmul = 0.9

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = nobardisplay
flag3 = noFG

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nokosnd
flag2 = nokoslow
flag3 = timerfreeze

[State 0, ]
type = TargetState
trigger1 = time = 520
value = 4089

[State with voice]
type = PlaySnd
trigger1 = time = 525
value = S45,5
volume = 255

[State 810, State End]
type = ChangeState
trigger1 = time >= 525
value = ifelse(var(54),4017,4011)
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 4082]
type    = S
movetype= A
physics = N
anim = 4010
poweradd = -7000

[State 0, ]
type = SuperPause
trigger1 = Time = 0
time = 360
anim = -1
movetime = 360
darken = 0

[State 0, ]
type = AllPalFX
trigger1 = time = [0,204]
trigger2 = time = [340,460]
time = 1
mul = 0,0,0

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

[State 0, ]
type = ChangeAnim
trigger1 = time = 150
value = 4011

[State 0, ]
type = ChangeAnim
trigger1 = time = 170
value = 4012

[State 0, ]
type = ChangeAnim
trigger1 = time = 190
value = 4013

[State 0, ]
type = ChangeAnim
trigger1 = time = 210
value = 4014

[State 0, ]
type = ChangeAnim
trigger1 = time = 235
value = 4015

[State 180,]
type = VarRandom
trigger1 = 1
v = 33
range = 0,5

[State 0, ]
type = Explod
trigger1 = Time = 205
anim = 19997
id = 9990
pos = ifelse(facing=-1,0,-320),0
postype = front
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 65535
pausemovetime = 65535

[State 1200, Shake Screen]
type = EnvShake
trigger1 = Time = 205
time = 135
ampl = 3
freq = 180
supermovetime = 65535
pausemovetime = 65535

[State 0, ]
type = EnvColor
trigger1 = time = [0,204]
trigger2 = time = [340,460]
value = 0,0,0
time = 1
under = 0

[State 0, ]
type = EnvColor
trigger1 = time = [205,339]
value = 255,255,255
time = 1
under = 1

[State 3400, Flame]
type = PlaySnd
trigger1 = Time = 205
value = S45,3
channel = 3
volume = 255

[State 0, ]
type = TargetLifeAdd
trigger1 = time = 445
value = Ceil(-100*enemy,const(data.life))
absolute = 1

[State with voice]
type = PlaySnd
trigger1 = Time = 0
value = S0,24
channel = 0

[State with voice]
type = PlaySnd
trigger1 = Time = 40
value = S45,4
volume = 255

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = nobardisplay
flag3 = noFG

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nokosnd
flag2 = nokoslow
flag3 = timerfreeze

[State 0, ]
type = TargetState
trigger1 = time = 450
value = 4086

[State with voice]
type = PlaySnd
trigger1 = time = 450
value = S45,5
volume = 255

[State 810, State End]
type = ChangeState
trigger1 = time >= 460
value = ifelse(var(54),4017,4011)
ctrl = 0
;---------------------------------------------------------------------------
; Finished
[Statedef 4011]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 4019
sprpriority = 2

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nokosnd
flag2 = nokoslow
flag3 = nomusic
ignorehitpause = 1

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
ignorehitpause = 1

[State 0, ]
type = VarSet
trigger1 = Time = 0
v = 0
value = 0

[State 0, ]
type = VarAdd
trigger1 = 1
v = 0
value = 10

[State 0, ]
type = AllPalFX
trigger1 = var(0) < 255
time = 2
mul = var(0),var(0),var(0)

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Finished
[Statedef 4017]
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3907
sprpriority = 2

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nokosnd
flag2 = nokoslow
flag3 = nomusic
ignorehitpause = 1

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = timerfreeze
ignorehitpause = 1

[State 0, ]
type = VarSet
trigger1 = Time = 0
v = 0
value = 0

[State 0, ]
type = VarAdd
trigger1 = 1
v = 0
value = 10

[State 0, ]
type = AllPalFX
trigger1 = var(0) < 255
time = 2
mul = var(0),var(0),var(0)

[State 3005, DeBug]
type = Ctrlset
trigger1 = time = 100
value = 1

[State 3005, DeBug]
type = Changestate
trigger1 = P2MoveType = I
value = 0
ctrl = 1

[Statedef 4018]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 3907
ctrl = 0

[State 0, PalFXWiz]
type = BGPalFX
trigger1 = Time = [0,255]
time = 1
mul = 256-(time*1),256-(time*1),256-(time*1)
color = 256-(time*1)
ignorehitpause = 1

[State 0, PalFXWiz]
type = BGPalFX
trigger1 = Time >= 256
time = 1
mul = 0,0,0
color = 0
ignorehitpause = 1

[State with voice]
type = PlaySnd
trigger1 = time = 0
value = S1999,35
volume = 255

[State 1]
type = AssertSpecial
trigger1 = 1
flag = NoMusic
flag2 = NoBarDisplay

[State 1]
type = AssertSpecial
trigger1 = time >= 256
flag = NoBG
flag2 = NoFG

[State 1]
type = AssertSpecial
trigger1 = time = [0,700]
flag = Roundnotover

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

[Statedef 4019]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 186
ctrl = 0

[State 0, ]
type = PlaySnd
trigger1 = Animelem = 10
value = S0,2

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 11
value = S2,9

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

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

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

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

[State 758, Velocity]
type = PosSet
trigger1 = Time = 0 
y = 0

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

[State 820, 1]
type = Playsnd
Triggerall = Time = 0
trigger1 = name != "Moon Rabbit" && name != "Reisen Dono"
trigger1 = name != "Reisen Udongein Inaba"
trigger1 = name != "Yuyuko Saigyouji"
trigger1 = name != "Bloosom Ghost"
trigger1 = name != "Yukari Yakumo"
trigger1 = name != "The Fat Bug"
trigger1 = name != "Reimu_Hakurei"
trigger1 = name != "Suika Ibuki"
trigger1 = name != "youmu_konpaku"
trigger1 = name != "Sakuya_Izayoi"
trigger1 = name != "Remilia_Scarlet"
trigger1 = name != "Patchouli_Knowledge"
trigger1 = name != "Aya Shameimaru"
trigger1 = name != "Ikumi Amasawa"
value = f12,0+(Random%50)
volume = 255

[State 820, 1]
type = Playsnd
Triggerall = Time = 0
trigger1 = name = "Moon Rabbit" || name = "Reisen Dono"
trigger2 = name = "Reisen Udongein Inaba"
trigger3 = name = "Yuyuko Saigyouji"
trigger4 = name = "Bloosom Ghost"
trigger5 = name = "Yukari Yakumo"
trigger6 = name = "The Fat Bug"
trigger7 = name = "Reimu_Hakurei"
trigger8 = name = "Suika Ibuki"
trigger9 = name = "youmu_konpaku"
trigger10 = name = "Sakuya_Izayoi"
trigger11 = name = "Remilia_Scarlet"
trigger12 = name = "Patchouli_Knowledge"
trigger13 = name = "Aya Shameimaru"
trigger14 = name = "Ikumi Amasawa"
value = 4218,23
volume = 255

[State 0, ]
type = LifeSet
trigger1 = 1
value = 0

[State 820, 1]
type = Playsnd
Trigger1 = Time = 1
Trigger1 = Life = 0
value = f13,13
volume = 255

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

[State 758, Velocity]
type = PosSet
trigger1 = Time = 0 
y = 0

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

[State 820, 1]
type = Playsnd
Triggerall = Time = 0
trigger1 = name != "Moon Rabbit" && name != "Reisen Dono"
trigger1 = name != "Reisen Udongein Inaba"
trigger1 = name != "Yuyuko Saigyouji"
trigger1 = name != "Bloosom Ghost"
trigger1 = name != "Yukari Yakumo"
trigger1 = name != "The Fat Bug"
trigger1 = name != "Reimu_Hakurei"
trigger1 = name != "Suika Ibuki"
trigger1 = name != "youmu_konpaku"
trigger1 = name != "Sakuya_Izayoi"
trigger1 = name != "Remilia_Scarlet"
trigger1 = name != "Patchouli_Knowledge"
trigger1 = name != "Aya Shameimaru"
trigger1 = name != "Ikumi Amasawa"
value = 11,0
volume = 255

[State 820, 1]
type = Playsnd
Triggerall = Time = 0
trigger1 = name = "Moon Rabbit" || name = "Reisen Dono"
trigger2 = name = "Reisen Udongein Inaba"
trigger3 = name = "Yuyuko Saigyouji"
trigger4 = name = "Bloosom Ghost"
trigger5 = name = "Yukari Yakumo"
trigger6 = name = "The Fat Bug"
trigger7 = name = "Reimu_Hakurei"
trigger8 = name = "Suika Ibuki"
trigger9 = name = "youmu_konpaku"
trigger10 = name = "Sakuya_Izayoi"
trigger11 = name = "Remilia_Scarlet"
trigger12 = name = "Patchouli_Knowledge"
trigger13 = name = "Aya Shameimaru"
trigger14 = name = "Ikumi Amasawa"
value = 4218,23
volume = 255

[State 0, ]
type = LifeSet
trigger1 = 1
value = 0

[State 820, 2]
type = SelfState
trigger1 = time >= 1
value = 5150

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

[State 758, Velocity]
type = PosSet
trigger1 = Time = 0 
y = 0

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

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

[State 758, Velocity]
type = PosSet
trigger1 = Time = 0 
y = 9999

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

[State 0, ]
type = LifeSet
trigger1 = 1
value = 0

[State 820, 1]
type = Playsnd
Trigger1 = Time = 1
Trigger1 = Life = 0
value = f13,13
volume = 255

[State 820, 2]
type = SelfState
trigger1 = time >= 1
value = 5150

;---------------------------------------------------------------------------
[Statedef 4089]
type    = S
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 8220, Explod]
type = Explod
trigger1 = Time = 0
postype = p1
anim = f6969
ownpal = 1
sprpriority = -10
removetime = -1
pos = 0,0
bindtime = -1

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

[State 0, ]
type = LifeSet
trigger1 = 1
value = 0

[State 820, 1]
type = Playsnd
Trigger1 = Time = 1
Trigger1 = Life = 0
value = f13,13
volume = 255

[State 820, 2]
type = SelfState
trigger1 = time >= 1
value = 5150

; Hidden Fatal Move - Level 8
[Statedef 4200]
type    = S
movetype= I
physics = S
poweradd = 0
juggle = 0
ctrl = 0
anim = 4200
juggle = 15

[State 8200, Locked]
type = VarSet
trigger1 = time = 0
trigger1 = var(38) = 0
trigger1 = palno = [1,11]
v = 31
value = 1

[State 0, ]
type = VarSet
trigger1 = time = 0
trigger1 = var(38) = 0
trigger1 = palno = [1,11]
v = 30
value = 0

[State 8200, AfterImage]
type = AfterImage
trigger1 = Anim = 4200
trigger1 = AnimElem = 1
time = 120
timeGap = 3
frameGap = 4
length = 10
palmul=0.2,0.2,0.5
palpostbright =0,0,10
trans = add

[State 8200, Invencivel]
type = NotHitBy
trigger1 = Time < 70
value = SCA
time = 1

[State 8200,EnvColor]
type = EnvColor
trigger1 = AnimElem = 1
value = 255,0,0
time = 60
under = 1

[State 8200, superpause]
type = SuperPause
trigger1 = AnimElem = 1
time = 60
pos = 0,-51
sound = s5000, 7
poweradd = -8000
anim = -1

[State 8200, AssertSpecial]
type = AssertSpecial
trigger1 = Time < 60
flag = NoFG
flag2 = unguardable

[State 8200, ChangeState]
type = ChangeState
trigger1 = Time = 70
value = 4205

;---------------------------------------------------------------------------
; Dash
[Statedef 4205]
type    = S
movetype= A
physics = S
poweradd = 0
juggle = 0
ctrl = 0
anim = 4201
juggle = 15

[State 4205, VelSet]
type = VelSet
trigger1 = Time = 0
x = 40

[State 4205, Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5000,8
volume = 255

[State 4205, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 2452
id = 6301
pos = 5,10
scale = 1,1.15
vel = -3,0
postype = p1
sprpriority = 3
removeongethit = 1

[State 4205, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 2455
sprpriority = 10
postype = p1
pos = 30,12
bindtime = -1
supermove = 1
under = 0
ownpal = 1

[State 4205, Attack]
type = HitDef
trigger1 = Time = 0
attr = S, HA
hitflag = MAFD
guardflag = N
animtype = hard
damage = 0,0
getpower = 0
pausetime = 0,200
sparkno = s7030+(random%4)
guard.sparkno = s7102
ground.type = Low
ground.slidetime = 12
ground.hittime  = 1
ground.velocity = -3
air.velocity = 0,-2
sparkxy = -10,-50
hitsound = s0,21
guardsound = s3,4
fall = 0
kill = 0
forcestand = 1

[State 4205, Targeted]
type = TargetState
triggerall = numtarget > 0
triggerall = target,ishelper = 0
trigger1 = movecontact
trigger2 = movehit
value = 4250

[State 4210, Hit]
type = ChangeState
trigger1 = movecontact
trigger2 = movehit
value = 4207

[State 8210, Finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 4207]
type    = S
movetype= A
physics = S
poweradd = 0
juggle = 0
ctrl = 0
anim = 4203
juggle = 15

[State 8210, Randomizer]
type = VarRandom
trigger1 = 1
v = 23
range = 19915,19923

[State 8210, Words]
type = Explod
triggerall = numexplod(1999) = 0
trigger1 = time = 1
anim = (var(23))
ID = 1999
pos = 0,0
postype = left
bindtime = -1
scale = .5, .5
ontop = 1
ownpal = 1
under = 2
ignorehitpause = 1

[State 8210, AS1]
type = AssertSpecial
trigger1 = 1
Flag = NoBarDisplay
Flag2 = NoBG
Flag3 = NoKOSnd

[State 8210, AS2]
type = AssertSpecial
trigger1 = 1
Flag = TimerFreeze
Flag2 = NoMusic
Flag3 = NoFG

[State 8210, EnvColor]
type = EnvColor
trigger1 = Time > 3
value = 0,0,0
time = 1
under = 1

[State 8210, Immune]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AP, AT
time = 1

[State 8210, Boom]
type = PlaySnd
trigger1 = AnimElem = 15
value = 3,3
channel = 2

[State 8210, Turn]
type = Turn
trigger1 = AnimElem = 7

[State 8210, HarmfulExplosion]
type = Helper
trigger1 = AnimElem = 15
stateno = 4220
name = "Harmful Explosion" 
helpertype = normal
postype = p2
pos = 0,0
ownpal = 1
id = 4220
ignorehitpause = 1

[State 8210, TempWhite]
type = EnvColor
trigger1 = Time = 0
value = 255,255,255
time = 3
under = 1
ignorehitpause = 1

[State 8210, Velset]
type = VelSet
trigger1 = Time = [0,15]
x = 12.2

[State 8210, Velset]
type = VelSet
trigger1 = Time = 16
x = 0

[State 8210, Boom]
type = PlaySnd
trigger1 = AnimElem = 15
value = S5000,9
volume = 255

[State 8210, TargetState]
type = targetstate
trigger1 = AnimElem = 16
value = 4251

[State 8210, LifeAddDeduct]
type = TargetLifeAdd
trigger1 = AnimElem = 16
value = Ceil(-9*enemy,const(data.life))
absolute = 1

[State 8210, Dead]
type = PlaySnd
trigger1 = AnimElem = 16
trigger1 = Enemy,life = 0
value = 45,6
channel = 12
volume = 255

[State 8210, Pause]
Type = SuperPause
Trigger1 = Time = 61
Time = 99
MoveTime = 99
Anim = -1
Darken = 0

[State 8210, Finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;;Finish....
[Statedef 4210]
type = S
movetype = I
physics = S
velset = 0,0
sprpriority = -1
anim = 120

[State 4010, HitSecondary]
type = posset
trigger1 = time >= 0
y = 0

[State 4010, HitSecondary]
type = assertspecial
trigger1 = enemynear,anim != 0
trigger1 = enemynear,stateno != 1355
flag = invisible
flag2 = noshadow

[State 4010, HitSecondary]
type = changeanim
trigger1 = enemynear,stateno = 0
trigger1 = anim = 120
value = 3054

[State 4010, HitSecondary]
type = pause
trigger1 = enemynear,stateno = 0
time = 2
movetime = 2

[State 4010, HitSecondary]
type = Playsnd
trigger1 = Anim = 3054
trigger1 = AnimElem = 1
value = f1666,6
volume = 999
freqmul = 0.9

[State 4010, HitSecondary]
type = Projectile
trigger1 = Anim = 3054
trigger1 = AnimElem = 6
projanim = 4810
projID = 4211
offset = 0,0
velocity = 0,0
projpriority = 999999
projhitanim = -1
projremanim = -1
projsprpriority = -1
projremovetime = 1000
priority = 7
attr = A, HA
damage = 500,500
numhits = 0
givepower = 0,0
guardflag = N
pausetime = 0,200
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = s5,9
guardsound = s5,9
getpower = 0
ownpal = 1
ground.type = Trip
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0, 0
air.velocity = 0, 0
air.fall = 1
yaccel = 3
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
supermove = 1
pausemovetime = 999999
supermovetime = 999999
p2stateno = 1355

[State 4010, HitSecondary]
type = Playsnd
trigger1 = projcontact4211 = 1
value = s0,21
volume = 999

[state a]
type = ChangeState
trigger1 = anim = 3054
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Fica Tonto Baby!!
[Statedef 4250]
type    = S
movetype= H
physics = N
velset = 0,0

[State 4206, Anim2] 
type = Posset
trigger1 = Time = 0
y = 0

[State 4206, Anim2] 
type = ChangeAnim2
trigger1 = Time = 0
value = 4250

[State 1830]
type = SelfState
trigger1 = animtime = 0
value = 5100
;---------------------------------------------------------------------------
[Statedef 4251]
type    = A
movetype= H
physics = N
velset = 0,0

[State 3430, brilho]
type = PalFX
trigger1 = time = 0
time = 150
add = 80,-70,-200
sinadd = 0,30,0,10
invertall = 1
color = 0
ignorehitpause = 1

[State 4207, HitDef]
type = lifeset
trigger1 = 1
value = 0

[State 1830]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 52, 1]
type = VelSet
trigger1 = time = 0
y = -300

[State 52, 2]
type = Veladd
trigger1 = time >= 1
y = 5

[State 810,]
type = EnvShake
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
ampl = 27
freq = 178
time = 15

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 4251

[State 1830]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100

[State 1830]
type = ChangeState
trigger1 = Life = 0
trigger1 = Time = 1
value = 4252
;---------------------------------------------------------------------------
;;Finish....
[Statedef 4252]
type    = S
movetype= H
physics = N
velset = 0,0

[State 3430, brilho]
type = PalFX
trigger1 = time = 0
time = -1
add = 80,-70,-200
sinadd = 0,30,0,10
invertall = 1
color = 0
ignorehitpause = 1

[State 1830]
type = PosSet
trigger1 = time = 0
y = 999

[State 1830]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 820, 1]
type = lifeset
Trigger1 = 1
value = 0

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

[state a]
type = selfstate
trigger1 = time = 1
trigger1 = life = 0
value = 5150
;---------------------------------------------------------------------------
; Explosion that can harm...
[Statedef 4220]
type     = S
movetype = A
Physics  = N
velset   = 0,0
sprpriority = 25
anim = 4220

[State 8210, Explosion]
type = Explod
trigger1 = AnimElem = 1
anim = 3415
ownpal = 1
sprpriority = 36
postype = p1
removeongethit = 1
pos = 0,-10
scale = 1.5,1.5

[State 8210, Explosion]
type = Explod
trigger1 = AnimElem = 1
anim = 3415
ownpal = 1
sprpriority = 36
postype = p1
removeongethit = 1
pos = 0,-110
scale = 1.5,1.5

[State 8210, Explosion]
type = Explod
trigger1 = AnimElem = 1
anim = 3415
ownpal = 1
sprpriority = 36
postype = p1
removeongethit = 1
pos = 0,-210
scale = 1.5,1.5

[State 8220, Explod]
type = Explod
trigger1 = Time = 0
postype = p1
anim = 3417
ownpal = 1
sprpriority = 23
removeongethit = 1
pos = 0,25
scale = 1.3,1.3
bindtime = -1

[State 8220, Sound]
type = PlaySnd
trigger1 = Time = 0
value = 5200,0
channel = 7

[State 8220, Sound]
type = PlaySnd
trigger1 = Time = 0
value = 5200,1
channel = 8

[State 8220, Immune]
type = NotHitBy
trigger1 = 1
value = SCA

[State 4010, HitSecondary]
type = Projectile
trigger1 = time = [2,60]
projanim = 4221
projID = 4221
offset = 0,0
velocity = 0,0
projpriority = 999999
projhitanim = -1
projremanim = -1
projsprpriority = -1
projremovetime = 1
priority = 6
attr = A, HA
damage = 9999999,9999999
numhits = 0
givepower = 0,0
guardflag = N
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = 0,0
guardsound = 0,0
getpower = 0
ownpal = 1
ground.type = Trip
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0, 0
air.velocity = 0, 0
air.fall = 1
yaccel = 3
fall = 1
fall.recover = 0
fall.damage = Ceil(9*enemy,const(data.life))
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
supermove = 1
pausemovetime = 999999
supermovetime = 999999
p2stateno = 4251

[State 8210, TargetState]
type = targetlifeadd
trigger1 = MoveContact
trigger2 = MoveHit
trigger2 = projcontact4221 = 1
value = Ceil(-9*enemy,const(data.life))
absolute = 1

[State 8220, Disperse]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Chrono Fist (Instant Kill)
; CNS difficulty: medium
[Statedef 4300]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 220
ctrl = 0
sprpriority = 2

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (3) >= 0) && (AnimElemTime (6) < 0)
value = 60,-27

[State 3052, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(16) < 0
value = 5,0

[State 0, ]
type = VarSet
trigger1 = time = 0
trigger1 = var(38) = 0
trigger1 = palno = [1,11]
v = 31
value = 1

[State 0, ]
type = VarSet
trigger1 = time = 0
trigger1 = var(38) = 0
trigger1 = palno = [1,11]
v = 30
value = 0

[State 3052, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = -5, -55
anim = -1
time = 60
anim = -1
darken = 0
sound = S5000, 7
poweradd = -6000

[State 3052, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3052, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 3052, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
value = , NA, SA, AT
time = 50

[State 3052, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 3
volume = 255

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 3
anim = 4305
bindtime = -1
postype = p1
ownpal = 1
pos = 20,0
sprpriority = 4

[State 3052, Flash]
type = Explod
trigger1 = AnimElem = 3
anim = 4306
bindtime = -1
postype = p1
ownpal = 1
pos = 20, 6
sprpriority = -1

[State 3052, Flash]
type = EnvColor
trigger1 = Time = 0
value = 255,0,0
persistent = 0
time = 60
under = 1

[State 3000, 5]
type = Projectile
trigger1 = AnimElem = 3
projID = 4399
projanim = 1615
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 3
projremove = 3
offset = 30, 0
priority = 7, Hit
projpriority = 99999
projsprpriority = -1
velocity = 0, 0
attr = S, HA
animtype = Hard
damage = 0,0
getpower = 0
priority = 7, Hit
guardflag = N
pausetime = 0,50
sparkno = s7030+(random%4)
guard.sparkno = s7102
sparkxy = -10,-60
hitsound = S0, 21
guardsound = s6, 1
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
p2stateno = 4320

[State 3052, 5]
type = ChangeState
trigger1 = Projhit4399 = 1
value = 4301

[State 3052, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Chrono Fist (Instant Kill)
; CNS difficulty: medium
[Statedef 4301]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 4303
ctrl = 0
sprpriority = 2

[State 0, ]
type = EnvColor
trigger1 = time = 0
trigger2 = time = 271
value = 255,255,255
time = 10

[State 1100, 1]
type = PlaySnd
trigger1 = Time = 10
value = s4300, 0
volume = 255

[State 1100, 1]
type = PlaySnd
trigger1 = Time = 271
value = s4300, 1
volume = 255

[State 2020, 特殊効果]
Type = AssertSpecial
Trigger1 = 1
Flag = NoFG
Flag2 = NoBG
Flag3 = NoBarDisplay

[State 2020, 特殊効果]
Type = AssertSpecial
Trigger1 = 1
Flag = NoMusic
Flag2 = TimerFreeze
Flag3 = NoKOSlow

[State 3052, Flash]
type = Explod
trigger1 = Time = 260
anim = 4304
postype = p2
ownpal = 1
pos = 0,-60
sprpriority = 12

[State 3052, Flash]
type = Explod
trigger1 = Time = 270
anim = 4306
postype = p2
ownpal = 1
pos = 0,0
sprpriority = 12

[State 3052, Flash]
type = Explod
trigger1 = Time = 270
anim = 4305
postype = p2
ownpal = 1
pos = -20, 0
sprpriority = 13
facing = -1

[State 3052, Flash]
type = Explod
trigger1 = Time = 270
anim = 4305
postype = p2
ownpal = 1
pos = 20,0
sprpriority = 13
facing = 1

[State 0, ]
type = TargetLifeAdd
trigger1 = Time = 271
value = Ceil(-100*enemy,Const(data.life))
kill = 1
absolute = 1
ignorehitpause = 1

[State 4000, 15]
type = TargetState
trigger1 = Time = 271
value = 4321

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

;---------------------------------------------------------------------------
; Hit
[Statedef 4320]
type    = A
movetype= H
physics = N
velset = 0,0

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time = [0,255]
time = 1
color = 256-(time*1)
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = Time >= 256
time = 1
color = 0
ignorehitpause = 1

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

[State 820, 2]
type = SelfState
trigger1 = time > 666
value = 5050

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 4321]
type    = A
movetype= H
physics = N
velset = 0,0

[State 758, Velocity]
type = PosSet
trigger1 = Time = 0 
y = 9999

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

[State 0, ]
type = LifeSet
trigger1 = 1
value = 0

[State 0, ]
type = LifeAdd
trigger1 = 1
value = Ceil(-9*const(data.life))
absolute = 1

[State 820, 2]
type = SelfState
trigger1 = time >= 1
value = 5150

;---------------------------------------------------------------------------
; WHEN HE SCREAM...YOU DIE!!!
[Statedef 4520]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 4520                      ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)
poweradd = -10000

[State 8210, TempWhite]
type = AssertSpecial
trigger1 = 1
flag = Nomusic
flag2 = NoBarDisplay
supermove = 1
pausemovetime = 99999
supermovetime = 99999

[State 0, ]
type = VarSet
trigger1 = time = 0
trigger1 = var(38) = 0
trigger1 = palno = [1,11]
v = 31
value = 1

[State 0, ]
type = VarSet
trigger1 = time = 0
trigger1 = var(38) = 0
trigger1 = palno = [1,11]
v = 30
value = 0

[State 0, ]
type = PowerSet
trigger1 = Time = 0
trigger1 = var(38) = 0
value = 0

[State 200, 7]
type = ChangeState
trigger1 = Time = 100
value = ifelse(roundstate=2,4521,4555)

;---------------------------------------------------------------------------
; WHEN HE SCREAM...YOU DIE!!!
[Statedef 4521]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 4524                      ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 0, ]
type = PlaySnd
trigger1 = Time = 50
value = S4500,2
volume = 255

[State 0, ]
type = PlaySnd
trigger1 = Time = 35
value = S999, 1
volume = 255
freqmul = 0.8

[State 810,]
type = EnvShake
trigger1 = Time = 35
ampl = 15
freq = 255
time = 500

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = [0,250]
time = 1
add = 0,time * 1,0
color = 256 - time
ignorehitpause = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = time >= 251
time = 1
add = 0,255,0
color = 0
ignorehitpause = 1

[State 6500, 5.2]
type = Helper
trigger1 = time >= 40
trigger1 = timemod = 20,0
Helpertype = normal
name = "Effect"
id = 14596
postype = P1
pos = 70, -55
stateno = 14596
ownpal = 1
ignorehitpause = 1
pausemovetime = 65535
supermovetime = 65535

[State 8220, Explod]
type = Explod
trigger1 = Time = 0
postype = p1
anim = 4313
ID = 4566
ownpal = 1
sprpriority = 99
pos = 70,-55
facing = -1
scale = 0.01,0.01
supermove = 1
removetime = -1
pausemovetime = 99999
supermovetime = 99999

[State 8220, Explod]
type = ModifyExplod
trigger1 = Time >= 1
ID = 4566
scale = 0.01+time*0.001,0.01+time*0.001

[State 4010, HitSecondary]
type = Projectile
trigger1 = time >= 35
projanim = 4810
projID = 4011
offset = 0,0
velocity = 0,0
projpriority = 999999
projhitanim = -1
projremanim = -1
projsprpriority = -1
projremovetime = 1
priority = 7
attr = A, HA
damage = 50,50
numhits = 0
givepower = -250,-250
guardflag = N
pausetime = 0,200
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = 0,0
guardsound = 0,0
getpower = 0
ownpal = 1
ground.type = Trip
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0, 0
air.velocity = 0, 0
air.fall = 1
yaccel = 3
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
supermove = 1
pausemovetime = 65535
supermovetime = 65535
p2stateno = 19855

[State 0, ]
type = PlaySnd
trigger1 = Time = 520
value = S5000, 5
volume = 255

[State 8220, Explod]
type = Explod
trigger1 = Time = 520
postype = p1
anim = 3180
ownpal = 1
sprpriority = 99
pos = 0,0
facing = -1
scale = 1.4,1.4
supermove = 1
pausemovetime = 99999
supermovetime = 99999

[State 0, ]
type = Explod
trigger1 = Time = 520
anim = 3170
pos = 0,0
postype = p1
facing = 1
sprpriority = 15
bindtime = 1
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = Time = 520
anim = 4305
pos = 30,0
postype = p1
facing = -1
sprpriority = 15
bindtime = 1
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 0, ]
type = Explod
trigger1 = Time = 520
anim = 4305
pos = -30,0
postype = p1
facing = 1
sprpriority = 15
bindtime = 1
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 8210, TempBlack]
type = EnvColor
trigger1 = 1
value = 0,0,0
time = 2
under = 1
ignorehitpause = 1

[State 8210, TempWhite]
type = AssertSpecial
trigger1 = 1
flag = Nomusic
flag2 = NoBarDisplay
flag3 = NoBG

[State 0, ]
type = PowerSet
trigger1 = Time = 0
value = 0

[State 3550, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 25, -57
time = 550
movetime = 550
anim = -1
poweradd = -9000
p2defmul = 1
darken = 0

[State 200, 7]
type = ChangeState
trigger1 = Time = 550
value = 4522

;---------------------------------------------------------------------------
; NOW YOU DIE!!!
[Statedef 4522]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 4526                      ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 1]
type = Posset
Trigger1 = 1
y = 0

[State 8220, Explod]
type = ModifyExplod
trigger1 = Time = [0,250]
ID = 4566
scale = 0.55+time*0.001,0.55+time*0.001

[State 0, PalFXWiz]
type = PalFX
trigger1 = time >= 0
time = 1
add = 0,255,0
color = 0
ignorehitpause = 1

[State 8210, TempWhite]
type = AssertSpecial
trigger1 = 1
flag = Nomusic
flag2 = NoBarDisplay
flag3 = NoBG

[State 0, ]
type = PlaySnd
trigger1 = AnimElem = 5
value = S4500,3
freqmul = 0.75
volume = 255

[State 6500, 5.2]
type = Helper
trigger1 = AnimElem = 5
Helpertype = normal
name = "Effect"
id = 14595
postype = P1
pos = 70, 0
stateno = 14595
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1

[State 8220, Explod]
type = Explod
trigger1 = Time >= 20
trigger1 = Timemod = 5, 0
postype = p1
anim = 3185
ownpal = 1
sprpriority = 99
pos = -160+(random%320),0
facing = -1
scale = 0.5,0.5
supermove = 1
pausemovetime = 99999
supermovetime = 99999

[State 3000, 5]
type = Projectile
trigger1 = Time >= 260
trigger1 = Timemod = 2, 0
projanim = 4810
projID = 4566
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 1
projremove = 0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = 0, 0
attr = S, HA
animtype = Hard
damage = 999999,999999
getpower = 0
priority = 6
guardflag = N
pausetime = 0,5
sparkxy = -10,-50
sparkno = -1
hitsound = -1
guardsound = -1
ground.type = Low
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = 0, -30
air.velocity = 0, -30
air.fall = 1
fall = 1
fall.recover = 0
fall.animtype = Hard
fall.damage = (100*enemy,const(data.life))
p2stateno = 4288
p2facing = 1
getpower = 0,0
givepower = -10000,-10000
numhits = 0

[State 8210, TargetState]
type = targetstate
trigger1 = time >= 260
value = 4288

[State 8210, LifeAddDeduct]
type = TargetLifeAdd
trigger1 = time >= 260
value = Ceil(-9*enemy,const(data.life))
absolute = 1

[State 190, 2]
type = ChangeState
trigger1 = winko
trigger1 = time >= 325
value = 4523
;---------------------------------------------------------------------------
; NOW YOU DIE!!!
[Statedef 4523]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 4528                      ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 1]
type = Posset
Trigger1 = 1
y = 0

[State 8220, Explod]
type = RemoveExplod
trigger1 = 1
ID = 4566

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = [0,128]
time = 1
add = 0,255-time*2,0
color = 0+time*2
ignorehitpause = 1

[State 8210, TempWhite]
type = AssertSpecial
trigger1 = 1
flag = Nomusic
flag2 = NoBarDisplay
flag3 = NoBG

;[State 40000, Sound]
;type = PlaySnd
;trigger1 = Time = 151
;value = 81, 1
;volume = 255
;channel = 14

[State 190, 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Just in case.... 
[Statedef 4555]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 4521                      ;Change animation (Def: no change)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 8210, TempWhite]
type = AssertSpecial
trigger1 = 1
flag = Nomusic
flag2 = NoBarDisplay
supermove = 1
pausemovetime = 99999
supermovetime = 99999

[State 190, 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; MASH
[Statedef 14595]
type = S
ctrl = 0
anim = 9741
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 160]
type = Explod
trigger1 = time = 0
anim = 4310
ID = 4310
pos =  0, 5
postype = p1
ownpal = 1
ignorehitpause = 1
sprpriority = 10
Removetime = -1
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 0.1,0.1

[State 160]
type = Explod
trigger1 = time = 0
anim = 4311
ID = 4311
pos =  0, 0
postype = p1
ownpal = 1
ignorehitpause = 1
sprpriority = 15
Removetime = -1
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 0.1,0.1

[State 160]
type = Explod
trigger1 = time = 0
anim = 4312
ID = 4312
pos =  0, 0
postype = p1
ownpal = 1
ignorehitpause = 1
sprpriority = 15
Removetime = 50
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 0.4,0.1

[State 160]
type = Explod
trigger1 = time >= 30
anim = ifelse(random%2,4315,4316)
ID = 4315
pos = -60, 0+random%320
postype = back
vel = 15,0
accel = 0.5,0
ownpal = 1
ignorehitpause = 1
sprpriority = 10
removetime = 20
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 0.5,0.5

[State 160]
type = varset
trigger1 = time = 0
fv = 30
value = 0

[State 160]
type = varadd
trigger1 = time = [1,50]
fv = 30
value = 0.1

[State 160]
type = ModifyExplod
trigger1 = time = [1,50]
ID = 4310
scale = 0.1+fvar(30),0.1+fvar(30)

[State 160]
type = ModifyExplod
trigger1 = time = [1,50]
ID = 4311
scale = 0.1+fvar(30),0.1+fvar(30)

[State 160]
type = ModifyExplod
trigger1 = time >= 51
ID = 4310
scale = 5,5

[State 160]
type = ModifyExplod
trigger1 = time >= 51
ID = 4311
scale = 5,5

[State 160]
type = varset
trigger1 = time = 0
fv = 31
value = 0

[State 160]
type = varadd
trigger1 = time >= 1
fv = 31
value = 0.02

[State 160]
type = ModifyExplod
trigger1 = time = [1,50]
ID = 4312
scale = 0.4+fvar(30),0.1+fvar(31)

[State 810,]
type = EnvShake
trigger1 = Time = 0
ampl = -20
freq = 255
time = 60

[State 160]
type = Explod
trigger1 = time = 200
anim = 4317
ID = 4317
pos =  0, -50
postype = p1
ownpal = 1
ignorehitpause = 1
sprpriority = 25
Removetime = -1
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 0.1,0.1

[State 0, ]
type = PlaySnd
trigger1 = time = 200
value = S4500,0
freqmul = 0.75
volume = 255

[State 160]
type = Explod
trigger1 = time = 230
anim = 4318
ID = 4318
pos =  0, -50
postype = p1
ownpal = 1
ontop = 1
ignorehitpause = 1
sprpriority = 99
Removetime = -1
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 0.1,0.1

[State 0, ]
type = PlaySnd
trigger1 = time = 230
value = S4500,1
freqmul = 0.75
volume = 255

[State 160]
type = varset
trigger1 = time = 0
fv = 33
value = 0

[State 160]
type = varadd
trigger1 = time >= 200
fv = 33
value = 0.02

[State 160]
type = ModifyExplod
trigger1 = time = [201,300]
ID = 4317
scale = 0.1+fvar(33),0.1+fvar(33)

[State 160]
type = ModifyExplod
trigger1 = time >= 300
ID = 4317
scale = 0.1+fvar(33),0.1+fvar(33)

[State 160]
type = varset
trigger1 = time = 0
fv = 34
value = 0

[State 160]
type = varadd
trigger1 = time >= 230
fv = 34
value = 0.15

[State 160]
type = ModifyExplod
trigger1 = time = [231,330]
ID = 4318
scale = 0.1+fvar(34),0.1+fvar(34)

[State 160]
type = ModifyExplod
trigger1 = time >= 331
ID = 4318
scale = 15,15

[State 3000, 5]
type = Projectile
trigger1 = Time >= 250
trigger1 = numprojID(4566) = 0
projanim = 4810
projID = 4566
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremovetime = 1
projremove = 0
offset = 0, 0
priority = 7, Hit
projpriority = 9999
projsprpriority = -1
velocity = 0, 0
attr = A, HP
animtype = Hard
damage = 999999,999999
getpower = 0
priority = 6
guardflag = N
pausetime = 0,5
sparkxy = -10,-50
sparkno = -1
hitsound = -1
guardsound = -1
ground.type = Low
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = 0, -30
air.velocity = 0, -30
air.fall = 1
fall = 1
fall.recover = 0
fall.animtype = Hard
fall.damage = (100*enemy,const(data.life))
p2stateno = 4288
p2facing = 1
getpower = 0,0
givepower = -10000,-10000
numhits = 0

[State 10000]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
supermove = 1
pausemovetime = 99999
supermovetime = 99999

[State 8220, Immune]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AP, AT

[State 160]
type = ChangeState
trigger1 = time >= 350
trigger1 = winko
value = 14597
;---------------------------------------------------------------------------
; MASH
[Statedef 14597]
type = S
ctrl = 0
anim = 9741
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S1999,77
volume = 255
loop = 1
channel = 29

[State 160]
type = Explod
trigger1 = time = 0
anim = 4319
ID = 4319
pos =  0, -50
postype = p1
ownpal = 1
ignorehitpause = 1
sprpriority = 99
ontop = 1
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 15,15

[State 160]
type = RemoveExplod
trigger1 = 1
ID = 4311

[State 160]
type = RemoveExplod
trigger1 = 1
ID = 4310

[State 160]
type = RemoveExplod
trigger1 = 1
ID = 4317

[State 160]
type = RemoveExplod
trigger1 = 1
ID = 4318

[State 10000]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = nomusic
ignorehitpause = 1
supermove = 1
pausemovetime = 99999
supermovetime = 99999

[State 8220, Immune]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AP, AT
;---------------------------------------------------------------------------
; MASH
[Statedef 14596]
type = S
ctrl = 0
anim = 9741
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 160]
type = Explod
trigger1 = time = 0
anim = 4312
ID = 4318
pos =  0, 0
postype = p1
ownpal = 1
ignorehitpause = 1
sprpriority = -1
removetime = 50
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 5,5

[State 160]
type = varset
trigger1 = time = 0
fv = 32
value = 0

[State 160]
type = varadd
trigger1 = time = [1,50]
fv = 32
value = -0.1

[State 160]
type = ModifyExplod
trigger1 = time = [1,50]
ID = 4318
scale = 5+fvar(32),5+fvar(32)

[State 160]
type = DestroySelf
trigger1 = time = 50

;---------------------------------------------------------------------------
; MASH
[Statedef 14599]
type = S
ctrl = 0
anim = 9741
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 160]
type = Explod
trigger1 = time = 0
anim = 4312
ID = 4318
pos =  0, 0
postype = p1
ownpal = 1
ignorehitpause = 1
sprpriority = -1
removetime = 50
pausemovetime = 65535
supermovetime = 65535
supermove = 1
scale = 5,5

[State 160]
type = varset
trigger1 = time = 0
fv = 32
value = 0

[State 160]
type = varadd
trigger1 = time = [1,50]
fv = 32
value = -0.1

[State 160]
type = ModifyExplod
trigger1 = time = [1,50]
ID = 4318
scale = 5+fvar(32),5+fvar(32)

[State 160]
type = DestroySelf
trigger1 = time = 50
;;=====================================================================
;; OTHERS
;;=====================================================================
; Armor mode (HYPERMODE)
[StateDef 10000]
physics = N

[State anim]
type = ChangeAnim
trigger1 = 1
value = parent,anim
elem = parent,animelemno(0)

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

[State bind]
type = BindToParent
trigger1 = 1

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

[State hit]
type = NotHitBy
trigger1 = parent,movetype = H
value = SCA, NT, ST, HT, NA, SA, HA ,NP, SP, HP, AA, AP, AT

[State hit]
type = NotHitBy
trigger1 = parent,movetype!= H
value = ,NT, ST, HT, AT

[State hit]
type = HitOverride
trigger1 = parent,movetype!= H
attr = SCA, NT, ST, HT, NA, SA, HA ,NP, SP, HP, AA, AP, AT
stateno = 10000
ignorehitpause = 1

[State end]
type = DestroySelf
trigger1 = parent,life = 0
trigger2 = parent,var(27) = 0
;---------------------------------------------------------------------------
; Cytron
[Statedef 19770]
type = A
movetype = I
physics = N
ctrl = 0
anim = 4810
velset = 0,0
sprpriority = -1

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

[State 12500, DON'T TRY TO BREAK IT]
type = HitOverRide
trigger1 = time >= 0
time = 999
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 19770
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 9998, 1]
type = ReversalDef
trigger1 = time >= 0
reversal.attr = SCA, NA, SA, HA, NT, ST, HT, NP, SP, HP
pausetime = 0, 1
priority = 7, Hit
sparkno = -1
numhits = 0
p1stateno = 19779
p2stateno = 19851

[State 195, 2]
type = DestroySelf
trigger1 = enemy,movetype = I
trigger2 = enemy,movetype = H
;---------------------------------------------------------------------------
; Cytron
[Statedef 19779]
type = A
movetype = I
physics = N
ctrl = 0
anim = 9741
velset = 0,0
sprpriority = -1

[State 7680]
type = allpalfx
trigger1 = 1
time = 2
color = 0

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S666,66
volume = 255

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

[State 3906, 017]
type = Explod
trigger1 = time = 0
trigger1 = numexplod(19778) = 0
anim = 4818
ID = 19778
pos = 0,0
postype = left
sprpriority = 98
ontop = 1
ownpal = 1
bindtime = -1
pausemovetime = 999999999
supermovetime = 999999999

[State 7680]
type = allpalfx
trigger1 = 1
time = 2
color = 0

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

[State 4010, HitSecondary]
type = Projectile
trigger1 = time = 0
projanim = 4810
projID = 4011
offset = 0,0
velocity = 0,0
projpriority = 999999
projhitanim = -1
projremanim = -1
projsprpriority = -1
projremovetime = 2
priority = 7
attr = A, HA
damage = 50,50
numhits = 0
givepower = -250,-250
guardflag = N
pausetime = 0,200
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = 0,0
guardsound = 0,0
getpower = 0
ownpal = 1
ground.type = Trip
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0, 0
air.velocity = 0, 0
air.fall = 1
yaccel = 3
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff    = 0
guard.cornerpush.veloff  = 0
airguard.cornerpush.veloff= 0
supermove = 1
pausemovetime = 999999
supermovetime = 999999
p2stateno = 19850

[State 195, 2]
type = DestroySelf
trigger1 = Time = 2
;---------------------------------------------------------------------------
; Hit by a Cytron
[Statedef 19850]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 4

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 1620

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Anim = 1620
trigger1 = Time = 100
value = 1621

[State 4206, Anim2]
type = VelAdd
trigger1 = Anim = 1621
trigger1 = Time >= 100
y = 0.5

[state 4206, Fim]
type = SelfState
trigger1 = Anim = 1621
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;---------------------------------------------------------------------------
; Hit by a Cytron
[Statedef 19851]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 4

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 1620

[State 810, Hurt 11]
type = LifeAdd
trigger1 = Time = 0
value = Ceil(-0.05*enemy,Const(data.life))
absolute = 1

[State 810, Hurt 11]
type = LifeSet
trigger1 = Random > 10
trigger1 = Time = 0
trigger2 = name = "mechhisuiex"
trigger3 = name = "Neco-Arc Z"
value = 0

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Anim = 1620
trigger1 = Time = 100
value = 1621

[State 4206, Anim2]
type = VelAdd
trigger1 = Anim = 1621
trigger1 = Time >= 100
y = 0.5

[State 4206, Anim2]
type = DestroySelf
trigger1 = ishelper

[state 4206, Fim]
type = SelfState
trigger1 = Anim = 1621
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;---------------------------------------------------------------------------
; Hit by a Cytron
[Statedef 19855]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 4

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 1620

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

[State 4206, Anim2]
type = ChangeAnim2
trigger1 = Anim = 1620
trigger1 = Time = 999
value = 1621

[State 4206, Anim2]
type = VelAdd
trigger1 = Anim = 1621
trigger1 = Time >= 999
y = 0.5

[state 4206, Fim]
type = SelfState
trigger1 = Anim = 1621
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
; WinKo effect
[StateDef 666]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 0, ]
type = EnvShake
trigger1 = root,var(10) = 0
trigger1 = root,stateno != [3900,3909]
trigger1 = Time = 0
time = 40
freq = 255
ampl = -30
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = root,var(10) = 0
trigger1 = root,stateno != [3900,3909]
trigger1 = Time = 0
value = S0,21

[State 0, AgainstAny]
type = PlaySnd
triggerall = Time = 30
triggerall = root,stateno != [3900,3909]
trigger1 = root,var(10) = 0
trigger1 = root,var(40) = 0
value = S69,(random%15)
volume = 255
freqmul = 1.1

[State 0, DIEMeltyBlood]
type = PlaySnd
triggerall = Time = 30
triggerall = root,stateno != [3900,3909]
trigger1 = root,var(10) = 0
trigger1 = root,var(40) = 1
value = S75,(random%15)
volume = 255
freqmul = 0.9

[State 0, DIEFaggots]
type = PlaySnd
triggerall = Time = 30
triggerall = root,stateno != [3900,3909]
trigger1 = root,var(10) = 0
trigger1 = root,var(40) = 3
value = S75,1+(random%14)
volume = 255
freqmul = 0.9

; LoseKo effect
[StateDef 69]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 0, ]
type = AssertSpecial
trigger1 = time = [5,40]
flag = nobardisplay
flag2 = nomusic
flag3 = noFG
ignorehitpause = 1

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S3000,1
volume = 255

[State 0, ]
type = PlaySnd
trigger1 = Time = 0
value = S3000,1
volume = 255

[State 0, Finalwords-CURSE YOU-]
type = PlaySnd
triggerall = Time = 20
trigger1 = p2name = "Kung Fu Man" || p4name = "Kung Fu Man" || p2name = "Joe Mayama" || p4name = "Joe Mayama"
trigger2 = p2name = "Kung Fu Dude" || p4name = "Kung Fu Dude"
trigger3 = p2name = "Kung Fu girl" || p4name = "Kung Fu girl"
trigger4 = p2name = "Kung Fu Bender" || p4name = "Kung Fu Bender"
trigger5 = p2name = "Ryu" || p4name = "Ryu"
trigger6 = p2name = "Ken" || p4name = "Ken"
trigger7 = p2name = "Ryo Sakazaki" || p4name = "Ryo Sakazaki"
trigger8 = p2name = "Robert Garcia" || p4name = "Robert Garcia"
trigger9 = p2name = "Shin Gouki" || p4name = "Shin Gouki"
value = S11,ifelse(random<500,2,9)
volume = 255
freqmul = 0.8

[State 0, Finalwords-SOB-]
type = PlaySnd
triggerall = Time = 25
trigger1 = enemy,authorname = "Good Girls"
trigger2 = p2name = "Ayu Tukimiya" || p4name = "Ayu Tukimiya"
trigger3 = p2name = "Mizuka Nagamori" || p4name = "Mizuka Nagamori"
trigger4 = p2name = "Rumi Nanase" || p4name = "Rumi Nanase"
trigger5 = p2name = "Ikumi Amasawa" || p4name = "Ikumi Amasawa"
trigger6 = p2name = "Shiiko Yuzuki" || p4name = "Shiiko Yuzuki"
trigger7 = p2name = "Akane Satomura" || p4name = "Akane Satomura"
trigger8 = p2name = "Kannabi no Mikoto" || p4name = "Kannabi no Mikoto" || p2name = "kanna" || p4name = "kanna"
trigger9 = p2name = "Kano Kirishima" || p4name = "Kano Kirishima"
trigger10 = p2name = "Minagi Tohno" || p4name = "Minagi Tohno"
trigger11 = p2name = "Mai Kawasumi" || p4name = "Mai Kawasumi" || p2name = "Mai_K" || p4name = "Mai_K"
trigger12 = p2name = "Makoto Sawatari" || p4name = "Makoto Sawatari"
trigger13 = p2name = "Kaori Misaka" || p4name = "Kaori Misaka"
trigger14 = p2name = "Shiori Misaka" || p4name = "Shiori Misaka"
trigger15 = p2name = "Misuzu_K" || p4name = "Misuzu_K" || p2name = "Misuzu Kamio" || p4name = "Misuzu Kamio" || p2name = "Misuzu" || p4name = "Misuzu"
trigger16 = p2name = "Misaki Kawana" || p4name = "Misaki Kawana"
trigger17 = p2name = "Nayuki Minase" || p4name = "Nayuki Minase"
trigger18 = p2name = "Mio Kouzuki" || p4name = "Mio Kouzuki" || p2name = "Mio" || p4name = "Mio"
trigger19 = p2name = "Mayu Shiina" || p4name = "Mayu Shiina" || p2name = "Mayu" || p4name = "Mayu"
trigger20 = p2name = "Nayuki Minase" || p4name = "Nayuki Minase"
trigger21 = p2name = "Sayuri Kurata" || p4name = "Sayuri Kurata"
trigger23 = p2name = "Mishio Amano" || p4name = "Mishio Amano" || p2name = "Hyperlion_DeaBN" || p4name = "Hyperlion_DeaBN"
trigger24 = p2name = "UNKNOWN" || p4name = "UNKNOWN" || p2name = "Eien no Mizuka" || p4name = "Eien no Mizuka"
trigger25 = p2name = "Seiryuu no Misuzu" || p4name = "Seiryuu no Misuzu"
trigger26 = p2name = "Misuzu_G" || p4name = "Misuzu_G"
value = S11,ifelse(random<500,1,8)
volume = 255
freqmul = 0.8

[State 0, Finalwords-AMERICAN COWARDS-]
type = PlaySnd
triggerall = Time = 20
trigger1 = p2name = "Terry Bogard" || p4name = "Terry Bogard"
trigger2 = p2name = "Geese Howard" || p4name = "Geese Howard"
trigger3 = p2name = "Geese" || p4name = "Geese"
trigger4 = p2name = "Rock Howard" || p4name = "Rock Howard"
trigger5 = p2name = "Master Cheese" || p4name = "Master Cheese" || p2name = "Master Geese" || p4name = "Master Geese"
trigger6 = p2name = "Big Albert T-Lechy" || p4name = "Big Albert T-Lechy"
trigger7 = p2name = "Homer J Simpson" || p4name = "Homer J Simpson"
trigger8 = p2name = "Peter Griffin" || p4name = "Peter Griffin"
trigger9 = p2name = "Popeye" || p4name = "Popeye"
trigger10 = p2name = "Nightmare Geese" || p4name = "Nightmare Geese"
value = S11,ifelse(random<500,5,10)
volume = 255
freqmul = 0.9

[State 0, Finalwords-YOU BASTARDS-]
type = PlaySnd
triggerall = Time = 25
trigger1 = p2name = "Shiki_Tohno" || p4name = "Shiki_Tohno" || p2name = "Tohno_Shiki" || p4name = "Tohno_Shiki"
trigger2 = p2name = "Shiki_Nanaya" || p4name = "Shiki_Nanaya"
trigger3 = p2name = "Shiki Tohno" || p4name = "Shiki Tohno"
trigger4 = p2name = "Shiki Asshole" || p4name = "Shiki Asshole"
trigger5 = p2name = "The Dirtiest SOB" || p4name = "The Dirtiest SOB"
trigger6 = p2name = "Nanaya_T" || p4name = "Nanaya_T"
trigger7 = p2name = "Etoile Chrono Tokiko" || p4name = "Etoile Chrono Tokiko"
trigger8 = p2name = "hory marlu" || p4name = "hory marlu"
trigger9 = p2name = "Haruhi Suzumiya" || p4name = "Haruhi Suzumiya" || p2name = "Suzumiya Haruhi" || p4name = "Suzumiya Haruhi"
trigger10 = p2name = "Nagato Yuki" || p4name = "Nagato Yuki" || p2name = "Yuki Nagato" || p4name = "Yuki Nagato"
trigger11 = p2name = "asakura ryouko" || p4name = "asakura ryouko"
trigger12 = p2name = "Mikuru Asahina" || p4name = "Mikuru Asahina" || p2name = "asahina mikuru" || p4name = "asahina mikuru"
trigger13 = p2name = "Hoshi Monako" || p4name = "Hoshi Monako"
trigger14 = p2name = "Princess Comet" || p4name = "Princess Comet"
trigger15 = p2name = "Monako Ogura" || p4name = "Monako Ogura"
trigger16 = p2name = "Onpu Segawa" || p4name = "Onpu Segawa"
trigger17 = p2name = "asahina mikuru" || p4name = "asahina mikuru"
trigger18 = p2name = "koizumi itsuki" || p4name = "koizumi itsuki"
trigger19 = p2name = "kyon" || p4name = "kyon"
trigger20 = p2name = "Kyoukon Haruhi" || p2name = "Kyoukon Haruhi"
trigger21 = p2name = "God Haruhi" || p4name = "God Haruhi"
trigger22 = p2name = "Pinakamaduming tao sa balat ng lupa" || p4name = "Pinakamaduming tao sa balat ng lupa"
trigger23 = p2name = "Aku no Tamashi Haruhi" || p4name = "Aku no Tamashi Haruhi"
trigger24 = p2name = "Totally Pissed off Haruhi" || p4name = "Totally Pissed off Haruhi"
trigger25 = p2name = "HATSUNE MIKU" || p4name = "HATSUNE MIKU"
trigger26 = p2name = "Misuzu_M" || p4name = "Misuzu_M"
trigger27 = p2name = "tsuruya-san" || p4name = "tsuruya-san"
trigger28 = p2name = "Shiki Kageya" || p4name = "Shiki Kageya" || p2name = "Nanaya-Satsujinki" || p4name = "Nanaya-Satsujinki"
value = S11,ifelse(random<500,3,4)
volume = 255
freqmul = 0.9

[State 0, Finalwords-SCREW YOU-]
type = PlaySnd
triggerall = Time = 25
trigger1 = p2name = "Kohaku" || p4name = "Kohaku"
trigger2 = p2name = "Hisui&Kohaku" || p4name = "Hisui&Kohaku"
trigger3 = p2name = "Hisui" || p4name = "Hisui"
trigger4 = p2name = "Arcueid Brunestud" || p4name = "Arcueid Brunestud" || p2name = "Arcueid_Brunestud" || p4name = "Arcueid_Brunestud"
trigger5 = p2name = "Akiha_Tohno" || p4name = "Akiha_Tohno" || p2name = "seifuku_akiha" || p4name = "seifuku_akiha"
trigger6 = p2name = "Satsuki_Yumiduka" || p4name = "Satsuki_Yumiduka" || p2name = "Yumiduka_Satsuki" || p4name = "Yumiduka_Satsuki"
trigger7 = p2name = "Miyako Arima" || p4name = "Miyako Arima" || p2name = "Arima_Miyako" || p4name = "Arima_Miyako"
trigger8 = p2name = "Ciel" || p4name = "Ciel"
trigger9 = p2name = "Nero Chaos" || p4name = "Nero Chaos" || p2name = "Nrvnqsr_Chaos" || p4name = "Nrvnqsr_Chaos" || p2name = "necoarc_abyss" || p4name = "necoarc_abyss"
trigger10 = p2name = "Len" || p4name = "Len"
trigger11 = p2name = "Akaitsuki" || p4name = "Akaitsuki"
trigger12 = p2name = "White_Len" || p4name = "White_Len" || p2name = "White_Len(CPU)" || p4name = "White_Len(CPU)"
trigger13 = p2name = "Warcueid" || p4name = "Warcueid" || p2name = "Warcueid_T" || p4name = "Warcueid_T"
trigger14 = p2name = "Sion Eltnam Atlasia" || p4name = "Sion Eltnam Atlasia" || p2name = "Sion TATARI" || p4name = "Sion TATARI" || p2name = "Sion_Eltnam_Atlasia" || p4name = "Sion_Eltnam_Atlasia"
trigger15 = p2name = "Mech-HISUI" || p4name = "Mech-HISUI"
trigger16 = p2name = "Red Arcueid" || p4name = "Red Arcueid" || p2name = "Red_Arcueid" || p4name = "Red_Arcueid"
trigger17 = p2name = "Neco-Arc" || p4name = "Neco-Arc" || p2name = "Neco-Arc Z" || p4name = "Neco-Arc Z"
trigger18 = p2name = "7th Heaven Ciel" || p4name = "7th Heaven Ciel" || p2name = "Full Armor Ciel" || p4name = "Full Armor Ciel"
trigger19 = p2name = "Mech-HISUIX" || p4name = "Mech-HISUIX" || p2name = "mechhisuiex" || p4name = "mechhisuiex"
trigger20 = p2name = "Stupid Mech-HISUIX" || p4name = "Stupid Mech-HISUIX"
trigger21 = p2name = "Aoko Aozaki" || p4name = "Aoko Aozaki" || p2name = "Aozaki_Aoko(CPU)"  || p4name = "Aozaki_Aoko(CPU)"
trigger22 = p2name = "Arcueid The Stinkbag" || p4name = "Arcueid The Stinkbag"
trigger23 = p2name = "Akiha_Vermilion" || p4name = "Akiha_Vermilion"
trigger24 = p2name = "Dark Arcueid" || p4name = "Dark Arcueid" || p2name = "Dark Arcueid mk2" || p4name = "Dark Arcueid mk2"
trigger25 = p2name = "Kishima_kouma" || p4name = "Kishima_kouma" || p2name = "Kishima Kouma" || p4name = "Kishima Kouma"
trigger26 = p2name = "Warakia" || p4name = "Warakia"
trigger27 = p2name = "Warachia" || p4name = "Warachia"
trigger28 = p2name = "Neco-Arc Chaos" || p4name = "Neco-Arc Chaos" || p2name = "necochaosblackG666mk2" || p4name = "necochaosblackG666mk2"
value = S11,ifelse(random<500,6,7)
volume = 255
freqmul = 0.9

[State 0, Finalwords-NOOOOOOOO-]
type = PlaySnd
triggerall = Time = 25
trigger1 = p2name = "Zengar Zonvolt" || p4name = "Zengar Zonvolt" || p2name = "Woldan Ymir" || p4name = "Woldan Ymir" || p2name = "Daizengar" || p4name = "Daizengar"
trigger2 = p2name = "Kusuha Mizuha" || p4name = "Kusuha Mizuha" || p2name = "Ryuukoou" || p4name = "Ryuukoou" || p2name = "Shin Ryuukoou" || p4name = "Shin Ryuukoou"
trigger3 = p2name = "Brooklyn Rockfield" || p4name = "Brooklyn Rockfield" || p2name = "Koryuuou" || p4name = "Koryuuou" || p2name = "Shin Koryuuou" || p4name = "Shin Koryuuou"
trigger4 = p2name = "Elzam V Brainstein" || p4name = "Elzam V Brainstein" || p2name = "TROMBE" || p4name = "TROMBE" || p2name = "Aussensider" || p4name = "Aussensider"
trigger5 = p2name = "Mai Tokiha" || p4name = "Mai Tokiha" || p2name = "Kagotsuchi" || p4name = "Kagotsuchi"
trigger6 = p2name = "Natsuki Kuga" || p4name = "Natsuki Kuga" || p2name = "Duran" || p4name = "Duran"
trigger7 = p2name = "Mikoto Minagi" || p4name = "Mikoto Minagi" || p2name = "Miroku" || p4name = "Miroku"
trigger8 = p2name = "Shizuru Fujino" || p4name = "Shizuru Fujino" || p2name = "Kiyohime" || p4name = "Kiyohime"
trigger9 = p2name = "Nao Yuuki" || p4name = "Nao Yuuki" || p2name = "Julia" || p4name = "Julia"
trigger10 = p2name = "Himeko Kurusugawa" || p4name = "Himeko Kurusugawa" || p2name = "Himiko" || p4name = "Himiko"
trigger11 = p2name = "Chikane Himemiya" || p4name = "Chikane Himemiya" || p2name = "Kaon" || p4name = "Kaon"
trigger12 = p2name = "Kuon Minazuki" || p4name = "Kuon Minazuki"
trigger13 = p2name = "Kane" || p4name = "Kane"
trigger14 = p2name = "dragon" || p4name = "dragon"
value = S11,ifelse(random<500,12,11)
volume = 255
freqmul = 0.9

[State 0, Finalwords-WHAT...THE...F....-]
type = PlaySnd
triggerall = Time = 20
trigger1 = p2name = "Moon Rabbit" || p4name = "Moon Rabbit" || p2name = "Reisen Dono" || p4name = "Reisen Dono"
trigger2 = p2name = "Reisen Udongein Inaba" || p4name = "Reisen Udongein Inaba"
trigger3 = p2name = "Yuyuko Saigyouji" || p4name = "Yuyuko Saigyouji"
trigger4 = p2name = "Bloosom Ghost" || p4name = "Bloosom Ghost"
trigger5 = p2name = "Yukari Yakumo" || p4name = "Yukari Yakumo"
trigger6 = p2name = "Reimu_Hakurei" || p4name = "Reimu_Hakurei" || p2name = "Reimu Hakurei" || p4name = "Reimu Hakurei"
trigger7 = p2name = "Youmu Konpaku" || p4name = "Youmu Konpaku" || p2name = "Youmu_Konpaku" || p4name = "Youmu_Konpaku"
trigger8 = p2name = "Remilia Scarlet" || p4name = "Remilia Scarlet" || p2name = "Remilia_Scarlet" || p4name = "Remilia_Scarlet"
trigger9 = p2name = "Yukari Yakumo" || p4name = "Yukari Yakumo"
trigger10 = p2name = "The Fat Bug" || p4name = "The Fat Bug"
trigger11 = p2name = "Aner" || p4name = "Aner"
trigger12 = p2name = "Sonsaku Hakufu" || p4name = "Sonsaku Hakufu"
value = S11,13+(random%3)
volume = 255
freqmul = 1.1

[State 0, ]
type = AllPalFX
trigger1 = Time = [5,35]
time = 5
mul = 0,0,0
ignorehitpause = 1

[State 0, ]
type = EnvColor
trigger1 = Time = [5,35]
value = 255,255,255
time = 5
under = 1
ignorehitpause = 1

[State 0, ]
type = SuperPause
trigger1 = Time = 0
time = 40
anim = -1
movetime = 40
darken = 0
;p2defmul = 0
;poweradd = 0
;unhittable = 1
ignorehitpause = 1
;persistent = 1

; LoseKo effect (vs, Enemies)
[StateDef 669]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 0, ]
type = AssertSpecial
trigger1 = time >= 0
flag = nobardisplay
flag2 = nomusic
flag3 = roundnotover
ignorehitpause = 1

[State 5150, 8]
type = PlaySnd
trigger1 = Time = 20
value = s787, (random%5)
volume = 255

[State 0, ]
type = AllPalFX
trigger1 = Time >= 0
time = 1
mul = 0,0,0
ignorehitpause = 1

[State 0, ]
type = SuperPause
trigger1 = Time = 0
time = 700
anim = -1
movetime = 700
darken = 0

[State 0, ]
type = DestroySelf
trigger1 = Time >= 700
;---------------------------------------------------------------------------
; Dizzy State
[Statedef 5300]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 0, ]
type = VarSet
trigger1 = Time = 0
v = 20
value = 0

[State 0, ]
type = ChangeState
triggerall = var(58) = 0
triggerall = random < 500
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "c"
trigger4 = command = "x"
trigger5 = command = "y"
trigger6 = command = "z"
value = 5301

[State 0, ]
type = ChangeAnim
trigger1 = Time = 0
value = 5300

[State 0, ]
type = ChangeState
trigger1 = var(58) = 1
trigger1 = random % 2
value = 0
ctrl = 1

[State 0, ]
type = SelfState
trigger1 = Time >= 200
value = 0
ctrl = 1

[Statedef 5301]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 0, PalFXWiz] ;Generated by MEE PalFX Editor
type = PalFX
trigger1 = Time = 0
time = 10
add = 0,0,0
mul = 256,256,256
sinadd = 32,32,32,4

[State 0, ]
type = ChangeState
triggerall = random < 500
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "c"
trigger4 = command = "x"
trigger5 = command = "y"
trigger6 = command = "z"
value = 5302

[State 0, ]
type = SelfState
trigger1 = Time >= 200
value = 5100

[Statedef 5302]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 0, PalFXWiz] ;Generated by MEE PalFX Editor
type = PalFX
trigger1 = Time = 0
time = 10
add = 0,0,0
mul = 256,256,256
sinadd = 64,64,64,4

[State 0, ]
type = ChangeState
triggerall = random < 500
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "c"
trigger4 = command = "x"
trigger5 = command = "y"
trigger6 = command = "z"
value = 5303

[State 0, ]
type = SelfState
trigger1 = Time >= 200
value = 5100

[Statedef 5303]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 0, PalFXWiz] ;Generated by MEE PalFX Editor
type = PalFX
trigger1 = Time = 0
time = 10
add = 0,0,0
mul = 256,256,256
sinadd = 96,96,96,4

[State 0, ]
type = ChangeState
triggerall = random < 500
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "c"
trigger4 = command = "x"
trigger5 = command = "y"
trigger6 = command = "z"
value = 0
ctrl = 1

[State 0, ]
type = SelfState
trigger1 = Time >= 200
value = 5100

;---------------------------------------------------------------------------
; GET NUKED...LOL!!!
;---------------------------------------------------------------------------
[StateDef 6650]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 9741

[State 6650, 01] 
type = EnvShake
trigger1 = Time = 0
time = 1
ampl = 0
freq = 0

[State 6650, NoBar] 
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[State 40024, Nuked]
type = Explod
trigger1 = Time = 0
anim = 6661
ID = 6661
postype = left
pos = 0,0
facing = 1
bindtime = -1
removetime = 200
ownpal = 0
ontop = 1
supermovetime = 9999
pausemovetime = 9999
scale = 0.5,0.5

[State 6650, 02] 
type = VarSet
trigger1 = Time = 0
fvar(1) = 255

[State 6650, 03] 
type = VarSet
trigger1 = Time = 0
fvar(2) = 255

[State 6650, 04] 
type = VarSet
trigger1 = Time = 0
fvar(3) = 50

[State 6650, 05] 
type = VarAdd
trigger1 = Time = [0,50]
fvar(1) = -5

[State 6650, 06] 
type = VarAdd
trigger1 = Time = [150,200]
fvar(2) = -5

[State 6650, 07] 
type = VarAdd
trigger1 = Time = [201,251]
fvar(2) = 5

[State 6650, 08] 
type = VarAdd
trigger1 = Time = [150,199]
fvar(3) = -1

[State 6650, 09] 
type = VarAdd
trigger1 = Time = [200,225]
fvar(3) = 10

[State 6650, 10] 
type = PalFX
trigger1 = Time = [0,50]
time = 1
add = fvar(1),fvar(1),fvar(1)

[State 6650, 11] 
type = AllPalFX
trigger1 = Time = [150,251]
time = 1
mul = fvar(2),fvar(2),fvar(2)

[State 6650, 12] 
type = BGPalFX
trigger1 = 1
time = 1
color = 256
mul = fvar(3),fvar(3),fvar(3)
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

; (Credit to ANMC, Bagaliao, and FlowaGirl for the basic helper method concept.)
;
;------------------
; AI Activation Helper State - Primary Version
; (Credit to YongMing for the basic HitPause bugfix concept.)
;
; var(1) - First tick button activation prevention.
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Persistent direction command detection enabler (due to 2002.04.14).
; var(9) - AutoTurn bug fixer.
; parent's var(58) - Parent's GameTime var, for pause and custom state check.
; parent's var(59) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9741]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 825]
type = assertspecial
trigger1 = 1
flag = invisible

[State 20000,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[State 20000,プレイヤー判定]
type=varset
Trigger1=command="a"&&root,command="a"
Trigger2=command="b"&&root,command="b"
Trigger3=command="c"&&root,command="c"
Trigger4=command="x"&&root,command="x"
Trigger5=command="y"&&root,command="y"
Trigger6=command="z"&&root,command="z"
Trigger7=command="start"&&root,command="start"
Trigger8=command="fwd"&&root,command="fwd"
Trigger9=command="back"&&root,command="back"
Trigger10=command="up"&&root,command="up"
Trigger11=command="down"&&root,command="down"
var(58)=-1

[State 20000,プレイヤー判定]
type=parentvarset
Trigger1=command="a"&&root,command="a"
Trigger2=command="b"&&root,command="b"
Trigger3=command="c"&&root,command="c"
Trigger4=command="x"&&root,command="x"
Trigger5=command="y"&&root,command="y"
Trigger6=command="z"&&root,command="z"
Trigger7=command="start"&&root,command="start"
Trigger8=command="fwd"&&root,command="fwd"
Trigger9=command="back"&&root,command="back"
Trigger10=command="up"&&root,command="up"
Trigger11=command="down"&&root,command="down"
var(58)=-1

[State 20000,立ったら消失]
Type = DestroySelf
TriggerAll=isHelper
Trigger1=root,var(58)!=0||var(58)=-1
Trigger2=command="a"&&root,command="a"
Trigger3=command="b"&&root,command="b"
Trigger4=command="c"&&root,command="c"
Trigger5=command="x"&&root,command="x"
Trigger6=command="y"&&root,command="y"
Trigger7=command="z"&&root,command="z"
Trigger8=command="start"&&root,command="start"
Trigger9=command="fwd"&&root,command="fwd"
Trigger10=command="back"&&root,command="back"
Trigger11=command="up"&&root,command="up"
Trigger12=command="down"&&root,command="down"

[State 20000,AIﾌﾗｸﾞON]
Type=varset
TriggerAll=var(58)!=-1
Trigger1=root,command="a"
Trigger2=root,command="b"
Trigger3=root,command="c"
Trigger4=root,command="x"
Trigger5=root,command="y"
Trigger6=root,command="z"
Trigger7=root,command="start"
Trigger8=root,command="fwd"&&(roundstate=2&&root,stateno=0)
Trigger9=root,command="back"&&(roundstate=2&&root,stateno=0)
Trigger10=root,command="up"&&(roundstate=2&&root,stateno=0)
Trigger11=root,command="down"&&(roundstate=2&&root,stateno=0)
var(58)=1