new feature: madlab's robot can be upgraded

requires gamedir r2642

https://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=364403

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9338 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
rftr
2022-03-21 17:34:49 +00:00
parent f7315115af
commit 87b0c7c6b7
26 changed files with 1114 additions and 162 deletions
+24
View File
@@ -50,6 +50,14 @@ INT16 EffectiveStrength( SOLDIERTYPE *pSoldier, BOOLEAN fTrainer )
iEffStrength = 0;
}
if (AM_A_ROBOT(pSoldier))
{
if (Item[pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem].bRobotStrBonus > 0)
{
iEffStrength += Item[pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem].bRobotStrBonus;
}
}
// Flugente: diseases can affect stat effectivity
INT16 diseaseeffect = 0;
if ( gGameExternalOptions.fDisease )
@@ -93,6 +101,14 @@ INT16 EffectiveAgility( SOLDIERTYPE * pSoldier, BOOLEAN fTrainer )
iEffAgility = pSoldier->stats.bAgility;
if (AM_A_ROBOT(pSoldier))
{
if (Item[pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem].bRobotAgiBonus > 0)
{
iEffAgility += Item[pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem].bRobotAgiBonus;
}
}
if ( !fTrainer )
iEffAgility += pSoldier->bExtraAgility;
@@ -266,6 +282,14 @@ INT16 EffectiveDexterity( SOLDIERTYPE * pSoldier, BOOLEAN fTrainer )
iEffDexterity = pSoldier->stats.bDexterity;
if (AM_A_ROBOT(pSoldier))
{
if (Item[pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem].bRobotDexBonus > 0)
{
iEffDexterity += Item[pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem].bRobotDexBonus;
}
}
if ( !fTrainer )
iEffDexterity += pSoldier->bExtraDexterity;