diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-07-19 14:24:56 -0400 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-07-19 14:24:56 -0400 |
| commit | 2deabfe7c5f93805cd33e49d8dc75e7718dea494 (patch) | |
| tree | 9daeb87c44a65c7e1910c0484b14a635e0436b37 /sigencore/Creature.cpp | |
| parent | ae9ba580020774e8942000db2fcc84c41845f942 (diff) | |
| download | sigen-2deabfe7c5f93805cd33e49d8dc75e7718dea494.tar.gz sigen-2deabfe7c5f93805cd33e49d8dc75e7718dea494.tar.xz sigen-2deabfe7c5f93805cd33e49d8dc75e7718dea494.zip | |
Allow for unlimited stages of stat modifiers
Diffstat (limited to 'sigencore/Creature.cpp')
| -rw-r--r-- | sigencore/Creature.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sigencore/Creature.cpp b/sigencore/Creature.cpp index bf77a392..43782775 100644 --- a/sigencore/Creature.cpp +++ b/sigencore/Creature.cpp @@ -311,7 +311,7 @@ bool Creature::setStatExperience(const Stat stat, const long long statExp) { if ((stat == ST_Accuracy) || (stat == ST_Evasion) || ((stat == ST_SpecialDefense) && !m_game->rules()->specialSplit())) return false; - if (m_game->rules()->effortValuesAllowed()) + if (0 < m_game->rules()->maxTotalEV()) { int evSum = statExp; for (int i = ST_HP; i <= (m_game->rules()->specialSplit() ? ST_Special : ST_SpecialDefense); ++i) @@ -353,7 +353,7 @@ int Creature::statValue(const Stat stat) const int Creature::calcStat(GameWrapper* game, const Stat stat, const int level, const int baseStat, const int dv, const int statExp, const Fraction& multiplier) { int statValue = statExp; - if (!game->rules()->effortValuesAllowed() && statValue) + if (!game->rules()->maxTotalEV() && statValue) statValue = sqrt(statValue - 1) + 1; statValue >>= 2; statValue += baseStat << 1; |
