Compare commits
	
		
			5 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c605bc5fa4 | |||
| b70f8d11f7 | |||
| 211ebe1084 | |||
| 0f14d2610b | |||
| 05f394c221 | 
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -84,7 +84,7 @@ profile_default/ | ||||
| ipython_config.py | ||||
|  | ||||
| # pyenv | ||||
| #   For a library or package, you might want to ignore these files since the code is | ||||
| #   For a library or package, {drone.name} might want to ignore these files since the code is | ||||
| #   intended to run in multiple environments; otherwise, check them in: | ||||
| # .python-version | ||||
|  | ||||
|   | ||||
| @@ -1,3 +1,3 @@ | ||||
| # stationbase | ||||
|  | ||||
| All your base are belong to you. | ||||
| All {drone.name}r base are belong to {drone.name}. | ||||
| @@ -17,11 +17,11 @@ | ||||
| * type in 'g' to send drones out | ||||
| * press 's to skip turn | ||||
| * press 'd' to view status of drone | ||||
| * drone sells items it finds automatically to other stations | ||||
| * drone goes out on a set number of turns of your choosing | ||||
| * drone sells items it findss automatically to other stations | ||||
| * drone goes out on a set number of turns of {drone.name}r choosing | ||||
| * drone can only take as many turns as it's level allows | ||||
| * the number of turns dictates the number of dice rolled, which increases reward chance | ||||
| * Bonus to chance of gaining cash perportionate to number of turns sent. Thus risk/reward. Higher chance of finding reward, more chances of losing the reward | ||||
| * Bonus to chance of gaining cash perportionate to number of turns sent. Thus risk/reward. Higher chance of findsing reward, more chances of losing the reward | ||||
|  | ||||
| ## Game events | ||||
|  | ||||
|   | ||||
							
								
								
									
										129
									
								
								stationbase.py
									
									
									
									
									
								
							
							
						
						
									
										129
									
								
								stationbase.py
									
									
									
									
									
								
							| @@ -5,90 +5,155 @@ import random | ||||
|  | ||||
| maxRoll = 1000 | ||||
| class Drone: | ||||
|     def __init__(self, money,name): | ||||
|     def __init__(self, money,name, health): | ||||
|         self.money = money | ||||
|         self.name = name | ||||
|         self.health = health | ||||
|  | ||||
|     def check_drone(): | ||||
|         print("DRONG STATUS") | ||||
|         print("-------------") | ||||
|         print(f"Name: {Drone.name}") | ||||
|         print(f"Credits: {Drone.money}") | ||||
|         print("Station: Ass") | ||||
|  | ||||
|  | ||||
| class Player: | ||||
|     def __init__(self, character, name, turns, credits): | ||||
|         self.character = character | ||||
|         self.name = name | ||||
|         self.turns = turns | ||||
|         self.credits = credits | ||||
|  | ||||
|      | ||||
|  | ||||
| drone = Drone | ||||
| drone.name = "Klive" | ||||
| drone.money = 0 | ||||
| player = Player | ||||
| player.name = "Jake" | ||||
| player.turns = 100 | ||||
| player.credits = 0 | ||||
|  | ||||
| items = { | ||||
|     "Dildo": 3, | ||||
|     "guitar": 10, | ||||
|     "shoe": 90, | ||||
|     "poop": 40 | ||||
| } | ||||
|  | ||||
| def credits_to_player(): | ||||
|      | ||||
|     if drone.money < 0: | ||||
|         print(f"{drone.name} has less than 0 credits ({drone.money})") | ||||
|     elif drone.money == 0: | ||||
|         print(f"{drone.name} has 0 credits") | ||||
|     else: | ||||
|         print(f"Moving {drone.money} credits to {player.name}") | ||||
|         player.credits += drone.money | ||||
|         drone.money = 0 | ||||
|  | ||||
|  | ||||
| def battle(drone): | ||||
|     enemy = 100 | ||||
|     drone.health = 100 | ||||
|  | ||||
|     print(f"{drone.name} attacks enemy for 20 damage") | ||||
|     enemy - 20 | ||||
|     print(f"Enemy health: {enemy}") | ||||
|      | ||||
|  | ||||
|  | ||||
| def scan_system(): | ||||
|     #temp code for testing | ||||
|     roll = random.randrange(1, maxRoll) | ||||
|     print(roll) | ||||
|  | ||||
|     if roll < 20: | ||||
|         print("Nothing of value was found...") | ||||
|         print(f"Nothing of value was found...") | ||||
|     elif roll > 20 and roll < 30: | ||||
|         print("You find a rock and get 3 credits") | ||||
|         print(f"{drone.name} finds a rock and get 3 credits") | ||||
|         drone.money = drone.money +3 | ||||
|     elif roll > 30 and roll < 50: | ||||
|         print("You find a gem and make 20 credits") | ||||
|         print(f"{drone.name} finds a gem and make 20 credits") | ||||
|         drone.money = drone.money +20 | ||||
|     elif roll > 50 and roll < 60: | ||||
|         print("You find nothing of value...") | ||||
|         print(f"{drone.name} finds nothing of value...") | ||||
|     elif roll > 60 and roll < 80: | ||||
|         print("You find a missle shell and make 100 credits!") | ||||
|         print(f"{drone.name} finds a missle shell and make 100 credits!") | ||||
|         drone.money = drone.money +100 | ||||
|     elif roll > 80 and roll < 90: | ||||
|         print("You find a shoe and make 32 credits!") | ||||
|         print(f"{drone.name} finds a shoe and make 32 credits!") | ||||
|     elif roll > 90 and roll < 99: | ||||
|         print("You find a pebble and make 15 credits") | ||||
|         print(f"{drone.name} finds a pebble and make 15 credits") | ||||
|         drone.money = drone.money +15 | ||||
|     elif roll == 100: | ||||
|         print("You find gold and make 200 credits") | ||||
|         print(f"{drone.name} finds gold and make 200 credits") | ||||
|         drone.money = drone.money +200 | ||||
|     elif roll >= 100 and roll < 300: | ||||
|         print("You find nothing") | ||||
|         print(f"{drone.name} finds nothing") | ||||
|     elif roll >= 300 and roll < 350: | ||||
|         print("You find nothing") | ||||
|         print(f"{drone.name} finds nothing") | ||||
|     elif roll >= 350 and roll < 400: | ||||
|         print("You find an apple and sell it for 5 credits") | ||||
|         print(f"{drone.name} finds an apple and sell it for 5 credits") | ||||
|         drone.money = drone.money +5 | ||||
|     elif roll >= 400 and roll < 420: | ||||
|         print("You find a guitar and sell it for 1.2k credits") | ||||
|         print(f"{drone.name} finds a guitar and sell it for 1.2k credits") | ||||
|         drone.money = drone.money +1200 | ||||
|     elif roll >= 420 and roll < 500: | ||||
|         print("You find a miniture dildo and sell it for 1 credits") | ||||
|         print(f"{drone.name} finds a miniture dildo and sell it for 1 credits") | ||||
|         drone.money = drone.money +1 | ||||
|     elif roll >= 500 and roll < 505: | ||||
|         print("You find a crashed ship and sell it's scrap for 300k credits") | ||||
|         print(f"{drone.name} finds a crashed ship and sell it's scrap for 300k credits") | ||||
|         drone.money = drone.money +300000 | ||||
|     elif roll >= 505 and roll < 600: | ||||
|         print("You find nothing") | ||||
|         print(f"{drone.name} finds nothing") | ||||
|     elif roll >= 600 and roll < 700: | ||||
|         print("You are attacked by a pirate and lose 100 credits") | ||||
|         drone.money = drone.money -100 | ||||
|         if drone.money <= 0: | ||||
|             print(f"{drone.name} was attack by pirates but there was nothing for them to steal.") | ||||
|         else: | ||||
|             print(f"{drone.name} are attacked by a pirate and lose 100 credits") | ||||
|             drone.money = drone.money -100 | ||||
|             if drone.money < 0: | ||||
|                 drone.money = 0 | ||||
|     elif roll >= 700 and roll < 702: | ||||
|         print("You find a slave and sell it for 500000") | ||||
|         print(f"{drone.name} finds a slave and sell it for 500000") | ||||
|         drone.money = drone.money +500000 | ||||
|     elif roll >= 702 and roll < 800: | ||||
|         print("You find nothing") | ||||
|         print(f"{drone.name} finds nothing") | ||||
|     elif roll >= 800 and roll < 900: | ||||
|         print("You find nothing") | ||||
|         print(f"{drone.name} finds nothing") | ||||
|     elif roll >= 900 and roll < 950: | ||||
|         print("You find 100 credits") | ||||
|         print(f"{drone.name} finds 100 credits") | ||||
|         drone.money = drone.money +100 | ||||
|     elif roll >= 950 and roll <=1000: | ||||
|         print("You lose 300 credits") | ||||
|         drone.money = drone.money -300 | ||||
|         if drone.money <= 0: | ||||
|             print("There was nothing to lose") | ||||
|         else: | ||||
|             print(f"{drone.name} lose 300 credits") | ||||
|             drone.money = drone.money -300 | ||||
|             if drone.money < 0: | ||||
|                 drone.money = 0 | ||||
|  | ||||
|  | ||||
| def mainMenu(): | ||||
| def help(): | ||||
|     print("c) Check Drone") | ||||
|     print("ss} Scan System") | ||||
|     print("s} Scan System") | ||||
|     print("t) Transfer credits from drone") | ||||
|  | ||||
| while True: | ||||
|     mainMenu() | ||||
|     repl = input(f"Cedits: {drone.money} >> ") | ||||
|  | ||||
|     repl = input(f"{player.name} | Turns: {player.turns} | Cedits: {player.credits} >> ") | ||||
|     if repl == "c": | ||||
|         drone.check_drone() | ||||
|     elif repl == "ss": | ||||
|         scan_system() | ||||
|     elif repl == "s": | ||||
|         if player.turns > 0: | ||||
|             player.turns = player.turns -1 | ||||
|             scan_system() | ||||
|         else: | ||||
|             print("{drone.name} are out of turns") | ||||
|     elif repl == "t": | ||||
|         credits_to_player() | ||||
|     elif repl == "h" or repl == "help": | ||||
|         help() | ||||
|     elif repl == "q": | ||||
|         quit() | ||||
|     else: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user