mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
* Fixed crashbug on iterating stack effects
* Altered probabilities of starting with 1/2/3 stacks (according to Zamolxis tests) * fix compilation min/max (windef.h is somehow included and it has its own macros min/max)
This commit is contained in:
parent
7862fe25d1
commit
7fbd4e696c
@ -525,9 +525,9 @@ void CGHeroInstance::initHero()
|
||||
|
||||
int x = 0; //how many stacks will hero receives <1 - 3>
|
||||
pom = ran()%100;
|
||||
if(pom < 5)
|
||||
if(pom < 9)
|
||||
x = 1;
|
||||
else if(pom < 67)
|
||||
else if(pom < 79)
|
||||
x = 2;
|
||||
else
|
||||
x = 3;
|
||||
|
@ -25,6 +25,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef min
|
||||
#undef min
|
||||
#endif
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
|
||||
DLL_EXPORT void SetResource::applyGs( CGameState *gs )
|
||||
{
|
||||
gs->getPlayer(player)->resources[resid] = val;
|
||||
@ -484,7 +491,7 @@ DLL_EXPORT void BattleNextRound::applyGs( CGameState *gs )
|
||||
if(tmpFeatures[i].duration == StackFeature::N_TURNS)
|
||||
{
|
||||
tmpFeatures[i].turnsRemain--;
|
||||
if(tmpEffects[i].turnsRemain > 0)
|
||||
if(tmpFeatures[i].turnsRemain > 0)
|
||||
s->features.push_back(tmpFeatures[i]);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user