feat: add store audio effects and rebalance card stats

- Added new audio files for store interactions: `buy.mp3`, `card.mp3`, and `card-bonus.mp3`.
- Updated `BootScene` to preload the new sound effects.
- Implemented sound triggers in `StoreScene`:
  - Plays `sfx_store_buy` upon purchasing cards.
  - Plays `sfx_store_card` when revealing a card.
  - Plays `sfx_store_card_bonus` for rare, epic, and legendary cards.
- Rebalanced `data/cards.json` to adjust game mechanics:
  - Set `attack` to `0` for all legendary card levels.
  - Reduced `health` values across all card tiers.
  - Standardized `delay` values to `0` or `1` for most cards, removing high delay values.
This commit is contained in:
Brian Fertig 2026-03-23 18:50:22 -06:00
parent 6c8b236e86
commit eabf10ca4a
6 changed files with 342 additions and 331 deletions

BIN
assets/audio/fx/buy.mp3 Normal file

Binary file not shown.

Binary file not shown.

BIN
assets/audio/fx/card.mp3 Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -66,6 +66,9 @@ export class BootScene extends Phaser.Scene {
this.load.audio('sfx_rupture', 'assets/audio/fx/rupture.mp3');
this.load.audio('sfx_rupture_effect', 'assets/audio/fx/rupture-effect.mp3');
this.load.audio('sfx_fortify', 'assets/audio/fx/fortify.mp3');
this.load.audio('sfx_store_buy', 'assets/audio/fx/buy.mp3');
this.load.audio('sfx_store_card', 'assets/audio/fx/card.mp3');
this.load.audio('sfx_store_card_bonus', 'assets/audio/fx/card-bonus.mp3');
this.load.audio('music_main_menu', 'assets/audio/music/main_menu.mp3');

View File

@ -234,6 +234,8 @@ export class StoreScene extends Phaser.Scene {
return;
}
this.sound.play('sfx_store_buy', { volume: 0.8 });
// Add cards to collection
cards.forEach(card => SaveManager.addCard(this.save, card.id));
this.registry.set('save', this.save);
@ -347,6 +349,7 @@ export class StoreScene extends Phaser.Scene {
ease: 'Quad.In',
onComplete: () => {
back.setVisible(false);
this.sound.play('sfx_store_card', { volume: 0.8 });
// Show front, flip in
cardObj.setAlpha(1);
@ -356,6 +359,11 @@ export class StoreScene extends Phaser.Scene {
duration: 150,
ease: 'Quad.Out',
onComplete: () => {
// Bonus sound for rare, epic, legendary
if (['rare', 'epic', 'legendary'].includes(card.rarity)) {
this.sound.play('sfx_store_card_bonus', { volume: 0.9 });
}
// Pop effect
this.tweens.add({
targets: cardObj,