Преглед на файлове

Fixed a bug with array sorting. Improved simple text mode.

tags/v0.7.0
Fen Dweller преди 7 години
родител
ревизия
3169f4b6a1
променени са 4 файла, в които са добавени 23 реда и са изтрити 17 реда
  1. +1
    -1
      game.js
  2. +10
    -4
      recursive-desc.js
  3. +11
    -11
      recursive-macro.js
  4. +1
    -1
      stroll.html

+ 1
- 1
game.js Целия файл

@@ -76,7 +76,7 @@ function getOnePrey(area)
});

potAreas = potAreas.sort(function (x,y) {
return x[1] < y[1];
return y[1] - x[1];
});

for (var i=0; i<potAreas.length; i++) {


+ 10
- 4
recursive-desc.js Целия файл

@@ -34,7 +34,7 @@ function getPreyCounts(contents) {
return prey;
}

function containerEat(container) {
function containerEat(container,verbose=true) {
var preyNames = getPreyNames(container.contents);
var preyCounts = getPreyCounts(container.contents);
return "";
@@ -75,11 +75,17 @@ function personStomp(person) {
return "";
}

function skyscraperAnalVore(skyscraper,height = 10) {
function skyscraperAnalVore(skyscraper,verbose=true,height = 10) {
if (height < 5000) {
return "You ease yourself down over the skyscraper, spreading your ass wide as you take it to the ground - then, with a powerful clench, snap it from its base. " + describe_all(skyscraper.contents) + " are sealed away in your ass.";
if (verbose)
return "You ease yourself down over the skyscraper, spreading your ass wide as you take it to the ground - then, with a powerful clench, snap it from its base. " + describe_all(skyscraper.contents) + " are sealed away in your ass.";
else
return "You ease yourself down over the skyscraper, spreading your ass wide as you take it to the ground - then, with a powerful clench, snap it from its base. ";
} else {
return "You stuff the skyscraper up your ass with ease. Bad luck for " + describe_all(skyscraper.contents) + " inside.";
if (verbose)
return "You stuff the skyscraper up your ass with ease. Bad luck for " + describe_all(skyscraper.contents) + " inside.";
else
return "You stuff the skyscraper up your ass with ease.";
}

return "";


+ 11
- 11
recursive-macro.js Целия файл

@@ -60,7 +60,7 @@ function fill_area2(area, weights = {"Person": 0.1, "Car": 0.05, "House": 0.1})
}

candidates = candidates.sort(function (x,y) {
return x.area > y.area
return x.area - y.area;
});

while(candidates.length > 0) {
@@ -365,10 +365,10 @@ function Container(contents = []) {
return describe_all(this.contents,verbose)
}

this.eat = function() {
var line = containerEat(this);
this.eat = function(verbose=true) {
var line = containerEat(this,verbose);
if (line == "")
return defaultEat(this)();
return defaultEat(this)(verbose);
else
return line;
};
@@ -409,18 +409,18 @@ function Person(count = 1) {

}

this.stomp = function() {
this.stomp = function(verbose=true) {
var line = personStomp(this);
if (line == "")
return defaultStomp(this)();
return defaultStomp(this)(verbose);
else
return line;
};

this.eat = function() {
this.eat = function(verbose=true) {
var line = personEat(this);
if (line == "")
return defaultEat(this)();
return defaultEat(this)(verbose);
else
return line;
};
@@ -728,10 +728,10 @@ function SmallSkyscraper(count = 1) {

}

this.anal_vore = function(height=10) {
var line = skyscraperAnalVore(this,height);
this.anal_vore = function(verbose=true,height=10) {
var line = skyscraperAnalVore(this,verbose,height);
if (line == "")
return defaultAnalVore(this)();
return defaultAnalVore(this)(verbose);
else
return line;
};


+ 1
- 1
stroll.html Целия файл

@@ -17,7 +17,7 @@
</div>
<div id=game-area>
<div id=log>
<div>Welcome to Stroll 0.1.4</div>
<div>Welcome to Stroll 0.1.5</div>
<div>It's a nice day for a walk</div>
</div>
<button id=button-grow>Get Bigger</button>


Loading…
Отказ
Запис