mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
New Trait: Snitch (Trait 22) (by anv)
Every midnight snitches will give you a report about their collegues' opinions. Information includes: - merc whining about high death rate, - merc whining about player reputation, - merc whining about his low morale, - merc whining about some other merc (unliked, not only hated), - merc planning to quit (leave without renewing contract, only AIM mercs) next day, - merc whining about player inactivity, - merc whining about player owing them money (you can only owe money to MERC mercs). List of snitches (trait 22) Beth Bud Buzz Carp Ears Gary Hurl Lance Leon Weasel see: http://www.bears-pit.com/board/ubbthreads.php/topics/329412/Snitches_+_Externalised_morale.html git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6723 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -53,6 +53,7 @@ void MercDepartEquipmentBoxCallBack( UINT8 bExitValue );
|
||||
BOOLEAN HandleFiredDeadMerc( SOLDIERTYPE *pSoldier );
|
||||
void HandleExtendMercsContract( SOLDIERTYPE *pSoldier );
|
||||
void HandleSoldierLeavingWithLowMorale( SOLDIERTYPE *pSoldier );
|
||||
void HandleBuddiesReactionToFiringMerc(SOLDIERTYPE *pFiredSoldier, INT8 bMoraleEvent );
|
||||
void HandleSoldierLeavingForAnotherContract( SOLDIERTYPE *pSoldier );
|
||||
//BOOLEAN SoldierWantsToDelayRenewalOfContract( SOLDIERTYPE *pSoldier );
|
||||
void HandleNotifyPlayerCantAffordInsurance( void );
|
||||
@@ -743,6 +744,29 @@ BOOLEAN WillMercRenew( SOLDIERTYPE *pSoldier, BOOLEAN fSayQuote )
|
||||
}
|
||||
}
|
||||
|
||||
void HandleBuddiesReactionToFiringMerc(SOLDIERTYPE *pFiredSoldier, INT8 bMoraleEvent )
|
||||
{
|
||||
INT8 bMercID, bOtherID;
|
||||
INT8 bLastTeamID;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
|
||||
|
||||
bMercID = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
||||
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
||||
// loop through all mercs to find buddies
|
||||
for ( pSoldier = MercPtrs[ bMercID ]; bMercID <= bLastTeamID; bMercID++,pSoldier++)
|
||||
{
|
||||
//if the merc is active, in Arulco, not POW and is a buddy
|
||||
if ( WhichBuddy(pSoldier->ubProfile,pFiredSoldier->ubProfile) != (-1) &&
|
||||
pSoldier->bActive && pSoldier->ubProfile != NO_PROFILE &&
|
||||
!(pSoldier->bAssignment == IN_TRANSIT ||
|
||||
pSoldier->bAssignment == ASSIGNMENT_DEAD ||
|
||||
pSoldier->bAssignment == ASSIGNMENT_POW) )
|
||||
{
|
||||
HandleMoraleEvent(pSoldier, bMoraleEvent, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleSoldierLeavingWithLowMorale( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
@@ -751,6 +775,9 @@ void HandleSoldierLeavingWithLowMorale( SOLDIERTYPE *pSoldier )
|
||||
// this will cause him give us lame excuses for a while until he gets over it
|
||||
// 3-6 days (but the first 1-2 days of that are spent "returning" home)
|
||||
gMercProfiles[ pSoldier->ubProfile ].ubDaysOfMoraleHangover = (UINT8) (3 + Random(4));
|
||||
|
||||
// piss off his buddies too
|
||||
HandleBuddiesReactionToFiringMerc(pSoldier, MORALE_BUDDY_FIRED_EARLY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -912,6 +939,9 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
EndCurrentContractRenewal( );
|
||||
}
|
||||
|
||||
// anv: let buddies react
|
||||
HandleBuddiesReactionToFiringMerc(pSoldier, MORALE_BUDDY_FIRED);
|
||||
|
||||
// ATE: Determine which HISTORY ENTRY to use...
|
||||
if ( pSoldier->ubLeaveHistoryCode == 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user