mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user