im trying to makea discord bot that subtracts a number from a set value. and edit the message as so.
p1hp = 20
p2hp = 17
p3hp = 16
pphp = str(input("Who is getting hit ?"))
dmg = int(input("How much damage did you take?"))
if pphp == 'p1':
everyplayerhealth = p1hp
elif pphp == 'p2':
everyplayerhealth = p2hp
elif pphp == 'p3':
everyplayerhealth = p3hp
dmgtakenPhp = (everyplayerhealth) - (dmg)
if dmgtakenPhp == 0:
print("You are dead!")
else:
print("You were at",everyplayerhealth,"Health, you took",dmg,"Damage, you now have",dmgtakenPhp,"Health")
i want to use the code i made with a discord bot that edits a discord message so i can make health system for a dnd im making..
i tried learning how to make one but its all confusing to me
New contributor
Adam Liskey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.