Procházet zdrojové kódy

Added basic drool mechanics

tags/v0.7.2
Fen Dweller před 7 roky
rodič
revize
c3fbcf0489
3 změnil soubory, kde provedl 62 přidání a 1 odebrání
  1. +38
    -0
      game.js
  2. +11
    -1
      recursive-desc.js
  3. +13
    -0
      stroll.html

+ 38
- 0
game.js Zobrazit soubor

@@ -393,6 +393,10 @@ let macro =
return volume * this.breastDensity;
},

get droolVolume() {
return this.scaling(this.droolBaseVolume, this.scale, 3);
},

"digest": function(owner, organ, time=15) {

// ignore if using manual digestion
@@ -1928,6 +1932,10 @@ function feed()
update([sound,line,linesummary,newline]);

macro.arouse(5);

if (macro.droolEnabled) {
drool();
}
}

function chew()
@@ -1968,8 +1976,31 @@ function chew()
update([sound,line,linesummary,newline]);

macro.arouse(10);

if (macro.droolEnabled) {
drool();
}
}

function drool()
{
let vol = macro.droolVolume * (Math.random() / 5 + 0.9);
let area = Math.pow(vol, 2/3);

let prey = getPrey(biome, area);
let line = describe("drool", prey, macro, verbose).replace("$VOLUME",volume(vol,unit,false));
let linesummary = summarize(prey.sum(), true);

let people = get_living_prey(prey.sum());

let preyMass = prey.sum_property("mass");

let sound = getSound("liquid",preyMass);

add_victim_people("drool",prey);

update([sound,line,linesummary,newline]);
}
function stomp()
{
if (macro.gooMolten && !macro.footShoeWorn && !macro.footSockWorn) {
@@ -3702,6 +3733,8 @@ function breath(type, style) {

update([sound, line, linesummary, newline]);
add_victim_people("breath-" + type, prey);

macro.arouse(5);
}

function breath_fire() {
@@ -4222,6 +4255,11 @@ function startGame(e) {
enable_victim("chew","Chewed");
}

if (macro.droolEnabled) {
enable_button("drool");
enable_victim("drool","Drenched in drool");
}

if (macro.arousalEnabled) {
document.querySelector("#arousalMeter").style.display = 'inline-block';
document.querySelector("#orgasmMeter").style.display = 'inline-block';


+ 11
- 1
recursive-desc.js Zobrazit soubor

@@ -31,7 +31,7 @@ var actions = ["eat","chew","vomit","stomp","stomp-wedge","flex-toes","kick","an
"sheath-toy","slit-toy","breast-toy","melt","solidify","flood","stomp-goo","goo-digest","ass-goo","goo-stomach-pull","goo-stomach-push",
"goo-bowels-pull","goo-bowels-push","goo-womb-pull","goo-womb-push","goo-balls-pull","goo-balls-push","goo-breasts-pull","goo-breasts-push",
"goo-tail-pull","goo-tail-push","goo-paws-pull","goo-paws-push","paw-vore","paw-vore-toes","paws","crop-swallow","crop-transfer",
"breath-fire","breath-ice","breath-electric","breath-smoke","breath-radiation","breath-foul"];
"breath-fire","breath-ice","breath-electric","breath-smoke","breath-radiation","breath-foul","drool"];

for (let i=0; i<actions.length; i++) {
rules[actions[i]] = [];
@@ -1095,6 +1095,16 @@ function defaultBreathFoul(container, macro, verbose) {
return "FOUL" + container.describe(verbose);
}

function defaultDrool(container, macro, verbose) {
if (container.count == 0)
return "$VOLUME of hot drool oozes from your " + macro.jawDesc(true) + ".";
else if (isFatal(macro))
return "A rain of slobber falls from your maw, inundating " + container.describe(verbose) + " in $VOLUME of slimy drool.";
else
return "$VOLUME of your drool rains down from your " + macro.jawDesc(true) + ", washing over " + container.describe(verbose) + ".";
}


// EATING

rules["eat"].push({


+ 13
- 0
stroll.html Zobrazit soubor

@@ -217,6 +217,7 @@
<button class="action-button" id="button-action-crop_swallow">Crop Swallow</button>
<button class="action-button" id="button-action-digest_stomach">Digest</button>
<button class="action-button" id="button-action-chew">Chew</button>
<button class="action-button" id="button-action-drool">Drool</button>
<button class="action-button" id="button-action-vomit">Vomit</button>
<button class="action-button" id="button-action-sit">Sit</button>
<button class="action-button" id="button-action-anal_vore">Anal Vore</button>
@@ -1118,6 +1119,18 @@
</li>
</div>
</div>

<div class="custom-category">
<input autocomplete="off" class="custom-header-checkbox" type="checkbox" id="droolEnabled" name="droolEnabled" />
<label class="custom-header" for="droolEnabled">Drool</label>
<div class="reveal-if-active">
<li>
<label for="droolBaseVolume">Drool volume</label>
<input autocomplete="off" type="number" step="any" id="droolBaseVolume" name="droolBaseVolume" data-unit="volume" placeholder="0.0001">
<div class="preview" id="droolBaseVolumePreview"></div>
</li>
</div>
</div>
</ul>
</form>
</div>


Načítá se…
Zrušit
Uložit