diff --git a/Strategic/Quests.cpp b/Strategic/Quests.cpp index 4284ec68..d8fea66d 100644 --- a/Strategic/Quests.cpp +++ b/Strategic/Quests.cpp @@ -31,6 +31,7 @@ #include "Assignments.h" #include "strategic.h" #include "Strategic Event Handler.h" + #include "Soldier Control.h" #endif #include "BobbyRMailOrder.h" @@ -290,7 +291,7 @@ UINT32 NumWoundedMercsNearby( UINT8 ubProfileID ) { pSoldier = MercSlots[ uiLoop ]; - if ( pSoldier && pSoldier->bTeam == gbPlayerNum && pSoldier->stats.bLife > 0 && pSoldier->stats.bLife < pSoldier->stats.bLifeMax && pSoldier->bAssignment != ASSIGNMENT_HOSPITAL + if ( pSoldier && pSoldier->bTeam == gbPlayerNum && pSoldier->stats.bLife > 0 && (pSoldier->stats.bLife < pSoldier->stats.bLifeMax || NumberOfDamagedStats(pSoldier) > 0) && pSoldier->bAssignment != ASSIGNMENT_HOSPITAL && pSoldier->sSectorX == pNPC->sSectorX && pSoldier->sSectorY == pNPC->sSectorY && pSoldier->bSectorZ == pNPC->bSectorZ ) { if (PythSpacesAway( sGridNo, pSoldier->sGridNo ) <= HOSPITAL_PATIENT_DISTANCE) diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index c74d0244..cded1780 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -3170,7 +3170,7 @@ BOOLEAN EnterSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ ) //Save to tempfile SaveWorldItemsToTempItemFile( sSectorX, sSectorY, (INT8)bSectorZ, guiNumWorldItems, gWorldItems ); - DebugQuestInfo(String("--- Enter Sector %s%s Level %d ---", pVertStrings[sSectorY], pHortStrings[sSectorX], bSectorZ)); + DebugQuestInfo(String("Enter Sector %s%s Level %d", pVertStrings[sSectorY], pHortStrings[sSectorX], bSectorZ)); return TRUE; //because the map was loaded. } diff --git a/Tactical/Interface Dialogue.cpp b/Tactical/Interface Dialogue.cpp index 62e4e3fa..9644aab3 100644 --- a/Tactical/Interface Dialogue.cpp +++ b/Tactical/Interface Dialogue.cpp @@ -1,4 +1,3 @@ - #ifdef PRECOMPILEDHEADERS #include "Tactical All.h" #include "PreBattle Interface.h" @@ -75,6 +74,7 @@ #include "Map Screen Helicopter.h" #include "Cheats.h" #include "Overhead.h" + #include "Soldier Control.h" #endif #include "LuaInitNPCs.h" @@ -3729,7 +3729,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum for ( pSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++,pSoldier++) { // Are we in this sector, On the current squad? - if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife > 0 && pSoldier->stats.bLife < pSoldier->stats.bLifeMax && pSoldier->bAssignment != ASSIGNMENT_HOSPITAL && PythSpacesAway( pSoldier->sGridNo, pSoldier2->sGridNo ) < HOSPITAL_PATIENT_DISTANCE ) + if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife > 0 && (pSoldier->stats.bLife < pSoldier->stats.bLifeMax || NumberOfDamagedStats(pSoldier) > 0) && pSoldier->bAssignment != ASSIGNMENT_HOSPITAL && PythSpacesAway( pSoldier->sGridNo, pSoldier2->sGridNo ) < HOSPITAL_PATIENT_DISTANCE ) { SetSoldierAssignment( pSoldier, ASSIGNMENT_HOSPITAL, 0, 0, 0 ); TriggerNPCRecord( pSoldier->ubProfile, 2 ); @@ -4520,6 +4520,12 @@ UINT32 CalcPatientMedicalCost( SOLDIERTYPE * pSoldier ) uiCost = 10 * ( pSoldier->stats.bLifeMax - pSoldier->stats.bLife ); + for (UINT8 index = 0; index < NUM_DAMAGABLE_STATS; ++index) + { + // charge additional $150 for every damaged stat point + uiCost += (150 * pSoldier->ubCriticalStatDamage[index]); + } + if ( pSoldier->stats.bLife < OKLIFE ) { // charge additional $25 for every point below OKLIFE he is @@ -4577,7 +4583,7 @@ UINT32 CalcMedicalCost( UINT8 ubId ) pSoldier = MercPtrs[ cnt ]; if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife > 0 && pSoldier->bAssignment != ASSIGNMENT_HOSPITAL ) { - if ( pSoldier->stats.bLife < pSoldier->stats.bLifeMax ) + if ( pSoldier->stats.bLife < pSoldier->stats.bLifeMax || NumberOfDamagedStats(pSoldier) > 0) { if (PythSpacesAway( sGridNo, pSoldier->sGridNo ) <= HOSPITAL_PATIENT_DISTANCE) { diff --git a/TacticalAI/NPC.cpp b/TacticalAI/NPC.cpp index 41b5e900..3a501194 100644 --- a/TacticalAI/NPC.cpp +++ b/TacticalAI/NPC.cpp @@ -1934,7 +1934,7 @@ void Converse( UINT8 ubNPC, UINT8 ubMerc, INT8 bApproach, UINT32 uiApproachData SOLDIERTYPE * pNPC; BOOLEAN fAttemptingToGiveItem; - DebugQuestInfo(String("Converse: merc <%d> to NPC <%d> %d data %d", ubMerc, ubNPC, bApproach, uiApproachData)); + DebugQuestInfo(String("Converse: merc <%d> to NPC <%d> approach %d data %d", ubMerc, ubNPC, bApproach, uiApproachData)); // we have to record whether an item is being given in order to determine whether, // in the case where the approach is overridden, we need to return the item to the