New feature: riot shields protect against damage from some directions.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23452&start=0&

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8434 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-07-29 21:18:13 +00:00
parent 8a82802932
commit 11729a132e
22 changed files with 498 additions and 19 deletions
+17 -2
View File
@@ -291,7 +291,9 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
strcmp(name, "cigarette" ) == 0 ||
strcmp(name, "usPortionSize" ) == 0 ||
strcmp(name, "diseaseprotectionface" ) == 0 ||
strcmp(name, "diseaseprotectionhand" ) == 0))
strcmp(name, "diseaseprotectionhand" ) == 0||
strcmp(name, "usRiotShieldStrength" ) == 0 ||
strcmp(name, "usRiotShieldGraphic" ) == 0))
{
pData->curElement = ELEMENT_PROPERTY;
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("itemStartElementHandle: going into element, name = %s",name) );
@@ -1499,6 +1501,16 @@ itemEndElementHandle(void *userData, const XML_Char *name)
if ( val )
pData->curItem.usItemFlag |= DISEASEPROTECTION_2;
}
else if ( strcmp( name, "usRiotShieldStrength" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usRiotShieldStrength = min( 100, (UINT16)atol( pData->szCharData ) );
}
else if ( strcmp( name, "usRiotShieldGraphic" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usRiotShieldGraphic = (UINT16)atol( pData->szCharData );
}
--pData->maxReadDepth;
}
@@ -2128,7 +2140,7 @@ BOOLEAN WriteItemStats()
FilePrintf(hFile,"\t\t<usSpotting>%d</usSpotting>\r\n", Item[cnt].usSpotting );
FilePrintf(hFile,"\t\t<sBackpackWeightModifier>%d</sBackpackWeightModifier>\r\n", Item[cnt].sBackpackWeightModifier);
FilePrintf(hFile,"\t\t<fAllowClimbing>%d</fAllowClimbing>\r\n", Item[cnt].fAllowClimbing);
FilePrintf(hFile, "\t\t<cigarette>%d</cigarette>\r\n", Item[cnt].cigarette );
FilePrintf(hFile,"\t\t<cigarette>%d</cigarette>\r\n", Item[cnt].cigarette );
FilePrintf(hFile,"\t\t<usPortionSize>%d</usPortionSize>\r\n", Item[cnt].usPortionSize );
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_1 )
@@ -2136,6 +2148,9 @@ BOOLEAN WriteItemStats()
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_2 )
FilePrintf( hFile, "\t\t<diseaseprotectionhand>%d</diseaseprotectionhand>\r\n", 1 );
FilePrintf(hFile,"\t\t<usRiotShieldStrength>%d</usRiotShieldStrength>\r\n", Item[cnt].usRiotShieldStrength );
FilePrintf(hFile,"\t\t<usRiotShieldGraphic>%d</usRiotShieldGraphic>\r\n", Item[cnt].usRiotShieldGraphic );
FilePrintf(hFile,"\t</ITEM>\r\n");
}
FilePrintf(hFile,"</ITEMLIST>\r\n");
+2
View File
@@ -8388,6 +8388,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|反|器|材|弹|药", //L"|A|n|t|i|-|M|a|t|e|r|i|a|l |A|m|m|o",
L"|面|部|防|护", //L"|F|a|c|e |P|r|o|t|e|c|t|i|o|n",
L"|感|染|防|护", //L"|I|n|f|e|c|t|i|o|n |P|r|o|t|e|c|t|i|o|n", // 39
L"|S|h|i|e|l|d", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8432,6 +8433,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \n这种弹药可以破坏发光的墙\n或者其他不同种类的物品。", //L"\n \nThis ammo can destroy light walls\nand various other objects.",
L"\n \n如果你脸上带了这个,这就将降低\n传播给其他人的几率。", //L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.",
L"\n \n如果保存在物品栏\n降低\n传染给其他人的几率。", //L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.",
L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate
};
STR16 szUDBAdvStatsTooltipText[]=
+2
View File
@@ -8405,6 +8405,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|A|n|t|i|-|M|a|t|e|r|i|a|l |A|m|m|o", // TODO.Translate
L"|F|a|c|e |P|r|o|t|e|c|t|i|o|n",
L"|I|n|f|e|c|t|i|o|n |P|r|o|t|e|c|t|i|o|n", // 39
L"|S|h|i|e|l|d", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8449,6 +8450,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate
L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.",
L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.",
L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate
};
STR16 szUDBAdvStatsTooltipText[]=
+2
View File
@@ -8386,6 +8386,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|A|n|t|i|-|M|a|t|e|r|i|e|l |A|m|m|o",
L"|F|a|c|e |P|r|o|t|e|c|t|i|o|n",
L"|I|n|f|e|c|t|i|o|n |P|r|o|t|e|c|t|i|o|n", // 39
L"|S|h|i|e|l|d",
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8430,6 +8431,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \nThis ammo can destroy light walls\nand various other objects.",
L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.",
L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.",
L"\n \nIf equipped in a hand, this will block incoming damage.",
};
STR16 szUDBAdvStatsTooltipText[]=
+2
View File
@@ -8392,6 +8392,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|A|n|t|i|-|M|a|t|e|r|i|a|l |A|m|m|o", // TODO.Translate
L"|F|a|c|e |P|r|o|t|e|c|t|i|o|n",
L"|I|n|f|e|c|t|i|o|n |P|r|o|t|e|c|t|i|o|n", // 39
L"|S|h|i|e|l|d", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8436,6 +8437,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate
L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.",
L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.",
L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate
};
STR16 szUDBAdvStatsTooltipText[]=
+2
View File
@@ -8221,6 +8221,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|A|n|t|i|-|M|a|t|e|r|i|a|l |A|m|m|o", // TODO.Translate
L"|F|a|c|e |P|r|o|t|e|c|t|i|o|n",
L"|I|n|f|e|c|t|i|o|n |P|r|o|t|e|c|t|i|o|n", // 39
L"|S|h|i|e|l|d", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8265,6 +8266,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate
L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.",
L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.",
L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate
};
STR16 szUDBAdvStatsTooltipText[]=
+2
View File
@@ -8395,6 +8395,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|A|n|t|i|-|M|a|t|e|r|i|a|l |A|m|m|o", // TODO.Translate
L"|F|a|c|e |P|r|o|t|e|c|t|i|o|n",
L"|I|n|f|e|c|t|i|o|n |P|r|o|t|e|c|t|i|o|n", // 39
L"|S|h|i|e|l|d", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8439,6 +8440,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate
L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.",
L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.",
L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate
};
STR16 szUDBAdvStatsTooltipText[]=
+2
View File
@@ -8407,6 +8407,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|A|n|t|i|-|M|a|t|e|r|i|a|l |A|m|m|o", // TODO.Translate
L"|F|a|c|e |P|r|o|t|e|c|t|i|o|n",
L"|I|n|f|e|c|t|i|o|n |P|r|o|t|e|c|t|i|o|n", // 39
L"|S|h|i|e|l|d", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8451,6 +8452,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate
L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.",
L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.",
L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate
};
STR16 szUDBAdvStatsTooltipText[]=
+2
View File
@@ -8390,6 +8390,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|С|н|а|р|я|д |п|р|о|т|и|в |б|р|о|н|и",
L"|З|а|щ|и|т|а |д|л|я |л|и|ц|а",
L"|И|н|ф|е|к|ц|и|о|н|н|а|я |з|а|щ|и|т|а", // 39
L"|S|h|i|e|l|d", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8434,6 +8435,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \nЭтот боеприпас может уничтожать тонкие стены\nи некоторые другие объекты.",
L"\n \nЕсли одето на лицо, понижает шанс\nзаражения от других людей.",
L"\n \nЕсли хранить в своём кармане,\nпонижается шанс заражения\n от других людей.",
L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate
};
STR16 szUDBAdvStatsTooltipText[]=