ソースを参照

Add magic/breath growth. Add even larger things to eat

master
Fen Dweller 3年前
コミット
aa50982cff
4個のファイルの変更156行の追加14行の削除
  1. +14
    -2
      features.js
  2. +55
    -11
      game.js
  3. +85
    -1
      recursive-macro.js
  4. +2
    -0
      stroll.html

+ 14
- 2
features.js ファイルの表示

@@ -2073,6 +2073,7 @@ options = [
"group": "magic", "group": "magic",
"optional": true, "optional": true,
"panels": ["breath"], "panels": ["breath"],
"parts": ["breath"],
"buttons": ["breath_line", "breath_cone"], "buttons": ["breath_line", "breath_cone"],
"entries": "entries":
[ [
@@ -2144,15 +2145,26 @@ options = [
"group": "magic", "group": "magic",
"optional": true, "optional": true,
"panels": ["magic"], "panels": ["magic"],
"parts": ["magic",],
"entries": "entries":
[ [
{ {
"name": "Shrinking magic", "name": "Shrinking magic",
"id": "magicShrink", "id": "magicShrink",
"type": "checkbox",
"type": "subcategory",
"buttons": ["magic_shrink"], "buttons": ["magic_shrink"],
"default": true, "default": true,
"tooltip": "Allows you to shrink a wide area(relative to your size) into a smaller area, allowing you to devour prey much bigger than you are."
"tooltip": "Allows you to shrink a wide area(relative to your size) into a smaller area, allowing you to devour prey much bigger than you are.",
"entries":
[
{
"name": "Auto-shrink",
"id": "magicShrinkAuto",
"type": "checkbox",
"default": false,
"tooltip": "Automatically shrink your victims before performing an action."
}
]
}, },
{ {
"name": "Fast digestion", "name": "Fast digestion",


+ 55
- 11
game.js ファイルの表示

@@ -97,6 +97,8 @@ let macro = //macro controls every customizable part of the players body
"wingScale": 1, "wingScale": 1,
"muskScale": 1, "muskScale": 1,
"stenchScale": 1, "stenchScale": 1,
"breathScale": 1,
"magicScale": 1,


"tailDensity": 1000, "tailDensity": 1000,
"dickDensity": 1000, "dickDensity": 1000,
@@ -1054,7 +1056,7 @@ let macro = //macro controls every customizable part of the players body
"stages": 3 "stages": 3
}, },


get breathArea() { return this.scaling(this.baseBreathArea, this.scale, 2); },
get breathArea() { return this.scaling(this.baseBreathArea, macro.breathScale * this.scale, 2); },


"pawsVore": { "pawsVore": {
"name": "paws", "name": "paws",
@@ -2132,7 +2134,10 @@ function getWeights(region, area) {
"Galaxy": 0.1, "Galaxy": 0.1,
"Cluster": 0.5, "Cluster": 0.5,
"Universe": 1, "Universe": 1,
"Multiverse": 1
"Multiverse": 1,
"Timeline": 1,
"Pantheon": 1,
"Reality": 1,
}; };
} }
else if (area > things["Town"].area) { else if (area > things["Town"].area) {
@@ -4306,7 +4311,7 @@ function breath_cone() {
function magic_shrink() { function magic_shrink() {
let prey = new Container(); let prey = new Container();


prey = getPrey(biome, macro.height * macro.height * 100, true);
prey = getPrey(biome, macro.magicScale * macro.height * macro.height * 100, true);


macro.shrunkPrey = prey; macro.shrunkPrey = prey;
macro.shrunkPrey.mod_property("mass", x => x/1e2) macro.shrunkPrey.mod_property("mass", x => x/1e2)
@@ -4328,7 +4333,7 @@ function magic_fast_digestion() {
clearTimeout(macro.fastDigestTimer); clearTimeout(macro.fastDigestTimer);
} }


macro.fastDigestFactor = 3;
macro.fastDigestFactor = Math.log10(macro.magicScale) * 3;
macro.fastDigestTimer = setTimeout(function () { macro.fastDigestFactor = 1; macro.fastDigestTimer = null; update(["The digestion magic wears off...", newline]); }, 30000); macro.fastDigestTimer = setTimeout(function () { macro.fastDigestFactor = 1; macro.fastDigestTimer = null; update(["The digestion magic wears off...", newline]); }, 30000);
update([line, newline]); update([line, newline]);
} }
@@ -4356,7 +4361,7 @@ function magic_arousal() {


update([line, newline]); update([line, newline]);


macro_arousal_execute(100, 100);
macro_arousal_execute(macro.magicScale * 100, macro.magicScale * 100);
} }


function macro_arousal_execute(remaining, max) { function macro_arousal_execute(remaining, max) {
@@ -4371,7 +4376,7 @@ function magic_fill_sexual() {


update([line, newline]); update([line, newline]);


macro_fill_sexual_execute(100, 100);
macro_fill_sexual_execute(macro.magicScale * 100, macro.magicScale * 100);
} }


function macro_fill_sexual_execute(remaining, max) { function macro_fill_sexual_execute(remaining, max) {
@@ -4651,6 +4656,8 @@ function grow_pick(times) {
case "wings": grow_wings(times); break; case "wings": grow_wings(times); break;
case "musk": grow_musk(times); break; case "musk": grow_musk(times); break;
case "stench": grow_stench(times); break; case "stench": grow_stench(times); break;
case "breath": grow_breath(times); break;
case "magic": grow_magic(times); break;
} }
} }
} }
@@ -4844,7 +4851,7 @@ function grow_wings(factor, simpleCalc = true) {


let lengthDelta = macro.wingLength - oldLength; let lengthDelta = macro.wingLength - oldLength;


update([pickString("Power surges through you", "Energy flows into you", "Your back muscles fight for space", "Your muscles tense", "A crackeling fills the air", "Your balance shifts", "You feel a buzz of power", "A warm sensation fills you") + " as your " + macro.wingDesc + " wings grow, gaining " + length(2 * lengthDelta, unit, false) + " of wingspan.", newline]);
update([pickString("Power surges through you", "Energy flows into you", "Your back muscles fight for space", "Your muscles tense", "A crackling fills the air", "Your balance shifts", "You feel a buzz of power", "A warm sensation fills you") + " as your " + macro.wingDesc + " wings grow, gaining " + length(2 * lengthDelta, unit, false) + " of wingspan.", newline]);
} }


function grow_musk(factor, simpleCalc = true) { function grow_musk(factor, simpleCalc = true) {
@@ -4859,7 +4866,7 @@ function grow_musk(factor, simpleCalc = true) {


let scaleDelta = macro.muskScale - oldScale; let scaleDelta = macro.muskScale - oldScale;


update([pickString("Power surges through you", "Energy flows into you", "A crackeling fills the air", "Your balance shifts", "You feel a buzz of power", "A warm sensation fills you") + " as your musk thickens, growing more potent.", newline]);
update([pickString("Power surges through you", "Energy flows into you", "A crackling fills the air", "Your balance shifts", "You feel a buzz of power", "A warm sensation fills you") + " as your musk thickens, growing more potent.", newline]);
} }


function grow_stench(factor, simpleCalc = true) { function grow_stench(factor, simpleCalc = true) {
@@ -4874,7 +4881,37 @@ function grow_stench(factor, simpleCalc = true) {


let scaleDelta = macro.stenchScale - oldScale; let scaleDelta = macro.stenchScale - oldScale;


update([pickString("Power surges through you", "Energy flows into you", "A crackeling fills the air", "Your balance shifts", "You feel a buzz of power", "A warm sensation fills you") + " as your stench thickens, growing more potent.", newline]);
update([pickString("Power surges through you", "Energy flows into you", "A crackling fills the air", "Your balance shifts", "You feel a buzz of power", "A warm sensation fills you") + " as your stench thickens, growing more potent.", newline]);
}

function grow_breath(factor, simpleCalc = true) {

let oldScale = macro.breathScale;

if (simpleCalc == true) {
macro.breathScale *= factor;
} else {
macro.breathScale = (macro.breathScale + (factor / Math.pow(macro.mass, 1 / 3)))
}

let scaleDelta = macro.breathScale - oldScale;

update([pickString("Power surges through you", "Energy flows into you", "A crackling fills the air", "Your balance shifts", "You feel a buzz of power", "A warm sensation fills you") + " as your breath weapon grows more potent.", newline]);
}

function grow_magic(factor, simpleCalc = true) {

let oldScale = macro.magicScale;

if (simpleCalc == true) {
macro.magicScale *= factor;
} else {
macro.magicScale = (macro.magicScale + (factor / Math.pow(macro.mass, 1 / 3)))
}

let scaleDelta = macro.magicScale - oldScale;

update([pickString("Power surges through you", "Energy flows into you", "A crackling fills the air", "Your balance shifts", "You feel a buzz of power", "A warm sensation fills you") + " as your magical powers grow.", newline]);
} }


function resetSettings() { function resetSettings() {
@@ -5478,6 +5515,13 @@ function showStats() {
update(lines); update(lines);
} }


function performAction(name) {
if (name != "magic_shrink" && macro.magicShrinkAuto) {
magic_shrink();
}
window[name]();
}

function registerActions() { function registerActions() {
let buttons = document.querySelectorAll("[id^='button-action']"); let buttons = document.querySelectorAll("[id^='button-action']");


@@ -5485,9 +5529,9 @@ function registerActions() {
let name = button.id; let name = button.id;
name = name.replace(/button-action-/, ""); name = name.replace(/button-action-/, "");
if (macro.difficulty > 0) { if (macro.difficulty > 0) {
button.addEventListener("click", function () { cooldown_start(name); window[name](); });
button.addEventListener("click", function () { cooldown_start(name); performAction(name) });
} else { } else {
button.addEventListener("click", function () { window[name](); });
button.addEventListener("click", function () { performAction(name) });
} }


}); });


+ 85
- 1
recursive-macro.js ファイルの表示

@@ -175,7 +175,7 @@ var things =
clusters: 5, clusters: 5,
cluster_chances: .5, cluster_chances: .5,
contents: [["Person", 0, 8], ["Empty Car", 0, 2]], contents: [["Person", 0, 8], ["Empty Car", 0, 2]],
descriptor: ["house", "houses"]
descriptor: ["a house", "houses"]
}, },
"Business": { "Business": {
"Business": Business, "Business": Business,
@@ -368,6 +368,42 @@ var things =
contents: [["Universe", 100, 1000]], contents: [["Universe", 100, 1000]],
descriptor: ["a multiverse", "multiverses"] descriptor: ["a multiverse", "multiverses"]
}, },
"Timeline": {
"Timeline": Timeline,
mass: 1,
area: 5e75,
clusters: 1,
cluster_chances: 1,
contents: [["Multiverse", 1e50, 1e53]],
descriptor: ["an entire timeline", "entire timelines"]
},
"Pantheon": {
"Pantheon": Pantheon,
mass: 1,
area: 1e100,
clusters: 1,
cluster_chances: 1,
contents: [["Timeline", 1e30, 1e35], ["Deity", 10, 30]],
descriptor: ["a pantheon", "pantheons"]
},
"Deity": {
"Deity": Deity,
mass: 1e100,
area: 1e100,
clusters: 1,
cluster_chances: 1,
contents: [],
descriptor: ["a deity", "deities"]
},
"Reality": {
"Reality": Reality,
mass: 1,
area: 1e120,
clusters: 1,
cluster_changes: 1,
contents: [["Pantheon", 1e30, 1e35]],
descriptor: ["a reality", "realities"]
},
//Military //Military
"Soldier": { "Soldier": {
"Soldier": Soldier, "Soldier": Soldier,
@@ -1630,6 +1666,54 @@ function Multiverse(count = 1) {
} }
} }


function Timeline(count = 1) {
this.name = "Timeline";

copy_defaults(this, new DefaultEntity());
this.count = count;
this.contents = initContents(this.name, this.count);

this.describe = function (verbose = true) {
return defaultDescribe(verbose, this, "celestial");
}
}

function Pantheon(count = 1) {
this.name = "Pantheon";

copy_defaults(this, new DefaultEntity());
this.count = count;
this.contents = initContents(this.name, this.count);

this.describe = function (verbose = true) {
return defaultDescribe(verbose, this, "celestial");
}
}

function Deity(count = 1) {
this.name = "Deity";

copy_defaults(this, new DefaultEntity());
this.count = count;
this.contents = initContents(this.name, this.count);

this.describe = function (verbose = true) {
return defaultDescribe(verbose, this, "celestial");
}
}

function Reality(count = 1) {
this.name = "Reality";

copy_defaults(this, new DefaultEntity());
this.count = count;
this.contents = initContents(this.name, this.count);

this.describe = function (verbose = true) {
return defaultDescribe(verbose, this, "celestial");
}
}

function Soldier(count = 1) { function Soldier(count = 1) {
this.name = "Soldier"; this.name = "Soldier";




+ 2
- 0
stroll.html ファイルの表示

@@ -184,6 +184,8 @@
<option class="growth-part" id="option-growth-wings" value="wings">Wings</option> <option class="growth-part" id="option-growth-wings" value="wings">Wings</option>
<option class="growth-part" id="option-growth-musk" value="musk">Musk</option> <option class="growth-part" id="option-growth-musk" value="musk">Musk</option>
<option class="growth-part" id="option-growth-stench" value="stench">Stench</option> <option class="growth-part" id="option-growth-stench" value="stench">Stench</option>
<option class="growth-part" id="option-growth-breath" value="breath">Breath</option>
<option class="growth-part" id="option-growth-magic" value="magic">Magic</option>
</select> </select>
<div id="growth-amount-buttons"> <div id="growth-amount-buttons">
<button class="growth-amount" id="button-growth-1.1">1.1x</button> <button class="growth-amount" id="button-growth-1.1">1.1x</button>


読み込み中…
キャンセル
保存