;------------------------------------------------------
;CNS file for Broli ver.1.2 (from SNES,"Dragon Ball Z") 
;Originally created by Kuzu-bei for MUGEN 06.27  
;Changes and Tutorial Notes made by The Necromancer
;------------------------------------------------------

;------------
;基本技
;Normal Moves
;------------

;This CNS file contains all of Broli's basic attacks.
;---------------------------------------------------------------------------
;立ちパンチ（対地、遠距離）
;Strong Punch
[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1
ctrl = 0                         
poweradd = 0    
facep2 = !(prevstateno = 9010)

[State 200, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 200
value = 200

;This makes sure that Broli will not move up or down. This is used in the air.
[State 200, VelSetY]
Type = VelSet
Trigger1 = Time = 0 
y = 0

;This is the Strong Punch.(Custom State)
[State 200, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     
damage    = 25                   
animtype = Medium                 
getpower = 0                                               
givepower = 25                                                 
guardflag = MA                   
hitflag = MAP                    
priority = 3, Hit                
pausetime = 15,11                  
;sparkno = 0, 3                   
sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = Trip                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -3,-3.5        
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3                   
fall = 1                         
fall.recover = 0
p2stateno = 6001

;This is the Strong Punch.(Normal)
[State 200, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     
damage    = 25                   
animtype = Medium                 
getpower = 0                                               
givepower = 25                                                 
guardflag = MA                   
hitflag = MAP                    
priority = 3, Hit                
pausetime = 0,11                  
;sparkno = 0, 3                   
sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = Trip                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -3,-3.5        
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3                   
fall = 1                         
fall.recover = 0

;This moves Broli forward whenever he hits the opponent against the wall. (Better combos) 
[State 200, PosAddX]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

;This makes sure that Broli will not move up or down. Used in the air.
[State 200, VelSetY]
type = VelSet
trigger1 = Time = 0 
y = 0

;This plays the attack's swing sound effect.
[State 200, SwgSnd]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 200, NoContact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 410

[State 200, Contact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveHit = 1
trigger1 = Time = 6
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 212

;This ends the move.
[State 200, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ちパンチ（対地、近距離）
;Weak Punch
[Statedef 201]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
ctrl = 0                         
facep2 = !(prevstateno = 9010)                   

[State 201, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 201
value = 201

;This moves Broli forward whenever he hits the opponent against the wall. (Better combos) 
[State 201, PosAdd]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

;This prevents Broli from moving up or down if he attacks in the air.
[State 201, VelSetY]
type = VelSet
trigger1 = Time = 0 
y = 0

;The Weak Punch attack.(Custom State)
[State 201, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     
damage    = 20                   
animtype = Medium                
getpower = 0                 
givepower = 20                 
guardflag = MA                   
hitflag = MA                    
priority = 3, Hit                
pausetime = 11,11                
numhits = 1                      
sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = High                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -4             
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3           
p2stateno = 6001

;The Weak Punch attack.(Normal)
[State 201, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     
damage    = 20                   
animtype = Medium                
getpower = 0                 
givepower = 20                 
guardflag = MA                   
hitflag = MA                    
priority = 3, Hit                
pausetime = 0,11                
numhits = 1                      
sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = High                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -4             
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3           

;This plays the attack's swing sound effect.
[State 201, SwgSnd]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 201, NoContact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = AnimTime = 0
trigger1 = MoveContact = 0
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 202

[State 201, MoveGuarded]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 410

[State 201, MoveHit]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveHit = 1
trigger1 = Time = 6
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 211 

;This ends the move.
[State 201, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ちパンチ（対空）
;Medium Punch
[Statedef 202]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
ctrl = 0                         
facep2 = !(prevstateno = 9010)               

[State 202, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 202
value = 202

;This moves Broli forward if he is near the edge of the screen, and has hitted the opponent.
[State 202, PosAdd]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

;Makes sure that Broli will not move up or down, if he is in the air.
[State 202, VelSet]
type = VelSet
trigger1 = Time = 0 
y = 0

;The Medium Punch.(Custom State)
[State 202, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     
damage    = 22                   
animtype = Medium                
getpower = 0                 
givepower = 20                 
guardflag = MA                   
hitflag = MA                    
priority = 3, Hit                
pausetime = 15,11                
numhits = 1                      
sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = Trip                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -4,-3.5             
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3  
p2stateno = 6001         

;The Medium Punch.(Normal)
[State 202, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     
damage    = 22                   
animtype = Medium                
getpower = 0                 
givepower = 20                 
guardflag = MA                   
hitflag = MA                    
priority = 3, Hit                
pausetime = 0,11                
numhits = 1                      
sparkxy = -10,-70                
hitsound = S20, 0                   
guardsound = S20, 3                 
ground.type = Trip                 
ground.slidetime = 12             
ground.hittime  = 15             
ground.velocity = -4,-3.5             
airguard.velocity = -1.9,-.8     
air.velocity = -1.3,-3  

;This plays the attack's punch swing sound effect.
[State 202, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 202, NoContact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 410

[State 202, Contact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveHit = 1
trigger1 = Time = 6
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 210 

;This ends the move.
[State 202, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ちキック（対地、遠距離）
;Medium Kick
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
facep2 = !(prevstateno = 9010)

[State 210, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 210
value = 210

;This moves Broli forward if he has hitted the opponent, and near the wall.
[State 210, PosAddX]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 80
x = -2

;Makes sure that Broli does not move up or down, if he is in the air.
[State 210, VelSetY]
type = VelSet
trigger1 = Time = 0 
y = 0

;Plays the attack's kick swing sound effect.
[State 210, PlaySnd]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

;The Medium Kick.(Custom State)
[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 1
trigger2 = Var(5) != 0
attr = S, NA
animtype  = Medium
damage    = 22
guardflag = MA
pausetime = 15,11
sparkxy = -10,-70
getpower = 0
givepower = 35
hitsound = S20, 0
guardsound = S20, 3
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3,-4.5
air.velocity = -2.2,-3.2
p2stateno = 6001

;The Medium Kick.(Normal)
[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 1
trigger2 = Var(5) != 0
attr = S, NA
animtype  = Medium
damage    = 22
guardflag = MA
pausetime = 0,11
sparkxy = -10,-70
getpower = 0
givepower = 35
hitsound = S20, 0
guardsound = S20, 3
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3,-4.5
air.velocity = -2.2,-3.2

[State 210, NoContact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 410

[State 210, Contact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveHit = 1
trigger1 = Time = 6
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 200 

;This ends the move.
[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ちキック（対地、近距離）
;Weak Kick
[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
facep2 = !(prevstateno = 9010)

[State 211, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 211
value = 211

[State 211, PosAddX]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 100
x = -2

[State 211, 0]
type = VelSet
trigger1 = Time = 0 
y = 0

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

;The Weak Kick.(Custom State)
[State 211, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 1
trigger2 = Var(5) != 0
attr = S, NA
animtype  = Medium
damage    = 20
hitflag = MAD
guardflag = MA
pausetime = 11,11
sparkxy = -10,-70
getpower = 0
givepower = 30
hitsound = S20, 0
guardsound = S20, 3
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2
p2stateno = 6001

;The Weak Kick.(Normal)
[State 211, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 1
trigger2 = Var(5) != 0
attr = S, NA
animtype  = Medium
damage    = 20
hitflag = MAD
guardflag = MA
pausetime = 0,11
sparkxy = -10,-70
getpower = 0
givepower = 30
hitsound = S20, 0
guardsound = S20, 3
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2.2,-3.2

[State 211, NoContact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 410

[State 211, Contact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveHit = 1
trigger1 = Time = 6
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 202 

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

;---------------------------------------------------------------------------
;立ちキック（対空）
;Strong Kick
[Statedef 212]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
facep2 = !(prevstateno = 9010)

[State 212, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 212
value = 212

[State 212, 0]
type = PosAdd
trigger1 = MoveHit = 1 
trigger1 = Pos Y < 0 
trigger1 = FrontEdgeBodyDist < 80
x = -2

[State 212, 0]
type = VelSet
trigger1 = Time = 0 
y = 0

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

[State 212, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 1
trigger2 = Var(5) != 0
attr = S, NA
animtype  = Medium
damage    = 25
hitflag = MAFP
guardflag = MA
pausetime = 15,11
sparkxy = -10,-70
getpower = 0
givepower = 30
hitsound = S20, 0
guardsound = S20, 3
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3,-4.5
air.velocity = -2.2,-3.2
p2stateno = 6001
fall = 1
fall.recover = 0

[State 212, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 1
trigger2 = Var(5) != 0
attr = S, NA
animtype  = Medium
damage    = 25
hitflag = MAFP
guardflag = MA
pausetime = 0,11
sparkxy = -10,-70
getpower = 0
givepower = 30
hitsound = S20, 0
guardsound = S20, 3
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3,-4.5
air.velocity = -2.2,-3.2
fall = 1
fall.recover = 0

[State 212, NoContact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 410

[State 212, Contact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveHit = 1
trigger1 = Time = 6
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 1020 

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

;---------------------------------------------------------------------------
;下パンチ
;Crouch Punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
facep2 = !(prevstateno = 9010)

[State 400, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 400
value = 400

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

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 20
getpower  = 0
givepower = 10
hitflag = MAD
guardflag = L
pausetime = 15,12
sparkxy = -2,-41
hitsound = S20, 0
guardsound = S20, 3
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3
down.velocity = -4,0
down.hittime = 20

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

[State 201, NoContact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 1060

[State 201, Contact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveHit = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 410 

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

;---------------------------------------------------------------------------
;下キック
;Crouch Kick
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
anim = 410
facep2 = !(prevstateno = 9010)

[State 410, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 410
value = 410

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

[State 410, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 22
getpower  = 0
givepower = 35
animtype = Medium
hitflag = MAD
guardflag = L
pausetime = 15,12
sparkxy = -5,-10
hitsound = S20, 0
guardsound = S20, 3
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1.5
air.velocity = -1.2,-2.3
guard.velocity = -5

[State 201, NoContact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 1060

[State 201, Contact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveHit = 1
trigger1 = P2BodyDist X <= 50
trigger1 = P2BodyDist Y >= -50
value = 211

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

;---------------------------------------------------------------------------
;ジャンプキック（パンチ）
;Jump Kick
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 610
facep2 = !(prevstateno = 9999)

[State 610, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 610
value = 610

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

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 65
getpower  = 0
givepower = 40
guardflag = HA
animtype = Medium
pausetime = 11,11
sparkxy = -10,-51
hitsound = S20, 0
guardsound = S20, 3
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -3,-4
air.velocity = -1.3,-3

[State 610, Contact]
type = ChangeState
trigger1 = PalNo = [7, 12]
trigger1 = MoveGuarded = 1
value = 211 

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

;This character is not to be distributed in any other site, other than those 
;of the Mugen Elite, or of the ReadMe file. If you have downloaded this 
;character from another site, please send an e-mail to "The Necromancer",
;at demon_nightmare@hotmail.com. The tutorials contained within this characters 
;are properties of the Mugen Elite.

