From 54c6093c0a5975312bf5bc9480a855798950b6a5 Mon Sep 17 00:00:00 2001 From: Flugente Date: Fri, 8 May 2015 19:03:01 +0000 Subject: [PATCH] Diagnosing diseases trains wisdom. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7850 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Assignments.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index eab1f77d9..a6fbe458f 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -5719,6 +5719,9 @@ void HandleDiseaseDiagnosis() { // doctor discovered a disease - make it known pTeamSoldier->AnnounceDisease( i ); + + // if we detect a disease, we get a bit of experience + StatChange( pSoldier, WISDOMAMT, 2, FALSE ); } } } @@ -5732,8 +5735,15 @@ void HandleDiseaseDiagnosis() SECTORINFO *pSectorInfo = &(SectorInfo[sector]); - if ( pSectorInfo && pSectorInfo->usInfected && Chance( skill ) ) + if ( pSectorInfo && pSectorInfo->usInfected && + !((pSectorInfo->usInfectionFlag & SECTORDISEASE_DIAGNOSED_PLAYER) || (gubFact[FACT_DISEASE_WHODATA_ACCESS] && pSectorInfo->usInfectionFlag & SECTORDISEASE_DIAGNOSED_WHO)) && + Chance( skill ) ) + { pSectorInfo->usInfectionFlag |= SECTORDISEASE_DIAGNOSED_PLAYER; + + // if we detect a disease, we get a bit of experience + StatChange( pSoldier, WISDOMAMT, 2, FALSE ); + } } } }