[MOD] MagisterModmod

The free Great Prophet gained from entering the Mirror of Heaven is technically not limited to the Malakim. Any civ can get one, provided that it has a unit enter the Mirror of Heaven tile while the player has The Empyrean as his state religion while not yet having the Honor technology. It gives the Honor technology for free too.

The Malakim are of course the most likely to take advantage of it, as they are the only civilization that can found The Empyrean without researching Honor first. Other players can still convert before they have the technology if they wait for it to spread to them though.

Interesting. That's good to know. Is there something similar with the Palus (I think that's what it's called... the black tower with the angled walls at the base)? I received a great person when Talia entered that square, too.
 
You could get a great person from exploring the Palus, as you could with other lairs, but it should not be automatic.

Approaching the Palus for the first time could cause Magic Resistant Iron Golems to spawn.

(The Palus was where Perpentach was imprisoned and guarded by those golems. It has nothing to do with any religion.

The Mirror of Heaven is where Varn Gossam received enlightenment and wrote down the fundamental doctrines of The Empyrean. This was probably a few years after he received his first vision of Lugus and devoted himself to that god. He had already united several Malakim tribes in the worship of Lugus before he discovered the Mirror of Heaven and truly established the organized religion.)
 
IMO Auric Ulvin should still be Evil. His switch to neutral has made him far to friendly with the good civs and he often joins the overcouncil.
 
IMO Auric Ulvin should still be Evil. His switch to neutral has made him far to friendly with the good civs and he often joins the overcouncil.

I've also often seen him join the OC.


What does Into the Mist do, now that stealth is the default race for the Sidar? The civilopedia text seems to be missing.
 
1. The AI undervalues their mana in the early game, especially if they have 2 of them. I've got Ale + Earth Mana from the Khazad in exchange for a health resource in two different games.
2. I understand why Corindale was move to Strength of Will, but why Gibbon? He isn't even an archmage anymore. Is it because he can cast Impersonate Leader without dying?
Another small thing: The pedia says that the Infernal Pact requires only CoS (not AV state religion).
 
I've also often seen him join the OC.


What does Into the Mist do, now that stealth is the default race for the Sidar? The civilopedia text seems to be missing.

As the says, it "Erases your rivals' maps, causing them to forget everything they cannot currently see."

Edit: It seems that this text was not showing up, even though it was clearly written in Magister_CIV4_GameText_FFH2.xml. Somehow I seem to have accidentally written "on" just after <Tag>TXT_KEY_SPELL_INTO_THE_MIST_HELP</Tag> and before <English>. It appears that the text written there overrides the language specific text for the TXT_KEYs.


I just now figured out how to make it have another very useful function, which in my next release I intend to give it in addition to its current functionality. I am making it so that it eliminates all other players' memory of all events that effected their diplomatic relations with you. It will stop the AI from caring how many times you declared war on them, convinced other players to declare war on them, threatened them, refused to help them when in need, refused to adopt their favorite civic or state religion, etc., or on the other hand how many times you have done things they like. It will be as if you just met. Things like currently being at war, currently being of the wrong alignment, or currently using the wrong kinds of mana will not be changed.

This seems to be very fitting with the lore, which establishes that for a shade it is often difficult to be recognized and remembered even by his own friends and family. The sort of magic that the Sidar use to become invisible does not rely on illusions or bending light around them, but upon making others forget what they have seen sometimes even before they realize they have seen it. (That may mean that it would be more appropriate for them to have Metamagic mana than shadow.)


1. The AI undervalues their mana in the early game, especially if they have 2 of them. I've got Ale + Earth Mana from the Khazad in exchange for a health resource in two different games.
I'm really not an expert on tweaking the AI. That is more an issue to take up with Tholal.

However, I am not so sure that this is really such of an issue. Mana generally is not as useful in the early game. You would not have arcane units or units with affinity that early. The Khazad do not really need their Earth mana for any arcane magic, as civs get the adept level spell of their patron sphere for free and the Khazad do not have access to Mages or Archmages. Other than the slight boost it gives to the chance of discovering mineral resources, the Khazad don't get much use out of the mana until they get their Dwarven Druids. Since they often suffer from health problems long before that, I am not sure that this was an unwise trade from their perspective.
2. I understand why Corindale was move to Strength of Will, but why Gibbon? He isn't even an archmage anymore. Is it because he can cast Impersonate Leader without dying?

I switched the prereq for Gibbon back when he still had archmage abilities. I suppose it would make sense to change it now. What do you think is the most appropriate prereq? Arcane Lore again? Malevolent Designs? Alteration? Just Deception?
Another small thing: The pedia says that the Infernal Pact requires only CoS (not AV state religion).

At one point I chose not to give The Infernal Pact a state religion requirement for humans, but to only block it for the AI. That was mostly to make it easier to test. I have since then commented out the line if not pPlayer.isHuman():, so it does limit humans too. I suppose I ought to update the pedia to show this.
 
I just now figured out how to make it have another very useful function, which in my next release I intend to give it in addition to its current functionality. I am making it so that it eliminates all other players' memory of all events that effected their diplomatic relations with you. It will stop the AI from caring how many times you declared war on them, convinced other players to declare war on them, threatened them, refused to help them when in need, refused to adopt their favorite civic or state religion, etc., or on the other hand how many times you have done things they like. It will be as if you just met. Things like currently being at war, currently being of the wrong alignment, or currently using the wrong kinds of mana will not be changed.

This seems to be very fitting with the lore, which establishes that for a shade it is often difficult to be recognized and remembered even by his own friends and family. The sort of magic that the Sidar use to become invisible does not rely on illusions or bending light around them, but upon making others forget what they have seen sometimes even before they realize they have seen it. (That may mean that it would be more appropriate for them to have Metamagic mana than shadow.)

Great idea :goodjob:

I switched the prereq for Gibbon back when he still had archmage abilities. I suppose it would make sense to change it now. What do you think is the most appropriate prereq? Arcane Lore again? Malevolent Designs? Alteration? Just Deception?

Arcane lore would be good. +2 affinity makes him a little too powerful for Deception or Alteration, and Malevolent Designs is a bit too much.
 
While playing Sheaims, I noticed some problems.

1/ Elegy of the Sheaims has obsolutely *no* impact on the AC. And I tried several times.

2/ I found by a rival city a pasture without any resource. Weird. Can resource disappear? Maybe an event...

3/ The pedia for the planar gate is incorrect. The obsidian gate does not grants a minotaur, but a colubra (and the pedia entry for them is about chaos marauders).
 
2/ I found by a rival city a pasture without any resource. Weird. Can resource disappear? Maybe an event...

If you didn't have Animal Husbandry it was probably horse.
Also, pigs can disappear in the hill giant event (either lose the resource or lose the stored food in your nearest city or fight with him). Choosing to lose the pig is a pretty dumb idea though.
 
Re: 2/ have you checked worldbuilder/do you have the techs for seeing horse/toad/nightmare?
 
I have checekd with the WB and there was no resource.
Probably Akbarthegreat is right. I also noticed a giant cage in their capital while the Pact of the Nilhorn has not been built. I initially thought that a hill giant has been captured in the desert, but the pig-giant event could explain both.

A stupid choice for the AI....
 
Maybe increase the cost of the Mercurian Gate to 1500 or 2000 :hammers:, but give a 2x speed multiplier for every AV civ in the game and 10x for every infernal civ. Because the only reason Basium is going to bother becoming your ally is to fight the infernals.
(I just put in random values, balance wise it may need some thinking.)
 
How much do you care about the modifiers which state religions provide towards the amount of mana required for an arcane unit to get free spell sphere promotions?

I am thinking about removing that feature.

This is partially because I think some players find it confusing, but mostly because the code itself looks very inelegant.

If I remove that feature, then I can replace all this:
Spoiler :
Code:
				iMana = gc.getInfoTypeForString('BONUS_MANA_AIR')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iRunes:
					iNum -=1
				if iCiv == iHippus or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_BODY')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iCalabim or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_CHAOS')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iOrder:
					iNum -= 1
				if iCiv == iDoviello or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_CREATION')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iVeil:
					iNum -= 1
				if iCiv == iKuriotates or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CREATION1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CREATION2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CREATION3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_DEATH')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iSidar or iCiv == iMercurians:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_UNDEAD_SLAYING'), True)
				elif iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_DIMENSIONAL')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iSheaim or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_EARTH')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iRunes:
					iNum += 1
				if iCiv == iKhazad or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_ENCHANTMENT')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iLuchuirp or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_ENTROPY')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iVeil:
					iNum += 1
				if iCiv == iMercurians:
					pass
				elif iCiv == iInfernal or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_FIRE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iOverlords:
					iNum -= 1
				elif iStateReligion ==iHand:
					iNum -= 1
				if iCiv == iClan or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_FORCE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iGrigori or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FORCE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FORCE2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FORCE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_ICE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion ==iHand:
					iNum += 1
				elif iStateReligion == iLeaves:
					iNum -= 1
				if iCiv == iIllians or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ICE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ICE2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ICE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_LAW')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iOrder:
					iNum += 1
				if iCiv == iBannor or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_LIFE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iMercurians or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_METAMAGIC')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iAmurites or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_METAMAGIC1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_METAMAGIC2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_METAMAGIC3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_MIND')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iBalseraphs or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_NATURE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iLeaves:
					iNum += 1
				elif iStateReligion ==iHand:
					iNum -= 1
				if iCiv == iLjosalfar or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE2'), True)

						self.onUnitPromoted([unit, gc.getInfoTypeForString('PROMOTION_NATURE2')])

						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_SHADOW')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iEsus:
					iNum += 1
				elif iStateReligion == iEmpyrean:
					iNum -= 1
				if iCiv == iSvartalfar or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_SPIRIT')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iElohim or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_SUN')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iEsus:
					iNum -= 1
				elif iStateReligion == iEmpyrean:
					iNum += 1
				if iCiv == iMalakim or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_WATER')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iOverlords:
					iNum += 1
				if iCiv == iLanun or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER3'), True)
with this:
Spoiler :
Code:
				if iCiv == iHippus:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR1'), True)
				elif iCiv == iCalabim:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY1'), True)
				elif iCiv == iDoviello:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS1'), True)
				elif iCiv == iKuriotates:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CREATION1'), True)
				elif iCiv == iSidar:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_UNDEAD_SLAYING'), True)
				elif iCiv == iSheaim:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL1'), True)
				elif iCiv == iKhazad:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH1'), True)
				elif iCiv == iLuchuirp:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT1'), True)
				elif iCiv == iInfernal:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY1'), True)
				elif iCiv == iClan:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE1'), True)
				elif iCiv == iGrigori:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FORCE1'), True)
				elif iCiv == iIllians:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ICE1'), True)
				elif iCiv == iBannor:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW1'), True)
				elif iCiv == iMercurians:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE1'), True)
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_UNDEAD_SLAYING'), True)
				elif iCiv == iAmurites:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_METAMAGIC1'), True)
				elif iCiv == iBalseraphs:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND1'), True)
				elif iCiv == iLjosalfar:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE1'), True)
				elif iCiv == iSvartalfar:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW1'), True)
				elif iCiv == iElohim:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT1'), True)
				elif iCiv == iMalakim:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN1'), True)
				elif iCiv == iLanun:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER1'), True)
				iBonusClass = gc.getInfoTypeForString('BONUSCLASS_MANA')
				for iProm in range(gc.getNumPromotionInfos()):
					if unit.canAcquirePromotion(iProm):
						info = gc.getPromotionInfo(iProm)
						iBonus = info.getBonusPrereq()
						if iBonus != -1:
							if gc.getBonusInfo(iBonus).getBonusClassType() == iBonusClass:
								iNum = pPlayer.getNumAvailableBonuses(iBonus)
								if unit.isBarbarian():
									iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iBonus), "Barbaran Mana")
								iLevel = info.getAIWeight()/50
								if iNum > iLevel:
									unit.setHasPromotion(iProm, True)

Maybe increase the cost of the Mercurian Gate to 1500 or 2000 :hammers:, but give a 2x speed multiplier for every AV civ in the game and 10x for every infernal civ. Because the only reason Basium is going to bother becoming your ally is to fight the infernals.
(I just put in random values, balance wise it may need some thinking.)

I like the general idea, but am thinking that it should only give such modifiers if you are actually at war with those players. It should certainly not be easier to summon Basium due having such evil teammates or vassals.

The amount of evil mana types the enemy players possess might also be a relevant factor.
 
then do deduce the multiplier for each vassal or teammates AV civ.
but having only the condition of "at war" might mean the mercurian gate will still be costly.. you'll rarely (if you can manage it) be at war with more than 2 player..
 
How much do you care about the modifiers which state religions provide towards the amount of mana required for an arcane unit to get free spell sphere promotions?

I am thinking about removing that feature.

This is partially because I think some players find it confusing, but mostly because the code itself looks very inelegant.

If I remove that feature, then I can replace all this:
Spoiler :
Code:
				iMana = gc.getInfoTypeForString('BONUS_MANA_AIR')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iRunes:
					iNum -=1
				if iCiv == iHippus or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_BODY')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iCalabim or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_CHAOS')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iOrder:
					iNum -= 1
				if iCiv == iDoviello or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_CREATION')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iVeil:
					iNum -= 1
				if iCiv == iKuriotates or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CREATION1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CREATION2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CREATION3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_DEATH')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iSidar or iCiv == iMercurians:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_UNDEAD_SLAYING'), True)
				elif iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_DIMENSIONAL')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iSheaim or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_EARTH')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iRunes:
					iNum += 1
				if iCiv == iKhazad or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_ENCHANTMENT')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iLuchuirp or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_ENTROPY')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iVeil:
					iNum += 1
				if iCiv == iMercurians:
					pass
				elif iCiv == iInfernal or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_FIRE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iOverlords:
					iNum -= 1
				elif iStateReligion ==iHand:
					iNum -= 1
				if iCiv == iClan or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_FORCE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iGrigori or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FORCE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FORCE2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FORCE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_ICE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion ==iHand:
					iNum += 1
				elif iStateReligion == iLeaves:
					iNum -= 1
				if iCiv == iIllians or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ICE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ICE2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ICE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_LAW')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iOrder:
					iNum += 1
				if iCiv == iBannor or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_LIFE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iMercurians or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_METAMAGIC')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iAmurites or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_METAMAGIC1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_METAMAGIC2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_METAMAGIC3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_MIND')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iBalseraphs or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_NATURE')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iLeaves:
					iNum += 1
				elif iStateReligion ==iHand:
					iNum -= 1
				if iCiv == iLjosalfar or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE2'), True)

						self.onUnitPromoted([unit, gc.getInfoTypeForString('PROMOTION_NATURE2')])

						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_SHADOW')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iEsus:
					iNum += 1
				elif iStateReligion == iEmpyrean:
					iNum -= 1
				if iCiv == iSvartalfar or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_SPIRIT')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				if iCiv == iElohim or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_SUN')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iEsus:
					iNum -= 1
				elif iStateReligion == iEmpyrean:
					iNum += 1
				if iCiv == iMalakim or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN3'), True)
				iMana = gc.getInfoTypeForString('BONUS_MANA_WATER')
				iNum = pPlayer.getNumAvailableBonuses(iMana)
				if unit.isBarbarian():
					iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iMana), "Barbaran Mana")
				elif iStateReligion == iOverlords:
					iNum += 1
				if iCiv == iLanun or iNum > 1:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER1'), True)
					if iNum > 3 and unit.isHasPromotion(iChanneling2):
						unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER2'), True)
						if iNum > 4 and unit.isHasPromotion(iChanneling3):
							unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER3'), True)
with this:
Spoiler :
Code:
				if iCiv == iHippus:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR1'), True)
				elif iCiv == iCalabim:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY1'), True)
				elif iCiv == iDoviello:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS1'), True)
				elif iCiv == iKuriotates:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CREATION1'), True)
				elif iCiv == iSidar:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_UNDEAD_SLAYING'), True)
				elif iCiv == iSheaim:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL1'), True)
				elif iCiv == iKhazad:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH1'), True)
				elif iCiv == iLuchuirp:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT1'), True)
				elif iCiv == iInfernal:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY1'), True)
				elif iCiv == iClan:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE1'), True)
				elif iCiv == iGrigori:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FORCE1'), True)
				elif iCiv == iIllians:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ICE1'), True)
				elif iCiv == iBannor:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW1'), True)
				elif iCiv == iMercurians:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE1'), True)
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_UNDEAD_SLAYING'), True)
				elif iCiv == iAmurites:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_METAMAGIC1'), True)
				elif iCiv == iBalseraphs:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND1'), True)
				elif iCiv == iLjosalfar:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE1'), True)
				elif iCiv == iSvartalfar:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW1'), True)
				elif iCiv == iElohim:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT1'), True)
				elif iCiv == iMalakim:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN1'), True)
				elif iCiv == iLanun:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER1'), True)
				iBonusClass = gc.getInfoTypeForString('BONUSCLASS_MANA')
				for iProm in range(gc.getNumPromotionInfos()):
					if unit.canAcquirePromotion(iProm):
						info = gc.getPromotionInfo(iProm)
						iBonus = info.getBonusPrereq()
						if iBonus != -1:
							if gc.getBonusInfo(iBonus).getBonusClassType() == iBonusClass:
								iNum = pPlayer.getNumAvailableBonuses(iBonus)
								if unit.isBarbarian():
									iNum += CyGame().getSorenRandNum(pArea.getNumBonuses(iBonus), "Barbaran Mana")
								iLevel = info.getAIWeight()/50
								if iNum > iLevel:
									unit.setHasPromotion(iProm, True)

I didn't know about this at all, could you explain?

I like the general idea, but am thinking that it should only give such modifiers if you are actually at war with those players. It should certainly not be easier to summon Basium due having such evil teammates or vassals.

The amount of evil mana types the enemy players possess might also be a relevant factor.

Being at war doesn't really matter, Basium just wants to get into creation to fight them, right? So whoever calls Basium should thereafter be locked into permanent war with the Infernals. Because every good/neutral civ is finally anti-Infernal, even if they aren't directly at war.
 
In the current release and several previous versions, your state religion effects how much mana is required for some mana types.

Normally you need 2 sources of a type of mana to get the first tier spell sphere promotion, 4 to get the second tier, and 5 to get the 3rd tier.

Religions change the number required, decreasing the requirements for the religion's patron god's sphere and increasing it for the sphere opposing that.

For example, The Order makes it so that you only need 1 Law mana to get Law I, 3 to get Law II, and 4 to get Law III. At the same time it makes you require 3 sources of Chaos mana to get Chaos I, 5 sources to get Chaos II, and 6 sources to get Chaos III.

(Since the Barbarian state does not have a palace and thus cannot be counted as owning any mana, I treat them as if they own a random number of mana sources of to a maximum equal to the number of sources found the unit's area of the map.)

Regardless of how much mana you own, I still give all arcane units the first level of the owner's civ's patron sphere. Thus, the Amurite adepts start with Metamagic I even before their owner has founded a single city and gotten control of any mana.

The Sidar are an exception here, as they like their patron god hate the use of Death magic


In the new system, instead of hardcoding so many conditionals and promotion grants, I just cycle through and grant them the promotions for which they are qualified. The function unit.canAcquirePromotion(iProm) returns true if the unit meets all of the criteria to purchase the promotion (save actually having a free promotion pick or the xp to buy one). This includes promotion prereqs like Channeling I-III, so there is no need to check for that. It also includes the mana prereqs. (In FfH2 and other modmods, only the first level of each spell sphere actually requires control of a mana source, but in my modmod I have always required the mana for the second and third tiers too.) It also checks for things like whether a promotion is blocked by the <PromotionImmune1>, <PromotionImmune2>, or<PromotionImmune3> tags of another promotion. Since these checks are performed in C++, they run much faster than they could in Python.

This system does rely a bit more on how things are organized in CIV4PromotionInfos.xml. If I had placed the higher level promotions before their prereqs, then they would not be granted. Since there is not an easy way to tell what tier a spell is without manually checking the channeling promotions, I'm using the AIWeight as a proxy for that.
 
why did you increase the requirements for sphere 2 and sphere 3?

normally its 3 for (tier2) and 4 for (tier3) ^_^
 
There are more ways to get mana in MagisterModmod than in base FfH2. Each holy shrine provides 3 types of mana instead of 1. Practically every wonder that requires a bonus also provides more of that same bonus. The Rites of Oghma can be repeated multiple times.

All in all, it would just too easy for arcane units to get all the spell sphere promotions for free if I didn't increase the requirements.
 
Well, looks like a good mechanism. Too bad I've never noticed it.
EDIT:BTW, now nightwatches can get Aeron's Chosen? My chosen nightwatch in my current Sidar game is a beast, with 300xp. I'm just waiting to upgrade him to a shadowrider.
 
Any unit with marksman can get the promotion.
 
Top Bottom