diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c414685461..348fccf55e 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -518,6 +518,10 @@ namespace CalamityMod.CalPlayer } // Ores below here + // Celestial Tracers give immunity to block contact effects + if (cTracers) + return; + // Astral Ore inflicts Astral Infection briefly on contact if (tile.TileType == astralOreID) Player.AddBuff(ModContent.BuffType(), 2); diff --git a/CalamityLists.cs b/CalamityLists.cs index 183961ae7b..7aee1bc24b 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -989,7 +989,6 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), - NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/Items/Placeables/Banners/CosmicElementalBanner.cs b/Items/Placeables/Banners/CosmicElementalBanner.cs deleted file mode 100644 index b04aa31fa7..0000000000 --- a/Items/Placeables/Banners/CosmicElementalBanner.cs +++ /dev/null @@ -1,28 +0,0 @@ -using CalamityMod.Tiles; -using Terraria; -using Terraria.ModLoader; -using Terraria.ID; - -namespace CalamityMod.Items.Placeables.Banners -{ - public class CosmicElementalBanner : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Placeables"; - public override void SetDefaults() - { - Item.width = 10; - Item.height = 24; - Item.maxStack = 9999; - Item.useTurn = true; - Item.autoReuse = true; - Item.useAnimation = 15; - Item.useTime = 10; - Item.useStyle = ItemUseStyleID.Swing; - Item.consumable = true; - Item.rare = ItemRarityID.Blue; - Item.value = Item.buyPrice(0, 0, 10, 0); - Item.createTile = ModContent.TileType(); - Item.placeStyle = 75; - } - } -} diff --git a/Items/Placeables/Banners/CosmicElementalBanner.png b/Items/Placeables/Banners/CosmicElementalBanner.png deleted file mode 100644 index 94d9a93c61..0000000000 Binary files a/Items/Placeables/Banners/CosmicElementalBanner.png and /dev/null differ diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson index a808d634ae..7ef3b1e914 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson @@ -19,11 +19,9 @@ CelestialTracers: { Acceleration multiplier: 3.0 Excellent vertical speed Flight time: 250 - 50% increased running acceleration - Greater mobility on ice - Water and lava walking - Immunity to the On Fire! debuff - Temporary immunity to lava + 50% increased running acceleration and greater mobility on ice + Provides the ability to walk on water, honey, and lava + Grants immunity to fire, lava, and harmful block effects Being hit for over 200 damage will make you immune for an extended period of time 'Taking speed EVEN FURTHER BEYOND!' ''' @@ -50,11 +48,9 @@ ElysianTracers: { Acceleration multiplier: 2.75 Great vertical speed Flight time: 180 - 36% increased running acceleration - Greater mobility on ice - Water and lava walking - Immunity to the On Fire! debuff - Temporary immunity to lava + 36% increased running acceleration and greater mobility on ice + Provides the ability to walk on water, honey, and lava + Grants immunity to fire and lava 'Ludicrous speed!' ''' } @@ -135,11 +131,9 @@ SeraphTracers: { Acceleration multiplier: 2.5 Good vertical speed Flight time: 140 - 24% increased running acceleration - Greater mobility on ice - Water and lava walking - Immunity to the On Fire! debuff - Temporary immunity to lava + 24% increased running acceleration and greater mobility on ice + Provides the ability to walk on water, honey, and lava + Grants immunity to fire and lava 'Ludicrous speed!' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 87a796c0a6..443f7287e1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -255,11 +255,6 @@ ColossalSquidBanner: { Tooltip: "{$CommonItemTooltip.BannerBonus}Colossal Squid" } -CosmicElementalBanner: { - DisplayName: Cosmic Elemental Banner - Tooltip: "{$CommonItemTooltip.BannerBonus}Cosmic Elemental" -} - CrimulanBlightSlimeBanner: { DisplayName: Crimulan Blight Slime Banner Tooltip: "{$CommonItemTooltip.BannerBonus}Crimulan Blight Slime" diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index 22497db287..94604d30ab 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -1,3 +1,26 @@ +// Drop Conditions +DropCondition: { + FirstKill: Drops only on the first kill + MechBoss: Drops on the first kill of the final Mechanical Boss + Cynosure: Drops once you have defeated both Draedon and Calamitas + ProvidenceHallow: + ''' + Drops if Providence was summoned in the Hallow + or if Providence is only attacked during nighttime + ''' + ProvidenceUnderworld: + ''' + Drops if Providence was summoned in the Underworld + or if Providence is only attacked during nighttime + ''' + ProvidenceNight: Drops if Providence is only attacked during nighttime + ProvidenceChallenge: + ''' + Drops if Providence was defeated only with the {0} + {$Bestiary_ItemDropConditions.IsExpert} + ''' +} + // Status WikiStatus1: "[i:149][c/EE4939:Note: The Fandom wiki is no longer supported by Calamity.] [i:149]" WikiStatus2: "[i:149][c/EE4939:Check out the Official Calamity Mod Wiki at ][c/3989FF:calamitymod.wiki.gg][c/EE4939:!] [i:149]" diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 227cc50bea..cacdb6d50f 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -148,7 +148,6 @@ AuroraSpirit.DisplayName: Aurora Spirit BloomSlime.DisplayName: Bloom Slime Bohldohr.DisplayName: Bohldohr Cnidrion.DisplayName: Cnidrion -CosmicElemental.DisplayName: Cosmic Elemental CrawlerAmber.DisplayName: Amber Crawler CrawlerAmethyst.DisplayName: Amethyst Crawler CrawlerCrystal.DisplayName: Crystal Crawler @@ -323,8 +322,8 @@ FAP: { BloodMoonSlap: Sorry, I have no moral compass at the moment. Normal1: I HATE WALMART! ...Anyway, what do you want this time? Normal2: Drink something that turns you into a magical flying unicorn so you can be just like me. - Normal3: Did anyone ever tell you that large assets cause back pain? Well, they were right. - Normal4: Deals so good I'll [$$!$] myself! ...Sorry, just had a minor stroke! + Normal3: Deals so good I'll [$$!$] myself! ...Sorry, just had a minor stroke! + Normal4: Did anyone ever tell you that large assets cause back pain? Well, they were right. Archmage: I never realized how well-endowed {0} was. It had to be the largest icicle I'd ever seen. BrimstoneWitch: The abuse {0} went through is something I can hardly comprehend. I'd offer her a drink, but I don't think she'd enjoy it. Tavernkeep1: My booze will always be better than {0}'s, and nobody can convince me otherwise. diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index c67d1d15d4..4507f48c9a 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -55,7 +55,7 @@ MechanicChat: { MoonLordDefeated: What do you mean your traps aren't making the cut? Don't look at me! Eclipse: Um... should my nightlight be on? AcidRain: Maybe I should've waterproofed my gadgets... They're starting to corrode. - DrunkPrincess: Well, I like " + Main.npc[fapsol].GivenName + ", but I, ah... I have my eyes on someone else. + DrunkPrincess: Well, I like {0}, but I, ah... I have my eyes on someone else. } MerchantChat: { @@ -111,8 +111,8 @@ SteampunkerChat: { StylistChat: { Hardmode: Please don't catch space lice. Or {0} lice. Or just lice in general. - DrunkPrincess1: Sometimes I catch {0} sneaking up from behind me. - DrunkPrincess2: "{0} is always trying to brighten my mood... even if, deep down, I know she's sad..." + DrunkPrincess1: "{0} is always trying to brighten my mood... even if, deep down, I know she's sad..." + DrunkPrincess2: Sometimes I catch {0} sneaking up from behind me. ProfanedSoulCrystal1: They look so cute and yet, I can feel their immense power just by being near them. What are you? ProfanedSoulCrystal2: I hate to break it to you, but you don't have hair to cut or style, hun. ProfanedDonuts: Aww, they're so cute, do they have names? diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index 31d5b5e32d..dedbc097d5 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -226,6 +226,7 @@ namespace CalamityMod.NPCs.Abyss npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 7, 5)); npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 7, 5)); npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 7, 5)); + npcLoot.Add(ItemID.JellyfishNecklace, 10); } public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index 6c6934ca4f..a3734bb11b 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -118,8 +118,8 @@ namespace CalamityMod.NPCs.AcidRain // Increase bloodworm spawn rate relative to the number of existing bloodworms, parabolic multiplier ranging from 5x spawn rate with 0 blood worms to 1x with 5 or more int bloodwormAmt = NPC.CountNPCS(NPC.type); float spawnMult = bloodwormAmt > 5 ? 1f : (float)(0.16 * Math.Pow(5 - bloodwormAmt, 2)) + 1f; - float baseSpawnRate = AcidRainEvent.OldDukeHasBeenEncountered ? 2.569f : 5.138f; - float spawnRate = SpawnCondition.WormCritter.Chance * baseSpawnRate * spawnMult; + float baseSpawnRate = DownedBossSystem.downedBoomerDuke ? 0.5f : AcidRainEvent.OldDukeHasBeenEncountered ? 2f : 1f; + float spawnRate = baseSpawnRate * spawnMult; return spawnRate; } diff --git a/NPCs/Astral/FusionFeeder.cs b/NPCs/Astral/FusionFeeder.cs index e1079e8b9a..4489cc4f47 100644 --- a/NPCs/Astral/FusionFeeder.cs +++ b/NPCs/Astral/FusionFeeder.cs @@ -309,6 +309,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { + npcLoot.Add(ItemID.SharkFin, 8); npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 2, 3, 3, 4)); } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index cb893bf764..ce83dc7686 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3657,17 +3657,10 @@ namespace CalamityMod.NPCs break; case NPCAIStyleID.GraniteElemental: - if (npc.type == NPCType()) + switch (npc.type) { - return CalamityGlobalAI.BuffedGraniteElementalAI(npc, Mod); - } - else - { - switch (npc.type) - { - case NPCID.GraniteFlyer: - return CalamityGlobalAI.BuffedGraniteElementalAI(npc, Mod); - } + case NPCID.GraniteFlyer: + return CalamityGlobalAI.BuffedGraniteElementalAI(npc, Mod); } break; @@ -3714,6 +3707,7 @@ namespace CalamityMod.NPCs npc.lavaImmune = true; npc.dontTakeDamage = true; npc.noTileCollide = true; + npc.rarity = 0; // Teleport to the player if far enough away. if (Vector2.Distance(npc.Center, targetData.Center) > 1000f) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 2036046338..1f4ffc7786 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1124,7 +1124,7 @@ namespace CalamityMod.NPCs if (Main.rand.NextBool(15) && Main.hardMode) chat = CalamityUtils.GetText("Vanilla.StylistChat.Hardmode").Format(worldEvil); if (Main.rand.NextBool(15) && fapsol != -1) - chat = CalamityUtils.GetText("Vanilla.StylistChat.DrunkPrincess" + Main.rand.Next(1, 2 + 1)).Format(Main.npc[fapsol].GivenName); + chat = CalamityUtils.GetText("Vanilla.StylistChat.DrunkPrincess" + (ChildSafety.Disabled ? Main.rand.Next(1, 2 + 1) : 1)).Format(Main.npc[fapsol].GivenName); if ((Main.rand.NextBool(npc.GivenName == "Amber" ? 10 : 15)) && Main.LocalPlayer.Calamity().pArtifact) { if (Main.LocalPlayer.Calamity().profanedCrystalBuffs) diff --git a/NPCs/NormalNPCs/CosmicElemental.cs b/NPCs/NormalNPCs/CosmicElemental.cs deleted file mode 100644 index d38312a432..0000000000 --- a/NPCs/NormalNPCs/CosmicElemental.cs +++ /dev/null @@ -1,130 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Items.Placeables.Banners; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.GameContent; -using Terraria.GameContent.Bestiary; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.ModLoader.Utilities; - -namespace CalamityMod.NPCs.NormalNPCs -{ - public class CosmicElemental : ModNPC - { - public override void SetStaticDefaults() - { - Main.npcFrameCount[NPC.type] = 11; - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0); - value.Position.Y -= 6f; - value.PortraitPositionYOverride = -32f; - NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - } - - public override void SetDefaults() - { - NPC.npcSlots = 0.5f; - NPC.aiStyle = NPCAIStyleID.GraniteElemental; - NPC.damage = 20; - NPC.width = NPC.height = 30; - NPC.defense = 10; - NPC.lifeMax = 25; - NPC.knockBackResist = 0.5f; - NPC.value = Item.buyPrice(0, 0, 3, 0); - NPC.HitSound = SoundID.NPCHit7; - NPC.DeathSound = SoundID.NPCDeath6; - Banner = NPC.type; - BannerItem = ModContent.ItemType(); - NPC.Calamity().VulnerableToSickness = false; - } - - public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) - { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A curious construct, and though its origins are unknown, it has been decidedly proven that the core of its body leads to somewhere not of our world.") - }); - } - - public override void FindFrame(int frameHeight) - { - NPC.frameCounter++; - if (NPC.frameCounter > 6) - { - NPC.frame.Y += frameHeight; - NPC.frameCounter = 0; - } - if (NPC.ai[0] == -1f) - { - if (NPC.frame.Y >= frameHeight * 11) - NPC.frame.Y = frameHeight * 10; - else if (NPC.frame.Y <= frameHeight * 5) - NPC.frame.Y = frameHeight * 6; - NPC.rotation += NPC.velocity.X * 0.2f; - } - else - { - if (NPC.frame.Y >= frameHeight * 6) - NPC.frame.Y = 0; - NPC.rotation = NPC.velocity.X * 0.1f; - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - int height = texture.Height / Main.npcFrameCount[NPC.type]; - int width = texture.Width; - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == -1) - { - spriteEffects = SpriteEffects.FlipHorizontally; - } - Main.spriteBatch.Draw(texture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2(width / 2f, height / 2f), NPC.scale, spriteEffects, 0f); - return false; - } - - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - if (spawnInfo.PlayerSafe || spawnInfo.Player.Calamity().ZoneAbyss || spawnInfo.Player.Calamity().ZoneSunkenSea) - { - return 0f; - } - return SpawnCondition.Cavern.Chance * 0.01f; - } - - public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) - { - int debuffType = CalamityWorld.getFixedBoi ? ModContent.BuffType() : BuffID.Confused; - if (hurtInfo.Damage > 0) - target.AddBuff(debuffType, 180, true); - } - - public override void HitEffect(NPC.HitInfo hit) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, 70, hit.HitDirection, -1f, 0, default, 1f); - } - if (NPC.life <= 0) - { - for (int k = 0; k < 20; k++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, 70, hit.HitDirection, -1f, 0, default, 1f); - } - } - } - - public override void ModifyNPCLoot(NPCLoot npcLoot) - { - npcLoot.Add(ItemID.BoneSword, 20); - npcLoot.Add(ItemID.Starfury, 50); - npcLoot.Add(ItemID.EnchantedSword, 50); - npcLoot.Add(ItemID.Terragrim, 100); - } - } -} diff --git a/NPCs/NormalNPCs/CosmicElemental.png b/NPCs/NormalNPCs/CosmicElemental.png deleted file mode 100644 index c783c33ce8..0000000000 Binary files a/NPCs/NormalNPCs/CosmicElemental.png and /dev/null differ diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index 6435285a34..35b17959f3 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.PlayerSafe || !NPC.downedMoonlord) + if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity) { return 0f; } diff --git a/NPCs/NormalNPCs/ProfanedEnergyBody.cs b/NPCs/NormalNPCs/ProfanedEnergyBody.cs index bdb5191123..399976d0cc 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyBody.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyBody.cs @@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || NPC.AnyNPCs(NPC.type)) + if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || NPC.AnyNPCs(NPC.type) || spawnInfo.Player.Calamity().ZoneCalamity) { return 0f; } diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index 7e4edce2cd..4afbbd3137 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -181,7 +181,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.PlayerSafe || !NPC.downedMoonlord) + if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity) { return 0f; } diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index e45b9b0ce1..7934087f57 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1884,12 +1884,12 @@ namespace CalamityMod.NPCs.Providence // Drops Rune of Cos on first kill npcLoot.AddIf(() => !DownedBossSystem.downedProvidence, ModContent.ItemType(), desc: DropHelper.FirstKillText); - npcLoot.AddIf(info => + npcLoot.AddConditionalPerPlayer(info => { Providence prov = info.npc.ModNPC(); return prov.biomeType != 2 || !prov.hasTakenDaytimeDamage; }, ModContent.ItemType(), desc: DropHelper.ProvidenceHallowText); - npcLoot.AddIf(info => + npcLoot.AddConditionalPerPlayer(info => { Providence prov = info.npc.ModNPC(); return prov.biomeType == 2 || !prov.hasTakenDaytimeDamage; diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index ee4f98ac8e..c65d86595e 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using Terraria; using Terraria.Audio; using Terraria.DataStructures; +using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.GameContent.Events; using Terraria.GameContent.Personalities; @@ -136,18 +137,21 @@ namespace CalamityMod.NPCs.TownNPCs dialogue.Add(this.GetLocalizedValue("Chat.Normal1")); dialogue.Add(this.GetLocalizedValue("Chat.Normal2")); dialogue.Add(this.GetLocalizedValue("Chat.Normal3")); - dialogue.Add(this.GetLocalizedValue("Chat.Normal4")); + if (ChildSafety.Disabled) + dialogue.Add(this.GetLocalizedValue("Chat.Normal4")); int tavernKeep = NPC.FindFirstNPC(NPCID.DD2Bartender); if (tavernKeep != -1) { dialogue.Add(this.GetLocalization("Chat.Tavernkeep1").Format(Main.npc[tavernKeep].GivenName)); dialogue.Add(this.GetLocalization("Chat.Tavernkeep2").Format(Main.npc[tavernKeep].GivenName)); - dialogue.Add(this.GetLocalizedValue("Chat.Tavernkeep3")); + + if (ChildSafety.Disabled) + dialogue.Add(this.GetLocalizedValue("Chat.Tavernkeep3")); } int permadong = NPC.FindFirstNPC(ModContent.NPCType()); - if (permadong != -1) + if (permadong != -1 && ChildSafety.Disabled) dialogue.Add(this.GetLocalization("Chat.Archmage").Format(Main.npc[wife].GivenName)); int witch = NPC.FindFirstNPC(ModContent.NPCType()); @@ -157,8 +161,11 @@ namespace CalamityMod.NPCs.TownNPCs if (wifeIsAround) { dialogue.Add(this.GetLocalization("Chat.Stylist1").Format(Main.npc[wife].GivenName)); - dialogue.Add(this.GetLocalization("Chat.Stylist2").Format(Main.npc[wife].GivenName)); - dialogue.Add(this.GetLocalization("Chat.Stylist3").Format(Main.npc[wife].GivenName)); + if (ChildSafety.Disabled) + { + dialogue.Add(this.GetLocalization("Chat.Stylist2").Format(Main.npc[wife].GivenName)); + dialogue.Add(this.GetLocalization("Chat.Stylist3").Format(Main.npc[wife].GivenName)); + } } if (Main.dayTime) @@ -200,7 +207,7 @@ namespace CalamityMod.NPCs.TownNPCs if (Main.invasionType == InvasionID.MartianMadness) dialogue.Add(this.GetLocalizedValue("Chat.Martians")); - if (DownedBossSystem.downedCryogen) + if (DownedBossSystem.downedCryogen && ChildSafety.Disabled) dialogue.Add(this.GetLocalizedValue("Chat.CryogenDefeated")); if (DownedBossSystem.downedLeviathan) @@ -218,7 +225,7 @@ namespace CalamityMod.NPCs.TownNPCs if (player.Calamity().chibii) dialogue.Add(this.GetLocalizedValue("Chat.HasChibii")); - if (player.Calamity().aquaticHeart && !player.Calamity().aquaticHeartHide) + if (player.Calamity().aquaticHeart && !player.Calamity().aquaticHeartHide && ChildSafety.Disabled) dialogue.Add(this.GetLocalizedValue("Chat.HasAnahitaTrans")); if (player.Calamity().fabsolVodka) @@ -228,7 +235,8 @@ namespace CalamityMod.NPCs.TownNPCs { dialogue.Add(this.GetLocalizedValue("Chat.HasAlicorn1")); dialogue.Add(this.GetLocalizedValue("Chat.HasAlicorn2")); - dialogue.Add(this.GetLocalizedValue("Chat.HasAlicorn3")); + if (ChildSafety.Disabled) + dialogue.Add(this.GetLocalizedValue("Chat.HasAlicorn3")); } return dialogue; diff --git a/NPCs/TownNPCs/WITCH.cs b/NPCs/TownNPCs/WITCH.cs index d918b11acb..55649f0a8b 100644 --- a/NPCs/TownNPCs/WITCH.cs +++ b/NPCs/TownNPCs/WITCH.cs @@ -6,6 +6,7 @@ using CalamityMod.Projectiles.Magic; using CalamityMod.UI.CalamitasEnchants; using System.Collections.Generic; using Terraria; +using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.GameContent.Events; using Terraria.GameContent.Personalities; @@ -116,7 +117,7 @@ namespace CalamityMod.NPCs.TownNPCs } int fab = NPC.FindFirstNPC(NPCType()); - if (fab != -1) + if (fab != -1 && ChildSafety.Disabled) dialogue.Add(this.GetLocalization("Chat.DrunkPrincess").Format(Main.npc[fab].GivenName), 1.45); if (NPC.AnyNPCs(NPCType())) diff --git a/Tiles/Astral/AstralShortPlants.cs b/Tiles/Astral/AstralShortPlants.cs index 942abad878..e8c7c0243e 100644 --- a/Tiles/Astral/AstralShortPlants.cs +++ b/Tiles/Astral/AstralShortPlants.cs @@ -1,5 +1,6 @@ using CalamityMod.Dusts; using Microsoft.Xna.Framework; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.GameContent.Metadata; @@ -50,11 +51,17 @@ namespace CalamityMod.Tiles.Astral } } - public override void KillMultiTile(int i, int j, int frameX, int frameY) + public override IEnumerable GetItemDrops(int i, int j) { - if (Main.rand.Next(20) == 0) - { - Item.NewItem(new EntitySource_TileBreak(i, j), new Vector2(i, j) * 16f, ModContent.ItemType()); + Vector2 worldPosition = new Vector2(i, j).ToWorldCoordinates(); + Player nearestPlayer = Main.player[Player.FindClosest(worldPosition, 16, 16)]; + if (nearestPlayer.active) + { + if (nearestPlayer.ActiveItem().type == ItemID.Sickle) + yield return new Item(ItemID.Hay, Main.rand.Next(1, 2 + 1)); + + if (Main.rand.NextBool(20)) + yield return new Item(ModContent.ItemType()); } } } diff --git a/Tiles/Astral/AstralTallPlants.cs b/Tiles/Astral/AstralTallPlants.cs index 16a347b5a8..14ed654c84 100644 --- a/Tiles/Astral/AstralTallPlants.cs +++ b/Tiles/Astral/AstralTallPlants.cs @@ -1,5 +1,6 @@ using CalamityMod.Dusts; using Microsoft.Xna.Framework; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.GameContent.Metadata; @@ -55,11 +56,17 @@ namespace CalamityMod.Tiles.Astral height = 32; } - public override void KillMultiTile(int i, int j, int frameX, int frameY) + public override IEnumerable GetItemDrops(int i, int j) { - if (Main.rand.Next(20) == 0) - { - Item.NewItem(new EntitySource_TileBreak(i, j), new Vector2(i, j) * 16f, ModContent.ItemType()); + Vector2 worldPosition = new Vector2(i, j).ToWorldCoordinates(); + Player nearestPlayer = Main.player[Player.FindClosest(worldPosition, 16, 16)]; + if (nearestPlayer.active) + { + if (nearestPlayer.ActiveItem().type == ItemID.Sickle) + yield return new Item(ItemID.Hay, Main.rand.Next(2, 4 + 1)); + + if (Main.rand.NextBool(20)) + yield return new Item(ModContent.ItemType()); } } } diff --git a/Utilities/DropHelper.cs b/Utilities/DropHelper.cs index 1dfedd7e11..487314a5b6 100644 --- a/Utilities/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -112,14 +112,14 @@ namespace CalamityMod #endregion #region Bestiary Text - public static string FirstKillText = "Drops only on the first kill"; - public static string MechBossText = "Drops on the first kill of the final Mechanical Boss"; - public static string CynosureText = "Drops once you have defeated both Draedon and Calamitas"; + public static string FirstKillText = CalamityUtils.GetTextValue("Misc.DropCondition.FirstKill"); + public static string MechBossText = CalamityUtils.GetTextValue("Misc.DropCondition.MechBoss"); + public static string CynosureText = CalamityUtils.GetTextValue("Misc.DropCondition.Cynosure"); - public static string ProvidenceHallowText = "Drops if Providence was summoned in the Hallow\nor if Providence is only attacked during nighttime"; - public static string ProvidenceUnderworldText = "Drops if Providence was summoned in the Underworld\nor if Providence is only attacked during nighttime"; - public static string ProvidenceNightText = "Drops if Providence is only attacked during nighttime"; - public static string ProvidenceChallengeText = $"Drops if Providence was defeated only with the [i:{ModContent.ItemType()}] Profaned Soul Artifact\nThis is an Expert Mode drop rate"; + public static string ProvidenceHallowText = CalamityUtils.GetTextValue("Misc.DropCondition.ProvidenceHallow"); + public static string ProvidenceUnderworldText = CalamityUtils.GetTextValue("Misc.DropCondition.ProvidenceUnderworld"); + public static string ProvidenceNightText = CalamityUtils.GetTextValue("Misc.DropCondition.ProvidenceNight"); + public static string ProvidenceChallengeText = CalamityUtils.GetText("Misc.DropCondition.ProvidenceChallenge").Format($"[i:{ModContent.ItemType()}]" + CalamityUtils.GetItemName().ToString()); #endregion diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 60a0596e2b..6d50e3dd80 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -580,9 +580,6 @@ namespace CalamityMod case 73: npc = ModContent.NPCType(); break; - case 75: - npc = ModContent.NPCType(); - break; case 76: npc = ModContent.NPCType(); break; diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 81f8e34277..440d9f1fcc 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -318,7 +318,6 @@ namespace CalamityMod { ModContent.NPCType(), new Tuple(true, Array.Empty()) }, { ModContent.NPCType(), new Tuple(true, Array.Empty()) }, { ModContent.NPCType(), new Tuple(true, Array.Empty()) }, - { ModContent.NPCType(), new Tuple(true, Array.Empty()) }, { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Poisoned, BuffID.Venom }) }, { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Poisoned, BuffID.Venom }) },