mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
add outside event music; add encounter music
This commit is contained in:
+3
-10
@@ -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',
|
||||
|
||||
+10
-3
@@ -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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
+10
-20
@@ -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
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user