Exemple #1
0
        public virtual void Enter(Mobile fighter)
        {
            if (this.CanEnter(fighter))
            {
                // teleport party member's pets
                if (this.m_Pets.ContainsKey(fighter))
                {
                    for (int i = 0; i < this.m_Pets[fighter].Count; i++)
                    {
                        BaseCreature pet = this.m_Pets[fighter][i] as BaseCreature;

                        if (pet != null && pet.Alive && pet.InRange(fighter.Location, 5) && !(pet is BaseMount && ((BaseMount)pet).Rider != null) && this.CanEnter(pet))
                        {
                            pet.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);
                            pet.PlaySound(0x1FE);
                            pet.MoveToWorld(this.m_TeleportDest, Map.Ilshenar);
                        }
                    }
                }

                // teleport party member
                fighter.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);
                fighter.PlaySound(0x1FE);
                fighter.MoveToWorld(this.m_TeleportDest, Map.Ilshenar);

                // Robe of Rite Delete
                foreach (Item i in fighter.Items.Where(item => item is RobeofRite && item.Parent is Mobile && ((Mobile)item.Parent).FindItemOnLayer(item.Layer) == item).ToList())
                {
                    i.Delete();
                }

                Timer.DelayCall(TimeSpan.FromMinutes(1), new TimerCallback(AltarDelete));
            }
        }
Exemple #2
0
        public virtual void Enter(Mobile fighter)
        {
            if (this.CanEnter(fighter))
            {
                // teleport party member's pets
                if (this.m_Pets.ContainsKey(fighter))
                {
                    for (int i = 0; i < this.m_Pets[fighter].Count; i++)
                    {
                        BaseCreature pet = this.m_Pets[fighter][i] as BaseCreature;

                        if (pet != null && pet.Alive && pet.InRange(fighter.Location, 5) && !(pet is BaseMount && ((BaseMount)pet).Rider != null) && this.CanEnter(pet))
                        {
                            pet.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);
                            pet.PlaySound(0x1FE);
                            pet.MoveToWorld(this.m_TeleportDest, this.Map);
                        }
                    }
                }

                // teleport party member
                fighter.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);
                fighter.PlaySound(0x1FE);
                fighter.MoveToWorld(this.m_TeleportDest, this.Map);
            }
        }
 public static void BlessedXML(BaseCreature bc, Mobile player)
 {
     bc.Emote("*you see {0} looks ready to fight harder!*", bc.Name);
     bc.AddStatMod(new StatMod(StatType.Dex, "XmlDex", Utility.RandomMinMax(20, 60), TimeSpan.FromSeconds(25.0)));
     bc.AddStatMod(new StatMod(StatType.Str, "XmlStr", Utility.RandomMinMax(20, 60), TimeSpan.FromSeconds(25.0)));
     bc.AddStatMod(new StatMod(StatType.Int, "XmlInt", Utility.RandomMinMax(20, 60), TimeSpan.FromSeconds(25.0)));
     bc.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
     bc.PlaySound(0x1EA);
     bc.InvalidateProperties();
 }
        public bool DoEffects(BaseCreature bc)
        {
            bc.PlaySound(0x1EA);
            bc.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);

            m_Table.Add(bc, DateTime.Now);
            Timer.DelayCall(Duration + CoolDown, new TimerStateCallback(RemoveInfluence), bc);

            bc.TempDamageAbsorb = Bonus;
            bc.Loyalty          = BaseCreature.MaxLoyalty;

            Consume();
            return(true);
        }
Exemple #5
0
        public override void OnRemoved(object parent)
        {
            base.OnRemoved(parent);

            if (parent is Mobile)
            {
                Mobile m = (Mobile)parent;
                m.RemoveStatMod(Serial.ToString() + "Forest-Dex");
                if (m_Summon != null && !m_Summon.Deleted)
                {
                    m_Summon.FixedParticles(0x3728, 1, 10, 9910, EffectLayer.Head);
                    m.SendMessage("The summoned creature fades as you release the bow from your hands.");
                    m_Summon.Delete();
                }
            }
        }
Exemple #6
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                TimeSpan duration = TimeSpan.FromSeconds((2 * Caster.Skills.Magery.Fixed) / 5);

                if (Core.AOS)
                {
                    SpellHelper.Summon(m_Daemon, Caster, 0x216, duration, false, false);
                    m_Daemon.FixedParticles(0x3728, 8, 20, 5042, EffectLayer.Head);
                }
                else
                {
                    SpellHelper.Summon(new Daemon(), Caster, 0x216, duration, false, false);
                }
            }

            FinishSequence();
        }
Exemple #7
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target == from)
                {
                    from.SendMessage("You cannot use this on yourself!");
                }

                else if (target is PlayerMobile)
                {
                    from.SendMessage("You cannot heal that.");
                }

                else if (target is Item)
                {
                    from.SendMessage("You cannot use this on that.");
                }

                else if (target is BaseCreature)
                {
                    BaseCreature c = (BaseCreature)target;
                    if (c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false)
                    {
                        from.SendMessage("You cannot heal that.");
                    }
                    else if (c.Controlled == false)
                    {
                        from.SendMessage("That is not tamed.");
                    }
                    else if (c.Hits == c.HitsMax)
                    {
                        from.SendMessage("This creature does not require healing.");
                    }
                    else
                    {
                        c.Hits += Utility.RandomList(30, 50);
                        c.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist);
                        from.PlaySound(0x1F2);

                        m_Powder.Consume();
                        from.AddToBackpack(new Bottle());
                    }
                }
            }
Exemple #8
0
        public bool DoEffects(BaseCreature bc)
        {
            string modName = Serial.ToString();

            bc.AddStatMod(new StatMod(StatType.Str, bc.Serial + "Str", (int)(bc.RawStr * Bonus), Duration));
            bc.AddStatMod(new StatMod(StatType.Int, bc.Serial + "Int", (int)(bc.RawInt * Bonus), Duration));
            bc.AddStatMod(new StatMod(StatType.Dex, bc.Serial + "Dex", (int)(bc.RawDex * Bonus), Duration));

            bc.PlaySound(0x1EA);
            bc.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);

            bc.TempDamageBonus = DamageBonus;
            bc.Loyalty         = BaseCreature.MaxLoyalty;

            m_Table.Add(bc, DateTime.UtcNow);
            Timer.DelayCall(Duration + CoolDown, new TimerStateCallback(RemoveInfluence), bc);

            Consume();
            return(true);
        }
Exemple #9
0
        public bool DoEffects(Mobile owner, BaseCreature bc)
        {
            owner.SendLocalizedMessage(1158685); // Your pet is now Caddellite infused by this treat.

            bc.PlaySound(0x1EA);
            bc.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);

            bc.Loyalty = BaseCreature.MaxLoyalty;

            if (Table == null)
            {
                Table = new Dictionary <BaseCreature, DateTime>();
            }

            Table.Add(bc, DateTime.UtcNow + TimeSpan.FromHours(1));
            Timer.DelayCall(TimeSpan.FromHours(Duration), RemoveInfluence, bc);

            Caddellite.UpdateBuff(owner);

            Consume();
            return(true);
        }
Exemple #10
0
        public virtual void Exit(Mobile fighter)
        {
            // teleport fighter
            if (fighter.NetState == null)
            {
                fighter.LogoutLocation = this.m_ExitDest;
            }
            else
            {
                fighter.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);
                fighter.PlaySound(0x1FE);

                if (this is CitadelAltar)
                {
                    fighter.MoveToWorld(this.m_ExitDest, Map.Tokuno);
                }
                else
                {
                    fighter.MoveToWorld(this.m_ExitDest, this.Map);
                }
            }

            // teleport his pets
            if (this.m_Pets.ContainsKey(fighter))
            {
                for (int i = 0; i < this.m_Pets[fighter].Count; i++)
                {
                    BaseCreature pet = this.m_Pets[fighter][i] as BaseCreature;

                    if (pet != null && (pet.Alive || pet.IsBonded) && pet.Map != Map.Internal)
                    {
                        if (pet is BaseMount)
                        {
                            BaseMount mount = (BaseMount)pet;

                            if (mount.Rider != null && mount.Rider != fighter)
                            {
                                mount.Rider.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);
                                mount.Rider.PlaySound(0x1FE);

                                if (this is CitadelAltar)
                                {
                                    mount.Rider.MoveToWorld(this.m_ExitDest, Map.Tokuno);
                                }
                                else
                                {
                                    mount.Rider.MoveToWorld(this.m_ExitDest, this.Map);
                                }

                                continue;
                            }
                            else if (mount.Rider != null)
                            {
                                continue;
                            }
                        }

                        pet.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist);
                        pet.PlaySound(0x1FE);

                        if (this is CitadelAltar)
                        {
                            pet.MoveToWorld(this.m_ExitDest, Map.Tokuno);
                        }
                        else
                        {
                            pet.MoveToWorld(this.m_ExitDest, this.Map);
                        }
                    }
                }
            }

            this.m_Fighters.Remove(fighter);
            this.m_Pets.Remove(fighter);

            fighter.SendLocalizedMessage(1072677); // You have been transported out of this room.

            if (this.m_Fighters.Count == 0)
            {
                this.FinishSequence();
            }
        }
		public static void CheckLevel( Mobile defender, BaseCreature attacker, int count )
		{
			bool nolevel = false;
			Type typ = attacker.GetType();
			string nam = attacker.Name;

			foreach ( string check in FSATS.NoLevelCreatures )
			{
  				if ( check == nam )
    					nolevel = true;
			}

			if ( nolevel != false )
				return;

			int expgainmin, expgainmax;

			if ( attacker is BaseBioCreature || attacker is BioCreature || attacker is BioMount )
			{
			}
			else if ( defender is BaseCreature )
			{
				if ( attacker.Controlled == true && attacker.ControlMaster != null && attacker.Summoned == false )
				{
					BaseCreature bc = (BaseCreature)defender;

					expgainmin = bc.HitsMax * 25;
					expgainmax = bc.HitsMax * 50;

					int xpgain = Utility.RandomMinMax( expgainmin, expgainmax );
					
					if ( count > 1 )
						xpgain = xpgain / count;

					if ( attacker.Level <= attacker.MaxLevel - 1 )
					{
						attacker.Exp += xpgain;
						attacker.ControlMaster.SendMessage( "Your pet has gained {0} experience points.", xpgain );
					}
			
					int nextLevel = attacker.NextLevel * attacker.Level;

					if ( attacker.Exp >= nextLevel && attacker.Level <= attacker.MaxLevel - 1 )
					{
						DoLevelBonus( attacker );

						Mobile cm = attacker.ControlMaster;
						attacker.Level += 1;
						attacker.Exp = 0;
						attacker.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
						attacker.PlaySound( 503 );
						cm.SendMessage( 38, "Your pets level has increased to {0}.", attacker.Level );

						int gain = Utility.RandomMinMax( 10, 50 );

						attacker.AbilityPoints += gain;

						if ( attacker.ControlMaster != null )
						{
							attacker.ControlMaster.SendMessage( 38, "Your pet {0} has gained some ability points.", gain );
						}

						if ( attacker.Level == 9 )
						{
							attacker.AllowMating = true;
							cm.SendMessage( 1161, "Your pet is now at the level to mate." );
						}
						if ( attacker.Evolves == true )
						{
							if ( attacker.UsesForm1 == true && attacker.F0 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form1;
								attacker.BaseSoundID = attacker.Sound1;
								attacker.F1 = true;
								attacker.F2 = false;
								attacker.F3 = false;
								attacker.F4 = false;
								attacker.F5 = false;
								attacker.F6 = false;
								attacker.F7 = false;
								attacker.F8 = false;
								attacker.F9 = false;
								attacker.UsesForm1 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( attacker.UsesForm2 == true && attacker.F1 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form2;
								attacker.BaseSoundID = attacker.Sound2;
								attacker.F1 = false;
								attacker.F2 = true;
								attacker.F3 = false;
								attacker.F4 = false;
								attacker.F5 = false;
								attacker.F6 = false;
								attacker.F7 = false;
								attacker.F8 = false;
								attacker.F9 = false;
								attacker.UsesForm2 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( attacker.UsesForm3 == true && attacker.F2 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form3;
								attacker.BaseSoundID = attacker.Sound3;
								attacker.F1 = false;
								attacker.F2 = false;
								attacker.F3 = true;
								attacker.F4 = false;
								attacker.F5 = false;
								attacker.F6 = false;
								attacker.F7 = false;
								attacker.F8 = false;
								attacker.F9 = false;
								attacker.UsesForm3 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( attacker.UsesForm4 == true && attacker.F3 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form4;
								attacker.BaseSoundID = attacker.Sound4;
								attacker.F1 = false;
								attacker.F2 = false;
								attacker.F3 = false;
								attacker.F4 = true;
								attacker.F5 = false;
								attacker.F6 = false;
								attacker.F7 = false;
								attacker.F8 = false;
								attacker.F9 = false;
								attacker.UsesForm4 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( attacker.UsesForm5 == true && attacker.F4 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form5;
								attacker.BaseSoundID = attacker.Sound5;
								attacker.F1 = false;
								attacker.F2 = false;
								attacker.F3 = false;
								attacker.F4 = false;
								attacker.F5 = true;
								attacker.F6 = false;
								attacker.F7 = false;
								attacker.F8 = false;
								attacker.F9 = false;
								attacker.UsesForm5 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( attacker.UsesForm6 == true && attacker.F5 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form6;
								attacker.BaseSoundID = attacker.Sound6;
								attacker.F1 = false;
								attacker.F2 = false;
								attacker.F3 = false;
								attacker.F4 = false;
								attacker.F5 = false;
								attacker.F6 = true;
								attacker.F7 = false;
								attacker.F8 = false;
								attacker.F9 = false;
								attacker.UsesForm6 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( attacker.UsesForm7 == true && attacker.F6 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form7;
								attacker.BaseSoundID = attacker.Sound7;
								attacker.F1 = false;
								attacker.F2 = false;
								attacker.F3 = false;
								attacker.F4 = false;
								attacker.F5 = false;
								attacker.F6 = false;
								attacker.F7 = true;
								attacker.F8 = false;
								attacker.F9 = false;
								attacker.UsesForm7 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( attacker.UsesForm8 == true && attacker.F7 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form8;
								attacker.BaseSoundID = attacker.Sound8;
								attacker.F1 = false;
								attacker.F2 = false;
								attacker.F3 = false;
								attacker.F4 = false;
								attacker.F5 = false;
								attacker.F6 = false;
								attacker.F7 = false;
								attacker.F8 = true;
								attacker.F9 = false;
								attacker.UsesForm8 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}
							else if ( attacker.UsesForm9 == true && attacker.F8 == true )
							{
								DoEvoCheck( attacker );

								attacker.BodyValue = attacker.Form9;
								attacker.BaseSoundID = attacker.Sound9;
								attacker.F1 = false;
								attacker.F2 = false;
								attacker.F3 = false;
								attacker.F4 = false;
								attacker.F5 = false;
								attacker.F6 = false;
								attacker.F7 = false;
								attacker.F8 = false;
								attacker.F9 = true;
								attacker.UsesForm9 = false;
								cm.SendMessage( 64, "Your pet has evoloved." );
							}	
						}
					}
				}
			}
		}
Exemple #12
0
            protected override void OnTarget(Mobile from, object targeted)
            {
////////////////////////////////////////////////////////////// Mobiles
                if (targeted is BaseCreature)
                {
                    BaseCreature creature = (BaseCreature)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, creature, 0.0, 100.0))
                    {
////////////////////////////////////////////////////////////// Zaythalor Forest
                        if (creature is BlackAntZaythalorForest)
                        {
                            creature.Say("Bro, I ain't worth nutin! You hear me {0}", from.Name);
                        }
                        else if (creature is FaerieBeetle)
                        {
                            from.Hits += (Utility.Random(10, 15));
                            from.FixedParticles(0x375A, 1, 30, 9966, 88, 2, EffectLayer.Head);
                            from.FixedParticles(0x37B9, 1, 30, 9502, 85, 3, EffectLayer.Head);
                            from.FixedParticles(0x376A, 1, 31, 9961, 80, 0, EffectLayer.Waist);
                            from.FixedParticles(0x37C4, 1, 31, 9502, 88, 2, EffectLayer.Waist);
                            from.PlaySound(0x202);

                            from.SendMessage("It's magically delicious.");
                        }
                        else if (creature is FaerieBeetleCollector)
                        {
                            from.Hits += (Utility.Random(2, 5));
                            from.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist);
                            from.PlaySound(0x1F2);

                            from.SendMessage("It's magically delicious, at a fraction of the price.");
                        }
                        else if (creature is ForestBat)
                        {
                            creature.SendMessage("Nah Nah Nah Nah Nah Nah Nah Nah! Batman!");
                        }
                        else if (creature is GazerLarva)
                        {
                            if (from.Skills.Magery.Base >= 50.0)
                            {
                                from.Skills.Magery.Base += 0.2;
                                creature.Kill();
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }
                        else if (creature is Gizzard)
                        {
                            from.AddToBackpack(new BlackPearl(5));
                            creature.Combatant = from;

                            if (from.Skills.Magery.Base >= 50.0)
                            {
                                from.Skills.Magery.Base += 0.2;
                                creature.Kill();
                            }
                        }
                        else if (creature is GreenSlime)
                        {
                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.Kill();
                            }
                            else
                            {
                                from.SendMessage("Slimer!");
                                from.ApplyPoison(from, Poison.Lesser);
                            }
                        }
                        else if (creature is GreySquirrel)
                        {
                            from.AddToBackpack(new Apple(3));
                            creature.Combatant = from;

                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Kill();
                            }
                        }
                        else if (creature is LargeFrog)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 80;
                                from.HueMod  = 663;
                                from.SendMessage("You shall forever remain stuck as a large frog until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                                creature.Say("*ribbit!*");
                            }
                        }
                        else if (creature is LesserAntLion)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 787;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a lesser antlion until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }
                        else if (creature is MadPumpkinSpirit)
                        {
                            if (from.Skills.Cooking.Base >= 50.0)
                            {
                                from.Skills.Cooking.Base += 0.3;
                                creature.Kill();
                            }
                            else
                            {
                                creature.Combatant = from;
                                creature.Say("*Not Appropriate!*");
                            }
                        }
                        else if (creature is RhinoBeetle)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 247;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a rhino beetle until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                                creature.PlaySound(0x21D);
                                creature.Say("*fresh meat!*");
                            }
                        }
                        else if (creature is WildTurkey)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 1026;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a wild turkey until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }
                        else if (creature is Ogumo)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                creature.Kill();
                                from.AddToBackpack(new SpiderPotion());
                                from.SendMessage("You vanquish thy foe using your dirty mouth. A potion has been added to your pack. Use it wisely.");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

////////////////////////////////////////////////////////////// Alytharr Region

                        else if (creature is SandCrab)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 357;
                                from.HueMod  = 1864;
                                from.SendMessage("You shall forever remain stuck as a sand crab until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

                        else if (creature is WyvernYoungling)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 62;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a wyvern until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

////////////////////////////////////////////////////////////// Autumnwood

                        else if (creature is Harpy)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 30;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a harpy until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

                        else if (creature is SkitteringHopper)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 302;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a skittering hopper until your next death");
                                from.Flying = true;
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

////////////////////////////////////////////////////////////// Glimmerwood

                        else if (creature is HealerAnt)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.Hits += (Utility.Random(25, 50));
                                from.FixedParticles(0x375A, 1, 30, 9966, 88, 2, EffectLayer.Head);
                                from.FixedParticles(0x37B9, 1, 30, 9502, 85, 3, EffectLayer.Head);
                                from.FixedParticles(0x376A, 1, 31, 9961, 80, 0, EffectLayer.Waist);
                                from.FixedParticles(0x37C4, 1, 31, 9502, 88, 2, EffectLayer.Waist);
                                from.PlaySound(0x202);
                            }
                        }
                        else if (creature is Parrot)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            creature.Combatant = from;

                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Kill();
                            }
                        }

////////////////////////////////////////////////////////////// Harashi Nabi Desert

                        else if (creature is OphidianMatriarch)
                        {
                            if (from.Skills.TasteID.Base >= 100.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 87;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as an ophidian matriarch until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }

////////////////////////////////////////////////////////////// Samson Swamplands

                        else if (creature is AnnoyingLlama1)
                        {
                            if (from.Skills.AnimalTaming.Base >= 50.0)
                            {
                                creature.Delete();
                                from.PlaySound(from.Female ? 792 : 1064);
                                from.Say("*farts*");
                            }
                            else
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Delete();
                                from.Skills.AnimalTaming.Base += 1;
                                from.PlaySound(from.Female ? 811 : 1085);
                                from.Say("*oooh!*");
                            }
                        }
                        else if (creature is AnnoyingLlama2)
                        {
                            if (from.Skills.AnimalTaming.Base >= 50.0)
                            {
                                creature.Delete();
                                from.PlaySound(from.Female ? 782 : 1053);
                                from.Say("*burp!*");
                            }
                            else
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Delete();
                                from.Skills.AnimalTaming.Base += 1;
                                from.PlaySound(from.Female ? 811 : 1085);
                                from.Say("*oooh!*");
                            }
                        }
                        else if (creature is AnnoyingLlama3)
                        {
                            if (from.Skills.AnimalTaming.Base >= 50.0)
                            {
                                creature.Delete();
                                from.PlaySound(from.Female ? 812 : 1086);
                                from.Say("*oops!*");
                            }
                            else
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Delete();
                                from.PlaySound(from.Female ? 811 : 1085);
                                from.Say("*oooh!*");
                                from.Skills.AnimalTaming.Base += 1;
                            }
                        }

////////////////////////////////////////////////////////////// Misc Mobiles
                        else if (creature is Bird)
                        {
                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Kill();
                            }
                        }
                        else if (creature is Boar)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            creature.Combatant = from;
                        }
                        else if (creature is Cat)
                        {
                            if (from.Skills.Poisoning.Base >= 50.0)
                            {
                                creature.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                creature.PlaySound(0x307);
                                creature.Kill();
                            }
                        }
                        else if (creature is Chicken)
                        {
                            if (from.Skills.TasteID.Base >= 50.0)
                            {
                                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                                from.BodyMod = 0xD0;
                                from.HueMod  = 0;
                                from.SendMessage("You shall forever remain stuck as a chicken until your next death");
                            }
                            else
                            {
                                creature.Combatant = from;
                                creature.Say("*bawk! bawk!*");
                            }
                        }
                        else if (creature is PoisonArrowFrog)
                        {
                            if (from.Skills.Poisoning.Base >= 80.0)
                            {
                                from.ApplyPoison(from, Poison.Lesser);
                                from.SendMessage("You've become too corrosive even for this toxic frog to handle.");
                            }
                            else
                            {
                                from.ApplyPoison(from, Poison.Lethal);
                                from.Skills.Poisoning.Base += 1;
                                creature.Kill();
                            }
                        }
                        else if (creature is Pookah)
                        {
                            if (from.Skills.Meditation.Base >= 50.0)
                            {
                                from.Location = new Point3D(364, 733, -20);                            // Glimmerwood Entrance
                                from.PlaySound(0x1FC);
                                from.SendMessage("You've been teleported to the entrance.");
                            }
                            else
                            {
                                creature.Combatant = from;
                            }
                        }
                        else if (creature is BaseGuardian)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            creature.Combatant = from;
                            creature.Say("Not gonna put up with that nonsense!");
                        }
                        else if (creature is BaseVendor)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            from.Karma = -100;
                            from.SendMessage("You've lost some karma.");
                            creature.Say("Faulk off {0}", from.Name);
                        }
                    }
                }
                else if (targeted is PlayerMobile)
                {
                    PlayerMobile playermobile = (PlayerMobile)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, playermobile, 0, 100.0))
                    {
                        if (playermobile.Female == false)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            from.Karma = -100;
                            from.SendMessage("You've lost some karma.");
                        }
                        else if (playermobile.Female == true)
                        {
                            from.PlaySound(from.Female ? 800 : 1072);
                            from.Say("*kisses*");
                            from.Karma = -100;
                            from.SendMessage("You've lost some karma.");
                        }
                    }
                }
                else if (targeted is Food)
                {
                    Food food = (Food)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, food, 0, 100))
                    {
                        if (food.Poison != null)
                        {
                            food.SendLocalizedMessageTo(from, 1038284);                               // It appears to have poison smeared on it.
                        }
                        else
                        {
                            // No poison on the food
                            food.SendLocalizedMessageTo(from, 1010600);                               // You detect nothing unusual about this substance.
                        }
                    }
////////////////////////////////////////////////////////////// Fruits
                    else if (food is Apple)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This apple appears rich in nutrients and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This apple appears rich in nutrients and has a fill factor of 1.");
                        }
                    }
                    else if (food is Bananas)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("These bananas make for a great breakfast and have a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("These bananas make for a great breakfast and have a fill factor of 1.");
                        }
                    }
                    else if (food is Cantaloupe)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This cantaloupe is as big as yo mommas biscuits and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This cantaloupe is as big as yo mommas biscuits and has a fill factor of 1.");
                        }
                    }
                    else if (food is Coconut)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This coconut may have been originally carried by a swallow of sorts and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This coconut may have been originally carried by a swallow of sorts and has a fill factor of 1.");
                        }
                    }
                    else if (food is Dates)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("These dates are a delicacy among Ljosalfar high class officials and have a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("These dates are a delicacy among Ljosalfar high class officials and have a fill factor of 1.");
                        }
                    }
                    else if (food is FruitBasket)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This fruit basket is one of a kind and has a fill factor of 5.");
                        }
                        else
                        {
                            from.SendMessage("This fruit basket is one of a kind and has a fill factor of 5.");
                        }
                    }
                    else if (food is FruitBowl)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This fruit bowl, the fruit baskets retarded cousin has a fill factor of 4. You're Welcome.");
                        }
                        else
                        {
                            from.SendMessage("This fruit bowl, the fruit baskets retarded cousin has a fill factor of 4. You're Welcome.");
                        }
                    }
                    else if (food is Grapes)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("These grapes are as violet as they come and have a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("These grapes are as violet as they come and have a fill factor of 1.");
                        }
                    }
                    else if (food is HoneydewMelon)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This melon is sometimes cherished by certain arachnids and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This melon is sometimes cherished by certain arachnids and has a fill factor of 1.");
                        }
                    }
                    else if (food is Lemon)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This lemon is not without its renowned sour touch and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This lemon is not without its renowned sour touch and has a fill factor of 1.");
                        }
                    }
                    else if (food is Lime)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This lime, normally considered the green bastard reject of the lemon and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This lime, normally considered the green bastard reject of the lemon and has a fill factor of 1.");
                        }
                    }
                    else if (food is Peach)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This peach has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This peach has a fill factor of 1.");
                        }
                    }
                    else if (food is PeachCobbler)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This peach cobbler has a fill factor of 5.");
                        }
                        else
                        {
                            from.SendMessage("This peach cobbler has a fill factor of 5.");
                        }
                    }
                    else if (food is Pear)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This pear has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This pear has a fill factor of 1.");
                        }
                    }
                    else if (food is SmallWatermelon)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This small watermelon has a fill factor of 3.");
                        }
                        else
                        {
                            from.SendMessage("This small watermelon has a fill factor of 3.");
                        }
                    }
                    else if (food is SplitCoconut)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This split coconut has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This split coconut has a fill factor of 1.");
                        }
                    }
                    else if (food is Squash)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This squash has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This squash has a fill factor of 1.");
                        }
                    }
                    else if (food is Watermelon)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This watermelon has a fill factor of 5.");
                        }
                        else
                        {
                            from.SendMessage("This watermelon has a fill factor of 5.");
                        }
                    }
////////////////////////////////////////////////////////////// Vegetables
                    else if (food is Cabbage)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This cabbage has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This cabbage has a fill factor of 1.");
                        }
                    }
                    else if (food is Carrot)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This carrot has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This carrot has a fill factor of 1.");
                        }
                    }
                    else if (food is EarOfCorn)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This ear of corn has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This ear of corn has a fill factor of 1.");
                        }
                    }
                    else if (food is GreenGourd)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This green gourd has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This green gourd has a fill factor of 1.");
                        }
                    }
                    else if (food is Lettuce)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This head of lettuce has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This head of lettuce has a fill factor of 1.");
                        }
                    }
                    else if (food is Onion)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This onion is full of layers, like an ogre and has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This onion is full of layers, like an ogre and has a fill factor of 1.");
                        }
                    }
                    else if (food is Pumpkin)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This pumpkin has a fill factor of 8.");
                        }
                        else
                        {
                            from.SendMessage("This pumpkin has a fill factor of 8.");
                        }
                    }
                    else if (food is Quiche)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This quiche has a fill factor of 5.");
                        }
                        else
                        {
                            from.SendMessage("This quiche has a fill factor of 5.");
                        }
                    }
                    else if (food is SmallPumpkin)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This small pumpkin has a fill factor of 6.");
                        }
                        else
                        {
                            from.SendMessage("This small pumpkin has a fill factor of 6.");
                        }
                    }
                    else if (food is Turnip)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This turnip has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This turnip has a fill factor of 1.");
                        }
                    }
                    else if (food is YellowGourd)
                    {
                        if (from.CheckTargetSkill(SkillName.TasteID, food, 0.0, 100.0))
                        {
                            from.SendMessage("This yellow gourd has a fill factor of 1.");
                        }
                        else
                        {
                            from.SendMessage("This yellow gourd has a fill factor of 1.");
                        }
                    }
                    else
                    {
                        // Skill check failed
                        food.SendLocalizedMessageTo(from, 502823);                           // You cannot discern anything about this substance.
                    }
                }
                else if (targeted is BasePotion)
                {
                    BasePotion potion = (BasePotion)targeted;

                    potion.SendLocalizedMessageTo(from, 502813);                       // You already know what kind of potion that is.
                    potion.SendLocalizedMessageTo(from, potion.LabelNumber);
                }
                else if (targeted is PotionKeg)
                {
                    PotionKeg keg = (PotionKeg)targeted;

                    if (keg.Held <= 0)
                    {
                        keg.SendLocalizedMessageTo(from, 502228);                           // There is nothing in the keg to taste!
                    }
                    else
                    {
                        keg.SendLocalizedMessageTo(from, 502229);                           // You are already familiar with this keg's contents.
                        keg.SendLocalizedMessageTo(from, keg.LabelNumber);
                    }
                }
                else if (targeted is DecoHorseDung)
                {
                    DecoHorseDung horsedung = (DecoHorseDung)targeted;

                    from.RawInt -= 1;
                    from.Fame   -= 5000;
                    from.Karma  -= 5000;

                    if (0.05 > Utility.RandomDouble())
                    {
                        from.RawInt -= 1;
                        from.Fame   -= 10000;
                        from.Karma  -= 10000;
                        from.Kill();
                    }
                    else if (from.RawInt <= 1)
                    {
                        from.Delete();
                        World.Broadcast(0x35, true, string.Format("{0} was permanently killed off due to being a colossal scathead!", from.Name));
                    }
                }
                else if (targeted is BaseWeapon)
                {
                    BaseWeapon weapon = (BaseWeapon)targeted;

                    if (from.CheckTargetSkill(SkillName.TasteID, weapon, 0.0, 100.0))
                    {
                        if (weapon is BaseAxe)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseBashing)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseKnife)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BasePoleArm)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 15));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseSpear)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseStaff)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                        else if (weapon is BaseSword)
                        {
                            from.PlaySound(from.Female ? 814 : 1088);
                            AOS.Damage(from, 0, 0, 0, 0, 0, 0);
                            from.Hits -= (Utility.Random(1, 10));

                            if (from.Hits <= 10)
                            {
                                from.Kill();
                            }
                        }
                    }
                }
                else
                {
                    // The target is not food or potion or potion keg.
                    from.SendLocalizedMessage(502820);                       // That's not something you can taste.
                }
            }
            protected override void OnTarget(Mobile from, object targeted)
            {
                PlayerMobile pm = from as PlayerMobile;

                if (m_Tasty.Deleted)
                {
                    return;
                }

                if (targeted is BaseCreature)
                {
                    BaseCreature creature = (BaseCreature)targeted;

                    Change1 = (int)((creature.RawStr) * 1.10);
                    Change2 = (int)((creature.RawDex) * 1.10);
                    Change3 = (int)((creature.RawInt) * 1.10);

                    Change4 = (int)(creature.RawStr);
                    Change5 = (int)(creature.RawDex);
                    Change6 = (int)(creature.RawInt);

                    if ((creature.Controlled || creature.Summoned) && (from == creature.ControlMaster) && !(creature.Sleep))
                    {
                        creature.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
                        creature.PlaySound(0x1EA);

                        creature.RawStr = Change1;
                        creature.RawDex = Change2;
                        creature.RawInt = Change3;

                        from.SendMessage("You have increased the Stats of your pet by 10% for 10 Minutes !!");
                        m_Tasty.m_Used = true;
                        creature.Sleep = true;


                        Timer.DelayCall(TimeSpan.FromMinutes(10.0), delegate()
                        {
                            creature.RawStr = Change4;
                            creature.RawDex = Change5;
                            creature.RawInt = Change6;
                            creature.PlaySound(0x1EB);

                            m_Tasty.m_Used = true;
                            creature.Sleep = false;

                            from.SendMessage("The effect of Deliciously Tasty Treat is Finish !");

                            Timer.DelayCall(TimeSpan.FromMinutes(60.0), delegate()
                            {
                                m_Tasty.m_Used = false;
                            });
                        });
                    }
                    else if ((creature.Controlled || creature.Summoned) && (from == creature.ControlMaster) && (creature.Sleep))
                    {
                        from.SendLocalizedMessage(502676);
                    }
                    else
                    {
                        from.SendLocalizedMessage(1113049);
                    }
                }
                else
                {
                    from.SendLocalizedMessage(500329);
                }
            }
Exemple #14
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                PlayerMobile pm = from as PlayerMobile;

                if (m_Tasty.Deleted)
                {
                    return;
                }

                if (targeted is BaseCreature)
                {
                    BaseCreature creature = (BaseCreature)targeted;

                    if ((creature.Controlled || creature.Summoned) && (from == creature.ControlMaster) && !(creature.Sleep))
                    {
                        creature.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
                        creature.PlaySound(0x1EA);

                        ResistanceMod mod  = new ResistanceMod(ResistanceType.Physical, +15);
                        ResistanceMod mod1 = new ResistanceMod(ResistanceType.Fire, +10);
                        ResistanceMod mod2 = new ResistanceMod(ResistanceType.Cold, +10);
                        ResistanceMod mod3 = new ResistanceMod(ResistanceType.Poison, +10);
                        ResistanceMod mod4 = new ResistanceMod(ResistanceType.Energy, +10);
                        creature.AddResistanceMod(mod);
                        creature.AddResistanceMod(mod1);
                        creature.AddResistanceMod(mod2);
                        creature.AddResistanceMod(mod3);
                        creature.AddResistanceMod(mod4);

                        from.SendMessage("You have increased the Damage Absorption of your pet by 10% for 10 Minutes !!");
                        m_Tasty.m_Used = true;
                        creature.Sleep = true;


                        Timer.DelayCall(TimeSpan.FromMinutes(10.0), delegate()
                        {
                            ResistanceMod mod5 = new ResistanceMod(ResistanceType.Physical, -15);
                            ResistanceMod mod6 = new ResistanceMod(ResistanceType.Fire, -10);
                            ResistanceMod mod7 = new ResistanceMod(ResistanceType.Cold, -10);
                            ResistanceMod mod8 = new ResistanceMod(ResistanceType.Poison, -10);
                            ResistanceMod mod9 = new ResistanceMod(ResistanceType.Energy, -10);
                            creature.AddResistanceMod(mod5);
                            creature.AddResistanceMod(mod6);
                            creature.AddResistanceMod(mod7);
                            creature.AddResistanceMod(mod8);
                            creature.AddResistanceMod(mod9);
                            creature.PlaySound(0x1EB);

                            m_Tasty.m_Used = true;
                            creature.Sleep = false;
                            from.SendMessage("The effect of Vial of Armor Essence is finish !");

                            Timer.DelayCall(TimeSpan.FromMinutes(120.0), delegate()
                            {
                                m_Tasty.m_Used = false;
                            });
                        });
                    }
                    else if ((creature.Controlled || creature.Summoned) && (from == creature.ControlMaster) && (creature.Sleep))
                    {
                        from.SendMessage("Pet already under the influence of Vial of Armor Essence !");
                    }
                    else
                    {
                        from.SendLocalizedMessage(1113049);
                    }
                }
                else
                {
                    from.SendLocalizedMessage(500329);
                }
            }
Exemple #15
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target == from)
                {
                    from.SendMessage("You cannot use this on yourself!");
                }

                else if (target is PlayerMobile)
                {
                    from.SendMessage("That person gives you a dirty look.");
                }

                else if (target is Item)
                {
                    from.SendMessage("You cannot use this on that.");
                }

                else if (target is BaseCreature)
                {
                    BaseCreature c = (BaseCreature)target;
                    if (c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false)
                    {
                        from.SendMessage("That person gives you a dirty look.");
                    }
                    else if (c.Poison == null)
                    {
                        from.SendMessage("That creature is not poisoned.");
                    }
                    else if (c.Controlled == false)
                    {
                        from.SendMessage("That is not tamed.");
                    }
                    else
                    {
                        if (c.Poison == Poison.Lesser)
                        {
                            c.Poison = null;
                            from.SendMessage("You have cured this creature.");
                        }
                        else if (c.Poison == Poison.Regular)
                        {
                            if (Utility.Random(100) < 90)
                            {
                                switch (Utility.Random(1))
                                {
                                case 0:
                                    c.Poison = null;
                                    from.SendMessage("You have cured this creature.");
                                    break;
                                }
                            }
                            else
                            {
                                from.SendMessage("You fail to cure the creature.");
                            }
                        }
                        else if (c.Poison == Poison.Greater)
                        {
                            if (Utility.Random(100) < 75)
                            {
                                switch (Utility.Random(1))
                                {
                                case 0:
                                    c.Poison = null;
                                    from.SendMessage("You have cured this creature.");
                                    break;
                                }
                            }
                            else
                            {
                                from.SendMessage("You fail to cure the creature.");
                            }
                        }
                        else if (c.Poison == Poison.Deadly)
                        {
                            if (Utility.Random(100) < 50)
                            {
                                switch (Utility.Random(1))
                                {
                                case 0:
                                    c.Poison = null;
                                    from.SendMessage("You have cured this creature.");
                                    break;
                                }
                            }
                            else
                            {
                                from.SendMessage("You fail to cure the creature.");
                            }
                        }
                        else if (c.Poison == Poison.Lethal)
                        {
                            if (Utility.Random(100) < 25)
                            {
                                switch (Utility.Random(1))
                                {
                                case 0:
                                    c.Poison = null;
                                    from.SendMessage("You have cured this creature.");
                                    break;
                                }
                            }
                            else
                            {
                                from.SendMessage("You fail to cure the creature.");
                            }
                        }

                        c.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
                        from.PlaySound(0x1E0);

                        m_Powder.Delete();
                    }
                }
            }
Exemple #16
0
        public override void OnDoubleClick(Mobile from)
        {
            base.OnDoubleClick(from);

            PlayerMobile player = from as PlayerMobile;

            if (player == null)
            {
                return;
            }

            UOACZPersistance.CheckAndCreateUOACZAccountEntry(player);

            if (!UOACZSystem.IsUOACZValidMobile(player))
            {
                return;
            }

            if (player.IsUOACZHuman)
            {
                player.SendMessage("You decide against consuming this.");
                return;
            }

            if (!IsChildOf(from.Backpack))
            {
                from.SendMessage("That item must be in your pack in order to use it.");
                return;
            }

            if (DateTime.UtcNow < player.m_UOACZAccountEntry.UndeadProfile.NextUndeadItemAllowed)
            {
                string timeRemaining = Utility.CreateTimeRemainingString(DateTime.UtcNow, player.m_UOACZAccountEntry.UndeadProfile.NextUndeadItemAllowed, false, false, false, true, true);
                player.SendMessage("You may not use another undead item for " + timeRemaining + ".");

                return;
            }

            player.m_UOACZAccountEntry.UndeadProfile.NextUndeadItemAllowed = DateTime.UtcNow + TimeSpan.FromSeconds(UOACZSystem.UndeadItemCooldownSeconds);

            player.PlaySound(Utility.RandomList(0x5DA, 0x5A9, 0x5AB, 0x03A, 0x03B, 0x03C));

            TypeOfBrain brainType = m_BrainType;

            Timer.DelayCall(TimeSpan.FromSeconds(.25), delegate
            {
                switch (brainType)
                {
                case TypeOfBrain.Healing:
                    int hitsRegained = (int)(Math.Round((double)player.HitsMax * .33));
                    player.Heal(hitsRegained);

                    player.FixedParticles(0x376A, 9, 32, 5030, 0, 0, EffectLayer.Waist);
                    player.PlaySound(0x202);
                    break;

                case TypeOfBrain.Mana:
                    int manaRegained = (int)(Math.Round((double)player.ManaMax * .66));
                    player.Mana     += manaRegained;

                    player.FixedParticles(0x376A, 9, 32, 5030, 1364, 0, EffectLayer.Waist);
                    player.PlaySound(0x1EB);
                    break;

                case TypeOfBrain.SwarmHeal:
                    Queue m_Queue = new Queue();

                    foreach (BaseCreature follower in player.AllFollowers)
                    {
                        if (!UOACZSystem.IsUOACZValidMobile(follower))
                        {
                            continue;
                        }
                        if (Utility.GetDistance(player.Location, follower.Location) > 12)
                        {
                            continue;
                        }
                        if (follower.Hits == follower.HitsMax)
                        {
                            continue;
                        }

                        m_Queue.Enqueue(follower);
                    }

                    while (m_Queue.Count > 0)
                    {
                        BaseCreature follower = (BaseCreature)m_Queue.Dequeue();

                        int healingAmount = (int)(Math.Round((double)follower.HitsMax * .25));

                        follower.Heal(healingAmount);

                        follower.FixedParticles(0x376A, 9, 32, 5030, 0, 0, EffectLayer.Waist);
                        follower.PlaySound(0x202);
                    }
                    break;

                case TypeOfBrain.CooldownReduction:
                    player.FixedParticles(0x373A, 10, 15, 5036, EffectLayer.Head);
                    player.PlaySound(0x3BD);

                    foreach (UOACZUndeadAbilityEntry abilityEntry in player.m_UOACZAccountEntry.UndeadProfile.m_Abilities)
                    {
                        DateTime cooldown = abilityEntry.m_NextUsageAllowed;

                        double cooldownReduction = abilityEntry.m_CooldownMinutes * .20;

                        abilityEntry.m_NextUsageAllowed = abilityEntry.m_NextUsageAllowed.Subtract(TimeSpan.FromMinutes(cooldownReduction));
                    }

                    UOACZSystem.RefreshAllGumps(player);
                    break;
                }
            });

            Delete();
        }
        public static void ResolveSpecialEffect(BaseWeapon weapon, PlayerMobile player, BaseCreature bc_Creature)
        {
            if (weapon == null)
            {
                return;
            }
            if (weapon.Deleted)
            {
                return;
            }
            if (weapon.Aspect == AspectEnum.None)
            {
                return;
            }
            if (weapon.TierLevel == 0)
            {
                return;
            }
            if (player == null)
            {
                return;
            }
            if (bc_Creature == null)
            {
                return;
            }

            List <Mobile> m_TargetMobiles = new List <Mobile>();
            Queue         m_Queue         = new Queue();

            IPooledEnumerable mobilesInRange = null;

            int maxTargetCount = 10;

            double totalDamageToDistribute = 600;
            double maxIndividualDamage     = 200;
            double individualDamage        = 0;

            double damageVariation = .1;

            switch (weapon.Aspect)
            {
                #region Air Aspect

            case AspectEnum.Air:
                totalDamageToDistribute = 600;
                maxIndividualDamage     = 200;

                if (SpecialAbilities.HostileToPlayer(player, bc_Creature))
                {
                    m_TargetMobiles.Add(bc_Creature);
                }

                mobilesInRange = player.Map.GetMobilesInRange(player.Location, 8);

                foreach (Mobile mobile in mobilesInRange)
                {
                    if (mobile == bc_Creature)
                    {
                        continue;
                    }
                    if (mobile is PlayerMobile)
                    {
                        continue;
                    }
                    if (!SpecialAbilities.HostileToPlayer(player, mobile))
                    {
                        continue;
                    }

                    if (m_TargetMobiles.Count < maxTargetCount)
                    {
                        m_TargetMobiles.Add(mobile);
                    }
                }

                if (m_TargetMobiles.Count == 0)
                {
                    return;
                }

                individualDamage = totalDamageToDistribute / m_TargetMobiles.Count;

                if (individualDamage > maxIndividualDamage)
                {
                    individualDamage = maxIndividualDamage;
                }

                foreach (BaseCreature creature in m_TargetMobiles)
                {
                    m_Queue.Enqueue(creature);
                }

                while (m_Queue.Count > 0)
                {
                    BaseCreature creature = (BaseCreature)m_Queue.Dequeue();

                    creature.FixedParticles(0x3967, 10, 40, 5036, 2603, 0, EffectLayer.CenterFeet);

                    SpecialAbilities.HinderSpecialAbility(1.0, null, creature, 1.0, 5.0, false, -1, false, "", "You have been shocked!", "-1");

                    int damage = (int)(Math.Round((1 - damageVariation + (Utility.RandomDouble() * damageVariation * .2)) * individualDamage));

                    AOS.Damage(creature, player, damage, 0, 0, 0, 0, 0);

                    for (int a = 0; a < 5; a++)
                    {
                        Timer.DelayCall(TimeSpan.FromSeconds((double)a * 0.2), delegate
                        {
                            if (!SpecialAbilities.Exists(player))
                            {
                                return;
                            }
                            if (!SpecialAbilities.Exists(creature))
                            {
                                return;
                            }
                            if (player.Map != creature.Map)
                            {
                                return;
                            }
                            if (Utility.GetDistance(player.Location, creature.Location) > 20)
                            {
                                return;
                            }

                            IEntity startLocation = new Entity(Serial.Zero, new Point3D(player.Location.X, player.Location.Y, player.Location.Z + 5), player.Map);
                            IEntity endLocation   = new Entity(Serial.Zero, new Point3D(creature.Location.X, creature.Location.Y, creature.Location.Z + 5), creature.Map);

                            int particleSpeed = 5;

                            Effects.PlaySound(player.Location, player.Map, 0x211);

                            Effects.SendMovingParticles(startLocation, endLocation, 0x3818, particleSpeed, 0, false, false, 2603, 0, 9501, 0, 0, 0x100);

                            double distance      = Utility.GetDistanceToSqrt(player.Location, creature.Location);
                            double distanceDelay = (double)distance * .08;

                            Timer.DelayCall(TimeSpan.FromSeconds(distanceDelay), delegate
                            {
                                if (!SpecialAbilities.Exists(player))
                                {
                                    return;
                                }
                                if (!SpecialAbilities.Exists(creature))
                                {
                                    return;
                                }
                                if (Utility.GetDistance(player.Location, creature.Location) > 30)
                                {
                                    return;
                                }

                                creature.FixedParticles(0x3967, 10, 40, 5036, 2603, 0, EffectLayer.CenterFeet);

                                new Blood().MoveToWorld(creature.Location, creature.Map);
                            });
                        });
                    }
                }
                break;

                #endregion

                #region Command Aspect

            case AspectEnum.Command:
                break;

                #endregion

                #region Earth Aspect

            case AspectEnum.Earth:
                break;

                #endregion

                #region Eldritch Aspect

            case AspectEnum.Eldritch:
                break;

                #endregion

                #region Fire Aspect

            case AspectEnum.Fire:
                break;

                #endregion

                #region Lyric Aspect

            case AspectEnum.Lyric:
                break;

                #endregion

                #region Poison Aspect

            case AspectEnum.Poison:
                break;

                #endregion

                #region Shadow Aspect

            case AspectEnum.Shadow:
                break;

                #endregion

                #region Void Aspect

            case AspectEnum.Void:
                break;

                #endregion

                #region Water Aspect

            case AspectEnum.Water:
                break;

                #endregion
            }

            mobilesInRange.Free();
        }
            protected override void OnTick()
            {
                // cap the healing potential
                if (m_context.HealSummonsHP > m_context.HealSummonsHPMax)
                {
                    m_context.HealSummonsHP = m_context.HealSummonsHPMax;
                }

                if (m_context.Owner == null || m_context.Owner.Deleted || m_context.Owner.NetState == null || m_context.Owner.Map == Map.Internal)
                {
                    return;
                }

                // alert senior staff for analysis purposes
                SpiritSpeak.UsageReport(m_context.Owner, "Spirit Speak: HealSummons");

                // apply the healing
                ArrayList pets = new ArrayList();

                foreach (Mobile m in World.Mobiles.Values)
                {                       // it's a creature
                    if (m is BaseCreature)
                    {
                        BaseCreature bc = (BaseCreature)m;
                        // it's my creature
                        if (bc.Summoned && bc.SummonMaster == m_context.Owner)
                        {
                            // it's close
                            if (m_context.Owner.GetDistanceToSqrt(m) <= (m_context.Owner.Skills.SpiritSpeak.Value / 20.0))
                            {
                                pets.Add(bc);
                            }
                            else if (m_context.Owner.GetDistanceToSqrt(m) <= (m_context.Owner.Skills.SpiritSpeak.Value / 10.0))
                            {
                                m_context.Owner.SendMessage("You are too far away to heal your pet.");
                            }
                        }
                    }
                }

                for (int ix = 0; ix < pets.Count; ix++)
                {
                    BaseCreature pet = pets[ix] as BaseCreature;
                    if (pet.Hits < pet.HitsMax)
                    {
                        int delta = pet.HitsMax - pet.Hits;
                        if (delta < m_context.HealSummonsHP)
                        {                               // heal this much
                            pet.Heal(delta);
                            m_context.HealSummonsHP -= delta;
                        }
                        else
                        {                               // using the last of our heal potential
                            pet.Heal((int)m_context.HealSummonsHP);
                            m_context.HealSummonsHP = 0;
                        }

                        // heal
                        pet.FixedParticles(0x375A, 10, 15, 5037, EffectLayer.Waist);
                        m_context.Owner.PlaySound(0x1E9);

                        if (m_context.HealSummonsHP == 0)
                        {
                            break;
                        }
                    }
                }
            }
Exemple #19
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m_TalismanType == TalismanType.None)
            {
                return;
            }

            if (this.Parent != m)
            {
                m.SendLocalizedMessage(502641);                   // You must equip this item to use it.
            }
            else if (m_ChargeTimeLeft > 0)
            {
                int tmptime = (m_ChargeTimeLeft2 - (DateTime.Now.Second - m_ChargeTimeLeft3.Second) + 1);

                if (tmptime > (m_ChargeTimeLeft2 + 1))
                {
                    tmptime -= 60;
                }
                if (tmptime > m_ChargeTimeLeft2)
                {
                    tmptime = m_ChargeTimeLeft2;
                }

                m.SendLocalizedMessage(1074882, tmptime.ToString());                   // You must wait ~1_val~ seconds for this to recharge.
            }
            else if (m_Charges == 0)
            {
                m.SendLocalizedMessage(501250);                   // This magic item is out of charges.
            }
            else
            {
                if ((int)m_TalismanType <= 4)
                {
                    //Removal
                    m.Target = new InternalTarget(this);
                }
                //Mana Phase
                else if (m_TalismanType == TalismanType.ManaPhase)
                {
                    ManaPhase.OnUse(m, this);
                }
                else if ((int)m_TalismanType >= 9)
                {
                    //Summon creature
                    BaseCreature bc = (BaseCreature)Activator.CreateInstance(SummonEntry.GetNPC(m_TalismanType));
                    if (BaseCreature.Summon(bc, m, m.Location, -1, TimeSpan.FromMinutes(10.0)))
                    {
                        bc.FixedParticles(0x3728, 1, 10, 9910, EffectLayer.Head);
                        bc.PlaySound(bc.GetIdleSound());
                        m_SummonedCreature = bc;
                        m_Charges--;
                        InvalidateProperties();
                        ChargeTimeLeft = 1800;
                        m_ChargeTimer  = new ChargeTimeLeftTimer(this);
                        m_ChargeTimer.Start();
                        m_ChargeTimeLeft3 = DateTime.Now;
                    }
                }
                else if (m_TalismanType == TalismanType.SummonRandom)
                {
                    //Summon Random
                    TalismanType tmpbc = SummonEntry.GetRandom();
                    BaseCreature bc    = (BaseCreature)Activator.CreateInstance(SummonEntry.GetNPC(tmpbc));
                    if (BaseCreature.Summon(bc, m, m.Location, -1, TimeSpan.FromMinutes(10.0)))
                    {
                        bc.FixedParticles(0x3728, 1, 10, 9910, EffectLayer.Head);
                        bc.PlaySound(bc.GetIdleSound());
                        m_SummonedCreature = bc;
                        m_Charges--;
                        InvalidateProperties();
                        ChargeTimeLeft = 1800;
                        m_ChargeTimer  = new ChargeTimeLeftTimer(this);
                        m_ChargeTimer.Start();
                        m_ChargeTimeLeft3 = DateTime.Now;
                    }
                }
                else
                {
                    Item summonitem;
                    int  message;

                    // Summon item
                    if (m_TalismanType == TalismanType.SummonBandage)
                    {
                        summonitem        = new Bandage(10);
                        summonitem.ItemID = 0x0EE9;
                        summonitem.Hue    = 0xA3;
                        message           = 1075002;               // You have been given some clean bandages.
                    }
                    else if (m_TalismanType == TalismanType.SummonBoard)
                    {
                        summonitem     = new Board(10);
                        summonitem.Hue = 0xA3;
                        message        = 1075000; // You have been given some wooden boards.
                    }
                    else                          // if ( m_TalismanType == TalismanType.SummonIngot )
                    {
                        summonitem     = new IronIngot(10);
                        summonitem.Hue = 0xA3;
                        message        = 1075001;                  // You have been given some ingots.
                    }

                    m.AddToBackpack(summonitem);
                    m.SendLocalizedMessage(message);

                    m_Charges--;
                    InvalidateProperties();
                    ChargeTimeLeft = 60;

                    m_ChargeTimer = new ChargeTimeLeftTimer(this);
                    m_ChargeTimer.Start();
                    m_ChargeTimeLeft3 = DateTime.Now;
                }
            }
        }
            protected override void OnTarget(Mobile from, object target)
            {
                if (m_ParagonDevolveWand.Deleted || m_ParagonDevolveWand.RootParent != from)
                {
                    return;
                }

                PlayerMobile player = from as PlayerMobile;

                if (player == null)
                {
                    return;
                }

                BaseCreature bc_Target = target as BaseCreature;

                if (bc_Target == null)
                {
                    from.SendMessage("That is not a valid creature.");
                    return;
                }

                if (!bc_Target.IsParagon)
                {
                    from.SendMessage("That creature is not a paragon.");
                    return;
                }

                if (bc_Target.Controlled)
                {
                    from.SendMessage("That creature is currently controlled.");
                    return;
                }

                if (player.AccessLevel == AccessLevel.Player)
                {
                    if (!bc_Target.Map.InLOS(from.Location, bc_Target.Location))
                    {
                        from.SendMessage("You must have a valid line-of-sight to the creature you wish to target.");
                        return;
                    }

                    if (bc_Target.Combatant != null)
                    {
                        from.SendMessage("You may not target creatures currently engaged in combat.");
                        return;
                    }

                    if (bc_Target.Hits < bc_Target.HitsMax)
                    {
                        from.SendMessage("You may not target creatures that are currently injured.");
                        return;
                    }

                    if (bc_Target.CreationTime + SpawnCooldown >= DateTime.UtcNow)
                    {
                        string timeRemaining = Utility.CreateTimeRemainingString(DateTime.UtcNow, bc_Target.CreationTime + SpawnCooldown, false, false, true, true, true);

                        from.SendMessage("That has spawned too recently to be devolved. You must wait another " + timeRemaining + ".");
                        return;
                    }

                    if (bc_Target.LastCombatTime + CombatCooldown >= DateTime.UtcNow)
                    {
                        string timeRemaining = Utility.CreateTimeRemainingString(DateTime.UtcNow, bc_Target.LastCombatTime + CombatCooldown, false, false, true, true, true);

                        from.SendMessage("That has been in combat too recently. You must wait another " + timeRemaining + ".");
                        return;
                    }

                    if (!from.CanBeginAction(typeof(ParagonDevolveWand)))
                    {
                        from.SendMessage("You may only use a single paragon devolve wand per hour.");
                        return;
                    }
                }

                bool targetValid = true;

                IPooledEnumerable mobilesNearby = bc_Target.Map.GetMobilesInRange(bc_Target.Location, 12);

                if (player.AccessLevel == AccessLevel.Player)
                {
                    foreach (Mobile mobile in mobilesNearby)
                    {
                        if (mobile.Combatant == bc_Target)
                        {
                            targetValid = false;
                            from.SendMessage("That creature is currently being engaged in combat by someone.");

                            break;
                        }

                        BaseCreature nearbyCreature = mobile as BaseCreature;
                        PlayerMobile nearbyPlayer   = mobile as PlayerMobile;

                        if (mobile != from)
                        {
                            if (nearbyCreature != null)
                            {
                                if (nearbyCreature.Controlled && nearbyCreature.ControlMaster is PlayerMobile && nearbyCreature.ControlMaster != from)
                                {
                                    targetValid = false;
                                    from.SendMessage("That target is too near another player's follower.");
                                    break;
                                }
                            }

                            if (nearbyPlayer != null)
                            {
                                targetValid = false;
                                from.SendMessage("That target is too near another player.");
                                break;
                            }
                        }
                    }
                }

                mobilesNearby.Free();

                if (targetValid)
                {
                    bc_Target.FixedParticles(0x374A, 10, 30, 5054, EffectLayer.Head);
                    bc_Target.PlaySound(0x1F9);

                    bc_Target.IsParagon        = false;
                    bc_Target.ConvertedParagon = true;

                    from.SendMessage("You devolve the creature and remove its paragon status.");

                    m_ParagonDevolveWand.m_Charges--;

                    if (from.AccessLevel == AccessLevel.Player)
                    {
                        from.BeginAction(typeof(ParagonDevolveWand));

                        Timer.DelayCall(ParagonDevolveWand.UsageCooldown, delegate
                        {
                            if (from != null)
                            {
                                from.EndAction(typeof(ParagonDevolveWand));
                            }
                        });
                    }

                    if (m_ParagonDevolveWand.m_Charges == 0)
                    {
                        from.SendMessage("You use the last charge on the wand.");
                        m_ParagonDevolveWand.Delete();
                    }
                }
            }
            protected override void OnTarget(Mobile from, object targeted)
            {
                PlayerMobile pm = from as PlayerMobile;

                if (this.m_Tasty.Deleted)
                {
                    return;
                }
                if (targeted is Mobile)
                {
                    if (targeted is BaseCreature)
                    {
                        BaseCreature creature = (BaseCreature)targeted;

                        this.Base1 = (creature.DamageMin);
                        this.Base2 = (creature.DamageMax);

                        this.Change1 = (int)((creature.DamageMin) * 1.10);
                        this.Change2 = (int)((creature.DamageMax) * 1.10);

                        this.Change6 = (creature.RawStr);
                        this.Change7 = (creature.RawDex);
                        this.Change8 = (creature.RawInt);

                        this.Change3 = (int)((creature.RawStr) * 1.15);
                        this.Change4 = (int)((creature.RawDex) * 1.15);
                        this.Change5 = (int)((creature.RawInt) * 1.15);

                        if ((creature.Controlled || creature.Summoned) && (from == creature.ControlMaster) && !(creature.Asleep))
                        {
                            creature.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist);
                            creature.PlaySound(0x1E9);

                            creature.SetDamage(this.Change1, this.Change2);

                            creature.RawStr = this.Change3;
                            creature.RawDex = this.Change4;
                            creature.RawInt = this.Change5;

                            from.SendMessage("You have increased the Stats of your pet by 15% and the Damage by 10% for 10 Minutes !!");
                            this.m_Tasty.m_Used = true;
                            creature.Asleep     = true;

                            Timer.DelayCall(TimeSpan.FromMinutes(10.0), delegate()
                            {
                                creature.SetDamage(this.Base1, this.Base2);

                                creature.RawStr = this.Change6;
                                creature.RawDex = this.Change7;
                                creature.RawInt = this.Change8;

                                this.m_Tasty.m_Used = true;
                                creature.Asleep     = false;
                                from.SendMessage("The effect of Irresistibly Tasty Treat is Finish !");

                                Timer.DelayCall(TimeSpan.FromMinutes(120.0), delegate()
                                {
                                    this.m_Tasty.m_Used = false;
                                });
                            });
                        }
                        else if ((creature.Controlled || creature.Summoned) && (from == creature.ControlMaster) && (creature.Asleep))
                        {
                            from.SendLocalizedMessage(502676);
                        }
                        else
                        {
                            from.SendLocalizedMessage(1113049);
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(500329);
                    }
                }
            }