浏览代码

Merge branch 'master' of https://github.com/chemicalcrux/stroll

tags/v0.7.0
Fen Dweller 7 年前
父节点
当前提交
b71e3ba074
共有 3 个文件被更改,包括 215 次插入118 次删除
  1. +17
    -13
      game.js
  2. +121
    -105
      stroll.html
  3. +77
    -0
      style.css

+ 17
- 13
game.js 查看文件

@@ -850,7 +850,7 @@ function toggle_verbose()
{
verbose = !verbose;

document.getElementById("button-verbose").innerHTML = (verbose ? "Verbose" : "Simple");
document.getElementById("button-verbose").innerHTML = (verbose ? "Verbose Text" : "Simple Text");
}

function toggle_arousal()
@@ -2352,24 +2352,27 @@ function grow_lots()
update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
}

function resetSettings() {
document.forms.namedItem("custom-species-form").reset();
}

function saveSettings() {
let storage = window.localStorage;
let settings = {};
let form = document.forms.namedItem("custom-species-form");

for (let i=0; i<form.length; i++) {
if (form[i].value != "") {
if (form[i].type == "text")
settings[form[i].name] = form[i].value;
else if (form[i].type == "number")
settings[form[i].name] = parseFloat(form[i].value);
else if (form[i].type == "checkbox") {
settings[form[i].name] = form[i].checked;
} else if (form[i].type == "radio") {
let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
if (form[i].checked)
settings[name] = form[i].id;
}
let value = form[i].value == "" ? form[i].placeholder : form[i].value
if (form[i].type == "text")
settings[form[i].name] = value;
else if (form[i].type == "number")
settings[form[i].name] = parseFloat(value);
else if (form[i].type == "checkbox") {
settings[form[i].name] = form[i].checked;
} else if (form[i].type == "radio") {
let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
if (form[i].checked)
settings[name] = form[i].id;
}
}

@@ -2731,6 +2734,7 @@ window.addEventListener('load', function(event) {
document.getElementById("button-amount-50").addEventListener("click",function() { grow_pick(50); });
document.getElementById("button-amount-100").addEventListener("click",function() { grow_pick(100); });

document.getElementById("button-reset-custom").addEventListener("click",resetSettings);
document.getElementById("button-load-custom").addEventListener("click",loadSettings);
document.getElementById("button-save-custom").addEventListener("click",saveSettings);
document.getElementById("button-start").addEventListener("click",startGame);


+ 121
- 105
stroll.html 查看文件

@@ -19,12 +19,12 @@
<div class="stat-line" id="growth-points"></div>
<div class="stat-line" id="arousal"></div>
<div class="stat-line" id="edge"></div>
<div class="stat-line" id="cum"></div>
<div class="stat-line" id="cumPercent"></div>
<div class="stat-line" id="femcum"></div>
<div class="stat-line" id="femcumPercent"></div>
<div class="stat-line" id="milk"></div>
<div class="stat-line" id="milkPercent"></div>
<div class="stat-line-hidden" id="cum"></div>
<div class="stat-line-hidden" id="cumPercent"></div>
<div class="stat-line-hidden" id="femcum"></div>
<div class="stat-line-hidden" id="femcumPercent"></div>
<div class="stat-line-hidden" id="milk"></div>
<div class="stat-line-hidden" id="milkPercent"></div>
</div>
<div class="stat-header-self">Growth</div>
<table id="grow-panel">
@@ -59,21 +59,21 @@
<th><button class="growth-amount" id="button-amount-100">100x</button></th>
</tr>
</table>
<div class="button-container">
<button class="stat-button" id="button-look">Look</button>
<div class="stat-container">
<button class="stat-button" id="button-look">Look Around</button>
<button class="stat-button" id="button-arousal">Arousal On</button>
<button class="stat-button" id="button-stroll">Status: Standing</button>
<button class="stat-button" id="button-location">Location: Suburb</button>
<button class="stat-button" id="button-numbers">Numbers: Full</button>
<button class="stat-button" id="button-units">Units: Metric</button>
<button class="stat-button" id="button-verbose">Verbose</button>
<button class="stat-button" id="button-verbose">Verbose Text</button>
<button class="stat-button" id="button-grow-lots">SUPER BIG</button>
<button class="stat-button" id="button-dark-mode-game">Toggle Dark Mode</button>
</div>
</div>
<div id="log-area">
<div id="log">
<div>Welcome to Stroll 0.5.6</div>
<div>Welcome to Stroll 0.5.7</div>
<div><b>This game features 18+ content</b></div>
<div><a href="https://chemicalcrux.org/stroll">Changelog</a></div>
<div><a href="https://t.me/joinchat/BSXHzUZmSqc-CXB1khkuYw">Telegram discussion group</a></div>
@@ -132,10 +132,11 @@
<button class="action-button" id="button-action-pouch_eat">Eat From Pouch</button>
</div>
</div>

</div>
<div class="character-build">

<div class="option-container" id="option-panel">
<p>Welcome to Stroll 0.5.6</p>
<p>Welcome to Stroll 0.5.7</p>
<p><b>This game features 18+ content</b></p>
<p><a href="https://chemicalcrux.org/stroll">Changelog</a></p>
<p><a href="https://t.me/joinchat/BSXHzUZmSqc-CXB1khkuYw">Telegram discussion group</a></p>
@@ -145,88 +146,96 @@
<p>Build your Character (leave blank for defaults)</p>
<form id="custom-species-form" name="custom-species-form">
<ul class="flex-outer">
<li>
<label for="species">Name</label>
<input type="text" name="name" />
</li>
<li>
<label for="species">Species</label>
<input type="text" name="species" placeholder="crux"/>
</li>
<li>
<label for="scale" class="has-tooltip" title="Multiply your base height by this much">Scale (?)</label>
<input type="text" name="scale" placeholder="1"/>
</li>
<li>
<label for="baseHeight">Height</label>
<input type="number" name="baseHeight" placeholder="2.26"/>
</li>
<li>
<label for="baseMass">Weight</label>
<input type="number" name="baseMass" placeholder="135">
</li>
<br>
<li>
<label for="basePawArea">Paw area</label>
<input type="number" name="basePawArea" placeholder="0.1"><br>
</li>
<li>
<label for="baseHandArea">Hand area</label>
<input type="number" name="baseHandArea" placeholder="0.1"><br>
</li>
<li>
<label for="baseAnalVoreArea">Tailhole area</label>
<input type="number" name="baseAnalVoreArea" placeholder="0.1"><br>
</li>
<li>
<label for="analVore">Anal vore</label>
<input type="checkbox" checked="true" name="analVore"/><br>
</li>
<li>
<label for="baseAssArea">Ass area</label>
<input type="number" name="baseAssArea" placeholder="0.4"><br>
</li>
<br>
<li>
<input type="checkbox" name="humanMode" id="humanMode">
<label for="humanMode">Human Mode (instead of furries)</label>
</li>
<br>
Brutality:<br>
<ul>
<div class="custom-category">
<div class="custom-header">Basics</div>
<li>
<label for="species">Name</label>
<input type="text" name="name" />
</li>
<li>
<label for="species">Species</label>
<input type="text" name="species" placeholder="crux"/>
</li>
<li>
<label for="scale" class="has-tooltip" title="Multiply your base height by this much">Scale (?)</label>
<input type="text" name="scale" placeholder="1"/>
</li>
<li>
<input type="radio" name="brutality" id="brutality-0">
<label for="brutality-0">Non-fatal</label>
<label for="baseHeight">Height</label>
<input type="number" name="baseHeight" placeholder="2.26"/>
</li>
<li>
<input type="radio" name="brutality" checked="true" id="brutality-1">
<label for="brutality-1">Fatal, no gore</label>
<label for="baseMass">Weight</label>
<input type="number" name="baseMass" placeholder="135">
</li>
<br>
<li>
<input type="radio" name="brutality" id="brutality-2">
<label for="brutality-2">Gory</label>
<label for="basePawArea">Paw area</label>
<input type="number" name="basePawArea" placeholder="0.1"><br>
</li>
<li>
<input type="radio" name="brutality" id="brutality-3" disabled="disableD">
<label for="brutality-3">Sadistic (not implemented)</label>
<label for="baseHandArea">Hand area</label>
<input type="number" name="baseHandArea" placeholder="0.1"><br>
</li>
</ul>
<li>
<label for="baseAnalVoreArea">Tailhole area</label>
<input type="number" name="baseAnalVoreArea" placeholder="0.1"><br>
</li>
<li>
<label for="analVore">Anal vore</label>
<input type="checkbox" checked="true" name="analVore"/><br>
</li>
<li>
<label for="baseAssArea">Ass area</label>
<input type="number" name="baseAssArea" placeholder="0.4"><br>
</li>
<br>
<li>
<input type="checkbox" name="humanMode" id="humanMode">
<label for="humanMode">Human Mode (instead of furries)</label>
</li>
</div>
<br>
<li>
<label class="has-tooltip" for="sameSizeVore" title="Can you eat people your own size?">Same-size predator</label>
<input type="checkbox" checked="true" name="sameSizeVore"/><br>
</li>
<li>
<label class="has-tooltip" for="sameSizeStomp" title="Can you stomp and sit on people your own size?">Same-size stomper</label>
<input type="checkbox" checked="true" name="sameSizeStomp"/><br>
</li>
<li>
<label for="soulVoreEnabled">Soul vore</label>
<input type="checkbox" checked="true" name="soulVoreEnabled"/><br>
</li>
<div>
Arousal:<br>
<input type="checkbox" checked="true" name="arousalEnabled"/><br>
<div class="custom-category">
<div class="custom-header">Brutality</div>
<ul>
<li>
<input type="radio" name="brutality" id="brutality-0">
<label for="brutality-0">Non-fatal</label>
</li>
<li>
<input type="radio" name="brutality" checked="true" id="brutality-1">
<label for="brutality-1">Fatal, no gore</label>
</li>
<li>
<input type="radio" name="brutality" id="brutality-2">
<label for="brutality-2">Gory</label>
</li>
<li>
<input type="radio" name="brutality" id="brutality-3" disabled="disableD">
<label for="brutality-3">Sadistic (not implemented)</label>
</li>
</ul>
</div>
<br>
<div class="custom-category">
<div class="custom-header">Misc</div>
<li>
<label class="has-tooltip" for="sameSizeVore" title="Can you eat people your own size?">Same-size predator</label>
<input type="checkbox" checked="true" name="sameSizeVore"/><br>
</li>
<li>
<label class="has-tooltip" for="sameSizeStomp" title="Can you stomp and sit on people your own size?">Same-size stomper</label>
<input type="checkbox" checked="true" name="sameSizeStomp"/><br>
</li>
<li>
<label for="soulVoreEnabled">Soul vore</label>
<input type="checkbox" checked="true" name="soulVoreEnabled"/><br>
</li>
</div>
<div class="custom-category">
<input class="custom-header-checkbox" type="checkbox" checked="true" id="arousalEnabled" name="arousalEnabled"/>
<label class="custom-header" for="arousalEnabled">Arousal</label>
<div class="reveal-if-active">
<li>
<label class="has-tooltip" for="arousalFactor" title="Multiplies arousal gain by this much">Arousal multiplier</label>
@@ -239,9 +248,9 @@
</div>
</div>
<br>
<div>
Tail(s):<br>
<input type="checkbox" checked="true" name="hasTail"/><br>
<div class="custom-category">
<input class="custom-header-checkbox" type="checkbox" checked="true" id="hasTail" name="hasTail"/>
<label class="custom-header" for="hasTail">Tails</label>
<div class="reveal-if-active">
<li>
<label for="tailCount">Tail count</label>
@@ -266,14 +275,18 @@
</div>
</div>
<br>
<li>
<label for="hasPouch">Pouch</label>
<input type="checkbox" name="hasPouch" checked="true" /><br>
</li>
<br>
<div>
Male genitals:<br>
<input type="checkbox" checked="true" name="maleParts"/><br>
<div class="custom-category">
<input class="custom-header-checkbox" type="checkbox" checked="true" id="hasPouch" name="hasPouch"/>
<label class="custom-header" for="hasPouch">Pouch</label>
<div class="reveal-if-active">
<li>
It's on :D
</li>
</div>
</div>
<div class="custom-category">
<input class="custom-header-checkbox" type="checkbox" checked="true" id="maleParts" name="maleParts"/>
<label class="custom-header" for="maleParts">Male genitals</label>
<div class="reveal-if-active">
<li>
<label for="hasSheath">Sheath</label>
@@ -306,9 +319,9 @@
</div>
</div>
<br>
<div>
Breasts:<br>
<input type="checkbox" checked="true" name="hasBreasts"/><br>
<div class="custom-category">
<input class="custom-header-checkbox" type="checkbox" checked="true" id="hasBreasts" name="hasBreasts"/>
<label class="custom-header" for="hasBreasts">Breasts</label>
<div class="reveal-if-active">
<li>
<label for="baseBreastDiameter">Breast diameter</label>
@@ -337,9 +350,9 @@
</div>
</div>
<br>
<div>
Female genitals:<br>
<input type="checkbox" checked="true" name="femaleParts"/><br>
<div class="custom-category">
<input class="custom-header-checkbox" type="checkbox" checked="true" id="femaleParts" name="femaleParts"/>
<label class="custom-header" for="femaleParts">Female genitals</label>
<div class="reveal-if-active">
<li>
<label for="baseVaginaLength">Slit length</label>
@@ -361,9 +374,12 @@
</div>
</ul>
</form>
<button class="option-button" id="button-load-custom">Load Custom Character</button>
<button class="option-button" id="button-save-custom">Save Custom Character</button>
<button class="option-button" id="button-start">Start Game</button>
<div>
<button class="option-button" id="button-reset-custom">Reset Custom Character</button>
<button class="option-button" id="button-load-custom">Load Custom Character</button>
<button class="option-button" id="button-save-custom">Save Custom Character</button>
<button class="option-button" id="button-start">Start Stroll Game</button>
</div>
</div>
</div>
</div>


+ 77
- 0
style.css 查看文件

@@ -17,6 +17,11 @@ body.dark > div > div > div > form input {
background: #444;
}

body.light button {
color: #000;
background: #ddd;
}

body.dark button {
color: #eee;
background: #111;
@@ -79,6 +84,12 @@ body.dark #log {
font-size: 12pt;
}

.stat-line-hidden {
font-weight: normal;
font-size: 12pt;
display: none;
}

.sidebar {
display: none;
flex-wrap: wrap;
@@ -102,6 +113,12 @@ body.dark #log {
flex: 1;
}

.stat-container {
flex-wrap: wrap;
flex-direction: row;
flex: 1
}

.action-part-container {
max-height: 400px;
display: flex;
@@ -122,6 +139,7 @@ body.dark #log {
font-size: 20px;
width: 120px;
height: 75px;

}

.option-form {
@@ -173,6 +191,61 @@ input.sub[type="checkbox"]:checked ~ .reveal-if-active-2 {
overflow: visible;
}

.flex-outer {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
text-align: center;
justify-content: center;
}

.custom-category {
text-align: center;
margin: 10px;
}

body.light .custom-category {
background: #ddd;
}

body.dark .custom-category {
background: #222;
}


.custom-header {
font-size: 200%;
margin: 10px;
display: inline-block;
border-style: solid;
border-width: 1px;
}

body.light .custom-header {
background: #ddd;
}

body.dark .custom-header {
background: #555;
}

body.light input[type="checkbox"]:checked+
.custom-header {
margin: 10px;
background: #bbb;
}

body.dark input[type="checkbox"]:checked+
.custom-header {
margin: 10px;
background: #000;
}

.custom-header-checkbox {
display: none;
}

.flex-outer li,
.flex-inner {
display: flex;
@@ -232,6 +305,10 @@ body.dark a:hover {
color: #0000EE;
}

.character-build {
width: 90%;
text-align: center;
}
#grow-panel {
width: 100%;
}


正在加载...
取消
保存