diff --git a/Systems/Mechanic/DifficultyModeSystem.cs b/Systems/Mechanic/DifficultyModeSystem.cs index 01380333c0..d91f77106a 100644 --- a/Systems/Mechanic/DifficultyModeSystem.cs +++ b/Systems/Mechanic/DifficultyModeSystem.cs @@ -440,7 +440,19 @@ namespace CalamityMod.Systems { if (Main.getGoodWorld) { - Main.GameMode = GameModeID.Master; + if (!Main.GameModeInfo.IsJourneyMode) + { + Main.GameMode = value == true ? GameModeID.Master : GameModeID.Expert; + } + else + { + CreativePowers.DifficultySliderPower power = CreativePowerManager.Instance.GetPower(); + if (power.GetIsUnlocked()) + { + DifficultyModeSystem.journeySliderCacheField.SetValue(power, value == true ? 1f : 0.66f); + DifficultyModeSystem.journeyDifficultyUpdateMethod.Invoke(power, null); + } + } CalamityWorld.death = value; } else diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 0b57888e4f..60afb593b3 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -5,9 +5,11 @@ using CalamityMod.NPCs.ExoMechs.Apollo; using CalamityMod.NPCs.ExoMechs.Ares; using CalamityMod.NPCs.ExoMechs.Artemis; using CalamityMod.NPCs.ExoMechs.Thanatos; +using CalamityMod.Systems; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; +using Terraria.GameContent.Creative; using Terraria.GameContent.Events; using Terraria.ID; using Terraria.ModLoader; @@ -56,6 +58,13 @@ namespace CalamityMod.World // Therefore gotta reflect! public static bool ReflectMasterMode() { + if (Main.GameModeInfo.IsJourneyMode) + { + CreativePowers.DifficultySliderPower power = CreativePowerManager.Instance.GetPower(); + float level = (float)DifficultyModeSystem.journeySliderCacheField.GetValue(power); + return level == 1f; + } + FieldInfo findInfo = typeof(Main).GetField("_currentGameModeInfo", BindingFlags.Static | BindingFlags.NonPublic); GameModeData data = (GameModeData)findInfo.GetValue(null); return data.IsMasterMode;