mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New disability: Hemophiliac causes mercs to bleed a lot faster, even for tiny wounds
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8217 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -22,6 +22,7 @@ typedef enum
|
||||
IMP_DISABILITY_PSYCHO,
|
||||
IMP_DISABILITY_DEAF,
|
||||
IMP_DISABILITY_SHORTSIGHTED,
|
||||
IMP_DISABILITY_BLEEDER,
|
||||
IMP_DISABILITIES_NUMBER,
|
||||
};
|
||||
|
||||
|
||||
@@ -4118,6 +4118,16 @@ void HandleIMPCharProfileResultsMessage( void)
|
||||
|
||||
AddEmailRecordToList( pString );
|
||||
}
|
||||
else if ( gMercProfiles[iCurrentIMPSlot].bDisability == HEMOPHILIAC )
|
||||
{
|
||||
swprintf( pString, gzIMPDisabilityTraitEmailTextHemophiliac[0] );
|
||||
|
||||
AddEmailRecordToList( pString );
|
||||
|
||||
swprintf( pString, gzIMPDisabilityTraitEmailTextHemophiliac[1] );
|
||||
|
||||
AddEmailRecordToList( pString );
|
||||
}
|
||||
else
|
||||
{
|
||||
// personality tick
|
||||
|
||||
@@ -19130,11 +19130,15 @@ INT32 CheckBleeding( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT8 bBandaged; //,savedOurTurn;
|
||||
INT32 iBlood = NOBLOOD;
|
||||
BOOLEAN bleeder = FALSE;
|
||||
|
||||
if ( pSoldier->stats.bLife != 0 )
|
||||
{
|
||||
bleeder = DoesMercHaveDisability( pSoldier, HEMOPHILIAC );
|
||||
|
||||
// if merc is hurt beyond the minimum required to bleed, or he's dying
|
||||
if ( ((pSoldier->bBleeding > MIN_BLEEDING_THRESHOLD) || pSoldier->stats.bLife < OKLIFE) )
|
||||
// Flugente: or if they are a hemophiliac
|
||||
if ( (pSoldier->bBleeding > MIN_BLEEDING_THRESHOLD) || pSoldier->stats.bLife < OKLIFE || bleeder )
|
||||
{
|
||||
// if he's NOT in the process of being bandaged or DOCTORed
|
||||
if ( (pSoldier->ubServiceCount == 0) && (AnyDoctorWhoCanHealThisPatient( pSoldier, HEALABLE_EVER ) == NULL) )
|
||||
@@ -19142,7 +19146,7 @@ INT32 CheckBleeding( SOLDIERTYPE *pSoldier )
|
||||
// may drop blood whether or not any bleeding takes place this turn
|
||||
if ( pSoldier->bTilesMoved < 1 )
|
||||
{
|
||||
iBlood = ((pSoldier->bBleeding - MIN_BLEEDING_THRESHOLD) / BLOODDIVISOR); // + pSoldier->dying;
|
||||
iBlood = max(0, ((pSoldier->bBleeding - MIN_BLEEDING_THRESHOLD) / BLOODDIVISOR) ); // + pSoldier->dying;
|
||||
if ( iBlood > MAXBLOODQUANTITY )
|
||||
{
|
||||
iBlood = MAXBLOODQUANTITY;
|
||||
@@ -19153,6 +19157,10 @@ INT32 CheckBleeding( SOLDIERTYPE *pSoldier )
|
||||
iBlood = NOBLOOD;
|
||||
}
|
||||
|
||||
// Flugente: bleeders, well, bleed
|
||||
if ( bleeder )
|
||||
iBlood = min( 1, iBlood );
|
||||
|
||||
// Are we in a different mode?
|
||||
if ( !(gTacticalStatus.uiFlags & TURNBASED) || !(gTacticalStatus.uiFlags & INCOMBAT) )
|
||||
{
|
||||
@@ -19408,16 +19416,22 @@ void SoldierCollapse( SOLDIERTYPE *pSoldier )
|
||||
|
||||
FLOAT CalcSoldierNextBleed( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT8 bBandaged;
|
||||
|
||||
// calculate how many turns before he bleeds again
|
||||
// bleeding faster the lower life gets, and if merc is running around
|
||||
//pSoldier->nextbleed = 2 + (pSoldier->life / (10 + pSoldier->tilesMoved)); // min = 2
|
||||
|
||||
// if bandaged, give 1/2 of the bandaged life points back into equation
|
||||
bBandaged = pSoldier->stats.bLifeMax - pSoldier->stats.bLife - pSoldier->bBleeding;
|
||||
INT8 bBandaged = pSoldier->stats.bLifeMax - pSoldier->stats.bLife - pSoldier->bBleeding;
|
||||
|
||||
return((FLOAT)1 + (FLOAT)((pSoldier->stats.bLife + bBandaged / 2) / (10 + pSoldier->bTilesMoved))); // min = 1
|
||||
FLOAT val = 1.0f;
|
||||
|
||||
// Flugente: hemophiliacs bleed a lot faster
|
||||
if ( DoesMercHaveDisability( pSoldier, HEMOPHILIAC ) )
|
||||
val += ((FLOAT)(pSoldier->stats.bLife) / (FLOAT)(30 + 2 * pSoldier->bTilesMoved));
|
||||
else
|
||||
val += ((FLOAT)(pSoldier->stats.bLife + bBandaged / 2) / (FLOAT)(10 + pSoldier->bTilesMoved));
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
FLOAT CalcSoldierNextUnmovingBleed( SOLDIERTYPE *pSoldier )
|
||||
|
||||
@@ -329,6 +329,7 @@ typedef enum
|
||||
// Flugente: more disabilities
|
||||
DEAF,
|
||||
SHORTSIGHTED,
|
||||
HEMOPHILIAC,
|
||||
NUM_DISABILITIES
|
||||
} PersonalityTrait;
|
||||
|
||||
|
||||
@@ -344,6 +344,7 @@ extern STR16 sColorChoiceExplanationTexts[];
|
||||
extern STR16 gzIMPDisabilityTraitText[]; // added by Flugente
|
||||
extern STR16 gzIMPDisabilityTraitEmailTextDeaf[]; // added by Flugente
|
||||
extern STR16 gzIMPDisabilityTraitEmailTextShortSighted[];
|
||||
extern STR16 gzIMPDisabilityTraitEmailTextHemophiliac[]; // added by Flugente
|
||||
extern STR16 sEnemyTauntsFireGun[];
|
||||
extern STR16 sEnemyTauntsFireLauncher[];
|
||||
extern STR16 sEnemyTauntsThrow[];
|
||||
|
||||
@@ -7813,6 +7813,7 @@ STR16 gzIMPDisabilityTraitText[]=
|
||||
L"神经错乱",
|
||||
L"聋子", //L"Deaf",
|
||||
L"近视眼", //L"Shortsighted",
|
||||
L"Hemophiliac", // TODO.Translate
|
||||
L"I.M.P. 性格缺陷",
|
||||
};
|
||||
|
||||
@@ -7828,6 +7829,12 @@ STR16 gzIMPDisabilityTraitEmailTextShortSighted[] =
|
||||
L"因为你在发光的长方体前面花了太久时间。你应该多吃点胡萝卜,你见过戴眼镜的兔子么?没有吧。", // L"That happens when you spend your days in front of glowing rectangles. You should have eaten more carrots. Ever seen a rabbit with glasses? Figures.",
|
||||
};
|
||||
|
||||
STR16 gzIMPDisabilityTraitEmailTextHemophiliac[] = // TODO.Translate
|
||||
{
|
||||
L"Are you SURE this is the right job for you?",
|
||||
L"As long as you are so good to never ever get hit, or fight only in fully staffed hospitals, you should be fine.",
|
||||
};
|
||||
|
||||
// HEADROCK HAM 3.6: Error strings for assigning a merc to a facility
|
||||
STR16 gzFacilityErrorMessage[]=
|
||||
{
|
||||
|
||||
@@ -7821,6 +7821,7 @@ STR16 gzIMPDisabilityTraitText[]=
|
||||
L"Psychotic",
|
||||
L"Deaf",
|
||||
L"Shortsighted",
|
||||
L"Hemophiliac", // TODO.Translate
|
||||
L"I.M.P. Disabilities",
|
||||
};
|
||||
|
||||
@@ -7836,6 +7837,12 @@ STR16 gzIMPDisabilityTraitEmailTextShortSighted[] =
|
||||
L"That happens when you spend your days in front of glowing rectangles. You should have eaten more carrots. Ever seen a rabbit with glasses? Figures.",
|
||||
};
|
||||
|
||||
STR16 gzIMPDisabilityTraitEmailTextHemophiliac[] = // TODO.Translate
|
||||
{
|
||||
L"Are you SURE this is the right job for you?",
|
||||
L"As long as you are so good to never ever get hit, or fight only in fully staffed hospitals, you should be fine.",
|
||||
};
|
||||
|
||||
// TODO.Translate
|
||||
// HEADROCK HAM 3.6: Error strings for assigning a merc to a facility
|
||||
STR16 gzFacilityErrorMessage[]=
|
||||
|
||||
@@ -7809,6 +7809,7 @@ STR16 gzIMPDisabilityTraitText[]=
|
||||
L"Psychotic",
|
||||
L"Deaf",
|
||||
L"Shortsighted",
|
||||
L"Hemophiliac",
|
||||
L"I.M.P. Disabilities",
|
||||
};
|
||||
|
||||
@@ -7824,6 +7825,12 @@ STR16 gzIMPDisabilityTraitEmailTextShortSighted[] =
|
||||
L"That happens when you spend your days in front of glowing rectangles. You should have eaten more carrots. Ever seen a rabbit with glasses? Figures.",
|
||||
};
|
||||
|
||||
STR16 gzIMPDisabilityTraitEmailTextHemophiliac[] =
|
||||
{
|
||||
L"Are you SURE this is the right job for you?",
|
||||
L"As long as you are so good to never ever get hit, or fight only in fully staffed hospitals, you should be fine.",
|
||||
};
|
||||
|
||||
// HEADROCK HAM 3.6: Error strings for assigning a merc to a facility
|
||||
STR16 gzFacilityErrorMessage[]=
|
||||
{
|
||||
|
||||
@@ -7815,6 +7815,7 @@ STR16 gzIMPDisabilityTraitText[]=
|
||||
L"Psychotique",
|
||||
L"Mauvaise audition",
|
||||
L"Mauvaise vue",
|
||||
L"Hemophiliac", // TODO.Translate
|
||||
L"IMP : Handicaps",
|
||||
};
|
||||
|
||||
@@ -7830,6 +7831,12 @@ STR16 gzIMPDisabilityTraitEmailTextShortSighted[] =
|
||||
L"C'est ce qui arrive lorsque l'on passe ses journées devant un écran. Vous auriez dû manger plus de carottes. Avez-vous déjà vu un lapin à lunettes ? Improbable, hein ?",
|
||||
};
|
||||
|
||||
STR16 gzIMPDisabilityTraitEmailTextHemophiliac[] = // TODO.Translate
|
||||
{
|
||||
L"Are you SURE this is the right job for you?",
|
||||
L"As long as you are so good to never ever get hit, or fight only in fully staffed hospitals, you should be fine.",
|
||||
};
|
||||
|
||||
// HEADROCK HAM 3.6: Error strings for assigning a merc to a facility
|
||||
STR16 gzFacilityErrorMessage[]=
|
||||
{
|
||||
|
||||
@@ -7642,6 +7642,7 @@ STR16 gzIMPDisabilityTraitText[]=
|
||||
L"Psychopath",
|
||||
L"Schwerhörigkeit",
|
||||
L"Kurzsichtigkeit",
|
||||
L"Bluter",
|
||||
L"Ihre größte Schwäche",
|
||||
};
|
||||
|
||||
@@ -7657,6 +7658,12 @@ STR16 gzIMPDisabilityTraitEmailTextShortSighted[] =
|
||||
L"Das passiert wenn man dauernd nur vor der Glotze rumhängt. Sie hätten mehr Karotten essen sollen. Schon mal einen Hasen mit Brille gesehen? Aha.",
|
||||
};
|
||||
|
||||
STR16 gzIMPDisabilityTraitEmailTextHemophiliac[] = // TODO.Translate
|
||||
{
|
||||
L"Are you SURE this is the right job for you?",
|
||||
L"As long as you are so good to never ever get hit, or fight only in fully staffed hospitals, you should be fine.",
|
||||
};
|
||||
|
||||
// HEADROCK HAM 3.6: Error strings for assigning a merc to a facility
|
||||
STR16 gzFacilityErrorMessage[]=
|
||||
{
|
||||
|
||||
@@ -7811,6 +7811,7 @@ STR16 gzIMPDisabilityTraitText[]=
|
||||
L"Psychotic",
|
||||
L"Deaf",
|
||||
L"Shortsighted",
|
||||
L"Hemophiliac", // TODO.Translate
|
||||
L"I.M.P. Disabilities",
|
||||
};
|
||||
|
||||
@@ -7826,6 +7827,12 @@ STR16 gzIMPDisabilityTraitEmailTextShortSighted[] =
|
||||
L"That happens when you spend your days in front of glowing rectangles. You should have eaten more carrots. Ever seen a rabbit with glasses? Figures.",
|
||||
};
|
||||
|
||||
STR16 gzIMPDisabilityTraitEmailTextHemophiliac[] = // TODO.Translate
|
||||
{
|
||||
L"Are you SURE this is the right job for you?",
|
||||
L"As long as you are so good to never ever get hit, or fight only in fully staffed hospitals, you should be fine.",
|
||||
};
|
||||
|
||||
// TODO.Translate
|
||||
// HEADROCK HAM 3.6: Error strings for assigning a merc to a facility
|
||||
STR16 gzFacilityErrorMessage[]=
|
||||
|
||||
@@ -475,6 +475,7 @@ STR16 gzIMPDisabilitiesHelpTexts[]=
|
||||
L"可能会偶尔发疯并把手里武器设在自动后乱喷。\n如果武器不能自动射击将会打击自身士气。",// L"He can go psycho and shoot like mad once per a while\nand can lose morale if unable to do that with given weapon.",
|
||||
L"大大减少听力范围", // L"Drastically reduced hearing.",
|
||||
L"减少视力范围", // L"Reduced sight range.",
|
||||
L"Drastically increased bleeding.", // TODO.Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -475,6 +475,7 @@ STR16 gzIMPDisabilitiesHelpTexts[]=
|
||||
L"Will go psycho and shoot like mad once in a while\nand will lose morale if unable to do so with equipped weapon.",
|
||||
L"Drastically reduced hearing.",
|
||||
L"Reduced sight range.",
|
||||
L"Drastically increased bleeding.", // TODO.Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -476,6 +476,7 @@ STR16 gzIMPDisabilitiesHelpTexts[]=
|
||||
L"Will go psycho and shoot like mad once in a while\nand will lose morale if unable to do so with equipped weapon.",
|
||||
L"Drastically reduced hearing.",
|
||||
L"Reduced sight range.",
|
||||
L"Drastically increased bleeding.",
|
||||
};
|
||||
|
||||
STR16 gzIMPProfileCostText[]=
|
||||
|
||||
@@ -475,6 +475,7 @@ STR16 gzIMPDisabilitiesHelpTexts[]=
|
||||
L"Il peut devenir psychopathe et tirer comme un fou de temps en temps\net peut perdre du moral, s'il n'est pas capable d'utiliser son arme.",
|
||||
L"Audition considérablement réduite.",
|
||||
L"Distance de vision réduit.",
|
||||
L"Drastically increased bleeding.", // TODO.Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -477,6 +477,7 @@ STR16 gzIMPDisabilitiesHelpTexts[]=
|
||||
L"Dreht manchmal durch und schießt dabei hin und wieder wild um sich.\nVerliert Moral, wenn das mit der ausgerüsteten Waffe nicht möglich ist.",
|
||||
L"Deutlich geringere Hörweite.",
|
||||
L"Geringere Sichtweite.",
|
||||
L"Drastically increased bleeding.", // TODO.Translate
|
||||
};
|
||||
|
||||
STR16 gzIMPProfileCostText[]=
|
||||
|
||||
@@ -473,6 +473,7 @@ STR16 gzIMPDisabilitiesHelpTexts[]=
|
||||
L"Will go psycho and shoot like mad once in a while\nand will lose morale if unable to do so with equipped weapon.",
|
||||
L"Drastically reduced hearing.",
|
||||
L"Reduced sight range.",
|
||||
L"Drastically increased bleeding.", // TODO.Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -475,6 +475,7 @@ STR16 gzIMPDisabilitiesHelpTexts[]=
|
||||
L"Will go psycho and shoot like mad once in a while\nand will lose morale if unable to do so with equipped weapon.",
|
||||
L"Drastically reduced hearing.",
|
||||
L"Reduced sight range.",
|
||||
L"Drastically increased bleeding.", // TODO.Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -476,6 +476,7 @@ STR16 gzIMPDisabilitiesHelpTexts[]=
|
||||
L"Иногда бывают приступы помутнения рассудка. \nВ такие моменты он расстреливает весь магазин до последней пули. \nПадает духом, если его оружие этого не позволяет.",
|
||||
L"Значительно пониженный слух.",
|
||||
L"Сниженная дальность видимости.",
|
||||
L"Drastically increased bleeding.", // TODO.Translate
|
||||
};
|
||||
|
||||
STR16 gzIMPProfileCostText[]=
|
||||
|
||||
@@ -7826,6 +7826,7 @@ STR16 gzIMPDisabilityTraitText[]=
|
||||
L"Psychol",
|
||||
L"Deaf",
|
||||
L"Shortsighted",
|
||||
L"Hemophiliac", // TODO.Translate
|
||||
L"Niepełnosprawności I.M.P.-a",
|
||||
};
|
||||
|
||||
@@ -7841,6 +7842,12 @@ STR16 gzIMPDisabilityTraitEmailTextShortSighted[] =
|
||||
L"That happens when you spend your days in front of glowing rectangles. You should have eaten more carrots. Ever seen a rabbit with glasses? Figures.",
|
||||
};
|
||||
|
||||
STR16 gzIMPDisabilityTraitEmailTextHemophiliac[] = // TODO.Translate
|
||||
{
|
||||
L"Are you SURE this is the right job for you?",
|
||||
L"As long as you are so good to never ever get hit, or fight only in fully staffed hospitals, you should be fine.",
|
||||
};
|
||||
|
||||
// HEADROCK HAM 3.6: Error strings for assigning a merc to a facility
|
||||
STR16 gzFacilityErrorMessage[]=
|
||||
{
|
||||
|
||||
@@ -7809,6 +7809,7 @@ STR16 gzIMPDisabilityTraitText[]=
|
||||
L"Психопат", //Psychotic
|
||||
L"Глухой",
|
||||
L"Близорукий",
|
||||
L"Hemophiliac", // TODO.Translate
|
||||
L"I.M.P.: Недостатки", //I.M.P. Disabilities
|
||||
};
|
||||
|
||||
@@ -7824,6 +7825,12 @@ STR16 gzIMPDisabilityTraitEmailTextShortSighted[] =
|
||||
L"Это случается, если проводить много времени перед светящимися прямоугольниками. Нужно было есть больше морковок. Вы когда-нибудь видели кролика в очках?",
|
||||
};
|
||||
|
||||
STR16 gzIMPDisabilityTraitEmailTextHemophiliac[] = // TODO.Translate
|
||||
{
|
||||
L"Are you SURE this is the right job for you?",
|
||||
L"As long as you are so good to never ever get hit, or fight only in fully staffed hospitals, you should be fine.",
|
||||
};
|
||||
|
||||
// HEADROCK HAM 3.6: Error strings for assigning a merc to a facility
|
||||
STR16 gzFacilityErrorMessage[]=
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user