Behind the Idea:
i found my self trapped in the finding of a mana regenerator since i want to be able to fire the skull more than once like any other spell since you obviously fight more than one opponent when you've reached that level, it brings instant death to any mortal opponents (but not dragons)
sometimes its 666 damage is not enough and leaves just a few hp left of them(like one of the militia gate guards, who has 740 hp, not to mention the immortality on top of that)
so i don't count it as a super spell due to when i have 300 mana i could use the fire rain a couple of times and do way more damage since it upon fire does 500 damage, not to mention if you get a hold of the scrolls you can fire it with just a loss of 5 mana.
How to make it:
how do you make the skull(Cry of the Dead ingame code: insert itru_skull) to not deplete ALL mana?
first, open up the script(Spell_Skull.d - located in the AI\Magic\Spells):
Code:
const int SPL_Cost_Skull = 250;
const int SPL_Damage_Skull = 666;
instance Spell_Skull(C_Spell_Proto)
{
time_per_mana = 0;
damage_per_level = SPL_Damage_Skull;
damagetype = DAM_MAGIC;
targetCollectAlgo = TARGET_COLLECT_FOCUS_FALLBACK_NONE;
};
func int Spell_Logic_Skull(var int manaInvested)
{
if(Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll))
{
return SPL_SENDCAST;
}
else if(self.attribute[ATR_MANA] >= SPL_Cost_Skull)
{
return SPL_SENDCAST;
}
else
{
return SPL_SENDSTOP;
};
};
func void Spell_Cast_Skull()
{
if(Npc_GetActiveSpellIsScroll(self))
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Scroll;
}
else
{
self.attribute[ATR_MANA] = 0;
};
self.aivar[AIV_SelectSpell] += 1;
};
It says that it requires 250 mana:
Code:
const int SPL_Cost_Skull = 250;
But then uses all mana, here's why
Take another look in the code about the cast action and compare it with a different spell (i chose the firebolt spell for simplicity)
Skull(Cry of the Dead):
Code:
func void Spell_Cast_Skull()
{
if(Npc_GetActiveSpellIsScroll(self))
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Scroll;
}
else
{
self.attribute[ATR_MANA] = 0;
};
self.aivar[AIV_SelectSpell] += 1;
};
Firebolt:
Code:
func void Spell_Cast_Firebolt()
{
if(Npc_GetActiveSpellIsScroll(self))
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Scroll;
}
else
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Firebolt;
};
self.aivar[AIV_SelectSpell] += 1;
};
The only difference is the else statement when the cast is not from a Scroll.
Code:
self.attribute[ATR_MANA] = 0;
Sets the attribute mana to 0
while
Code:
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Firebolt;
Sets the attribute mana to what it was minus the mana cost of the spell
So just change the
Code:
self.attribute[ATR_MANA] = 0;
to
Code:
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Skull;
And the Skull(Cry of the Dead) Should no-longer deplete all mana, instead just use up 250.
Hope this helps.