This is my first repl. It is a battle like simulator where you can choose to battle someone (Anyone really). Hope you enjoy!
(Sry people who liked the hacks they have been removed my computer couldn't load so fast)
A great project, but you should make a list that players should choose from, because one character beat another player using his spit, while the player that died had a nuke machine gun.
This is a great game as a first project! I hope you continue making projects like this.
- Show weapons when choosing a weapon
- Use import os and os.sytem(“clear”) to clear the console when you want to.
I see how this works. The gameplay is good enough, however I think i found an error in your code.
When one of the players has negative or 0 health, the other player still has a chance to retaliate. I kinda feel that's unrealistic because if you're dead, you're dead.
Other than that it was a good program.
If you type .lower() after your variables it will strip all capitals before the if statement reads them. This way you don't have to use the "or" statement as often. For example:
option = input("Are you bored?")
if option.lower() == "yes":
But I think this is amazing... Amazing job!!!
I do have a little bit of advice - it's a bit strange for the game loop to restart without clearing.
Try adding this to your code:
from os import system def clear(): system('clear')
Alternatively, you could do this:
from replit import clear
Both will allow you to use
clear() to clear all text from the console.