From da13c4457896363f563567c4aae791b1133ca625 Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Mon, 17 Jul 2006 18:57:46 +0000 Subject: [PATCH] -quick fix for throwing knives degrading due to difficulty modifier when enemies die after being hit by them git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@351 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Rotting Corpses.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tactical/Rotting Corpses.cpp b/Tactical/Rotting Corpses.cpp index fdee2f50..30b115b7 100644 --- a/Tactical/Rotting Corpses.cpp +++ b/Tactical/Rotting Corpses.cpp @@ -888,10 +888,10 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE //add a flag to the item so when all enemies are killed, we can run through and reveal all the enemies items usItemFlags |= WORLD_ITEM_DROPPED_FROM_ENEMY; - if ( Item[pObj->usItem].damageable ) // Madd: drop crappier items from enemies on higher difficulty levels + if ( Item[pObj->usItem].damageable && Item[pObj->usItem].usItemClass != IC_THROWING_KNIFE ) // Madd: drop crappier items from enemies on higher difficulty levels - note the quick fix for throwing knives { pObj->bStatus[0] -= (gGameOptions.ubDifficultyLevel - 1) * Random(20); - pObj->bStatus[0] = max(pObj->bStatus[0],1); // never below 1% + pObj->bStatus[0] = min(max(pObj->bStatus[0],1),100); // never below 1% or above 100% } }