Open jamesdonkin opened 2 weeks ago
So then the games runs just the same but the monster logic is in it's own file.
For this to work you'll need to do other fixing up where the old monster variables are accessed. For example
def monster_attack():
Suggest changing this to:
def monster_attack(attacking_monster):
And pass in the monster doing the fighting to the method call. Then inside that block you can replace
monster_hp
monster_name
Global variables, with:
attacking_monster.health
attacking_monster.name
I would suggest making Monster it's own class, separate from Encounters, then use them in encounters.
theMonster = GiantRat()