Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
48 lines
1.7 KiB
Plaintext
48 lines
1.7 KiB
Plaintext
int GetHasProtection(object oPC)
|
|
{
|
|
// check to see if the PC already has a similar bonus
|
|
// to stop them stacking loads of attack bonuses for
|
|
// example by multiple praying at the same shrine
|
|
effect eEff = GetFirstEffect(oPC);
|
|
while (GetIsEffectValid(eEff)) {
|
|
if (GetEffectType(eEff) == EFFECT_TYPE_CONCEALMENT)
|
|
return TRUE;
|
|
eEff = GetNextEffect(oPC);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
// Get the PC who is praying
|
|
object oPC = GetLastUsedBy();
|
|
if (!GetIsObjectValid(oPC))
|
|
return;
|
|
|
|
// Don't reapply if we're already protected
|
|
if (GetHasProtection(oPC))
|
|
return;
|
|
|
|
// define the benefits of praying at this altar
|
|
effect eBless1 = EffectConcealment(20,MISS_CHANCE_TYPE_VS_MELEE);
|
|
effect eBless2 = EffectConcealment(40,MISS_CHANCE_TYPE_VS_RANGED);
|
|
effect eVis = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
|
|
|
|
//Link the visual and the damage reduction effect
|
|
//delayed to ensure praying has finished
|
|
//string all the first bless effect and the visible
|
|
//effect together, then link any additonal Blesses with
|
|
//the link (see commented out example)
|
|
effect eLink = EffectLinkEffects(eBless1, eVis);
|
|
eLink = EffectLinkEffects(eLink, eBless2);
|
|
//if there was a third blessing
|
|
// eLink = EffectLinkEffects(eLink, eBless3);
|
|
//etc.
|
|
DelayCommand(15.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oPC));
|
|
|
|
//Visual effect of the blessing being received
|
|
//Pick any VFX_FNF from the constants screen
|
|
//(my personal faves, holy strike & meteor storm!!)
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_STRIKE_HOLY),oPC);
|
|
}
|