diff --git a/lib/CCreatureHandler.cpp b/lib/CCreatureHandler.cpp index d4087a988..20808d7fb 100644 --- a/lib/CCreatureHandler.cpp +++ b/lib/CCreatureHandler.cpp @@ -670,21 +670,46 @@ void CCreatureHandler::loadCreatures() expRanks[0].push_back(it); for (int j = 1; j < 10; ++j) //used for tiers 8-10, and all other probably { - expRanks[0].push_back(expRanks[0][j-1] + dif); + expRanks[0].push_back(expRanks[0][j-1] + it + dif); dif += it/5; } - for (int i = 1; i < 8; ++i) + for (i = 1; i < 8; ++i) { dif = 0; it = 1000 * i; expRanks[i].push_back(it); for (int j = 1; j < 10; ++j) { - expRanks[i].push_back(expRanks[i][j-1] + dif); + expRanks[i].push_back(expRanks[i][j-1] + it + dif); dif += it/5; } } + buf = bitmaph->getTextFile("CREXPMOD.TXT"); //could be hardcoded though, lots of useless info + it = 0; + loadToIt (dump2, buf, it, 3); //ignore first line + + maxExpPerBattle.resize(8); + si32 val; + for (i = 1; i < 8; ++i) + { + loadToIt (dump2, buf, it, 4); //float multiplier -> hardcoded + loadToIt (dump2, buf, it, 4); //ignore upgrade mod? ->hardcoded + loadToIt (dump2, buf, it, 4); //already calculated + loadToIt (val, buf, it, 4); + maxExpPerBattle[i] = (ui32)val; + loadToIt (val, buf, it, 4); //11th level + val += (si32)expRanks[i].back(); + expRanks[i].push_back((ui32)val); + loadToIt (dump2, buf, it, 3); //crop comment + } + //skeleton gets exp penalty + creatures[56].get()->addBonus(-50, Bonus::EXP_MULTIPLIER, -1); + creatures[57].get()->addBonus(-50, Bonus::EXP_MULTIPLIER, -1); + //exp for tier >7, rank 11 + expRanks[0].push_back(14700); + expAfterUpgrade = 75; //percent + }//end of Stack Experience //experiment - add 100 to attack for creatures of tier 1 // Bonus *b = new Bonus(Bonus::PERMANENT, Bonus::PRIMARY_SKILL, Bonus::OTHER, +100, 0, 0); diff --git a/lib/CCreatureHandler.h b/lib/CCreatureHandler.h index 30b56d3e7..4dbcb3161 100644 --- a/lib/CCreatureHandler.h +++ b/lib/CCreatureHandler.h @@ -114,6 +114,8 @@ public: std::map > stackBonuses; // bonus => name, description std::vector> expRanks; // stack experience needed for certain rank, index 0 for other tiers (?) + std::vector maxExpPerBattle; //tiers same as above + si8 expAfterUpgrade;//multiplier in % void loadCreatures(); void loadAnimationInfo(); diff --git a/lib/HeroBonus.h b/lib/HeroBonus.h index 8d7974311..4d7c55029 100644 --- a/lib/HeroBonus.h +++ b/lib/HeroBonus.h @@ -156,7 +156,8 @@ namespace PrimarySkill BONUS_NAME(SPECIAL_PECULIAR_ENCHANT) /*blesses and curses with id = val dependent on unit's level, subtype = 0 or 1 for Coronius*/\ BONUS_NAME(SPECIAL_UPGRADE) /*val = base, additionalInfo = target */\ BONUS_NAME(DRAGON_NATURE) \ - BONUS_NAME(CREATURE_DAMAGE)/*subtype 0 = both, 1 = min, 2 = max*/ + BONUS_NAME(CREATURE_DAMAGE)/*subtype 0 = both, 1 = min, 2 = max*/\ + BONUS_NAME(EXP_MULTIPLIER)/* val - percent of additional exp gained by stack/commander (base value 100)*/ struct DLL_EXPORT Bonus {