From 2a36de6cd1d8eded209b62e6513df16ae0dc4887 Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Wed, 28 Jun 2006 18:54:02 +0000 Subject: [PATCH] -added STRATEGIC_EVENT_SEND_TROOPS_TO_DRASSEN to allow players to disable the initial strike on drassen (Now stop whining you lot!) -added some debug msgs that I was using for AI debugging git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@309 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 1 + GameSettings.h | 8 +++++++- GameVersion.cpp | 2 +- Strategic/Strategic AI.cpp | 2 ++ Tactical/Weapons.cpp | 2 +- TacticalAI/DecideAction.cpp | 6 ++++++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index c45d979e..2f29c08d 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -384,6 +384,7 @@ void LoadGameExternalOptions() gGameExternalOptions.ubGameProgressStartMadlabQuest = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_START_MADLAB_QUEST",35); gGameExternalOptions.ubGameProgressMikeAvailable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_MIKE_AVALIABLE",50); gGameExternalOptions.ubGameProgressIggyAvaliable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_IGGY_AVALIABLE",70); + gGameExternalOptions.gfSendTroopsToDrassen = iniReader.ReadInteger("JA2 Gameplay Settings","STRATEGIC_EVENT_SEND_TROOPS_TO_DRASSEN",TRUE); //Weapons modification diff --git a/GameSettings.h b/GameSettings.h index 48515521..e4bbc35e 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -240,10 +240,16 @@ typedef struct UINT32 guiProlongLightningIfSeenSomeone; UINT32 guiChanceToDoLightningBetweenTurns; - //Gameplay settings + // Event settings + UINT32 ubGameProgressStartMadlabQuest; UINT32 ubGameProgressMikeAvailable; UINT32 ubGameProgressIggyAvaliable; + BOOLEAN gfSendTroopsToDrassen; + + + //Gameplay settings + UINT32 ubExplosivesDamageMultiplier; UINT32 ubGunDamageMultiplier; UINT32 ubMeleeDamageMultiplier; diff --git a/GameVersion.cpp b/GameVersion.cpp index 2de6209d..1bb032ec 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.307" }; + INT16 zVersionLabel[256] = { L"Release v1.13.309" }; #endif diff --git a/Strategic/Strategic AI.cpp b/Strategic/Strategic AI.cpp index 31de7406..e6c64f95 100644 --- a/Strategic/Strategic AI.cpp +++ b/Strategic/Strategic AI.cpp @@ -4013,6 +4013,8 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto //MoveSAIGroupToSector( &pGroup, ubSectorID, EVASIVE, pGroup->pEnemyGroup->ubIntention ); + if ( !gGameExternalOptions.gfSendTroopsToDrassen ) + break; ubSectorID = SEC_D13; diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index d6b3fb4f..8637081d 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -1243,7 +1243,7 @@ BOOLEAN OKFireWeapon( SOLDIERTYPE *pSoldier ) BOOLEAN FireWeapon( SOLDIERTYPE *pSoldier , INT16 sTargetGridNo ) { // ignore passed in target gridno for now - + DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FireWeapon")); // If realtime and we are reloading - do not fire until counter is done! if ( ( ( gTacticalStatus.uiFlags & REALTIME ) || !( gTacticalStatus.uiFlags & INCOMBAT ) ) && !pSoldier->bDoBurst ) { diff --git a/TacticalAI/DecideAction.cpp b/TacticalAI/DecideAction.cpp index 026582d7..57959fec 100644 --- a/TacticalAI/DecideAction.cpp +++ b/TacticalAI/DecideAction.cpp @@ -2183,6 +2183,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK) // SNIPER! CheckIfShotPossible(pSoldier,&BestShot,FALSE); + DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("decideactionred: is sniper shot possible? = %d, CTH = %d",BestShot.ubPossible,BestShot.ubChanceToReallyHit)); if (BestShot.ubPossible && BestShot.ubChanceToReallyHit > 50 ) { @@ -2592,6 +2593,8 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"decideactionred: radio red alert?"); // if we can move at least 1 square's worth // and have more APs than we want to reserve + DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("decideactionred: can we move? = %d, APs = %d",ubCanMove,pSoldier->bActionPoints)); + if (ubCanMove && pSoldier->bActionPoints > MAX_AP_CARRIED) { if (fCivilian) @@ -2604,6 +2607,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"decideactionred: radio red alert?"); else { + DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("decideactionred: checking hide/seek/help/watch points... orders = %d, attitude = %d",pSoldier->bOrders,pSoldier->bAttitude)); // calculate initial points for watch based on highest watch loc bWatchPts = GetHighestWatchedLocPoints( pSoldier->ubID ); @@ -2662,6 +2666,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"decideactionred: radio red alert?"); bHidePts = -99; } + DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("decideactionred: hide = %d, seek = %d, watch = %d, help = %d",bHidePts,bSeekPts,bWatchPts,bHelpPts)); // while one of the three main RED REACTIONS remains viable while ((bSeekPts > -90) || (bHelpPts > -90) || (bHidePts > -90) ) { @@ -3376,6 +3381,7 @@ INT8 DecideActionBlack(SOLDIERTYPE *pSoldier) #ifdef DEBUGDECISIONS STR16 tempstr; #endif + DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("DecideActionBlack: soldier = %d, orders = %d, attitude = %d",pSoldier->ubID,pSoldier->bOrders,pSoldier->bAttitude)); ATTACKTYPE BestShot,BestThrow,BestStab,BestAttack; BOOLEAN fCivilian = (PTR_CIVILIAN && (pSoldier->ubCivilianGroup == NON_CIV_GROUP || pSoldier->bNeutral || (pSoldier->ubBodyType >= FATCIV && pSoldier->ubBodyType <= CRIPPLECIV) ) );