* Fixes disarm * Fixes strangle not refreshing * Fixes curse not refreshing * Fixes 125% bonus to looting rights * Fixes mobs attacking each other, or not attacking each other * Fixes items dropping to the floor * Fixes protection spell * Fixes cure sending wrong message
63 lines
1.8 KiB
C#
63 lines
1.8 KiB
C#
using Server.Engines.ConPVP;
|
|
using Server.Targeting;
|
|
|
|
namespace Server.Spells.Third
|
|
{
|
|
public class BlessSpell : MagerySpell, ISpellTargetingMobile
|
|
{
|
|
private static readonly SpellInfo _info = new(
|
|
"Bless",
|
|
"Rel Sanct",
|
|
203,
|
|
9061,
|
|
Reagent.Garlic,
|
|
Reagent.MandrakeRoot
|
|
);
|
|
|
|
public BlessSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
|
{
|
|
}
|
|
|
|
public override SpellCircle Circle => SpellCircle.Third;
|
|
|
|
public void Target(Mobile m)
|
|
{
|
|
if (CheckBSequence(m))
|
|
{
|
|
SpellHelper.Turn(Caster, m);
|
|
|
|
var length = SpellHelper.GetDuration(Caster, m);
|
|
SpellHelper.AddStatBonus(Caster, m, StatType.Str, length, false);
|
|
SpellHelper.AddStatBonus(Caster, m, StatType.Dex, length);
|
|
SpellHelper.AddStatBonus(Caster, m, StatType.Int, length);
|
|
|
|
m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
|
|
m.PlaySound(0x1EA);
|
|
|
|
var percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
|
|
|
|
var args = $"{percentage}\t{percentage}\t{percentage}";
|
|
|
|
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Bless, 1075847, 1075848, length, m, args));
|
|
}
|
|
|
|
FinishSequence();
|
|
}
|
|
|
|
public override bool CheckCast()
|
|
{
|
|
if (DuelContext.CheckSuddenDeath(Caster))
|
|
{
|
|
Caster.SendMessage(0x22, "You cannot cast this spell when in sudden death.");
|
|
return false;
|
|
}
|
|
|
|
return base.CheckCast();
|
|
}
|
|
|
|
public override void OnCast()
|
|
{
|
|
Caster.Target = new SpellTargetMobile(this, TargetFlags.Beneficial, Core.ML ? 10 : 12);
|
|
}
|
|
}
|
|
}
|