Пример #1
0
        public override void GetProperties(ObjectPropertyList list)
        {
            #region Props
            base.GetProperties(list);
            if (m_Slayer != SlayerName.None)
            {
                list.Add(SlayerGroup.GetEntryByName(m_Slayer).Title);
            }

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

            if (m_TalisSlayer != TalisSlayerName.None)
            {
                list.Add(TalisSlayerEntry.GetSlayerTitle(m_TalisSlayer));
            }

            m_SkillBonuses.GetProperties(list);

            if (m_TalismanType != TalismanType.None && m_isequiped && m_ChargeTimeLeft == 0)
            {
                list.Add(1074883);                   // Fully Charged
            }
            else if (m_TalismanType != TalismanType.None && m_isequiped && m_ChargeTimeLeft >= 1)
            {
                list.Add(1074884, m_ChargeTimeLeft2.ToString());                   // Charge time left: ~1_val~
            }
            if (m_KillersEntry != NPC_Name.None && m_KillersValue > 0)
            {
                list.Add(1072388, ProtectionKillerEntry.GetProtectionKillerTitle(m_KillersEntry) + "\t" + m_KillersValue);                     // ~1_NAME~ Killer: +~2_val~%
            }
            if (m_ProtectionEntry != NPC_Name.None && m_ProtectionValue > 0)
            {
                list.Add(1072387, ProtectionKillerEntry.GetProtectionKillerTitle(m_ProtectionEntry) + "\t" + m_ProtectionValue);                     // ~1_NAME~ Protection: +~2_val~%
            }
            if (m_CraftBonusExcep > 0 && m_CraftBonusExcepValue > 0)
            {
                list.Add(1072395, Enum.GetName(typeof(CraftList), m_CraftBonusExcep) + "\t" + m_CraftBonusExcepValue);                       // ~1_NAME~ Exceptional Bonus: ~2_val~%
            }
            if (m_CraftBonusRegular > 0 && m_CraftBonusRegularValue > 0)
            {
                list.Add(1072394, Enum.GetName(typeof(CraftList), m_CraftBonusRegular) + "\t" + m_CraftBonusRegularValue);                       // ~1_NAME~ Bonus: ~2_val~%
            }
            int prop;

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

            if (m_Charges >= 0 && m_TalismanType != TalismanType.None)
            {
                list.Add(1060741, m_Charges.ToString());                   // charges: ~1_val~
            }
            if (m_TalismanType == TalismanType.ManaPhase)
            {
                list.Add(1116158);                   // Mana Phase
            }
            if (Brittle)
            {
                list.Add(1116209);                   // Brittle
            }
            if (CanLoseDurability)
            {
                list.Add(1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints);                   // durability ~1_val~ / ~2_val~
            }
            #endregion
        }
Пример #2
0
        public RandomTalisman(int luck)
            : base(m_IDs[Utility.Random(4)])
        {
            Weight = 1.0;

            int n_props = Utility.Random(4);

            if (luck > Utility.Random(10000) && n_props < 4)
            {
                n_props++;
            }

            for (int i = 0; i <= n_props; i++)
            {
                int prop = 1 + Utility.Random(6);

                switch (prop)
                {
                case 1:                         // Killer
                {
                    if (KillersValue == 0)
                    {
                        KillersTalis = ProtectionKillerEntry.GetRandom();
                        KillersValue = 1 + Utility.Random(100);

                        if (luck > Utility.Random(10000))
                        {
                            KillersValue += 1 + Utility.Random(10);
                        }

                        if (KillersValue > 100)
                        {
                            KillersValue = 100;
                        }

                        break;
                    }
                    else
                    {
                        goto case 2;
                    }
                }

                case 2:                         // Protection
                {
                    if (ProtectionValue == 0)
                    {
                        ProtectionTalis = ProtectionKillerEntry.GetRandom();
                        ProtectionValue = 1 + Utility.Random(60);

                        if (luck > Utility.Random(10000))
                        {
                            ProtectionValue += 1 + Utility.Random(10);
                        }

                        if (ProtectionValue > 60)
                        {
                            ProtectionValue = 60;
                        }

                        break;
                    }
                    else
                    {
                        goto case 3;
                    }
                }

                case 3:                         // Slayer
                {
                    if (TalisSlayer == TalisSlayerName.None)
                    {
                        TalisSlayer = TalisSlayerEntry.GetRandom();
                        break;
                    }
                    else
                    {
                        goto case 4;
                    }
                }

                case 4:                         // Craft Bonus Regular
                {
                    if (CraftBonusRegularValue == 0)
                    {
                        CraftBonusRegular      = (CraftList)(1 + Utility.Random(9));
                        CraftBonusRegularValue = 1 + Utility.Random(30);

                        if (luck > Utility.Random(10000))
                        {
                            CraftBonusRegularValue += 1 + Utility.Random(5);
                        }

                        if (CraftBonusRegularValue > 30)
                        {
                            CraftBonusRegularValue = 30;
                        }

                        break;
                    }
                    else
                    {
                        goto case 5;
                    }
                }

                case 5:                         // Craft Bonus Excep
                {
                    if (CraftBonusExcepValue == 0)
                    {
                        if (CraftBonusRegularValue == 0)
                        {
                            goto case 4;
                        }
                        else
                        {
                            CraftBonusExcep      = CraftBonusRegular;
                            CraftBonusExcepValue = 1 + Utility.Random(30);

                            if (luck > Utility.Random(10000))
                            {
                                CraftBonusExcepValue += 1 + Utility.Random(5);
                            }

                            if (CraftBonusExcepValue > 30)
                            {
                                CraftBonusExcepValue = 30;
                            }

                            break;
                        }
                    }
                    else
                    {
                        goto case 6;
                    }
                }

                case 6:                         // Removal Summon
                {
                    TalismanType = (TalismanType)(1 + Utility.Random(25));
                    break;
                }

                default:                         // Removal Summon
                {
                    TalismanType = (TalismanType)(1 + Utility.Random(25));
                    break;
                }
                }
            }
        }