diff --git a/audio/encounter-tier-1.flac b/audio/encounter-tier-1.flac new file mode 100644 index 0000000..9cb49c3 Binary files /dev/null and b/audio/encounter-tier-1.flac differ diff --git a/audio/encounter-tier-2.flac b/audio/encounter-tier-2.flac new file mode 100644 index 0000000..ca4c756 Binary files /dev/null and b/audio/encounter-tier-2.flac differ diff --git a/audio/encounter-tier-3.flac b/audio/encounter-tier-3.flac new file mode 100644 index 0000000..2490a25 Binary files /dev/null and b/audio/encounter-tier-3.flac differ diff --git a/audio/event-beast-attack.flac b/audio/event-beast-attack.flac new file mode 100644 index 0000000..b373ad1 Binary files /dev/null and b/audio/event-beast-attack.flac differ diff --git a/audio/event-hut-fire.flac b/audio/event-hut-fire.flac new file mode 100644 index 0000000..7fa6671 Binary files /dev/null and b/audio/event-hut-fire.flac differ diff --git a/audio/event-ruined-trap.flac b/audio/event-ruined-trap.flac new file mode 100644 index 0000000..6c0a793 Binary files /dev/null and b/audio/event-ruined-trap.flac differ diff --git a/audio/event-thief.flac b/audio/event-thief.flac new file mode 100644 index 0000000..6434f5e Binary files /dev/null and b/audio/event-thief.flac differ diff --git a/script/audioLibrary.js b/script/audioLibrary.js index c80226c..3150caf 100644 --- a/script/audioLibrary.js +++ b/script/audioLibrary.js @@ -31,16 +31,9 @@ var AudioLibrary = { EVENT_BEAST_ATTACK: 'audio/event-beast-attack.flac', EVENT_SOLDIER_ATTACK: 'audio/event-soldier-attack.flac', EVENT_THIEF: 'audio/event-thief.flac', - ENCOUNTER_SNARLING_BEAST: 'audio/snarling-beast.flac', - ENCOUNTER_GAUNT_MAN: 'audio/gaunt-man.flac', - ENCOUNTER_STRANGE_BIRD: 'audio/strange-bird.flac', - ENCOUNTER_SHIVERING_MAN: 'audio/shivering-man.flac', - ENCOUNTER_MAN_EATER: 'audio/man-eater.flac', - ENCOUNTER_SCAVENGER: 'audio/scavenger.flac', - ENCOUNTER_HUGE_LIZARD: 'audio/huge-lizard.flac', - ENCOUNTER_FERAL_TERROR: 'audio/feral-terror.flac', - ENCOUNTER_SOLDIER: 'audio/soldier.flac', - ENCOUNTER_SNIPER: 'audio/sniper.flac', + ENCOUNTER_TIER_1: 'audio/encounter-tier-1.flac', + ENCOUNTER_TIER_2: 'audio/encounter-tier-2.flac', + ENCOUNTER_TIER_3: 'audio/encounter-tier-3.flac', MUSIC_DUSTY_PATH: 'audio/dusty-path.flac', MUSIC_SILENT_FOREST: 'audio/silent-forest.flac', MUSIC_LONELY_HUT: 'audio/lonely-hut.flac', diff --git a/script/events.js b/script/events.js index 63d482a..f67f42e 100644 --- a/script/events.js +++ b/script/events.js @@ -1050,7 +1050,6 @@ var Events = { } else { var r = Math.floor(Math.random()*(possibleEvents.length)); Events.startEvent(possibleEvents[r]); - // AudioEngine.playSound(AudioLibrary.TRIGGER_EVENT); AudioEngine.playEventMusic(possibleEvents[r].audio); } } @@ -1072,8 +1071,16 @@ var Events = { // play audio only when fight is possible if (possibleFights.length > 0) { - // AudioEngine.playSound(AudioLibrary.TRIGGER_FIGHT); - AudioEngine.playEventMusic(possibleFights[r].audio); + if (World.getDistance() > 20) { + // Tier 3 + AudioEngine.playEventMusic(AudioLibrary.ENCOUNTER_TIER_3); + } else if (World.getDistance() > 10) { + // Tier 2 + AudioEngine.playEventMusic(AudioLibrary.ENCOUNTER_TIER_2); + } else { + // Tier 1 + AudioEngine.playEventMusic(AudioLibrary.ENCOUNTER_TIER_1); + } } }, diff --git a/script/events/encounters.js b/script/events/encounters.js index 61bc1b3..c5e165f 100644 --- a/script/events/encounters.js +++ b/script/events/encounters.js @@ -38,8 +38,7 @@ Events.Encounters = [ }, notification: _('a snarling beast leaps out of the underbrush') } - }, - audio: AudioLibrary.ENCOUNTER_SNARLING_BEAST + } }, { /* Gaunt Man */ title: _('A Gaunt Man'), @@ -76,8 +75,7 @@ Events.Encounters = [ }, notification: _('a gaunt man approaches, a crazed look in his eye') } - }, - audio: AudioLibrary.ENCOUNTER_GAUNT_MAN + } }, { /* Strange Bird */ title: _('A Strange Bird'), @@ -114,8 +112,7 @@ Events.Encounters = [ }, notification: _('a strange looking bird speeds across the plains') } - }, - audio: AudioLibrary.ENCOUNTER_STRANGE_BIRD + } }, /* Tier 2*/ { /* Shivering Man */ @@ -158,8 +155,7 @@ Events.Encounters = [ }, notification: _('a shivering man approaches and attacks with surprising strength') } - }, - audio: AudioLibrary.ENCOUNTER_SHIVERING_MAN + } }, { /* Man-eater */ title: _('A Man-Eater'), @@ -196,8 +192,7 @@ Events.Encounters = [ }, notification: _('a large creature attacks, claws freshly bloodied') } - }, - audio: AudioLibrary.ENCOUNTER_MAN_EATER + } }, { /* Scavenger */ title: _('A Scavenger'), @@ -239,8 +234,7 @@ Events.Encounters = [ }, notification: _('a scavenger draws close, hoping for an easy score') } - }, - audio: AudioLibrary.ENCOUNTER_SCAVENGER + } }, { /* Huge Lizard */ title: _('A Huge Lizard'), @@ -277,8 +271,7 @@ Events.Encounters = [ }, notification: _('the grass thrashes wildly as a huge lizard pushes through') } - }, - audio: AudioLibrary.ENCOUNTER_HUGE_LIZARD + } }, /* Tier 3*/ { /* Feral Terror */ @@ -316,8 +309,7 @@ Events.Encounters = [ }, notification: _('a beast, wilder than imagining, erupts out of the foliage') } - }, - audio: AudioLibrary.ENCOUNTER_FERAL_TERROR + } }, { /* Soldier */ title: _('A Soldier'), @@ -360,8 +352,7 @@ Events.Encounters = [ }, notification: _('a soldier opens fire from across the desert') } - }, - audio: AudioLibrary.ENCOUNTER_SOLDIER + } }, { /* Sniper */ title: _('A Sniper'), @@ -404,7 +395,6 @@ Events.Encounters = [ }, notification: _('a shot rings out, from somewhere in the long grass') } - }, - audio: AudioLibrary.ENCOUNTER_SNIPER + } } ];