Basium's World Spell

Alzara

Emperor
Joined
Jan 2, 2008
Messages
1,214
Location
Florida
Hey guys

I was just wondering what the exact effects of Basium's world spell are?

Also why is it considered broken? What is wrong with it?

Thanks

Al
 
It does damage to all demon and undead units in the world. The problem is, it actually kills a lot of them. I've never actually used it (or played as the Mercurians since Shadow began), but it apparently kills Hyborem without a fight more often than not. He starts with Immortal, so he comes back, but the Infernals still lose their traits at his first death.
 
So what are the chances of it killing a demon? I'm wondering whether or not to create Madero, or wait until Basium has cast his world spell (when he is eventually summoned). Also, does Basium use this spell the moment he is created, or does he wait?

Thanks

Al
 
he does it as soon as he is at war with the infernal, which is usually as soon as he is created. And yes, I had it kill Mardero and Hyborem both my last infernal game, so I would recommend waiting.
 
right. the epic battle of good versus evil is finally staged, hyborem has entered the world and basium followed to fight him.
he casts his world-spell and hyborem is dead.

i hope this is not intended -> fix it please
 
The reason it seems to always kill hyborem is because his equipment makes him even weaker versus holy damage, If you were to drop it you would have a chance of having him not die
 
IMO this spell (and things like Armageddon) shouldn't work on units with Hero.. just too annoying
 
I agree with Quetz. Heroes should go down surrounded by swarms of enemies, not as random victims of a mass spell (well, maybe one or two should, but definitely not Hyborem).
 
If you won't to solve the problem right away, then do the following:
1) Open in the mod directory the following file: CvSpellInterface.py

2)Find the entry for divine retribution. It should look like this:
def spellDivineRetribution(caster):
iDemon = gc.getInfoTypeForString('PROMOTION_DEMON')
iUndead = gc.getInfoTypeForString('PROMOTION_UNDEAD')
for iPlayer in range(gc.getMAX_PLAYERS()):
player = gc.getPlayer(iPlayer)
if player.isAlive():
py = PyPlayer(iPlayer)
for pUnit in py.getUnitList():
if (pUnit.getRace() == iDemon or pUnit.getRace() == iUndead):
pUnit.doDamage(75, 100, caster, gc.getInfoTypeForString('DAMAGE_HOLY'), false)

3)Add the following lines:
def spellDivineRetribution(caster):
iDemon = gc.getInfoTypeForString('PROMOTION_DEMON')
iUndead = gc.getInfoTypeForString('PROMOTION_UNDEAD')
iHero = gc.getInfoTypeForString('PROMOTION_HERO')
for iPlayer in range(gc.getMAX_PLAYERS()):
player = gc.getPlayer(iPlayer)
if player.isAlive():
py = PyPlayer(iPlayer)
for pUnit in py.getUnitList():
if (pUnit.getRace() == iDemon or pUnit.getRace() == iUndead):
if (pUnit.getPromotion() != iHero):
pUnit.doDamage(75, 100, caster, gc.getInfoTypeForString('DAMAGE_HOLY'), false)

4)Save it and it should prevent all undead and demonic heroes from dying (and unfortunatly from damage).
 
You could modify that relatively easily to just cap the damage done, thereby making it rather unlikely to kill Hybo and the like.
 
4)Save it and it should prevent all undead and demonic heroes from dying (and unfortunatly from damage).

Code:
if (pUnit.getRace() == iDemon or pUnit.getRace() == iUndead):
	if (pUnit.isHasPromotion(iHero)):
		pUnit.doDamage(75, 75, caster, gc.getInfoTypeForString('DAMAGE_HOLY'), false)	
	else:
		pUnit.doDamage(75, 100, caster, gc.getInfoTypeForString('DAMAGE_HOLY'), false)
This way will allow him to be damaged upto 75%, but not killed by it.
 
Wouldn't that version always do 75% (which is then increased by holy damage vulnerability)? Maybe in the "if (pUnit.isHasPromotion(iHero)):" section it could start "pUnit.doDamage(50, 75, " to let it do 50% - 75% (again modified by holy resistance/vulnerability).

Note: I don't know what the parameters for the doDamage function really are for, but I'm guessing the first two numbers are minimum and maximum damage to apply.

Edit: I just read your (Vehem's) post in the other thread and it looks like the first two numbers are base damage and maximum damage (i.e. (50, 75,...) would do 50 damage but not going over 75 damage). Still, your code would always bring the heroes to 75%: 75 damage with a 75 damage cap. I'd rather see it like (75, 99,...) to never kill them, but able to leave them very crippled.
 
Edit: I just read your (Vehem's) post in the other thread and it looks like the first two numbers are base damage and maximum damage (i.e. (50, 75,...) would do 50 damage but not going over 75 damage). Still, your code would always bring the heroes to 75%: 75 damage with a 75 damage cap. I'd rather see it like (75, 99,...) to never kill them, but able to leave them very crippled.

The first number is the max size of the random number. They actually use the random number twice and sum the results. Theoretically, that'd allow damage from 0 (0 on the first roll, 0 on the second) to 148 (74 on the first, 74 on the second). Any result of over 75 is capped to 75, so it would hit 75% damage quite a lot of the time, though it could potentially do very little (in theory - the practice doesn't seem to be matching the theory at the moment).

For the sake of simplicity - the first number is about the "average" damage that will be caused - it's in the middle as well as being most likely. Any value larger or smaller than it becomes increasingly less likely as it deviates further away. Reducing that to 50 would still allow hits of 75%, though would give a more varied set of damages, generally closer to 50%. The option of capping at 99 is also fine - though a slight breeze will kill the hero after that.

==
I did throw out 65535 random ints into a text file earlier however using the SorenRandNum and it does seem to be suffciently random (stuffed it into excel and checked the counts of each - all within experimental bounds).
 
So, using "dice" notation, doDamage(X, Y, ...) deals 2dX damage, with a maximum of Y? That seems harsh when the numbers are (75, 100, ...); no wonder demonic heroes tend to die so easily to this spell.
 
Yeap, thanks for posting this guys (especially the part about Gela's effect on holy damage, I had completly forgotten about that and I was wondering why the spell hit Hyborem so hard).
 
Back
Top Bottom