diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 69f7664d61..8cc33852e4 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -940,7 +940,7 @@ namespace CalamityMod.CalPlayer Player.GiveUniversalIFrames(evolutionIFrames, true); modifiers.Cancel(); - evolutionLifeRegenCounter = 300; + evolutionLifeRegenCounter = 600; projTypeJustHitBy = proj.type; int cooldownDuration = (int)MathHelper.Lerp(BalancingConstants.EvolutionReflectCooldownMin, BalancingConstants.EvolutionReflectCooldownMax, cooldownDurationScalar); @@ -1052,7 +1052,7 @@ namespace CalamityMod.CalPlayer if (evolution) { if (proj.type == projTypeJustHitBy) - projectileDamageReduction += 0.2; + projectileDamageReduction += 0.25; } if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 4a0a14505e..39b62cfddb 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -617,10 +617,8 @@ namespace CalamityMod.CalPlayer if (trinketOfChi || chiRegen) Player.lifeRegen += 2; - // Remember this is for 5 seconds after triggering a reflect with a long cooldown if (evolutionLifeRegenCounter > 0) { - Player.lifeRegen += 12; if (Player.lifeRegenTime < 3600f) Player.lifeRegenTime = 3600f; } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 791b21e655..31a063dafc 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -308,7 +308,7 @@ namespace CalamityMod.CalPlayer if (dashStart) { Player.velocity.X *= 3f; // +200% dash speed - int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage + 300); + int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage); Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI); } @@ -3588,11 +3588,11 @@ namespace CalamityMod.CalPlayer Player.velocity *= 0.98f; if (molluskHelmet) - Player.velocity.X *= 0.994f; + Player.velocity.X *= 0.995f; if (molluskChest) - Player.velocity.X *= 0.994f; + Player.velocity.X *= 0.995f; if (molluskLegs) - Player.velocity.X *= 0.994f; + Player.velocity.X *= 0.995f; if ((warped || caribbeanRum) && !Player.slowFall && !Player.mount.Active) { diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index e1ebbd3f93..71225929dd 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -575,6 +575,7 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 108 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 108 } }, { new Tuple(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 26, 44, 60, 76, 114 } }, { new Tuple(NPCID.EaterofWorldsHead, ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, diff --git a/Items/Accessories/LeviathanAmbergris.cs b/Items/Accessories/LeviathanAmbergris.cs index 07c635deb3..29b3f78836 100644 --- a/Items/Accessories/LeviathanAmbergris.cs +++ b/Items/Accessories/LeviathanAmbergris.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public class LeviathanAmbergris : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public static int ambergrisDashDamage = 350; + public static int ambergrisDashDamage = 650; public override void SetDefaults() { Item.width = 20; diff --git a/Items/Accessories/SandSharkToothNecklace.cs b/Items/Accessories/SandSharkToothNecklace.cs index c18875f349..48c7b5d494 100644 --- a/Items/Accessories/SandSharkToothNecklace.cs +++ b/Items/Accessories/SandSharkToothNecklace.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.GetDamage() += 0.06f; + player.GetDamage() += 0.1f; player.GetArmorPenetration() += 10; } diff --git a/Items/Accessories/WulfrumBattery.cs b/Items/Accessories/WulfrumBattery.cs index efa3e9f2ac..6fa9f06057 100644 --- a/Items/Accessories/WulfrumBattery.cs +++ b/Items/Accessories/WulfrumBattery.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Items.Accessories { public override void AI(Projectile projectile) { - if (!projectile.npcProj && !projectile.trap && projectile.minion && !ProjectileID.Sets.MinionShot[projectile.type] && Main.player[projectile.owner].GetModPlayer().battery) + if (!projectile.npcProj && !projectile.trap && (projectile.minion||projectile.sentry) && !ProjectileID.Sets.MinionShot[projectile.type] && !ProjectileID.Sets.SentryShot[projectile.type] && Main.player[projectile.owner].GetModPlayer().battery) { float lightMult = 1f; if (Lighting.UpdateEveryFrame) //The light loks wayyy too bright in retro/trippy diff --git a/Items/Armor/Auric/AuricTeslaBodyArmor.cs b/Items/Armor/Auric/AuricTeslaBodyArmor.cs index caa5cbe2cc..f3b1a5205e 100644 --- a/Items/Armor/Auric/AuricTeslaBodyArmor.cs +++ b/Items/Armor/Auric/AuricTeslaBodyArmor.cs @@ -1,4 +1,5 @@ -using CalamityMod.CalPlayer; +using System.Collections.Generic; +using CalamityMod.CalPlayer; using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.GodSlayer; using CalamityMod.Items.Armor.Silva; @@ -6,6 +7,7 @@ using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,6 +17,13 @@ namespace CalamityMod.Items.Armor.Auric [AutoloadEquip(EquipType.Body)] public class AuricTeslaBodyArmor : ModItem, ILocalizedModType { + + public static int setBonusTooltipNumber = 0; //Set this to zero so the first Shift pressed will increment it to 1. + public static bool holdingShift = false; + public static Color tooltipTarragonColor = new(194, 255, 194); + public static Color tooltipBloodflareColor = new(255, 195, 194); + public static Color tooltipSilvaColor = new(246, 255, 194); + public static Color tooltipGodslayerColor = new(204, 194, 255); public new string LocalizationCategory => "Items.Armor.PostMoonLord"; public override void Load() { @@ -42,6 +51,18 @@ namespace CalamityMod.Items.Armor.Auric player.GetDamage() += 0.08f; player.GetCritChance() += 5; } + public override void ModifyTooltips(List tooltips) + { + //This just runs the ModifyTooltips for whatever helmet is equipped if a full auric set is equipped; but runs it on this item's tooltips. + //This is a simple way to copy the tooltip edits for the set bonuses and have it adapt to helmet type. + //If we ever add a way for auricSet to be TRUE without a helmet on, this will need to be changed. + //If the helmet's ModifyTooltips is changed to do more than just the Set Bonus, their Set Bonus modification should be moved into it's own method, and have that called both here and in the helmet's ModifyTooltips. + //Alternatively, their ModifyTooltips could simply return early if the item ID doesn't match the helmet type. + if (Main.LocalPlayer.Calamity().auricSet) + { + Main.LocalPlayer.armor[0].ModItem.ModifyTooltips(tooltips); + } + } public override void AddRecipes() { diff --git a/Items/Armor/Auric/AuricTeslaCuisses.cs b/Items/Armor/Auric/AuricTeslaCuisses.cs index 1cb579a498..267e888e12 100644 --- a/Items/Armor/Auric/AuricTeslaCuisses.cs +++ b/Items/Armor/Auric/AuricTeslaCuisses.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Armor.Bloodflare; +using System.Collections.Generic; +using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.GodSlayer; using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Tarragon; @@ -31,6 +32,18 @@ namespace CalamityMod.Items.Armor.Auric player.GetDamage() += 0.12f; player.GetCritChance() += 5; } + public override void ModifyTooltips(List tooltips) + { + //This just runs the ModifyTooltips for whatever helmet is equipped if a full auric set is equipped; but runs it on this item's tooltips. + //This is a simple way to copy the tooltip edits for the set bonuses and have it adapt to helmet type. + //If we ever add a way for auricSet to be TRUE without a helmet on, this will need to be changed. + //If the helmet's ModifyTooltips is changed to do more than just the Set Bonus, their Set Bonus modification should be moved into it's own method, and have that called both here and in the helmet's ModifyTooltips. + //Alternatively, their ModifyTooltips could simply return early if the item ID doesn't match the helmet type. + if (Main.LocalPlayer.Calamity().auricSet) + { + Main.LocalPlayer.armor[0].ModItem.ModifyTooltips(tooltips); + } + } public override void AddRecipes() { diff --git a/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs b/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs index db0aaa3a4e..70979a5a03 100644 --- a/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs @@ -1,12 +1,12 @@ -using CalamityMod.CalPlayer; +using System.Collections.Generic; using CalamityMod.CalPlayer.Dashes; -using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.GodSlayer; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -61,6 +61,34 @@ namespace CalamityMod.Items.Armor.Auric player.GetDamage() += 0.3f; player.GetCritChance() += 30; } + public override void ModifyTooltips(List tooltips) + { + ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift; + ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber; + if (Main.keyState.PressingShift()) + { + if (!holdingShift) + { + holdingShift = true; + setBonusTooltipNumber++; + if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1; + } + foreach (TooltipLine line in tooltips) + { + if (line.Name == "SetBonus") + { + Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor }; + var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}"); + line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format(CalamityKeybinds.ArmorSetBonusHotKey.TooltipHotkeyString()) : LocalizedText.Format()); + line.OverrideColor = armorColors[setBonusTooltipNumber - 1]; + } + } + } + else + { + holdingShift = false; + } + } public override void AddRecipes() { diff --git a/Items/Armor/Auric/AuricTeslaPlumedHelm.cs b/Items/Armor/Auric/AuricTeslaPlumedHelm.cs index 69eaa3d741..9be81d8673 100644 --- a/Items/Armor/Auric/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/Auric/AuricTeslaPlumedHelm.cs @@ -1,11 +1,12 @@ -using CalamityMod.CalPlayer.Dashes; -using CalamityMod.Items.Accessories; +using System.Collections.Generic; +using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.GodSlayer; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -63,6 +64,34 @@ namespace CalamityMod.Items.Armor.Auric player.GetCritChance() += 20; player.moveSpeed += 0.05f; } + public override void ModifyTooltips(List tooltips) + { + ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift; + ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber; + if (Main.keyState.PressingShift()) + { + if (!holdingShift) + { + holdingShift = true; + setBonusTooltipNumber++; + if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1; + } + foreach (TooltipLine line in tooltips) + { + if (line.Name == "SetBonus") + { + Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor }; + var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}"); + line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format() : LocalizedText.Format(CalamityKeybinds.ArmorSetBonusHotKey.TooltipHotkeyString())); + line.OverrideColor = armorColors[setBonusTooltipNumber - 1]; + } + } + } + else + { + holdingShift = false; + } + } public override void AddRecipes() { diff --git a/Items/Armor/Auric/AuricTeslaRoyalHelm.cs b/Items/Armor/Auric/AuricTeslaRoyalHelm.cs index 078a350ff0..9a66c641ab 100644 --- a/Items/Armor/Auric/AuricTeslaRoyalHelm.cs +++ b/Items/Armor/Auric/AuricTeslaRoyalHelm.cs @@ -1,13 +1,14 @@ -using CalamityMod.CalPlayer; +using System.Collections.Generic; using CalamityMod.CalPlayer.Dashes; -using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.GodSlayer; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Auric @@ -65,6 +66,34 @@ namespace CalamityMod.Items.Armor.Auric player.GetDamage() += 0.2f; player.GetCritChance() += 10; } + public override void ModifyTooltips(List tooltips) + { + ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift; + ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber; + if (Main.keyState.PressingShift()) + { + if (!holdingShift) + { + holdingShift = true; + setBonusTooltipNumber++; + if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1; + } + foreach (TooltipLine line in tooltips) + { + if (line.Name == "SetBonus") + { + Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor }; + var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}"); + line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format() : LocalizedText.Format(CalamityKeybinds.ArmorSetBonusHotKey.TooltipHotkeyString())); + line.OverrideColor = armorColors[setBonusTooltipNumber - 1]; + } + } + } + else + { + holdingShift = false; + } + } public override void AddRecipes() { diff --git a/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs b/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs index fdc49f0a7a..cc8ea6a873 100644 --- a/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs @@ -1,13 +1,11 @@ -using CalamityMod.Buffs.Summon; -using CalamityMod.CalPlayer; -using CalamityMod.Items.Accessories; +using System.Collections.Generic; using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.Summon; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -61,6 +59,33 @@ namespace CalamityMod.Items.Armor.Auric modPlayer.auricBoost = true; player.GetDamage() += 0.15f; } + public override void ModifyTooltips(List tooltips) + { + ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift; + ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber; + if (Main.keyState.PressingShift()) + { + if (!holdingShift) + { + holdingShift = true; + setBonusTooltipNumber++; + if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1; + } + foreach (TooltipLine line in tooltips) + { + if (line.Name == "SetBonus") + { + Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipSilvaColor }; + line.Text = this.GetLocalizedValue($"SetBonus{setBonusTooltipNumber}"); + line.OverrideColor = armorColors[setBonusTooltipNumber - 1]; + } + } + } + else + { + holdingShift = false; + } + } public override void AddRecipes() { diff --git a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs b/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs index 18993c56ec..0f8e4acdbb 100644 --- a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs @@ -1,11 +1,11 @@ -using CalamityMod.CalPlayer; -using CalamityMod.Items.Accessories; +using System.Collections.Generic; using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -50,6 +50,33 @@ namespace CalamityMod.Items.Armor.Auric player.crimsonRegen = true; } + public override void ModifyTooltips(List tooltips) + { + ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift; + ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber; + if (Main.keyState.PressingShift()) + { + if (!holdingShift) + { + holdingShift = true; + setBonusTooltipNumber++; + if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1; + } + foreach (TooltipLine line in tooltips) + { + if (line.Name == "SetBonus") + { + Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipSilvaColor }; + line.Text = this.GetLocalizedValue($"SetBonus{setBonusTooltipNumber}"); + line.OverrideColor = armorColors[setBonusTooltipNumber - 1]; + } + } + } + else + { + holdingShift = false; + } + } public override void UpdateEquip(Player player) { var modPlayer = player.Calamity(); diff --git a/Items/Materials/AnodizedWulfrumMetal.cs b/Items/Materials/AnodizedWulfrumMetal.cs new file mode 100644 index 0000000000..f15a1658a3 --- /dev/null +++ b/Items/Materials/AnodizedWulfrumMetal.cs @@ -0,0 +1,44 @@ +using CalamityMod.Cooldowns; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Armor.Wulfrum; +using CalamityMod.NPCs.NormalNPCs; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using static CalamityMod.CalamityUtils; + +namespace CalamityMod.Items.Materials +{ + public class AnodizedWulfrumMetal : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Materials"; + + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 25; + } + + public override void SetDefaults() + { + Item.width = 18; + Item.height = 18; + Item.maxStack = Item.CommonMaxStack; + Item.value = Item.sellPrice(copper: 10); + Item.rare = ItemRarityID.Blue; + Item.ammo = Item.type; + } + public override void AddRecipes() + { + CreateRecipe(1). + AddIngredient(). + AddIngredient(). + AddTile(TileID.WorkBenches). + Register(); + } + //Added to avoid making the recipes really repeditive and nonsensical. It also makes the new metal color make sense. Adds a bit of flavor to the Wulfrum Recipes + //Fun fact the reason used Stormlion Manible is because in order to anodize a metal you must use a current, the other option was a powercell but I feel StormlionMandible needed more uses + //More uses are planned for other blocks and furniture for wulfrum that use this new metal color and gives a bit more depth to the set + } +} diff --git a/Items/Materials/AnodizedWulfrumMetal.png b/Items/Materials/AnodizedWulfrumMetal.png new file mode 100644 index 0000000000..0e901b9399 Binary files /dev/null and b/Items/Materials/AnodizedWulfrumMetal.png differ diff --git a/Items/Placeables/FurnitureWulfrum/WulfrumPlatform.cs b/Items/Placeables/FurnitureWulfrum/WulfrumPlatform.cs new file mode 100644 index 0000000000..ee3cf4904e --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/WulfrumPlatform.cs @@ -0,0 +1,32 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Tiles.FurnitureWulfrum; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum +{ + public class WulfrumPlatform : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 200; + } + + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Placeables/FurnitureWulfrum/WulfrumPlatform_Glow").Value); + } + + public override void AddRecipes() + { + CreateRecipe(2). + AddIngredient(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/WulfrumPlatform.png b/Items/Placeables/FurnitureWulfrum/WulfrumPlatform.png new file mode 100644 index 0000000000..d91c28ed3f Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/WulfrumPlatform.png differ diff --git a/Items/Placeables/FurnitureWulfrum/WulfrumPlatform_Glow.png b/Items/Placeables/FurnitureWulfrum/WulfrumPlatform_Glow.png new file mode 100644 index 0000000000..9cc33827ee Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/WulfrumPlatform_Glow.png differ diff --git a/Items/Placeables/FurnitureWulfrum/WulfrumSheets.cs b/Items/Placeables/FurnitureWulfrum/WulfrumSheets.cs new file mode 100644 index 0000000000..c07dcca835 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/WulfrumSheets.cs @@ -0,0 +1,32 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Walls; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum +{ + public class WulfrumSheets : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + + public override void AddRecipes() + { + CreateRecipe(25). + AddRecipeGroup("AnyStoneBlock", 25). + AddIngredient(). + AddTile(TileID.HeavyWorkBench). + Register(); + //CreateRecipe(). + // AddIngredient(4). + // AddTile(TileID.WorkBenches). + // DisableDecraft(). + // Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/WulfrumSheets.png b/Items/Placeables/FurnitureWulfrum/WulfrumSheets.png new file mode 100644 index 0000000000..2d29605930 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/WulfrumSheets.png differ diff --git a/Items/Placeables/FurnitureWulfrum/WulfrumSiding.cs b/Items/Placeables/FurnitureWulfrum/WulfrumSiding.cs new file mode 100644 index 0000000000..1569c2ba93 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/WulfrumSiding.cs @@ -0,0 +1,33 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Walls; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum +{ + public class WulfrumSiding : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + + public override void AddRecipes() + { + CreateRecipe(25). + AddRecipeGroup("AnyStoneBlock", 25). + AddIngredient(). + AddIngredient(). + AddTile(TileID.HeavyWorkBench). + Register(); + //CreateRecipe(). + // AddIngredient(4). + // AddTile(TileID.WorkBenches). + // DisableDecraft(). + // Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/WulfrumSiding.png b/Items/Placeables/FurnitureWulfrum/WulfrumSiding.png new file mode 100644 index 0000000000..462a2ce24d Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/WulfrumSiding.png differ diff --git a/Items/Placeables/Walls/WulfrumPillar.cs b/Items/Placeables/Walls/WulfrumPillar.cs new file mode 100644 index 0000000000..ecca3e570f --- /dev/null +++ b/Items/Placeables/Walls/WulfrumPillar.cs @@ -0,0 +1,28 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using Terraria.ID; +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; + +namespace CalamityMod.Items.Placeables.Walls +{ + public class WulfrumPillar : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 400; + } + + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + + public override void AddRecipes() + { + CreateRecipe(8). + AddIngredient(). + AddIngredient(). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/Walls/WulfrumPillar.png b/Items/Placeables/Walls/WulfrumPillar.png new file mode 100644 index 0000000000..e4c3444ab3 Binary files /dev/null and b/Items/Placeables/Walls/WulfrumPillar.png differ diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 814669c952..d915b05b1b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1513,7 +1513,7 @@ SandSharkToothNecklace: { Tooltip: ''' Increases armor penetration by 10 - 6% increased damage + 10% increased damage ''' } @@ -1890,8 +1890,8 @@ TheEvolution: { ''' Reflects projectiles that hit you, negating their damage and dealing 10x damage to enemies {$Common.ReflectInformation} - Reflecting a projectile grants +6 HP/s life regen for 5 seconds and grants maximum natural life regen - Getting hit by the same enemy projectile type during cooldown will resist its damage by 20% + Reflecting a projectile grants maximum natural life regen for 10 seconds + Getting hit by the same enemy projectile type during cooldown will resist its damage by 25% ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 022993b838..ef21b0d2c1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -20,7 +20,38 @@ AuricTeslaCuisses: { AuricTeslaHoodedFacemask: { DisplayName: Auric Tesla Hooded Facemask Tooltip: 30% increased ranged damage and critical strike chance - SetBonus: Ranged Tarragon, Bloodflare and God Slayer armor effects + SetBonus: + ''' + Ranged Tarragon, Bloodflare and God Slayer armor effects + Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them + ''' + SetBonus1: + ''' + Inherited Tarragon Set Bonus: + Ranged projectiles split into homing life energy and leaves on death + Reduces enemy spawn rates + Increased heart pickup range + Enemies have a chance to drop extra hearts on death + ''' + SetBonus2: + ''' + Inherited Bloodflare Set Bonus: + Press {0} to unleash the lost souls of polterghast to destroy your enemies + This effect has a 30 second cooldown + Ranged weapons fire bloodsplosion orbs every 2.5 seconds + Greatly increased life regen, equivalent to Crimson armor + Enemies below 50% life drop a heart when struck + This effect has a 5 second cooldown + ''' + SetBonus3: + ''' + Inherited God Slayer Set Bonus: + You fire a god killer shrapnel round while firing ranged weapons every 2.5 seconds + Pressing {0} allows you to dash towards your cursor for 2.5 seconds + Enemies you dash through take massive damage + During the dash you are immune to most debuffs + The dash has a {1} second cooldown + ''' } AuricTeslaPlumedHelm: { @@ -32,8 +63,39 @@ AuricTeslaPlumedHelm: { ''' SetBonus: ''' - Rogue Tarragon, Bloodflare and God Slayer armor effects +130 maximum stealth + Rogue Tarragon, Bloodflare and God Slayer armor effects + Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them + ''' + SetBonus1: + ''' + Inherited Tarragon Set Bonus: + After every 50 rogue critical hits you will gain 2.5 seconds of damage immunity + This effect has a cooldown of 25 seconds + While under the effects of a debuff you gain 10% increased rogue damage + Reduces enemy spawn rates + Increased heart pickup range + Enemies have a chance to drop extra hearts on death + ''' + SetBonus2: + ''' + Inherited Bloodflare Set Bonus: + Being over 80% life boosts your defense by 30 and rogue crit by 5% + Being below 80% life boosts your rogue damage by 10% + Rogue critical strikes heal you + Greatly increased life regen, equivalent to Crimson armor + Enemies below 50% life drop a heart when struck + This effect has a 5 second cooldown + ''' + SetBonus3: + ''' + Inherited God Slayer Set Bonus: + While at full HP all of your rogue stats are boosted by 10% + If you take over 80 damage in one hit you will be given extra immunity frames + Pressing {0} allows you to dash towards your cursor for 2.5 seconds + Enemies you dash through take massive damage + During the dash you are immune to most debuffs + The dash has a {1} second cooldown ''' } @@ -46,9 +108,41 @@ AuricTeslaRoyalHelm: { ''' SetBonus: ''' - Melee Tarragon, Bloodflare and God Slayer effects Enemies are more likely to target you 28% increased melee speed + Melee Tarragon, Bloodflare and God Slayer effects + Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them + ''' + SetBonus1: + ''' + Inherited Tarragon Set Bonus: + Taking damage gives the Tarra Life buff, which grants +1.5 HP/s life regen + Press {0} to cloak yourself in life energy that heavily reduces enemy contact damage for 10 seconds + This has a 30 second cooldown + Reduces enemy spawn rates + Increased heart pickup range + Enemies have a chance to drop extra hearts on death + ''' + SetBonus2: + ''' + Inherited Bloodflare Set Bonus: + True melee strikes will heal you + After striking an enemy 15 times with true melee you will enter a blood frenzy for 5 seconds + During this you will gain 25% increased melee damage, critical strike chance, and contact damage is halved + This effect has a 30 second cooldown + Greatly increased life regen, equivalent to Crimson armor + Enemies below 50% life drop a heart when struck + This effect has a 5 second cooldown + ''' + SetBonus3: + ''' + Inherited God Slayer Set Bonus: + Taking over 80 damage in one hit will cause you to release a swarm of high-damage god killer darts + Enemies take a lot of damage when they hit you + Pressing {0} allows you to dash towards your cursor for 2.5 seconds + Enemies you dash through take massive damage + During the dash you are immune to most debuffs + The dash has a {1} second cooldown ''' } @@ -57,9 +151,37 @@ AuricTeslaSpaceHelmet: { Tooltip: 15% increased summon damage SetBonus: ''' - Summoner Tarragon, Bloodflare and Silva armor effects Max run speed and acceleration boosted by 5% +6 max minions and 75% increased summon damage + Summoner Tarragon, Bloodflare and Silva armor effects + Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them + ''' + SetBonus1: + ''' + Inherited Tarragon Set Bonus: + Summons a life aura around you that damages nearby enemies + Reduces enemy spawn rates + Increased heart pickup range + Enemies have a chance to drop extra hearts on death + ''' + SetBonus2: + ''' + Inherited Bloodflare Set Bonus: + Summons polterghast mines to circle you + At 90% life and above you gain 10% increased summon damage + At 50% life and below you gain 20 defense and +1 HP/s life regen + Greatly increased life regen, equivalent to Crimson armor + Enemies below 50% life drop a heart when struck + This effect has a 5 second cooldown + ''' + SetBonus3: + ''' + Inherited Silva Set Bonus: + Summons an ancient leaf prism to blast your enemies with life energy + All projectiles spawn healing leaf orbs on enemy hits + Max run speed and acceleration boosted by 5% + Taking fatal damage will revive you and make you invulnerable to all damage for 5 seconds + This effect has a 5 minute cooldown, which does not decrement if any bosses or events are active ''' } @@ -68,8 +190,37 @@ AuricTeslaWireHemmedVisage: { Tooltip: 30% increased magic damage, 20% increased magic critical strike chance, +100 max mana and 20% reduced mana usage SetBonus: ''' - Magic Tarragon, Bloodflare and Silva armor effects Max run speed and acceleration boosted by 5% + Magic Tarragon, Bloodflare and Silva armor effects + Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them + ''' + SetBonus1: + ''' + On every 5th critical strike you will fire a leaf storm + Magic projectiles heal you on enemy hits + Amount healed is based on projectile damage + Inherited Tarragon Set Bonus: + Reduces enemy spawn rates + Increased heart pickup range + Enemies have a chance to drop extra hearts on death + ''' + SetBonus2: + ''' + Magic weapons fire ghostly bolts every 1.67 seconds + Magic critical strikes cause blood explosions every 2 seconds + Inherited Bloodflare Set Bonus: + Greatly increased life regen, equivalent to Crimson armor + Enemies below 50% life drop a heart when struck + This effect has a 5 second cooldown + ''' + SetBonus3: + ''' + Inherited Silva Set Bonus: + Magic projectiles which cannot pierce will occasionally set off potent blasts of nature energy + All projectiles spawn healing leaf orbs on enemy hits + Max run speed and acceleration boosted by 5% + Taking fatal damage will revive you and make you invulnerable to all damage for 5 seconds + This effect has a 5 minute cooldown, which does not decrement if any bosses or events are active ''' } diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index f239be5713..358bbd1074 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -268,7 +268,7 @@ namespace CalamityMod.NPCs.Crabulon NPC.TargetClosest(); NPC.noGravity = true; NPC.noTileCollide = true; - NPC.ai[0] = 1f; + NPC.ai[0] = (Main.rand.NextBool() && death && phase2) ? 5f : 1f; NPC.ai[1] = 0f; NPC.netUpdate = true; } @@ -304,10 +304,7 @@ namespace CalamityMod.NPCs.Crabulon NPC.direction = playerLocation < 0 ? 1 : -1; float inertia = revenge ? 10f : 20f; - if (NPC.direction > 0) - NPC.velocity.X = (NPC.velocity.X * inertia + walkingVelocity) / (inertia + 1f); - if (NPC.direction < 0) - NPC.velocity.X = (NPC.velocity.X * inertia - walkingVelocity) / (inertia + 1f); + NPC.velocity.X = (NPC.velocity.X * inertia + walkingVelocity * NPC.direction) / (inertia + 1f); } if (Collision.CanHit(NPC.position, NPC.width, NPC.height, player.Center, 1, 1) && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height) && player.position.Y <= NPC.position.Y + NPC.height && !NPC.collideX) @@ -778,10 +775,10 @@ namespace CalamityMod.NPCs.Crabulon Vector2 initialSpawnLocation = NPC.Center + new Vector2(0f, 8f); for (int i = 0; i < numProj; i++) - Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation + new Vector2(Main.rand.Next(0, 81), Main.rand.Next(-20, 1)), initialVelocity - ((i / numProj) * initialVelocity), type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation + new Vector2(Main.rand.Next(0, 81), Main.rand.Next(-20, 1)), initialVelocity - ((i / (float)numProj) * initialVelocity), type, damage, 0f, Main.myPlayer); for (int i = 0; i < numProj; i++) - Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation - new Vector2(Main.rand.Next(0, 81), Main.rand.Next(-20, 1)), -(initialVelocity - ((i / numProj) * initialVelocity)), type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation - new Vector2(Main.rand.Next(0, 81), Main.rand.Next(-20, 1)), -(initialVelocity - ((i / (float)numProj) * initialVelocity)), type, damage, 0f, Main.myPlayer); } for (int j = (int)NPC.position.X - 20; j < (int)NPC.position.X + NPC.width + 40; j += 20) @@ -821,6 +818,144 @@ namespace CalamityMod.NPCs.Crabulon } } + // Stomp three times quickly, creating lines of mushrooms and a column of mushrooms that slowly fall down + else if (NPC.ai[0] == 5f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.noTileCollide = false; + if (NPC.velocity.Y == 0f) + { + NPC.velocity.X *= 0.8f; + NPC.ai[1] += 1f; + if (NPC.ai[1] % 15f == 14f) + NPC.netUpdate = true; + + float jumpGateValue = 10f; + if (NPC.ai[1] >= jumpGateValue) + { + NPC.ai[1] = -20f; + } + else if (NPC.ai[1] == -1f) + { + NPC.velocity.Y = -(2f + NPC.ai[2]); + + SoundEngine.PlaySound(JumpSound, NPC.Center); + + NPC.ai[0] = 6f; + NPC.ai[1] = 0f; + NPC.netUpdate = true; + } + } + } + else if (NPC.ai[0] == 6f) + { + if (NPC.velocity.Y == 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + SoundEngine.PlaySound(SlamSound, NPC.Center); + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= 3f) + { + // Columns of mushrooms + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int maxColumns = 5; + int mushroomsPerColumn = 10; + Vector2 initialSpawnLocation = NPC.Center + new Vector2(-210f, 8f); + Vector2 initialVelocity = Vector2.UnitY * 15f; + for (int i = 0; i < maxColumns; i++) + { + for (int j = 0; j < mushroomsPerColumn; j++) + Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation + new Vector2(70f * (i + 1), 0f), -(initialVelocity - ((j / (float)mushroomsPerColumn) * initialVelocity)), type, damage, 0f, Main.myPlayer, 1f, NPC.Bottom.Y); + } + } + + NPC.ai[0] = 1f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.netUpdate = true; + } + else + { + // Mushrooms along the ground + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + float xVelocity = death ? 3f : 1.5f; + int numProj = 3; + Vector2 initialVelocity = Vector2.UnitX * xVelocity; + Vector2 initialSpawnLocation = NPC.Center + new Vector2(0f, 8f); + + for (int i = 0; i < numProj; i++) + Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation + new Vector2(Main.rand.Next(0, 41), 0f), initialVelocity - ((i / (float)numProj) * initialVelocity), type, damage, 0f, Main.myPlayer); + + for (int i = 0; i < numProj; i++) + Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation - new Vector2(Main.rand.Next(0, 41), 0f), -(initialVelocity - ((i / (float)numProj) * initialVelocity)), type, damage, 0f, Main.myPlayer); + } + + float playerLocation = NPC.Center.X - player.Center.X; + NPC.direction = playerLocation < 0 ? 1 : -1; + + NPC.ai[0] = 5f; + NPC.netUpdate = true; + } + + for (int j = (int)NPC.position.X - 20; j < (int)NPC.position.X + NPC.width + 40; j += 20) + { + for (int k = 0; k < 4; k++) + { + int stompDust = Dust.NewDust(new Vector2(NPC.position.X - 20f, NPC.position.Y + NPC.height), NPC.width + 20, 4, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f); + Main.dust[stompDust].velocity *= 0.2f; + } + + // Destroy tiles with stomps in Zenith seed (this is going to be so awful with this attack lol) + if (Main.zenithWorld) + { + int x = j / 16; + int y = (int)(NPC.position.Y + NPC.height) / 16; + Tile groundTile = CalamityUtils.ParanoidTileRetrieval(x, y); + Tile walkTile = CalamityUtils.ParanoidTileRetrieval(x, y - 1); + if (!walkTile.HasTile && walkTile.LiquidAmount == 0 && groundTile != null && WorldGen.SolidTile(groundTile)) + { + walkTile.TileFrameY = 0; + walkTile.Get().Slope = SlopeType.Solid; + walkTile.Get().IsHalfBlock = false; + if (groundTile.TileType == TileID.MushroomGrass || groundTile.TileType == TileID.Mud) + { + walkTile.Get().HasTile = true; + walkTile.TileType = TileID.MushroomPlants; + walkTile.TileFrameX = (short)(Main.rand.Next(5) * 18); + + if (Main.netMode == NetmodeID.MultiplayerClient) + NetMessage.SendTileSquare(-1, x, y - 1, 1, TileChangeType.None); + } + } + } + } + } + else + { + // Set damage + NPC.damage = NPC.defDamage; + + if (!player.dead) + { + if ((player.position.Y > NPC.Bottom.Y && NPC.velocity.Y > 0f) || (player.position.Y < NPC.Bottom.Y && NPC.velocity.Y < 0f)) + NPC.noTileCollide = true; + else if ((NPC.velocity.Y > 0f && NPC.Bottom.Y > Main.player[NPC.target].Top.Y) || (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].Center, 1, 1) && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height))) + NPC.noTileCollide = false; + } + } + } + if (NPC.localAI[0] == 0f && NPC.life > 0) NPC.localAI[0] = NPC.lifeMax; @@ -918,7 +1053,7 @@ namespace CalamityMod.NPCs.Crabulon { if (NPC.ai[0] > 1f) { - if (NPC.velocity.Y == 0f && ((NPC.ai[1] >= 0f && NPC.ai[0] == 2f) || (NPC.ai[1] < (DelayBeforeBigJump - TelegraphTimeBeforeBigJump) && NPC.ai[0] == 4f && NPC.ai[2] == 0f))) // Idle just before jump + if (NPC.velocity.Y == 0f && ((NPC.ai[1] >= 0f && (NPC.ai[0] == 2f || NPC.ai[0] == 5f)) || (NPC.ai[1] < (DelayBeforeBigJump - TelegraphTimeBeforeBigJump) && NPC.ai[0] == 4f && NPC.ai[2] == 0f))) // Idle just before jump { if (stomping) stomping = false; @@ -993,7 +1128,7 @@ namespace CalamityMod.NPCs.Crabulon Vector2 drawPos = NPC.Center - screenPos + (Vector2.UnitX * textureIdle.Width * c * 1.6f); // Jumping - if (NPC.ai[0] > 2f && NPC.velocity.Y != 0f) + if ((NPC.ai[0] > 2f && NPC.ai[0] != 5f) && NPC.velocity.Y != 0f) { drawOrigin = new Vector2(textureAttack.Width / 2, textureAttack.Height / 2); drawPos -= new Vector2(textureAttack.Width, textureAttack.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; diff --git a/Projectiles/Boss/MushBombFall.cs b/Projectiles/Boss/MushBombFall.cs index 5645ec3df9..21910f807e 100644 --- a/Projectiles/Boss/MushBombFall.cs +++ b/Projectiles/Boss/MushBombFall.cs @@ -75,8 +75,8 @@ namespace CalamityMod.Projectiles.Boss Lighting.AddLight(Projectile.Center, 0f, 0.15f, 0.3f); - float velocityYLimit = BossRushEvent.BossRushActive ? 12f : CalamityWorld.death ? 6f : 5f; - float velocityYIncrement = BossRushEvent.BossRushActive ? 0.24f : CalamityWorld.death ? 0.12f : 0.1f; + float velocityYLimit = Projectile.ai[0] == 1f ? 3f : BossRushEvent.BossRushActive ? 12f : CalamityWorld.death ? 6f : 5f; + float velocityYIncrement = Projectile.ai[0] == 1f ? 0.15f : BossRushEvent.BossRushActive ? 0.24f : CalamityWorld.death ? 0.12f : 0.1f; if (Projectile.velocity.Y < velocityYLimit) Projectile.velocity.Y += velocityYIncrement; diff --git a/Projectiles/Boss/MushBombGround.cs b/Projectiles/Boss/MushBombGround.cs index 39b4588c9d..a32de29a4e 100644 --- a/Projectiles/Boss/MushBombGround.cs +++ b/Projectiles/Boss/MushBombGround.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Boss { Projectile.velocity.X *= xVelocityMultiplier; if (Math.Abs(Projectile.velocity.X) > xVelocityLimit) - Projectile.velocity.X = xVelocityLimit; + Projectile.velocity.X = Math.Sign(Projectile.velocity.X) * xVelocityLimit; } } diff --git a/Projectiles/Melee/CrystylCrusherRay.cs b/Projectiles/Melee/CrystylCrusherRay.cs index fd9454da63..9e308d1d6f 100644 --- a/Projectiles/Melee/CrystylCrusherRay.cs +++ b/Projectiles/Melee/CrystylCrusherRay.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.width = 10; Projectile.height = 10; - Projectile.scale = 1.5f; + Projectile.scale = 7f; Projectile.friendly = true; Projectile.penetrate = -1; Projectile.tileCollide = false; @@ -67,33 +67,32 @@ namespace CalamityMod.Projectiles.Melee Vector2 maxLength = owner.ClampedMouseWorld() - owner.Center; DrawLaser(Terraria.GameContent.TextureAssets.Projectile[Type].Value, owner.Center, - Projectile.velocity, 15f, Projectile.damage, -MathHelper.PiOver2, Projectile.scale, maxLength.Length(), new Color(Main.DiscoR, 0, 255), (int)MOVE_DISTANCE); + Projectile.velocity, 15f, -MathHelper.PiOver2, Projectile.scale, maxLength.Length(), new Color(Main.DiscoR, 0, 255), (int)MOVE_DISTANCE); } return false; } // The core function of drawing a laser - public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, int damage, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default(Color), int transDist = 50) + public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default, int transDist = 50) { float r = unit.ToRotation() + rotation; // Draws the laser 'body' for (float i = transDist; i <= Distance; i += step) { - Color c = new Color(Main.DiscoR, 0, 255); var origin = start + i * unit; Main.EntitySpriteDraw(texture, origin - Main.screenPosition, - new Rectangle(0, 26, 28, 26), i < transDist ? Color.Transparent : c, r, - new Vector2(28 * .5f, 26 * .5f), scale, 0, 0); + new Rectangle(0, 26, 28, 26), i < transDist ? Color.Transparent : color, r, + new Vector2(28 * .5f, 26 * .5f), MathHelper.Lerp(1f, scale, i / Distance), 0, 0); } // Draws the laser 'tail' Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, - new Rectangle(0, 0, 28, 26), new Color(Main.DiscoR, 0, 255), r, new Vector2(28 * .5f, 26 * .5f), scale, 0, 0); + new Rectangle(0, 0, 28, 26), color, r, new Vector2(28 * .5f, 26 * .5f), 1f, 0, 0); // Draws the laser 'head' Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, - new Rectangle(0, 52, 28, 26), new Color(Main.DiscoR, 0, 255), r, new Vector2(28 * .5f, 26 * .5f), scale, 0, 0); + new Rectangle(0, 52, 28, 26), color, r, new Vector2(28 * .5f, 26 * .5f), scale, 0, 0); } // Change the way of collision check of the projectile @@ -119,7 +118,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft == 300) SoundEngine.PlaySound(CrystylCrusher.ChargeSound, player.Center); - Projectile.position = player.Center + Projectile.velocity * MOVE_DISTANCE; + Projectile.Center = player.Center + Projectile.velocity * MOVE_DISTANCE; Projectile.timeLeft = 2; // By separating large AI into methods it becomes very easy to see the flow of the AI in a broader sense @@ -232,6 +231,7 @@ namespace CalamityMod.Projectiles.Melee /* * Update CutTiles so the laser will cut tiles (like grass) */ + public override bool? CanCutTiles() => IsAtMaxCharge ? null : false; public override void CutTiles() { DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; @@ -244,11 +244,11 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.owner == Main.myPlayer) { Vector2 destroyVector = Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE); - int threeMod = 3; - int mineXLeft = (int)(destroyVector.X / 16f - threeMod); - int mineXRight = (int)(destroyVector.X / 16f + threeMod); - int mineXUp = (int)(destroyVector.Y / 16f - threeMod); - int mineXDown = (int)(destroyVector.Y / 16f + threeMod); + int radius = 7; + int mineXLeft = (int)(destroyVector.X / 16f - radius); + int mineXRight = (int)(destroyVector.X / 16f + radius); + int mineXUp = (int)(destroyVector.Y / 16f - radius); + int mineXDown = (int)(destroyVector.Y / 16f + radius); if (mineXLeft < 0) { mineXLeft = 0; @@ -273,7 +273,7 @@ namespace CalamityMod.Projectiles.Melee float destroyTileX = Math.Abs(i - destroyVector.X / 16f); float destroyTileY = Math.Abs(j - destroyVector.Y / 16f); double destroyTileArea = Math.Sqrt(destroyTileX * destroyTileX + destroyTileY * destroyTileY); - if (destroyTileArea < threeMod) + if (destroyTileArea < radius) { if (Main.tile[i, j] != null && Main.tile[i, j].HasTile) { diff --git a/Tiles/FurnitureWulfrum/WulfrumPlatform.cs b/Tiles/FurnitureWulfrum/WulfrumPlatform.cs new file mode 100644 index 0000000000..6eebeafb95 --- /dev/null +++ b/Tiles/FurnitureWulfrum/WulfrumPlatform.cs @@ -0,0 +1,68 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum +{ + public class WulfrumPlatform : ModTile + { + internal static Texture2D GlowTexture; + + public override void SetStaticDefaults() + { + if (!Main.dedServ) + { + GlowTexture = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/WulfrumPlatform_Glow", AssetRequestMode.ImmediateLoad).Value; + } + + this.SetUpPlatform(ModContent.ItemType(), true); + } + + public override bool CanExplode(int i, int j) => false; + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void PostSetDefaults() + { + Main.tileNoSunLight[Type] = false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + // If the cached textures don't exist for some reason, don't bother using them. + if (GlowTexture is null) + return; + + Tile tile = CalamityUtils.ParanoidTileRetrieval(i, j); + if (tile.IsTileActuallyInvisible()) + return; + + int xPos = tile.TileFrameX; + int frameOffset = (i + j) % 6 * AnimationFrameHeight; + int yPos = tile.TileFrameY + frameOffset; + Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; + + if (!tile.IsHalfBlock) + { + spriteBatch.Draw(GlowTexture, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + else if (tile.IsHalfBlock) + { + spriteBatch.Draw(GlowTexture, drawPosition + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Tiles/FurnitureWulfrum/WulfrumPlatform.png b/Tiles/FurnitureWulfrum/WulfrumPlatform.png new file mode 100644 index 0000000000..a1b3cf4ee5 Binary files /dev/null and b/Tiles/FurnitureWulfrum/WulfrumPlatform.png differ diff --git a/Tiles/FurnitureWulfrum/WulfrumPlatform_Glow.png b/Tiles/FurnitureWulfrum/WulfrumPlatform_Glow.png new file mode 100644 index 0000000000..c736697170 Binary files /dev/null and b/Tiles/FurnitureWulfrum/WulfrumPlatform_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/WulfrumSheets.cs b/Tiles/FurnitureWulfrum/WulfrumSheets.cs new file mode 100644 index 0000000000..813b8f8191 --- /dev/null +++ b/Tiles/FurnitureWulfrum/WulfrumSheets.cs @@ -0,0 +1,51 @@ +using CalamityMod.Dusts; +using CalamityMod.Systems; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum +{ + public class WulfrumSheets : ModTile + { + public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); + private const short subsheetWidth = 216; + private const short subsheetHeight = 72; + public static int TypeCache; + public override void SetStaticDefaults() + { + TypeCache = Type; + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = false; + Main.tileShine2[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + + HitSound = MinePlatingSound; + AddMapEntry(new Color(164, 150, 125)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFramingSystem.CompactFraming(i, j, resetFrame); + return false; + } + + public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) + { + int xPos = i % 2; + int yPos = j % 2; + frameXOffset = xPos * subsheetWidth; + frameYOffset = yPos * subsheetHeight; + } + } +} diff --git a/Tiles/FurnitureWulfrum/WulfrumSheets.png b/Tiles/FurnitureWulfrum/WulfrumSheets.png new file mode 100644 index 0000000000..509cff2949 Binary files /dev/null and b/Tiles/FurnitureWulfrum/WulfrumSheets.png differ diff --git a/Tiles/FurnitureWulfrum/WulfrumSiding.cs b/Tiles/FurnitureWulfrum/WulfrumSiding.cs new file mode 100644 index 0000000000..6f31a9e0c0 --- /dev/null +++ b/Tiles/FurnitureWulfrum/WulfrumSiding.cs @@ -0,0 +1,38 @@ +using CalamityMod.Dusts; +using CalamityMod.Systems; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum +{ + public class WulfrumSiding : ModTile + { + public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); + + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + + HitSound = MinePlatingSound; + AddMapEntry(new Color(164, 150, 125)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + return TileFramingSystem.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/FurnitureWulfrum/WulfrumSiding.png b/Tiles/FurnitureWulfrum/WulfrumSiding.png new file mode 100644 index 0000000000..2a9b30f705 Binary files /dev/null and b/Tiles/FurnitureWulfrum/WulfrumSiding.png differ diff --git a/Utilities/TileUtils.cs b/Utilities/TileUtils.cs index 56e3eb250a..4fd97af360 100644 --- a/Utilities/TileUtils.cs +++ b/Utilities/TileUtils.cs @@ -648,6 +648,7 @@ namespace CalamityMod SetMerge(type, TileType()); SetMerge(type, TileType()); SetMerge(type, TileType()); + SetMerge(type, TileType()); SetMerge(type, TileType()); SetMerge(type, TileType()); } diff --git a/Walls/WulfrumPillar.cs b/Walls/WulfrumPillar.cs new file mode 100644 index 0000000000..ee6324c9da --- /dev/null +++ b/Walls/WulfrumPillar.cs @@ -0,0 +1,24 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class WulfrumPillar : ModWall + { + public override void SetStaticDefaults() + { + Main.wallHouse[Type] = true; + AddMapEntry(new Color(82, 109, 80)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + } +} diff --git a/Walls/WulfrumPillar.png b/Walls/WulfrumPillar.png new file mode 100644 index 0000000000..39fde66e6a Binary files /dev/null and b/Walls/WulfrumPillar.png differ