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<=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, "CRESCENDOCOUNT"); effect eSilence = EffectSilence(); effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEUTRAL); eSilence = EffectLinkEffects(eSilence, eVis2); eSilence = ExtraordinaryEffect(eSilence); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSilence, oPC, RoundsToSeconds(nDuration*5)); return; } else { FloatingTextStringOnCreature(GetName(oPC)+" raises "+sPronoun+" song's pitch to "+IntToString(nCount)+"!", oPC, FALSE); } //Bonuses Here effect eAttack = EffectAttackIncrease(nCount); effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); eAttack = EffectLinkEffects(eAttack, eDur); eAttack = ExtraordinaryEffect(eAttack); 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(eAttack, 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, eAttack, oTarget, RoundsToSeconds(nDuration)); } } } oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC)); } } void SongAllegro(object oPC, int nSongStrength, int nDuration) { effect eImpact = EffectVisualEffect(VFX_IMP_HASTE); effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG); //Bonuses Here effect eHaste = EffectMovementSpeedIncrease(10+5*nSongStrength); effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); eHaste = EffectLinkEffects(eHaste, eDur); eHaste = ExtraordinaryEffect(eHaste); //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 if(!GetHasSpellEffect(SPELL_HASTE, oTarget)) { effect eBardLinked = EffectLinkEffects(eHaste, eVis); eBardLinked = ExtraordinaryEffect(eBardLinked); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBardLinked, oTarget, RoundsToSeconds(nDuration)); ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); } else { eVis = ExtraordinaryEffect(eVis); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(nDuration)); } } else if(GetIsFriend(oTarget) && !GetHasSpellEffect(SPELL_HASTE, oTarget)) { ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); //Bonus Here ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHaste, oTarget, RoundsToSeconds(nDuration)); } } } oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC)); } } void SongHymn(object oPC, int nSongStrength, int nDuration) { effect eImpact = EffectVisualEffect(VFX_IMP_GOOD_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_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<23) nBonus = WeapDamageBonus(nSongStrength/2); else nBonus = WeapDamageBonus(12); itemproperty iKeen = ItemPropertyDamageBonus(nType, nBonus); 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)) { 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)) { IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); if(GetIsPC(oTarget)) SendMessageToPC(oTarget, "Your "+GetName(oWeapon)+" resonates with the music."); ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); } if(GetIsObjectValid(oOffhand)) { IPSafeAddItemProperty(oOffhand, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); } } 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)) { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis2, oTarget, RoundsToSeconds(nDuration)); IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); if(GetIsPC(oTarget)) SendMessageToPC(oTarget, "Your "+GetName(oWeapon)+" resonates with the music."); } if(GetIsObjectValid(oOffhand)) { IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); } } } } oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC)); } } void SongEleDef(object oPC, int nSongStrength, int nDuration, int nType = DAMAGE_TYPE_SONIC, int nVFX = VFX_IMP_HEAD_SONIC) { int nBonus = 2*nSongStrength +6; //+2% Per Level 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 <= 1) { nHealBonus = 1; } //Bonuses Here effect eBonus = EffectRegenerate(nHealBonus, 3.0); effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); 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 or undead, we can not benefit from bard song if (!GetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !GetHasEffect(EFFECT_TYPE_DEAF,oTarget) || GetIsUndead(oTarget) == TRUE) { 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 SongBrawl(object oPC, int nSongStrength, int nDuration) { int nBonus = WeapDamageBonus(nSongStrength); itemproperty iKeen = ItemPropertyMassiveCritical(nBonus); nBonus = WeapDamageBonus(1+nSongStrength/2); itemproperty iGlove = ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_BLUDGEONING, nBonus); effect eImpact = EffectVisualEffect(46); effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG); eVis = ExtraordinaryEffect(eVis); //Define Vars Here object oWeapon, oOffhand; 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) { 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) && GetBludge(oWeapon)) { IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); if(GetIsPC(oTarget)) SendMessageToPC(oTarget, "Your "+GetName(oWeapon)+" resonates with the music."); ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); } else { oWeapon = GetItemInSlot(INVENTORY_SLOT_ARMS, oTarget); if(GetBaseItemType(oWeapon)==BASE_ITEM_GLOVES) { IPSafeAddItemProperty(oWeapon, iGlove, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); if(GetIsPC(oTarget)) SendMessageToPC(oTarget, "Your fists feel empowered with the music."); } } if(GetIsObjectValid(oOffhand) && GetBludge(oWeapon)) { IPSafeAddItemProperty(oOffhand, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); } } 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) && GetBludge(oWeapon)) { IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); if(GetIsPC(oTarget)) SendMessageToPC(oTarget, "Your "+GetName(oWeapon)+" resonates with the music."); } else { oWeapon = GetItemInSlot(INVENTORY_SLOT_ARMS, oTarget); if(GetBaseItemType(oWeapon)==BASE_ITEM_GLOVES) { IPSafeAddItemProperty(oWeapon, iGlove, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); if(GetIsPC(oTarget)) SendMessageToPC(oTarget, "Your fists feel empowered with the music."); } } if(GetIsObjectValid(oOffhand) && GetBludge(oWeapon)) { IPSafeAddItemProperty(oWeapon, iKeen, RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING); } } } } oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oPC)); } } //::////////////////////////////////////////////// //:: Internal Functions //::////////////////////////////////////////////// int RandomAnimal(int nCheck) { int nResult = POLYMORPH_TYPE_BADGER; switch(nCheck) { case 1: nResult = POLYMORPH_TYPE_BOAR; break; case 2: nResult = POLYMORPH_TYPE_CHICKEN; break; case 3: nResult = POLYMORPH_TYPE_COW; break; case 4: nResult = POLYMORPH_TYPE_DIRE_BADGER; break; case 5: nResult = POLYMORPH_TYPE_DIRE_BOAR; break; case 6: nResult = POLYMORPH_TYPE_BADGER; break; case 7: nResult = POLYMORPH_TYPE_COW; break; case 8: nResult = POLYMORPH_TYPE_PANTHER; break; case 9: nResult = POLYMORPH_TYPE_PENGUIN; break; case 10: nResult = POLYMORPH_TYPE_WOLF; break; case 11: nResult = POLYMORPH_TYPE_PENGUIN; break; case 12: nResult = POLYMORPH_TYPE_GIANT_SPIDER; break; case 13: nResult = POLYMORPH_TYPE_PENGUIN; break; case 14: nResult = POLYMORPH_TYPE_CHICKEN; break; case 15: nResult = POLYMORPH_TYPE_COW; break; } return nResult; } int GetSpeakLevel(object oTarget) { int nRace = GetRacialType(oTarget); switch(nRace) { case RACIAL_TYPE_ANIMAL: case RACIAL_TYPE_BEAST: case RACIAL_TYPE_MAGICAL_BEAST: case RACIAL_TYPE_OOZE: case RACIAL_TYPE_VERMIN: return 0; break; case RACIAL_TYPE_ABERRATION: case RACIAL_TYPE_OUTSIDER: case RACIAL_TYPE_ELEMENTAL: return 2; break; case RACIAL_TYPE_FEY: return 3; break; case RACIAL_TYPE_CONSTRUCT: return 4; break; case RACIAL_TYPE_UNDEAD: return 5; break; } return 1; } void SlanderString(object oTarget) { string sResult; int nRandom = Random(7); int nLevel = GetSpeakLevel(oTarget); if(nLevel==0) sResult="*Emits a mocking sound*"; //No Voice(Animals, beasts, vermin...) else if(nLevel==2) //Aberations, Elementals {nRandom=Random(4); switch(nRandom) { case 0: sResult="Myiyck eist aifesev..."; break; case 1: sResult="Oiruy awhy vweady Douvlm!"; break; case 2: sResult="Ikoyon ivifabb drufyiy bwoabj?!"; break; case 3: sResult="Noab uikieh niaqyt!"; break; } } else if(nLevel==3) //Fairy {nRandom=Random(4); switch(nRandom) { case 0: sResult="Euth Sooni!"; break; case 1: sResult="Iufyu bae buo..."; break; case 2: sResult="Lruuf loi leoyoeu aoyei!"; break; case 3: sResult=""; break; } } else if(nLevel==4) //Construct {nRandom=Random(3); switch(nRandom) { case 0: sResult="Error: Destroy all!"; break; case 1: sResult="Slay all!"; break; case 2: sResult="Surrounded by inferiors."; break; } } else if(nLevel==5) //Undead {nRandom=Random(3); switch(nRandom) { case 0: sResult="Useless... Incompetant minions..."; break; case 1: sResult="I will consume you all!"; break; case 2: sResult="Destruction for you all!"; break; } } else if(GetAbilityScore(oTarget, ABILITY_INTELLIGENCE)>=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<=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); }