import randomimport osimport time
def clearscreen(): os.system('CLS')
#Duck-O-Tron 3000
ducktales_good_guys = [ "Scrooge McDuck", "Huey Duck", "Dewey Duck", "Louie Duck", "Webby Vanderquack", "Launchpad McQuack", "Mrs. Beakley", "Gyro Gearloose", "Donald Duck", "Della Duck"]
possible_pilots = [ ["Launchpad McQuack", 1.25], # enthusiastic… but risky ["Scrooge McDuck", 0.85], # seasoned and strategic ["Della Duck", 0.90], # elite pilot ["Mrs. Beakley", 0.80], # highly trained ["Duckworth", 0.75] # extremely composed]
possible_pilots_backup = [ ["Launchpad McQuack", 1.25], # enthusiastic… but risky ["Scrooge McDuck", 0.85], # seasoned and strategic ["Della Duck", 0.90], # elite pilot ["Donald Duck", 1.10], # unpredictable ["Webby Vanderquack", 0.95], # surprisingly capable ["Mrs. Beakley", 0.80], # highly trained ["Gyro Gearloose", 1.05], # smart, not always practical ["Duckworth", 0.75], # extremely composed ["Fenton Crackshell-Cabrera (Gizmoduck)", 0.70], # superhero tier ["Huey Duck", 1.00] # by-the-book average]
survival_messages = [ "You survived a Launchpad landing! That’s basically a superpower.", "Congratulations! You walked away from a McQuack maneuver!", "Another crash conquered — you’re officially crash-certified!", "If you can survive Launchpad, you can survive anything!", "You stuck the landing… emotionally, at least!", "That wasn’t a crash — that was a dramatic arrival!", "You’ve earned your honorary co-pilot badge!", "Zero scratches? That’s Duck-level durability!", "You turned turbulence into triumph!", "Launchpad calls that a smooth landing!", "You bounced back better than the landing gear!", "Crash tested. Duck approved.", "That’s one more story for the adventure log!", "You handled that impact like a pro!", "Survived the splashdown — now that’s legendary!"]
failure_messages = [ "Well… that’s going to need more than duct tape.", "Mission status: spectacularly unsuccessful.", "The Duck-o-Tron has entered retirement… permanently.", "That landing is now classified as abstract art.", "We’ve officially invented the submarine edition.", "The warranty definitely doesn’t cover that.", "Structural integrity has left the chat.", "Next time, maybe aim for the runway.", "On the bright side, it made a very impressive crater!", "The engineers are pretending they didn’t see that.", "It didn’t stick the landing… it *became* the landing.", "Congratulations! You’ve discovered every weak point at once.", "That was less ‘takeoff’ and more ‘break-off.’", "The black box is requesting emotional support.", "Time to start building Duck-o-Tron 3001."]
dur_excellent = [ "Pristine performance! Not even a scratch!", "That ship could survive a meteor shower!", "Factory fresh and flight-ready!", "Built like a vault with wings!", "Engineers are taking notes on THIS build!", "That’s elite-level durability!", "It practically repaired itself mid-air!", "Launchpad couldn’t break this if he tried!", "Structural integrity: legendary status!", "That thing is indestructi-duck!"]
dur_high = [ "Strong build! Just a few cosmetic scuffs.", "Handled the chaos like a champ!", "That’ll buff out. Probably.", "Solid performance under pressure!", "Barely rattled after impact!", "That’s some dependable engineering!", "Still standing tall and proud!", "High durability achieved!", "A few dents, but nothing serious!", "Ready for another round!"]
dur_good = [ "Not bad! It held together!", "A little shaky, but still flying!", "Some dents add character!", "Functional and flight-worthy!", "It survived… mostly!", "Respectable durability!", "Held on when it counted!", "A solid mid-tier build!", "Could use improvements, but not grounded!", "Passed inspection (with notes)!"]
dur_med = [ "That was a close one!", "Held together with hope and optimism!", "Might need a wrench… or five.", "Survival: barely achieved.", "It’s still technically in one piece!", "Maintenance crew is on standby!", "You pushed it to its limits!", "Functional… for now.", "Let’s call that a ‘learning experience.’", "Next test might be risky!"]
dur_barely = [ "It survived by pure luck!", "One strong breeze and it’s over.", "Held together by duct tape dreams!", "That ship is asking for mercy!", "Structural integrity: questionable.", "It’s flying… somehow.", "Maintenance bill incoming!", "That was hanging on by a thread!", "Consider upgrading immediately!", "Technically operational… technically."]
dur_excellent_status = [ "FLYING COLORS", "ELITE PERFORMANCE", "TOP-TIER BUILD", "LEGENDARY STATUS", "PLATINUM GRADE"]
dur_high_status = [ "STRONG STRUCTURE", "HIGH DURABILITY", "SOLID PERFORMANCE", "ABOVE STANDARD", "GOLD RATING"]
dur_good_status = [ "STABLE BUILD", "MISSION READY", "PASSING GRADE", "SERVICEABLE", "GREEN LIGHT"]
dur_med_status = [ "NEEDS TUNING", "MODERATE WEAR", "CAUTION ADVISED", "YELLOW STATUS", "MONITOR CLOSELY"]
dur_barely_status = [ "CRITICAL CONDITION", "BARELY OPERATIONAL", "STRUCTURAL WARNING", "RED ALERT", "REPAIR REQUIRED"]
def duck_o_tron_welcome(): os.system("CLS" if os.name == "nt" else "clear")
print(f"===================================") print(f" 🦆 DUCK-O-TRON 3000 🦆 ") print(f"===================================") time.sleep(.5) print("Initializing quack systems...") time.sleep(.5) print("Calibrating bread sensors...") time.sleep(.5) print("Polishing duck feathers...") time.sleep(0.5) print("The Duck-o-tron 3000 is ONLINE.") print("Please proceed responsibly.\n") time.sleep(0.5) input("Press ENTER to Continue...")
def get_number_input(title, prompt, min_val, max_val): while True: # Clear The Screen clearscreen() # Print The Title Block for the Function print("-" * 50) print(title.center(50)) print("-" * 50)
charname = random.choice(ducktales_good_guys)
try: #Prompt the user to enter Specific Data value = int(input(prompt))
if not(min_val<=value<=max_val): raise ValueError("OUT_OF_RANGE") return value except ValueError as e: if str(e) == "OUT_OF_RANGE": print(f"🔥 Keep it between {min_val}–{max_val}!") else: print(f"💡 {charname}: 'That’s not a valid number!'")
input("Press ENTER to Continue...") #==================================================================================# END: get_number_input(title, prompt, min_val, max_val):#==================================================================================
def pick_pilot(): while True:
clearscreen() print(f"-"*50) print(f"P I L O T S E L E C T I O N".center(50)) print(f"-"*50)
mychar = random.choice(possible_pilots) maxnum = len(possible_pilots) try: print("\n🧑✈️ Available Pilots") print("-------------------") for i in range(len(possible_pilots)): print(f"{i + 1}. {possible_pilots[i][0]}")
choice = int(input(f"Select a pilot (1-{maxnum}): ")) return possible_pilots[choice - 1]
except ValueError: print(f"🚨 {mychar} says: 'Uh… I need a NUMBER!'") input("Press ENTER to Continue...") except IndexError: print(f"🚨 {mychar} says: 'That pilot doesn’t exist, pal!'") input("Press ENTER to Continue...")#==================================================================================# END: def pick_pilot():#==================================================================================
def calculate_damage(planeSpeed, min_damage=10, max_damage=25, crash_chance=2):
speed_factor = 1 + (planeSpeed-100) / 900 yncrash = random.randint(0, crash_chance) # You hit the jackpot and return ZERO Damage! if yncrash == 0: return 0 base_damage = random.randint(min_damage, max_damage) adjusted_damage = base_damage * speed_factor return round(adjusted_damage, 1) #==================================================================================# END: calculate_damage(min_damage=5, max_damage=20, crash_chance=2):#==================================================================================
def get_durability_percentage(start_dur, current_dur): return (current_dur / start_dur) * 100#==================================================================================# END: get_durability_percentage(start_dur, current_dur):#==================================================================================
def apply_damage(current_durability, damage, multiplier): current_durability -= damage * multiplier return max(current_durability, 0)#==================================================================================# END: apply_damage(current_durability, damage, multiplier):#==================================================================================
def display_crash_result(dur, start_dur, dam, tot_dam): print(f"Damage Done This Crash: {dam}") print(f"Total Damage Done: {tot_dam}") if dur > 0: dur_percent = get_durability_percentage(start_dur, dur) print(f"Remaining Durability: {dur_percent:.1f}% ({round(dur, 2)} of {start_dur})") print(random.choice(survival_messages)) return True else: print("Remaining Durability: 0") print(random.choice(failure_messages)) return False#==================================================================================# END: display_durability_result(dur, start_dur):#==================================================================================
def run_crash_tests(spd, pil, crashes, dur):
starting_dur = dur total_damage = 0 MIN_DAM = 10 MAX_DAM = 25 CRASH_CHANCE = 2 MULTIPLIER = pil[1]
clearscreen() print(f"-"*50) print(f"C R A S H T E S T S I M U L A T O R".center(50)) print(f"-"*50) print()
crashesSurvived = 0 pilotName = pil[0]
#Run through the crash tests for i in range(crashes): print(f"💥 Crash Test Number: {i+1}: ") #Calculate Damage damage = calculate_damage(spd, MIN_DAM, MAX_DAM, CRASH_CHANCE) total_damage += damage #Apply The Damage to the Current Durability dur = apply_damage(dur, damage, MULTIPLIER) #Display the Durability Result after Damage survived = display_crash_result(dur, starting_dur, damage, total_damage) if(survived): crashesSurvived += 1 else: break print() print("-"*45) print() time.sleep(2) input("Press ENTER To See The Final Report...") return dur, crashesSurvived#==================================================================================# END: run_crash_tests(spd, pil, crashes, dur):#==================================================================================
def print_final_report(pil, dur, numSurvived, startdur):
durPercent = get_durability_percentage(startdur, dur)
clearscreen() print(f"-"*50) print(f"-"*50) print(f"C R A S H T E S T R E P O R T".center(50)) print(f"-"*50) print(f"-"*50) print()
print(f"🔐 Final Crash Test Report") print(f"----------------------------------") print(f"Your Pilot was: {pil[0]}") print(f"Final Durability: {durPercent:.1f}%") if(80<=durPercent<=100): cond = random.choice(dur_excellent_status) myStat = random.choice(dur_excellent) elif(60<=durPercent<80): cond = random.choice(dur_high_status) myStat = random.choice(dur_high) elif(40<=durPercent<60): cond = random.choice(dur_good_status) myStat = random.choice(dur_good) elif(20<=durPercent<40): cond = random.choice(dur_med_status) myStat = random.choice(dur_med) else: cond = random.choice(dur_barely_status) myStat = random.choice(dur_barely) print(f"Crashes Survived: {numSurvived}") print(f"🎉 Status: {cond}") print(f"{myStat}")#==================================================================================# END: print_final_report(pil, dur, numSurvived, startdur):#==================================================================================
#GREETINGduck_o_tron_welcome()
#SPEEDmyspeed = get_number_input("S P E E D S E L E C T I O N", "Enter Flight Speed (100-1000 mph): ", 100, 1000)
#PILOT SELECTIONmypilot = pick_pilot()
#SET THE CRASHESmycrashes = get_number_input("C R A S H T E S T E N T R Y", "Enter number of crash tests (1–10): ", 1, 10)
#SET THE DURABILITYstarting_durability = get_number_input("D U R A B I L I T Y E N T R Y", "Enter Initial Aircraft Durability (1-100%): ", 1, 100)
print()
#RUN THE CRASH SIMULATORdurability, crashesSurvived = run_crash_tests(myspeed, mypilot, mycrashes, starting_durability)
#PRINT THE FINAL REPORTprint_final_report(mypilot, durability, crashesSurvived, starting_durability)
print()input("Press ENTER to Quit...")