Inheritance: MonoBehaviour
Ejemplo n.º 1
0
        public override bool CheckCast()
        {
            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
                return(false);
            }

            if (!Caster.CanBeginAction <PolymorphSpell>())
            {
                Caster.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
                return(false);
            }

            if (AnimalForm.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1063218); // You cannot use that ability in this form.
                return(false);
            }

            if (Caster.Flying)
            {
                Caster.SendLocalizedMessage(1113415); // You cannot use this ability while flying.
                return(false);
            }

            return(base.CheckCast());
        }
Ejemplo n.º 2
0
        public static int Get(OpCode op, Sigil.Label[] labels = null)
        {
            var baseSize = op.Size;
            int operandSize;

            switch (op.OperandType)
            {
                case OperandType.InlineBrTarget: operandSize = 4; break;
                case OperandType.InlineField: operandSize = 4; break;
                case OperandType.InlineI: operandSize = 4; break;
                case OperandType.InlineI8: operandSize = 8; break;
                case OperandType.InlineMethod: operandSize = 4; break;
                case OperandType.InlineNone: operandSize = 0; break;
                case OperandType.InlineR: operandSize = 8; break;
                case OperandType.InlineSig: operandSize = 4; break;
                case OperandType.InlineString: operandSize = 4; break;
                case OperandType.InlineSwitch: operandSize = 4 + labels.Length * 4; break;
                case OperandType.InlineTok: operandSize = 4; break;
                case OperandType.InlineType: operandSize = 4; break;
                case OperandType.InlineVar: operandSize = 2; break;
                case OperandType.ShortInlineBrTarget: operandSize = 1; break;
                case OperandType.ShortInlineI: operandSize = 1; break;
                case OperandType.ShortInlineR: operandSize = 4; break;
                case OperandType.ShortInlineVar: operandSize = 1; break;
                default: throw new Exception("Unexpected operand type [" + op.OperandType + "]");
            }

            return baseSize + operandSize;
        }
Ejemplo n.º 3
0
        public override bool CheckCast()
        {
            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
                return(false);
            }

            if (Caster.Criminal)
            {
                Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily.
                return(false);
            }

            if (SpellHelper.CheckCombat(Caster))
            {
                Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle??
                return(false);
            }

            if (WeightOverloading.IsOverloaded(Caster))
            {
                Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
                return(false);
            }

            return(SpellHelper.CheckTravel(Caster, TravelCheckType.RecallFrom));
        }
Ejemplo n.º 4
0
 public void NewBanner( )
 {
     CreatingNewBanner = true;
     selectedRowIndex  = -1;
     selectedItemIndex = -1;
     Banner            = new Sigil();
 }
Ejemplo n.º 5
0
        public override bool CheckCast()
        {
            if (!base.CheckCast())
            {
                return(false);
            }

            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
                return(false);
            }

            if (Caster.Criminal)
            {
                Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily.
                return(false);
            }

            if (SpellHelper.CheckCombat(Caster))
            {
                Caster.SendLocalizedMessage(1061282); // You cannot use the Sacred Journey ability to flee from combat.
                return(false);
            }

            if (WeightOverloading.IsOverloaded(Caster))
            {
                Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
                return(false);
            }

            return(SpellHelper.CheckTravel(Caster, TravelCheckType.RecallFrom));
        }
Ejemplo n.º 6
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            StopClose();

            if (Sigil.ExistsOn(m_Mobile))
            {
                m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            }
            else if (info.ButtonID == 0)
            {
                if (m_Mobile == m_Sender)
                {
                    m_Mobile.SendLocalizedMessage(1010588); // You choose not to go to any city.
                }
            }
            else
            {
                var index   = info.ButtonID - 1;
                var entries = IsInSecondAgeArea(m_Mobile) ? m_T2AEntries : m_Entries;

                if (index >= 0 && index < entries.Length)
                {
                    Teleport(entries[index]);
                }
            }
        }
Ejemplo n.º 7
0
        /// <inheritdoc />
        public UpgradeComponent Convert(ItemDTO value, object state)
        {
            var entity = new Sigil();

            this.Merge(entity, value, state);
            return(entity);
        }
Ejemplo n.º 8
0
        public override bool OnMoveInto(Mobile m, Direction d, Point3D newLocation, Point3D oldLocation)
        {
            if (m.Player && Sigil.ExistsOn(m))
            {
                m.SendMessage(0x22, "You are holding a sigil and cannot enter this zone.");
                return(false);
            }

            PlayerMobile pm = m as PlayerMobile ??
                              (m is BaseCreature bc && bc.Summoned ?
                               bc.SummonMaster as PlayerMobile : null);

            if (pm?.DuelContext?.StartedBeginCountdown == true)
            {
                return(true);
            }

            if (DuelContext.CheckCombat(m))
            {
                m.SendMessage(0x22, "You have recently been in combat and cannot enter this zone.");
                return(false);
            }

            return(base.OnMoveInto(m, d, newLocation, oldLocation));
        }
Ejemplo n.º 9
0
            protected override void OnTick()
            {
                if (DateTime.UtcNow < m_End)
                {
                    m_Mobile.Frozen = true;
                }
                else
                {
                    m_Mobile.Frozen = false;
                    Stop();

                    if (Sigil.ExistsOn(m_Mobile))
                    {
                        m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
                        return;
                    }

                    int     idx  = Utility.Random(m_Destination.Locations.Length);
                    Point3D dest = m_Destination.Locations[idx];

                    Map destMap = Map.Felucca;

                    /*
                     *                  if ( m_Mobile.Map == Map.Trammel )
                     *                          destMap = Map.Trammel;
                     *                  else if ( m_Mobile.Map == Map.Felucca )
                     *                          destMap = Map.Felucca;
                     *                  else
                     *                          destMap = m_Mobile.Kills >= Mobile.MurderCount ? Map.Felucca : Map.Trammel;
                     */

                    BaseCreature.TeleportPets(m_Mobile, dest, destMap);
                    m_Mobile.MoveToWorld(dest, destMap);
                }
            }
Ejemplo n.º 10
0
        public void Target(IPoint3D p)
        {
            IPoint3D orig = p;
            Map      map  = Caster.Map;

            SpellHelper.GetSurfaceTop(ref p);

            Point3D from = Caster.Location;
            Point3D to   = new Point3D(p);

            PlayerMobile pm = Caster as PlayerMobile; // IsStealthing should be moved to Server.Mobiles

            if (!pm.IsStealthing)
            {
                Caster.SendLocalizedMessage(1063087); // You must be in stealth mode to use this ability.
            }
            else if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            }
            else if (WeightOverloading.IsOverloaded(Caster))
            {
                Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
            }
            else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.TeleportFrom) ||
                     !SpellHelper.CheckTravel(Caster, map, to, TravelCheckType.TeleportTo))
            {
            }
            else if (map?.CanSpawnMobile(p.X, p.Y, p.Z) != true)
            {
                Caster.SendLocalizedMessage(502831); // Cannot teleport to that spot.
            }
            else if (SpellHelper.CheckMulti(to, map, true, 5))
            {
                Caster.SendLocalizedMessage(502831); // Cannot teleport to that spot.
            }
            else if (Region.Find(to, map).IsPartOf <HouseRegion>())
            {
                Caster.SendLocalizedMessage(502829); // Cannot teleport to that spot.
            }
            else if (CheckSequence())
            {
                SpellHelper.Turn(Caster, orig);

                Mobile m = Caster;

                m.Location = to;
                m.ProcessDelta();

                Effects.SendLocationParticles(EffectItem.Create(from, m.Map, EffectItem.DefaultDuration), 0x3728, 10, 10,
                                              2023);

                m.PlaySound(0x512);

                Stealth.OnUse(m); // stealth check after the a jump
            }

            FinishSequence();
        }
Ejemplo n.º 11
0
        public virtual void UseGate(Mobile m)
        {
            //ClientFlags flags = m.NetState == null ? ClientFlags.None : m.NetState.Flags;
            Region region       = Region.Find(m_Target, m_TargetMap);
            var    champregion  = region.GetRegion(typeof(ChampionSpawn)) as ChampionSpawnRegion;
            var    customRegion = region as CustomRegion;

            if (Sigil.ExistsOn(m))
            {
                m.SendLocalizedMessage(1061632);                 // You can't do that while carrying the sigil.
            }
            else if (SpellHelper.CheckCombat(m))
            {
                m.SendLocalizedMessage(1005564, "", 0x22);                 // Wouldst thou flee during the heat of battle??
            }
            else if (SpellHelper.IsWind(m_Target, m_TargetMap) && m.Skills[SkillName.Magery].Base < 70.0)
            {
                m.SendLocalizedMessage(503382); // You are not worthy of entrance to the city of Wind!
            }
            else if (m.Spell != null)
            {
                m.SendLocalizedMessage(1049616);                 // You are too busy to do that at the moment.
            }
            else if ((!m.Alive || (m is PlayerMobile && ((PlayerMobile)m).Young)) && champregion != null && !champregion.CanSpawn())
            {
                m.SendLocalizedMessage(501942);                 // That location is blocked.
            }
            else if (customRegion != null && customRegion.Controller != null &&
                     (!customRegion.Controller.AllowGateIn || !customRegion.Controller.CanEnter))
            {
                m.SendLocalizedMessage(501942);                 // That location is blocked.
            }
            else if (customRegion != null && customRegion.Controller != null && customRegion.Controller.NoMounts && m.Mounted)
            {
                m.SendMessage("Your mount refuses to go into the gate!");
            }
            else if (customRegion != null && customRegion.Controller != null && customRegion.Controller.NoPets && m.Followers > 0)
            {
                m.SendMessage("Sorry, but no pets are allowed in that region at this time (including your mount).");
            }
            else if (m_TargetMap != null && m_TargetMap != Map.Internal)
            {
                BaseCreature.TeleportPets(m, m_Target, m_TargetMap);

                m.MoveToWorld(m_Target, m_TargetMap);

                if (m.AccessLevel == AccessLevel.Player || !m.Hidden)
                {
                    m.PlaySound(0x1FE);
                }

                OnGateUsed(m);
            }
            else
            {
                m.SendMessage("This moongate does not seem to go anywhere.");
            }
        }
Ejemplo n.º 12
0
        public override bool CheckCast()
        {
            if (Caster.Flying)
            {
                Caster.SendLocalizedMessage(1113415); // You cannot use this ability while flying.
                return(false);
            }
            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1010521); // You cannot polymorph while you have a Town Sigil
                return(false);
            }
            if (TransformationSpellHelper.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1061633); // You cannot polymorph while in that form.
                return(false);
            }
            if (DisguiseTimers.IsDisguised(Caster))
            {
                Caster.SendLocalizedMessage(502167); // You cannot polymorph while disguised.
                return(false);
            }
            if (Caster.BodyMod == 183 || Caster.BodyMod == 184)
            {
                Caster.SendLocalizedMessage(1042512); // You cannot polymorph while wearing body paint
                return(false);
            }
            if (!Caster.CanBeginAction(typeof(PolymorphSpell)))
            {
                if (Core.ML)
                {
                    EndPolymorph(Caster);
                }
                else
                {
                    Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
                }
                return(false);
            }
            if (m_NewBody == 0)
            {
                Gump gump;
                if (Core.SE)
                {
                    gump = new NewPolymorphGump(Caster, Scroll);
                }
                else
                {
                    gump = new PolymorphGump(Caster, Scroll);
                }

                Caster.SendGump(gump);
                return(false);
            }

            return(true);
        }
Ejemplo n.º 13
0
    public void AddSigil(Sigil sigil)
    {
        if (sigils.Contains(sigil))
        {
            return;
        }

        sigils.Add(sigil);
    }
Ejemplo n.º 14
0
 public void AddToFirstEmpty(Sigil itemToAdd)
 {
     for (int i = 0; i < _slots.Count; i++)
     {
         if (_slots[i].Value == null)
         {
             _slots[i].Value = itemToAdd;
         }
     }
 }
Ejemplo n.º 15
0
    public bool SelectSigil(Sigil sigil)
    {
        bool isCorrect = IsCorrectSigil(sigil);

        if (isCorrect)
        {
            _correctAnswers += 1;
        }
        NextRound();
        return(isCorrect);
    }
Ejemplo n.º 16
0
        public virtual void UseGate(Mobile m)
        {
            var flags = m.NetState?.Flags ?? ClientFlags.None;

            if (Sigil.ExistsOn(m))
            {
                m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            }
            else if (TargetMap == Map.Felucca && m is PlayerMobile mobile && mobile.Young)
            {
                mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young.
            }
Ejemplo n.º 17
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
            }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(1005399);                   // You can not bury a stone while you sit on a mount.
            }
            else if (!from.Body.IsHuman)
            {
                from.SendLocalizedMessage(1005400);                   // You can not bury a stone in this form.
            }
            else if (Sigil.ExistsOn(from))
            {
                from.SendLocalizedMessage(1061632);                   // You can't do that while carrying the sigil.
            }
            else if (from.Map == GetTargetMap() || (from.Map != Map.Trammel && from.Map != Map.Felucca))
            {
                from.SendLocalizedMessage(1005401);                   // You cannot bury the stone here.
            }
            else if (from is PlayerMobile && ((PlayerMobile)from).Young)
            {
                from.SendLocalizedMessage(1049543);                   // You decide against traveling to Felucca while you are still young.
            }
            else if (Misc.NotorietyHandlers.IsGuardCandidate(from))
            {
                from.SendLocalizedMessage(1005402);                   // The magic of the stone cannot be evoked by someone with blood on their hands.
            }
            else if (from.Criminal)
            {
                from.SendLocalizedMessage(1005403);                   // The magic of the stone cannot be evoked by the lawless.
            }
            else if (!Region.Find(from.Location, from.Map).IsDefault || !Region.Find(from.Location, GetTargetMap()).IsDefault)
            {
                from.SendLocalizedMessage(1005401);                   // You cannot bury the stone here.
            }
            else if (!GetTargetMap().CanFit(from.Location, 16))
            {
                from.SendLocalizedMessage(1005408);                   // Something is blocking the facet gate exit.
            }
            else
            {
                Movable = false;
                MoveToWorld(from.Location, from.Map);

                from.Animate(32, 5, 1, true, false, 0);

                new SettleTimer(this, from.Location, from.Map, GetTargetMap(), from).Start();
            }
        }
Ejemplo n.º 18
0
        public bool ValidateUse(Mobile from)
        {
            var pm = from as PlayerMobile;

            if (!IsChildOf(from.Backpack))
            {
                // That must be in your pack for you to use it.
                from.SendLocalizedMessage(1042001);
            }
            else if (pm == null || pm.NpcGuild != NpcGuild.ThievesGuild)
            {
                // Only Members of the thieves guild are trained to use this item.
                from.SendLocalizedMessage(501702);
            }
            else if (Stealing.SuspendOnMurder && pm.Kills > 0)
            {
                // You are currently suspended from the thieves guild.  They would frown upon your actions.
                from.SendLocalizedMessage(501703);
            }
            else if (!from.CanBeginAction(typeof(IncognitoSpell)))
            {
                // You cannot disguise yourself while incognitoed.
                from.SendLocalizedMessage(501704);
            }
            else if (Sigil.ExistsOn(from))
            {
                from.SendLocalizedMessage(1010465);                 // You cannot disguise yourself while holding a sigil
            }
            else if (TransformationSpellHelper.UnderTransformation(from))
            {
                // You cannot disguise yourself while in that form.
                from.SendLocalizedMessage(1061634);
            }
            else if (from.BodyMod == 183 || from.BodyMod == 184)
            {
                // You cannot disguise yourself while wearing body paint
                from.SendLocalizedMessage(1040002);
            }
            else if (!from.CanBeginAction(typeof(PolymorphSpell)) || from.IsBodyMod)
            {
                // You cannot disguise yourself while polymorphed.
                from.SendLocalizedMessage(501705);
            }
            else
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 19
0
        public override int LabelNumber => 1040000; // savage kin paint

        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.Backpack))
            {
                if (Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil.
                }
                else if (!from.CanBeginAction <IncognitoSpell>())
                {
                    from.SendLocalizedMessage(501698); // You cannot disguise yourself while incognitoed.
                }
                else if (!from.CanBeginAction <PolymorphSpell>())
                {
                    from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed.
                }
                else if (TransformationSpellHelper.UnderTransformation(from))
                {
                    from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed.
                }
                else if (AnimalForm.UnderTransformation(from))
                {
                    from.SendLocalizedMessage(1061634); // You cannot disguise yourself while in that form.
                }
                else if (from.IsBodyMod || from.FindItemOnLayer(Layer.Helm) is OrcishKinMask)
                {
                    from.SendLocalizedMessage(501605); // You are already disguised.
                }
                else
                {
                    from.BodyMod = from.Female ? 184 : 183;
                    from.HueMod  = 0;

                    if (from is PlayerMobile mobile)
                    {
                        mobile.SavagePaintExpiration = TimeSpan.FromDays(7.0);
                    }

                    from.SendLocalizedMessage(
                        1042537
                        ); // You now bear the markings of the savage tribe.  Your body paint will last about a week or you can remove it with an oil cloth.

                    Consume();
                }
            }
            else
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
        }
Ejemplo n.º 20
0
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.Backpack))
            {
                if (Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1010465);                     // You cannot disguise yourself while holding a sigil.
                }
                else if (!from.CanBeginAction(typeof(IncognitoSpell)))
                {
                    from.SendLocalizedMessage(501698);                     // You cannot disguise yourself while incognitoed.
                }
                else if (!from.CanBeginAction(typeof(PolymorphSpell)))
                {
                    from.SendLocalizedMessage(501699);                     // You cannot disguise yourself while polymorphed.
                }
                else if (TransformationSpellHelper.UnderTransformation(from))
                {
                    from.SendLocalizedMessage(501699);                     // You cannot disguise yourself while polymorphed.
                }
                else if (from.IsBodyMod || from.FindItemOnLayer(Layer.Helm) is OrcishKinMask)
                {
                    from.SendLocalizedMessage(501605);                     // You are already disguised.
                }
                else
                {
                    from.BodyMod = (from.Female ? 184 : 183);
                    from.HueMod  = Hue;

                    if (from is PlayerMobile && Hue == 1175)
                    {
                        ((PlayerMobile)from).BattlePaintExpirationShadow = TimeSpan.FromDays(7.0);
                    }
                    else
                    {
                        ((PlayerMobile)from).BattlePaintExpirationRed = TimeSpan.FromDays(7.0);
                    }

                    from.SendMessage("You now bear the savage markings of the battleborn.");
                    // You now bear the markings of the savage tribe.  Your body paint will last about a week or you can remove it with an oil cloth.

                    Consume();
                }
            }
            else
            {
                from.SendLocalizedMessage(1042001);                 // That must be in your pack for you to use it.
            }
        }
Ejemplo n.º 21
0
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.Backpack))
            {
                if (Sigil.ExistsOn(from))
                {
                    from.SendLocalizedMessage(1010465);                     // You cannot disguise yourself while holding a sigil.
                }
                else if (!from.CanBeginAction(typeof(IncognitoSpell)))
                {
                    from.SendLocalizedMessage(501698);                     // You cannot disguise yourself while incognitoed.
                }
                else if (!from.CanBeginAction(typeof(PolymorphSpell)))
                {
                    from.SendLocalizedMessage(501699);                     // You cannot disguise yourself while polymorphed.
                }
                else if (TransformationSpellHelper.UnderTransformation(from))
                {
                    from.SendLocalizedMessage(501699);                     // You cannot disguise yourself while polymorphed.
                }
                else if (from.IsBodyMod || from.FindItemOnLayer(Layer.Helm) is OrcishKinMask)
                {
                    from.SendLocalizedMessage(501605);                     // You are already disguised.
                }
                else
                {
                    from.BodyMod = (from.Female ? 184 : 183);
                    from.HueMod  = Hue;

                    if (from is PlayerMobile && Hue == 61)
                    {
                        ((PlayerMobile)from).ZombiePaintExperationBooger = TimeSpan.FromDays(7.0);
                    }
                    else
                    {
                        ((PlayerMobile)from).ZombiePaintExperationVesper = TimeSpan.FromDays(7.0);
                    }

                    from.SendMessage("You have painted yourself with zombie juices.  Yuck.");

                    Consume();
                }
            }
            else
            {
                from.SendLocalizedMessage(1042001);                 // That must be in your pack for you to use it.
            }
        }
Ejemplo n.º 22
0
        public override bool CheckCast()
        {
            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
                return(false);
            }

            if (WeightOverloading.IsOverloaded(Caster))
            {
                Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
                return(false);
            }

            return(SpellHelper.CheckTravel(Caster, TravelCheckType.TeleportFrom));
        }
Ejemplo n.º 23
0
        public virtual void UseGate(Mobile m)
        {
            //ClientFlags flags = m.NetState == null ? ClientFlags.None : m.NetState.Flags;
            Region region       = Region.Find(m_Target, m_TargetMap);
            var    champregion  = region.GetRegion(typeof(ChampionSpawn)) as ChampionSpawnRegion;
            var    customRegion = region as CustomRegion;

            if (Sigil.ExistsOn(m))
            {
                m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            }
            else if (SpellHelper.CheckCombat(m))
            {
                m.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle??
            }
            else if (m.Spell != null)
            {
                m.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
            }
            else if (m.IsYoung())
            {
                m.SendMessage(54, "You are too young to go in such a dangerous place!"); // That location is blocked.
            }
            else if (m.Mounted)
            {
                m.SendMessage("Your mount refuses to go into the gate!");
            }
            else if (m_TargetMap != null && m_TargetMap != Map.Internal)
            {
                BaseCreature.TeleportPets(m, m_Target, m_TargetMap);

                m.MoveToWorld(m_Target, m_TargetMap);

                if (m.AccessLevel == AccessLevel.Player || !m.Hidden)
                {
                    m.PlaySound(0x1FE);
                }

                OnGateUsed(m);
            }
            else
            {
                m.SendMessage("This gate does not seem to go anywhere.");
            }
        }
Ejemplo n.º 24
0
    public static Material GetComponentMaterial(Sigil sigil)
    {
        Material material;

        switch (sigil)
        {
        case Sigil.Fire:
            material = Resources.Load <Material>("Materials/Sigils/Fire_Sigil");
            break;

        case Sigil.Earth:
            material = Resources.Load <Material>("Materials/Sigils/Earth_Sigil");
            break;

        case Sigil.Water:
            material = Resources.Load <Material>("Materials/Sigils/Water_Sigil");
            break;

        case Sigil.Air:
            material = Resources.Load <Material>("Materials/Sigils/Air_Sigil");
            break;

        case Sigil.Candle:
            material = Resources.Load <Material>("Materials/Sigils/Candle_Sigil");
            break;

        case Sigil.Hearth:
            material = Resources.Load <Material>("Materials/Sigils/Hearth_Sigil");
            break;

        case Sigil.Crystal:
            material = Resources.Load <Material>("Materials/Sigils/Crystal_Sigil");
            break;

        default:
            material = new Material(Shader.Find("Incant/Seal"))
            {
                color = new Color(1, 1, 1, 0)
            };
            break;
        }

        return(material);
    }
Ejemplo n.º 25
0
        public static Report CompileSigilReport()
        {
            Report report = new Report("Faction Town Sigils", "50%");

            report.Columns.Add("35%", "center", "Town");
            report.Columns.Add("35%", "center", "Controller");
            report.Columns.Add("30%", "center", "Capturable");

            SigilCollection sigils = Sigil.Sigils;

            for (int i = 0; i < sigils.Count; ++i)
            {
                Sigil sigil = sigils[i];

                string controller = "Unknown";

                Mobile mob = sigil.RootParent as Mobile;

                if (mob != null)
                {
                    Faction faction = Faction.Find(mob);

                    if (faction != null)
                    {
                        controller = faction.Definition.FriendlyName;
                    }
                }
                else if (sigil.LastMonolith != null && sigil.LastMonolith.Faction != null)
                {
                    controller = sigil.LastMonolith.Faction.Definition.FriendlyName;
                }

                ReportItem item = new ReportItem();

                item.Values.Add(sigil.Town == null ? "" : sigil.Town.Definition.FriendlyName);
                item.Values.Add(controller);
                item.Values.Add(sigil.IsPurifying ? "No" : "Yes");

                report.Items.Add(item);
            }

            return(report);
        }
Ejemplo n.º 26
0
 public void Effect(Point3D loc, Map map, bool checkMulti)
 {
     if (Sigil.ExistsOn(Caster))
     {
         Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
     }
     else if (map == null || !Core.AOS && Caster.Map != map)
     {
         Caster.SendLocalizedMessage(1005569); // You can not recall to another facet.
     }
     else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.RecallFrom))
     {
     }
     else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.RecallTo))
     {
     }
     else if (map == Map.Felucca && Caster is PlayerMobile mobile && mobile.Young)
     {
         mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young.
     }
Ejemplo n.º 27
0
    public static string SigilToChar(this Sigil sigil)
    {
        switch (sigil)
        {
        case Sigil.Diamond:
            return("<sprite name=\"Sym0\">");

        case Sigil.Heart:
            return("<sprite name=\"Sym1\">");

        case Sigil.Clover:
            return("<sprite name=\"Sym2\">");

        case Sigil.Spade:
            return("<sprite name=\"Sym3\">");

        default:
            return("?");
        }
    }
Ejemplo n.º 28
0
        public override bool CheckCast()
        {
            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632);                 // You can't do that while carrying the sigil.
            }
            else if (Caster.Criminal)
            {
                Caster.SendLocalizedMessage(1005561, "", 0x22);                 // Thou'rt a criminal and cannot escape so easily.
            }
            else if (SpellHelper.CheckCombat(Caster))
            {
                Caster.SendLocalizedMessage(1005564, "", 0x22);                 // Wouldst thou flee during the heat of battle??
            }
            else
            {
                return(SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom));
            }

            return(false);
        }
Ejemplo n.º 29
0
        public override bool CheckCast()
        {
            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1010445); // You cannot incognito if you have a sigil
                return(false);
            }

            if (!Caster.CanBeginAction <IncognitoSpell>())
            {
                Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
                return(false);
            }

            if (Caster.BodyMod == 183 || Caster.BodyMod == 184)
            {
                Caster.SendLocalizedMessage(1042402); // You cannot use incognito while wearing body paint
                return(false);
            }

            return(true);
        }
Ejemplo n.º 30
0
            protected override void OnTick()
            {
                if (Core.Now < m_End)
                {
                    m_Mobile.Frozen = true;
                }
                else
                {
                    m_Mobile.Frozen = false;
                    Stop();

                    if (Sigil.ExistsOn(m_Mobile))
                    {
                        m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
                        return;
                    }

                    var dest = m_Destination.Locations.RandomElement();

                    Map destMap;
                    if (m_Mobile.Map == Map.Trammel)
                    {
                        destMap = Map.Trammel;
                    }
                    else if (m_Mobile.Map == Map.Felucca)
                    {
                        destMap = Map.Felucca;
                    }
                    else
                    {
                        destMap = m_Mobile.Kills >= 5 ? Map.Felucca : Map.Trammel;
                    }

                    BaseCreature.TeleportPets(m_Mobile, dest, destMap);
                    m_Mobile.MoveToWorld(dest, destMap);
                }
            }
Ejemplo n.º 31
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            StopClose();

            var pm = m_Mobile as PlayerMobile;

            if (Sigil.ExistsOn(m_Mobile))
            {
                m_Mobile.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            }
            else if (pm != null && pm.PokerGame != null)
            {
                pm.SendMessage(61, "You cannot use this while taking part in a poker game.");
            }
            else if (info.ButtonID == 0)
            {
                if (m_Mobile == m_Sender)
                {
                    m_Mobile.SendLocalizedMessage(1010588); // You choose not to go to any city.
                }
            }
            else
            {
                int index   = info.ButtonID - 1;
                var entries = IsInSecondAgeArea(m_Mobile) ? m_T2AEntries : m_Entries;

                if (m_Mobile.Kills >= 5)
                {
                    entries = m_MurdererEntries;
                }

                if (index >= 0 && index < entries.Length)
                {
                    Teleport(entries[index]);
                }
            }
        }
Ejemplo n.º 32
0
    protected override void DoApply(Coord tile)
    {
        Level.CurrentLevel.AddPromise(_pr = new Promise());

        Debug.Log("ritual...");
        _s = (Sigil)Level.CurrentLevel.Get(tile).AgentsOnTile(agent => agent is Sigil)[0];
        _s.Activated += OnActivated;
        _s.Activate();
        Source.GetComponentInChildren<SkeletonAnimation>().AnimationName = "ritual_1";
    }
Ejemplo n.º 33
0
 private void OnActivated(Sigil sigil)
 {
     Source.GetComponentInChildren<SkeletonAnimation>().AnimationName = "idle";
     _s.Activated -= OnActivated;
     _pr.Fulfill();
     _pr = null;    
 }