예제 #1
0
            protected override void OnTarget(Mobile from, object o)
            {
                if (o is Mobile)
                {
                    if (o == from)
                    {
                        from.SendMessage("You can't target yourself.");
                        return;
                    }

                    TeiravonMobile m_Player = (TeiravonMobile)from;
                    Mobile         m_Target = (Mobile)o;

                    if (m_Target != null)
                    {
                        int bashdamage = m_ar;

                        if (shield is SpikedShield)
                        {
                            bashdamage = bashdamage + (int)(m_Player.PlayerLevel * 1.5);
                        }

                        m_Target.Damage(bashdamage, from);

                        if (Utility.Random(1, 20) <= m_Player.PlayerLevel)
                        {
                            from.SendMessage("You deliver a stunning blow!");
                            m_Target.SendMessage("The attack has stunned you!");
                            m_Target.Paralyze(m_Target.Player ? TimeSpan.FromSeconds(3.0) : TimeSpan.FromSeconds(6.0));
                            m_Target.FixedEffect(0x376A, 9, 32);
                            m_Target.PlaySound(0x204);
                        }
                    }

                    // Reuse Timer
                    TimerHelper m_TimerHelper = new TimerHelper((int)m_Player.Serial);
                    m_TimerHelper.DoFeat   = true;
                    m_TimerHelper.Feat     = TeiravonMobile.Feats.ShieldBash;
                    m_TimerHelper.Duration = Server.Teiravon.AbilityCoolDown.AtWill;
                    m_TimerHelper.Start();

                    m_Player.SetActiveFeats(TeiravonMobile.Feats.ShieldBash, true);
                }
                else
                {
                    from.SendMessage("That is not a living creature.");
                }
            }
예제 #2
0
        public override void Drink(Mobile from)
        {
            TeiravonMobile m_Player = (TeiravonMobile)from;

            if (m_Player.CanDrink(PEffect))
            {
                BasePotion.PlayDrinkEffect(from);
                this.Consume();

                m_Player.SendMessage("You take a sip of the potion...");

                TimerHelper m_TimerHelper = new TimerHelper((int)m_Player.Serial);

                m_TimerHelper.Potion   = PEffect;
                m_TimerHelper.Duration = Scale(from, Duration);
                m_TimerHelper.Start();

                m_Player.SetActivePotions(PEffect, true);
            }
            else
            {
                m_Player.SendMessage("You can't drink this now.");
            }
        }