예제 #1
0
        public override void OnThink()
        {
            base.OnThink();

            if (Utility.RandomDouble() <= .05 && !digging)
            {
                Effects.PlaySound(Location, Map, 729);

                ResolveEggChance(Location, Map, 1.0, .33);
            }

            switch (m_BunnyType)
            {
            case BunnyType.Quick:
                break;

            case BunnyType.Elusive:
                if ((Frozen || IsHindered() || CantWalk) && !digging)
                {
                    SpecialAbilities.ClearSpecialEffects(this);

                    Say("*wriggles free*");

                    Frozen   = false;
                    CantWalk = false;

                    if (AIObject != null)
                    {
                        AIObject.NextMove = DateTime.UtcNow;
                    }
                }
                break;

            case BunnyType.Devious:
                break;

            case BunnyType.Ferocious:
                break;

            case BunnyType.Mysterious:
                break;
            }
        }
예제 #2
0
        public static void StableFollower(Mobile vendor, PlayerMobile player, BaseCreature creature, int page, bool launchGump, bool retrieved)
        {
            if (player == null || creature == null)
            {
                return;
            }
            if (creature.Deleted)
            {
                return;
            }

            SpecialAbilities.ClearSpecialEffects(creature);

            creature.Poison = null;

            creature.Blessed = true;

            creature.ControlTarget = null;
            creature.ControlOrder  = OrderType.Stay;
            creature.Internalize();

            creature.SetControlMaster(null);

            creature.IsStabled   = true;
            creature.TimeStabled = DateTime.UtcNow;

            if (retrieved)
            {
                creature.TimeStabled -= TimeSpan.FromDays(Stables.RetireveFollowerDaysAdded);
            }

            creature.OwnerAbandonTime = DateTime.UtcNow + TimeSpan.FromDays(1000);

            player.Stabled.Add(creature);

            if (launchGump)
            {
                player.CloseGump(typeof(StableGump));
                player.SendGump(new StableGump(vendor, player, page));
            }
        }
예제 #3
0
        public override void OnThink()
        {
            base.OnThink();

            if (Paralyzed)
            {
                Paralyzed = false;
            }

            if (Frozen || IsHindered() || CantWalk)
            {
                SpecialAbilities.ClearSpecialEffects(this);
            }

            if (!Hidden && DateTime.UtcNow > m_NextReflectAllowed && MagicDamageAbsorb < 1)
            {
                FixedParticles(0x375A, 10, 15, 5037, EffectLayer.Waist);
                MagicDamageAbsorb = 1;

                PlaySound(0x1E9);

                m_NextReflectAllowed = DateTime.UtcNow + TimeSpan.FromSeconds(NextReflectDelay);
            }

            if (Utility.RandomDouble() < 0.05 && DateTime.UtcNow > m_NextVanishAllowed)
            {
                if (Combatant != null && !Paralyzed && !BardProvoked && !BardPacified)
                {
                    if (SpecialAbilities.VanishAbility(this, 1.0, true, -1, 3, 6, true, null))
                    {
                        PublicOverheadMessage(MessageType.Regular, 0, false, "*vanishes*");

                        switch (Utility.RandomMinMax(1, 4))
                        {
                        case 1:
                            DictCombatTargetingWeight[CombatTargetingWeight.EasiestToHit]    = 10;
                            DictCombatTargetingWeight[CombatTargetingWeight.LowestHitPoints] = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.LeastCombatants] = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.Player]          = 0;
                            break;

                        case 2:
                            DictCombatTargetingWeight[CombatTargetingWeight.EasiestToHit]    = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.LowestHitPoints] = 10;
                            DictCombatTargetingWeight[CombatTargetingWeight.LeastCombatants] = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.Player]          = 0;
                            break;

                        case 3:
                            DictCombatTargetingWeight[CombatTargetingWeight.EasiestToHit]    = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.LowestHitPoints] = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.LeastCombatants] = 10;
                            DictCombatTargetingWeight[CombatTargetingWeight.Player]          = 0;
                            break;

                        case 4:
                            DictCombatTargetingWeight[CombatTargetingWeight.EasiestToHit]    = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.LowestHitPoints] = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.LeastCombatants] = 0;
                            DictCombatTargetingWeight[CombatTargetingWeight.Player]          = 10;
                            break;
                        }
                    }

                    m_NextVanishAllowed = DateTime.UtcNow + NextVanishDelay;
                }
            }
        }