summaryrefslogtreecommitdiffstats
path: root/sigscript/MoveWrapper.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-09-07 18:49:29 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-09-07 18:49:29 +0000
commitf80268eb885e28c603cc88523cfce2751d1448e1 (patch)
treed3e0a8b482f7d2a4bd177ecc300aa407177a42de /sigscript/MoveWrapper.cpp
parent48f9e57b1638ba047ca2dcd6d3251ee90bf9ef69 (diff)
downloadsigen-f80268eb885e28c603cc88523cfce2751d1448e1.tar.gz
sigen-f80268eb885e28c603cc88523cfce2751d1448e1.tar.xz
sigen-f80268eb885e28c603cc88523cfce2751d1448e1.zip
[FIX] Added a static poll method to Fraction
[FIX] More Arena stuff fleshed out [FIX] Added priority scripts to Ability and Move [FIX] A SigmodWrapper pointer is now passed around the containments [FIX] Config now has templated methods for retrieving values git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@253 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigscript/MoveWrapper.cpp')
-rw-r--r--sigscript/MoveWrapper.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/sigscript/MoveWrapper.cpp b/sigscript/MoveWrapper.cpp
index 98f13702..6c21cc38 100644
--- a/sigscript/MoveWrapper.cpp
+++ b/sigscript/MoveWrapper.cpp
@@ -41,15 +41,15 @@ QString Sigscript::MoveWrapper::name() const
Sigmod::Fraction Sigscript::MoveWrapper::accuracy() const
{
- if (value("accuracy").canConvert<Sigmod::Fraction>())
- return value("accuracy").value<Sigmod::Fraction>();
+ if (hasValueOfType<Sigmod::Fraction>("accuracy"))
+ return valueOfType<Sigmod::Fraction>("accuracy");
return m_move->accuracy();
}
int Sigscript::MoveWrapper::power() const
{
- if (value("power").canConvert<int>())
- return value("power").toInt();
+ if (hasValueOfType<int>("power"))
+ return valueOfType<int>("power");
return m_move->power();
}
@@ -70,8 +70,8 @@ int Sigscript::MoveWrapper::powerPoints() const
int Sigscript::MoveWrapper::priority() const
{
- if (value("priority").canConvert<int>())
- return value("priority").toInt();
+ if (hasValueOfType<int>("priority"))
+ return valueOfType<int>("priority");
return m_move->priority();
}
@@ -89,3 +89,8 @@ Sigmod::Script Sigscript::MoveWrapper::worldScript() const
{
return m_move->worldScript();
}
+
+Sigmod::Script Sigscript::MoveWrapper::priorityScript() const
+{
+ return m_move->priorityScript();
+}