mirror of
https://github.com/vcmi/vcmi.git
synced 2025-05-31 22:59:54 +02:00
Award 500 experience for towns conquered during a battle.
This commit is contained in:
parent
0d7f3e61c2
commit
6a5e71aa63
@ -241,6 +241,11 @@ void BattleResultProcessor::endBattle(const CBattleInfoCallback & battle)
|
|||||||
battleResult->exp[1] += 500;
|
battleResult->exp[1] += 500;
|
||||||
if(heroDefender)
|
if(heroDefender)
|
||||||
battleResult->exp[0] += 500;
|
battleResult->exp[0] += 500;
|
||||||
|
|
||||||
|
// Give 500 exp to winner if a town was conquered during the battle
|
||||||
|
const auto * defendedTown = battle.battleGetDefendedTown();
|
||||||
|
if (defendedTown && battleResult->winner == BattleSide::ATTACKER)
|
||||||
|
battleResult->exp[BattleSide::ATTACKER] += 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(heroAttacker)
|
if(heroAttacker)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user