- New drug: antidote cures poisoning (by Flugente)

WARNING! This will break savegame compatibility.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5316 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-05-30 07:51:30 +00:00
parent c90f4bce47
commit 67fee5f14f
3 changed files with 22 additions and 3 deletions
+18
View File
@@ -495,6 +495,24 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
pSoldier->iHealableInjury += (applieddamage * 100);
}
}
// if we took an antidote, reduce poisoning
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_CUREPOISON ] > 0 )
{
if ( pSoldier->bPoisonSum > 0 )
{
if ( pSoldier->bPoisonBleeding > 0 )
{
pSoldier->bPoisonBleeding--;
}
else if ( pSoldier->bPoisonLife > 0 )
{
pSoldier->bPoisonLife--;
}
pSoldier->bPoisonSum--;
}
}
}
}
+3 -2
View File
@@ -34,7 +34,8 @@ enum {
DRUG_TYPE_KNOCKOUT,
DRUG_TYPE_VISION,
DRUG_TYPE_TUNNELVISION,
DRUG_TYPE_LIFEDAMAGE
DRUG_TYPE_LIFEDAMAGE,
DRUG_TYPE_CUREPOISON // 20
};
// Flugente, 12-04-21
@@ -60,7 +61,7 @@ enum {
#define DRUG_VISION (1 << DRUG_TYPE_VISION) //0x00020000 //131072
#define DRUG_TUNNELVISION (1 << DRUG_TYPE_TUNNELVISION) //0x00040000 //262144
#define DRUG_LIFEDAMAGE (1 << DRUG_TYPE_LIFEDAMAGE) //0x00080000 //524288
#define DRUG_MISC_7 0x00100000 //1048576
#define DRUG_CUREPOISON (1 << DRUG_TYPE_CUREPOISON) //0x00100000 //1048576
#define DRUG_MISC_8 0x00200000 //2097152
#define DRUG_MISC_9 0x00400000 //4194304
#define DRUG_MISC_10 0x00800000 //8388608
+1 -1
View File
@@ -20,7 +20,7 @@
#define PTR_STANDING (gAnimControl[ pSoldier->usAnimState ].ubHeight == ANIM_STAND)
#define PTR_PRONE (gAnimControl[ pSoldier->usAnimState ].ubHeight == ANIM_PRONE)
#define DRUG_TYPE_MAX 20
#define DRUG_TYPE_MAX 32
// TEMP VALUES FOR NAMES
#define MAXCIVLASTNAMES 30