Feasting to the max

zup

Emperor
Joined
Aug 14, 2008
Messages
1,249
I want to change the minimum population required to feast. Therefore conquered cities become a snack for my vampires. I want to completely wipe out a city this way.

The problem: How do I accomplish this?

EDIT: Well I managed to reduce the population requirement. Yet it will not raze the city but stops at 1.
 
You'd have to change the spell's effect so that if cast on a size 1 city, the city is razed. Not entirely sure what the python for that would be. Also, if you don't change the way XP is assigned for feasting, you will find that Vampires actually LOSE XP when feasting on tiny cities.
 
How do you like the way I have it in (one of) my version(s)?
in Assets\python\entrypoints\CvSpellInterface.py:
Code:
def reqFeast(caster):
	pPlot = caster.plot()
	pCity = pPlot.getPlotCity()
	pPlayer = gc.getPlayer(caster.getOwner())
	if not pPlayer.isHuman():
		if pCity.getPopulation() < 4:
			return False
	return True

def spellFeast(caster):
	pPlot = caster.plot()
	pCity = pPlot.getPlotCity()
	caster.changeExperience(pCity.getPopulation()*2/3, -1, false, false, false)
	pCity.changeHurryAngerTimer(3)
	if pCity.getPopulation() < 1:
		pCity.kill()

This lets humans raze cities into oblivion, but blocked the AI from doing so after I witnessed them defeat themselves by destroying all their own cities. (I had another version that let anyone raze cities though feasting, but only in cities that were in revolt, which essentially means it can only happen in recent conquests although Beasts of Agares or certain events could allow it too. I think I prefer that version, but I found this one first.) Note that I also changed the formula for free xp (from pop-3 to 2/3*pop, rounded down) so it isn't quite as strong in larger cities, but also doesn't subtract xp in cities that are too small.
 
Yes. I had removed the blocks that tell them to stop, so they feasted on all their cities to the point of razing them. No one had attacked them yet, but once their vamps finished off the last citizens they lost the game.
 
Computers cast spells every turn... I think now they will just have a bunch of size 4 cities and cripple their economy...
 
Back
Top Bottom