From 47a89e3725b349ace39a6835fba6e79d0f443ce3 Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 14 Feb 2019 20:48:07 +0000 Subject: [PATCH] New feature: mercs on administration assignment boost the effectivity of other mercs For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=356696&#msg_356696 Requires GameDir >= r2472 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8665 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 3 + GameSettings.h | 3 + Strategic/Assignments.cpp | 374 ++++++++++++++++++++++++++++--- Strategic/Assignments.h | 27 +++ Strategic/Map Screen Interface.h | 1 + Tactical/Faces.cpp | 13 +- Tactical/Handle UI.cpp | 8 +- Tactical/Interface Enhanced.cpp | 40 ++++ Tactical/Interface.h | 1 + Tactical/Item Types.h | 3 + Tactical/Soldier Control.cpp | 106 ++++++++- Tactical/Soldier Control.h | 5 + Tactical/XML_Background.cpp | 6 + Utils/Text.h | 3 + Utils/XML_Items.cpp | 10 +- Utils/_ChineseText.cpp | 12 + Utils/_DutchText.cpp | 12 + Utils/_EnglishText.cpp | 12 + Utils/_FrenchText.cpp | 12 + Utils/_GermanText.cpp | 12 + Utils/_ItalianText.cpp | 12 + Utils/_PolishText.cpp | 12 + Utils/_RussianText.cpp | 12 + 23 files changed, 662 insertions(+), 37 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index a7a6382f1..4688368b8 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -2235,6 +2235,9 @@ void LoadGameExternalOptions() gGameExternalOptions.ubCleaningRateDivisor = iniReader.ReadInteger("Strategic Assignment Settings","CLEANING_RATE_DIVISOR",500, 100, 25000); gGameExternalOptions.ubAssignmentUnitsPerDay = iniReader.ReadInteger("Strategic Assignment Settings","REPAIR_SESSIONS_PER_DAY",24, 1, 96); + gGameExternalOptions.fAdministrationPointsPerPercent = (FLOAT)iniReader.ReadDouble( "Strategic Assignment Settings", "ADMINISTRATION_POINTS_PER_PERCENT", 20.0f, 1.0f, 1000.0f ); + gGameExternalOptions.fAdministrationMaxPercent = iniReader.ReadInteger( "Strategic Assignment Settings", "ADMINISTRATION_MAX_PERCENTAGE", 15, 0, 100 ); + gGameExternalOptions.fUseXMLSquadNames = iniReader.ReadBoolean("Strategic Assignment Settings", "USE_XML_SQUADNAMES", FALSE); //################# Intel Settings ################## diff --git a/GameSettings.h b/GameSettings.h index 65883049d..93e74395f 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -723,6 +723,9 @@ typedef struct INT32 ubMinutesForAssignmentToCount; BOOLEAN fSleepDisplayFailNotification; + FLOAT fAdministrationPointsPerPercent; + UINT16 fAdministrationMaxPercent; + INT32 ubTrainingSkillMin; INT32 ubTrainingSkillMax; INT32 ubSelfTrainingDivisor; diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index c405cb8d4..e70a80e38 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -508,6 +508,9 @@ void HandleMilitiaCommand(); // Flugente: handle spy assignments void HandleSpyAssignments(); +// Flugente: handle administration assignment +void HandleAdministrationAssignments(); + // is the character between secotrs in mvt BOOLEAN CharacterIsBetweenSectors( SOLDIERTYPE *pSoldier ); @@ -1089,6 +1092,23 @@ BOOLEAN CanCharacterBurial( SOLDIERTYPE *pSoldier ) return TRUE; } +BOOLEAN CanCharacterAdministration( SOLDIERTYPE *pSoldier ) +{ + AssertNotNIL( pSoldier ); + + if ( !BasicCanCharacterAssignment( pSoldier, TRUE ) ) + return( FALSE ); + + if ( pSoldier->bSectorZ ) + return FALSE; + + // Flugente: we can't perform most assignments while concealed + if ( SPY_LOCATION( pSoldier->bAssignment ) ) + return( FALSE ); + + return TRUE; +} + BOOLEAN IsAnythingAroundForSoldierToRepair( SOLDIERTYPE * pSoldier ) { AssertNotNIL(pSoldier); @@ -2942,6 +2962,9 @@ void UpdateAssignments() HandleTrainWorkers(); + // handle administration assignment + HandleAdministrationAssignments(); + // check to see if anyone is done healing? UpdatePatientsWhoAreDoneHealing( ); @@ -3171,6 +3194,9 @@ UINT16 CalculateHealingPointsForDoctor(SOLDIERTYPE *pDoctor, UINT16 *pusMaxPts, if ( UsingFoodSystem() ) ReducePointsForHunger( pDoctor, &usHealPts ); + FLOAT administrationmodifier = pDoctor->GetAdministrationModifier(); + usHealPts *= administrationmodifier; + // count how much medical supplies we have usKitPts = 100 * TotalMedicalKitPoints( pDoctor ); @@ -3261,6 +3287,9 @@ UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts // adjust for fatigue ReducePointsForFatigue( pSoldier, &usRepairPts ); + FLOAT administrationmodifier = pSoldier->GetAdministrationModifier(); + usRepairPts *= administrationmodifier; + // Flugente: our food situation influences our effectiveness if ( UsingFoodSystem() ) ReducePointsForHunger( pSoldier, &usRepairPts ); @@ -3346,6 +3375,9 @@ UINT8 CalculateCleaningPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxP // adjust for fatigue ReducePointsForFatigue( pSoldier, &usCleaningPts ); + FLOAT administrationmodifier = pSoldier->GetAdministrationModifier(); + usCleaningPts *= administrationmodifier; + // Flugente: our food situation influences our effectiveness if ( UsingFoodSystem() ) ReducePointsForHunger( pSoldier, &usCleaningPts ); @@ -3414,7 +3446,9 @@ UINT32 CalculateInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts ) performancemodifier = min(1000, max(10, performancemodifier) ); - usInterrogationPoints = (usInterrogationPoints * performancemodifier) / (700000); + FLOAT administrationmodifier = pSoldier->GetAdministrationModifier(); + + usInterrogationPoints = (usInterrogationPoints * performancemodifier * administrationmodifier ) / (700000); // adjust for fatigue ReducePointsForFatigue( pSoldier, &usInterrogationPoints ); @@ -3707,6 +3741,8 @@ INT16 GetTrainWorkerPts(SOLDIERTYPE *pSoldier) val = tmp; + val *= pSoldier->GetAdministrationModifier(); + return val; } @@ -6244,9 +6280,7 @@ void HandleDiseaseDiagnosis() if ( pSoldier->bActive && pSoldier->bAssignment == DISEASE_DIAGNOSE && CanCharacterDiagnoseDisease( pSoldier ) && !pSoldier->flags.fMercAsleep && EnoughTimeOnAssignment( pSoldier ) ) { // determine our skill at detecting disease - UINT16 skill = pSoldier->stats.bMedical / 2 + NUM_SKILL_TRAITS( pSoldier, DOCTOR_NT ) * 15; - - skill = (skill * (100 + pSoldier->GetBackgroundValue( BG_PERC_DISEASE_DIAGNOSE ))) / 100; + UINT16 skill = pSoldier->GetDiseaseDiagnosePoints(); // loop over all other soldiers and determine the chance that they will infect us SOLDIERTYPE *pTeamSoldier = NULL; @@ -6685,6 +6719,181 @@ void HandleSpyAssignments() } } +// Flugente: administration assignment +struct admintmpstruct +{ + UINT8 sector; + INT8 townid; + UINT32 val; + UINT16 mercs; + FLOAT percentage; +}; + +UINT16 GetNumberofAdministratableMercs( INT16 sX, INT16 sY ) +{ + UINT16 num = 0; + + UINT8 townid_origin = GetTownIdForSector( sX, sY ); + + SOLDIERTYPE *pSoldier = NULL; + UINT32 uiCnt = 0; + UINT32 firstid = gTacticalStatus.Team[gbPlayerNum].bFirstID; + UINT32 lastid = gTacticalStatus.Team[gbPlayerNum].bLastID; + for ( uiCnt = firstid, pSoldier = MercPtrs[uiCnt]; uiCnt <= lastid; ++uiCnt, ++pSoldier ) + { + if ( pSoldier + && !pSoldier->flags.fMercAsleep + && !pSoldier->bSectorZ + && EnoughTimeOnAssignment( pSoldier ) + ) + { + UINT8 townid = GetTownIdForSector( pSoldier->sSectorX, pSoldier->sSectorY ); + + if ( ( pSoldier->sSectorX == sX && pSoldier->sSectorY == sY ) + || ( townid == townid_origin ) ) + { + if ( ADMINISTRATION_BONUS( pSoldier->bAssignment ) ) + ++num; + } + } + } + + return num; +} + +FLOAT GetAdministrationPercentage( INT16 sX, INT16 sY ) +{ + admintmpstruct data; + data.val = 0; + data.mercs = GetNumberofAdministratableMercs( sX, sY ); + data.percentage = 0; + + if ( data.mercs > 0 ) + { + data.sector = SECTOR( sX, sY ); + data.townid = GetTownIdForSector( sX, sY ); + + // loop over all soldiers with this assignment, determine percentage applied, determine how much of total that is, award exp points + SOLDIERTYPE *pSoldier = NULL; + UINT32 uiCnt = 0; + UINT32 firstid = gTacticalStatus.Team[gbPlayerNum].bFirstID; + UINT32 lastid = gTacticalStatus.Team[gbPlayerNum].bLastID; + for ( uiCnt = firstid, pSoldier = MercPtrs[uiCnt]; uiCnt <= lastid; ++uiCnt, ++pSoldier ) + { + if ( pSoldier && pSoldier->bAssignment == ADMINISTRATION && !pSoldier->flags.fMercAsleep && EnoughTimeOnAssignment( pSoldier ) ) + { + // sum up the points for towns, if not a town, for sectors + UINT8 sector = SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ); + INT8 townid = GetTownIdForSector( pSoldier->sSectorX, pSoldier->sSectorY ); + + if ( (data.sector == sector) || (data.townid != BLANK_SECTOR && data.townid == townid) ) + { + data.val += pSoldier->GetAdministrationPoints(); + } + } + } + + data.percentage = min( gGameExternalOptions.fAdministrationMaxPercent, ( (FLOAT)data.val / (FLOAT)data.mercs ) ); + } + + return data.percentage; +} + +// this function only handles the awarding of exp, the assignment merely boosts others +void HandleAdministrationAssignments() +{ + std::vector helpervec; + + // loop over all soldiers with this assignment, determine percentage applied, determine how much of total that is, award exp points + SOLDIERTYPE *pSoldier = NULL; + UINT32 uiCnt = 0; + UINT32 firstid = gTacticalStatus.Team[gbPlayerNum].bFirstID; + UINT32 lastid = gTacticalStatus.Team[gbPlayerNum].bLastID; + for ( uiCnt = firstid, pSoldier = MercPtrs[uiCnt]; uiCnt <= lastid; ++uiCnt, ++pSoldier ) + { + if ( pSoldier && pSoldier->bAssignment == ADMINISTRATION && !pSoldier->flags.fMercAsleep && EnoughTimeOnAssignment( pSoldier ) ) + { + // sum up the points for towns, if not a town, for sectors + UINT8 sector = SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ); + INT8 townid = GetTownIdForSector( pSoldier->sSectorX, pSoldier->sSectorY ); + UINT32 val = pSoldier->GetAdministrationPoints(); + UINT16 mercs = GetNumberofAdministratableMercs( pSoldier->sSectorX, pSoldier->sSectorY ); + + BOOLEAN found = FALSE; + for ( std::vector::iterator it = helpervec.begin(), itend = helpervec.end(); it != itend; ++it ) + { + if ( ( ( *it ).sector == sector ) || (( *it ).townid != BLANK_SECTOR && ( *it ).townid == townid) ) + { + ( *it ).val += val; + + found = TRUE; + break; + } + } + + if ( !found ) + { + admintmpstruct data; + data.sector = sector; + data.townid = townid; + data.val = val; + data.mercs = mercs; + data.percentage = 0; + + helpervec.push_back( data ); + } + } + } + + // loop over interesting towns/sectors, determine how many mercs that could be supported are present and set the percentage + for ( std::vector::iterator it = helpervec.begin(), itend = helpervec.end(); it != itend; ++it ) + { + if ( ( *it ).mercs > 0 ) + { + ( *it ).percentage = min( gGameExternalOptions.fAdministrationMaxPercent, ( (FLOAT)( *it ).val / (FLOAT)( *it ).mercs) ); + } + } + + for ( uiCnt = firstid, pSoldier = MercPtrs[uiCnt]; uiCnt <= lastid; ++uiCnt, ++pSoldier ) + { + if ( pSoldier && pSoldier->bAssignment == ADMINISTRATION && !pSoldier->flags.fMercAsleep && EnoughTimeOnAssignment( pSoldier ) ) + { + UINT8 sector = SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ); + INT8 townid = GetTownIdForSector( pSoldier->sSectorX, pSoldier->sSectorY ); + UINT32 val = pSoldier->GetAdministrationPoints(); + + FLOAT percentage = 0; + + BOOLEAN found = FALSE; + for ( std::vector::iterator it = helpervec.begin(), itend = helpervec.end(); it != itend; ++it ) + { + if ( ( ( *it ).sector == sector ) || (( *it ).townid != BLANK_SECTOR && ( *it ).townid == townid) ) + { + if ( ( *it ).val > 0 ) + { + // if not all points could be applied because the max threshold was reached, determine what percentage was used + if ( ( *it ).percentage >= gGameExternalOptions.fAdministrationMaxPercent ) + { + percentage = gGameExternalOptions.fAdministrationMaxPercent * ( *it ).mercs / ( *it ).val; + } + else + { + percentage = 1.0f; + } + } + + found = TRUE; + break; + } + } + + StatChange( pSoldier, LDRAMT, val * percentage * 0.03f, FROM_TRAINING ); + StatChange( pSoldier, WISDOMAMT, val * percentage * 0.02f, FROM_TRAINING ); + StatChange( pSoldier, EXPERAMT, val * percentage * 0.01f, FROM_TRAINING ); + } + } +} + // handle snitch spreading propaganda assignment // totally not a copy of HandleRadioScanInSector void HandleSpreadingPropagandaInSector( INT16 sMapX, INT16 sMapY, INT8 bZ ) @@ -6722,6 +6931,9 @@ void HandleSpreadingPropagandaInSector( INT16 sMapX, INT16 sMapY, INT8 bZ ) UINT8 ubFacilityType = (UINT8)pSnitch->sFacilityTypeOperated; UINT8 ubAssignmentType = (UINT8)GetSoldierFacilityAssignmentIndex( pSnitch ); uiPropagandaEffect *= ( GetFacilityModifier(FACILITY_PERFORMANCE_MOD, ubFacilityType, ubAssignmentType ) / 100.0 ); + + FLOAT administrationmodifier = pSnitch->GetAdministrationModifier(); + uiPropagandaEffect *= administrationmodifier; } } } @@ -7101,6 +7313,9 @@ INT16 GetBonusTrainingPtsDueToInstructor( SOLDIERTYPE *pInstructor, SOLDIERTYPE UINT32 uiTrainingPts = (UINT32) sTrainingPts; ReducePointsForFatigue( pInstructor, &uiTrainingPts ); + FLOAT administrationmodifier = pInstructor->GetAdministrationModifier(); + uiTrainingPts *= administrationmodifier; + // Flugente: our food situation influences our effectiveness if ( UsingFoodSystem() ) ReducePointsForHunger( pInstructor, &uiTrainingPts ); @@ -7220,6 +7435,9 @@ INT16 GetSoldierTrainingPts( SOLDIERTYPE *pSoldier, INT8 bTrainStat, UINT16 *pus UINT32 uiTrainingPts = (UINT32) sTrainingPts; ReducePointsForFatigue( pSoldier, &uiTrainingPts ); + FLOAT administrationmodifier = pSoldier->GetAdministrationModifier(); + uiTrainingPts *= administrationmodifier; + // Flugente: our food situation influences our effectiveness if ( UsingFoodSystem() ) ReducePointsForHunger( pSoldier, &uiTrainingPts ); @@ -7344,6 +7562,9 @@ INT16 GetSoldierStudentPts( SOLDIERTYPE *pSoldier, INT8 bTrainStat, UINT16 *pusM UINT32 uiTrainingPts = (UINT32) sTrainingPts; ReducePointsForFatigue( pSoldier, &uiTrainingPts ); + FLOAT administrationmodifier = pSoldier->GetAdministrationModifier(); + uiTrainingPts *= administrationmodifier; + // Flugente: our food situation influences our effectiveness if ( UsingFoodSystem() ) ReducePointsForHunger( pSoldier, &uiTrainingPts ); @@ -8427,13 +8648,15 @@ void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ ) if ( distance == 0 ) continue; + FLOAT administrationmodifier = 1.0f + GetAdministrationPercentage( sMapX, sMapY ) / 100.0f; + // each soldier can carry 40 items or 40 kg, and needs 10 minutes (two way walk) per sector distance, thereby 6 / distance runs possible per hour - UINT16 maxitems = 40 * pair.first * 6 / distance; - UINT16 maxweight = 400 * pair.first * 6 / distance; + UINT16 maxitems = administrationmodifier * 40 * pair.first * 6 / distance; + UINT16 maxweight = administrationmodifier * 400 * pair.first * 6 / distance; // we have to differentiate between items that the militia might use and all other items, as there is an option to only move non-militia gear - UINT16 maxitems_militiagear = 40 * (pair.first - pair.second) * 6 / distance; - UINT16 maxweight_militiagear = 400 * (pair.first - pair.second) * 6 / distance; + UINT16 maxitems_militiagear = administrationmodifier * 40 * (pair.first - pair.second) * 6 / distance; + UINT16 maxweight_militiagear = administrationmodifier * 400 * (pair.first - pair.second) * 6 / distance; // open the inventory of the sector we are taking stuff from SECTORINFO *pSectorInfo_Target = &( SectorInfo[ SECTOR(targetX, targetY) ] ); @@ -8617,7 +8840,7 @@ void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ ) void HandleTrainWorkers() { - UINT32 totalworkersadded = 0; + INT32 totalworkersadded = 0; SOLDIERTYPE *pSoldier = NULL; UINT32 uiCnt = 0; @@ -8650,7 +8873,7 @@ void HandleTrainWorkers() trainpts += GetTrainWorkerPts(pSoldier); - UINT8 workersadded = trainpts / gGameExternalOptions.usWorkerTrainingPoints; + INT8 workersadded = trainpts / gGameExternalOptions.usWorkerTrainingPoints; totalworkersadded += workersadded; @@ -8795,6 +9018,9 @@ INT16 GetTownTrainPtsForCharacter( SOLDIERTYPE *pTrainer, UINT16 *pusMaxPts ) UINT32 uiTrainingPts = (UINT32) sTotalTrainingPts; ReducePointsForFatigue( pTrainer, &uiTrainingPts ); + FLOAT administrationmodifier = pTrainer->GetAdministrationModifier(); + uiTrainingPts *= administrationmodifier; + // Flugente: our food situation influences our effectiveness if ( UsingFoodSystem() ) ReducePointsForHunger( pTrainer, &uiTrainingPts ); @@ -10317,6 +10543,24 @@ void HandleShadingOfLinesForAssignmentMenus( void ) ShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_SPY ); } + // administration + if ( CanCharacterAdministration( pSoldier ) ) + { + if ( GetNumberofAdministratableMercs( pSoldier->sSectorX, pSoldier->sSectorY ) ) + { + UnShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_ADMINISTRATION ); + UnSecondaryShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_ADMINISTRATION ); + } + else + { + SecondaryShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_ADMINISTRATION ); + } + } + else + { + ShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_ADMINISTRATION ); + } + // militia if ( CanCharacterOnDuty( pSoldier ) ) { @@ -13318,10 +13562,10 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason ) { swprintf( zStr, New113Message[MSG113_SURGERY_BEFORE_DOCTOR_ASSIGNMENT_BLOODBAG], pAutomaticSurgeryPatient->GetName(), healwithout_bloodbag, healwith_bloodbag ); - wcscpy( gzUserDefinedButton[0], L"Yes*" ); - wcscpy( gzUserDefinedButton[1], L"Yes" ); - wcscpy( gzUserDefinedButton[2], L"No" ); - wcscpy( gzUserDefinedButton[3], L"" ); + wcscpy( gzUserDefinedButton[0], New113Message[MSG113_BLOODBAGOPTIONS_YESSTAR] ); + wcscpy( gzUserDefinedButton[1], New113Message[MSG113_BLOODBAGOPTIONS_YES] ); + wcscpy( gzUserDefinedButton[2], New113Message[MSG113_BLOODBAGOPTIONS_NO] ); + wcscpy( gzUserDefinedButton[3], New113Message[MSG113_BLOODBAGOPTIONS_NO] ); DoMapMessageBox( MSG_BOX_BASIC_STYLE, zStr, MAP_SCREEN, ( MSG_BOX_FLAG_GENERIC_FOUR_BUTTONS | MSG_BOX_BUTTONS_HORIZONTAL_ORIENTATION ), SurgeryBeforePatientingRequesterCallback ); } else @@ -13458,10 +13702,10 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason ) if ( offerbloodbagoption ) { - wcscpy( gzUserDefinedButton[0], L"Yes*" ); - wcscpy( gzUserDefinedButton[1], L"Yes" ); - wcscpy( gzUserDefinedButton[2], L"No" ); - wcscpy( gzUserDefinedButton[3], L"No" ); + wcscpy( gzUserDefinedButton[0], New113Message[MSG113_BLOODBAGOPTIONS_YESSTAR] ); + wcscpy( gzUserDefinedButton[1], New113Message[MSG113_BLOODBAGOPTIONS_YES] ); + wcscpy( gzUserDefinedButton[2], New113Message[MSG113_BLOODBAGOPTIONS_NO] ); + wcscpy( gzUserDefinedButton[3], New113Message[MSG113_BLOODBAGOPTIONS_NO] ); DoMapMessageBox( MSG_BOX_BASIC_STYLE, zStr, MAP_SCREEN, ( MSG_BOX_FLAG_GENERIC_FOUR_BUTTONS | MSG_BOX_BUTTONS_HORIZONTAL_ORIENTATION ), SurgeryBeforeDoctoringRequesterCallback ); } else @@ -13600,10 +13844,10 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason ) { swprintf( zStr, New113Message[MSG113_SURGERY_BEFORE_DOCTOR_ASSIGNMENT_BLOODBAG], pAutomaticSurgeryPatient->GetName(), healwithout_bloodbag, healwith_bloodbag ); - wcscpy( gzUserDefinedButton[0], L"Yes*" ); - wcscpy( gzUserDefinedButton[1], L"Yes" ); - wcscpy( gzUserDefinedButton[2], L"No" ); - wcscpy( gzUserDefinedButton[3], L"No" ); + wcscpy( gzUserDefinedButton[0], New113Message[MSG113_BLOODBAGOPTIONS_YESSTAR] ); + wcscpy( gzUserDefinedButton[1], New113Message[MSG113_BLOODBAGOPTIONS_YES] ); + wcscpy( gzUserDefinedButton[2], New113Message[MSG113_BLOODBAGOPTIONS_NO] ); + wcscpy( gzUserDefinedButton[3], New113Message[MSG113_BLOODBAGOPTIONS_NO] ); DoMapMessageBox( MSG_BOX_BASIC_STYLE, zStr, MAP_SCREEN, ( MSG_BOX_FLAG_GENERIC_FOUR_BUTTONS | MSG_BOX_BUTTONS_HORIZONTAL_ORIENTATION ), SurgeryBeforePatientingRequesterCallback ); } else @@ -13841,7 +14085,44 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason ) ShowBox( ghFacilityBox ); } } - break; + break; + + case ASSIGN_MENU_ADMINISTRATION: + if ( CanCharacterAdministration( pSoldier ) ) + { + // stop showing menu + fShowAssignmentMenu = FALSE; + giAssignHighLine = -1; + + pSoldier->bOldAssignment = pSoldier->bAssignment; + + if ( ( pSoldier->bAssignment != ADMINISTRATION ) ) + { + SetTimeOfAssignmentChangeForMerc( pSoldier ); + } + + // remove from squad + if ( pSoldier->bOldAssignment == VEHICLE ) + { + TakeSoldierOutOfVehicle( pSoldier ); + } + RemoveCharacterFromSquads( pSoldier ); + + ChangeSoldiersAssignment( pSoldier, ADMINISTRATION ); + + AssignMercToAMovementGroup( pSoldier ); + + MakeSoldiersTacticalAnimationReflectAssignment( pSoldier ); + + // set dirty flag + fTeamPanelDirty = TRUE; + fMapScreenBottomDirty = TRUE; + + // set assignment for group + SetAssignmentForList( (INT8)ADMINISTRATION, 0 ); + } + break; + case( ASSIGN_MENU_CANCEL ): fShowAssignmentMenu = FALSE; giAssignHighLine = -1; @@ -16456,12 +16737,12 @@ void SetSoldierAssignment( SOLDIERTYPE *pSoldier, INT8 bAssignment, INT32 iParam TakeSoldierOutOfVehicle( pSoldier ); } - if ( pSoldier->bAssignment != RADIO_SCAN ) + if ( pSoldier->bAssignment != bAssignment ) { SetTimeOfAssignmentChangeForMerc( pSoldier ); } - ChangeSoldiersAssignment( pSoldier, RADIO_SCAN ); + ChangeSoldiersAssignment( pSoldier, bAssignment ); AssignMercToAMovementGroup( pSoldier ); } break; @@ -16771,6 +17052,30 @@ void SetSoldierAssignment( SOLDIERTYPE *pSoldier, INT8 bAssignment, INT32 iParam gfRenderPBInterface = TRUE; } break; + + case ADMINISTRATION: + if ( CanCharacterAdministration( pSoldier ) ) + { + pSoldier->bOldAssignment = pSoldier->bAssignment; + + // remove from squad + RemoveCharacterFromSquads( pSoldier ); + + // remove from any vehicle + if ( pSoldier->bOldAssignment == VEHICLE ) + { + TakeSoldierOutOfVehicle( pSoldier ); + } + + if ( pSoldier->bAssignment != bAssignment ) + { + SetTimeOfAssignmentChangeForMerc( pSoldier ); + } + + ChangeSoldiersAssignment( pSoldier, bAssignment ); + AssignMercToAMovementGroup( pSoldier ); + } + break; } } @@ -17918,6 +18223,10 @@ void ReEvaluateEveryonesNothingToDo( BOOLEAN aDoExtensiveCheck ) fNothingToDo = !CanCharacterBurial( pSoldier ); break; + case ADMINISTRATION: + fNothingToDo = !CanCharacterAdministration( pSoldier ) || !GetNumberofAdministratableMercs( pSoldier->sSectorX, pSoldier->sSectorY ); + break; + case VEHICLE: default: // squads fNothingToDo = FALSE; @@ -18264,6 +18573,15 @@ void SetAssignmentForList( INT8 bAssignment, INT8 bParam ) } break; + case ADMINISTRATION: + if ( CanCharacterAdministration( pSoldier ) ) + { + pSoldier->bOldAssignment = pSoldier->bAssignment; + SetSoldierAssignment( pSoldier, bAssignment, bParam, 0, 0 ); + fItWorked = TRUE; + } + break; + case( SQUAD_1 ): case( SQUAD_2 ): case( SQUAD_3 ): @@ -19750,7 +20068,7 @@ void CreateDestroyMouseRegionForFacilityMenu( void ) INT32 iFontHeight = 0; INT32 iBoxXPosition = 0; INT32 iBoxYPosition = 0; - SGPPoint pPosition, pPoint; + SGPPoint pPosition; INT32 iBoxWidth = 0; SGPRect pDimensions; SOLDIERTYPE *pSoldier = NULL; @@ -21414,7 +21732,7 @@ void SurgeryBeforeDoctoringRequesterCallback( UINT8 bExitValue ) } // Flugente: after surgery is done, remove the optional blood bag boosting - pAutomaticSurgeryDoctor->usSoldierFlagMask2 & ~SOLDIER_SURGERY_BOOSTED; + pAutomaticSurgeryDoctor->usSoldierFlagMask2 &= ~SOLDIER_SURGERY_BOOSTED; pAutomaticSurgeryDoctor = NULL; } @@ -21458,7 +21776,7 @@ void SurgeryBeforePatientingRequesterCallback( UINT8 bExitValue ) } // Flugente: after surgery is done, remove the optional blood bag boosting - pAutomaticSurgeryDoctor->usSoldierFlagMask2 & ~SOLDIER_SURGERY_BOOSTED; + pAutomaticSurgeryDoctor->usSoldierFlagMask2 &= ~SOLDIER_SURGERY_BOOSTED; pAutomaticSurgeryDoctor = NULL; } diff --git a/Strategic/Assignments.h b/Strategic/Assignments.h index a15e5dc80..b905aecc6 100644 --- a/Strategic/Assignments.h +++ b/Strategic/Assignments.h @@ -97,6 +97,7 @@ enum DOCTOR_MILITIA, // heal militia DRILL_MILITIA, // train existing militia (does not create new ones) BURIAL, // merc removes corpses in this sector + ADMINISTRATION, // merc boosts the effectiveness of other mercs NUM_ASSIGNMENTS, }; @@ -114,6 +115,28 @@ enum #define SPY_LOCATION(assignment) ((assignment == CONCEALED) || (assignment == GATHERINTEL) ) +// Flugente: does this assignment benefit from other mercs being on administration assignment? +#define ADMINISTRATION_BONUS(assignment) ( IS_DOCTOR(assignment) || \ + IS_REPAIR(assignment) || \ + (assignment==TRAIN_SELF) || \ + (assignment==TRAIN_TOWN) || \ + (assignment==TRAIN_TEAMMATE) || \ + (assignment==TRAIN_BY_OTHER) || \ + (assignment==MOVE_EQUIPMENT) || \ + (assignment==FACILITY_STAFF) || \ + (assignment==FACILITY_INTERROGATE_PRISONERS) || \ + (assignment==FACILITY_SPREAD_PROPAGANDA) || \ + (assignment==FACILITY_SPREAD_PROPAGANDA_GLOBAL) || \ + (assignment==FACILITY_STRATEGIC_MILITIA_MOVEMENT) || \ + (assignment==DISEASE_DIAGNOSE) || \ + (assignment==DISEASE_DOCTOR_SECTOR) || \ + (assignment==FORTIFICATION) || \ + (assignment==TRAIN_WORKERS) || \ + (assignment==DOCTOR_MILITIA) || \ + (assignment==DRILL_MILITIA) || \ + (assignment==BURIAL) \ + ) + // strings for snitch exposition enum { @@ -189,6 +212,7 @@ BOOLEAN CanCharacterFortify( SOLDIERTYPE *pSoldier ); BOOLEAN CanCharacterSpyAssignment( SOLDIERTYPE *pSoldier ); BOOLEAN CanCharacterBurial( SOLDIERTYPE *pSoldier ); +BOOLEAN CanCharacterAdministration( SOLDIERTYPE *pSoldier ); // can this character be assigned as a repairman? BOOLEAN CanCharacterRepair( SOLDIERTYPE *pCharacter ); @@ -561,4 +585,7 @@ BOOLEAN MakeSureMedKitIsInHand( SOLDIERTYPE *pSoldier ); UINT8 CalcSoldierNeedForSleep( SOLDIERTYPE *pSoldier ); +// Flugente: administration assignment +FLOAT GetAdministrationPercentage( INT16 sX, INT16 sY ); + #endif \ No newline at end of file diff --git a/Strategic/Map Screen Interface.h b/Strategic/Map Screen Interface.h index e744960ad..71f5bc67d 100644 --- a/Strategic/Map Screen Interface.h +++ b/Strategic/Map Screen Interface.h @@ -133,6 +133,7 @@ enum { ASSIGN_MENU_MOVE_ITEMS, // added by Flugente ASSIGN_MENU_FORTIFY, // added by Flugente ASSIGN_MENU_SPY, // added by Flugente + ASSIGN_MENU_ADMINISTRATION, // added by Flugente ASSIGN_MENU_FACILITY, // HEAROCK HAM 3.6: Facility List menu ASSIGN_MENU_CANCEL, MAX_ASSIGN_STRING_COUNT, diff --git a/Tactical/Faces.cpp b/Tactical/Faces.cpp index 7558ada53..20c390207 100644 --- a/Tactical/Faces.cpp +++ b/Tactical/Faces.cpp @@ -2342,8 +2342,7 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE sIconIndex_Assignment = 29; fDoIcon_Assignment = TRUE; // determine our skill at detecting disease - sPtsAvailable = pSoldier->stats.bMedical / 2 + NUM_SKILL_TRAITS( pSoldier, DOCTOR_NT ) * 15; - sPtsAvailable = (sPtsAvailable * (100 + pSoldier->GetBackgroundValue( BG_PERC_DISEASE_DIAGNOSE ))) / 100; + sPtsAvailable = pSoldier->GetDiseaseDiagnosePoints(); fShowNumber = TRUE; fShowMaximum = FALSE; @@ -2418,6 +2417,16 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE swprintf( sString, L"%3.1f/%d", bPtsAvailable, usMaximumPts ); break; + + case ADMINISTRATION: + sIconIndex_Assignment = 36; + fDoIcon_Assignment = TRUE; + fShowCustomText = TRUE; + sPtsAvailable = (INT16)MercPtrs[pFace->ubSoldierID]->GetAdministrationPoints(); + bPtsAvailable = GetAdministrationPercentage( MercPtrs[pFace->ubSoldierID]->sSectorX, MercPtrs[pFace->ubSoldierID]->sSectorY ); + + swprintf( sString, L"%d/%3.1f", sPtsAvailable, bPtsAvailable ); + break; } // Check for being serviced... diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index f84d7c2c8..8a13080c5 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -2963,10 +2963,10 @@ UINT32 UIHandleCAMercShoot( UI_EVENT *pUIEvent ) else swprintf( zStr, New113Message[MSG113_DO_WE_WANT_SURGERY_BLOODBAG], pTSoldier->GetName(), healwithout_bloodbag, healwith_bloodbag ); - wcscpy( gzUserDefinedButton[0], L"Yes*" ); - wcscpy( gzUserDefinedButton[1], L"Yes" ); - wcscpy( gzUserDefinedButton[2], L"No" ); - wcscpy( gzUserDefinedButton[3], L"No" ); + wcscpy( gzUserDefinedButton[0], New113Message[MSG113_BLOODBAGOPTIONS_YESSTAR] ); + wcscpy( gzUserDefinedButton[1], New113Message[MSG113_BLOODBAGOPTIONS_YES] ); + wcscpy( gzUserDefinedButton[2], New113Message[MSG113_BLOODBAGOPTIONS_NO] ); + wcscpy( gzUserDefinedButton[3], New113Message[MSG113_BLOODBAGOPTIONS_NO] ); DoMessageBox( MSG_BOX_BASIC_SMALL_BUTTONS, zStr, GAME_SCREEN, (MSG_BOX_FLAG_GENERIC_FOUR_BUTTONS| MSG_BOX_BUTTONS_HORIZONTAL_ORIENTATION), SurgeryRequesterCallback, NULL ); } else diff --git a/Tactical/Interface Enhanced.cpp b/Tactical/Interface Enhanced.cpp index dfec73403..f29164315 100644 --- a/Tactical/Interface Enhanced.cpp +++ b/Tactical/Interface Enhanced.cpp @@ -2768,6 +2768,30 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr MSYS_EnableRegion( &gUDBFasthelpRegions[iFirstDataRegion + cnt] ); ++cnt; } + + //////////////////// ADMINISTRATION MODIFIER + if ( Item[gpItemDescObject->usItem].usAdministrationModifier ) + { + CHAR16 pStr2[256]; + swprintf( pStr2, szUDBGenSecondaryStatsExplanationsTooltipText[46], Item[gpItemDescObject->usItem].usAdministrationModifier ); + + swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[46], pStr2 ); + SetRegionFastHelpText( &( gUDBFasthelpRegions[iFirstDataRegion + cnt] ), pStr ); + MSYS_EnableRegion( &gUDBFasthelpRegions[iFirstDataRegion + cnt] ); + ++cnt; + } + + //////////////////// HACKING MODIFIER + if ( Item[gpItemDescObject->usItem].usHackingModifier ) + { + CHAR16 pStr2[256]; + swprintf( pStr2, szUDBGenSecondaryStatsExplanationsTooltipText[47], Item[gpItemDescObject->usItem].usHackingModifier ); + + swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[47], pStr2 ); + SetRegionFastHelpText( &( gUDBFasthelpRegions[iFirstDataRegion + cnt] ), pStr ); + MSYS_EnableRegion( &gUDBFasthelpRegions[iFirstDataRegion + cnt] ); + ++cnt; + } } ////////////////////////////////////////////////////// @@ -6396,6 +6420,22 @@ void DrawSecondaryStats( OBJECTTYPE * gpItemDescObject ) BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 42, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); ++cnt; } + + //////////////////// ADMINISTRATION MODIFIER + if ( ( Item[gpItemDescObject->usItem].usAdministrationModifier && !fComparisonMode ) || + ( fComparisonMode && Item[gpComparedItemDescObject->usItem].usAdministrationModifier ) ) + { + BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 44, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); + ++cnt; + } + + //////////////////// HACKING MODIFIER + if ( ( Item[gpItemDescObject->usItem].usHackingModifier && !fComparisonMode ) || + ( fComparisonMode && Item[gpComparedItemDescObject->usItem].usHackingModifier ) ) + { + BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 45, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); + ++cnt; + } } void DrawPropertyValueInColour( INT16 iValue, UINT8 ubNumLine, UINT8 ubNumRegion, BOOLEAN fComparisonMode, BOOLEAN fModifier, BOOLEAN fHigherBetter, UINT16 uiOverwriteColour = 0, BOOLEAN fPercentSign = FALSE ) diff --git a/Tactical/Interface.h b/Tactical/Interface.h index 5528d5a17..62eeb5fb9 100644 --- a/Tactical/Interface.h +++ b/Tactical/Interface.h @@ -202,6 +202,7 @@ enum { BG_FORTIFY_ASSIGNMENT, // modifies effectivity of 'FORTIFICATION' assignment BG_HACKERSKILL, // hacking skill from 0 to 100, > 0 means hacking is possible BG_BURIAL_ASSIGNMENT, // modifies effectivity of 'BURIAL' assignment + BG_ADMINISTRATION_ASSIGNMENT, // modifies effectivity of 'ADMINISTRATION' assignment BG_MAX, }; diff --git a/Tactical/Item Types.h b/Tactical/Item Types.h index 8417a45c2..8fa429320 100644 --- a/Tactical/Item Types.h +++ b/Tactical/Item Types.h @@ -1197,6 +1197,9 @@ typedef struct // Flugente: fire resistance INT16 sFireResistance; + + // Flugente: a modifier for administration effectiveness + UINT8 usAdministrationModifier; } INVTYPE; diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index a03ad3d1f..660c7b9c3 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -19282,6 +19282,19 @@ INT16 SOLDIERTYPE::GetDiseaseResistance( ) return(val); } +UINT16 SOLDIERTYPE::GetDiseaseDiagnosePoints() +{ + // determine our skill at detecting disease + UINT16 skill = this->stats.bMedical / 2 + NUM_SKILL_TRAITS( this, DOCTOR_NT ) * 15; + + skill = ( skill * ( 100 + this->GetBackgroundValue( BG_PERC_DISEASE_DIAGNOSE ) ) ) / 100; + + FLOAT administrationmodifier = GetAdministrationModifier(); + skill *= administrationmodifier; + + return skill; +} + FLOAT SOLDIERTYPE::GetBurialPoints( UINT16* apCorpses ) { if ( this->stats.bLife < OKLIFE || this->bSectorZ || ( this->usSoldierFlagMask & SOLDIER_POW ) ) @@ -19338,7 +19351,9 @@ FLOAT SOLDIERTYPE::GetBurialPoints( UINT16* apCorpses ) } } - FLOAT totalvalue = val * persmodifier * bestequipmentmodifier * 0.01f; + FLOAT administrationmodifier = GetAdministrationModifier(); + + FLOAT totalvalue = val * persmodifier * bestequipmentmodifier * administrationmodifier * 0.01f; // A most awesome merc in Meduna palace, disguised as a soldier, would have a value of 1.15 * 4.63 * 2 = 10.649 at this point. // This would be the place where we modify our intel gain rate. @@ -19537,6 +19552,8 @@ FLOAT SOLDIERTYPE::GetConstructionPoints( ) dval = (dval * this->stats.bLife / this->stats.bLifeMax); + dval *= GetAdministrationModifier(); + return dval; } @@ -20029,7 +20046,9 @@ FLOAT SOLDIERTYPE::GetIntelGain() FLOAT sectorvalue = log( (FLOAT)ubLocationModifier ); sectorvalue *= sectorvalue / 2.0f; - FLOAT totalvalue = personalvalue * sectorvalue; + FLOAT administrationmodifier = GetAdministrationModifier(); + + FLOAT totalvalue = personalvalue * sectorvalue * administrationmodifier; // if we do this disguised as a soldier, we get more info if ( this->usSoldierFlagMask & SOLDIER_COVERT_SOLDIER ) @@ -20188,6 +20207,89 @@ BOOLEAN SOLDIERTYPE::IsValidBloodDonor() return TRUE; } +UINT32 SOLDIERTYPE::GetAdministrationPoints() +{ + if ( this->stats.bLife < OKLIFE || this->bSectorZ || ( this->usSoldierFlagMask & SOLDIER_POW ) ) + return 0; + + // if not on correct assignment, no gain + if ( this->bAssignment != ADMINISTRATION ) + return 0; + + UINT32 val = 250 + 4 * EffectiveWisdom( this ) + 3 * EffectiveLeadership( this ) + 5 * EffectiveExpLevel( this, FALSE ); + + // personality/disability modifiers + FLOAT persmodifier = 1.0f; + if ( DoesMercHaveDisability( this, NERVOUS ) ) persmodifier -= 0.01f; + if ( DoesMercHaveDisability( this, FORGETFUL ) ) persmodifier -= 0.60f; + if ( DoesMercHaveDisability( this, PSYCHO ) ) persmodifier -= 0.03f; + if ( DoesMercHaveDisability( this, DEAF ) ) persmodifier -= 0.15f; + if ( DoesMercHaveDisability( this, SHORTSIGHTED ) ) persmodifier -= 0.10f; + + if ( gGameOptions.fNewTraitSystem ) + { + if ( DoesMercHavePersonality( this, CHAR_TRAIT_SOCIABLE ) ) persmodifier += 0.10f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_LONER ) ) persmodifier -= 0.10f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_OPTIMIST ) ) persmodifier += 0.02f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_ASSERTIVE ) ) persmodifier += 0.08f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_INTELLECTUAL ) ) persmodifier += 0.15f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_PRIMITIVE ) ) persmodifier -= 0.15f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_AGGRESSIVE ) ) persmodifier -= 0.04f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_PHLEGMATIC ) ) persmodifier -= 0.05f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_SHOWOFF ) ) persmodifier -= 0.03f; + if ( DoesMercHavePersonality( this, CHAR_TRAIT_COWARD ) ) persmodifier -= 0.07f; + } + + // background modifier + persmodifier += ( this->GetBackgroundValue( BG_ADMINISTRATION_ASSIGNMENT ) ) / 100.0f; + + // equipment modifier + FLOAT bestequipmentmodifier = 1.0f; + + OBJECTTYPE* pObj = NULL; + + INT8 invsize = (INT8)inv.size(); // remember inventorysize, so we don't call size() repeatedly + + for ( INT8 bLoop = 0; bLoop < invsize; ++bLoop ) // ... for all items in our inventory ... + { + if ( inv[bLoop].exists() == true && Item[inv[bLoop].usItem].usAdministrationModifier ) + { + OBJECTTYPE * pObj = &( this->inv[bLoop] ); // ... get pointer for this item ... + + if ( pObj != NULL ) // ... if pointer is not obviously useless ... + { + for ( INT16 i = 0; i < pObj->ubNumberOfObjects; ++i ) + { + FLOAT modifier = 1.0f + ( Item[inv[bLoop].usItem].usAdministrationModifier * ( *pObj )[i]->data.objectStatus ) / 10000.0f; + + if ( modifier > bestequipmentmodifier ) + bestequipmentmodifier = modifier; + } + } + } + } + + // the best friendly/direct/recruit approach factor can alter the value up to 10% + FLOAT approachmax = max( gMercProfiles[this->ubProfile].usApproachFactor[0], max( gMercProfiles[this->ubProfile].usApproachFactor[1], gMercProfiles[this->ubProfile].usApproachFactor[2] ) ); + FLOAT approachmodifier = 1.0f + max( -0.1f, min( 0.1f, (approachmax - 100.0f) / 100.0f )); + + UINT32 totalvalue = val * persmodifier * bestequipmentmodifier * approachmodifier / gGameExternalOptions.fAdministrationPointsPerPercent; + + ReducePointsForFatigue( this, &totalvalue ); + + return totalvalue; +} + +extern FLOAT GetAdministrationPercentage( INT16 sX, INT16 sY ); + +FLOAT SOLDIERTYPE::GetAdministrationModifier() +{ + if ( ADMINISTRATION_BONUS( this->bAssignment ) ) + return 1.0f + GetAdministrationPercentage( this->sSectorX, this->sSectorY ) / 100.0f; + + return 1.0f; +} + INT32 CheckBleeding( SOLDIERTYPE *pSoldier ) { INT8 bBandaged; //,savedOurTurn; diff --git a/Tactical/Soldier Control.h b/Tactical/Soldier Control.h index 492a14f55..ca294d42b 100644 --- a/Tactical/Soldier Control.h +++ b/Tactical/Soldier Control.h @@ -1950,6 +1950,7 @@ public: void PrintSleepDesc( CHAR16* apStr ); FLOAT GetDiseaseContactProtection(); // get percentage protection from infections via contact INT16 GetDiseaseResistance(); + UINT16 GetDiseaseDiagnosePoints(); FLOAT GetBurialPoints( UINT16* apCorpses ); // Flugente: hourly breath regen calculation @@ -2001,6 +2002,10 @@ public: // Flugente: can we fill a blood bag from this guy ? BOOLEAN IsValidBloodDonor(); + + // Flugente: administration assignment + UINT32 GetAdministrationPoints(); + FLOAT GetAdministrationModifier(); ////////////////////////////////////////////////////////////////////////////// }; // SOLDIERTYPE; diff --git a/Tactical/XML_Background.cpp b/Tactical/XML_Background.cpp index a3998cec6..c2f5c1888 100644 --- a/Tactical/XML_Background.cpp +++ b/Tactical/XML_Background.cpp @@ -139,6 +139,7 @@ backgroundStartElementHandle(void *userData, const XML_Char *name, const XML_Cha strcmp(name, "fortify_assignment" ) == 0 || strcmp(name, "hackerskill" ) == 0 || strcmp(name, "burial_assignment" ) == 0 || + strcmp(name, "administration_assignment" ) == 0 || strcmp(name, "druguse") == 0 || strcmp(name, "xenophobic") == 0 || strcmp(name, "corruptionspread") == 0 || @@ -603,6 +604,11 @@ backgroundEndElementHandle(void *userData, const XML_Char *name) pData->curElement = ELEMENT; pData->curBackground.value[BG_BURIAL_ASSIGNMENT] = min( 1000, max( -50, (INT16)atol( pData->szCharData ) ) ); } + else if ( strcmp( name, "administration_assignment" ) == 0 ) + { + pData->curElement = ELEMENT; + pData->curBackground.value[BG_ADMINISTRATION_ASSIGNMENT] = min( 1000, max( -50, (INT16)atol( pData->szCharData ) ) ); + } else if(strcmp(name, "druguse") == 0) { pData->curElement = ELEMENT; diff --git a/Utils/Text.h b/Utils/Text.h index 2dd0c90cc..a20cc07d3 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -2538,6 +2538,9 @@ enum MSG113_PATIENCE, MSG113_SHIELD_DESTROYED, MSG113_FIREMODE_GL_DELAYED, + MSG113_BLOODBAGOPTIONS_YESSTAR, + MSG113_BLOODBAGOPTIONS_YES, + MSG113_BLOODBAGOPTIONS_NO, TEXT_NUM_MSG113, }; diff --git a/Utils/XML_Items.cpp b/Utils/XML_Items.cpp index 0628f58ee..7e2476f99 100644 --- a/Utils/XML_Items.cpp +++ b/Utils/XML_Items.cpp @@ -297,7 +297,8 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at strcmp(name, "usRiotShieldGraphic" ) == 0 || strcmp(name, "bloodbag" ) == 0 || strcmp(name, "emptybloodbag" ) == 0 || - strcmp(name, "sFireResistance" ) == 0)) + strcmp(name, "sFireResistance" ) == 0 || + strcmp(name, "usAdministrationModifier" ) == 0)) { pData->curElement = ELEMENT_PROPERTY; //DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("itemStartElementHandle: going into element, name = %s",name) ); @@ -1539,6 +1540,12 @@ itemEndElementHandle(void *userData, const XML_Char *name) pData->curElement = ELEMENT; pData->curItem.sFireResistance = min( 100, (INT16)atol( pData->szCharData ) ); } + else if ( strcmp( name, "usAdministrationModifier" ) == 0 ) + { + pData->curElement = ELEMENT; + pData->curItem.usAdministrationModifier = (UINT8)atol( pData->szCharData ); + } + --pData->maxReadDepth; } @@ -2180,6 +2187,7 @@ BOOLEAN WriteItemStats() FilePrintf(hFile,"\t\t%d\r\n", Item[cnt].usRiotShieldStrength ); FilePrintf(hFile,"\t\t%d\r\n", Item[cnt].usRiotShieldGraphic ); FilePrintf(hFile,"\t\t%d\r\n", Item[cnt].sFireResistance ); + FilePrintf(hFile,"\t\t%d\r\n", Item[cnt].usAdministrationModifier ); FilePrintf(hFile,"\t\r\n"); } diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 5ac4d13b0..72aa91d63 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -2476,6 +2476,7 @@ STR16 pAssignmentStrings[] = L"医疗民兵", //L"DoctorM.", L"训练民兵", //L"DMilitia", L"掩埋尸体", //L"Burial", + L"Admin", // TODO.Translate }; @@ -2584,6 +2585,7 @@ STR16 pPersonnelAssignmentStrings[] = L"医疗受伤的民兵", //L"Doctor wounded militia", L"训练现有的民兵", //L"Drill existing militia", L"掩埋尸体", //L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2651,6 +2653,7 @@ STR16 pLongAssignmentStrings[] = L"医疗受伤的民兵", //L"Doctor wounded militia", L"训练现有的民兵", //L"Drill existing militia", L"掩埋尸体", //L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2774,6 +2777,7 @@ STR16 pAssignMenuStrings[] = L"搬运物品", // get items L"筑防", //L"Fortify", fortify sector L"情报", //L"Intel", covert assignments + L"Administer", // TODO.Translate L"设施", // the merc is using/staffing a facility //ham3.6 L"取消", }; @@ -7458,6 +7462,9 @@ STR16 New113Message[] = L"耐心", L"%s 的防护盾毁坏了!", //L"%s's shield has been destroyed!", L" DELAY", // TODO.Translate + L"Yes*", + L"Yes", + L"No", }; STR16 New113HAMMessage[] = @@ -8456,6 +8463,8 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|E|m|p|t|y |B|l|o|o|d |B|a|g", // TODO.Translate L"|B|l|o|o|d |B|a|g", // 44 L"|R|e|s|i|s|t|a|n|t |t|o |F|i|r|e", + L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |M|o|d|i|f|i|e|r", + L"|H|a|c|k|i|n|g |M|o|d|i|f|i|e|r", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8506,6 +8515,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nA paramedic can extract blood\nfrom a donor with this.", // TODO.Translate L"\n \nA paramedic can use up this item to increase\nthe amount of health regenerated by surgery.", // 44 L"\n \nThis armor lowers fire damage by %i%%.", + L"\n \nThis item makes you more effective at\nadministrative work by %i%%.", + L"\n \nThis item improves your hacking skills by %i%%.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9085,6 +9096,7 @@ STR16 szBackgroundText_Value[]= L" %s%d%% 建设速度 \n",//L" %s%d%% building speed\n", L" 黑客技能: %s%d ",//L" hacking skill: %s%d ", L" %s%d%% 掩埋尸体速度 \n", //L" %s%d%% burial speed\n", + L" %s%d%% administration effectiveness\n", // TODO.Translate }; STR16 szBackgroundTitleText[] = diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 3e49cfd95..c8f9e7195 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -2475,6 +2475,7 @@ STR16 pAssignmentStrings[] = L"DoctorM.", L"DMilitia", L"Burial", + L"Admin", // TODO.Translate }; @@ -2583,6 +2584,7 @@ STR16 pPersonnelAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2650,6 +2652,7 @@ STR16 pLongAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2773,6 +2776,7 @@ STR16 pAssignMenuStrings[] = L"Get Item", // get items // TODO.Translate L"Fortify", // fortify sector // TODO.Translate L"Intel", // covert assignments // TODO.Translate + L"Administer", // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Stop", // cancel this menu }; @@ -7470,6 +7474,9 @@ STR16 New113Message[] = L"patience", L"%s's shield has been destroyed!", // TODO.Translate L" DELAY", // TODO.Translate + L"Yes*", + L"Yes", + L"No", }; // TODO.Translate @@ -8472,6 +8479,8 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|E|m|p|t|y |B|l|o|o|d |B|a|g", // TODO.Translate L"|B|l|o|o|d |B|a|g", // 44 L"|R|e|s|i|s|t|a|n|t |t|o |F|i|r|e", + L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |M|o|d|i|f|i|e|r", + L"|H|a|c|k|i|n|g |M|o|d|i|f|i|e|r", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8522,6 +8531,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nA paramedic can extract blood\nfrom a donor with this.", // TODO.Translate L"\n \nA paramedic can use up this item to increase\nthe amount of health regenerated by surgery.", // 44 L"\n \nThis armor lowers fire damage by %i%%.", + L"\n \nThis item makes you more effective at\nadministrative work by %i%%.", + L"\n \nThis item improves your hacking skills by %i%%.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9104,6 +9115,7 @@ STR16 szBackgroundText_Value[]= L" %s%d%% building speed\n", L" hacking skill: %s%d ", // TODO.Translate L" %s%d%% burial speed\n", // TODO.Translate + L" %s%d%% administration effectiveness\n", // TODO.Translate }; STR16 szBackgroundTitleText[] = // TODO.Translate diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 0d987cdad..8f8f270fc 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -2476,6 +2476,7 @@ STR16 pAssignmentStrings[] = L"DoctorM.", L"DMilitia", L"Burial", + L"Admin", }; @@ -2584,6 +2585,7 @@ STR16 pPersonnelAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", }; @@ -2651,6 +2653,7 @@ STR16 pLongAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", }; @@ -2774,6 +2777,7 @@ STR16 pAssignMenuStrings[] = L"Get Item", // move items L"Fortify", // fortify sector L"Intel", // covert assignments + L"Administer", L"Facility", // the merc is using/staffing a facility L"Cancel", // cancel this menu }; @@ -7458,6 +7462,9 @@ STR16 New113Message[] = L"patience", L"%s's shield has been destroyed!", L" DELAY", + L"Yes*", + L"Yes", + L"No", }; STR16 New113HAMMessage[] = @@ -8456,6 +8463,8 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|E|m|p|t|y |B|l|o|o|d |B|a|g", L"|B|l|o|o|d |B|a|g", // 44 L"|R|e|s|i|s|t|a|n|t |t|o |F|i|r|e", + L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |M|o|d|i|f|i|e|r", + L"|H|a|c|k|i|n|g |M|o|d|i|f|i|e|r", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8506,6 +8515,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nA paramedic can extract blood\nfrom a donor with this.", L"\n \nA paramedic can use up this item to increase\nthe amount of health regenerated by surgery.", // 44 L"\n \nThis armor lowers fire damage by %i%%.", + L"\n \nThis item makes you more effective at\nadministrative work by %i%%.", + L"\n \nThis item improves your hacking skills by %i%%.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9085,6 +9096,7 @@ STR16 szBackgroundText_Value[]= L" %s%d%% building speed\n", L" hacking skill: %s%d ", L" %s%d%% burial speed\n", + L" %s%d%% administration effectiveness\n", }; STR16 szBackgroundTitleText[] = diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 255d47022..3ca381665 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -2484,6 +2484,7 @@ STR16 pAssignmentStrings[] = L"DoctorM.", L"DMilitia", L"Burial", + L"Admin", // TODO.Translate }; @@ -2592,6 +2593,7 @@ STR16 pPersonnelAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2659,6 +2661,7 @@ STR16 pLongAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2782,6 +2785,7 @@ STR16 pAssignMenuStrings[] = L"Dépl obj.", // move items L"Fortify", // fortify sector // TODO.Translate L"Intel", // covert assignments // TODO.Translate + L"Administer", // TODO.Translate L"Affectat.", // the merc is using/staffing a facility L"Annuler", // cancel this menu }; @@ -7467,6 +7471,9 @@ STR16 New113Message[] = L"de la patience", L"%s's shield has been destroyed!", // TODO.Translate L" DELAY", // TODO.Translate + L"Yes*", + L"Yes", + L"No", }; STR16 New113HAMMessage[] = @@ -8459,6 +8466,8 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|E|m|p|t|y |B|l|o|o|d |B|a|g", // TODO.Translate L"|B|l|o|o|d |B|a|g", // 44 L"|R|e|s|i|s|t|a|n|t |t|o |F|i|r|e", + L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |M|o|d|i|f|i|e|r", + L"|H|a|c|k|i|n|g |M|o|d|i|f|i|e|r", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8509,6 +8518,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nA paramedic can extract blood\nfrom a donor with this.", // TODO.Translate L"\n \nA paramedic can use up this item to increase\nthe amount of health regenerated by surgery.", // 44 L"\n \nThis armor lowers fire damage by %i%%.", + L"\n \nThis item makes you more effective at\nadministrative work by %i%%.", + L"\n \nThis item improves your hacking skills by %i%%.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9086,6 +9097,7 @@ STR16 szBackgroundText_Value[]= L" %s%d%% building speed\n", L" hacking skill: %s%d ", // TODO.Translate L" %s%d%% burial speed\n", // TODO.Translate + L" %s%d%% administration effectiveness\n", // TODO.Translate }; STR16 szBackgroundTitleText[] = diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 18118a886..e9683f6d4 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -2489,6 +2489,7 @@ STR16 pAssignmentStrings[] = L"DoctorM.", L"DMilitia", L"Burial", + L"Admin", // TODO.Translate }; STR16 pMilitiaString[] = @@ -2593,6 +2594,7 @@ STR16 pPersonnelAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; // refer to above for comments @@ -2658,6 +2660,7 @@ STR16 pLongAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; // the contract options @@ -2777,6 +2780,7 @@ STR16 pAssignMenuStrings[] = L"Umzug", // move items L"Fortify", // fortify sector // TODO.Translate L"Intel", // covert assignments // TODO.Translate + L"Administer", // TODO.Translate L"Betrieb", // the merc is using/staffing a facility L"Abbrechen", // cancel this menu }; @@ -7294,6 +7298,9 @@ STR16 New113Message[] = L"patience", L"%s's shield has been destroyed!", // TODO.Translate L" DELAY", // TODO.Translate + L"Ja*", + L"Ja", + L"Nein", }; STR16 New113HAMMessage[] = @@ -8288,6 +8295,8 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|B|l|u|t|b|e|u|t|e|l |(|l|e|e|r|)", L"|B|l|u|t|b|e|u|t|e|l", // 44 L"|W|i|d|e|r|s|t|a|n|d|s|f|ä|h|i|g|k|e|i|t |g|e|g|e|n |F|e|u|e|r", + L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |M|o|d|i|f|i|e|r", + L"|H|a|c|k|i|n|g |M|o|d|i|f|i|e|r", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8338,6 +8347,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nA paramedic can extract blood\nfrom a donor with this.", // TODO.Translate L"\n \nA paramedic can use up this item to increase\nthe amount of health regenerated by surgery.", // 44 L"\n \nThis armor lowers fire damage by %i%%.", + L"\n \nThis item makes you more effective at\nadministrative work by %i%%.", + L"\n \nThis item improves your hacking skills by %i%%.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -8916,6 +8927,7 @@ STR16 szBackgroundText_Value[]= L" %s%d%% building speed\n", L" hacking skill: %s%d ", // TODO.Translate L" %s%d%% burial speed\n", // TODO.Translate + L" %s%d%% administration effectiveness\n", // TODO.Translate }; STR16 szBackgroundTitleText[] = // TODO.Translate diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 53956d9bd..2fa05900a 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -2470,6 +2470,7 @@ STR16 pAssignmentStrings[] = L"DoctorM.", L"DMilitia", L"Burial", + L"Admin", // TODO.Translate }; @@ -2578,6 +2579,7 @@ STR16 pPersonnelAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2645,6 +2647,7 @@ STR16 pLongAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2768,6 +2771,7 @@ STR16 pAssignMenuStrings[] = L"Get Item", // get items // TODO.Translate L"Fortify", // fortify sector // TODO.Translate L"Intel", // covert assignments // TODO.Translate + L"Administer", // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Annulla", // cancel this menu }; @@ -7461,6 +7465,9 @@ STR16 New113Message[] = L"patience", L"%s's shield has been destroyed!", // TODO.Translate L" DELAY", // TODO.Translate + L"Yes*", + L"Yes", + L"No", }; // TODO.Translate @@ -8462,6 +8469,8 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|E|m|p|t|y |B|l|o|o|d |B|a|g", // TODO.Translate L"|B|l|o|o|d |B|a|g", // 44 L"|R|e|s|i|s|t|a|n|t |t|o |F|i|r|e", + L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |M|o|d|i|f|i|e|r", + L"|H|a|c|k|i|n|g |M|o|d|i|f|i|e|r", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8512,6 +8521,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nA paramedic can extract blood\nfrom a donor with this.", // TODO.Translate L"\n \nA paramedic can use up this item to increase\nthe amount of health regenerated by surgery.", // 44 L"\n \nThis armor lowers fire damage by %i%%.", + L"\n \nThis item makes you more effective at\nadministrative work by %i%%.", + L"\n \nThis item improves your hacking skills by %i%%.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9095,6 +9106,7 @@ STR16 szBackgroundText_Value[]= L" %s%d%% building speed\n", L" hacking skill: %s%d ", // TODO.Translate L" %s%d%% burial speed\n", // TODO.Translate + L" %s%d%% administration effectiveness\n", // TODO.Translate }; STR16 szBackgroundTitleText[] = // TODO.Translate diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 7b9f5ee9b..20bb017fb 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -2482,6 +2482,7 @@ STR16 pAssignmentStrings[] = L"DoctorM.", L"DMilitia", L"Burial", + L"Admin", // TODO.Translate }; @@ -2590,6 +2591,7 @@ STR16 pPersonnelAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2657,6 +2659,7 @@ STR16 pLongAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2780,6 +2783,7 @@ STR16 pAssignMenuStrings[] = L"Get Item", // get items // TODO.Translate L"Fortify", // fortify sector // TODO.Translate L"Intel", // covert assignments // TODO.Translate + L"Administer", // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Anuluj", // cancel this menu }; @@ -7470,6 +7474,9 @@ STR16 New113Message[] = L"patience", L"%s's shield has been destroyed!", // TODO.Translate L" DELAY", // TODO.Translate + L"Yes*", + L"Yes", + L"No", }; STR16 New113HAMMessage[] = @@ -8474,6 +8481,8 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|E|m|p|t|y |B|l|o|o|d |B|a|g", // TODO.Translate L"|B|l|o|o|d |B|a|g", // 44 L"|R|e|s|i|s|t|a|n|t |t|o |F|i|r|e", + L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |M|o|d|i|f|i|e|r", + L"|H|a|c|k|i|n|g |M|o|d|i|f|i|e|r", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8524,6 +8533,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nA paramedic can extract blood\nfrom a donor with this.", // TODO.Translate L"\n \nA paramedic can use up this item to increase\nthe amount of health regenerated by surgery.", // 44 L"\n \nThis armor lowers fire damage by %i%%.", + L"\n \nThis item makes you more effective at\nadministrative work by %i%%.", + L"\n \nThis item improves your hacking skills by %i%%.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9108,6 +9119,7 @@ STR16 szBackgroundText_Value[]= L" %s%d%% building speed\n", L" hacking skill: %s%d ", // TODO.Translate L" %s%d%% burial speed\n", // TODO.Translate + L" %s%d%% administration effectiveness\n", // TODO.Translate }; STR16 szBackgroundTitleText[] = // TODO.Translate diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index de5afd4ce..d587da22a 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -2476,6 +2476,7 @@ STR16 pAssignmentStrings[] = L"DoctorM.", L"DMilitia", L"Burial", + L"Admin", // TODO.Translate }; @@ -2584,6 +2585,7 @@ STR16 pPersonnelAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2651,6 +2653,7 @@ STR16 pLongAssignmentStrings[] = L"Doctor wounded militia", L"Drill existing militia", L"Bury corpses", + L"Administration", // TODO.Translate }; @@ -2774,6 +2777,7 @@ STR16 pAssignMenuStrings[] = L"Носильщик", // move items L"Укреплять", // fortify sector L"Intel", // covert assignments // TODO.Translate + L"Administer", // TODO.Translate L"Занятия", // the merc is using/staffing a facility L"Отмена", // cancel this menu }; @@ -7458,6 +7462,9 @@ STR16 New113Message[] = L"терпение", L"%s's shield has been destroyed!", // TODO.Translate L" DELAY", // TODO.Translate + L"Yes*", + L"Yes", + L"No", }; STR16 New113HAMMessage[] = @@ -8456,6 +8463,8 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|E|m|p|t|y |B|l|o|o|d |B|a|g", // TODO.Translate L"|B|l|o|o|d |B|a|g", // 44 L"|R|e|s|i|s|t|a|n|t |t|o |F|i|r|e", + L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |M|o|d|i|f|i|e|r", + L"|H|a|c|k|i|n|g |M|o|d|i|f|i|e|r", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8506,6 +8515,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nA paramedic can extract blood\nfrom a donor with this.", // TODO.Translate L"\n \nA paramedic can use up this item to increase\nthe amount of health regenerated by surgery.", // 44 L"\n \nThis armor lowers fire damage by %i%%.", + L"\n \nThis item makes you more effective at\nadministrative work by %i%%.", + L"\n \nThis item improves your hacking skills by %i%%.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9085,6 +9096,7 @@ STR16 szBackgroundText_Value[]= L" %s%d%% кровотечение\n", L" Взлом: %s%d ", L" %s%d%% burial speed\n", // TODO.Translate + L" %s%d%% administration effectiveness\n", // TODO.Translate }; STR16 szBackgroundTitleText[] =