SetDex() public method

public SetDex ( int val ) : void
val int
return void
コード例 #1
0
        public void Scale(BaseCreature c)
        {
            if (c == null)
            {
                return;
            }

            if (c is BaseAspect && c != this)
            {
                return;
            }

            var factor = GetLevelFactor();

            if (c is IAspectSpawn asp)
            {
                if (asp.Aspect != this)
                {
                    return;
                }

                factor *= 0.10;
            }
            else if (c.Team != Team)
            {
                return;
            }

            c.VirtualArmor = Math.Min(90, 40 + Scale(10, factor));

            c.SetStr(Scale(200, factor), Scale(250, factor));
            c.SetDex(Scale(200, factor), Scale(250, factor));
            c.SetInt(Scale(200, factor), Scale(250, factor));

            c.SetHits(Scale(50000, factor), Scale(75000, factor));
            c.SetStam(Scale(1000, factor), Scale(2500, factor));
            c.SetMana(Scale(1000, factor), Scale(2500, factor));

            var damage = Scale(10, factor);

            c.SetDamage(Math.Min(80, 15 + damage), Math.Min(90, 30 + damage));

            var skill = Math.Min(120.0, 95.0 + Scale(5.0, factor));

            c.SetAllSkills(skill, Math.Max(100, skill));
        }
コード例 #2
0
ファイル: HellSteed.cs プロジェクト: felladrin/runuo-pt-br
        public static void SetStats( BaseCreature steed )
        {
            steed.SetStr( 201, 210 );
            steed.SetDex( 101, 110 );
            steed.SetInt( 101, 115 );

            steed.SetHits( 201, 220 );

            steed.SetDamage( 20, 24 );

            steed.SetDamageType( ResistanceType.Physical, 25 );
            steed.SetDamageType( ResistanceType.Fire, 75 );

            steed.SetResistance( ResistanceType.Physical, 60, 70 );
            steed.SetResistance( ResistanceType.Fire, 90 );
            steed.SetResistance( ResistanceType.Poison, 100 );

            steed.SetSkill( SkillName.MagicResist, 90.1, 110.0 );
            steed.SetSkill( SkillName.Tactics, 50.0 );
            steed.SetSkill( SkillName.Wrestling, 90.1, 110.0 );

            steed.Fame = 0;
            steed.Karma = 0;
        }
コード例 #3
0
ファイル: HellSteed.cs プロジェクト: pallop/Servuo
        public static void SetStats(BaseCreature steed)
        {
            steed.SetStr(201, 210);
            steed.SetDex(101, 110);
            steed.SetInt(101, 115);

            steed.SetHits(201, 220);

            steed.SetDamage(20, 24);

            steed.SetDamageType(ResistanceType.Physical, 25);
            steed.SetDamageType(ResistanceType.Fire, 75);

            steed.SetResistance(ResistanceType.Physical, 60, 70);
            steed.SetResistance(ResistanceType.Fire, 90);
            steed.SetResistance(ResistanceType.Poison, 100);

            steed.SetSkill(SkillName.MagicResist, 90.1, 110.0);
            steed.SetSkill(SkillName.Tactics, 50.0);
            steed.SetSkill(SkillName.Wrestling, 90.1, 110.0);

            steed.Fame  = 0;
            steed.Karma = 0;
        }
コード例 #4
0
        public static void LevelUp( BaseCreature player )
        {
            player.NextLevel += ( player.Level + 1 ) * (5000 / player.XPScale);
            player.Level++;

            if( player.Level % 2 != 0 )
                player.DamageMin++;

            else
                player.DamageMax++;

            double i = 0.5 * player.SkillScale;

            if (player is Serpent)
            {
                player.RawStr += player.StatScale;
                player.RawDex += player.StatScale;
                player.RawStam += player.StatScale;
                player.RawMana += player.StatScale;

                if (player.XPScale == 1)
                {
                    player.RawInt += 1;
                    player.RawHits += 1;
                }
                else
                {
                    player.RawInt += (player.StatScale / 2);
                    player.RawHits += (player.StatScale / 2);
                }
            }
            else if (player is BirdOfPrey)
            {
                if (player.StatScale == 1)
                {
                    player.RawStr += 1;
                    player.RawHits += 1;
                }
                else
                {
                    player.RawStr += (player.StatScale / 2);
                    player.RawHits += (player.StatScale / 2);
                }

                player.RawDex += (int)(player.StatScale * Utility.RandomMinMax(1,2));
                player.RawInt += player.StatScale;
                player.RawStam += player.StatScale;
                player.RawMana += player.StatScale;
            }
            else if (player is Bear)
            {
                int statBonus = Utility.Random(player.StatScale);
                int armorBonus = Utility.Random(5);

                if (player.XPScale == 1)
                {
                    player.RawStr += 1;
                    player.RawDex += Utility.Random(2);
                }
                else
                {
                    player.RawStr += (player.StatScale / 2);
                    player.RawDex += ((player.StatScale - (statBonus + 1)) / 2);
                }

                player.RawInt += (player.StatScale - statBonus);
                player.RawHits += (player.StatScale + (statBonus + 1));
                player.RawStam += (player.StatScale + statBonus);
                player.RawMana += (player.StatScale / 2);

                if (armorBonus == 0)
                    player.BluntResistSeed += (player.StatScale - 1);
                else if (armorBonus == 1)
                    player.SlashingResistSeed += (player.StatScale - 1);
                else if (armorBonus == 2)
                    player.PiercingResistSeed += (player.StatScale - 1);
                else if (armorBonus == 3)
                {
                    player.PoisonResistSeed += (player.StatScale - 1);
                    player.EnergyResistSeed += (player.StatScale - 1);
                }
                else
                {
                    if (player.Level % 2 != 0)
                        player.DamageMin--;
                    else
                        player.DamageMax--;
                }
            }
            else if (player is Mercenary)
            {
                int statUpgrade = Utility.RandomMinMax(1, 4);

                switch (statUpgrade)
                {
                    case 1:
                        {
                            player.RawStr += player.StatScale;
                            player.RawDex += Utility.RandomMinMax(1, player.StatScale);
                            player.RawInt += 1;
                            player.RawHits += Utility.RandomMinMax(1, player.StatScale);
                            player.RawStam += Utility.RandomMinMax(1, player.StatScale);
                            break;
                        }
                    case 2:
                        {
                            player.RawStr += Utility.RandomMinMax(1, player.StatScale);
                            player.RawDex += player.StatScale;
                            player.RawInt += 1;
                            player.RawHits += Utility.RandomMinMax(1, player.StatScale);
                            player.RawStam += Utility.RandomMinMax(1, player.StatScale);
                            break;
                        }
                    case 3:
                        {
                            player.RawStr += Utility.RandomMinMax(1, player.StatScale);
                            player.RawDex += Utility.RandomMinMax(1, player.StatScale);
                            player.RawInt += 1;
                            player.RawHits += player.StatScale;
                            player.RawStam += Utility.RandomMinMax(1, player.StatScale);
                            break;
                        }
                    case 4:
                        {
                            player.RawStr += Utility.RandomMinMax(1, player.StatScale);
                            player.RawDex += Utility.RandomMinMax(1, player.StatScale);
                            player.RawInt += 1;
                            player.RawHits += Utility.RandomMinMax(1, player.StatScale);
                            player.RawStam += player.StatScale;
                            break;
                        }
                }

                if (player.ControlMaster != null)
                {
                    switch (((PlayerMobile)player.ControlMaster).Nation)
                    {
                        case Nation.Alyrian: { if (Utility.RandomBool()) player.RawDex += Utility.Random(player.StatScale); else player.RawInt += Utility.Random(player.StatScale); break; }
                        case Nation.Azhuran: { player.RawDex += Utility.Random(player.StatScale); break; }
                        case Nation.Khemetar: { player.RawInt += Utility.Random(player.StatScale); break; }
                        case Nation.Mhordul: { player.RawStr += Utility.Random(player.StatScale); break; }
                        case Nation.Tyrean: { if (Utility.RandomBool()) player.RawStr += Utility.Random(player.StatScale); else player.RawStam += Utility.Random(player.StatScale); break; }
                        case Nation.Vhalurian: { player.RawHits += Utility.Random(player.StatScale); break; }
                    }
                }
            }
            else
            {
                player.RawStr += player.StatScale;
                player.RawDex += player.StatScale;
                player.RawInt += player.StatScale;
                player.RawHits += player.StatScale;
                player.RawStam += player.StatScale;
                player.RawMana += player.StatScale;
            }

            if( player is Dragon )
            {
                if( player.Level > 19 && player.BodyValue == 61 )
                {
                    Gold newloot = new Gold( Utility.RandomMinMax( 1, 3 ) );
                    Container pack = player.Backpack;

                    if( pack != null )
                        pack.DropItem( newloot );

                    player.BodyValue = 59;
                }

                if( player.Level > 38 && player.BodyValue == 59 )
                {
                    Gold newloot = new Gold( Utility.RandomMinMax( 3, 6 ) );
                    Container pack = player.Backpack;

                    if( pack != null )
                        pack.DropItem( newloot );

                    player.BodyValue = 46;
                }
            }

            if( player is Mercenary && ((Mercenary)player).Lives < 8 )
                ((Mercenary)player).Lives++;

            else if( player is BaseBreedableCreature )
            {
                BaseBreedableCreature bbc = player as BaseBreedableCreature;

                if( player.Level % 5 == 0 && bbc.PetEvolution > 0 )
                {
                    bbc.RaiseRandomFeat();
                    bbc.PetEvolution--;
                }

                bbc.UpdateSpeeds();

                if( ((BaseBreedableCreature)player).Lives < (8 + ((BaseBreedableCreature)player).ExtraLives) )
                    ((BaseBreedableCreature)player).Lives++;

                if (player is Serpent)
                {
                    if (player.Level == 40)
                    {
                        if (player is GrassSnake)
                        {
                            ((GrassSnake)player).SetConstrict(true);
                            player.SetDex(player.RawDex / 3);
                            player.BodyValue = 89;
                            player.Emote("*" + player.Name + " has grown more langurous but also more powerful!*");
                            player.PlaySound(0x05E);
                        }
                        else
                        {
                            player.BodyValue = 89;
                            player.Emote("*" + player.Name + " is growing!*");
                            player.PlaySound(0x05E);
                        }
                    }

                    if(player is Viper)
                        ((Viper)player).incSerpentPoison();
                    else if(player is Copperhead)
                        ((Copperhead)player).incSerpentPoison();
                    else if(player is Cobra)
                        ((Cobra)player).incSerpentPoison();
                    else if(player is BlackMamba)
                        ((BlackMamba)player).incSerpentPoison();
                }

                    if (player is WorkHorse)
                    {
                        List<Item> packItems = new List<Item>();
                        foreach (Item item in (player as WorkHorse).Backpack.Items)
                            packItems.Add(item);

                        StrongBackpack newPack = new StrongBackpack((player as WorkHorse).Backpack.MaxWeight + player.StatScale);
                        newPack.MaxItems += Utility.Random(player.StatScale);
                        foreach (Item item in packItems)
                            newPack.AddItem(item);

                        (player as WorkHorse).Backpack.Delete();
                        (player as WorkHorse).AddItem(newPack);
                    }
            }

            else if( player.Controlled && player.Lives < 8 )
                player.Lives++;

            AwardSkill( player, i );

            if( player.Level < 50 )
                CheckLevel( player );
        }
コード例 #5
0
        public void SizeUpCrewMember(BaseCreature bc, bool evil, int link, Mobile captain, string toss)
        {
            MorphingTime.RemoveMyClothes((Mobile)bc);

            if (bc.Backpack != null)
            {
                List <Item> belongings = new List <Item>();
                foreach (Item i in bc.Backpack.Items)
                {
                    belongings.Add(i);
                }
                foreach (Item stuff in belongings)
                {
                    stuff.Delete();
                }
            }

            bc.AI        = AIType.AI_Archer;
            bc.FightMode = FightMode.Evil;
            bc.Karma     = 1500;
            bc.Name      = "a sailor";

            if (evil)
            {
                bc.FightMode = FightMode.Closest;
                bc.Karma     = -1500;
                bc.Name      = "a pirate";
                if (captain is PirateCult)
                {
                    bc.Name = "a follower";
                }
            }

            bc.SetStr(96, 120);
            bc.SetDex(81, 105);
            bc.SetInt(36, 60);

            bc.SetHits(58, 72);

            SetDamage(10, 23);

            bc.SetDamageType(ResistanceType.Physical, 100);

            bc.SetResistance(ResistanceType.Physical, 35, 50);
            bc.SetResistance(ResistanceType.Fire, 10, 30);
            bc.SetResistance(ResistanceType.Cold, 10, 30);
            bc.SetResistance(ResistanceType.Poison, 10, 30);
            bc.SetResistance(ResistanceType.Energy, 10, 30);

            bc.SetSkill(SkillName.Archery, 66.0, 97.5);
            bc.SetSkill(SkillName.MagicResist, 25.0, 47.5);
            bc.SetSkill(SkillName.Tactics, 65.0, 87.5);
            bc.SetSkill(SkillName.Wrestling, 66.0, 97.5);

            bc.Fame = 1500;

            bc.VirtualArmor = 32;

            bc.Title    = null;
            bc.EmoteHue = link;

            if (toss == "stones")
            {
                MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Stones"; bc.AddItem(gloves);
            }
            else if (toss == "stars")
            {
                MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Stars"; bc.AddItem(gloves);
            }
            else if (toss == "axes")
            {
                MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Axes"; bc.AddItem(gloves);
            }
            else if (toss == "daggers")
            {
                MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Daggers"; bc.AddItem(gloves);
            }
            else if (toss == "darts")
            {
                MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Darts"; bc.AddItem(gloves);
            }
            else if (toss == "spear")
            {
                MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Spear"; bc.AddItem(gloves);
            }
            else if (toss == "boulder")
            {
                MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Boulder"; bc.AddItem(gloves);
            }
            else if (toss == "bones")
            {
                MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Bones"; bc.AddItem(gloves);
            }
            else if (toss == "arrows")
            {
                bc.AddItem(new Bow());
            }
            else if (toss == "crossbow")
            {
                bc.AddItem(new Crossbow());
            }
            else if (toss == "harpoon")
            {
                bc.AddItem(new Harpoon());
            }

            else if (toss == "fire")
            {
                WizardStaff staff = new WizardStaff(); staff.AosElementDamages.Fire = 75; staff.damageType = 1; bc.AddItem(staff);
            }
            else if (toss == "cold")
            {
                WizardStaff staff = new WizardStaff(); staff.AosElementDamages.Cold = 75; staff.damageType = 2; bc.AddItem(staff);
            }
            else if (toss == "energy")
            {
                WizardStaff staff = new WizardStaff(); staff.AosElementDamages.Energy = 75; staff.damageType = 3; bc.AddItem(staff);
            }
            else if (toss == "poison")
            {
                WizardStaff staff = new WizardStaff(); staff.AosElementDamages.Poison = 75; staff.damageType = 4; bc.AddItem(staff);
            }
            else if (toss == "bolt")
            {
                WizardStaff staff = new WizardStaff(); staff.damageType = 0; bc.AddItem(staff);
            }

            DressUpCrewMember(bc, captain);
            bc.NameColor();
            bc.MoveToWorld(captain.Location, captain.Map);
        }