LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
286 stars 159 forks source link

never attack vassals? #6786

Closed ilteroi closed 4 years ago

ilteroi commented 4 years ago

there is this piece of code in army movement:

    if (pOperation->GetEnemy() != NO_PLAYER)
    {
        if (GET_TEAM(GET_PLAYER(pOperation->GetEnemy()).getTeam()).IsVassalOfSomeone())
        {
            pOperation->SetToAbort(AI_ABORT_WAR_STATE_CHANGE);
            return;
        }
    }

so it looks like the AI will never attack vassals? is that really the intention?

i guess if they became someone's vassal during the lifetime of the army that would be ok but this is not what's happening.

RecursiveVision commented 4 years ago

Intention might be to prevent the AI from DoW'ing vassals, a longstanding bug which pops up every now and again.

LoneGazebo commented 4 years ago

I think it just needs a '!is at war' check, which I've now added.