mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
More random number adjustments from SpaceViking.
Adjusted the default file location so that it doesn't point to a specific drive but, instead, creates builds in whatever driver your code is located on. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2254 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+11
-5
@@ -2092,7 +2092,8 @@ BOOLEAN UseBlade( SOLDIERTYPE *pSoldier , INT16 sTargetGridNo )
|
|||||||
//sprintf( gDebugStr, "Hit Chance: %d %d", (int)uiHitChance, uiDiceRoll );
|
//sprintf( gDebugStr, "Hit Chance: %d %d", (int)uiHitChance, uiDiceRoll );
|
||||||
|
|
||||||
|
|
||||||
if ( iDiceRoll <= iHitChance )
|
// WDS 07/19/2008 - Random number use fix
|
||||||
|
if ( iDiceRoll < iHitChance )
|
||||||
{
|
{
|
||||||
fGonnaHit = TRUE;
|
fGonnaHit = TRUE;
|
||||||
|
|
||||||
@@ -2317,11 +2318,13 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, BOOLEAN fStea
|
|||||||
{
|
{
|
||||||
fFailure=FALSE;
|
fFailure=FALSE;
|
||||||
|
|
||||||
|
// WDS 07/19/2008 - Random number use fix
|
||||||
// Do we have luck on stealing?
|
// Do we have luck on stealing?
|
||||||
if ( iDiceRoll <= iHitChance && iHitChance > 0 )
|
if ( iDiceRoll < iHitChance && iHitChance > 0 )
|
||||||
{
|
{
|
||||||
|
// WDS 07/19/2008 - Random number use fix
|
||||||
// Do we have the chance to steal more than 1 item?
|
// Do we have the chance to steal more than 1 item?
|
||||||
if (( iDiceRoll <= iHitChance * 2 / 3) || (pTargetSoldier->bCollapsed))
|
if (( iDiceRoll < iHitChance * 2 / 3) || (pTargetSoldier->bCollapsed))
|
||||||
{
|
{
|
||||||
// The item that the enemy holds in his hand before the stealing
|
// The item that the enemy holds in his hand before the stealing
|
||||||
usOldItem = pTargetSoldier->inv[HANDPOS].usItem;
|
usOldItem = pTargetSoldier->inv[HANDPOS].usItem;
|
||||||
@@ -2472,8 +2475,9 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, BOOLEAN fStea
|
|||||||
|
|
||||||
if ( pSoldier->bTeam == gbPlayerNum && pTargetSoldier->bTeam != gbPlayerNum )
|
if ( pSoldier->bTeam == gbPlayerNum && pTargetSoldier->bTeam != gbPlayerNum )
|
||||||
{
|
{
|
||||||
|
// WDS 07/19/2008 - Random number use fix
|
||||||
// made an HTH attack; give experience
|
// made an HTH attack; give experience
|
||||||
if ( iDiceRoll <= iHitChance )
|
if ( iDiceRoll < iHitChance )
|
||||||
{
|
{
|
||||||
ubExpGain = 8;
|
ubExpGain = 8;
|
||||||
|
|
||||||
@@ -2521,7 +2525,9 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, BOOLEAN fStea
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( iDiceRoll <= iHitChance || AreInMeanwhile( ) )
|
// WDS 07/19/2008 - Random number use fix
|
||||||
|
if ( iDiceRoll < iHitChance || AreInMeanwhile( ) )
|
||||||
|
|
||||||
{
|
{
|
||||||
// CALCULATE DAMAGE!
|
// CALCULATE DAMAGE!
|
||||||
iImpact = HTHImpact( pSoldier, pTargetSoldier, (iHitChance - iDiceRoll), FALSE );
|
iImpact = HTHImpact( pSoldier, pTargetSoldier, (iHitChance - iDiceRoll), FALSE );
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="8.00"
|
||||||
Name="ja2_2005Express"
|
Name="ja2_2005Express"
|
||||||
ProjectGUID="{F44669E7-74AC-444B-B75F-F16F4B9F0265}"
|
ProjectGUID="{F44669E7-74AC-444B-B75F-F16F4B9F0265}"
|
||||||
RootNamespace="ja2_2005Express"
|
RootNamespace="ja2_2005Express"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="C:\games\jagged alliance 2 EN"
|
OutputDirectory="\games\jagged alliance 2"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
InheritedPropertySheets=".\ja2_2005Express.vsprops;.\ja2_2005ExpressDebug.vsprops"
|
InheritedPropertySheets=".\ja2_2005Express.vsprops;.\ja2_2005ExpressDebug.vsprops"
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="C:\games\jagged alliance 2 EN"
|
OutputDirectory="\games\jagged alliance 2"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
InheritedPropertySheets=".\ja2_2005Express.vsprops"
|
InheritedPropertySheets=".\ja2_2005Express.vsprops"
|
||||||
|
|||||||
Reference in New Issue
Block a user