Continued
void SongRhapsody(object oPC, int nSongStrength)
{ int nCount = GetLocalInt(oPC, "RHAPSODYCOUNT");
if(nCount==0)
{ SetLocalInt(oPC, "RHAPSODYCOUNT", 1);
DelayCommand(RoundsToSeconds(nSongStrength), DeleteLocalInt(oPC, "RHAPSODYCOUNT"));
nCount++;
}
else
{ nCount++;
SetLocalInt(oPC, "RHAPSODYCOUNT", nCount);
}
int nDC = 8;
if(nCount<=5) nDC = 8 + nCount*4; //+4 has DC 24
else if(nCount<=10) nDC = 12 + nCount*5; //+9 has DC 57
else if(nCount<=15) nDC = 16 + nCount*6; //+14 has DC 100
else if(nCount<=20) nDC = 20 + nCount*7; //+19 has DC 153
else nDC = 24 + nCount*8;
string sPronoun = "her";
if(GetGender(oPC)==GENDER_MALE) sPronoun="his";
if(!GetIsSkillSuccessful(oPC, SKILL_PERFORM, nDC)) //Failed
{ FloatingTextStringOnCreature(GetName(oPC)+"'s voice cracks!", oPC, FALSE);
DeleteLocalInt(oPC, "RHAPSODYCOUNT");
effect eSilence = EffectSilence();
effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEUTRAL);
eSilence = EffectLinkEffects(eSilence, eVis2);
eSilence = ExtraordinaryEffect(eSilence);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSilence, oPC, RoundsToSeconds(10));
return;
}
else
{ FloatingTextStringOnCreature(GetName(oPC)+" raises "+sPronoun+" song's volume to "+IntToString(nCount)+"!", oPC, FALSE);
}
//Bonuses Here
effect eDamage;
//Visuals
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
effect eImpact = EffectVisualEffect(302);
effect eVis2 = EffectVisualEffect(507); //BardSong VFX2
//Loop
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ eVis2 = ExtraordinaryEffect(eVis2);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oPC, RoundsToSeconds(1));
}
float fDelay;
while(GetIsObjectValid(oTarget))
{ if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oPC))
{ // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song
if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
{ if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ //Damage Here
eDamage = EffectDamage(d6(nCount), DAMAGE_TYPE_SONIC);
eDamage = ExtraordinaryEffect(eDamage);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
}
else //Target is Deaf, VFX
{ ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
}
//Non Deaf Dependant Damage Here
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
}
DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
}
void SongCalumny(object oPC, int nSongStrength, int nDuration)
{ //Visuals
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_SONIC);
effect eImpact = EffectVisualEffect(VFX_IMP_CHARM);
effect eVis2 = EffectVisualEffect(507); //BardSong VFX2
//Setup Variables
object oSlander;
int nCount = 10, nPCCha, nFail, nDC1;
nPCCha = GetAbilityModifier(ABILITY_CHARISMA, oPC) +nSongStrength +d20(1);
//Loop
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ eVis2 = ExtraordinaryEffect(eVis2);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oPC, RoundsToSeconds(1));
}
float fDelay;
while(GetIsObjectValid(oTarget)&& nFail!=1)
{ if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oPC))
{ // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song
if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
{ if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ if(!GetIsObjectValid(oSlander)) //First Target
{ nDC1 = GetAbilityModifier(ABILITY_CHARISMA, oTarget) + GetHitDice(oTarget) + d20(1);
string sGender = "his";
if(GetGender(OBJECT_SELF)==GENDER_FEMALE) sGender = "her";
FloatingTextStringOnCreature("Charisma: "+GetName(oPC)+" attempts to throw "+sGender+" voice!", oPC);
if(nPCCha>=nDC1) //Success beating CHA
{ oSlander = oTarget;
DelayCommand(0.5, SlanderString(oSlander));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
}
else //Failure to beat CHA
{ nFail=1;
DelayCommand(0.5, FloatingTextStringOnCreature("Charisma: Failure!", oPC));
}
}
else //Other Targets + Slander valid
{ nCount = nCount + 4 + GetHitDice(oTarget)/2; //DC increases by HD/2 of each creature
SetLocalInt(oTarget, "SLANDERTHEM", 1);
}
}
}
else //Target is Deaf, VFX
{ ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
}
//Non Deaf Dependant Damage Here
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
}
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
if(nFail!=1)
{ if(nCount>10)
{ if(GetIsSkillSuccessful(oPC, SKILL_PERFORM, nCount))
{ while(GetIsObjectValid(oTarget))
{ if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oPC))
{ if(GetLocalInt(oTarget, "SLANDERTHEM")==1)
{ SetIsTemporaryEnemy(oSlander, oTarget, TRUE, RoundsToSeconds(nDuration+10));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
AssignCommand(oTarget, ClearAllActions());
AssignCommand(oTarget, ActionAttack(oSlander));
RespondString(oTarget);
}
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
}
}
else DelayCommand(1.5, AssignCommand(oSlander, SpeakString("WHO DID THAT?!")));
}
}
DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
}
void SongEleWeak(object oPC, int nSongStrength, int nDuration, int nType = DAMAGE_TYPE_FIRE, int nVFX = VFX_IMP_SONIC)
{ //Penalties Here
int nPenalty = 2*nSongStrength +6; //+2% Per Level
if(nSongStrength>=13) nPenalty = nPenalty + nSongStrength-12; //+3% Per Level after 20
if(nSongStrength>=18) nPenalty = nPenalty + nSongStrength-17; //+4% Per Level after 25
if(nSongStrength>=23) nPenalty = nPenalty + 1; //+5% Per Level at 30 (70% Total Bonus)
effect ePenalty = EffectDamageImmunityDecrease(nType, nPenalty);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(ePenalty, eDur);
eLink = ExtraordinaryEffect(eLink);
//Visuals
effect eVis = EffectVisualEffect(nVFX);
effect eVis2 = EffectVisualEffect(507); //BardSong VFX2
//Loop
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ eVis2 = ExtraordinaryEffect(eVis2);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oPC, RoundsToSeconds(nDuration));
}
float fDelay;
while(GetIsObjectValid(oTarget))
{ if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oPC))
{ // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song
if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
{ if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ //Damage Here
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
}
else //Target is Deaf, VFX
{ ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
}
//Non Deaf Dependant Damage Here
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
}
DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
}
void SongSResist(object oPC, int nSongStrength, int nDuration, int nVFX = VFX_IMP_SILENCE)
{ //Penalties Here
effect ePenalty = EffectSpellResistanceDecrease(nSongStrength);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(ePenalty, eDur);
eLink = ExtraordinaryEffect(eLink);
//Visuals
effect eVis = EffectVisualEffect(nVFX);
effect eVis2 = EffectVisualEffect(507); //BardSong VFX2
//Loop
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ eVis2 = ExtraordinaryEffect(eVis2);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oPC, RoundsToSeconds(nDuration));
}
float fDelay;
while(GetIsObjectValid(oTarget))
{ if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oPC))
{ // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song
if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
{ if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ //Damage Here
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
}
else //Target is Deaf, VFX
{ ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
}
//Non Deaf Dependant Damage Here
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
}
DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
}
void SongTResist(object oPC, int nSongStrength, int nDuration, int nVFX = VFX_IMP_MAGBLUE)
{ //Penalties Here
nSongStrength++;
effect ePenalty = EffectTurnResistanceDecrease(nSongStrength/2);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(ePenalty, eDur);
eLink = ExtraordinaryEffect(eLink);
//Visuals
effect eVis = EffectVisualEffect(nVFX);
effect eVis2 = EffectVisualEffect(507); //BardSong VFX2
//Loop
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ eVis2 = ExtraordinaryEffect(eVis2);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oPC, RoundsToSeconds(nDuration));
}
float fDelay;
while(GetIsObjectValid(oTarget))
{ if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oPC))
{ // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song
if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
{ if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ //Damage Here
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
}
else //Target is Deaf, VFX
{ ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
}
//Non Deaf Dependant Damage Here
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
}
DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
}
void SongCrazyFarm(object oPC, int nSongStrength, int nDuration)
{ //Penalties Here
int nDC = 4 + nSongStrength;
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_CHICKEN, TRUE);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink; // = EffectLinkEffects(ePoly, eDur);
//eLink = ExtraordinaryEffect(eLink);
//Visuals
effect eVis = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M);
effect eImpact = EffectVisualEffect(49);
effect eVis2 = EffectVisualEffect(507); //BardSong VFX2
//Loop
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ eVis2 = ExtraordinaryEffect(eVis2);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oPC, RoundsToSeconds(nDuration));
}
float fDelay;
while(GetIsObjectValid(oTarget))
{ if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oPC))
{ // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song
if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
{ if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget))
{ //Damage Here
if(!WillSave(oTarget, nDC, SAVING_THROW_TYPE_SPELL))
{ ePoly = EffectPolymorph(RandomAnimal(Random(16)), TRUE);
eLink = EffectLinkEffects(ePoly, eDur);
eLink = ExtraordinaryEffect(eLink);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
}
}
else //Target is Deaf, VFX
{ ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
}
//Non Deaf Dependant Damage Here
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
}
DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
}