From b4a340b4d048bc4060d2046020bfa9546c069099 Mon Sep 17 00:00:00 2001 From: Done2222 Date: Tue, 26 Sep 2023 22:06:28 +0300 Subject: [PATCH 1/4] TYRANNYS END NERF (and anti material rifle rebalance, and aquashard shotgun nerf) --- Items/Weapons/Ranged/AquashardShotgun.cs | 6 +++--- .../en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 4 ++-- Projectiles/Ranged/AMRShot.cs | 4 ++-- Projectiles/Ranged/PiercingBullet.cs | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Items/Weapons/Ranged/AquashardShotgun.cs b/Items/Weapons/Ranged/AquashardShotgun.cs index 61f9c1dc10..45bf04d4c1 100644 --- a/Items/Weapons/Ranged/AquashardShotgun.cs +++ b/Items/Weapons/Ranged/AquashardShotgun.cs @@ -14,12 +14,12 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 14; + Item.damage = 9; Item.DamageType = DamageClass.Ranged; Item.width = 62; Item.height = 26; - Item.useTime = 26; - Item.useAnimation = 26; + Item.useTime = 30; + Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index d5301343d7..504e3883da 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -49,7 +49,7 @@ AntiMaterielRifle: { Tooltip: ''' Converts musket balls into .50 caliber sniper rounds that rip apart enemy defense and DR - Critical hits unleash a second swarm of bullets + Critical hits unleash a second swarm of 4 bullets ''' } @@ -1244,7 +1244,7 @@ TyrannysEnd: { ''' Converts musket balls into .70 caliber sniper rounds that bypass enemy Defense and DR Inflicts Marked for Death on enemy hits - Critical hits summon a swarm of 10 additional bullets + Critical hits summon a swarm of 5 additional bullets 'Pierce the heart of even the most heavily-armored foe' ''' } diff --git a/Projectiles/Ranged/AMRShot.cs b/Projectiles/Ranged/AMRShot.cs index d142dff958..0df64fdf82 100644 --- a/Projectiles/Ranged/AMRShot.cs +++ b/Projectiles/Ranged/AMRShot.cs @@ -74,13 +74,13 @@ namespace CalamityMod.Projectiles.Ranged if (crit) { var source = Projectile.GetSource_FromThis(); - int extraProjectileAmt = 8; + int extraProjectileAmt = 4; for (int x = 0; x < extraProjectileAmt; x++) { if (Projectile.owner == Main.myPlayer) { bool fromRight = x > 3; - CalamityUtils.ProjectileBarrage(source, Projectile.Center, targetPos, fromRight, 500f, 500f, 0f, 500f, 10f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack * 0.1f, Projectile.owner); + CalamityUtils.ProjectileBarrage(source, Projectile.Center, targetPos, fromRight, 500f, 500f, 0f, 500f, 10f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.22), Projectile.knockBack * 0.1f, Projectile.owner); } } } diff --git a/Projectiles/Ranged/PiercingBullet.cs b/Projectiles/Ranged/PiercingBullet.cs index a981847f69..209d6fb091 100644 --- a/Projectiles/Ranged/PiercingBullet.cs +++ b/Projectiles/Ranged/PiercingBullet.cs @@ -53,13 +53,13 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { OnHitEffects(target.Center, hit.Crit); - target.AddBuff(ModContent.BuffType(), 600); + target.AddBuff(ModContent.BuffType(), 300); } public override void OnHitPlayer(Player target, Player.HurtInfo info) { OnHitEffects(target.Center, true); - target.AddBuff(ModContent.BuffType(), 600); + target.AddBuff(ModContent.BuffType(), 300); } private void OnHitEffects(Vector2 targetPos, bool crit) @@ -67,12 +67,12 @@ namespace CalamityMod.Projectiles.Ranged if (crit) { var source = Projectile.GetSource_FromThis(); - int bulletCount = 10; + int bulletCount = 5; for (int x = 0; x < bulletCount; x++) { if (Projectile.owner == Main.myPlayer) { - CalamityUtils.ProjectileBarrage(source, Projectile.Center, targetPos, x < bulletCount / 2, 500f, 500f, 0f, 500f, 12f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.2), Projectile.knockBack, Projectile.owner); + CalamityUtils.ProjectileBarrage(source, Projectile.Center, targetPos, x < bulletCount / 2, 500f, 500f, 0f, 500f, 12f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.14), Projectile.knockBack, Projectile.owner); } } } From 7b2c06f3d04b2200cb7bf309f53f9dcebb4e6aa3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 26 Sep 2023 17:52:05 -0400 Subject: [PATCH 2/4] Phantomic Regen resprite --- Buffs/StatBuffs/PhantomicRegen.png | Bin 607 -> 682 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Buffs/StatBuffs/PhantomicRegen.png b/Buffs/StatBuffs/PhantomicRegen.png index 806d74e3583012ab956a4249a42ef35c8ce3f1d9..eda8b2201d4425116c7598c517a0d14911250220 100644 GIT binary patch delta 658 zcmV;D0&V@@1gZs)B!2;OQb$4nuFf3k0006?NklO>0v@6o#LOO*bY&i=t`$ z2wH0k3biN^rCOL&p7zy1TuihB~eh%Ck$O6Bd=aYSb4GuiJ|4#!55uFo}@k@XM1b)i_ z?ObPXsqLUupMNYr0btL(of|Kr!Mi|{aEE}O^=gLNd3E$S0CTUt05Ejr0RUHfY?#^C zHo36f;SK>USu^cCky;DDj2BltdIW&$vxeYcc^ZISX9rEdT|+=fWcHo1#&L&0*uEFZ zn&T0W@~5{g0Ia%ca$)lJWdH_tMwc`JcL?}8ycd9sSAWcoi~`VEi~&$CYyzP5-Wvca z<*xvgE|@HD+Ho3y8(R+nuqHkQz{Sn|R{xBfA9o1&CzT2~k*ESNG5HRFh2AXyv~|V2 zhz$TVb#((U?bRpGoChG)vd#3X&KJ?L6Y$@LwfxKAh)2%>NSDl7PRuj|urPcKfX?D) zD}4T`S$|w{oX^j#1pIWf~-xuBi@ zI{k01jnXNoGw=04e|g00;m8000000Mb*F01E&B07*qoM6N<$f;Sp1i2wiq delta 582 zcmV-M0=fOF1>XdaB!32COGiWi{{a60|De66lK=n#_DMuRR9M5+moZ3NK^(?^uL#;D zqAe{gAs`ZobW;o!AyQDst`>0&g+LKpETwaYPIVAn9=Mc}EFCh&LO~EEVmDDLB1k|S zikhiTak#q|-`~r7bxE$@cK7~w@4nyr?%sP|Z+8NKtLu7$Hh=2z!+sCoK|611lLs^a za>`M?lIriz6ZH3Xh(J+G~H#tb{sF zpsSVRz50>Wk#X{`B<>K=*PS5{WMFmbL&&*5kh2b$-1>H}8yF%o6JBY-4FY#EAf3zf z{;Cazu8$;-BY*qlJd%Vv1cKCy6-wtri(diwyMLhiE1x3!A$oVXLqN(rGwJ;GyK`O9 z4?v}=omW+F&x>IIQhcNV)n{)F~2Fq8H!}fk4ya02Fj{ z>Blkvm+J@GsdCoLf}N1r4MxE((DPGrjX-cxiGtbewSQW$PP0jOd1ct{T)wPtf+^BZ|000tnMObu2SV=}YPjYExZggREX>V=- UF@#v`?*IS*07*qoM6N<$f>c-(w*UYD From 3514b5d88dcf7d913b711ca2cd8c9ee59ce00107 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 26 Sep 2023 18:48:19 -0500 Subject: [PATCH 3/4] Meta's Fishing Quest Rework (I added some other minor stuff as well to the reward pools). --- ILEditing/VanillaStupidityFixingILChanges.cs | 457 +++++++++++++++++-- 1 file changed, 421 insertions(+), 36 deletions(-) diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index f3ff62b178..bd8c9f861c 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -1,5 +1,7 @@ using CalamityMod.Balancing; +using CalamityMod.Items.Fishing; using CalamityMod.Items.Materials; +using CalamityMod.Items.TreasureBags.MiscGrabBags; using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.NormalNPCs; using Microsoft.Xna.Framework; @@ -299,26 +301,369 @@ namespace CalamityMod.ILEditing GetItemSettings anglerRewardSettings = GetItemSettings.NPCEntityToPlayerInventorySettings; Item item = new Item(); - item.SetDefaults(ItemID.MasterBait); - item.stack += 5; - if (item.stack > 0) - rewardItems.Add(item); - Item item2 = self.GetItem(self.whoAmI, item, GetItemSettings.NPCEntityToPlayerInventorySettings); - if (item2.stack > 0) - rewardItems.Add(item2); + // GUARANTEED REWARDS - item = new Item(); - item.SetDefaults(ItemID.GoldCoin); - item.stack = 10; + // BAIT + switch (self.anglerQuestsFinished) + { + case 0: + case 1: + case 2: + case 3: + case 4: + item = new Item(); + item.SetDefaults(ItemID.Stinkbug); + item.stack = Main.rand.Next(2, 6); + break; + + case 5: + case 6: + case 7: + case 8: + case 9: + item = new Item(); + item.SetDefaults(ItemID.ApprenticeBait); + item.stack = Main.rand.Next(2, 6); + break; + + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + item = new Item(); + item.SetDefaults(Main.rand.NextBool() ? ItemID.Worm : ItemID.Maggot); + item.stack = Main.rand.Next(2, 6); + break; + + case 16: + case 17: + case 18: + case 19: + case 20: + item = new Item(); + item.SetDefaults(ItemID.JourneymanBait); + item.stack = Main.rand.Next(2, 6); + break; + + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + item = new Item(); + item.SetDefaults(Main.rand.NextBool() ? ItemID.EnchantedNightcrawler : ItemID.Buggy); + item.stack = Main.rand.Next(2, 6); + break; + + case 27: + case 28: + case 29: + case 30: + item = new Item(); + item.SetDefaults(ItemID.MasterBait); + item.stack = Main.rand.Next(2, 6); + break; + + default: + //item = new Item(); + //item.SetDefaults(ModContent.ItemType()); + //item.stack = Main.rand.Next(2, 6); + break; + } + + item.position = self.Center; + Item item2 = self.GetItem(self.whoAmI, item, anglerRewardSettings); + rewardItems.Add(item2); + + // COINS + switch (self.anglerQuestsFinished) + { + case 0: + case 1: + case 2: + case 3: + case 4: + item = new Item(); + item.SetDefaults(ItemID.GoldCoin); + break; + + case 5: + case 6: + case 7: + case 8: + case 9: + item = new Item(); + item.SetDefaults(ItemID.GoldCoin); + item.stack = 2; + item = new Item(); + item.SetDefaults(ItemID.SilverCoin); + item.stack = 50; + break; + + case 10: + case 11: + case 12: + case 13: + case 14: + item = new Item(); + item.SetDefaults(ItemID.GoldCoin); + item.stack = 4; + break; + + case 15: + case 16: + case 17: + case 18: + case 19: + item = new Item(); + item.SetDefaults(ItemID.GoldCoin); + item.stack = 6; + break; + + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + item = new Item(); + item.SetDefaults(ItemID.GoldCoin); + item.stack = 8; + break; + + default: + item = new Item(); + item.SetDefaults(ItemID.GoldCoin); + item.stack = 10; + break; + } item.position = self.Center; item2 = self.GetItem(self.whoAmI, item, anglerRewardSettings); - if (item2.stack > 0) - rewardItems.Add(item2); - + rewardItems.Add(item2); + + // PRIMARY ITEMS + switch (self.anglerQuestsFinished) + { + case 0: + case 1: + item = new Item(); + item.SetDefaults(ModContent.ItemType()); + rewardItems.Add(item); + break; + + case 2: + item = new Item(); + item.SetDefaults(ModContent.ItemType()); + item.stack = Main.rand.Next(4, 10); + rewardItems.Add(item); + break; + + case 3: + item = new Item(); + item.SetDefaults(ItemID.HighTestFishingLine); + rewardItems.Add(item); + break; + + case 4: + item = new Item(); + item.SetDefaults(ItemID.FishHook); + rewardItems.Add(item); + break; + + case 5: + item = new Item(); + item.SetDefaults(ItemID.FuzzyCarrot); + rewardItems.Add(item); + break; + + case 6: + item = new Item(); + item.SetDefaults(ItemID.FishermansGuide); + rewardItems.Add(item); + break; + + case 7: + item = new Item(); + item.SetDefaults(ItemID.FishCostumeMask); + rewardItems.Add(item); + item = new Item(); + item.SetDefaults(ItemID.FishCostumeShirt); + rewardItems.Add(item); + item = new Item(); + item.SetDefaults(ItemID.FishCostumeFinskirt); + rewardItems.Add(item); + item = new Item(); + item.SetDefaults(ModContent.ItemType()); + rewardItems.Add(item); + break; + + case 8: + item = new Item(); + item.SetDefaults(ItemID.FishMinecart); + rewardItems.Add(item); + break; + + case 9: + item = new Item(); + item.SetDefaults(ItemID.SailfishBoots); + rewardItems.Add(item); + break; + + case 10: + item = new Item(); + item.SetDefaults(ItemID.AnglerHat); + rewardItems.Add(item); + item = new Item(); + item.SetDefaults(ItemID.AnglerVest); + rewardItems.Add(item); + item = new Item(); + item.SetDefaults(ItemID.AnglerPants); + rewardItems.Add(item); + break; + + case 11: + item = new Item(); + item.SetDefaults(ItemID.WeatherRadio); + rewardItems.Add(item); + break; + + case 12: + item = new Item(); + item.SetDefaults(ItemID.FishingBobber); + rewardItems.Add(item); + break; + + case 13: + item = new Item(); + item.SetDefaults(ItemID.SeashellHairpin); + rewardItems.Add(item); + item = new Item(); + item.SetDefaults(ItemID.MermaidAdornment); + rewardItems.Add(item); + item = new Item(); + item.SetDefaults(ItemID.MermaidTail); + rewardItems.Add(item); + item = new Item(); + item.SetDefaults(ModContent.ItemType()); + rewardItems.Add(item); + break; + + case 14: + item = new Item(); + item.SetDefaults(ItemID.Sextant); + rewardItems.Add(item); + break; + + case 15: + item = new Item(); + item.SetDefaults(ItemID.TackleBox); + rewardItems.Add(item); + break; + + case 16: + item = new Item(); + item.SetDefaults(ItemID.SuperAbsorbantSponge); + rewardItems.Add(item); + break; + + case 17: + item = new Item(); + item.SetDefaults(ItemID.HoneyAbsorbantSponge); + rewardItems.Add(item); + break; + + case 18: + item = new Item(); + item.SetDefaults(ItemID.MagicConch); + rewardItems.Add(item); + break; + + case 19: + item = new Item(); + item.SetDefaults(ItemID.DemonConch); + rewardItems.Add(item); + break; + + case 20: + item = new Item(); + item.SetDefaults(ItemID.AnglerEarring); + rewardItems.Add(item); + break; + + case 21: + item = new Item(); + item.SetDefaults(ItemID.LavaFishingHook); + rewardItems.Add(item); + break; + + case 22: + item = new Item(); + item.SetDefaults(ItemID.HotlineFishingHook); + rewardItems.Add(item); + break; + + case 23: + item = new Item(); + item.SetDefaults(ItemID.FrogLeg); + rewardItems.Add(item); + break; + + case 24: + item = new Item(); + item.SetDefaults(ItemID.SuperheatedBlood); + rewardItems.Add(item); + break; + + case 25: + item = new Item(); + item.SetDefaults(ItemID.BottomlessBucket); + rewardItems.Add(item); + break; + + case 26: + item = new Item(); + item.SetDefaults(ItemID.Sundial); + rewardItems.Add(item); + break; + + case 27: + item = new Item(); + item.SetDefaults(ItemID.BottomlessHoneyBucket); + rewardItems.Add(item); + break; + + case 28: + item = new Item(); + item.SetDefaults(ItemID.GoldenBugNet); + rewardItems.Add(item); + break; + + case 29: + item = new Item(); + item.SetDefaults(ItemID.BottomlessLavaBucket); + rewardItems.Add(item); + break; + + case 30: + item = new Item(); + item.SetDefaults(ItemID.GoldenFishingRod); + rewardItems.Add(item); + break; + } + + // RANDOM DROPS + // Golden Fishing Rod - if (Main.rand.NextBool((int)(500f * rarityReduction))) + if (Main.rand.NextBool((int)(500f * rarityReduction)) && self.anglerQuestsFinished > 30) { item = new Item(); item.SetDefaults(ItemID.GoldenFishingRod); @@ -326,7 +671,7 @@ namespace CalamityMod.ILEditing } // Hotline Fishing Hook - if (Main.rand.NextBool((int)(200f * rarityReduction)) || self.anglerQuestsFinished == 22) + if (Main.rand.NextBool((int)(200f * rarityReduction)) && self.anglerQuestsFinished > 22) { item = new Item(); item.SetDefaults(ItemID.HotlineFishingHook); @@ -334,7 +679,7 @@ namespace CalamityMod.ILEditing } // Angler Set - if (Main.rand.NextBool((int)(150f * rarityReduction))) + if (Main.rand.NextBool((int)(150f * rarityReduction)) && self.anglerQuestsFinished > 10) { item = new Item(); item.SetDefaults(ItemID.AnglerHat); @@ -348,7 +693,7 @@ namespace CalamityMod.ILEditing } // Mermaid Set - if (Main.rand.NextBool((int)(150f * rarityReduction)) || self.anglerQuestsFinished == 11) + if (Main.rand.NextBool((int)(150f * rarityReduction)) && self.anglerQuestsFinished > 13) { item = new Item(); item.SetDefaults(ItemID.SeashellHairpin); @@ -362,7 +707,7 @@ namespace CalamityMod.ILEditing } // Fish Set - if (Main.rand.NextBool((int)(150f * rarityReduction)) || self.anglerQuestsFinished == 8) + if (Main.rand.NextBool((int)(150f * rarityReduction)) && self.anglerQuestsFinished > 7) { item = new Item(); item.SetDefaults(ItemID.FishCostumeMask); @@ -376,7 +721,7 @@ namespace CalamityMod.ILEditing } // Fin Wings - if (Main.rand.NextBool((int)(140f * rarityReduction)) && Main.hardMode) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && Main.hardMode && self.anglerQuestsFinished > 10) { item = new Item(); item.SetDefaults(ItemID.FinWings); @@ -384,7 +729,7 @@ namespace CalamityMod.ILEditing } // Bottomless Water Bucket - if (Main.rand.NextBool((int)(140f * rarityReduction))) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 25) { item = new Item(); item.SetDefaults(ItemID.BottomlessBucket); @@ -392,15 +737,39 @@ namespace CalamityMod.ILEditing } // Bottomless Honey Bucket - /*if (Main.rand.NextBool((int)(140f * rarityReduction)) || self.anglerQuestsFinished == 29) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 27) { item = new Item(); item.SetDefaults(ItemID.BottomlessHoneyBucket); rewardItems.Add(item); - }*/ + } + + // Bottomless Lava Bucket + if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 29) + { + item = new Item(); + item.SetDefaults(ItemID.BottomlessLavaBucket); + rewardItems.Add(item); + } + + // Magic Conch + if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 18) + { + item = new Item(); + item.SetDefaults(ItemID.MagicConch); + rewardItems.Add(item); + } + + // Demon Conch + if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 19) + { + item = new Item(); + item.SetDefaults(ItemID.DemonConch); + rewardItems.Add(item); + } // Super Absorbant Sponge - if (Main.rand.NextBool((int)(140f * rarityReduction)) || self.anglerQuestsFinished == 17) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 16) { item = new Item(); item.SetDefaults(ItemID.SuperAbsorbantSponge); @@ -408,15 +777,15 @@ namespace CalamityMod.ILEditing } // Honey Absorbant Sponge - /*if (Main.rand.NextBool((int)(140f * rarityReduction)) || self.anglerQuestsFinished == 19) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 17) { item = new Item(); item.SetDefaults(ItemID.SuperAbsorbantSponge); rewardItems.Add(item); - }*/ + } // Golden Bug Net - if (Main.rand.NextBool((int)(140f * rarityReduction)) || self.anglerQuestsFinished == 27) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 28) { item = new Item(); item.SetDefaults(ItemID.GoldenBugNet); @@ -424,7 +793,7 @@ namespace CalamityMod.ILEditing } // Fish Hook - if (Main.rand.NextBool((int)(120f * rarityReduction)) || self.anglerQuestsFinished == 4) + if (Main.rand.NextBool((int)(120f * rarityReduction)) && self.anglerQuestsFinished > 4) { item = new Item(); item.SetDefaults(ItemID.FishHook); @@ -432,15 +801,23 @@ namespace CalamityMod.ILEditing } // Minecarp - if (Main.rand.NextBool((int)(120f * rarityReduction)) || self.anglerQuestsFinished == 9) + if (Main.rand.NextBool((int)(120f * rarityReduction)) && self.anglerQuestsFinished > 8) { item = new Item(); item.SetDefaults(ItemID.FishMinecart); rewardItems.Add(item); } + // Lava Shark + if (Main.rand.NextBool((int)(120f * rarityReduction)) && self.anglerQuestsFinished > 24) + { + item = new Item(); + item.SetDefaults(ItemID.SuperheatedBlood); + rewardItems.Add(item); + } + // High Test Fishing Line - if (Main.rand.NextBool((int)(80f * rarityReduction)) || self.anglerQuestsFinished == 2) + if (Main.rand.NextBool((int)(80f * rarityReduction)) && self.anglerQuestsFinished > 3) { item = new Item(); item.SetDefaults(ItemID.HighTestFishingLine); @@ -448,15 +825,23 @@ namespace CalamityMod.ILEditing } // Angler Earring - if (Main.rand.NextBool((int)(80f * rarityReduction)) || self.anglerQuestsFinished == 7) + if (Main.rand.NextBool((int)(80f * rarityReduction)) && self.anglerQuestsFinished > 20) { item = new Item(); item.SetDefaults(ItemID.AnglerEarring); rewardItems.Add(item); } + // Lavaproof Fishing Hook + if (Main.rand.NextBool((int)(80f * rarityReduction)) && self.anglerQuestsFinished > 21) + { + item = new Item(); + item.SetDefaults(ItemID.LavaFishingHook); + rewardItems.Add(item); + } + // Tackle Box - if (Main.rand.NextBool((int)(80f * rarityReduction)) || self.anglerQuestsFinished == 12) + if (Main.rand.NextBool((int)(80f * rarityReduction)) && self.anglerQuestsFinished > 15) { item = new Item(); item.SetDefaults(ItemID.TackleBox); @@ -464,7 +849,7 @@ namespace CalamityMod.ILEditing } // Fisherman's Pocket Guide - if (Main.rand.NextBool((int)(60f * rarityReduction)) || self.anglerQuestsFinished == 1) + if (Main.rand.NextBool((int)(60f * rarityReduction)) && self.anglerQuestsFinished > 6) { item = new Item(); item.SetDefaults(ItemID.FishermansGuide); @@ -472,7 +857,7 @@ namespace CalamityMod.ILEditing } // Weather Radio - if (Main.rand.NextBool((int)(60f * rarityReduction)) || self.anglerQuestsFinished == 3) + if (Main.rand.NextBool((int)(60f * rarityReduction)) && self.anglerQuestsFinished > 11) { item = new Item(); item.SetDefaults(ItemID.WeatherRadio); @@ -480,7 +865,7 @@ namespace CalamityMod.ILEditing } // Sextant - if (Main.rand.NextBool((int)(60f * rarityReduction)) || self.anglerQuestsFinished == 6) + if (Main.rand.NextBool((int)(60f * rarityReduction)) && self.anglerQuestsFinished > 14) { item = new Item(); item.SetDefaults(ItemID.Sextant); @@ -488,12 +873,12 @@ namespace CalamityMod.ILEditing } // Fishing Bobber - /*if (Main.rand.NextBool((int)(50f * rarityReduction)) || self.anglerQuestsFinished == 13) + if (Main.rand.NextBool((int)(50f * rarityReduction)) && self.anglerQuestsFinished > 12) { item = new Item(); item.SetDefaults(ItemID.FishingBobber); rewardItems.Add(item); - }*/ + } PlayerLoader.AnglerQuestReward(self, rarityReduction, rewardItems); From f4e5168d08f26e512263995f5a3d94f2e7035416 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 27 Sep 2023 01:13:55 -0500 Subject: [PATCH 4/4] More fishing changes. - Added Angling Kits as common drops past the 30th quest. - Leviathan and Anahita no longer drop fishing equipment. - Merchant no longer sells bait. --- ILEditing/VanillaStupidityFixingILChanges.cs | 69 +++++++++++-------- Items/TreasureBags/LeviathanBag.cs | 8 --- .../MiscGrabBags/SandyAnglingKit.cs | 3 +- NPCs/CalamityGlobalNPC.cs | 1 + NPCs/CalamityGlobalTownNPC.cs | 3 - NPCs/Leviathan/Leviathan.cs | 8 --- 6 files changed, 43 insertions(+), 49 deletions(-) diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index bd8c9f861c..4868dd5349 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -290,12 +290,15 @@ namespace CalamityMod.ILEditing orig(self, angler, questItemType); EntitySource_Gift source = new EntitySource_Gift(angler); - int questsDone = self.anglerQuestsFinished + Main.rand.Next(101); + int questsDone = self.anglerQuestsFinished; float rarityReduction = 1f; rarityReduction = (questsDone <= 50) ? (rarityReduction - questsDone * 0.01f) : ((questsDone <= 100) ? (0.5f - (questsDone - 50) * 0.005f) : ((questsDone > 150) ? 0.15f : (0.25f - (questsDone - 100) * 0.002f))); rarityReduction *= 0.9f; rarityReduction *= (float)(self.currentShoppingSettings.PriceAdjustment + 1.0) / 2f; + if (rarityReduction < 0.1f) + rarityReduction = 0.1f; + List rewardItems = new List(); GetItemSettings anglerRewardSettings = GetItemSettings.NPCEntityToPlayerInventorySettings; @@ -305,7 +308,7 @@ namespace CalamityMod.ILEditing // GUARANTEED REWARDS // BAIT - switch (self.anglerQuestsFinished) + switch (questsDone) { case 0: case 1: @@ -380,7 +383,7 @@ namespace CalamityMod.ILEditing rewardItems.Add(item2); // COINS - switch (self.anglerQuestsFinished) + switch (questsDone) { case 0: case 1: @@ -451,7 +454,7 @@ namespace CalamityMod.ILEditing rewardItems.Add(item2); // PRIMARY ITEMS - switch (self.anglerQuestsFinished) + switch (questsDone) { case 0: case 1: @@ -662,8 +665,16 @@ namespace CalamityMod.ILEditing // RANDOM DROPS + // Angling Kits + if (Main.rand.NextBool((int)(12f * rarityReduction)) && questsDone > 30) + { + item = new Item(); + item.SetDefaults(Main.hardMode ? ModContent.ItemType() : ModContent.ItemType()); + rewardItems.Add(item); + } + // Golden Fishing Rod - if (Main.rand.NextBool((int)(500f * rarityReduction)) && self.anglerQuestsFinished > 30) + if (Main.rand.NextBool((int)(500f * rarityReduction)) && questsDone > 30) { item = new Item(); item.SetDefaults(ItemID.GoldenFishingRod); @@ -671,7 +682,7 @@ namespace CalamityMod.ILEditing } // Hotline Fishing Hook - if (Main.rand.NextBool((int)(200f * rarityReduction)) && self.anglerQuestsFinished > 22) + if (Main.rand.NextBool((int)(200f * rarityReduction)) && questsDone > 22) { item = new Item(); item.SetDefaults(ItemID.HotlineFishingHook); @@ -679,7 +690,7 @@ namespace CalamityMod.ILEditing } // Angler Set - if (Main.rand.NextBool((int)(150f * rarityReduction)) && self.anglerQuestsFinished > 10) + if (Main.rand.NextBool((int)(150f * rarityReduction)) && questsDone > 10) { item = new Item(); item.SetDefaults(ItemID.AnglerHat); @@ -693,7 +704,7 @@ namespace CalamityMod.ILEditing } // Mermaid Set - if (Main.rand.NextBool((int)(150f * rarityReduction)) && self.anglerQuestsFinished > 13) + if (Main.rand.NextBool((int)(150f * rarityReduction)) && questsDone > 13) { item = new Item(); item.SetDefaults(ItemID.SeashellHairpin); @@ -707,7 +718,7 @@ namespace CalamityMod.ILEditing } // Fish Set - if (Main.rand.NextBool((int)(150f * rarityReduction)) && self.anglerQuestsFinished > 7) + if (Main.rand.NextBool((int)(150f * rarityReduction)) && questsDone > 7) { item = new Item(); item.SetDefaults(ItemID.FishCostumeMask); @@ -721,7 +732,7 @@ namespace CalamityMod.ILEditing } // Fin Wings - if (Main.rand.NextBool((int)(140f * rarityReduction)) && Main.hardMode && self.anglerQuestsFinished > 10) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && Main.hardMode && questsDone > 10) { item = new Item(); item.SetDefaults(ItemID.FinWings); @@ -729,7 +740,7 @@ namespace CalamityMod.ILEditing } // Bottomless Water Bucket - if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 25) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 25) { item = new Item(); item.SetDefaults(ItemID.BottomlessBucket); @@ -737,7 +748,7 @@ namespace CalamityMod.ILEditing } // Bottomless Honey Bucket - if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 27) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 27) { item = new Item(); item.SetDefaults(ItemID.BottomlessHoneyBucket); @@ -745,7 +756,7 @@ namespace CalamityMod.ILEditing } // Bottomless Lava Bucket - if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 29) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 29) { item = new Item(); item.SetDefaults(ItemID.BottomlessLavaBucket); @@ -753,7 +764,7 @@ namespace CalamityMod.ILEditing } // Magic Conch - if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 18) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 18) { item = new Item(); item.SetDefaults(ItemID.MagicConch); @@ -761,7 +772,7 @@ namespace CalamityMod.ILEditing } // Demon Conch - if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 19) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 19) { item = new Item(); item.SetDefaults(ItemID.DemonConch); @@ -769,7 +780,7 @@ namespace CalamityMod.ILEditing } // Super Absorbant Sponge - if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 16) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 16) { item = new Item(); item.SetDefaults(ItemID.SuperAbsorbantSponge); @@ -777,7 +788,7 @@ namespace CalamityMod.ILEditing } // Honey Absorbant Sponge - if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 17) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 17) { item = new Item(); item.SetDefaults(ItemID.SuperAbsorbantSponge); @@ -785,7 +796,7 @@ namespace CalamityMod.ILEditing } // Golden Bug Net - if (Main.rand.NextBool((int)(140f * rarityReduction)) && self.anglerQuestsFinished > 28) + if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 28) { item = new Item(); item.SetDefaults(ItemID.GoldenBugNet); @@ -793,7 +804,7 @@ namespace CalamityMod.ILEditing } // Fish Hook - if (Main.rand.NextBool((int)(120f * rarityReduction)) && self.anglerQuestsFinished > 4) + if (Main.rand.NextBool((int)(120f * rarityReduction)) && questsDone > 4) { item = new Item(); item.SetDefaults(ItemID.FishHook); @@ -801,7 +812,7 @@ namespace CalamityMod.ILEditing } // Minecarp - if (Main.rand.NextBool((int)(120f * rarityReduction)) && self.anglerQuestsFinished > 8) + if (Main.rand.NextBool((int)(120f * rarityReduction)) && questsDone > 8) { item = new Item(); item.SetDefaults(ItemID.FishMinecart); @@ -809,7 +820,7 @@ namespace CalamityMod.ILEditing } // Lava Shark - if (Main.rand.NextBool((int)(120f * rarityReduction)) && self.anglerQuestsFinished > 24) + if (Main.rand.NextBool((int)(120f * rarityReduction)) && questsDone > 24) { item = new Item(); item.SetDefaults(ItemID.SuperheatedBlood); @@ -817,7 +828,7 @@ namespace CalamityMod.ILEditing } // High Test Fishing Line - if (Main.rand.NextBool((int)(80f * rarityReduction)) && self.anglerQuestsFinished > 3) + if (Main.rand.NextBool((int)(80f * rarityReduction)) && questsDone > 3) { item = new Item(); item.SetDefaults(ItemID.HighTestFishingLine); @@ -825,7 +836,7 @@ namespace CalamityMod.ILEditing } // Angler Earring - if (Main.rand.NextBool((int)(80f * rarityReduction)) && self.anglerQuestsFinished > 20) + if (Main.rand.NextBool((int)(80f * rarityReduction)) && questsDone > 20) { item = new Item(); item.SetDefaults(ItemID.AnglerEarring); @@ -833,7 +844,7 @@ namespace CalamityMod.ILEditing } // Lavaproof Fishing Hook - if (Main.rand.NextBool((int)(80f * rarityReduction)) && self.anglerQuestsFinished > 21) + if (Main.rand.NextBool((int)(80f * rarityReduction)) && questsDone > 21) { item = new Item(); item.SetDefaults(ItemID.LavaFishingHook); @@ -841,7 +852,7 @@ namespace CalamityMod.ILEditing } // Tackle Box - if (Main.rand.NextBool((int)(80f * rarityReduction)) && self.anglerQuestsFinished > 15) + if (Main.rand.NextBool((int)(80f * rarityReduction)) && questsDone > 15) { item = new Item(); item.SetDefaults(ItemID.TackleBox); @@ -849,7 +860,7 @@ namespace CalamityMod.ILEditing } // Fisherman's Pocket Guide - if (Main.rand.NextBool((int)(60f * rarityReduction)) && self.anglerQuestsFinished > 6) + if (Main.rand.NextBool((int)(60f * rarityReduction)) && questsDone > 6) { item = new Item(); item.SetDefaults(ItemID.FishermansGuide); @@ -857,7 +868,7 @@ namespace CalamityMod.ILEditing } // Weather Radio - if (Main.rand.NextBool((int)(60f * rarityReduction)) && self.anglerQuestsFinished > 11) + if (Main.rand.NextBool((int)(60f * rarityReduction)) && questsDone > 11) { item = new Item(); item.SetDefaults(ItemID.WeatherRadio); @@ -865,7 +876,7 @@ namespace CalamityMod.ILEditing } // Sextant - if (Main.rand.NextBool((int)(60f * rarityReduction)) && self.anglerQuestsFinished > 14) + if (Main.rand.NextBool((int)(60f * rarityReduction)) && questsDone > 14) { item = new Item(); item.SetDefaults(ItemID.Sextant); @@ -873,7 +884,7 @@ namespace CalamityMod.ILEditing } // Fishing Bobber - if (Main.rand.NextBool((int)(50f * rarityReduction)) && self.anglerQuestsFinished > 12) + if (Main.rand.NextBool((int)(50f * rarityReduction)) && questsDone > 12) { item = new Item(); item.SetDefaults(ItemID.FishingBobber); diff --git a/Items/TreasureBags/LeviathanBag.cs b/Items/TreasureBags/LeviathanBag.cs index 03466e16d8..114c6c2e91 100644 --- a/Items/TreasureBags/LeviathanBag.cs +++ b/Items/TreasureBags/LeviathanBag.cs @@ -82,14 +82,6 @@ namespace CalamityMod.Items.TreasureBags itemLoot.Add(ModContent.ItemType(), 7); itemLoot.Add(ModContent.ItemType(), 7); itemLoot.Add(ModContent.ItemType(), ThankYouPainting.DropInt); - - // Fishing - itemLoot.Add(ItemID.HotlineFishingHook, 10); - itemLoot.Add(ItemID.BottomlessBucket, 10); - itemLoot.Add(ItemID.SuperAbsorbantSponge, 10); - itemLoot.Add(ItemID.FishingPotion, 5, 5, 8); - itemLoot.Add(ItemID.SonarPotion, 5, 5, 8); - itemLoot.Add(ItemID.CratePotion, 5, 5, 8); } } } diff --git a/Items/TreasureBags/MiscGrabBags/SandyAnglingKit.cs b/Items/TreasureBags/MiscGrabBags/SandyAnglingKit.cs index 1ebaa2977e..ae8bf5b562 100644 --- a/Items/TreasureBags/MiscGrabBags/SandyAnglingKit.cs +++ b/Items/TreasureBags/MiscGrabBags/SandyAnglingKit.cs @@ -8,9 +8,10 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags public class SandyAnglingKit : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.TreasureBags"; + public override void SetStaticDefaults() { - Item.ResearchUnlockCount = 10; + Item.ResearchUnlockCount = 10; } public override void SetDefaults() diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 213070c6af..9ada03d4df 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5170,6 +5170,7 @@ namespace CalamityMod.NPCs } // 12JUL2023: Ozzatron: what does this do + // 27SEP2023: Fabsol: disables vanilla spawns "a pool of [0] indicates vanilla spawning" if (calamityBiomeZone) { pool[0] = 0f; diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index e5f539dd01..9d8bdfe390 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1292,9 +1292,6 @@ namespace CalamityMod.NPCs .Add(ItemID.ManaPotion, potionSells, Condition.HappyEnough, Condition.DownedEowOrBoc) .Add(ItemID.Flare, hasFlareGunUpgrade) .Add(ItemID.BlueFlare, hasFlareGunUpgrade) - .Add(ItemID.ApprenticeBait, Condition.DownedEyeOfCthulhu) - .Add(ItemID.JourneymanBait, Condition.DownedEowOrBoc) - .Add(ItemID.MasterBait, Condition.DownedSkeletron) .AddWithCustomValue(ItemID.AngelStatue, Item.buyPrice(gold: 5), Condition.NpcIsPresent(NPCType())) .AddWithCustomValue(ItemID.Burger, Item.buyPrice(gold: 5), Condition.HappyEnough, Condition.DownedSkeletron) .AddWithCustomValue(ItemID.Hotdog, Item.buyPrice(gold: 5), Condition.HappyEnough, Condition.DownedSkeletron) diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index f51fa76ae3..ea6feed95e 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -829,14 +829,6 @@ namespace CalamityMod.NPCs.Leviathan normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction); normalOnly.Add(ModContent.ItemType(), 10); - - // Fishing - normalOnly.Add(ItemID.HotlineFishingHook, 10); - normalOnly.Add(ItemID.BottomlessBucket, 10); - normalOnly.Add(ItemID.SuperAbsorbantSponge, 10); - normalOnly.Add(ItemID.FishingPotion, 5, 5, 8); - normalOnly.Add(ItemID.SonarPotion, 5, 5, 8); - normalOnly.Add(ItemID.CratePotion, 5, 5, 8); } // Relic