New Feature: Campaign History collects combat data and displays battle reports on the website.

requires GameDir >= r1901.

For more info, see http://www.bears-pit.com/board/ubbthreads.php/topics/329205.html#Post329205

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6705 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-12-22 23:22:45 +00:00
parent b3df6f55b5
commit f4dcc15ffa
57 changed files with 5074 additions and 220 deletions
+27
View File
@@ -47,6 +47,7 @@
// added by SANDRO
#include "Tactical Save.h"
#include "message.h"
#include "CampaignStats.h" // added by Flugente
#endif
#ifdef JA2UB
@@ -2157,6 +2158,9 @@ void LogBattleResults( UINT8 ubVictoryCode)
AddHistoryToPlayersLog( HISTORY_SLAUGHTEREDBLOODCATS, 0, GetWorldTotalMin(), sSectorX, sSectorY );
break;
}
// Flugente: campaign stats
gCurrentIncident.usIncidentFlags |= INCIDENT_WIN;
}
else
{
@@ -2183,6 +2187,29 @@ void LogBattleResults( UINT8 ubVictoryCode)
break;
}
}
switch( gubEnemyEncounterCode )
{
case ENEMY_INVASION_CODE:
gCurrentIncident.usIncidentFlags |= INCIDENT_ATTACK_ENEMY;
break;
case ENEMY_ENCOUNTER_CODE:
case ENTERING_ENEMY_SECTOR_CODE:
case CREATURE_ATTACK_CODE:
case ENTERING_BLOODCAT_LAIR_CODE:
case FIGHTING_CREATURES_CODE:
case HOSTILE_CIVILIANS_CODE:
case HOSTILE_BLOODCATS_CODE:
gCurrentIncident.usIncidentFlags |= INCIDENT_ATTACK_PLAYERSIDE;
break;
case ENEMY_AMBUSH_CODE:
case BLOODCAT_AMBUSH_CODE:
gCurrentIncident.usIncidentFlags |= (INCIDENT_ATTACK_ENEMY|INCIDENT_AMBUSH);
break;
}
// Flugente: if battle has ended, close this incident, add it to the global incidents, and clear it
FinishIncident(gWorldSectorX, gWorldSectorY, gbWorldSectorZ);
}
void HandlePreBattleInterfaceStates()