Monster battle
coderbob (3)

This is a game I made where you fight a monster in a battle

You are viewing a single comment. View All
IreoluwaRaufu (1)

@coderbob Considering you're new, you've done pretty good. Here's some sample code for making the damage and heal amounts random:

import random
damageAmount = random.randint(8, 20)
healAmount = random.randint(10, 15)

-The randint() function will generate a random integer between two numbers you specify, including the lowest and highest numbers, so random.randint(10, 15) will really generate a random number between 10 and 15.

-This will allow you to make things a bit more interesting in the game, but remember to redefine the heal and damage amounts every round, or it'll be the same every time once it's defined.
Make of this what you will and have fun!