Browse Source

Trying a new stat layout

tags/v0.7.0
Fen Dweller 7 years ago
parent
commit
f5bcfa787f
3 changed files with 56 additions and 49 deletions
  1. +48
    -18
      game.js
  2. +3
    -31
      stroll.html
  3. +5
    -0
      style.css

+ 48
- 18
game.js View File

@@ -912,16 +912,9 @@ function update(lines = [])
for (var type in victims) {
if (victims.hasOwnProperty(type)) {
for (var key in victims[type]){
if (victims[type].hasOwnProperty(key)) {
if (document.getElementById("stats-" + type + "-" + key) == null) {
if (victims[type][key] == 0)
continue;
child = document.createElement('div');
child.id = "stats-" + type + "-" + key;
child.classList.add("stat-line");
document.getElementById("stats-" + type).appendChild(child);
}
document.getElementById("stats-" + type + "-" + key).innerHTML = key + ": " + victims[type][key];
if (victims[type].hasOwnProperty(key) && victims[type][key] > 0) {
document.getElementById("stat-" + key).style.display = "table-row";
document.getElementById("stat-" + type + "-" + key).innerHTML = victims[type][key];
}
}
}
@@ -981,27 +974,64 @@ function startGame() {
document.getElementById("option-panel").style.display = 'none';
document.getElementById("action-panel").style.display = 'flex';

if (!macro.maleParts) {
victimTypes = ["stomped","digested","stomach","bowels"];

if (macro.maleParts) {
victimTypes = victimTypes.concat(["cock","balls"]);
} else {
document.getElementById("button-cockslap").style.display = 'none';
document.getElementById("button-cock_vore").style.display = 'none';
document.getElementById("button-ball_smother").style.display = 'none';
document.getElementById("stats-balls").style.display = 'none';
document.getElementById("stats-cock").style.display = 'none';
document.getElementById("cum").style.display = 'none';
}

if (!macro.femaleParts) {
if (macro.femaleParts) {
victimTypes = victimTypes.concat(["breasts"],["womb"]);
} else {
document.getElementById("button-breast_crush").style.display = 'none';
document.getElementById("button-unbirth").style.display = 'none';
document.getElementById("stats-womb").style.display = 'none';
document.getElementById("stats-breasts").style.display = 'none';
document.getElementById("femcum").style.display = 'none';
}

if (!macro.maleParts && !macro.femaleParts) {
document.getElementById("stats-splooged").style.display = 'none';
if (macro.maleParts || macro.femaleParts) {
victimTypes.push("splooged");
}

var table = document.getElementById("victim-table");

var tr = document.createElement('tr');

var th = document.createElement('th');
th.innerHTML = "Method";
tr.appendChild(th);
for (var i = 0; i < victimTypes.length; i++) {
var th = document.createElement('th');
th.innerHTML = victimTypes[i].charAt(0).toUpperCase() + victimTypes[i].slice(1);
tr.appendChild(th);
}


table.appendChild(tr);
for (var key in things) {
if (things.hasOwnProperty(key) && key != "Container") {
var tr = document.createElement('tr');
tr.id = "stat-" + key;
tr.style.display = "none";
var th = document.createElement('th');
th.innerHTML = key;
tr.appendChild(th);

for (var i = 0; i < victimTypes.length; i++) {
var th = document.createElement('th');
th.innerHTML = 0;
th.id = "stat-" + victimTypes[i] + "-" + key;
tr.appendChild(th);
}
table.appendChild(tr);
}
}


var species = document.getElementById("option-species").value;
var re = /^[a-zA-Z\- ]+$/;



+ 3
- 31
stroll.html View File

@@ -20,40 +20,10 @@
<div class=stat-line id=cum></div>
<div class=stat-line id=femcum></div>
</div>
<div class=stat-header id=stats-stomped>
<p>Stomped</p>
</div>
<div class=stat-header id=stats-digested>
<p>Digested</p>
</div>
<div class=stat-header id=stats-stomach>
<p>Stomach</p>
</div>
<div class=stat-header id=stats-bowels>
<p>Bowels</p>
</div>
<div class=stat-header id=stats-breasts>
<p>Breasts</p>
</div>
<div class=stat-header id=stats-womb>
<p>Womb</p>
</div>
<div class=stat-header id=stats-balls>
<p>Balls</p>
</div>
<div class=stat-header id=stats-cock>
<p>Cock</p>
</div>
<div class=stat-header id=stats-smothered>
<p>Smothered</p>
</div>
<div class=stat-header id=stats-splooged>
<p>Splooged</p>
</div>
</div>
<div id=log-area>
<div id=log>
<div>Welcome to Stroll 0.2.4</div>
<div>Welcome to Stroll 0.2.5</div>
<div><b>This game features 18+ content</b></div>
<div><a href="https://chemicalcrux.org/stroll">Changelog</a></div>
<div>It's a nice day for a walk</div>
@@ -84,5 +54,7 @@
<button class=option-button id=button-start>Start game</button>
</div>
</div>
<table id=victim-table>
</table>
</body>
</html>

+ 5
- 0
style.css View File

@@ -87,3 +87,8 @@ body {
width: 120px;
height: 75px;
}

#victim-table {
margin: auto;
width: 80%;
}

Loading…
Cancel
Save