Browse Source

Digestion restores stamina. Vending machine food does too.

tags/v0.2.8
Fen Dweller 7 years ago
parent
commit
7c4a6d9d72
2 changed files with 16 additions and 13 deletions
  1. +4
    -2
      dialog.js
  2. +12
    -11
      vore.js

+ 4
- 2
dialog.js View File

@@ -149,11 +149,12 @@ function VendingMachinePurchase() {

{
let nodeCandy = new DialogNode();
this.addChoice("Buy a candy bar ($2)", nodeCandy);
this.addChoice("Buy a candy bar ($2, +50 stamina)", nodeCandy);
nodeCandy.text = ["You insert two dollar bills into the machine and select the candy bar. Chocolate and nougat, mmm."];

nodeCandy.hooks.push(function() {
player.cash -= 2;
player.changeStamina(50);
});

nodeCandy.requirements.push(function(player) {
@@ -163,11 +164,12 @@ function VendingMachinePurchase() {

{
let nodeSoda = new DialogNode();
this.addChoice("Buy a soda ($2)", nodeSoda);
this.addChoice("Buy a soda ($4, +150 stamina)", nodeSoda);
nodeSoda.text = ["You insert a dollar and coins, then select a soda. You're pretty you saw something on the news about it turning people purple, but you can't resist that delicious Citrus Substitute Flavor™"];

nodeSoda.hooks.push(function() {
player.cash -= 2;
player.changeStamina(150);
});

nodeSoda.requirements.push(function(player) {


+ 12
- 11
vore.js View File

@@ -5,8 +5,8 @@ function Creature(name = "Creature", str=10, dex=10, con=10) {

this.mass = 80;
this.bowels = new Bowels();
this.stomach = new Stomach(this.bowels);
this.butt = new Butt(this.bowels,this.stomach);
this.stomach = new Stomach(this,this.bowels);
this.butt = new Butt(this,this.bowels,this.stomach);
this.attacks = [];

this.str = str;
@@ -21,8 +21,8 @@ function Creature(name = "Creature", str=10, dex=10, con=10) {
this.stamina = this.maxStamina;

// fraction of max health per second
this.healthRate = 1 / 86400 * 12;
this.staminaRate = 1 / 86400 * 48;
this.healthRate = 1 / 86400 * 4;
this.staminaRate = 1 / 86400 * 6;

this.restoreHealth = function(time) {
this.health = Math.min(this.maxHealth, this.health + this.maxHealth * time * this.healthRate);
@@ -204,9 +204,8 @@ function Micro() {
// vore stuff here

class Container {
constructor(name) {
this.name = name;

constructor(owner) {
this.owner = owner;
this.contents = [];
// health/sec
this.damageRate = 15*100/86400;
@@ -237,6 +236,8 @@ class Container {

prey.mass -= digested;

this.owner.changeStamina(digested*10);

this.fill(digested);
}

@@ -264,8 +265,8 @@ class Container {
}

class Stomach extends Container {
constructor(bowels) {
super();
constructor(owner,bowels) {
super(owner);
this.bowels = bowels;
}

@@ -291,8 +292,8 @@ class Stomach extends Container {
}

class Butt extends Container {
constructor(bowels, stomach) {
super();
constructor(owner, bowels, stomach) {
super(owner);
this.bowels = bowels;
this.stomach = stomach;
}


Loading…
Cancel
Save