diff --git a/Localization/en-US/Mods.CalamityMod.Condition.hjson b/Localization/en-US/Mods.CalamityMod.Condition.hjson index d99892c2dd..b757a152d4 100644 --- a/Localization/en-US/Mods.CalamityMod.Condition.hjson +++ b/Localization/en-US/Mods.CalamityMod.Condition.hjson @@ -52,6 +52,8 @@ Drops: { // Other conditions HasFlareGun: While holding a Flare Gun upgrade LacewingBestiary: When at least 40% of the Bestiary has been completed +CrescentMoons: During a crescent moon +GibbousMoons: During a gibbous moon HasRogueArmor: While wearing rogue armor HasWings: While wearing wings InAstral: In the Astral Infection diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 30f02069d7..0d477e9611 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1231,6 +1231,8 @@ namespace CalamityMod.NPCs Condition spelunkerGlowCondition = new(Language.GetText("Conditions.NightDayFullMoon"), () => !Main.dayTime || Main.GetMoonPhase() == MoonPhase.Full); // Identical to the one in NPCShopDatabase Condition hasFlareGunUpgrade = new(CalamityUtils.GetText("Condition.HasFlareGun"), () => (Main.LocalPlayer.HasItem(ItemType()) || Main.LocalPlayer.HasItem(ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); Condition bestiaryProgressLacewing = new(CalamityUtils.GetText("Condition.LacewingBestiary"), () => Main.GetBestiaryProgressReport().CompletionPercent >= 0.4f); + Condition crescentMoons = new(CalamityUtils.GetText("Condition.CrescentMoons"), () => Main.GetMoonPhase() == MoonPhase.QuarterAtLeft || Main.GetMoonPhase() == MoonPhase.QuarterAtRight); // for Craw Carapace + Condition gibbousMoons = new(CalamityUtils.GetText("Condition.GibbousMoons"), () => Main.GetMoonPhase() == MoonPhase.ThreeQuartersAtLeft || Main.GetMoonPhase() == MoonPhase.ThreeQuartersAtRight); // for Giant Shell if (type == NPCID.Merchant) { @@ -1375,12 +1377,12 @@ namespace CalamityMod.NPCs if (type == NPCID.SkeletonMerchant) { - shop.InsertAfter(ItemID.HealingPotion, ItemType()) - .InsertAfter(ItemID.HealingPotion, ItemID.MilkCarton) + shop.InsertAfter(ItemID.HealingPotion, ItemType(), Condition.MoonPhasesHalf0) + .InsertAfter(ItemID.HealingPotion, ItemID.MilkCarton, Condition.MoonPhasesHalf1) .InsertAfter(ItemID.SpelunkerFlare, ItemID.SpelunkerFlare, spelunkerGlowCondition, hasFlareGunUpgrade) - .AddWithCustomValue(ItemID.Marrow, Item.buyPrice(gold: 25), Condition.Hardmode) - .AddWithCustomValue(Item.buyPrice(gold: 15)) - .AddWithCustomValue(Item.buyPrice(gold: 15)); + .AddWithCustomValue(ItemID.Marrow, Item.buyPrice(gold: 25), Condition.Hardmode, Condition.MoonPhases26) // 26 = half moons + .AddWithCustomValue(Item.buyPrice(gold: 15), gibbousMoons) + .AddWithCustomValue(Item.buyPrice(gold: 15), crescentMoons); } if (type == NPCID.BestiaryGirl)