1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Initial version of new bonus caching system

This commit is contained in:
Ivan Savenko
2024-12-24 23:11:20 +00:00
parent 873d916a41
commit 16cfb51f3e
12 changed files with 286 additions and 332 deletions

View File

@@ -257,7 +257,7 @@ bool BattleActionProcessor::doAttackAction(const CBattleInfoCallback & battle, c
}
//attack
int totalAttacks = stack->totalAttacks.getMeleeValue();
int totalAttacks = stack->getTotalAttacks(false);
//TODO: move to CUnitState
const auto * attackingHero = battle.battleGetFightingHero(ba.side);
@@ -378,7 +378,7 @@ bool BattleActionProcessor::doShootAction(const CBattleInfoCallback & battle, co
}
//allow more than one additional attack
int totalRangedAttacks = stack->totalAttacks.getRangedValue();
int totalRangedAttacks = stack->getTotalAttacks(true);
//TODO: move to CUnitState
const auto * attackingHero = battle.battleGetFightingHero(ba.side);