From 7990b2e09b609bb88ebb8b96478fbf3004da1e38 Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 3 Jan 2013 04:10:00 +0000 Subject: [PATCH] The enemy now counts disguised spies as 'theirs' when offered surrender option. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5757 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Overhead.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 776f25e18..9d353fd58 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -10056,8 +10056,15 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue ) { if( pSoldier->bActive && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) ) { - // player side counts double, to put more emphasize on overwhelming the enemy with mercs and not just spamming militia - playersidestrength += 2 * pSoldier->GetSurrenderStrength(); + // if we are disguised as a civilian, the enemy does not take us into the equation - he does not consider us + if ( pSoldier->bSoldierFlagMask & SOLDIER_COVERT_CIV ) + ; + // if we are disguised as a soldier, the enemy counts us on HIS team + else if ( pSoldier->bSoldierFlagMask & SOLDIER_COVERT_SOLDIER ) + enemysidestrength += pSoldier->GetSurrenderStrength(); + else + // player side counts double, to put more emphasize on overwhelming the enemy with mercs and not just spamming militia + playersidestrength += 2 * pSoldier->GetSurrenderStrength(); } } @@ -10104,7 +10111,20 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue ) } } else + { ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_REFUSE_SURRENDER] ); + + // if asking for surrender while undercover and the enemy refuses, he learns who you are, so he uncovers you + if ( gusSelectedSoldier != NOBODY && MercPtrs[ gusSelectedSoldier ]->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) ) + { + MercPtrs[ gusSelectedSoldier ]->LooseDisguise(); + + MercPtrs[ gusSelectedSoldier ]->Strip(); + + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_SURRENDER_FAILED] ); + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_UNCOVER_SINGLE], MercPtrs[ gusSelectedSoldier ]->name ); + } + } } else {