- taking prisoners is disabled in the palace and the royal bunker

- improved surrender strength formula

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5715 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-12-07 16:17:33 +00:00
parent 91bdc131be
commit 0ecc6f224c
13 changed files with 41 additions and 21 deletions
+8 -19
View File
@@ -10061,12 +10061,8 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue )
{
if( pSoldier->bActive && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) )
{
// if he's training teammates in this stat
if( ( pSoldier->stats.bLife >= OKLIFE ) && !(pSoldier->bSoldierFlagMask & SOLDIER_POW) )
{
// player side counts double, to put more emphasize on overwhelming the enemy with mercs and not just militia
playersidestrength += 2;
}
// player side counts double, to put more emphasize on overwhelming the enemy with mercs and not just spamming militia
playersidestrength += 2 * pSoldier->GetSurrenderStrength();
}
}
@@ -10077,11 +10073,7 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue )
{
if( pSoldier->bActive && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) )
{
// if he's training teammates in this stat
if( ( pSoldier->stats.bLife >= OKLIFE ) && !(pSoldier->bSoldierFlagMask & SOLDIER_POW) )
{
++playersidestrength;
}
playersidestrength += pSoldier->GetSurrenderStrength();
}
}
@@ -10092,11 +10084,7 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue )
{
if( pSoldier->bActive && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) )
{
// if he's training teammates in this stat
if( ( pSoldier->stats.bLife >= OKLIFE ) && !(pSoldier->bSoldierFlagMask & SOLDIER_POW) )
{
++enemysidestrength;
}
enemysidestrength += pSoldier->GetSurrenderStrength();
}
}
@@ -10110,14 +10098,15 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue )
{
if( pSoldier->bActive && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) )
{
// if he's training teammates in this stat
if( ( pSoldier->stats.bLife >= OKLIFE ) && !(pSoldier->bSoldierFlagMask & SOLDIER_POW) )
if( pSoldier->stats.bLife >= OKLIFE )
{
pSoldier->bSoldierFlagMask |= SOLDIER_POW;
}
}
}
}
else
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_REFUSE_SURRENDER] );
}
else
{
@@ -10131,7 +10120,7 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue )
// Flugente: offer the enemy the chance to surrender
void HandleSurrenderOffer( SOLDIERTYPE* pSoldier )
{
// only for enemies...
// only against enemies...
if ( !pSoldier || pSoldier->bTeam != ENEMY_TEAM )
return;