MicroHero — a simple text-based roguelite

So, this is kinda scary but here goes. I’ve just completed the bulk of my fisrt portfolio project for CS101. For my project, I decided to create a simple text-based roguelite where you embark on an endless journey in search of loot and adventure. Now, there are a few things to be said first.

  1. There are still some bugs to be squashed.
  2. The content is VERY barebones, and I plan on adding new enemies, abilities and encounters. I was just too eager to share and to continue learning, so you can probably consider this an open beta or something. :blush:
  3. The code is… messy. Halfway through the project I realised that I probably bit off more than I could chew and had to downscale the whole idea (it was a bit more ambitious). But even after that there was too much stuff for me to do things with any elegance. So, there’s that.

Now, for the things that I’m most interested in.

  1. In many instances the game will crash if you press ‘Enter’ without entering any symbols. Is there a surefire way to avoid this?
  2. How would you approach managing buffs, debuffs and ability effects? I did it by assigning some attributes to the items and abilities themselves. Then, I do two checks every turn and every encounter (there are two types of cooldowns): one where i go through abilities, review their cooldowns and tick them down as necessary, then remove the effects by using values logged inside those abilities, and another where i thumb through a special list that is an attribute of the Character class and contains all the potion effects; there, i basically do the same thing, I do with abilities. The extra step with the list was needed because, unlike abilities, potions get deleted from your inventory after being used, so i needed to log them somewhere else.
  3. This is more of a game design question than a coding question, but how would you approach balancing a game like this? Right now, the balance is all over the place, and the game itself is probably too easy.
  4. And the thing that interests me the most is how do you keep your code clean, get rid of redundancies and do things as elegantly as possible? I feel that at this scale I’m starting to get overwhelmed, and the game isn’t even that large code-wise. Do you plan everything ahead to kinda see the whole picture before you start any real work? Is there any other advice?

Anyway, thanks in advance. And please, be gentle, if at all possible. :blush:
Here’s the link to the GitHub repository: GitHub - Ataraxia-nervosa/MicroHero: A text game written in Python. It will be a tiny simplistic roguelite in a fantasy setting. I'm doing this as a portfolio project for the Computer Science course on Codecademy.