From a423cf3db8fa90cc09d2f92ff892e4fcdda4af16 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 30 Jun 2008 01:37:51 +0000 Subject: [FIX] Replaced Point with QPoint (less duplicate code) [FIX] Fraction and Point widgets are more compact [FIX] Fleshed out more of the TeamMember [FIX] Map tilemap editor now expands to fill all available area [FIX] Added priority values to abilities and moves [FIX] Added option for ATB-like battle rounds git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@217 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/Ability.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pokemod/Ability.cpp') diff --git a/pokemod/Ability.cpp b/pokemod/Ability.cpp index 0d536765..385dd572 100644 --- a/pokemod/Ability.cpp +++ b/pokemod/Ability.cpp @@ -31,6 +31,7 @@ Pokemod::Ability::Ability(const Ability& ability) : Pokemod::Ability::Ability(const Pokemod* parent, const int id) : Object("Ability", parent, id), m_name(""), + m_priority(0), m_description(""), m_script("", "") { @@ -65,6 +66,7 @@ void Pokemod::Ability::load(const QDomElement& xml) { LOAD_BEGIN(); LOAD(QString, name); + LOAD(int, priority); LOAD(QString, description); LOAD(Script, script); } @@ -73,6 +75,7 @@ QDomElement Pokemod::Ability::save() const { SAVE_CREATE(); SAVE(QString, name); + SAVE(int, priority); SAVE(QString, description); SAVE(Script, script); return xml; @@ -83,6 +86,11 @@ void Pokemod::Ability::setName(const QString& name) CHECK(name); } +void Pokemod::Ability::setPriority(const int priority) +{ + CHECK(priority); +} + void Pokemod::Ability::setDescription(const QString& description) { CHECK(description); @@ -98,6 +106,11 @@ QString Pokemod::Ability::name() const return m_name; } +int Pokemod::Ability::priority() const +{ + return m_priority; +} + QString Pokemod::Ability::description() const { return m_description; @@ -113,6 +126,7 @@ Pokemod::Ability& Pokemod::Ability::operator=(const Ability& rhs) if (this == &rhs) return *this; COPY(name); + COPY(priority); COPY(description); COPY(script); return *this; -- cgit