Exemplo n.º 1
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (!(targeted is BaseAttackPiece))
                return;

            m_Blade = targeted as BaseAttackPiece;

            if (m_Blade is AxeHead)
            {
                Halberd weapon = new Halberd();
                weapon.NewCrafting = true;
                weapon.QualityDamage = m_Hilt.GetDamageBonus() / 2 + m_Blade.Damage;
                weapon.QualitySpeed = m_Hilt.GetSpeedBonus() / 2 + m_Blade.Speed;
                weapon.QualityAccuracy = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Attack;
                weapon.QualityDefense = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Defense;
                weapon.Resource = m_Blade.Resource;
                int quality = (int)(m_Blade.Durability * 0.15 + m_Hilt.MaxHitPoints * 0.85);
                weapon.MaxHitPoints = quality; weapon.HitPoints = quality;
                weapon.Crafter = from;
                weapon.CraftersOriginalName = from.Name;
                quality = (int)(m_Blade.Quality * 0.85 + ((int)m_Hilt.Quality * 50) * 0.15);
                if (quality == 500)
                    weapon.Quality = WeaponQuality.Legendary;
                if (quality < 500)
                    weapon.Quality = WeaponQuality.Masterwork;
                if (quality < 450)
                    weapon.Quality = WeaponQuality.Illustrious;
                if (quality < 400)
                    weapon.Quality = WeaponQuality.Extraordinary;
                if (quality < 350)
                    weapon.Quality = WeaponQuality.Remarkable;
                if (quality < 300)
                    weapon.Quality = WeaponQuality.Exceptional;
                if (quality < 250)
                    weapon.Quality = WeaponQuality.Superior;
                if (quality < 200)
                    weapon.Quality = WeaponQuality.Regular;
                if (quality < 150)
                    weapon.Quality = WeaponQuality.Inferior;
                if (quality < 100)
                    weapon.Quality = WeaponQuality.Low;
                if (quality < 50)
                    weapon.Quality = WeaponQuality.Poor;
                weapon.BetaNerf = true;
                weapon.InvalidateProperties();
                from.AddToBackpack(weapon);
                weapon.AddItem(m_Blade);
                weapon.AddItem(m_Hilt);
            }

            if (m_Blade is CurvedBlade)
                from.Prompt = new StaffCurvedBladePrompt(from, m_Hilt, (CurvedBlade)m_Blade);
            if (m_Blade is HammerHead && (((PlayerMobile)from).Nation == Nation.Khemetar || ((PlayerMobile)from).Nation == Nation.Mhordul))
            {
                if (((PlayerMobile)from).Nation == Nation.Khemetar)
                {
                    PriestStaff weapon = new PriestStaff();
                    weapon.NewCrafting = true;
                    weapon.QualityDamage = m_Hilt.GetDamageBonus() / 2 + m_Blade.Damage;
                    weapon.QualitySpeed = m_Hilt.GetSpeedBonus() / 2 + m_Blade.Speed;
                    weapon.QualityAccuracy = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Attack;
                    weapon.QualityDefense = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Defense;
                    weapon.Resource = m_Hilt.Resource;
                    int quality = (int)(m_Blade.Durability * 0.2 + m_Hilt.MaxHitPoints * 0.8);
                    weapon.MaxHitPoints = quality; weapon.HitPoints = quality;
                    weapon.Crafter = from;
                    weapon.CraftersOriginalName = from.Name;
                    quality = (int)(m_Blade.Quality * 0.2 + ((int)m_Hilt.Quality * 50) * 0.8);
                    if (quality == 500)
                        weapon.Quality = WeaponQuality.Legendary;
                    if (quality < 500)
                        weapon.Quality = WeaponQuality.Masterwork;
                    if (quality < 450)
                        weapon.Quality = WeaponQuality.Illustrious;
                    if (quality < 400)
                        weapon.Quality = WeaponQuality.Extraordinary;
                    if (quality < 350)
                        weapon.Quality = WeaponQuality.Remarkable;
                    if (quality < 300)
                        weapon.Quality = WeaponQuality.Exceptional;
                    if (quality < 250)
                        weapon.Quality = WeaponQuality.Superior;
                    if (quality < 200)
                        weapon.Quality = WeaponQuality.Regular;
                    if (quality < 150)
                        weapon.Quality = WeaponQuality.Inferior;
                    if (quality < 100)
                        weapon.Quality = WeaponQuality.Low;
                    if (quality < 50)
                        weapon.Quality = WeaponQuality.Poor;
                    weapon.BetaNerf = true;
                    weapon.InvalidateProperties();
                    from.AddToBackpack(weapon);
                    weapon.AddItem(m_Blade);
                    weapon.AddItem(m_Hilt);
                }
                else
                {
                    ShamanStaff weapon = new ShamanStaff();
                    weapon.NewCrafting = true;
                    weapon.QualityDamage = m_Hilt.GetDamageBonus() / 2 + m_Blade.Damage;
                    weapon.QualitySpeed = m_Hilt.GetSpeedBonus() / 2 + m_Blade.Speed;
                    weapon.QualityAccuracy = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Attack;
                    weapon.QualityDefense = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Defense;
                    weapon.Resource = m_Hilt.Resource;
                    int quality = (int)(m_Blade.Durability * 0.2 + m_Hilt.MaxHitPoints * 0.8);
                    weapon.MaxHitPoints = quality; weapon.HitPoints = quality;
                    weapon.Crafter = from;
                    weapon.CraftersOriginalName = from.Name;
                    quality = (int)(m_Blade.Quality * 0.2 + ((int)m_Hilt.Quality * 50) * 0.8);
                    if (quality == 500)
                        weapon.Quality = WeaponQuality.Legendary;
                    if (quality < 500)
                        weapon.Quality = WeaponQuality.Masterwork;
                    if (quality < 450)
                        weapon.Quality = WeaponQuality.Illustrious;
                    if (quality < 400)
                        weapon.Quality = WeaponQuality.Extraordinary;
                    if (quality < 350)
                        weapon.Quality = WeaponQuality.Remarkable;
                    if (quality < 300)
                        weapon.Quality = WeaponQuality.Exceptional;
                    if (quality < 250)
                        weapon.Quality = WeaponQuality.Superior;
                    if (quality < 200)
                        weapon.Quality = WeaponQuality.Regular;
                    if (quality < 150)
                        weapon.Quality = WeaponQuality.Inferior;
                    if (quality < 100)
                        weapon.Quality = WeaponQuality.Low;
                    if (quality < 50)
                        weapon.Quality = WeaponQuality.Poor;
                    weapon.BetaNerf = true;
                    weapon.InvalidateProperties();
                    from.AddToBackpack(weapon);
                    weapon.AddItem(m_Blade);
                    weapon.AddItem(m_Hilt);
                }
            }

            if (m_Blade is LongBlade && ((PlayerMobile)from).Nation == Nation.Azhuran)
            {
                AzhuranBladedStaff weapon = new AzhuranBladedStaff();
                weapon.NewCrafting = true;
                weapon.QualityDamage = m_Hilt.GetDamageBonus() / 2 + m_Blade.Damage;
                weapon.QualitySpeed = m_Hilt.GetSpeedBonus() / 2 + m_Blade.Speed;
                weapon.QualityAccuracy = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Attack;
                weapon.QualityDefense = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Defense;
                weapon.Resource = m_Blade.Resource;
                int quality = (int)(m_Blade.Durability * 0.4 + m_Hilt.MaxHitPoints * 0.6);
                weapon.MaxHitPoints = quality; weapon.HitPoints = quality;
                weapon.Crafter = from;
                weapon.CraftersOriginalName = from.Name;
                quality = (int)(m_Blade.Quality * 0.6 + ((int)m_Hilt.Quality * 50) * 0.4);
                if (quality == 500)
                    weapon.Quality = WeaponQuality.Legendary;
                if (quality < 500)
                    weapon.Quality = WeaponQuality.Masterwork;
                if (quality < 450)
                    weapon.Quality = WeaponQuality.Illustrious;
                if (quality < 400)
                    weapon.Quality = WeaponQuality.Extraordinary;
                if (quality < 350)
                    weapon.Quality = WeaponQuality.Remarkable;
                if (quality < 300)
                    weapon.Quality = WeaponQuality.Exceptional;
                if (quality < 250)
                    weapon.Quality = WeaponQuality.Superior;
                if (quality < 200)
                    weapon.Quality = WeaponQuality.Regular;
                if (quality < 150)
                    weapon.Quality = WeaponQuality.Inferior;
                if (quality < 100)
                    weapon.Quality = WeaponQuality.Low;
                if (quality < 50)
                    weapon.Quality = WeaponQuality.Poor;
                weapon.BetaNerf = true;
                weapon.InvalidateProperties();
                from.AddToBackpack(weapon);
                weapon.AddItem(m_Blade);
                weapon.AddItem(m_Hilt);
            }

            if (m_Blade is MediumBlade && ((PlayerMobile)from).Nation == Nation.Azhuran)
            {
                AzhuranSpear weapon = new AzhuranSpear();
                weapon.NewCrafting = true;
                weapon.QualityDamage = m_Hilt.GetDamageBonus() / 2 + m_Blade.Damage;
                weapon.QualitySpeed = m_Hilt.GetSpeedBonus() / 2 + m_Blade.Speed;
                weapon.QualityAccuracy = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Attack;
                weapon.QualityDefense = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Defense;
                weapon.Resource = m_Blade.Resource;
                int quality = (int)(m_Blade.Durability * 0.4 + m_Hilt.MaxHitPoints * 0.6);
                weapon.MaxHitPoints = quality; weapon.HitPoints = quality;
                weapon.Crafter = from;
                weapon.CraftersOriginalName = from.Name;
                quality = (int)(m_Blade.Quality * 0.6 + ((int)m_Hilt.Quality * 50) * 0.4);
                if (quality == 500)
                    weapon.Quality = WeaponQuality.Legendary;
                if (quality < 500)
                    weapon.Quality = WeaponQuality.Masterwork;
                if (quality < 450)
                    weapon.Quality = WeaponQuality.Illustrious;
                if (quality < 400)
                    weapon.Quality = WeaponQuality.Extraordinary;
                if (quality < 350)
                    weapon.Quality = WeaponQuality.Remarkable;
                if (quality < 300)
                    weapon.Quality = WeaponQuality.Exceptional;
                if (quality < 250)
                    weapon.Quality = WeaponQuality.Superior;
                if (quality < 200)
                    weapon.Quality = WeaponQuality.Regular;
                if (quality < 150)
                    weapon.Quality = WeaponQuality.Inferior;
                if (quality < 100)
                    weapon.Quality = WeaponQuality.Low;
                if (quality < 50)
                    weapon.Quality = WeaponQuality.Poor;
                weapon.BetaNerf = true;
                weapon.InvalidateProperties();
                from.AddToBackpack(weapon);
                weapon.AddItem(m_Blade);
                weapon.AddItem(m_Hilt);
            }

            if (m_Blade is ShortBlade)
                from.Prompt = new StaffShortBladePrompt(from, m_Hilt, (ShortBlade)m_Blade);

            if (m_Blade is MaceHead && ((IKhaerosMobile)from).Feats.GetFeatLevel(FeatList.Bone) > 2 && from.Backpack.ConsumeTotal(typeof(Bone), 10) )
            {
                MhordulBoneStaff weapon = new MhordulBoneStaff();
                weapon.NewCrafting = true;
                weapon.QualityDamage = m_Hilt.GetDamageBonus() / 2 + m_Blade.Damage;
                weapon.QualitySpeed = m_Hilt.GetSpeedBonus() / 2 + m_Blade.Speed;
                weapon.QualityAccuracy = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Attack;
                weapon.QualityDefense = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Defense;
                weapon.Resource = m_Hilt.Resource;
                int quality = (int)(m_Blade.Durability * 0.25 + m_Hilt.MaxHitPoints * 0.75);
                weapon.MaxHitPoints = quality; weapon.HitPoints = quality;
                weapon.Crafter = from;
                weapon.CraftersOriginalName = from.Name;
                quality = (int)(m_Blade.Quality * 0.25 + ((int)m_Hilt.Quality * 50) * 0.75);
                if (quality == 500)
                    weapon.Quality = WeaponQuality.Legendary;
                if (quality < 500)
                    weapon.Quality = WeaponQuality.Masterwork;
                if (quality < 450)
                    weapon.Quality = WeaponQuality.Illustrious;
                if (quality < 400)
                    weapon.Quality = WeaponQuality.Extraordinary;
                if (quality < 350)
                    weapon.Quality = WeaponQuality.Remarkable;
                if (quality < 300)
                    weapon.Quality = WeaponQuality.Exceptional;
                if (quality < 250)
                    weapon.Quality = WeaponQuality.Superior;
                if (quality < 200)
                    weapon.Quality = WeaponQuality.Regular;
                if (quality < 150)
                    weapon.Quality = WeaponQuality.Inferior;
                if (quality < 100)
                    weapon.Quality = WeaponQuality.Low;
                if (quality < 50)
                    weapon.Quality = WeaponQuality.Poor;
                weapon.BetaNerf = true;
                weapon.InvalidateProperties();
                from.AddToBackpack(weapon);
                weapon.AddItem(m_Blade);
                weapon.AddItem(m_Hilt);
            }
        }
Exemplo n.º 2
0
        public InsulariiCaptain()
            : base(Nation.Alyrian)
        {
            int chance = Utility.RandomMinMax( 1, 6 );
            Nation nation = Nation.Alyrian;

            switch( chance )
            {
                case 1: nation = Nation.Alyrian; break;
                case 2: nation = Nation.Azhuran; break;
                case 3: nation = Nation.Khemetar; break;
                case 4: nation = Nation.Mhordul; break;
                case 5: nation = Nation.Tyrean; break;
                case 6: nation = Nation.Vhalurian; break;
            }

            Hue = BaseKhaerosMobile.AssignRacialHue( nation );
            HairItemID = BaseKhaerosMobile.AssignRacialHair( nation, this.Female );
            int hairhue = BaseKhaerosMobile.AssignRacialHairHue( nation );
            HairHue = hairhue;

            if( !this.Female )
            {
                FacialHairItemID = BaseKhaerosMobile.AssignRacialFacialHair( nation );
                FacialHairHue = hairhue;
            }

            if( this.Backpack == null )
                AddItem( new Backpack() );

            SetStr( 250 );
            SetDex( 75 );
            SetInt( 75 );

            SetDamage( 20, 25 );

            SetHits( 800 );

            SetDamageType( ResistanceType.Blunt, 100 );

            SetResistance( ResistanceType.Blunt, 20 );
            SetResistance( ResistanceType.Piercing, 20 );
            SetResistance( ResistanceType.Slashing, 20 );

            SetSkill( SkillName.Anatomy, 100.0 );
            SetSkill( SkillName.Archery, 100.0 );
            SetSkill( SkillName.Fencing, 100.0 );
            SetSkill( SkillName.Macing, 100.0 );
            SetSkill( SkillName.Swords, 100.0 );
            SetSkill( SkillName.Tactics, 100.0 );
            SetSkill( SkillName.Polearms, 100.0 );
            SetSkill( SkillName.ExoticWeaponry, 100.0 );
            SetSkill( SkillName.Axemanship, 100.0 );
            SetSkill( SkillName.UnarmedFighting, 100.0 );

            this.Fame = 18000;

            this.VirtualArmor = 0;

            FightMode = FightMode.Closest;

            Title = "the Insularii Captain";
            Name = BaseKhaerosMobile.GiveInsulariiName( this.Female );

            PlateChest chest = new PlateChest();
            chest.Resource = CraftResource.Bronze;
            chest.Hue = 2591;

            PlateArms arms = new PlateArms();
            arms.Resource = CraftResource.Bronze;
            arms.Hue = 2591;

            PlateLegs legs = new PlateLegs();
            legs.Resource = CraftResource.Bronze;
            legs.Hue = 2591;

            PlateGorget gorget = new PlateGorget();
            gorget.Resource = CraftResource.Bronze;
            gorget.Hue = 2591;

            PlateGloves gloves = new PlateGloves();
            gloves.Resource = CraftResource.Bronze;
            gloves.Hue = 2591;

            PlateHelm helm = new PlateHelm();
            helm.Resource = CraftResource.Bronze;
            helm.Name = "Insularii Horned Helm";
            helm.Hue = 2591;
            helm.ItemID = 15380;

            AzhuranBladedStaff staff = new AzhuranBladedStaff();
            staff.Resource = CraftResource.Bronze;

            EquipItem( chest );
            EquipItem( arms );
            EquipItem( legs );
            EquipItem( gorget );
            EquipItem( gloves );
            EquipItem( helm );
            EquipItem( staff );

            Surcoat surcoat = new Surcoat();
            surcoat.Name = "Insularii Surcoat";
            surcoat.ItemID = 15502;
            surcoat.Hue = 2799;

            EquipItem( surcoat );
        }