diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 54785253f2..454d5e50a2 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -257,6 +257,7 @@ namespace CalamityMod.CalPlayer public int throwingCrit = 0; public bool throwingAmmoCost75 = false; public bool throwingAmmoCost66 = false; + public bool throwingAmmoCost55 = false; public bool throwingAmmoCost50 = false; #endregion @@ -633,6 +634,11 @@ namespace CalamityMod.CalPlayer public bool auricBoost = false; public bool daedalusReflect = false; public bool daedalusSplit = false; + public bool titanHeartSet = false; + public bool titanHeartMask = false; + public bool titanHeartMantle = false; + public bool titanHeartBoots = false; + public int titanCooldown = 0; public bool umbraphileSet = false; public bool reaverBlast = false; public bool reaverBurst = false; @@ -1323,6 +1329,7 @@ namespace CalamityMod.CalPlayer throwingCrit = 0; throwingAmmoCost75 = false; throwingAmmoCost66 = false; + throwingAmmoCost55 = false; throwingAmmoCost50 = false; accStealthGenBoost = 0f; @@ -1627,6 +1634,10 @@ namespace CalamityMod.CalPlayer statigelSet = false; + titanHeartSet = false; + titanHeartMask = false; + titanHeartMantle = false; + titanHeartBoots = false; umbraphileSet = false; plagueReaper = false; plaguebringerPatronSet = false; @@ -1984,8 +1995,6 @@ namespace CalamityMod.CalPlayer hallowedRuneCooldown = 0; doubledHorror = false; sulphurBubbleCooldown = 0; - forbiddenCooldown = 0; - tornadoCooldown = 0; ladHearts = 0; prismaticLasers = 0; @@ -2049,6 +2058,7 @@ namespace CalamityMod.CalPlayer throwingCrit = 0; throwingAmmoCost75 = false; throwingAmmoCost66 = false; + throwingAmmoCost55 = false; throwingAmmoCost50 = false; #endregion @@ -2205,6 +2215,11 @@ namespace CalamityMod.CalPlayer reaverDoubleTap = false; shadeRegen = false; dsSetBonus = false; + titanHeartSet = false; + titanHeartMask = false; + titanHeartMantle = false; + titanHeartBoots = false; + titanCooldown = 0; umbraphileSet = false; reaverBlast = false; reaverBurst = false; @@ -2233,6 +2248,8 @@ namespace CalamityMod.CalPlayer desertProwler = false; snowRuffianSet = false; forbiddenCirclet = false; + forbiddenCooldown = 0; + tornadoCooldown = 0; eskimoSet = false; //vanilla armor meteorSet = false; //vanilla armor, for Space Gun nerf victideSet = false; @@ -4165,6 +4182,26 @@ namespace CalamityMod.CalPlayer { knockback *= 1.09f; } + if (titanHeartMask && item.Calamity().rogue) + { + knockback *= 1.05f; + } + if (titanHeartMantle && item.Calamity().rogue) + { + knockback *= 1.05f; + } + if (titanHeartBoots && item.Calamity().rogue) + { + knockback *= 1.05f; + } + if (titanHeartSet && item.Calamity().rogue) + { + knockback *= 1.2f; + } + if (titanHeartSet && StealthStrikeAvailable() && item.Calamity().rogue) + { + knockback *= 2f; + } bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; if (etherealExtorter) { @@ -7159,6 +7196,18 @@ namespace CalamityMod.CalPlayer Main.PlaySound(SoundID.FemaleHit, (int)player.position.X, (int)player.position.Y, 1, 1f, 0f); //female hit noise hurtSoundTimer = 10; } + else if (titanHeartSet) + { + playSound = false; + Terraria.Audio.LegacySoundStyle atlasHurt = Utils.SelectRandom(Main.rand, new Terraria.Audio.LegacySoundStyle[] + { + mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt0"), + mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt1"), + mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt2") + }); + Main.PlaySound(atlasHurt, (int)player.position.X, (int)player.position.Y); + hurtSoundTimer = 10; + } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index aead4800e3..b142dd257b 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -986,6 +986,8 @@ namespace CalamityMod.CalPlayer modPlayer.prismaticLasers--; if (modPlayer.dogTextCooldown > 0) modPlayer.dogTextCooldown--; + if (modPlayer.titanCooldown > 0) + modPlayer.titanCooldown--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusVisor.cs index 1fee11c457..a61a43b5b4 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusVisor.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.Calamity(); modPlayer.daedalusSplit = true; modPlayer.rogueStealthMax += 1.05f; - player.Calamity().throwingDamage += 0.05f; - player.Calamity().wearingRogueArmor = true; + modPlayer.throwingDamage += 0.05f; + modPlayer.wearingRogueArmor = true; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/StatigelArmor.cs b/Items/Armor/StatigelArmor.cs index 86fe23c7e0..42fbd4e999 100644 --- a/Items/Armor/StatigelArmor.cs +++ b/Items/Armor/StatigelArmor.cs @@ -26,10 +26,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.meleeCrit += 5; - player.magicCrit += 5; - player.rangedCrit += 5; - player.Calamity().throwingCrit += 5; + player.Calamity().AllCritBoost(5); } public override void AddRecipes() diff --git a/Items/Armor/TitanHeartBoots.cs b/Items/Armor/TitanHeartBoots.cs new file mode 100644 index 0000000000..68ced6a884 --- /dev/null +++ b/Items/Armor/TitanHeartBoots.cs @@ -0,0 +1,42 @@ +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Legs)] + public class TitanHeartBoots : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titan Heart Boots"); + Tooltip.SetDefault("10% increased rogue velocity and 5% boosted rogue knockback"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.buyPrice(0, 12, 0, 0); + item.rare = 5; + item.defense = 14; + } + + public override void UpdateEquip(Player player) + { + player.Calamity().titanHeartBoots = true; + player.Calamity().throwingVelocity += 0.1f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 14); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/TitanHeartBoots.png b/Items/Armor/TitanHeartBoots.png new file mode 100644 index 0000000000..97012de069 Binary files /dev/null and b/Items/Armor/TitanHeartBoots.png differ diff --git a/Items/Armor/TitanHeartBoots_Legs.png b/Items/Armor/TitanHeartBoots_Legs.png new file mode 100644 index 0000000000..dbd89ea24a Binary files /dev/null and b/Items/Armor/TitanHeartBoots_Legs.png differ diff --git a/Items/Armor/TitanHeartMantle.cs b/Items/Armor/TitanHeartMantle.cs new file mode 100644 index 0000000000..5ddc500f41 --- /dev/null +++ b/Items/Armor/TitanHeartMantle.cs @@ -0,0 +1,43 @@ +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Body)] + public class TitanHeartMantle : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titan Heart Mantle"); + Tooltip.SetDefault("45% chance to not consume rogue items\n" + + "5% boosted rogue knockback but 20% lowered rogue shoot speed"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.buyPrice(0, 12, 0, 0); + item.rare = 5; + item.defense = 17; + } + + public override void UpdateEquip(Player player) + { + player.Calamity().titanHeartMantle = true; + player.Calamity().throwingAmmoCost55 = true; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/TitanHeartMantle.png b/Items/Armor/TitanHeartMantle.png new file mode 100644 index 0000000000..fa0b8a8c39 Binary files /dev/null and b/Items/Armor/TitanHeartMantle.png differ diff --git a/Items/Armor/TitanHeartMantle_Arms.png b/Items/Armor/TitanHeartMantle_Arms.png new file mode 100644 index 0000000000..871f504511 Binary files /dev/null and b/Items/Armor/TitanHeartMantle_Arms.png differ diff --git a/Items/Armor/TitanHeartMantle_Body.png b/Items/Armor/TitanHeartMantle_Body.png new file mode 100644 index 0000000000..2aeac92624 Binary files /dev/null and b/Items/Armor/TitanHeartMantle_Body.png differ diff --git a/Items/Armor/TitanHeartMask.cs b/Items/Armor/TitanHeartMask.cs new file mode 100644 index 0000000000..db9b696842 --- /dev/null +++ b/Items/Armor/TitanHeartMask.cs @@ -0,0 +1,64 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Head)] + public class TitanHeartMask : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titan Heart Mask"); + Tooltip.SetDefault("5% increased rogue damage and knockback"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.buyPrice(0, 12, 0, 0); + item.rare = 5; + item.defense = 12; //43 + } + + public override bool IsArmorSet(Item head, Item body, Item legs) + { + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + } + + public override void UpdateArmorSet(Player player) + { + player.setBonus = "20% increased rogue damage and knockback\n" + + "Stealth strikes deal double knockback and cause an astral explosion\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.titanHeartSet = true; + modPlayer.throwingDamage += 0.2f; + modPlayer.rogueStealthMax += 1f; + modPlayer.wearingRogueArmor = true; + } + + public override void UpdateEquip(Player player) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.titanHeartMask = true; + modPlayer.throwingDamage += 0.05f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/TitanHeartMask.png b/Items/Armor/TitanHeartMask.png new file mode 100644 index 0000000000..2d29c5f4a3 Binary files /dev/null and b/Items/Armor/TitanHeartMask.png differ diff --git a/Items/Armor/TitanHeartMask_Head.png b/Items/Armor/TitanHeartMask_Head.png new file mode 100644 index 0000000000..0da57b829a Binary files /dev/null and b/Items/Armor/TitanHeartMask_Head.png differ diff --git a/Items/Materials/TitanHeart.cs b/Items/Materials/TitanHeart.cs new file mode 100644 index 0000000000..3f74cd0867 --- /dev/null +++ b/Items/Materials/TitanHeart.cs @@ -0,0 +1,19 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Materials +{ + public class TitanHeart : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titan Heart"); + } + + public override void SetDefaults() + { + item.CloneDefaults(ItemID.AncientBattleArmorMaterial); + } + } +} diff --git a/Items/Materials/TitanHeart.png b/Items/Materials/TitanHeart.png new file mode 100644 index 0000000000..834d516b56 Binary files /dev/null and b/Items/Materials/TitanHeart.png differ diff --git a/Items/Weapons/Rogue/RogueWeapon.cs b/Items/Weapons/Rogue/RogueWeapon.cs index 13f3d07d1d..2b3318cd0d 100644 --- a/Items/Weapons/Rogue/RogueWeapon.cs +++ b/Items/Weapons/Rogue/RogueWeapon.cs @@ -92,6 +92,8 @@ namespace CalamityMod.Items.Weapons.Rogue rogueAS -= 0.2f; if (player.Calamity().gloveOfRecklessness) rogueAS += 0.2f; + if (player.Calamity().titanHeartMantle) + rogueAS -= 0.2f; return rogueAS; } @@ -135,6 +137,11 @@ namespace CalamityMod.Items.Weapons.Rogue if (Main.rand.Next(1, 101) > 50) return false; } + if (player.Calamity().throwingAmmoCost55) + { + if (Main.rand.Next(1, 101) > 55) + return false; + } if (player.Calamity().throwingAmmoCost66) { if (Main.rand.Next(1, 101) > 66) diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index 82b3dddb13..57478d54b2 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -1,3 +1,4 @@ +using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -39,11 +40,14 @@ namespace CalamityMod.NPCs.AquaticScourge npc.dontCountMe = true; npc.chaseable = false; npc.canGhostHeal = false; - if (Main.expertMode) - { - npc.scale = 1.15f; - } - } + + if (CalamityWorld.death || CalamityWorld.bossRushActive) + npc.scale = 1.2f; + else if (CalamityWorld.revenge) + npc.scale = 1.15f; + else if (Main.expertMode) + npc.scale = 1.1f; + } public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) { diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 36599322df..7c757d090d 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -1,3 +1,4 @@ +using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -39,11 +40,14 @@ namespace CalamityMod.NPCs.AquaticScourge npc.dontCountMe = true; npc.chaseable = false; npc.canGhostHeal = false; - if (Main.expertMode) - { - npc.scale = 1.15f; - } - } + + if (CalamityWorld.death || CalamityWorld.bossRushActive) + npc.scale = 1.2f; + else if (CalamityWorld.revenge) + npc.scale = 1.15f; + else if (Main.expertMode) + npc.scale = 1.1f; + } public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) { diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index e50a123e29..61f704b9e1 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.AquaticScourge { npc.npcSlots = 16f; npc.damage = 80; - npc.width = 100; + npc.width = 90; npc.height = 90; npc.defense = 10; npc.DR_NERD(0.1f); @@ -57,10 +57,13 @@ namespace CalamityMod.NPCs.AquaticScourge npc.DeathSound = SoundID.NPCDeath1; npc.netAlways = true; bossBag = ModContent.ItemType(); - if (Main.expertMode) - { - npc.scale = 1.15f; - } + + if (CalamityWorld.death || CalamityWorld.bossRushActive) + npc.scale = 1.2f; + else if (CalamityWorld.revenge) + npc.scale = 1.15f; + else if (Main.expertMode) + npc.scale = 1.1f; } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 05b29875a0..e7e675c560 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -1,3 +1,4 @@ +using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -15,8 +16,8 @@ namespace CalamityMod.NPCs.AquaticScourge public override void SetDefaults() { npc.damage = 45; - npc.width = 30; - npc.height = 50; + npc.width = 32; + npc.height = 32; npc.defense = 25; npc.DR_NERD(0.15f); npc.aiStyle = -1; @@ -39,11 +40,14 @@ namespace CalamityMod.NPCs.AquaticScourge npc.dontCountMe = true; npc.chaseable = false; npc.canGhostHeal = false; - if (Main.expertMode) - { - npc.scale = 1.15f; - } - } + + if (CalamityWorld.death || CalamityWorld.bossRushActive) + npc.scale = 1.2f; + else if (CalamityWorld.revenge) + npc.scale = 1.15f; + else if (Main.expertMode) + npc.scale = 1.1f; + } public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) { diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.png b/NPCs/AquaticScourge/AquaticScourgeTail.png index 93fe7cd462..c6f723a2a0 100644 Binary files a/NPCs/AquaticScourge/AquaticScourgeTail.png and b/NPCs/AquaticScourge/AquaticScourgeTail.png differ diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index ce8c8f0e40..67f601ec44 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -635,8 +635,10 @@ namespace CalamityMod.NPCs.Astral int minStardust = Main.expertMode ? 7 : 6; int maxStardust = Main.expertMode ? 9 : 8; DropHelper.DropItem(npc, ModContent.ItemType(), minStardust, maxStardust); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedAstrageldon, 7, 1, 1); + DropHelper.DropItem(npc, ModContent.ItemType()); + //not guarantee to prevent inventory spam + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedAstrageldon, 7, 1, 1); } } } diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 3fb2b0e3a9..0d519c2756 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -1,3 +1,4 @@ +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Dusts; using CalamityMod.Events; @@ -125,7 +126,7 @@ namespace CalamityMod.NPCs } } else - npc.localAI[1] = (npc.Center.X - player.Center.X < 0 ? 1f : -1f); + npc.localAI[1] = npc.Center.X - player.Center.X < 0 ? 1f : -1f; } if (Main.netMode != NetmodeID.MultiplayerClient) @@ -135,7 +136,7 @@ namespace CalamityMod.NPCs // Spawn segments if (calamityGlobalNPC.newAI[2] == 0f && npc.ai[0] == 0f) { - int maxLength = death ? 41 : 31; + int maxLength = death ? 50 : revenge ? 40 : expertMode ? 35 : 30; int Previous = npc.whoAmI; for (int num36 = 0; num36 < maxLength; num36++) { @@ -143,9 +144,9 @@ namespace CalamityMod.NPCs if (num36 >= 0 && num36 < maxLength - 1) { if (num36 % 2 == 0) - lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); - else lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + else + lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); } else lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); @@ -2806,6 +2807,16 @@ namespace CalamityMod.NPCs Player player = Main.player[npc.target]; + // Inflict Extreme Gravity to nearby players + if (revenge) + { + if (Main.netMode != NetmodeID.Server) + { + if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < 5600f) + Main.player[Main.myPlayer].AddBuff(ModContent.BuffType(), 2); + } + } + // Life float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index d4b6be1ed3..1801c92868 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -7214,37 +7214,32 @@ namespace CalamityMod.NPCs if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 64f) { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (NPC.CountNPCS(NPCID.Probe) < 3) - NPC.NewNPC((int)npc.Center.X, (int)(npc.Center.Y + 4f), NPCID.Probe); - else - { - Vector2 vector16 = npc.Center; - float num159 = CalamityWorld.bossRushActive ? 6f : 4f; - float num160 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector16.X + Main.rand.Next(-20, 21); - float num161 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector16.Y + Main.rand.Next(-20, 21); - float num162 = (float)Math.Sqrt(num160 * num160 + num161 * num161); - num162 = num159 / num162; - num160 *= num162; - num161 *= num162; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Vector2 vector16 = npc.Center; + float num159 = CalamityWorld.bossRushActive ? 6f : 4f; + float num160 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector16.X + Main.rand.Next(-20, 21); + float num161 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector16.Y + Main.rand.Next(-20, 21); + float num162 = (float)Math.Sqrt(num160 * num160 + num161 * num161); + num162 = num159 / num162; + num160 *= num162; + num161 *= num162; - Vector2 value = new Vector2(num160 * 1f + Main.rand.Next(-50, 51) * 0.01f, num161 * 1f + Main.rand.Next(-50, 51) * 0.01f); - value.Normalize(); - value *= num159; - num160 = value.X; - num161 = value.Y; + Vector2 value = new Vector2(num160 * 1f + Main.rand.Next(-50, 51) * 0.01f, num161 * 1f + Main.rand.Next(-50, 51) * 0.01f); + value.Normalize(); + value *= num159; + num160 = value.X; + num161 = value.Y; - int num163 = 28; - if (death) - num163 += 3; - int num164 = ProjectileID.Skull; - vector16 += value * 5f; - int num165 = Projectile.NewProjectile(vector16.X, vector16.Y, num160, num161, num164, num163, 0f, Main.myPlayer, -1f, 0f); - Main.projectile[num165].timeLeft = 180; - Main.projectile[num165].tileCollide = false; - } - } + int num163 = 28; + if (death) + num163 += 3; + int num164 = ProjectileID.Skull; + vector16 += value * 5f; + int num165 = Projectile.NewProjectile(vector16.X, vector16.Y, num160, num161, num164, num163, 0f, Main.myPlayer, -1f, 0f); + Main.projectile[num165].timeLeft = 180; + Main.projectile[num165].tileCollide = false; + } } // Go to floating phase, or spinning phase if in phase 2 diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 36109b3678..cc5c553066 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -1546,6 +1546,9 @@ namespace CalamityMod.NPCs.Yharon case 3: npc.dontTakeDamage = phase4; break; + case 4: + npc.dontTakeDamage = false; + break; } if (!npc.dontTakeDamage) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 1de23377af..7cc82d659d 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1495,6 +1495,22 @@ namespace CalamityMod.Projectiles } } + if (modPlayer.titanHeartSet && stealthStrike && modPlayer.titanCooldown <= 0) + { + int dmg = (int)(85 + (projectile.damage * 0.05f)); + int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileType(), dmg, projectile.knockBack, projectile.owner, 0f, 0f); + Main.projectile[boom].Calamity().forceRogue = true; + Main.PlaySound(SoundID.Item14, projectile.position); + for (int dustexplode = 0; dustexplode < 360; dustexplode++) + { + Vector2 dustd = new Vector2(17f, 17f).RotatedBy(MathHelper.ToRadians(dustexplode)); + int d = Dust.NewDust(projectile.Center, projectile.width, projectile.height, Main.rand.NextBool(2) ? ModContent.DustType() : ModContent.DustType(), dustd.X, dustd.Y, 100, default, 3f); + Main.dust[d].noGravity = true; + Main.dust[d].position = projectile.Center; + } + modPlayer.titanCooldown = 15; + } + if (modPlayer.corrosiveSpine && projectile.type != ProjectileType() && projectile.type != ProjectileType() && projectile.type != ProjectileType()) { for (int i = 0; i < 3; i++) diff --git a/Projectiles/Magic/FabBolt.cs b/Projectiles/Magic/FabBolt.cs index cfbd639b34..8139dc9f72 100644 --- a/Projectiles/Magic/FabBolt.cs +++ b/Projectiles/Magic/FabBolt.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Magic projectile.height = 4; projectile.extraUpdates = 100; projectile.friendly = true; - projectile.timeLeft = 90; + projectile.timeLeft = 45; projectile.magic = true; } @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic Main.dust[num448].position = vector33; Main.dust[num448].noGravity = true; Main.dust[num448].noLight = true; - Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f; + Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.013f; Main.dust[num448].velocity *= 0.1f; } } diff --git a/Projectiles/Magic/FabOrb.cs b/Projectiles/Magic/FabOrb.cs index 636433db03..4d13216330 100644 --- a/Projectiles/Magic/FabOrb.cs +++ b/Projectiles/Magic/FabOrb.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Magic projectile.friendly = true; projectile.alpha = 255; projectile.penetrate = -1; - projectile.timeLeft = 300; + projectile.timeLeft = 30; projectile.magic = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; @@ -23,8 +23,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - if (projectile.timeLeft % 2f == projectile.ai[0]) - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 6f, 24f, 5, ModContent.ProjectileType()); + CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 150f, 6f, 6f, 2, ModContent.ProjectileType()); } } } diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index aeb81ceb28..90dcd7d976 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic { Lighting.AddLight(projectile.Center, 0.2f, 0.01f, 0.1f); projectile.ai[0] += 1f; - if (projectile.ai[0] % 9f == 0f && projectile.owner == Main.myPlayer) + if (projectile.ai[0] >= 6f && projectile.owner == Main.myPlayer) { Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, Main.rand.Next(2), 0f); } @@ -41,17 +41,6 @@ namespace CalamityMod.Projectiles.Magic Main.dust[pink].position = source; Main.dust[pink].scale = (float)Main.rand.Next(70, 110) * 0.013f; Main.dust[pink].velocity *= 0.1f; - /*for (int i = 0; i < 2; i++) - { - Vector2 source = projectile.position; - source -= projectile.velocity * ((float)i * 0.25f); - int pink = Dust.NewDust(source, 1, 1, 234, 0f, 0f, 0, default, 1.25f); - Main.dust[pink].noGravity = true; - Main.dust[pink].noLight = true; - Main.dust[pink].position = source; - Main.dust[pink].scale = (float)Main.rand.Next(70, 110) * 0.013f; - Main.dust[pink].velocity *= 0.1f; - }*/ } }