mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
feature improvement: stealing items from a soldier while disguised has a chance to be discovered even in turnbased.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5943 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3148,6 +3148,37 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo, BOOLEAN fStea
|
||||
|
||||
fFailure=FALSE;
|
||||
|
||||
// Flugente: if we are disguised and try to steal from a conscious enemy, there is a chance that he notices us and we lose our disguise. If he can see us this always happens
|
||||
if ( !fSoldierCollapsed && pSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
|
||||
{
|
||||
BOOLEAN fUncovered = FALSE;
|
||||
|
||||
// if he sees us, always loose disguise
|
||||
if ( pTargetSoldier->aiData.bOppList[ pSoldier->ubID ] == SEEN_CURRENTLY )
|
||||
fUncovered = TRUE;
|
||||
else
|
||||
{
|
||||
UINT8 chance = 10;
|
||||
|
||||
if ( pTargetSoldier->aiData.bOppList[ pSoldier->ubID ] == SEEN_LAST_TURN )
|
||||
chance += 40;
|
||||
|
||||
chance += pSoldier->aiData.bAlertStatus * 10;
|
||||
|
||||
if ( Chance(chance) )
|
||||
fUncovered = TRUE;
|
||||
}
|
||||
|
||||
if ( fUncovered )
|
||||
{
|
||||
pSoldier->LooseDisguise();
|
||||
pSoldier->Strip();
|
||||
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_STEAL_FAIL], pSoldier->name );
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_UNCOVERED], pTargetSoldier->name, pSoldier->name );
|
||||
}
|
||||
}
|
||||
|
||||
// WDS 07/19/2008 - Random number use fix
|
||||
// Do we have the chance to steal more than 1 item?
|
||||
// SANDRO - taking items from collapsed soldiers is treated differently
|
||||
|
||||
@@ -688,6 +688,7 @@ enum
|
||||
STR_COVERT_UNCOVER_SINGLE,
|
||||
STR_COVERT_TEST_OK,
|
||||
STR_COVERT_TEST_FAIL,
|
||||
STR_COVERT_STEAL_FAIL,
|
||||
TEXT_NUM_COVERT_STR
|
||||
};
|
||||
|
||||
|
||||
@@ -7492,6 +7492,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s was uncovered!",
|
||||
L"%s's disguise seems to be ok...",
|
||||
L"%s's disguise will not hold.",
|
||||
L"%s was caught stealing!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
@@ -7489,6 +7489,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s was uncovered!",
|
||||
L"%s's disguise seems to be ok...",
|
||||
L"%s's disguise will not hold.",
|
||||
L"%s was caught stealing!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
@@ -7478,6 +7478,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s was uncovered!",
|
||||
L"%s's disguise seems to be ok...",
|
||||
L"%s's disguise will not hold.",
|
||||
L"%s was caught stealing!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
@@ -7473,6 +7473,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s was uncovered!",
|
||||
L"%s's disguise seems to be ok...",
|
||||
L"%s's disguise will not hold.",
|
||||
L"%s was caught stealing!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
@@ -7301,6 +7301,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s wurde enttarnt!",
|
||||
L"%s's Verkleidung sollte überzeugen",
|
||||
L"%s's Verkleidung wird auffliegen!",
|
||||
L"%s wurde beim Stehlen erwischt!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
@@ -7475,6 +7475,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s was uncovered!",
|
||||
L"%s's disguise seems to be ok...",
|
||||
L"%s's disguise will not hold.",
|
||||
L"%s was caught stealing!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
@@ -7496,6 +7496,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s was uncovered!",
|
||||
L"%s's disguise seems to be ok...",
|
||||
L"%s's disguise will not hold.",
|
||||
L"%s was caught stealing!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
@@ -7477,6 +7477,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s was uncovered!",
|
||||
L"%s's disguise seems to be ok...",
|
||||
L"%s's disguise will not hold.",
|
||||
L"%s was caught stealing!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
@@ -7493,6 +7493,7 @@ STR16 szCovertTextStr[]=
|
||||
L"%s was uncovered!",
|
||||
L"%s's disguise seems to be ok...",
|
||||
L"%s's disguise will not hold.",
|
||||
L"%s was caught stealing!",
|
||||
};
|
||||
|
||||
STR16 szCorpseTextStr[]=
|
||||
|
||||
Reference in New Issue
Block a user