Cant attack, even though i still have 2 movement points avail??\ I moved from right side of enemy to where it is now and still cant attack..
Attached savedgame, screenie where, Logs if needed*i can send them) just ask), SVN 5361, No VP
I am able to reproduce this, however the actual causative bug must have occurred sometime previously. The reason you cannot attack is that your attacking unit has a limit of 100% damage to opponents (which is what most units have of course), and the defending unit already has 100% damage (hover and you'll see it has 0.0 hitpoints). Since you cannot attack a unit that is already at least as damaged as your limit, you cannot attack it.
The real question is how a unit with 0 hitpoints can still be there to defend in the first place. I cannot see any obvious flaw in the code (which always kills unit when its damage is 100% or more in the routine where the damage is set [so cannot be avoided and still have the damage recorded]). I think there is a bug in the following piece of code, which relates to the new 'battle survivor' code that was merged in from TheLadiesOgre's mod recently:
Code:
if (isSurvivor())
{
changeDamage(-getDamage());
setDamage(GC.getMAX_HIT_POINTS() -(getSurvivorChance() / 1000));
CvWString szBuffer = gDLL->getText("TXT_KEY_MISC_YOUR_UNIT_IS_HARDCORE", getNameKey());
gDLL->getInterfaceIFace()->addMessage(getOwnerINLINE(), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_POSITIVE_DINK", MESSAGE_TYPE_INFO, getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"), getX_INLINE(), getY_INLINE());
m_bDeathDelay = false;
return;
}
If the survival chance is < 10 then the damage will be set to GC.getMAX_HIT_POINTS() (i.e. - 100%) and give exactly the problem state we're seeing. HOWEVER, the defender in question has a survival chance of 0, which means it can never get into this code so far as I can see, so it's an unlikely explanation (it would have had to have had a survival promotion which saved it earlier, and it then lost that promotion, but it would also have had to have not healed up at all in the interim).
As such I cannot provide a convincing explanation of how this unit got its 100% damage without dying. I have made the following modifications (which will be on the SVN later today):
1) Modified the above piece of code to ensure it always does at least 1% damage
2) Modified the sweep-up-dead-units code, that runs each turn, to include ones with 100% damage even if they have not been explicitly marked as dead
3) Added a check at load-time for such units and deleted them at that point, so any that exist due to bugs in saves are cleaned out on load
I have verified that the offending unit is not present after the above when I load your save.
EDIT:
Repeatable CTD here's the Mini and a savedgame
SVN 5370
This crash does not reproduce for me. I note from your earlier screenshot that you are not using viewports however, so maybe it's a memory issue? Try with viewports.