Пример #1
0
        public void HarmfulSpell(IDamageable d)
        {
            if (d is BaseCreature)
            {
                ((BaseCreature)d).OnHarmfulSpell(m_Caster);
            }
            else if (d is IDamageableItem)
            {
                ((IDamageableItem)d).OnHarmfulSpell(m_Caster);
            }

            NegativeAttributes.OnCombatAction(Caster);

            if (d is Mobile)
            {
                if ((Mobile)d != m_Caster)
                {
                    NegativeAttributes.OnCombatAction((Mobile)d);
                }

                EvilOmenSpell.TryEndEffect((Mobile)d);
            }
        }
Пример #2
0
        public void HarmfulSpell(IDamageable d)
        {
            if (d is BaseCreature creature)
            {
                creature.OnHarmfulSpell(m_Caster);
            }
            else if (d is IDamageableItem item)
            {
                item.OnHarmfulSpell(m_Caster);
            }

            NegativeAttributes.OnCombatAction(Caster);

            if (d is Mobile mobile)
            {
                if (mobile != m_Caster)
                {
                    NegativeAttributes.OnCombatAction(mobile);
                }

                EvilOmenSpell.TryEndEffect(mobile);
            }
        }