mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Small arc update (by rftr):
- 2 new directives - 3 new admin actions - arc website dropdown fix - one admin action per region can now be changed git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9161 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4472,6 +4472,16 @@ void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
||||
usAttack -= (usAttack * gGameExternalOptions.sMercsAutoresolveDeffenseBonus /200);
|
||||
}
|
||||
|
||||
// check fortifications bonus
|
||||
if (pTarget->pSoldier->ubSoldierClass == SOLDIER_CLASS_GREEN_MILITIA
|
||||
|| pTarget->pSoldier->ubSoldierClass == SOLDIER_CLASS_REG_MILITIA
|
||||
|| pTarget->pSoldier->ubSoldierClass == SOLDIER_CLASS_ELITE_MILITIA
|
||||
|| (pTarget->uiFlags & CELL_MERC))
|
||||
{
|
||||
usDefence += (usDefence * RebelCommand::GetFortificationsBonus(GetAutoResolveSectorID()) / 200);
|
||||
usAttack -= (usAttack * RebelCommand::GetFortificationsBonus(GetAutoResolveSectorID()) / 200);
|
||||
}
|
||||
|
||||
// reapair values
|
||||
usAttack = max(0, min(1000, usAttack ));
|
||||
usDefence = max(0, min(1000, usDefence ));
|
||||
|
||||
Reference in New Issue
Block a user