Improved Feature: Improved ambushes:

- Enemy deployment radius depends on your mercs' experience.
- With high enough leadership, your team will be able to deploy before battle.
- Added new background tag <ambush_radius> that increases enemy deployment radius (thereby moving them farther away).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7854 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-05-10 10:14:21 +00:00
parent 74bfaaf900
commit 9149dbe850
17 changed files with 294 additions and 113 deletions
+5 -6
View File
@@ -2623,7 +2623,7 @@ void PrepareLoadedSector()
PostSchedules();
}
if( gubEnemyEncounterCode == ENEMY_AMBUSH_CODE || gubEnemyEncounterCode == BLOODCAT_AMBUSH_CODE )
if ( gubEnemyEncounterCode == ENEMY_AMBUSH_CODE || gubEnemyEncounterCode == BLOODCAT_AMBUSH_CODE || gubEnemyEncounterCode == ENEMY_AMBUSH_DEPLOYMENT_CODE )
{
if( gMapInformation.sCenterGridNo != NOWHERE )
{
@@ -2631,10 +2631,9 @@ void PrepareLoadedSector()
}
else
{
#ifdef JA2BETAVERSION
ScreenMsg( FONT_RED, MSG_ERROR, L"Ambush aborted in sector %c%d -- no center point in map. LC:1",
gWorldSectorY + 'A' - 1, gWorldSectorX );
#endif
#ifdef JA2BETAVERSION
ScreenMsg( FONT_RED, MSG_ERROR, L"Ambush aborted in sector %c%d -- no center point in map. LC:1", gWorldSectorY + 'A' - 1, gWorldSectorX );
#endif
}
}
@@ -3119,7 +3118,7 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
if( !(gTacticalStatus.uiFlags & LOADING_SAVED_GAME ) )
{
if( gMapInformation.sCenterGridNo != NOWHERE && gfBlitBattleSectorLocator &&
(gubEnemyEncounterCode == ENEMY_AMBUSH_CODE || gubEnemyEncounterCode == BLOODCAT_AMBUSH_CODE) && pSoldier->bTeam != CIV_TEAM )
(gubEnemyEncounterCode == ENEMY_AMBUSH_CODE || gubEnemyEncounterCode == BLOODCAT_AMBUSH_CODE) && pSoldier->bTeam != CIV_TEAM )
{
// Flugente: improved ambush
if ( gGameExternalOptions.fAmbushSpreadMercs )