浏览代码

Added logic for saving dropdown menus, and added paw types

tags/v0.7.0
Fen Dweller 7 年前
父节点
当前提交
9dd2cb7cde
共有 3 个文件被更改,包括 69 次插入11 次删除
  1. +50
    -1
      game.js
  2. +11
    -10
      recursive-desc.js
  3. +8
    -0
      stroll.html

+ 50
- 1
game.js 查看文件

@@ -81,6 +81,47 @@ let macro =
"assScale": 1,
"analVore": true,

// part types

"footType": "paw",

"footDesc": function(plural=false,capital=false) {
let result = "";
switch(this.footType) {
case "paw":
result = plural ? "paws" : "paw";
break;
case "hoof":
result = plural ? "hooves" : "hoof";
break;
case "feet":
case "avian":
result = plural ? "feet" : "foot";
break;
}
return capital ? result.charAt(0).toUpperCase() + result.slice(1) : result;
},

"toeDesc": function(plural=false,capital=false) {
let result = "";
switch(this.footType) {
case "paw":
result = plural ? "toes" : "toe";
break;
case "hoof":
result = plural ? "hooves" : "hoof";
break;
case "feet":
result = plural ? "toes" : "toe";
break;
case "avian":
result = plural ? "talons" : "talon";
breka;
}
return capital ? result.charAt(0).toUpperCase() + result.slice(1) : result;
},
"jawType": "jaws",

"hasTail": true,
"tailType": "slinky",
"tailCount": 1,
@@ -1802,7 +1843,6 @@ function sheath_absorb()
macro.arouse(45);
}


function cockslap()
{
let area = macro.dickArea;
@@ -2540,6 +2580,8 @@ function saveSettings() {
let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
if (form[i].checked)
settings[name] = form[i].id;
} else if (form[i].type == "select-one") {
settings[form[i].name] = form[i][form[i].selectedIndex].value;
}
}

@@ -2566,6 +2608,13 @@ function loadSettings() {
} else if (form[i].type == "radio") {
let name = form[i].name.match(/(?:[a-zA-Z]+-)*[a-zA-Z]+/)[0];
form[i].checked = (settings[name] == form[i].id);
} else if (form[i].type == "select-one") {
for (let j=0; j<form[i].length; j++) {
if (form[i][j].value == settings[form[i].name]) {
form[i].selectedIndex = j;
break;
}
}
}
}
}


+ 11
- 10
recursive-desc.js 查看文件

@@ -132,7 +132,7 @@ function defaultChew(container, macro, verbose) {

function defaultStomp(container, macro, verbose) {
if (container.count == 0)
return "Your paw thumps the ground.";
return "Your " + macro.footDesc() + " thumps the ground.";
else if (isFatal(macro))
return "You crush " + container.describe(verbose) + " underfoot.";
else
@@ -141,7 +141,7 @@ function defaultStomp(container, macro, verbose) {

function defaultKick(container, macro, verbose) {
if (container.count == 0)
return "You swing your mighty paw..and hit nothing.";
return "You swing your mighty " + macro.footDesc() + "..and hit nothing.";
else
return "You punt " + container.describe(verbose) + ", destroying " + (container.count > 1 ? "them" : "it") + ".";
}
@@ -417,11 +417,11 @@ function defaultSoulVore(container, macro, verbose) {
function defaultSoulAbsorbPaw(container, macro, verbose) {
let sum = container.sum()["Person"];
if (container.count == 0)
return "Your paw thumps against the ground";
return "Your " + macro.footDesc() + " thumps against the ground";
else if (sum == 0)
return "Your paw slams down on " + container.describe(verb0se) + "...but there aren't any souls within!";
return "Your " + macro.footDesc() + " slams down on " + container.describe(verb0se) + "...but there aren't any souls within!";
else
return "Your paw slams down on " + container.describe(verbose) + ", smashing them to pieces and absorbing " + sum + (sum == 1 ? " soul" : " souls") + " into your pads.";
return "Your " + macro.footDesc() + " slams down on " + container.describe(verbose) + ", smashing them to pieces and absorbing " + sum + (sum == 1 ? " soul" : " souls") + " into your pads.";
}

function defaultStomach(container, macro, verbose) {
@@ -590,7 +590,7 @@ rules["stomp"].push({
hasExactly(container, "Person", 1) &&
isFatal(macro);
}, "desc": function(container, macro, verbose) {
return "Your heavy paw slams down on " + container.describe(verbose) + ", smashing the poor thing like an insect.";
return "Your heavy " + macro.footDesc() + " slams down on " + container.describe(verbose) + ", smashing the poor thing like an insect.";
}
});

@@ -600,7 +600,7 @@ rules["stomp"].push({
hasExactly(container, "Person", 1) &&
isGory(macro);
}, "desc": function(container, macro, verbose) {
return "Your paw thumps " + container.describe(verbose) + ", shoving your victim to the ground and cracking them open like an egg.";
return "Your " + macro.footDesc() + " thumps " + container.describe(verbose) + ", shoving your victim to the ground and cracking them open like an egg.";
}
});

@@ -610,16 +610,17 @@ rules["stomp"].push({
hasExactly(container, "Person", 1) &&
isGory(macro);
}, "desc": function(container, macro, verbose) {
return "Your shadow falls over " + container.describe(verbose) + ", and your paw follows, crushing their soft body and reducing them to a heap of broken gore.";
return "Your shadow falls over " + container.describe(verbose) + ", and your " + macro.footDesc() + " follows, crushing their soft body and reducing them to a heap of broken gore.";
}
});

rules["stomp"].push({
"test": function(container, macro) {
return hasNothingElse(container, ["Person","Cow","Car"]) &&
isNonFatal(macro);
isNonFatal(macro) &&
macro.footType == "paw";
}, "desc": function(container, macro, verbose) {
return "Your soft paws smoosh over " + container.describe(verbose) + ". They stick to your toes, carried along for the ride as you take another few steps before finally\
return "Your paw smooshes over " + container.describe(verbose) + ". They stick to your toes, carried along for the ride as you take another few steps before finally\
falling off.";
}
});


+ 8
- 0
stroll.html 查看文件

@@ -233,6 +233,14 @@
<label for="soulVoreEnabled">Soul vore</label>
<input type="checkbox" checked="true" name="soulVoreEnabled"/>
</li>
<li>
<label for="footType">Foot type</label>
<select name="footType">
<option value="paw">Paws</option>
<option value="hoof">Hooves</option>
<option value="foot">Human</option>
<option value="avian">Avian</option>
</select>
</div>
</div>
<div class="custom-category">


正在加载...
取消
保存