2024-11-15 20:50:59 +00:00
|
|
|
<!doctype html>
|
2024-11-15 19:44:33 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2024-11-15 20:50:59 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<style type="text/css">
|
|
|
|
.box {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
width: 400px;
|
|
|
|
padding: 0.75rem;
|
|
|
|
}
|
|
|
|
.box > * {
|
|
|
|
padding: 0.25rem;
|
|
|
|
}
|
|
|
|
.box > button {
|
|
|
|
padding: 0.25rem 0;
|
|
|
|
margin-bottom: 0.25rem;
|
|
|
|
}
|
|
|
|
.emojis {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0.25rem 0;
|
|
|
|
}
|
|
|
|
.emojis > button {
|
|
|
|
margin: 0;
|
|
|
|
margin-right: 0.25rem;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
.emojis > button > span {
|
|
|
|
font-weight: 600;
|
|
|
|
margin-left: 0.375rem;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
</style>
|
2024-11-15 19:44:33 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="box">
|
|
|
|
<h2>Polycule: <span id="cuties">0</span> cuties</h2>
|
|
|
|
<button id="inviteCutie" onClick="inviteClicked()">Invite a cutie</button>
|
|
|
|
</div>
|
|
|
|
<div class="box">
|
|
|
|
<p>Funds: $ <span id="funds">0.00</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="box">
|
|
|
|
<p><span id="discordServers">0</span> Discord servers</p>
|
2024-11-15 20:50:59 +00:00
|
|
|
<button id="createDiscordServer" onClick="createDiscordServerClicked()">
|
|
|
|
Create Discord server
|
|
|
|
</button>
|
|
|
|
<div id="discordEmojis" class="emojis" style="display: none">
|
|
|
|
<button onClick="discordEmojiClicked(0)">
|
|
|
|
💜 <span id="discordEmoji1"></span>
|
|
|
|
</button>
|
|
|
|
<button onClick="discordEmojiClicked(1)">
|
|
|
|
🥰 <span id="discordEmoji2"></span>
|
|
|
|
</button>
|
|
|
|
<button onClick="discordEmojiClicked(2)">
|
|
|
|
🥺 <span id="discordEmoji3"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2024-11-15 19:44:33 +00:00
|
|
|
</div>
|
|
|
|
<div class="box">
|
|
|
|
<p><span id="twitchChannels">0</span> Twitch channels</p>
|
|
|
|
<p><span id="twitchFollowers">0</span> followers</p>
|
2024-11-15 20:50:59 +00:00
|
|
|
<button id="createTwitchChannel" onClick="createTwitchChannelClicked()">
|
|
|
|
Create Twitch channel
|
|
|
|
</button>
|
2024-11-15 19:44:33 +00:00
|
|
|
</div>
|
|
|
|
<div class="box">
|
|
|
|
<p><span id="catEars">0</span> cat ears</p>
|
2024-11-15 20:50:59 +00:00
|
|
|
<button id="buyCatEars" onClick="buyCatEarsClicked()">
|
|
|
|
Buy cat ears
|
|
|
|
</button>
|
2024-11-15 19:44:33 +00:00
|
|
|
<p>Cat ears cost: $ <span id="catEarsCost">5.00</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="box">
|
2024-11-15 20:50:59 +00:00
|
|
|
<p>
|
|
|
|
<span id="minecraftServers">0</span> Minecraft servers
|
|
|
|
<span id="percentRunning"></span>
|
|
|
|
</p>
|
|
|
|
<button
|
|
|
|
id="launchMinecraftServer"
|
|
|
|
onClick="launchMinecraftServerClicked()"
|
|
|
|
>
|
|
|
|
Launch Minecraft server
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
id="deployCloudOrchestration"
|
|
|
|
onClick="deployCloudOrchestrationClicked()"
|
|
|
|
style="display: none"
|
|
|
|
>
|
|
|
|
Deploy cloud orchestration
|
|
|
|
</button>
|
|
|
|
<p>
|
|
|
|
Cloud instance cost: $ <span id="minecraftServersCost">12.00</span> /
|
|
|
|
month
|
|
|
|
</p>
|
2024-11-15 19:44:33 +00:00
|
|
|
</div>
|
|
|
|
<div class="box">
|
|
|
|
<p><span id="synthesizers">0</span> synthesizers</p>
|
2024-11-15 20:50:59 +00:00
|
|
|
<button id="buySynthesizer" onClick="buySynthesizerClicked()">
|
|
|
|
Buy synthesizer
|
|
|
|
</button>
|
2024-11-15 19:44:33 +00:00
|
|
|
<p>Synthesizer cost: $ <span id="synthesizersCost">100.00</span></p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var cutieCount = 0;
|
|
|
|
var funds = 0;
|
|
|
|
var discordServers = 0;
|
2024-11-15 20:50:59 +00:00
|
|
|
var discordEmoji = [0, 0, 0];
|
2024-11-15 19:44:33 +00:00
|
|
|
var twitchChannels = 0;
|
|
|
|
var twitchFollowers = 0;
|
|
|
|
var catEars = 0;
|
2024-11-15 20:50:59 +00:00
|
|
|
var catEarsCost = 5.0;
|
2024-11-15 19:44:33 +00:00
|
|
|
var minecraftServers = 0;
|
2024-11-15 20:50:59 +00:00
|
|
|
var minecraftServersCost = 12.0;
|
2024-11-15 19:44:33 +00:00
|
|
|
var minecraftServersTotalCost = 0;
|
|
|
|
var cloudOrchestration = false;
|
|
|
|
var synthesizers = 0;
|
|
|
|
var synthesizersCost = 100;
|
|
|
|
|
|
|
|
var cutiesElement = document.getElementById("cuties");
|
|
|
|
var fundsElement = document.getElementById("funds");
|
|
|
|
var discordServersElement = document.getElementById("discordServers");
|
2024-11-15 20:50:59 +00:00
|
|
|
var discordEmojisElement = document.getElementById("discordEmojis");
|
|
|
|
var discordEmojiElements = [];
|
|
|
|
discordEmojiElements.push(document.getElementById("discordEmoji1"));
|
|
|
|
discordEmojiElements.push(document.getElementById("discordEmoji2"));
|
|
|
|
discordEmojiElements.push(document.getElementById("discordEmoji3"));
|
2024-11-15 19:44:33 +00:00
|
|
|
var twitchChannelsElement = document.getElementById("twitchChannels");
|
|
|
|
var twitchFollowersElement = document.getElementById("twitchFollowers");
|
|
|
|
var catEarsElement = document.getElementById("catEars");
|
|
|
|
var buyCatEarsElement = document.getElementById("buyCatEars");
|
|
|
|
var catEarsCostElement = document.getElementById("catEarsCost");
|
|
|
|
var minecraftServersElement = document.getElementById("minecraftServers");
|
2024-11-15 20:50:59 +00:00
|
|
|
var minecraftServersCostElement = document.getElementById(
|
|
|
|
"minecraftServersCost",
|
|
|
|
);
|
|
|
|
var deployCloudOrchestrationElement = document.getElementById(
|
|
|
|
"deployCloudOrchestration",
|
|
|
|
);
|
2024-11-15 19:44:33 +00:00
|
|
|
var percentRunningElement = document.getElementById("percentRunning");
|
|
|
|
var buySynthesizerElement = document.getElementById("buySynthesizer");
|
|
|
|
var synthesizersElement = document.getElementById("synthesizers");
|
|
|
|
var synthesizersCostElement = document.getElementById("synthesizersCost");
|
|
|
|
|
|
|
|
function inviteClicked() {
|
|
|
|
cutieCount++;
|
|
|
|
}
|
|
|
|
|
|
|
|
function createDiscordServerClicked() {
|
|
|
|
discordServers++;
|
2024-11-15 20:50:59 +00:00
|
|
|
discordEmojisElement.style.display = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
function discordEmojiClicked(index) {
|
|
|
|
discordEmoji[index]++;
|
2024-11-15 19:44:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function createTwitchChannelClicked() {
|
|
|
|
twitchChannels++;
|
|
|
|
}
|
|
|
|
|
|
|
|
function buyCatEarsClicked() {
|
|
|
|
catEars++;
|
|
|
|
funds -= catEarsCost;
|
|
|
|
catEarsCost *= 1.15;
|
|
|
|
}
|
|
|
|
|
|
|
|
function launchMinecraftServerClicked() {
|
|
|
|
minecraftServers++;
|
|
|
|
minecraftServersTotalCost += minecraftServersCost;
|
|
|
|
minecraftServersCost *= 1.15;
|
|
|
|
|
|
|
|
if (!cloudOrchestration && minecraftServers >= 100) {
|
|
|
|
deployCloudOrchestrationElement.style.display = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function deployCloudOrchestrationClicked() {
|
|
|
|
cloudOrchestration = true;
|
|
|
|
deployCloudOrchestrationElement.style.display = "none";
|
|
|
|
}
|
|
|
|
|
|
|
|
function buySynthesizerClicked() {
|
|
|
|
synthesizers++;
|
|
|
|
funds -= synthesizersCost;
|
|
|
|
synthesizersCost *= 1.15;
|
|
|
|
}
|
|
|
|
|
|
|
|
var fundsBaseRate = 0.00001227;
|
2024-11-15 20:50:59 +00:00
|
|
|
var discordRate = 0.001;
|
2024-11-15 19:44:33 +00:00
|
|
|
var streamerBaseRate = 0.01;
|
|
|
|
var streamerWithCatEarsRate = 0.005;
|
|
|
|
var twitchEarningRate = 0.00001;
|
|
|
|
var synthRepRate = 0.0001;
|
|
|
|
|
2024-11-15 20:50:59 +00:00
|
|
|
window.setInterval(function () {
|
2024-11-15 19:44:33 +00:00
|
|
|
if (discordServers > 0) {
|
2024-11-15 20:50:59 +00:00
|
|
|
cutieCount +=
|
|
|
|
Math.min(discordServers, cutieCount / 100.0) * discordRate;
|
|
|
|
|
|
|
|
const emoji = Math.floor(Math.random() * 1000 * (100 / cutieCount));
|
|
|
|
if (emoji < 3) {
|
|
|
|
discordEmoji[emoji]++;
|
|
|
|
}
|
2024-11-15 19:44:33 +00:00
|
|
|
}
|
|
|
|
|
2024-11-15 20:50:59 +00:00
|
|
|
var streamers = Math.min(
|
|
|
|
twitchChannels,
|
|
|
|
cutieCount *
|
|
|
|
(streamerBaseRate +
|
|
|
|
Math.min(cutieCount, catEars) * streamerWithCatEarsRate),
|
|
|
|
);
|
2024-11-15 19:44:33 +00:00
|
|
|
if (streamers > 0) {
|
|
|
|
if (twitchFollowers < streamers * 10000) {
|
|
|
|
twitchFollowers += 0.01 * (streamers * 10000 - twitchFollowers);
|
|
|
|
} else {
|
|
|
|
twitchFollowers -= 0.01 * (twitchFollowers - streamers * 10000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-11-15 20:50:59 +00:00
|
|
|
funds +=
|
|
|
|
cutieCount * fundsBaseRate + twitchFollowers * twitchEarningRate;
|
2024-11-15 19:44:33 +00:00
|
|
|
|
|
|
|
if (minecraftServers > 0) {
|
2024-11-15 20:50:59 +00:00
|
|
|
var cloudServerCosts =
|
|
|
|
minecraftServersTotalCost / (12 * 24 * 60 * 60 * 100);
|
2024-11-15 19:44:33 +00:00
|
|
|
if (cloudServerCosts < funds) {
|
|
|
|
percentRunningElement.style.display = "none";
|
|
|
|
funds -= cloudServerCosts;
|
|
|
|
|
|
|
|
if (cloudOrchestration) {
|
|
|
|
minecraftServers += 0.00001 * minecraftServers;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
percentRunningElement.style.display = "";
|
2024-11-15 20:50:59 +00:00
|
|
|
percentRunningElement.innerHTML =
|
|
|
|
"(" +
|
|
|
|
Math.floor((100 * funds) / cloudServerCosts) +
|
|
|
|
" % running)";
|
2024-11-15 19:44:33 +00:00
|
|
|
funds = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
synthesizers += synthesizers * synthRepRate;
|
|
|
|
|
|
|
|
cutiesElement.innerHTML = Math.floor(cutieCount);
|
|
|
|
fundsElement.innerHTML = funds.toFixed(2);
|
|
|
|
discordServersElement.innerHTML = discordServers;
|
2024-11-15 20:50:59 +00:00
|
|
|
for (const [index, element] of discordEmojiElements.entries()) {
|
|
|
|
element.innerHTML = discordEmoji[index];
|
|
|
|
}
|
2024-11-15 19:44:33 +00:00
|
|
|
twitchChannelsElement.innerHTML = twitchChannels;
|
|
|
|
twitchFollowersElement.innerHTML = Math.floor(twitchFollowers);
|
|
|
|
catEarsElement.innerHTML = catEars;
|
|
|
|
catEarsCostElement.innerHTML = catEarsCost.toFixed(2);
|
|
|
|
minecraftServersElement.innerHTML = Math.floor(minecraftServers);
|
|
|
|
minecraftServersCostElement.innerHTML = minecraftServersCost.toFixed(2);
|
|
|
|
synthesizersElement.innerHTML = Math.floor(synthesizers);
|
|
|
|
synthesizersCostElement.innerHTML = synthesizersCost.toFixed(2);
|
|
|
|
|
|
|
|
buyCatEarsElement.disabled = catEarsCost > funds;
|
|
|
|
buySynthesizerElement.disabled = synthesizersCost > funds;
|
|
|
|
}, 10);
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|