import random
import time
eggs = {
“Mythic”: [“astraljyth”, “pandora”, “a.l.y.c.e”],
“Legendary”: [“cyclophia”, “doomgoo”, “moku”],
“Super Epic”: [“scarleguard”, “a.s myst”, “subzeropunch king”],
“Epic”: [“supershell”, “vanillawhelp”]
}
drop_rate_tables = {
“regular”: {
“Mythic”: 0.0750,
“Legendary”: 3.0,
“Super Epic”: 6.25,
“Epic”: 90.0
},
“super_rare”: {
“Mythic”: 1.0,
“Legendary”: 4.0,
“Super Epic”: 15.0,
“Epic”: 70.0
}
}
player_currency = {
“gems”: 0,
“super_rare_gems”: 0
}
egg_cost_regular = 4
egg_cost_super_rare = 5
pull_counter = 0
PITY_THRESHOLD = 30
hatched_creatures =
ascii_art = {
# Mythic
“astraljyth”: “”"
~~~~~~~
/ ^ \
/ (o o) \
( ^ )
\ \/ /
~~~
(Sea Dragon)
“”“,
“pandora”: “””
_______
/ \
| [ ] [] |
| \/ |
| Girl |
\_______/
(Girl in a box)
“”“,
“a.l.y.c.e”: “””
[==|====]
| o o |
| - |
/|_____|\
(Cyborg Girl)
“”",
# Legendary
"cyclophia": """
.----.
/ O \\
| | |
\\ | /
'--'
(Cyclops Girl)
""",
"doomgoo": """
.---.
( @ ) ~~
( --- ) /
\\ | /
`---`
(Goo Dragon w/ Scythe)
""",
"moku": """
(\\_._/)
( o o )
==\\o/==
(Derpy Mouse)
""",
# Super Epic
"scarleguard": """
/ \\ / \\
/ Fire \\
| Dragon |
\\ Knight /
`-----`
""",
"a.s myst": """
|\\ /|
( o o )
\\ -- /
/|__|\\
(Abyss Soldier)
""",
"subzeropunch king": """
.----.
/ \\
| Ice |
| Golem |
\\______/
""",
# Epic
"supershell": """
____
/ \\
| Plant |
| Shell |
\\______/
""",
"vanillawhelp": """
.-""-.
/ .--. \\
| (o o) |
\\ '--' /
`----`
(Baby White Dragon)
"""
}
def show_creature_art(name):
art = ascii_art.get(name.lower())
if art:
print(art)
else:
print(f"(No art available for {name})")
def top_up():
print(“\n💎 Top-Up Menu”)
print(f"Regular Gems: {player_currency[‘gems’]}")
print(“1. Add Regular Gems”)
print(“2. Back to Main Menu”)
choice = input("Choose an option: ")
if choice == "1":
amount = input("Enter number of Regular Gems to add: ")
if amount.isdigit() and int(amount) > 0:
player_currency["gems"] += int(amount)
print(f"Added {amount} Regular Gems.")
else:
print("Invalid amount.")
elif choice == "2":
return
else:
print("Invalid option.")
def pick_egg(rate_table, force_mythic=False):
global pull_counter
if force_mythic:
pull_counter = 0
return “Mythic”, random.choice(eggs[“Mythic”])
roll = random.uniform(0, 100)
cumulative = 0
for rarity in [“Mythic”, “Legendary”, “Super Epic”]:
cumulative += rate_table[rarity]
if roll < cumulative:
if rarity == “Mythic”:
pull_counter = 0
else:
pull_counter += 1
return rarity, random.choice(eggs[rarity])
pull_counter += 1
return “Epic”, random.choice(eggs[“Epic”])
def hatch_egg(rate_type=“regular”, silent=False):
global pull_counter
if rate_type == “regular”:
currency_key = “gems”
cost = egg_cost_regular
else:
currency_key = “super_rare_gems”
cost = egg_cost_super_rare
if player_currency[currency_key] < cost:
if not silent:
print(f"❌ Not enough {'Regular Gems' if rate_type == 'regular' else 'Super Rare Gems'}.")
return None
player_currency[currency_key] -= cost
if not silent:
print(f"💸 Used {cost} {'Regular Gems' if rate_type == 'regular' else 'Super Rare Gems'}.")
print(f"{currency_key.replace('_', ' ').title()} left: {player_currency[currency_key]}")
time.sleep(0.05)
force_mythic = pull_counter >= PITY_THRESHOLD
rate_table = drop_rate_tables[rate_type]
rarity, creature = pick_egg(rate_table, force_mythic=force_mythic)
if rarity and creature:
hatched_creatures.append((rarity, creature))
if not silent:
print(f"🎉 Hatched a {rarity} creature: {creature}!")
show_creature_art(creature)
return rarity, creature
def hatch_batch_of_10(rate_type):
results =
print(“\n— Hatching 10 Eggs —”)
for i in range(10):
print(f"\n🥚 Hatching Egg #{i+1}“)
result = hatch_egg(rate_type=rate_type, silent=True)
if result:
rarity, creature = result
print(f" {rarity}: {creature}”)
show_creature_art(creature)
results.append((rarity, creature))
else:
print(“ Not enough gems.”)
break
if results:
print("\n📦 Summary of Hatch Results:")
tally = {key: 0 for key in eggs}
for rarity, _ in results:
tally[rarity] += 1
for rarity in ["Mythic", "Legendary", "Super Epic", "Epic"]:
print(f"{rarity}: {tally[rarity]}")
if rate_type == "regular":
player_currency["super_rare_gems"] += 1
print("\n🎉 You earned 1 Super Rare Gem for hatching 10 Regular Eggs!")
print(f"Total Super Rare Gems: {player_currency['super_rare_gems']}")
else:
print("\nNo eggs were hatched.")
def regular_hatch_loop():
while True:
if player_currency[“gems”] < 10 * egg_cost_regular:
print(“ Not enough Regular Gems to hatch 10 eggs.”)
break
hatch_batch_of_10("regular")
again = input("\n🔁 Hatch another 10 using Regular Gems? (y/n): ").lower()
if again != "y":
break
def super_rare_hatch_loop():
while True:
if player_currency[“super_rare_gems”] < egg_cost_super_rare:
print(f" Not enough Super Rare Gems to hatch.")
break
print("\n🥚 Hatching a Super Rare Egg")
hatch_egg(rate_type="super_rare")
again = input("\n🔁 Hatch another Super Rare Egg? (y/n): ").lower()
if again != "y":
break
def show_hatched():
if not hatched_creatures:
print(“\nNo creatures hatched yet.”)
return
print(“\n📜 All Hatched Creatures:”)
tally = {}
for rarity, creature in hatched_creatures:
tally.setdefault(rarity, ).append(creature)
for rarity in ["Mythic", "Legendary", "Super Epic", "Epic"]:
if rarity in tally:
print(f"\n{rarity} ({len(tally[rarity])}):")
for c in tally[rarity]:
print(f" - {c}")
def show_menu():
while True:
print(“\n📋 Main Menu”)
print(“1. Top-up Regular Gems”)
print(“2. Regular Hatch (uses Regular Gems, x10)”)
print(“3. Super Rare Gem Hatch (uses Super Rare Gems, single hatch costing 5 gems)”)
print(“4. Show Currencies & Pull Counter”)
print(“5. Show All Hatched Creatures”)
print(“6. Exit”)
choice = input("Choose an option: ")
if choice == "1":
top_up()
elif choice == "2":
regular_hatch_loop()
elif choice == "3":
super_rare_hatch_loop()
elif choice == "4":
print(f"Regular Gems: {player_currency['gems']} | Super Rare Gems: {player_currency['super_rare_gems']} | Pulls since last Mythic: {pull_counter}")
elif choice == "5":
show_hatched()
elif choice == "6":
print("Goodbye!")
break
else:
print("Invalid option.")
if name == “main”:
print(“ Welcome to the Neo Monsters Egg Hatcher!”)
show_menu()