diff --git a/agot-bg-game-server/public/sounds/house-themes/arryn.ogg b/agot-bg-game-server/public/sounds/house-themes/arryn.ogg new file mode 100644 index 000000000..ab6eba4fd Binary files /dev/null and b/agot-bg-game-server/public/sounds/house-themes/arryn.ogg differ diff --git a/agot-bg-game-server/public/sounds/house-themes/baratheon.ogg b/agot-bg-game-server/public/sounds/house-themes/baratheon.ogg new file mode 100644 index 000000000..6afb60307 Binary files /dev/null and b/agot-bg-game-server/public/sounds/house-themes/baratheon.ogg differ diff --git a/agot-bg-game-server/public/sounds/house-themes/greyjoy.ogg b/agot-bg-game-server/public/sounds/house-themes/greyjoy.ogg new file mode 100644 index 000000000..8d252b524 Binary files /dev/null and b/agot-bg-game-server/public/sounds/house-themes/greyjoy.ogg differ diff --git a/agot-bg-game-server/public/sounds/house-themes/lannister.ogg b/agot-bg-game-server/public/sounds/house-themes/lannister.ogg new file mode 100644 index 000000000..7e8878c97 Binary files /dev/null and b/agot-bg-game-server/public/sounds/house-themes/lannister.ogg differ diff --git a/agot-bg-game-server/public/sounds/house-themes/martell.ogg b/agot-bg-game-server/public/sounds/house-themes/martell.ogg new file mode 100644 index 000000000..21e6bbbef Binary files /dev/null and b/agot-bg-game-server/public/sounds/house-themes/martell.ogg differ diff --git a/agot-bg-game-server/public/sounds/house-themes/stark.ogg b/agot-bg-game-server/public/sounds/house-themes/stark.ogg new file mode 100644 index 000000000..9758512b4 Binary files /dev/null and b/agot-bg-game-server/public/sounds/house-themes/stark.ogg differ diff --git a/agot-bg-game-server/public/sounds/house-themes/targaryen.ogg b/agot-bg-game-server/public/sounds/house-themes/targaryen.ogg new file mode 100644 index 000000000..25df6c790 Binary files /dev/null and b/agot-bg-game-server/public/sounds/house-themes/targaryen.ogg differ diff --git a/agot-bg-game-server/public/sounds/house-themes/tyrell.ogg b/agot-bg-game-server/public/sounds/house-themes/tyrell.ogg new file mode 100644 index 000000000..c1f993fbd Binary files /dev/null and b/agot-bg-game-server/public/sounds/house-themes/tyrell.ogg differ diff --git a/agot-bg-game-server/src/client/IngameComponent.tsx b/agot-bg-game-server/src/client/IngameComponent.tsx index cd792a0c0..630b847dd 100644 --- a/agot-bg-game-server/src/client/IngameComponent.tsx +++ b/agot-bg-game-server/src/client/IngameComponent.tsx @@ -113,6 +113,7 @@ import { houseColorFilters } from "./houseColorFilters"; import LocalStorageService from "./utils/localStorageService"; import SimpleInfluenceIconComponent from "./game-state-panel/utils/SimpleInfluenceIconComponent"; import VolumeSliderComponent from "./utils/VolumeSliderComponent"; +import { houseThemes } from "./utils/SfxManager"; interface ColumnOrders { gameStateColumn: number; @@ -219,6 +220,7 @@ export default class IngameComponent extends Component { unitImages.set("stark", unitImages.get("bolton")); houseIconImages.set("stark", houseIconImages.get("bolton")); houseColorFilters.set("stark", houseColorFilters.get("bolton")); + houseThemes.set("stark", houseThemes.get("bolton")); } } diff --git a/agot-bg-game-server/src/client/game-state-panel/CombatComponent.tsx b/agot-bg-game-server/src/client/game-state-panel/CombatComponent.tsx index febd52699..cf71b1074 100644 --- a/agot-bg-game-server/src/client/game-state-panel/CombatComponent.tsx +++ b/agot-bg-game-server/src/client/game-state-panel/CombatComponent.tsx @@ -204,7 +204,7 @@ export default class CombatComponent extends Component this.modifyUnitsOnMap()); this.props.mapControls.modifyOrdersOnMap.push(this.modifyOrdersOnMapCallback = () => this.modifyOrdersOnMap()); - this.props.gameClient.sfxManager.playCombatSound(); + this.props.gameClient.sfxManager.playCombatSound(this.props.gameState.attacker.id); } componentWillUnmount(): void { diff --git a/agot-bg-game-server/src/client/utils/SfxManager.ts b/agot-bg-game-server/src/client/utils/SfxManager.ts index 2b41b97d2..0c0c64de1 100644 --- a/agot-bg-game-server/src/client/utils/SfxManager.ts +++ b/agot-bg-game-server/src/client/utils/SfxManager.ts @@ -26,6 +26,29 @@ import voteSound from "../../../public/sounds/vote-started.ogg"; import introSound from "../../../public/sounds/game-of-thrones-intro.ogg"; import combatSound from "../../../public/sounds/combat.ogg"; +import baratheonTheme from "../../../public/sounds/house-themes/baratheon.ogg" +import lannisterrTheme from "../../../public/sounds/house-themes/lannister.ogg" +import starkTheme from "../../../public/sounds/house-themes/stark.ogg" +import martellTheme from "../../../public/sounds/house-themes/martell.ogg" +import greyjoyTheme from "../../../public/sounds/house-themes/greyjoy.ogg" +import tyrellTheme from "../../../public/sounds/house-themes/tyrell.ogg" +import arrynTheme from "../../../public/sounds/house-themes/arryn.ogg" +import targaryenTheme from "../../../public/sounds/house-themes/targaryen.ogg" + +import BetterMap from "../../utils/BetterMap"; + +export const houseThemes = new BetterMap([ + ["baratheon", baratheonTheme], + ["lannister", lannisterrTheme], + ["stark", starkTheme], + ["martell", martellTheme], + ["greyjoy", greyjoyTheme], + ["tyrell", tyrellTheme], + ["arryn", arrynTheme], + ["targaryen", targaryenTheme], + ["bolton", starkTheme] +]); + const soundsForKnights = [ intenseHorseStallionNeighSound, footmanYesMyLordSound, @@ -184,12 +207,13 @@ class SfxManager { this.playMusic(introSound, this.gameClient.musicVolume, false); } - playCombatSound(): void { + playCombatSound(attackerId?: string): void { if (this.gameClient.musicMuted) { return; } - this.playMusic(combatSound, this.gameClient.musicVolume, false); + const sound = attackerId ? houseThemes.tryGet(attackerId, combatSound) : combatSound; + this.playMusic(sound, this.gameClient.musicVolume, false); } playSoundWhenClickingMarchOrder(region: Region): void { diff --git a/agot-bg-website/agotboardgame_main/templates/agotboardgame_main/about.html b/agot-bg-website/agotboardgame_main/templates/agotboardgame_main/about.html index 44a3946ec..38ef2c307 100644 --- a/agot-bg-website/agotboardgame_main/templates/agotboardgame_main/about.html +++ b/agot-bg-website/agotboardgame_main/templates/agotboardgame_main/about.html @@ -23,9 +23,10 @@

What is Swords and Ravens?