Bladeren bron

Stats are sorted now

tags/v1.0.0
Fen Dweller 6 jaren geleden
bovenliggende
commit
a234aa7edd
2 gewijzigde bestanden met toevoegingen van 28 en 9 verwijderingen
  1. +27
    -8
      game.js
  2. +1
    -1
      recursive-desc.js

+ 27
- 8
game.js Bestand weergeven

@@ -4598,19 +4598,38 @@ function actionTab(e) {
function showStats() {
let lines = [];

if (macro.brutality > 0) {
lines.push("Total kills:");
} else {
lines.push("Total victims:");
}

let total = 0;
for (var key in victims) {
if (victims.hasOwnProperty(key)) {
lines.push(victims[key]["people"] + " " + describe("victim-" + key, null, macro, false));
total += victims[key]["people"];
if (victims[key]["people"] > 0) {
lines.push([
victims[key]["people"] + " " + describe("victim-" + key, null, macro, false),
victims[key]["people"]
]);
total += victims[key]["people"];
}
}
}

// sort in descending order of kills/victims
lines = lines.sort(function(x, y) {
if (x[1] == y[1]) {
return 0;
} else {
return x[1] > y[1] ? -1 : 1;
}
});

lines = lines.map(function(x) {
return x[0];
});

if (macro.brutality > 0) {
lines.splice(0, 0, "Kills:");
} else {
lines.insert(0, 0, "Victims:");
}

lines.push("Total: " + total);
lines.push(newline);
update(lines);


+ 1
- 1
recursive-desc.js Bestand weergeven

@@ -234,7 +234,7 @@ function defaultAssCrush(container, macro, verbose) {
if (container.count == 0)
return "You take a seat. It's good to have a break!";
else if (isSadistic(macro))
return "You lower your heavy ass to the ground, biting you lip as you feel " + container.describe(verbose) + " collapse beneath your massive cheeks. " + (count > 1 ? count + " lives are" : "A life is") + " snuffed out as you settle down, grinding your ass into the remains before slowly rising back up.";
return "You lower your heavy ass to the ground, biting your lip as you feel " + container.describe(verbose) + " collapse beneath your massive cheeks. " + (count > 1 ? count + " lives are" : "A life is") + " snuffed out as you settle down, grinding your ass into the remains before slowly rising back up.";
else if (isFatal(macro))
return "Your heavy ass obliterates " + container.describe(verbose) + ". ";
else


Laden…
Annuleren
Opslaan