Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
165
Scripts/Spells/Skill Masteries/BardSpells/BardSpell.cs
Normal file
165
Scripts/Spells/Skill Masteries/BardSpells/BardSpell.cs
Normal file
@@ -0,0 +1,165 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.PartySystem;
|
||||
using Server.Targeting;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Spells.SkillMasteries
|
||||
{
|
||||
public abstract class BardSpell : SkillMasterySpell
|
||||
{
|
||||
private BaseInstrument m_Instrument;
|
||||
public BaseInstrument Instrument { get { return m_Instrument; } }
|
||||
|
||||
public virtual double SlayerBonus { get { return 1.5; } }
|
||||
|
||||
public override double RequiredSkill { get { return 90; } }
|
||||
public override double UpKeep { get { return 0; } }
|
||||
public override int RequiredMana { get { return 0; } }
|
||||
public override bool PartyEffects { get { return false; } }
|
||||
public override bool DamageCanDisrupt { get { return true; } }
|
||||
|
||||
public override double BaseSkillBonus
|
||||
{
|
||||
get
|
||||
{
|
||||
return Math.Floor(2 + (((Caster.Skills[CastSkill].Base - 90) / 10) + ((Caster.Skills[DamageSkill].Base - 90) / 10)));
|
||||
}
|
||||
}
|
||||
|
||||
public override double CollectiveBonus
|
||||
{
|
||||
get
|
||||
{
|
||||
double bonus = 0;
|
||||
double prov = Caster.Skills[SkillName.Provocation].Base;
|
||||
double peac = Caster.Skills[SkillName.Peacemaking].Base;
|
||||
double disc = Caster.Skills[SkillName.Discordance].Base;
|
||||
|
||||
switch(CastSkill)
|
||||
{
|
||||
default: return 0.0;
|
||||
case SkillName.Provocation:
|
||||
if (peac >= 100) bonus += 1 + ((peac - 100) / 10);
|
||||
if (disc >= 100) bonus += 1 + ((disc - 100) / 10);
|
||||
break;
|
||||
case SkillName.Peacemaking:
|
||||
if (prov >= 100) bonus += 1 + ((peac - 100) / 10);
|
||||
if (disc >= 100) bonus += 1 + ((disc - 100) / 10);
|
||||
break;
|
||||
case SkillName.Discordance:
|
||||
if (prov >= 100) bonus += 1 + ((peac - 100) / 10);
|
||||
if (peac >= 100) bonus += 1 + ((disc - 100) / 10);
|
||||
break;
|
||||
}
|
||||
|
||||
return bonus;
|
||||
}
|
||||
}
|
||||
|
||||
public override SkillName DamageSkill{ get{ return SkillName.Musicianship; } }
|
||||
|
||||
public override int UpkeepCancelMessage { get { return 1115665; } } // You do not have enough mana to continue infusing your song with magic.
|
||||
public override int OutOfRangeMessage { get { return 1115771; } } // Your target is no longer in range of your spellsong.
|
||||
public override int DisruptMessage { get { return 1115710; } } // Your spell song has been interrupted.
|
||||
|
||||
public BardSpell( Mobile caster, Item scroll, SpellInfo info ) : base( caster, null, info )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
int mana = ScaleMana(RequiredMana);
|
||||
|
||||
if (!base.CheckCast())
|
||||
return false;
|
||||
|
||||
m_Instrument = BaseInstrument.GetInstrument(Caster);
|
||||
|
||||
if (m_Instrument == null)
|
||||
{
|
||||
BaseInstrument.PickInstrument(Caster, new InstrumentPickedCallback(OnPickedInstrument));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnPickedInstrument(Mobile from, BaseInstrument instrument)
|
||||
{
|
||||
from.SendMessage("You choose a muscial instrument. Try using the bard mastery again.");
|
||||
}
|
||||
|
||||
public override bool CheckFizzle()
|
||||
{
|
||||
bool check = base.CheckFizzle();
|
||||
|
||||
if (check)
|
||||
{
|
||||
if (m_Instrument != null)
|
||||
{
|
||||
m_Instrument.PlayInstrumentWell(Caster);
|
||||
m_Instrument.ConsumeUse(Caster);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Caster.SendLocalizedMessage(500612); // You play poorly, and there is no effect.
|
||||
|
||||
if(m_Instrument != null)
|
||||
m_Instrument.PlayInstrumentBadly(Caster);
|
||||
}
|
||||
|
||||
return check;
|
||||
}
|
||||
|
||||
public override void SendCastEffect()
|
||||
{
|
||||
Caster.FixedEffect( 0x37C4, 10, (int)( GetCastDelay().TotalSeconds * 28 ), 4, 3 );
|
||||
}
|
||||
|
||||
public override void GetCastSkills( out double min, out double max )
|
||||
{
|
||||
min = RequiredSkill;
|
||||
max = RequiredSkill + 25.0;
|
||||
}
|
||||
|
||||
public static int GetMasteryBonus(PlayerMobile pm, SkillName useSkill)
|
||||
{
|
||||
if (useSkill == pm.Skills.CurrentMastery)
|
||||
return 10;
|
||||
|
||||
if (pm.Skills.CurrentMastery == SkillName.Provocation
|
||||
|| pm.Skills.CurrentMastery == SkillName.Discordance
|
||||
|| pm.Skills.CurrentMastery == SkillName.Peacemaking)
|
||||
return 5;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public virtual double GetSlayerBonus()
|
||||
{
|
||||
if (Target == null)
|
||||
return 1.0;
|
||||
|
||||
ISlayer slayer = Instrument as ISlayer;
|
||||
|
||||
if (slayer != null)
|
||||
{
|
||||
SlayerEntry se1 = SlayerGroup.GetEntryByName(slayer.Slayer);
|
||||
SlayerEntry se2 = SlayerGroup.GetEntryByName(slayer.Slayer2);
|
||||
|
||||
if ((se1 != null && se1.Slays(Target)) || (se2 != null && se2.Slays(Target)))
|
||||
{
|
||||
return SlayerBonus;
|
||||
}
|
||||
}
|
||||
|
||||
return 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
167
Scripts/Spells/Skill Masteries/BardSpells/Despair.cs
Normal file
167
Scripts/Spells/Skill Masteries/BardSpells/Despair.cs
Normal file
@@ -0,0 +1,167 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
/*Target Strength Reduced by up to 32, 20 – 60 Damage (Physical), every 2 seconds,
|
||||
affected by the target's magic resistance. (PvP and specific Mobs only).*/
|
||||
|
||||
namespace Server.Spells.SkillMasteries
|
||||
{
|
||||
public class DespairSpell : BardSpell
|
||||
{
|
||||
public static readonly string ModName = "Despair";
|
||||
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Despair", "Kal Des Mani Tym",
|
||||
-1,
|
||||
9002
|
||||
);
|
||||
|
||||
public override double RequiredSkill{ get { return 90; } }
|
||||
public override double UpKeep { get { return 12; } }
|
||||
public override int RequiredMana{ get { return 26; } }
|
||||
public override bool PartyEffects { get { return false; } }
|
||||
public override SkillName CastSkill { get { return SkillName.Discordance; } }
|
||||
public override double SlayerBonus { get { return 3.0; } }
|
||||
|
||||
private int m_StatMod;
|
||||
private int m_Damage;
|
||||
private int m_Rounds;
|
||||
|
||||
public DespairSpell( Mobile caster, Item scroll ) : base(caster, scroll, m_Info)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
BardSpell spell = SkillMasterySpell.GetSpell(Caster, this.GetType()) as BardSpell;
|
||||
|
||||
if(spell != null)
|
||||
{
|
||||
spell.Expire();
|
||||
Caster.SendLocalizedMessage(1115774); //You halt your spellsong.
|
||||
}
|
||||
else
|
||||
{
|
||||
Caster.Target = new InternalTarget(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnTarget( Mobile m )
|
||||
{
|
||||
if ( !Caster.CanSee( m ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
|
||||
}
|
||||
else if (!m.Alive)
|
||||
{
|
||||
Caster.SendLocalizedMessage(1115773); // Your target is dead.
|
||||
}
|
||||
else if (Caster == m)
|
||||
{
|
||||
// TODO: Message?
|
||||
}
|
||||
else if (BardSpell.HasHarmfulEffects(m, this.GetType()))
|
||||
{
|
||||
Caster.SendLocalizedMessage(1115772); //Your target is already under the effect of this spellsong.
|
||||
}
|
||||
else if (CheckHSequence(m))
|
||||
{
|
||||
SpellHelper.Turn(Caster, m);
|
||||
|
||||
Target = m;
|
||||
//Caster.SendLocalizedMessage(1234567); //TODO: Message?
|
||||
|
||||
HarmfulSpell(m);
|
||||
|
||||
m.FixedParticles(0x374A, 10, 15, 5028, EffectLayer.Waist);
|
||||
|
||||
int rounds = 5 + (int)((double)BaseSkillBonus * .75);
|
||||
|
||||
m_StatMod = (int)((BaseSkillBonus * 2) + CollectiveBonus);
|
||||
m_Damage = (int)((BaseSkillBonus * 4.5) + (CollectiveBonus * 2));
|
||||
m_Rounds = 5 + (int)((BaseSkillBonus * .75) + (CollectiveBonus / 2));
|
||||
|
||||
string args = String.Format("{0}\t{1}", m_StatMod, m_Damage);
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.DespairTarget, 1115741, 1115743, args.ToString()));
|
||||
BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.DespairCaster, 1115741, 1115743, args.ToString()));
|
||||
|
||||
BeginTimer();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void EndEffects()
|
||||
{
|
||||
BuffInfo.RemoveBuff(Target, BuffIcon.DespairTarget);
|
||||
BuffInfo.RemoveBuff(Caster, BuffIcon.DespairCaster);
|
||||
}
|
||||
|
||||
public override void AddStatMods()
|
||||
{
|
||||
int offset = m_StatMod;
|
||||
|
||||
if(Target != null)
|
||||
Target.AddStatMod(new StatMod(StatType.Str, ModName, offset, TimeSpan.Zero));
|
||||
}
|
||||
|
||||
public override void RemoveStatMods()
|
||||
{
|
||||
if(Target != null)
|
||||
Target.RemoveStatMod(ModName);
|
||||
}
|
||||
|
||||
public override bool OnTick()
|
||||
{
|
||||
bool tick = base.OnTick();
|
||||
|
||||
if (Target == null || !Caster.InRange(Target.Location, PartyRange))
|
||||
return false;
|
||||
|
||||
int damage = m_Damage;
|
||||
|
||||
if (!Target.Player)
|
||||
damage += AOS.Scale(damage, 50); // pvm = 1.5x
|
||||
|
||||
damage = (int)((double)damage * GetSlayerBonus()); // 3.0x slayer bonus
|
||||
damage -= (int)((double)damage * DamageModifier(Target)); // resist modifier
|
||||
|
||||
AOS.Damage(Target, Caster, damage, 100, 0, 0, 0, 0); // Now only does physical
|
||||
|
||||
if (Target != null && Target.Alive && Target.Map != null)
|
||||
Target.FixedEffect(0x376A, 1, 32);
|
||||
|
||||
if (m_Rounds-- == 0)
|
||||
{
|
||||
Expire();
|
||||
}
|
||||
|
||||
return tick;
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private DespairSpell m_Owner;
|
||||
|
||||
public InternalTarget(DespairSpell spell) : base(10, false, TargetFlags.Harmful)
|
||||
{
|
||||
m_Owner = spell;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is Mobile )
|
||||
m_Owner.OnTarget( (Mobile)o );
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish( Mobile from )
|
||||
{
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
110
Scripts/Spells/Skill Masteries/BardSpells/Perseverance.cs
Normal file
110
Scripts/Spells/Skill Masteries/BardSpells/Perseverance.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
|
||||
/*Party Defense Chance increased by up to 22%, Damage reduced by up to 22%.
|
||||
Casting focus bonus 1-6%.*/
|
||||
|
||||
namespace Server.Spells.SkillMasteries
|
||||
{
|
||||
public class PerseveranceSpell : BardSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Perserverance", "Unus Jux Sanct",
|
||||
-1,
|
||||
9002
|
||||
);
|
||||
|
||||
public override double RequiredSkill{ get { return 90; } }
|
||||
public override double UpKeep { get { return 5; } }
|
||||
public override int RequiredMana{ get { return 18; } }
|
||||
public override bool PartyEffects { get { return true; } }
|
||||
public override SkillName CastSkill { get { return SkillName.Peacemaking; } }
|
||||
|
||||
private int m_PropertyBonus;
|
||||
private int m_PropertyBonus2;
|
||||
private int m_DamageMod;
|
||||
|
||||
public PerseveranceSpell( Mobile caster, Item scroll ) : base(caster, scroll, m_Info)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
BardSpell spell = SkillMasterySpell.GetSpell(Caster, this.GetType()) as BardSpell;
|
||||
|
||||
if(spell != null)
|
||||
{
|
||||
spell.Expire();
|
||||
Caster.SendLocalizedMessage(1115774); //You halt your spellsong.
|
||||
}
|
||||
else if ( CheckSequence() )
|
||||
{
|
||||
m_PropertyBonus = (int)((BaseSkillBonus * 3) + CollectiveBonus); // 2 - 24 (30)
|
||||
m_PropertyBonus2 = (int)((BaseSkillBonus / 2) + (CollectiveBonus / 3)); // 1 - 4 (6)
|
||||
m_DamageMod = (int)((BaseSkillBonus * 3) + CollectiveBonus); // 2 - 24 (30)
|
||||
|
||||
UpdateParty();
|
||||
BeginTimer();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void AddPartyEffects(Mobile m)
|
||||
{
|
||||
m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
|
||||
m.SendLocalizedMessage(1115739); // The bard's spellsong fills you with a feeling of invincibility.
|
||||
|
||||
string args = String.Format("{0}\t-{1}\t{2}", m_PropertyBonus, m_DamageMod, m_PropertyBonus2);
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Perseverance, 1115615, 1115732, args.ToString()));
|
||||
}
|
||||
|
||||
public override void RemovePartyEffects(Mobile m)
|
||||
{
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Perseverance);
|
||||
}
|
||||
|
||||
public override void EndEffects()
|
||||
{
|
||||
if (PartyList != null)
|
||||
{
|
||||
foreach (Mobile m in PartyList) //Original Party list
|
||||
{
|
||||
RemovePartyEffects(m);
|
||||
}
|
||||
}
|
||||
|
||||
RemovePartyEffects(Caster);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defense Chance Bonus
|
||||
/// </summary>
|
||||
/// <returns>Defense Chance Bonus</returns>
|
||||
public override int PropertyBonus()
|
||||
{
|
||||
return m_PropertyBonus;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Casting Focus
|
||||
/// </summary>
|
||||
/// <returns>Casting Focus</returns>
|
||||
public override int PropertyBonus2()
|
||||
{
|
||||
return m_PropertyBonus2;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// modifies total damage dealt
|
||||
/// </summary>
|
||||
/// <param name="damage"></param>
|
||||
public void AbsorbDamage(ref int damage)
|
||||
{
|
||||
damage -= AOS.Scale(damage, m_DamageMod);
|
||||
}
|
||||
}
|
||||
}
|
||||
103
Scripts/Spells/Skill Masteries/BardSpells/Resilience.cs
Normal file
103
Scripts/Spells/Skill Masteries/BardSpells/Resilience.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
|
||||
/*Poison resistance increase(not the stat), Mortal, Bleed, Curse effect Durations decreased,
|
||||
Hp regen bonus 2-11, mana regen bonus 2-11, stamina regen bonus 2-11.*/
|
||||
|
||||
namespace Server.Spells.SkillMasteries
|
||||
{
|
||||
public class ResilienceSpell : BardSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Resilience", "Kal Mani Tym",
|
||||
-1,
|
||||
9002
|
||||
);
|
||||
|
||||
public override double RequiredSkill{ get { return 90; } }
|
||||
public override double UpKeep { get { return 4; } }
|
||||
public override int RequiredMana { get { return 16; } }
|
||||
public override bool PartyEffects { get { return true; } }
|
||||
public override SkillName CastSkill { get { return SkillName.Peacemaking; } }
|
||||
|
||||
private int m_PropertyBonus;
|
||||
|
||||
public ResilienceSpell( Mobile caster, Item scroll ) : base(caster, scroll, m_Info)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
BardSpell spell = SkillMasterySpell.GetSpell(Caster, this.GetType()) as BardSpell;
|
||||
|
||||
if (spell != null)
|
||||
{
|
||||
spell.Expire();
|
||||
Caster.SendLocalizedMessage(1115774); //You halt your spellsong.
|
||||
}
|
||||
else if (CheckSequence())
|
||||
{
|
||||
m_PropertyBonus = (int)((BaseSkillBonus * 2) + CollectiveBonus); // 2 - 16 (22)
|
||||
|
||||
UpdateParty();
|
||||
BeginTimer();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void AddPartyEffects(Mobile m)
|
||||
{
|
||||
m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
|
||||
m.SendLocalizedMessage(1115738); // The bard's spellsong fills you with a feeling of resilience.
|
||||
|
||||
string args = String.Format("{0}\t{1}\t{2}", m_PropertyBonus, m_PropertyBonus, m_PropertyBonus);
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Resilience, 1115614, 1115731, args.ToString()));
|
||||
|
||||
m.ResetStatTimers();
|
||||
}
|
||||
|
||||
public override void RemovePartyEffects(Mobile m)
|
||||
{
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Resilience);
|
||||
|
||||
m.ResetStatTimers();
|
||||
}
|
||||
|
||||
public override void EndEffects()
|
||||
{
|
||||
if (PartyList != null)
|
||||
{
|
||||
foreach (Mobile m in PartyList) //Original Party list
|
||||
{
|
||||
RemovePartyEffects(m);
|
||||
}
|
||||
}
|
||||
|
||||
RemovePartyEffects(Caster);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called in AOS.cs - Regen bonus
|
||||
/// </summary>
|
||||
/// <returns>All 3 regen bonuses</returns>
|
||||
public override int PropertyBonus()
|
||||
{
|
||||
return m_PropertyBonus;
|
||||
}
|
||||
|
||||
/*Notes:
|
||||
* Poison Resist 25% flat rate in spell is active - TODO: Get OSI Rate???
|
||||
* Bleed, Mortal and Curse cuts time by 1/2
|
||||
* Reference PlayerMobile, BleedAttack, MortalStrike and CurseSpell
|
||||
*/
|
||||
|
||||
public static bool UnderEffects(Mobile m)
|
||||
{
|
||||
return SkillMasterySpell.UnderPartyEffects(m, typeof(ResilienceSpell));
|
||||
}
|
||||
}
|
||||
}
|
||||
168
Scripts/Spells/Skill Masteries/BardSpells/Tribulation.cs
Normal file
168
Scripts/Spells/Skill Masteries/BardSpells/Tribulation.cs
Normal file
@@ -0,0 +1,168 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
using Server.Items;
|
||||
|
||||
/*Target Hit Chance reduced by up to 33%, Spell Damaged reduced by 33%, Damage
|
||||
Taken can trigger additional damage between 20-60% of the damage taken as
|
||||
physical once per second. (Discordance Based) (Chance to Trigger damage
|
||||
Musicianship Based) affected by the target's magic resistance. (PvP and
|
||||
specific Mobs only)*/
|
||||
|
||||
namespace Server.Spells.SkillMasteries
|
||||
{
|
||||
public class TribulationSpell : BardSpell
|
||||
{
|
||||
private DateTime m_NextDamage;
|
||||
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Tribulation", "In Jux Hur Rel",
|
||||
-1,
|
||||
9002
|
||||
);
|
||||
|
||||
public override double RequiredSkill{ get { return 90; } }
|
||||
public override double UpKeep { get { return 10; } }
|
||||
public override int RequiredMana{ get { return 24; } }
|
||||
public override bool PartyEffects { get { return false; } }
|
||||
public override double TickTime { get { return 2.0; } }
|
||||
|
||||
public override SkillName CastSkill { get { return SkillName.Discordance; } }
|
||||
|
||||
private int m_PropertyBonus;
|
||||
private double m_DamageChance;
|
||||
private int m_DamageFactor;
|
||||
private int m_Rounds;
|
||||
|
||||
public TribulationSpell( Mobile caster, Item scroll ) : base(caster, scroll, m_Info)
|
||||
{
|
||||
m_NextDamage = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
BardSpell spell = SkillMasterySpell.GetSpell(Caster, this.GetType()) as BardSpell;
|
||||
|
||||
if(spell != null)
|
||||
{
|
||||
spell.Expire();
|
||||
Caster.SendLocalizedMessage(1115774); //You halt your spellsong.
|
||||
}
|
||||
else
|
||||
{
|
||||
Caster.Target = new InternalTarget(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnTarget( Mobile m )
|
||||
{
|
||||
if ( !Caster.CanSee( m ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
|
||||
}
|
||||
else if (Caster == m)
|
||||
{
|
||||
Caster.SendMessage("You cannot target yourself!");
|
||||
}
|
||||
else if (BardSpell.HasHarmfulEffects(m, this.GetType()))
|
||||
{
|
||||
Caster.SendLocalizedMessage(1115772); //Your target is already under the effect of this spellsong.
|
||||
}
|
||||
else if (CheckHSequence(m))
|
||||
{
|
||||
SpellHelper.Turn(Caster, m);
|
||||
|
||||
Target = m;
|
||||
|
||||
HarmfulSpell(m);
|
||||
|
||||
m.FixedParticles(0x374A, 10, 15, 5028, EffectLayer.Waist);
|
||||
|
||||
double cast = Caster.Skills[CastSkill].Value;
|
||||
double dam = Caster.Skills[DamageSkill].Value;
|
||||
|
||||
m_PropertyBonus = (int)((BaseSkillBonus * 2.75) + (CollectiveBonus * 1.667)); // 5 - 22 (32)
|
||||
m_DamageChance = (int)((BaseSkillBonus * 7.5) + (CollectiveBonus * 3)); // 15 - 60 (84)
|
||||
m_DamageFactor = (int)((BaseSkillBonus * 4) + (CollectiveBonus * 3)); // 8 - 32 (50)
|
||||
m_Rounds = 5 + (int)((BaseSkillBonus * .75) + (CollectiveBonus / 2)); // 5 - 11 (14)
|
||||
|
||||
// ~1_HCI~% Hit Chance.<br>~2_SDI~% Spell Damage.<br>Damage taken has a ~3_EXP~% chance to cause additional burst of physical damage.<br>
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.TribulationTarget, 1115740, 1115742, String.Format("{0}\t{1}\t{2}", m_PropertyBonus, m_PropertyBonus, (int)m_DamageChance)));
|
||||
|
||||
// Target: ~1_val~ <br> Damage Factor: ~2_val~% <br> Damage Chance: ~3_val~%
|
||||
BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.TribulationCaster, 1115740, 1151388, String.Format("{0}\t{1}\t{2}", m.Name, (int)m_DamageFactor, (int)m_DamageChance)));
|
||||
|
||||
BeginTimer();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override bool OnTick()
|
||||
{
|
||||
if(Target != null && Target.Alive && Target.Map != null)
|
||||
Target.FixedEffect(0x376A, 1, 32);
|
||||
|
||||
if (m_Rounds-- <= 0)
|
||||
{
|
||||
Expire();
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnTick();
|
||||
}
|
||||
|
||||
public override void EndEffects()
|
||||
{
|
||||
BuffInfo.RemoveBuff(Target, BuffIcon.TribulationTarget);
|
||||
BuffInfo.RemoveBuff(Caster, BuffIcon.TribulationCaster);
|
||||
}
|
||||
|
||||
public override void OnTargetDamaged(Mobile attacker, Mobile victim, DamageType type, ref int damageTaken)
|
||||
{
|
||||
if(m_NextDamage > DateTime.UtcNow)
|
||||
return;
|
||||
|
||||
if (m_DamageChance / 100 > Utility.RandomDouble())
|
||||
{
|
||||
m_NextDamage = DateTime.UtcNow + TimeSpan.FromSeconds(1);
|
||||
|
||||
int damage = AOS.Scale(damageTaken, m_DamageFactor);
|
||||
damage = (int)((double)damage * GetSlayerBonus()); // 1.5 slayer bonus
|
||||
damage -= (int)((double)damage * DamageModifier(Target)); // resist modifier
|
||||
|
||||
AOS.Damage(victim, Caster, damage, 0, 0, 0, 0, 0, 0, 100);
|
||||
victim.FixedParticles(0x374A, 10, 15, 5038, 1181, 0, EffectLayer.Head);
|
||||
}
|
||||
}
|
||||
|
||||
public override int PropertyBonus()
|
||||
{
|
||||
return m_PropertyBonus;
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private TribulationSpell m_Owner;
|
||||
|
||||
public InternalTarget(TribulationSpell spell) : base(10, false, TargetFlags.Harmful)
|
||||
{
|
||||
m_Owner = spell;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is Mobile )
|
||||
m_Owner.OnTarget( (Mobile)o );
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish( Mobile from )
|
||||
{
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
106
Scripts/Spells/Skill Masteries/BardSpells/inspire.cs
Normal file
106
Scripts/Spells/Skill Masteries/BardSpells/inspire.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
|
||||
/*Party Hit chance increase by up to 15%, Damage increase by up to 40%,
|
||||
SDI increased by up to 15% (PvP Cap 15)(Provocation Based)*/
|
||||
|
||||
namespace Server.Spells.SkillMasteries
|
||||
{
|
||||
public class InspireSpell : BardSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Inspire", "Unus Por",
|
||||
-1,
|
||||
9002
|
||||
);
|
||||
|
||||
public override double RequiredSkill{ get { return 90; } }
|
||||
public override double UpKeep { get { return 4; } }
|
||||
public override int RequiredMana{ get { return 16; } }
|
||||
public override SkillName CastSkill { get { return SkillName.Provocation; } }
|
||||
public override bool PartyEffects { get { return true; } }
|
||||
|
||||
private int m_PropertyBonus;
|
||||
private int m_DamageBonus;
|
||||
private int m_DamageModifier;
|
||||
|
||||
public InspireSpell( Mobile caster, Item scroll ) : base(caster, scroll, m_Info)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
BardSpell spell = SkillMasterySpell.GetSpell(Caster, this.GetType()) as BardSpell;
|
||||
|
||||
if(spell != null)
|
||||
{
|
||||
spell.Expire();
|
||||
Caster.SendLocalizedMessage(1115774); //You halt your spellsong.
|
||||
}
|
||||
else if ( CheckSequence() )
|
||||
{
|
||||
m_PropertyBonus = (int)((BaseSkillBonus * 2) + CollectiveBonus);
|
||||
m_DamageBonus = (int)((BaseSkillBonus * 5) + (CollectiveBonus * 3));
|
||||
m_DamageModifier = (int)((BaseSkillBonus + 1) + CollectiveBonus);
|
||||
|
||||
UpdateParty();
|
||||
BeginTimer();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void AddPartyEffects(Mobile m)
|
||||
{
|
||||
m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
|
||||
m.SendLocalizedMessage(1115736); // You feel inspired by the bard's spellsong.
|
||||
|
||||
string args = String.Format("{0}\t{1}\t{2}\t{3}", m_PropertyBonus, m_PropertyBonus, m_DamageBonus, m_DamageModifier);
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Inspire, 1115683, 1151951, args.ToString()));
|
||||
}
|
||||
|
||||
public override void RemovePartyEffects(Mobile m)
|
||||
{
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Inspire);
|
||||
}
|
||||
|
||||
public override void EndEffects()
|
||||
{
|
||||
if (PartyList != null)
|
||||
{
|
||||
foreach (Mobile m in PartyList) //Original Party list
|
||||
{
|
||||
RemovePartyEffects(m);
|
||||
}
|
||||
}
|
||||
|
||||
RemovePartyEffects(Caster);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called in AOS.cs - Hit Chance/Spell Damage Bonus
|
||||
/// </summary>
|
||||
/// <returns>HCI/SDI Bonus</returns>
|
||||
public override int PropertyBonus()
|
||||
{
|
||||
return m_PropertyBonus;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called in AOS.cs - Weapon Damage Bonus
|
||||
/// </summary>
|
||||
/// <returns>DamInc Bonus</returns>
|
||||
public override int DamageBonus()
|
||||
{
|
||||
return m_DamageBonus;
|
||||
}
|
||||
|
||||
public void DoDamage(ref int damageTaken)
|
||||
{
|
||||
damageTaken += AOS.Scale(damageTaken, m_DamageModifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
153
Scripts/Spells/Skill Masteries/BardSpells/invigorate.cs
Normal file
153
Scripts/Spells/Skill Masteries/BardSpells/invigorate.cs
Normal file
@@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
/*Party Hit Points increased by up to 20 + 6(Collection Bonus), Party healed for 9-20 dmg every 4 seconds.
|
||||
(Provocation Based). Party Strength, Dex, Int, Increased by Up to 8.*/
|
||||
|
||||
namespace Server.Spells.SkillMasteries
|
||||
{
|
||||
public class InvigorateSpell : BardSpell
|
||||
{
|
||||
public static readonly string StatModName = "Invigorate";
|
||||
|
||||
private DateTime m_NextHeal;
|
||||
private List<Mobile> m_Mods = new List<Mobile>();
|
||||
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Invigorate", "An Zu",
|
||||
-1,
|
||||
9002
|
||||
);
|
||||
|
||||
public override double RequiredSkill{ get { return 90; } }
|
||||
public override double UpKeep { get { return 5; } }
|
||||
public override int RequiredMana{ get { return 22; } }
|
||||
public override bool PartyEffects { get { return true; } }
|
||||
public override SkillName CastSkill { get { return SkillName.Provocation; } }
|
||||
|
||||
private int m_HPBonus;
|
||||
private int m_StatBonus;
|
||||
|
||||
public InvigorateSpell( Mobile caster, Item scroll ) : base(caster, scroll, m_Info)
|
||||
{
|
||||
m_NextHeal = DateTime.UtcNow + TimeSpan.FromSeconds(4);
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
BardSpell spell = SkillMasterySpell.GetSpell(Caster, this.GetType()) as BardSpell;
|
||||
|
||||
if(spell != null)
|
||||
{
|
||||
spell.Expire();
|
||||
Caster.SendLocalizedMessage(1115774); //You halt your spellsong.
|
||||
}
|
||||
else if ( CheckSequence() )
|
||||
{
|
||||
m_StatBonus = (int)(BaseSkillBonus + CollectiveBonus);
|
||||
m_HPBonus = (int)((2.5 * BaseSkillBonus) + CollectiveBonus);
|
||||
|
||||
UpdateParty();
|
||||
BeginTimer();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void AddPartyEffects(Mobile m)
|
||||
{
|
||||
m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
|
||||
m.SendLocalizedMessage(1115737); // You feel invigorated by the bard's spellsong.
|
||||
|
||||
string args = String.Format("{0}\t{1}\t{2}\t{3}", m_HPBonus, m_StatBonus, m_StatBonus, m_StatBonus);
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Invigorate, 1115613, 1115730, args.ToString()));
|
||||
|
||||
m.AddStatMod(new StatMod(StatType.Str, StatModName + "str", m_StatBonus, TimeSpan.Zero));
|
||||
m.AddStatMod(new StatMod(StatType.Dex, StatModName + "dex", m_StatBonus, TimeSpan.Zero));
|
||||
m.AddStatMod(new StatMod(StatType.Int, StatModName + "int", m_StatBonus, TimeSpan.Zero));
|
||||
|
||||
m_Mods.Add(m);
|
||||
}
|
||||
|
||||
public override void RemovePartyEffects(Mobile m)
|
||||
{
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Invigorate);
|
||||
|
||||
if (m_Mods.Contains(m))
|
||||
{
|
||||
m.RemoveStatMod(StatModName + "str");
|
||||
m.RemoveStatMod(StatModName + "dex");
|
||||
m.RemoveStatMod(StatModName + "int");
|
||||
|
||||
m_Mods.Remove(m);
|
||||
}
|
||||
}
|
||||
|
||||
public override void EndEffects()
|
||||
{
|
||||
if (PartyList != null)
|
||||
{
|
||||
foreach (Mobile m in PartyList) //Original Party list
|
||||
{
|
||||
RemovePartyEffects(m);
|
||||
}
|
||||
}
|
||||
|
||||
RemovePartyEffects(Caster);
|
||||
}
|
||||
|
||||
public override bool OnTick()
|
||||
{
|
||||
base.OnTick();
|
||||
|
||||
if(m_NextHeal > DateTime.UtcNow)
|
||||
return false;
|
||||
|
||||
PartyList.IterateReverse(m =>
|
||||
{
|
||||
if (CheckPartyEffects(m, true))
|
||||
{
|
||||
int healRange = (int)((BaseSkillBonus * 2) + CollectiveBonus ); // 4 - 16 (22)
|
||||
|
||||
if (m.Hits < m.HitsMax)
|
||||
{
|
||||
m.Heal(Utility.RandomMinMax(healRange - 2, healRange + 2));
|
||||
m.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist);
|
||||
m.PlaySound(0x1F2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RemovePartyMember(m);
|
||||
}
|
||||
});
|
||||
|
||||
m_NextHeal = DateTime.UtcNow + TimeSpan.FromSeconds(4);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called in AOS.cs - HP Bonus
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int StatBonus()
|
||||
{
|
||||
return m_HPBonus;
|
||||
}
|
||||
|
||||
public static int GetHPBonus(Mobile m)
|
||||
{
|
||||
var spell = SkillMasterySpell.GetSpellForParty(m, typeof(InvigorateSpell));
|
||||
|
||||
if (spell != null)
|
||||
return spell.StatBonus();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user