Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to write a code that tells Python that

"if boss health is 0, leave the dungeon and choose another boss"

https://imgur.com/a/nIBhz40

This is the picture in that link. I want to tell Python that if boss health drops down to 0%, leave the dungeon, if boss health is greater than 0%, kill it.

What I have tried:

I have tried making it like this

Boss_HP = 100
if Boss_HP == 0
#Leave the dungeon
else:
#Kill the boss and leave the dungeon when it drops to 0% HP
Posted
Updated 30-Aug-18 4:59am
Comments
Richard MacCutchan 30-Aug-18 12:54pm    
Yes, just add in the code for the two conditions. BTW your link comes back to this page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900