Bard Songs



  • Here is the current code on Bard Songs. If someone with time can translate this so people can get a text description of how the songs work that would be great. I simply do not have the time to do it all.

    void SongSharp(object oPC, int nSongStrength, int nDuration)
    { itemproperty iKeen = ItemPropertyKeen();
    
      effect eImpact = EffectVisualEffect(46);
      effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
      effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEUTRAL);
      eVis = EffectLinkEffects(eVis, eVis2);
      eVis = ExtraordinaryEffect(eVis);
      eVis2 = ExtraordinaryEffect(eVis2);
    
      //Define Vars Here
      object oWeapon, oOffhand;
    
      object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      while(GetIsObjectValid(oTarget) && nSongStrength>0)
      { if(!GetHasFeatEffect(FEAT_BARD_SONGS, oTarget) && !GetHasSpellEffect(GetSpellId(),oTarget))
        { // * GZ Oct 2003: If we are silenced, we can not benefit from bard song
          if (!GetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
          { if(oTarget == oPC)
            { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(nDuration));
              //Bonus Here
              oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oTarget);
              oOffhand = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oTarget);
              if(GetIsObjectValid(oWeapon) && GetPierceSlash(oWeapon))
              { IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
                nSongStrength--;
                if(GetIsPC(oTarget)) SendMessageToPC(oTarget, "Your "+GetName(oWeapon)+" resonates with the music.");
                ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
              }
              if(GetIsObjectValid(oOffhand) && GetPierceSlash(oWeapon))
              { IPSafeAddItemProperty(oOffhand, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
                nSongStrength--;
              }
            }
            else if(GetIsFriend(oTarget))
            { ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
              //Bonus Here
              oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oTarget);
              oOffhand = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oTarget);
              if(GetIsObjectValid(oWeapon) && GetPierceSlash(oWeapon))
              { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oTarget, RoundsToSeconds(nDuration));
                IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
                nSongStrength--;
                ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
                if(GetIsPC(oTarget)) SendMessageToPC(oTarget, "Your "+GetName(oWeapon)+" resonates with the music.");
              }
              if(GetIsObjectValid(oOffhand) && GetPierceSlash(oWeapon))
              { IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
                nSongStrength--;
              }
            }
          }
        }
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      }
    }
    
    void SongCrescendo(object oPC, int nSongStrength, int nDuration)
    { effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
      effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
    
      if(nDuration>20) nDuration = 6;
      else if(nDuration>10) nDuration = 3;
      else nDuration = 2;
    
      int nCount = GetLocalInt(oPC, "CRESCENDOCOUNT");
      if(nCount==0)
      { SetLocalInt(oPC, "CRESCENDOCOUNT", 1);
        DelayCommand(RoundsToSeconds(nDuration*nSongStrength), DeleteLocalInt(oPC, "CRESCENDOCOUNT"));
        nCount++;
      }
      else
      { nCount++;
        SetLocalInt(oPC, "CRESCENDOCOUNT", nCount);
      }
    
      int nDC = 8;
      if(nCount=4) nAC = nSongStrength-3;
      else
      { FloatingTextStringOnCreature("You try to sing the song, but the words tangle in your mouth.", oPC);
        return;
      }
    
      effect eAC;
      if(nAC>4) eAC = EffectACIncrease(nAC, AC_DEFLECTION_BONUS);
      else if(nAC>0)  eAC = EffectACIncrease(nAC, AC_DODGE_BONUS);
      eAC = VersusAlignmentEffect(eAC,ALIGNMENT_ALL, ALIGNMENT_EVIL);
    
      effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
      eAC = EffectLinkEffects(eAC, eDur);
      eAC = ExtraordinaryEffect(eAC);
    
      //Define Vars Here
    
      object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      while(GetIsObjectValid(oTarget))
      { if(!GetHasFeatEffect(FEAT_BARD_SONGS, oTarget) && !GetHasSpellEffect(GetSpellId(),oTarget))
        { // * GZ Oct 2003: If we are silenced, we can not benefit from bard song
          if (!GetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
          { if(oTarget == oPC)
            { //Bonus Here
              effect eBardLinked = EffectLinkEffects(eAC, eVis);
              eBardLinked = ExtraordinaryEffect(eBardLinked);
              ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBardLinked, oTarget, RoundsToSeconds(nDuration));
              ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
            }
            else if(GetIsFriend(oTarget) && GetAlignmentGoodEvil(oTarget)==ALIGNMENT_GOOD)
            { ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
              //Bonus Here
              ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAC, oTarget, RoundsToSeconds(nDuration));
            }
          }
        }
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      }
    }
    
    void SongThrenody(object oPC, int nSongStrength, int nDuration)
    { effect eImpact = EffectVisualEffect(VFX_IMP_EVIL_HELP);
      effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
    
      //Bonuses Here
      int nAC = 0;
      if(nSongStrength>=4) nAC = nSongStrength-3;
      else
      { FloatingTextStringOnCreature("You try to sing the song, but the words tangle in your mouth.", oPC);
        return;
      }
      effect eAC;
      if(nAC>4) eAC = EffectACIncrease(nAC, AC_DEFLECTION_BONUS);
      else if(nAC>0)  eAC = EffectACIncrease(nAC, AC_DODGE_BONUS);
      eAC = VersusAlignmentEffect(eAC, ALIGNMENT_ALL, ALIGNMENT_GOOD);
    
      effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
      eAC = EffectLinkEffects(eAC, eDur);
      eAC = ExtraordinaryEffect(eAC);
    
      //Define Vars Here
    
      object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      while(GetIsObjectValid(oTarget))
      { if(!GetHasFeatEffect(FEAT_BARD_SONGS, oTarget) && !GetHasSpellEffect(GetSpellId(),oTarget))
        { // * GZ Oct 2003: If we are silenced, we can not benefit from bard song
          if (!GetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
          { if(oTarget == oPC)
            { //Bonus Here
              effect eBardLinked = EffectLinkEffects(eAC, eVis);
              eBardLinked = ExtraordinaryEffect(eBardLinked);
              ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBardLinked, oTarget, RoundsToSeconds(nDuration));
              ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
            }
            else if(GetIsFriend(oTarget) && GetAlignmentGoodEvil(oTarget)==ALIGNMENT_EVIL)
            { ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
              //Bonus Here
              ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAC, oTarget, RoundsToSeconds(nDuration));
            }
          }
        }
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      }
    }
    
    void SongRage(object oPC)
    { effect eImpact = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
      effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
    
      //Bonuses Here
      int nSave = 2;
      int nIncrease = 4;
    
      effect eStr = EffectAbilityIncrease(ABILITY_CONSTITUTION, nIncrease);
      effect eCon = EffectAbilityIncrease(ABILITY_STRENGTH, nIncrease);
      effect eSave = EffectSavingThrowIncrease(SAVING_THROW_WILL, nSave);
      effect eAC = EffectACDecrease(2, AC_DODGE_BONUS);
    
      effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
      effect eLink = EffectLinkEffects(eCon, eStr);
      eLink = EffectLinkEffects(eLink, eSave);
      eLink = EffectLinkEffects(eLink, eAC);
      eLink = EffectLinkEffects(eLink, eDur);
      eLink = ExtraordinaryEffect(eLink);
    
      int nCon;
    
      object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      while(GetIsObjectValid(oTarget))
      { if(!GetHasFeatEffect(FEAT_BARD_SONGS, oTarget) && !GetHasSpellEffect(GetSpellId(),oTarget))
        { // * GZ Oct 2003: If we are silenced, we can not benefit from bard song
          if (!GetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
          { if(oTarget == oPC)
            { //Bonus Here
              ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(10));
            }
            else if(GetIsFriend(oTarget))
            { ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
              //Bonus Here
              nCon = 5 + GetAbilityModifier(ABILITY_CONSTITUTION, oTarget);
              if(nCon>10) nCon = 10;
              AssignCommand(oTarget, PlayVoiceChat(VOICE_CHAT_BATTLECRY1));
              ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCon));
            }
          }
        }
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      }
    }
    
    void SongEleWeap(object oPC, int nSongStrength, int nDuration, int nType = IP_CONST_DAMAGETYPE_FIRE)
    { int nBonus;
      if(nSongStrength=13) nBonus = nBonus + nSongStrength-12; //+3% Per Level after 20
      if(nSongStrength>=18) nBonus = nBonus + nSongStrength-17; //+4% Per Level after 25
      if(nSongStrength>=23) nBonus = nBonus + 1;                //+5% Per Level at 30 (70% Total Bonus)
    
      effect eImpact = EffectVisualEffect(nVFX);
      effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
    
      //Bonuses Here
      effect eBonus = EffectDamageImmunityIncrease(nType, nBonus);
      effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEUTRAL);
      eBonus = EffectLinkEffects(eBonus, eDur);
      eBonus = ExtraordinaryEffect(eBonus);
    
      //Define Vars Here
    
      object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      while(GetIsObjectValid(oTarget))
      { if(!GetHasFeatEffect(FEAT_BARD_SONGS, oTarget) && !GetHasSpellEffect(GetSpellId(),oTarget))
        { // * GZ Oct 2003: If we are silenced, we can not benefit from bard song
          if (!GetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
          { if(oTarget == oPC)
            { //Bonus Here
              effect eBardLinked = EffectLinkEffects(eBonus, eVis);
              eBardLinked = ExtraordinaryEffect(eBardLinked);
              ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBardLinked, oTarget, RoundsToSeconds(nDuration));
              ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
            }
            else if(GetIsFriend(oTarget))
            { ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
              //Bonus Here
              ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBonus, oTarget, RoundsToSeconds(nDuration));
            }
          }
        }
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      }
    }
    
    void SongRegen(object oPC, int nSongStrength, int nDuration)
    { effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_HEAL);
      effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
    
      int nHealBonus = GetSkillRank(SKILL_HEAL); //Heal Skill bonus 1HP per 5 skill
      if(nHealBonus>=5) nHealBonus=nHealBonus/5;
      else nHealBonus = 0;
    
      if(nHealBonus>nSongStrength) nHealBonus=nSongStrength; //HealSkill cannot exceed songlevel
      if(nHealBonus =10)
     {switch(nRandom)
      { case 0: sResult="Damn, if only all your mother's were as good as your sisters!"; break;
        case 1: sResult="When the gods gave you all teeth, he spoiled some bloody good arses!"; break;
        case 2: sResult="Idiots! Think I'm getting smart with you? How would you even know?!"; break;
        case 3: sResult="If assholes were ships, this place would be a bloody port."; break;
        case 4: sResult="I'd ask how old ya'll are, but none of ya can count that high!"; break;
        case 5: sResult="*mumbles* Never underestimate the power of stupid people in large groups."; break;
        case 6: sResult="If any of ya get captured, go ahead and tell all ya know... since it'd only take 10 seconds."; break;
      }
     }
     else
     {switch(nRandom)
      { case 0: sResult="Idiots all! Me want to smash!"; break;
        case 1: sResult="I surrounded by dumbasses!"; break;
        case 2: sResult="I want to smash... erm... that guy!"; break;
        case 3: sResult="GROAAARGHH!!! KILL ALL!."; break;
        case 4: sResult="Me counts higher than all of you!"; break;
        case 5: sResult="Too many stupid people."; break;
        case 6: sResult="I will make you all my lovers!"; break;
      }
     }
    
      AssignCommand(oTarget, SpeakString(sResult));
      return;
    }
    
    void RespondString(object oTarget)
    { int nRandom = d6(1);
      string sResult;
      int nLevel = GetSpeakLevel(oTarget);
     if(nLevel==0)
     { sResult = "*growls*";
     }
     else if(nLevel==2)  //Aberation/Elemental
     {nRandom = d2(1);
      switch(nRandom)
      { case 1: sResult = "Ghizoecrau ecruy!"; break;
        case 2: sResult = "HIDUZ ZOKEFIF!!!"; break;
      }
     }
     else if(nLevel==3) //Fae
     {nRandom = d2(1);
      switch(nRandom)
      { case 1: sResult = "Tefuruy vu tor?!"; break;
        case 2: sResult = "Wedizad axi!"; break;
      }
     }
     else if(nLevel==4) //Construct
     {nRandom = d4(1);
      switch(nRandom)
      { case 1: sResult = "Enemy identified!"; break;
        case 2: sResult = ""; break;
        case 3: sResult = ""; break;
        case 4: sResult = ""; break;
      }
     }
     else if(nLevel==5)//Undead
     {nRandom = d2(1);
      switch(nRandom)
      { case 1: sResult = "You will die for that!"; break;
        case 2: sResult = "The last words from you!"; break;
      }
     }
     else
     {switch(nRandom)
      { case 1: sResult = "What was that?!"; break;
        case 2: sResult = "WHY YOU!"; break;
        case 3: sResult = "Say that again!!"; break;
        case 4: sResult = "Eat steel smartass!"; break;
        case 5: sResult = "I HAVE HAD IT WITH YOU!"; break;
        case 6: sResult = "THAT IS IT!"; break;
      }
     }
    
     if(sResult!="") AssignCommand(oTarget, SpeakString(sResult));
    return;
    }
    
    //////////////////////////////////////////////////
    
    //Default Bioware Cursesong
    void SongCurse(object oPC, int nSongStrength, int nDuration)
    { int nAttack, nDamage, nWill, nFort, nReflex, nHP, nAC, nSkill;
    
      if(nSongStrength==23)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 48;
        nAC = 7;
        nSkill = 19;
      }
      else if(nSongStrength==22)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 46;
        nAC = 6;
        nSkill = 18;
      }
      else if(nSongStrength==21)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 44;
        nAC = 6;
        nSkill = 17;
      }
      else if(nSongStrength==20)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 42;
        nAC = 6;
        nSkill = 16;
      }
      else if(nSongStrength==19)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 40;
        nAC = 6;
        nSkill = 15;
      }
      else if(nSongStrength==18)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 38;
        nAC = 6;
        nSkill = 14;
      }
      else if(nSongStrength==17)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 36;
        nAC = 5;
        nSkill = 13;
      }
      else if(nSongStrength==16)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 34;
        nAC = 5;
        nSkill = 12;
      }
      else if(nSongStrength==15)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 32;
        nAC = 5;
        nSkill = 11;
      }
      else if(nSongStrength==14)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 30;
        nAC = 5;
        nSkill = 9;
      }
      else if(nSongStrength==13)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 28;
        nAC = 5;
        nSkill = 8;
      }
      else if(nSongStrength==12)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 26;
        nAC = 5;
        nSkill = 7;
      }
      else if(nSongStrength==11)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 24;
        nAC = 5;
        nSkill = 6;
      }
      else if(nSongStrength==10)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 22;
        nAC = 5;
        nSkill = 5;
      }
      else if(nSongStrength==9)
      { nAttack = 2;
        nDamage = 3;
        nWill = 3;
        nFort = 2;
        nReflex = 2;
        nHP = 20;
        nAC = 5;
        nSkill = 4;
      }
      else if(nSongStrength==8)
      { nAttack = 2;
        nDamage = 3;
        nWill = 2;
        nFort = 2;
        nReflex = 2;
        nHP = 16;
        nAC = 4;
        nSkill = 3;
      }
      else if(nSongStrength==7)
      { nAttack = 2;
        nDamage = 3;
        nWill = 1;
        nFort = 1;
        nReflex = 1;
        nHP = 16;
        nAC = 3;
        nSkill = 2;
      }
      else if(nSongStrength==6)
      { nAttack = 2;
        nDamage = 2;
        nWill = 1;
        nFort = 1;
        nReflex = 1;
        nHP = 8;
        nAC = 2;
        nSkill = 2;
      }
      else if(nSongStrength==5)
      { nAttack = 2;
        nDamage = 2;
        nWill = 1;
        nFort = 1;
        nReflex = 1;
        nHP = 8;
        nSkill = 1;
      }
      else if(nSongStrength==4)
      { nAttack = 1;
        nDamage = 2;
        nWill = 1;
        nFort = 1;
        nReflex = 1;
        nSkill = 1;
      }
      else if(nSongStrength==3)
      { nAttack = 1;
        nDamage = 2;
        nWill = 1;
        nFort = 1;
      }
      else if(nSongStrength==2)
      { nAttack = 1;
        nDamage = 1;
        nWill = 1;
      }
      else if(nSongStrength==1)
      { nAttack = 1;
        nDamage = 1;
      }
    
      effect eAttack = EffectAttackDecrease(nAttack);
      effect eDamage = EffectDamageDecrease(nDamage, DAMAGE_TYPE_SLASHING);
      effect eWill, eFort, eReflex, eHP, eAC, eSkill;
      effect eLink = EffectLinkEffects(eAttack, eDamage);
      if(nWill > 0)
      { eWill = EffectSavingThrowDecrease(SAVING_THROW_WILL, nWill);
        eLink = EffectLinkEffects(eLink, eWill);
      }
      if(nFort > 0)
      { eFort = EffectSavingThrowDecrease(SAVING_THROW_FORT, nFort);
        eLink = EffectLinkEffects(eLink, eFort);
      }
      if(nReflex > 0)
      { eReflex = EffectSavingThrowDecrease(SAVING_THROW_REFLEX, nReflex);
        eLink = EffectLinkEffects(eLink, eReflex);
      }
      if(nHP > 0) eHP = EffectDamage(nHP, DAMAGE_TYPE_SONIC, DAMAGE_POWER_NORMAL);
      if(nAC > 0)
      { eAC = EffectACDecrease(nAC, AC_DODGE_BONUS);
        eLink = EffectLinkEffects(eLink, eAC);
      }
      if(nSkill > 0)
      { eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, nSkill);
        eLink = EffectLinkEffects(eLink, eSkill);
      }
      effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
      eLink = EffectLinkEffects(eLink, eDur);
      eHP = ExtraordinaryEffect(eHP);
      eLink = ExtraordinaryEffect(eLink);
    
      effect eVis = EffectVisualEffect(VFX_IMP_DOOM);
      effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC);
      effect eVis2 = EffectVisualEffect(507);
    
      object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
    
      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))
            { if (nHP > 0)
              { ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
                DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHP, oTarget));
              }
    
              if (!GetIsDead(oTarget))
              { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
                DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
              }
            }
          }
          else
          { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
          }
        }
    
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      }
      DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
    }
    
    /*
       All creatures - Hide/Move Silent Penalty = SongLevel + (1/song level>13)
       Invisible Creatures - Concentration vs. Perform or Revealed
    */
    void SongReveal(object oPC, int nSongStrength, int nDuration, int nPerform)
    { //Penalties Here
      int nSkill = nSongStrength;
      if(nSongStrength>=13) nSkill = nSkill + nSongStrength-12; //+2 Per Level after 20
      if(nSongStrength>=18) nSkill = nSkill + nSongStrength-17; //+3 Per Level after 25
      if(nSongStrength>=23) nSkill = nSkill + 1;                //+4 Per Level at 30
    
      effect eSkill = EffectSkillDecrease(SKILL_MOVE_SILENTLY, nSkill);
      effect eSkill2 = EffectSkillDecrease(SKILL_HIDE, nSkill);
      effect eLink = EffectLinkEffects(eSkill, eSkill2);
      eLink = ExtraordinaryEffect(eLink);
    
      //Visuals
      effect eVis = EffectVisualEffect(VFX_IMP_HEAD_ODD);
      effect eImpact = EffectVisualEffect(92);
      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));
              ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
            }
          }
          else //Target is Deaf, VFX
          { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
          }
          //Non Deaf Dependant Damage Here
          if(GetHasSpellEffect(SPELL_IMPROVED_INVISIBILITY, oTarget)
          || GetHasSpellEffect(SPELL_INVISIBILITY, oTarget)
          || GetHasSpellEffect(SPELLABILITY_AS_INVISIBILITY, oTarget)
          || GetHasSpellEffect(SPELLABILITY_AS_IMPROVED_INVISIBLITY))
          { if(!GetIsSkillSuccessful(oTarget, SKILL_CONCENTRATION, nPerform))
            { RemoveAnySpellEffects(SPELL_IMPROVED_INVISIBILITY, oTarget);
              RemoveAnySpellEffects(SPELL_INVISIBILITY, oTarget);
              RemoveAnySpellEffects(SPELLABILITY_AS_INVISIBILITY, oTarget);
              RemoveAnySpellEffects(SPELLABILITY_AS_IMPROVED_INVISIBLITY, oTarget);
            }
          }
          DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
        }
    
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      }
      DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
    }
    
    /*
       Enemy must make Concentration vs. Perform or Fail spells for 1 round
    */
    void SongJarring(object oPC, int nSongStrength, int nDuration, int nPerform)
    { //Penalties Here
      if(nDuration>20) nDuration = 2;
      else nDuration = 1;
    
      effect ePenalty = EffectSpellFailure(100);
      effect eLink = ePenalty;
      eLink = ExtraordinaryEffect(eLink);
    
      //Visuals
      effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
      effect eImpact = EffectVisualEffect(293);
      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(!GetIsSkillSuccessful(oTarget, SKILL_CONCENTRATION, nPerform))
              { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
                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);
    }
    
    /*
       Spell Failure
    */
    void SongInsidious(object oPC, int nSongStrength, int nDuration, int nPerform)
    { //Penalties Here
      int nPenalty = 2*nSongStrength +1; //+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 (65% Total Bonus)
    
      effect ePenalty = EffectSpellFailure(nPenalty);
      effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
      effect eLink = EffectLinkEffects(ePenalty, eDur);
      eLink = ExtraordinaryEffect(eLink);
    
      //Visuals
      effect eVis = EffectVisualEffect(VFX_IMP_SILENCE);
      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_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
              if(!GetIsSkillSuccessful(oTarget, SKILL_CONCENTRATION, nPerform))
              { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
                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 SongDiscord(object oPC, int nSongStrength, int nDuration)
    { //Penalties Here
      int nPenalty = 0;
      if(nSongStrength==23) nPenalty = 5;
      else if(nSongStrength>=18) nPenalty = 4;
      else if(nSongStrength>=13) nPenalty = 3;
      else if(nSongStrength>=6) nPenalty = 2;
      else if(nSongStrength>=4) nPenalty = 1;
      else
      { FloatingTextStringOnCreature("You try to sing the song, but the words tangle in your mouth.", oPC);
        DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
        return;
      }
      itemproperty iPenalty = ItemPropertyEnhancementPenalty(nPenalty);
      effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
      effect eLink = eDur;
      eLink = ExtraordinaryEffect(eLink);
    
      //Visuals
      effect eVis = EffectVisualEffect(VFX_IMP_SILENCE);
      effect eImpact = EffectVisualEffect(82);
      effect eVis2 = EffectVisualEffect(507); //BardSong VFX2
    
      //Define Variables
      object oWeapon, oOffhand;
    
      //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) && nSongStrength>0)
      { 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
            }
          }
          else //Target is Deaf, VFX
          { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
          }
          //Non Deaf Dependant Damage Here
          ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
          oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oTarget);
          oOffhand = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oTarget);
          if(GetIsObjectValid(oWeapon))
          { IPSafeAddItemProperty(oWeapon, iPenalty, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
            nSongStrength--;
            if(GetIsPC(oTarget)) SendMessageToPC(oTarget, GetName(oWeapon)+" resonates with the music.");
          }
          if(GetIsObjectValid(oOffhand))
          { IPSafeAddItemProperty(oOffhand, iPenalty, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
            nSongStrength--;
          }
          ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
          DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
        }
    
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC));
      }
      DecrementRemainingFeatUses(oPC, FEAT_BARD_SONGS);
    }
    
    


  • 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=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);
    }
    
    

Log in to reply