diff --git a/sonic-radiance.love/assets/sfx/hit.wav b/sonic-radiance.love/assets/sfx/hit.wav new file mode 100644 index 0000000..ca8a156 Binary files /dev/null and b/sonic-radiance.love/assets/sfx/hit.wav differ diff --git a/sonic-radiance.love/assets/sfx/hitconnect.wav b/sonic-radiance.love/assets/sfx/hitconnect.wav new file mode 100644 index 0000000..27a8a81 Binary files /dev/null and b/sonic-radiance.love/assets/sfx/hitconnect.wav differ diff --git a/sonic-radiance.love/datas/gamedata/skills/attack.lua b/sonic-radiance.love/datas/gamedata/skills/attack.lua index c02d84a..08a95a3 100644 --- a/sonic-radiance.love/datas/gamedata/skills/attack.lua +++ b/sonic-radiance.love/datas/gamedata/skills/attack.lua @@ -17,17 +17,25 @@ return { -- if not nil : {ox, oy, shape, size, affectedByDirection} choregraphy = { -- the main attack choregraphy + {'playSFX', "none", 'hit'}, {'setAnimation', "none", 'hit1start', true}, {'sendDamage', "none", 33, 100, false, false}, {'addGFX',"sentDamage", 'hitGFX', 0.75, 0, true, false}, + {'playSFX', "sentDamage", 'hitconnect'}, {'setAnimation', "none", 'hit1end', true}, + + {'playSFX', "none", 'hit'}, {'setAnimation', "none", 'hit2start', true}, {'sendDamage', "none", 33, 100, false, false}, {'addGFX',"sentDamage", 'hitGFX', 0.75, 0, true, false}, + {'playSFX', "sentDamage", 'hitconnect'}, {'setAnimation', "none", 'hit2end', true}, + + {'playSFX', "none", 'hit'}, {'setAnimation', "none", 'hit3start', true}, {'sendDamage', "none", 33, 100, false, false}, {'addGFX',"sentDamage", 'hitGFX', 0.75, 0, true, false}, + {'playSFX', "sentDamage", 'hitconnect'}, {'setAnimation', "none", 'hit3end', true}, {'setAnimation', "none", 'idle', false}, {'wait', "none", 0.5} diff --git a/sonic-radiance.love/scenes/battlesystem/actors/hero.lua b/sonic-radiance.love/scenes/battlesystem/actors/hero.lua index 60f5a13..35e4273 100644 --- a/sonic-radiance.love/scenes/battlesystem/actors/hero.lua +++ b/sonic-radiance.love/scenes/battlesystem/actors/hero.lua @@ -313,6 +313,9 @@ function Hero:doChoregraphyAction(choregraphyAction) local z = 0 self.world.obj.GFX(self.world, x + dx, y + dy, z, sprite, self, blockProcess) + elseif type == "playSFX" then + local sfx = choregraphyAction[3] + self.assets.sfx[sfx]:play() else core.debug:warning("cbs/hero", "unknown action type " .. type) end diff --git a/sonic-radiance.love/scenes/battlesystem/assets.lua b/sonic-radiance.love/scenes/battlesystem/assets.lua index 4664ec5..2850ea6 100644 --- a/sonic-radiance.love/scenes/battlesystem/assets.lua +++ b/sonic-radiance.love/scenes/battlesystem/assets.lua @@ -33,5 +33,9 @@ return { ["imagefonts"] = { {"hudnbrs", "assets/gui/fonts/hudnumbers"}, {"hudnbrs_small", "assets/gui/fonts/hudsmallnumbers"}, + }, + ["sfx"] = { + {"hit", "assets/sfx/hit.wav"}, + {"hitconnect", "assets/sfx/hitconnect.wav"}, } }