- Fix: if merc cannot complain about his equipment due to being asleep or on duty, retry an hour later

- Fix: in AIM bios, show max life, not life at start of game
- Fix: typo resulted in AIM mercs not refusing job because of hated mercs present when they should do so
- Dialogue clarification: QUOTE_PRE_NOT_SMART is now used for complaints about food, QUOTE_POST_NOT_SMART to refuse smoking

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8354 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-01-06 01:17:45 +00:00
parent 4ab21a08c2
commit bb6872787d
3 changed files with 20 additions and 16 deletions
+9 -12
View File
@@ -2215,8 +2215,8 @@ void DisplayMercStats()
// Numbers for above. Health, Agility, dexterity, strength, leadership, wisdom
ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bLife );
DrawNumeralsToScreen( gMercProfiles[gbCurrentSoldier].bLife, 3, STATS_FIRST_NUM_NSGI, HEALTH_Y_NSGI, AIM_M_NUMBER_FONT, ubColor );
ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bLifeMax );
DrawNumeralsToScreen( gMercProfiles[gbCurrentSoldier].bLifeMax, 3, STATS_FIRST_NUM_NSGI, HEALTH_Y_NSGI, AIM_M_NUMBER_FONT, ubColor );
ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bAgility );
DrawNumeralsToScreen(gMercProfiles[gbCurrentSoldier].bAgility, 3, STATS_FIRST_NUM_NSGI, AGILITY_Y_NSGI, AIM_M_NUMBER_FONT, ubColor );
@@ -3314,13 +3314,10 @@ UINT8 WillMercAcceptCall()
BOOLEAN CanMercBeHired()
{
UINT8 i,j;
UINT8 bMercID;
BOOLEAN fRetVal = FALSE;
BOOLEAN fBuddyOnTeam=FALSE;
StopMercTalking();
// if the merc recently came back with poor morale, and hasn't gotten over it yet
@@ -3334,7 +3331,7 @@ BOOLEAN CanMercBeHired()
// loop through the list of people the merc hates
for(i=0; i< NUMBER_HATED_MERCS_ONTEAM; i++)
for ( UINT8 i = 0; i< NUMBER_HATED_MERCS_ONTEAM; ++i )
{
//see if someone the merc hates is on the team
if( i< NUMBER_HATED_MERCS_ONTEAM - 1 )
@@ -3344,6 +3341,7 @@ BOOLEAN CanMercBeHired()
else
{
bMercID = gMercProfiles[ gbCurrentSoldier ].bLearnToHate;
// ignore learn to hate, if he's not a foe yet
if( gMercProfiles[ gbCurrentSoldier ].bLearnToHateCount > 0 )
continue;
@@ -3362,16 +3360,17 @@ BOOLEAN CanMercBeHired()
if( IsMercOnTeamAndInOmertaAlready( bMercID ) )
{
//if the merc hates someone on the team, see if a buddy is on the team
for(j=0; j< NUMBER_HATED_MERCS_ONTEAM; j++)
for ( UINT8 j = 0; j< NUMBER_HATED_MERCS_ONTEAM; ++j )
{
//if a buddy is on the team, the merc will join
if( i< NUMBER_HATED_MERCS_ONTEAM - 1 )
if( j < NUMBER_HATED_MERCS_ONTEAM - 1 )
{
bMercID = gMercProfiles[ gbCurrentSoldier ].bBuddy[j];
}
else
{
bMercID = gMercProfiles[ gbCurrentSoldier ].bLearnToLike;
// ignore learn to like, if he's not a buddy yet
if( gMercProfiles[ gbCurrentSoldier ].bLearnToLikeCount > 0 )
continue;
@@ -3382,7 +3381,7 @@ BOOLEAN CanMercBeHired()
if( IsMercOnTeam( bMercID ) && !IsMercDead( bMercID ) )
{
if(j == 0 )
if ( j == 0 )
{
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_JOINING_CAUSE_BUDDY_1_ON_TEAM);
}
@@ -3522,8 +3521,6 @@ BOOLEAN CanMercBeHired()
}
BOOLEAN DisplaySnowBackground()
{
UINT32 uiCurrentTime = 0;
+10 -3
View File
@@ -886,23 +886,30 @@ void MercComplainAboutEquipment( UINT8 ubProfile )
ubProfile = LARRY_NORMAL;
}
}
// Are we dead/ does merc still exist?
pSoldier = FindSoldierByProfileID( ubProfile, FALSE );
if ( pSoldier != NULL )
if ( pSoldier != NULL && pSoldier->stats.bLife >= OKLIFE )
{
if ( pSoldier->stats.bLife >= OKLIFE && pSoldier->flags.fMercAsleep != TRUE && pSoldier->bAssignment < ON_DUTY )
if ( pSoldier->flags.fMercAsleep != TRUE && pSoldier->bAssignment < ON_DUTY )
{
//ATE: Double check that this problem still exists!
if ( SoldierHasWorseEquipmentThanUsedTo( pSoldier ) )
{
// Say quote!
TacticalCharacterDialogue( pSoldier, QUOTE_WHINE_EQUIPMENT );
// anv: morale hit
HandleMoraleEvent( pSoldier, MORALE_BAD_EQUIPMENT, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
ModifyPlayerReputation(REPUTATION_TOWN_LOST);
ModifyPlayerReputation( REPUTATION_TOWN_LOST );
}
}
// if we can't complain right now, do it later
else
{
AddStrategicEvent( EVENT_MERC_COMPLAIN_EQUIPMENT, GetWorldTotalMin( ) + 60, ubProfile );
}
}
}
+1 -1
View File
@@ -23164,7 +23164,7 @@ BOOLEAN ApplyConsumable( SOLDIERTYPE* pSoldier, OBJECTTYPE *pObj, BOOLEAN fForce
if ( Item[pObj->usItem].cigarette && pSoldier->GetBackgroundValue( BG_SMOKERTYPE ) == 2 )
{
// merc gets slightly pissed by the player even suggesting this
TacticalCharacterDialogue( pSoldier, QUOTE_PRE_NOT_SMART );
TacticalCharacterDialogue( pSoldier, QUOTE_POST_NOT_SMART );
pSoldier->aiData.bMorale = max( 0, pSoldier->aiData.bMorale - 1 );
return FALSE;