예제 #1
0
        private static void EventSink_BeforeDamage(BeforeDamageEventArgs e)
        {
            Perseverance spellsong = Spellsong.GetEffectSpellsong <Perseverance>(e.Mobile);

            if (spellsong != null)
            {
                e.Amount = (int)(e.Amount * (100 - spellsong.DamageTaken) / 100);
            }
        }
예제 #2
0
        public override int GetMana()
        {
            Spellsong song = GetActiveSpellsong(Caster, this.GetType());

            if (song != null)
            {
                return(0);
            }

            return(RequiredMana - ComputeManaBonus());
        }
예제 #3
0
        private static void Mobile_Damaged(Mobile m, DamagedEventArgs args)
        {
            bool isFromPlayer = args.From != null && args.From.IsPlayer;

            foreach (Spellsong spellsong in Spellsong.GetAllActiveSpellsongs(m).ToArray())
            {
                if (isFromPlayer || args.Amount > Utility.Random(50))
                {
                    // Your spell song has been interrupted.
                    spellsong.InterruptSong(1115710);
                }
            }
        }
예제 #4
0
        private static void Mobile_Damaged(Mobile sender, DamagedEventArgs e)
        {
            if (!sender.Alive)
            {
                return;
            }

            var spellsong = Spellsong.GetEffectSpellsong <Tribulation>(sender);

            if (spellsong != null)
            {
                spellsong.OnDamage(sender, e.Amount);
            }
        }
예제 #5
0
        private static void EventSink_BeforeDamage(BeforeDamageEventArgs e)
        {
            if (e.From == null)
            {
                return;
            }

            Inspire spellsong = Spellsong.GetEffectSpellsong <Inspire>(e.From);

            if (spellsong != null)
            {
                e.Amount = (int)(e.Amount * (100 + spellsong.DamageModifier) / 100);
            }
        }
예제 #6
0
        public override void OnCast()
        {
            Spellsong song = GetActiveSpellsong(Caster, this.GetType());

            if (song != null)
            {
                // You halt your spellsong.
                song.InterruptSong(1115774);
            }
            else
            {
                Caster.Target = new InternalTarget(this);
            }
        }
예제 #7
0
        protected void RemoveTarget(Mobile m)
        {
            Type type = this.GetType();

            Spellsong song = GetEffectSpellsong(m, type);

            if (song != null && song.Caster == Caster)
            {
                m_EffectTable[m].Remove(type);

                if (m_EffectTable[m].IsEmpty())
                {
                    m_EffectTable.Remove(m);
                }

                OnTargetRemoved(m);
            }
        }
예제 #8
0
        public override void OnCast()
        {
            Spellsong song = GetActiveSpellsong(Caster, this.GetType());

            if (song != null)
            {
                // You halt your spellsong.
                song.InterruptSong(1115774);
            }
            else if (CheckSequence())
            {
                m_Targets = new HashSet <Mobile>();

                StartSong();
            }

            FinishSequence();
        }
예제 #9
0
 public UpkeepTimer(Spellsong owner)
     : base(TimeSpan.FromSeconds(2.0), TimeSpan.FromSeconds(2.0))
 {
     m_Owner = owner;
 }