소스 검색

Passage of time heals you. Fixed a wrong requirement for the leer move

tags/v0.2.8
Fen Dweller 7 년 전
부모
커밋
32e186e5b2
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -1
      combat.js
  2. +4
    -2
      feast.js

+ 1
- 1
combat.js 파일 보기

@@ -58,7 +58,7 @@ function leer(attacker) {
return "The " + attacker.description() + " leers at you.";
},
requirements: [
function(attacker, defender) { return attack.leering != true; }
function(attacker, defender) { return attacker.leering != true; }
]
};
}


+ 4
- 2
feast.js 파일 보기

@@ -153,12 +153,13 @@ function updateDisplay() {

document.getElementById("time").innerHTML = "Time: " + renderTime(time);
document.getElementById("stat-name").innerHTML = "Name: " + player.name;
document.getElementById("stat-health").innerHTML = "Health: " + player.health + "/" + player.maxHealth;
document.getElementById("stat-health").innerHTML = "Health: " + round(player.health,0) + "/" + round(player.maxHealth,0);
document.getElementById("stat-fullness").innerHTML = "Fullness: " + round(player.fullness(),0);
}

function advanceTime(amount) {
time = (time + amount) % 86400;
player.health = Math.min(amount * player.maxHealth / 86400 * 12 + player.health, player.maxHealth);
update(player.stomach.digest(amount));
}

@@ -315,7 +316,7 @@ function attackClicked(index) {
attacks = attacks.filter(attack => attack.requirements == undefined || attack.requirements.reduce((result, test) => result && test(currentFoe, player), true));

let attack = pick(attacks);
if (attack == null) {
attack = currentFoe.backupAttack;
}
@@ -349,6 +350,7 @@ function struggleClicked(index) {
if (player.health <= -100) {
update(["You digest in the depths of the " + currentFoe.description()]);
moveTo(respawnRoom,"You drift through space and time...");
advanceTime(86400/2);
changeMode("explore");
player.health = 100;
update(["You wake back up in your bed."]);


불러오는 중...
취소
저장