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:
@ -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;
|
||||
|
Reference in New Issue
Block a user