diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 47c890e6f0..fd10dfb0ee 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1737,23 +1737,8 @@ namespace CalamityMod.Items #region On Create public override void OnCreate(Item item, ItemCreationContext context) { - // Crafting a rogue weapon has a 75% chance for a random modifier - // Negative modifiers have a 66.66% chance of being voided - // Note, the modifier doesn't show up in the craft text (the one that indicates you got a new item) - if (context is RecipeCreationContext) - { - if (item.CanGetRoguePrefix()) - { - if (Main.rand.Next(4) < 3) - { - int prefix = CalamityUtils.RandomRoguePrefix(); - if (!CalamityUtils.NegativeRoguePrefix(prefix) || Main.rand.NextBool(3)) - { - item.Prefix(prefix); - } - } - } - } + // ChoosePrefix also happens on craft so go reset it here too + storedPrefix = -1; } #endregion @@ -1772,6 +1757,15 @@ namespace CalamityMod.Items // removed data saved on items; reforging is now a coalescing flowchart that has no RNG public override int ChoosePrefix(Item item, UnifiedRandom rand) { + if (storedPrefix == -1 && item.CanGetRoguePrefix()) + { + // Crafting (or first reforge of) a rogue weapon has a 75% chance for a random modifier, this check is done by vanilla + // Negative modifiers have a 66.66% chance of being voided, Annoying modifier is intentionally ignored by vanilla + int prefix = CalamityUtils.RandomRoguePrefix(); + bool keepPrefix = !CalamityUtils.NegativeRoguePrefix(prefix) || Main.rand.NextBool(3); + return keepPrefix ? prefix : 0; + } + if (!CalamityConfig.Instance.RemoveReforgeRNG || Main.gameMenu || storedPrefix == -1) return -1; diff --git a/Projectiles/Rogue/GacruxianHome.cs b/Projectiles/Rogue/GacruxianHome.cs index a3eb3d6d94..80a5f14bbf 100644 --- a/Projectiles/Rogue/GacruxianHome.cs +++ b/Projectiles/Rogue/GacruxianHome.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Rogue { public class GacruxianHome : ModProjectile { - public override string Texture => "CalamityMod/Items/Fishing/AstralCatches/GacruxianMollusk"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/GacruxianMollusk"; public override void SetStaticDefaults() { diff --git a/Projectiles/Rogue/GacruxianProj.cs b/Projectiles/Rogue/GacruxianProj.cs index 924d31b366..ed075fd414 100644 --- a/Projectiles/Rogue/GacruxianProj.cs +++ b/Projectiles/Rogue/GacruxianProj.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Rogue { public class GacruxianProj : ModProjectile { - public override string Texture => "CalamityMod/Items/Fishing/AstralCatches/GacruxianMollusk"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/GacruxianMollusk"; public override void SetStaticDefaults() { diff --git a/Utilities/ItemUtils.cs b/Utilities/ItemUtils.cs index 7dcb400111..1c3d286cd4 100644 --- a/Utilities/ItemUtils.cs +++ b/Utilities/ItemUtils.cs @@ -692,7 +692,30 @@ namespace CalamityMod mod.Find("Blunt").Type, mod.Find("Flimsy").Type, mod.Find("Unbalanced").Type, - mod.Find("Atrocious").Type + mod.Find("Atrocious").Type, + PrefixID.Keen, + PrefixID.Superior, + PrefixID.Forceful, + PrefixID.Broken, + PrefixID.Damaged, + PrefixID.Hurtful, + PrefixID.Strong, + PrefixID.Unpleasant, + PrefixID.Weak, + PrefixID.Ruthless, + PrefixID.Godly, + PrefixID.Demonic, + PrefixID.Zealous, + PrefixID.Quick, + PrefixID.Deadly2, + PrefixID.Agile, + PrefixID.Nimble, + PrefixID.Murderous, + PrefixID.Slow, + PrefixID.Sluggish, + PrefixID.Lazy, + PrefixID.Annoying, // Vanilla does not include this in "bad" reforges so we won't either + PrefixID.Nasty }); return roguePrefix; } @@ -705,7 +728,13 @@ namespace CalamityMod mod.Find("Blunt").Type, mod.Find("Flimsy").Type, mod.Find("Unbalanced").Type, - mod.Find("Atrocious").Type + mod.Find("Atrocious").Type, + PrefixID.Broken, + PrefixID.Damaged, + PrefixID.Shoddy, + PrefixID.Slow, + PrefixID.Sluggish, + PrefixID.Lazy }; return badPrefixes.Contains(prefix); }