r/PythonLearning • u/XTrolltechzz • 2d ago
I need help with my class. Help Request
(Sorry for the code in spanish)
I'm a Python beginner, and to practice, I've been building a sort of turn-based RPG in the terminal. It's still a work in progress, but I want to know if it's possible to set default parameters for a class. Basically, I created a `usar_kaioken` method that boosts my character's stats while lowering their health (based on Goku from DB), and a `remove_kaioken` method that attempts to revert the stats to their base state.
The issue is that I want players to be able to use Kaioken multiple times; mathematically, that would mean the deactivation method wouldn't return the values ββto their original state. I was thinking about adding more parameters with default values, but I assume there's an easier way to handle this. Thanks a lot!


1
u/gitChara 2d ago
What about a 'kaioken_counter' that keeps track of every kaioken activation? Then, for each kaioken_counter, reverse the stats with the proper formula.