mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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 );
|
||||
|
||||
|
||||
if ( iDiceRoll <= iHitChance )
|
||||
// WDS 07/19/2008 - Random number use fix
|
||||
if ( iDiceRoll < iHitChance )
|
||||
{
|
||||
fGonnaHit = TRUE;
|
||||
|
||||
@@ -2317,11 +2318,13 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, BOOLEAN fStea
|
||||
{
|
||||
fFailure=FALSE;
|
||||
|
||||
// WDS 07/19/2008 - Random number use fix
|
||||
// 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?
|
||||
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
|
||||
usOldItem = pTargetSoldier->inv[HANDPOS].usItem;
|
||||
@@ -2472,8 +2475,9 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, BOOLEAN fStea
|
||||
|
||||
if ( pSoldier->bTeam == gbPlayerNum && pTargetSoldier->bTeam != gbPlayerNum )
|
||||
{
|
||||
// WDS 07/19/2008 - Random number use fix
|
||||
// made an HTH attack; give experience
|
||||
if ( iDiceRoll <= iHitChance )
|
||||
if ( iDiceRoll < iHitChance )
|
||||
{
|
||||
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!
|
||||
iImpact = HTHImpact( pSoldier, pTargetSoldier, (iHitChance - iDiceRoll), FALSE );
|
||||
|
||||
Reference in New Issue
Block a user