15 Commits

Author SHA1 Message Date
Fakey McFakename 1fada4620b Update world.js (#739)
'disintigrate' -> 'disintegrate'
2025-05-23 11:33:06 -04:00
uwueric d39db9eeee Added a two-headed creature encounter (tier 1 encounter) (#741)
* Added two-headed creature encounter (tier 1) to event->encounters.js
2025-05-23 11:31:54 -04:00
Blake Grotewold e1c67e5f6f Merge pull request #662 from ClashTheBunny/main
Remove junk files
2025-02-17 23:06:57 -06:00
Blake Grotewold fe26527185 Merge pull request #708 from Quix0r/fixes/no-thumbs-db
Don't include Thumbs.db files
2025-02-17 23:06:47 -06:00
Esa Juhani Ruoho caad2ea61e Fix Candy Box url (#722)
as per https://github.com/doublespeakgames/adarkroom/issues/693 - the current Candy Box url is dead and leads to spam. This fixes the url.
2024-04-02 17:13:28 -04:00
An! 42dcfef723 resolve loadAudioFile error when query string in URL (#718)
When the URL contains a query string (e.g., "?lang=zh_cn") or is accessed with index.html, loadAudioFile fails to load the audio files. The issue has been resolved by removing that from the URL before before concatenating "src" link.
2023-12-02 11:25:22 -05:00
Michael Townsend fce8af38a8 defensing timer recall 2023-09-14 14:10:08 -04:00
Amir Rajan 4fcef234d8 Update README.md (#711)
Added link to Steam version.
2023-07-08 10:41:46 -04:00
Michael Townsend 6f67c12893 - scroll path when outfit gets long 2023-06-24 10:38:31 -04:00
Michael Townsend d6059af2b1 - put alien allow in the outfitting options
- prevent queueing up multiple explosions from the unstable automaton
2023-06-15 16:08:38 -04:00
Michael Townsend 68c5e2dfca bugs 2023-06-12 14:40:55 -04:00
Michael Townsend 9c02581b15 bugs 2023-06-12 10:36:01 -04:00
Michael Townsend 4c683dd397 bugs 2023-06-12 10:20:28 -04:00
Roland Häder 9edcd50b39 Continued:
- don't include these files, you can have them locally
2023-06-10 01:25:11 +02:00
Randall Mason 9bb0caa04c Remove junk files 2020-08-29 13:56:25 -05:00
12 changed files with 72 additions and 13 deletions
+1
View File
@@ -6,3 +6,4 @@
lang/.DS_Store
.DS_Store
node_modules
img/Thumbs.db
+1
View File
@@ -44,3 +44,4 @@ or play the latest on [GitHub](http://doublespeakgames.github.io/adarkroom)
<a href="https://itunes.apple.com/us/app/a-dark-room/id736683061"><img src="http://i.imgur.com/DMdnDYq.png" height="50"></a>
<a href="https://play.google.com/store/apps/details?id=com.yourcompany.adarkroom"><img src="http://i.imgur.com/bLWWj4r.png" height="50"></a>
<a href="https://store.steampowered.com/app/2460660/A_Dark_Room/"><img src="https://i.imgur.com/yz6cnU0.png" height="50"></a>
+9
View File
@@ -57,3 +57,12 @@ div.perkRow {
div.perkRow .row_key {
float: none;
}
#pathScroller {
padding-top: 10px;
position: relative;
top: -10px;
max-height: 660px;
width: 475px;
overflow-y: auto;
}
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -7,7 +7,7 @@
==================
A minimalist text adventure by Michael Townsend and all his friends.
Inspired by Candy Box (http://candies.aniwey.net/)
Inspired by Candy Box (https://candybox2.github.io/candybox)
Contribute on GitHub! (https://github.com/doublespeakgames/adarkroom/)
-->
<title>A Dark Room</title>
BIN
View File
Binary file not shown.
+5 -1
View File
@@ -204,7 +204,11 @@ var AudioEngine = {
},
loadAudioFile: function (src) {
if (src.indexOf('http') === -1) {
src = window.location + src;
var path = window.location.protocol + '//' + window.location.hostname + (window.location.port ?(':' + window.location.port) : '') + window.location.pathname;
if(path.endsWith('index.html')){
path = path.slice(0, - 10);
}
src = path + src;
}
if (AudioEngine.AUDIO_BUFFER_CACHE[src]) {
return new Promise(function (resolve, reject) {
+9 -5
View File
@@ -83,6 +83,7 @@ var Events = {
startCombat: function(scene) {
Engine.event('game event', 'combat');
Events.fought = false;
Events.won = false;
var desc = $('#description', Events.eventPanel());
$('<div>').text(scene.notification).appendTo(desc);
@@ -567,6 +568,7 @@ var Events = {
if(enemyHp <= 0 && !Events.won) {
// Success!
Events.won = true;
if (explosion) {
Events.explode(enemy, $('#wanderer'), explosion);
}
@@ -601,6 +603,7 @@ var Events = {
Events.checkPlayerDeath();
}
else if(hp <= 0 && !Events.won) {
Events.won = true;
Events.winFight();
}
Events.updateFighterDiv(target);
@@ -639,6 +642,7 @@ var Events = {
}
if (venomous && !shielded) {
clearInterval(Events._dotTimer);
Events._dotTimer = setInterval(() => {
Events.dotDamage(enemy, Math.floor(dmg / 2));
}, Events.DOT_TICK);
@@ -763,9 +767,9 @@ var Events = {
},
clearTimeouts: () => {
clearTimeout(Events._enemyAttackTimer);
Events._specialTimers.forEach(clearTimeout);
clearTimeout(Events._dotTimer);
clearInterval(Events._enemyAttackTimer);
Events._specialTimers.forEach(clearInterval);
clearInterval(Events._dotTimer);
},
endFight: function() {
@@ -1325,7 +1329,6 @@ var Events = {
} else {
var r = Math.floor(Math.random()*(possibleEvents.length));
Events.startEvent(possibleEvents[r]);
AudioEngine.playEventMusic(possibleEvents[r].audio);
}
}
@@ -1374,6 +1377,7 @@ var Events = {
if (!event) {
return;
}
AudioEngine.stopEventMusic();
Events.eventPanel().remove();
Events.activeEvent().eventPanel = null;
Events.eventStack.shift();
@@ -1449,7 +1453,7 @@ var Events = {
if(typeof(state[i]) == 'object'){
Events.recallDelay(stateName +'["'+ i +'"]', target[i]);
} else {
if(typeof target[i] == 'function'){
if(target && typeof target[i] == 'function'){
target[i]();
} else {
$SM.remove(stateName);
+37
View File
@@ -114,6 +114,43 @@ Events.Encounters = [
}
}
},
{ /* Two-Headed Creature */
title: _('A Two-Headed Creature'),
isAvailable: function() {
return World.getDistance() <= 10 && World.getTerrain() == World.TILE.FIELD;
},
scenes: {
'start': {
combat: true,
enemy: 'two-headed creature',
enemyName: _('two-headed creature'),
deathMessage: _('the two creatures are dead'),
chara: 'K',
damage: 2,
hit: 0.5,
attackDelay: 3,
health: 10,
loot: {
'fur': {
min: 2,
max: 4,
chance: 1
},
'teeth': {
min: 2,
max: 3,
chance: 0.8
},
'meat': {
min: 2,
max: 3,
chance: 0.8
}
},
notification: _('a two-headed creature appears, the smaller head trembling')
}
}
},
/* Tier 2*/
{ /* Shivering Man */
title: _('A Shivering Man'),
+2 -2
View File
@@ -1255,7 +1255,7 @@ Events.Executioner = {
'continue': {
text: _('continue'),
cooldown: Events._LEAVE_COOLDOWN,
nextScene: { 1: '4' }
nextScene: { 1: '4-3' }
},
'leave': {
text: _('leave'),
@@ -1745,7 +1745,7 @@ Events.Executioner = {
buttons: {
'continue': {
text: _('continue'),
nextScene: { 1: '7-1' }
nextScene: { 1: '8' }
},
'leave': {
text: _('leave'),
+5 -2
View File
@@ -33,8 +33,10 @@ var Path = {
.addClass('location')
.appendTo('div#locationSlider');
this.scroller = $('<div>').attr('id', 'pathScroller').appendTo(this.panel);
// Add the outfitting area
var outfitting = $('<div>').attr({'id': 'outfitting', 'data-legend': _('supplies:')}).appendTo(this.panel);
var outfitting = $('<div>').attr({'id': 'outfitting', 'data-legend': _('supplies:')}).appendTo(this.scroller);
$('<div>').attr('id', 'bagspace').appendTo(outfitting);
// Add the embark button
@@ -44,7 +46,7 @@ var Path = {
click: Path.embark,
width: '80px',
cooldown: World.DEATH_COOLDOWN
}).appendTo(this.panel);
}).appendTo(this.scroller);
Path.outfit = $SM.get('outfit');
@@ -173,6 +175,7 @@ var Path = {
'energy cell': {type: 'tool', desc: _('emits a soft red glow') },
'bayonet': {type: 'weapon' },
'charm': {type: 'tool'},
'alien alloy': { type: 'tool' },
'medicine': {type: 'tool', desc: _('restores') + ' ' + World.MEDS_HEAL + ' ' + _('hp') }
}, Room.Craftables, Fabricator.Craftables);
+2 -2
View File
@@ -30,7 +30,7 @@ var World = {
MOVES_PER_FOOD: 2,
MOVES_PER_WATER: 1,
DEATH_COOLDOWN: 120,
FIGHT_CHANCE: 0, //0.20, TODO UNCOMMENT THIS
FIGHT_CHANCE: 0.20,
BASE_HEALTH: 10,
BASE_HIT_CHANCE: 0.8,
MEAT_HEAL: 8,
@@ -102,7 +102,7 @@ var World = {
cost: { 'bolas': 1 }
},
'plasma rifle': {
verb: _('disintigrate'),
verb: _('disintegrate'),
type: 'ranged',
damage: 12,
cooldown: 1,