Hopefully a quickie 
I want to make it so units can only heal when below healRate*5 of damage.
Sort of like :
So with GlobalDefines defines, an Unit in enemy lands would only be able to heal 25%, in Neutral 50%, in friendly 75% and lastly in own city 100%.*
*(% of total health)
Does the code look right and do I need to edit further to stop the healing after reaching 5x healRate?
I would insert it here : CvUnit.cpp line 3639

I want to make it so units can only heal when below healRate*5 of damage.
Sort of like :
PHP:
if (((currHitPoints() / maxHitPoints()) * 100) > (healRate(pPlot) *5))
{
return false;
}
So with GlobalDefines defines, an Unit in enemy lands would only be able to heal 25%, in Neutral 50%, in friendly 75% and lastly in own city 100%.*
*(% of total health)
Code:
<Define>
<DefineName>ENEMY_HEAL_RATE</DefineName>
<iDefineIntVal>5</iDefineIntVal>
</Define>
<Define>
<DefineName>NEUTRAL_HEAL_RATE</DefineName>
<iDefineIntVal>10</iDefineIntVal>
</Define>
<Define>
<DefineName>FRIENDLY_HEAL_RATE</DefineName>
<iDefineIntVal>15</iDefineIntVal>
</Define>
<Define>
<DefineName>CITY_HEAL_RATE</DefineName>
<iDefineIntVal>20</iDefineIntVal>
</Define>
Does the code look right and do I need to edit further to stop the healing after reaching 5x healRate?
I would insert it here : CvUnit.cpp line 3639
PHP:
bool CvUnit::canHeal(const CvPlot* pPlot) const
{
if (!isHurt())
{
return false;
}
if (isWaiting())
{
return false;
}
if (healRate(pPlot) <= 0)
{
return false;
}
return true;
}