Rate: ' + rate + '/sec Bonus: ' + bonusPercent + '%';
+ if (!gameState.cometUnlocked) tooltipText += ' Unlocks Comets at level 20';
this.elements.asteroidLevel.innerHTML = 'Asteroids: Level ' +
gameState.asteroidUpgradeLevel +
@@ -407,9 +408,10 @@ var UI = {
},
updateCometUpgrade: function(gameState) {
- var rate = (1 / gameState.currentCometSpawnInterval * 60000).toFixed(2);
- var bonusPercent = (gameState.cometUpgradeLevel * 10);
- var tooltipText = 'Rate: ' + rate + '/min Bonus: ' + bonusPercent + '%';
+ var rate = (60000 / gameState.currentCometSpawnInterval).toFixed(2);
+ var bonusPercent = (gameState.cometUpgradeLevel * CONFIG.UPGRADE_BONUS_PER_LEVEL_COMET * 100).toFixed(0);
+ var tooltipText = 'Comets are small icy bodies that typically release gas and dust, forming a glowing coma and often a tail. They are composed mainly of ice, rock, and organic compounds.
Rate: ' + rate + '/min Bonus: ' + bonusPercent + '%';
+ if (!gameState.planetUnlocked) tooltipText += ' Unlocks Planets at level 15';
this.elements.cometLevel.innerHTML = 'Comets: Level ' +
gameState.cometUpgradeLevel +
@@ -423,9 +425,10 @@ var UI = {
},
updatePlanetUpgrade: function(gameState) {
- var rate = (3600000 / gameState.currentPlanetSpawnInterval).toFixed(2);
- var bonusPercent = (gameState.planetUpgradeLevel * 10);
- var tooltipText = 'Rate: ' + rate + '/hour Bonus: ' + bonusPercent + '%';
+ var rate = (CONFIG.BASE_PLANET_SPAWN_INTERVAL / gameState.currentPlanetSpawnInterval).toFixed(2);
+ var bonusPercent = (gameState.planetUpgradeLevel * CONFIG.UPGRADE_BONUS_PER_LEVEL_PLANT * 100).toFixed(0);
+ var tooltipText = 'Planets are roughly spherical accumulations of rock and metal, with solid surfaces and relatively thin atmospheres. Local examples include Mercury, Venus, Earth, and Mars. They may vary greatly in size.
Rate: ' + rate + '/hour Bonus: ' + bonusPercent + '%';
+ if (!gameState.giantUnlocked) tooltipText += ' Unlocks Giants at level 10';
this.elements.planetLevel.innerHTML = 'Planets: Level ' +
gameState.planetUpgradeLevel +
@@ -439,9 +442,10 @@ var UI = {
},
updateGiantUpgrade: function(gameState) {
- var rate = (21600000 / gameState.currentGiantSpawnInterval).toFixed(2);
- var bonusPercent = (gameState.giantUpgradeLevel * 10);
- var tooltipText = 'Spawn Rate: ' + rate + '/6hours Bonus: ' + bonusPercent + '%';
+ var rate = (CONFIG.BASE_GIANT_SPAWN_INTERVAL / gameState.currentGiantSpawnInterval).toFixed(2);
+ var bonusPercent = (gameState.giantUpgradeLevel * CONFIG.UPGRADE_BONUS_PER_LEVEL_GIANT * 100).toFixed(0);
+ var tooltipText = 'Gas giants are large planets made mostly of hydrogen and helium, with thick atmospheres and no solid surface; Jupiter and Saturn are examples. Ice giants are similar but contain higher amounts of frozen materials like water, ammonia, and methane beneath their atmospheres; Uranus and Neptune fall into this category.
Spawn Rate: ' + rate + '/6hours Bonus: ' + bonusPercent + '%';
+ if (!gameState.mtypeUnlocked) tooltipText += ' Unlocks M-Type at level 5';
this.elements.giantLevel.innerHTML = 'Giants: Level ' +
gameState.giantUpgradeLevel +
@@ -455,9 +459,11 @@ var UI = {
},
updateMtypeUpgrade: function(gameState) {
- var rate = (86400000 / gameState.currentMtypeSpawnInterval).toFixed(2);
- var bonusPercent = (gameState.mtypeUpgradeLevel * 0.5);
- var tooltipText = 'Spawn Rate: ' + rate + '/day Bonus: ' + bonusPercent + '%';
+ var rate = (CONFIG.BASE_MTYPE_SPAWN_INTERVAL / gameState.currentMtypeSpawnInterval).toFixed(2);
+ var bonusPercent = (gameState.mtypeUpgradeLevel * CONFIG.UPGRADE_BONUS_PER_LEVEL_MTYPE * 100).toFixed(0);
+ var tooltipText = 'M-types, also known as red dwarfs, are the smallest and coolest stars with masses ranging from about 0.08 to 0.45 M☉. They are the most common star in the universe, making up roughly three quarters of all main-sequence stars, but are not easily visible due to their low luminosity.
Spawn Rate: ' + rate + '/day Bonus: ' + bonusPercent + '%';
+ if (!gameState.ktypeUnlocked) tooltipText += ' Unlocks K-Type at level 5';
+
this.elements.mtypeLevel.innerHTML = 'M-Type: Level ' +
gameState.mtypeUpgradeLevel +
'' + tooltipText + '';
@@ -468,9 +474,10 @@ var UI = {
},
updateKtypeUpgrade: function(gameState) {
- var rate = (259200000 / gameState.currentKtypeSpawnInterval).toFixed(2);
- var bonusPercent = (gameState.ktypeUpgradeLevel * 3);
- var tooltipText = 'Spawn Rate: ' + rate + '/3days Bonus: ' + bonusPercent + '%';
+ var rate = (CONFIG.BASE_KTYPE_SPAWN_INTERVAL / gameState.currentKtypeSpawnInterval).toFixed(2);
+ var bonusPercent = (gameState.ktypeUpgradeLevel * CONFIG.UPGRADE_BONUS_PER_LEVEL_KTYPE * 100).toFixed(0);
+ var tooltipText = 'K-types, also known as orange dwarfs, are medium-sized stars that are cooler than the Sun, with masses ranging from about 0.45 to 0.8 M☉. They are known for their stability and long lifespans (20 to 70 billion years) making them potential candidates for supporting inhabited planets.