mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New Feature: Added up to 15 game difficulty settings (by Jazz)
- Externalized the difficulty setings to "TableData\DifficultySettings.xml" file - Some INI Settings (ja2_options.ini, CTHConstants.ini and Creature_Settings.ini) moved from INI file to this xml file - see #define DIFFICULTY_SETTING git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7447 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -55,6 +55,10 @@
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "AIInternals.h"//dnl ch61 180813
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -2217,7 +2221,23 @@ INT32 SoldierToSoldierLineOfSightTest( SOLDIERTYPE * pStartSoldier, SOLDIERTYPE
|
||||
if (PlacementType == BLOODCAT_PLACEMENT_STATIC)
|
||||
{
|
||||
// Are bloodcats set to forgo attacking enemies?
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLev;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLev = 1;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_MEDIUM )
|
||||
DiffLev = 2;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD )
|
||||
DiffLev = 3;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
|
||||
DiffLev = 4;
|
||||
else
|
||||
DiffLev = 1;
|
||||
|
||||
if (gBloodcatPlacements[ ubSectorID ][ DiffLev-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
#else
|
||||
if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
#endif
|
||||
{
|
||||
// skip sight between army & bloodcats
|
||||
if ( pStartSoldier->bTeam == ENEMY_TEAM && pEndSoldier->bTeam == CREATURE_TEAM && pEndSoldier->ubBodyType == BLOODCAT )
|
||||
@@ -2229,7 +2249,11 @@ INT32 SoldierToSoldierLineOfSightTest( SOLDIERTYPE * pStartSoldier, SOLDIERTYPE
|
||||
return( 0 );
|
||||
}
|
||||
}
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
else if (gBloodcatPlacements[ ubSectorID ][ DiffLev-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
#else
|
||||
else if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
#endif
|
||||
{
|
||||
// Bloodcats in this sector belong to a faction. They adhere to certain rules as a result.
|
||||
if ( pEndSoldier->bTeam == CREATURE_TEAM && pEndSoldier->ubBodyType == BLOODCAT && pStartSoldier->bSide != gbPlayerNum)
|
||||
|
||||
Reference in New Issue
Block a user