Просмотр исходного кода

Enemy stats are shown. Struggling is much harder at negative HP.

tags/v0.2.8
Fen Dweller 7 лет назад
Родитель
Сommit
bfb66cc0e5
5 измененных файлов: 41 добавлений и 12 удалений
  1. +1
    -1
      combat.js
  2. +10
    -1
      feast.css
  3. +17
    -9
      feast.html
  4. +6
    -0
      feast.js
  5. +7
    -1
      vore.js

+ 1
- 1
combat.js Просмотреть файл

@@ -344,7 +344,7 @@ function leer(attacker) {
desc: "Leer at something",
attackPlayer: function(defender) {
attacker.leering = true;
return attacker.description("The") + " leers at you.";
return [attacker.description("The") + " leers at you."];
},
requirements: [
function(attacker, defender) { return attacker.leering != true && attacker.flags.grappled != true; }


+ 10
- 1
feast.css Просмотреть файл

@@ -106,11 +106,20 @@ button {
overflow: auto;
}

#stats {
.stats {
float: right;
flex: 1;
}

#player-stats {
height: 50%;
}

#foe-stats {
display: none;
height: 50%;
}

.stat-line {

}


+ 17
- 9
feast.html Просмотреть файл

@@ -25,16 +25,24 @@
<div id="game">
<div id="game-and-stats">
<div id="log">
Welcome to Feast v0.1.1
Welcome to Feast v0.1.2
</div>
<div id="stats">
<div class="stat-line" id="time">Time: to file a bug report, because you shouldn't see this!</div>
<div class="stat-line" id="stat-name">Vim: 15</div>
<div class="stat-line" id="stat-cash">Spondulicks: 150000</div>
<div class="stat-line" id="stat-health">Pulchritude: 44</div>
<div class="stat-line" id="stat-stamina">Imagination: 97</div>
<div class="stat-line" id="stat-fullness">Candy Corn: 3</div>
<div class="stat-line" id="stat-bowels">Emotions: 35/100</div>
<div class="stats">
<div id="player-stats">
<div class="stat-line" id="time">Time: to file a bug report, because you shouldn't see this!</div>
<div class="stat-line" id="stat-name">Vim: 15</div>
<div class="stat-line" id="stat-cash">Spondulicks: 150000</div>
<div class="stat-line" id="stat-health">Pulchritude: 44</div>
<div class="stat-line" id="stat-stamina">Imagination: 97</div>
<div class="stat-line" id="stat-fullness">Candy Corn: 3</div>
<div class="stat-line" id="stat-bowels">Emotions: 35/100</div>
</div>
<div id="foe-stats">
FOE
<div class="stat-line" id="stat-foe-name">Vim: 21</div>
<div class="stat-line" id="stat-foe-health">Pulchritude: 21</div>
<div class="stat-line" id="stat-foe-stamina">Imagination: 66</div>
</div>
</div>
</div>
<div id="footer">


+ 6
- 0
feast.js Просмотреть файл

@@ -155,6 +155,10 @@ function updateCombat() {
li.appendChild(button);
list.appendChild(li);
}

document.getElementById("stat-foe-name").innerHTML = "Name: " + currentFoe.name;
document.getElementById("stat-foe-health").innerHTML = "Health: " + currentFoe.health + "/" + currentFoe.maxHealth;
document.getElementById("stat-foe-stamina").innerHTML = "Stamina: " + currentFoe.stamina + "/" + currentFoe.maxStamina;
}

function updateDialog() {
@@ -348,6 +352,7 @@ function update(lines=[]) {
function changeMode(newMode) {
mode = newMode;
let body = document.querySelector("body");
document.getElementById("foe-stats").style.display = "none";
body.className = "";
switch(mode) {
case "explore":
@@ -356,6 +361,7 @@ function changeMode(newMode) {
break;
case "combat":
body.classList.add("combat");
document.getElementById("foe-stats").style.display = "block";
break;
case "eaten":
body.classList.add("eaten");


+ 7
- 1
vore.js Просмотреть файл

@@ -144,7 +144,7 @@ function Anthro(name="Anthro") {
}

function Fen() {
Anthro.call(this, name, 1000000, 1099900, 1000000);
Creature.call(this, name, 1000000, 1099900, 1000000);

this.build = "loomy";
this.species = "crux";
@@ -354,6 +354,9 @@ function plead(predator) {
desc: "Ask very, very nicely for the predator to let you go. More effective if you haven't hurt your predator.",
struggle: function(player) {
let escape = Math.random() < predator.health / predator.maxHealth && Math.random() < 0.33;
if (player.health <= 0) {
escape = escape && Math.random() < 0.25;
}

if (escape) {
return {
@@ -376,6 +379,9 @@ function struggle(predator) {
desc: "Try to squirm free. More effective if you've hurt your predator.",
struggle: function(player) {
let escape = Math.random() > predator.health / predator.maxHealth && Math.random() < 0.33;
if (player.health <= 0) {
escape = escape && Math.random() < 0.25;
}

if (escape) {
return {


Загрузка…
Отмена
Сохранить