Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #The translation is no perfect
- from os import system
- from random import randint
- from time import sleep
- def settings():
- system("cls")
- print("""
- Settings
- ***************
- 1.White theme
- 2.Black theme
- 3.Return to main menu
- """)
- se3 = int(input("Select: "))
- if se3==1:
- system("color f0")
- main_menu()
- elif se3==2:
- system("color 0f")
- main_menu()
- elif se3==3:
- main_menu()
- def play_normal():
- enemy_life = randint(97, 100)
- life = 100
- while True:
- system("cls")
- print(f"""
- Your enemy have {enemy_life} of life
- You have {life} of life
- ******************************
- You can attack with:
- 1.Pistol (Quit 30% of life)
- 2.Random Damage (It can be between 1 to 70 of life)
- """)
- se2 = int(input("Select: "))
- if se2==1:
- enemy_life = enemy_life - 30
- system("cls")
- danger = randint(30, 61)
- temp_var_danger = danger
- life = life - danger
- elif se2==2:
- enemy_random_danger = randint(1, 71)
- enemy_life = enemy_life - enemy_random_danger
- system("cls")
- danger = randint(30, 61)
- temp_var_danger = danger
- life = life - danger
- else:
- main_menu()
- if enemy_life < 0:
- system("cls")
- print("You win")
- system("pause")
- life = life + temp_var_danger
- print(f"""
- RESULT
- ************************
- You have {life} of life
- """)
- sleep(5)
- se3 = input("Want to play again? (y / n)?: ")
- if se3=="y":
- play_normal()
- elif se3=="n":
- main_menu()
- elif life < 0:
- print("You lost")
- system("pause")
- system("cls")
- main_menu()
- def play_easy():
- enemy_life = randint(93, 99)
- life = 100
- while True:
- system("cls")
- print(f"""
- Your enemy have {enemy_life} of life
- You have {life} of life
- ******************************
- You can atack with:
- 1.Pistol (Quit 30% of life)
- 2.AK-47 (Quit 50% o life)
- 3.Random danger (It can be between 45 to 90)
- """)
- se2 = int(input("Select?: "))
- if se2==1:
- enemy_life = enemy_life - 30
- system("cls")
- danger = randint(30, 61)
- temp_var_danger = danger
- life = life - danger
- elif se2==3:
- enemy_random_danger = randint(45, 90)
- enemy_life = enemy_life - enemy_random_danger
- system("cls")
- danger = randint(30, 61)
- temp_var_danger = danger
- life = life - danger
- elif se2==2:
- enemy_life = enemy_life - 50
- system("cls")
- danger = randint(30, 61)
- temp_var_danger = danger
- life = life - danger
- else:
- main_menu()
- if enemy_life < 0:
- system("cls")
- print("You win")
- system("pause")
- life = life + temp_var_danger
- print(f"""
- RESULT
- ************************
- You have {life} of life
- """)
- sleep(5)
- se3 = input("Want to play again (y / n)?: ")
- if se3=="y":
- play_easy()
- elif se3=="n":
- main_menu()
- elif life < 0:
- system("cls")
- print("You lost")
- system("pause")
- main_menu()
- def play_hard():
- enemy_life = randint(97, 100)
- life = 100
- while True:
- system("cls")
- print(f"""
- Your enemy have {enemy_life} of life
- You have {life} of life
- ******************************
- You can attack with:
- 1.Pistol (Quit 30% of life)
- 2.Random Damage (It can be between 1 to 50 of life)
- """)
- se2 = int(input("Select: "))
- if se2==1:
- enemy_life = enemy_life - 30
- system("cls")
- danger = randint(30, 61)
- temp_var_danger = danger
- life = life - danger
- elif se2==2:
- enemy_random_danger = randint(1, 51)
- enemy_life = enemy_life - enemy_random_danger
- system("cls")
- danger = randint(30, 61)
- temp_var_danger = danger
- life = life - danger
- else:
- main_menu()
- if enemy_life < 0:
- system("cls")
- print("You win")
- system("pause")
- life = life + temp_var_danger
- print(f"""
- RESULT
- ************************
- You have {life} o life
- """)
- sleep(5)
- se3 = input("Want to play again (y / n)?: ")
- if se3=="y":
- play_hard()
- elif se3=="n":
- main_menu()
- elif life < 0:
- system("cls")
- print("You lost")
- system("pause")
- main_menu()
- def main_menu():
- system("cls")
- system("title Contra Machine EN")
- print("""
- Contra Machine 1.0 Translated to English
- ******************************************
- 1.Play Normal Mode
- 2.Play Easy Mode
- 3.Play Hard Mode
- 4.Settings
- 5.Exit
- """)
- se1 = int(input("Select: "))
- if se1==1:
- play_normal()
- elif se1==2:
- play_easy()
- elif se1==3:
- play_hard()
- elif se1==4:
- settings()
- elif se1==5:
- exit()
- def dev_notes():
- print("""
- Don't press any key
- And wait 5 seconds
- If you find any bug write to
- leor80792@gmail.com
- Please if you send a mail to me please write in spanish
- """)
- sleep(5)
- system("cls")
- main_menu()
- dev_notes()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement