MediaWiki:WildCreatureStats.js

var wildStatCalcDiv = null; var stats = null; var wildCreatureStats = null; var percentiles = null; var wildStatCalcStats = { 'health': 'Health', 'stamina': 'Stamina', 'oxygen': 'Oxygen', 'food': 'Food', 'weight': 'Weight', 'damage': 'Melee Damage' };

creatureList = document.getElementsByClassName('creatureStats'); creatureStats = creatureList.getElementsByClassName('creature-list'); console.log(creatureStats);

if (wildStatCalcDiv = document.getElementById('wildStatCalc')) { // NOTE: the increase is always given as percentage of the base-stat // NOTE: in this tool damage1 is (in most cases) 100 to represent 100% (as it is seen ingame) // NOTE: if a creature don't have oxygen (aquatics etc.), just leave these parameter out wildCreatureStats = { "Achatina": { "health1": 75, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Allosaurus": { "health1": 630, "healthInc": 0.2, "stamina1": 250, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 380, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Alpha Carnotaurus": { "health1": 6400, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 300, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Alpha Leedsichthys": { "health1": 4400, "healthInc": 0.12, "stamina1": 500, "staminaInc": 0.1, "food1": 8000, "foodInc": 0.1, "weight1": 1800, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Alpha Megalodon": { "health1": 9600, "healthInc": 0.2, "stamina1": 320, "staminaInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 250, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Alpha Mosasaur": { "health1": 54000, "healthInc": 0.12, "stamina1": 400, "staminaInc": 0.1, "food1": 8000, "foodInc": 0.1, "weight1": 1300, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Alpha Raptor": { "health1": 3600, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 140, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Alpha Rex": { "health1": 17500, "healthInc": 0.2, "stamina1": 420, "staminaInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 500, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Alpha Tusoteuthis": { "health1": 30000, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "food1": 3200, "foodInc": 0.1, "weight1": 800, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Ammonite": { "health1": 165, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Anglerfish": { "health1": 450, "healthInc": 0.2, "stamina1": 240, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 350, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Ankylosaurus": { "health1": 700, "healthInc": 0.2, "stamina1": 175, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 250, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Araneo": { "health1": 150, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Archaeopteryx": { "health1": 125, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 30, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Argentavis": { "health1": 365, "healthInc": 0.2, "stamina1": 400, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Arthropluera": { "health1": 500, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Baryonyx": { "health1": 440, "healthInc": 0.2, "stamina1": 325, "staminaInc": 0.1, "food1": 2250, "foodInc": 0.1, "weight1": 325, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Basilosaurus": { "health1": 2400, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "food1": 8000, "foodInc": 0.1, "weight1": 700, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Beelzebufo": { "health1": 220, "healthInc": 0.2, "stamina1": 190, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 160, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Brontosaurus": { "health1": 2300, "healthInc": 0.2, "stamina1": 240, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 10000, "foodInc": 0.1, "weight1": 1600, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Broodmother Lysrix (Hard)": { "health1": 486000, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Broodmother Lysrix (Medium)": { "health1": 421200, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Broodmother Lysrix (Alpha) (Hard)": { "health1": 972000.0625, "healthInc": 0.25, "stamina1": 150, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.075 },       "Broodmother Lysrix (Beta) (Medium)": { "health1": 648000, "healthInc": 0.15, "stamina1": 150, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.035 },       "Broodmother Lysrix (Gamma) (Easy)": { "health1": 324000, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Broodmother Lysrix (Gamma)": { "health1": 356400, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Carbonemys": { "health1": 700, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 270, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Carnotaurus": { "health1": 420, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 300, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Castoroides": { "health1": 450, "healthInc": 0.2, "stamina1": 180, "staminaInc": 0.1, "oxygen1": 380, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 300, "weightInc": 0.02, "damage1": 100, "damageInc": 0.04 },       "Chalicotherium": { "health1": 600, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 4000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Cnidaria": { "health1": 180, "healthInc": 0.2, "stamina1": 120, "staminaInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 25, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Coelacanth": { "health1": 30, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 100, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Coelacanth": { "health1": 30, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 100, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Compy": { "health1": 50, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 25, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Daeodon": { "health1": 900, "healthInc": 0.2, "stamina1": 250, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2500, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Dilophosaur": { "health1": 130, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 45, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Dimetrodon": { "health1": 350, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 250, "weightInc": 0.02, "damage1": 100, "damageInc": 0.02 },       "Dimorphodon": { "health1": 125, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Diplocaulus": { "health1": 190, "healthInc": 0.2, "stamina1": 165, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Diplodocus": { "health1": 1700, "healthInc": 0.2, "stamina1": 550, "staminaInc": 0.1, "oxygen1": 300, "oxygenInc": 0.1, "food1": 10000, "foodInc": 0.1, "weight1": 800, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Direbear": { "health1": 400, "healthInc": 0.2, "stamina1": 500, "staminaInc": 0.1, "oxygen1": 270, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 650, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Direwolf": { "health1": 330, "healthInc": 0.2, "stamina1": 260, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 170, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Diseased Leech": { "health1": 120, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Dodo": { "health1": 40, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Doedicurus": { "health1": 850, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 250, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Dragon (Alpha) (Hard)": { "health1": 972000, "healthInc": 0.25, "stamina1": 10000, "staminaInc": 0.1, "food1": 2600, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.075 },       "Dragon (Beta) (Medium)": { "health1": 864000.0625, "healthInc": 0.2, "stamina1": 10000, "staminaInc": 0.1, "food1": 2600, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Dragon (Gamma) (Easy)": { "health1": 432000, "healthInc": 0.2, "stamina1": 10000, "staminaInc": 0.1, "food1": 2600, "foodInc": 0.1, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Dung Beetle": { "health1": 200, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 5, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Dunkleosteus": { "health1": 710, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 910, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Electrophorus": { "health1": 180, "healthInc": 0.2, "stamina1": 165, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Equus": { "health1": 240, "healthInc": 0.2, "stamina1": 560, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 350, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Eurypterid": { "health1": 160, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Gallimimus": { "health1": 150, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1000, "foodInc": 0.1, "weight1": 270, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Giant Bee": { "health1": 80, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Giant Queen Bee": { "health1": 80, "healthInc": 0, "stamina1": 200, "staminaInc": 0, "oxygen1": 150, "oxygenInc": 0, "food1": 800, "foodInc": 0, "weight1": 150, "weightInc": 0, "damage1": 100, "damageInc": 0 },       "Giganotosaurus": { "health1": 80000, "healthInc": 0.0005, "stamina1": 400, "staminaInc": 0.0005, "oxygen1": 150, "oxygenInc": 0.0025, "food1": 4000, "foodInc": 0.0025, "weight1": 700, "weightInc": 0.01, "damage1": 100, "damageInc": 0.05 },       "Gigantopithecus": { "health1": 640, "healthInc": 0.1, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 220, "weightInc": 0.02, "damage1": 100, "damageInc": 0.04 },       "Griffin": { "health1": 1325, "healthInc": 0.2, "stamina1": 250, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1600, "foodInc": 0.1, "weight1": 280, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Hesperornis": { "health1": 95, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 70, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Hyaenodon ": { "health1": 175, "healthInc": 0.2, "stamina1": 260, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 170, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Ichthyornis": { "health1": 50, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1000, "foodInc": 0.1, "weight1": 55, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Ichthy": { "health1": 275, "healthInc": 0.05, "stamina1": 300, "staminaInc": 0.2, "food1": 1000, "foodInc": 0.1, "weight1": 250, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Iguanodon": { "health1": 250, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1800, "foodInc": 0.1, "weight1": 375, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Kairuku": { "health1": 95, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 70, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Kaprosuchus": { "health1": 200, "healthInc": 0.2, "stamina1": 350, "staminaInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 140, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Kentrosaurus": { "health1": 650, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 6000, "foodInc": 0.1, "weight1": 500, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Leech": { "health1": 40, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Leedsichthys": { "health1": 4400, "healthInc": 0.12, "stamina1": 500, "staminaInc": 0.1, "food1": 8000, "foodInc": 0.1, "weight1": 1800, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Liopleurodon": { "health1": 3200, "healthInc": 0.2, "stamina1": 800, "staminaInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 1000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Lystrosaurus": { "health1": 90, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 215, "oxygenInc": 0.1, "food1": 500, "foodInc": 0.1, "weight1": 90, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Mammoth": { "health1": 850, "healthInc": 0.2, "stamina1": 330, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 5000, "foodInc": 0.1, "weight1": 500, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Manta": { "health1": 320, "healthInc": 0.05, "stamina1": 270, "staminaInc": 0.2, "food1": 1000, "foodInc": 0.1, "weight1": 200, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Megalania": { "health1": 480, "healthInc": 0.2, "stamina1": 400, "staminaInc": 0.1, "oxygen1": 200, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Megaloceros": { "health1": 300, "healthInc": 0.2, "stamina1": 280, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 220, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Megalodon": { "health1": 600, "healthInc": 0.2, "stamina1": 320, "staminaInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 250, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Megalosaurus": { "health1": 1025, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 300, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Meganeura": { "health1": 45, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Megapithecus (Hard)": { "health1": 463999.96875, "healthInc": 0, "stamina1": 650, "staminaInc": 0, "food1": 2600, "foodInc": 0, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Megapithecus (Medium)": { "health1": 400000, "healthInc": 0, "stamina1": 650, "staminaInc": 0, "food1": 2600, "foodInc": 0, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Megapithecus (Alpha) (Hard)": { "health1": 540000, "healthInc": 0, "stamina1": 650, "staminaInc": 0, "food1": 2600, "foodInc": 0, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Megapithecus (Beta) (Medium)": { "health1": 396000, "healthInc": 0, "stamina1": 650, "staminaInc": 0, "food1": 2600, "foodInc": 0, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Megapithecus (Gamma) (Easy)": { "health1": 180000, "healthInc": 0, "stamina1": 650, "staminaInc": 0, "food1": 2600, "foodInc": 0, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Megapithecus (Gamma)": { "health1": 352000, "healthInc": 0, "stamina1": 650, "staminaInc": 0, "food1": 2600, "foodInc": 0, "weight1": 4000, "weightInc": 0.02, "damage1": 100, "damageInc": 0 },       "Megatherium": { "health1": 740, "healthInc": 0.2, "stamina1": 400, "staminaInc": 0.1, "oxygen1": 270, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 725, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Mesopithecus": { "health1": 115, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 70, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Microraptor": { "health1": 130, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 45, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Mosasaurus": { "health1": 3600, "healthInc": 0.12, "stamina1": 400, "staminaInc": 0.1, "food1": 8000, "foodInc": 0.1, "weight1": 1300, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Moschops": { "health1": 375, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 300, "foodInc": 0.1, "weight1": 200, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Onyc": { "health1": 250, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Oviraptor": { "health1": 140, "healthInc": 0.2, "stamina1": 120, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Ovis": { "health1": 100, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 90, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Pachycephalosaurus": { "health1": 165, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Pachyrhinosaurus": { "health1": 375, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 365, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Paracer": { "health1": 1140, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 6500, "foodInc": 0.1, "weight1": 850, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Parasaur": { "health1": 200, "healthInc": 0.2, "stamina1": 450, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 280, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Pegomastax": { "health1": 120, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 55, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Pelagornis": { "health1": 240, "healthInc": 0.2, "stamina1": 180, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Phiomia": { "health1": 300, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 200, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Piranha": { "health1": 150, "healthInc": 0.2, "stamina1": 120, "staminaInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 25, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Plesiosaur": { "health1": 2400, "healthInc": 0.12, "stamina1": 800, "staminaInc": 0.1, "food1": 5000, "foodInc": 0.1, "weight1": 800, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Polar Bear": { "health1": 800, "healthInc": 0.2, "stamina1": 500, "staminaInc": 0.1, "oxygen1": 270, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 650, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Procoptodon": { "health1": 400, "healthInc": 0.2, "stamina1": 350, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 450, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Pteranodon": { "health1": 210, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 120, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Pulmonoscorpius": { "health1": 280, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 200, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Purlovia": { "health1": 550, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 4000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Quetzal": { "health1": 1200, "healthInc": 0.2, "stamina1": 800, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 800, "weightInc": 0.02, "damage1": 100, "damageInc": 0.04 },       "Raptor": { "health1": 200, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 140, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Rex": { "health1": 1100, "healthInc": 0.2, "stamina1": 420, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 500, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Sabertooth": { "health1": 250, "healthInc": 0.2, "stamina1": 200, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 200, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Sabertooth Salmon": { "health1": 65, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 100, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Sarco": { "health1": 400, "healthInc": 0.2, "stamina1": 450, "staminaInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 300, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Spino": { "health1": 700, "healthInc": 0.2, "stamina1": 350, "staminaInc": 0.1, "oxygen1": 650, "oxygenInc": 0.1, "food1": 2600, "foodInc": 0.1, "weight1": 350, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Stegosaurus": { "health1": 650, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 6000, "foodInc": 0.1, "weight1": 500, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Tapejara": { "health1": 325, "healthInc": 0.2, "stamina1": 250, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1600, "foodInc": 0.1, "weight1": 280, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Terror Bird": { "health1": 270, "healthInc": 0.2, "stamina1": 160, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 120, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Therizinosaur": { "health1": 870, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 365, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Thylacoleo": { "health1": 700, "healthInc": 0.2, "stamina1": 400, "staminaInc": 0.1, "oxygen1": 200, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Titanoboa": { "health1": 170, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Titanomyrma Drone": { "health1": 35, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Titanomyrma Soldier": { "health1": 50, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Titanosaur": { "health1": 230000, "healthInc": 0, "stamina1": 2000, "staminaInc": 0, "oxygen1": 600, "oxygenInc": 0, "food1": 8640, "foodInc": 0, "weight1": 50000, "weightInc": 0, "damage1": 100, "damageInc": 0 },       "Triceratops": { "health1": 375, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 365, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Trilobite": { "health1": 160, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 150, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Troodon": { "health1": 200, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 200, "foodInc": 0.1, "weight1": 140, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Tusoteuthis": { "health1": 3333, "healthInc": 0.2, "stamina1": 300, "staminaInc": 0.1, "food1": 3200, "foodInc": 0.1, "weight1": 800, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Unicorn": { "health1": 240, "healthInc": 0.2, "stamina1": 560, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 350, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Woolly Rhino": { "health1": 500, "healthInc": 0.2, "stamina1": 120, "staminaInc": 0.1, "oxygen1": 100, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 750, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Yeti": { "health1": 2000, "healthInc": 0.1, "stamina1": 300, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1500, "foodInc": 0.1, "weight1": 220, "weightInc": 0.02, "damage1": 100, "damageInc": 0.04 },       "Yutyrannus": { "health1": 1100, "healthInc": 0.2, "stamina1": 420, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 3000, "foodInc": 0.1, "weight1": 500, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Zomdodo": { "health1": 700, "healthInc": 0.2, "stamina1": 1000, "staminaInc": 0.1, "food1": 450, "foodInc": 0, "weight1": 170, "weightInc": 0.02, "damage1": 100, "damageInc": 0.015 },       "Alpha Deathworm": { "health1": 27000, "healthInc": 0.002, "stamina1": 100, "staminaInc": 0.1, "food1": 100, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Alpha Fire Wyvern": { "health1": 8000, "healthInc": 0.15, "stamina1": 600, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Deathworm": { "health1": 20000, "healthInc": 0.002, "stamina1": 100, "staminaInc": 0.1, "food1": 100, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Deathworm (Minion)": { "health1": 8000, "healthInc": 0.002, "stamina1": 100, "staminaInc": 0.1, "food1": 100, "foodInc": 0.1, "weight1": 100, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Fire Wyvern": { "health1": 1725, "healthInc": 0.15, "stamina1": 275, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Jerboa": { "health1": 55, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 55, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Jug Bug": { "health1": 75, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Lightning Wyvern": { "health1": 1725, "healthInc": 0.15, "stamina1": 275, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Lymantria": { "health1": 260, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 175, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Manticore": { "health1": 100000, "healthInc": 0.2, "stamina1": 400, "staminaInc": 0.1, "oxygen1": 2000, "oxygenInc": 0.1, "food1": 2600, "foodInc": 0.1, "weight1": 3000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Manticore (Alpha) (Hard)": { "health1": 160000, "healthInc": 0.3, "stamina1": 400, "staminaInc": 0.1, "oxygen1": 2000, "oxygenInc": 0.1, "food1": 2600, "foodInc": 0.1, "weight1": 3000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.1 },       "Manticore (Beta) (Medium)": { "health1": 130000, "healthInc": 0.25, "stamina1": 400, "staminaInc": 0.1, "oxygen1": 2000, "oxygenInc": 0.1, "food1": 2600, "foodInc": 0.1, "weight1": 3000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.075 },       "Manticore (Gamma) (Easy)": { "health1": 100000, "healthInc": 0.2, "stamina1": 400, "staminaInc": 0.1, "oxygen1": 2000, "oxygenInc": 0.1, "food1": 2600, "foodInc": 0.1, "weight1": 3000, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Mantis": { "health1": 275, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 220, "weightInc": 0.02, "damage1": 100, "damageInc": 0.025 },       "Morellatops": { "health1": 400, "healthInc": 0.2, "stamina1": 220, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 6000, "foodInc": 0.1, "weight1": 440, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Oil Jug Bug": { "health1": 75, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Poison Wyvern": { "health1": 1725, "healthInc": 0.15, "stamina1": 275, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Rock Elemental": { "health1": 25000, "healthInc": 0.0125, "stamina1": 300, "staminaInc": 0.1, "food1": 6000, "foodInc": 0.1, "weight1": 660, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Rock Elemental (Minion)": { "health1": 50000, "healthInc": 0.0125, "stamina1": 1000, "staminaInc": 0.1, "food1": 6000, "foodInc": 0.1, "weight1": 660, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Rubble Golem": { "health1": 4000, "healthInc": 0.0125, "stamina1": 300, "staminaInc": 0.1, "food1": 6000, "foodInc": 0.1, "weight1": 660, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Thorny Dragon": { "health1": 260, "healthInc": 0.2, "stamina1": 350, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 1200, "foodInc": 0.1, "weight1": 300, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Vulture": { "health1": 125, "healthInc": 0.2, "stamina1": 150, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 900, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Water Jug Bug": { "health1": 75, "healthInc": 0.2, "stamina1": 100, "staminaInc": 0.1, "oxygen1": 150, "oxygenInc": 0.1, "food1": 450, "foodInc": 0.1, "weight1": 50, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Zombie Fire Wyvern": { "health1": 1725, "healthInc": 0.15, "stamina1": 275, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Zombie Lightning Wyvern": { "health1": 1725, "healthInc": 0.15, "stamina1": 275, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 },       "Zombie Poison Wyvern": { "health1": 1725, "healthInc": 0.15, "stamina1": 275, "staminaInc": 0.05, "oxygen1": 150, "oxygenInc": 0.1, "food1": 2000, "foodInc": 0.1, "weight1": 400, "weightInc": 0.02, "damage1": 100, "damageInc": 0.05 }   }; // if a stat has x levelups, the stat is in the top percentiles[x] %. For 33 or more level, the probability is less than 0.01 % var percentiles = Array(100.00, 100.00, 100.00, 100.00, 99.99, 99.97, 99.89, 99.67, 99.17, 98.13, 96.23, 93.09, 88.39, 81.93, 73.78, 64.28, 53.98, 43.58, 33.76, 25.06, 17.81, 12.11, 7.88, 4.91, 2.92, 1.67, 0.91, 0.48, 0.24, 0.12, 0.05, 0.02, 0.01);

changeCreature(wildStatCalcDiv.innerHTML); }

function changeCreature(creature) { if (wildCreatureStats[creature] == null) creature = Object.keys(wildCreatureStats)[0];

stats = wildCreatureStats[creature]; var tableRows = ''; for (var id in wildStatCalcStats) { if (stats[id + '1']) { var unit = ''; if (id === 'damage') unit = ' [%]'; tableRows += ' ' + wildStatCalcStats[id] + unit + '     '; }   }    tableRows += '  Speed [%] 100   '; var creatureSelect = ''; for (var c in wildCreatureStats) { creatureSelect += '' + c + ' '; }   creatureSelect += ' '; wildStatCalcDiv.innerHTML = ' '; calcNatStats; }

function calcNatStats { // calculate according level if (stats) { var totallevel = 1; // 1 is first level var levels = []; var stat = 0; var levelEl = null; var percentile = ''; var determinedStatsNr = 0; for (var id in wildStatCalcStats) { if (stats[id + '1']) { stat = document.getElementById('wildStatCalc' + id + 'input').value; if (stats[id + '1'] && stats[id + 'Inc'] && stat >= stats[id + '1']) { var level = Math.round((stat - stats[id + '1']) / (stats[id + 'Inc'] * stats[id + '1'])); levels[id] = level; levelEl = document.getElementById('wildStatCalc' + id); levelEl.innerHTML = level; if (level > 32) percentile = 0.01; else percentile = percentiles[level]; levelEl.title = 'This level is in the top ' + percentile + '% compared to all wild level 120 creatures.'; totallevel += level; determinedStatsNr++; }           }        }        var levelInput = document.getElementById('wildStatCalcLevelInput').value; var speedPrefix = ''; if (determinedStatsNr < 6) speedPrefix = '~'; if (determinedStatsNr !== 7) document.getElementById('wildStatCalcSpeed').innerHTML = speedPrefix + Math.round((levelInput - totallevel) / (7 - determinedStatsNr)); var hue = 0; for (var id in wildStatCalcStats) { if (stats[id + '1']) { hue = 0; if (totallevel > 1) { hue = Math.round(120 * levels[id] / 28); }               if (hue > 120) hue = 120; document.getElementById('wildStatCalc' + id).parentElement.style.backgroundColor = 'hsl(' + hue + ', 100%, 85%)'; }       }    } }