Valkrionn
The Hamster King
I love the first three... Particularly the second one. That would encourage a VERY different gameplay style. The fourth one I'm not sure about, although only because of balance reasons... I'll have to think about it.
Yes, yes it does. The Mercs are underpowered compared to the Infernals, so I'm okay with that.
And I believe I answered the soul question in the last post... As it currently stands, the Angels will go to ALL mercs, and manes will go to all Infernals. So if there should be 2 manes, but all 7 infernals are in, 14 manes will spawn, 2 for each. Not sure atm whether to leave it, or make them go to a random civ rather than all civs.
Yes, yes I do. Don't want multiple Basiums. There already are for the Infernals, although they're clones... I'm about to change them all. Now that I've added the first three of those traits.
And the event is the basic idea if I decide to do it. It'll be interesting to figure out how to limit an option if the leader already exists though.
def postCombatLeaderUnit(pCaster, pOpponent, sLeaderName, sTrophyName):
if not pCaster.isImmortal():
iPlayer = pCaster.getOwner()
pPlayer = gc.getPlayer(iPlayer)
if pPlayer.getLeaderType() == gc.getInfoTypeForString(sLeaderName):
for iTrait in range(gc.getNumTraitInfos()):
if iTrait != gc.getInfoTypeForString('TRAIT_FALLOW'):
if pPlayer.hasTrait(iTrait):
CyMessageControl().sendApplyEvent(5013, EventContextTypes.EVENTCONTEXT_ALL, (iPlayer,iTrait,False))
pOppPlayer = gc.getPlayer(pOpponent.getOwner())
if pOppPlayer.isHuman():
if sTrophyName != -1:
if not CyGame().isHasTrophy(t):
CyGame().changeTrophyValue(t, 1)
def canDoSummonHyborem(argsList):
iEvent = argsList[0]
kTriggeredData = argsList[1]
if CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_HYBOREM')):
return false
return true
I'm thinking it would be a good idea to consolidate the <PythonPostCombatLost> defines for units' whose death cost you traits, especially if all your new Mercurian/Infernal leaders fall in this category. I've been meaning to change them all to use this in my version for a while, but haven't gotten around to it.
This could significantly reduce the size of CvSpellInterface.py, and it stops you from loosing your traits if you somehow capture another leader's leader unit and then loose it.Code:def postCombatLeaderUnit(pCaster, pOpponent, sLeaderName, sTrophyName): if not pCaster.isImmortal(): iPlayer = pCaster.getOwner() pPlayer = gc.getPlayer(iPlayer) if pPlayer.getLeaderType() == gc.getInfoTypeForString(sLeaderName): for iTrait in range(gc.getNumTraitInfos()): if iTrait != gc.getInfoTypeForString('TRAIT_FALLOW'): if pPlayer.hasTrait(iTrait): CyMessageControl().sendApplyEvent(5013, EventContextTypes.EVENTCONTEXT_ALL, (iPlayer,iTrait,False)) pOppPlayer = gc.getPlayer(pOpponent.getOwner()) if pOppPlayer.isHuman(): if sTrophyName != -1: if not CyGame().isHasTrophy(t): CyGame().changeTrophyValue(t, 1)
Obviously, this would mean changing <PythonPostCombatLost>postCombatBasium(pCaster,pOpponent)</PythonPostCombatLost> to <PythonPostCombatLost>postCombatBasium(pCaster,pOpponent, 'LEADER_BASIUM',"TROPHY_DEFEATED_BASIUM")</PythonPostCombatLost>, and so on for the other units.
Edit: Oh, I just remembered this is FF so you'll probably want to consolidate them through a <PythonOnDeath> call instead, or maybe consolidate all the trophies into one ,PythonPostCombatLost> call and all the trait losses into one <PythonOnDeath>.
If you move the Infernal/Mercurian spawning to an event, then limiting it based on what leaders are in the game should be easy. Each option would just have a different <PythonCanDo> to check to see if the unit has been in the game, each like this:
The actual creation of the Infernal/Mercurian civ under the right leader summoning would be moved to a <PythonCallback> for each option, with CvEventManager only being used to trigger the event.Code:def canDoSummonHyborem(argsList): iEvent = argsList[0] kTriggeredData = argsList[1] if CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_HYBOREM')): return false return true
Just remember to use (send/on)ModNetMessage if you create an event to govern your choices so you can remain compatible with multiplayer.