MMD_PRC8/_module/nss/use_altar_good.nss
Jaysyn904 adeff59f82 Initial commit
Initial commit.
2024-08-02 23:18:00 -04:00

285 lines
11 KiB
Plaintext

void main()
{
object oPC = GetLastUsedBy();
int iUsed = GetLocalInt(oPC,"usealtargood");
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP, 1.0f, 12.0f));
object oTarget;
oTarget = oPC;
int iRandom = d20(1);
if (iUsed == 1)
{
FloatingTextStringOnCreature("This divine vessel does nothing for you.",oPC);
return;
}
switch(iRandom)
{
case 1:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectAbilityIncrease(ABILITY_CHARISMA, d6(1));
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel more sure of yourself, and more personally powerful.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 2:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectAbilityIncrease(ABILITY_STRENGTH, d6(1));
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("The power of good is harnessed in your muscles.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 3:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectAbilityIncrease(ABILITY_DEXTERITY, d6(1));
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel, somehow, swifter and more agile.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 4:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectAbilityIncrease(ABILITY_CONSTITUTION, d6(1));
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("Your mortality is diminished and you feel very healthy.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 5:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectAbilityIncrease(ABILITY_INTELLIGENCE, d6(1));
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel as though you have become far more intellectual.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 6:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectAbilityIncrease(ABILITY_WISDOM, d6(1));
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel as though you are more enlightened.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 7:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectAttackIncrease(d6(1),ATTACK_BONUS_MISC);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel more aggressive, and your prowess has apparently increased.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 8:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectConcealment(20,MISS_CHANCE_TYPE_NORMAL);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel somewhat ghostly, almost ethereal.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 9:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE,25);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel as though you are more resistant to heat.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 10:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD,25);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel as though you are more resistant to cold.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 11:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_NEGATIVE,25);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("Your body feels as though it is protected from negative energies.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 12:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_ACID,25);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You have been blessed with divine acid resistance.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 13:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_ELECTRICAL,25);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel as if your body is electrified divinely.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 14:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectACIncrease(d6(1));
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel as if you have an aura of protection about you.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 15:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectHaste();
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("The power of good quickens your every step.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 16:
{
int iLevel = GetHitDice(oPC);
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
GiveXPToCreature(oPC,1500 * iLevel);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You have been made more powerful by divine purpose.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
}
case 17:
{
int iLevel = GetHitDice(oPC);
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
GiveXPToCreature(oPC,1000 * iLevel);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You have been made more powerful by divine purpose.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
}
case 18:
{
int iLevel = GetHitDice(oPC);
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
GiveGoldToCreature(oPC,250 * iLevel);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("Gold has been spontaneously created upon your person.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
}
case 19:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectSavingThrowIncrease(SAVING_THROW_ALL,d6(1),SAVING_THROW_TYPE_ALL);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel an aura of divine protection surrounding you.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
case 20:
{
effect eEffect;
effect eShow = EffectVisualEffect(VFX_FNF_STRIKE_HOLY,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
eEffect = EffectMovementSpeedIncrease(25);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC,"usealtargood",1);
FloatingTextStringOnCreature("You feel more fleet-footed and unhindered.",oPC);
AdjustAlignment(oPC,ALIGNMENT_GOOD,25);
break;
}
}
}