mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user