diff --git a/Projects/UOContent/Regions/Custom/NewbieDungeonRegion.cs b/Projects/UOContent/Regions/Custom/NewbieDungeonRegion.cs new file mode 100644 index 000000000..e35406264 --- /dev/null +++ b/Projects/UOContent/Regions/Custom/NewbieDungeonRegion.cs @@ -0,0 +1,44 @@ +using Server; +using Server.Mobiles; + +namespace Server.Regions +{ + public class NewbieDungeonRegion : DungeonRegion + { + public NewbieDungeonRegion(string name, Map map, int priority, params Rectangle3D[] area) + : base(name, map, priority, area) + { + } + public override bool MountsAllowed => false; + public override void OnEnter(Mobile m) + { + base.OnEnter(m); + if (m.Player) + { + m.SendMessage($"You entered {this.Name}."); + m.SendMessage($"Skill gains are accelerated but stop at 80.0 points."); + } + if (m is PlayerMobile player && player.Mounted ) + { + if ( player.Mount is BaseMount ) + { + Server.Custom.AutoStable.StoreMount(player); + } + else + { + BaseMount.Dismount(player); + player.SendMessage("Mounts are not permitted in this Dungeon."); + } + } + } + + public override void OnExit(Mobile m) + { + base.OnExit(m); + if ( m is PlayerMobile player ) + { + Server.Custom.AutoStable.RestoreMount(player); + } + } + } +} diff --git a/Projects/UOContent/Regions/RegionJsonRegistration.cs b/Projects/UOContent/Regions/RegionJsonRegistration.cs index 25e77d628..b2ed36c21 100644 --- a/Projects/UOContent/Regions/RegionJsonRegistration.cs +++ b/Projects/UOContent/Regions/RegionJsonRegistration.cs @@ -66,5 +66,6 @@ public static class RegionJsonRegistration RegionJsonSerializer.Register(); RegionJsonSerializer.Register(); RegionJsonSerializer.Register(); + RegionJsonSerializer.Register(); } } diff --git a/Projects/UOContent/Skills/SkillCheck.cs b/Projects/UOContent/Skills/SkillCheck.cs index 59f8ebb6a..fb7b8b105 100644 --- a/Projects/UOContent/Skills/SkillCheck.cs +++ b/Projects/UOContent/Skills/SkillCheck.cs @@ -2,6 +2,7 @@ using System; using System.Runtime.CompilerServices; using Server.Factions; using Server.Mobiles; +using Server.Regions; namespace Server.Misc; @@ -142,6 +143,11 @@ public static class SkillCheck gc *= 2; } + if (from.Region is NewbieDungeonRegion) + { + gc *= 3.0; + } + if (gc >= Utility.RandomDouble()) { Gain(from, skill); @@ -235,6 +241,12 @@ public static class SkillCheck public static void Gain(Mobile from, Skill skill) { + if (from.Region is NewbieDungeonRegion) + { + if (skill.Base >= 80.0) + return; + } + if (from is BaseCreature { IsDeadPet: true }) { return;