-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Spellbook Functionality #23
base: main
Are you sure you want to change the base?
Conversation
Final working code.
Thanks! I like how you added the scribe cost in gold pieces... I forgot about that. However, this cost doesn't apply when leveling up -- it's only for copying spells out of another spellbook, even though it makes no logical sense. That's game design trumping logic, I suppose. Maybe there should be a separate Your
(That is a "dict comprehension") The only difference between this code and your existing code is: that this I would recommend using these spell objects from SPELLS in your test function too, rather than using mocks. Mocks are typically for expensive resources such as those returned from the internet. (An example would be, mocking S3 storage to pretend that a file failed to upload, then testing how the program reacts to that failure which wouldn't otherwise have occurred.) Rename Otherwise I don't see other significant issues. I'll be happy to help more in the future :) |
Hi,
This pull request introduces the
Spellbook
class along with methods for adding, removing, and validating spells based on D&D 5e rules. Additionally, it includes tests to ensure the correct functionality of these methods.Spellbook
class in a new filespellbook.py
.add_spell
,remove_spell
,validate_spell
, and others to manage spells in a spellbook.test_spellbook.py
with tests for various scenarios, ensuring the correct behavior of the spellbook methods.Your review and feedback are highly appreciated.