Exemplo n.º 1
0
        public void Target(Mobile mobile)
        {
            if (!Caster.CanSee(mobile) || mobile.Hidden)
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckHSequence(mobile))
            {
                SpellHelper.Turn(Caster, mobile);
                SpellHelper.CheckReflect((int)this.Circle, Caster, ref mobile);

                if (mobile.Spell != null)
                {
                    mobile.Spell.OnCasterHurt();
                }

                mobile.Paralyzed = false;

                bool success = false;

                if (CheckMagicResist(mobile) && mobile is PlayerMobile)
                {
                    mobile.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
                }
                else
                {
                    ApplyEffect(Caster, mobile);
                    success = true;
                }

                //Player Enhancement Customization: Venomous
                bool venomous = false; //PlayerEnhancementPersistance.IsCustomizationEntryActive(Caster, CustomizationType.Venomous);

                if (venomous)
                {
                    if (success)
                    {
                        CustomizationAbilities.Venomous(mobile);
                    }

                    else
                    {
                        mobile.FixedParticles(0x374A, 10, 15, 5021, 0, 0, EffectLayer.Waist);
                        mobile.PlaySound(0x474);
                    }
                }

                else
                {
                    mobile.FixedParticles(0x374A, 10, 15, 5021, 0, 0, EffectLayer.Waist);
                    mobile.PlaySound(0x474);
                }
            }

            ArenaFight.SpellCompletion(Caster, typeof(PoisonSpell));

            FinishSequence();
        }
Exemplo n.º 2
0
            public override bool OnMoveOver(Mobile mobile)
            {
                if (Visible && m_Caster != null && SpellHelper.ValidIndirectTarget(m_Caster, mobile) && m_Caster.CanBeHarmful(mobile, false))
                {
                    m_Caster.DoHarmful(mobile);

                    //Player Enhancement Customization: Venomous
                    bool venomous = PlayerEnhancementPersistance.IsCustomizationEntryActive(m_Caster, CustomizationType.Venomous);

                    if (venomous)
                    {
                        CustomizationAbilities.Venomous(mobile);
                    }
                    else
                    {
                        mobile.PlaySound(0x474);
                    }

                    ApplyPoisonTo(mobile);
                }

                return(true);
            }
Exemplo n.º 3
0
                protected override void OnTick()
                {
                    if (m_Item.Deleted)
                    {
                        return;
                    }

                    if (!m_Item.Visible)
                    {
                        if (m_InLOS && m_CanFit)
                        {
                            m_Item.Visible = true;
                        }

                        else
                        {
                            m_Item.Delete();
                        }

                        if (!m_Item.Deleted)
                        {
                            m_Item.ProcessDelta();
                            Effects.SendLocationParticles(EffectItem.Create(m_Item.Location, m_Item.Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 5040);
                        }
                    }

                    else if (DateTime.UtcNow > m_Item.m_End)
                    {
                        m_Item.Delete();
                        Stop();
                    }

                    else
                    {
                        Map    map    = m_Item.Map;
                        Mobile caster = m_Item.m_Caster;

                        if (map != null && caster != null)
                        {
                            bool eastToWest         = (m_Item.ItemID == 0x3915);
                            IPooledEnumerable eable = map.GetMobilesInBounds(new Rectangle2D(m_Item.X - (eastToWest ? 0 : 1), m_Item.Y - (eastToWest ? 1 : 0), (eastToWest ? 1 : 2), (eastToWest ? 2 : 1)));

                            foreach (Mobile m in eable)
                            {
                                if ((m.Z + 16) > m_Item.Z && (m_Item.Z + 12) > m.Z && SpellHelper.ValidIndirectTarget(caster, m) && caster.CanBeHarmful(m, false))
                                {
                                    m_Queue.Enqueue(m);
                                }
                            }

                            eable.Free();

                            while (m_Queue.Count > 0)
                            {
                                Mobile mobile = (Mobile)m_Queue.Dequeue();

                                caster.DoHarmful(mobile);

                                //Player Enhancement Customization: Venomous
                                bool venomous = PlayerEnhancementPersistance.IsCustomizationEntryActive(caster, CustomizationType.Venomous);

                                if (venomous)
                                {
                                    CustomizationAbilities.Venomous(mobile);
                                }
                                else
                                {
                                    mobile.PlaySound(0x474);
                                }

                                m_Item.ApplyPoisonTo(mobile);
                            }
                        }
                    }
                }
Exemplo n.º 4
0
        public void Target(Mobile mobile)
        {
            if (!Caster.CanSee(mobile) || mobile.Hidden)
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckHSequence(mobile))
            {
                SpellHelper.Turn(Caster, mobile);
                SpellHelper.CheckReflect((int)this.Circle, Caster, ref mobile);

                if (mobile.Spell != null)
                {
                    mobile.Spell.OnCasterHurt();
                }

                mobile.Paralyzed = false;

                bool success = false;

                if (CheckMagicResist(mobile) && mobile is PlayerMobile)
                {
                    mobile.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
                }
                else
                {
                    ApplyEffect(Caster, mobile);
                    success = true;
                }

                //Player Enhancement Customization: Venomous
                bool venomous = PlayerEnhancementPersistance.IsCustomizationEntryActive(Caster, CustomizationType.Venomous);

                if (venomous)
                {
                    if (success)
                    {
                        CustomizationAbilities.Venomous(mobile);
                    }

                    else
                    {
                        mobile.FixedParticles(0x374A, 10, 15, 5021, 0, 0, EffectLayer.Waist);
                        mobile.PlaySound(0x474);
                    }
                }

                else
                {
                    mobile.FixedParticles(0x374A, 10, 15, 5021, 0, 0, EffectLayer.Waist);
                    mobile.PlaySound(0x474);
                }

                DungeonArmor.PlayerDungeonArmorProfile casterDungeonArmor = new DungeonArmor.PlayerDungeonArmorProfile(Caster, null);

                if (casterDungeonArmor.MatchingSet && !casterDungeonArmor.InPlayerCombat && mobile is BaseCreature)
                {
                    if (Utility.RandomDouble() <= casterDungeonArmor.DungeonArmorDetail.PoisonSpellNoManaCostChance)
                    {
                        Caster.Mana += 9;
                        Caster.SendMessage("You feel a rush of energy from your armor, fueling mana into the spell.");

                        Effects.PlaySound(Caster.Location, Caster.Map, 0x64B);
                        Effects.SendLocationParticles(EffectItem.Create(Caster.Location, Caster.Map, EffectItem.DefaultDuration), 0x376A, 9, 32, casterDungeonArmor.DungeonArmorDetail.EffectHue, 0, 5005, 0);
                    }
                }
            }

            FinishSequence();
        }