Пример #1
0
            public void OnDamage()
            {
                if (DateTime.Now > (m_LastExploded + TimeSpan.FromSeconds(2.0)))
                {
                    int exploChance = 90 - (m_Explosions * 30);

                    double resist = m_Target.Skills[SkillName.MagicResist].Value;

                    if (resist >= 70)
                    {
                        exploChance -= (int)((resist - 70.0) * 3.0 / 10.0);
                    }

                    if (exploChance > Utility.Random(100))
                    {
                        m_Owner.VisualEffect(m_Target);

                        int damage = m_Owner.GetNewAosDamage(15 + (m_Explosions * 3), 1, 5, m_Target);

                        m_Explosions++;
                        m_LastExploded = DateTime.Now;

                        int[] types = new int[4];
                        types[Utility.Random(types.Length)] = 100;

                        SpellHelper.Damage(m_Owner, m_Target, damage, 0, types[0], types[1], types[2], types[3]);

                        if (m_Explosions >= 3)
                        {
                            EndPlague();
                        }
                    }
                }
            }
Пример #2
0
            public void OnDamage()
            {
                if (DateTime.Now > m_LastExploded + TimeSpan.FromSeconds(2.0))
                {
                    int exploChance = 90 - m_Explosions * 30;

                    double resist = m_Target.Skills.MagicResist.Value;

                    if (resist >= 70)
                    {
                        exploChance -= (int)((resist - 70.0) * 3.0 / 10.0);
                    }

                    if (exploChance > Utility.Random(100))
                    {
                        m_Owner.VisualEffect(m_Target);

                        int damage = m_Owner.GetNewAosDamage(15 + m_Explosions * 3, 1, 5, m_Target);

                        m_Explosions++;
                        m_LastExploded = DateTime.Now;

                        SpellHelper.Damage(m_Owner, m_Target, damage, 0, 0, 0, 0, 0, 100);

                        if (m_Explosions >= 3)
                        {
                            EndPlague();
                        }
                    }
                }
            }