mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-28 23:06:24 +02:00
4f14f22d3a
* it is possible now to add casts and shoots OTF (f.e. with spell bonus) Centralized stack 'ammo' loading from bonus system. * introduced small proxy class for local bonus cache (no need to use global cache if particular selector used on node only in one place) * handle killing resurrected creatures * use IBonusBearer::MaxHealth() where possible * Fixed https://bugs.vcmi.eu/view.php?id=2486 * Possible fix for 0 HP after resurrection. * Hack-fixed https://bugs.vcmi.eu/view.php?id=2584 * Unified CStack health API * Use CHealth for CStack count and health points * increased SERIALIZATION_VERSION
35 lines
814 B
C++
35 lines
814 B
C++
/*
|
|
* BattleAttackInfo.h, part of VCMI engine
|
|
*
|
|
* Authors: listed in file AUTHORS in main folder
|
|
*
|
|
* License: GNU General Public License v2.0 or later
|
|
* Full text of license available in license.txt file, in main folder
|
|
*
|
|
*/
|
|
#pragma once
|
|
#include "BattleHex.h"
|
|
#include "../CStack.h"
|
|
|
|
class IBonusBearer;
|
|
|
|
struct DLL_LINKAGE BattleAttackInfo
|
|
{
|
|
const IBonusBearer *attackerBonuses, *defenderBonuses;
|
|
const CStack *attacker, *defender;
|
|
BattleHex attackerPosition, defenderPosition;
|
|
|
|
CHealth attackerHealth, defenderHealth;
|
|
|
|
bool shooting;
|
|
int chargedFields;
|
|
|
|
bool luckyHit;
|
|
bool unluckyHit;
|
|
bool deathBlow;
|
|
bool ballistaDoubleDamage;
|
|
|
|
BattleAttackInfo(const CStack * Attacker, const CStack * Defender, bool Shooting = false);
|
|
BattleAttackInfo reverse() const;
|
|
};
|