Untitled
unknown
plain_text
a year ago
3.5 kB
13
Indexable
import random
class Character:
def __init__ (self, name, hp, attack_power, attack_names, attack_multipliers):
self.name = name
self.hp = hp
self.attack_power = attack_power
self.attack_names = attack_names
self.attack_multipliers = attack_multipliers
def attack(self,other, attack_name):
multiplier = self.attack_multipliers[self.attack_names.index(attack_name)]
damage = random.randint(1,self.attack_power) * multiplier
other.hp -= damage
return damage, attack_name
def game():
player = Character(
name="drake",
hp=100,
attack_power=20,
attack_names=["grope","text minors"],
attack_multiplier=[1,1.5]
)
enemy= Character(
name= "Kendrick",
hp=100,
attack_power=20,
attack_names=["ovho","prolly a minorrrrrr"],
attack_multiplier=[1,2]
)
print("hey welcome to the diddy community!")
print(f"you are the world renowned popstar {player.name} with {player.hp} and you have a dark secretttt")
print(f"uh oh, your rival, {enemy.name} exposes you for being a pedophile and having a secret family! he has {enemy.hp}, good luck defeating him as he drops tond of dis tracks on you!")
while player.hp > 0 and enemy.hp > 0:
action = input("uh oh! kdot dropped another diss track do you want to [m]olest and rap? or [c]ry and run?").strip().lower()
if action == 'm':
print (f"ok now what do you want to do? [1] {player.attack_names[0]} or u can also call millie bobby brown and [2] {player.attack_names}[1]")
attack_choice = input("enter 1 or 2").strip()
if attack_choice == '1':
attack_name = player.attack_names[0]
elif attack_choice == '2':
attack_name = player.attack_names[1]
else:
print ("r u dumb or are you dumb the media is flaming u now")
continue
damage, attack_name = player.attack(enemy, attack_name)
print(f"you used {attack_name} and touch {enemy.name}'s toes and he gets {damage} damage")
if enemy.hp > 0:
print(f"bro hes not a minor it didnt affect him enough and now hes still got {enemy.hp} hp left")
else:
print(f"{enemy.name} couldnt take your diddy drake energy, he has to go to therapy now")
break
attack_name = random.choice(enemy.attack_names)
damage, attack_name = enemy.attack(player, attack_name)
print(f"{enemy.name} used {attack_name} and the media destroys {damage} % of your legacy")
if player.hp > 0:
print(f'you still have {player.hp}% of your legacy left')
else:
print("the police raided your home, you have been exposed for a secret child, the imstagram leak, you possibly killed someone, and the whole media is siding with your rival, kenrick. your career is over.")
break
elif action == 'c':
print("you started crying like a lil pedophile")
break
else:
print("theres two options are you dumb like this is why kendricks coming after u. pls choose 'm' to molest or 'c' to cry and run.")
print("your career is gone bro.great job drake.")
if __name__ == "__main__":
game()
Editor is loading...
Leave a Comment