Version 1.00 discussion thread

Not sure if it comes from this but I find early rushes to be much harder now.
Last attempt was on Qin, by the time I sent ~10 chariots and declare he already had 5 barrack promoted protective archers in his capitol (~1200BC I think), and that was before additional whipped defenders :( Replayed the same game without the rush/units buildup part and he had half of that defense at the same date.
Does the AI detect your rush attempts and react to it by watching your power score grow ?

Yes ... the AI is watching you. ;) Looking at power buildups by neighbors and reacting preemptively is a new capability for Civ AI, and the only way the AI could fend off early rushes.
 
I've found that the problem is in fact in Lead from Behind code in CvUnit::canMoveInto.

That block of code you pointed out is indeed messed up - it looks like the author misunderstood the purpose of the vanilla code, and the fact that canAttack(*pDefender) already checks the combatLimit() situation. It should indeed be reverted; good find.

HOWEVER. I am pretty sure that code is NOT responsible for the AI refusal to capture empty cities thing you guys are seeing. For one thing, it is inside an "if (bAttack)" block (as your code quote showed), which means it won't even apply unless there was something there to attack ie not an empty city. Secondarily, if the problem were with CvUnit::canMoveInto() then it would be causing the same problem for human players as well, but I suspect if that were the case people would've been more upset than they were.

JDog mentioned a possible cause with a line in AI_pickTargetCity() in his response before he poofed on us again which is in his 1.02a files on SF, so I would strongly recommend giving that a try as it would explain why it's an AI-only problem.

I couldn't reproduce this problem 3 weeks ago btw (which I made a post about), and I still can't after trying again just now - both with JDog's current code, and with his line reverted. So I'm not sure I can help much heh.
 
The problem DID get solved when I reverted that code.

Checks for a valid attack move are made in cases besides there being an enemy unit on the plot. Unfortunately I don't remember the call stack which leads to the problem.

Regarding human players not encountering this, that would be explained by the AI never leaving cities empty.
 
The problem DID get solved when I reverted that code.

Awesome, I don't have to worry about this any more then! Thanks dood. :) :) :)

Checks for a valid attack move are made in cases besides there being an enemy unit on the plot. Unfortunately I don't remember the call stack which leads to the problem.

Those other cases still pass in a true value for bAttack though? Odd...

Regarding human players not encountering this, that would be explained by the AI never leaving cities empty.

Well, you could have a helicopter or something that can't capture cities, that is owned by you, an ally also attacking the same city, or by the barbarians, that takes out the last defender and leaves the city open for part of a turn.
 
Top Bottom