mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
Externalized Difficulty Settings
- Removed #ifdef DIFFICULTY_SETTING. Now the new difficulty settings code is always active (by Jazz) - Removed unused INI reading settings These parameters were moved to the file DifficultySettings.xml. ** Ja2_Options.INI ** ENEMY_AP_BONUS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE NUM_KILLS_PER_PROGRESS_POINT_NOVICE , _EXPERIENCED, _EXPERT, _INSANE INITIAL_GARRISON_PERCENTAGES_NOVICE , _EXPERIENCED, _EXPERT, _INSANE MIN_ENEMY_GROUP_SIZE_NOVICE , _EXPERIENCED, _EXPERT, _INSANE UNLIMITED_POOL_OF_TROOPS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEENS_INITIAL_POOL_OF_TROOPS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE ENEMY_STARTING_ALERT_LEVEL_NOVICE , _EXPERIENCED, _EXPERT, _INSANE ENEMY_ALERT_DECAY_NOVICE , _EXPERIENCED, _EXPERT, _INSANE NUM_AWARE_BATTLES_NOVICE , _EXPERIENCED, _EXPERT, _INSANE BASE_DELAY_IN_MINUTES_BETWEEN_EVALUATIONS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE EVALUATION_DELAY_VARIANCE_NOVICE , _EXPERIENCED, _EXPERT, _INSANE GRACE_PERIOD_IN_HOURS_AFTER_SECTOR_LIBERATION_NOVICE , _EXPERIENCED, _EXPERT, _INSANE GRACE_PERIOD_IN_DAYS_AFTER_PATROL_DESTROYED_NOVICE , _EXPERIENCED, _EXPERT, _INSANE AGGRESSIVE_QUEEN_AI_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_POOL_INCREMENT_PER_DIFFICULTY_LEVEL PERCENT_EXTRA_ELITES_EXPERIENCED , _EXPERT, _INSANE MAX_MERC_DEATHS_EASY , _EXPERIENCED, _EXPERT, _INSANE ** Creatures_Settings.INI ** CREATURE_SPREAD_TIME_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_REPRODUCTION_BASE_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_REPRODUCTION_BONUS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_INIT_BONUS_SPREAD_NOVICE , _EXPERIENCED, _EXPERT, _INSANE CREATURE_POPULATION_MODIFIER_NOVICE , _EXPERIENCED, _EXPERT, _INSANE CREATURE_TOWN_AGGRESSIVENESS_NOVICE , _EXPERIENCED, _EXPERT, _INSANE QUEEN_POOL_INCREMENT_PER_DIFFICULTY_LEVEL ** CTHConstants.ini ** BASE_DIFFICULTY_NOVICE , _EXPERIENCED, _EXPERT, _INSANE AIM_DIFFICULTY_NOVICE , _EXPERIENCED, _EXPERT, _INSANE git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7461 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -33,9 +33,7 @@
|
||||
#include "meanwhile.h"
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
#define SCRIPT_DELAY 10
|
||||
#define AIR_RAID_SAY_QUOTE_TIME 3000
|
||||
@@ -514,11 +512,8 @@ void AirRaidLookForDive( )
|
||||
{
|
||||
// If we are are beginning game, only do gun dives..
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
if ( gAirRaidDef.uiFlags & AIR_RAID_BEGINNING_GAME && zDeffSetting[gGameOptions.ubDifficultyLevel].bAirRaidLookForDive == FALSE)
|
||||
#else
|
||||
if ( gAirRaidDef.uiFlags & AIR_RAID_BEGINNING_GAME && gGameOptions.ubDifficultyLevel < DIF_LEVEL_HARD )
|
||||
#endif
|
||||
//if ( gAirRaidDef.uiFlags & AIR_RAID_BEGINNING_GAME && gGameOptions.ubDifficultyLevel < DIF_LEVEL_HARD )
|
||||
{
|
||||
if ( gbNumDives == 0 )
|
||||
{
|
||||
|
||||
@@ -49,9 +49,7 @@
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
#include "email.h"
|
||||
#include "mercs.h"
|
||||
@@ -1297,9 +1295,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 )
|
||||
{
|
||||
@@ -1320,7 +1318,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)
|
||||
{
|
||||
@@ -1619,9 +1617,8 @@ 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:
|
||||
@@ -1641,7 +1638,7 @@ UINT8 CurrentPlayerProgressPercentage(void)
|
||||
ubKillsPerPoint = 10;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
usKillsProgress = gStrategicStatus.usPlayerKills / ubKillsPerPoint;
|
||||
if (usKillsProgress > usMaxKillsProgress)
|
||||
{
|
||||
|
||||
@@ -57,10 +57,7 @@
|
||||
#include "structure.h"
|
||||
#include "Explosion Control.h"
|
||||
#include "ub_config.h"
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
@@ -1551,8 +1548,8 @@ void HandleJa25EnemyExpLevelModifier( )
|
||||
}
|
||||
}
|
||||
break;
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
default:
|
||||
|
||||
default:
|
||||
//Get the 2nd highest player exp level
|
||||
bPlayerExpLevel = JA25SecondHighestExpLevelOnPlayersTeam( );
|
||||
|
||||
@@ -1575,7 +1572,6 @@ void HandleJa25EnemyExpLevelModifier( )
|
||||
Ja25ScaleAllEnemiesByValue( bDifference );
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1827,23 +1823,8 @@ void HandleInitialEventsInHeliCrash()
|
||||
UINT32 GetNumberOfTurnsPowerGenFanWillBeStoppedFor()
|
||||
{
|
||||
UINT32 uiNumTurns = PGF__NUM_TURNS_TILL_START_FAN_BACK_UP_EASY;
|
||||
uiNumTurns = zDeffSetting[gGameOptions.ubDifficultyLevel].iGetNumberOfTurnsPowerGenFanWillBeStoppedFor;
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
uiNumTurns = zDeffSetting[gGameOptions.ubDifficultyLevel].iGetNumberOfTurnsPowerGenFanWillBeStoppedFor;
|
||||
#else
|
||||
switch( gGameOptions.ubDifficultyLevel )
|
||||
{
|
||||
case DIF_LEVEL_EASY:
|
||||
uiNumTurns = PGF__NUM_TURNS_TILL_START_FAN_BACK_UP_EASY;
|
||||
break;
|
||||
case DIF_LEVEL_MEDIUM:
|
||||
uiNumTurns = PGF__NUM_TURNS_TILL_START_FAN_BACK_UP_NORMAL;
|
||||
break;
|
||||
case DIF_LEVEL_HARD:
|
||||
uiNumTurns = PGF__NUM_TURNS_TILL_START_FAN_BACK_UP_HARD;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return( uiNumTurns );
|
||||
}
|
||||
|
||||
|
||||
+3
-11
@@ -55,9 +55,7 @@
|
||||
#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;
|
||||
@@ -2221,7 +2219,6 @@ 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;
|
||||
@@ -2234,10 +2231,8 @@ INT32 SoldierToSoldierLineOfSightTest( SOLDIERTYPE * pStartSoldier, SOLDIERTYPE
|
||||
else
|
||||
DiffLev = 1;
|
||||
|
||||
if (gBloodcatPlacements[ ubSectorID ][ DiffLev-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
#else
|
||||
if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
#endif
|
||||
if (gBloodcatPlacements[ ubSectorID ][ DiffLev-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
//if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
{
|
||||
// skip sight between army & bloodcats
|
||||
if ( pStartSoldier->bTeam == ENEMY_TEAM && pEndSoldier->bTeam == CREATURE_TEAM && pEndSoldier->ubBodyType == BLOODCAT )
|
||||
@@ -2249,11 +2244,8 @@ 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
|
||||
//else if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
{
|
||||
// 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)
|
||||
|
||||
+8
-16
@@ -134,9 +134,7 @@
|
||||
#endif
|
||||
|
||||
#include "XML.h"
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
// OJW - 20090419
|
||||
UINT8 giMAXIMUM_NUMBER_OF_PLAYER_MERCS = CODE_MAXIMUM_NUMBER_OF_PLAYER_MERCS;
|
||||
@@ -4355,7 +4353,6 @@ SOLDIERTYPE * CivilianGroupMemberChangesSides( SOLDIERTYPE * pAttacked )
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.6: If this sector has affiliated bloodcats, make them all hostile.
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -4369,10 +4366,10 @@ SOLDIERTYPE * CivilianGroupMemberChangesSides( SOLDIERTYPE * pAttacked )
|
||||
DiffLevel = 1;
|
||||
if ( gBloodcatPlacements[SECTOR(pNewAttacked->sSectorX,pNewAttacked->sSectorY)][0].PlacementType == BLOODCAT_PLACEMENT_STATIC &&
|
||||
gBloodcatPlacements[SECTOR(pNewAttacked->sSectorX,pNewAttacked->sSectorY)][ DiffLevel-1 ].ubFactionAffiliation == pNewAttacked->ubCivilianGroup )
|
||||
#else
|
||||
/*
|
||||
if ( gBloodcatPlacements[SECTOR(pNewAttacked->sSectorX,pNewAttacked->sSectorY)][0].PlacementType == BLOODCAT_PLACEMENT_STATIC &&
|
||||
gBloodcatPlacements[SECTOR(pNewAttacked->sSectorX,pNewAttacked->sSectorY)][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == pNewAttacked->ubCivilianGroup )
|
||||
#endif
|
||||
*/
|
||||
{
|
||||
MakeBloodcatsHostile();
|
||||
}
|
||||
@@ -8872,7 +8869,6 @@ BOOLEAN ProcessImplicationsOfPCAttack( SOLDIERTYPE * pSoldier, SOLDIERTYPE ** pp
|
||||
// Attacked a bloodcat.
|
||||
MakeBloodcatsHostile();
|
||||
// Are bloodcats in this sector affiliated with a faction?
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -8887,15 +8883,14 @@ BOOLEAN ProcessImplicationsOfPCAttack( SOLDIERTYPE * pSoldier, SOLDIERTYPE ** pp
|
||||
|
||||
if ( gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][0].PlacementType == BLOODCAT_PLACEMENT_STATIC &&
|
||||
gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][ DiffLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP )
|
||||
#else
|
||||
/*
|
||||
if ( gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][0].PlacementType == BLOODCAT_PLACEMENT_STATIC &&
|
||||
gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP )
|
||||
#endif
|
||||
*/
|
||||
{
|
||||
// Temporarily change bloodcat's civilian group
|
||||
UINT8 ubFaction = pTarget->ubCivilianGroup;
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel2;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel2 = 1;
|
||||
@@ -8909,9 +8904,7 @@ BOOLEAN ProcessImplicationsOfPCAttack( SOLDIERTYPE * pSoldier, SOLDIERTYPE ** pp
|
||||
DiffLevel2 = 1;
|
||||
|
||||
pTarget->ubCivilianGroup = gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][ DiffLevel2-1 ].ubFactionAffiliation;
|
||||
#else
|
||||
pTarget->ubCivilianGroup = gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation;
|
||||
#endif
|
||||
// pTarget->ubCivilianGroup = gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation;
|
||||
// Make entire faction hostile
|
||||
CivilianGroupMembersChangeSidesWithinProximity( pTarget );
|
||||
// Change back
|
||||
@@ -8962,7 +8955,6 @@ BOOLEAN ProcessImplicationsOfPCAttack( SOLDIERTYPE * pSoldier, SOLDIERTYPE ** pp
|
||||
CivilianGroupMembersChangeSidesWithinProximity( pTarget );
|
||||
|
||||
// HEADROCK HAM 3.6: If there are bloodcats affiliated with his group...
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -8977,10 +8969,10 @@ BOOLEAN ProcessImplicationsOfPCAttack( SOLDIERTYPE * pSoldier, SOLDIERTYPE ** pp
|
||||
|
||||
if ( gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][0].PlacementType == BLOODCAT_PLACEMENT_STATIC &&
|
||||
gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][ DiffLevel-1 ].ubFactionAffiliation == pTarget->ubCivilianGroup )
|
||||
#else
|
||||
if ( gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][0].PlacementType == BLOODCAT_PLACEMENT_STATIC &&
|
||||
/*
|
||||
if ( gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][0].PlacementType == BLOODCAT_PLACEMENT_STATIC &&
|
||||
gBloodcatPlacements[SECTOR(pTarget->sSectorX,pTarget->sSectorY)][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == pTarget->ubCivilianGroup )
|
||||
#endif
|
||||
*/
|
||||
{
|
||||
// Make them hostile.
|
||||
MakeBloodcatsHostile();
|
||||
|
||||
+1
-9
@@ -42,9 +42,7 @@
|
||||
#endif
|
||||
#include "connect.h"
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
//rain
|
||||
//#define BREATH_GAIN_REDUCTION_PER_RAIN_INTENSITY 25
|
||||
@@ -1392,11 +1390,9 @@ void UnusedAPsToBreath( SOLDIERTYPE * pSoldier )
|
||||
case DIF_LEVEL_INSANE:
|
||||
sBreathPerAP *= 6/5; // +20%
|
||||
break;
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
default:
|
||||
sBreathPerAP *= 9/10; // -10%
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
// SANDRO: this simple thing is the correct calculation
|
||||
@@ -4322,11 +4318,9 @@ INT32 GetBPCostPer10APsForGunHolding( SOLDIERTYPE * pSoldier, BOOLEAN fEstimate
|
||||
case DIF_LEVEL_INSANE:
|
||||
iBPcost /= 2; // -50%
|
||||
break;
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
default:
|
||||
iBPcost = (iBPcost * 9)/10; // -10%
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4491,11 +4485,9 @@ INT32 GetBPCostForRecoilkick( SOLDIERTYPE * pSoldier )
|
||||
case DIF_LEVEL_INSANE:
|
||||
iKickPower /= 2; // -50%
|
||||
break;
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
default:
|
||||
default:
|
||||
iKickPower = (iKickPower * 9)/10; // -10%
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,9 +51,7 @@
|
||||
|
||||
#include "Animation Control.h"
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
@@ -980,7 +978,6 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
||||
{
|
||||
gTacticalStatus.fLockItemLocators = FALSE;
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -993,9 +990,7 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
||||
else
|
||||
DiffLevel = 1;
|
||||
ubNumGoo = 6 - ( DiffLevel - DIF_LEVEL_EASY );
|
||||
#else
|
||||
ubNumGoo = 6 - ( gGameOptions.ubDifficultyLevel - DIF_LEVEL_EASY );
|
||||
#endif
|
||||
//ubNumGoo = 6 - ( gGameOptions.ubDifficultyLevel - DIF_LEVEL_EASY );
|
||||
|
||||
sNewGridNo = pSoldier->sGridNo + ( WORLD_COLS * 2 );
|
||||
|
||||
|
||||
@@ -103,9 +103,7 @@
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
#include "fresh_header.h"
|
||||
|
||||
@@ -2065,9 +2063,8 @@ INT16 SOLDIERTYPE::CalcActionPoints( void )
|
||||
//if ( this->bTeam != CIV_TEAM && this->bTeam != gbPlayerNum)
|
||||
if ( this->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
ubPoints += zDeffSetting[gGameOptions.ubDifficultyLevel].iEnemyAPBonus;
|
||||
#else
|
||||
/*
|
||||
switch( gGameOptions.ubDifficultyLevel )
|
||||
{
|
||||
case DIF_LEVEL_EASY:
|
||||
@@ -2093,7 +2090,7 @@ INT16 SOLDIERTYPE::CalcActionPoints( void )
|
||||
default:
|
||||
ubPoints += 0;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
// Bonus to Militia APs
|
||||
else if ( this->bTeam == MILITIA_TEAM )
|
||||
@@ -2202,9 +2199,8 @@ void SOLDIERTYPE::CalcNewActionPoints( void )
|
||||
}
|
||||
if ( this->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
usMaxActionPnts += zDeffSetting[gGameOptions.ubDifficultyLevel].iEnemyAPBonus;
|
||||
#else
|
||||
/*
|
||||
switch( gGameOptions.ubDifficultyLevel )
|
||||
{
|
||||
case DIF_LEVEL_EASY:
|
||||
@@ -2220,7 +2216,7 @@ void SOLDIERTYPE::CalcNewActionPoints( void )
|
||||
usMaxActionPnts += gGameExternalOptions.iInsaneAPBonus;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
// Bonus to Militia APs
|
||||
else if ( this->bTeam == MILITIA_TEAM )
|
||||
|
||||
@@ -56,9 +56,7 @@
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
// THESE 3 DIFFICULTY FACTORS MUST ALWAYS ADD UP TO 100% EXACTLY!!!
|
||||
#define DIFF_FACTOR_PLAYER_PROGRESS 50
|
||||
@@ -2218,12 +2216,10 @@ INT8 CalcDifficultyModifier( UINT8 ubSoldierClass )
|
||||
bDiffModifier += (INT8)(DIFF_FACTOR_GAME_DIFFICULTY * 1.5);
|
||||
}
|
||||
break;
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
default:
|
||||
// equally strong militia, enemies, creatures, bloodcats (+10)
|
||||
bDiffModifier += ( DIFF_FACTOR_GAME_DIFFICULTY / 2 );
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -2483,7 +2479,6 @@ void CreateDetailedPlacementGivenBasicPlacementInfo( SOLDIERCREATE_STRUCT *pp, B
|
||||
if( PlacementType == BLOODCAT_PLACEMENT_LAIR )
|
||||
{
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -2499,9 +2494,7 @@ void CreateDetailedPlacementGivenBasicPlacementInfo( SOLDIERCREATE_STRUCT *pp, B
|
||||
if (DiffLevel == 0) DiffLevel = 1;
|
||||
}
|
||||
pp->bExpLevel += DiffLevel;
|
||||
#else
|
||||
pp->bExpLevel += gGameOptions.ubDifficultyLevel;
|
||||
#endif
|
||||
//pp->bExpLevel += gGameOptions.ubDifficultyLevel;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2528,7 +2521,6 @@ void CreateDetailedPlacementGivenBasicPlacementInfo( SOLDIERCREATE_STRUCT *pp, B
|
||||
|
||||
ubStatsLevel = pp->bExpLevel + bStatsModifier;
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -2544,9 +2536,8 @@ void CreateDetailedPlacementGivenBasicPlacementInfo( SOLDIERCREATE_STRUCT *pp, B
|
||||
if (DiffLevel == 0) DiffLevel = 1;
|
||||
}
|
||||
ubStatsLevel = max( DiffLevel, ubStatsLevel ); //minimum stats level of 0 -- madd->= dif level
|
||||
#else
|
||||
ubStatsLevel = max( gGameOptions.ubDifficultyLevel, ubStatsLevel ); //minimum stats level of 0 -- madd->= dif level
|
||||
#endif
|
||||
//ubStatsLevel = max( gGameOptions.ubDifficultyLevel, ubStatsLevel ); //minimum stats level of 0 -- madd->= dif level
|
||||
|
||||
if ( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
|
||||
ubStatsLevel = max( 6, ubStatsLevel ); //minimum stats level of 6 in insane
|
||||
|
||||
|
||||
+4
-18
@@ -61,9 +61,7 @@ class SOLDIERTYPE;
|
||||
// anv: for taunts on miss
|
||||
#include "Civ Quotes.h"
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
//rain
|
||||
//#define WEAPON_RELIABILITY_REDUCTION_PER_RAIN_INTENSITY 0
|
||||
@@ -5935,11 +5933,8 @@ else
|
||||
// GAME DIFFICULTY
|
||||
if ( !(pSoldier->flags.uiStatusFlags & SOLDIER_PC ) && (pSoldier->bSide != gbPlayerNum) )
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
iBaseModifier += zDeffSetting[gGameOptions.ubDifficultyLevel].NewDifficualtySetingsBASE_DIFFICULTY;
|
||||
#else
|
||||
iBaseModifier += gGameCTHConstants.BASE_DIFFICULTY[gGameOptions.ubDifficultyLevel];
|
||||
#endif
|
||||
//iBaseModifier += gGameCTHConstants.BASE_DIFFICULTY[gGameOptions.ubDifficultyLevel];
|
||||
}
|
||||
|
||||
// Percentage based-modifier from the weapon and its attachments
|
||||
@@ -6272,11 +6267,8 @@ else
|
||||
// GAME DIFFICULTY
|
||||
if ( !(pSoldier->flags.uiStatusFlags & SOLDIER_PC ) && (pSoldier->bSide != gbPlayerNum) )
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
iAimModifier += zDeffSetting[gGameOptions.ubDifficultyLevel].NewDifficualtySetingsAIM_DIFFICULTY;
|
||||
#else
|
||||
iAimModifier += gGameCTHConstants.AIM_DIFFICULTY[gGameOptions.ubDifficultyLevel];
|
||||
#endif
|
||||
//iAimModifier += gGameCTHConstants.AIM_DIFFICULTY[gGameOptions.ubDifficultyLevel];
|
||||
}
|
||||
|
||||
// Percent modifier from the weapon and its attachments
|
||||
@@ -12876,11 +12868,8 @@ FLOAT CalcNewChanceToHitBaseSpecialBonus(SOLDIERTYPE *pSoldier)
|
||||
// GAME DIFFICULTY
|
||||
if ( !(pSoldier->flags.uiStatusFlags & SOLDIER_PC ) && (pSoldier->bSide != gbPlayerNum) )
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
fBaseModifier += zDeffSetting[gGameOptions.ubDifficultyLevel].NewDifficualtySetingsBASE_DIFFICULTY;
|
||||
#else
|
||||
fBaseModifier += gGameCTHConstants.BASE_DIFFICULTY[gGameOptions.ubDifficultyLevel];
|
||||
#endif
|
||||
//fBaseModifier += gGameCTHConstants.BASE_DIFFICULTY[gGameOptions.ubDifficultyLevel];
|
||||
}
|
||||
|
||||
return fBaseModifier;
|
||||
@@ -13179,11 +13168,8 @@ FLOAT CalcNewChanceToHitAimSpecialBonus(SOLDIERTYPE *pSoldier)
|
||||
// GAME DIFFICULTY
|
||||
if ( !(pSoldier->flags.uiStatusFlags & SOLDIER_PC ) && (pSoldier->bSide != gbPlayerNum) )
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
fAimModifier += zDeffSetting[gGameOptions.ubDifficultyLevel].NewDifficualtySetingsAIM_DIFFICULTY;
|
||||
#else
|
||||
fAimModifier += gGameCTHConstants.AIM_DIFFICULTY[gGameOptions.ubDifficultyLevel];
|
||||
#endif
|
||||
//fAimModifier += gGameCTHConstants.AIM_DIFFICULTY[gGameOptions.ubDifficultyLevel];
|
||||
}
|
||||
|
||||
return fAimModifier;
|
||||
|
||||
+1
-4
@@ -258,9 +258,7 @@ typedef PARSE_STAGE;
|
||||
|
||||
#define HISTORYNAMEFILENAME "History.xml"
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#define DIFFICULTYFILENAME "DifficultySettings.xml"
|
||||
#endif
|
||||
|
||||
extern BOOLEAN ReadInItemStats(STR fileName, BOOLEAN localizedVersion);
|
||||
extern BOOLEAN WriteItemStats();
|
||||
@@ -562,7 +560,6 @@ extern BOOLEAN ReadInLanguageLocation(STR fileName, BOOLEAN localizedVersion, LA
|
||||
extern BOOLEAN ReadInAimOldArchive(STR fileName, BOOLEAN localizedVersion);
|
||||
|
||||
extern BOOLEAN ReadInHistorys(STR fileName, BOOLEAN localizedVersion );
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
extern BOOLEAN ReadInDifficultySettings(STR fileName, BOOLEAN localizedVersion);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+10
-27
@@ -55,9 +55,7 @@
|
||||
#include "Ja25_Tactical.h"
|
||||
#endif
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
#include "GameInitOptionsScreen.h"
|
||||
#endif
|
||||
|
||||
#include "Music Control.h"
|
||||
|
||||
@@ -934,12 +932,9 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
|
||||
// revealing roofs and looking for items handled here, too
|
||||
RevealRoofsAndItems(pSoldier,TRUE, TRUE, pSoldier->pathing.bLevel, FALSE );
|
||||
}
|
||||
// unless in easy mode allow alerted enemies to radio
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
// unless in easy mode allow alerted enemies to radio
|
||||
else if ( zDeffSetting[gGameOptions.ubDifficultyLevel].bRadioSightings == TRUE )
|
||||
#else
|
||||
else if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_MEDIUM )
|
||||
#endif
|
||||
//else if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_MEDIUM )
|
||||
{
|
||||
// don't allow admins to radio
|
||||
//Madd: Huh? why not admins? removed.
|
||||
@@ -985,12 +980,9 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
|
||||
#endif
|
||||
RadioSightings(pThem,pSoldier->ubID, pThem->bTeam);
|
||||
}
|
||||
// unless in easy mode allow alerted enemies to radio
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
// unless in easy mode allow alerted enemies to radio
|
||||
else if ( zDeffSetting[gGameOptions.ubDifficultyLevel].bRadioSightings2 == TRUE )
|
||||
#else
|
||||
else if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_MEDIUM )
|
||||
#endif
|
||||
//else if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_MEDIUM )
|
||||
{
|
||||
// don't allow admins to radio
|
||||
if ( pThem->bTeam == ENEMY_TEAM && gTacticalStatus.Team[ ENEMY_TEAM ].bAwareOfOpposition && pThem->ubSoldierClass != SOLDIER_CLASS_ADMINISTRATOR )
|
||||
@@ -2515,7 +2507,6 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
||||
else if ( pOpponent->ubBodyType == BLOODCAT && pOpponent->aiData.bNeutral)
|
||||
{
|
||||
// HEADROCK HAM 3.6: If bloodcats are set as affiliated with civilians, do not trigger hostilities.
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -2531,11 +2522,11 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
||||
if ( gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ 0 ].PlacementType != BLOODCAT_PLACEMENT_STATIC ||
|
||||
gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ DiffLevel - 1 ].ubFactionAffiliation == NON_CIV_GROUP ||
|
||||
gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ DiffLevel - 1 ].ubFactionAffiliation == QUEENS_CIV_GROUP )
|
||||
#else
|
||||
/*
|
||||
if ( gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ 0 ].PlacementType != BLOODCAT_PLACEMENT_STATIC ||
|
||||
gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ gGameOptions.ubDifficultyLevel - 1 ].ubFactionAffiliation == NON_CIV_GROUP ||
|
||||
gBloodcatPlacements[SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)][ gGameOptions.ubDifficultyLevel - 1 ].ubFactionAffiliation == QUEENS_CIV_GROUP )
|
||||
#endif
|
||||
*/
|
||||
{
|
||||
MakeBloodcatsHostile();
|
||||
}
|
||||
@@ -6049,8 +6040,7 @@ void ProcessNoise(UINT8 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrTy
|
||||
// Also, there's a toggle that determines whether or not bloodcats can sense enemies in this sector.
|
||||
UINT8 ubSectorID = SECTOR(gWorldSectorX, gWorldSectorY);
|
||||
UINT8 PlacementType = gBloodcatPlacements[ ubSectorID ][0].PlacementType;
|
||||
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
|
||||
UINT8 DiffLevel;
|
||||
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
|
||||
DiffLevel = 1;
|
||||
@@ -6062,15 +6052,11 @@ void ProcessNoise(UINT8 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrTy
|
||||
DiffLevel = 4;
|
||||
else
|
||||
DiffLevel = 1;
|
||||
#endif
|
||||
|
||||
if (PlacementType == BLOODCAT_PLACEMENT_STATIC)
|
||||
{
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
if (gBloodcatPlacements[ ubSectorID ][ DiffLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
#else
|
||||
if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
#endif
|
||||
//if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation == QUEENS_CIV_GROUP)
|
||||
{
|
||||
// skip noises between army & bloodcats
|
||||
if ( pSoldier->bTeam == ENEMY_TEAM && MercPtrs[ ubNoiseMaker ]->ubBodyType == BLOODCAT && MercPtrs[ ubNoiseMaker ]->bTeam == CREATURE_TEAM )
|
||||
@@ -6081,12 +6067,9 @@ void ProcessNoise(UINT8 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrTy
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#ifdef DIFFICULTY_SETTING
|
||||
}
|
||||
else if (gBloodcatPlacements[ ubSectorID ][ DiffLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
#else
|
||||
else if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
#endif
|
||||
//else if (gBloodcatPlacements[ ubSectorID ][ gGameOptions.ubDifficultyLevel-1 ].ubFactionAffiliation > NON_CIV_GROUP)
|
||||
{
|
||||
if ( MercPtrs[ ubNoiseMaker ]->ubBodyType == BLOODCAT && MercPtrs[ ubNoiseMaker ]->bTeam == CREATURE_TEAM && pSoldier->bSide != gbPlayerNum)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user