mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
- 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:
+21
-6
@@ -349,15 +349,18 @@ INT16 TerrainBreathPoints(SOLDIERTYPE * pSoldier, INT32 sGridNo, INT8 bDir, UINT
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: backgrounds
|
||||
if ( TERRAIN_IS_HIGH_WATER( ubTerrainID) )
|
||||
iPoints = (iPoints * (100 + pSoldier->GetBackgroundValue(BG_SWIMMING))) / 100;
|
||||
|
||||
// ATE: Adjust these by realtime movement
|
||||
if (!(gTacticalStatus.uiFlags & TURNBASED) || !(gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||
{
|
||||
if (!(gTacticalStatus.uiFlags & TURNBASED) || !(gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||
{
|
||||
// ATE: ADJUST FOR RT - MAKE BREATH GO A LITTLE FASTER!
|
||||
// silversurfer: now externalized to APBPConstants.ini
|
||||
//iPoints = (INT32)( iPoints * TB_BREATH_DEDUCT_MODIFIER );
|
||||
iPoints = (INT32)( iPoints * APBPConstants[BP_RT_BREATH_DEDUCT_MODIFIER] / 100 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return( (INT16) iPoints);
|
||||
}
|
||||
@@ -477,6 +480,10 @@ INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 u
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: swimming background
|
||||
if ( TERRAIN_IS_HIGH_WATER( ubTerrainID) )
|
||||
sPoints = (sPoints * (100 + pSoldier->GetBackgroundValue(BG_SWIMMING))) / 100;
|
||||
|
||||
// Check if doors if not player's merc (they have to open them manually)
|
||||
if ( sSwitchValue == TRAVELCOST_DOOR && pSoldier->bTeam != gbPlayerNum )
|
||||
{
|
||||
@@ -832,6 +839,9 @@ void DeductPoints( SOLDIERTYPE *pSoldier, INT16 sAPCost, INT32 iBPCost, UINT8 ub
|
||||
if ( iBPCost < 0 && gGameOptions.fFoodSystem )
|
||||
ReduceBPRegenForHunger(pSoldier, &iBPCost);
|
||||
|
||||
// Flugente: backgrounds
|
||||
iBPCost = (INT32) (iBPCost * (100 + pSoldier->GetBackgroundValue(BG_PERC_REGEN_ENERGY)) / 100);
|
||||
|
||||
if (is_networked)
|
||||
{
|
||||
// Adjust breath changes due to spending or regaining of energy
|
||||
@@ -2250,9 +2260,9 @@ INT16 MinAPsToShootOrStab(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 bAimTime,
|
||||
bAPCost = (INT16)((bAPCost * (100 - gSkillTraitValues.ubHWRocketLaunchersAPsReduction * NUM_SKILL_TRAITS( pSoldier, HEAVY_WEAPONS_NT ) ) / 100)+ 0.5);
|
||||
}
|
||||
// Decreased APs needed for mortar - Heavy Weapons
|
||||
else if ( Item[usUBItem].mortar && HAS_SKILL_TRAIT( pSoldier, HEAVY_WEAPONS_NT ) )
|
||||
else if ( Item[usUBItem].mortar )
|
||||
{
|
||||
bAPCost = (INT16)((bAPCost * (100 - gSkillTraitValues.ubHWMortarAPsReduction * NUM_SKILL_TRAITS( pSoldier, HEAVY_WEAPONS_NT ) ) / 100)+ 0.5);
|
||||
bAPCost = (INT16)((bAPCost * (100 - gSkillTraitValues.ubHWMortarAPsReduction * NUM_SKILL_TRAITS( pSoldier, HEAVY_WEAPONS_NT ) + pSoldier->GetBackgroundValue(BG_ARTILLERY) ) / 100)+ 0.5);
|
||||
}
|
||||
// Decreased APs needed for pistols and machine pistols - Gunslinger
|
||||
else if (Weapon[ usUBItem ].ubWeaponType == GUN_PISTOL && HAS_SKILL_TRAIT( pSoldier, GUNSLINGER_NT ) )
|
||||
@@ -3754,6 +3764,11 @@ INT16 GetAPsForMultiTurnAction( SOLDIERTYPE *pSoldier, UINT8 usActionType )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( usActionType == MTA_FORTIFY || usActionType == MTA_REMOVE_FORTIFY || usActionType == MTA_FILL_SANDBAG )
|
||||
{
|
||||
sAPCost = (sAPCost * (100 + pSoldier->GetBackgroundValue(BG_FORTIFY))) / 100;
|
||||
}
|
||||
|
||||
return sAPCost;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user