The Navy Seal
Emperor
I'll see if I can squeeze in updating this week.
Seven05 post the code if you want, it would be helpful.
Seven05 post the code if you want, it would be helpful.
What about give to the farmers the ability to plant some resources, like wheat if your Civ has a farm + wheat on your Civ territory ?
And the ability to buy a resource like rice from China, or Corn from Incan, and then be able to plant it on your Civ territory.
And the same about other resources like sheeps, cows, etc...
void CvPlot::doImprovement()
{
PROFILE_FUNC();
CvCity* pCity;
CvWString szBuffer;
int iI;
FAssert(isBeingWorked() && isOwned());
if (getImprovementType() != NO_IMPROVEMENT)
{
if (getBonusType() == NO_BONUS)
{
FAssertMsg((0 < GC.getNumBonusInfos()), "GC.getNumBonusInfos() is not greater than zero but an array is being allocated in CvPlot::doImprovement");
for (iI = 0; iI < GC.getNumBonusInfos(); ++iI)
{
// ----- Seven 05 Begin -----
/*Here we're going to make a slight change to the chance of discovering bonuses on
improved plots. What we want is to limit food resources so they will only appear if the civ
already has that resource. And 'fix' it so resources can only be discovered on the appropriate
terrain.*/
if (GET_TEAM(getTeam()).isHasTech((TechTypes)(GC.getBonusInfo((BonusTypes) iI).getTechReveal())) &&
GC.getBonusInfo((BonusTypes) iI).isTerrain((unsigned int) getTerrainType()))
{ // If this bonus type is allowed on this terrain and we have the tech needed
if (GC.getImprovementInfo(getImprovementType()).getImprovementBonusDiscoverRand(iI) > 0)
{ // If this bonus can be 'discovered'
if (GC.getGameINLINE().getSorenRandNum(GC.getImprovementInfo(getImprovementType()).getImprovementBonusDiscoverRand(iI), "Bonus Discovery") == 0)
{
if(GC.getBonusInfo((BonusTypes) iI).getHealth() > 0)
{ // This next check should only happen with food resources
if(GET_PLAYER(getOwner()).hasBonus((BonusTypes) iI))
{ // If we have this one already
setBonusType((BonusTypes) iI);
}
else
{ // We don't have this one yet, bail out
break;
}
}
else
{ // Non-health bonuses can be discovered without having one already
setBonusType((BonusTypes)iI);
}
// ----- Seven05 End -----
pCity = GC.getMapINLINE().findCity(getX_INLINE(), getY_INLINE(), getOwnerINLINE(), NO_TEAM, false);
if (pCity != NULL)
{
szBuffer = gDLL->getText("TXT_KEY_MISC_DISCOVERED_NEW_RESOURCE", GC.getBonusInfo((BonusTypes) iI).getTextKeyWide(), pCity->getNameKey());
gDLL->getInterfaceIFace()->addMessage(getOwnerINLINE(), false, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_DISCOVERBONUS", MESSAGE_TYPE_MINOR_EVENT, GC.getBonusInfo((BonusTypes) iI).getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_WHITE"), getX_INLINE(), getY_INLINE(), true, true);
}
break;
}
}
}
}
}
}
doImprovementUpgrade();
}
How about you have them randomly appear on a farm? Then the player can retool the land into a pasture if they want.Well I was going to do the sheep and horse ect appearing but it's hard because I don't want you to be able to build a pasture wherever and having it randomly pick a spot is hard to do.