diff --git a/CalamityMod.cs b/CalamityMod.cs index 043e2501d0..761a4b4036 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -6,13 +6,17 @@ using CalamityMod.ILEditing; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Accessories.Wings; +using CalamityMod.Items.Ammo.FiniteUse; using CalamityMod.Items.Armor; +using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.Fishing.AstralCatches; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Fishing.FishingRods; using CalamityMod.Items.Fishing.SunkenSeaCatches; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; @@ -194,6 +198,7 @@ namespace CalamityMod public static List lavaFishList; public static List highTestFishList; public static List flamethrowerList; + public static List forceItemList; public static List zombieList; public static List demonEyeList; @@ -400,6 +405,7 @@ namespace CalamityMod lavaFishList = null; highTestFishList = null; flamethrowerList = null; + forceItemList = null; zombieList = null; demonEyeList = null; @@ -2274,6 +2280,80 @@ namespace CalamityMod ModContent.ItemType() }; + forceItemList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ItemID.HotlineFishingHook, + ItemID.BottomlessBucket, + ItemID.SuperAbsorbantSponge, + ItemID.FishingPotion, + ItemID.SonarPotion, + ItemID.CratePotion, + ItemID.AnglerTackleBag, + ItemID.HighTestFishingLine, + ItemID.TackleBox, + ItemID.AnglerEarring, + ItemID.FishermansGuide, + ItemID.WeatherRadio, + ItemID.Sextant, + ItemID.AnglerHat, + ItemID.AnglerVest, + ItemID.AnglerPants, + ItemID.GoldenBugNet, + ItemID.FishronWings, + ItemID.Flairon, + ItemID.Tsunami, + ItemID.BubbleGun, + ItemID.RazorbladeTyphoon, + ItemID.TempestStaff, + ItemID.FishronBossBag, + ItemID.Coral, + ItemID.Seashell, + ItemID.Starfish, + ItemID.SoulofSight, + ItemID.GreaterHealingPotion, + ItemID.SuperHealingPotion + }; + tableList = new List() { ModContent.TileType(), diff --git a/Items/Accessories/Wings/SilvaWings.png b/Items/Accessories/Wings/SilvaWings.png index 77a314a4d2..d0aeeca113 100644 Binary files a/Items/Accessories/Wings/SilvaWings.png and b/Items/Accessories/Wings/SilvaWings.png differ diff --git a/Items/Accessories/Wings/SilvaWings_Wings.png b/Items/Accessories/Wings/SilvaWings_Wings.png index 2cd34f7dbd..41d43643f6 100644 Binary files a/Items/Accessories/Wings/SilvaWings_Wings.png and b/Items/Accessories/Wings/SilvaWings_Wings.png differ diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 7493c81760..45b8f04009 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -3174,6 +3174,16 @@ Provides heat and cold protection in Death Mode"; } #endregion + #region PostUpdate + public override void PostUpdate(Item item) + { + if (CalamityMod.forceItemList?.Contains(item.type) ?? false) + { + CalamityUtils.ForceItemIntoWorld(item); + } + } + #endregion + #region Goblin Money Theft (PostReforge) public override void PostReforge(Item item) { diff --git a/Items/TreasureBags/AquaticScourgeBag.cs b/Items/TreasureBags/AquaticScourgeBag.cs index 8f7e94b879..9ba6030bd3 100644 --- a/Items/TreasureBags/AquaticScourgeBag.cs +++ b/Items/TreasureBags/AquaticScourgeBag.cs @@ -72,10 +72,10 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), 7); // Fishing + DropHelper.DropItemChance(player, ItemID.AnglerTackleBag, 15); DropHelper.DropItemChance(player, ItemID.HighTestFishingLine, 10); - DropHelper.DropItemChance(player, ItemID.AnglerTackleBag, 10); DropHelper.DropItemChance(player, ItemID.TackleBox, 10); - DropHelper.DropItemChance(player, ItemID.AnglerEarring, 8); + DropHelper.DropItemChance(player, ItemID.AnglerEarring, 10); DropHelper.DropItemChance(player, ItemID.FishermansGuide, 8); DropHelper.DropItemChance(player, ItemID.WeatherRadio, 8); DropHelper.DropItemChance(player, ItemID.Sextant, 8); diff --git a/Items/Weapons/Magic/VitriolicViper.cs b/Items/Weapons/Magic/VitriolicViper.cs index 32c3a87311..fb8ab67ee4 100644 --- a/Items/Weapons/Magic/VitriolicViper.cs +++ b/Items/Weapons/Magic/VitriolicViper.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 175; + item.damage = 155; item.magic = true; item.mana = 15; item.width = 60; diff --git a/Items/Weapons/Rogue/JawsOfOblivion.cs b/Items/Weapons/Rogue/JawsOfOblivion.cs index 3eaf8da0eb..3ba816c270 100644 --- a/Items/Weapons/Rogue/JawsOfOblivion.cs +++ b/Items/Weapons/Rogue/JawsOfOblivion.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 42; - item.damage = 400; + item.damage = 220; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 15; diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 7303c08a3f..bfbf59ac94 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -766,16 +766,20 @@ namespace CalamityMod fargos.Call("AddSummon", order, "CalamityMod", summonItemName, downed, price); } + AddToMutantShop("DesertScourge", "DriedSeafood", DownedDesertScourge, Item.buyPrice(gold: 2)); AddToMutantShop("Crabulon", "DecapoditaSprout", DownedCrabulon, Item.buyPrice(gold: 4)); AddToMutantShop("HiveMind", "Teratoma", DownedHiveMind, Item.buyPrice(gold: 10)); AddToMutantShop("Perforators", "BloodyWormFood", DownedPerfs, Item.buyPrice(gold: 10)); AddToMutantShop("SlimeGod", "OverloadedSludge", DownedSlimeGod, Item.buyPrice(gold: 15)); + AddToMutantShop("Cryogen", "CryoKey", DownedCryogen, Item.buyPrice(gold: 15)); AddToMutantShop("BrimstoneElemental", "CharredIdol", DownedBrimstoneElemental, Item.buyPrice(gold: 20)); + AddToMutantShop("AquaticScourge", "Seafood", DownedAquaticScourge, Item.buyPrice(gold: 20)); AddToMutantShop("AstrumAureus", "AstralChunk", DownedAureus, Item.buyPrice(gold: 25)); AddToMutantShop("PlaguebringerGoliath", "Abomination", DownedPBG, Item.buyPrice(gold: 50)); AddToMutantShop("Ravager", "AncientMedallion", DownedRavager, Item.buyPrice(gold: 50)); AddToMutantShop("ProfanedGuardians", "ProfanedShard", DownedGuardians, Item.buyPrice(platinum: 5)); AddToMutantShop("Bumblebirb", "BirbPheromones", DownedBirb, Item.buyPrice(platinum: 5)); + AddToMutantShop("OldDuke", "BloodwormItem", DownedBoomerDuke, Item.buyPrice(platinum: 8)); } private static void CensusSupport() diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 3b067bfe73..c0b1e0733d 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -184,10 +184,10 @@ namespace CalamityMod.NPCs.AquaticScourge DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); // Fishing + DropHelper.DropItemChance(npc, ItemID.AnglerTackleBag, 18); DropHelper.DropItemChance(npc, ItemID.HighTestFishingLine, 12); - DropHelper.DropItemChance(npc, ItemID.AnglerTackleBag, 12); DropHelper.DropItemChance(npc, ItemID.TackleBox, 12); - DropHelper.DropItemChance(npc, ItemID.AnglerEarring, 9); + DropHelper.DropItemChance(npc, ItemID.AnglerEarring, 12); DropHelper.DropItemChance(npc, ItemID.FishermansGuide, 9); DropHelper.DropItemChance(npc, ItemID.WeatherRadio, 9); DropHelper.DropItemChance(npc, ItemID.Sextant, 9); diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index b198568b15..de60241736 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -12,6 +12,7 @@ using Terraria; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using Terraria.ModLoader.Config; namespace CalamityMod.NPCs.TownNPCs { [AutoloadHead] @@ -279,12 +280,18 @@ namespace CalamityMod.NPCs.TownNPCs shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 20, 0, 0); nextSlot++; } - if (NPC.downedFishron) + if (NPC.downedFishron && CalamityMod.CalamityConfig.SellBossSummons) { shop.item[nextSlot].SetDefaults(ItemID.TruffleWorm); shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 40, 0, 0); nextSlot++; } + if (CalamityWorld.downedBoomerDuke) + { + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(8, 0, 0, 0); + nextSlot++; + } } public override void HitEffect(int hitDirection, double damage) diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs index 81acb23a37..32110f4717 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Magic { int homerCount = 6; int trueMeleeID = ModContent.ProjectileType(); - int trueMeleeDamage = (int)(Eternity.BaseDamage * player.MagicDamage()); + int trueMeleeDamage = (int)(Eternity.BaseDamage * player.MagicDamage() * 0.9f); float angleVariance = MathHelper.TwoPi / homerCount; float spinOffsetAngle = MathHelper.Pi / (2f * homerCount); Vector2 posVec = Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * 10f; diff --git a/Projectiles/Magic/WhiteFlame.cs b/Projectiles/Magic/WhiteFlame.cs index 2eb0e5920c..a47b226707 100644 --- a/Projectiles/Magic/WhiteFlame.cs +++ b/Projectiles/Magic/WhiteFlame.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Projectiles.Magic projectile.penetrate = 1; projectile.timeLeft = 120; projectile.magic = true; - projectile.extraUpdates = 1; + projectile.extraUpdates = 3; } public override void AI() { - if (projectile.timeLeft % 2f == 0f) + if (projectile.timeLeft % 6f == 0f) { for (int num457 = 0; num457 < Main.rand.Next(3,6); num457++) { diff --git a/Projectiles/Rogue/SkyfinNuke.cs b/Projectiles/Rogue/SkyfinNuke.cs index 51a759dd6e..7909639844 100644 --- a/Projectiles/Rogue/SkyfinNuke.cs +++ b/Projectiles/Rogue/SkyfinNuke.cs @@ -26,6 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = true; projectile.alpha = 0; projectile.Calamity().rogue = true; + projectile.extraUpdates = 1; } public override void AI() @@ -65,6 +66,7 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { + projectile.extraUpdates = 0; //Dust for (int i = 0; i < 30;i++) { diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index f3593ba3e0..a164b53531 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -109,6 +109,7 @@ namespace CalamityMod.World public static int acidRainExtraDrawTime = 0; public static bool triedToSummonOldDuke = false; public static bool startAcidicDownpour = false; + public static bool forcedRainAlready = false; public static float AcidRainCompletionRatio { get @@ -370,6 +371,8 @@ namespace CalamityMod.World downed.Add("spawnedBoomer"); if (startAcidicDownpour) downed.Add("startDownpour"); + if (forcedRainAlready) + downed.Add("forcedRain"); return new TagCompound { @@ -439,6 +442,7 @@ namespace CalamityMod.World downedAquaticScourgeAcidRain = downed.Contains("hmRain"); triedToSummonOldDuke = downed.Contains("spawnedBoomer"); startAcidicDownpour = downed.Contains("startDownpour"); + forcedRainAlready = downed.Contains("forcedRain"); abyssChasmBottom = tag.GetInt("abyssChasmBottom"); acidRainPoints = tag.GetInt("acidRainPoints"); @@ -524,6 +528,16 @@ namespace CalamityMod.World downedEoCAcidRain = flags7[5]; downedAquaticScourgeAcidRain = flags7[6]; triedToSummonOldDuke = flags7[7]; + + BitsByte flags8 = reader.ReadByte(); + forcedRainAlready = flags8[0]; + _ = flags8[1]; + _ = flags8[2]; + _ = flags8[3]; + _ = flags8[4]; + _ = flags8[5]; + _ = flags8[6]; + _ = flags8[7]; } else { @@ -606,6 +620,16 @@ namespace CalamityMod.World flags7[6] = downedAquaticScourgeAcidRain; flags7[7] = triedToSummonOldDuke; + BitsByte flags8 = new BitsByte(); + flags8[0] = forcedRainAlready; + flags8[1] = false; + flags8[2] = false; + flags8[3] = false; + flags8[4] = false; + flags8[5] = false; + flags8[6] = false; + flags8[7] = false; + writer.Write(flags); writer.Write(flags2); writer.Write(flags3); @@ -613,6 +637,7 @@ namespace CalamityMod.World writer.Write(flags5); writer.Write(flags6); writer.Write(flags7); + writer.Write(flags8); writer.Write(abyssChasmBottom); writer.Write(acidRainPoints); } @@ -692,6 +717,16 @@ namespace CalamityMod.World downedAquaticScourgeAcidRain = flags7[6]; triedToSummonOldDuke = flags7[7]; + BitsByte flags8 = reader.ReadByte(); + forcedRainAlready = flags8[0]; + _ = flags8[1]; + _ = flags8[2]; + _ = flags8[3]; + _ = flags8[4]; + _ = flags8[5]; + _ = flags8[6]; + _ = flags8[7]; + abyssChasmBottom = reader.ReadInt32(); acidRainPoints = reader.ReadInt32(); } @@ -908,7 +943,7 @@ namespace CalamityMod.World AcidRainEvent.TryStartEvent(); CalamityMod.UpdateServerBoolean(); } - if (NPC.downedBoss1 && !downedEoCAcidRain) + if (NPC.downedBoss1 && !downedEoCAcidRain && !forcedRainAlready) { for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) { @@ -916,6 +951,7 @@ namespace CalamityMod.World { if (Main.player[playerIndex].Calamity().ZoneSulphur) { + forcedRainAlready = true; AcidRainEvent.TryStartEvent(); CalamityMod.UpdateServerBoolean(); }