Aschbourne_PRC8/_module/nss/vamp_gaseous.nss
GetOffMyYarn 69879d6957 Areas and Fixes
Added CCOH and missing areas
Changed some areas to be craftable,
Fixed some on death issues,
Fixed the Gaurd
2024-08-30 11:38:44 -04:00

100 lines
7.1 KiB
Plaintext

void vamp_gaseous(object oPC)
{
PrintString("vamp_gaseous: "+GetName(oPC)+" called script.");
effect eSmoke = EffectVisualEffect(VFX_FNF_SMOKE_PUFF);
effect eVisual = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eSmoke,GetLocation(oPC));
effect ImmunityCritical = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT);
effect Speed = EffectMovementSpeedIncrease(20);
effect AttackDecrease = EffectAttackDecrease(20,ATTACK_BONUS_MISC);
effect DamageReduction = EffectDamageReduction(20, DAMAGE_POWER_PLUS_ONE, 0);
effect TurnResistance = EffectTurnResistanceIncrease(4);
effect DamageResistanceCold = EffectDamageResistance(DAMAGE_TYPE_COLD, 20, 0);
effect DamageResistanceElectrical = EffectDamageResistance(DAMAGE_TYPE_ELECTRICAL, 20, 0);
effect Regenerate = EffectRegenerate(5, 5.0f);
effect ImmunityMind = EffectImmunity(IMMUNITY_TYPE_MIND_SPELLS);
effect ImmunityDisease = EffectImmunity(IMMUNITY_TYPE_DISEASE);
effect ImmunityPoison = EffectImmunity(IMMUNITY_TYPE_POISON);
effect ImmunityDeath = EffectImmunity(IMMUNITY_TYPE_DEATH);
effect ImmunityAbilityDecrease = EffectImmunity(IMMUNITY_TYPE_ABILITY_DECREASE);
effect Darkvision = EffectVisualEffect( VFX_DUR_DARKVISION );
// Old Hak Pak code that broke Hordes' new polymorphs (such as the entire Shifter class)
effect ePolymorph = ExtraordinaryEffect(EffectPolymorph(76));
// SetCreatureAppearanceType will be used instead IF they have died
// or need to rest.
effect eLink = EffectLinkEffects(eVisual, ePolymorph);
PrintString("vamp_gaseous: PermaSpectre["+IntToString(GetCampaignInt("Vampire","PermaSpectre",oPC))+"] is this, currently.");
PrintString("vamp_gaseous: Appearance["+IntToString(GetCampaignInt("Vampire","Appearance",oPC))+"] is this, currently.");
// Vampire "needs to rest" or has died.
if (GetCampaignInt("Vampire", "VampireMustRest", oPC)==1)
{
PrintString("vamp_gaseous: "+GetName(oPC)+" needs to rest or has died, and will be permanently set to a gaseous form.");
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(ImmunityCritical), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(Speed), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(AttackDecrease), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(DamageReduction), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(DamageResistanceCold), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(DamageResistanceElectrical),oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(Darkvision), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(ImmunityAbilityDecrease),oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(ImmunityDeath), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(ImmunityDisease), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(ImmunityMind), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(ImmunityPoison), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(Regenerate), oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(TurnResistance), oPC);
// apply damage-dealing penalties
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(EffectDamageDecrease(-50,DAMAGE_TYPE_BLUDGEONING)),oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(EffectDamageDecrease(-50,DAMAGE_TYPE_PIERCING)),oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(EffectDamageDecrease(-50,DAMAGE_TYPE_SLASHING)),oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(EffectDamageDecrease(-50,DAMAGE_TYPE_MAGICAL)),oPC);
// make him invisible for a moment
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectInvisibility(INVISIBILITY_TYPE_IMPROVED),oPC,RoundsToSeconds(1));
// Old Hak Pak code that broke Hordes' new polymorphs (such as the entire Shifter class)
// ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(eLink), oPC);
// If they have not already been turned into a spectre,
// we need to get their current appearance.
if (GetCampaignInt("Vampire","PermaSpectre",oPC)!=TRUE)
{
// First we get what the Vampire's real appearance type is.
// Until they use their Coffin, this won't be re-set.
// We set a campaign INT to tell that they have been changed.
SetCampaignInt("Vampire","PermaSpectre",TRUE,oPC);
PrintString("vamp_gaseous: PermaSpectre["+IntToString(GetCampaignInt("Vampire","PermaSpectre",oPC))+"] set to TRUE.");
// We set a campaign INT to what their real appearance type is.
SetCampaignInt("Vampire","Appearance",GetAppearanceType(oPC),oPC);
PrintString("vamp_gaseous: Appearance["+IntToString(GetCampaignInt("Vampire","Appearance",oPC))+"] set to original appearance type.");
}
// We set their creature appearance type, unremorsefully.
PrintString("vamp_gaseous: GetAppearanceType was ["+IntToString(GetAppearanceType(oPC))+"] "+GetName(oPC));
SetCreatureAppearanceType(oPC, APPEARANCE_TYPE_SPECTRE);//76); //156 is what APPEARANCE_TYPE_SPECTRE is.
PrintString("vamp_gaseous: GetAppearanceType is now ["+IntToString(GetAppearanceType(oPC))+"] "+GetName(oPC));
}
else
{
PrintString("vamp_gaseous: "+GetName(oPC)+" is polymorphing into a gaseous form.");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ImmunityCritical, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, Speed, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, AttackDecrease, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, DamageReduction, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, DamageResistanceCold, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, DamageResistanceElectrical, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, Darkvision, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ImmunityAbilityDecrease, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ImmunityDeath, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ImmunityDisease, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ImmunityMind, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ImmunityPoison, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, Regenerate, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, TurnResistance, oPC, RoundsToSeconds(12));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, RoundsToSeconds(12));
}
}