mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New Feature: 2 new Iron Man game modes (by anv)
- Selectable at campaign start under "Extra Difficulty" label - Soft Iron Man: No saving when in turn-based combat. Can save with enemies around (in sector) but only if still in real-time mode. - Extreme Iron Man: No saving, except punctually at midnight - save screen opens by itself, so Player won't accidentally miss saving time window. Besides Player's save, game will be auto-saved at midnight too if auto-saving is on. - New ja2_options.ini values for Extreme Iron Man setting: EXTREME_IRON_MAN_SAVING_TIME_NOTIFICATION, git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7167 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+16
-3
@@ -664,7 +664,8 @@ void InitGameOptions()
|
||||
|
||||
gGameOptions.fTurnTimeLimit = FALSE;
|
||||
gGameOptions.fIronManMode = FALSE;
|
||||
|
||||
gGameOptions.ubIronManMode = 0;
|
||||
|
||||
// following added by SANDRO
|
||||
gGameOptions.ubMaxIMPCharacters = (gGameExternalOptions.iIMPMaleCharacterCount + gGameExternalOptions.iIMPFemaleCharacterCount);
|
||||
|
||||
@@ -1692,6 +1693,9 @@ void LoadGameExternalOptions()
|
||||
|
||||
gGameExternalOptions.fDisableStrategicTransition = iniReader.ReadBoolean("Strategic Interface Settings","DISABLE_STRATEGIC_TRANSITION", FALSE);
|
||||
|
||||
gGameExternalOptions.ubExtremeIronManSavingTimeNotification = iniReader.ReadInteger("Strategic Interface Settings","EXTREME_IRON_MAN_SAVING_TIME_NOTIFICATION", 1, 0, 2);
|
||||
gGameExternalOptions.ubExtremeIronManSavingHour = iniReader.ReadInteger("Strategic Interface Settings","EXTREME_IRON_MAN_SAVING_HOUR", 0, 0, 23);
|
||||
|
||||
//################# Strategic Progress Settings ##################
|
||||
|
||||
// WDS: Game progress
|
||||
@@ -4044,7 +4048,7 @@ BOOLEAN CanGameBeSaved()
|
||||
if( gGameOptions.fIronManMode )
|
||||
{
|
||||
//if we are in turn based combat
|
||||
if( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||
if( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT) && gGameOptions.ubIronManMode < 3 )
|
||||
{
|
||||
//no save for you
|
||||
return( FALSE );
|
||||
@@ -4053,7 +4057,16 @@ BOOLEAN CanGameBeSaved()
|
||||
//if there are enemies in the current sector
|
||||
if( gWorldSectorX != -1 && gWorldSectorY != -1 &&
|
||||
gWorldSectorX != 0 && gWorldSectorY != 0 &&
|
||||
NumEnemiesInAnySector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) > 0 )
|
||||
NumEnemiesInAnySector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) > 0
|
||||
&& gGameOptions.ubIronManMode < 2 )
|
||||
{
|
||||
//no save for you
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if( gGameOptions.ubIronManMode == 3 &&
|
||||
( GetWorldHour() != gGameExternalOptions.ubExtremeIronManSavingHour ||
|
||||
guiMin != 0 ) )
|
||||
{
|
||||
//no save for you
|
||||
return( FALSE );
|
||||
|
||||
Reference in New Issue
Block a user