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
+8
View File
@@ -260,6 +260,7 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
strcmp(name, "TripWireActivation") == 0 ||
strcmp(name, "TripWire") == 0 ||
strcmp(name, "Directional") == 0 ||
strcmp(name, "DrugType") == 0 ||
strcmp(name, "fFlags") == 0 ))
{
@@ -1301,6 +1302,11 @@ itemEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curItem.directional = (BOOLEAN) atol(pData->szCharData);
}
else if(strcmp(name, "DrugType") == 0)
{
pData->curElement = ELEMENT;
pData->curItem.drugtype = (UINT32) atol(pData->szCharData);
}
pData->maxReadDepth--;
}
@@ -1912,6 +1918,8 @@ BOOLEAN WriteItemStats()
FilePrintf(hFile,"\t\t<TripWire>%d</TripWire>\r\n", Item[cnt].tripwire );
FilePrintf(hFile,"\t\t<Directional>%d</Directional>\r\n", Item[cnt].directional );
FilePrintf(hFile,"\t\t<DrugType>%d</DrugType>\r\n", Item[cnt].drugtype );
FilePrintf(hFile,"\t</ITEM>\r\n");
}
FilePrintf(hFile,"</ITEMLIST>\r\n");