generated from macoy/gamelib-project-template
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
206 lines
5.2 KiB
206 lines
5.2 KiB
(power-system
|
|
:sprites
|
|
(array
|
|
(spritesheet :id "wizard"
|
|
:width 966 :height 636
|
|
:frame-width 6 :frame-height 6
|
|
:scale-factor 2)
|
|
(spritesheet :id "boar"
|
|
:width 1434 :height 1068
|
|
:frame-width 6 :frame-height 6
|
|
:scale-factor 2)
|
|
(spritesheet :id "fireball"
|
|
:width 237 :height 46
|
|
:frame-width 3 :frame-height 1
|
|
:scale-factor 2)
|
|
(spritesheet :id "smoke-explosion"
|
|
:width 630 :height 116
|
|
:frame-width 5 :frame-height 1
|
|
:scale-factor 2)
|
|
(spritesheet :id "explosion"
|
|
:width 672 :height 100
|
|
:frame-width 6 :frame-height 1
|
|
:scale-factor 2)
|
|
(spritesheet :id "ice-explosion"
|
|
:width 672 :height 100
|
|
:frame-width 6 :frame-height 1
|
|
:scale-factor 2)
|
|
(spritesheet :id "rocks"
|
|
:width 2123 :height 190
|
|
:frame-width 11 :frame-height 1
|
|
:scale-factor 3))
|
|
|
|
:animations
|
|
(array
|
|
(animation-data :id "fireball-idle"
|
|
:start-frame 0
|
|
:end-frame 2
|
|
:flip-horizontal false)
|
|
(animation-data :id "smoke-explosion-idle"
|
|
:start-frame 0
|
|
:end-frame 4
|
|
:flip-horizontal false)
|
|
(animation-data :id "explosion-idle"
|
|
:start-frame 0
|
|
:end-frame 5
|
|
:flip-horizontal false)
|
|
(animation-data :id "explosion-fast"
|
|
:start-frame 3
|
|
:end-frame 5
|
|
:flip-horizontal false)
|
|
(animation-data :id "ice-explosion-flying"
|
|
:start-frame 0
|
|
:end-frame 2
|
|
:flip-horizontal false)
|
|
(animation-data :id "ice-explosion-exploding"
|
|
:start-frame 3
|
|
:end-frame 5
|
|
:flip-horizontal false)
|
|
(animation-data :id "rocks-fall"
|
|
:start-frame 0
|
|
:end-frame 9
|
|
:flip-horizontal false))
|
|
|
|
:powers
|
|
(array
|
|
(power
|
|
:id "fireball"
|
|
:on-create "PlayEffect fireball fireball-idle
|
|
SetValue velocityX 25"
|
|
:on-update
|
|
"IfStringEquals currentEffect fireball
|
|
IfGreaterThanOrEqual positionX enemyX
|
|
PlayEffect smoke-explosion smoke-explosion-idle
|
|
SetValue velocityX 0
|
|
AddToValue positionY -65
|
|
DamageEnemy
|
|
Expire
|
|
End
|
|
End")
|
|
(power
|
|
:id "iceStormExplosionEnd"
|
|
:on-create "PlayEffect ice-explosion ice-explosion-exploding
|
|
Expire"
|
|
:on-update
|
|
"IfEquals user0 0
|
|
IfGreaterThanOrEqual lifetimeFrameCount 1
|
|
SetValue user0 1
|
|
DamageEnemy
|
|
End
|
|
End")
|
|
(power
|
|
:id "iceStormExplosionChain"
|
|
:on-create "PlayEffect ice-explosion ice-explosion-exploding
|
|
Expire"
|
|
:on-update
|
|
"IfEquals user0 0
|
|
IfGreaterThanOrEqual lifetimeFrameCount 1
|
|
SetValue user0 1
|
|
DamageEnemy
|
|
SetValue relativeSpawnX 70
|
|
SetValue relativeSpawnY -75
|
|
SpawnPower iceStormExplosionEnd
|
|
End
|
|
End")
|
|
(power
|
|
:id "iceStorm"
|
|
:on-create "PlayEffect ice-explosion ice-explosion-flying
|
|
SetValue velocityX 10
|
|
AddToValue positionY -50"
|
|
:on-update
|
|
"IfGreaterThanOrEqual velocityX 2
|
|
IfGreaterThanOrEqual positionX enemyX
|
|
SetValue velocityX 0
|
|
PlayEffect ice-explosion ice-explosion-exploding
|
|
DamageEnemy
|
|
Expire
|
|
IfEquals user0 0
|
|
SetValue user0 1
|
|
SetValue relativeSpawnX 10
|
|
SetValue relativeSpawnY -100
|
|
SpawnPower iceStormExplosionChain
|
|
SetValue relativeSpawnX 170
|
|
SetValue relativeSpawnY -50
|
|
SpawnPower iceStormExplosionEnd
|
|
End
|
|
End
|
|
End")
|
|
|
|
(power
|
|
:id "leaking-fireball"
|
|
:on-create "PlayEffect fireball fireball-idle
|
|
SetValue velocityX 20"
|
|
:on-update
|
|
"IfStringEquals currentEffect fireball
|
|
IfGreaterThanOrEqual positionX enemyX
|
|
PlayEffect explosion explosion-fast
|
|
SetValue velocityX 0
|
|
AddToValue positionY -45
|
|
DamageEnemy
|
|
Expire
|
|
End
|
|
End
|
|
IfEquals user0 0
|
|
IfGreaterThanOrEqual lifetimeFrameCount 2
|
|
SetValue relativeSpawnY -45
|
|
SpawnPower explosion
|
|
SetValue user0 1
|
|
End
|
|
End
|
|
IfEquals user0 1
|
|
IfGreaterThanOrEqual lifetimeFrameCount 4
|
|
SpawnPower explosion
|
|
SetValue user0 2
|
|
End
|
|
End
|
|
IfEquals user0 2
|
|
IfGreaterThanOrEqual lifetimeFrameCount 6
|
|
SpawnPower explosion
|
|
SetValue user0 3
|
|
End
|
|
End
|
|
IfEquals user0 3
|
|
IfGreaterThanOrEqual lifetimeFrameCount 8
|
|
SpawnPower explosion
|
|
SetValue user0 4
|
|
End
|
|
End
|
|
IfEquals user0 4
|
|
IfGreaterThanOrEqual lifetimeFrameCount 10
|
|
SpawnPower explosion
|
|
SetValue user0 5
|
|
End
|
|
End
|
|
IfEquals user0 5
|
|
IfGreaterThanOrEqual lifetimeFrameCount 12
|
|
SpawnPower explosion
|
|
SetValue user0 6
|
|
End
|
|
End")
|
|
(power
|
|
:id "smoke-explosion"
|
|
:on-create "PlayEffect smoke-explosion smoke-explosion-idle
|
|
Expire"
|
|
:on-update
|
|
"IfGreaterThanOrEqual positionX enemyX
|
|
DamageEnemy
|
|
End")
|
|
(power
|
|
:id "explosion"
|
|
:on-create "PlayEffect explosion explosion-fast
|
|
Expire"
|
|
:on-update
|
|
"IfGreaterThanOrEqual positionX enemyX
|
|
DamageEnemy
|
|
End")
|
|
|
|
(power
|
|
:id "rocks"
|
|
:on-create "PlayEffect rocks rocks-fall
|
|
SetValue positionX enemyX
|
|
SetValue positionY enemyY
|
|
AddToValue positionY -210
|
|
Expire"
|
|
:on-update "IfGreaterThanOrEqual lifetimeFrameCount 6
|
|
DamageEnemy
|
|
End")))
|
|
|