mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Driveable Vehicles Tanks Update (by Ocular)
- New ja2_options.ini entry: TANK_MINIMUM_PROGRESS - This defines the progress (0-100), when the enemy can use tanks for attacks and patrols git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7541 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-1
@@ -2181,7 +2181,9 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.fNoRemoveRandomSectorItems = iniReader.ReadBoolean("Strategic GamePlay Settings", "NO_REMOVE_RANDOM_SECTOR_ITEMS", true, false);
|
||||
|
||||
gGameExternalOptions.fArmyUsesTanksInAttacks = iniReader.ReadBoolean("Strategic Gameplay Settings","ARMY_USES_TANKS_IN_ATTACKS", FALSE);
|
||||
gGameExternalOptions.fArmyUsesTanksInPatrols = iniReader.ReadBoolean("Strategic Gameplay Settings","ARMY_USES_TANKS_IN_PATROLS", FALSE);
|
||||
gGameExternalOptions.fArmyUsesTanksInPatrols = iniReader.ReadBoolean("Strategic Gameplay Settings","ARMY_USES_TANKS_IN_PATROLS", FALSE);
|
||||
gGameExternalOptions.usTankMinimumProgress = iniReader.ReadInteger("Strategic Gameplay Settings","TANK_MINIMUM_PROGRESS", 0, 0, 100);
|
||||
|
||||
|
||||
// WANNE: This is just a debug setting. Only in debug version we set that property to TRUE.
|
||||
// In Release version this should always be set to FALSE
|
||||
|
||||
@@ -773,6 +773,7 @@ typedef struct
|
||||
|
||||
BOOLEAN fArmyUsesTanksInAttacks;
|
||||
BOOLEAN fArmyUsesTanksInPatrols;
|
||||
UINT8 usTankMinimumProgress;
|
||||
|
||||
// WANNE: Always use "prof.dat".
|
||||
BOOLEAN fUseDifficultyBasedProfDat;
|
||||
|
||||
@@ -1504,7 +1504,7 @@ void InitStrategicAI()
|
||||
ubNumTroops = (UINT8)max( gubMinEnemyGroupSize, min( iMaxEnemyGroupSize, ubNumTroops ) );
|
||||
ubNumTanks = 0;
|
||||
|
||||
if( ubNumTroops && gGameExternalOptions.fArmyUsesTanksInPatrols )
|
||||
if( ubNumTroops && gGameExternalOptions.fArmyUsesTanksInPatrols && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
|
||||
{
|
||||
|
||||
UINT32 val2;
|
||||
@@ -4503,7 +4503,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
{
|
||||
grouptroops[ubCounter] = ubNumSoldiers;
|
||||
grouptanks[ubCounter] = 0;
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
|
||||
{
|
||||
if( Random(10) < val )
|
||||
//if( Random(10) < gGameOptions.ubDifficultyLevel )
|
||||
@@ -4588,7 +4588,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
{
|
||||
grouptroops[ubCounter] = ubNumSoldiers;
|
||||
grouptanks[ubCounter] = 0;
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
|
||||
{
|
||||
if( Random(10) < gGameOptions.ubDifficultyLevel )
|
||||
// if( Random(10) < value )
|
||||
@@ -4797,7 +4797,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + value2 * 3);
|
||||
//ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + gGameOptions.ubDifficultyLevel * 3);
|
||||
// anv: replace one of soldiers with tank
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
|
||||
{
|
||||
ubNumSoldiers--;
|
||||
ubNumTanks++;
|
||||
@@ -5061,7 +5061,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + value4 * 4);
|
||||
//ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + gGameOptions.ubDifficultyLevel * 4);
|
||||
// anv: replace one of soldiers with tank
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
|
||||
{
|
||||
if( Random( 10 ) < value4 )
|
||||
//if( Random( 10 ) < gGameOptions.ubDifficultyLevel )
|
||||
@@ -5188,7 +5188,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
}
|
||||
Assert(adminsThisSquad + troopsThisSquad + elitesThisSquad == soldiersThisSquad);
|
||||
// anv: replace one of soldiers with tank
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
|
||||
{
|
||||
|
||||
if( Random( 10 * 100 ) < value5 * direness )
|
||||
@@ -5345,7 +5345,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
giReinforcementPool -= ubNumSoldiers;
|
||||
|
||||
// anv: replace one of soldiers with tank
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks )
|
||||
if( ubNumSoldiers && gGameExternalOptions.fArmyUsesTanksInAttacks && HighestPlayerProgressPercentage() >= gGameExternalOptions.usTankMinimumProgress )
|
||||
{
|
||||
if( Random( 10 * 100 ) < value7 * HighestPlayerProgressPercentage() )
|
||||
//if( Random( 10 * 100 ) < gGameOptions.ubDifficultyLevel * HighestPlayerProgressPercentage() )
|
||||
|
||||
Reference in New Issue
Block a user