removed obsolete code

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7464 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-08-31 20:42:20 +00:00
parent fce1904d12
commit ee27f27895
25 changed files with 126 additions and 775 deletions
+2 -45
View File
@@ -5656,29 +5656,7 @@ void HandleRadioScanInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
if ( range < 1 )
return;
UINT8 normalgroupsize = 0;
normalgroupsize = zDeffSetting[gGameOptions.ubDifficultyLevel].iMinEnemyGroupSize;
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
normalgroupsize = gGameExternalOptions.ubMinEnemyGroupSizeNovice;
break;
case DIF_LEVEL_MEDIUM:
normalgroupsize = gGameExternalOptions.ubMinEnemyGroupSizeExperienced;
break;
case DIF_LEVEL_HARD:
normalgroupsize = gGameExternalOptions.ubMinEnemyGroupSizeExpert;
break;
case DIF_LEVEL_INSANE:
default:
normalgroupsize = gGameExternalOptions.ubMinEnemyGroupSizeInsane;
break;
}
*/
normalgroupsize *= 2;
UINT16 normalgroupsize = 2 * zDeffSetting[gGameOptions.ubDifficultyLevel].iMinEnemyGroupSize;
FLOAT detect_basechance = 1.0f - pow(0.5f, numberofradiooperators);
FLOAT detect_rangefactor = .0f;
@@ -6006,28 +5984,7 @@ void HandleGatheringInformationBySoldier( SOLDIERTYPE* pSoldier )
}
}
UINT16 usNormalGroupSize = 0;
usNormalGroupSize = zDeffSetting[gGameOptions.ubDifficultyLevel].iMinEnemyGroupSize;
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
usNormalGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeNovice;
break;
case DIF_LEVEL_MEDIUM:
usNormalGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeExperienced;
break;
case DIF_LEVEL_HARD:
usNormalGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeExpert;
break;
case DIF_LEVEL_INSANE:
default:
usNormalGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeInsane;
break;
}
*/
usNormalGroupSize *= 2;
UINT16 usNormalGroupSize = 2 * zDeffSetting[gGameOptions.ubDifficultyLevel].iMinEnemyGroupSize;
FLOAT fBaseChance = ( EffectiveLeadership(pSoldier) + EffectiveWisdom(pSoldier) + EffectiveExpLevel(pSoldier) * 10 ) / 3000.0f;
+4 -43
View File
@@ -431,43 +431,20 @@ void BuildUndergroundSectorInfoList()
//J9
curr = NewUndergroundNode( 9, 10, 1 );
curr->ubNumTroops = zDeffSetting[gGameOptions.ubDifficultyLevel].iJ9B1NumTroops;
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
curr->ubNumTroops = 8;
break;
case DIF_LEVEL_MEDIUM:
curr->ubNumTroops = 11;
break;
case DIF_LEVEL_HARD:
curr->ubNumTroops = 15;
break;
case DIF_LEVEL_INSANE:
curr->ubNumTroops = 20;
break;
}
*/
//J9 feeding zone
curr = NewUndergroundNode( 9, 10, 2 );
curr->ubNumCreatures = (UINT8)(2 + zDeffSetting[gGameOptions.ubDifficultyLevel].iJ9B2NumCreatures*2 + Random( 2 ));
//curr->ubNumCreatures = (UINT8)(2 + gGameOptions.ubDifficultyLevel*2 + Random( 2 ));
curr->ubNumCreatures = (UINT8)(2 + zDeffSetting[gGameOptions.ubDifficultyLevel].iJ9B2NumCreatures*2 + Random( 2 ));
//K4
curr = NewUndergroundNode( 4, 11, 1 );
curr->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iK4B1NumTroops*2 + Random( 3 ));
curr->ubNumElites = (UINT8)(4 + zDeffSetting[gGameOptions.ubDifficultyLevel].iK4B1NumElites + Random( 2 ));
//curr->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel*2 + Random( 3 ));
//curr->ubNumElites = (UINT8)(4 + gGameOptions.ubDifficultyLevel + Random( 2 ));
//O3
curr = NewUndergroundNode( 3, 15, 1 );
curr->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iO3B1NumTroops*2 + Random( 3 ));
curr->ubNumElites = (UINT8)(4 + zDeffSetting[gGameOptions.ubDifficultyLevel].iO3B1NumElites + Random( 2 ));
//curr->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel*2 + Random( 3 ));
//curr->ubNumElites = (UINT8)(4 + gGameOptions.ubDifficultyLevel + Random( 2 ));
curr->ubNumElites = (UINT8)(4 + zDeffSetting[gGameOptions.ubDifficultyLevel].iO3B1NumElites + Random( 2 ));
//P3
curr = NewUndergroundNode( 3, 16, 1 );
@@ -479,23 +456,7 @@ void BuildUndergroundSectorInfoList()
curr->ubNumElites = (UINT8)(zDeffSetting[gGameOptions.ubDifficultyLevel].iP3B1NumElites + Random( 6 ));
else
curr->ubNumElites = zDeffSetting[gGameOptions.ubDifficultyLevel].iP3B1NumElites;
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
curr->ubNumElites = (UINT8)(8 + Random( 3 ));
break;
case DIF_LEVEL_MEDIUM:
curr->ubNumElites = (UINT8)(10 + Random( 5 ));
break;
case DIF_LEVEL_HARD:
curr->ubNumElites = (UINT8)(14 + Random( 6 ));
break;
case DIF_LEVEL_INSANE:
curr->ubNumElites = 20;
break;
}
*/
//Do all of the mandatory underground mine sectors
//Drassen's mine
+14 -135
View File
@@ -348,24 +348,7 @@ void InitCreatureQuest()
giHabitatedDistance = 0;
giPopulationModifier = zDeffSetting[gGameOptions.ubDifficultyLevel].iCreaturePopulationModifier;
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
giPopulationModifier = EASY_POPULATION_MODIFIER;
break;
case DIF_LEVEL_MEDIUM:
giPopulationModifier = NORMAL_POPULATION_MODIFIER;
break;
case DIF_LEVEL_HARD:
giPopulationModifier = HARD_POPULATION_MODIFIER;
break;
case DIF_LEVEL_INSANE:
giPopulationModifier = INSANE_POPULATION_MODIFIER;
break;
}
*/
//Determine which of the maps are infectible by creatures. Infectible mines
//are those that are player controlled and unlimited. We don't want the creatures to
//infect the mine that runs out.
@@ -410,7 +393,7 @@ void InitCreatureQuest()
*/
// determine mine infectible status in initmines.lua script
for (x = 0; x < MAX_NUMBER_OF_MINES; x++)
for (x = 0; x < MAX_NUMBER_OF_MINES; ++x)
{
if( gMineStatus[ x ].fInfectible )
{
@@ -436,7 +419,7 @@ void InitCreatureQuest()
//iNumMinesInfectible = fMineInfectible[0] + fMineInfectible[1] + fMineInfectible[2] + fMineInfectible[3];
//count actual infectible sites, use min of infectible sites defined in xml and initmines.lua script in case they do not tally
for (x = 0; x < min( NUMBER_OF_INFECTIBLE_SITES, iNumMinesInfectibleLUA ); x++)
for (x = 0; x < min( NUMBER_OF_INFECTIBLE_SITES, iNumMinesInfectibleLUA ); ++x)
{
iNumMinesInfectible += fMineInfectible[x];
}
@@ -455,14 +438,14 @@ void InitCreatureQuest()
iChosenMine = 0;
for( x = 0; x < min( NUMBER_OF_INFECTIBLE_SITES, iNumMinesInfectibleLUA ); x++ )
for( x = 0; x < min( NUMBER_OF_INFECTIBLE_SITES, iNumMinesInfectibleLUA ); ++x )
{
if( iRandom )
{
iChosenMine++;
if( fMineInfectible[x] )
{
iRandom--;
--iRandom;
}
}
}
@@ -514,30 +497,9 @@ void InitCreatureQuest()
//Now determine how often we will spread the creatures.
i = zDeffSetting[gGameOptions.ubDifficultyLevel].iQueenInitBonusSpread;
AddPeriodStrategicEvent( EVENT_CREATURE_SPREAD, zDeffSetting[gGameOptions.ubDifficultyLevel].iCreatureSpreadTime, 0 );
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
i = EASY_QUEEN_INIT_BONUS_SPREADS;
AddPeriodStrategicEvent( EVENT_CREATURE_SPREAD, EASY_SPREAD_TIME_IN_MINUTES, 0 );
break;
case DIF_LEVEL_MEDIUM:
i = NORMAL_QUEEN_INIT_BONUS_SPREADS;
AddPeriodStrategicEvent( EVENT_CREATURE_SPREAD, NORMAL_SPREAD_TIME_IN_MINUTES, 0 );
break;
case DIF_LEVEL_HARD:
i = HARD_QUEEN_INIT_BONUS_SPREADS;
AddPeriodStrategicEvent( EVENT_CREATURE_SPREAD, HARD_SPREAD_TIME_IN_MINUTES, 0 );
break;
case DIF_LEVEL_INSANE:
i = INSANE_QUEEN_INIT_BONUS_SPREADS;
AddPeriodStrategicEvent( EVENT_CREATURE_SPREAD, INSANE_SPREAD_TIME_IN_MINUTES, 0 );
break;
}
*/
i = zDeffSetting[gGameOptions.ubDifficultyLevel].iQueenInitBonusSpread;
AddPeriodStrategicEvent( EVENT_CREATURE_SPREAD, zDeffSetting[gGameOptions.ubDifficultyLevel].iCreatureSpreadTime, 0 );
//Set things up so that the creatures can plan attacks on helpless miners and civilians while
//they are sleeping. They do their planning at 10PM every day, and decide to attack sometime
//during the night.
@@ -686,8 +648,6 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"CreatureSpreading1");
void SpreadCreatures()
{
UINT16 usNewCreatures=0;
if( giLairID == -1 )
{
DecayCreatures();
@@ -695,25 +655,8 @@ void SpreadCreatures()
}
//queen just produced a litter of creature larvae. Let's do some spreading now.
usNewCreatures = (UINT16)( zDeffSetting[gGameOptions.ubDifficultyLevel].iQueenReproductionBase + Random( 1 + zDeffSetting[gGameOptions.ubDifficultyLevel].iQueenReproductionBonus ));
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
usNewCreatures = (UINT16)(EASY_QUEEN_REPRODUCTION_BASE + Random( 1 + EASY_QUEEN_REPRODUCTION_BONUS ));
break;
case DIF_LEVEL_MEDIUM:
usNewCreatures = (UINT16)(NORMAL_QUEEN_REPRODUCTION_BASE + Random( 1 + NORMAL_QUEEN_REPRODUCTION_BONUS ));
break;
case DIF_LEVEL_HARD:
usNewCreatures = (UINT16)(HARD_QUEEN_REPRODUCTION_BASE + Random( 1 + HARD_QUEEN_REPRODUCTION_BONUS ));
break;
case DIF_LEVEL_INSANE:
usNewCreatures = (UINT16)(INSANE_QUEEN_REPRODUCTION_BASE + Random( 1 + INSANE_QUEEN_REPRODUCTION_BONUS ));
break;
}
*/
UINT16 usNewCreatures = (UINT16)(zDeffSetting[gGameOptions.ubDifficultyLevel].iQueenReproductionBase + Random( 1 + zDeffSetting[gGameOptions.ubDifficultyLevel].iQueenReproductionBonus ));
while( usNewCreatures-- )
{
//Note, this function can and will fail if the population gets dense. This is a necessary
@@ -1721,81 +1664,17 @@ BOOLEAN PrepareCreaturesForBattle()
void CreatureNightPlanning()
{
//Check the populations of the mine exits, and factor a chance for them to attack at night.
UINT8 ubNumCreatures;
INT32 i;
/* // externalize to xml data
ubNumCreatures = CreaturesInUndergroundSector( SEC_H3, 1 );
if( ubNumCreatures > 1 && ubNumCreatures * 10 > (INT32)PreRandom( 100 ) )
{ //10% chance for each creature to decide it's time to attack.
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), SEC_H3 );
}
ubNumCreatures = CreaturesInUndergroundSector( SEC_D13, 1 );
if( ubNumCreatures > 1 && ubNumCreatures * 10 > (INT32)PreRandom( 100 ) )
{ //10% chance for each creature to decide it's time to attack.
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), SEC_D13 );
}
ubNumCreatures = CreaturesInUndergroundSector( SEC_I14, 1 );
if( ubNumCreatures > 1 && ubNumCreatures * 10 > (INT32)PreRandom( 100 ) )
{ //10% chance for each creature to decide it's time to attack.
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), SEC_I14 );
}
ubNumCreatures = CreaturesInUndergroundSector( SEC_H8, 1 );
if( ubNumCreatures > 1 && ubNumCreatures * 10 > (INT32)PreRandom( 100 ) )
{ //10% chance for each creature to decide it's time to attack.
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 +PreRandom( 429 ), SEC_H8 );
}
*/
UINT8 ubSectorID = SECTOR( gCreaturePlacements[ giLairID ].sAttackSourceX, gCreaturePlacements[ giLairID ].sAttackSourceY );
// Attacksource B1 underground sector must be a valid creature habitat!
ubNumCreatures = CreaturesInUndergroundSector( ubSectorID , 1 );
UINT8 ubNumCreatures = CreaturesInUndergroundSector( ubSectorID, 1 );
//10% chance for each creature with difficulty modifier to decide it's time to attack.
i = zDeffSetting[gGameOptions.ubDifficultyLevel].iCreatureTownAggressiveness;
if( ubNumCreatures > 1 && ubNumCreatures * 10 + i > (INT32)PreRandom( 100 ) )
//10% chance for each creature with difficulty modifier to decide it's time to attack.
if ( ubNumCreatures > 1 && ubNumCreatures * 10 + zDeffSetting[gGameOptions.ubDifficultyLevel].iCreatureTownAggressiveness > (INT32)PreRandom( 100 ) )
{
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), ubSectorID );
}
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
i = EASY_CREATURE_TOWN_AGGRESSIVENESS;
if( ubNumCreatures > 1 && ubNumCreatures * 10 + i > (INT32)PreRandom( 100 ) )
{
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), ubSectorID );
}
break;
case DIF_LEVEL_MEDIUM:
i = NORMAL_CREATURE_TOWN_AGGRESSIVENESS;
if( ubNumCreatures > 1 && ubNumCreatures * 10 + i > (INT32)PreRandom( 100 ) )
{
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), ubSectorID );
}
break;
case DIF_LEVEL_HARD:
i = HARD_CREATURE_TOWN_AGGRESSIVENESS;
if( ubNumCreatures > 1 && ubNumCreatures * 10 + i > (INT32)PreRandom( 100 ) )
{
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), ubSectorID );
}
break;
case DIF_LEVEL_INSANE:
i = INSANE_CREATURE_TOWN_AGGRESSIVENESS;
if( ubNumCreatures > 1 && ubNumCreatures * 10 + i > (INT32)PreRandom( 100 ) )
{
AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), ubSectorID );
}
break;
}
*/
//if( ubNumCreatures > 1 && ubNumCreatures * 10 > (INT32)PreRandom( 100 ) )
//{ //10% chance for each creature to decide it's time to attack.
// AddStrategicEvent( EVENT_CREATURE_ATTACK, GetWorldTotalMin() + 1 + PreRandom( 429 ), ubSectorID );
//}
}
+2 -34
View File
@@ -747,40 +747,8 @@ fFirstTimeInMapScreen = TRUE;
}
// ATE: Set starting cash....
iStartingCash = zDeffSetting[gGameOptions.ubDifficultyLevel].iStartingCash;
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
iStartingCash = gGameExternalOptions.iStartingCashNovice;
//iStartingCash = 45000;
break;
case DIF_LEVEL_MEDIUM:
iStartingCash = gGameExternalOptions.iStartingCashExperienced;
//iStartingCash = 35000;
break;
case DIF_LEVEL_HARD:
iStartingCash = gGameExternalOptions.iStartingCashExpert;
//iStartingCash = 30000;
break;
case DIF_LEVEL_INSANE:
iStartingCash = gGameExternalOptions.iStartingCashInsane;
// iStartingCash = 15000;
break;
default:
Assert(0);
return( FALSE );
}
*/
iStartingCash = zDeffSetting[gGameOptions.ubDifficultyLevel].iStartingCash;
// Setup initial money
AddTransactionToPlayersBook( ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin(), iStartingCash );
#endif
+3 -27
View File
@@ -12964,33 +12964,9 @@ static int l_SetStartingCashDifLevel (lua_State *L)
if ( lua_gettop(L) >= 1 )
{
INT32 DifficultyLevel = lua_tointeger(L,1);
INT32 iStartingCash = 0;
AddTransactionToPlayersBook( ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin(), zDeffSetting[DifficultyLevel].iStartingCash );
/*
switch( DifficultyLevel )
{
case DIF_LEVEL_EASY:
iStartingCash = gGameExternalOptions.iStartingCashNovice;
break;
AddTransactionToPlayersBook( ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin(), zDeffSetting[DifficultyLevel].iStartingCash );
}
case DIF_LEVEL_MEDIUM:
iStartingCash = gGameExternalOptions.iStartingCashExperienced;
break;
case DIF_LEVEL_HARD:
iStartingCash = gGameExternalOptions.iStartingCashExpert;
break;
case DIF_LEVEL_INSANE:
iStartingCash = gGameExternalOptions.iStartingCashInsane;
break;
default:
iStartingCash = 4500;
}
AddTransactionToPlayersBook( ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin(), iStartingCash );
*/
}
return 0;
return 0;
}
+3 -3
View File
@@ -700,9 +700,9 @@ void ProcessImplicationsOfMeanwhile( void )
{
case END_OF_PLAYERS_FIRST_BATTLE:
if( zDeffSetting[gGameOptions.ubDifficultyLevel].bStrategicAiActionWakeQueen == TRUE )
//if( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_HARD )
{ //Wake up the queen earlier to punish the good players!
if( zDeffSetting[gGameOptions.ubDifficultyLevel].bStrategicAiActionWakeQueen )
{
//Wake up the queen earlier to punish the good players!
ExecuteStrategicAIAction( STRATEGIC_AI_ACTION_WAKE_QUEEN, 0, 0 );
}
//HandleNPCDoAction( QUEEN, NPC_ACTION_SEND_SOLDIERS_TO_BATTLE_LOCATION, 0 );
+1 -12
View File
@@ -328,18 +328,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
if ( !SectorInfo[ SECTOR( sMapX, sMapY ) ].fSurfaceWasEverPlayerControlled )
{
// grant grace period
UpdateLastDayOfPlayerActivity( ( UINT16 ) ( GetWorldDay() + zDeffSetting[gGameOptions.ubDifficultyLevel].iUpdateLastDayOfPlayerActivity ) );
/*
if ( gGameOptions.ubDifficultyLevel >= DIF_LEVEL_HARD )
{
UpdateLastDayOfPlayerActivity( ( UINT16 ) ( GetWorldDay() + 2 ) );
}
else
{
UpdateLastDayOfPlayerActivity( ( UINT16 ) ( GetWorldDay() + 1 ) );
}
*/
UpdateLastDayOfPlayerActivity( ( UINT16 ) ( GetWorldDay() + zDeffSetting[gGameOptions.ubDifficultyLevel].iUpdateLastDayOfPlayerActivity ) );
}
}
+1 -11
View File
@@ -654,17 +654,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
iChance -= (2 * ((ubNumMobileEnemies + ubNumStationaryEnemies) - 6)); // -2% adjustment per enemy beyond 6
// adjust the chance for difficulty setting
iChance = iChance + (zDeffSetting[gGameOptions.ubDifficultyLevel].iChanceOfEnemyAmbushes);
/*
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
iChance -= 15;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_MEDIUM )
iChance += 5;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD )
iChance += 12;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
iChance += 25;
*/
iChance = iChance + (zDeffSetting[gGameOptions.ubDifficultyLevel].iChanceOfEnemyAmbushes);
// adjust the chance for what we know about the sector
if( WhatPlayerKnowsAboutEnemiesInSector( gubPBSectorX, gubPBSectorY ) == KNOWS_NOTHING )
+3 -4
View File
@@ -570,10 +570,9 @@ BOOLEAN PrepareEnemyForSectorBattle()
HandleArrivalOfReinforcements( gpBattleGroup );
// Reinforcement groups? Bring it on!
// only if not Omerta on a non-insane difficulty level
if( gGameExternalOptions.gfAllowReinforcements &&
!( (GetTownIdForSector( gWorldSectorX, gWorldSectorY ) == OMERTA ) ) )
//!( (GetTownIdForSector( gWorldSectorX, gWorldSectorY ) == OMERTA )&&( gGameOptions.ubDifficultyLevel != DIF_LEVEL_INSANE ) ) )
!( ( GetTownIdForSector( gWorldSectorX, gWorldSectorY ) == OMERTA) && (gGameOptions.ubDifficultyLevel != DIF_LEVEL_INSANE) ) )
{
UINT16 pusMoveDir[4][3];
UINT8 ubDirNumber = 0;
@@ -585,7 +584,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
GenerateDirectionInfos( gWorldSectorX, gWorldSectorY, &ubDirNumber, pusMoveDir, FALSE, TRUE );
for( unsigned ubIndex = 0; ubIndex < ubDirNumber; ubIndex++ )
for( unsigned ubIndex = 0; ubIndex < ubDirNumber; ++ubIndex )
{
while ( NumMobileEnemiesInSector( SECTORX( pusMoveDir[ ubIndex ][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ) ) && GetEnemyGroupInSector( SECTORX( pusMoveDir[ ubIndex][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ) ) )
{
+1 -3
View File
@@ -51,10 +51,8 @@ void GetNumberOfEnemiesInFiveSectors( INT16 sSectorX, INT16 sSectorY, UINT8 *pub
if( !gGameExternalOptions.gfAllowReinforcements )
return;
if ( ( GetTownIdForSector( sSectorX, sSectorY ) == OMERTA )&&( zDeffSetting[gGameOptions.ubDifficultyLevel].bAllowReinforcementsOmerta == FALSE ) ) //Madd: skip Omerta //Lal: but not on insane ;-)
if ( ( GetTownIdForSector( sSectorX, sSectorY ) == OMERTA )&& ( !zDeffSetting[gGameOptions.ubDifficultyLevel].bAllowReinforcementsOmerta ) ) //Madd: skip Omerta //Lal: but not on insane ;-)
return;
//if ( ( GetTownIdForSector( sSectorX, sSectorY ) == OMERTA )&&( gGameOptions.ubDifficultyLevel != DIF_LEVEL_INSANE ) ) //Madd: skip Omerta //Lal: but not on insane ;-)
// return;
GenerateDirectionInfos( sSectorX, sSectorY, &ubDirNumber, pusMoveDir, FALSE, TRUE );
+32 -158
View File
@@ -1185,68 +1185,20 @@ void InitStrategicAI()
dEnemyGeneralsSpeedupFactor = max( 0.5f, dEnemyGeneralsSpeedupFactor - gStrategicStatus.usVIPsLeft * gGameExternalOptions.fEnemyGeneralStrategicDecisionSpeedBonus );
}
giReinforcementPool = zDeffSetting[gGameOptions.ubDifficultyLevel].iQueensInitialPoolOfTroops;
giForcePercentage = zDeffSetting[gGameOptions.ubDifficultyLevel].iInitialGarrisonPercentages;
giArmyAlertness = zDeffSetting[gGameOptions.ubDifficultyLevel].iEnemyStartingAlertLevel;
giArmyAlertnessDecay = zDeffSetting[gGameOptions.ubDifficultyLevel].iEnemyAlertDecay;
gubMinEnemyGroupSize = zDeffSetting[gGameOptions.ubDifficultyLevel].iMinEnemyGroupSize;
gubHoursGracePeriod = zDeffSetting[gGameOptions.ubDifficultyLevel].iGracePeriodInHoursAfterSectorLiberation;
gfUnlimitedTroops = zDeffSetting[gGameOptions.ubDifficultyLevel].bUnlimitedPoolOfTroops;
gfAggressiveQueen = zDeffSetting[gGameOptions.ubDifficultyLevel].bAggressiveQueenAi;
// 475 is 7:55am in minutes since midnight, the time the game starts on day 1
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, 475 + dEnemyGeneralsSpeedupFactor * (zDeffSetting[gGameOptions.ubDifficultyLevel].iBaseDelayInMinutesBetweenEvaluations + Random( zDeffSetting[gGameOptions.ubDifficultyLevel].iEvaluationDelayVariance )), 0 );
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
giReinforcementPool = gGameExternalOptions.iReinforcementPoolNovice;
giForcePercentage = gGameExternalOptions.iForcePercentageNovice;
giArmyAlertness = gGameExternalOptions.ubEasyEnemyStartingAlertLevel;
giArmyAlertnessDecay = gGameExternalOptions.ubEasyEnemyStartingAlertDecay;
gubMinEnemyGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeNovice;
gubHoursGracePeriod = gGameExternalOptions.ubEasyGracePeriodInHours;
gfUnlimitedTroops = gGameExternalOptions.gfEasyUnlimitedTroops;
gfAggressiveQueen = gGameExternalOptions.gfEasyAggressiveQueen;
// 475 is 7:55am in minutes since midnight, the time the game starts on day 1
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, 475 + dEnemyGeneralsSpeedupFactor * (gGameExternalOptions.ubEasyTimeEvaluateInMinutes + Random( gGameExternalOptions.ubEasyTimeEvaluateVariance )), 0 );
break;
case DIF_LEVEL_MEDIUM:
giReinforcementPool = gGameExternalOptions.iReinforcementPoolExperienced;
giForcePercentage = gGameExternalOptions.iForcePercentageExperienced;
giArmyAlertness = gGameExternalOptions.ubNormalEnemyStartingAlertLevel;
giArmyAlertnessDecay = gGameExternalOptions.ubNormalEnemyStartingAlertDecay;
gubMinEnemyGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeExperienced;
gubHoursGracePeriod = gGameExternalOptions.ubNormalGracePeriodInHours;
gfUnlimitedTroops = gGameExternalOptions.gfNormalUnlimitedTroops;
gfAggressiveQueen = gGameExternalOptions.gfNormalAggressiveQueen;
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, 475 + dEnemyGeneralsSpeedupFactor * (gGameExternalOptions.ubNormalTimeEvaluateInMinutes + Random( gGameExternalOptions.ubNormalTimeEvaluateVariance )), 0);
break;
case DIF_LEVEL_HARD:
giReinforcementPool = gGameExternalOptions.iReinforcementPoolExpert;
giForcePercentage = gGameExternalOptions.iForcePercentageExpert;
giArmyAlertness = gGameExternalOptions.ubHardEnemyStartingAlertLevel;
giArmyAlertnessDecay = gGameExternalOptions.ubHardEnemyStartingAlertDecay;
gubMinEnemyGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeExpert;
gubHoursGracePeriod = gGameExternalOptions.ubHardGracePeriodInHours;
gfUnlimitedTroops = gGameExternalOptions.gfHardUnlimitedTroops;
gfAggressiveQueen = gGameExternalOptions.gfHardAggressiveQueen;
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, 475 + dEnemyGeneralsSpeedupFactor * (gGameExternalOptions.ubHardTimeEvaluateInMinutes + Random( gGameExternalOptions.ubHardTimeEvaluateVariance )), 0);
break;
case DIF_LEVEL_INSANE:
giReinforcementPool = gGameExternalOptions.iReinforcementPoolInsane;
giForcePercentage = gGameExternalOptions.iForcePercentageInsane;
giArmyAlertness = gGameExternalOptions.ubInsaneEnemyStartingAlertLevel;
giArmyAlertnessDecay = gGameExternalOptions.ubInsaneEnemyStartingAlertDecay;
gubMinEnemyGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeInsane;
gubHoursGracePeriod = gGameExternalOptions.ubInsaneGracePeriodInHours;
gfUnlimitedTroops = gGameExternalOptions.gfInsaneUnlimitedTroops;
gfAggressiveQueen = gGameExternalOptions.gfInsaneAggressiveQueen;
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, 475 + dEnemyGeneralsSpeedupFactor * (gGameExternalOptions.ubInsaneTimeEvaluateInMinutes + Random( gGameExternalOptions.ubInsaneTimeEvaluateVariance )), 0);
break;
}
*/
giReinforcementPool = zDeffSetting[gGameOptions.ubDifficultyLevel].iQueensInitialPoolOfTroops;
giForcePercentage = zDeffSetting[gGameOptions.ubDifficultyLevel].iInitialGarrisonPercentages;
giArmyAlertness = zDeffSetting[gGameOptions.ubDifficultyLevel].iEnemyStartingAlertLevel;
giArmyAlertnessDecay = zDeffSetting[gGameOptions.ubDifficultyLevel].iEnemyAlertDecay;
gubMinEnemyGroupSize = zDeffSetting[gGameOptions.ubDifficultyLevel].iMinEnemyGroupSize;
gubHoursGracePeriod = zDeffSetting[gGameOptions.ubDifficultyLevel].iGracePeriodInHoursAfterSectorLiberation;
gfUnlimitedTroops = zDeffSetting[gGameOptions.ubDifficultyLevel].bUnlimitedPoolOfTroops;
gfAggressiveQueen = zDeffSetting[gGameOptions.ubDifficultyLevel].bAggressiveQueenAi;
// 475 is 7:55am in minutes since midnight, the time the game starts on day 1
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, 475 + dEnemyGeneralsSpeedupFactor * (zDeffSetting[gGameOptions.ubDifficultyLevel].iBaseDelayInMinutesBetweenEvaluations + Random( zDeffSetting[gGameOptions.ubDifficultyLevel].iEvaluationDelayVariance )), 0 );
//Initialize the sectorinfo structure so all sectors don't point to a garrisonID.
for( i = 0; i <= 255; i++ )
for( i = 0; i <= 255; ++i )
{
SectorInfo[ i ].ubGarrisonID = NO_GARRISON;
}
@@ -1271,16 +1223,16 @@ void InitStrategicAI()
if (zDeffSetting[gGameOptions.ubDifficultyLevel].iDesiredPopulationL3 == FALSE && zDeffSetting[gGameOptions.ubDifficultyLevel].iDesiredPopulationL3 == FALSE)
{
for( i = 0; i < NUM_ARMY_COMPOSITIONS; i++ )
for( i = 0; i < NUM_ARMY_COMPOSITIONS; ++i )
{
if ( i != OMERTA_WELCOME_WAGON )
{
if ( i != OMERTA_WELCOME_WAGON )
{
iPercentElitesBonus = zDeffSetting[gGameOptions.ubDifficultyLevel].iPercentElitesBonus;
gArmyComp[ i ].bElitePercentage = min(100,gArmyComp[ i ].bElitePercentage + iPercentElitesBonus);
gArmyComp[ i ].bTroopPercentage = max(0,gArmyComp[ i ].bTroopPercentage - iPercentElitesBonus);
gArmyComp[ i ].bAdminPercentage = 0;
}
iPercentElitesBonus = zDeffSetting[gGameOptions.ubDifficultyLevel].iPercentElitesBonus;
gArmyComp[ i ].bElitePercentage = min(100,gArmyComp[ i ].bElitePercentage + iPercentElitesBonus);
gArmyComp[ i ].bTroopPercentage = max(0,gArmyComp[ i ].bTroopPercentage - iPercentElitesBonus);
gArmyComp[ i ].bAdminPercentage = 0;
}
}
}
/*
switch( gGameOptions.ubDifficultyLevel )
@@ -1650,8 +1602,7 @@ void InitStrategicAI()
{
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
pSector->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
//pSector->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel * 2);
pSector->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
if (ubPicked[0] == 0)
ubPicked[0] = ubSector;
else if (ubPicked[1] == 0)
@@ -1670,7 +1621,6 @@ void InitStrategicAI()
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y ) ]; //SEC_H5
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
pSector->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
//pSector->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel * 2);
if (ubPicked[0] == 0)
ubPicked[0] = ubSector;
else if (ubPicked[1] == 0)
@@ -1689,7 +1639,6 @@ void InitStrategicAI()
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y ) ]; //SEC_H10
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
pSector->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
//pSector->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel * 2);
if (ubPicked[0] == 0)
ubPicked[0] = ubSector;
else if (ubPicked[1] == 0)
@@ -1708,7 +1657,6 @@ void InitStrategicAI()
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y ) ]; //SEC_J12
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
pSector->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
//pSector->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel * 2);
if (ubPicked[0] == 0)
ubPicked[0] = ubSector;
else if (ubPicked[1] == 0)
@@ -1727,7 +1675,6 @@ void InitStrategicAI()
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y ) ]; //SEC_M9
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
pSector->ubNumTroops = (UINT8)(6 + zDeffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
//pSector->ubNumTroops = (UINT8)(6 + gGameOptions.ubDifficultyLevel * 2);
if (ubPicked[0] == 0)
ubPicked[0] = ubSector;
else if (ubPicked[1] == 0)
@@ -3425,32 +3372,16 @@ void EvaluateQueenSituation()
{
dEnemyGeneralsSpeedupFactor = max( 0.5f, dEnemyGeneralsSpeedupFactor - gStrategicStatus.usVIPsLeft * gGameExternalOptions.fEnemyGeneralStrategicDecisionSpeedBonus );
}
uiOffset += dEnemyGeneralsSpeedupFactor * (zDeffSetting[gGameOptions.ubDifficultyLevel].iBaseDelayInMinutesBetweenEvaluations + Random( zDeffSetting[gGameOptions.ubDifficultyLevel].iEvaluationDelayVariance ));
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
uiOffset += dEnemyGeneralsSpeedupFactor * (gGameExternalOptions.ubEasyTimeEvaluateInMinutes + Random( gGameExternalOptions.ubEasyTimeEvaluateVariance ));
break;
case DIF_LEVEL_MEDIUM:
uiOffset += dEnemyGeneralsSpeedupFactor * (gGameExternalOptions.ubNormalTimeEvaluateInMinutes + Random( gGameExternalOptions.ubNormalTimeEvaluateVariance ));
break;
case DIF_LEVEL_HARD:
uiOffset += dEnemyGeneralsSpeedupFactor * (gGameExternalOptions.ubHardTimeEvaluateInMinutes + Random( gGameExternalOptions.ubHardTimeEvaluateVariance ));
break;
case DIF_LEVEL_INSANE:
uiOffset += dEnemyGeneralsSpeedupFactor * (gGameExternalOptions.ubInsaneTimeEvaluateInMinutes + Random( gGameExternalOptions.ubInsaneTimeEvaluateVariance ));
break;
}
*/
uiOffset += dEnemyGeneralsSpeedupFactor * (zDeffSetting[gGameOptions.ubDifficultyLevel].iBaseDelayInMinutesBetweenEvaluations + Random( zDeffSetting[gGameOptions.ubDifficultyLevel].iEvaluationDelayVariance ));
if( !giReinforcementPool )
{ //Queen has run out of reinforcements. Simulate recruiting and training new troops
{
//Queen has run out of reinforcements. Simulate recruiting and training new troops
uiOffset *= 10;
//Madd: don't need an unlimited troops check here, since they can never run out like this
giReinforcementPool += ( zDeffSetting[gGameOptions.ubDifficultyLevel].iQueenPoolIncrementPerDifficultyLevel * gGameOptions.ubDifficultyLevel ) * ( 100 + CurrentPlayerProgressPercentage() ) / 100 ;
//giReinforcementPool += ( gGameExternalOptions.guiBaseQueenPoolIncrement * gGameOptions.ubDifficultyLevel ) * ( 100 + CurrentPlayerProgressPercentage() ) / 100 ;
giReinforcementPool += ( zDeffSetting[gGameOptions.ubDifficultyLevel].iQueenPoolIncrementPerDifficultyLevel * gGameOptions.ubDifficultyLevel ) * ( 100 + CurrentPlayerProgressPercentage() ) / 100 ;
AddStrategicEvent( EVENT_EVALUATE_QUEEN_SITUATION, GetWorldTotalMin() + uiOffset, 0 );
return;
@@ -3711,27 +3642,6 @@ BOOLEAN LoadStrategicAI( HWFILE hFile )
gfUnlimitedTroops = zDeffSetting[gGameOptions.ubDifficultyLevel].bUnlimitedPoolOfTroops;
gfAggressiveQueen = zDeffSetting[gGameOptions.ubDifficultyLevel].bAggressiveQueenAi;
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
gfUnlimitedTroops = gGameExternalOptions.gfEasyUnlimitedTroops;
gfAggressiveQueen = gGameExternalOptions.gfEasyAggressiveQueen;
break;
case DIF_LEVEL_MEDIUM:
gfUnlimitedTroops = gGameExternalOptions.gfNormalUnlimitedTroops;
gfAggressiveQueen = gGameExternalOptions.gfNormalAggressiveQueen;
break;
case DIF_LEVEL_HARD:
gfUnlimitedTroops = gGameExternalOptions.gfHardUnlimitedTroops;
gfAggressiveQueen = gGameExternalOptions.gfHardAggressiveQueen;
break;
case DIF_LEVEL_INSANE:
gfUnlimitedTroops = gGameExternalOptions.gfInsaneUnlimitedTroops;
gfAggressiveQueen = gGameExternalOptions.gfInsaneAggressiveQueen;
break;
}
*/
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic6");
FileRead( hFile, gbPadding2, 3, &uiNumBytesRead );
@@ -5477,23 +5387,6 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
case NPC_ACTION_GIVE_KNOWLEDGE_OF_ALL_MERCS:
//temporarily make the queen's forces more aware (high alert)
gubNumAwareBattles = zDeffSetting[gGameOptions.ubDifficultyLevel].iNumAwareBattles;
/*
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
gubNumAwareBattles = gGameExternalOptions.ubEasyNumAwareBattles;
break;
case DIF_LEVEL_MEDIUM:
gubNumAwareBattles = gGameExternalOptions.ubNormalNumAwareBattles;
break;
case DIF_LEVEL_HARD:
gubNumAwareBattles = gGameExternalOptions.ubHardNumAwareBattles;
break;
case DIF_LEVEL_INSANE:
gubNumAwareBattles = gGameExternalOptions.ubInsaneNumAwareBattles;
break;
}
*/
break;
default:
@@ -5911,8 +5804,7 @@ void StrategicHandleQueenLosingControlOfSector( INT16 sSectorX, INT16 sSectorY,
if (value9 == 0) value9 = 1;
}
if( pSector->ubInvestigativeState >= ( 4 * value9 ) && zDeffSetting[gGameOptions.ubDifficultyLevel].bQueenLosingControlOfSector == FALSE )
//if( pSector->ubInvestigativeState >= ( 4 * gGameOptions.ubDifficultyLevel ) && gGameOptions.ubDifficultyLevel < DIF_LEVEL_INSANE )
if( pSector->ubInvestigativeState >= ( 4 * value9 ) && !zDeffSetting[gGameOptions.ubDifficultyLevel].bQueenLosingControlOfSector )
{
//This is the 4th time the player has conquered this sector. We won't pester the player with probing attacks here anymore.
return;
@@ -6470,8 +6362,7 @@ void UpgradeAdminsToTroops()
while ( ubAdminsToCheck > 0)
{
// chance to upgrade at each check is random, and also dependant on the garrison's priority
if ( Chance ( bPriority ) || zDeffSetting[gGameOptions.ubDifficultyLevel].bUpgradeAdminsToTroops == TRUE )
//if ( Chance ( bPriority ) || gGameOptions.ubDifficultyLevel > DIF_LEVEL_HARD ) // Madd: Always happens on Insane
if ( Chance ( bPriority ) || zDeffSetting[gGameOptions.ubDifficultyLevel].bUpgradeAdminsToTroops )
{
pSector->ubNumAdmins--;
pSector->ubNumTroops++;
@@ -6526,8 +6417,7 @@ void UpgradeAdminsToTroops()
while ( ubAdminsToCheck > 0)
{
// chance to upgrade at each check is random, and also dependant on the group's priority
if ( Chance ( bPriority ) || zDeffSetting[gGameOptions.ubDifficultyLevel].bUpgradeAdminsToTroops2 == TRUE )
//if ( Chance ( bPriority ) || gGameOptions.ubDifficultyLevel >= DIF_LEVEL_HARD )// Madd: Always happens on Expert and Insane
if ( Chance ( bPriority ) || zDeffSetting[gGameOptions.ubDifficultyLevel].bUpgradeAdminsToTroops2 )
{
pGroup->pEnemyGroup->ubNumAdmins--;
pGroup->pEnemyGroup->ubNumTroops++;
@@ -6767,23 +6657,7 @@ void TagSAIGroupWithGracePeriod( GROUP *pGroup )
if( iPatrolID != -1 )
{
gPatrolGroup[ iPatrolID ].bFillPermittedAfterDayMod100 = (UINT8)((GetWorldDay() + zDeffSetting[gGameOptions.ubDifficultyLevel].iGracePeriodInDaysAfterPatrolDestroyed) % 100);
/*
switch( gGameOptions.ubDifficultyLevel ) {
case DIF_LEVEL_EASY:
gPatrolGroup[ iPatrolID ].bFillPermittedAfterDayMod100 = (UINT8)((GetWorldDay() + gGameExternalOptions.ubEasyPatrolGracePeriodInDays) % 100);
break;
case DIF_LEVEL_MEDIUM:
gPatrolGroup[ iPatrolID ].bFillPermittedAfterDayMod100 = (UINT8)((GetWorldDay() + gGameExternalOptions.ubNormalPatrolGracePeriodInDays) % 100);
break;
case DIF_LEVEL_HARD:
gPatrolGroup[ iPatrolID ].bFillPermittedAfterDayMod100 = (UINT8)((GetWorldDay() + gGameExternalOptions.ubHardPatrolGracePeriodInDays) % 100);
break;
case DIF_LEVEL_INSANE:
gPatrolGroup[ iPatrolID ].bFillPermittedAfterDayMod100 = (UINT8)((GetWorldDay() + gGameExternalOptions.ubInsanePatrolGracePeriodInDays) % 100);
break;
}
*/
gPatrolGroup[ iPatrolID ].bFillPermittedAfterDayMod100 = (UINT8)((GetWorldDay() + zDeffSetting[gGameOptions.ubDifficultyLevel].iGracePeriodInDaysAfterPatrolDestroyed) % 100);
}
}
}
+9 -60
View File
@@ -187,9 +187,8 @@ void AddExtraItems(UINT8 x, UINT8 y, UINT8 z, bool sectorIsLoaded)
int baseFNLength = strlen(fileName);
// Append a suffix based on the difficulty
switch (gGameOptions.ubDifficultyLevel) {
case DIF_LEVEL_ZERO:
break;
switch (gGameOptions.ubDifficultyLevel)
{
case DIF_LEVEL_EASY:
strcat(fileName, "_Novice");
break;
@@ -202,65 +201,15 @@ void AddExtraItems(UINT8 x, UINT8 y, UINT8 z, bool sectorIsLoaded)
case DIF_LEVEL_INSANE:
strcat(fileName, "_Insane");
break;
case DIF_LEVEL_FIVE:
strcat(fileName, "_Diff_5");
break;
case 6:
strcat(fileName, "_Diff_6");
break;
case 7:
strcat(fileName, "_Diff_7");
break;
case 8:
strcat(fileName, "_Diff_8");
break;
case 9:
strcat(fileName, "_Diff_9");
break;
case 10:
strcat(fileName, "_Diff_10");
break;
case 11:
strcat(fileName, "_Diff_11");
break;
case 12:
strcat(fileName, "_Diff_12");
break;
case 13:
strcat(fileName, "_Diff_13");
break;
case 14:
strcat(fileName, "_Diff_14");
break;
case 15:
strcat(fileName, "_Diff_15");
break;
default:
break;
{
CHAR8 str[20];
sprintf( str, "_Diff_%d", gGameOptions.ubDifficultyLevel );
strcat( fileName, str );
}
break;
}
/*
switch (gGameOptions.ubDifficultyLevel) {
case DIF_LEVEL_ZERO:
break;
case DIF_LEVEL_EASY:
strcat(fileName, "_Novice");
break;
case DIF_LEVEL_MEDIUM:
strcat(fileName, "_Experienced");
break;
case DIF_LEVEL_HARD:
strcat(fileName, "_Expert");
break;
case DIF_LEVEL_INSANE:
strcat(fileName, "_Insane");
break;
case DIF_LEVEL_FIVE:
break;
default:
break;
}
*/
strcat(fileName, ".xml");
if(!FileExists(fileName))//dnl ch75 261013 just to avoid sdd::exception under debug from VFS when file not exist
return;
+1 -3
View File
@@ -15403,9 +15403,7 @@ void DumpSectorDifficultyInfo( void )
// NOTE: This operates on the selected map sector!
CHAR16 wSectorName[ 128 ];
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Playing Difficulty: %s", zDeffSetting[gGameOptions.ubDifficultyLevel].szDeffName );
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Playing Difficulty: %s", gzGIOScreenText[ GIO_DIF_LEVEL_TEXT + gGameOptions.ubDifficultyLevel ] );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Playing Difficulty: %s", zDeffSetting[gGameOptions.ubDifficultyLevel].szDeffName );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Highest Progress (0-100) = %d%%", HighestPlayerProgressPercentage() );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Player Kills = %d", gStrategicStatus.usPlayerKills );