import random import time shipchoice=input("Fenix (medium hull strength and fairly high manoeuvrability), Bahnshea (heavy dreadnought with heavy weapons) or Cyran (fast and highly maneouvrable light ship)") #to choose your initial ship setup if shipchoice=="test": #not exactly necessary print("") print(shipchoice) exit() elif shipchoice=="Fenix": thrust=4 oil_cans=100 wdamage=5 waccuracy=60 shield=35 elif shipchoice=="Bahnshea": thrust=2 oil_cans=200 wdamage=8 waccuracy=60 shield=50 elif shipchoice=="Cyran": thrust=7 wdamage=3 oil_cans=75 waccuracy=75 shield=20 else: print("Sorry, this is an error message. I haven't coded it to understand anything other than exactly the choices shown, please try again, maybe capitalise it next time") sleep(10) exit() #doesn't work perfectly but it's an error message anyway status="standard" #will sort something out with that later print("") print("thruster power:"+str(thrust)) print("oil cans:"+str(oil_cans)) print("weapon damage:"+str(wdamage)) print("weapon accuracy:"+str(waccuracy)) print("Hull strength:"+str(shield)) #shows starter stats print("You are the captain of the ((input the ship name here, the bloody python editor can't handle me inputting it in the middle)) and you have been travelling for several weeks. Fuel supplies are still nominal and so is food, but you lost all of your cargo in a battle with raiders. You have finished patching up your hull and the crew is ready to set sail. As you give the orders, you hear a muffled cheer from the hardened pirate, bandits and scavengers that make up your team. After about an hour of searching, you hear a call from your lookout, there was a small pirate craft nearby. You smile grimly and send out the battle stations order.") #introduction status="battle" enemy="l1P" if enemy=="l1p": #level one pirate ethrust=1 ewdamage=1 ewaccuracy=25 eshield=10 if enemy=="l2p": #level two pirate ethrust=2 ewdamage=3 ewaccuracy=45 eshield=15 if enemy=="l3p": #level three pirate ethrust=3 ewdamage=3 ewaccuracy=65 eshield=17 if enemy=="l4p": #level four pirate ethrust=3 ewdamage=5 ewaccuracy=70 eshield=18 if enemy=="l5p": #level five pirate ethrust=4 ewdamage=4 ewaccuracy=85 eshield=20 if enemy=="l1b": #level one bandit ethrust=2 ewdamage=2 ewaccuracy=50 eshield=20 if enemy=="l2b": #level two bandit ethrust=2 ewdamage=4 ewaccuracy=55 eshield=22 if enemy=="l3b": #level three bandit ethrust=3 ewdamage=4 ewaccuracy=75 eshield=23 if enemy=="l4b": #level four bandit ethrust=3 ewdamage=5 ewaccuracy=65 eshield=23 if enemy=="l5b": #level five bandit ethrust=4 ewdamage=7 ewaccuracy=75 eshield=25 if enemy=="l1d": #level one destroyer ethrust=5 ewdamage=8 ewaccuracy=75 eshield=27 if enemy=="l2d": #level two destroyer ethrust=6 ewdamage=9 ewaccuracy=75 eshield=30 if enemy=="l3d": #level three destroyer ethrust=7 ewdamage=10 ewaccuracy=75 eshield=32 if enemy=="l4d": #level four destroyer ethrust=9 ewdamage=11 ewaccuracy=85 eshield=35 if enemy=="l5d": #level five destroyer ethrust=10 ewdamage=15 ewaccuracy=95 eshield=40
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question