dded new character trait "Coward" (charrcter trait #13)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8362 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-01-12 23:24:41 +00:00
parent 556ce68586
commit 3419fd1c5d
27 changed files with 86 additions and 91 deletions
+13
View File
@@ -1075,6 +1075,19 @@ void PrepareForPreBattleInterface( GROUP *pPlayerDialogGroup, GROUP *pInitiating
#endif
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
// Flugente: for cowards, check our teamsize and that of the enemy...
if ( gGameOptions.fNewTraitSystem )
{
UINT16 enemyteamsize = NumNonPlayerTeamMembersInSector( pPlayerDialogGroup->ubSectorX, pPlayerDialogGroup->ubSectorY, ENEMY_TEAM );
UINT16 militiateamsize = NumNonPlayerTeamMembersInSector( pPlayerDialogGroup->ubSectorX, pPlayerDialogGroup->ubSectorY, MILITIA_TEAM );
UINT16 mercsteamsize = PlayerMercsInSector( pPlayerDialogGroup->ubSectorX, pPlayerDialogGroup->ubSectorY, pPlayerDialogGroup->ubSectorZ );
if ( enemyteamsize >= 2 * (militiateamsize + mercsteamsize) && mercsteamsize )
{
HandleMoraleEvent( NULL, MORALE_ENEMYGROUP_COWARD, pPlayerDialogGroup->ubSectorX, pPlayerDialogGroup->ubSectorY, pPlayerDialogGroup->ubSectorZ );
}
}
if( gfTacticalTraversal && pInitiatingBattleGroup == gpTacticalTraversalGroup ||
pInitiatingBattleGroup && pInitiatingBattleGroup->usGroupTeam != OUR_TEAM &&
pInitiatingBattleGroup->ubSectorX == gWorldSectorX &&