diff options
author | Your Name <you@example.com> | 2023-11-22 15:28:00 -0500 |
---|---|---|
committer | Your Name <you@example.com> | 2023-11-22 15:28:00 -0500 |
commit | ae68e84557a7e56fd7210c1009aa1313dcc78adf (patch) | |
tree | 60616c822927847dd078f014c514a65f764607f3 /src/creature.h | |
parent | 0d32e0d3342ef2455014c8e1164977c816763317 (diff) | |
download | dmtool-ae68e84557a7e56fd7210c1009aa1313dcc78adf.tar.gz dmtool-ae68e84557a7e56fd7210c1009aa1313dcc78adf.tar.bz2 dmtool-ae68e84557a7e56fd7210c1009aa1313dcc78adf.zip |
Increased capacity for creating items from command line
Diffstat (limited to 'src/creature.h')
-rw-r--r-- | src/creature.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/creature.h b/src/creature.h index de93b0e..621b397 100644 --- a/src/creature.h +++ b/src/creature.h @@ -80,11 +80,15 @@ namespace creature { void setScore(const rules::Ability& ability, int score); void setProfLevel(const rules::Skill& skill, int level); void setProficiency(int p); + void setProficientSave(const rules::Ability& ability); + void removeProficientSave(const rules::Ability& ability); void addInventoryItem(std::shared_ptr<entry::Item> item); void addSpellcasting(void); void addSpell(std::shared_ptr<entry::Spell> spell); void removeSpell(std::shared_ptr<entry::Spell> spell); void removeInventoryItem(std::shared_ptr<entry::Item> item); + void addFeature(std::shared_ptr<entry::Feature> feature); + void removeFeature(std::shared_ptr<entry::Feature> feature); // Events void longRest(void); @@ -107,4 +111,10 @@ namespace creature { // Helper function to get the best ability for this creature (chooses arbitrarily in case of ties) rules::Ability getBestAbility(const std::vector<rules::Ability>& abilities, const Creature& c); + + // Helper function to smartly add an entry. Returns true on success. + bool addEntry(std::shared_ptr<entry::Entry> entry, Creature& c); + + // Helper function to smartly remove an entry. Returns the removed entry on success, else a null shared_ptr + std::shared_ptr<entry::Entry> removeEntry(std::string entryName, Creature& c); } |