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:
@@ -24,6 +24,10 @@
|
||||
|
||||
#include "UndergroundInit.h"
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
extern BOOLEAN InitStrategicMovementCosts();
|
||||
void InitKnowFacilitiesFlags( );
|
||||
|
||||
@@ -428,6 +432,9 @@ void BuildUndergroundSectorInfoList()
|
||||
|
||||
//J9
|
||||
curr = NewUndergroundNode( 9, 10, 1 );
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
curr->ubNumTroops = zDeffSetting[gGameOptions.ubDifficultyLevel].iJ9B1NumTroops;
|
||||
#else
|
||||
switch( gGameOptions.ubDifficultyLevel )
|
||||
{
|
||||
case DIF_LEVEL_EASY:
|
||||
@@ -443,22 +450,47 @@ void BuildUndergroundSectorInfoList()
|
||||
curr->ubNumTroops = 20;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
//J9 feeding zone
|
||||
curr = NewUndergroundNode( 9, 10, 2 );
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
curr->ubNumCreatures = (UINT8)(2 + zDeffSetting[gGameOptions.ubDifficultyLevel].iJ9B2NumCreatures*2 + Random( 2 ));
|
||||
#else
|
||||
curr->ubNumCreatures = (UINT8)(2 + gGameOptions.ubDifficultyLevel*2 + Random( 2 ));
|
||||
|
||||
#endif
|
||||
|
||||
//K4
|
||||
curr = NewUndergroundNode( 4, 11, 1 );
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
curr->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iK4B1NumTroops*2 + Random( 3 ));
|
||||
curr->ubNumElites = (UINT8)(4 + zDeffSetting[gGameOptions.ubDifficultyLevel].iK4B1NumElites + Random( 2 ));
|
||||
#else
|
||||
curr->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel*2 + Random( 3 ));
|
||||
curr->ubNumElites = (UINT8)(4 + gGameOptions.ubDifficultyLevel + Random( 2 ));
|
||||
|
||||
#endif
|
||||
|
||||
//O3
|
||||
curr = NewUndergroundNode( 3, 15, 1 );
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
curr->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iO3B1NumTroops*2 + Random( 3 ));
|
||||
curr->ubNumElites = (UINT8)(4 + zDeffSetting[gGameOptions.ubDifficultyLevel].iO3B1NumElites + Random( 2 ));
|
||||
#else
|
||||
curr->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel*2 + Random( 3 ));
|
||||
curr->ubNumElites = (UINT8)(4 + gGameOptions.ubDifficultyLevel + Random( 2 ));
|
||||
|
||||
#endif
|
||||
|
||||
//P3
|
||||
curr = NewUndergroundNode( 3, 16, 1 );
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
if (gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
curr->ubNumElites = (UINT8)(zDeffSetting[gGameOptions.ubDifficultyLevel].iP3B1NumElites + Random( 3 ));
|
||||
else if (gGameOptions.ubDifficultyLevel == DIF_LEVEL_MEDIUM )
|
||||
curr->ubNumElites = (UINT8)(zDeffSetting[gGameOptions.ubDifficultyLevel].iP3B1NumElites + Random( 5 ));
|
||||
else if (gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD )
|
||||
curr->ubNumElites = (UINT8)(zDeffSetting[gGameOptions.ubDifficultyLevel].iP3B1NumElites + Random( 6 ));
|
||||
else
|
||||
curr->ubNumElites = zDeffSetting[gGameOptions.ubDifficultyLevel].iP3B1NumElites;
|
||||
#else
|
||||
switch( gGameOptions.ubDifficultyLevel )
|
||||
{
|
||||
case DIF_LEVEL_EASY:
|
||||
@@ -474,7 +506,7 @@ void BuildUndergroundSectorInfoList()
|
||||
curr->ubNumElites = 20;
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
//Do all of the mandatory underground mine sectors
|
||||
|
||||
//Drassen's mine
|
||||
|
||||
Reference in New Issue
Block a user