diff --git a/Source/player.cpp b/Source/player.cpp index 894b8335d..ad372bc53 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -449,6 +449,7 @@ bool WeaponDecay(Player &player, int ii) if (player.InvBody[ii]._iPLDam <= -100) { RemoveEquipment(player, static_cast(ii), true); CalcPlrInv(player, true); + PlaySfxLoc(SfxID::BrokeWeapon, player.position.tile); return true; } CalcPlrInv(player, true); @@ -480,6 +481,7 @@ bool DamageWeapon(Player &player, unsigned damageFrequency) if (player.InvBody[INVLOC_HAND_LEFT]._iDurability <= 0) { RemoveEquipment(player, INVLOC_HAND_LEFT, true); CalcPlrInv(player, true); + PlaySfxLoc(SfxID::BrokeWeapon, player.position.tile); return true; } } @@ -493,6 +495,7 @@ bool DamageWeapon(Player &player, unsigned damageFrequency) if (player.InvBody[INVLOC_HAND_RIGHT]._iDurability == 0) { RemoveEquipment(player, INVLOC_HAND_RIGHT, true); CalcPlrInv(player, true); + PlaySfxLoc(SfxID::BrokeWeapon, player.position.tile); return true; } } @@ -506,6 +509,7 @@ bool DamageWeapon(Player &player, unsigned damageFrequency) if (player.InvBody[INVLOC_HAND_RIGHT]._iDurability == 0) { RemoveEquipment(player, INVLOC_HAND_RIGHT, true); CalcPlrInv(player, true); + PlaySfxLoc(SfxID::BrokeWeapon, player.position.tile); return true; } } @@ -519,6 +523,7 @@ bool DamageWeapon(Player &player, unsigned damageFrequency) if (player.InvBody[INVLOC_HAND_LEFT]._iDurability == 0) { RemoveEquipment(player, INVLOC_HAND_LEFT, true); CalcPlrInv(player, true); + PlaySfxLoc(SfxID::BrokeWeapon, player.position.tile); return true; } } @@ -932,6 +937,7 @@ void DamageParryItem(Player &player) if (player.InvBody[INVLOC_HAND_LEFT]._iDurability == 0) { RemoveEquipment(player, INVLOC_HAND_LEFT, true); CalcPlrInv(player, true); + PlaySfxLoc(SfxID::BrokeShield, player.position.tile); } } @@ -941,6 +947,7 @@ void DamageParryItem(Player &player) if (player.InvBody[INVLOC_HAND_RIGHT]._iDurability == 0) { RemoveEquipment(player, INVLOC_HAND_RIGHT, true); CalcPlrInv(player, true); + PlaySfxLoc(SfxID::BrokeShield, player.position.tile); } } } @@ -996,8 +1003,10 @@ void DamageArmor(Player &player) if (targetHead) { RemoveEquipment(player, INVLOC_HEAD, true); + PlaySfxLoc(SfxID::BrokeHelmet, player.position.tile); } else { RemoveEquipment(player, INVLOC_CHEST, true); + PlaySfxLoc(SfxID::BrokeArmor, player.position.tile); } CalcPlrInv(player, true); } diff --git a/Source/sound_effect_enums.h b/Source/sound_effect_enums.h index 9c8822de0..f6f745653 100644 --- a/Source/sound_effect_enums.h +++ b/Source/sound_effect_enums.h @@ -122,6 +122,7 @@ enum class SfxID : int16_t { Swing2, WarriorDeath, QuestDone, + BrokeArmor, BarrelExpload, BarrelBreak, ChestOpen, @@ -146,6 +147,7 @@ enum class SfxID : int16_t { ItemStaffFlip, ItemSwordFlip, ItemGold, + BrokeHelmet, ItemAnvil, ItemAxe, ItemBloodStone, @@ -170,6 +172,8 @@ enum class SfxID : int16_t { OperateShrine1, ReadBook, Sarcophagus, + BrokeShield, + BrokeWeapon, MenuMove, MenuSelect, TriggerTrap, diff --git a/assets/txtdata/sound/effects.tsv b/assets/txtdata/sound/effects.tsv index 8feceaad9..1255187da 100644 --- a/assets/txtdata/sound/effects.tsv +++ b/assets/txtdata/sound/effects.tsv @@ -6,6 +6,7 @@ Swing Misc sfx\misc\swing.wav Swing2 Misc sfx\misc\swing2.wav WarriorDeath Misc sfx\misc\dead.wav QuestDone Stream sfx\misc\questdon.wav +BrokeArmor Misc sfx\items\armrfkd.wav BarrelExpload Misc sfx\items\barlfire.wav BarrelBreak Misc sfx\items\barrel.wav ChestOpen Misc sfx\items\chest.wav @@ -30,6 +31,7 @@ ItemSignFlip Misc sfx\items\flipsign.wav ItemStaffFlip Misc sfx\items\flipstaf.wav ItemSwordFlip Misc sfx\items\flipswor.wav ItemGold Misc sfx\items\gold.wav +BrokeHelmet Misc sfx\items\hlmtfkd.wav ItemAnvil Misc sfx\items\invanvl.wav ItemAxe Misc sfx\items\invaxe.wav ItemBloodStone Misc sfx\items\invblst.wav @@ -54,6 +56,8 @@ OperateShrine Misc sfx\items\magic.wav OperateShrine1 Misc sfx\items\magic1.wav ReadBook Misc sfx\items\readbook.wav Sarcophagus Misc sfx\items\sarc.wav +BrokeShield Misc sfx\items\shielfkd.wav +BrokeWeapon Misc sfx\items\Swrdfkd.wav MenuMove Ui sfx\items\titlemov.wav MenuSelect Ui sfx\items\titlslct.wav TriggerTrap Misc sfx\items\trap.wav