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:
+12
-3
@@ -49,6 +49,10 @@
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
#include "email.h"
|
||||
#include "mercs.h"
|
||||
|
||||
@@ -1293,7 +1297,9 @@ void HandleUnhiredMercDeaths( INT32 iProfileID )
|
||||
// then we're not allowed to kill him (to avoid really pissing off player by killing his very favorite merc)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
ubMaxDeaths = zDeffSetting[gGameOptions.ubDifficultyLevel].iMaxMercDeaths;
|
||||
#else
|
||||
// how many in total can be killed like this depends on player's difficulty setting
|
||||
switch( gGameOptions.ubDifficultyLevel )
|
||||
{
|
||||
@@ -1314,7 +1320,7 @@ void HandleUnhiredMercDeaths( INT32 iProfileID )
|
||||
ubMaxDeaths = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
// if we've already hit the limit in this game, skip these checks
|
||||
if (gStrategicStatus.ubUnhiredMercDeaths >= ubMaxDeaths)
|
||||
{
|
||||
@@ -1613,6 +1619,9 @@ UINT8 CurrentPlayerProgressPercentage(void)
|
||||
|
||||
// kills per point depends on difficulty, and should match the ratios of starting enemy populations (730/1050/1500)
|
||||
// HEADROCK HAM 3: Externalized all four Kills-per-point ratios.
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
ubKillsPerPoint = zDeffSetting[gGameOptions.ubDifficultyLevel].iNumKillsPerProgressPoint;
|
||||
#else
|
||||
switch( gGameOptions.ubDifficultyLevel )
|
||||
{
|
||||
case DIF_LEVEL_EASY:
|
||||
@@ -1632,7 +1641,7 @@ UINT8 CurrentPlayerProgressPercentage(void)
|
||||
ubKillsPerPoint = 10;
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
usKillsProgress = gStrategicStatus.usPlayerKills / ubKillsPerPoint;
|
||||
if (usKillsProgress > usMaxKillsProgress)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user