diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index c39f4a6a6c..31f181c69d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7317,34 +7317,6 @@ namespace CalamityMod.CalPlayer } } } - if (theBee) - { - for (int n = 0; n < 3; n++) - { - Projectile star = CalamityUtils.ProjectileRain(player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileID.HallowStar, (int)(150 * player.AverageDamage()), 4f, player.whoAmI); - if (star.whoAmI.WithinBounds(Main.maxProjectiles)) - { - star.Calamity().forceTypeless = true; - star.usesLocalNPCImmunity = true; - star.localNPCHitCooldown = 5; - } - } - int num = 1; - if (Main.rand.NextBool(3)) - ++num; - if (Main.rand.NextBool(3)) - ++num; - if (player.strongBees && Main.rand.NextBool(3)) - ++num; - for (int index = 0; index < num; ++index) - { - int bee = Projectile.NewProjectile(player.position.X, player.position.Y, Main.rand.Next(-35, 36) * 0.02f, Main.rand.Next(-35, 36) * 0.02f, Main.rand.NextBool(4) ? ModContent.ProjectileType() : player.beeType(), player.beeDamage(7), player.beeKB(0f), Main.myPlayer, 0f, 0f); - Main.projectile[bee].usesLocalNPCImmunity = true; - Main.projectile[bee].localNPCHitCooldown = 5; - if (bee.WithinBounds(Main.maxProjectiles)) - Main.projectile[bee].Calamity().forceTypeless = true; - } - } if (fCarapace) { if (damage > 0) diff --git a/Items/Accessories/TheBee.cs b/Items/Accessories/TheBee.cs index b1b3f89d68..6b5ff2be5b 100644 --- a/Items/Accessories/TheBee.cs +++ b/Items/Accessories/TheBee.cs @@ -10,8 +10,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("The Bee"); - Tooltip.SetDefault("Causes stars to fall and releases bees when injured\n" + - "When at full HP, your damage is increased based on your damage reduction\n" + + Tooltip.SetDefault("When at full HP, your damage is increased based on your damage reduction\n" + "Damage taken at full HP is halved\n" + "This has a 10 second cooldown"); } diff --git a/Items/CalamityGlobalItemLoot.cs b/Items/CalamityGlobalItemLoot.cs index d914db1875..7ee5354c38 100644 --- a/Items/CalamityGlobalItemLoot.cs +++ b/Items/CalamityGlobalItemLoot.cs @@ -61,17 +61,13 @@ namespace CalamityMod.Items ItemID.BeeKeeper, ItemID.BeesKnees, ItemID.BeeGun, + ModContent.ItemType() }; DropHelper.DropEntireSet(player, DropHelper.BagWeaponDropRateFloat, queenBeeWeapons); DropHelper.BlockDrops(queenBeeWeapons); DropHelper.DropItem(player, ItemID.Stinger, 8, 12); // Extra stingers DropHelper.DropItem(player, ModContent.ItemType(), 50, 75); - DropHelper.DropItem(player, ModContent.ItemType()); - break; - - case ItemID.SkeletronBossBag: - DropHelper.DropItem(player, ModContent.ItemType()); break; case ItemID.WallOfFleshBossBag: @@ -149,7 +145,6 @@ namespace CalamityMod.Items DropHelper.DropItem(player, ModContent.ItemType(), 16, 22); DropHelper.DropItemChance(player, ItemID.JungleKey, 5); DropHelper.DropItem(player, ModContent.ItemType()); - DropHelper.DropItem(player, ModContent.ItemType()); break; case ItemID.GolemBossBag: @@ -204,11 +199,6 @@ namespace CalamityMod.Items DropHelper.DropItem(player, ModContent.ItemType()); break; - case ItemID.CultistBossBag: - DropHelper.DropItem(player, ModContent.ItemType()); - DropHelper.DropItem(player, ModContent.ItemType()); - break; - case ItemID.MoonLordBossBag: // Drop weapons Calamity style instead of mutually exclusive -- this includes Calamity weapons. int[] moonLordWeapons = new int[] diff --git a/Items/TreasureBags/CrabulonBag.cs b/Items/TreasureBags/CrabulonBag.cs index 9d1a5b7b00..7ad0e87be8 100644 --- a/Items/TreasureBags/CrabulonBag.cs +++ b/Items/TreasureBags/CrabulonBag.cs @@ -58,7 +58,6 @@ namespace CalamityMod.Items.TreasureBags // Equipment DropHelper.DropItem(player, ModContent.ItemType()); DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge && !player.Calamity().rageBoostOne); - DropHelper.DropItem(player, ModContent.ItemType()); // Vanity DropHelper.DropItemChance(player, ModContent.ItemType(), 7); diff --git a/Items/TreasureBags/CryogenBag.cs b/Items/TreasureBags/CryogenBag.cs index a24667db56..704fba349e 100644 --- a/Items/TreasureBags/CryogenBag.cs +++ b/Items/TreasureBags/CryogenBag.cs @@ -59,7 +59,6 @@ namespace CalamityMod.Items.TreasureBags DropHelper.WeightStack(w) ); DropHelper.DropItem(player, ModContent.ItemType()); - DropHelper.DropItem(player, ModContent.ItemType()); // Equipment DropHelper.DropItem(player, ModContent.ItemType()); diff --git a/Items/TreasureBags/HiveMindBag.cs b/Items/TreasureBags/HiveMindBag.cs index 892614c89e..44bf053875 100644 --- a/Items/TreasureBags/HiveMindBag.cs +++ b/Items/TreasureBags/HiveMindBag.cs @@ -59,7 +59,6 @@ namespace CalamityMod.Items.TreasureBags DropHelper.WeightStack(w), DropHelper.WeightStack(w, 50, 75) ); - DropHelper.DropItem(player, ModContent.ItemType()); // Equipment DropHelper.DropItem(player, ModContent.ItemType()); diff --git a/Items/TreasureBags/PerforatorBag.cs b/Items/TreasureBags/PerforatorBag.cs index 17ea5e85f3..9f0b4aa19a 100644 --- a/Items/TreasureBags/PerforatorBag.cs +++ b/Items/TreasureBags/PerforatorBag.cs @@ -60,7 +60,6 @@ namespace CalamityMod.Items.TreasureBags DropHelper.WeightStack(w), DropHelper.WeightStack(w, 50, 75) ); - DropHelper.DropItem(player, ModContent.ItemType()); // Equipment DropHelper.DropItem(player, ModContent.ItemType()); diff --git a/Items/Weapons/Rogue/Quasar.cs b/Items/Weapons/Rogue/Quasar.cs deleted file mode 100644 index 3bfa789fec..0000000000 --- a/Items/Weapons/Rogue/Quasar.cs +++ /dev/null @@ -1,49 +0,0 @@ -using CalamityMod.Projectiles.Rogue; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.Rogue -{ - public class Quasar : RogueWeapon - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Quasar"); - Tooltip.SetDefault("Succ\n" + - "Stealth strikes spawn more explosions"); - } - - public override void SafeSetDefaults() - { - item.width = 52; - item.damage = 64; - item.noMelee = true; - item.noUseGraphic = true; - item.useAnimation = 12; - item.useStyle = ItemUseStyleID.SwingThrow; - item.useTime = 12; - item.knockBack = 0f; - item.UseSound = SoundID.Item1; - item.autoReuse = true; - item.height = 48; - item.value = CalamityGlobalItem.Rarity9BuyPrice; - item.rare = ItemRarityID.Cyan; - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 20f; - item.Calamity().rogue = true; - } - - // Terraria seems to really dislike high crit values in SetDefaults - public override void GetWeaponCrit(Player player, ref int crit) => crit += 12; - - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - int knife = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); - if (knife.WithinBounds(Main.maxProjectiles)) - Main.projectile[knife].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); - return false; - } - } -} diff --git a/Items/Weapons/Rogue/Quasar.png b/Items/Weapons/Rogue/Quasar.png deleted file mode 100644 index ff391ecb50..0000000000 Binary files a/Items/Weapons/Rogue/Quasar.png and /dev/null differ diff --git a/Items/Weapons/Rogue/RadiantStar.cs b/Items/Weapons/Rogue/RadiantStar.cs index 5f30eb0029..cdba3b3bae 100644 --- a/Items/Weapons/Rogue/RadiantStar.cs +++ b/Items/Weapons/Rogue/RadiantStar.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Radiant Star"); Tooltip.SetDefault("Throws daggers that explode and split after a while\n" + - "Stealth strike splits more with a devastating explosion"); + "Stealth strike splits more with a devastating explosion and sucks enemies in"); } public override void SafeSetDefaults() diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 8b42e18b98..073da7a015 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -279,7 +279,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Crabulon", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemID.GlowingMushroom, ItemID.MushroomGrassSeeds, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List loot = new List() { ItemType(), ItemID.GlowingMushroom, ItemID.MushroomGrassSeeds, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}] in the Mushroom Biome"; string despawn = CalamityUtils.ColorMessage("The mycleium crab has lost interest.", new Color(0x64, 0x95, 0xED)); @@ -291,7 +291,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("HiveMind", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemID.DemoniteBar, ItemID.RottenChunk, ItemID.CorruptSeeds, ItemID.CursedFlame, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemID.DemoniteBar, ItemID.RottenChunk, ItemID.CorruptSeeds, ItemID.CursedFlame, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Kill a Cyst in the Corruption or use a [i:{summon}] in the Corruption"; string despawn = CalamityUtils.ColorMessage("The corrupted colony began searching for a new breeding ground.", new Color(0x94, 0x00, 0xD3)); @@ -303,7 +303,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Perforators", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemID.CrimtaneBar, ItemID.Vertebrae, ItemID.CrimsonSeeds, ItemID.Ichor, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemID.CrimtaneBar, ItemID.Vertebrae, ItemID.CrimsonSeeds, ItemID.Ichor, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Kill a Cyst in the Crimson or use a [i:{summon}] in the Crimson"; string despawn = CalamityUtils.ColorMessage("The parasitic hive began searching for a new host.", new Color(0xDC, 0x14, 0x3C)); @@ -327,7 +327,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Cryogen", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}] in the Snow Biome"; string despawn = CalamityUtils.ColorMessage("Cryogen drifts away, carried on a freezing wind.", new Color(0x00, 0xFF, 0xFF)); @@ -702,13 +702,13 @@ namespace CalamityMod // Skeletron AddLoot(bossChecklist, "SkeletronHead", - new List() { ItemType() }, + null, new List() { ItemType() } ); // Wall of Flesh AddLoot(bossChecklist, "WallofFlesh", - new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey }, + new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey }, new List() { ItemType(), ItemType(), ItemType() } ); @@ -732,7 +732,7 @@ namespace CalamityMod // Plantera AddLoot(bossChecklist, "Plantera", - new List() { ItemType(), ItemType(), ItemType(), ItemID.JungleKey, ItemType() }, + new List() { ItemType(), ItemType(), ItemType(), ItemID.JungleKey }, new List() { ItemType() } ); AddSummons(bossChecklist, "Plantera", new List() { ItemType() }); @@ -758,7 +758,7 @@ namespace CalamityMod // Lunatic Cultist AddLoot(bossChecklist, "CultistBoss", - new List() { ItemType(), ItemType() }, + null, new List() { ItemType(), ItemType() } ); AddSummons(bossChecklist, "CultistBoss", new List() { ItemType() }); diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index b8c045e3f2..b123d9d77c 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -503,6 +503,7 @@ namespace CalamityMod.NPCs.Abyss DropHelper.DropItem(npc, ModContent.ItemType(), 30, 40); DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedPolterghast, 3, 1, 1); DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedPolterghast, 3, 1, 1); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); int minLumenyl = Main.expertMode ? 8 : 6; int maxLumenyl = Main.expertMode ? 11 : 8; DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1f, minLumenyl, maxLumenyl); diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 5856c780db..1463ec7241 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -122,6 +122,7 @@ namespace CalamityMod.NPCs ItemID.BeeKeeper, ItemID.BeesKnees, ItemID.BeeGun, + ModContent.ItemType() }; // It's already 33.33% in vanilla normal, so we shouldn't lower the drop rate to 25% DropHelper.DropEntireSet(npc, DropHelper.BagWeaponDropRateFloat, queenBeeWeapons); @@ -133,8 +134,6 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, ItemID.Stinger, !Main.expertMode, 5, 10); // Extra stingers DropHelper.DropItemCondition(npc, ModContent.ItemType(), !Main.expertMode, 30, 50); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !NPC.downedQueenBee); SetNewShopVariable(new int[] { NPCID.ArmsDealer, NPCID.Dryad }, NPC.downedQueenBee); SetNewBossJustDowned(npc); @@ -145,8 +144,6 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, ItemID.BoneGlove, true, !Main.expertMode); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !NPC.downedBoss3); SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad, NPCID.Demolitionist }, NPC.downedBoss3); SetNewBossJustDowned(npc); @@ -164,6 +161,7 @@ namespace CalamityMod.NPCs ItemID.LaserRifle, ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType() }; DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, wofWeapons); DropHelper.BlockDrops(wofWeapons); @@ -306,7 +304,6 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, ItemID.JungleKey, !Main.expertMode, 5, 1, 1); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !NPC.downedPlantBoss); SetNewShopVariable(new int[] { NPCID.WitchDoctor, NPCID.Truffle, ModContent.NPCType(), ModContent.NPCType() }, NPC.downedPlantBoss); @@ -430,9 +427,6 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.CultistBoss) { - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !NPC.downedAncientCultist); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, Main.bloodMoon); SetNewBossJustDowned(npc); @@ -515,6 +509,10 @@ namespace CalamityMod.NPCs CalamityUtils.DisplayLocalizedText(key4, messageColor4); } } + else if (npc.type == NPCID.Clothier) + { + DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode); + } else if (npc.type == NPCID.RedDevil) { DropHelper.DropItemChance(npc, ItemID.FireFeather, 0.1f); diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 7454535a55..66b679ea7d 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -731,8 +731,6 @@ namespace CalamityMod.NPCs.Crabulon DropHelper.DropBags(npc); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedCrabulon); diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index c63e014637..73491f33cb 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -1055,7 +1055,6 @@ namespace CalamityMod.NPCs.Cryogen DropHelper.DropBags(npc); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedCryogen); diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 95b88a5f86..d7db4cf49f 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -1097,8 +1097,6 @@ namespace CalamityMod.NPCs.HiveMind DropHelper.DropBags(npc); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedHiveMind); diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index a183d5ff65..86d2984e19 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -1,3 +1,4 @@ +using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; using Microsoft.Xna.Framework; @@ -5,6 +6,7 @@ using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.NPCs.NormalNPCs { public class ShockstormShuttle : ModNPC @@ -392,6 +394,7 @@ namespace CalamityMod.NPCs.NormalNPCs { DropHelper.DropItemCondition(npc, ItemID.MartianConduitPlating, NPC.downedGolemBoss, 1, 10, 30); DropHelper.DropItemChance(npc, ModContent.ItemType(), 3); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); } } } diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 25341bb48d..2b4453eb91 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -474,8 +474,6 @@ namespace CalamityMod.NPCs.Perforator DropHelper.DropBags(npc); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !Main.expertMode); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedPerforator); diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index 41f13fe171..65e86775e3 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -17,6 +17,7 @@ using Terraria.GameContent.Events; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; + namespace CalamityMod.NPCs.TownNPCs { [AutoloadHead] @@ -147,6 +148,8 @@ namespace CalamityMod.NPCs.TownNPCs nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + nextSlot++; } if (NPC.downedChristmasIceQueen && NPC.downedChristmasTree && NPC.downedChristmasSantank) { diff --git a/Projectiles/Rogue/Quasar2.cs b/Projectiles/Rogue/Quasar2.cs deleted file mode 100644 index 02951b4af3..0000000000 --- a/Projectiles/Rogue/Quasar2.cs +++ /dev/null @@ -1,104 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Rogue -{ - public class Quasar2 : ModProjectile - { - public override string Texture => "CalamityMod/Items/Weapons/Rogue/Quasar"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Quasar"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } - - public override void SetDefaults() - { - projectile.width = 24; - projectile.height = 24; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.penetrate = 1; - projectile.timeLeft = 300; - projectile.Calamity().rogue = true; - } - - public override void AI() - { - projectile.rotation = projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 600f; - for (int num475 = 0; num475 < Main.maxNPCs; num475++) - { - if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) - { - float npcCenterX = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); - float npcCenterY = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); - float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - npcCenterX) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - npcCenterY); - if (num478 < num474) - { - if (Main.npc[num475].position.X < num472) - { - Main.npc[num475].velocity.X += 0.25f; - } - else - { - Main.npc[num475].velocity.X -= 0.25f; - } - if (Main.npc[num475].position.Y < num473) - { - Main.npc[num475].velocity.Y += 0.25f; - } - else - { - Main.npc[num475].velocity.Y -= 0.25f; - } - } - } - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - } - - public override void OnHitPvp(Player target, int damage, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return false; - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, ModContent.DustType(), projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - if (projectile.Calamity().stealthStrike && projectile.owner == Main.myPlayer) - { - int boomer = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(projectile.damage * 0.5f), projectile.knockBack, projectile.owner, 0f, 1f); - if (boomer.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[boomer].Calamity().stealthStrike = true; - Main.projectile[boomer].height = Main.projectile[boomer].width = 280; - Main.projectile[boomer].Center = projectile.Center; - } - } - } - } -} diff --git a/Projectiles/Rogue/QuasarKnife.cs b/Projectiles/Rogue/QuasarKnife.cs deleted file mode 100644 index 0bdf26a5c0..0000000000 --- a/Projectiles/Rogue/QuasarKnife.cs +++ /dev/null @@ -1,123 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Rogue -{ - public class QuasarKnife : ModProjectile - { - public override string Texture => "CalamityMod/Items/Weapons/Rogue/Quasar"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Quasar"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } - - public override void SetDefaults() - { - projectile.width = 24; - projectile.height = 24; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.penetrate = 4; - projectile.timeLeft = 300; - projectile.Calamity().rogue = true; - } - - public override void AI() - { - projectile.rotation = projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 600f; - for (int num475 = 0; num475 < Main.maxNPCs; num475++) - { - if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) - { - float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); - float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); - float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); - if (num478 < num474) - { - if (Main.npc[num475].position.X < num472) - { - Main.npc[num475].velocity.X += 0.25f; - } - else - { - Main.npc[num475].velocity.X -= 0.25f; - } - if (Main.npc[num475].position.Y < num473) - { - Main.npc[num475].velocity.Y += 0.25f; - } - else - { - Main.npc[num475].velocity.Y -= 0.25f; - } - } - } - } - projectile.ai[1] += 1f; - if (projectile.ai[1] == 25f) - { - int numProj = 2; - float rotation = MathHelper.ToRadians(50); - if (projectile.owner == Main.myPlayer) - { - for (int i = 0; i < numProj + 1; i++) - { - Vector2 speed = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); - while (speed.X == 0f && speed.Y == 0f) - { - speed = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); - } - speed.Normalize(); - speed *= (float)Main.rand.Next(30, 61) * 0.1f * 2.5f; - int knife = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[knife].Calamity().stealthStrike = projectile.Calamity().stealthStrike; - if (projectile.Calamity().stealthStrike) - { - Main.projectile[knife].timeLeft = 120; - } - } - Main.PlaySound(SoundID.Item14, projectile.position); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - projectile.active = false; - } - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - } - - public override void OnHitPvp(Player target, int damage, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return false; - } - - public override void Kill(int timeLeft) - { - Main.PlaySound(SoundID.Item27, projectile.position); - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, ModContent.DustType(), projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } - } -} diff --git a/Projectiles/Rogue/RadiantExplosion.cs b/Projectiles/Rogue/RadiantExplosion.cs index 4fec6b4f2f..18c04f5bb6 100644 --- a/Projectiles/Rogue/RadiantExplosion.cs +++ b/Projectiles/Rogue/RadiantExplosion.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue } } - if (projectile.ai[1] == 1f) //Quasar Stealth Strike + if (projectile.Calamity().stealthStrike) { float num472 = projectile.Center.X; float num473 = projectile.Center.Y;