const express = require("express") const app = express() const port = 7860 const path = require("path") app.use(express.static("public")) app.use(express.urlencoded({ extended: true })) app.use(express.json()) const fruits = [ ["Carrot", 0.275, 20, 100], ["Strawberry", 0.3, 15, 100], ["Blueberry", 0.2, 20, 100], ["Orange Tulip", 0.05, 850, 55], ["Tomato", 0.5, 30, 100], ["Corn", 2, 40, 100], ["Daffodil", 0.2, 1000, 45], ["Watermelon", 7, 3000, 70], ["Pumpkin", 8, 3400, 80], ["Apple", 3, 275, 50], ["Bamboo", 4, 4000, 35], ["Coconut", 14, 400, 70], ["Cactus", 7, 3400, 100], ["Dragon Fruit", 12, 4750, 100], ["Mango", 15, 6500, 200], ["Grape", 3, 7850, 200], ["Mushroom", 25, 151000, 220], ["Pepper", 5, 8000, 200], ["Cacao", 8, 12000, 250], ["Beanstalk", 10, 28000, 300], ["Ember Lily", 12, 66666, 450], ["Sugar Apple", 9, 48000, 200], ["Burning Bud", 12, 65000, 500], ["Cauliflower", 5, 50, 150], ["Rafflesia", 8, 3500, 80], ["Green Apple", 3, 300, 200], ["Avocado", 6.5, 350, 300], ["Banana", 1.5, 2000, 100], ["Pineapple", 3, 2000, 70], ["Kiwi", 5, 2750, 300], ["Bell Pepper", 8, 5500, 325], ["Prickly Pear", 7, 7000, 375], ["Loquat", 6.5, 8000, 200], ["Pitcher Plant", 12, 32000, 275], ["Feijoa", 10, 13000, 400], ["Wild Carrot", 1.3, 25000, 100], ["Pear", 3, 20000, 120], ["Cantaloupe", 5.5, 34000, 250], ["Parasol Flower", 6, 200000, 350], ["Rosy Delight", 10, 69000, 450], ["Elephant Ears", 18, 77000, 500], ["Delphinium", 0.3, 24000, 100], ["Lily of the Valley", 6, 49120, 400], ["Traveler's Fruit", 15, 59000, 500], ["Peace Lily", 0.6, 24000, 100], ["Aloe Vera", 5.5, 69000, 350], ["Guanabana", 4, 72500, 400], ["Chocolate Carrot", 0.275, 11000, 100], ["Red Lollipop", 4, 50000, 65], ["Blue Lollipop", 1, 50000, 65], ["Candy Sunflower", 1.5, 80000, 85], ["Easter Egg", 3, 2500, 20], ["Candy Blossom", 3, 100000, 40], ["Peach", 2, 300, 70], ["Raspberry", 0.75, 100, 70], ["Papaya", 3, 1000, 60], ["Banana", 1.5, 1750, 100], ["Passionfruit", 3, 3550, 40], ["Soul Fruit", 25, 7750, 200], ["Cursed Fruit", 30, 25750, 200], ["Mega Mushroom", 70, 500, 2000000], ["Cherry Blossom", 3, 500, 400], ["Purple Cabbage", 5, 500, 70], ["Lemon", 1, 350, 50], ["Pink Tulip", 0.05, 850, 55], ["Cranberry", 1, 3500, 50], ["Durian", 8, 7500, 200], ["Eggplant", 5, 12000, 220], ["Lotus", 20, 35000, 650], ["Venus Fly Trap", 10, 85000, 650], ["Nightshade", 0.5, 3500, 100], ["Glowshroom", 0.75, 300, 100], ["Mint", 1, 5250, 150], ["Moonflower", 2, 9500, 200], ["Starfruit", 3, 15000, 250], ["Moonglow", 7, 25000, 400], ["Moon Blossom", 3, 66666, 400], ["Crimson Vine", 1, 1250, 100], ["Moon Melon", 8, 18000, 300], ["Blood Banana", 1.5, 6000, 200], ["Celestiberry", 2, 10000, 200], ["Moon Mango", 15, 50000, 300], ["Rose", 1, 5000, 100], ["Foxglove", 2, 20000, 250], ["Lilac", 3, 35000, 250], ["Pink Lily", 6, 65000, 400], ["Purple Dahlia", 12, 75000, 400], ["Sunflower", 16.5, 160000, 600], ["Lavender", 0.275, 25000, 90], ["Nectarshade", 0.8, 50000, 100], ["Nectarine", 3, 48000, 200], ["Hive Fruit", 8, 62000, 300], ["Manuka Flower", 0.3, 25000, 200], ["Dandelion", 4, 50000, 300], ["Lumira", 6, 85000, 350], ["Honeysuckle", 12, 100000, 400], ["Crocus", 0.275, 30000, 150], ["Succulent", 5, 25000, 175], ["Violet Corn", 3, 50000, 250], ["Bendboo", 18, 155000, 275], ["Cocovine", 14, 66666, 275], ["Dragon Pepper", 6, 88888, 300], ["Bee Balm", 1, 18000, 200], ["Nectar Thorn", 7, 44444, 350], ["Suncoil", 10, 80000, 400], ["Noble Flower", 5, 20000, 250], ["Ice Cream Bean", 4, 4500, 200], ["Lime", 1, 1000, 125], ["White Mulberry", 3, 3000, 200] ] const mutationMultiplier = { Dawnbound: 150, Voidtouched: 135, Disco: 125, Meteoric: 125, Galactic: 120, Celestial: 120, Shocked: 100, Alienlike: 100, Paradisal: 100, Aurora: 90, Sundried: 85, Molten: 25, Zombified: 25, Frozen: 10, Cooked: 10, Fried: 8, Plasma: 5, Heavenly: 5, HoneyGlazed: 5, Twisted: 5, Cloudtouched: 5, Drenched: 5, Burnt: 4, Bloodlit: 4, Wiltproof: 4, Verdant: 4, Pollinated: 3, Windstruck: 2, Wet: 2, Chilled: 2, Choc: 2, Moonlit: 2, } const rarityMultiplier = { Normal: 1, Gold: 20, Rainbow: 50 } function clamp(v, min, max) { return Math.min(Math.max(v, min), max) } function format(n) { return n.toLocaleString("en-US") + "¢" } function calcValue(name, weight, rarity = "Normal", mutations = []) { const item = fruits.find(f => f[0] === name) if (!item) return "0¢" let mutationMult = 1 for (const m of mutations) { mutationMult += (mutationMultiplier[m] || 1) - 1 } mutationMult = Math.max(1, mutationMult) const clamped = clamp(weight / item[1], 0.95, 1e8) const mult = (rarityMultiplier[rarity] || 1) * mutationMult const value = Math.round(item[2] * mult * (clamped * clamped) + 1) return format(value) } app.get("/", (req, res) => { const fruitOptions = fruits.map(f => f[0]).sort().map(name => ``).join("") const mutationOptions = Object.keys(mutationMultiplier).map(m => ``).join("") const rarityOptions = ["Normal", "Gold", "Rainbow"].map(r => ``).join("") res.send(`