コード例 #1
0
            public NegativeBurstTimer(Mobile from) : base(TimeSpan.FromMilliseconds(300.0), TimeSpan.FromMilliseconds(300.0))
            {
                m_From             = from;
                m_StartingLocation = from.Location;
                m_Map   = from.Map;
                m_Count = 0;
                m_Point = new Point3D();

                foreach (Mobile m in from.GetMobilesInRange(15))
                {
                    if (m != null && Ability.CanTarget(from, m, true) && !TrueSlayer.IsUndead(m) && m.Alive && !m.Blessed)
                    {
                        Targets.Add(m);
                    }
                }
            }
コード例 #2
0
ファイル: RuneBow.cs プロジェクト: zerodowned/cov-shard-svn-1
        public override void OnHit(Mobile attacker, Mobile defender, double damageBonus)
        {
            switch (m_Runes)
            {
            case RuneBowRunes.Draconic:
            {
                if (defender is BaseCreature && ((BaseCreature)defender).CanBreath)
                {
                    base.OnHit(attacker, defender, damageBonus + 1.0);
                }
                else
                {
                    base.OnHit(attacker, defender, damageBonus);
                }
                break;
            }

            case RuneBowRunes.Champion:
            {
                if (defender is BaseChampion)
                {
                    base.OnHit(attacker, defender, damageBonus + 1.0);
                }
                else
                {
                    base.OnHit(attacker, defender, damageBonus);
                }
                break;
            }

            case RuneBowRunes.Faith:
            {
                if (TrueSlayer.IsUndead(defender))
                {
                    base.OnHit(attacker, defender, damageBonus + 1.0);
                }
                else
                {
                    base.OnHit(attacker, defender, damageBonus);
                }
                break;
            }

            case RuneBowRunes.Paragon:
            {
                if (defender is BaseCreature && ((BaseCreature)defender).IsParagon)
                {
                    base.OnHit(attacker, defender, damageBonus + 1.0);
                }
                else
                {
                    base.OnHit(attacker, defender, damageBonus);
                }
                break;
            }

            case RuneBowRunes.Peerless:
            {
                if (defender is BasePeerless)
                {
                    base.OnHit(attacker, defender, damageBonus + 1.0);
                }
                else
                {
                    base.OnHit(attacker, defender, damageBonus);
                }
                break;
            }

            default: base.OnHit(attacker, defender, damageBonus); break;
            }
        }