January Beta - Patch Preview

Iam a bit irritated by those construction times. A shrine and a Monument costs 80 production. The AI handicap on King reduce the production cost to 72.
But hes able to build both in only 11 turns. So he have an average of 13 production with a size 1-2 city. Sounds pretty high, or? (Maybe ruin with hammer?)

Also poor india. Growth nation with 2 Size 13 and a Size 10 cities in the 19th century?

Those cities had flipped once or twice already.

G
 
Continued from this post:

Spoiler more evidence :
Moroccan influence on 4 civs; during every turn the influence trend showed "Falling" for all 4 civs, I even made screenshots every turn to prove it...but first, here is the accumulated data:

Influence2.png


This almost seems GitHub report-worthy...should it really be showing a "Falling" trend during every turn there for all 4 of those civs (it did)?
 
hmm. Denmark and Poland should have a rising trend at least by 480, and I think you should too if only very slightly.
 
Agreed. Gonna monitor it a little while longer and report to GitHub if things don't change by then.
 
Code:
/// Current influence trend on this player
InfluenceLevelTrend CvPlayerCulture::GetInfluenceTrend(PlayerTypes ePlayer) const
{
    InfluenceLevelTrend eRtnValue = INFLUENCE_TREND_STATIC;

    CvPlayer &kOtherPlayer = GET_PLAYER(ePlayer);

    float iTheirCultureThisTurn = (float)m_pPlayer->GetCulture()->GetOtherPlayerCulturePerTurnIncludingInstant(ePlayer) + (float)kOtherPlayer.GetJONSCultureEverGenerated();
    float iTheirCultureLastTurn = (float)kOtherPlayer.GetCulture()->GetLastTurnLifetimeCulture() + kOtherPlayer.GetCulture()->GetLastTurnCPT();

    float iOurTourismThisTurn = (float)GetInfluenceOn(ePlayer) + (float)m_pPlayer->GetCulture()->GetTourismPerTurnIncludingInstant(ePlayer);
    float iOurTourismLastTurn = (float)GetLastTurnInfluenceOn(ePlayer) + (float)m_pPlayer->GetCulture()->GetLastTurnInfluenceIPT(ePlayer);

    float base = iOurTourismThisTurn - iOurTourismLastTurn;
    if (base <= 0)
        base = 1;

    float slope = (iTheirCultureThisTurn - iTheirCultureLastTurn) / base;

    if (slope < .9f)
    {
        eRtnValue = INFLUENCE_TREND_RISING;
    }
    else if (slope > 1.1f)
    {
        eRtnValue = INFLUENCE_TREND_FALLING;
    }
        
    return eRtnValue;
}

Code for the curious.
 
Code for the curious.
Thanks. Looking at the code below this on GitHub it seems that the instant yields are incorporated as 10-turn-averages.
TL;DR: Just look at the bottom of the post.

Now I should note that I'm not a programmer and I don't know C++, I just write simple Java apps sometimes as a hobby. But looking at the code and chasing some of the leads, it seems to me that GetLastTurnInfluenceIPT(ePlayer) just makes some checks and returns m_aiLastTurnCulturalIPT[iIndex], which in turn seems to return the delta Influence without forming 10-turn-averages. In fact, let's just lay out what the components do as far as my understanding of them goes:


GetInfluenceOn - int that is cast to float; seemingly doesn't include averages, as it comes from m_aiCulturalInfluence, which is directly incremented every turn from the direct Influence calculation method
GetTourismPerTurnIncludingInstant - int that is cast to float; does include averages, as it uses the same direct Influence from one turn as GetInfluenceOn but then adds a 10-turn-average from instant yields*
GetLastTurnInfluenceOn - int that is cast to float; returns m_aiLastTurnCulturalInfluence, which is m_aiCulturalInfluence from the last turn, so direct Influence without averages
GetLastTurnInfluenceIPT - int that is cast to float; returns m_aiLastTurnCulturalIPT, which is m_aiCulturalInfluence minus m_aiLastTurnCulturalInfluence, which means no averages

*: I can't check exactly what getInstantYieldValue does since I can't find the method on GitHub, but I'll just assume that it correctly returns the total instant yields of the specified type for the specified number of last past turns
Edit: found the method; the file was too large so the search didn't work lol...50,000 lines...crazy; my skills, or rather lack thereof, are really pushed here so I'm not sure but it looks like the instant yield history may not be stored exactly as one might expect for Tourism. I don't think the actual Influence for each player (of each player, respectively) is actually stored there but rather a single value for each player (I hope that makes sense). See below the TL;DR for why this may be significant.

So for calculating the float "base" in the algorithm you posted, only the component GetTourismPerTurnIncludingInstant includes 10-turn-averages, which is part of iOurTourismThisTurn.
For the culture part, it seems to me that it works the same way.
Instant Yields seem to be added to the total when they occur (m_aiCulturalInfluence for Tourism) and should thus get caught in the delta (m_aiLastTurnCulturalIPT, for example)
Let's make this algorithm easy to read for us noobs:


TheirCultureThisTurn = (Total culture so far) + ( (Culture that will be added as shown in the top bar in the UI, if they were a player) + (10-turn-average from instant yields) )
TheirCultureLastTurn = (Total culture when the DoTurn method was called the time before the last time) + (Culture that was added from all sources, including instant yields, during the last turn)

OurTourismThisTurn = (Total Influence on that player so far) + ( (Influence on that player that will be added as shown in our tourism screen) + (10-turn-average from instant yields) )
OurTourismLastTurn = (Total Influence on that player when the DoTurn method was called the time before the last time) + (Influence on that player that was added from all sources, including instant yields, during the last turn)

Base = OurTourismThisTurn - OurTourismLastTurn
if Base is <= 0, set it to 1

Slope = (TheirCultureThisTurn - TheirCultureLastTurn) / Base

Slope values.....Trend

< 0.9..................Rising
0.9 until 1.1........Static
> 1.1..................Falling


First, some questions: did I do this right? I'm assuming DoTurn is called when the player presses the Next Turn button.
It seems to me that OurTourismThisTurn's first component is the same as OurTourismLastTurn, is that right? Or is the reason why you don't just take that value for OurTourismLastTurn (i.e. just use GetInfluenceOn(ePlayer) for that) that there may have been instant yields that occurred during this turn (e.g. Great Musician Concert), is that right?

Anyway, if I have laid this out correctly, there are some oddities with this algorithm:

1. Let's consider the following example:
Player A has 10,000 culture and 200 culture per turn, which increments by 2 each turn in perpetuity.
Player B has 5,000 Tourism and 100 Tourism per turn, which increments by 1 each turn in perpetuity, with Player A.
Player B is at 50% Influencial with Player A and there are no instant yields from either.
For every following turn as far as the result is concerned, and using the numbers of the first turn, this algorithm would determine that ( Base = 5000 + 100 - (4901 + 99) = 100 ) and therefore ( Slope = ((10000 + 200) - (9802 + 198)) / 100 = 2 ), which would mean that the trend display shows "Falling".
In reality the trend is not falling, though, is it? It will remain static at 50% Influence.

2. Let's say there are some instant yields involved, such that Player B gets 5 additional Tourism with Player A every 10 turns (0.5 per turn on average)
This means that the algorithm would determine (Base = 5005 + 100 + 0.5 - (4901 + 99) = 105.5 ) and (Slope = ((10000 + 200) - (9802 + 198)) / 105.5 = 1.896) directly after the instant yield, which means the trend display still shows "Falling" when in reality the Influence is actually rising; the next turn the Slope will be 1.99 and thus still shown as "Falling", even though the Influence level would actually be static now, for the moment, until the next instant yield (over time it would increase, of course).

TL;DR
I think you get where I'm going with this: whoever wrote that algorithm seems to have forgotten to normalize the Slope variable.
If it were multiplied by the current Influence percentage, then there'd be a chance that the trend would actually mean what it says.
(Or I'm completely wrong and have butchered this entirely, which is why you should probably read the full post after all :lol:)

If this is all correct, then I would suggest changing the yield averages to 20 or 30 turns in addition to fixing the missing normalization (for the instant yield UI as well); 10 turns is a bit too jumpy in my opinion, especially for Tourism.

Edit: I'm pretty sure there's even more wrong with the algorithm or the methods feeding it...I'm pretty tired though, so can't think atm. One problem is that the normalization issue doesn't explain why Poland does not get a Rising trend in my graph further up this page; it could only explain the incorrect trend on Denmark and me.
Edit2: okay I *think* that maybe the other issue has to do with the instant yields...now I'm really not sure here but from how I understand the code, there is only one Tourism history for each player, instead of an Influence history for each player, of each player. That means the averaged instant yields will not be accurate at all for Influence specific to a player, which could explain the wrong trend for Poland in my data.

@Gazebo should I post this on GitHub?
 
Last edited:
Thanks. Looking at the code below this on GitHub it seems that the instant yields are incorporated as 10-turn-averages.
TL;DR: Just look at the bottom of the post.

Now I should note that I'm not a programmer and I don't know C++, I just write simple Java apps sometimes as a hobby. But looking at the code and chasing some of the leads, it seems to me that GetLastTurnInfluenceIPT(ePlayer) just makes some checks and returns m_aiLastTurnCulturalIPT[iIndex], which in turn seems to return the delta Influence without forming 10-turn-averages. In fact, let's just lay out what the components do as far as my understanding of them goes:


GetInfluenceOn - int that is cast to float; seemingly doesn't include averages, as it comes from m_aiCulturalInfluence, which is directly incremented every turn from the direct Influence calculation method
GetTourismPerTurnIncludingInstant - int that is cast to float; does include averages, as it uses the same direct Influence from one turn as GetInfluenceOn but then adds a 10-turn-average from instant yields*
GetLastTurnInfluenceOn - int that is cast to float; returns m_aiLastTurnCulturalInfluence, which is m_aiCulturalInfluence from the last turn, so direct Influence without averages
GetLastTurnInfluenceIPT - int that is cast to float; returns m_aiLastTurnCulturalIPT, which is m_aiCulturalInfluence minus m_aiLastTurnCulturalInfluence, which means no averages

*: I can't check exactly what getInstantYieldValue does since I can't find the method on GitHub, but I'll just assume that it correctly returns the total instant yields of the specified type for the specified number of last past turns
Edit: found the method; the file was too large so the search didn't work lol...50,000 lines...crazy; my skills, or rather lack thereof, are really pushed here so I'm not sure but it looks like the instant yield history may not be stored exactly as one might expect for Tourism. I don't think the actual Influence for each player (of each player, respectively) is actually stored there but rather a single value for each player (I hope that makes sense). See below the TL;DR for why this may be significant.

So for calculating the float "base" in the algorithm you posted, only the component GetTourismPerTurnIncludingInstant includes 10-turn-averages, which is part of iOurTourismThisTurn.
For the culture part, it seems to me that it works the same way.
Instant Yields seem to be added to the total when they occur (m_aiCulturalInfluence for Tourism) and should thus get caught in the delta (m_aiLastTurnCulturalIPT, for example)
Let's make this algorithm easy to read for us noobs:


TheirCultureThisTurn = (Total culture so far) + ( (Culture that will be added as shown in the top bar in the UI, if they were a player) + (10-turn-average from instant yields) )
TheirCultureLastTurn = (Total culture when the DoTurn method was called the time before the last time) + (Culture that was added from all sources, including instant yields, during the last turn)

OurTourismThisTurn = (Total Influence on that player so far) + ( (Influence on that player that will be added as shown in our tourism screen) + (10-turn-average from instant yields) )
OurTourismLastTurn = (Total Influence on that player when the DoTurn method was called the time before the last time) + (Influence on that player that was added from all sources, including instant yields, during the last turn)

Base = OurTourismThisTurn - OurTourismLastTurn
if Base is <= 0, set it to 1

Slope = (TheirCultureThisTurn - TheirCultureLastTurn) / Base

Slope values.....Trend

< 0.9..................Rising
0.9 until 1.1........Static
> 1.1..................Falling


First, some questions: did I do this right? I'm assuming DoTurn is called when the player presses the Next Turn button.
It seems to me that OurTourismThisTurn's first component is the same as OurTourismLastTurn, is that right? Or is the reason why you don't just take that value for OurTourismLastTurn (i.e. just use GetInfluenceOn(ePlayer) for that) that there may have been instant yields that occurred during this turn (e.g. Great Musician Concert), is that right?

Anyway, if I have laid this out correctly, there are some oddities with this algorithm:

1. Let's consider the following example:
Player A has 10,000 culture and 200 culture per turn, which increments by 2 each turn in perpetuity.
Player B has 5,000 Tourism and 100 Tourism per turn, which increments by 1 each turn in perpetuity, with Player A.
Player B is at 50% Influencial with Player A and there are no instant yields from either.
For every following turn as far as the result is concerned, and using the numbers of the first turn, this algorithm would determine that ( Base = 5000 + 100 - (4901 + 99) = 100 ) and therefore ( Slope = ((10000 + 200) - (9802 + 198)) / 100 = 2 ), which would mean that the trend display shows "Falling".
In reality the trend is not falling, though, is it? It will remain static at 50% Influence.

2. Let's say there are some instant yields involved, such that Player B gets 5 additional Tourism with Player A every 10 turns (0.5 per turn on average)
This means that the algorithm would determine (Base = 5005 + 100 + 0.5 - (4901 + 99) = 105.5 ) and (Slope = ((10000 + 200) - (9802 + 198)) / 105.5 = 1.896) directly after the instant yield, which means the trend display still shows "Falling" when in reality the Influence is actually rising; the next turn the Slope will be 1.99 and thus still shown as "Falling", even though the Influence level would actually be static now, for the moment, until the next instant yield (over time it would increase, of course).

TL;DR
I think you get where I'm going with this: whoever wrote that algorithm seems to have forgotten to normalize the Slope variable.
If it were multiplied by the current Influence percentage, then there'd be a chance that the trend would actually mean what it says.
(Or I'm completely wrong and have butchered this entirely, which is why you should probably read the full post after all :lol:)

If this is all correct, then I would suggest changing the yield averages to 20 or 30 turns in addition to fixing the missing normalization (for the instant yield UI as well); 10 turns is a bit too jumpy in my opinion, especially for Tourism.

Edit: I'm pretty sure there's even more wrong with the algorithm or the methods feeding it...I'm pretty tired though, so can't think atm. One problem is that the normalization issue doesn't explain why Poland does not get a Rising trend in my graph further up this page; it could only explain the incorrect trend on Denmark and me.
Edit2: okay I *think* that maybe the other issue has to do with the instant yields...now I'm really not sure here but from how I understand the code, there is only one Tourism history for each player, instead of an Influence history for each player, of each player. That means the averaged instant yields will not be accurate at all for Influence specific to a player, which could explain the wrong trend for Poland in my data.

@Gazebo should I post this on GitHub?

Whew. I haven’t had enough coffee to rubber duck this. Let me look. I wrote this last year, and - at the time - it functioned correctly. I can’t recall if I messed with yield storage containers since then though.
 
Aha, I think I see two things. I explained all of this to my bottle of Aleve and it understood. Now I'm explaining it to my coffee.

G
You're sure that's pain medication and not LSD in that bottle? :D
Personally I just talk to my imaginary friend when I need to explain something to myself...much more normal :lol:
 
You're sure that's pain medication and not LSD in that bottle? :D
Personally I just talk to my imaginary friend when I need to explain something to myself...much more normal :lol:

Ha.

So I don't think a normalization is needed, since the relative scale of the yields is the same. I could be wrong, but I think normalizing might cause an issue (for some reason I can't recall I normalized it first, then removed the normal).

BUT looking at my commit history I do see where I adjusted the container method for instant yields and forgot to actually have instant yields gather the correct number of turns for both culture and tourism in the culture function. So, right now, it's grabbing the instant yield tourism AT a turn (i.e. turn 10), instead of the past 10 turns. I just forgot to update this method. Whoops.

G
 
So I don't think a normalization is needed, since the relative scale of the yields is the same. I could be wrong, but I think normalizing might cause an issue (for some reason I can't recall I normalized it first, then removed the normal).

BUT looking at my commit history I do see where I adjusted the container method for instant yields and forgot to actually have instant yields gather the correct number of turns for both culture and tourism in the culture function. So, right now, it's grabbing the instant yield tourism AT a turn (i.e. turn 10), instead of the past 10 turns. I just forgot to update this method. Whoops.
Yeah that makes sense; I've been wondering how m_ppiInstantYieldHistoryValues was supposed to be accumulating data that way; turns out it isn't. This means it's massively underestimating Tourism output, which explains the negative trend for Poland.

WRT the normalization, though, one can view it like this: the data is already normalized, but instead of being normalized to the player's current influence level with another player it is normalized to the (partial) victory condition of achieving 100% Influence with that other player (since that's equivalent to dividing Slope by 1). That isn't completely broken conceptually, but the UI doesn't really communicate that this is what is being calculated; it says "Falling", "Static", "Rising", which I think most players assume to reference the concrete Influence progress on the other player in that particular row and not some abstract concept of "Rising to the victory condition" or something. This is especially problematic since not everyone is going for CV and Influence has other benefits (Spies, Food etc) and the player may want to track that progress; without normalizing to the current influence he will now often find himself confronted with a supposed negative Trend, while actually moving toward the next Influence level (it says "Falling" while it's actually rising); the paradox can occur the other way around, as well, if the player has reached Influential and wants to reach "Dominant", for example, since then it will eventually happen that the trend tells him "Rising" when it's actually falling. So I really think it should be normalized to current Influence percentage (or, if that breaks something else, the captions should change, though I don't know what they should say since normalizing to 100% Influence is a pretty abstract and specific metric).
 
Yeah that makes sense; I've been wondering how m_ppiInstantYieldHistoryValues was supposed to be accumulating data that way; turns out it isn't. This means it's massively underestimating Tourism output, which explains the negative trend for Poland.

WRT the normalization, though, one can view it like this: the data is already normalized, but instead of being normalized to the player's current influence level with another player it is normalized to the (partial) victory condition of achieving 100% Influence with that other player (since that's equivalent to dividing Slope by 1). That isn't completely broken conceptually, but the UI doesn't really communicate that this is what is being calculated; it says "Falling", "Static", "Rising", which I think most players assume to reference the concrete Influence progress on the other player in that particular row and not some abstract concept of "Rising to the victory condition" or something. This is especially problematic since not everyone is going for CV and Influence has other benefits (Spies, Food etc) and the player may want to track that progress; without normalizing to the current influence he will now often find himself confronted with a supposed negative Trend, while actually moving toward the next Influence level (it says "Falling" while it's actually rising); the paradox can occur the other way around, as well, if the player has reached Influential and wants to reach "Dominant", for example, since then it will eventually happen that the trend tells him "Rising" when it's actually falling. So I really think it should be normalized to current Influence percentage (or, if that breaks something else, the captions should change, though I don't know what they should say since normalizing to 100% Influence is a pretty abstract and specific metric).

Yeah, I can see that. Hmm...

G
 
Yeah that makes sense; I've been wondering how m_ppiInstantYieldHistoryValues was supposed to be accumulating data that way; turns out it isn't. This means it's massively underestimating Tourism output, which explains the negative trend for Poland.

WRT the normalization, though, one can view it like this: the data is already normalized, but instead of being normalized to the player's current influence level with another player it is normalized to the (partial) victory condition of achieving 100% Influence with that other player (since that's equivalent to dividing Slope by 1). That isn't completely broken conceptually, but the UI doesn't really communicate that this is what is being calculated; it says "Falling", "Static", "Rising", which I think most players assume to reference the concrete Influence progress on the other player in that particular row and not some abstract concept of "Rising to the victory condition" or something. This is especially problematic since not everyone is going for CV and Influence has other benefits (Spies, Food etc) and the player may want to track that progress; without normalizing to the current influence he will now often find himself confronted with a supposed negative Trend, while actually moving toward the next Influence level (it says "Falling" while it's actually rising); the paradox can occur the other way around, as well, if the player has reached Influential and wants to reach "Dominant", for example, since then it will eventually happen that the trend tells him "Rising" when it's actually falling. So I really think it should be normalized to current Influence percentage (or, if that breaks something else, the captions should change, though I don't know what they should say since normalizing to 100% Influence is a pretty abstract and specific metric).

So if I understand what you say, we should instead something like:

"Static" -> the equilibrium point is at the same influence level.
"Rising" -> the equilibrium point is at least at the next influence level.
"Falling" -> the equilibrium point is at least at the previous influence level.

With possibly more "steps":

"Static" -> the equilibrium point is at the same influence level, and nearby current position.
"Rising slowly" -> the equilibrium point is at the same influence level, but significantly above current position.
"Rising" -> the equilibrium point is at the next influence level.
"Rising quickly" -> the equilibrium point is at least in two influence levels.
"Falling" slowly" -> the equilibrium point is at the same influence level, but significantly lesser current position.
"Falling" -> the equilibrium point is at the previous influence level.
"Falling quickly" -> the equilibrium point is at least at two influence levels prior.
 
So if I understand what you say, we should instead something like:
Well no, that would make it much more complicated than it should be. I think maybe you got confused because I wasn't careful about the distinction between Influence level and Influence percentage; I generally meant the latter.

What I was describing was multiplying the slope variable by the current influence percentage (as percentage/100), which would make the result normalize to that. This means that if the current trend for the Influence percentage with the player of that row (last turn to this turn with some 10-turn-instant-yield-average thrown in) is that it is increasing, the Trend label would show "Rising"; if it's decreasing it would show "Falling" and if it doesn't do much of either it would show "Static". Of course we could add more gradations but the whole point of this kind of normalization is to not normalize it to some static point on a scale but make it describe the actual trend of the Influence percentage itself.

So, to make it absolutely clear: what I want is for it to show "Rising" when it's going up, "Falling" when it's going down and "Static" when it's standing still. Normalizing slope to the current Influence percentage would do that.
 
Aha, I think I see two things. I explained all of this to my bottle of Aleve and it understood. Now I'm explaining it to my coffee.

G

As a physician, I feel like I should point out that a big slug of caffeine is not a great idea when you have a headache.

As a barely-functional adult who is just trying to get through the day, please god, just one more day, may I also recommend some Irishing up of that coffee, and maybe some mild head trauma to help you sleep
 
Snowed in, free time for this.


Code:
/// If influence is rising, how many turns until we get to Influential? (999 if not rising fast enough to make it there eventually)
int CvPlayerCulture::GetTurnsToInfluential(PlayerTypes ePlayer)
{
    CvPlayer &kOtherPlayer = GET_PLAYER(ePlayer);
    int iRtnValue = 999;

    if (GetInfluenceLevel(ePlayer) >= INFLUENCE_LEVEL_INFLUENTIAL)
    {
        return 0;
    }
    else if (GetInfluenceTrend(ePlayer) == INFLUENCE_TREND_RISING)
    {
        int iInfluence = GetInfluenceOn(ePlayer);
        int iInflPerTurn = GetTourismPerTurnIncludingInstant(ePlayer);
        if (iInflPerTurn == 0)
            return 999;

        int iCulture = kOtherPlayer.GetJONSCultureEverGenerated();
        int iCultPerTurn = GetOtherPlayerCulturePerTurnIncludingInstant(ePlayer);

        int iNumerator = (GC.getCULTURE_LEVEL_INFLUENTIAL() * iCulture / 100) -  iInfluence;
        int iDivisor = iInflPerTurn - (GC.getCULTURE_LEVEL_INFLUENTIAL() * iCultPerTurn / 100);

        iRtnValue = iNumerator / max(1, iDivisor);

        // Round up
        if (iNumerator % max(1, iDivisor) != 0)
        {
            iRtnValue++;
        }

        if (iRtnValue <= 0 || iRtnValue >= 999)
            return 999;
    }

    return iRtnValue;
}

and

Code:
/// Current influence trend on this player
InfluenceLevelTrend CvPlayerCulture::GetInfluenceTrend(PlayerTypes ePlayer) const
{
    InfluenceLevelTrend eRtnValue = INFLUENCE_TREND_STATIC;

    CvPlayer &kOtherPlayer = GET_PLAYER(ePlayer);

    float iTheirCultureThisTurn = (float)m_pPlayer->GetCulture()->GetOtherPlayerCulturePerTurnIncludingInstant(ePlayer) + (float)kOtherPlayer.GetJONSCultureEverGenerated();
    float iTheirCultureLastTurn = (float)kOtherPlayer.GetCulture()->GetLastTurnLifetimeCulture() + kOtherPlayer.GetCulture()->GetLastTurnCPT();

    float iOurTourismThisTurn = (float)GetInfluenceOn(ePlayer) + (float)m_pPlayer->GetCulture()->GetTourismPerTurnIncludingInstant(ePlayer);
    float iOurTourismLastTurn = (float)GetLastTurnInfluenceOn(ePlayer) + (float)m_pPlayer->GetCulture()->GetLastTurnInfluenceIPT(ePlayer);

    if (iTheirCultureLastTurn <= 0)
        iTheirCultureLastTurn = 1;

    if (iTheirCultureThisTurn <= 0)
        iTheirCultureThisTurn = 1;
    float iLastTurnPercent = (iOurTourismLastTurn * 100) / iTheirCultureLastTurn;
    float iThisTurnPercent = (iOurTourismThisTurn * 100) / iTheirCultureThisTurn;

    if (iLastTurnPercent < iThisTurnPercent)
    {
        eRtnValue = INFLUENCE_TREND_RISING;
    }
    else if (iLastTurnPercent > iThisTurnPercent)
    {
        eRtnValue = INFLUENCE_TREND_FALLING;
    }
        
    return eRtnValue;
}
 
Top Bottom