Browse Source

Added galaxies, universes, and multiverses

tags/v0.7.0
Fen Dweller 7 years ago
parent
commit
038e88c8fa
2 changed files with 68 additions and 3 deletions
  1. +5
    -2
      game.js
  2. +63
    -1
      recursive-macro.js

+ 5
- 2
game.js View File

@@ -1456,7 +1456,7 @@ function getOnePrey(biome, area, sameSize = true)
let potential = ["Person"];

if (area >= areas["Planet"])
potential = ["Planet","Star","Solar System","Galaxy"];
potential = ["Planet","Star","Solar System","Galaxy","Cluster","Universe","Multiverse"];
else if (area >= areas["Town"])
potential = ["Town","City","Continent","Planet"];
else
@@ -1500,6 +1500,9 @@ function getPrey(region, area, sameSize = false)
"Star": 1.7713746e-12,
"Solar System": 4e-10,
"Galaxy": 0.1,
"Cluster": 0.5,
"Universe": 1,
"Multiverse": 1
};
}
else if (area > areas["Town"]) {
@@ -1676,7 +1679,7 @@ function stomp()
function stomp_wedge() {
if (macro.footType == "hoof")
return;
let area = 0;

if (!macro.footWear || (!macro.footSockWorn && !macro.footShoeWorn))


+ 63
- 1
recursive-macro.js View File

@@ -24,6 +24,9 @@ var things =
"Star": Star,
"Solar System": SolarSystem,
"Galaxy": Galaxy,
"Cluster": Cluster,
"Universe": Universe,
"Multiverse": Multiverse,
"Soldier": Soldier,
"Tank": Tank,
"Artillery": Artillery,
@@ -55,6 +58,9 @@ var areas =
"Star": 3e18,
"Solar System": 3e21,
"Galaxy": 2e42,
"Cluster": 2e46,
"Universe": 2e52,
"Multiverse": 2e55,
"Soldier": 1,
"Tank": 10,
"Artillery": 12,
@@ -86,6 +92,9 @@ var masses =
"Star": 1e40,
"Solar System": 1,
"Galaxy": 1,
"Cluster": 1,
"Universe": 1,
"Multiverse": 1,
"Soldier": 80,
"Tank": 5000,
"Artillery": 7000,
@@ -117,6 +126,9 @@ var clusters =
"Star": 1,
"Solar System": 1,
"Galaxy": 1,
"Cluster": 1,
"Universe": 1,
"Multiverse": 1,
"Soldier": 0,
"Tank": 0,
"Artillery": 0,
@@ -148,6 +160,9 @@ var contents =
"Star": [],
"Solar System": [["Star",1,1],["Planet",5,15]],
"Galaxy": [["Star",1e9,500e9],["Solar System",1e8,500e8]],
"Cluster": [["Galaxy",200,5000]],
"Universe": [["Cluster",1.5e9,2.5e9]],
"Multiverse": [["Universe",100,1000]],
"Soldier": [],
"Tank": [["Soldier",3,5]],
"Artillery": [["Soldier",4,6]],
@@ -206,7 +221,6 @@ function initContents(name,count) {
result[type[i][3]] = new things[type[i][0]](amount);
else
result[type[i][0]] = new things[type[i][0]](amount);

}
}

@@ -1039,6 +1053,54 @@ function Galaxy(count = 1) {
};
}

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

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

this.describe = function(verbose = true) {
if (verbose) {
return (this.count == 1 ? "a cluster" : this.count + " clusters") + " made up of " + describe_all(this.contents, verbose);
} else {
return (this.count == 1 ? "a cluster" : this.count + " clusters");
}
};
}

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

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

this.describe = function(verbose = true) {
if (verbose) {
return (this.count == 1 ? "a universe" : this.count + " universes") + " made up of " + describe_all(this.contents, verbose);
} else {
return (this.count == 1 ? "a universe" : this.count + " universes");
}
};
}

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

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

this.describe = function(verbose = true) {
if (verbose) {
return (this.count == 1 ? "a multiverse" : this.count + " multiverses") + " made up of " + describe_all(this.contents, verbose);
} else {
return (this.count == 1 ? "a multiverse" : this.count + " multiverses");
}
};
}

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



Loading…
Cancel
Save