Esempio n. 1
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target == from)
                {
                    from.SendMessage("You don't look like a champion to me!");
                }

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



                else if (target is IdolOfTheChampion)
                {
                    IdolOfTheChampion idol = target as IdolOfTheChampion;
                    if (idol == null || idol.Deleted || idol.Spawn == null || idol.Spawn.Deleted)
                    {
                        from.SendLocalizedMessage(1054035);                           // You must target a Champion Idol to challenge the Champion's spawn!
                    }
                    else if (idol.Spawn.Active == false)
                    {
                        from.SendMessage("You challenge this Champion Spawn!");
                        idol.Spawn.Active = true;
                        m_Powder.Charges -= 1;
                        if (m_Powder.Charges == 0)
                        {
                            m_Powder.Delete();
                        }
                    }
                }
            }
Esempio n. 2
0
        public static void Valor(Mobile from, object targ)
        {
            IdolOfTheChampion idol = targ as IdolOfTheChampion;

            if (idol == null || idol.Deleted || idol.Spawn == null || idol.Spawn.Deleted)
            {
                from.SendLocalizedMessage(1054035);                   // You must target a Champion Idol to challenge the Champion's spawn!
            }
            else if (from.Hidden)
            {
                from.SendLocalizedMessage(1052015);                   // You cannot do that while hidden.
            }
            else if (idol.Spawn.HasBeenAdvanced)
            {
                from.SendLocalizedMessage(1054038);                   // The Champion of this region has already been challenged!
            }
            else
            {
                VirtueLevel vl = VirtueHelper.GetLevel(from, VirtueName.Valor);
                if (idol.Spawn.Active)
                {
                    if (idol.Spawn.Champion != null)                            //TODO: Message?
                    {
                        return;
                    }

                    int needed, consumed;
                    switch (idol.Spawn.GetSubLevel())
                    {
                    case 0:
                    {
                        needed = consumed = 2500;
                        break;
                    }

                    case 1:
                    {
                        needed = consumed = 5000;
                        break;
                    }

                    case 2:
                    {
                        needed   = 10000;
                        consumed = 7500;
                        break;
                    }

                    default:
                    {
                        needed   = 20000;
                        consumed = 10000;
                        break;
                    }
                    }

                    if (from.Virtues.GetValue((int)VirtueName.Valor) >= needed)
                    {
                        VirtueHelper.Atrophy(from, VirtueName.Valor, consumed);
                        from.SendLocalizedMessage(1054037);                           // Your challenge is heard by the Champion of this region! Beware its wrath!
                        idol.Spawn.HasBeenAdvanced = true;
                        idol.Spawn.AdvanceLevel();
                    }
                    else
                    {
                        from.SendLocalizedMessage(1054039);                           // The Champion of this region ignores your challenge. You must further prove your valor.
                    }
                }
                else
                {
                    if (vl == VirtueLevel.Knight)
                    {
                        VirtueHelper.Atrophy(from, VirtueName.Valor, 11000);
                        from.SendLocalizedMessage(1054037);                           // Your challenge is heard by the Champion of this region! Beware its wrath!
                        idol.Spawn.EndRestart();
                        idol.Spawn.HasBeenAdvanced = true;
                    }
                    else
                    {
                        from.SendLocalizedMessage(1054036);                           // You must be a Knight of Valor to summon the champion's spawn in this manner!
                    }
                }
            }
        }
Esempio n. 3
0
        public static void Valor(Mobile from, object targ)
        {
            IdolOfTheChampion idol = targ as IdolOfTheChampion;
            VirtueLevel       vl   = VirtueHelper.GetLevel(from, VirtueName.Valor);

            if (idol == null || idol.Deleted || idol.Spawn == null || idol.Spawn.Deleted)
            {
                from.SendLocalizedMessage(1054035);                   // You must target a Champion Idol to challenge the Champion's spawn!
            }
            else if (from.Hidden)
            {
                from.SendLocalizedMessage(1052015);                   // You cannot do that while hidden.
            }
            else if (idol.Spawn.OneAdvance == true)
            {
                from.SendMessage("You have already advanced this Champion Spawn!");
            }
            else if (idol.Spawn.OneAdvance == false && idol.Spawn.Active)
            {
                if (vl == VirtueLevel.Follower)
                {
                    VirtueHelper.Atrophy(from, VirtueName.Valor, 5000);
                    idol.Spawn.AdvanceLevel();
                    idol.Spawn.OneAdvance = true;
                }
                else
                {
                    from.SendMessage("You must be a Follower of Valor to advance this Champ Spawn any further.");
                }
            }
            else if (idol.Spawn.HasBeenAdvanced)
            {
                from.SendLocalizedMessage(1054038);                   // The Champion of this region has already been challenged!
            }
            else
            {
                //VirtueLevel vl = VirtueHelper.GetLevel( from, VirtueName.Valor );
                if (idol.Spawn.Active)
                {
                    if (idol.Spawn.Champion != null)                            //TODO: Message?
                    {
                        return;
                    }

                    int needed, consumed;
                    switch (idol.Spawn.GetSubLevel())
                    {
                    case 0:
                    {
                        needed = consumed = 2500;
                        break;
                    }

                    case 1:
                    {
                        needed = consumed = 5000;
                        break;
                    }

                    case 2:
                    {
                        needed   = 10000;
                        consumed = 7500;
                        break;
                    }

                    default:
                    {
                        needed   = 20000;
                        consumed = 10000;
                        break;
                    }
                    }

                    if (from.Virtues.GetValue((int)VirtueName.Valor) >= needed)
                    {
                        VirtueHelper.Atrophy(from, VirtueName.Valor, consumed);
                        from.SendLocalizedMessage(1054037); // Your challenge is heard by the Champion of this region! Beware its wrath!
                        idol.Spawn.HasBeenAdvanced = true;
                        idol.Spawn.AdvanceLevel();
                        int skulls = Utility.RandomMinMax(1, 3);
                        Console.WriteLine("Random Was = " + skulls);
                        while (skulls <= 3)
                        {
                            idol.Spawn.AdvanceLevel();
                            skulls++;
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(1054039); // The Champion of this region ignores your challenge. You must further prove your valor.
                    }
                }
                else
                {
                    if (vl == VirtueLevel.Knight)
                    {
                        VirtueHelper.Atrophy(from, VirtueName.Valor, 11000);
                        from.SendLocalizedMessage(1054037); // Your challenge is heard by the Champion of this region! Beware its wrath!
                        idol.Spawn.EndRestart();
                        idol.Spawn.HasBeenAdvanced = true;
                        idol.Spawn.AdvanceLevel();
                        int skulls = Utility.RandomMinMax(1, 3);
                        Console.WriteLine("Random Was = " + skulls);
                        while (skulls <= 3)
                        {
                            idol.Spawn.AdvanceLevel();
                            skulls++;
                        }
                        Console.WriteLine("This Gets Called Now.");
                    }
                    else
                    {
                        from.SendLocalizedMessage(1054036); // You must be a Knight of Valor to summon the champion's spawn in this manner!
                    }
                }
            }
        }
Esempio n. 4
0
        public static void Valor(Mobile from, object targeted)
        {
            if (!from.CheckAlive())
            {
                return;
            }

            IdolOfTheChampion idol = targeted as IdolOfTheChampion;

            if (idol == null || idol.Deleted || idol.Spawn == null || idol.Spawn.Deleted)
            {
                from.SendLocalizedMessage(1054035);                   // You must target a Champion Idol to challenge the Champion's spawn!
            }
            else if (from.Hidden)
            {
                from.SendLocalizedMessage(1052015);                   // You cannot do that while hidden.
            }
            else if (idol.Spawn.HasBeenAdvanced)
            {
                from.SendLocalizedMessage(1054038);                   // The Champion of this region has already been challenged!
            }
            else
            {
                if (idol.Spawn.Active)
                {
                    if (idol.Spawn.Champion != null)
                    {
                        from.SendLocalizedMessage(1054038);                           // The Champion of this region has already been challenged!
                        return;
                    }

                    int needed, consumed;
                    switch (idol.Spawn.GetSubLevel())
                    {
                    case 0:
                    {
                        needed   = 2500;
                        consumed = 2500;
                        break;
                    }

                    case 1:
                    {
                        needed   = 5000;
                        consumed = 5000;
                        break;
                    }

                    case 2:
                    {
                        needed   = 10000;
                        consumed = 7500;
                        break;
                    }

                    default:
                    {
                        needed   = 20000;
                        consumed = 10000;
                        break;
                    }
                    }

                    if (from.Virtues.GetValue((int)VirtueName.Valor) >= needed)
                    {
                        VirtueHelper.Atrophy(from, VirtueName.Valor, consumed);
                        from.SendLocalizedMessage(1054040);                           // You have lost some Valor.

                        // Your challenge is heard by the Champion of this region! Beware its wrath!
                        idol.PublicOverheadMessage(Network.MessageType.Regular, 0x3B2, 1054037, "");
                        idol.Spawn.HasBeenAdvanced = true;
                        idol.Spawn.AdvanceLevel();
                    }
                    else
                    {
                        from.SendLocalizedMessage(1054039);                           // The Champion of this region ignores your challenge. You must further prove your valor.
                    }
                }
                else
                {
                    VirtueLevel level = VirtueHelper.GetLevel(from, VirtueName.Valor);

                    if (level >= VirtueLevel.Knight)
                    {
                        idol.Spawn.Active = true;

                        if (idol.Spawn.RandomizeType)
                        {
                            switch (Utility.Random(5))
                            {
                            case 0:
                                idol.Spawn.Type = ChampionSpawnType.VerminHorde;
                                break;

                            case 1:
                                idol.Spawn.Type = ChampionSpawnType.UnholyTerror;
                                break;

                            case 2:
                                idol.Spawn.Type = ChampionSpawnType.ColdBlood;
                                break;

                            case 3:
                                idol.Spawn.Type = ChampionSpawnType.Abyss;
                                break;

                            case 4:
                                idol.Spawn.Type = ChampionSpawnType.Arachnid;
                                break;
                            }
                        }

                        // It's strange, but at OSI Valor not only activate spawn but also increase 2-4 levels on it.
                        // If counts of increased levels less than 4, champion spawn can be used with Valor again for advance level.
                        int candles = Utility.RandomMinMax(2, 4);
                        idol.Spawn.Level = candles;
                        if (candles > 3)
                        {
                            idol.Spawn.HasBeenAdvanced = true;
                        }

                        VirtueHelper.Atrophy(from, VirtueName.Valor, 11000);
                        from.SendLocalizedMessage(1054040);                           // You have lost some Valor.

                        // Your challenge is heard by the Champion of this region! Beware its wrath!
                        idol.PublicOverheadMessage(Network.MessageType.Regular, 0x3B2, 1054037, "");
                    }
                    else
                    {
                        from.SendLocalizedMessage(1054036);                           // You must be a Knight of Valor to summon the champion's spawn in this manner!
                    }
                }
            }
        }