public override void OnCast() { if (CheckSequence()) { Caster.PlaySound(0x5C3); Caster.FixedParticles(0x3728, 1, 13, 0x26B8, 0x455, 7, EffectLayer.Waist); Caster.FixedParticles(0x3779, 1, 15, 0x251E, 0x3F, 7, EffectLayer.Waist); double skill = Caster.Skills[SkillName.Magery].Value; int damageAbsorb = (int)(18 + ((skill - 10) / 10) * 3 + (FocusLevel * 6)); Caster.MeleeDamageAbsorb = damageAbsorb; TimeSpan duration = TimeSpan.FromSeconds(60 + (FocusLevel * 12)); ExpireTimer t = new ExpireTimer(Caster, duration); t.Start(); m_Table[Caster] = t; Caster.BeginAction(typeof(AttuneWeaponSpell)); BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.AttuneWeapon, 1075798, duration, Caster, damageAbsorb.ToString())); } FinishSequence(); }
public EmpowermentInfo(Mobile caster, TimeSpan duration, int bonus, int focus) { Bonus = bonus; Focus = focus; Timer = new ExpireTimer(caster, duration); Timer.Start(); }
public EssenceOfWindInfo(Mobile defender, int fcMalus, int ssiMalus, TimeSpan duration) { Defender = defender; FCMalus = fcMalus; SSIMalus = ssiMalus; Timer = new ExpireTimer(Defender, duration); Timer.Start(); }
public EmpowermentInfo(Mobile caster, int sdiBonus, double healBonus, int hitsBonus, int dispelBonus, TimeSpan duration) { m_Caster = caster; m_SDIBonus = sdiBonus; m_HealBonus = healBonus; m_HitsBonus = hitsBonus; m_DispelBonus = dispelBonus; m_Timer = new ExpireTimer(m_Caster, duration); m_Timer.Start(); }
public void Target(Mobile m) { BaseCreature bc = m as BaseCreature; if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (m.IsDeadBondedPet || !m.Alive) { // As per Osi: Nothing happens. } else if (m != Caster && (bc == null || !bc.IsBonded || bc.ControlMaster != Caster)) { Caster.SendLocalizedMessage(1072077); // You may only cast this spell on yourself or a bonded pet. } else if (m_Table.ContainsKey(m)) { Caster.SendLocalizedMessage(501775); // This spell is already in effect. } else if (CheckBSequence(m)) { if (Caster == m) { Caster.SendLocalizedMessage(1074774); // You weave powerful magic, protecting yourself from death. } else { Caster.SendLocalizedMessage(1074775); // You weave powerful magic, protecting your pet from death. SpellHelper.Turn(Caster, m); } m.PlaySound(0x244); m.FixedParticles(0x3709, 1, 30, 0x26ED, 5, 2, EffectLayer.Waist); m.FixedParticles(0x376A, 1, 30, 0x251E, 5, 3, EffectLayer.Waist); double skill = Caster.Skills[SkillName.Spellweaving].Value; TimeSpan duration = TimeSpan.FromMinutes(((int)(skill / 24)) * 2 + FocusLevel); ExpireTimer t = new ExpireTimer(m, duration, this); t.Start(); m_Table[m] = t; BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.GiftOfLife, 1031615, 1075807, duration, m, null, true)); } FinishSequence(); }