diff options
Diffstat (limited to 'pokemod/Ability.h')
-rw-r--r-- | pokemod/Ability.h | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/pokemod/Ability.h b/pokemod/Ability.h index 10c2dd56..dd5f52f9 100644 --- a/pokemod/Ability.h +++ b/pokemod/Ability.h @@ -27,20 +27,70 @@ namespace Pokemod // Forward declarations class Pokemod; +/** + * @brief Abilities add another layer of strategy to the battle. + * + * Abilities add another layer of strategy to the battle. They + * add effects to the battle that take place out-of-turn and + * usually play a supportive role rather than a proactive role. + * + * @author Ben Boeckel <MathStuf@gmail.com> + */ class POKEMOD_EXPORT Ability : public Object { Q_OBJECT public: + /** + * Construct an exact copy of another \c ability. + * + * @param ability The ability to copy. + */ Ability(const Ability& ability); + /** + * Create a new ability with the \c parent and \c id. + * + * @param parent The parent of the ability. + * @param id The id of the ability. + */ Ability(const Pokemod* parent, const int id); + /** + * Construct an ability from a preexisting \c ability's data, but reparent it. + * + * @warning The scripts are not guaranteed to work in the new \c parent. + * + * @param ability The ability to copy. + * @param parent The parent of the ability. + * @param id The id of the ability. + */ Ability(const Ability& ability, const Pokemod* parent, const int id); + /** + * Construct an ability from XML data with the given parents. + * + * @param xml The XML data to load. + * @param parent The parent of the ability. + * @param id The id of the ability. If it is -1, it will be loaded from the XML. + */ Ability(const QDomElement& xml, const Pokemod* parent, const int id = -1); - ~Ability(); + /** + * Validate the ability. + * + * \sa Pokemod::Object::validate + */ void validate(); + /** + * Load data from XML. + * + * @param xml The XML data to load. + */ void load(const QDomElement& xml); + /** + * Saves the ability to XML format. + * + * @return An XML representation of the ability. + */ QDomElement save() const; void setName(const QString& name); |