31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Name x2_def_ondamage
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Default OnDamaged script
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Keith Warner
|
|
//:: Created On: June 11/03
|
|
//:://////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
int iRoll = Random(100) +1;
|
|
object oDamager = GetLastDamager(OBJECT_SELF);
|
|
if(iRoll >= 95)
|
|
{
|
|
if(GetTag(OBJECT_SELF) == "ba2_dagotph3")
|
|
{
|
|
ActionCastSpellAtObject(SPELL_BLADE_BARRIER, oDamager, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
|
|
ActionCastSpellAtObject(SPELL_WORD_OF_FAITH, oDamager, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
|
|
}
|
|
else
|
|
{
|
|
ActionCastSpellAtObject(SPELL_BLADE_BARRIER, oDamager, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
|
|
}
|
|
}
|
|
ExecuteScript("nw_c2_default6", OBJECT_SELF);
|
|
}
|