mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- New feature: sector fortification allows to construct structures in sectors in a much easier way than by using amerc to build 'by hand'. Fortification nodes are in a subfolder in Profiles and can easily be altered and exchanged, even in an ongoing game.
Fully savegame compatible. GameDir >= r2296 is recommended, but not required. - Cleaned up cover display functions. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8094 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -18965,6 +18965,25 @@ BOOLEAN SOLDIERTYPE::IsCrouchedAgainstCoverFromDir( UINT8 aDirection )
|
||||
}
|
||||
|
||||
|
||||
// Flugente: fortification
|
||||
FLOAT SOLDIERTYPE::GetConstructionPoints( )
|
||||
{
|
||||
if ( this->stats.bLife < OKLIFE || this->flags.fMercAsleep || this->bCollapsed || (this->usSoldierFlagMask & SOLDIER_POW) )
|
||||
return 0;
|
||||
|
||||
UINT32 val = EffectiveStrength( this, FALSE );
|
||||
|
||||
ReducePointsForFatigue( this, &val );
|
||||
|
||||
FLOAT dval = val;
|
||||
|
||||
dval = dval * (100 + this->GetBackgroundValue( BG_FORTIFY_ASSIGNMENT )) / 100.0f;
|
||||
|
||||
dval = (dval * this->stats.bLife / this->stats.bLifeMax);
|
||||
|
||||
return dval;
|
||||
}
|
||||
|
||||
INT32 CheckBleeding( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT8 bBandaged; //,savedOurTurn;
|
||||
@@ -22773,13 +22792,13 @@ void HandleVolunteerRecruitment( SOLDIERTYPE* pRecruiter, SOLDIERTYPE* pTarget )
|
||||
}
|
||||
|
||||
// several factors determine whether we can successfully recruit this guy
|
||||
FLOAT leadershipfactor = EffectiveLeadership( pRecruiter ) / 100.0;
|
||||
FLOAT leadershipfactor = EffectiveLeadership( pRecruiter ) / 100.0f;
|
||||
|
||||
// bonus for assertive characters
|
||||
if ( DoesMercHavePersonality( pRecruiter, CHAR_TRAIT_ASSERTIVE ) )
|
||||
leadershipfactor *= 1.05;
|
||||
|
||||
FLOAT recruitmodifier = (100 + pRecruiter->GetBackgroundValue( BG_PERC_APPROACH_RECRUIT )) / 100.0;
|
||||
FLOAT recruitmodifier = (100 + pRecruiter->GetBackgroundValue( BG_PERC_APPROACH_RECRUIT )) / 100.0f;
|
||||
|
||||
FLOAT rating = leadershipfactor * recruitmodifier * gMercProfiles[pRecruiter->ubProfile].usApproachFactor[3];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user