diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-09-25 22:55:25 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-09-25 22:55:25 +0000 |
| commit | 64730b32e2c595469eb23e9cd40332b4a80e3e27 (patch) | |
| tree | a75a17a7c7ac78e2e323e1cdecef8f6a3939f844 /sigscript | |
| parent | 4c4fdc8d4540bd1bd52021b502f05f27a8ef98e1 (diff) | |
| download | sigen-64730b32e2c595469eb23e9cd40332b4a80e3e27.tar.gz sigen-64730b32e2c595469eb23e9cd40332b4a80e3e27.tar.xz sigen-64730b32e2c595469eb23e9cd40332b4a80e3e27.zip | |
[FIX] Removed *_End defines
[FIX] Added weights to items and associated fields
[FIX] Option for pausing during ATB battles when choosing moves added
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@267 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigscript')
| -rw-r--r-- | sigscript/ItemTypeWrapper.cpp | 7 | ||||
| -rw-r--r-- | sigscript/ItemTypeWrapper.h | 1 | ||||
| -rw-r--r-- | sigscript/ItemWrapper.cpp | 12 | ||||
| -rw-r--r-- | sigscript/ItemWrapper.h | 2 | ||||
| -rw-r--r-- | sigscript/RulesWrapper.cpp | 14 | ||||
| -rw-r--r-- | sigscript/RulesWrapper.h | 2 | ||||
| -rw-r--r-- | sigscript/SpeciesWrapper.cpp | 5 | ||||
| -rw-r--r-- | sigscript/SpeciesWrapper.h | 1 |
8 files changed, 44 insertions, 0 deletions
diff --git a/sigscript/ItemTypeWrapper.cpp b/sigscript/ItemTypeWrapper.cpp index 12f47876..aebd20c3 100644 --- a/sigscript/ItemTypeWrapper.cpp +++ b/sigscript/ItemTypeWrapper.cpp @@ -58,6 +58,13 @@ int Sigscript::ItemTypeWrapper::player() const return m_itemType->player(); } +int Sigscript::ItemTypeWrapper::maxWeight() const +{ + if (hasValueOfType<int>("maxWeight")) + return valueOfType<int>("maxWeight"); + return m_itemType->maxWeight(); +} + int Sigscript::ItemTypeWrapper::count() const { return m_itemType->count(); diff --git a/sigscript/ItemTypeWrapper.h b/sigscript/ItemTypeWrapper.h index ad8ed75a..790a00fd 100644 --- a/sigscript/ItemTypeWrapper.h +++ b/sigscript/ItemTypeWrapper.h @@ -38,6 +38,7 @@ class SIGSCRIPT_EXPORT ItemTypeWrapper : public ObjectWrapper Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE int computer() const; Q_SCRIPTABLE int player() const; + Q_SCRIPTABLE int maxWeight() const; Q_SCRIPTABLE int count() const; private: ItemTypeWrapper(const Sigmod::ItemType* itemType, SigmodWrapper* parent); diff --git a/sigscript/ItemWrapper.cpp b/sigscript/ItemWrapper.cpp index 71e36149..18803dbb 100644 --- a/sigscript/ItemWrapper.cpp +++ b/sigscript/ItemWrapper.cpp @@ -56,6 +56,18 @@ int Sigscript::ItemWrapper::price() const return m_item->price(); } +int Sigscript::ItemWrapper::sellPrice() const +{ + if (hasValueOfType<int>("sellPrice")) + return valueOfType<int>("sellPrice"); + return m_item->sellPrice(); +} + +int Sigscript::ItemWrapper::weight() const +{ + return m_item->weight(); +} + QString Sigscript::ItemWrapper::description() const { return m_item->description(); diff --git a/sigscript/ItemWrapper.h b/sigscript/ItemWrapper.h index 99ef693e..84b33af5 100644 --- a/sigscript/ItemWrapper.h +++ b/sigscript/ItemWrapper.h @@ -40,6 +40,8 @@ class SIGSCRIPT_EXPORT ItemWrapper : public ObjectWrapper Q_SCRIPTABLE bool sellable() const; Q_SCRIPTABLE ItemTypeWrapper* type(); Q_SCRIPTABLE int price() const; + Q_SCRIPTABLE int sellPrice() const; + Q_SCRIPTABLE int weight() const; Q_SCRIPTABLE QString description() const; Q_SCRIPTABLE Sigmod::Script script() const; private: diff --git a/sigscript/RulesWrapper.cpp b/sigscript/RulesWrapper.cpp index f1493208..a5374678 100644 --- a/sigscript/RulesWrapper.cpp +++ b/sigscript/RulesWrapper.cpp @@ -54,6 +54,13 @@ bool Sigscript::RulesWrapper::useTurns() const return m_rules->useTurns(); } +bool Sigscript::RulesWrapper::pausedATB() const +{ + if (hasValueOfType<bool>("pausedATB")) + return valueOfType<bool>("pausedATB"); + return m_rules->pausedATB(); +} + int Sigscript::RulesWrapper::numBoxes() const { if (hasValueOfType<int>("numBoxes")) @@ -134,6 +141,13 @@ int Sigscript::RulesWrapper::maxMoney() const return m_rules->maxMoney(); } +int Sigscript::RulesWrapper::maxTotalWeight() const +{ + if (hasValueOfType<int>("maxTotalWeight")) + return valueOfType<int>("maxTotalWeight"); + return m_rules->maxTotalWeight(); +} + bool Sigscript::RulesWrapper::hardCash() const { return m_rules->hardCash(); diff --git a/sigscript/RulesWrapper.h b/sigscript/RulesWrapper.h index 45383ee6..9846f302 100644 --- a/sigscript/RulesWrapper.h +++ b/sigscript/RulesWrapper.h @@ -37,6 +37,7 @@ class SIGSCRIPT_EXPORT RulesWrapper : public ObjectWrapper Q_SCRIPTABLE bool breedingAllowed() const; Q_SCRIPTABLE bool criticalDomains() const; Q_SCRIPTABLE bool useTurns() const; + Q_SCRIPTABLE bool pausedATB() const; Q_SCRIPTABLE int numBoxes() const; Q_SCRIPTABLE int boxSize() const; Q_SCRIPTABLE int maxParty() const; @@ -49,6 +50,7 @@ class SIGSCRIPT_EXPORT RulesWrapper : public ObjectWrapper Q_SCRIPTABLE int maxLevel() const; Q_SCRIPTABLE int maxStages() const; Q_SCRIPTABLE int maxMoney() const; + Q_SCRIPTABLE int maxTotalWeight() const; Q_SCRIPTABLE bool hardCash() const; Q_SCRIPTABLE bool allowSwitchStyle() const; Q_SCRIPTABLE bool specialSplit() const; diff --git a/sigscript/SpeciesWrapper.cpp b/sigscript/SpeciesWrapper.cpp index 5f1b1a72..42a46a50 100644 --- a/sigscript/SpeciesWrapper.cpp +++ b/sigscript/SpeciesWrapper.cpp @@ -100,6 +100,11 @@ int Sigscript::SpeciesWrapper::catchValue() const return m_species->catchValue(); } +int Sigscript::SpeciesWrapper::maxHoldWeight() const +{ + return m_species->maxHoldWeight(); +} + Sigmod::Fraction Sigscript::SpeciesWrapper::runChance() const { if (hasValueOfType<Sigmod::Fraction>("runChance")) diff --git a/sigscript/SpeciesWrapper.h b/sigscript/SpeciesWrapper.h index 54e4203b..5a4209da 100644 --- a/sigscript/SpeciesWrapper.h +++ b/sigscript/SpeciesWrapper.h @@ -56,6 +56,7 @@ class SIGSCRIPT_EXPORT SpeciesWrapper : public ObjectWrapper Q_SCRIPTABLE Sigmod::Species::Style growth() const; Q_SCRIPTABLE int experienceValue() const; Q_SCRIPTABLE int catchValue() const; + Q_SCRIPTABLE int maxHoldWeight() const; Q_SCRIPTABLE Sigmod::Fraction runChance() const; Q_SCRIPTABLE Sigmod::Fraction fleeChance() const; Q_SCRIPTABLE Sigmod::Fraction itemChance() const; |
