diff --git a/Distribution/Data/npc-speeds.json b/Distribution/Data/npc-speeds.json new file mode 100644 index 000000000..b2b376d92 --- /dev/null +++ b/Distribution/Data/npc-speeds.json @@ -0,0 +1,139 @@ +[ + { + "name": "Slow", + "active": 0.6, + "passive": 1.2, + "types": [ + "AntLion", "ArcticOgreLord", "BogThing", + "Bogle", "BoneKnight", "EarthElemental", + "Ettin", "FrostOoze", "FrostTroll", + "GazerLarva", "Ghoul", "Golem", + "HeadlessOne", "Jwilson", "Mummy", + "Ogre", "OgreLord", "PlagueBeast", + "Quagmire", "Rat", "RottingCorpse", + "SewerRat", "Skeleton", "Slime", + "Zombie", "Walrus", "RestlessSoul", + "CrystalElemental", "DarknightCreeper", "MoundOfMaggots", + "Juggernaut", "Yamandon", "Serado" + ] + }, + { + "name": "Fast", + "active": 0.4, + "passive": 0.8, + "types": [ + "LordOaks", "Silvani", "AirElemental", + "AncientWyrm", "Balron", "BladeSpirits", + "DreadSpider", "Efreet", "EtherealWarrior", + "Lich", "Nightmare", "OphidianArchmage", + "OphidianMage", "OphidianWarrior", "OphidianMatriarch", + "OphidianKnight", "PoisonElemental", "Revenant", + "SandVortex", "SavageRider", "SavageShaman", + "SnowElemental", "WhiteWyrm", "Wisp", + "DemonKnight", "GiantBlackWidow", "SummonedAirElemental", + "LesserHiryu", "Hiryu", "LadyOfTheSnow", + "RaiJu", "Ronin", "RuneBeetle", + "Changeling", "LadyJennifyr", "LadyMarai", "MasterJonath", + "MasterMikael", "MasterTheophilus", "RedDeath", + "SirPatrick", "Miasma", "Rend", + "Grobu", "Gnaw", "Guile", + "Irk", "Spite", "LadyLissith", + "LadySabrix", "Malefic", "Silk", + "Virulent", "SeaHorse" + ] + }, + { + "name": "Very Fast", + "active": 0.35, + "passive": 0.7, + "types": [ + "Barracoon", "Mephitis", "Neira", + "Rikktor", "Semidar", "EnergyVortex", + "EliteNinja", "Pixie", "SilverSerpent", + "VorpalBunny", "FleshRenderer", "KhaldunRevenant", + "FactionDragoon", "FactionKnight", "FactionPaladin", + "FactionHenchman", "FactionMercenary", "FactionNecromancer", + "FactionSorceress", "FactionWizard", "FactionBerserker", + "FactionPaladin", "Leviathan", "FireBeetle", + "FanDancer", "FactionDeathKnight" + ] + }, + { + "name": "Medium", + "active": 0.5, + "passive": 1.0, + "types": [ + "AcidElemental", "AgapiteElemental", "Alligator", + "AncientLich", "Betrayer", "Bird", + "BlackBear", "BlackSolenInfiltratorQueen", "BlackSolenInfiltratorWarrior", + "BlackSolenQueen", "BlackSolenWarrior", "BlackSolenWorker", + "BloodElemental", "Boar", "Bogling", + "BoneMagi", "Brigand", "BronzeElemental", + "BrownBear", "Bull", "BullFrog", + "Cat", "Centaur", "ChaosDaemon", + "Chicken", "GolemController", "CopperElemental", + "CopperElemental", "Cougar", "Cow", + "Cyclops", "Daemon", "DeepSeaSerpent", + "DesertOstard", "DireWolf", "Dog", + "Dolphin", "Dragon", "Drake", + "DullCopperElemental", "Eagle", "ElderGazer", + "EvilMage", "EvilMageLord", "Executioner", + "Savage", "FireElemental", "FireGargoyle", + "FireSteed", "ForestOstard", "FrenziedOstard", + "FrostSpider", "Gargoyle", "Gazer", + "IceSerpent", "GiantRat", "GiantSerpent", + "GiantSpider", "GiantToad", "Goat", + "GoldenElemental", "Gorilla", "GreatHart", + "GreyWolf", "GrizzlyBear", "Guardian", + "Harpy", "Harrower", "HellHound", + "Hind", "HordeMinion", "Horse", + "Horse", "IceElemental", "IceFiend", + "IceSnake", "Imp", "JackRabbit", + "Kirin", "Kraken", "PredatorHellCat", + "LavaLizard", "LavaSerpent", "LavaSnake", + "Lizardman", "Llama", "Mongbat", + "StrongMongbat", "MountainGoat", "Orc", + "OrcBomber", "OrcBrute", "OrcCaptain", + "OrcishLord", "OrcishMage", "PackHorse", + "PackLlama", "Panther", "Pig", + "PlagueSpawn", "PolarBear", "Rabbit", + "Ratman", "RatmanArcher", "RatmanMage", + "RedSolenInfiltratorQueen", "RedSolenInfiltratorWarrior", "RedSolenQueen", + "RedSolenWarrior", "RedSolenWorker", "RidableLlama", + "Ridgeback", "Scorpion", "SeaSerpent", + "SerpentineDragon", "Shade", "ShadowIronElemental", + "ShadowWisp", "ShadowWyrm", "Sheep", + "SilverSteed", "SkeletalDragon", "SkeletalMage", + "SkeletalMount", "HellCat", "Snake", + "SnowLeopard", "SpectralArmour", "Spectre", + "StoneGargoyle", "StoneHarpy", "SwampDragon", + "ScaledSwampDragon", "SwampTentacle", "TerathanAvenger", + "TerathanDrone", "TerathanMatriarch", "TerathanWarrior", + "TimberWolf", "Titan", "Troll", + "Unicorn", "ValoriteElemental", "VeriteElemental", + "CoMWarHorse", "MinaxWarHorse", "SLWarHorse", + "TBWarHorse", "WaterElemental", "WhippingVine", + "WhiteWolf", "Wraith", "Wyvern", + "KhaldunZealot", "KhaldunSummoner", "SavageRidgeback", + "LichLord", "SkeletalKnight", "SummonedDaemon", + "SummonedEarthElemental", "SummonedWaterElemental", "SummonedFireElemental", + "MeerWarrior", "MeerEternal", "MeerMage", + "MeerCaptain", "JukaLord", "JukaMage", + "JukaWarrior", "AbysmalHorror", "BoneDemon", + "Devourer", "FleshGolem", "Gibberling", + "GoreFiend", "Impaler", "PatchworkSkeleton", + "Ravager", "ShadowKnight", "SkitteringHopper", + "Treefellow", "VampireBat", "WailingBanshee", + "WandererOfTheVoid", "Cursed", "GrimmochDrummel", + "LysanderGathenwale", "MorgBergen", "ShadowFiend", + "SpectralArmour", "TavaraSewel", "ArcaneDaemon", + "Doppleganger", "EnslavedGargoyle", "ExodusMinion", + "ExodusOverseer", "GargoyleDestroyer", "GargoyleEnforcer", + "Moloch", "BakeKitsune", "DeathwatchBeetleHatchling", + "Kappa", "KazeKemono", "DeathwatchBeetle", + "TsukiWolf", "YomotsuElder", "YomotsuPriest", + "YomotsuWarrior", "RevenantLion", "Oni", + "Gaman", "Crane", "Beetle" + ] + } +] diff --git a/Projects/Server/Utilities/Utility.cs b/Projects/Server/Utilities/Utility.cs index faba17ece..7d16d62b0 100644 --- a/Projects/Server/Utilities/Utility.cs +++ b/Projects/Server/Utilities/Utility.cs @@ -1019,6 +1019,21 @@ namespace Server [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool RandomBool() => RandomSources.Source.NextBool(); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double RandomMinMax(double min, double max) + { + if (min > max) + { + (min, max) = (max, min); + } + else if (min == max) + { + return min; + } + + return min + RandomSources.Source.NextDouble() * (max - min); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint RandomMinMax(uint min, uint max) { diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/AGhostOfCovetous.cs b/Projects/UOContent/Engines/ML Quests/Definitions/AGhostOfCovetous.cs index 754d1d8f0..63ebe8524 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/AGhostOfCovetous.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/AGhostOfCovetous.cs @@ -97,7 +97,7 @@ namespace Server.Engines.MLQuests.Definitions { [Constructible] public Ben() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Apprentice Necromancer"; Body = 0x190; @@ -107,6 +107,7 @@ namespace Server.Engines.MLQuests.Definitions FacialHairItemID = 0x204C; FacialHairHue = 0x463; + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); AddItem(new Backpack()); @@ -142,13 +143,13 @@ namespace Server.Engines.MLQuests.Definitions public class Frederic : BaseCreature { [Constructible] - public Frederic() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Frederic() : base(AIType.AI_Vendor, FightMode.None, 2) { Body = 0x1A; Hue = 0x455; Frozen = true; + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); } @@ -178,14 +179,15 @@ namespace Server.Engines.MLQuests.Definitions public class Leon : BaseCreature { [Constructible] - public Leon() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Leon() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Alchemist"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -221,8 +223,7 @@ namespace Server.Engines.MLQuests.Definitions public class Andros : BaseCreature { [Constructible] - public Andros() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Andros() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Blacksmith"; Body = 0x190; @@ -232,6 +233,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x2049; HairHue = 0x45E; + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); AddItem(new Backpack()); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/Bedlam.cs b/Projects/UOContent/Engines/ML Quests/Definitions/Bedlam.cs index f0d7b5daf..390262e51 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/Bedlam.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/Bedlam.cs @@ -69,14 +69,15 @@ namespace Server.Engines.MLQuests.Definitions public class Kia : BaseCreature { [Constructible] - public Kia() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Kia() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the student"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -113,14 +114,15 @@ namespace Server.Engines.MLQuests.Definitions public class Emerillo : BaseCreature { [Constructible] - public Emerillo() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Emerillo() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the cook"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -165,14 +167,15 @@ namespace Server.Engines.MLQuests.Definitions public class Nythalia : BaseCreature { [Constructible] - public Nythalia() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Nythalia() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the student"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/Britannia.cs b/Projects/UOContent/Engines/ML Quests/Definitions/Britannia.cs index 7226809c2..5f3b2ce96 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/Britannia.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/Britannia.cs @@ -108,14 +108,15 @@ namespace Server.Engines.MLQuests.Definitions public class Aurelia : BaseCreature { [Constructible] - public Aurelia() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Aurelia() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Architect's Daughter"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -162,12 +163,13 @@ namespace Server.Engines.MLQuests.Definitions public class SkeletonOfSzandor : BaseCreature { [Constructible] - public SkeletonOfSzandor() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public SkeletonOfSzandor() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Late Architect"; Hue = 0x83F2; // TODO: Random human hue? Why??? Body = 0x32; + + SetSpeed(0.5, 2); InitStats(100, 100, 25); } diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/Heartwood.cs b/Projects/UOContent/Engines/ML Quests/Definitions/Heartwood.cs index 20e0216f3..1dd07828e 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/Heartwood.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/Heartwood.cs @@ -2004,14 +2004,15 @@ namespace Server.Engines.MLQuests.Definitions public class Saril : BaseCreature { [Constructible] - public Saril() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Saril() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the guard"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2070,14 +2071,15 @@ namespace Server.Engines.MLQuests.Definitions public class Cailla : BaseCreature { [Constructible] - public Cailla() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Cailla() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the guard"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2137,14 +2139,15 @@ namespace Server.Engines.MLQuests.Definitions public class Tamm : BaseCreature { [Constructible] - public Tamm() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Tamm() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the guard"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2202,14 +2205,15 @@ namespace Server.Engines.MLQuests.Definitions public class Landy : BaseCreature { [Constructible] - public Landy() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Landy() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the soil nurturer"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2268,14 +2272,15 @@ namespace Server.Engines.MLQuests.Definitions public class Alejaha : BaseCreature { [Constructible] - public Alejaha() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Alejaha() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2333,14 +2338,15 @@ namespace Server.Engines.MLQuests.Definitions public class Mielan : BaseCreature { [Constructible] - public Mielan() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Mielan() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arcanist"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2396,14 +2402,15 @@ namespace Server.Engines.MLQuests.Definitions public class Ciala : BaseCreature { [Constructible] - public Ciala() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Ciala() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arborist"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2467,14 +2474,15 @@ namespace Server.Engines.MLQuests.Definitions public class Aniel : BaseCreature { [Constructible] - public Aniel() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Aniel() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arborist"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2530,14 +2538,15 @@ namespace Server.Engines.MLQuests.Definitions public class Aulan : BaseCreature { [Constructible] - public Aulan() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Aulan() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the expeditionist"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2607,14 +2616,15 @@ namespace Server.Engines.MLQuests.Definitions public class Brinnae : BaseCreature { [Constructible] - public Brinnae() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Brinnae() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2666,14 +2676,15 @@ namespace Server.Engines.MLQuests.Definitions public class Caelas : BaseCreature { [Constructible] - public Caelas() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Caelas() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2729,14 +2740,15 @@ namespace Server.Engines.MLQuests.Definitions public class Clehin : BaseCreature { [Constructible] - public Clehin() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Clehin() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the soil nurturer"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2790,14 +2802,15 @@ namespace Server.Engines.MLQuests.Definitions public class Cloorne : BaseCreature { [Constructible] - public Cloorne() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Cloorne() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the expeditionist"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2866,14 +2879,15 @@ namespace Server.Engines.MLQuests.Definitions public class Salaenih : BaseCreature { [Constructible] - public Salaenih() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Salaenih() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the expeditionist"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -2949,14 +2963,15 @@ namespace Server.Engines.MLQuests.Definitions public class Vilo : BaseCreature { [Constructible] - public Vilo() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Vilo() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the guard"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3016,14 +3031,15 @@ namespace Server.Engines.MLQuests.Definitions public class Tholef : BaseCreature { [Constructible] - public Tholef() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Tholef() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the grape tender"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3085,14 +3101,15 @@ namespace Server.Engines.MLQuests.Definitions public class Tillanil : BaseCreature { [Constructible] - public Tillanil() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Tillanil() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the grape tender"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3147,14 +3164,15 @@ namespace Server.Engines.MLQuests.Definitions public class Waelian : BaseCreature { [Constructible] - public Waelian() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Waelian() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the trinket weaver"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3216,14 +3234,15 @@ namespace Server.Engines.MLQuests.Definitions public class Sleen : BaseCreature { [Constructible] - public Sleen() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Sleen() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the trinket weaver"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3279,14 +3298,15 @@ namespace Server.Engines.MLQuests.Definitions public class Unoelil : BaseCreature { [Constructible] - public Unoelil() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Unoelil() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the bark weaver"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3341,14 +3361,15 @@ namespace Server.Engines.MLQuests.Definitions public class Anolly : BaseCreature { [Constructible] - public Anolly() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Anolly() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the bark weaver"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3390,14 +3411,15 @@ namespace Server.Engines.MLQuests.Definitions public class Jusae : BaseCreature { [Constructible] - public Jusae() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Jusae() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the bowcrafter"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3462,14 +3484,15 @@ namespace Server.Engines.MLQuests.Definitions public class Cillitha : BaseCreature { [Constructible] - public Cillitha() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Cillitha() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the bowcrafter"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3524,14 +3547,15 @@ namespace Server.Engines.MLQuests.Definitions public class Lohn : BaseCreature { [Constructible] - public Lohn() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Lohn() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the metal weaver"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3593,14 +3617,15 @@ namespace Server.Engines.MLQuests.Definitions public class Olla : BaseCreature { [Constructible] - public Olla() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Olla() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the metal weaver"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3657,14 +3682,15 @@ namespace Server.Engines.MLQuests.Definitions public class Thallary : BaseCreature { [Constructible] - public Thallary() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Thallary() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the cloth weaver"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3720,14 +3746,15 @@ namespace Server.Engines.MLQuests.Definitions public class Ahie : BaseCreature { [Constructible] - public Ahie() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Ahie() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the cloth weaver"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3782,14 +3809,15 @@ namespace Server.Engines.MLQuests.Definitions public class Tyeelor : BaseCreature { [Constructible] - public Tyeelor() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Tyeelor() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the expeditionist"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3845,14 +3873,15 @@ namespace Server.Engines.MLQuests.Definitions public class Athailon : BaseCreature { [Constructible] - public Athailon() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Athailon() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the expeditionist"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3906,14 +3935,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderTaellia : BaseCreature { [Constructible] - public ElderTaellia() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public ElderTaellia() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -3950,14 +3980,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderMallew : BaseCreature { [Constructible] - public ElderMallew() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public ElderMallew() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4007,14 +4038,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderAbbein : BaseCreature { [Constructible] - public ElderAbbein() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public ElderAbbein() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4050,14 +4082,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderVicaie : BaseCreature { [Constructible] - public ElderVicaie() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public ElderVicaie() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4098,14 +4131,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderJothan : BaseCreature { [Constructible] - public ElderJothan() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public ElderJothan() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4143,14 +4177,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderAlethanian : BaseCreature { [Constructible] - public ElderAlethanian() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public ElderAlethanian() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4188,14 +4223,15 @@ namespace Server.Engines.MLQuests.Definitions public class Rebinil : BaseCreature { [Constructible] - public Rebinil() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Rebinil() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the healer"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4231,14 +4267,15 @@ namespace Server.Engines.MLQuests.Definitions public class Aluniol : BaseCreature { [Constructible] - public Aluniol() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Aluniol() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the healer"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4274,14 +4311,15 @@ namespace Server.Engines.MLQuests.Definitions public class Olaeni : BaseCreature { [Constructible] - public Olaeni() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Olaeni() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the thaumaturgist"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4318,14 +4356,15 @@ namespace Server.Engines.MLQuests.Definitions public class Bolaevin : BaseCreature { [Constructible] - public Bolaevin() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Bolaevin() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arcanist"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4368,14 +4407,15 @@ namespace Server.Engines.MLQuests.Definitions public class LorekeeperAneen : BaseCreature { [Constructible] - public LorekeeperAneen() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public LorekeeperAneen() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the keeper of tradition"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4411,14 +4451,15 @@ namespace Server.Engines.MLQuests.Definitions public class Daelas : BaseCreature { [Constructible] - public Daelas() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Daelas() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arborist"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4463,14 +4504,15 @@ namespace Server.Engines.MLQuests.Definitions public class Alelle : BaseCreature { [Constructible] - public Alelle() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Alelle() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arborist"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4519,14 +4561,15 @@ namespace Server.Engines.MLQuests.Definitions public class LorekeeperNillaen : BaseCreature { [Constructible] - public LorekeeperNillaen() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public LorekeeperNillaen() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the keeper of tradition"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4570,14 +4613,15 @@ namespace Server.Engines.MLQuests.Definitions public class LorekeeperRyal : BaseCreature { [Constructible] - public LorekeeperRyal() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public LorekeeperRyal() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the keeper of tradition"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4634,14 +4678,15 @@ namespace Server.Engines.MLQuests.Definitions public class Braen : BaseCreature { [Constructible] - public Braen() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Braen() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the thaumaturgist"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4689,14 +4734,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderAcob : BaseCreature { [Constructible] - public ElderAcob() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public ElderAcob() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4743,14 +4789,15 @@ namespace Server.Engines.MLQuests.Definitions public class LorekeeperCalendor : BaseCreature { [Constructible] - public LorekeeperCalendor() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public LorekeeperCalendor() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the keeper of tradition"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -4798,14 +4845,15 @@ namespace Server.Engines.MLQuests.Definitions public class LorekeeperSiarra : BaseCreature { [Constructible] - public LorekeeperSiarra() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public LorekeeperSiarra() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the keeper of tradition"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/Heritage.cs b/Projects/UOContent/Engines/ML Quests/Definitions/Heritage.cs index 4284e0906..92fa5d7bb 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/Heritage.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/Heritage.cs @@ -278,12 +278,12 @@ namespace Server.Engines.MLQuests.Definitions public class Enigma : BaseCreature { [Constructible] - public Enigma() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Enigma() : base(AIType.AI_Vendor, FightMode.None, 2) { Body = 788; BaseSoundID = 0x3EE; + SetSpeed(0.5, 2); InitStats(100, 100, 25); } @@ -616,12 +616,13 @@ namespace Server.Engines.MLQuests.Definitions public class Sledge : BaseCreature { [Constructible] - public Sledge() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Sledge() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Versatile"; Body = 400; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); AddItem(new Tunic(Utility.RandomNeutralHue())); @@ -671,12 +672,13 @@ namespace Server.Engines.MLQuests.Definitions public class Patricus : BaseCreature { [Constructible] - public Patricus() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Patricus() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Trader"; Body = 400; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); AddItem(new FancyShirt(Utility.RandomNeutralHue())); @@ -713,13 +715,14 @@ namespace Server.Engines.MLQuests.Definitions public class Belulah : BaseCreature { [Constructible] - public Belulah() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Belulah() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the scorned"; Female = true; Body = 401; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/HonestBeggar.cs b/Projects/UOContent/Engines/ML Quests/Definitions/HonestBeggar.cs index 3173d8179..d9f5a2bdb 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/HonestBeggar.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/HonestBeggar.cs @@ -55,14 +55,15 @@ namespace Server.Engines.MLQuests.Definitions public class Evan : BaseCreature { [Constructible] - public Evan() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Evan() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Beggar"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -98,14 +99,15 @@ namespace Server.Engines.MLQuests.Definitions public class Regina : BaseCreature { [Constructible] - public Regina() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Regina() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Noble"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/Ilshenar.cs b/Projects/UOContent/Engines/ML Quests/Definitions/Ilshenar.cs index 394010258..3d9967a7a 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/Ilshenar.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/Ilshenar.cs @@ -174,12 +174,13 @@ namespace Server.Engines.MLQuests.Definitions public class GrandpaCharley : BaseCreature { [Constructible] - public GrandpaCharley() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public GrandpaCharley() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the farmer"; Body = 400; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); var hairHue = 0x3B2 + Utility.Random(2); @@ -226,14 +227,15 @@ namespace Server.Engines.MLQuests.Definitions public class Jelrice : BaseCreature { [Constructible] - public Jelrice() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Jelrice() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the trader"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -276,14 +278,15 @@ namespace Server.Engines.MLQuests.Definitions public class Yorus : BaseCreature { [Constructible] - public Yorus() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Yorus() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the tinker"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/Malas.cs b/Projects/UOContent/Engines/ML Quests/Definitions/Malas.cs index 5e3d974ea..0c60b8265 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/Malas.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/Malas.cs @@ -27,14 +27,15 @@ namespace Server.Engines.MLQuests.Definitions public class Drithen : BaseCreature { [Constructible] - public Drithen() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Drithen() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Fierce"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); AddItem(new Backpack()); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/MistakenIdentity.cs b/Projects/UOContent/Engines/ML Quests/Definitions/MistakenIdentity.cs index 057188b8d..cb07d63cb 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/MistakenIdentity.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/MistakenIdentity.cs @@ -195,14 +195,15 @@ namespace Server.Engines.MLQuests.Definitions public class Aernya : BaseCreature { [Constructible] - public Aernya() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Aernya() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Mistress of Admissions"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -241,14 +242,15 @@ namespace Server.Engines.MLQuests.Definitions public class Gorrow : BaseCreature { [Constructible] - public Gorrow() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Gorrow() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Mayor"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); AddItem(new Backpack()); @@ -298,14 +300,15 @@ namespace Server.Engines.MLQuests.Definitions public class MasterGnosos : BaseCreature { [Constructible] - public MasterGnosos() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public MasterGnosos() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the necromancer"; Race = Race.Human; Body = 0x190; Female = false; Hue = 0x83E8; + + SetSpeed(0.5, 2); InitStats(100, 100, 25); HairItemID = 0x2049; diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/NewHavenSkillTraining.cs b/Projects/UOContent/Engines/ML Quests/Definitions/NewHavenSkillTraining.cs index d0d38411c..5e4535cd1 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/NewHavenSkillTraining.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/NewHavenSkillTraining.cs @@ -654,6 +654,7 @@ namespace Server.Engines.MLQuests.Definitions FacialHairItemID = 0x204D; FacialHairHue = 0x47D; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -708,8 +709,7 @@ namespace Server.Engines.MLQuests.Definitions public class Dimethro : BaseCreature { [Constructible] - public Dimethro() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Dimethro() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Wrestling Instructor"; Body = 0x190; @@ -719,6 +719,7 @@ namespace Server.Engines.MLQuests.Definitions FacialHairItemID = 0x204D; FacialHairHue = 0x455; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.EvalInt, 120.0); @@ -767,8 +768,7 @@ namespace Server.Engines.MLQuests.Definitions public class Churchill : BaseCreature { [Constructible] - public Churchill() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Churchill() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Mace Fighting Instructor"; Body = 0x190; @@ -776,6 +776,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203C; HairHue = 0x455; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -854,6 +855,7 @@ namespace Server.Engines.MLQuests.Definitions HairHue = 0x47D; Female = true; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -927,8 +929,7 @@ namespace Server.Engines.MLQuests.Definitions public class Recaro : BaseCreature { [Constructible] - public Recaro() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Recaro() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Fencer Instructor"; Body = 0x190; @@ -938,6 +939,7 @@ namespace Server.Engines.MLQuests.Definitions FacialHairItemID = 0x204D; FacialHairHue = 0x455; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -1011,8 +1013,7 @@ namespace Server.Engines.MLQuests.Definitions public class AldenArmstrong : BaseCreature { [Constructible] - public AldenArmstrong() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public AldenArmstrong() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Tactics Instructor"; Body = 0x190; @@ -1020,6 +1021,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203B; HairHue = 0x44E; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -1076,8 +1078,7 @@ namespace Server.Engines.MLQuests.Definitions public class Jockles : BaseCreature { [Constructible] - public Jockles() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Jockles() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Swordsmanship Instructor"; Body = 0x190; @@ -1085,6 +1086,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203C; HairHue = 0x8A7; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -1137,14 +1139,14 @@ namespace Server.Engines.MLQuests.Definitions public class TylAriadne : BaseCreature { [Constructible] - public TylAriadne() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public TylAriadne() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Parrying Instructor"; Body = 0x190; Hue = 0x8374; HairItemID = 0; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -1218,8 +1220,7 @@ namespace Server.Engines.MLQuests.Definitions public class Alefian : BaseCreature { [Constructible] - public Alefian() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Alefian() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Resisting Spells Instructor"; Body = 0x190; @@ -1227,6 +1228,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203D; HairHue = 0x457; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.EvalInt, 120.0); @@ -1274,8 +1276,7 @@ namespace Server.Engines.MLQuests.Definitions public class Gustar : BaseCreature { [Constructible] - public Gustar() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Gustar() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Meditation Instructor"; Body = 0x190; @@ -1283,6 +1284,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203B; HairHue = 0x455; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.EvalInt, 120.0); @@ -1356,8 +1358,7 @@ namespace Server.Engines.MLQuests.Definitions public class Jillian : BaseCreature { [Constructible] - public Jillian() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Jillian() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Inscription Instructor"; Body = 0x191; @@ -1366,6 +1367,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203D; HairHue = 0x455; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.EvalInt, 120.0); @@ -1413,8 +1415,7 @@ namespace Server.Engines.MLQuests.Definitions public class Kaelynna : BaseCreature { [Constructible] - public Kaelynna() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Kaelynna() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Magery Instructor"; Body = 0x191; @@ -1423,6 +1424,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203C; HairHue = 0x47D; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.EvalInt, 120.0); @@ -1470,8 +1472,7 @@ namespace Server.Engines.MLQuests.Definitions public class Mithneral : BaseCreature { [Constructible] - public Mithneral() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Mithneral() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Evaluating Intelligence Instructor"; Body = 0x190; @@ -1479,6 +1480,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203C; HairHue = 0x455; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.EvalInt, 120.0); @@ -1540,6 +1542,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203D; HairHue = 0x46C; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.ArmsLore, 120.0); @@ -1591,8 +1594,7 @@ namespace Server.Engines.MLQuests.Definitions public class AndreasVesalius : BaseCreature { [Constructible] - public AndreasVesalius() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public AndreasVesalius() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Anatomy Instructor"; Body = 0x190; @@ -1602,6 +1604,7 @@ namespace Server.Engines.MLQuests.Definitions FacialHairItemID = 0x203E; FacialHairHue = 0x477; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -1651,8 +1654,7 @@ namespace Server.Engines.MLQuests.Definitions public class Avicenna : BaseCreature { [Constructible] - public Avicenna() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Avicenna() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Healing Instructor"; Body = 0x190; @@ -1660,6 +1662,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203B; HairHue = 0x477; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -1708,8 +1711,7 @@ namespace Server.Engines.MLQuests.Definitions public class SarsmeaSmythe : BaseCreature { [Constructible] - public SarsmeaSmythe() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public SarsmeaSmythe() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Focus Instructor"; Body = 0x191; @@ -1718,6 +1720,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203C; HairHue = 0x456; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Anatomy, 120.0); @@ -1840,12 +1843,12 @@ namespace Server.Engines.MLQuests.Definitions public class Chiyo : BaseCreature { [Constructible] - public Chiyo() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Chiyo() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Hiding Instructor"; Body = 0xF7; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Hiding, 120.0); @@ -1889,8 +1892,7 @@ namespace Server.Engines.MLQuests.Definitions public class Jun : BaseCreature { [Constructible] - public Jun() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Jun() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Stealth Instructor"; Body = 0x190; @@ -1898,6 +1900,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203B; HairHue = 0x455; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Hiding, 120.0); @@ -1949,8 +1952,7 @@ namespace Server.Engines.MLQuests.Definitions public class Walker : BaseCreature { [Constructible] - public Walker() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Walker() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Tracking Instructor"; Body = 0x190; @@ -1960,6 +1962,7 @@ namespace Server.Engines.MLQuests.Definitions FacialHairItemID = 0x204B; FacialHairHue = 0x47D; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Hiding, 120.0); @@ -2097,6 +2100,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203D; HairHue = 0x457; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Magery, 120.0); @@ -2176,6 +2180,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203C; HairHue = 0x455; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.Magery, 120.0); @@ -2225,8 +2230,7 @@ namespace Server.Engines.MLQuests.Definitions public class JacobWaltz : BaseCreature { [Constructible] - public JacobWaltz() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public JacobWaltz() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Miner Instructor"; Body = 0x190; @@ -2236,6 +2240,7 @@ namespace Server.Engines.MLQuests.Definitions FacialHairItemID = 0x204D; FacialHairHue = 0x44E; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.ArmsLore, 120.0); @@ -2296,6 +2301,7 @@ namespace Server.Engines.MLQuests.Definitions HairItemID = 0x203B; HairHue = 0x47B; + SetSpeed(0.5, 2); InitStats(100, 100, 25); SetSkill(SkillName.ArmsLore, 120.0); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/NewHavenTraining.cs b/Projects/UOContent/Engines/ML Quests/Definitions/NewHavenTraining.cs index 3eeccc7b0..97ebd7e94 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/NewHavenTraining.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/NewHavenTraining.cs @@ -262,14 +262,15 @@ namespace Server.Engines.MLQuests.Definitions public class Andric : BaseCreature { [Constructible] - public Andric() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Andric() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the archer trainer"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -340,14 +341,15 @@ namespace Server.Engines.MLQuests.Definitions public class Kashiel : BaseCreature { [Constructible] - public Kashiel() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Kashiel() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the archer"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -402,14 +404,15 @@ namespace Server.Engines.MLQuests.Definitions public class Asandos : BaseCreature { [Constructible] - public Asandos() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Asandos() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the chef"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -462,14 +465,15 @@ namespace Server.Engines.MLQuests.Definitions public class Clairesse : BaseCreature { [Constructible] - public Clairesse() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Clairesse() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the servant"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -518,14 +522,15 @@ namespace Server.Engines.MLQuests.Definitions public class Gervis : BaseCreature { [Constructible] - public Gervis() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Gervis() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the blacksmith trainer"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -586,14 +591,15 @@ namespace Server.Engines.MLQuests.Definitions public class Mugg : BaseCreature { [Constructible] - public Mugg() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Mugg() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the miner"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -639,14 +645,15 @@ namespace Server.Engines.MLQuests.Definitions public class Lowel : BaseCreature { [Constructible] - public Lowel() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Lowel() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the carpenter"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -697,14 +704,15 @@ namespace Server.Engines.MLQuests.Definitions public class Lyle : BaseCreature { [Constructible] - public Lyle() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Lyle() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the mage"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -753,14 +761,15 @@ namespace Server.Engines.MLQuests.Definitions public class Nibbet : BaseCreature { [Constructible] - public Nibbet() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Nibbet() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the tinker"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -798,14 +807,15 @@ namespace Server.Engines.MLQuests.Definitions public class Norton : BaseCreature { [Constructible] - public Norton() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Norton() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the fisher"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -856,14 +866,15 @@ namespace Server.Engines.MLQuests.Definitions public class Sadrah : BaseCreature { [Constructible] - public Sadrah() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Sadrah() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the courier"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -916,14 +927,15 @@ namespace Server.Engines.MLQuests.Definitions public class Hargrove : BaseCreature { [Constructible] - public Hargrove() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Hargrove() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Lumberjack"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/Sanctuary.cs b/Projects/UOContent/Engines/ML Quests/Definitions/Sanctuary.cs index 97a363595..5424438d0 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/Sanctuary.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/Sanctuary.cs @@ -762,13 +762,15 @@ namespace Server.Engines.MLQuests.Definitions { [Constructible] public Beotham() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the bowcrafter"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -828,14 +830,15 @@ namespace Server.Engines.MLQuests.Definitions public class Danoel : BaseCreature { [Constructible] - public Danoel() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Danoel() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the metal weaver"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -886,14 +889,15 @@ namespace Server.Engines.MLQuests.Definitions public class Tallinin : BaseCreature { [Constructible] - public Tallinin() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Tallinin() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the cloth weaver"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -947,14 +951,15 @@ namespace Server.Engines.MLQuests.Definitions public class Tiana : BaseCreature { [Constructible] - public Tiana() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Tiana() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the guard"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -1018,14 +1023,15 @@ namespace Server.Engines.MLQuests.Definitions public class LorekeeperOolua : BaseCreature { [Constructible] - public LorekeeperOolua() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public LorekeeperOolua() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the keeper of tradition"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -1075,14 +1081,15 @@ namespace Server.Engines.MLQuests.Definitions public class LorekeeperRollarn : BaseCreature { [Constructible] - public LorekeeperRollarn() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public LorekeeperRollarn() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the keeper of tradition"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -1143,14 +1150,15 @@ namespace Server.Engines.MLQuests.Definitions public class Dallid : BaseCreature { [Constructible] - public Dallid() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Dallid() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the cook"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -1206,14 +1214,15 @@ namespace Server.Engines.MLQuests.Definitions public class Canir : BaseCreature { [Constructible] - public Canir() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Canir() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the thaumaturgist"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -1267,14 +1276,15 @@ namespace Server.Engines.MLQuests.Definitions public class Yellienir : BaseCreature { [Constructible] - public Yellienir() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Yellienir() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the bark weaver"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -1313,14 +1323,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderOnallan : BaseCreature { [Constructible] - public ElderOnallan() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public ElderOnallan() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Body = 0x25D; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/Spellweaving.cs b/Projects/UOContent/Engines/ML Quests/Definitions/Spellweaving.cs index 38104cf18..edfbfa3f7 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/Spellweaving.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/Spellweaving.cs @@ -493,14 +493,15 @@ namespace Server.Engines.MLQuests.Definitions public class Aeluva : BaseCreature { [Constructible] - public Aeluva() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2.0) + public Aeluva() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arcanist"; Race = Race.Elf; Female = true; Body = 606; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -552,13 +553,14 @@ namespace Server.Engines.MLQuests.Definitions public class Koole : BaseCreature { [Constructible] - public Koole() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2.0) + public Koole() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arcanist"; Race = Race.Elf; Body = 605; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -622,14 +624,15 @@ namespace Server.Engines.MLQuests.Definitions public class Synaeva : BaseCreature { [Constructible] - public Synaeva() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2.0) + public Synaeva() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the arcanist"; Race = Race.Elf; Female = true; Body = 606; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -682,14 +685,15 @@ namespace Server.Engines.MLQuests.Definitions public class ElderBrae : BaseCreature { [Constructible] - public ElderBrae() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2.0) + public ElderBrae() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the wise"; Race = Race.Elf; Female = true; Body = 606; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/TheAncientWorld.cs b/Projects/UOContent/Engines/ML Quests/Definitions/TheAncientWorld.cs index 61a66f811..37d732311 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/TheAncientWorld.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/TheAncientWorld.cs @@ -98,14 +98,15 @@ namespace Server.Engines.MLQuests.Definitions public class LorekeeperBroolol : BaseCreature { [Constructible] - public LorekeeperBroolol() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public LorekeeperBroolol() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the keeper of tradition"; Race = Race.Elf; Body = 0x25E; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/UnfadingMemories.cs b/Projects/UOContent/Engines/ML Quests/Definitions/UnfadingMemories.cs index cfa189062..fec2e21be 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/UnfadingMemories.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/UnfadingMemories.cs @@ -83,14 +83,15 @@ namespace Server.Engines.MLQuests.Definitions public class Emilio : BaseCreature { [Constructible] - public Emilio() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Emilio() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Tortured Artist"; Race = Race.Human; Body = 0x190; Female = false; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); @@ -130,14 +131,15 @@ namespace Server.Engines.MLQuests.Definitions public class Thalia : BaseCreature { [Constructible] - public Thalia() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public Thalia() : base(AIType.AI_Vendor, FightMode.None, 2) { Title = "the Bride"; Race = Race.Human; Body = 0x191; Female = true; Hue = Race.RandomSkinHue(); + + SetSpeed(0.5, 2.0); InitStats(100, 100, 25); Utility.AssignRandomHair(this); diff --git a/Projects/UOContent/Engines/ML Quests/Mobiles/BoonCollector.cs b/Projects/UOContent/Engines/ML Quests/Mobiles/BoonCollector.cs index 9ab500594..b6c00bcc4 100644 --- a/Projects/UOContent/Engines/ML Quests/Mobiles/BoonCollector.cs +++ b/Projects/UOContent/Engines/ML Quests/Mobiles/BoonCollector.cs @@ -12,9 +12,9 @@ namespace Server.Engines.MLQuests.Mobiles { private InternalTimer m_Timer; - public DoneQuestCollector() - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public DoneQuestCollector() : base(AIType.AI_Vendor, FightMode.None, 2) { + SetSpeed(0.5, 2.0); } public DoneQuestCollector(Serial serial) diff --git a/Projects/UOContent/Mobiles/AI/BaseAI.cs b/Projects/UOContent/Mobiles/AI/BaseAI.cs index e7d8c2994..dc6e47c81 100644 --- a/Projects/UOContent/Mobiles/AI/BaseAI.cs +++ b/Projects/UOContent/Mobiles/AI/BaseAI.cs @@ -1037,7 +1037,7 @@ namespace Server.Mobiles public virtual bool Obey() { - var shouldObey = !m_Mobile.Deleted && m_Mobile.ControlOrder switch + return !m_Mobile.Deleted && m_Mobile.ControlOrder switch { OrderType.None => DoOrderNone(), OrderType.Come => DoOrderCome(), @@ -1054,15 +1054,6 @@ namespace Server.Mobiles OrderType.Transfer => DoOrderTransfer(), _ => false }; - - if (shouldObey) - { - // TODO: This might cause the movement timer to reset too often if someone is spamming commands. - // Test this thoroughly. - m_Mobile.ResetSpeeds(); - } - - return shouldObey; } public virtual void OnCurrentOrderChanged() @@ -1377,6 +1368,10 @@ namespace Server.Mobiles { m_Mobile.CurrentSpeed = 0.1; } + else if (m_Mobile.CurrentSpeed == m_Mobile.ActiveSpeed && m_Mobile.ControlTarget == m_Mobile.ControlMaster) + { + m_Mobile.CurrentSpeed = Math.Max(SpeedInfo.MinDelay, m_Mobile.CurrentSpeed * 0.5); + } } } } @@ -1928,19 +1923,23 @@ namespace Server.Mobiles public double TransformMoveDelay(double delay) { - double max = m_Mobile.IsMonster ? SpeedInfo.MaxMonsterDelay : SpeedInfo.MaxDelay; + // Non-monsters in PVP combat (like pets) are penalized + if (!m_Mobile.IsMonster && m_Mobile.InActivePVPCombat() && delay <= SpeedInfo.MaxDelay) + { + delay += 0.4; + } if (!m_Mobile.IsDeadPet && (m_Mobile.ReduceSpeedWithDamage || m_Mobile.IsSubdued)) { - double offset = m_Mobile.StamMax <= 0 ? 1.0 : m_Mobile.Stam / (double)m_Mobile.StamMax; + double offset = m_Mobile.StamMax <= 0 ? 1.0 : Math.Max(0, m_Mobile.Stam) / (double)m_Mobile.StamMax; if (offset < 1.0) { - delay += (max - delay) * (1.0 - offset); + delay += delay * (1.0 - offset); } } - return Math.Min(delay, max); + return delay; } public virtual bool CheckMove() => Core.TickCount - NextMove >= 0; @@ -2696,20 +2695,20 @@ namespace Server.Mobiles { if (!m_Timer.Running) { - m_Timer.Delay = TimeSpan.Zero; + // We want to randomize the time at which the AI activates. + // This triggers when a mob is first created since it moves from the internal map to it's added location + // If we spawn lots of mobs, we don't want their AI synchronized exactly. + m_Timer.Delay = TimeSpan.FromMilliseconds(Utility.Random(48) * 8); m_Timer.Start(); } } /* - * The mobile changed it speed, we must adjust the timer + * The mobile changed speeds, we must adjust the timer */ public virtual void OnCurrentSpeedChanged() { - m_Timer.Stop(); - m_Timer.Delay = TimeSpan.FromMilliseconds(Utility.Random(128) * 8); m_Timer.Interval = TimeSpan.FromSeconds(Math.Max(0.0, m_Mobile.CurrentSpeed)); - m_Timer.Start(); } private class InternalEntry : ContextMenuEntry @@ -2989,14 +2988,12 @@ namespace Server.Mobiles { private readonly BaseAI m_Owner; - public AITimer(BaseAI owner) - : base( - TimeSpan.FromSeconds(Utility.Random(128) * 8), - TimeSpan.FromSeconds(Math.Max(0.0, owner.m_Mobile.CurrentSpeed)) - ) + public AITimer(BaseAI owner) : base( + TimeSpan.FromMilliseconds(Utility.Random(96) * 8), + TimeSpan.FromSeconds(Math.Max(0.0, owner.m_Mobile.CurrentSpeed)) + ) { m_Owner = owner; - m_Owner.m_NextDetectHidden = Core.TickCount; } diff --git a/Projects/UOContent/Mobiles/AI/LegacySpeedInfo.cs b/Projects/UOContent/Mobiles/AI/LegacySpeedInfo.cs new file mode 100644 index 000000000..d4182b3b9 --- /dev/null +++ b/Projects/UOContent/Mobiles/AI/LegacySpeedInfo.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json.Serialization; +using Server.Json; +using Server.Logging; + +namespace Server; + +public class LegacySpeedInfo +{ + private static readonly ILogger logger = LogFactory.GetLogger(typeof(LegacySpeedInfo)); + + private const string _tablePath = "Data/npc-speeds.json"; + private static Dictionary m_Table; + + public static bool Enabled { get; private set; } + + public static bool GetSpeeds(Type type, out double activeSpeed, out double passiveSpeed) + { + if (!(Enabled && m_Table.TryGetValue(type, out var sp))) + { + activeSpeed = 0; + passiveSpeed = 0; + return false; + } + + activeSpeed = sp.ActiveSpeed; + passiveSpeed = sp.PassiveSpeed; + + return true; + } + + public static void Configure() + { + Enabled = ServerConfiguration.GetSetting("movement.delay.useLegacySpeeds", !Core.HS); + + if (!Enabled) + { + return; + } + + var path = Path.Combine(Core.BaseDirectory, _tablePath); + if (!File.Exists(path)) + { + logger.Warning($"Cannot find {path}. Disabling legacy speed system."); + Enabled = false; + return; + } + + var speeds = JsonConfig.Deserialize(path); + + m_Table = new Dictionary(); + + for (var i = 0; i < speeds.Length; ++i) + { + var info = speeds[i]; + + foreach (var type in info.Types) + { + m_Table[type] = info; + } + } + } + + public record LegacySpeedEntry + { + [JsonPropertyName("active")] + public double ActiveSpeed { get; init; } + + [JsonPropertyName("passive")] + public double PassiveSpeed { get; init; } + + [JsonPropertyName("types")] + public HashSet Types { get; init; } + } +} diff --git a/Projects/UOContent/Mobiles/AI/MageAI.cs b/Projects/UOContent/Mobiles/AI/MageAI.cs index 9088e27f3..a27240072 100644 --- a/Projects/UOContent/Mobiles/AI/MageAI.cs +++ b/Projects/UOContent/Mobiles/AI/MageAI.cs @@ -72,12 +72,7 @@ namespace Server.Mobiles return false; } - if (ProcessTarget()) - { - return true; - } - - return base.Think(); + return ProcessTarget() || base.Think(); } public virtual double ScaleBySkill(double v, SkillName skill) => v * m_Mobile.Skills[skill].Value / 100; @@ -387,12 +382,9 @@ namespace Server.Mobiles { if (!SmartAI) { - if (ScaleBySkill(DispelChance, SkillName.Magery) > Utility.RandomDouble()) - { - return new DispelSpell(m_Mobile); - } - - return ChooseSpell(toDispel); + return ScaleBySkill(DispelChance, SkillName.Magery) > Utility.RandomDouble() + ? new DispelSpell(m_Mobile) + : ChooseSpell(toDispel); } var spell = CheckCastHealingSpell(); @@ -743,13 +735,11 @@ namespace Server.Mobiles if (m_Mobile.Hits < m_Mobile.HitsMax * 20 / 100) { // We are low on health, should we flee? - bool flee; if (m_Mobile.Hits < c.Hits) { // We are more hurt than them - var diff = c.Hits - m_Mobile.Hits; flee = Utility.Random(0, 100) > 10 + diff; // (10 + diff)% chance to flee @@ -772,7 +762,6 @@ namespace Server.Mobiles if (m_Mobile.Spell == null && Core.TickCount - m_NextCastTime >= 0 && m_Mobile.InRange(c, Core.ML ? 10 : 12)) { // We are ready to cast a spell - Spell spell; var toDispel = FindDispelTarget(true); @@ -788,18 +777,18 @@ namespace Server.Mobiles spell = DoDispel(toDispel); } - else if (SmartAI && m_Combo != -1) // We are doing a spell combo - { - spell = DoCombo(c); - } - else if (SmartAI && c.Spell is HealSpell or GreaterHealSpell && !c.Poisoned - ) // They have a heal spell out - { - spell = new PoisonSpell(m_Mobile); - } else { - spell = ChooseSpell(c); + spell = SmartAI switch + { + // We are doing a spell combo + true when m_Combo != -1 => DoCombo(c), + // They have a heal spell out + true when + !c.Poisoned && + c.Spell is HealSpell or GreaterHealSpell => new PoisonSpell(m_Mobile), + _ => ChooseSpell(c) + }; } // Now we have a spell picked diff --git a/Projects/UOContent/Mobiles/AI/SpeedInfo.cs b/Projects/UOContent/Mobiles/AI/SpeedInfo.cs index 0fbd3a62c..36811f37a 100644 --- a/Projects/UOContent/Mobiles/AI/SpeedInfo.cs +++ b/Projects/UOContent/Mobiles/AI/SpeedInfo.cs @@ -29,20 +29,19 @@ public static class SpeedInfo public static void GetSpeeds(BaseCreature bc, out double activeSpeed, out double passiveSpeed) { + // Legacy is used if it is enabled, and the type is in the table + if (LegacySpeedInfo.GetSpeeds(bc.GetType(), out activeSpeed, out passiveSpeed)) + { + return; + } + var isMonster = bc.IsMonster; - var monsterDelay = isMonster || bc.InActivePVPCombat(); var maxDex = isMonster ? MaxMonsterDex : MaxDex; var dex = Math.Clamp(bc.Dex, 25, maxDex); - double min = monsterDelay ? MinMonsterDelay : MinDelay; - double max = monsterDelay ? MaxMonsterDelay : MaxDelay; - - if (bc.IsParagon) - { - min /= 2; - max = min + 0.5; - } + double min = isMonster ? MinMonsterDelay : MinDelay; + double max = isMonster ? MaxMonsterDelay : MaxDelay; activeSpeed = Math.Max(max - (max - min) * ((double)dex / maxDex), min); passiveSpeed = activeSpeed * 2; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/BaseMount.cs b/Projects/UOContent/Mobiles/Animals/Mounts/BaseMount.cs index 3e304765a..fcffd9646 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/BaseMount.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/BaseMount.cs @@ -11,16 +11,9 @@ namespace Server.Mobiles private Mobile m_Rider; public BaseMount( - string name, int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, - int rangeFight, double activeSpeed = -1, double passiveSpeed = -1 - ) : base( - aiType, - fightMode, - rangePerception, - rangeFight, - activeSpeed, - passiveSpeed - ) + string name, int bodyID, int itemID, AIType aiType, FightMode fightMode = FightMode.Closest, + int rangePerception = 10, int rangeFight = 1 + ) : base(aiType, fightMode, rangePerception, rangeFight) { Name = name; Body = bodyID; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Beetle.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Beetle.cs index 2a0ed620e..053385ab0 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Beetle.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Beetle.cs @@ -7,17 +7,7 @@ namespace Server.Mobiles public class Beetle : BaseMount { [Constructible] - public Beetle(string name = "a giant beetle") : base( - name, - 0x317, - 0x3EBC, - AIType.AI_Melee, - FightMode.Closest, - 10, - 1, - 0.25, - 0.5 - ) + public Beetle(string name = "a giant beetle") : base(name, 0x317, 0x3EBC, AIType.AI_Melee) { SetStr(300); SetDex(100); diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/DesertOstard.cs b/Projects/UOContent/Mobiles/Animals/Mounts/DesertOstard.cs index ec67254a9..e2e7516f6 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/DesertOstard.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/DesertOstard.cs @@ -3,17 +3,7 @@ namespace Server.Mobiles public class DesertOstard : BaseMount { [Constructible] - public DesertOstard(string name = "a desert ostard") : base( - name, - 0xD2, - 0x3EA3, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public DesertOstard(string name = "a desert ostard") : base(name, 0xD2, 0x3EA3, AIType.AI_Animal, FightMode.Aggressor) { BaseSoundID = 0x270; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Ethereals.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Ethereals.cs index d97216fce..83edbf3e2 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Ethereals.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Ethereals.cs @@ -13,8 +13,7 @@ namespace Server.Mobiles private Mobile m_Rider; [Constructible] - public EtherealMount(int itemID, int mountID) - : base(itemID) + public EtherealMount(int itemID, int mountID) : base(itemID) { m_MountedID = mountID; m_RegularID = itemID; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/FireSteed.cs b/Projects/UOContent/Mobiles/Animals/Mounts/FireSteed.cs index cc5eba47f..5dfdd5e18 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/FireSteed.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/FireSteed.cs @@ -6,17 +6,7 @@ namespace Server.Mobiles public class FireSteed : BaseMount { [Constructible] - public FireSteed(string name = "a fire steed") : base( - name, - 0xBE, - 0x3E9E, - AIType.AI_Melee, - FightMode.Closest, - 10, - 1, - 0.2, - 0.4 - ) + public FireSteed(string name = "a fire steed") : base(name, 0xBE, 0x3E9E, AIType.AI_Melee) { BaseSoundID = 0xA8; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/ForestOstard.cs b/Projects/UOContent/Mobiles/Animals/Mounts/ForestOstard.cs index c8a7cce51..c7b764afe 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/ForestOstard.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/ForestOstard.cs @@ -3,17 +3,7 @@ namespace Server.Mobiles public class ForestOstard : BaseMount { [Constructible] - public ForestOstard(string name = "a forest ostard") : base( - name, - 0xDB, - 0x3EA5, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public ForestOstard(string name = "a forest ostard") : base(name, 0xDB, 0x3EA5, AIType.AI_Animal, FightMode.Aggressor) { Hue = Utility.RandomSlimeHue() | 0x8000; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/FrenziedOstard.cs b/Projects/UOContent/Mobiles/Animals/Mounts/FrenziedOstard.cs index 33e7b144b..98425336e 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/FrenziedOstard.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/FrenziedOstard.cs @@ -3,17 +3,7 @@ namespace Server.Mobiles public class FrenziedOstard : BaseMount { [Constructible] - public FrenziedOstard(string name = "a frenzied ostard") : base( - name, - 0xDA, - 0x3EA4, - AIType.AI_Melee, - FightMode.Closest, - 10, - 1, - 0.2, - 0.4 - ) + public FrenziedOstard(string name = "a frenzied ostard") : base(name, 0xDA, 0x3EA4, AIType.AI_Melee) { Hue = Race.Human.RandomHairHue() | 0x8000; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/HellSteed.cs b/Projects/UOContent/Mobiles/Animals/Mounts/HellSteed.cs index 1c2479baa..5d00d1ab3 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/HellSteed.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/HellSteed.cs @@ -3,17 +3,7 @@ namespace Server.Mobiles public class HellSteed : BaseMount { [Constructible] - public HellSteed(string name = "a hellsteed") : base( - name, - 793, - 0x3EBB, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public HellSteed(string name = "a hellsteed") : base(name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor) { SetStats(this); } diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs index 2297300f6..aea42872d 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs @@ -10,8 +10,7 @@ namespace Server.Mobiles private static readonly Dictionary m_Table = new(); [Constructible] - public Hiryu() - : base("a hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1) + public Hiryu() : base("a hiryu", 243, 0x3E94, AIType.AI_Melee) { Hue = GetHue(); diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Horse.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Horse.cs index 7a31777a4..297215d03 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Horse.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Horse.cs @@ -17,17 +17,7 @@ namespace Server.Mobiles }; [Constructible] - public Horse(string name = "a horse") : base( - name, - 0xE2, - 0x3EA0, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public Horse(string name = "a horse") : base(name, 0xE2, 0x3EA0, AIType.AI_Animal, FightMode.Aggressor) { var random = Utility.Random(4); diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Kirin.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Kirin.cs index e229bbfdc..842f4233e 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Kirin.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Kirin.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles public class Kirin : BaseMount { [Constructible] - public Kirin(string name = "a ki-rin") : base(name, 132, 0x3EAD, AIType.AI_Mage, FightMode.Evil, 10, 1) + public Kirin(string name = "a ki-rin") : base(name, 132, 0x3EAD, AIType.AI_Mage, FightMode.Evil) { BaseSoundID = 0x3C5; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs b/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs index aa0be7316..f6c0167fc 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs @@ -10,8 +10,7 @@ namespace Server.Mobiles private static readonly Dictionary m_Table = new(); [Constructible] - public LesserHiryu() - : base("a lesser hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1) + public LesserHiryu() : base("a lesser hiryu", 243, 0x3E94, AIType.AI_Melee) { Hue = GetHue(); diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Nightmare.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Nightmare.cs index 447a0947c..6c058f86c 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Nightmare.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Nightmare.cs @@ -9,12 +9,7 @@ namespace Server.Mobiles name, 0x74, 0x3EA7, - AIType.AI_Mage, - FightMode.Closest, - 10, - 1, - 0.2, - 0.4 + AIType.AI_Mage ) { BaseSoundID = Core.AOS ? 0xA8 : 0x16A; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/RidableLlama.cs b/Projects/UOContent/Mobiles/Animals/Mounts/RidableLlama.cs index d35d8ef1a..7ba192f45 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/RidableLlama.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/RidableLlama.cs @@ -3,16 +3,7 @@ namespace Server.Mobiles public class RidableLlama : BaseMount { [Constructible] - public RidableLlama(string name = "a ridable llama") : base( - name, - 0xDC, - 0x3EA6, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 + public RidableLlama(string name = "a ridable llama") : base(name, 0xDC, 0x3EA6, AIType.AI_Animal, FightMode.Aggressor ) { BaseSoundID = 0x3F3; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Ridgeback.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Ridgeback.cs index f92bcebf7..93345b7c2 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Ridgeback.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Ridgeback.cs @@ -3,17 +3,7 @@ namespace Server.Mobiles public class Ridgeback : BaseMount { [Constructible] - public Ridgeback(string name = "a ridgeback") : base( - name, - 187, - 0x3EBA, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public Ridgeback(string name = "a ridgeback") : base(name, 187, 0x3EBA, AIType.AI_Animal, FightMode.Aggressor) { BaseSoundID = 0x3F3; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/SavageRidgeback.cs b/Projects/UOContent/Mobiles/Animals/Mounts/SavageRidgeback.cs index ad1292e19..b8bfc6615 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/SavageRidgeback.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/SavageRidgeback.cs @@ -3,17 +3,7 @@ namespace Server.Mobiles public class SavageRidgeback : BaseMount { [Constructible] - public SavageRidgeback(string name = "a savage ridgeback") : base( - name, - 188, - 0x3EB8, - AIType.AI_Melee, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public SavageRidgeback(string name = "a savage ridgeback") : base(name, 188, 0x3EB8, AIType.AI_Melee, FightMode.Aggressor) { BaseSoundID = 0x3F3; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/ScaledSwampDragon.cs b/Projects/UOContent/Mobiles/Animals/Mounts/ScaledSwampDragon.cs index 045dd8e25..4705c668a 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/ScaledSwampDragon.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/ScaledSwampDragon.cs @@ -3,17 +3,7 @@ namespace Server.Mobiles public class ScaledSwampDragon : BaseMount { [Constructible] - public ScaledSwampDragon(string name = "a swamp dragon") : base( - name, - 0x31F, - 0x3EBE, - AIType.AI_Melee, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public ScaledSwampDragon(string name = "a swamp dragon") : base(name, 0x31F, 0x3EBE, AIType.AI_Melee, FightMode.Aggressor) { SetStr(201, 300); SetDex(66, 85); diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/SeaHorse.cs b/Projects/UOContent/Mobiles/Animals/Mounts/SeaHorse.cs index 0729514cd..be56e80a6 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/SeaHorse.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/SeaHorse.cs @@ -3,18 +3,9 @@ namespace Server.Mobiles public class SeaHorse : BaseMount { [Constructible] - public SeaHorse(string name = "a sea horse") : base( - name, - 0x90, - 0x3EB3, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public SeaHorse(string name = "a sea horse") : base(name, 0x90, 0x3EB3, AIType.AI_Animal, FightMode.Aggressor) { + SetSpeed(0.4, 0.8); InitStats(Utility.Random(50, 30), Utility.Random(50, 30), 10); Skills.MagicResist.Base = 25.0 + Utility.RandomDouble() * 5.0; Skills.Wrestling.Base = 35.0 + Utility.RandomDouble() * 10.0; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/SilverSteed.cs b/Projects/UOContent/Mobiles/Animals/Mounts/SilverSteed.cs index 3ffe7159a..d8ed1fafe 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/SilverSteed.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/SilverSteed.cs @@ -3,18 +3,10 @@ namespace Server.Mobiles public class SilverSteed : BaseMount { [Constructible] - public SilverSteed(string name = "a silver steed") : base( - name, - 0x75, - 0x3EA8, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public SilverSteed(string name = "a silver steed") : base(name, 0x75, 0x3EA8, AIType.AI_Animal, FightMode.Aggressor) { + SetSpeed(0.55, 1.1); + InitStats(Utility.Random(50, 30), Utility.Random(50, 30), 10); Skills.MagicResist.Base = 25.0 + Utility.RandomDouble() * 5.0; Skills.Wrestling.Base = 35.0 + Utility.RandomDouble() * 10.0; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/SkeletalMount.cs b/Projects/UOContent/Mobiles/Animals/Mounts/SkeletalMount.cs index eb14bdb2f..4e14da8ea 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/SkeletalMount.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/SkeletalMount.cs @@ -3,18 +3,9 @@ namespace Server.Mobiles public class SkeletalMount : BaseMount { [Constructible] - public SkeletalMount(string name = null) : base( - name, - 793, - 0x3EBB, - AIType.AI_Animal, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public SkeletalMount(string name = null) : base(name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor) { + SetSpeed(0.55, 1.1); SetStr(91, 100); SetDex(46, 55); SetInt(46, 60); diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/SwampDragon.cs b/Projects/UOContent/Mobiles/Animals/Mounts/SwampDragon.cs index 44d6de6fd..3e08164d1 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/SwampDragon.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/SwampDragon.cs @@ -11,17 +11,7 @@ namespace Server.Mobiles private bool m_HasBarding; [Constructible] - public SwampDragon(string name = "a swamp dragon") : base( - name, - 0x31A, - 0x3EBD, - AIType.AI_Melee, - FightMode.Aggressor, - 10, - 1, - 0.2, - 0.4 - ) + public SwampDragon(string name = "a swamp dragon") : base(name, 0x31A, 0x3EBD, AIType.AI_Melee, FightMode.Aggressor) { BaseSoundID = 0x16A; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Unicorn.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Unicorn.cs index 12bd1434c..23b101675 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Unicorn.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Unicorn.cs @@ -7,7 +7,7 @@ namespace Server.Mobiles public class Unicorn : BaseMount { [Constructible] - public Unicorn(string name = "a unicorn") : base(name, 0x7A, 0x3EB4, AIType.AI_Mage, FightMode.Evil, 10, 1) + public Unicorn(string name = "a unicorn") : base(name, 0x7A, 0x3EB4, AIType.AI_Mage, FightMode.Evil) { BaseSoundID = 0x4BC; @@ -87,8 +87,8 @@ namespace Server.Mobiles if (chanceToCure > Utility.Random(100)) { - if (Rider.CurePoison(this) - ) // TODO: Confirm if mount is the one flagged for curing it or the rider is + // TODO: Confirm if mount is the one flagged for curing it or the rider is + if (Rider.CurePoison(this)) { Rider.LocalOverheadMessage( MessageType.Regular, diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/BaseWarHorse.cs b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/BaseWarHorse.cs index 5c32ee070..26d9d646c 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/BaseWarHorse.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/BaseWarHorse.cs @@ -3,8 +3,8 @@ namespace Server.Mobiles public abstract class BaseWarHorse : BaseMount { public BaseWarHorse( - int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, - double activeSpeed = -1, double passiveSpeed = -1 + int bodyID, int itemID, AIType aiType = AIType.AI_Melee, FightMode fightMode = FightMode.Aggressor, + int rangePerception = 10, int rangeFight = 1 ) : base( "a war horse", bodyID, @@ -12,9 +12,7 @@ namespace Server.Mobiles aiType, fightMode, rangePerception, - rangeFight, - activeSpeed, - passiveSpeed + rangeFight ) { BaseSoundID = 0xA8; diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/CoMWarHorse.cs b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/CoMWarHorse.cs index 302d98f3c..c8d6c98ff 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/CoMWarHorse.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/CoMWarHorse.cs @@ -3,7 +3,7 @@ namespace Server.Mobiles public class CoMWarHorse : BaseWarHorse { [Constructible] - public CoMWarHorse() : base(0x77, 0x3EB1, AIType.AI_Melee, FightMode.Aggressor, 10, 1) + public CoMWarHorse() : base(0x77, 0x3EB1) { } diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/MinaxWarHorse.cs b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/MinaxWarHorse.cs index eb42361c9..f05d4cf06 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/MinaxWarHorse.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/MinaxWarHorse.cs @@ -3,7 +3,7 @@ namespace Server.Mobiles public class MinaxWarHorse : BaseWarHorse { [Constructible] - public MinaxWarHorse() : base(0x78, 0x3EAF, AIType.AI_Melee, FightMode.Aggressor, 10, 1) + public MinaxWarHorse() : base(0x78, 0x3EAF) { } diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/SLWarHorse.cs b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/SLWarHorse.cs index 037a671c5..14418a816 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/SLWarHorse.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/SLWarHorse.cs @@ -3,7 +3,7 @@ namespace Server.Mobiles public class SLWarHorse : BaseWarHorse { [Constructible] - public SLWarHorse() : base(0x79, 0x3EB0, AIType.AI_Melee, FightMode.Aggressor, 10, 1) + public SLWarHorse() : base(0x79, 0x3EB0) { } diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/TBWarHorse.cs b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/TBWarHorse.cs index ac65a8186..d3fd30dbe 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/TBWarHorse.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/War Horses/TBWarHorse.cs @@ -3,7 +3,7 @@ namespace Server.Mobiles public class TBWarHorse : BaseWarHorse { [Constructible] - public TBWarHorse() : base(0x76, 0x3EB2, AIType.AI_Melee, FightMode.Aggressor, 10, 1) + public TBWarHorse() : base(0x76, 0x3EB2) { } diff --git a/Projects/UOContent/Mobiles/BaseCreature.cs b/Projects/UOContent/Mobiles/BaseCreature.cs index 302f14043..c80a70bf2 100644 --- a/Projects/UOContent/Mobiles/BaseCreature.cs +++ b/Projects/UOContent/Mobiles/BaseCreature.cs @@ -324,9 +324,10 @@ namespace Server.Mobiles AIType ai, FightMode mode = FightMode.Closest, int iRangePerception = 10, - int iRangeFight = 1, - double activeSpeed = -1, - double passiveSpeed = -1 + int iRangeFight = 1 + // , + // double activeSpeed = 0, + // double passiveSpeed = 0 ) { if (iRangePerception == OldRangePerception) @@ -344,18 +345,18 @@ namespace Server.Mobiles FightMode = mode; - m_Team = 0; + // if (activeSpeed > 0 && passiveSpeed > 0) + // { + // ActiveSpeed = activeSpeed; + // PassiveSpeed = passiveSpeed; + // CurrentSpeed = passiveSpeed; + // } + // else + // { + // CurrentSpeed = SpeedInfo.MaxMonsterDelay * 2; + // } - if (passiveSpeed < 0 || activeSpeed < 0) - { - ResetSpeeds(); - } - else - { - ActiveSpeed = activeSpeed; - PassiveSpeed = passiveSpeed; - CurrentSpeed = passiveSpeed; - } + m_Team = 0; Debug = false; @@ -685,16 +686,23 @@ namespace Server.Mobiles [CommandProperty(AccessLevel.GameMaster)] public double PassiveSpeed { get; set; } + [CommandProperty(AccessLevel.GameMaster)] + public double SpeedMod { get; set; } + [CommandProperty(AccessLevel.GameMaster)] public double CurrentSpeed { - get => TargetLocation != null ? 0.3 : m_CurrentSpeed; + get => TargetLocation != null ? 0.3 : SpeedMod <= 0 ? m_CurrentSpeed : SpeedMod; set { if (m_CurrentSpeed != value) { m_CurrentSpeed = value; - AIObject?.OnCurrentSpeedChanged(); + + if (SpeedMod <= 0) + { + AIObject?.OnCurrentSpeedChanged(); + } } } } @@ -1370,6 +1378,14 @@ namespace Server.Mobiles } } + public override void OnRawDexChange(int oldValue) + { + if (oldValue != RawDex && ActiveSpeed <= 0 && PassiveSpeed <= 0) + { + ResetSpeeds(); + } + } + public override void OnBeforeSpawn(Point3D location, Map m) { if (Paragon.CheckConvert(this, location, m)) @@ -2573,7 +2589,6 @@ namespace Server.Mobiles if (m_IdleReleaseTime > DateTime.MinValue) { // idling... - if (Core.Now >= m_IdleReleaseTime) { m_IdleReleaseTime = DateTime.MinValue; @@ -3000,11 +3015,12 @@ namespace Server.Mobiles return null; } - public virtual bool IsMonster => - !Controlled || GetMaster() is not BaseCreature { Controlled: true }; + public virtual bool IsMonster => !Controlled || (GetMaster() as BaseCreature)?.IsMonster == true; public bool InActivePVPCombat() => - Combatant is PlayerMobile && ControlOrder != OrderType.Follow; + ControlOrder != OrderType.Follow && + Combatant is PlayerMobile || + Combatant is BaseCreature { Controlled: true } bc && bc.GetMaster() is PlayerMobile; public static List GetLootingRights(List damageEntries, int hitsMax) { @@ -3382,6 +3398,8 @@ namespace Server.Mobiles ControlOrder = OrderType.None; Guild = null; + ResetSpeeds(); + Delta(MobileDelta.Noto); } else @@ -3414,6 +3432,8 @@ namespace Server.Mobiles m_DeleteTimer = null; } + ResetSpeeds(true); + Delta(MobileDelta.Noto); } @@ -4561,6 +4581,13 @@ namespace Server.Mobiles return false; } + public void SetSpeed(double active, double passive) + { + ActiveSpeed = active; + PassiveSpeed = passive; + CurrentSpeed = PassiveSpeed; + } + public void SetDamage(int val) { m_DamageMin = val; @@ -4840,8 +4867,7 @@ namespace Server.Mobiles } } - // Reset speeds based on dex. Mainly used during construction and pet commands - public void ResetSpeeds(bool currentUseActive = false) + public virtual void ResetSpeeds(bool currentUseActive = false) { SpeedInfo.GetSpeeds(this, out var activeSpeed, out var passiveSpeed); diff --git a/Projects/UOContent/Mobiles/Monsters/AOS/Revenant.cs b/Projects/UOContent/Mobiles/Monsters/AOS/Revenant.cs index 5ce83b7e4..72517630f 100644 --- a/Projects/UOContent/Mobiles/Monsters/AOS/Revenant.cs +++ b/Projects/UOContent/Mobiles/Monsters/AOS/Revenant.cs @@ -8,14 +8,7 @@ namespace Server.Mobiles private readonly DateTime m_ExpireTime; private readonly Mobile m_Target; - public Revenant(Mobile caster, Mobile target, TimeSpan duration) : base( - AIType.AI_Melee, - FightMode.Closest, - 10, - 1, - 0.18, - 0.36 - ) + public Revenant(Mobile caster, Mobile target, TimeSpan duration) : base(AIType.AI_Melee) { Body = 400; Hue = 1; @@ -26,6 +19,8 @@ namespace Server.Mobiles m_Target = target; m_ExpireTime = Core.Now + duration; + SetSpeed(0.25, 0.55); + SetStr(200); SetDex(150); SetInt(150); diff --git a/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/KhaldunRevenant.cs b/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/KhaldunRevenant.cs index fe00b9402..02210c9f1 100644 --- a/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/KhaldunRevenant.cs +++ b/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/KhaldunRevenant.cs @@ -11,7 +11,7 @@ namespace Server.Mobiles private readonly Mobile m_Target; - public KhaldunRevenant(Mobile target) : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.175, 0.35) + public KhaldunRevenant(Mobile target) : base(AIType.AI_Melee) { Body = 0x3CA; Hue = 0x41CE; @@ -19,6 +19,8 @@ namespace Server.Mobiles m_Target = target; m_ExpireTime = Core.Now + TimeSpan.FromMinutes(10.0); + SetSpeed(0.25, 0.55); + SetStr(401, 500); SetDex(296, 315); SetInt(101, 200); diff --git a/Projects/UOContent/Mobiles/Monsters/LBR/Jukas/ChaosDragoon.cs b/Projects/UOContent/Mobiles/Monsters/LBR/Jukas/ChaosDragoon.cs index c139720cb..26eeb161c 100644 --- a/Projects/UOContent/Mobiles/Monsters/LBR/Jukas/ChaosDragoon.cs +++ b/Projects/UOContent/Mobiles/Monsters/LBR/Jukas/ChaosDragoon.cs @@ -5,11 +5,13 @@ namespace Server.Mobiles public class ChaosDragoon : BaseCreature { [Constructible] - public ChaosDragoon() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.15, 0.4) + public ChaosDragoon() : base(AIType.AI_Melee) { Body = 0x190; Hue = Race.Human.RandomSkinHue(); + SetSpeed(0.25, 0.55); + SetStr(176, 225); SetDex(81, 95); SetInt(61, 85); diff --git a/Projects/UOContent/Mobiles/Monsters/LBR/Jukas/ChaosDragoonElite.cs b/Projects/UOContent/Mobiles/Monsters/LBR/Jukas/ChaosDragoonElite.cs index 839f9b117..fea4c1383 100644 --- a/Projects/UOContent/Mobiles/Monsters/LBR/Jukas/ChaosDragoonElite.cs +++ b/Projects/UOContent/Mobiles/Monsters/LBR/Jukas/ChaosDragoonElite.cs @@ -5,12 +5,13 @@ namespace Server.Mobiles public class ChaosDragoonElite : BaseCreature { [Constructible] - public ChaosDragoonElite() - : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.15, 0.4) + public ChaosDragoonElite() : base(AIType.AI_Mage) { Body = 0x190; Hue = Race.Human.RandomSkinHue(); + SetSpeed(0.25, 0.55); + SetStr(276, 350); SetDex(66, 90); SetInt(126, 150); diff --git a/Projects/UOContent/Mobiles/Monsters/ML/Humanoid/Melee/CorruptedSoul.cs b/Projects/UOContent/Mobiles/Monsters/ML/Humanoid/Melee/CorruptedSoul.cs index 5fe6bb7b5..a65b126d8 100644 --- a/Projects/UOContent/Mobiles/Monsters/ML/Humanoid/Melee/CorruptedSoul.cs +++ b/Projects/UOContent/Mobiles/Monsters/ML/Humanoid/Melee/CorruptedSoul.cs @@ -3,11 +3,13 @@ namespace Server.Mobiles public class CorruptedSoul : BaseCreature { [Constructible] - public CorruptedSoul() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.1, 5) + public CorruptedSoul() : base(AIType.AI_Melee) { Body = 0x3CA; Hue = 0x453; + SetSpeed(0.25, 5); + SetStr(102, 115); SetDex(101, 115); SetInt(203, 215); diff --git a/Projects/UOContent/Mobiles/Monsters/ML/Labyrinth/Miasma.cs b/Projects/UOContent/Mobiles/Monsters/ML/Labyrinth/Miasma.cs index ab70964d3..2e8ba905c 100644 --- a/Projects/UOContent/Mobiles/Monsters/ML/Labyrinth/Miasma.cs +++ b/Projects/UOContent/Mobiles/Monsters/ML/Labyrinth/Miasma.cs @@ -11,6 +11,8 @@ namespace Server.Mobiles Hue = 0x8FD; + SetSpeed(0.1, 0.6); + SetStr(255, 847); SetDex(145, 428); SetInt(26, 380); @@ -44,7 +46,7 @@ namespace Server.Mobiles public override void OnDeath( Container c ) { base.OnDeath( c ); - + if (Utility.RandomDouble() < 0.025) { switch ( Utility.Random( 16 ) ) diff --git a/Projects/UOContent/Mobiles/Monsters/ML/Misc/Melee/Reptalon.cs b/Projects/UOContent/Mobiles/Monsters/ML/Misc/Melee/Reptalon.cs index 20c23967d..e057936ce 100644 --- a/Projects/UOContent/Mobiles/Monsters/ML/Misc/Melee/Reptalon.cs +++ b/Projects/UOContent/Mobiles/Monsters/ML/Misc/Melee/Reptalon.cs @@ -5,10 +5,12 @@ namespace Server.Mobiles public class Reptalon : BaseMount { [Constructible] - public Reptalon() : base("a reptalon", 0x114, 0x3E90, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.35) + public Reptalon() : base("a reptalon", 0x114, 0x3E90, AIType.AI_Melee) { BaseSoundID = 0x16A; + SetSpeed(0.25, 0.55); + SetStr(1001, 1025); SetDex(152, 164); SetInt(251, 289); diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs index b88b25c73..6e8025f81 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs @@ -5,7 +5,7 @@ namespace Server.Mobiles public class ShadowWisp : BaseCreature { [Constructible] - public ShadowWisp() : base(AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.25, 0.5) + public ShadowWisp() : base(AIType.AI_Mage, FightMode.Aggressor) { Body = 165; BaseSoundID = 466; diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/AnimatedWeapon.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/AnimatedWeapon.cs index dc3d09d98..47844cae7 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/AnimatedWeapon.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/AnimatedWeapon.cs @@ -5,8 +5,7 @@ namespace Server.Mobiles public class AnimatedWeapon : BaseCreature { [Constructible] - public AnimatedWeapon(Mobile caster, int level) - : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6) + public AnimatedWeapon(Mobile caster, int level) : base(AIType.AI_Melee) { Body = 692; diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs index bcd9ed8ba..710c5420c 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs @@ -6,11 +6,11 @@ namespace Server.Mobiles public class BladeSpirits : BaseCreature { [Constructible] - public BladeSpirits() - : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6) + public BladeSpirits() : base(AIType.AI_Melee) { Body = 574; + SetSpeed(0.6, 1.25); SetStr(150); SetDex(150); SetInt(100); diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/Golem.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/Golem.cs index 46f1a0535..7dc6ffe5c 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/Golem.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/Golem.cs @@ -9,7 +9,7 @@ namespace Server.Mobiles private bool m_Stunning; [Constructible] - public Golem(bool summoned = false, double scalar = 1.0) : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.4, 0.8) + public Golem(bool summoned = false, double scalar = 1.0) : base(AIType.AI_Melee) { Body = 752; @@ -18,6 +18,8 @@ namespace Server.Mobiles Hue = 2101; } + SetSpeed(0.9, 1.5); + SetStr((int)(251 * scalar), (int)(350 * scalar)); SetDex((int)(76 * scalar), (int)(100 * scalar)); SetInt((int)(101 * scalar), (int)(150 * scalar)); diff --git a/Projects/UOContent/Mobiles/Monsters/Plant/Melee/BogThing.cs b/Projects/UOContent/Mobiles/Monsters/Plant/Melee/BogThing.cs index 5a05f47f6..b2b1cbc93 100644 --- a/Projects/UOContent/Mobiles/Monsters/Plant/Melee/BogThing.cs +++ b/Projects/UOContent/Mobiles/Monsters/Plant/Melee/BogThing.cs @@ -6,7 +6,7 @@ namespace Server.Mobiles public class BogThing : BaseCreature { [Constructible] - public BogThing() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6) + public BogThing() : base(AIType.AI_Melee) { Body = 780; diff --git a/Projects/UOContent/Mobiles/Monsters/Plant/Melee/Quagmire.cs b/Projects/UOContent/Mobiles/Monsters/Plant/Melee/Quagmire.cs index b551b7d3f..42ab21e28 100644 --- a/Projects/UOContent/Mobiles/Monsters/Plant/Melee/Quagmire.cs +++ b/Projects/UOContent/Mobiles/Monsters/Plant/Melee/Quagmire.cs @@ -3,7 +3,7 @@ namespace Server.Mobiles public class Quagmire : BaseCreature { [Constructible] - public Quagmire() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6) + public Quagmire() : base(AIType.AI_Melee) { Body = 789; BaseSoundID = 352; diff --git a/Projects/UOContent/Mobiles/Monsters/SE/DeathWatchBeetleHatchling.cs b/Projects/UOContent/Mobiles/Monsters/SE/DeathWatchBeetleHatchling.cs index 07033c5c6..83302820e 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/DeathWatchBeetleHatchling.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/DeathWatchBeetleHatchling.cs @@ -6,14 +6,7 @@ namespace Server.Mobiles public class DeathwatchBeetleHatchling : BaseCreature { [Constructible] - public DeathwatchBeetleHatchling() : base( - AIType.AI_Melee, - Core.ML ? FightMode.Aggressor : FightMode.Closest, - 10, - 1, - 0.2, - 0.4 - ) + public DeathwatchBeetleHatchling() : base(AIType.AI_Melee, Core.ML ? FightMode.Aggressor : FightMode.Closest) { Body = 242; diff --git a/Projects/UOContent/Mobiles/Special/BaseChampion.cs b/Projects/UOContent/Mobiles/Special/BaseChampion.cs index 732016313..4983292da 100644 --- a/Projects/UOContent/Mobiles/Special/BaseChampion.cs +++ b/Projects/UOContent/Mobiles/Special/BaseChampion.cs @@ -7,8 +7,9 @@ namespace Server.Mobiles { public abstract class BaseChampion : BaseCreature { - public BaseChampion(AIType aiType, FightMode mode = FightMode.Closest) : base(aiType, mode, 18, 1, 0.1, 0.2) + public BaseChampion(AIType aiType, FightMode mode = FightMode.Closest) : base(aiType, mode, 18) { + SetSpeed(0.25, 0.55); } public BaseChampion(Serial serial) : base(serial) diff --git a/Projects/UOContent/Mobiles/Special/Dummy.cs b/Projects/UOContent/Mobiles/Special/Dummy.cs deleted file mode 100644 index c56d03f61..000000000 --- a/Projects/UOContent/Mobiles/Special/Dummy.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using Server.Items; - -namespace Server.Mobiles -{ - /// - /// This is a test creature - /// You can set its value in game - /// It die after 5 minutes, so your test server stay clean - /// Create a macro to help your creation "[add Dummy 1 15 7 -1 0.5 2" - /// A iTeam of negative will set a faction at random - /// Say Kill if you want them to die - /// - public class Dummy : BaseCreature - { - public Timer m_Timer; - - [Constructible] - public Dummy( - AIType iAI, FightMode iFightMode, int iRangePerception, int iRangeFight, double dActiveSpeed, - double dPassiveSpeed - ) : base(iAI, iFightMode, iRangePerception, iRangeFight, dActiveSpeed, dPassiveSpeed) - { - Body = 400 + Utility.Random(2); - Hue = Race.Human.RandomSkinHue(); - - Skills.DetectHidden.Base = 100; - Skills.MagicResist.Base = 120; - - Team = Utility.Random(3); - - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - Utility.AssignRandomHair(this, iHue); - - var glv = new LeatherGloves(); - glv.Hue = iHue; - glv.LootType = LootType.Newbied; - AddItem(glv); - - Container pack = new Backpack(); - - pack.Movable = false; - - AddItem(pack); - - m_Timer = new AutokillTimer(this); - m_Timer.Start(); - } - - public Dummy(Serial serial) : base(serial) - { - m_Timer = new AutokillTimer(this); - m_Timer.Start(); - } - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - - public override bool HandlesOnSpeech(Mobile from) - { - if (from.AccessLevel >= AccessLevel.GameMaster) - { - return true; - } - - return base.HandlesOnSpeech(from); - } - - public override void OnSpeech(SpeechEventArgs e) - { - base.OnSpeech(e); - - if (e.Mobile.AccessLevel >= AccessLevel.GameMaster) - { - if (e.Speech == "kill") - { - m_Timer.Stop(); - m_Timer.Delay = TimeSpan.FromSeconds(Utility.Random(1, 5)); - m_Timer.Start(); - } - } - } - - public override void OnTeamChange() - { - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - var item = FindItemOnLayer(Layer.OuterTorso); - - if (item != null) - { - item.Hue = jHue; - } - - item = FindItemOnLayer(Layer.Helm); - - if (item != null) - { - item.Hue = iHue; - } - - item = FindItemOnLayer(Layer.Gloves); - - if (item != null) - { - item.Hue = iHue; - } - - item = FindItemOnLayer(Layer.Shoes); - - if (item != null) - { - item.Hue = iHue; - } - - HairHue = iHue; - - item = FindItemOnLayer(Layer.MiddleTorso); - - if (item != null) - { - item.Hue = iHue; - } - - item = FindItemOnLayer(Layer.OuterLegs); - - if (item != null) - { - item.Hue = iHue; - } - } - - private class AutokillTimer : Timer - { - private readonly Dummy m_Owner; - - public AutokillTimer(Dummy owner) : base(TimeSpan.FromMinutes(5.0)) - { - m_Owner = owner; - } - - protected override void OnTick() - { - m_Owner.Kill(); - Stop(); - } - } - } -} diff --git a/Projects/UOContent/Mobiles/Special/DummySpecific.cs b/Projects/UOContent/Mobiles/Special/DummySpecific.cs deleted file mode 100644 index 560de2b43..000000000 --- a/Projects/UOContent/Mobiles/Special/DummySpecific.cs +++ /dev/null @@ -1,784 +0,0 @@ -using Server.Items; -using Server.Spells.First; -using Server.Spells.Third; - -namespace Server.Mobiles -{ - /// - /// This is a test creature - /// You can set its value in game - /// It die after 5 minutes, so your test server stay clean - /// Create a macro to help your creation "[add Dummy 1 15 7 -1 0.5 2" - /// A iTeam of negative will set a faction at random - /// Say Kill if you want them to die - /// - public class DummyMace : Dummy - { - [Constructible] - public DummyMace() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Macer - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(125, 125, 90); - Skills.Macing.Base = 120; - Skills.Anatomy.Base = 120; - Skills.Healing.Base = 120; - Skills.Tactics.Base = 120; - - // Equip - var war = new WarHammer(); - war.Movable = true; - war.Crafter = this; - war.Quality = WeaponQuality.Regular; - AddItem(war); - - var bts = new Boots(); - bts.Hue = iHue; - AddItem(bts); - - var cht = new ChainChest(); - cht.Movable = false; - cht.LootType = LootType.Newbied; - cht.Crafter = RawName; - cht.Quality = ArmorQuality.Regular; - AddItem(cht); - - var chl = new ChainLegs(); - chl.Movable = false; - chl.LootType = LootType.Newbied; - chl.Crafter = RawName; - chl.Quality = ArmorQuality.Regular; - AddItem(chl); - - var pla = new PlateArms(); - pla.Movable = false; - pla.LootType = LootType.Newbied; - pla.Crafter = RawName; - pla.Quality = ArmorQuality.Regular; - AddItem(pla); - - var band = new Bandage(50); - AddToBackpack(band); - } - - public DummyMace(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Macer"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } - - public class DummyFence : Dummy - { - [Constructible] - public DummyFence() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Fencer - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(125, 125, 90); - Skills.Fencing.Base = 120; - Skills.Anatomy.Base = 120; - Skills.Healing.Base = 120; - Skills.Tactics.Base = 120; - - // Equip - var ssp = new Spear(); - ssp.Movable = true; - ssp.Crafter = this; - ssp.Quality = WeaponQuality.Regular; - AddItem(ssp); - - var snd = new Boots(); - snd.Hue = iHue; - snd.LootType = LootType.Newbied; - AddItem(snd); - - var cht = new ChainChest(); - cht.Movable = false; - cht.LootType = LootType.Newbied; - cht.Crafter = RawName; - cht.Quality = ArmorQuality.Regular; - AddItem(cht); - - var chl = new ChainLegs(); - chl.Movable = false; - chl.LootType = LootType.Newbied; - chl.Crafter = RawName; - chl.Quality = ArmorQuality.Regular; - AddItem(chl); - - var pla = new PlateArms(); - pla.Movable = false; - pla.LootType = LootType.Newbied; - pla.Crafter = RawName; - pla.Quality = ArmorQuality.Regular; - AddItem(pla); - - var band = new Bandage(50); - AddToBackpack(band); - } - - public DummyFence(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Fencer"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } - - public class DummySword : Dummy - { - [Constructible] - public DummySword() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Swordsman - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(125, 125, 90); - Skills.Swords.Base = 120; - Skills.Anatomy.Base = 120; - Skills.Healing.Base = 120; - Skills.Tactics.Base = 120; - Skills.Parry.Base = 120; - - // Equip - var kat = new Katana(); - kat.Crafter = this; - kat.Movable = true; - kat.Quality = WeaponQuality.Regular; - AddItem(kat); - - var bts = new Boots(); - bts.Hue = iHue; - AddItem(bts); - - var cht = new ChainChest(); - cht.Movable = false; - cht.LootType = LootType.Newbied; - cht.Crafter = RawName; - cht.Quality = ArmorQuality.Regular; - AddItem(cht); - - var chl = new ChainLegs(); - chl.Movable = false; - chl.LootType = LootType.Newbied; - chl.Crafter = RawName; - chl.Quality = ArmorQuality.Regular; - AddItem(chl); - - var pla = new PlateArms(); - pla.Movable = false; - pla.LootType = LootType.Newbied; - pla.Crafter = RawName; - pla.Quality = ArmorQuality.Regular; - AddItem(pla); - - var band = new Bandage(50); - AddToBackpack(band); - } - - public DummySword(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Swordsman"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } - - public class DummyNox : Dummy - { - [Constructible] - public DummyNox() : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Nox or Pure Mage - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(90, 90, 125); - Skills.Magery.Base = 120; - Skills.EvalInt.Base = 120; - Skills.Inscribe.Base = 100; - Skills.Wrestling.Base = 120; - Skills.Meditation.Base = 120; - Skills.Poisoning.Base = 100; - - // Equip - var book = new Spellbook(); - book.Movable = false; - book.LootType = LootType.Newbied; - book.Content = 0xFFFFFFFFFFFFFFFF; - AddItem(book); - - var kilt = new Kilt(); - kilt.Hue = jHue; - AddItem(kilt); - - var snd = new Sandals(); - snd.Hue = iHue; - snd.LootType = LootType.Newbied; - AddItem(snd); - - var skc = new SkullCap(); - skc.Hue = iHue; - AddItem(skc); - - // Spells - AddSpellAttack(typeof(MagicArrowSpell)); - AddSpellAttack(typeof(WeakenSpell)); - AddSpellAttack(typeof(FireballSpell)); - AddSpellDefense(typeof(WallOfStoneSpell)); - AddSpellDefense(typeof(HealSpell)); - } - - public DummyNox(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Nox Mage"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } - - public class DummyStun : Dummy - { - [Constructible] - public DummyStun() : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Stun Mage - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(90, 90, 125); - Skills.Magery.Base = 100; - Skills.EvalInt.Base = 120; - Skills.Anatomy.Base = 80; - Skills.Wrestling.Base = 80; - Skills.Meditation.Base = 100; - Skills.Poisoning.Base = 100; - - // Equip - var book = new Spellbook(); - book.Movable = false; - book.LootType = LootType.Newbied; - book.Content = 0xFFFFFFFFFFFFFFFF; - AddItem(book); - - var lea = new LeatherArms(); - lea.Movable = false; - lea.LootType = LootType.Newbied; - lea.Crafter = RawName; - lea.Quality = ArmorQuality.Regular; - AddItem(lea); - - var lec = new LeatherChest(); - lec.Movable = false; - lec.LootType = LootType.Newbied; - lec.Crafter = RawName; - lec.Quality = ArmorQuality.Regular; - AddItem(lec); - - var leg = new LeatherGorget(); - leg.Movable = false; - leg.LootType = LootType.Newbied; - leg.Crafter = RawName; - leg.Quality = ArmorQuality.Regular; - AddItem(leg); - - var lel = new LeatherLegs(); - lel.Movable = false; - lel.LootType = LootType.Newbied; - lel.Crafter = RawName; - lel.Quality = ArmorQuality.Regular; - AddItem(lel); - - var bts = new Boots(); - bts.Hue = iHue; - AddItem(bts); - - var cap = new Cap(); - cap.Hue = iHue; - AddItem(cap); - - // Spells - AddSpellAttack(typeof(MagicArrowSpell)); - AddSpellAttack(typeof(WeakenSpell)); - AddSpellAttack(typeof(FireballSpell)); - AddSpellDefense(typeof(WallOfStoneSpell)); - AddSpellDefense(typeof(HealSpell)); - } - - public DummyStun(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Stun Mage"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } - - public class DummySuper : Dummy - { - [Constructible] - public DummySuper() : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Super Mage - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(125, 125, 125); - Skills.Magery.Base = 120; - Skills.EvalInt.Base = 120; - Skills.Anatomy.Base = 120; - Skills.Wrestling.Base = 120; - Skills.Meditation.Base = 120; - Skills.Poisoning.Base = 100; - Skills.Inscribe.Base = 100; - - // Equip - var book = new Spellbook(); - book.Movable = false; - book.LootType = LootType.Newbied; - book.Content = 0xFFFFFFFFFFFFFFFF; - AddItem(book); - - var lea = new LeatherArms(); - lea.Movable = false; - lea.LootType = LootType.Newbied; - lea.Crafter = RawName; - lea.Quality = ArmorQuality.Regular; - AddItem(lea); - - var lec = new LeatherChest(); - lec.Movable = false; - lec.LootType = LootType.Newbied; - lec.Crafter = RawName; - lec.Quality = ArmorQuality.Regular; - AddItem(lec); - - var leg = new LeatherGorget(); - leg.Movable = false; - leg.LootType = LootType.Newbied; - leg.Crafter = RawName; - leg.Quality = ArmorQuality.Regular; - AddItem(leg); - - var lel = new LeatherLegs(); - lel.Movable = false; - lel.LootType = LootType.Newbied; - lel.Crafter = RawName; - lel.Quality = ArmorQuality.Regular; - AddItem(lel); - - var snd = new Sandals(); - snd.Hue = iHue; - snd.LootType = LootType.Newbied; - AddItem(snd); - - var jhat = new JesterHat(); - jhat.Hue = iHue; - AddItem(jhat); - - var dblt = new Doublet(); - dblt.Hue = iHue; - AddItem(dblt); - - // Spells - AddSpellAttack(typeof(MagicArrowSpell)); - AddSpellAttack(typeof(WeakenSpell)); - AddSpellAttack(typeof(FireballSpell)); - AddSpellDefense(typeof(WallOfStoneSpell)); - AddSpellDefense(typeof(HealSpell)); - } - - public DummySuper(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Super Mage"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } - - public class DummyHealer : Dummy - { - [Constructible] - public DummyHealer() : base(AIType.AI_Healer, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Healer Mage - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(125, 125, 125); - Skills.Magery.Base = 120; - Skills.EvalInt.Base = 120; - Skills.Anatomy.Base = 120; - Skills.Wrestling.Base = 120; - Skills.Meditation.Base = 120; - Skills.Healing.Base = 100; - - // Equip - var book = new Spellbook(); - book.Movable = false; - book.LootType = LootType.Newbied; - book.Content = 0xFFFFFFFFFFFFFFFF; - AddItem(book); - - var lea = new LeatherArms(); - lea.Movable = false; - lea.LootType = LootType.Newbied; - lea.Crafter = RawName; - lea.Quality = ArmorQuality.Regular; - AddItem(lea); - - var lec = new LeatherChest(); - lec.Movable = false; - lec.LootType = LootType.Newbied; - lec.Crafter = RawName; - lec.Quality = ArmorQuality.Regular; - AddItem(lec); - - var leg = new LeatherGorget(); - leg.Movable = false; - leg.LootType = LootType.Newbied; - leg.Crafter = RawName; - leg.Quality = ArmorQuality.Regular; - AddItem(leg); - - var lel = new LeatherLegs(); - lel.Movable = false; - lel.LootType = LootType.Newbied; - lel.Crafter = RawName; - lel.Quality = ArmorQuality.Regular; - AddItem(lel); - - var snd = new Sandals(); - snd.Hue = iHue; - snd.LootType = LootType.Newbied; - AddItem(snd); - - var cap = new Cap(); - cap.Hue = iHue; - AddItem(cap); - - var robe = new Robe(); - robe.Hue = iHue; - AddItem(robe); - } - - public DummyHealer(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Healer"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } - - public class DummyAssassin : Dummy - { - [Constructible] - public DummyAssassin() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Hybrid Assassin - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(105, 105, 105); - Skills.Magery.Base = 120; - Skills.EvalInt.Base = 120; - Skills.Swords.Base = 120; - Skills.Tactics.Base = 120; - Skills.Meditation.Base = 120; - Skills.Poisoning.Base = 100; - - // Equip - var book = new Spellbook(); - book.Movable = false; - book.LootType = LootType.Newbied; - book.Content = 0xFFFFFFFFFFFFFFFF; - AddToBackpack(book); - - var kat = new Katana(); - kat.Movable = false; - kat.LootType = LootType.Newbied; - kat.Crafter = this; - kat.Poison = Poison.Deadly; - kat.PoisonCharges = 12; - kat.Quality = WeaponQuality.Regular; - AddToBackpack(kat); - - var lea = new LeatherArms(); - lea.Movable = false; - lea.LootType = LootType.Newbied; - lea.Crafter = RawName; - lea.Quality = ArmorQuality.Regular; - AddItem(lea); - - var lec = new LeatherChest(); - lec.Movable = false; - lec.LootType = LootType.Newbied; - lec.Crafter = RawName; - lec.Quality = ArmorQuality.Regular; - AddItem(lec); - - var leg = new LeatherGorget(); - leg.Movable = false; - leg.LootType = LootType.Newbied; - leg.Crafter = RawName; - leg.Quality = ArmorQuality.Regular; - AddItem(leg); - - var lel = new LeatherLegs(); - lel.Movable = false; - lel.LootType = LootType.Newbied; - lel.Crafter = RawName; - lel.Quality = ArmorQuality.Regular; - AddItem(lel); - - var snd = new Sandals(); - snd.Hue = iHue; - snd.LootType = LootType.Newbied; - AddItem(snd); - - var cap = new Cap(); - cap.Hue = iHue; - AddItem(cap); - - var robe = new Robe(); - robe.Hue = iHue; - AddItem(robe); - - var pota = new DeadlyPoisonPotion(); - pota.LootType = LootType.Newbied; - AddToBackpack(pota); - - var potb = new DeadlyPoisonPotion(); - potb.LootType = LootType.Newbied; - AddToBackpack(potb); - - var potc = new DeadlyPoisonPotion(); - potc.LootType = LootType.Newbied; - AddToBackpack(potc); - - var potd = new DeadlyPoisonPotion(); - potd.LootType = LootType.Newbied; - AddToBackpack(potd); - - var band = new Bandage(50); - AddToBackpack(band); - } - - public DummyAssassin(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Hybrid Assassin"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } - - [TypeAlias("Server.Mobiles.DummyTheif")] - public class DummyThief : Dummy - { - [Constructible] - public DummyThief() : base(AIType.AI_Thief, FightMode.Closest, 15, 1, 0.2, 0.6) - { - // A Dummy Hybrid Thief - var iHue = 20 + Team * 40; - var jHue = 25 + Team * 40; - - // Skills and Stats - InitStats(105, 105, 105); - Skills.Healing.Base = 120; - Skills.Anatomy.Base = 120; - Skills.Stealing.Base = 120; - Skills.ArmsLore.Base = 100; - Skills.Meditation.Base = 120; - Skills.Wrestling.Base = 120; - - // Equip - var book = new Spellbook(); - book.Movable = false; - book.LootType = LootType.Newbied; - book.Content = 0xFFFFFFFFFFFFFFFF; - AddItem(book); - - var lea = new LeatherArms(); - lea.Movable = false; - lea.LootType = LootType.Newbied; - lea.Crafter = RawName; - lea.Quality = ArmorQuality.Regular; - AddItem(lea); - - var lec = new LeatherChest(); - lec.Movable = false; - lec.LootType = LootType.Newbied; - lec.Crafter = RawName; - lec.Quality = ArmorQuality.Regular; - AddItem(lec); - - var leg = new LeatherGorget(); - leg.Movable = false; - leg.LootType = LootType.Newbied; - leg.Crafter = RawName; - leg.Quality = ArmorQuality.Regular; - AddItem(leg); - - var lel = new LeatherLegs(); - lel.Movable = false; - lel.LootType = LootType.Newbied; - lel.Crafter = RawName; - lel.Quality = ArmorQuality.Regular; - AddItem(lel); - - var snd = new Sandals(); - snd.Hue = iHue; - snd.LootType = LootType.Newbied; - AddItem(snd); - - var cap = new Cap(); - cap.Hue = iHue; - AddItem(cap); - - var robe = new Robe(); - robe.Hue = iHue; - AddItem(robe); - - var band = new Bandage(50); - AddToBackpack(band); - } - - public DummyThief(Serial serial) : base(serial) - { - } - - public override string DefaultName => "Hybrid Thief"; - - public override void Serialize(IGenericWriter writer) - { - base.Serialize(writer); - - writer.Write(0); // version - } - - public override void Deserialize(IGenericReader reader) - { - base.Deserialize(reader); - - var version = reader.ReadInt(); - } - } -} diff --git a/Projects/UOContent/Mobiles/Special/Mephitis.cs b/Projects/UOContent/Mobiles/Special/Mephitis.cs index f6af38c11..f7bfe79d5 100644 --- a/Projects/UOContent/Mobiles/Special/Mephitis.cs +++ b/Projects/UOContent/Mobiles/Special/Mephitis.cs @@ -12,6 +12,8 @@ namespace Server.Mobiles Body = 173; BaseSoundID = 0x183; + SetSpeed(0.1, 0.6); + SetStr(505, 1000); SetDex(102, 300); SetInt(402, 600); diff --git a/Projects/UOContent/Mobiles/Special/Paragon.cs b/Projects/UOContent/Mobiles/Special/Paragon.cs index feb1c4b84..be9c805e3 100644 --- a/Projects/UOContent/Mobiles/Special/Paragon.cs +++ b/Projects/UOContent/Mobiles/Special/Paragon.cs @@ -6,15 +6,15 @@ namespace Server.Mobiles { public static class Paragon { - public static double ChestChance = .10; // Chance that a paragon will carry a paragon chest - public static double ChocolateIngredientChance = .20; // Chance that a paragon will drop a chocolatiering ingredient + public const double ChestChance = 0.10; // Chance that a paragon will carry a paragon chest + public const double ChocolateIngredientChance = 0.20; // Chance that a paragon will drop a chocolatiering ingredient public static Map[] Maps = { Map.Ilshenar }; - private static readonly TimeSpan FastRegenRate = TimeSpan.FromSeconds(.5); + private static readonly TimeSpan FastRegenRate = TimeSpan.FromSeconds(0.5); private static readonly TimeSpan CPUSaverRate = TimeSpan.FromSeconds(2); public static Type[] Artifacts = @@ -36,15 +36,15 @@ namespace Server.Mobiles public static int Hue = 0x501; // Paragon hue // Buffs - public static double HitsBuff = 5.0; - public static double StrBuff = 1.05; - public static double IntBuff = 1.20; - public static double DexBuff = 1.20; - public static double SkillsBuff = 1.20; - public static double SpeedBuff = 1.20; - public static double FameBuff = 1.40; - public static double KarmaBuff = 1.40; - public static int DamageBuff = 5; + public const double HitsBuff = 5.0; + public const double StrBuff = 1.05; + public const double IntBuff = 1.20; + public const double DexBuff = 1.20; + public const double SkillsBuff = 1.20; + public const double SpeedBuff = 1.20; + public const double FameBuff = 1.40; + public const double KarmaBuff = 1.40; + public const int DamageBuff = 5; public static void Convert(BaseCreature bc) { @@ -186,7 +186,7 @@ namespace Server.Mobiles fame = 32000; } - var chance = 1 / Math.Round(20.0 - fame / 3200); + var chance = 1 / Math.Round(20.0 - fame / 3200.0); return chance > Utility.RandomDouble(); } diff --git a/Projects/UOContent/Mobiles/Special/Semidar.cs b/Projects/UOContent/Mobiles/Special/Semidar.cs index e6092bd43..f2227a90b 100644 --- a/Projects/UOContent/Mobiles/Special/Semidar.cs +++ b/Projects/UOContent/Mobiles/Special/Semidar.cs @@ -12,6 +12,8 @@ namespace Server.Mobiles Body = 174; BaseSoundID = 0x4B0; + SetSpeed(0.1, 0.6); + SetStr(502, 600); SetDex(102, 200); SetInt(601, 750); diff --git a/Projects/UOContent/Mobiles/Special/Silvani.cs b/Projects/UOContent/Mobiles/Special/Silvani.cs index d23bd0221..cdd9c0e75 100644 --- a/Projects/UOContent/Mobiles/Special/Silvani.cs +++ b/Projects/UOContent/Mobiles/Special/Silvani.cs @@ -3,11 +3,13 @@ namespace Server.Mobiles public class Silvani : BaseCreature { [Constructible] - public Silvani() : base(AIType.AI_Mage, FightMode.Evil, 18, 1, 0.1, 0.2) + public Silvani() : base(AIType.AI_Mage, FightMode.Evil, 18) { Body = 176; BaseSoundID = 0x467; + SetSpeed(0.25, 0.55); + SetStr(253, 400); SetDex(157, 850); SetInt(503, 800); diff --git a/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs b/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs index 21dbb152b..e7726c6c8 100644 --- a/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs +++ b/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs @@ -92,9 +92,10 @@ namespace Server.Mobiles private MLQuest m_MLQuest; [Constructible] - public BaseEscortable() - : base(AIType.AI_Melee, FightMode.Aggressor, 22, 1, 0.2, 1.0) + public BaseEscortable() : base(AIType.AI_Melee, FightMode.Aggressor, 22) { + SetSpeed(0.3, 1.0); + InitBody(); InitOutfit(); diff --git a/Projects/UOContent/Mobiles/Vendors/BaseVendor.cs b/Projects/UOContent/Mobiles/Vendors/BaseVendor.cs index 712ba2698..ddd4a87e7 100644 --- a/Projects/UOContent/Mobiles/Vendors/BaseVendor.cs +++ b/Projects/UOContent/Mobiles/Vendors/BaseVendor.cs @@ -52,9 +52,9 @@ namespace Server.Mobiles } } - public BaseVendor(string title = null) - : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2) + public BaseVendor(string title = null) : base(AIType.AI_Vendor, FightMode.None, 2) { + SetSpeed(0.5, 2); LoadSBInfo(); Title = title;