Пример #1
0
            protected override void OnTick()
            {
                if (!dest.CheckAlive())
                {
                    Stop();
                    m_Table.Remove(dest);
                }

                if (DateTime.Now < NextTick)
                {
                    return;
                }

                if (DateTime.Now >= NextTick)
                {
                    double heal = Utility.RandomMinMax(6, 9) + source.Skills[SkillName.Magery].Value / 50.0;
                    heal *= ClericDivineFocusSpell.GetScalar(source);

                    dest.Heal((int)heal);

                    dest.PlaySound(0x202);
                    dest.FixedParticles(0x376A, 1, 62, 9923, 3, 3, EffectLayer.Waist);
                    dest.FixedParticles(0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist);
                    NextTick = DateTime.Now + TimeSpan.FromSeconds(4);
                }

                if (DateTime.Now >= Expire)
                {
                    Stop();
                    if (m_Table.Contains(dest))
                    {
                        m_Table.Remove(dest);
                    }
                }
            }
Пример #2
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                m.BoltEffect(0x480);

                SpellHelper.Turn(Caster, m);

                double damage = Caster.Skills[SkillName.SpiritSpeak].Value * ClericDivineFocusSpell.GetScalar(Caster);

                if (Core.AOS)
                {
                    SpellHelper.Damage(TimeSpan.Zero, m, Caster, damage, 0, 0, 0, 0, 100);
                }
                else
                {
                    SpellHelper.Damage(TimeSpan.Zero, m, Caster, damage);
                }
            }

            FinishSequence();
        }
Пример #3
0
            public HammerOfFaith(Mobile owner) : base(0x1439)
            {
                m_Owner    = owner;
                Weight     = 10.0;
                Layer      = Layer.TwoHanded;
                Hue        = 0x481;
                BlessedFor = owner;
                Slayer     = SlayerName.Silver;
                Name       = "Hammer of Faith";

                double time = (owner.Skills[SkillName.SpiritSpeak].Value / 20.0) * ClericDivineFocusSpell.GetScalar(owner);

                m_Expire = DateTime.UtcNow + TimeSpan.FromMinutes((int)time);
                m_Timer  = new InternalTimer(this, m_Expire);

                m_Timer.Start();
            }
        public override void OnCast()
        {
            TransformationSpellHelper.OnCast(Caster, this);

            if (CheckSequence())
            {
                RemoveEffect(Caster);

                object[] mods = new object[]
                {
                    new StatMod(StatType.Str, "[Cleric] Str Offset", 20, TimeSpan.Zero),
                    new StatMod(StatType.Dex, "[Cleric] Dex Offset", 20, TimeSpan.Zero),
                    new StatMod(StatType.Int, "[Cleric] Int Offset", 20, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Macing, true, 20),
                    new DefaultSkillMod(SkillName.Healing, true, 20),
                    new DefaultSkillMod(SkillName.Anatomy, true, 20)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddStatMod((StatMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);

                double span = 10.0 * ClericDivineFocusSpell.GetScalar(Caster);
                new InternalTimer(Caster, TimeSpan.FromMinutes((int)span)).Start();

                IMount mount = Caster.Mount;

                if (mount != null)
                {
                    mount.Rider = null;
                }

                Caster.BodyMod = 123;
                Caster.BeginAction(typeof(ClericAngelicFaithSpell));
                Caster.PlaySound(0x165);
                Caster.FixedParticles(0x3728, 1, 13, 0x480, 92, 3, EffectLayer.Head);
            }

            FinishSequence();
        }
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m, false))
            {
                SpellHelper.Turn(Caster, m);

                m.PlaySound(0x202);
                m.FixedParticles(0x376A, 1, 62, 0x480, 3, 3, EffectLayer.Waist);
                m.FixedParticles(0x3779, 1, 46, 0x481, 5, 3, EffectLayer.Waist);

                double toHeal = Caster.Skills[SkillName.SpiritSpeak].Value / 2.0 + Utility.Random(5);

                toHeal *= ClericDivineFocusSpell.GetScalar(Caster);

                m.Heal((int)toHeal);
            }

            FinishSequence();
        }