Kaynağa Gözat

Player digestion is more flexible now

tags/v0.2.8
Fen Dweller 7 yıl önce
ebeveyn
işleme
f289b8fa81
3 değiştirilmiş dosya ile 48 ekleme ve 8 silme
  1. +11
    -0
      combat.js
  2. +25
    -8
      feast.js
  3. +12
    -0
      vore.js

+ 11
- 0
combat.js Dosyayı Görüntüle

@@ -72,3 +72,14 @@ function poke(attacker) {
}
};
}



function digestPlayerStomach(predator,damage=20) {
return {
digest: function(player) {
attack(predator, player, damage);
return "The " + predator.description() + "'s stomach grinds over your body, swiftly digesting you.";
}
};
}

+ 25
- 8
feast.js Dosyayı Görüntüle

@@ -299,6 +299,15 @@ function changeMode(newMode) {

updateDisplay();
}

function respawn(respawnRoom) {
moveTo(respawnRoom,"You drift through space and time...");
advanceTime(86400/2);
changeMode("explore");
player.health = 100;
update(["You wake back up in your bed."]);
}

function startCombat(opponent) {
changeMode("combat");
currentFoe = opponent;
@@ -325,8 +334,11 @@ function attackClicked(index) {

if (player.health <= 0) {
update(["You fall to the ground..."]);
changeMode("eaten");
updateDisplay();
if (prefs.player.prey) {
changeMode("eaten");
} else {
respawn(respawnRoom);
}
}
}
}
@@ -345,15 +357,20 @@ function struggleClicked(index) {
if (result.escape) {
changeMode("explore");
} else {
player.health -= 20;
let digests = currentFoe.digests.filter(digest => digest.conditions == undefined || digest.conditions.reduce((result, test) => result && test(prefs), true));
digests = digests.filter(digest => digest.requirements == undefined || digest.requirements.reduce((result, test) => result && test(currentFoe, player), true));

let digest = pick(digests);

if (digest == null) {
digest = currentFoe.backupDigest;
}

update([digest.digest(player)]);

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."]);
respawn(respawnRoom);
}
}
}


+ 12
- 0
vore.js Dosyayı Görüntüle

@@ -58,6 +58,12 @@ function Anthro() {

this.struggles.push(new plead(this));
this.struggles.push(new struggle(this));

this.digests = [];

this.digests.push(new digestPlayerStomach(this,20));

this.backupDigest = new digestPlayerStomach(this,20);
}

function Fen() {
@@ -75,6 +81,12 @@ function Fen() {
this.struggles = [];

this.struggles.push(new rub(this));

this.digests = [];

this.digests.push(new digestPlayerStomach(this,50));

this.backupDigest = new digestPlayerStomach(this,50);
}

function Micro() {


Yükleniyor…
İptal
Kaydet