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
+20
View File
@@ -58,6 +58,8 @@
// THE_BOB : added for pocket popup definitions
#include <map>
#include "popup_definition.h"
#include "drugs and alcohol.h"
#endif
#ifdef JA2UB
@@ -1251,6 +1253,8 @@ std::map<UINT8,popupDef> LBEPocketPopup;
// { /* Knife Pocket */ 5, 0, 1, {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }
//};
DRUGTYPE Drug[DRUG_TYPE_MAX];
BOOLEAN ItemIsLegal( UINT16 usItemIndex, BOOLEAN fIgnoreCoolness )
{
if ( Item[usItemIndex].ubCoolness == 0 && !fIgnoreCoolness )
@@ -10594,6 +10598,16 @@ INT16 GetTotalVisionRangeBonus( SOLDIERTYPE * pSoldier, UINT8 bLightLevel )
bonus += GetBrightLightVisionRangeBonus(pSoldier, bLightLevel);
}
// Flugente: drugs can alter our sight
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_VISION ] )
{
bonus += 10;
}
else if ( pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_VISION ] )
{
bonus -= 10;
}
// SANDRO - STOMP traits - Scouting bonus for sight range with binoculars and similar
if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( pSoldier, SCOUTING_NT ) && pSoldier->pathing.bLevel == 0 )
{
@@ -10731,6 +10745,12 @@ UINT8 GetPercentTunnelVision( SOLDIERTYPE * pSoldier )
}
}
// Flugente: drugs can alter our vision
if ( pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_TUNNELVISION ] )
{
bonus = __min(100, bonus + 25);
}
if ( !PTR_OURTEAM ) // Madd: adjust tunnel vision by difficulty level
bonus /= gGameOptions.ubDifficultyLevel;