1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

* morale/luck support in battles

* minor improvements/fixes
* updated changelog
More objects supported:
 *	Faerie Ring
 *	Swan Pond
 *	Idol of Fortune
 *	Fountain of Fortune
 *	Rally Flag
 *	Oasis
 *	Temple
 *	Watering Hole
 *	Fountain of Youth
This commit is contained in:
Michał W. Urbańczyk
2009-02-05 09:49:45 +00:00
parent 218a3beaf6
commit e1d6ff54d7
15 changed files with 325 additions and 113 deletions

View File

@ -505,7 +505,7 @@ struct BattleStackAttacked : public CPack<BattleStackAttacked>//3005
{
ui32 stackAttacked;
ui32 newAmount, newHP, killedAmount, damageAmount;
ui8 flags; //1 - is stack killed; 2 - is there special effect to be shown
ui8 flags; //1 - is stack killed; 2 - is there special effect to be shown; 4 - lucky hit
ui32 effect; //set only if flag 2 is present
@ -518,6 +518,10 @@ struct BattleStackAttacked : public CPack<BattleStackAttacked>//3005
{
return flags & 2;
}
bool lucky()
{
return flags & 4;
}
template <typename Handler> void serialize(Handler &h, const int version)
{
h & stackAttacked & newAmount & newHP & flags & killedAmount & damageAmount & effect;