mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1fada4620b | |||
| d39db9eeee | |||
| e1c67e5f6f | |||
| fe26527185 | |||
| caad2ea61e | |||
| 42dcfef723 | |||
| fce8af38a8 | |||
| 4fcef234d8 | |||
| 6f67c12893 | |||
| d6059af2b1 | |||
| 68c5e2dfca | |||
| 9c02581b15 | |||
| 4c683dd397 | |||
| 9edcd50b39 | |||
| 9bb0caa04c |
@@ -6,3 +6,4 @@
|
||||
lang/.DS_Store
|
||||
.DS_Store
|
||||
node_modules
|
||||
img/Thumbs.db
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Binary file not shown.
+1
-1
@@ -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>
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+5
-1
@@ -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
@@ -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);
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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
@@ -32,9 +32,11 @@ var Path = {
|
||||
this.panel = $('<div>').attr('id', "pathPanel")
|
||||
.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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user