;---------------------------------------------------------------------------
; MULTI HOOK CARD
;---------------------------------------------------------------------------
[Statedef 3300]
type = S
movetype = A
physics = S
anim = 3300
velset = 0
ctrl = 0
poweradd = 0


[State 3300, 3]
type = PlaySnd
trigger1 = Time = 0
value = 10,23

[State 3300, 3]
type = PlaySnd
trigger1 = Time = 0
value = 800,0


[State 3300, 3]
type = PlaySnd
trigger1 = AnimElem = 1
value = 10,18

[State 3300, 1]
type = VarAdd
trigger1 = Time = 0
v = 8
value = -1

[State 3300, Explod]
type = Explod
trigger1 = var(8) <= 0
removetime = 30
id = 2602
anim = 2602
pos = 137, 40
postype = left
sprpriority = 2
facing = 1
ownpal = 1
bindtime = -1
supermove = 1
ignorehitpause = 1
removeongethit = 1
scale=.2,.2

[state 1100, DUST]
type = explod
trigger1 = animelem = 4
postype = p1
bindtime = 1
removetime = 30
removeongethit = 1
pos = -40,15
anim = 6050
scale= 1,1
sprpriority = 3

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

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

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

[State 1000, 5]
type = VelSet
trigger1 = AnimElem = 7
x = 6

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

[State 3300, &]
type = HitDef
trigger1 = AnimElem = 6
trigger1 = p2bodydist X < 40
trigger2 = AnimElem = 7
trigger3 = AnimElem = 8
trigger4 = AnimElem = 9
trigger5 = AnimElem = 10
attr = S, SA
damage    = 9,1
animtype = Medium
getpower = 0
givepower = 3
guardflag = MA
hitflag = MAF
pausetime = 6,8
sparkno = S6011
sparkxy = 0,0
hitsound = S6,0
guardsound = S100,10
ground.type = High
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -4.5
air.velocity = -4,-2.5
fall=1

[State 3300, 2]
type = HitDef
trigger1 = AnimElem = 6
trigger1 = p2bodydist X >= 40
trigger2 = AnimElem = 7
trigger3 = AnimElem = 8
trigger4 = AnimElem = 9
trigger5 = AnimElem = 10
attr = S, SA
damage    = 9,1
animtype = Medium
getpower = 8
givepower = 3
guardflag = MA
hitflag = MAF
pausetime = 6,8
sparkno = S6011
sparkxy = 10,-60
hitsound = S6,0
guardsound = S100,10
ground.type = High
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -4.5
air.velocity = -4,-2.5
fall=1
palfx.time = 40
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0


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

;---------------------------------------------------------------------------
; NICO ROBIN CARD
;---------------------------------------------------------------------------

[Statedef 3200]
type = S
physics = S
ctrl = 0
anim = 3200
velset = 0,0
sprpriority = 5
poweradd = 0

[State 3300, 3]
type = PlaySnd
trigger1 = Time = 0
value = 10,23

[State 3300, 3]
type = PlaySnd
trigger1 = Time = 0
value = 10,19

[State 3200, 1]
type = VarAdd
trigger1 = Time = 0
v = 6
value = -1

[State 3200, Explod]
type = Explod
trigger1 = var(6) <= 0
removetime = 30
id = 2607
anim = 2607
pos = 137, 40
postype = left
sprpriority = 2
facing = 1
ownpal = 1
bindtime = -1
supermove = 1
ignorehitpause = 1
removeongethit = 1
scale=.2,.2

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

[State 3200, Snd 1]
type = PlaySnd
trigger1 = time= 0
value = 5,0


[State 3200,0]
type = Helper
trigger1 = Time = 0
id = 3210
name = "ROBIN"
pos = -180, 0
postype = P1
stateno = 3210
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
facing = 1
ignorehitpause = 1


[State 3200, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------
[StateDef 3210]
Type = S
MoveType = A
Physics = S
poweradd= 80
Anim = 3210
SprPriority = 1
VelSet = 0,0
Ctrl = 0


[State 3300, 3]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,0

[State 3210, 1]
type = VelSet
trigger1 = 1
x = 6

[State 3210, hit override]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
slot = 1
time = -1
stateno = 3211

[State 3210, end state]
type = ChangeState
trigger1 = P2BodyDist X < 100
value = 3220
ctrl = 1

;-----------------------------------------------
[StateDef 3220]
Type = S
MoveType = A
Physics = S
Anim = 3220
SprPriority = 1
VelSet = 0,0
Ctrl = 0


[State 3220, Snd 1]
type = PlaySnd
trigger1 = time = 0
value = S0,4
volume = 25


[State 3220, velocity] ; on repositionne le perso correctement
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 3220, position] ; on repositionne le perso correctement
type = PosSet
trigger1 = time = 0
y = 0

[State 3220, hit override]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
slot = 1
time = -1
stateno = 3211

[State 3220,00]
type = envshake
trigger1 = animelemtime(8)>=0 && !(time%5)
time = 5
freq = 110
ampl = -4
phase =90

[State 3220, SEIS FLEUR]
type = Helper
trigger1 = animelem = 5
helpertype = normal
stateno = 3230
name = "SEIS"
id      = 3230
ontop = 1
postype = p1
pos = 40,10
keyctrl = 0
ownpal = 1
ignorehitpause = 1
size.xscale=.5
size.yscale=.5

[State 3220, end state]
type = ChangeState
trigger1 = AnimTime = 0
value = 3240

;---------------------------------------------------------------------------
;FLEUR HELPER
;---------------------------------------------------------------------------
[Statedef 3230]
anim = 3230
movetype = A
sprpriority = 2

[State 3230, Snd 1]
type = PlaySnd
trigger1 = time= 0
value = S10,10
volume = 25


[State 3230, ombre]
type = assertspecial
trigger1 = 1
flag = noshadow

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

[State 3230, 2]
type = HitDef
trigger1 = HitCount < 3
trigger1 = 1
attr = S, HA
damage = 20,1
guardflag = MA
hitflag = MAF
pausetime = 0,12
priority = 7
sparkno = S(ifelse (Random <= 500,6011,6012))
sparkxy = -10,-47
hitsound = S6,0
guardsound = S4,1
ground.type = high
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -4,-8
air.velocity = -4,-6
airguard.velocity = -3,-4
guard.velocity = -9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0         
yaccel = .6
palfx.time = 40
palfx.add = 0,50,240
palfx.mul = 120,224,150
palfx.sinadd = 85,55,110,10
Palfx.color = 0
fall= 1

[State 3230, 3]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = parent, MoveType = H
;--------------------
[StateDef 3240]
Type = S
MoveType = I
Physics = S
Anim = 3240
SprPriority = 1
VelSet = -30,0
Ctrl = 0

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

[State 3240, 1]
type = VelSet
trigger1 = animelem = 2
x = -20

[State 3240, disappear]
type = DestroySelf
trigger1 = Time = 30
type = ChangeState
trigger2 = Vel y >= 0
trigger2 = Pos y >= 0
trigger2 = Vel x >= 0
trigger2 = Pos x >= 0
;---------------------
[StateDef 3211] ; Le perso tombe par terre
Type = A
MoveType = H
Physics = N
Anim = 3211
SprPriority = -2
VelSet = 0,0
Ctrl = 0

[State 3211, end state] ; le perso se barre 
type = ChangeState
trigger1 = AnimTime = 0
value = 3240
;---------------------------------------------------------------------------
;TELEPORT CHOICE CARD
;---------------------------------------------------------------------------
[Statedef 3100]
type     = S                     
movetype = I                    
physics  = S                     
ctrl     = 0                     
anim     = 3100                   
sprpriority = 2                  
velset = 0,0
poweradd = 0

[State 3300, 3]
type = PlaySnd
trigger1 = Time = 0
value = 10,23

[State 3300, 3]
type = PlaySnd
trigger1 = Time = 0
value = 10,20

[State 3300, 3]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5,1

[State 3000, 1]
type = VarAdd
trigger1 = Time = 0
v = 4
value = -1

[State 3000, Explod]
type = Explod
trigger1 = var(4) <= 0
removetime = 30
id = 2612
anim = 2612
pos = 137, 40
postype = left
sprpriority = 2
facing = 1
ownpal = 1
bindtime = -1
supermove = 1
ignorehitpause = 1
removeongethit = 1
scale=.2,.2
 
[State 3100, PosSet]
type = PosSet
trigger1 = Pos Y > 0
y = 0
 
[State 3100, PosAddFwd]
type = PosAdd
triggerall = Time = 10 ;Time to teleport.
trigger1 = ((command = "holdfwd") || (command != "holdfwd")) && (command != "holdback") && (command != "holdup") && (command != "holddown")
x = 120 ;Must be a positive value.
y = 0
 
[State 3100, PosAddBack]
type = PosAdd
triggerall = Time = 10 ;Time to teleport.
trigger1 = (command = "holdback") && (command != "holdfwd") && (command != "holdup") && (command != "holddown")
x = -120 ;Must be a negative value.
y = 0
 
 
[State 3100, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;LIFE RECOVER CARD
;---------------------------------------------------------------------------

[Statedef 3000]
type = S
movetype = A
physics = S
ctrl = 0
anim = 3000
velset = 0,0
sprpriority = -2
poweradd = 0

[State 3300, 3]
type = PlaySnd
trigger1 = Time = 0
value = 10,23

[State 3300, 3]
type = PlaySnd
trigger1 = Time = 0
value = 10,21


[State 3000, 1]
type = VarAdd
trigger1 = Time = 0
v = 3
value = -1

[State 3000, Explod]
type = Explod
trigger1 = var(3) <= 0
removetime = -2
id = 2622
anim = 2622
pos = 137, 40
postype = left
sprpriority = 2
facing = 1
ownpal = 1
bindtime = -1
supermove = 1
ignorehitpause = 1
removeongethit = 1
scale=.2,.2


[State 3000]
type = LifeAdd
Trigger1 = Time = 5
Trigger2 = Time = 10
Trigger3 = Time = 20
Trigger4 = Time = 30
Trigger5 = Time = 40
Trigger6 = Time = 50
Trigger7 = Time = 60
Trigger8 = Time = 70
Trigger9 = Time = 85
Trigger10 = Time = 90
Trigger11 = Time = 100
value = 7


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

;---------------------------------------------------------------------------
;STATEDEF -2 HELPER BAR
;---------------------------------------------------------------------------

[statedef -2]

[State -2,0]
type = VarSet
trigger1 =Roundstate=0
v = 3
value = 1


[State -2, helperbar ON]
type = Explod
trigger1 = var(3) = 1
trigger1 = NumExplod(2620) = 0
anim = 2620
ontop = 1
ownpal = 1
postype = left
pos = 0+205*(TeamSide = 2), 217
bindtime = -1
id = 2620
sprpriority = 5
scale=.4,.4


[State -2, HELPERBAR OFF]
type = Explod
trigger1 = var(3) <= 0
trigger1 = NumExplod(2621) = 0
anim = 2621
ontop = 1
ownpal = 1
postype = left
pos = 0+205*(TeamSide = 2), 217
bindtime = -1
id = 2621
sprpriority = 4
scale=.4,.4

[State -2,1]
type = RemoveExplod
trigger1 = var(3) = 0
ID = 2620
;------------------------------------------
;TELEPORT EX
;------------------------------------------


[State -2,0]
type = VarSet
trigger1 =Roundstate=0
v = 4
value = 1


[State -2, helperbar ON]
type = Explod
trigger1 = var(4) = 1
trigger1 = NumExplod(2610) = 0
anim = 2610
ontop = 1
ownpal = 1
postype = left
pos = 16+205*(TeamSide = 2), 217
bindtime = -1
id = 2610
sprpriority = 5
scale=.4,.4


[State -2, HELPERBAR OFF]
type = Explod
trigger1 = var(4) <= 0
trigger1 = NumExplod(2611) = 0
anim = 2611
ontop = 1
ownpal = 1
postype = left
pos = 16+205*(TeamSide = 2), 217
bindtime = -1
id = 2611
sprpriority = 4
scale=.4,.4

[State -2,1]
type = RemoveExplod
trigger1 = var(4) = 0
ID = 2610

;------------------------------------------
;ROBIN
;------------------------------------------


[State -2,0]
type = VarSet
trigger1 =Roundstate=0
v = 6
value = 1


[State -2, helperbar ON]
type = Explod
trigger1 = var(6) = 1
trigger1 = NumExplod(2605) = 0
anim = 2605
ontop = 1
ownpal = 1
postype = left
pos = 32+205*(TeamSide = 2), 217
bindtime = -1
id = 2605
sprpriority = 5
scale=.4,.4


[State -2, HELPERBAR OFF]
type = Explod
trigger1 = var(6) <= 0
trigger1 = NumExplod(2606) = 0
anim = 2606
ontop = 1
ownpal = 1
postype = left
pos = 32+205*(TeamSide = 2), 217
bindtime = -1
id = 2606
sprpriority = 4
scale=.4,.4

[State -2,1]
type = RemoveExplod
trigger1 = var(6) = 0
ID = 2605

;------------------------------------------
;MULTI
;------------------------------------------


[State -2,0]
type = VarSet
trigger1 =Roundstate=0
v = 8
value = 1


[State -2, helperbar ON]
type = Explod
trigger1 = var(8) = 1
trigger1 = NumExplod(2600) = 0
anim = 2600
ontop = 1
ownpal = 1
postype = left
pos = 48+205*(TeamSide = 2), 217
bindtime = -1
id = 2600
sprpriority = 5
scale=.4,.4


[State -2, HELPERBAR OFF]
type = Explod
trigger1 = var(8) <= 0
trigger1 = NumExplod(2601) = 0
anim = 2601
ontop = 1
ownpal = 1
postype = left
pos = 48+205*(TeamSide = 2), 217
bindtime = -1
id = 2601
sprpriority = 4
scale=.4,.4

[State -2,1]
type = RemoveExplod
trigger1 = var(8) = 0
ID = 2600