
Originally Posted by
the_foz_4
I would also point out that the code you displayed is not quite right yet: you've allowed an agent with 0 GoodDiplomat pts to still have 1 removed half the time, and then have a chance to gain a BadDiplomat point as well. This means a failed mission could cause a 2-point swing in any diplo with 1 or less GoodDiplomat points, since both triggers will go off - and he could also get a negative GoodDiplomat stat, which is something undefined in game terms as far as I know. The fix is to make the triggers mutually exclusive by testing the first trigger as well. You check for GoodDiplomat > 0 (or >= 1 if you prefer), which then prevents GoodDiplomat from becoming negative ever, and keeps the Affects line from firing if there aren't points to lose in GoodDiplomat.
Bookmarks