Making individual creatures immune to on-hit slay
Looking for advice on how to make an individual creature immune to on-hit slay.... is this an option in the toolset or does it need to be done via scripting?? I know there is a fortitude save but no matter how high a *1* still works... so how do i make it immune to on-hit slay period??
thanks
thanks
0
Comments
If that doesn't work (the wiki says it won't, weird) could you try to replace the on-hit property with something else - maybe On Hit-Cast Spell-Unique Power and then script it?
do you mean replace on-hit slay on the item in question? if so id like to avoid that... To be clear the item is dragon slaying arrows with on-hit slay for dragons... id only like 2 dragons to be immune to the on-hit slay, the other dragons id like to be 'slay-able"
obviously it has some drawbacks such as making that dragon to be immune to all disable effects and devastating critical as well, but if that should be a real boss it might not be such a big deal
As for the question, one way way to solve this would be to replace On Hit: Slay Racial Type with On Hit Cast Spell: Unique Power, and scripting it so that it mimics On Hit Slay Racial Type while excluding the people you want immune. I've written a script for it below, which worked in my testing. To use it, you'll need to put a script in your module that is named what your item's tag is and make sure that Tag Based Scripting is enabled in your module.
EDIT: It occurs to me that On Hit Slay Racial Type doesn't have a random chance to activate associated with it, but it should be easy enough to make it 100% chance to activate either by setting the value of nChance to 0 or by simply removing the check for nChance entirely.
//Mimics On Hit Slay Racial Type void main() { object oItem = GetSpellCastItem(); object oPC = GetItemPossessor(oItem); object oTarget = GetSpellTargetObject(); //Change random size for increased or decreased chances. Default is 4, or 25% chance. int nChance = Random(4); if (nChance == 0) { //Change RACIAL_TYPE_DRAGON to whatever race you wish to be at risk of death. //Replace "dc_draco" and "dc_bob" with the tag of the creature you want to be immune. //If you wish for more creatures to be immune, add additional && statements. if ((GetRacialType(oTarget) == RACIAL_TYPE_DRAGON) && (GetTag(oTarget) != "dc_draco") && (GetTag(oTarget) != "dc_bob")) { //Change nDC to whatever value you want, I guess. int nDC = 14; //Change SAVING_THROW_TYPE_NONE to SAVING_THROW_TYPE_DEATH if you want immunity to Death Magic to protect the target from death. int nFort = FortitudeSave(oTarget, nDC, SAVING_THROW_TYPE_NONE, oPC); if (nFort == 0) { effect eDeath = EffectDeath(); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget); } } } }