New feature (by rftr): Arulco Rebel Command (ARC)

Improve you cities and overall campaign by choosing out of several upgrades

Requires GameDir >= r2613

For more info, see https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24884&start=0&

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9153 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2021-08-22 19:00:09 +00:00
parent d1ec359600
commit eca080f0f9
44 changed files with 3925 additions and 36 deletions
+7 -1
View File
@@ -38,6 +38,7 @@
#include "Facilities.h"
#include "CampaignStats.h" // added by Flugente
#include "DynamicDialogue.h" // added by Flugente
#include "Rebel Command.h"
#endif
#include "Luaglobal.h"
@@ -293,7 +294,6 @@ void IncrementTownLoyalty( INT8 bTownId, UINT32 uiLoyaltyIncrease )
UINT32 uiRemainingIncrement;
INT16 sThisIncrement;
AssertGE (bTownId, BLANK_SECTOR);
AssertLT (bTownId, NUM_TOWNS);
@@ -303,6 +303,9 @@ void IncrementTownLoyalty( INT8 bTownId, UINT32 uiLoyaltyIncrease )
return;
}
// if rebel command is enabled, apply gain modifier
uiLoyaltyIncrease *= RebelCommand::GetLoyaltyGainModifier();
// modify loyalty change by town's individual attitude toward rebelling (20 is typical)
uiLoyaltyIncrease *= (5 * gubTownRebelSentiment[ bTownId ]);
uiLoyaltyIncrease /= 100;
@@ -394,6 +397,9 @@ void UpdateTownLoyaltyRating( INT8 bTownId )
ubMaxLoyalty = MAX_LOYALTY_VALUE;
}
// if playing with rebel command, limit max loyalty
ubMaxLoyalty = min(ubMaxLoyalty, RebelCommand::GetMaxTownLoyalty(bTownId));
// check if we'd be going over the max
if( (gTownLoyalty[ bTownId ].ubRating + sRatingChange ) >= ubMaxLoyalty )
{