New feature: new drug system (by Flugente)

- added many new drug effects. A drug can now have several effects, these can be set via the <DrugType>-tag in Items.xml. 
- Control effect magnitude in Drugs.xml. Added new drugs in Items.xml.
- gave Buns drugs in Kit 5 "Druggist" for demonstration reasons, added drugs to Howard's inventory.
- see also first post in http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=303950#Post303950

WARNING! This will break savegame compatibility!


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5225 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-04-27 13:22:35 +00:00
parent 4f120f152f
commit fc88abaa5b
24 changed files with 908 additions and 426 deletions
+6 -2
View File
@@ -64,6 +64,8 @@
// added by SANDRO
#include "Game Clock.h"
#include "Morale.h"
// added by Flugente
#include "drugs and alcohol.h"
#endif
#ifdef JA2UB
@@ -445,7 +447,8 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
// If this is a player guy, show message about no APS
if ( EnoughPoints( pSoldier, sAPCost, 0, fFromUI ) )
{
if ( (pSoldier->ubProfile != NO_PROFILE) && (gMercProfiles[ pSoldier->ubProfile ].bDisability == PSYCHO) )
// Flugente: drugs can temporarily cause a merc to go psycho
if ( (pSoldier->ubProfile != NO_PROFILE) && ( (gMercProfiles[ pSoldier->ubProfile ].bDisability == PSYCHO) || MercUnderTheInfluence(pSoldier, DRUG_TYPE_PSYCHO) ) )
{
// psychos might possibly switch to burst if they can
// Changed by ADB, rev 1513
@@ -519,7 +522,8 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
UINT32 roll;
// SANDRO - changed Random to PreRandom to avoid save-load mania
if((pSoldier->ubProfile != NO_PROFILE) && (gMercProfiles[ pSoldier->ubProfile ].bDisability == PSYCHO) && PreRandom(100) < 20)
// Flugente: drugs can temporarily cause a merc to go psycho
if((pSoldier->ubProfile != NO_PROFILE) && ( (gMercProfiles[ pSoldier->ubProfile ].bDisability == PSYCHO) || MercUnderTheInfluence(pSoldier, DRUG_TYPE_PSYCHO) ) && PreRandom(100) < 20)
{
chanceToMisfire = diceSides;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, gzLateLocalizedString[ 26 ], pSoldier->name );