MirUlr / dsa_calculator

Some classes for handling the 3d20 test of the the german pen and paper system in a streamlined way.
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Update hero without tampering json file #9

Open MirUlr opened 3 years ago

MirUlr commented 3 years ago

At the moment there is no possibility to change values - or add spell-likes in case of funzel. An update method aktualisiere should reuse existing methods as used in __init__(). This raises the question, if an update should manipulate the existing or return a new instance.

MirUlr commented 3 years ago

29 provide several methods to update the characteristics of Twinkle and Hero objects. These function should be used to manipulate objects using python interpreter.

While working with graphical user interface, makehero.py provide other possibilities. Since a while the option is given, to load a hero in the makehero interface, manipulate the values and save the changes (i.e. override loaded json file). This handling has proven pretty useful. Therefore the above raised question can be answered: Objects in python interpreter are updated. GUI based handling initiates new instances.

MirUlr commented 3 years ago

With realiziation of #30, the handling of new instances via GUI may be applied on instances of Twinkle. Since spell-likes are generated via user interaction, the need for deleting (erroneous) spell-likes is risen. This need is already met with Twinkle.delete_spelllike() from #29.