瀏覽代碼

Fixed a big with merging containers. Added pouches

tags/v0.7.0
Fen Dweller 7 年之前
父節點
當前提交
70b1ca8cc4
共有 4 個檔案被更改,包括 120 行新增4 行删除
  1. +99
    -2
      game.js
  2. +12
    -1
      recursive-desc.js
  3. +4
    -1
      recursive-macro.js
  4. +5
    -0
      stroll.html

+ 99
- 2
game.js 查看文件

@@ -297,6 +297,23 @@ var macro =
"maxDigest" : 1
},

// holding spots

hasPouch: true,
"pouch": {
"name": "pouch",
"container": new Container(),
get description() {
if (this.container.count == 0)
return "Your pouch is empty";
else
return "Your pouch contains " + this.container.describe(false);
},
"add": function(victims) {
this.container = this.container.merge(victims);
}
},

"init": function() {
this.stomach.owner = this;
this.bowels.owner = this;
@@ -1055,7 +1072,7 @@ function sit()
{
if (macro.analVore)
anal_vore();
var area = macro.assArea;
var crushed = getPrey(biome,area);

@@ -1088,7 +1105,6 @@ function sit()
updateVictims("stomped",crushed);

update([sound,line,linesummary,newline]);

}

function breast_crush()
@@ -1558,6 +1574,76 @@ function tail_vore()
update([sound,line,linesummary,newline]);
}

function pouch_stuff()
{
var area = macro.handArea;
var prey = getPrey(biome, area);
var line = describe("pouch-stuff", prey, macro, verbose);
var linesummary = summarize(prey.sum(), false);

var people = get_living_prey(prey.sum());

var sound = "Thump";

if (people < 3) {
sound = "Slp.";
} else if (people < 10) {
sound = "Squeeze.";
} else if (people < 50) {
sound = "Thump!";
} else if (people < 500) {
sound = "THOOOMP!";
} else if (people < 5000) {
sound = "THOOOOOOOMP!";
} else {
sound = "Oh the humanity!";
}

macro.arouse(5);

macro.pouch.add(prey);

updateVictims("pouched",prey);
update([sound,line,linesummary,newline]);
}

function pouch_eat()
{
var prey = macro.pouch.container;

var line = describe("pouch-eat", prey, macro, verbose)
var linesummary = summarize(prey.sum(), false);

var people = get_living_prey(prey.sum());
var sound = "";
if (people == 0) {
sound = "";
} else if (people < 3) {
sound = "Ulp.";
} else if (people < 10) {
sound = "Gulp.";
} else if (people < 50) {
sound = "Glrrp.";
} else if (people < 500) {
sound = "Glrrrpkh!";
} else if (people < 5000) {
sound = "GLRRKPKH!";
} else {
sound = "Oh the humanity!";
}

var preyMass = prey.sum_property("mass");

macro.addGrowthPoints(preyMass);

macro.stomach.feed(prey);

macro.arouse(5);

updateVictims("stomach",prey);
update([sound,line,linesummary,newline]);
}

function transformNumbers(line)
{
return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); });
@@ -1950,6 +2036,14 @@ function startGame(e) {
victimTypes.push("splooged");
}

if (macro.hasPouch) {
victimTypes.push("pouched");
} else {
document.getElementById("action-part-misc").style.display = 'none';
document.getElementById("button-pouch_stuff").style.display = 'none';
document.getElementById("button-pouch_eat").style.display = 'none';
}

if (macro.brutality < 1) {
document.getElementById("button-chew").style.display = 'none';
}
@@ -2043,6 +2137,7 @@ window.addEventListener('load', function(event) {
victims["smothered"] = initVictims();
victims["splooged"] = initVictims();
victims["ground"] = initVictims();
victims["pouched"] = initVictims();

document.querySelectorAll(".action-part-button").forEach(function (element) {
element.addEventListener("click",actionTab);
@@ -2063,6 +2158,8 @@ window.addEventListener('load', function(event) {
document.getElementById("button-cock_vore").addEventListener("click",cock_vore);
document.getElementById("button-ball_smother").addEventListener("click",ball_smother);
document.getElementById("button-grind").addEventListener("click",grind);
document.getElementById("button-pouch_stuff").addEventListener("click",pouch_stuff);
document.getElementById("button-pouch_eat").addEventListener("click",pouch_eat);
document.getElementById("button-stroll").addEventListener("click",toggle_auto);
document.getElementById("button-location").addEventListener("click",change_location);
document.getElementById("button-numbers").addEventListener("click",toggle_numbers);


+ 12
- 1
recursive-desc.js 查看文件

@@ -20,6 +20,8 @@ rules["male-orgasm"] = [];
rules["female-spurt"] = [];
rules["female-orgasm"] = [];
rules["grind"] = [];
rules["pouch-stuff"] = [];
rules["pouch-eat"] = [];

rules["stomach"] = [];
rules["balls"] = [];
@@ -134,7 +136,8 @@ function describeDefault(action, container, macro, verbose=true) {
case "female-spurt": return defaultFemaleSpurt(container, macro, verbose);
case "female-orgasm": return defaultFemaleOrgasm(container, macro, verbose);
case "grind": return defaultGrind(container, macro, verbose);
case "stomach": return defaultStomach(container, macro, verbose);
case "pouch-stuff": return defaultPouchStuff(container, macro, verbose);
case "pouch-eat": return defaultPouchEat(container, macro, verbose);
case "bowels": return defaultBowels(container, macro, verbose);
case "womb": return defaultWomb(container, macro, verbose);
case "balls": return defaultBalls(container, macro, verbose);
@@ -277,6 +280,14 @@ function defaultGrind(container, macro, verbose) {
}
}

function defaultPouchStuff(container, macro, verbose) {
return "You grab " + container.describe(verbose) + " and stuff " + (container.count > 1 ? "them" : "it") + " into your pouch.";
}

function defaultPouchEat(container, macro, verbose) {
return "You snatch " + container.describe(verbose) + " from your pouch and shove " + (container.count > 1 ? "them" : "it") + " down your gullet!";
}

function defaultStomach(container, macro, verbose) {
if (isFatal(macro))
return "Your stomach gurgles as it digests " + container.describe(false);


+ 4
- 1
recursive-macro.js 查看文件

@@ -356,7 +356,10 @@ function Container(contents = []) {

copy_defaults(this,new DefaultEntity());

this.count = 0;
if (Number.isInteger(contents))
this.count = contents;
else
this.count = 0;

this.contents = {}



+ 5
- 0
stroll.html 查看文件

@@ -86,6 +86,7 @@
<button class=action-part-button id=action-part-vagina>Slit</button>
<button class=action-part-button id=action-part-breasts>Breasts</button>
<button class=action-part-button id=action-part-tails>Tails</button>
<button class=action-part-button id=action-part-misc>Misc</button>
</div>

<div class=action-tab id=actions-body>
@@ -112,6 +113,10 @@
<button class=action-button id=button-cock_vore>Cock Vore</button>
<button class=action-button id=button-ball_smother>Ball Smother</button>
</div>
<div class=action-tab id=actions-misc>
<button class=action-button id=button-pouch_stuff>Stuff Pouch</button>
<button class=action-button id=button-pouch_eat>Eat From Pouch</button>
</div>
</div>




Loading…
取消
儲存