Пример #1
0
        public override void GetProperties(ObjectPropertyList list)
        {
            int oldUses = m_UsesRemaining;

            CheckReplenishUses(false);

            base.GetProperties(list);

            if (m_ReplenishesCharges)
            {
                list.Add(1070928); // Replenish Charges
            }
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (!CraftResources.IsStandard(m_Resource))
            {
                int num = CraftResources.GetLocalizationNumber(m_Resource);

                if (num > 0)
                {
                    list.Add(num);
                }
                else
                {
                    list.Add(CraftResources.GetName(m_Resource));
                }
            }

            if (m_UsesRemaining != oldUses)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(InvalidateProperties));
            }
        }
Пример #2
0
        public double GetDifficultyFor(Mobile targ)
        {
            double val = GetBaseDifficulty(targ);

            if (m_Exceptional)
            {
                val -= 5.0;                 // 10%
            }
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 10.0;                         // 20%
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 10.0;                         // -20%
                    }
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 10.0;                         // 20%
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 10.0;                         // -20%
                    }
                }
            }

            Utility.FixMax(ref val, 160);

            return(val);
        }
Пример #3
0
        public override void GetProperties(ObjectPropertyList list)
        {
            int oldUses = m_UsesRemaining;

            CheckReplenishUses(false);

            base.GetProperties(list);

            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.TitleName);                 // crafted by ~1_NAME~
            }
            if (m_Quality == ItemQuality.Exceptional)
            {
                list.Add(1060636);                         // exceptional
            }
            list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~

            if (m_ReplenishesCharges)
            {
                list.Add(1070928); // Replenish Charges
            }
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_UsesRemaining != oldUses)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(InvalidateProperties));
            }
        }
        public double GetDifficultyFor(Mobile targ)
        {
            double val = GetBaseDifficulty(targ);

            if (m_Quality == InstrumentQuality.Exceptional)
            {
                val -= 10.0;
            }

            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 25.0;
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 25.0;
                    }
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 25.0;
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 25.0;
                    }
                }
            }

            return(val);
        }
Пример #5
0
        private static SlayerEntry[] CompileEntries(IEnumerable <SlayerGroup> groups)
        {
            var entries = new SlayerEntry[28];

            foreach (SlayerGroup g in groups)
            {
                g.Super.Group = g;

                entries[(int)g.Super.Name] = g.Super;

                foreach (SlayerEntry s in g.Entries)
                {
                    s.Group = g;
                    entries[(int)s.Name] = s;
                }
            }

            return(entries);
        }
Пример #6
0
        private static SlayerEntry[] CompileEntries(SlayerGroup[] groups)
        {
            SlayerEntry[] entries = new SlayerEntry[27];

            for (int i = 0; i < groups.Length; ++i)
            {
                SlayerGroup g = groups[i];

                g.Super.Group = g;

                entries[(int)g.Super.Name] = g.Super;

                for (int j = 0; j < g.Entries.Length; ++j)
                {
                    g.Entries[j].Group = g;
                    entries[(int)g.Entries[j].Name] = g.Entries[j];
                }
            }

/* ** DELETE **
 *              // Adam: test
 *              {
 *                      Console.WriteLine("count" + entries.Length.ToString());
 *                      for (int ix=0; ix < entries.Length; ix++)
 *                      {
 *                              //Console.WriteLine("entries:" + entries[ix].ToString());
 *                              if ((entries[ix] as SlayerEntry) != null)
 *                              {
 *                                      Console.Write("entries: ");
 *                                      Console.WriteLine(entries[ix].Group.Super.Name.ToString());
 *                              }
 *                              else
 *                              {
 *                                      Console.Write("entries: ");
 *                                      Console.WriteLine("bogus");
 *                              }
 *                      }
 *              }
 */

            return(entries);
        }
Пример #7
0
        private static SlayerEntry[] CompileEntries(SlayerGroup[] groups)
        {
            SlayerEntry[] entries = new SlayerEntry[32];

            for (int i = 0; i < groups.Length; ++i)
            {
                SlayerGroup g = groups[i];

                g.Super.Group = g;

                entries[(int)g.Super.Name] = g.Super;

                for (int j = 0; j < g.Entries.Length; ++j)
                {
                    g.Entries[j].Group = g;
                    entries[(int)g.Entries[j].Name] = g.Entries[j];
                }
            }

            return(entries);
        }
Пример #8
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (m_Quality == BookQuality.Exceptional)
            {
                list.Add(1063341);                 // exceptional
            }

            if (m_EngravedText != null)
            {
                list.Add(1072305, m_EngravedText);                 // Engraved: ~1_INSCRIPTION~
            }

            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.TitleName);                 // crafted by ~1_NAME~
            }

            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            list.Add(1042886, m_Count.ToString());             // ~1_NUMBERS_OF_SPELLS~ Spells
        }
Пример #9
0
        public double GetDifficultyFor(Mobile targ)
        {
            if (!(targ is BaseCreature))
            {
                return(0.0);
            }

            BaseCreature bc = (BaseCreature)targ;

            double val = GetCreatureDifficulty(bc);

            // Instrument specific modifications

            if (m_Quality == InstrumentQuality.Exceptional)
            {
                val -= 5.0;                 // 10%
            }
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 10.0;                         // 20%
                    }
                    else if (entry.Group.Opposition.Super.Slays(targ))
                    {
                        val += 10.0;                         // -20%
                    }
                }
            }

            return(val);
        }
Пример #10
0
        public double GetDifficultyFor(Mobile targ)
        {
            /* Difficulty TODO: Add another 100 points for each of the following abilities:
             *      - Radiation or Aura Damage (Heat, Cold etc.)
             *      - Summoning Undead
             */

            double val = targ.Hits + targ.Stam + targ.Mana;

            for (int i = 0; i < targ.Skills.Length; i++)
            {
                val += targ.Skills[i].Base;
            }

            if (val > 700)
            {
                val = 700 + ((val - 700) / 3.66667);
            }

            BaseCreature bc = targ as BaseCreature;

            if (IsMageryCreature(bc))
            {
                val += 100;
            }

            if (IsFireBreathingCreature(bc))
            {
                val += 100;
            }

            if (IsPoisonImmune(bc))
            {
                val += 100;
            }

            if (targ is VampireBat || targ is VampireBatFamiliar)
            {
                val += 100;
            }

            val += GetPoisonLevel(bc) * 20;

            val /= 10;

            if (bc != null && bc.IsParagon)
            {
                val += 40.0;
            }

            if (m_Quality == InstrumentQuality.Exceptional)
            {
                val -= 5.0;                 // 10%
            }
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 10.0;                         // 20%
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 10.0;                         // -20%
                    }
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 10.0;                         // 20%
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 10.0;                         // -20%
                    }
                }
            }

            return(val);
        }
Пример #11
0
        public override void OnSingleClick(Mobile from)
        {
            ArrayList attrs = new ArrayList();

            if (DisplayLootType)
            {
                if (LootType == LootType.Blessed)
                {
                    attrs.Add(new EquipInfoAttribute(1038021)); // blessed
                }
                else if (LootType == LootType.Cursed)
                {
                    attrs.Add(new EquipInfoAttribute(1049643)); // cursed
                }
            }

            if (m_Quality == ItemQuality.Exceptional)
            {
                attrs.Add(new EquipInfoAttribute(1018305 - (int)m_Quality));
            }

            if (m_ReplenishesCharges)
            {
                attrs.Add(new EquipInfoAttribute(1070928)); // Replenish Charges
            }
            // TODO: Must this support item identification?
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    attrs.Add(new EquipInfoAttribute(entry.Title));
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    attrs.Add(new EquipInfoAttribute(entry.Title));
                }
            }

            int number;

            if (Name == null)
            {
                number = LabelNumber;
            }
            else
            {
                LabelTo(from, Name);
                number = 1041000;
            }

            if (attrs.Count == 0 && Crafter == null && Name != null)
            {
                return;
            }

            EquipmentInfo eqInfo = new EquipmentInfo(number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));

            from.Send(new DisplayEquipmentInfo(this, eqInfo));
        }
Пример #12
0
		private static SlayerEntry[] CompileEntries( SlayerGroup[] groups )
		{
			SlayerEntry[] entries = new SlayerEntry[27];

			for ( int i = 0; i < groups.Length; ++i )
			{
				SlayerGroup g = groups[i];

				g.Super.Group = g;

				entries[(int)g.Super.Name] = g.Super;

				for ( int j = 0; j < g.Entries.Length; ++j )
				{
					g.Entries[j].Group = g;
					entries[(int)g.Entries[j].Name] = g.Entries[j];
				}
			}
/* ** DELETE ** 
		// Adam: test
		{
			Console.WriteLine("count" + entries.Length.ToString());
			for (int ix=0; ix < entries.Length; ix++)
			{
				//Console.WriteLine("entries:" + entries[ix].ToString());
				if ((entries[ix] as SlayerEntry) != null)
				{
					Console.Write("entries: "); 
					Console.WriteLine(entries[ix].Group.Super.Name.ToString());
				}
				else
				{
					Console.Write("entries: "); 
					Console.WriteLine("bogus");
				}
			}
		}
*/

			return entries;
		}
Пример #13
0
        public double GetDifficultyFor(Mobile targ)
        {
            double val = GetBaseDifficulty(targ);

            if (m_Quality == ItemQuality.Exceptional)
            {
                val -= 5.0; // 10%
            }
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 10.0; // 20%
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 10.0; // -20%
                    }
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 10.0; // 20%
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 10.0; // -20%
                    }
                }
            }

            if (m_Slayer == SlayerName.None && m_Slayer2 == SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(SlayerSocket.GetSlayer(this));

                if (entry != null)
                {
                    if (entry.Slays(targ))
                    {
                        val -= 10.0; // 20%
                    }
                    else if (entry.Group.OppositionSuperSlays(targ))
                    {
                        val += 10.0; // -20%
                    }
                }
            }

            return(val);
        }
Пример #14
0
        public override bool OnMoveOver(Mobile m)
        {
            bool hurts = true;

            if (m.Blessed)
            {
                hurts = false;
            }

            if (!m.Alive)
            {
                hurts = false;
            }

            if (owner is BaseCreature && m is BaseCreature)
            {
                BaseCreature bc = (BaseCreature)m;

                if (!bc.Controlled)
                {
                    hurts = false;
                }
            }

            if (hurts)
            {
                SlayerEntry SilverSlayer   = SlayerGroup.GetEntryByName(SlayerName.Silver);
                SlayerEntry ExorcismSlayer = SlayerGroup.GetEntryByName(SlayerName.Exorcism);

                if (m is PlayerMobile && Spells.Research.ResearchAirWalk.UnderEffect(m))
                {
                    Point3D air = new Point3D((m.X + 1), (m.Y + 1), (m.Z + 5));
                    Effects.SendLocationParticles(EffectItem.Create(air, m.Map, EffectItem.DefaultDuration), 0x2007, 9, 32, Server.Items.CharacterDatabase.GetMySpellHue(m, 0), 0, 5022, 0);
                    m.PlaySound(0x014);
                }
                else if (this.Name == "hot magma" && !(m is MagmaElemental))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3709, 10, 30, 5052);
                    Effects.PlaySound(m.Location, m.Map, 0x225);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 100, 0, 0, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "quick silver")
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 50, 0, 0, 0, 50);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "holy water" && (SilverSlayer.Slays(m) || ExorcismSlayer.Slays(m)))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3709, 10, 30, 5052);
                    Effects.PlaySound(m.Location, m.Map, 0x225);
                    AOS.Damage(m, owner, Hurt(owner, 40, 60), 20, 20, 20, 20, 20);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "glowing goo" && !(m is GlowBeetle) && !(m is GlowBeetleRiding))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0);
                    int eSound = 0x229;
                    if (m.Body == 0x190 && m is PlayerMobile)
                    {
                        eSound = 0x43F;
                    }
                    else if (m.Body == 0x191 && m is PlayerMobile)
                    {
                        eSound = 0x32D;
                    }
                    Effects.PlaySound(m.Location, m.Map, eSound);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 0, 0, 50, 50);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "scorching ooze" && !(m is Lavapede))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0);
                    int eSound = 0x229;
                    if (m.Body == 0x190 && m is PlayerMobile)
                    {
                        eSound = 0x43F;
                    }
                    else if (m.Body == 0x191 && m is PlayerMobile)
                    {
                        eSound = 0x32D;
                    }
                    Effects.PlaySound(m.Location, m.Map, eSound);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 100, 0, 0, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "blue slime" && !(m is SlimeDevil))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 0, 100, 0, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "swamp muck" && !(m is SwampThing))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 50, 0, 0, 50, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "poisonous slime" && !(m is AbyssCrawler))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 0, 0, 100, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "poison spit" && !(m is Neptar) && !(m is NeptarWizard))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 0, 0, 100, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "poison spittle" && !(m is Lurker))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 0, 0, 100, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "fungal slime" && !(m is Fungal) && !(m is FungalMage) && !(m is CreepingFungus))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 50, 0, 0, 50, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "spider ooze" && !(m is ZombieSpider))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 50, 0, 0, 50, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "acidic slime" && !(m is ToxicElemental))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x231);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 50, 0, 0, 50, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "acidic ichor" && !(m is AntaurKing) && !(m is AntaurProgenitor) && !(m is AntaurSoldier) && !(m is AntaurWorker))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x231);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 50, 0, 0, 50, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "thick blood" && !(m is BloodElemental) && !(m is BloodDemon))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 0x25, 7, 9915, 0);
                    int eSound = 0x229;
                    if (m.Body == 0x190 && m is PlayerMobile)
                    {
                        eSound = 0x43F;
                    }
                    else if (m.Body == 0x191 && m is PlayerMobile)
                    {
                        eSound = 0x32D;
                    }
                    Effects.PlaySound(m.Location, m.Map, eSound);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 0, 0, 100, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "infected blood" && !(m is Infected))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 0x25, 7, 9915, 0);
                    int eSound = 0x229;
                    if (m.Body == 0x190 && m is PlayerMobile)
                    {
                        eSound = 0x43F;
                    }
                    else if (m.Body == 0x191 && m is PlayerMobile)
                    {
                        eSound = 0x32D;
                    }
                    Effects.PlaySound(m.Location, m.Map, eSound);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 0, 0, 100, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "alien blood" && !(m is Xenomorph) && !(m is Xenomutant))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 0x25, 7, 9915, 0);
                    int eSound = 0x229;
                    if (m.Body == 0x190 && m is PlayerMobile)
                    {
                        eSound = 0x43F;
                    }
                    else if (m.Body == 0x191 && m is PlayerMobile)
                    {
                        eSound = 0x32D;
                    }
                    Effects.PlaySound(m.Location, m.Map, eSound);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 20, 20, 20, 20, 20);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "green blood" && !(m is ZombieGiant))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 0x25, 7, 9915, 0);
                    int eSound = 0x229;
                    if (m.Body == 0x190 && m is PlayerMobile)
                    {
                        eSound = 0x43F;
                    }
                    else if (m.Body == 0x191 && m is PlayerMobile)
                    {
                        eSound = 0x32D;
                    }
                    Effects.PlaySound(m.Location, m.Map, eSound);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 20, 0, 0, 80, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "toxic blood" && !(m is Mutant))
                {
                    owner.DoHarmful(m);
                    Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 0x25, 7, 9915, 0);
                    int eSound = 0x229;
                    if (m.Body == 0x190 && m is PlayerMobile)
                    {
                        eSound = 0x43F;
                    }
                    else if (m.Body == 0x191 && m is PlayerMobile)
                    {
                        eSound = 0x32D;
                    }
                    Effects.PlaySound(m.Location, m.Map, eSound);
                    AOS.Damage(m, owner, Hurt(owner, 24, 48), 0, 0, 0, 100, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "freezing water" && !(m is WaterElemental) && !(m is WaterWeird) && !(m is DeepWaterElemental) && !(m is Dagon))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 20, 40), 0, 0, 100, 0, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "deep water" && !(m is WaterElemental) && !(m is WaterWeird) && !(m is DeepWaterElemental) && !(m is Dagon))
                {
                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, 40, 60), 0, 0, 100, 0, 0);
                    //												Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "lesser poison potion" || this.Name == "poison potion" || this.Name == "greater poison potion" | this.Name == "deadly poison potion" || this.Name == "lethal poison potion")
                {
                    int pSkill = (int)(owner.Skills[SkillName.Poisoning].Value / 50);
                    int tSkill = (int)(owner.Skills[SkillName.TasteID].Value / 33);
                    int aSkill = (int)(owner.Skills[SkillName.Alchemy].Value / 33);

                    int    pMin = pSkill + tSkill + aSkill;
                    int    pMax = pMin * 2;
                    Poison pois = Poison.Lesser;

                    if (this.Name == "poison potion")
                    {
                        pMin = pMin + 2;  pMax = pMax + 2;  pois = Poison.Regular;
                    }
                    else if (this.Name == "greater poison potion")
                    {
                        pMin = pMin + 3;  pMax = pMax + 3;  pois = Poison.Greater;
                    }
                    else if (this.Name == "deadly poison potion")
                    {
                        pMin = pMin + 4;  pMax = pMax + 4;  pois = Poison.Deadly;
                    }
                    else if (this.Name == "lethal poison potion")
                    {
                        pMin = pMin + 5;  pMax = pMax + 5;  pois = Poison.Lethal;
                    }

                    if (pMin >= Utility.RandomMinMax(1, 16))
                    {
                        m.ApplyPoison(owner, pois);
                    }

                    owner.DoHarmful(m);
                    Effects.PlaySound(m.Location, m.Map, 0x4D1);
                    AOS.Damage(m, owner, Hurt(owner, pMin, pMax), 0, 0, 0, 100, 0);
                    //													Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "liquid fire")
                {
                    int liqMin = Server.Items.BaseLiquid.GetLiquidBonus(owner);
                    int liqMax = liqMin * 2;
                    owner.DoHarmful(m);
                    Effects.SendLocationEffect(m.Location, m.Map, 0x3709, 30, 10);
                    m.PlaySound(0x208);
                    AOS.Damage(m, owner, Hurt(owner, liqMin, liqMax), 20, 80, 0, 0, 0);
                    //														Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "liquid goo")
                {
                    int liqMin = Server.Items.BaseLiquid.GetLiquidBonus(owner);
                    int liqMax = liqMin * 2;
                    owner.DoHarmful(m);
                    Effects.SendLocationEffect(m.Location, m.Map, Utility.RandomList(0x3967, 0x3979), 30, 10);
                    m.PlaySound(0x5C3);
                    AOS.Damage(m, owner, Hurt(owner, liqMin, liqMax), 20, 0, 0, 0, 80);
                    //														Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "liquid ice")
                {
                    int liqMin = Server.Items.BaseLiquid.GetLiquidBonus(owner);
                    int liqMax = liqMin * 2;
                    owner.DoHarmful(m);
                    Effects.SendLocationEffect(m.Location, m.Map, 0x1A84, 30, 10, 0x9C1, 0);
                    m.PlaySound(0x10B);
                    AOS.Damage(m, owner, Hurt(owner, liqMin, liqMax), 20, 0, 80, 0, 0);
                    //														Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "liquid rot")
                {
                    int liqMin = Server.Items.BaseLiquid.GetLiquidBonus(owner);
                    int liqMax = liqMin * 2;
                    owner.DoHarmful(m);
                    Effects.SendLocationEffect(m.Location, m.Map, 0x3400, 60);
                    Effects.PlaySound(m.Location, m.Map, 0x108);
                    AOS.Damage(m, owner, Hurt(owner, liqMin, liqMax), 20, 0, 0, 80, 0);
                    //														Ph,		Fr,		Cd,		Ps,		Eg
                }
                else if (this.Name == "liquid pain")
                {
                    int liqMin = Server.Items.BaseLiquid.GetLiquidBonus(owner);
                    int liqMax = liqMin * 2;
                    owner.DoHarmful(m);
                    m.FixedParticles(0x37C4, 1, 8, 9916, 39, 3, EffectLayer.Head);
                    m.FixedParticles(0x37C4, 1, 8, 9502, 39, 4, EffectLayer.Head);
                    m.PlaySound(0x210);
                    AOS.Damage(m, owner, Hurt(owner, liqMin, liqMax), 80, 5, 5, 5, 5);
                    //														Ph,		Fr,		Cd,		Ps,		Eg
                }
            }
            return(true);
        }
Пример #15
0
        private static SlayerEntry[] CompileEntries( SlayerGroup[] groups )
        {
            SlayerEntry[] entries = new SlayerEntry[28];

            for ( int i = 0; i < groups.Length; ++i )
            {
                SlayerGroup g = groups[i];

                g.Super.Group = g;

                entries[(int)g.Super.Name] = g.Super;

                for ( int j = 0; j < g.Entries.Length; ++j )
                {
                    g.Entries[j].Group = g;
                    entries[(int)g.Entries[j].Name] = g.Entries[j];
                }
            }

            return entries;
        }
Пример #16
0
        public override void AddNameProperties(ObjectPropertyList list)
        {
            base.AddNameProperties(list);

            if (m_Quality == BookQuality.Exceptional)
            {
                list.Add(1063341);                 // exceptional
            }

            if (m_EngravedText != null)
            {
                list.Add(1072305, Utility.FixHtml(m_EngravedText)); // Engraved: ~1_INSCRIPTION~
            }

            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.TitleName);                 // crafted by ~1_NAME~
            }

            if (IsVvVItem)
            {
                list.Add(1154937); // VvV Item
            }

            if (OwnerName != null)
            {
                list.Add(1153213, OwnerName);
            }

            if (m_NegativeAttributes != null)
            {
                m_NegativeAttributes.GetProperties(list, this);
            }

            m_AosSkillBonuses.GetProperties(list);

            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (HasSocket <Caddellite>())
            {
                list.Add(1158662); // Caddellite Infused
            }

            int prop;

            if ((prop = m_AosAttributes.SpellChanneling) != 0)
            {
                list.Add(1060482);                 // spell channeling
            }

            if ((prop = m_AosAttributes.NightSight) != 0)
            {
                list.Add(1060441);                 // night sight
            }

            if ((prop = m_AosAttributes.BonusStr) != 0)
            {
                list.Add(1060485, prop.ToString());                 // strength bonus ~1_val~
            }

            if ((prop = m_AosAttributes.BonusDex) != 0)
            {
                list.Add(1060409, prop.ToString());                 // dexterity bonus ~1_val~
            }

            if ((prop = m_AosAttributes.BonusInt) != 0)
            {
                list.Add(1060432, prop.ToString());                 // intelligence bonus ~1_val~
            }

            if ((prop = m_AosAttributes.BonusHits) != 0)
            {
                list.Add(1060431, prop.ToString());                 // hit point increase ~1_val~
            }

            if ((prop = m_AosAttributes.BonusStam) != 0)
            {
                list.Add(1060484, prop.ToString());                 // stamina increase ~1_val~
            }

            if ((prop = m_AosAttributes.BonusMana) != 0)
            {
                list.Add(1060439, prop.ToString());                 // mana increase ~1_val~
            }

            if ((prop = m_AosAttributes.RegenHits) != 0)
            {
                list.Add(1060444, prop.ToString());                 // hit point regeneration ~1_val~
            }

            if ((prop = m_AosAttributes.RegenStam) != 0)
            {
                list.Add(1060443, prop.ToString());                 // stamina regeneration ~1_val~
            }

            if ((prop = m_AosAttributes.RegenMana) != 0)
            {
                list.Add(1060440, prop.ToString());                 // mana regeneration ~1_val~
            }

            if ((prop = m_AosAttributes.Luck) != 0)
            {
                list.Add(1060436, prop.ToString());                 // luck ~1_val~
            }

            if ((prop = m_AosAttributes.EnhancePotions) != 0)
            {
                list.Add(1060411, prop.ToString());                 // enhance potions ~1_val~%
            }

            if ((prop = m_AosAttributes.ReflectPhysical) != 0)
            {
                list.Add(1060442, prop.ToString());                 // reflect physical damage ~1_val~%
            }

            if ((prop = m_AosAttributes.AttackChance) != 0)
            {
                list.Add(1060415, prop.ToString());                 // hit chance increase ~1_val~%
            }

            if ((prop = m_AosAttributes.WeaponSpeed) != 0)
            {
                list.Add(1060486, prop.ToString());                 // swing speed increase ~1_val~%
            }

            if ((prop = m_AosAttributes.WeaponDamage) != 0)
            {
                list.Add(1060401, prop.ToString());                 // damage increase ~1_val~%
            }

            if ((prop = m_AosAttributes.DefendChance) != 0)
            {
                list.Add(1060408, prop.ToString());                 // defense chance increase ~1_val~%
            }

            if ((prop = m_AosAttributes.CastRecovery) != 0)
            {
                list.Add(1060412, prop.ToString());                 // faster cast recovery ~1_val~
            }

            if ((prop = m_AosAttributes.CastSpeed) != 0)
            {
                list.Add(1060413, prop.ToString());                 // faster casting ~1_val~
            }

            if ((prop = m_AosAttributes.SpellDamage) != 0)
            {
                list.Add(1060483, prop.ToString());                 // spell damage increase ~1_val~%
            }

            if ((prop = m_AosAttributes.LowerManaCost) != 0)
            {
                list.Add(1060433, prop.ToString());                 // lower mana cost ~1_val~%
            }

            if ((prop = m_AosAttributes.LowerRegCost) != 0)
            {
                list.Add(1060434, prop.ToString());                 // lower reagent cost ~1_val~%
            }

            if ((prop = m_AosAttributes.IncreasedKarmaLoss) != 0)
            {
                list.Add(1075210, prop.ToString());                 // Increased Karma Loss ~1val~%
            }

            AddProperty(list);

            list.Add(1042886, m_Count.ToString());             // ~1_NUMBERS_OF_SPELLS~ Spells

            if (this.m_MaxHitPoints > 0)
            {
                list.Add(1060639, "{0}\t{1}", this.m_HitPoints, this.m_MaxHitPoints); // durability ~1_val~ / ~2_val~
            }
        }
Пример #17
0
        public override void OnSingleClick(Mobile from)
        {
            var attrs = new List <EquipInfoAttribute>();


            if (DisplayLootType)
            {
                if (LootType == LootType.Blessed)
                {
                    attrs.Add(new EquipInfoAttribute(1038021)); // blessed
                }
                else if (LootType == LootType.Cursed)
                {
                    attrs.Add(new EquipInfoAttribute(1049643)); // cursed
                }
            }

            if (m_Quality == InstrumentQuality.Exceptional)
            {
                attrs.Add(new EquipInfoAttribute(1018305 - (int)m_Quality));
            }

            if (m_ReplenishesCharges)
            {
                attrs.Add(new EquipInfoAttribute(1070928)); // Replenish Charges
            }
            // TODO: Must this support item identification?
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    attrs.Add(new EquipInfoAttribute(entry.Title));
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    attrs.Add(new EquipInfoAttribute(entry.Title));
                }
            }

            int number;

            if (Name == null)
            {
                number = LabelNumber;
            }
            else
            {
                LabelTo(from, Name);
                number = 1041000;
            }

            if (attrs.Count == 0 && Crafter == null && Name != null)
            {
                return;
            }

            from.NetState.SendDisplayEquipmentInfo(Serial, number, m_Crafter?.RawName, false, attrs);
        }
Пример #18
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (m_Quality == BookQuality.Exceptional)
            {
                list.Add(1063341);                 // exceptional
            }

            if (m_EngravedText != null)
            {
                list.Add(1072305, m_EngravedText);                 // Engraved: ~1_INSCRIPTION~
            }

            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.Name);                 // crafted by ~1_NAME~
            }

            m_AosSkillBonuses.GetProperties(list);

            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            int prop;

            if ((prop = m_AosAttributes.WeaponDamage) != 0)
            {
                list.Add(1060401, prop.ToString());                 // damage increase ~1_val~%
            }

            if ((prop = m_AosAttributes.DefendChance) != 0)
            {
                list.Add(1060408, prop.ToString());                 // defense chance increase ~1_val~%
            }

            if ((prop = m_AosAttributes.BonusDex) != 0)
            {
                list.Add(1060409, prop.ToString());                 // dexterity bonus ~1_val~
            }

            if ((prop = m_AosAttributes.EnhancePotions) != 0)
            {
                list.Add(1060411, prop.ToString());                 // enhance potions ~1_val~%
            }

            if ((prop = m_AosAttributes.CastRecovery) != 0)
            {
                list.Add(1060412, prop.ToString());                 // faster cast recovery ~1_val~
            }

            if ((prop = m_AosAttributes.CastSpeed) != 0)
            {
                list.Add(1060413, prop.ToString());                 // faster casting ~1_val~
            }

            if ((prop = m_AosAttributes.AttackChance) != 0)
            {
                list.Add(1060415, prop.ToString());                 // hit chance increase ~1_val~%
            }

            if ((prop = m_AosAttributes.BonusHits) != 0)
            {
                list.Add(1060431, prop.ToString());                 // hit point increase ~1_val~
            }

            if ((prop = m_AosAttributes.BonusInt) != 0)
            {
                list.Add(1060432, prop.ToString());                 // intelligence bonus ~1_val~
            }

            if ((prop = m_AosAttributes.LowerManaCost) != 0)
            {
                list.Add(1060433, prop.ToString());                 // lower mana cost ~1_val~%
            }

            if ((prop = m_AosAttributes.LowerRegCost) != 0)
            {
                list.Add(1060434, prop.ToString());                 // lower reagent cost ~1_val~%
            }

            if ((prop = m_AosAttributes.Luck) != 0)
            {
                list.Add(1060436, prop.ToString());                 // luck ~1_val~
            }

            if ((prop = m_AosAttributes.BonusMana) != 0)
            {
                list.Add(1060439, prop.ToString());                 // mana increase ~1_val~
            }

            if ((prop = m_AosAttributes.RegenMana) != 0)
            {
                list.Add(1060440, prop.ToString());                 // mana regeneration ~1_val~
            }

            if ((prop = m_AosAttributes.NightSight) != 0)
            {
                list.Add(1060441);                 // night sight
            }

            if ((prop = m_AosAttributes.ReflectPhysical) != 0)
            {
                list.Add(1060442, prop.ToString());                 // reflect physical damage ~1_val~%
            }

            if ((prop = m_AosAttributes.RegenStam) != 0)
            {
                list.Add(1060443, prop.ToString());                 // stamina regeneration ~1_val~
            }

            if ((prop = m_AosAttributes.RegenHits) != 0)
            {
                list.Add(1060444, prop.ToString());                 // hit point regeneration ~1_val~
            }

            if ((prop = m_AosAttributes.SpellChanneling) != 0)
            {
                list.Add(1060482);                 // spell channeling
            }

            if ((prop = m_AosAttributes.SpellDamage) != 0)
            {
                list.Add(1060483, prop.ToString());                 // spell damage increase ~1_val~%
            }

            if ((prop = m_AosAttributes.BonusStam) != 0)
            {
                list.Add(1060484, prop.ToString());                 // stamina increase ~1_val~
            }

            if ((prop = m_AosAttributes.BonusStr) != 0)
            {
                list.Add(1060485, prop.ToString());                 // strength bonus ~1_val~
            }

            if ((prop = m_AosAttributes.WeaponSpeed) != 0)
            {
                list.Add(1060486, prop.ToString());                 // swing speed increase ~1_val~%
            }

            if (Core.ML && (prop = m_AosAttributes.IncreasedKarmaLoss) != 0)
            {
                list.Add(1075210, prop.ToString());                 // Increased Karma Loss ~1val~%
            }

            list.Add(1042886, m_Count.ToString());             // ~1_NUMBERS_OF_SPELLS~ Spells
        }
Пример #19
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.Name);                   // crafted by ~1_NAME~
            }
            m_AosSkillBonuses.GetProperties(list);

            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            int prop;

            if ((prop = m_AosAttributes.WeaponDamage) != 0)
            {
                list.Add(1060401, prop.ToString());                   // damage increase ~1_val~%
            }
            if ((prop = m_AosAttributes.DefendChance) != 0)
            {
                list.Add(1060408, prop.ToString());                   // defense chance increase ~1_val~%
            }
            if ((prop = m_AosAttributes.BonusDex) != 0)
            {
                list.Add(1060409, prop.ToString());                   // dexterity bonus ~1_val~
            }
            if ((prop = m_AosAttributes.EnhancePotions) != 0)
            {
                list.Add(1060411, prop.ToString());                   // enhance potions ~1_val~%
            }
            if ((prop = m_AosAttributes.CastRecovery) != 0)
            {
                list.Add(1060412, prop.ToString());                   // faster cast recovery ~1_val~
            }
            if ((prop = m_AosAttributes.CastSpeed) != 0)
            {
                list.Add(1060413, prop.ToString());                   // faster casting ~1_val~
            }
            if ((prop = m_AosAttributes.AttackChance) != 0)
            {
                list.Add(1060415, prop.ToString());                   // hit chance increase ~1_val~%
            }
            if ((prop = m_AosAttributes.BonusHits) != 0)
            {
                list.Add(1060431, prop.ToString());                   // hit point increase ~1_val~
            }
            if ((prop = m_AosAttributes.BonusInt) != 0)
            {
                list.Add(1060432, prop.ToString());                   // intelligence bonus ~1_val~
            }
            if ((prop = m_AosAttributes.LowerManaCost) != 0)
            {
                list.Add(1060433, prop.ToString());                   // lower mana cost ~1_val~%
            }
            if ((prop = m_AosAttributes.LowerRegCost) != 0)
            {
                list.Add(1060434, prop.ToString());                   // lower reagent cost ~1_val~%
            }
            if ((prop = m_AosAttributes.Luck) != 0)
            {
                list.Add(1060436, prop.ToString());                   // luck ~1_val~
            }
            if ((prop = m_AosAttributes.BonusMana) != 0)
            {
                list.Add(1060439, prop.ToString());                   // mana increase ~1_val~
            }
            if ((prop = m_AosAttributes.RegenMana) != 0)
            {
                list.Add(1060440, prop.ToString());                   // mana regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.NightSight) != 0)
            {
                list.Add(1060441);                   // night sight
            }
            if ((prop = m_AosAttributes.ReflectPhysical) != 0)
            {
                list.Add(1060442, prop.ToString());                   // reflect physical damage ~1_val~%
            }
            if ((prop = m_AosAttributes.RegenStam) != 0)
            {
                list.Add(1060443, prop.ToString());                   // stamina regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.RegenHits) != 0)
            {
                list.Add(1060444, prop.ToString());                   // hit point regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.SpellChanneling) != 0)
            {
                list.Add(1060482);                   // spell channeling
            }
            if ((prop = m_AosAttributes.SpellDamage) != 0)
            {
                list.Add(1060483, prop.ToString());                   // spell damage increase ~1_val~%
            }
            if ((prop = m_AosAttributes.BonusStam) != 0)
            {
                list.Add(1060484, prop.ToString());                   // stamina increase ~1_val~
            }
            if ((prop = m_AosAttributes.BonusStr) != 0)
            {
                list.Add(1060485, prop.ToString());                   // strength bonus ~1_val~
            }
            if ((prop = m_AosAttributes.WeaponSpeed) != 0)
            {
                list.Add(1060486, prop.ToString());                   // swing speed increase ~1_val~%
            }
            if (this is SongBook)
            {
                if (m_Count == 1)
                {
                    list.Add(1049644, "1 Song");
                }
                else
                {
                    list.Add(1049644, "" + m_Count.ToString() + " Songs");
                }
            }
            else if (this is MysticSpellbook)
            {
                if (m_Count == 1)
                {
                    list.Add(1049644, "1 Ability");
                }
                else
                {
                    list.Add(1049644, "" + m_Count.ToString() + " Abilities");
                }
            }
            else if (this is SythSpellbook)
            {
                if (m_Count == 1)
                {
                    list.Add(1049644, "1 Power");
                }
                else
                {
                    list.Add(1049644, "" + m_Count.ToString() + " Powers");
                }
            }
            else if (this is JediSpellbook)
            {
                if (m_Count == 1)
                {
                    list.Add(1049644, "1 Power");
                }
                else
                {
                    list.Add(1049644, "" + m_Count.ToString() + " Powers");
                }
            }
            else
            {
                list.Add(1042886, m_Count.ToString());                   // ~1_NUMBERS_OF_SPELLS~ Spells
            }
        }
Пример #20
0
        public override void GetProperties(ObjectPropertyList list)
        {
            AddNameProperties(list);

            list.Add(1011296, Charges.ToString());               // [ Charges: ~1_CHARGES~ ]

            if (Crafter != null)
            {
                list.Add(1050043, Crafter.Name);                   // crafted by ~1_NAME~
            }
            if (SkillBonuses != null)
            {
                SkillBonuses.GetProperties(list);
            }

            if (Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(Slayer);

                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(Slayer2);

                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            base.AddResistanceProperties(list);

            int prop;

            if ((prop = WeaponAttributes.BloodDrinker) != 0)
            {
                list.Add(1113591, prop.ToString());                   // Blood Drinker
            }
            if ((prop = WeaponAttributes.BattleLust) != 0)
            {
                list.Add(1113710, prop.ToString());                   // Battle Lust
            }
            if ((prop = WeaponAttributes.UseBestSkill) != 0)
            {
                list.Add(1060400);                 // use best weapon skill
            }
            if ((prop = (GetDamageBonus() + Attributes.WeaponDamage)) != 0)
            {
                list.Add(1060401, prop.ToString());                 // damage increase ~1_val~%
            }
            if ((prop = Attributes.DefendChance) != 0)
            {
                list.Add(1060408, prop.ToString());                 // defense chance increase ~1_val~%
            }
            if ((prop = Attributes.EnhancePotions) != 0)
            {
                list.Add(1060411, prop.ToString());                 // enhance potions ~1_val~%
            }
            if ((prop = Attributes.CastRecovery) != 0)
            {
                list.Add(1060412, prop.ToString());                 // faster cast recovery ~1_val~
            }
            if ((prop = Attributes.CastSpeed) != 0)
            {
                list.Add(1060413, prop.ToString());                 // faster casting ~1_val~
            }
            if ((prop = (GetHitChanceBonus() + Attributes.AttackChance)) != 0)
            {
                list.Add(1060415, prop.ToString());                 // hit chance increase ~1_val~%
            }
            if ((prop = WeaponAttributes.HitColdArea) != 0)
            {
                list.Add(1060416, prop.ToString());                 // hit cold area ~1_val~%
            }
            if ((prop = WeaponAttributes.HitDispel) != 0)
            {
                list.Add(1060417, prop.ToString());                 // hit dispel ~1_val~%
            }
            if ((prop = WeaponAttributes.HitEnergyArea) != 0)
            {
                list.Add(1060418, prop.ToString());                 // hit energy area ~1_val~%
            }
            if ((prop = WeaponAttributes.HitFireArea) != 0)
            {
                list.Add(1060419, prop.ToString());                 // hit fire area ~1_val~%
            }
            if ((prop = WeaponAttributes.HitFireball) != 0)
            {
                list.Add(1060420, prop.ToString());                 // hit fireball ~1_val~%
            }
            if ((prop = WeaponAttributes.HitHarm) != 0)
            {
                list.Add(1060421, prop.ToString());                 // hit harm ~1_val~%
            }
            if ((prop = WeaponAttributes.HitLeechHits) != 0)
            {
                list.Add(1060422, prop.ToString());                 // hit life leech ~1_val~%
            }
            if ((prop = WeaponAttributes.HitLightning) != 0)
            {
                list.Add(1060423, prop.ToString());                 // hit lightning ~1_val~%
            }
            #region SA
            if ((prop = WeaponAttributes.HitCurse) != 0)
            {
                list.Add(1113712, prop.ToString());                   // Hit Curse ~1_val~%
            }
            if ((prop = WeaponAttributes.HitFatigue) != 0)
            {
                list.Add(1113700, prop.ToString());                   // Hit Fatigue ~1_val~%
            }
            if ((prop = WeaponAttributes.HitManaDrain) != 0)
            {
                list.Add(1113699, prop.ToString());                   // Hit Mana Drain ~1_val~%
            }
            #endregion

            if ((prop = WeaponAttributes.HitLowerAttack) != 0)
            {
                list.Add(1060424, prop.ToString());                 // hit lower attack ~1_val~%
            }
            if ((prop = WeaponAttributes.HitLowerDefend) != 0)
            {
                list.Add(1060425, prop.ToString());                 // hit lower defense ~1_val~%
            }
            if ((prop = WeaponAttributes.HitMagicArrow) != 0)
            {
                list.Add(1060426, prop.ToString());                 // hit magic arrow ~1_val~%
            }
            if ((prop = WeaponAttributes.HitLeechMana) != 0)
            {
                list.Add(1060427, prop.ToString());                 // hit mana leech ~1_val~%
            }
            if ((prop = WeaponAttributes.HitPhysicalArea) != 0)
            {
                list.Add(1060428, prop.ToString());                 // hit physical area ~1_val~%
            }
            if ((prop = WeaponAttributes.HitPoisonArea) != 0)
            {
                list.Add(1060429, prop.ToString());                 // hit poison area ~1_val~%
            }
            if ((prop = WeaponAttributes.HitLeechStam) != 0)
            {
                list.Add(1060430, prop.ToString());                 // hit stamina leech ~1_val~%
            }
            if ((prop = Attributes.BonusDex) != 0)
            {
                list.Add(1060409, prop.ToString());                 // dexterity bonus ~1_val~
            }
            if ((prop = Attributes.BonusHits) != 0)
            {
                list.Add(1060431, prop.ToString());                 // hit point increase ~1_val~
            }
            if ((prop = Attributes.BonusInt) != 0)
            {
                list.Add(1060432, prop.ToString());                 // intelligence bonus ~1_val~
            }
            if ((prop = Attributes.LowerManaCost) != 0)
            {
                list.Add(1060433, prop.ToString());                 // lower mana cost ~1_val~%
            }
            if ((prop = Attributes.LowerRegCost) != 0)
            {
                list.Add(1060434, prop.ToString());                 // lower reagent cost ~1_val~%
            }
            if ((prop = GetLowerStatReq()) != 0)
            {
                list.Add(1060435, prop.ToString());                 // lower requirements ~1_val~%
            }
            if ((prop = (GetLuckBonus() + Attributes.Luck)) != 0)
            {
                list.Add(1060436, prop.ToString());                 // luck ~1_val~
            }
            if ((prop = WeaponAttributes.MageWeapon) != 0)
            {
                list.Add(1060438, (30 - prop).ToString());                 // mage weapon -~1_val~ skill
            }
            if ((prop = Attributes.BonusMana) != 0)
            {
                list.Add(1060439, prop.ToString());                 // mana increase ~1_val~
            }
            if ((prop = Attributes.RegenMana) != 0)
            {
                list.Add(1060440, prop.ToString());                 // mana regeneration ~1_val~
            }
            if ((prop = Attributes.NightSight) != 0)
            {
                list.Add(1060441);                 // night sight
            }
            if ((prop = Attributes.ReflectPhysical) != 0)
            {
                list.Add(1060442, prop.ToString());                 // reflect physical damage ~1_val~%
            }
            if ((prop = Attributes.RegenStam) != 0)
            {
                list.Add(1060443, prop.ToString());                 // stamina regeneration ~1_val~
            }
            if ((prop = Attributes.RegenHits) != 0)
            {
                list.Add(1060444, prop.ToString());                 // hit point regeneration ~1_val~
            }
            if ((prop = WeaponAttributes.SelfRepair) != 0)
            {
                list.Add(1060450, prop.ToString());                 // self repair ~1_val~
            }
            if ((prop = Attributes.SpellChanneling) != 0)
            {
                list.Add(1060482);                 // spell channeling
            }
            if ((prop = Attributes.SpellDamage) != 0)
            {
                list.Add(1060483, prop.ToString());                 // spell damage increase ~1_val~%
            }
            if ((prop = Attributes.BonusStam) != 0)
            {
                list.Add(1060484, prop.ToString());                 // stamina increase ~1_val~
            }
            if ((prop = Attributes.BonusStr) != 0)
            {
                list.Add(1060485, prop.ToString());                 // strength bonus ~1_val~
            }
            if ((prop = Attributes.WeaponSpeed) != 0)
            {
                list.Add(1060486, prop.ToString());                 // swing speed increase ~1_val~%
            }
            #region SA
            if ((prop = AbsorptionAttributes.CastingFocus) != 0)
            {
                list.Add(1113696, prop.ToString());                   // Casting Focus ~1_val~%
            }
            if ((prop = AbsorptionAttributes.EaterFire) != 0)
            {
                list.Add(1113593, prop.ToString());                   // Fire Eater ~1_Val~%
            }
            if ((prop = AbsorptionAttributes.EaterCold) != 0)
            {
                list.Add(1113594, prop.ToString());                   // Cold Eater ~1_Val~%
            }
            if ((prop = AbsorptionAttributes.EaterPoison) != 0)
            {
                list.Add(1113595, prop.ToString());                   // Poison Eater ~1_Val~%
            }
            if ((prop = AbsorptionAttributes.EaterEnergy) != 0)
            {
                list.Add(1113596, prop.ToString());                   // Energy Eater ~1_Val~%
            }
            if ((prop = AbsorptionAttributes.EaterKinetic) != 0)
            {
                list.Add(1113597, prop.ToString());                   // Kinetic Eater ~1_Val~%
            }
            if ((prop = AbsorptionAttributes.EaterDamage) != 0)
            {
                list.Add(1113598, prop.ToString());                   // Damage Eater ~1_Val~%
            }
            if ((prop = AbsorptionAttributes.ResonanceFire) != 0)
            {
                list.Add(1113691, prop.ToString());                   // Fire Resonance ~1_val~%
            }
            if ((prop = AbsorptionAttributes.ResonanceCold) != 0)
            {
                list.Add(1113692, prop.ToString());                   // Cold Resonance ~1_val~%
            }
            if ((prop = AbsorptionAttributes.ResonancePoison) != 0)
            {
                list.Add(1113693, prop.ToString());                   // Poison Resonance ~1_val~%
            }
            if ((prop = AbsorptionAttributes.ResonanceEnergy) != 0)
            {
                list.Add(1113694, prop.ToString());                   // Energy Resonance ~1_val~%
            }
            if ((prop = AbsorptionAttributes.ResonanceKinetic) != 0)
            {
                list.Add(1113695, prop.ToString());                   // Kinetic Resonance ~1_val~%
            }
            #endregion

            int phys, fire, cold, pois, nrgy, chaos, direct;

            GetDamageTypes(null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct);

            #region Mondain's Legacy
            if (chaos != 0)
            {
                list.Add(1072846, chaos.ToString());                 // chaos damage ~1_val~%
            }
            if (direct != 0)
            {
                list.Add(1079978, direct.ToString());                 // Direct Damage: ~1_PERCENT~%
            }
            #endregion

            if (phys != 0)
            {
                list.Add(1060403, phys.ToString());                 // physical damage ~1_val~%
            }
            if (fire != 0)
            {
                list.Add(1060405, fire.ToString());                 // fire damage ~1_val~%
            }
            if (cold != 0)
            {
                list.Add(1060404, cold.ToString());                 // cold damage ~1_val~%
            }
            if (pois != 0)
            {
                list.Add(1060406, pois.ToString());                 // poison damage ~1_val~%
            }
            if (nrgy != 0)
            {
                list.Add(1060407, nrgy.ToString());                 // energy damage ~1_val~%
            }
            if (Core.ML && chaos != 0)
            {
                list.Add(1072846, chaos.ToString());                 // chaos damage ~1_val~%
            }
            if (Core.ML && direct != 0)
            {
                list.Add(1079978, direct.ToString());                                  // Direct Damage: ~1_PERCENT~%
            }
            list.Add(1061168, "{0}\t{1}", MinDamage.ToString(), MaxDamage.ToString()); // weapon damage ~1_val~ - ~2_val~

            if (Core.ML)
            {
                list.Add(1061167, String.Format("{0}s", Speed));                 // weapon speed ~1_val~
            }
            else
            {
                list.Add(1061167, Speed.ToString());
            }

            if (MaxRange > 1)
            {
                list.Add(1061169, MaxRange.ToString());                 // range ~1_val~
            }
            int strReq = AOS.Scale(StrRequirement, 100 - GetLowerStatReq());

            if (strReq > 0)
            {
                list.Add(1061170, strReq.ToString());                 // strength requirement ~1_val~
            }
            if (Layer == Layer.TwoHanded)
            {
                list.Add(1061171);                 // two-handed weapon
            }
            else
            {
                list.Add(1061824);                 // one-handed weapon
            }
            if (Core.SE || WeaponAttributes.UseBestSkill == 0)
            {
                switch (Skill)
                {
                case SkillName.Swords: list.Add(1061172); break;                         // skill required: swordsmanship

                case SkillName.Macing: list.Add(1061173); break;                         // skill required: mace fighting

                case SkillName.Fencing: list.Add(1061174); break;                        // skill required: fencing

                case SkillName.Archery: list.Add(1061175); break;                        // skill required: archery
                }
            }

            if (HitPoints >= 0 && MaxHitPoints > 0)
            {
                list.Add(1060639, "{0}\t{1}", HitPoints, MaxHitPoints);                   // durability ~1_val~ / ~2_val~
            }
        }
Пример #21
0
        private static SlayerEntry[] CompileEntries(IEnumerable<SlayerGroup> groups)
        {
            var entries = new SlayerEntry[28];

            foreach (SlayerGroup g in groups)
            {
                g.Super.Group = g;

                entries[(int) g.Super.Name] = g.Super;

                foreach (SlayerEntry s in g.Entries)
                {
                    s.Group = g;
                    entries[(int) s.Name] = s;
                }
            }

            return entries;
        }
Пример #22
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            int oldUses = m_UsesRemaining;

            CheckReplenishUses(false);

            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.Name);                   // crafted by ~1_NAME~
            }
            list.Add(1060584, m_UsesRemaining.ToString());           // uses remaining: ~1_val~

            if (m_ReplenishesCharges)
            {
                list.Add(1070928);                   // Replenish Charges
            }
            int oreType;

            switch (m_Resource)
            {
            case CraftResource.AshTree:             oreType = 1095399; break;                     // ash

            case CraftResource.CherryTree:          oreType = 1095400; break;                     // cherry

            case CraftResource.EbonyTree:           oreType = 1095401; break;                     // ebony

            case CraftResource.GoldenOakTree:       oreType = 1095402; break;                     // gold oak

            case CraftResource.HickoryTree:         oreType = 1095403; break;                     // hickory

            case CraftResource.MahoganyTree:        oreType = 1095404; break;                     // mahogany

            case CraftResource.DriftwoodTree:       oreType = 1095510; break;                     // driftwood

            case CraftResource.OakTree:             oreType = 1095405; break;                     // oak

            case CraftResource.PineTree:            oreType = 1095406; break;                     // pine

            case CraftResource.GhostTree:           oreType = 1095513; break;                     // ghostwood

            case CraftResource.RosewoodTree:        oreType = 1095407; break;                     // rosewood

            case CraftResource.WalnutTree:          oreType = 1095408; break;                     // walnut

            case CraftResource.PetrifiedTree:       oreType = 1095534; break;                     // petrified

            case CraftResource.ElvenTree:           oreType = 1095537; break;                     // elven

            default: oreType = 0; break;
            }

            if (m_Quality == InstrumentQuality.Exceptional)
            {
                if (oreType != 0)
                {
                    list.Add(1053100, "#{0}\t{1}", oreType, "Wood");                       // exceptional ~1_oretype~ ~2_armortype~
                }
                else
                {
                    list.Add(1050040, "Wood");                       // exceptional ~1_ITEMNAME~
                }
            }
            else
            {
                if (oreType != 0)
                {
                    list.Add(1053099, "#{0}\t{1}", oreType, "Wood");                       // ~1_oretype~ ~2_armortype~
                }
            }

            m_AosSkillBonuses.GetProperties(list);

            int prop;

            if ((prop = ArtifactRarity) > 0)
            {
                list.Add(1061078, prop.ToString());                   // artifact rarity ~1_val~
            }
            if ((prop = m_AosAttributes.WeaponDamage) != 0)
            {
                list.Add(1060401, prop.ToString());                   // damage increase ~1_val~%
            }
            if ((prop = m_AosAttributes.DefendChance) != 0)
            {
                list.Add(1060408, prop.ToString());                   // defense chance increase ~1_val~%
            }
            if ((prop = m_AosAttributes.BonusDex) != 0)
            {
                list.Add(1060409, prop.ToString());                   // dexterity bonus ~1_val~
            }
            if ((prop = m_AosAttributes.EnhancePotions) != 0)
            {
                list.Add(1060411, prop.ToString());                   // enhance potions ~1_val~%
            }
            if ((prop = m_AosAttributes.CastRecovery) != 0)
            {
                list.Add(1060412, prop.ToString());                   // faster cast recovery ~1_val~
            }
            if ((prop = m_AosAttributes.CastSpeed) != 0)
            {
                list.Add(1060413, prop.ToString());                   // faster casting ~1_val~
            }
            if ((prop = m_AosAttributes.AttackChance) != 0)
            {
                list.Add(1060415, prop.ToString());                   // hit chance increase ~1_val~%
            }
            if ((prop = m_AosAttributes.BonusHits) != 0)
            {
                list.Add(1060431, prop.ToString());                   // hit point increase ~1_val~
            }
            if ((prop = m_AosAttributes.BonusInt) != 0)
            {
                list.Add(1060432, prop.ToString());                   // intelligence bonus ~1_val~
            }
            if ((prop = m_AosAttributes.LowerManaCost) != 0)
            {
                list.Add(1060433, prop.ToString());                   // lower mana cost ~1_val~%
            }
            if ((prop = m_AosAttributes.LowerRegCost) != 0)
            {
                list.Add(1060434, prop.ToString());                   // lower reagent cost ~1_val~%
            }
            if ((prop = m_AosAttributes.Luck) != 0)
            {
                list.Add(1060436, prop.ToString());                   // luck ~1_val~
            }
            if ((prop = m_AosAttributes.BonusMana) != 0)
            {
                list.Add(1060439, prop.ToString());                   // mana increase ~1_val~
            }
            if ((prop = m_AosAttributes.RegenMana) != 0)
            {
                list.Add(1060440, prop.ToString());                   // mana regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.NightSight) != 0)
            {
                list.Add(1060441);                   // night sight
            }
            if ((prop = m_AosAttributes.ReflectPhysical) != 0)
            {
                list.Add(1060442, prop.ToString());                   // reflect physical damage ~1_val~%
            }
            if ((prop = m_AosAttributes.RegenStam) != 0)
            {
                list.Add(1060443, prop.ToString());                   // stamina regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.RegenHits) != 0)
            {
                list.Add(1060444, prop.ToString());                   // hit point regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.SpellChanneling) != 0)
            {
                list.Add(1060482);                   // spell channeling
            }
            if ((prop = m_AosAttributes.SpellDamage) != 0)
            {
                list.Add(1060483, prop.ToString());                   // spell damage increase ~1_val~%
            }
            if ((prop = m_AosAttributes.BonusStam) != 0)
            {
                list.Add(1060484, prop.ToString());                   // stamina increase ~1_val~
            }
            if ((prop = m_AosAttributes.BonusStr) != 0)
            {
                list.Add(1060485, prop.ToString());                   // strength bonus ~1_val~
            }
            if ((prop = m_AosAttributes.WeaponSpeed) != 0)
            {
                list.Add(1060486, prop.ToString());                   // swing speed increase ~1_val~%
            }
            base.AddResistanceProperties(list);

            if (m_HitPoints >= 0 && m_MaxHitPoints > 0)
            {
                list.Add(1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints);                   // durability ~1_val~ / ~2_val~
            }
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_UsesRemaining != oldUses)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(InvalidateProperties));
            }
        }