diff --git a/game/engine/interface/GameSound.lua b/game/engine/interface/GameSound.lua index ee4aa19bcee9f6fe7faa855d5ac2f309a5e6da42..47cf4cd99baa418b24f0775fcdd74449917177ec 100644 --- a/game/engine/interface/GameSound.lua +++ b/game/engine/interface/GameSound.lua @@ -49,7 +49,7 @@ function _M:playSound(name) self.loaded_sounds[name] = def s = self.loaded_sounds[name] end - if not s then return end + if not s or not s.file then return end local chan = s.file:play(s.loop, s.timed) if chan and s.fadeout then core.sound.channelFadeOut(chan, s.fadeout) end end diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 98ff001d60b80db4a7f3917d6b31a476e1ce90f4..9638ec344846a7d55d6afe1c1c38fb9236879851 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -732,3 +732,9 @@ function _M:setAllowedBuild(what, notify) return true end + +function _M:playSoundNear(who, ...) + if who and self.level.map.seens(who.x, who.y) then + self:playSound(...) + end +end diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index 8a45d0485b9ca37381c5065cb3e1a8332cf03afb..45a56aa6c4d2fa06a26d427c85dd40db679bcdc0 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -64,7 +64,7 @@ function _M:use(who, typ) if typ == "use" then who:useEnergy() - if self.use_sound then game:playSound(self.use_sound) end + if self.use_sound then game:playSoundNear(who, self.use_sound) end return self:useObject(who) end end diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 9867657ca3647a0ecdfc21141998e726fc34284e..be11d477061e7b32fc837174cb4af4677a576d46 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -123,8 +123,8 @@ function _M:attackTarget(target, damtype, mult, noenergy) self.did_energy = true end - if sound then game:playSound(sound) - elseif sound_miss then game:playSound(sound_miss) end + if sound then game:playSoundNear(self, sound) + elseif sound_miss then game:playSoundNear(self, sound_miss) end -- Cancel stealth! self:breakStealth() diff --git a/game/modules/tome/data/sound/talents/breath.wav b/game/modules/tome/data/sound/talents/breath.wav new file mode 100755 index 0000000000000000000000000000000000000000..2f6a8625f669e81f3112002fa275abc2a7f10333 Binary files /dev/null and b/game/modules/tome/data/sound/talents/breath.wav differ diff --git a/game/modules/tome/data/sound/talents/ice.lua b/game/modules/tome/data/sound/talents/ice.lua index 92503c56f48630bfc844ebfd8f013275e5ec0927..14c86ff077a815c28b2f8d66a3a764c332628bde 100644 --- a/game/modules/tome/data/sound/talents/ice.lua +++ b/game/modules/tome/data/sound/talents/ice.lua @@ -1,5 +1,5 @@ return { file = "talents/ice.wav", - volume = 50, + volume = 70, fadeout = 700, } diff --git a/game/modules/tome/data/sound/talents/tidalwave.wav b/game/modules/tome/data/sound/talents/tidalwave.wav new file mode 100755 index 0000000000000000000000000000000000000000..f61d4d4a1bf45062e79f5e58fb450ad1a75788b6 Binary files /dev/null and b/game/modules/tome/data/sound/talents/tidalwave.wav differ diff --git a/game/modules/tome/data/talents/gifts/cold-drake.lua b/game/modules/tome/data/talents/gifts/cold-drake.lua index 513c22e2c0bcabb60ba3513aa38253cf6efe01ae..2f524f2146fed98dbdf297b919b13ab86e7961df 100644 --- a/game/modules/tome/data/talents/gifts/cold-drake.lua +++ b/game/modules/tome/data/talents/gifts/cold-drake.lua @@ -135,6 +135,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.ICE, 10 + self:getStr() * 0.3 * self:getTalentLevel(t), {type="freeze"}) + game:playSoundNear(self, "talents/breath") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/gifts/fire-drake.lua b/game/modules/tome/data/talents/gifts/fire-drake.lua index ad04f42550631179ca393324583c0e2d042585d5..544b5427b63be7240f22e6b5cd5fdfe2344dec4d 100644 --- a/game/modules/tome/data/talents/gifts/fire-drake.lua +++ b/game/modules/tome/data/talents/gifts/fire-drake.lua @@ -115,6 +115,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.FIREBURN, 10 + self:getStr() * 0.3 * self:getTalentLevel(t), {type="flame"}) + game:playSoundNear(self, "talents/breath") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/gifts/sand-drake.lua b/game/modules/tome/data/talents/gifts/sand-drake.lua index 3be13214443fcd25d649fe44424216417890158a..651229f4f88777a89b84a0f4aa32fb6125e2ed40 100644 --- a/game/modules/tome/data/talents/gifts/sand-drake.lua +++ b/game/modules/tome/data/talents/gifts/sand-drake.lua @@ -123,6 +123,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.SAND, {dur=2+self:getTalentLevelRaw(t), dam=10 + self:getStr() * 0.3 * self:getTalentLevel(t)}, {type="flame"}) + game:playSoundNear(self, "talents/breath") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/gifts/slime.lua b/game/modules/tome/data/talents/gifts/slime.lua index df6bbfb58f3926504eb3d3f9ccc37ec154ccfb07..25d551a16b341f11061f60ab305cb56e179f4209 100644 --- a/game/modules/tome/data/talents/gifts/slime.lua +++ b/game/modules/tome/data/talents/gifts/slime.lua @@ -37,7 +37,7 @@ newTalent{ self.combat_apr = self.combat_apr + 1000 self:attackTarget(target, DamageType.POISON, 1.5 + self:getTalentLevel(t) / 4, true) self.combat_apr = self.combat_apr - 1000 - game:playSound("talents/slime") + game:playSoundNear(self, "talents/slime") return true end, info = function(self, t) @@ -59,7 +59,7 @@ newTalent{ DEFEND = 10, }, activate = function(self, t) - game:playSound("talents/slime") + game:playSoundNear(self, "talents/slime") local power = 10 + 5 * self:getTalentLevel(t) return { onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.ACID]=power}), @@ -90,7 +90,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.SLIME, 20 + (self:getDex() * self:getTalentLevel(t)) * 0.3, {type="slime"}) - game:playSound("talents/slime") + game:playSoundNear(self, "talents/slime") return true end, info = function(self, t) @@ -122,7 +122,7 @@ newTalent{ -- Stunned! self:setEffect(self.EFF_STUNNED, util.bound(5 - self:getTalentLevel(t) / 2, 2, 7), {}) - game:playSound("talents/slime") + game:playSoundNear(self, "talents/slime") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/gifts/summon-augmentation.lua b/game/modules/tome/data/talents/gifts/summon-augmentation.lua index 86e843161fe66870e1a42f6524dd0b4cf4c66665..a7c785985ddb130e0e5f8a81c339215ecda48b77 100644 --- a/game/modules/tome/data/talents/gifts/summon-augmentation.lua +++ b/game/modules/tome/data/talents/gifts/summon-augmentation.lua @@ -30,6 +30,7 @@ newTalent{ local tx, ty, target = self:getTarget(tg) if not tx or not ty or not target or not target.summoner or not target.summoner == self then return nil end target:setEffect(target.EFF_ALL_STAT, 5, {power=2+math.floor(self:getTalentLevel(t) * 2)}) + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -71,6 +72,7 @@ newTalent{ game.logPlayer("You may not detonate this summon.") return nil end + game:playSoundNear(self, "talents/fireflash") return true end, info = function(self, t) @@ -118,6 +120,7 @@ newTalent{ game.level.map(target.x, target.y, Map.ACTOR, self) self.x, self.y, target.x, target.y = target.x, target.y, self.x, self.y + game:playSoundNear(self, "talents/teleport") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/gifts/summon-distance.lua b/game/modules/tome/data/talents/gifts/summon-distance.lua index 0b9ebf13cdc591dab7a19cb8d2f1d650c01da11f..f391f1f575999829d1ea9cc5aa7d2972abebc51f 100644 --- a/game/modules/tome/data/talents/gifts/summon-distance.lua +++ b/game/modules/tome/data/talents/gifts/summon-distance.lua @@ -29,6 +29,7 @@ newTalent{ short_name = "FIRE_IMP_BOLT", local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.FIRE, self:spellCrit(8 + self:combatSpellpower(0.2) * self:getTalentLevel(t)), {type="flame"}) + game:playSoundNear(self, "talents/fire") return true end, info = function(self, t) @@ -54,6 +55,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.ACID, 30 + self:getWil(50) * self:getTalentLevel(t), {type="acid"}) + game:playSoundNear(self, "talents/breath") return true end, info = function(self, t) @@ -79,6 +81,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.LIGHTNING, rng.range(1, 30 + self:getWil(80) * self:getTalentLevel(t)), {type="lightning"}) + game:playSoundNear(self, "talents/lightning") return true end, info = function(self, t) @@ -104,6 +107,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.POISON, 30 + self:getWil(70) * self:getTalentLevel(t), {type="slime"}) + game:playSoundNear(self, "talents/breath") return true end, info = function(self, t) @@ -168,6 +172,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -234,6 +239,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -301,6 +307,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -367,6 +374,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/gifts/summon-melee.lua b/game/modules/tome/data/talents/gifts/summon-melee.lua index fbc87bb03cf7b90be786d3fe8c274d1dea4aecc6..70de8176a741aebe613c9fe4552360a0bdcd3a72 100644 --- a/game/modules/tome/data/talents/gifts/summon-melee.lua +++ b/game/modules/tome/data/talents/gifts/summon-melee.lua @@ -68,6 +68,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -130,6 +131,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -198,6 +200,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -266,6 +269,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/gifts/summon-utility.lua b/game/modules/tome/data/talents/gifts/summon-utility.lua index 566f7925fcbdf62b0f80c7333b4c4997ccce8e7b..04e53875bc715d31537bf85cef3e639e50bffcfb 100644 --- a/game/modules/tome/data/talents/gifts/summon-utility.lua +++ b/game/modules/tome/data/talents/gifts/summon-utility.lua @@ -177,6 +177,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -241,6 +242,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -305,6 +307,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "summon") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -358,6 +361,7 @@ newTalent{ game.level.map:moveViewSurround(self.summoner.x, self.summoner.y, 8, 8) end + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/spells/air.lua b/game/modules/tome/data/talents/spells/air.lua index 4b29c206a1707e212b30c45c82ee7ce3f607aa1a..c1801d60b6e436d9b07dc453443a053f41573a7d 100644 --- a/game/modules/tome/data/talents/spells/air.lua +++ b/game/modules/tome/data/talents/spells/air.lua @@ -34,7 +34,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(20 + self:combatSpellpower(0.8) * self:getTalentLevel(t)), 3), {type="lightning"}) - game:playSound("talents/lightning") + game:playSoundNear(self, "talents/lightning") return true end, info = function(self, t) @@ -87,7 +87,7 @@ newTalent{ end fork(fx, fy) - game:playSound("talents/lightning") + game:playSoundNear(self, "talents/lightning") return true end, @@ -165,11 +165,11 @@ newTalent{ table.remove(tgts, id) self:project(tg, a.x, a.y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(20 + self:combatSpellpower(0.2) * self:getTalentLevel(t)), 3), {type="lightning"}) - game:playSound("talents/lightning") + game:playSoundNear(self, "talents/lightning") end end, activate = function(self, t) - game:playSound("talents/thunderstorm") + game:playSoundNear(self, "talents/thunderstorm") game.logSeen(self, "#0080FF#A furious lightning storm forms around %s!", self.name) return { drain = self:addTemporaryValue("mana_regen", -3 * self:getTalentLevelRaw(t)), diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index 46283a90022ee7a059cc4bd87e8d35883b816206..b57cfb73af826b85feb4011816ced2a4ad090667 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -35,7 +35,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.ARCANE, self:spellCrit(20 + self:combatSpellpower(0.5) * self:getTalentLevel(t)), {type="manathrust"}) - game:playSound("talents/arcane") + game:playSoundNear(self, "talents/arcane") return true end, info = function(self, t) @@ -58,7 +58,7 @@ newTalent{ action = function(self, t) if not self:hasEffect(self.EFF_MANAFLOW) then self:setEffect(self.EFF_MANAFLOW, 10, {power=5+self:combatSpellpower(0.06) * self:getTalentLevel(t)}) - game:playSound("talents/arcane") + game:playSoundNear(self, "talents/arcane") end return true end, @@ -98,7 +98,7 @@ newTalent{ activate = function(self, t) local power = math.max(0.8, 3 - (self:combatSpellpower(1) * self:getTalentLevel(t)) / 280) self.disruption_shield_absorb = 0 - game:playSound("talents/arcane") + game:playSoundNear(self, "talents/arcane") return { shield = self:addTemporaryValue("disruption_shield", power), } diff --git a/game/modules/tome/data/talents/spells/conveyance.lua b/game/modules/tome/data/talents/spells/conveyance.lua index 8cb317e2be60f42327522d40599002796abf9828..0c96403413386f0f6d3fbf7263c5dc2c7df28bfd 100644 --- a/game/modules/tome/data/talents/spells/conveyance.lua +++ b/game/modules/tome/data/talents/spells/conveyance.lua @@ -52,7 +52,7 @@ newTalent{ target:teleportRandom(x, y, 10 + self:combatSpellpower(0.1)) game.level.map:particleEmitter(target.x, target.y, 1, "teleport") end - game:playSound("talents/teleport") + game:playSoundNear(self, "talents/teleport") return true end, info = function(self, t) @@ -98,7 +98,7 @@ newTalent{ target:teleportRandom(x, y, 100 + self:combatSpellpower(0.1)) game.level.map:particleEmitter(target.x, target.y, 1, "teleport") end - game:playSound("talents/teleport") + game:playSoundNear(self, "talents/teleport") return true end, info = function(self, t) @@ -129,7 +129,7 @@ newTalent{ local power = 50 + self:combatSpellpower(0.4) * self:getTalentLevel(t) local chance = 20 + self:getTalentLevel(t) * 5 self:setEffect(self.EFF_DISPLACEMENT_SHIELD, dur, {power=power, target=target, chance=chance}) - game:playSound("talents/teleport") + game:playSoundNear(self, "talents/teleport") return true end, info = function(self, t) @@ -152,7 +152,7 @@ newTalent{ MOVEMENT = 20, }, activate = function(self, t) - game:playSound("talents/teleport") + game:playSoundNear(self, "talents/teleport") local power = math.floor(4 + self:combatSpellpower(0.06) * self:getTalentLevel(t)) return { prob_travel = self:addTemporaryValue("prob_travel", power), diff --git a/game/modules/tome/data/talents/spells/divination.lua b/game/modules/tome/data/talents/spells/divination.lua index e8a2e0ddcb7001530e9c283da19e99e07e7d4733..9fc3ee16d6487b32ce3b80bdd7447ce5872fd860 100644 --- a/game/modules/tome/data/talents/spells/divination.lua +++ b/game/modules/tome/data/talents/spells/divination.lua @@ -35,7 +35,7 @@ newTalent{ object = (self:getTalentLevel(t) >= 2) and 1 or 0, trap = (self:getTalentLevel(t) >= 5) and 1 or 0, }) - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -81,7 +81,7 @@ newTalent{ game.logPlayer(who, "You identify everything around you.") end - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -100,7 +100,7 @@ newTalent{ cooldown = 20, action = function(self, t) self:magicMap(10 + self:combatSpellpower(0.1) * self:getTalentLevel(t)) - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -119,7 +119,7 @@ newTalent{ activate = function(self, t) -- There is an implicit +10, as it is the default radius local rad = self:combatSpellpower(0.1) * self:getTalentLevel(t) - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return { esp = self:addTemporaryValue("esp", {range=rad, all=1}), } diff --git a/game/modules/tome/data/talents/spells/earth.lua b/game/modules/tome/data/talents/spells/earth.lua index 2c4cc53c51547b75d6c18f8c4545978e23da8513..b75e927f8a8b686cbc7da8e5c96f894cddda7286 100644 --- a/game/modules/tome/data/talents/spells/earth.lua +++ b/game/modules/tome/data/talents/spells/earth.lua @@ -31,7 +31,7 @@ newTalent{ DEFEND = 10, }, activate = function(self, t) - game:playSound("talents/earth") + game:playSoundNear(self, "talents/earth") local power = 4 + self:combatSpellpower(0.03) * self:getTalentLevel(t) return { armor = self:addTemporaryValue("combat_armor", power), @@ -62,7 +62,7 @@ newTalent{ for i = 1, self:getTalentLevelRaw(t) do self:project(tg, x, y, DamageType.DIG, 1) end - game:playSound("talents/earth") + game:playSoundNear(self, "talents/earth") return true end, info = function(self, t) @@ -87,7 +87,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.SPELLKNOCKBACK, self:spellCrit(8 + self:combatSpellpower(0.15) * self:getTalentLevel(t))) - game:playSound("talents/earth") + game:playSoundNear(self, "talents/earth") return true end, info = function(self, t) @@ -147,7 +147,7 @@ newTalent{ end end end end - game:playSound("talents/earth") + game:playSoundNear(self, "talents/earth") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/spells/fire.lua b/game/modules/tome/data/talents/spells/fire.lua index 683ed48912856b749762d098b21c4854b931f150..1853a49d773cb95fef553899e561aa7806217273 100644 --- a/game/modules/tome/data/talents/spells/fire.lua +++ b/game/modules/tome/data/talents/spells/fire.lua @@ -34,7 +34,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.FIREBURN, self:spellCrit(25 + self:combatSpellpower(1.2) * self:getTalentLevel(t)), {type="flame"}) - game:playSound("talents/fire") + game:playSoundNear(self, "talents/fire") return true end, info = function(self, t) @@ -59,7 +59,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.FLAMESHOCK, {dur=self:getTalentLevelRaw(t) + 2, dam=self:spellCrit(10 + self:combatSpellpower(0.6) * self:getTalentLevel(t))}, {type="flame"}) - game:playSound("talents/fire") + game:playSoundNear(self, "talents/fire") return true end, info = function(self, t) @@ -84,7 +84,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.FIRE, self:spellCrit(28 + self:combatSpellpower(0.6) * self:getTalentLevel(t)), {type="flame"}) - game:playSound("talents/fireflash") + game:playSoundNear(self, "talents/fireflash") return true end, info = function(self, t) @@ -121,7 +121,7 @@ newTalent{ engine.Entity.new{alpha=100, display='', color_br=180, color_bg=30, color_bb=60}, nil, self:spellFriendlyFire() ) - game:playSound("talents/fire") + game:playSoundNear(self, "talents/fire") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/spells/meta.lua b/game/modules/tome/data/talents/spells/meta.lua index 51f2e83ed0c74ddfd1084314ceb8e6ac1e4de2d0..453a7c5319cd00d686fd9367649143a404d892d9 100644 --- a/game/modules/tome/data/talents/spells/meta.lua +++ b/game/modules/tome/data/talents/spells/meta.lua @@ -64,7 +64,7 @@ newTalent{ target.energy.value = old end end - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -98,7 +98,7 @@ newTalent{ BUFF = 10, }, activate = function(self, t) - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") local power = util.bound(self:getTalentLevel(t) / 15, 0.05, 0.3) return { cd = self:addTemporaryValue("spell_cooldown_reduction", power), @@ -136,7 +136,7 @@ newTalent{ self.talents_cd[tid] = nil end self.changed = true - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/spells/temporal.lua b/game/modules/tome/data/talents/spells/temporal.lua index 747a144f3a95c5d5aba154ccd913907760c5a780..cfecf970256d2534864f221f03c402cca599bde3 100644 --- a/game/modules/tome/data/talents/spells/temporal.lua +++ b/game/modules/tome/data/talents/spells/temporal.lua @@ -34,7 +34,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.TIME_PRISON, 4 + self:combatSpellpower(0.03) * self:getTalentLevel(t), {type="manathrust"}) - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -59,7 +59,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end self:project(tg, x, y, DamageType.SLOW, util.bound((self:combatSpellpower(0.15) * self:getTalentLevel(t)) / 100, 0.1, 0.4), {type="manathrust"}) - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) @@ -80,7 +80,7 @@ newTalent{ BUFF = 10, }, activate = function(self, t) - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") local power = util.bound((self:combatSpellpower(0.5) * self:getTalentLevel(t)) / 100, 0.1, 2) return { speed = self:addTemporaryValue("energy", {mod=power}), @@ -111,7 +111,7 @@ newTalent{ local dur = util.bound(5 + math.floor(self:getTalentLevel(t)), 5, 15) local power = 50 + self:combatSpellpower(0.5) * self:getTalentLevel(t) self:setEffect(self.EFF_TIME_SHIELD, dur, {power=power}) - game:playSound("talents/spell_generic") + game:playSoundNear(self, "talents/spell_generic") return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/spells/water.lua b/game/modules/tome/data/talents/spells/water.lua index c2f1e65984c0dca4fcee470cf64ada424fb48040..7312a4e12fe3bfc6b74e078bfc84256248d4e19d 100644 --- a/game/modules/tome/data/talents/spells/water.lua +++ b/game/modules/tome/data/talents/spells/water.lua @@ -45,7 +45,7 @@ newTalent{ engine.Entity.new{alpha=100, display='', color_br=30, color_bg=180, color_bb=60}, nil, self:spellFriendlyFire() ) - game:playSound("talents/cloud") + game:playSoundNear(self, "talents/cloud") return true end, info = function(self, t) @@ -72,7 +72,7 @@ newTalent{ if not x or not y then return nil end self:project(tg, x, y, DamageType.COLD, self:spellCrit(12 + self:combatSpellpower(0.25) * self:getTalentLevel(t)), {type="freeze"}) self:project(tg, x, y, DamageType.FREEZE, 3 + math.floor(self:getTalentLevel(t) / 3)) - game:playSound("talents/ice") + game:playSoundNear(self, "talents/ice") return true end, info = function(self, t) @@ -107,6 +107,7 @@ newTalent{ end, false ) + game:playSoundNear(self, "talents/tidalwave") return true end, info = function(self, t) @@ -142,7 +143,7 @@ newTalent{ end, false ) - game:playSound("talents/ice") + game:playSoundNear(self, "talents/ice") return true end, info = function(self, t)