mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Award 500 experience for towns conquered during a battle.
This commit is contained in:
parent
d070953c28
commit
b9b51334eb
@ -589,6 +589,11 @@ void CGameHandler::endBattle(int3 tile, const CGHeroInstance * heroAttacker, con
|
||||
battleResult.data->exp[0] += 500;
|
||||
}
|
||||
|
||||
// Give 500 exp to winner if a town was conquered during the battle
|
||||
const auto * defendedTown = battleGetDefendedTown();
|
||||
if (defendedTown && battleResult.data->winner == BattleSide::ATTACKER)
|
||||
battleResult.data->exp[BattleSide::ATTACKER] += 500;
|
||||
|
||||
if(heroAttacker)
|
||||
battleResult.data->exp[0] = heroAttacker->calculateXp(battleResult.data->exp[0]);//scholar skill
|
||||
if(heroDefender)
|
||||
|
Loading…
Reference in New Issue
Block a user