generated from Jaysyn/ModuleTemplate
110 lines
5.2 KiB
Plaintext
110 lines
5.2 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Curse Song
|
|
//:: X2_S2_CurseSong
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
This spells applies penalties to all of the
|
|
bard's enemies within 30ft for a set duration of
|
|
10 rounds.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Andrew Nobbs
|
|
//:: Created On: May 16, 2003
|
|
//:://////////////////////////////////////////////
|
|
//:: Last Updated By: Andrew Nobbs May 20, 2003
|
|
#include "inc_cursesong"
|
|
#include "x2_i0_spells"
|
|
|
|
void main()
|
|
{ if (!GetHasFeat(FEAT_BARD_SONGS, OBJECT_SELF))
|
|
{ FloatingTextStrRefOnCreature(85587,OBJECT_SELF); // no more bardsong uses left
|
|
return;
|
|
}
|
|
|
|
if (GetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF))
|
|
{ FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced
|
|
return;
|
|
}
|
|
|
|
//Declare major variables
|
|
int nLevel = GetLevelByClass(CLASS_TYPE_BARD);
|
|
int nPerform = GetSkillRank(SKILL_PERFORM);
|
|
int nDuration = 10;
|
|
int nSong = GetLocalInt(OBJECT_SELF, "CURSESONG"); //Determine what song
|
|
|
|
//Special Level Bonus
|
|
int nBonus = GetLocalInt(OBJECT_SELF, "BARDCASTERBONUS");
|
|
if(nBonus>0) nLevel = nLevel + nBonus;
|
|
|
|
if(GetHasFeat(870)) nDuration *= 10; //X2 Lasting Inspiration(10x duration)
|
|
if(GetHasFeat(424)) nDuration += 5; //X0 Lingering Song(+5 rounds)
|
|
|
|
//Determine Song Strength
|
|
int nSongStrength = 0;
|
|
if (nPerform >= 100 && nLevel >= 30) nSongStrength = 23;
|
|
else if(nPerform >= 95 && nLevel >= 29) nSongStrength = 22;
|
|
else if(nPerform >= 90 && nLevel >= 28) nSongStrength = 21;
|
|
else if(nPerform >= 85 && nLevel >= 27) nSongStrength = 20;
|
|
else if(nPerform >= 80 && nLevel >= 26) nSongStrength = 19;
|
|
else if(nPerform >= 75 && nLevel >= 25) nSongStrength = 18;
|
|
else if(nPerform >= 70 && nLevel >= 24) nSongStrength = 17;
|
|
else if(nPerform >= 65 && nLevel >= 23) nSongStrength = 16;
|
|
else if(nPerform >= 60 && nLevel >= 22) nSongStrength = 15;
|
|
else if(nPerform >= 55 && nLevel >= 21) nSongStrength = 14;
|
|
else if(nPerform >= 50 && nLevel >= 20) nSongStrength = 13;
|
|
else if(nPerform >= 45 && nLevel >= 19) nSongStrength = 12;
|
|
else if(nPerform >= 40 && nLevel >= 18) nSongStrength = 11;
|
|
else if(nPerform >= 35 && nLevel >= 17) nSongStrength = 10;
|
|
else if(nPerform >= 30 && nLevel >= 16) nSongStrength = 9;
|
|
else if(nPerform >= 24 && nLevel >= 15) nSongStrength = 8;
|
|
else if(nPerform >= 21 && nLevel >= 14) nSongStrength = 7;
|
|
else if(nPerform >= 18 && nLevel >= 11) nSongStrength = 6;
|
|
else if(nPerform >= 15 && nLevel >= 8) nSongStrength = 5;
|
|
else if(nPerform >= 12 && nLevel >= 6) nSongStrength = 4;
|
|
else if(nPerform >= 9 && nLevel >= 3) nSongStrength = 3;
|
|
else if(nPerform >= 6 && nLevel >= 2) nSongStrength = 2;
|
|
else if(nPerform >= 3 && nLevel >= 1) nSongStrength = 1;
|
|
|
|
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
|
|
|
//Curse Song - Default Bioware Song
|
|
if(nSong==0) SongCurse(OBJECT_SELF, nSongStrength, nDuration);
|
|
//Revealing Melody - Invisibility Revealed... hide/move silent penalty
|
|
else if(nSong==1)
|
|
{ SongReveal(OBJECT_SELF, nSongStrength, nDuration, nPerform);
|
|
eFNF = EffectVisualEffect(471);
|
|
}
|
|
//Fortissimo - Sonic Immunity: Decrease (Max 70%)
|
|
else if(nSong==2) SongEleWeak(OBJECT_SELF, nSongStrength, nDuration, DAMAGE_TYPE_SONIC, VFX_IMP_SONIC);
|
|
//Jarring Tune - Spell caster must make concentration check or fail spell
|
|
else if(nSong==3) SongJarring(OBJECT_SELF, nSongStrength, nDuration, nPerform);
|
|
//Discordant Air - Enemy Weapons recieve enhancement penalty
|
|
else if(nSong==4)
|
|
{ SongDiscord(OBJECT_SELF, nSongStrength, nDuration);
|
|
eFNF = EffectVisualEffect(471);
|
|
}
|
|
//Insidious Rhythm - Spell Failure
|
|
else if(nSong==5) SongInsidious(OBJECT_SELF, nSongStrength, nDuration, nPerform);
|
|
//Unceremonius Rhapsody - Increasing Amounts of Damage
|
|
else if(nSong==6) SongRhapsody(OBJECT_SELF, nSongStrength);
|
|
//Calumny - Blackens the name of the first hostile creature making others attack them
|
|
else if(nSong==7) SongCalumny(OBJECT_SELF, nSongStrength, nDuration);
|
|
//Elemental Weaken Series - Elemental Immunity: Decrease (Max 70%)
|
|
else if(nSong==8) SongEleWeak(OBJECT_SELF, nSongStrength, nDuration, DAMAGE_TYPE_FIRE, VFX_IMP_FLAME_S);
|
|
else if(nSong==9) SongEleWeak(OBJECT_SELF, nSongStrength, nDuration, DAMAGE_TYPE_COLD, VFX_IMP_FROST_S);
|
|
else if(nSong==10) SongEleWeak(OBJECT_SELF, nSongStrength, nDuration, DAMAGE_TYPE_ELECTRICAL, VFX_IMP_LIGHTNING_S);
|
|
else if(nSong==11) SongEleWeak(OBJECT_SELF, nSongStrength, nDuration, DAMAGE_TYPE_ACID, VFX_IMP_ACID_S);
|
|
else if(nSong==12) SongEleWeak(OBJECT_SELF, nSongStrength, nDuration, DAMAGE_TYPE_DIVINE, VFX_IMP_SUNSTRIKE);
|
|
else if(nSong==13) SongEleWeak(OBJECT_SELF, nSongStrength, nDuration, DAMAGE_TYPE_NEGATIVE, VFX_IMP_NEGATIVE_ENERGY);
|
|
//Spell Resist Decrease (23 Max)
|
|
else if(nSong==14) SongSResist(OBJECT_SELF, nSongStrength, nDuration);
|
|
//Turn Resist Decrease (11 Max)
|
|
else if(nSong==15) SongTResist(OBJECT_SELF, nSongStrength, nDuration);
|
|
//Crazy Farm - All Creatures have chance to turn into animal (DC 4+SongStrength)
|
|
else if(nSong==16) SongCrazyFarm(OBJECT_SELF, nSongStrength, nDuration);
|
|
//
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF));
|
|
}
|