public override void OnDoubleClick(Mobile from)
        {
            PlayerMobile pm_From = from as PlayerMobile;

            if (pm_From == null)
            {
                return;
            }

            if (!pm_From.Alive)
            {
                pm_From.SendMessage("You must be alive to use that.");
                return;
            }

            if (!IsChildOf(pm_From.Backpack))
            {
                pm_From.SendMessage("that must be in your backpack for you to use it.");
                return;
            }

            PlayerEnhancementPersistance.CheckAndCreatePlayerEnhancementAccountEntry(pm_From);

            Activate(pm_From);
        }
Exemple #2
0
        public override int PlayEndingEffect(Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality, bool makersMark, CraftItem item)
        {
            if (toolBroken)
            {
                from.SendLocalizedMessage(1044038);                 // You have worn out your tool
            }
            if (!typeofSpellScroll.IsAssignableFrom(item.ItemType)) //  not a scroll
            {
                if (failed)
                {
                    if (lostMaterial)
                    {
                        return(1044043); // You failed to create the item, and some of your materials are lost.
                    }
                    else
                    {
                        return(1044157); // You failed to create the item, but no materials were lost.
                    }
                }

                else
                {
                    if (quality == 0)
                    {
                        return(502785); // You were barely able to make this item.  It's quality is below average.
                    }
                    else if (makersMark && quality == 2)
                    {
                        //Player Enhancement Customization: Artisan
                        if (PlayerEnhancementPersistance.IsCustomizationEntryActive(from, CustomizationType.Artisan))
                        {
                            CustomizationAbilities.Artisan(from, from.Location, from.Map);
                        }

                        return(1044156); // You create an exceptional quality item and affix your maker's mark.
                    }

                    else if (quality == 2)
                    {
                        return(1044155); // You create an exceptional quality item.
                    }
                    else
                    {
                        return(1044154); // You create the item.
                    }
                }
            }

            else
            {
                if (failed)
                {
                    return(501630); // You fail to inscribe the scroll, and the scroll is ruined.
                }
                else
                {
                    return(501629); // You inscribe the spell and put the scroll in your backpack.
                }
            }
        }
Exemple #3
0
        public void Target(Mobile mobile)
        {
            if (!Caster.CanSee(mobile) || mobile.Hidden)
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(mobile))
            {
                SpellHelper.Turn(Caster, mobile);
                SpellHelper.CheckReflect((int)this.Circle, Caster, ref mobile);
                SpellHelper.AddStatCurse(Caster, mobile, StatType.Dex);

                CheckMagicResist(mobile);

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

                mobile.Paralyzed = false;

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.Clumsy);

                mobile.FixedParticles(0x3779, 10, 15, 5002, spellHue, 0, EffectLayer.Head);
                mobile.PlaySound(0x1DF);
            }

            FinishSequence();
        }
Exemple #4
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m) || m.Hidden)
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }

            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true;
                SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false;

                bool enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, m, EnhancedSpellbookType.Wizard, false, true);

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.Bless);

                if (enhancedSpellcast)
                {
                    m.FixedParticles(0x373A, 10, 30, 5018, spellHue, 0, EffectLayer.Waist);
                    m.PlaySound(0x1EA);
                }

                else
                {
                    m.FixedParticles(0x373A, 10, 15, 5018, spellHue, 0, EffectLayer.Waist);
                    m.PlaySound(0x1EA);
                }
            }

            FinishSequence();
        }
Exemple #5
0
            public InternalItem(Mobile caster, int itemID, Point3D loc, Map map, TimeSpan duration) : base(itemID)
            {
                Visible = false;
                Movable = false;
                Light   = LightType.Circle300;

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(caster, HueableSpell.ParalyzeField);

                Hue = spellHue;

                MoveToWorld(loc, map);

                if (caster.InLOS(this))
                {
                    Visible = true;
                }
                else
                {
                    Delete();
                }

                if (Deleted)
                {
                    return;
                }

                m_Caster = caster;

                m_Timer = new InternalTimer(this, duration);
                m_Timer.Start();

                m_End = DateTime.UtcNow + duration;
            }
Exemple #6
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                bool enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, null, EnhancedSpellbookType.Summoner, false, true);

                BaseCreature summon = new SummonedFireElemental();

                summon.StoreBaseSummonValues();

                double duration = 4.0 * Caster.Skills[SkillName.Magery].Value;

                if (enhancedSpellcast)
                {
                    duration *= SpellHelper.EnhancedSummonDurationMultiplier;

                    summon.DamageMin = (int)((double)summon.DamageMin * SpellHelper.EnhancedSummonDamageMultiplier);
                    summon.DamageMax = (int)((double)summon.DamageMax * SpellHelper.EnhancedSummonDamageMultiplier);

                    summon.SetHitsMax((int)((double)summon.HitsMax * SpellHelper.EnhancedSummonHitPointsMultiplier));
                    summon.Hits = summon.HitsMax;
                }

                summon.SetDispelResistance(Caster, enhancedSpellcast, 0);

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.FireElemental);

                summon.Hue = spellHue;

                SpellHelper.Summon(summon, Caster, 0x217, TimeSpan.FromSeconds(duration), false, false);
            }

            FinishSequence();
        }
Exemple #7
0
        public void Target(Mobile mobile)
        {
            BaseCreature bc_Creature = mobile as BaseCreature;

            if (!Caster.CanSee(mobile) || mobile.Hidden)
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (bc_Creature == null || !bc_Creature.IsDispellable)
            {
                Caster.SendLocalizedMessage(1005049); // That cannot be dispelled.
            }
            else if (CheckHSequence(mobile))
            {
                SpellHelper.Turn(Caster, mobile);

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.Dispel);

                Caster.DoHarmful(bc_Creature);

                if (Caster is PlayerMobile)
                {
                    bc_Creature.ResolveDispel(Caster, true, spellHue);
                }

                else
                {
                    bc_Creature.ResolveDispel(Caster, false, spellHue);
                }
            }

            FinishSequence();
        }
        public static void Shielded(Mobile mobile)
        {
            if (mobile == null)
            {
                return;
            }

            mobile.PlaySound(0x64B); //0x456
            mobile.FixedEffect(0x37B9, 10, 5);

            int projectiles = 4;

            for (int a = 0; a < projectiles; a++)
            {
                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(mobile, HueableSpell.MagicReflect);

                Point3D newLocation = new Point3D(mobile.X + Utility.RandomList(-1, 1), mobile.Y + Utility.RandomList(-1, 1), mobile.Z);
                SpellHelper.AdjustField(ref newLocation, mobile.Map, 12, false);

                TimedStatic timedStatic = new TimedStatic(0x3779, .5);

                if (spellHue == 0)
                {
                    timedStatic.Hue = Utility.RandomList(2587, 2570, 2576, 2623, 2572, 2615, 2515, 2505, 2499, 2500, 2117, 2618);
                }

                else
                {
                    timedStatic.Hue = spellHue;
                }

                timedStatic.Name = "dissipated energy";
                timedStatic.MoveToWorld(newLocation, mobile.Map);
            }
        }
Exemple #9
0
        public void Target(Mobile m)
        {
            if (!m.CanSee(m) || m.Hidden)
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }

            else if (m.MagicDamageAbsorb > 0)
            {
                Caster.SendLocalizedMessage(1005559);   // This spell is already in effect.
            }

            else if (!m.CanBeginAction(typeof(DefensiveSpell)))
            {
                Caster.SendMessage("The spell will not adhere to them at this time.");                   // The spell will not adhere to you at this time.
            }

            else if (CheckBSequence(m))
            {
                if (Caster.MagicDamageAbsorb >= 0)
                {
                    int value = 0;

                    bool enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, null, EnhancedSpellbookType.Wizard, false, true);

                    //Spirit Speak Bonus
                    int spiritSpeakBonus = (int)(Math.Floor(8 * Caster.Skills[SkillName.SpiritSpeak].Value / 100));

                    value += spiritSpeakBonus;

                    if (enhancedSpellcast)
                    {
                        value += 8;
                    }

                    int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.MagicReflect);

                    if (enhancedSpellcast)
                    {
                        m.FixedParticles(0x375A, 10, 30, 5037, spellHue, 0, EffectLayer.Waist);
                        m.PlaySound(0x1E9);
                    }

                    else
                    {
                        m.FixedParticles(0x375A, 10, 15, 5037, spellHue, 0, EffectLayer.Waist);
                        m.PlaySound(0x1E9);
                    }

                    if (value < 1)
                    {
                        value = 1;
                    }

                    m.MagicDamageAbsorb = value;
                }
            }

            FinishSequence();
        }
Exemple #10
0
        public static void ApplyEffect(Mobile Caster, Mobile mobile)
        {
            SpellHelper.AddStatCurse(Caster, mobile, StatType.Str); SpellHelper.DisableSkillCheck = true;
            SpellHelper.AddStatCurse(Caster, mobile, StatType.Dex);
            SpellHelper.AddStatCurse(Caster, mobile, StatType.Int); SpellHelper.DisableSkillCheck = false;

            Timer t = (Timer)m_UnderEffect[mobile];

            if (Caster.Player && mobile.Player && t == null)
            {
                TimeSpan duration = SpellHelper.GetDuration(Caster, mobile);
                m_UnderEffect[mobile] = t = Timer.DelayCall(duration, new TimerStateCallback(RemoveEffect), mobile);
                mobile.UpdateResistances();
            }

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

            mobile.Paralyzed = false;

            int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.Curse);

            mobile.FixedParticles(0x374A, 10, 15, 5028, spellHue, 0, EffectLayer.Waist);
            mobile.PlaySound(0x1E1);
        }
Exemple #11
0
        public void Target(IPoint3D p)
        {
            if (!Caster.CanSee(p))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
            {
                SpellHelper.Turn(Caster, p);
                SpellHelper.GetSurfaceTop(ref p);

                List <Mobile> targets = new List <Mobile>();

                Map map = Caster.Map;

                if (map != null)
                {
                    IPooledEnumerable eable = map.GetMobilesInRange(new Point3D(p), 3);

                    foreach (Mobile m in eable)
                    {
                        if (SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanSee(m) && Caster.CanBeHarmful(m, false))
                        {
                            targets.Add(m);
                        }
                    }

                    eable.Free();
                }

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.MassCurse);

                for (int i = 0; i < targets.Count; ++i)
                {
                    Mobile mobile = targets[i];

                    CheckMagicResist(mobile);

                    Caster.DoHarmful(mobile);

                    SpellHelper.AddStatCurse(Caster, mobile, StatType.Str);
                    SpellHelper.AddStatCurse(Caster, mobile, StatType.Dex);
                    SpellHelper.AddStatCurse(Caster, mobile, StatType.Int);

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

                    mobile.Paralyzed = false;

                    mobile.FixedParticles(0x374A, 10, 15, 5028, spellHue, 0, EffectLayer.Waist);
                    mobile.PlaySound(0x1FB);
                }
            }

            FinishSequence();
        }
Exemple #12
0
        public void Target(Mobile mobile)
        {
            if (!Caster.CanSee(mobile) || mobile.Hidden)
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }

            //It was on IPY but seems right...U cant hide vendor and others with higher access level.
            else if (mobile is Mobiles.BaseVendor || mobile is Mobiles.PlayerVendor || mobile is Mobiles.PlayerBarkeeper || mobile.AccessLevel > Caster.AccessLevel)
            {
                Caster.SendLocalizedMessage(501857);                   // This spell won't work on that!
            }

            else if (CheckBSequence(mobile))
            {
                SpellHelper.Turn(Caster, mobile);

                int spellHue = 0;

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

                if (vanish)
                {
                    CustomizationAbilities.Vanish(mobile);
                }

                else
                {
                    Effects.SendLocationParticles(EffectItem.Create(new Point3D(mobile.X, mobile.Y, mobile.Z + 16), Caster.Map, EffectItem.DefaultDuration), 0x376A, 10, 15, spellHue, 0, 5045, 0);
                    mobile.PlaySound(0x3C4);
                }

                mobile.Hidden = true;

                if (mobile is BaseCreature)
                {
                    var bc = mobile as BaseCreature;
                    if (!bc.Controlled && !bc.Summoned && (!bc.InitialInnocent || bc.AlwaysAttackable || bc.IsMurderer()))
                    {
                        Caster.CriminalAction(false);
                    }
                }

                RemoveTimer(mobile);

                //Changed to the duration of IPY
                TimeSpan duration = TimeSpan.FromSeconds(Caster.Skills[SkillName.Magery].Value * 1.2);                   // 120% of magery

                Timer t = new InternalTimer(mobile, duration);

                m_Table[mobile] = t;

                t.Start();
            }

            FinishSequence();
        }
Exemple #13
0
        public void Target(Mobile m)
        {
            if (!m.CanSee(m) || m.Hidden)
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }

            if (!m.CanBeginAction(typeof(ReactiveArmorSpell)))
            {
                Caster.SendMessage("The spell will not adhere to them at this time.");
            }

            else if (CheckBSequence(m))
            {
                int value = (int)(m.Skills[SkillName.Magery].Value);

                value /= 3;

                if (value < 0)
                {
                    value = 1;
                }
                else if (value > 20)
                {
                    value = 20;
                }

                bool enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, null, EnhancedSpellbookType.Wizard, false, true);

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.ReactiveArmor);

                //Spirit Speak Bonus
                value += (int)(20 * (Caster.Skills[SkillName.SpiritSpeak].Value / 100));

                if (enhancedSpellcast)
                {
                    value += 20;

                    m.FixedParticles(0x376A, 9, 64, 5008, spellHue, 0, EffectLayer.Waist);
                    m.PlaySound(0x1F2);
                }

                else
                {
                    m.FixedParticles(0x376A, 9, 32, 5008, spellHue, 0, EffectLayer.Waist);
                    m.PlaySound(0x1F2);
                }

                m.MeleeDamageAbsorb = value;

                m.BeginAction(typeof(ReactiveArmorSpell));
                Timer.DelayCall(TimeSpan.FromMinutes(0.5), delegate { m.EndAction(typeof(ReactiveArmorSpell)); });
            }

            FinishSequence();
        }
Exemple #14
0
        public void Target(IPoint3D p, Mobile from)
        {
            if (!Caster.CanSee(p))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckSequence())
            {
                SpellHelper.Turn(Caster, p);
                SpellHelper.GetSurfaceTop(ref p);

                List <Mobile> targets = new List <Mobile>();

                Map map = Caster.Map;

                if (map != null)
                {
                    IPooledEnumerable eable = map.GetMobilesInRange(new Point3D(p), 8);

                    foreach (Mobile m in eable)
                    {
                        if (m is BaseCreature && ((BaseCreature)m).Summoned && Caster.CanBeHarmful(m, false))
                        {
                            targets.Add(m);
                        }
                    }

                    eable.Free();
                }

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.MassDispel);

                for (int i = 0; i < targets.Count; ++i)
                {
                    Mobile       m           = targets[i];
                    BaseCreature bc_Creature = m as BaseCreature;

                    if (bc_Creature == null)
                    {
                        continue;
                    }

                    Caster.DoHarmful(m);

                    bc_Creature.ResolveDispel(Caster, false, spellHue);
                }
            }

            FinishSequence();
        }
Exemple #15
0
        public override int PlayEndingEffect(Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality, bool makersMark, CraftItem item)
        {
            if (toolBroken)
            {
                from.SendLocalizedMessage(1044038);                   // You have worn out your tool
            }
            if (failed)
            {
                if (lostMaterial)
                {
                    return(1044043);                    // You failed to create the item, and some of your materials are lost.
                }
                else
                {
                    return(1044157);                    // You failed to create the item, but no materials were lost.
                }
            }
            else
            {
                from.PlaySound(0x41);                   // glass breaking

                if (quality == 0)
                {
                    return(502785);                    // You were barely able to make this item.  It's quality is below average.
                }
                else if (makersMark && quality == 2)
                {
                    //Player Enhancement Customization: Artisan
                    if (PlayerEnhancementPersistance.IsCustomizationEntryActive(from, CustomizationType.Artisan))
                    {
                        CustomizationAbilities.Artisan(from, from.Location, from.Map);
                    }

                    return(1044156); // You create an exceptional quality item and affix your maker's mark.
                }

                else if (quality == 2)
                {
                    return(1044155); // You create an exceptional quality item.
                }
                else
                {
                    return(1044154); // You create the item.
                }
            }
        }
        public static void OnLogin(PlayerMobile player)
        {
            if (player == null)
            {
                return;
            }

            PlayerEnhancementPersistance.CheckAndCreatePlayerEnhancementAccountEntry(player);

            player.m_PlayerEnhancementAccountEntry.AuditCustomizationEntries();
            player.m_PlayerEnhancementAccountEntry.AuditSpellHueEntries();

            //Hoarder
            bool hoarder = PlayerEnhancementPersistance.IsCustomizationEntryActive(player, CustomizationType.Hoarder);

            if (hoarder)
            {
                if (player.BankBox != null)
                {
                    if (player.BankBox.MaxItems == 125)
                    {
                        player.BankBox.MaxItems += 25;
                    }
                }
            }

            //Bench Player
            bool benchPlayer = PlayerEnhancementPersistance.IsCustomizationEntryActive(player, CustomizationType.BenchPlayer);

            if (benchPlayer)
            {
                Account account = player.Account as Account;

                if (account == null)
                {
                    return;
                }

                if (account.CharacterLimit == 5)
                {
                    account.CharacterLimit = 6;
                }
            }
        }
        public virtual void Activate(PlayerMobile player)
        {
            PlayerCustomizationEntry entry = PlayerEnhancementPersistance.GetCustomizationEntry(player, m_Customization);

            if (entry == null)
            {
                return;
            }

            PlayerCustomizationDetail details = PlayerCustomization.GetCustomizationDetail(m_Customization);

            if (details == null)
            {
                return;
            }

            if (entry.m_Unlocked)
            {
                player.SendMessage("You have already unlocked the player customization: " + details.m_Name + ".");
                return;
            }

            else
            {
                entry.m_Unlocked = true;
                entry.m_Active   = true;

                player.SendMessage("You unlock the player customization for: " + details.m_Name + ".");

                PlayerCustomization.OnUnlockCustomization(player, m_Customization);

                player.PlaySound(0x0F7);
                player.FixedParticles(0x373A, 10, 15, 5012, 2587, 0, EffectLayer.Waist);

                player.CloseGump(typeof(PlayerCustomizationGump));
                player.CloseGump(typeof(PlayerCustomizationConfirmationGump));

                Delete();

                return;
            }
        }
Exemple #18
0
        public void Target(IPoint3D p)
        {
            Map map = Caster.Map;

            SpellHelper.GetSurfaceTop(ref p);

            if (map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z) || BaseBoat.FindBoatAt(p, map) != null)
            {
                Caster.SendLocalizedMessage(501942); // That location is blocked.
            }
            else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
            {
                bool enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, null, EnhancedSpellbookType.Summoner, false, true);

                BaseCreature summon = new BladeSpirits();

                summon.StoreBaseSummonValues();

                double duration = 2.0 * Caster.Skills[SkillName.Magery].Value;

                if (enhancedSpellcast)
                {
                    duration *= SpellHelper.EnhancedSummonDurationMultiplier;

                    summon.DamageMin = (int)((double)summon.DamageMin * SpellHelper.EnhancedSummonDamageMultiplier);
                    summon.DamageMax = (int)((double)summon.DamageMax * SpellHelper.EnhancedSummonDamageMultiplier);

                    summon.SetHitsMax((int)((double)summon.HitsMax * SpellHelper.EnhancedSummonHitPointsMultiplier));
                    summon.Hits = summon.HitsMax;
                }

                summon.SetDispelResistance(Caster, enhancedSpellcast, 0);

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.BladeSpirits);

                summon.Hue = spellHue;

                BaseCreature.Summon(summon, false, Caster, new Point3D(p), 0x212, TimeSpan.FromSeconds(duration));
            }

            FinishSequence();
        }
Exemple #19
0
        public virtual void Activate(PlayerMobile player)
        {
            SpellHueEntry entry = PlayerEnhancementPersistance.GetSpellHueEntry(player, m_HueableSpell);

            if (entry == null)
            {
                return;
            }

            HueableSpellDetail hueableSpellDetails = SpellHue.GetHueableSpellDetail(m_HueableSpell);
            SpellHueTypeDetail spellHueTypeDetails = SpellHue.GetSpellHueTypeDetail(m_HueType);

            if (hueableSpellDetails == null || spellHueTypeDetails == null)
            {
                return;
            }

            string displayName = hueableSpellDetails.m_SpellName + ": " + spellHueTypeDetails.m_Name;

            if (entry.m_UnlockedHues.Contains(m_HueType))
            {
                player.SendMessage("You have already unlocked the spell hue for " + displayName + ".");
                return;
            }

            else
            {
                entry.m_UnlockedHues.Add(m_HueType);
                entry.m_ActiveHue = m_HueType;

                player.SendMessage("You unlock the spell hue for " + displayName + ".");

                player.PlaySound(0x0F5);
                player.FixedParticles(0x375A, 10, 15, 5012, 2587, 0, EffectLayer.Waist);

                player.CloseGump(typeof(PlayerSpellHuesGump));

                Delete();

                return;
            }
        }
Exemple #20
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m) || m.Hidden)
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);
                Poison p = m.Poison;

                if (p != null)
                {
                    double chanceToCure = (Caster.Skills[SkillName.Magery].Value * 0.75) + (110.0 - (p.Level + 1) * 33.0);
                    chanceToCure /= 100;

                    if (chanceToCure > Utility.RandomDouble())
                    {
                        if (m.CurePoison(Caster))
                        {
                            if (Caster != m)
                            {
                                Caster.SendLocalizedMessage(1010058); // You have cured the target of all poisons!
                            }
                            m.SendLocalizedMessage(1010059);          // You have been cured of all poisons.
                        }
                    }
                    else
                    {
                        m.SendLocalizedMessage(1010060); // You have failed to cure your target!
                    }
                }

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.Cure);

                m.FixedParticles(0x373A, 10, 15, 5012, spellHue, 0, EffectLayer.Waist);
                m.PlaySound(0x1E0);
            }

            FinishSequence();
        }
Exemple #21
0
        public void Target(Mobile m)
        {
            if (!m.CanSee(m) || m.Hidden)
            {
                m.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                int val = (int)(m.Skills[SkillName.Magery].Value / 10.0 + 1);

                if (m.BeginAction(typeof(ProtectionSpell)))
                {
                    Caster.DoBeneficial(m);
                    m.VirtualArmorMod += val;

                    new InternalTimer(m, Caster, val).Start();

                    bool enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, m, EnhancedSpellbookType.Wizard, false, true);

                    int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.Protection);

                    if (enhancedSpellcast)
                    {
                        m.FixedParticles(0x375A, 9, 40, 5027, spellHue, 0, EffectLayer.Waist);
                        m.PlaySound(0x1F7);
                    }

                    else
                    {
                        m.FixedParticles(0x375A, 9, 20, 5027, spellHue, 0, EffectLayer.Waist);
                        m.PlaySound(0x1F7);
                    }
                }
            }

            FinishSequence();
        }
Exemple #22
0
            public override bool OnMoveOver(Mobile mobile)
            {
                if (Visible && m_Caster != null && SpellHelper.ValidIndirectTarget(m_Caster, mobile) && m_Caster.CanBeHarmful(mobile, false))
                {
                    m_Caster.DoHarmful(mobile);

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

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

                    ApplyPoisonTo(mobile);
                }

                return(true);
            }
Exemple #23
0
        public static int GetMaxStableSlots(PlayerMobile player)
        {
            if (player == null)
            {
                return(0);
            }

            int stableSlots = 10;

            //Animal Taming
            stableSlots += (int)(Math.Floor(player.Skills[SkillName.AnimalTaming].Value / 20));

            if (player.Skills[SkillName.AnimalTaming].Value == 120)
            {
                stableSlots += 4;
            }

            //Animal Lore
            stableSlots += (int)(Math.Floor(player.Skills[SkillName.AnimalLore].Value / 20));

            if (player.Skills[SkillName.AnimalLore].Value == 120)
            {
                stableSlots += 4;
            }

            if (PlayerEnhancementPersistance.IsCustomizationEntryActive(player, CustomizationType.Herdsman))
            {
                stableSlots += 5;
            }

            if (PlayerEnhancementPersistance.IsCustomizationEntryActive(player, CustomizationType.Rancher))
            {
                stableSlots += 5;
            }

            return(stableSlots);
        }
Exemple #24
0
            public InternalItem(Point3D loc, Map map, Mobile caster) : base(128)
            {
                Visible = false;
                Movable = false;

                //Player Enhancement Customization: Geomancer
                if (PlayerEnhancementPersistance.IsCustomizationEntryActive(caster, CustomizationType.Geomancer))
                {
                    ItemID = 376;
                }

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(caster, HueableSpell.WallOfStone);

                Hue = spellHue;

                MoveToWorld(loc, map);

                if (caster.InLOS(this))
                {
                    Visible = true;
                }
                else
                {
                    Delete();
                }

                if (Deleted)
                {
                    return;
                }

                m_Timer = new InternalTimer(this, TimeSpan.FromSeconds(10.0));
                m_Timer.Start();

                m_End = DateTime.UtcNow + TimeSpan.FromSeconds(10.0);
            }
Exemple #25
0
                protected override void OnTick()
                {
                    if (m_Item.Deleted)
                    {
                        return;
                    }

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

                        else
                        {
                            m_Item.Delete();
                        }

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

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

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

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

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

                            eable.Free();

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

                                caster.DoHarmful(mobile);

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

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

                                m_Item.ApplyPoisonTo(mobile);
                            }
                        }
                    }
                }
Exemple #26
0
        public void Target(Mobile m)
        {
            bool validTarget = true;

            PlayerMobile playerTarget = m as PlayerMobile;

            if (!Caster.CanSee(m) || m.Hidden)
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
                validTarget = false;
            }

            else if (m == Caster)
            {
                Caster.SendLocalizedMessage(501039); // Thou can not resurrect thyself.
                validTarget = false;
            }

            else if (!Caster.Alive)
            {
                Caster.SendLocalizedMessage(501040); // The resurrecter must be alive.
                validTarget = false;
            }

            else if (m.Alive)
            {
                Caster.SendLocalizedMessage(501041); // Target is not dead.
                validTarget = false;
            }

            else if (!Caster.InRange(m, 1))
            {
                Caster.SendLocalizedMessage(501042); // Target is not close enough.
                validTarget = false;
            }

            else if (!m.Player)
            {
                Caster.SendLocalizedMessage(501043); // Target is not a being.
                validTarget = false;
            }

            else if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
            {
                Caster.SendLocalizedMessage(501042); // Target can not be resurrected at that location.
                m.SendLocalizedMessage(502391);      // Thou can not be resurrected there!
                validTarget = false;
            }

            if (validTarget)
            {
                if (CheckBSequence(m, true))
                {
                    SpellHelper.Turn(Caster, m);

                    int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.WaterElemental);

                    m.PlaySound(0x214);
                    m.FixedEffect(0x376A, 10, 16, spellHue, 0);

                    m.SendGump(new ResurrectGump(m, Caster));
                }
            }

            FinishSequence();
        }
Exemple #27
0
        public void Target(Mobile mobile)
        {
            if (!Caster.CanSee(mobile) || mobile.Hidden)
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(mobile))
            {
                Mobile source = Caster;

                SpellHelper.Turn(source, mobile);
                SpellHelper.CheckReflect((int)this.Circle, ref source, ref mobile);

                double damage      = (double)Utility.RandomMinMax(3, 5);
                double damageBonus = 0;

                CheckMagicResist(mobile);

                bool    enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, mobile, EnhancedSpellbookType.Fire, true, true);
                Boolean chargedSpellcast  = SpellHelper.IsChargedSpell(Caster, mobile, true, Scroll != null);
                Boolean isTamedTarget     = SpellHelper.IsTamedTarget(Caster, mobile);

                int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.MagicArrow);

                if (enhancedSpellcast)
                {
                    if (isTamedTarget)
                    {
                        damageBonus += SpellHelper.EnhancedSpellTamedCreatureBonus;
                    }

                    else
                    {
                        damageBonus += SpellHelper.EnhancedSpellBonus;
                    }
                }

                if (chargedSpellcast)
                {
                    if (isTamedTarget)
                    {
                        damageBonus += SpellHelper.ChargedSpellTamedCreatureBonus;
                    }

                    else
                    {
                        damageBonus += SpellHelper.ChargedSpellBonus;
                    }

                    source.MovingParticles(mobile, 0x36E4, 3, 0, false, true, spellHue, 0, 3006, 4006, 0, 0);
                    source.MovingParticles(mobile, 0x36E4, 7, 0, false, true, spellHue, 0, 3006, 4006, 0, 0);

                    source.PlaySound(0x1E5);
                }

                else
                {
                    source.MovingParticles(mobile, 0x36E4, 5, 0, false, true, spellHue, 0, 3006, 4006, 0, 0);
                    source.PlaySound(0x1E5);
                }

                damage *= GetDamageScalar(mobile, damageBonus);

                SpellHelper.Damage(this, Caster, mobile, damage);
            }

            FinishSequence();
        }
Exemple #28
0
        public void Target(IPoint3D p)
        {
            Map map = Caster.Map;

            SpellHelper.GetSurfaceTop(ref p);

            if (map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z) || BaseBoat.FindBoatAt(p, map) != null)
            {
                Caster.SendLocalizedMessage(501942); // That location is blocked.
            }

            else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
            {
                // Here's a little Napoleon Dynamite easter egg for IPY!
                if (Utility.RandomDouble() < 0.005)
                //if ( true )
                {
                    EnergyVortex tina = new EnergyVortex();
                    Slime        ham  = new Slime();

                    tina.Name   = "Tina";
                    tina.Body   = 0xDC;
                    tina.Hue    = 0;
                    tina.Frozen = true;

                    ham.Name   = "Ham";
                    ham.Hue    = 0x76;
                    ham.Frozen = true;

                    bool    validLocation = false;
                    Point3D tinaLocation  = new Point3D(p.X, p.Y, p.Z);
                    Point3D hamLocation   = new Point3D();

                    // Find a suitable location for Ham to spawn.
                    for (int j = 0; !validLocation && j < 10; ++j)
                    {
                        int x = tinaLocation.X + 1;
                        int y = tinaLocation.Y + 1;
                        int z = map.GetAverageZ(x, y);

                        if (validLocation = map.CanFit(x, y, tinaLocation.Z, 16, false, false))
                        {
                            hamLocation = new Point3D(x, y, tinaLocation.Z);
                        }
                        else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                        {
                            hamLocation = new Point3D(x, y, z);
                        }
                    }

                    BaseCreature.Summon(tina, false, Caster, tinaLocation, 0x212, TimeSpan.FromSeconds(10.0));
                    BaseCreature.Summon(ham, false, Caster, hamLocation, 0, TimeSpan.FromSeconds(10.0));

                    List <Mobile> mobs = new List <Mobile>();
                    mobs.Add(tina);
                    mobs.Add(ham);

                    // Wait 5 seconds, then make Tina talk.
                    Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(BeginAction), mobs);

                    // Wait 8 seconds, then make Tina and Ham recall.
                    Timer.DelayCall(TimeSpan.FromSeconds(8.0), new TimerStateCallback(EndAction), mobs);
                }

                else
                {
                    bool enhancedSpellcast = SpellHelper.IsEnhancedSpell(Caster, null, EnhancedSpellbookType.Summoner, false, true);

                    BaseCreature summon = new EnergyVortex();

                    summon.StoreBaseSummonValues();

                    double duration = 2.0 * Caster.Skills[SkillName.Magery].Value;

                    if (enhancedSpellcast)
                    {
                        duration *= SpellHelper.EnhancedSummonDurationMultiplier;

                        summon.DamageMin = (int)((double)summon.DamageMin * SpellHelper.EnhancedSummonDamageMultiplier);
                        summon.DamageMax = (int)((double)summon.DamageMax * SpellHelper.EnhancedSummonDamageMultiplier);

                        summon.SetHitsMax((int)((double)summon.HitsMax * SpellHelper.EnhancedSummonHitPointsMultiplier));
                        summon.Hits = summon.HitsMax;
                    }

                    summon.SetDispelResistance(Caster, enhancedSpellcast, 0);

                    int spellHue = PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.EnergyVortex);

                    summon.Hue = spellHue;

                    BaseCreature.Summon(summon, false, Caster, new Point3D(p), 0x212, TimeSpan.FromSeconds(duration));
                }
            }

            FinishSequence();
        }
Exemple #29
0
        public static void DoEmote(PlayerMobile player, CustomizationType emote)
        {
            if (player == null)
            {
                return;
            }

            if (player.Squelched || player.StealthSquelchedExpiration > DateTime.UtcNow)
            {
                player.SendMessage("You cannot speak at the moment.");
                return;
            }

            if (!player.Alive && player.AccessLevel == AccessLevel.Player)
            {
                player.SendMessage("You must be alive in order to use an Emote.");
                return;
            }

            bool active = PlayerEnhancementPersistance.IsCustomizationEntryActive(player, emote);

            if (!active && player.AccessLevel == AccessLevel.Player)
            {
                player.SendMessage("You have not unlocked and activated this Emote.");
                return;
            }

            if (DateTime.UtcNow < player.NextEmoteAllowed && player.AccessLevel == AccessLevel.Player)
            {
                string timeRemaining = Utility.CreateTimeRemainingString(DateTime.UtcNow, player.NextEmoteAllowed, false, true, true, true, true);

                player.SendMessage("You may not use another emote for " + timeRemaining + ".");
                return;
            }

            bool shortCooldown = PlayerEnhancementPersistance.IsCustomizationEntryActive(player, CustomizationType.EmoteFrequency);

            TimeSpan cooldown = PlayerMobile.EmoteCooldownLong;

            if (shortCooldown)
            {
                cooldown = PlayerMobile.EmoteCooldownShort;
            }

            player.NextEmoteAllowed = DateTime.UtcNow + cooldown;

            string text  = "";
            int    sound = 0;

            switch (emote)
            {
            case CustomizationType.EmoteYes:
                text = "*nods*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x337);
                }
                else
                {
                    sound = Utility.RandomList(0x449);
                }
                break;

            case CustomizationType.EmoteNo:
                text = "*shakes head*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x322);
                }
                else
                {
                    sound = Utility.RandomList(0x432);
                }
                break;

            case CustomizationType.EmoteHiccup:
                text = "*hiccup*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x31E);
                }
                else
                {
                    sound = Utility.RandomList(0x42E);
                }
                break;

            case CustomizationType.EmoteConfused:
                text = "*huh*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x31F);
                }
                else
                {
                    sound = Utility.RandomList(0x42F);
                }
                break;

            case CustomizationType.EmoteGroan:
                text = "*groans*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x31B);
                }
                else
                {
                    sound = Utility.RandomList(0x42B);
                }
                break;

            case CustomizationType.EmoteBurp:
                text = "*burp*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x30E);
                }
                else
                {
                    sound = Utility.RandomList(0x41D);
                }
                break;

            case CustomizationType.EmoteGreet:
                text = "*waves*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x31D);
                }
                else
                {
                    sound = Utility.RandomList(0x42D);
                }
                break;

            case CustomizationType.EmoteLaugh:
                text = "*laughs*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x31A, 0x321);
                }
                else
                {
                    sound = Utility.RandomList(0x42A, 0x431);
                }
                break;

            case CustomizationType.EmoteClap:
                text = "*claps*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x30C);
                }
                else
                {
                    sound = Utility.RandomList(0x41B);
                }
                break;

            case CustomizationType.EmoteCough:
                text = "*coughs*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x311, 0x312);
                }
                else
                {
                    sound = Utility.RandomList(0x420, 0x421);
                }
                break;

            case CustomizationType.EmoteCry:
                text = "*cries*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x313);
                }
                else
                {
                    sound = Utility.RandomList(0x422);
                }
                break;

            case CustomizationType.EmoteFart:
                text = "*farts*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x318);
                }
                else
                {
                    sound = Utility.RandomList(0x428);
                }
                break;

            case CustomizationType.EmoteSurprised:
                text = "*looks surprised*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x319, 0x323, 0x32B);
                }
                else
                {
                    sound = Utility.RandomList(0x429, 0x433, 0x43D);
                }
                break;

            case CustomizationType.EmoteAnger:
                text = "*looks angry*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x31C);
                }
                else
                {
                    sound = Utility.RandomList(0x42C);
                }
                break;

            case CustomizationType.EmoteKiss:
                text = "*kisses*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x320);
                }
                else
                {
                    sound = Utility.RandomList(0x430);
                }
                break;

            case CustomizationType.EmoteHurt:
                text = "*looks hurt*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x14B, 0x14C, 0x14D, 0x14E, 0x14F, 0x57E, 0x57B);
                }
                else
                {
                    sound = Utility.RandomList(0x154, 0x155, 0x156, 0x159, 0x589, 0x5F6, 0x436, 0x437, 0x43B, 0x43C);
                }
                break;

            case CustomizationType.EmoteOops:
                text = "*oops*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x32C);
                }
                else
                {
                    sound = Utility.RandomList(0x43E);
                }
                break;

            case CustomizationType.EmotePuke:
                text = "*pukes*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x32D);
                }
                else
                {
                    sound = Utility.RandomList(0x43F);
                }
                break;

            case CustomizationType.EmoteYell:
                text = "*yells*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x32E, 0x338);
                }
                else
                {
                    sound = Utility.RandomList(0x440, 0x44A);
                }
                break;

            case CustomizationType.EmoteShush:
                text = "*shh*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x32F);
                }
                else
                {
                    sound = Utility.RandomList(0x441);
                }
                break;

            case CustomizationType.EmoteSick:
                text = "*looks sick*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x30D, 0x331, 0x332);
                }
                else
                {
                    sound = Utility.RandomList(0x41F, 0x443, 0x444);
                }
                break;

            case CustomizationType.EmoteSleep:
                text = "*looks tired*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x333, 0x336);
                }
                else
                {
                    sound = Utility.RandomList(0x445, 0x448);
                }
                break;

            case CustomizationType.EmoteWhistle:
                text = "*whistles*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x335);
                }
                else
                {
                    sound = Utility.RandomList(0x447);
                }
                break;

            case CustomizationType.EmoteSpit:
                text = "*spits*";

                if (player.Female)
                {
                    sound = Utility.RandomList(0x334);
                }
                else
                {
                    sound = Utility.RandomList(0x446);
                }
                break;
            }

            player.PublicOverheadMessage(MessageType.Emote, 0, false, text);
            player.PlaySound(sound);
        }
Exemple #30
0
        public void Target(Mobile mobile)
        {
            if (!Caster.CanSee(mobile) || mobile.Hidden)
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (CheckHSequence(mobile))
            {
                SpellHelper.Turn(Caster, mobile);
                SpellHelper.CheckReflect((int)this.Circle, Caster, ref mobile);

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

                mobile.Paralyzed = false;

                bool success = false;

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

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

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

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

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

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

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

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

            FinishSequence();
        }