mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Merged from revision: 6905
Improved Snitch Trait (by anv) - The snitch actions can be selected in the strategy view "Assignment" menu o Spreading Propaganda: Accessible in town sectors o Gathering Rumours: Accessible in town sectors o Undercover Prison Snitch: Accessible from Facilities menu (Prison) o Preventing Misbehaviour: New Snitch Menu o Passive Reputation Increase see: http://www.bears-pit.com/board/ubbthreads.php/topics/329412/1.html git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6906 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -105,6 +105,7 @@ MoraleEvent gbMoraleEvent[NUM_MORALE_EVENTS] =
|
||||
{ STRATEGIC_MORALE_EVENT, -2}, //MORALE_BAD_EQUIPMENT,
|
||||
{ STRATEGIC_MORALE_EVENT, -3}, //MORALE_OWED_MONEY,
|
||||
{ STRATEGIC_MORALE_EVENT, -3}, //MORALE_PLAYER_INACTIVE,
|
||||
{ STRATEGIC_MORALE_EVENT, -1}, //MORALE_PREVENTED_MISBEHAVIOUR,
|
||||
};
|
||||
|
||||
BOOLEAN gfSomeoneSaidMoraleQuote = FALSE;
|
||||
@@ -1384,6 +1385,12 @@ void HandleSnitchesReports( SnitchEvent *SnitchEvents, UINT8 ubSnitchEventsCount
|
||||
bSnitchID = SnitchEvents[bCounter].ubSnitchID;
|
||||
pSnitch = FindSoldierByProfileID(bSnitchID,TRUE);
|
||||
|
||||
if( pSnitch == NULL )
|
||||
continue;
|
||||
|
||||
if( !(pSnitch->bActive) )
|
||||
continue;
|
||||
|
||||
if( pSnitch->flags.fMercAsleep )
|
||||
fSleepingSnitch = TRUE;
|
||||
|
||||
@@ -1399,6 +1406,18 @@ void HandleSnitchesReports( SnitchEvent *SnitchEvents, UINT8 ubSnitchEventsCount
|
||||
{
|
||||
if( SnitchEvents[bCounter2].ubSnitchID == bSnitchID )
|
||||
{
|
||||
// check if relevant mercs are well
|
||||
SOLDIERTYPE *pSoldier, *pOtherSoldier;
|
||||
pSoldier = FindSoldierByProfileID(SnitchEvents[bCounter2].ubTargetProfile,TRUE);
|
||||
if( pSoldier == NULL || !(pSoldier->bActive) )
|
||||
continue;
|
||||
|
||||
if( SnitchEvents[bCounter2].ubEventType == SNITCH_HATED_PERSON )
|
||||
{
|
||||
pOtherSoldier = FindSoldierByProfileID(SnitchEvents[bCounter2].ubSecondaryTargetProfile,TRUE);
|
||||
if( pOtherSoldier == NULL || !(pOtherSoldier->bActive) )
|
||||
continue;
|
||||
}
|
||||
// say this info
|
||||
SnitchTacticalCharacterDialogue(FindSoldierByProfileID(bSnitchID,TRUE),SnitchEvents[bCounter2].ubEventType,SnitchEvents[bCounter2].ubEventType,
|
||||
SnitchEvents[bCounter2].ubTargetProfile,SnitchEvents[bCounter2].ubSecondaryTargetProfile);
|
||||
@@ -1497,6 +1516,10 @@ UINT8 RememberSnitchableEvent( UINT8 ubTargetProfile, UINT8 ubSecondaryTargetPro
|
||||
(FLOAT)( gSkillTraitValues.bSNTMercOpinionAboutMercTreshold - HATED_OPINION ) ) );
|
||||
}
|
||||
}
|
||||
if ( gMercProfiles[pSnitch->ubProfile].bDisability == DEAF )
|
||||
{
|
||||
sSnitchingChance /= 2;
|
||||
}
|
||||
sSnitchingChance = max(0, sSnitchingChance);
|
||||
if( Random(100) < (UINT8)sSnitchingChance )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user