- new feature: backgrounds allow more personalisation of mercenaries

- background feature replaces overheating on startup screen, moved overheating opion to ini

WARNING: GameDir revision >= 1748 is required.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6353 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-09-03 20:55:33 +00:00
parent 0bff118f10
commit 4ccc6a5b2a
66 changed files with 3128 additions and 303 deletions
+42 -1
View File
@@ -3341,7 +3341,8 @@ UINT8 ubItemsNotCounted = 0; //ja25 UB
uiItemPrice[ubCnt] += CalcShopKeeperItemPrice( fDealerSelling, fUnitPriceOnly, iter->usItem, dModifier, &(*iter)) ;
}
// if Flo is doing the dealin' and wheelin'
// Flugente: used in backgrounds now, old code in comments for historical reasons
/*// if Flo is doing the dealin' and wheelin'
if ( gpSMCurrentMerc->ubProfile == FLO )
{
// if it's a GUN or AMMO (but not Launchers, and all attachments and payload is included)
@@ -3364,6 +3365,46 @@ UINT8 ubItemsNotCounted = 0; //ja25 UB
}
break;
}
}*/
// if it's a GUN or AMMO (but not Launchers, and all attachments and payload is included)
if ( Item [ usItemID ].usItemClass & (IC_GUN|IC_AMMO) )
{
if ( gpSMCurrentMerc->GetBackgroundValue(BG_PERC_PRICES_GUNS) )
uiDiscountValue = ( uiItemPrice[ubCnt] * gpSMCurrentMerc->GetBackgroundValue(BG_PERC_PRICES_GUNS) ) / 100;
// if we play without backgrounds, Flo gets the hardcoded bonus
else if ( gpSMCurrentMerc->ubProfile == FLO )
uiDiscountValue = ( uiItemPrice[ubCnt] * FLO_DISCOUNT_PERCENTAGE ) / 100;
// she gets a discount! Read her M.E.R.C. profile to understand why
if ( fDealerSelling )
{
// she buys for less...
uiItemPrice[ubCnt] -= uiDiscountValue;
}
else
{
// and sells for more!
uiItemPrice[ubCnt] += uiDiscountValue;
}
break;
}
// Flugente: backgrounds
else if ( Item [ usItemID ].usItemClass & (IC_MAPFILTER_MELEE|IC_MAPFILTER_KIT|IC_MAPFILTER_LBE|IC_MAPFILTER_ARMOR|IC_MAPFILTER_MISC) )
{
uiDiscountValue = ( uiItemPrice[ubCnt] * gpSMCurrentMerc->GetBackgroundValue(BG_PERC_PRICES) ) / 100;
if ( fDealerSelling )
{
// buy for less...
uiItemPrice[ubCnt] -= uiDiscountValue;
}
else
{
// and sell for more!
uiItemPrice[ubCnt] += uiDiscountValue;
}
break;
}
// if it's the dealer selling this, make sure the item is worth at least $1