mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10: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:
@@ -18,6 +18,9 @@
|
||||
#include "SaveLoadGame.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
STRATEGIC_STATUS gStrategicStatus;
|
||||
|
||||
@@ -217,13 +220,37 @@ void UpdateLastDayOfPlayerActivity( UINT16 usDay )
|
||||
|
||||
UINT8 LackOfProgressTolerance( void )
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 iTolerance;
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
if ( gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD || gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
|
||||
#else
|
||||
if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_HARD )
|
||||
#endif
|
||||
{
|
||||
// give an EXTRA day over normal
|
||||
return( 7 - DIF_LEVEL_MEDIUM + gStrategicStatus.ubHighestProgress / 42 );
|
||||
}
|
||||
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
iTolerance = 1;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_MEDIUM )
|
||||
iTolerance = 2;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD )
|
||||
iTolerance = 3;
|
||||
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
|
||||
iTolerance = 4;
|
||||
else
|
||||
iTolerance = 1;
|
||||
|
||||
return( 6 - iTolerance + gStrategicStatus.ubHighestProgress / 42 );
|
||||
|
||||
#else
|
||||
return( 6 - gGameOptions.ubDifficultyLevel + gStrategicStatus.ubHighestProgress / 42 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user