mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-06 23:26:26 +02:00
Give bonus experience for capturing a town even if the enemy hero escaped.
This commit is contained in:
parent
6a5e71aa63
commit
cb3cc84c61
@ -241,13 +241,13 @@ 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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)
|
||||||
battleResult->exp[0] = heroAttacker->calculateXp(battleResult->exp[0]);//scholar skill
|
battleResult->exp[0] = heroAttacker->calculateXp(battleResult->exp[0]);//scholar skill
|
||||||
if(heroDefender)
|
if(heroDefender)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user