; Player's constants.
; Format (case insensitive):
;  [groupname]        
;  constname = "value"

[Data]
life = 1000          ;Amount of life to start with
attack = 100         ;100% attack power (more is stronger)
defence = 100        ;100% defensive power (more is stronger)
fall.defence_up = 50 ;Def goes up by 50% everytime player is hit on ground
liedown.time = 30    ;Time player takes before getting up from HIT_LIEDOWN
airjuggle = 15       ;Can do 15 points of juggling
sparkno = 2        ;Default spark number
guard.sparkno = 40 ;Default guard spark number
KO.echo = 0          ;1 to enable echo on KO
volume = 20           ;Volume offset (negative for softer)

[Size]
xscale = 1           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 7     ;Player width (back, ground)
ground.front = 7    ;Player width (front, ground)
air.back = 7        ;Player width (back, air)
air.front = 7       ;Player width (front, air)
z.width = 3          ;Player width (into and out)
height = 60	     ;Height of player (for opponent to jump over)
attack.width = 4,4   ;Default attack width: back, front
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too
head.pos = 4, -40   
mid.pos = 1, -27   

[Velocity]
walk.fwd  = 2      ;Walk forward
walk.back = -2     ;Walk backward
run.fwd  = 4.6, 0    ;Run forward (x, y)  - if y<0, player will hop
run.back = -4.5,-3.8 ;Run backward (x, y) - if y=0, player will run
jump.neu = 0,-6.3    ;Neutral jumping velocity (x, y)
jump.back = -2.55    ;Jump back Speed (x, y)
jump.fwd = 2.5       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -2.55,-8.1 ;Air jump speeds (opt)
airjump.fwd = 2.5,-8.1    ;.

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

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

;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0,0

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

;---------------------------------------------------------------------------
; WIN
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181

;---------------------------------------------------------------------------
; WIN1
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0,0

[State 181, 1]
type = Posset
trigger1 = time = 1
y = 300

[State 181,1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
value = 180, 0


[State 181, 2]
type = Projectile
trigger1 = time = 0
projanim = 020
projshadow = 68,68,68
postype = p1
offset = 0,0
velocity = 2, 0 
projremovetime = 1000

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

;---------------------------------------------------------------------------
; INTRO
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0,0


[State 191, 1] 
type = AssertSpecial
trigger1 = Time = [0,194] 
v = 9
flag = Intro 
value = 1

[State 191, 2] ;Intro over, set v9 to 1
type = VarSet
trigger1 = Time = 60
v = 9
value = 0


;---------------------------------------------------------------------------
; STAND_A
[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 = 10                    ;Power to add (Def: 0)

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

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 23                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
;getpower = 30,15                 ;Power to get on hit, on guard
;                                 ;(Def Hit: 0)  (Def Guard: 1/2 of hit power)
;givepower = 15,8                 ;Power to give opponent on hit, on guard
;                                 ;(Def Hit: 0)  (Def Guard: 1/2 of hit power)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
                                 ;Hit/Miss/Dodge type (Def: Hit)
pausetime = 7,8                  ;Time attacker pauses, time victim shakes
numhits = 1                      ;Number of hits to count as (Def: 1)
sparkno = 0                   ;Spark image group and no (Def: set above)
sparkxy = 0, -28                ;X-offset for the "hit spark" rel. to p2,
                                 ;Y-offset for the spark rel. to p1
hitsound = s200,1                   ;Sound to play on hit
guardsound = 6,0                 ;Sound to play on guard
; mindist  = 0,0,0                 ;Min distance of p2 from p1 when hit
; maxdist  = 0,0,0                 ;Max distance of p2 from p1 when hit
; snap = 0,0,0                     ;Snaps p2 to position rel to p1
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the victim slides back
ground.hittime  = 11             ;Time victim is in hit state
ground.velocity = -4             ;Velocity at which victim is pushed
; guard.slidetime = 5              ;Values for guarded attack (def: ground.slidetime)
; guard.hittime  = 15              ; (def: ground.hittime)
; guard.velocity = -4              ; (def: ground.velocity)
; guard.ctrltime = 7               ;Time to regain control after guard (def: guard.slidetime)
airguard.velocity = -1.9         ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
; airguard.ctrltime = 7            ;Time to regain control after air guard (def: ground.ctrltime)
; air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.3,-3           ;X-velocity at which victim is pushed,
                                 ;Y-velocity at which victim is pushed
;air.hittime = 20                  ;Time before oppoment regains control in air
; attack.width = 3, 3              ;Override default attack width
; fall = 0                         ;1 to cause opponent to fall (def: 0)
; fall.damage = 0                  ;Damage opponent takes on fall
; fall.velocity = n/a,-4.5         ;X, Y-velocity after bouncing off ground
; fall.animtype = Back             ;Animation type for falling people (def: Back)
; air.fall = 0                     ;1 to cause opponent to fall if in air (def: same as fall)
; down.velocity = ?,?              ;Velocity for opponents lying down (def: same as air.velocity)
; down.hittime = 20                ;Time opponent is stunned on ground (only for down.y-velocity = 0) (def: 20)
; down.bounce = 0                  ;Set to 1 for opponent to bounce on ground (def: 0)

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


;---------------------------------------------------------------------------
;CROUCH_A
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 10
ctrl = 0
anim = 400

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

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 23
animtype  = Light
getpower  = 10
givepower = 8
hitflag = MAFD
guardflag = L
pausetime = 0,12
sparkno = 0
sparkxy = 0, -15
hitsound = s200,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3
down.velocity = -4,0
down.hittime = 20

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


;---------------------------------------------------------------------------
;JUMP_A
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 10
ctrl = 0
anim = 600

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

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 23
getpower  = 10
givepower = 10
guardflag = HA
priority = 3
pausetime = 0,10
sparkno = 0
sparkxy = 0, -28 
hitsound = s200,1
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3


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

;---------------------------------------------------------------------------
;短剣
[Statedef 1000]
type    = S
movetype= A
physics = S
poweradd= 20
ctrl = 0
velset = 0
anim = 300



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


[State 1000, 2]
type = Projectile
trigger1 = AnimElem = 4
projID = 1000
projanim = 1000
projshadow = 68,68,68
;projhitanim = 1000
offset = 8, -30
velocity = 5, 0
remvelocity = 0, 0
velmul = 1, 1
accel = 0, 0
projhits = 1
projmisstime = 2
attr = C, SP
damage    = 30,5
animtype  = Hard
getpower  = 30
givepower = 30
hitflag = MA
guardflag = MA
pausetime = 4,6
sparkno = 0
sparkxy = 5, 0
hitsound = s200,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -3.5  
airguard.velocity = -3.5   
air.type = Low
air.velocity = -3.5,-3
air.juggle = 6
fall = 0
fall.animtype = Hard

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

;---------------------------------------------------------------------------
;ジャンプ短剣
[Statedef 1001]
type    = A
movetype= A
physics = A
poweradd= 20
ctrl = 0
anim = 300

[State 1001,1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1000, 0


[State 1001, 2]
type = Projectile
trigger1 = AnimElem = 4
projID = 1000
projanim = 1000
projshadow = 68,68,68
;projhitanim = 1000
offset = 8, -30
velocity = 5, 0
remvelocity = 0, 0
velmul = 1, 1
accel = 0, 0
projhits = 1
projmisstime = 2
attr = C, SP
damage    = 30,5
animtype  = Hard
getpower  = 30
givepower = 30
hitflag = MA
guardflag = MA
pausetime = 4,6
sparkno = 0
sparkxy = 5, 0
hitsound = s200,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -3.5  
airguard.velocity = -3.5   
air.type = Low
air.velocity = -3.5,-3
air.juggle = 6
fall = 0
fall.animtype = Hard

[State 1001, 2]
type = CtrlSet
trigger1 = Time = 17
value = 1

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

;---------------------------------------------------------------------------
;斧
[Statedef 1100]
type    = S
movetype= I
physics = S
poweradd= 20
anim = 300
ctrl = 0

[State 1100,2]
type = Helper    
trigger1 = AnimElem = 4
id = 1100                    
name = "Axe"
pos = 5,-20                 
postype = p1            
stateno = 1150         
helpertype = normal
keyctrl = 0
ownpal = 1

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

;---------------------------------------------------------------------------
;ジャンプ斧
[Statedef 1101]
type    = A
movetype= I
physics = A
poweradd= 20
anim = 300
ctrl = 0


[State 1101,2]
type = Helper    
trigger1 = AnimElem = 4
id = 1100                    
name = "Axe"
pos = 5,-20                 
postype = p1            
stateno = 1150         
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1101,11]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;斧発射
[Statedef 1150]
type    = A
movetype= A
physics = N
anim = 1100

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

[State 1150,2]
type = Velset
trigger1 = time = 0
x = 2.5
y = -10

[State 1150,2]
type = Veladd
trigger1 = time >= 0
y = 0.35
 
[State 1150,3]
type = HitDef
triggerall = p2movetype != H
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
attr = S, SP
damage    = 60,10
getpower  = 30
givepower = 25
guardflag = HA
priority = 3
pausetime = 0,30
sparkno = 0
sparkxy = -2,-11 
hitsound = s200,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3


[State 1150,4]
type = DestroySelf
trigger1 = Pos Y >= 0


;---------------------------------------------------------------------------
;聖水
[Statedef 1500]
type    = S
movetype= I
physics = S
poweradd= 20
anim = 300
ctrl = 0


[State 1500,2]
type = Helper    
trigger1 = AnimElem = 4
id = 1500                    
name = "Holy Water"
pos = 14,-30                 
postype = p1            
stateno = 1550         
helpertype = normal
keyctrl = 0
ownpal = 1

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

;---------------------------------------------------------------------------
;ジャンプ聖水
[Statedef 1501]
type    = A
movetype= I
physics = A
poweradd= 20
anim = 300
ctrl = 0


[State 1501,2]
type = Helper    
trigger1 = AnimElem = 4
id = 1500                    
name = "Holy Water"
pos = 14,-30                 
postype = p1            
stateno = 1550         
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1501,11]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;聖水発射
[Statedef 1550]
type    = A
movetype= A
physics = N
anim = 1500

[State 1550,2]
type = Velset
trigger1 = time = 0
x = 2.5
y = 3
 
[State 1550,3]
type = HitDef
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
attr = S, SP
damage    = 50,10
givepower = 25
guardflag = HA
priority = 3
pausetime = 0,30
sparkno = -1
sparkxy = -2,-11 
hitsound   = s1000,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3
palfx.time = 30
palfx.add = 0,100,100

[State 1550, 4]
type = ChangeState
trigger1 = Pos Y >= -1
value = 1600


[State 1550,4]
type = DestroySelf
trigger1 = Time = 100

；聖水爆発
[Statedef 1600]
type    = A
movetype= A
physics = N
velset = 1.8,0
anim = 1501

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

[State 1600, 3]
type = Projectile
trigger1 = Time = 0
projID = 1501
projanim = 1510
projhitanim = 1510
projshadow = 68,68,68
offset = 0,0
velocity = 0, 0
attr = S, SP
damage    = 15,5
givepower = 10
guardflag = MA
hitflag = MAFD
priority = 3
pausetime = 0,10
sparkno = -1
sparkxy = -2,-11 
hitsound = s200,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3
palfx.time = 30
palfx.add = 0,0,255
palfx.sinadd = 255,255,255,3
projremovetime = 20



[State 1600, 3]
type = Projectile
trigger1 = Time = 7
projID = 1501
projanim = 1510
projhitanim = 1510
projshadow = 68,68,68
offset = 0,0
velocity = 0, 0
attr = S, SP
damage    = 15,5
givepower = 10
guardflag = MA
hitflag = MAFD
priority = 3
pausetime = 0,10
sparkno = -1
sparkxy = -2,-11 
hitsound = s200,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3
palfx.time = 30
palfx.add = 0,0,255
palfx.sinadd = 255,255,255,3
projremovetime = 20

[State 1600, 3]
type = Projectile
trigger1 = Time = 14
projID = 1501
projanim = 1510
projhitanim = 1510
projshadow = 68,68,68
offset = 0,0
velocity = 0, 0
attr = S, SP
damage    = 15,5
givepower = 10
guardflag = MA
hitflag = MAFD
priority = 3
pausetime = 0,10
sparkno = -1
sparkxy = -2,-11 
hitsound = s200,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3
palfx.time = 30
palfx.add = 0,0,255
palfx.sinadd = 255,255,255,3
projremovetime = 20


[State 1600, 3]
type = Projectile
trigger1 = Time = 21
projID = 1501
projanim = 1510
projhitanim = 1510
projshadow = 68,68,68
offset = 0,0
velocity = 0, 0
attr = S, SP
damage    = 15,5
givepower = 10
guardflag = MA
hitflag = MAFD
priority = 3
pausetime = 0,10
sparkno = -1
sparkxy = -2,-11 
hitsound = s200,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3
palfx.time = 30
palfx.add = 0,0,255
palfx.sinadd = 255,255,255,3 
projremovetime = 20

[State 1600, 3]
type = Projectile
trigger1 = Time = 28
projID = 1501
projanim = 1510
projhitanim = 1510
projshadow = 68,68,68
offset = 0,0
velocity = 0, 0
attr = S, SP
damage    = 15,5
givepower = 10
guardflag = MA
hitflag = MAFD
priority = 3
pausetime = 0,10
sparkno = -1
sparkxy = -2,-11 
hitsound = s200,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3
palfx.time = 30
palfx.add = 0,0,255
palfx.sinadd = 255,255,255,3
projremovetime = 20

[State 1600,4]
type = DestroySelf
trigger1 = Time = 40


;---------------------------------------------------------------------------
;クロス
[Statedef 2000]
type    = S
movetype= I
physics = S
poweradd= 20
anim = 300
ctrl = 0
facep2 = 1

[State 2000,2]
type = Helper    
trigger1 = AnimElem = 4
id = 2000                    
name = "Cross"
pos = 5,-33                
postype = p1            
stateno = 2050         
helpertype = normal
keyctrl = 0
ownpal = 1

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

;---------------------------------------------------------------------------
;ジャンプ　クロス
[Statedef 2001]
type    = A
movetype= I
physics = A
poweradd= 80
anim = 300
ctrl = 0


[State 2001,2]
type = Helper    
trigger1 = AnimElem = 4
id = 2000                    
name = "Cross"
pos = 5,-33                 
postype = p1            
stateno = 2050         
helpertype = normal
keyctrl = 0
ownpal = 1

[State 2001,11]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;クロス発射
[Statedef 2050]
type    = A
movetype= A
physics = N
anim = 2000

[State 2050,1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
value = 2000, 0

[State 2050, 3]
type = Projectile
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
projanim = 2001
offset = 0,0
velocity = 0, 1 
projremovetime = 20

[State 2050, 1]
type = AngleAdd
trigger1 = Time >= 0
value = -7

[State 2050, 2]
type = AngleDraw
trigger1 = Time >= 0

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

[State 2050,2]
type = Velset
trigger1 = time = 0
x = 3
y = 0

[State 2050,2]
type = Veladd
trigger1 = time >= 40
trigger1 = time <= 100
x = -0.1
 
[State 2050,3]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
attr = S, SP
damage    = 15,5
getpower  = 10
givepower = 10
guardflag = MA
hitflag = MAF
priority = 3
pausetime = 0,10
sparkno = 0
sparkxy = -2,-11 
hitsound = s200,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -4
air.velocity = -1.3,-3

[State 2050,4]
type = DestroySelf
trigger1 = time = 250
trigger2 = backedgebodydist <= -10
trigger3 = Time >= 30
trigger3 = RootDist X >= -10
trigger3 = RootDist X <= 10
trigger3 = RootDist Y >= 0
trigger3 = RootDist Y <= 50

;---------------------------------------------------------------------------
;デス
[Statedef 3000]
type    = S
movetype= I
physics = S
poweradd= -1000
ctrl = 0
velset = 0
anim = 300

[State 3000, 1]
type = SuperPause
trigger1 = AnimElem = 1
pos = -15, -40


[State 3000,2]
type = Helper    
trigger1 = AnimElem = 4
id = 3000                    
name = "Dath"
pos = 8, -30                 
postype = p1            
stateno = 3010         
helpertype = normal
keyctrl = 0
ownpal = 1

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


;---------------------------------------------------------------------------
;デス発射
[Statedef 3010]
type    = S
movetype= A
physics = N
velset = 5 , 0
anim = 3001

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

[State 3010, 4]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = -1
sparkno = 0
p1stateno = 3050
p2stateno = 3101


[State 3010, 8]
type = DestroySelf
trigger1 =Time = 150
trigger2 = stateno = 3050

;---------------------------------------------------------------------------
;デス命中
[Statedef 3050]
type    = S
movetype= I
physics = S
poweradd= 80
anim = 9999
ctrl = 0

[State 3050,2]
type = Helper    
trigger1 = time = 0
id = 3000                    
name = "D"
pos = 0,-100               
postype = p1            
stateno = 3100        
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3050, 8]
type = DestroySelf
trigger1 =Time = 0



;---------------------------------------------------------------------------
;デス登場
[Statedef 3100]
type    = A
movetype= A
physics = N
anim = 9999

[State 3100, 1] 
type = AssertSpecial
trigger1 = Time = [0,310]
flag = nomusic

[State 3100,1]
type = explod
trigger1 = time = 0
anim = 3100
postype = left
pos = 0,0
sprpriority = -5
bindtime = 280
removetime = 280
supermove = 1

[State 3100,1]
type = PlaySnd
trigger1 = Time = 40
trigger2 = Time = 60
trigger3 = Time = 80
trigger4 = Time = 100
trigger5 = Time = 120
trigger6 = Time = 140
trigger7 = Time = 160
trigger8 = Time = 180
trigger9 = Time = 200
value = 3000, 10
abspan = 1


[State 3100, 1]
type = SuperPause
trigger1 = time = 1
movetime = 280
time =  280
;bindtime = -1
pos = 0, 0
anim = -1


[State 3100,1]
type = PlaySnd
trigger1 = Time = 0
value = 3000, 0
abspan = 1

[State 3100,1]
type = explod
trigger1 = time = 130
anim = 3000
postype = left
pos = 160,100
sprpriority = -1
bindtime = 100
removetime = 100
supermove = 1
scale = 2,2

[State 3100,1]
type = explod
trigger1 = time = 230
anim = 3010
postype = left
pos = 160,100
sprpriority = -1
bindtime = 50
removetime = 50
supermove = 1
scale = 2,2

[State 3100,1]
type = PlaySnd
trigger1 = Time = 265
value = 3000, 1
abspan = 1


[State 3100, 5]
type = EnvColor
trigger1 = Time = 270
value = 255, 255, 255
time = 10


[State 3100,1]
type = explod
trigger1 = time = 280
anim = 3020
postype = left
pos = 160,100
sprpriority = -1
bindtime = 1
removetime = 150
supermove = 1
scale = 2,2

[State 3100,4]
type = DestroySelf
trigger1 = time = 430


;---------------------------------------------------------------------------
;デス　ターゲット
[Statedef 3101]
type = S
movetype= H
physics = S
ctrl = 0
velset = 0,0


[State 3101, 1]
type = VelSet
trigger1 = Time = 5
x = -2
y = -5

[State 3101, 1]
type = LifeAdd
trigger1 = time = 5
value = -300

[State 3101, 4]
type = SelfState
trigger1 = time = 5
value = 5050
ctrl = 0


;---------------------------------------------------------------------------
;ドラキュラ
[Statedef 3300]
type    = S
movetype= I
physics = S
poweradd= -1000
ctrl = 0
velset = 0
anim = 300

[State 3300, 1]
type = SuperPause
trigger1 = AnimElem = 1
pos = -15, -40


[State 3300,2]
type = Helper    
trigger1 = AnimElem = 4
id = 3300                    
name = "Drac"
pos = 8, -30                 
postype = p1            
stateno = 3310         
helpertype = normal
keyctrl = 0
ownpal = 1

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


;---------------------------------------------------------------------------
;ドラキュラ発射
[Statedef 3310]
type    = S
movetype= A
physics = N
velset = 5 , 0
anim = 3001

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

[State 3310, 4]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
guardflag = MA
hitflag = MAF
pausetime = 0,10
sparkno = -1
sparkno = 0
p1stateno = 3400
p2stateno = 3460

[State 3310, 8]
type = DestroySelf
trigger1 =Time = 150
trigger2 = stateno = 3400
;---------------------------------------------------------------------------
;ドラキュラ登場
[Statedef 3400]
type    = S
movetype= A
physics = N
anim = 9999

[State 3400, 1]
type = PosAdd
trigger1 = Time = 0
y = 30

[State 3400,2]
type = Helper    
trigger1 = time = 0
id = 3450                    
name = "bom"
pos = 0,0               
postype = p1            
stateno = 3450        
helpertype = normal
keyctrl = 0
ownpal = 1

[State 3400, 8]
type = DestroySelf
trigger1 =Time = 10



;---------------------------------------------------------------------------
;bom
[Statedef 3450]
type    = S
movetype= A
physics = N
anim = 9999

[State 3450, 1] 
type = AssertSpecial
trigger1 = Time = [0,430]
flag = nomusic

[State 3450, 1]
type = SuperPause
trigger1 = time = 1
movetime = 388
time =  388
;bindtime = -1
pos = 0, 0
anim = -1

[State 3450,1]
type = PlaySnd
trigger1 = Time = 0
value = 3300, 0
abspan = 1

[State 3450,1]
type = explod
trigger1 = time = 0
anim = 3331
postype = left
pos = 0,0
sprpriority = -5
bindtime = 430
removetime = 430
supermove = 1

[State 3450,1]
type = explod
trigger1 = time = 0
anim = 3300
postype = left
pos = 160,170
sprpriority = -4
bindtime = 430
removetime = 430
supermove = 1

[State 3450, 1]
type = PosSet
trigger1 = Time = 0
x = 0

[State 3450,1]
type = PlaySnd
trigger1 = Time = 380
value = 3300, 1

[State 3450,1]
type = explod
trigger1 = time = 0
anim = 3350
pos = -80,0
sprpriority = 5
bindtime = 430
removetime = 430
scale = 1,1
supermove = 1

[State 3450,1]
type = explod
trigger1 = time = 0
anim = 3350
pos = 80,0
sprpriority = 5
bindtime = 430
removetime = 430
scale = 1,1
supermove = 1

[State 3450,4]
type = DestroySelf
trigger1 = time = 430

;---------------------------------------------------------------------------
;ドラキュラ　ターゲット
[Statedef 3460]
type = S
movetype= H
physics = S
ctrl = 0
velset = 0,0

[State 3460, 1]
type = VelSet
trigger1 = Time = 5
x = -2
y = -8

[State 3460, 1]
type = LifeAdd
trigger1 = time = 5
value = -300

[State 3460, 3]
type = PalFX
trigger1 = Time = 5
time = 60
add = 255,70,0
sinadd = 100,25,0,3

[State 3460, 4]
type = SelfState
trigger1 = time = 5
value = 5050
ctrl = 0


;---------------------------------------------------------------------------
;ダメージ
[Statedef 5555]
type    = A
movetype= I
physics = A
anim = 5000
ctrl = 0


[State 5555,1]
type = PlaySnd
trigger1 = Time = 10
value = 500, 0

[State 5555, 1]
type = VelSet
trigger1 = Time = 0
x = -1.2
y = -4.5

[State 5555, 1] 
type = VarSet
trigger1 = Time = 0
v = 4
value = 1


[State 5555, 3]
type = ChangeState
trigger1 = Time = 100
value = 0
ctrl = 1

;===========================================================================
[Statedef -2]
;===========================================================================


[State -2, 1] 
type = VarSet
trigger1 = Stateno = 50
trigger2 = Stateno = 105
v = 4
value = 0


;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = S　；変更
velset = 0,0

;追加
[State 5000, 1]
type = ChangeState
trigger1 = Time = 1
value = 5555

[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, 3] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 4] ;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
value = a

[State 5000, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5001 ;HITG_SLIDE

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[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



;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= H
physics = N

；追加
[State 5030, 1]
type = ChangeState
trigger1 = Time = 1
value = 5555

；追加
[State 5030, 1]
type = PlaySnd
trigger1 = Time = 0
value = 5000, 0


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

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

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;HITA_UP (transition)


;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47


；追加
[State 52, 1]
type = Changeanim
trigger1 = Time = 0
trigger1 = Alive = 0
value = 7777

；追加
[State 52, 1]
type = PlaySnd
trigger1 = Time = 0
trigger1 = Alive = 0
value = 500, 1

；追加
[State 52, 1] 
type = ChangeState
trigger1 = Time = 40
trigger1 = Alive = 0
value = 5150
ctrl = 1

；追加
[State 52, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Alive = 1
trigger1 = var(4) = 1
value = 5555
ctrl = 0

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

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


；変更
[State 52, 3]
type = CtrlSet
trigger1 = Alive = 1
trigger1 = Time = 3
trigger1 = var(4) = 0
value = 1

；追加
[State 52, 3]
type = CtrlSet
trigger1 = Alive = 1
trigger1 = AnimTime = 0
trigger1 = var(4) = 1
value = 1

；追加
[State 52, 4] 
type = VarSet
trigger1 = AnimTime = 0
v = 4
value = 0

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

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N

；追加
[State 5110, 1]
type = ChangeState
trigger1 = Alive = 0
value = 52

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5110, 7]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine