From 80bdeff0e46ec9ffa64ac5f52d8463d0336706a9 Mon Sep 17 00:00:00 2001 From: Flugente Date: Wed, 12 Aug 2015 20:14:14 +0000 Subject: [PATCH] drinking aclcohol causes less dynamic opinion events, as there were way too many if drinking in a large group git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7967 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/DynamicDialogue.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Tactical/DynamicDialogue.cpp b/Tactical/DynamicDialogue.cpp index 5ee560fa..a1930393 100644 --- a/Tactical/DynamicDialogue.cpp +++ b/Tactical/DynamicDialogue.cpp @@ -1853,15 +1853,22 @@ void HandleDynamicOpinionTeamDrinking( SOLDIERTYPE* pSoldier ) pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) ) { // both mercs drink together, they opinion either improve or worsen - if ( Chance( 67 ) ) - AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_GOOD ); - else - AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_BAD ); + // added a few chance calls, because this can lead to an absurd amount of events + if ( Chance( 50 ) ) + { + if ( Chance( 67 ) ) + AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_GOOD, Chance( 25 ) ); + else + AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_BAD, Chance( 25 ) ); + } - if ( Chance( 67 ) ) - AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_GOOD ); - else - AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_BAD ); + if ( Chance( 50 ) ) + { + if ( Chance( 67 ) ) + AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_GOOD, Chance( 25 ) ); + else + AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_BAD, Chance( 25 ) ); + } } } }