New feature: turncoats can be created from enemies and ordered to switch sides

Requires GameDir >= r2535

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360191&#msg_360191

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8811 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2020-05-30 00:13:42 +00:00
parent 0f13599775
commit c5022fa1e5
44 changed files with 1587 additions and 140 deletions
+30
View File
@@ -6636,6 +6636,15 @@ UINT32 WhatPlayerKnowsAboutEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
fCount = TRUE;
}
}
// Flugente: turncoats allow vision as well
if ( gSkillTraitValues.fCOTurncoats
&& TurncoatsInSector( sSectorX, sSectorY ) )
{
fDetection = TRUE;
fCount = TRUE;
fDirection = TRUE;
}
// Flugente: we can buy info on enemy groups with intel
GetInfoFromGroupsInSector( sSectorX, sSectorY, ENEMY_TEAM, fDetection, fCount, fDirection );
@@ -8466,6 +8475,27 @@ void DetermineMapIntelData( INT32 asSectorZ )
}
}
}
// Flugente: turncoats
if ( gSkillTraitValues.fCOTurncoats )
{
for ( UINT16 sector = 0; sector < 256; ++sector )
{
CorrectTurncoatCount( SECTORX( sector ), SECTORY( sector ) );
UINT16 numturncoats = NumTurncoatsOfClassInSector( SECTORX( sector ), SECTORY( sector ), SOLDIER_CLASS_ADMINISTRATOR )
+ NumTurncoatsOfClassInSector( SECTORX( sector ), SECTORY( sector ), SOLDIER_CLASS_ARMY )
+ NumTurncoatsOfClassInSector( SECTORX( sector ), SECTORY( sector ), SOLDIER_CLASS_ELITE );
if ( numturncoats )
{
CHAR16 str[128];
swprintf( str, szTurncoatText[9], numturncoats );
AddIntelAndQuestMapDataForSector( SECTORX( sector ), SECTORY( sector ), -1, 23, str, L"" );
}
}
}
}
// add lua data