diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 064a534dba..4ab5c536b7 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -52,9 +52,6 @@ namespace CalamityMod.Balancing bool HiveBeeFilter(Projectile p) => p.type == ProjectileType() && Main.player[p.owner].ActiveItem().type == ItemType(); - bool EradicatorLaserFilter(Projectile p) => - p.type == ProjectileType() && p.DamageType == RogueDamageClass.Instance; - NPCSpecificBalancingChanges = new List(); #region Crabulon @@ -402,9 +399,6 @@ namespace CalamityMod.Balancing // 20% resist to Ariane's aura (Lilies of Finality). NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); - // 20% resist to Eradicator's beams. - NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, EradicatorLaserFilter)))); - // 20% resist to Mirror of Kalandra's Paradoxica minion. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); diff --git a/Buffs/Summon/Mechworm.cs b/Buffs/Summon/VoidEaterMarionetteBuff.cs similarity index 54% rename from Buffs/Summon/Mechworm.cs rename to Buffs/Summon/VoidEaterMarionetteBuff.cs index 56abef6ff2..4cbc9c1475 100644 --- a/Buffs/Summon/Mechworm.cs +++ b/Buffs/Summon/VoidEaterMarionetteBuff.cs @@ -1,12 +1,12 @@ -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; using Terraria.ModLoader; namespace CalamityMod.Buffs.Summon { - public class Mechworm : BaseSummonBuff + public class VoidEaterMarionetteBuff : BaseSummonBuff { - protected override int MinionProjectileType => ModContent.ProjectileType(); + protected override int MinionProjectileType => ModContent.ProjectileType(); - protected override ref bool MinionBool => ref BuffModdedOwner.mWorm; + protected override ref bool MinionBool => ref BuffModdedOwner.hasVoidEaterMarionette; } } diff --git a/Buffs/Summon/Mechworm.png b/Buffs/Summon/VoidEaterMarionetteBuff.png similarity index 100% rename from Buffs/Summon/Mechworm.png rename to Buffs/Summon/VoidEaterMarionetteBuff.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 7ab4ca8973..18943430c8 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1431,8 +1431,7 @@ namespace CalamityMod.CalPlayer #region Minion public bool wDroid = false; public bool resButterfly = false; - /// Staff of the Mechworm. - public bool mWorm = false; + public bool hasVoidEaterMarionette = false; public bool IceClasperBool = false; public bool magicHat = false; public bool herring = false; @@ -2598,7 +2597,7 @@ namespace CalamityMod.CalPlayer #region Minion Reset Effects wDroid = false; resButterfly = false; - mWorm = false; + hasVoidEaterMarionette = false; IceClasperBool = false; magicHat = false; herring = false; diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index a683e13102..fefb018947 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -102,7 +102,7 @@ namespace CalamityMod.CalPlayer } //Charge animation for Thread of Eradication - if (Player.HeldItem.type == ModContent.ItemType() && !Player.ItemTimeIsZero && drawInfo.shadow == 0f) + if (Player.HeldItem.type == ModContent.ItemType() && !Player.ItemTimeIsZero && drawInfo.shadow == 0f) { var color = Color.Fuchsia; float scale = (1 - (Player.itemTime - 7) / 50f) * 0.2f; diff --git a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs index 74577bfced..4f83deabb8 100644 --- a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs +++ b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs @@ -54,16 +54,16 @@ namespace CalamityMod.CalPlayer.DrawLayers glowMask = ModContent.Request("CalamityMod/Items/Weapons/Ranged/CleansingBlazeGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Summon/CosmicImmaterializerGlow").Value; - else if (itemType == ModContent.ItemType()) - glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow").Value; - else if (itemType == ModContent.ItemType()) - glowMask = ModContent.Request("CalamityMod/Items/Weapons/Ranged/DeathwindGlow").Value; + else if (itemType == ModContent.ItemType()) + glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/HyperdeathRiftScepterGlow").Value; + else if (itemType == ModContent.ItemType()) + glowMask = ModContent.Request("CalamityMod/Items/Weapons/Ranged/ThreadOfEradicationGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/EssenceFlayerGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow").Value; - else if (itemType == ModContent.ItemType()) - glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/ExcelsusGlow").Value; + else if (itemType == ModContent.ItemType()) + glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/MawOfInfinityGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/FatesRevealGlow").Value; else if (itemType == ModContent.ItemType()) diff --git a/Items/TreasureBags/DevourerofGodsBag.cs b/Items/TreasureBags/DevourerofGodsBag.cs index b4cd2b50d9..f9da79f407 100644 --- a/Items/TreasureBags/DevourerofGodsBag.cs +++ b/Items/TreasureBags/DevourerofGodsBag.cs @@ -76,12 +76,12 @@ namespace CalamityMod.Items.TreasureBags // Weapons itemLoot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, new int[] { - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() })); itemLoot.Add(ModContent.ItemType(), 10); diff --git a/Items/Weapons/Magic/Apotheosis.cs b/Items/Weapons/Magic/Apotheosis.cs index 997c64fb18..278a72e01e 100644 --- a/Items/Weapons/Magic/Apotheosis.cs +++ b/Items/Weapons/Magic/Apotheosis.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Items.Weapons.Magic CreateRecipe(). AddIngredient(ItemID.SpellTome). AddIngredient(). - AddIngredient(2). - AddIngredient(2). + AddIngredient(2). + AddIngredient(2). AddIngredient(5). AddIngredient(33). AddIngredient(11). diff --git a/Items/Weapons/Magic/DeathhailStaff.cs b/Items/Weapons/Magic/HyperdeathRiftScepter.cs similarity index 77% rename from Items/Weapons/Magic/DeathhailStaff.cs rename to Items/Weapons/Magic/HyperdeathRiftScepter.cs index 616afdedea..7454227960 100644 --- a/Items/Weapons/Magic/DeathhailStaff.cs +++ b/Items/Weapons/Magic/HyperdeathRiftScepter.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; +using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Projectiles.Magic; using CalamityMod.Rarities; using Microsoft.Xna.Framework; @@ -8,17 +10,24 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Magic { - public class DeathhailStaff : ModItem, ILocalizedModType + [LegacyName("DeathhailStaff")] + public class HyperdeathRiftScepter : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; + + public override void ModifyTooltips(List tooltips) + { + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + } public override void SetStaticDefaults() { Item.staff[Type] = true; - ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } public override void SetDefaults() { @@ -36,13 +45,13 @@ namespace CalamityMod.Items.Weapons.Magic Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item12 with {Volume = 0.75f}; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 18f; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow").Value); + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Magic/HyperdeathRiftScepterGlow").Value); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Magic/DeathhailStaff.png b/Items/Weapons/Magic/HyperdeathRiftScepter.png similarity index 100% rename from Items/Weapons/Magic/DeathhailStaff.png rename to Items/Weapons/Magic/HyperdeathRiftScepter.png diff --git a/Items/Weapons/Magic/DeathhailStaffGlow.png b/Items/Weapons/Magic/HyperdeathRiftScepterGlow.png similarity index 100% rename from Items/Weapons/Magic/DeathhailStaffGlow.png rename to Items/Weapons/Magic/HyperdeathRiftScepterGlow.png diff --git a/Items/Weapons/Melee/Excelsus.cs b/Items/Weapons/Melee/MawOfInfinity.cs similarity index 70% rename from Items/Weapons/Melee/Excelsus.cs rename to Items/Weapons/Melee/MawOfInfinity.cs index 2145cad243..571aaf09f4 100644 --- a/Items/Weapons/Melee/Excelsus.cs +++ b/Items/Weapons/Melee/MawOfInfinity.cs @@ -1,4 +1,6 @@ -using CalamityMod.Items.Weapons.Rogue; +using System.Collections.Generic; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Projectiles.BaseProjectiles; using CalamityMod.Projectiles.Melee; using CalamityMod.Rarities; @@ -7,19 +9,26 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { - public class Excelsus : BaseSwordHoldoutItem, ILocalizedModType + [LegacyName("Excelsus")] + public class MawOfInfinity : BaseSwordHoldoutItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; - public override int ProjectileType => ModContent.ProjectileType(); + public override int ProjectileType => ModContent.ProjectileType(); public override void SetStaticDefaults() { ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); base.SetStaticDefaults(); } + public override void ModifyTooltips(List tooltips) + { + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + } public override void SetDefaults() { Item.width = 78; @@ -34,14 +43,14 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.rare = ModContent.RarityType(); - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; base.SetDefaults(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Melee/ExcelsusGlow").Value); + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Melee/MawOfInfinityGlow").Value); } } } diff --git a/Items/Weapons/Melee/Excelsus.png b/Items/Weapons/Melee/MawOfInfinity.png similarity index 100% rename from Items/Weapons/Melee/Excelsus.png rename to Items/Weapons/Melee/MawOfInfinity.png diff --git a/Items/Weapons/Melee/ExcelsusGlow.png b/Items/Weapons/Melee/MawOfInfinityGlow.png similarity index 100% rename from Items/Weapons/Melee/ExcelsusGlow.png rename to Items/Weapons/Melee/MawOfInfinityGlow.png diff --git a/Items/Weapons/Melee/TheObliterator.cs b/Items/Weapons/Melee/TheObliterator.cs index f9629819f0..d8d70051e5 100644 --- a/Items/Weapons/Melee/TheObliterator.cs +++ b/Items/Weapons/Melee/TheObliterator.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Projectiles.Melee.Yoyos; using CalamityMod.Rarities; using Terraria; @@ -18,13 +19,19 @@ namespace CalamityMod.Items.Weapons.Melee public static float Reach = 720f; public static float Speed = 54f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(Reach.ToTiles(), Speed); + public override void ModifyTooltips(List tooltips) + { + tooltips.FindAndReplace("[GFB]", this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal")); + if (!Main.zenithWorld) + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + } public override void SetStaticDefaults() { ItemID.Sets.Yoyo[Type] = true; ItemID.Sets.GamepadExtraRange[Type] = 15; ItemID.Sets.GamepadSmartQuickReach[Type] = true; - ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } public override void SetDefaults() @@ -52,6 +59,5 @@ namespace CalamityMod.Items.Weapons.Melee } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; - public override void ModifyTooltips(List list) => list.FindAndReplace("[GFB]", this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal")); } } diff --git a/Items/Weapons/Ranged/AngelicShotgun.cs b/Items/Weapons/Ranged/AngelicShotgun.cs index 6fbb3fa2e2..b574183c4c 100644 --- a/Items/Weapons/Ranged/AngelicShotgun.cs +++ b/Items/Weapons/Ranged/AngelicShotgun.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.Ranged Projectile.NewProjectile(source, position + velocity.SafeNormalize(Vector2.Zero) * 16f, randomVelocity, type, damage, knockback, player.whoAmI); } - // Spawn a beam from the sky ala Deathhail Staff or Lunar Flare + // Spawn a beam from the sky ala Hyperdeath Rift Scepter or Lunar Flare // This is more powerful if Hallow-Point Rounds (either naturally used or converted) are fired bool empowered = type == ModContent.ProjectileType(); float laserSpeed = 8f; diff --git a/Items/Weapons/Ranged/Deathwind.cs b/Items/Weapons/Ranged/ThreadOfEradication.cs similarity index 88% rename from Items/Weapons/Ranged/Deathwind.cs rename to Items/Weapons/Ranged/ThreadOfEradication.cs index 9bc45b014c..02f6a340c5 100644 --- a/Items/Weapons/Ranged/Deathwind.cs +++ b/Items/Weapons/Ranged/ThreadOfEradication.cs @@ -1,4 +1,6 @@ -using CalamityMod.Items.Weapons.Magic; +using System.Collections.Generic; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Particles; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Typeless; @@ -8,16 +10,24 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Ranged { - public class Deathwind : ModItem, ILocalizedModType + [LegacyName("Deathwind")] + public class ThreadOfEradication : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + public override void ModifyTooltips(List tooltips) + { + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + } public override void SetStaticDefaults() { - ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } public override void SetDefaults() { @@ -41,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Ranged/DeathwindGlow").Value); + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Ranged/ThreadOfEradicationGlow").Value); } private int storedDMG = 1; private float storedKB = 1; diff --git a/Items/Weapons/Ranged/Deathwind.png b/Items/Weapons/Ranged/ThreadOfEradication.png similarity index 100% rename from Items/Weapons/Ranged/Deathwind.png rename to Items/Weapons/Ranged/ThreadOfEradication.png diff --git a/Items/Weapons/Ranged/DeathwindGlow.png b/Items/Weapons/Ranged/ThreadOfEradicationGlow.png similarity index 100% rename from Items/Weapons/Ranged/DeathwindGlow.png rename to Items/Weapons/Ranged/ThreadOfEradicationGlow.png diff --git a/Items/Weapons/Rogue/Eradicator.cs b/Items/Weapons/Rogue/DimensionTearingDisk.cs similarity index 77% rename from Items/Weapons/Rogue/Eradicator.cs rename to Items/Weapons/Rogue/DimensionTearingDisk.cs index 65375df0cd..11d45d69cc 100644 --- a/Items/Weapons/Rogue/Eradicator.cs +++ b/Items/Weapons/Rogue/DimensionTearingDisk.cs @@ -1,4 +1,6 @@ -using CalamityMod.Items.Weapons.Melee; +using System.Collections.Generic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Projectiles.Rogue; using CalamityMod.Rarities; using Microsoft.Xna.Framework; @@ -6,16 +8,18 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue { - public class Eradicator : RogueWeapon + [LegacyName("Eradicator")] + public class DimensionTearingDisk : RogueWeapon { public static float Speed = 10.5f; public override void SetStaticDefaults() { - ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } public override void SetDefaults() { @@ -32,10 +36,15 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.rare = ModContent.RarityType(); - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = Speed; } + public override void ModifyTooltips(List tooltips) + { + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + } + public override float StealthDamageMultiplier => 1f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) @@ -50,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Rogue/EradicatorGlow").Value); + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Rogue/DimensionTearingDiskGlow").Value); } } } diff --git a/Items/Weapons/Rogue/Eradicator.png b/Items/Weapons/Rogue/DimensionTearingDisk.png similarity index 100% rename from Items/Weapons/Rogue/Eradicator.png rename to Items/Weapons/Rogue/DimensionTearingDisk.png diff --git a/Items/Weapons/Rogue/EradicatorGlow.png b/Items/Weapons/Rogue/DimensionTearingDiskGlow.png similarity index 100% rename from Items/Weapons/Rogue/EradicatorGlow.png rename to Items/Weapons/Rogue/DimensionTearingDiskGlow.png diff --git a/Items/Weapons/Rogue/DynamicPursuer.cs b/Items/Weapons/Rogue/DynamicPursuer.cs index 7154af929f..3dc204cf19 100644 --- a/Items/Weapons/Rogue/DynamicPursuer.cs +++ b/Items/Weapons/Rogue/DynamicPursuer.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(). AddIngredient(). AddIngredient(5). AddTile(). diff --git a/Items/Weapons/Summon/FlamsteedRing.cs b/Items/Weapons/Summon/FlamsteedRing.cs index c9078ba8ce..24194781de 100644 --- a/Items/Weapons/Summon/FlamsteedRing.cs +++ b/Items/Weapons/Summon/FlamsteedRing.cs @@ -197,7 +197,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(). AddIngredient(). AddIngredient(ItemID.WingsVortex). AddIngredient(5). diff --git a/Items/Weapons/Summon/Metastasis.cs b/Items/Weapons/Summon/Metastasis.cs index 51fa3ef810..a849ad846a 100644 --- a/Items/Weapons/Summon/Metastasis.cs +++ b/Items/Weapons/Summon/Metastasis.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetStaticDefaults() { - ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); ItemID.Sets.StaffMinionSlotsRequired[Type] = 4f; } diff --git a/Items/Weapons/Summon/StaffoftheMechworm.cs b/Items/Weapons/Summon/VoidEaterMarionette.cs similarity index 74% rename from Items/Weapons/Summon/StaffoftheMechworm.cs rename to Items/Weapons/Summon/VoidEaterMarionette.cs index 83e6d27796..76c42a546f 100644 --- a/Items/Weapons/Summon/StaffoftheMechworm.cs +++ b/Items/Weapons/Summon/VoidEaterMarionette.cs @@ -1,22 +1,32 @@ -using System.Linq; +using System.Collections.Generic; +using System.Linq; using CalamityMod.Buffs.Summon; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Projectiles.Summon; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon { - public class StaffoftheMechworm : ModItem, ILocalizedModType + [LegacyName("StaffoftheMechworm")] + public class VoidEaterMarionette : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Summon"; + + public override void ModifyTooltips(List tooltips) + { + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); + } public override void SetStaticDefaults() { - ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } public override void SetDefaults() { @@ -32,11 +42,10 @@ namespace CalamityMod.Items.Weapons.Summon Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item113; Item.autoReuse = true; - Item.buffType = ModContent.BuffType(); - Item.shoot = ModContent.ProjectileType(); + Item.buffType = ModContent.BuffType(); + Item.shoot = ModContent.ProjectileType(); Item.DamageType = DamageClass.Summon; } - public override bool CanUseItem(Player player) { float neededSlots = 1; @@ -63,19 +72,19 @@ namespace CalamityMod.Items.Weapons.Summon Vector2 mouse = owner.ClampedMouseWorld(); - int curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, 0f, 0f); + int curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, 0f, 0f); if (Main.projectile.IndexInRange(curr)) Main.projectile[curr].originalDamage = baseDamage; - curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f); + curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f); if (Main.projectile.IndexInRange(curr)) Main.projectile[curr].originalDamage = baseDamage; int prev = curr; - curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f); + curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f); if (Main.projectile.IndexInRange(curr)) Main.projectile[curr].originalDamage = baseDamage; Main.projectile[prev].localAI[1] = curr; prev = curr; - curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f); + curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f); if (Main.projectile.IndexInRange(curr)) Main.projectile[curr].originalDamage = baseDamage; Main.projectile[prev].localAI[1] = curr; @@ -89,10 +98,10 @@ namespace CalamityMod.Items.Weapons.Summon return; Vector2 spawnPosition = Main.projectile[tailIndex].Center; - Projectile tailAheadSegment = Main.projectile.Take(Main.maxProjectiles).FirstOrDefault(proj => MechwormBody.SameIdentity(proj, owner.whoAmI, (int)Main.projectile[tailIndex].ai[0])); - int body = Projectile.NewProjectile(source, spawnPosition, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, tailAheadSegment.identity, 0f); + Projectile tailAheadSegment = Main.projectile.Take(Main.maxProjectiles).FirstOrDefault(proj => VoidEaterMarionetteBody.SameIdentity(proj, owner.whoAmI, (int)Main.projectile[tailIndex].ai[0])); + int body = Projectile.NewProjectile(source, spawnPosition, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, tailAheadSegment.identity, 0f); int body2 = body; - body = Projectile.NewProjectile(source, spawnPosition, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, Main.projectile[body].identity, 0f); + body = Projectile.NewProjectile(source, spawnPosition, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, owner.whoAmI, Main.projectile[body].identity, 0f); var m = Main.projectileIdentity; Main.projectile[tailIndex].ai[0] = Main.projectile[body].identity; @@ -112,11 +121,11 @@ namespace CalamityMod.Items.Weapons.Summon { if (p.owner == Main.myPlayer) { - if (head == -1 && p.type == ModContent.ProjectileType()) + if (head == -1 && p.type == ModContent.ProjectileType()) { head = p.whoAmI; } - if (tail == -1 && p.type == ModContent.ProjectileType()) + if (tail == -1 && p.type == ModContent.ProjectileType()) { tail = p.whoAmI; } diff --git a/Items/Weapons/Summon/StaffoftheMechworm.png b/Items/Weapons/Summon/VoidEaterMarionette.png similarity index 100% rename from Items/Weapons/Summon/StaffoftheMechworm.png rename to Items/Weapons/Summon/VoidEaterMarionette.png diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index b417f2f212..ae7fe53e5e 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1348,7 +1348,7 @@ MagicHatBuff: { Description: The hat carries your soul, bound by a contract } -Mechworm: { +VoidEaterMarionetteBuff: { DisplayName: Void Eater Marionette Description: The power to control the Devourer is yours } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 5b1fceaf5f..01b779cb79 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -232,9 +232,9 @@ DarkSpark: { ''' } -DeathhailStaff: { +HyperdeathRiftScepter: { DisplayName: Hyperdeath Rift Scepter - Tooltip: Rips a massive rift in spacetime + Tooltip: Tears space in two with [c/ff00ff:Hyperdeath Rift Ripper] } DeathValleyDuster: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 254c70ab62..313b9359da 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -486,14 +486,14 @@ ExaltedOathblade: { ''' } -Excelsus: { +MawOfInfinity: { DisplayName: Maw of Infinity Tooltip: ''' Swings a blade forged from the Devourer's maw in a 3-swing combo The first swing only hits close range - The second swing additionally launches Faith Incinerator - The third swing causes a bite at the cursor, exploding for masive damage + The second swing additionally launches [c/ff00ff:Faith Incinerator] + The third swing unleashes [c/ff00ff:Divinity Devourer] at your cursor, exploding for masive damage ''' } @@ -1365,7 +1365,7 @@ TheObliterator: { {$Common.YoyoStatsInfinite} [GFB] ''' - TooltipNormal: Occasionally performs a miniature Dimensional Drive at nearby foes + TooltipNormal: Occasionally performs a miniature [c/ff00ff:Dimensional Drive] at nearby foes TooltipGFB: just a slight bit of dust spam on this weapon im afraid } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 803105a556..9855a6c0b5 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -379,13 +379,13 @@ DeadSunsWind: { ''' } -Deathwind: { +ThreadOfEradication: { DisplayName: Thread of Eradication Tooltip: ''' - Charges up a God Killer Doombeam - Channelling the weapon causes it to charge up an even more powerful Hyperdeath Ripper - While charging the Hyperdeath Ripper, the bow's turning speed is slowed down + Charges up [c/ff00ff:God's Bane Doombeam] + Channelling the weapon causes it to charge up [c/ff00ff:Hyperdeath Rift] instead + While charging [c/ff00ff:Hyperdeath Rift], the bow's turning speed is slowed down ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 9df814eef7..c84051afc3 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -383,12 +383,12 @@ Equanimity: { ''' } -Eradicator: { +DimensionTearingDisk: { DisplayName: Dimension-Tearing Disk Tooltip: ''' Throws a disk that tears space in the direction of the nearest enemy - Stealth strikes stick to enemies and unleash God Killer Doombeam Array + Stealth strikes stick to enemies and unleash [c/ff00ff:God's Bane Doombeam Array] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index d9e693ef0e..48d81d6a50 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -746,13 +746,14 @@ StaffOfNecrosteocytes: { ''' } -StaffoftheMechworm: { +VoidEaterMarionette: { DisplayName: Void Eater Marionette Tooltip: - ''' - Contains the power to control a miniature Devourer - Repeated summons increase the length of the Devourer - ''' + ''' + Contains the power to control a miniature Devourer + Repeated summons increase the length of the Devourer + The Devourer alternates between using [c/ff00ff:Faith Incinerator] and [c/ff00ff:Ultracosmic Maelstrom] + ''' } StarspawnHelixStaff: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 8245a3c2cd..ed22fc9981 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -169,5 +169,5 @@ WaterSpear.DisplayName: Water Spear YharonBulletHellVortex.DisplayName: Bullet Hell Vortex YharonFireball.DisplayName: Dragon Fireball YharonFireball2.DisplayName: Dragon Fireball -DeathhailBeam.DisplayName: Deathhail Beam -FriendlyLaserWallBeam.DisplayName: Friendly Laser Wall Beam +FriendlyLaserWallBeam.DisplayName: God's Bane Doombeam +HyperdeathRiftScepterBeam.DisplayName: Hyperdeath Rift Scepter Beam diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index 16d495a2de..d2d3a33f84 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -51,7 +51,7 @@ CosmicTentacle.DisplayName: Dark Tentacle CryoBlast.DisplayName: Cryo Blast DarkSparkBeam.DisplayName: Dark Spark Beam DarkSparkPrism.DisplayName: Dark Crystal -DeathhailBeam.DisplayName: Deathhail +HyperdeathRiftScepterBeam.DisplayName: Hypderdeath Rift Ripper DeathValleyDusterProjectile.DisplayName: Death Valley Duster EelDrop.DisplayName: Acid Eel Drop EidolicWailSoundwave.DisplayName: Eidolic Wail @@ -261,3 +261,4 @@ WyvernFeatherPurple.DisplayName: Feather WyvernProjectile.DisplayName: Wyvern YharimsCrystalBeam.DisplayName: Yharim's Beam YharimsCrystalPrism.DisplayName: Yermes Christal +DeathhailBeam.DisplayName: Deathhail Beam diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 904c2d16c4..95c7ba3d4f 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -106,8 +106,8 @@ EntropicFlechette.DisplayName: Entropic Flechette EonBolt.DisplayName: Eon Bolt EssenceScythe.DisplayName: Essence Scythe ExaltedOathbladeThrownBlade.DisplayName: Exalted Oathblade Thrown Blade -ExcelsusHoldout.DisplayName: Maw of Infinity -ExcelsusJaws.DisplayName: Infinity's Bite +MawOfInfinityHoldout.DisplayName: Maw of Infinity +MawOfInfinityJaws.DisplayName: Divinity Devourer Exobeam.DisplayName: Exobeam ExobeamSlash.DisplayName: Exobeam Slash ExobeamSlashCreator.DisplayName: Anime Sword Effect diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index dff876c6d5..136d2e0487 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -95,7 +95,7 @@ EpidemicShredderProjectile.DisplayName: Epidemic Shredder EquanimityDarkShard.DisplayName: Dark Shard EquanimityLightShard.DisplayName: Light Shard EquanimityProj.DisplayName: Equanimity -EradicatorProjectile.DisplayName: Eradicator +DimensionTearingDiskProjectile.DisplayName: Dimension-Tearing Disk ExecutionersBladeProj.DisplayName: Executioner's Blade ExecutionersBladeStealthProj.DisplayName: Executioner's Blade ExorcismProj.DisplayName: Exorcism diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 0df5dd6778..2bdb7f0d19 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -167,11 +167,10 @@ LostSoulGold.DisplayName: Gold Soul LostSoulLarge.DisplayName: Soul LostSoulSmall.DisplayName: Soul LuxorsGiftSummon.DisplayName: Luxor's Summon -MechwormBody.DisplayName: Mechworm -MechwormHead.DisplayName: Mechworm -MechwormLaser.DisplayName: Mechworm Laser -MechwormTail.DisplayName: Mechworm -MechwormTeleportRift.DisplayName: Rift +VoidEaterMarionetteBody.DisplayName: Void Eater Marionette +VoidEaterMarionetteHead.DisplayName: Void Eater Marionette +VoidEaterMarionetteTail.DisplayName: Void Eater Marionette +DoGWeaponTeleportRift.DisplayName: Rift MidnightSunBeaconProj.DisplayName: Midnight Sun Beacon MidnightSunBeam.DisplayName: Midnight Beam MidnightSunShot.DisplayName: Midnight Shot diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 93d249ce38..40cdfb7722 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -1207,7 +1207,7 @@ namespace CalamityMod RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); - RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index f1e0a49651..fcf697e9b4 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -53,6 +53,8 @@ namespace CalamityMod.NPCs.DevourerofGods [LongDistanceNetSync] public class DevourerofGodsHead : ModNPC { + public static Color SpecialMoveColor => Color.Lerp(Color.Fuchsia, Color.Cyan, MathHelper.SmoothStep(0,1,(MathF.Sin(Main.GlobalTimeWrappedHourly*2)+1) * 0.5f)); + public static int phase1IconIndex; public static int phase2IconIndex; @@ -2572,12 +2574,12 @@ if (NPC.localAI[2] == timeWhenDoGShouldTeleportDuringPhase2Countdown + 115) // Weapons int[] weapons = new int[] { - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() }; normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons)); normalOnly.Add(ModContent.ItemType(), 10); diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 57002f0249..7e3504040f 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -273,7 +273,7 @@ namespace CalamityMod.Projectiles /// /// Custom update priority.
/// Calamity sorts projectiles by their update priority to fix otherwise absurdly difficult to resolve visual bugs on certain weapons.
- /// Examples include Mechworm segments detaching or Rancor's laser beam being offset from the magic circle. + /// Examples include Void Eater Marionette segments detaching or Rancor's laser beam being offset from the magic circle. ///
public float UpdatePriority = 0f; diff --git a/Projectiles/Magic/ApotheosisWorm.cs b/Projectiles/Magic/ApotheosisWorm.cs index 930ec49e1f..e450fd3ea6 100644 --- a/Projectiles/Magic/ApotheosisWorm.cs +++ b/Projectiles/Magic/ApotheosisWorm.cs @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Magic // This variant of segment attachment incorporates rotation. // Given the fact that all segments will execute this code is succession, the // result across the entire worm will exponentially decay over each segment, - // allowing for smooth rotations. This code is what the stardust dragon and mechworm use for their segmenting. + // allowing for smooth rotations. This code is what the stardust dragon and Void Eater Marionette use for their segmenting. if (aheadSegmentRotation != Segments[segmentIndex].Rotation) { float offsetAngle = MathHelper.WrapAngle(aheadSegmentRotation - Segments[segmentIndex].Rotation); diff --git a/Projectiles/Magic/DeathhailBeam.cs b/Projectiles/Magic/DeathhailBeam.cs index 7f06eb0f68..077c9eeec0 100644 --- a/Projectiles/Magic/DeathhailBeam.cs +++ b/Projectiles/Magic/DeathhailBeam.cs @@ -1,160 +1,59 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Projectiles.BaseProjectiles; -using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; -using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic { - public class DeathhailBeam : ModProjectile, ILocalizedModType + public class DeathhailBeam : BaseLaserbeamProjectile, ILocalizedModType { + public new string LocalizationCategory => "Projectiles.Magic"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public new string LocalizationCategory => "Projectiles.Boss"; - public float time = 0; - public ref float attackSpeed => ref Projectile.ai[0]; - public ref float laserType => ref Projectile.ai[2]; - public bool canDamage => doneAttack && laserFX >= 1f; - public bool doneAttack = false; - public int attackTime = 10; - public float laserLength => 3000; - public float laserFX = 0; - public float storedTime = 0; - public Color drawColor = Color.Magenta; - public float sine = 0; - public float laserRot = 0; - Vector2 beamStart = Vector2.Zero; - Vector2 directionToTarget = Vector2.Zero; - public Vector2 targetPos => Projectile.Center; - public override void SetStaticDefaults() - { - ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; - } + + private Color startingColor = new Color(119, 210, 255); + private Color secondColor = new Color(247, 119, 255); + public override float MaxScale => 0.7f; + public override float MaxLaserLength => 1599.999999f; + public override float Lifetime => 20f; + public override Color LaserOverlayColor => CalamityUtils.ColorSwap(startingColor, secondColor, 0.9f); + public override Color LightCastColor => LaserOverlayColor; + public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayStart", AssetRequestMode.ImmediateLoad).Value; + public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayMid", AssetRequestMode.ImmediateLoad).Value; + public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd", AssetRequestMode.ImmediateLoad).Value; + public override void SetDefaults() { - Projectile.width = 1; - Projectile.height = 1; + Projectile.width = Projectile.height = 22; Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; + Projectile.DamageType = DamageClass.Magic; Projectile.penetrate = -1; - Projectile.timeLeft = 6000; - Projectile.scale = 2; - Projectile.usesLocalNPCImmunity = true; + Projectile.alpha = 255; Projectile.localNPCHitCooldown = -1; + Projectile.usesLocalNPCImmunity = true; } - public override void AI() + + public override bool PreAI() { - if (laserFX > 0) - laserFX = MathHelper.Lerp(laserFX, 0, time > 15 ? 0.07f : 0.01f); - sine = (float)Math.Sin(time * 4f / MathHelper.Pi); - if (time == 0) + // Initialization. Using the AI hook would override the base laser's code, and we don't want that. + if (Projectile.localAI[0] == 0f) { - laserType = 1; - if (CalamityWorld.LegendaryMode) - Projectile.scale = 6; - laserRot = Main.rand.NextFloat(-0.4f, 0.4f); - - beamStart = targetPos + ((laserType == 0 || laserType == 4 || laserType == 5) ? Vector2.UnitX : Vector2.UnitY).RotatedBy(laserRot) * laserLength; - directionToTarget = beamStart.DirectionTo(targetPos); - - Projectile.Center += Main.rand.NextVector2CircularEdge(400, 400); - // Some default values for if the projectile spawns without them set - if (attackSpeed == 0) - attackSpeed = 0.5f; - Projectile.velocity = Vector2.Zero; - laserFX = 1f; - Projectile.ForceNetUpdate(); + if (Main.rand.NextBool()) + { + secondColor = new Color(119, 210, 255); + startingColor = new Color(247, 119, 255); + } } - if (time >= attackTime && !doneAttack) - { - SoundStyle attack = new("CalamityMod/Sounds/Custom/DoGLaserWallBigAttack"); - SoundEngine.PlaySound(attack with { Volume = 0.6f, Pitch = 0, MaxInstances = -1 }, targetPos); - laserFX = 2.5f; - doneAttack = true; - storedTime = time; - Projectile.ForceNetUpdate(); - - - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3 && Main.LocalPlayer.Distance(Projectile.Center) < 1600) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3; - } - float endTime = storedTime + 10; - if (time >= endTime && doneAttack) - { - Projectile.Kill(); - return; - } - else if (doneAttack) - { - drawColor = Color.Lerp(Color.Magenta, Color.Cyan, (float)Math.Pow(Utils.GetLerpValue(endTime, storedTime, time, true), 2)); - } - time += attackSpeed; + return true; } - public override bool? CanHitNPC(NPC target) - { - if (canDamage) - return true; - return false; - } - public override bool CanHitPlayer(Player target) - { - if (canDamage) - return true; - return false; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - base.OnHitPlayer(target, info); - } + public override bool ShouldUpdatePosition() => false; - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 180); - base.OnHitNPC(target, hit, damageDone); - } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - if (!canDamage) - return false; - else - { - float _ = float.NaN; - Vector2 start = beamStart; - Vector2 end = beamStart + directionToTarget * laserLength * 2; - bool hitCheck = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 70 * Projectile.scale, ref _); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); - return hitCheck; - } - } - public override bool PreDraw(ref Color lightColor) - { - if (laserFX == 0) - return false; - Texture2D beam = ModContent.Request("CalamityMod/Particles/BloomLineThick").Value; - Texture2D bBeam = ModContent.Request("CalamityMod/Particles/LineThick").Value; - Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; - float opacity = (doneAttack ? 0.65f : 0.35f) * (float)Math.Pow(Math.Min(laserFX, 1), 2); - Color beamColor = drawColor with { A = 0 }; - - if (CalamityClientConfig.Instance.Photosensitivity) - opacity = 0.2f; - for (int t = 0; t < (!doneAttack ? 1 : 4 * Projectile.scale); t++) - { - bool black = (t > 0 + (Projectile.scale - 1)); - if (black) - beam = bBeam; - - float beamThickness = 0.09f * (black ? (0.8f - 0.15f * t / Projectile.scale) : 1f) * (laserFX <= 1 ? (float)Math.Pow(Math.Min(laserFX, 1), 2) : laserFX) * Utils.Remap(sine, -1, 1, 0.8f, 1.1f); - Main.EntitySpriteDraw(beam, beamStart - Main.screenPosition, null, (black ? Color.Black * opacity : beamColor * (1 - t * 0.3f) * opacity) * (black ? (0.2f + 0.15f * t / Projectile.scale) : 1), directionToTarget.ToRotation() + MathHelper.PiOver2, new Vector2(beam.Width / 2, beam.Height), new Vector2(beamThickness, laserLength / 975) * Projectile.scale, SpriteEffects.None); - } - return false; - } + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 180); } } diff --git a/Projectiles/Magic/HyperdeathRiftScepterBeam.cs b/Projectiles/Magic/HyperdeathRiftScepterBeam.cs new file mode 100644 index 0000000000..d6b7df260a --- /dev/null +++ b/Projectiles/Magic/HyperdeathRiftScepterBeam.cs @@ -0,0 +1,160 @@ +using System; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Magic +{ + public class HyperdeathRiftScepterBeam : ModProjectile, ILocalizedModType + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public new string LocalizationCategory => "Projectiles.Boss"; + public float time = 0; + public ref float attackSpeed => ref Projectile.ai[0]; + public ref float laserType => ref Projectile.ai[2]; + public bool canDamage => doneAttack && laserFX >= 1f; + public bool doneAttack = false; + public int attackTime = 10; + public float laserLength => 3000; + public float laserFX = 0; + public float storedTime = 0; + public Color drawColor = Color.Magenta; + public float sine = 0; + public float laserRot = 0; + Vector2 beamStart = Vector2.Zero; + Vector2 directionToTarget = Vector2.Zero; + public Vector2 targetPos => Projectile.Center; + public override void SetStaticDefaults() + { + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; + } + public override void SetDefaults() + { + Projectile.width = 1; + Projectile.height = 1; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.penetrate = -1; + Projectile.timeLeft = 6000; + Projectile.scale = 2; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + public override void AI() + { + if (laserFX > 0) + laserFX = MathHelper.Lerp(laserFX, 0, time > 15 ? 0.07f : 0.01f); + sine = (float)Math.Sin(time * 4f / MathHelper.Pi); + if (time == 0) + { + laserType = 1; + if (CalamityWorld.LegendaryMode) + Projectile.scale = 6; + laserRot = Main.rand.NextFloat(-0.4f, 0.4f); + + beamStart = targetPos + ((laserType == 0 || laserType == 4 || laserType == 5) ? Vector2.UnitX : Vector2.UnitY).RotatedBy(laserRot) * laserLength; + directionToTarget = beamStart.DirectionTo(targetPos); + + Projectile.Center += Main.rand.NextVector2CircularEdge(400, 400); + // Some default values for if the projectile spawns without them set + if (attackSpeed == 0) + attackSpeed = 0.5f; + Projectile.velocity = Vector2.Zero; + laserFX = 1f; + Projectile.ForceNetUpdate(); + } + if (time >= attackTime && !doneAttack) + { + SoundStyle attack = new("CalamityMod/Sounds/Custom/DoGLaserWallBigAttack"); + SoundEngine.PlaySound(attack with { Volume = 0.6f, Pitch = 0, MaxInstances = -1 }, targetPos); + laserFX = 2.5f; + doneAttack = true; + storedTime = time; + Projectile.ForceNetUpdate(); + + + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3 && Main.LocalPlayer.Distance(Projectile.Center) < 1600) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3; + } + float endTime = storedTime + 10; + if (time >= endTime && doneAttack) + { + Projectile.Kill(); + return; + } + else if (doneAttack) + { + drawColor = Color.Lerp(Color.Magenta, Color.Cyan, (float)Math.Pow(Utils.GetLerpValue(endTime, storedTime, time, true), 2)); + } + time += attackSpeed; + } + + public override bool? CanHitNPC(NPC target) + { + if (canDamage) + return true; + return false; + } + public override bool CanHitPlayer(Player target) + { + if (canDamage) + return true; + return false; + } + public override void OnHitPlayer(Player target, Player.HurtInfo info) + { + base.OnHitPlayer(target, info); + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 180); + base.OnHitNPC(target, hit, damageDone); + } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (!canDamage) + return false; + else + { + float _ = float.NaN; + Vector2 start = beamStart; + Vector2 end = beamStart + directionToTarget * laserLength * 2; + bool hitCheck = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 70 * Projectile.scale, ref _); + + return hitCheck; + } + } + public override bool PreDraw(ref Color lightColor) + { + if (laserFX == 0) + return false; + Texture2D beam = ModContent.Request("CalamityMod/Particles/BloomLineThick").Value; + Texture2D bBeam = ModContent.Request("CalamityMod/Particles/LineThick").Value; + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + float opacity = (doneAttack ? 0.65f : 0.35f) * (float)Math.Pow(Math.Min(laserFX, 1), 2); + Color beamColor = drawColor with { A = 0 }; + + if (CalamityClientConfig.Instance.Photosensitivity) + opacity = 0.2f; + for (int t = 0; t < (!doneAttack ? 1 : 4 * Projectile.scale); t++) + { + bool black = (t > 0 + (Projectile.scale - 1)); + if (black) + beam = bBeam; + + float beamThickness = 0.09f * (black ? (0.8f - 0.15f * t / Projectile.scale) : 1f) * (laserFX <= 1 ? (float)Math.Pow(Math.Min(laserFX, 1), 2) : laserFX) * Utils.Remap(sine, -1, 1, 0.8f, 1.1f); + Main.EntitySpriteDraw(beam, beamStart - Main.screenPosition, null, (black ? Color.Black * opacity : beamColor * (1 - t * 0.3f) * opacity) * (black ? (0.2f + 0.15f * t / Projectile.scale) : 1), directionToTarget.ToRotation() + MathHelper.PiOver2, new Vector2(beam.Width / 2, beam.Height), new Vector2(beamThickness, laserLength / 975) * Projectile.scale, SpriteEffects.None); + } + return false; + } + } +} diff --git a/Projectiles/Melee/ExcelsusHoldout.cs b/Projectiles/Melee/MawOfInfinityHoldout.cs similarity index 97% rename from Projectiles/Melee/ExcelsusHoldout.cs rename to Projectiles/Melee/MawOfInfinityHoldout.cs index 439043a745..73365e2b79 100644 --- a/Projectiles/Melee/ExcelsusHoldout.cs +++ b/Projectiles/Melee/MawOfInfinityHoldout.cs @@ -14,13 +14,13 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class ExcelsusHoldout : BaseSwordHoldoutProjectile, ILocalizedModType + public class MawOfInfinityHoldout : BaseSwordHoldoutProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public override bool useMeleeSpeed => true; public override bool useMeleeSize => true; public override int swingWidth => 270; - public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; + public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; public override int AfterImageLength => 0; public override int StartupTime { get; set; } @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Melee break; case 0: if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), player.Center, -angle * 3, ModContent.ProjectileType(), Projectile.damage * 2, Projectile.knockBack, player.whoAmI); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), player.Center, -angle * 3, ModContent.ProjectileType(), Projectile.damage * 2, Projectile.knockBack, player.whoAmI); player.itemAnimation = BaseItem.useAnimation; player.itemTime = BaseItem.useTime; Projectile.Kill(); diff --git a/Projectiles/Melee/ExcelsusJaws.cs b/Projectiles/Melee/MawOfInfinityJaws.cs similarity index 98% rename from Projectiles/Melee/ExcelsusJaws.cs rename to Projectiles/Melee/MawOfInfinityJaws.cs index 4197d4a760..d086b2ec6f 100644 --- a/Projectiles/Melee/ExcelsusJaws.cs +++ b/Projectiles/Melee/MawOfInfinityJaws.cs @@ -13,7 +13,7 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class ExcelsusJaws : ModProjectile, ILocalizedModType + public class MawOfInfinityJaws : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; diff --git a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs index 46b73698af..831be11410 100644 --- a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos } if (Main.myPlayer == Projectile.owner) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0, Projectile.owner); } int laserAmount = 8; for (int i = 0; i < laserAmount; i++) diff --git a/Projectiles/Rogue/EradicatorProjectile.cs b/Projectiles/Rogue/DimensionTearingDiskProjectile.cs similarity index 97% rename from Projectiles/Rogue/EradicatorProjectile.cs rename to Projectiles/Rogue/DimensionTearingDiskProjectile.cs index 5075908dac..593a77070d 100644 --- a/Projectiles/Rogue/EradicatorProjectile.cs +++ b/Projectiles/Rogue/DimensionTearingDiskProjectile.cs @@ -14,10 +14,10 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue { [PierceResistException] - public class EradicatorProjectile : ModProjectile, ILocalizedModType + public class DimensionTearingDiskProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/Eradicator"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/DimensionTearingDisk"; private static float RotationIncrement = 0.15f; private static int Lifetime = 350; public static int StealthExtraLifetime = 240; // 1 extra update means this is double what you'd expect for 2 seconds @@ -228,7 +228,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { Vector2 origin = new Vector2(31f, 29f); - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/EradicatorGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/DimensionTearingDiskGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); } } } diff --git a/Projectiles/Summon/MechwormTeleportRift.cs b/Projectiles/Summon/DoGWeaponTeleportRift.cs similarity index 98% rename from Projectiles/Summon/MechwormTeleportRift.cs rename to Projectiles/Summon/DoGWeaponTeleportRift.cs index 913d734f22..365354fafa 100644 --- a/Projectiles/Summon/MechwormTeleportRift.cs +++ b/Projectiles/Summon/DoGWeaponTeleportRift.cs @@ -7,7 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class MechwormTeleportRift : ModProjectile, ILocalizedModType + public class DoGWeaponTeleportRift : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; public override string Texture => "CalamityMod/Projectiles/StarProj"; diff --git a/Projectiles/Summon/MoonFist.cs b/Projectiles/Summon/MoonFist.cs index dec5c356bd..b3b3276ba9 100644 --- a/Projectiles/Summon/MoonFist.cs +++ b/Projectiles/Summon/MoonFist.cs @@ -94,7 +94,6 @@ namespace CalamityMod.Projectiles.Summon public void ApplyMinionBuffs() { - // Maintain or remove the Mechworm buff from the owner. Owner.AddBuff(ModContent.BuffType(), 3600); if (Owner.dead) Owner.Calamity().MoonFist = false; diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/VoidEaterMarionetteBody.cs similarity index 91% rename from Projectiles/Summon/MechwormBody.cs rename to Projectiles/Summon/VoidEaterMarionetteBody.cs index dec72c4e7a..4f4775e5f0 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/VoidEaterMarionetteBody.cs @@ -10,7 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class MechwormBody : ModProjectile, ILocalizedModType + public class VoidEaterMarionetteBody : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Summon internal static void SegmentAI(Projectile projectile, int offsetFromNextSegment, ref int playerMinionSlots) { - // If the mechworm is opaque enough, produce light. + // If the worm is opaque enough, produce light. if (projectile.alpha <= 128) Lighting.AddLight(projectile.Center, Color.DarkMagenta.ToVector3()); @@ -56,13 +56,13 @@ namespace CalamityMod.Projectiles.Summon // Track the minion presence boolean. if (owner.dead) - modPlayer.mWorm = false; - if (modPlayer.mWorm) + modPlayer.hasVoidEaterMarionette = false; + if (modPlayer.hasVoidEaterMarionette) projectile.timeLeft = 2; - int headProjType = ModContent.ProjectileType(); - int bodyProjType = ModContent.ProjectileType(); - int tailProjType = ModContent.ProjectileType(); + int headProjType = ModContent.ProjectileType(); + int bodyProjType = ModContent.ProjectileType(); + int tailProjType = ModContent.ProjectileType(); ref float segmentAheadIdentity = ref projectile.ai[0]; Projectile segmentAhead = Main.projectile.Take(Main.maxProjectiles).FirstOrDefault(proj => SameIdentity(proj, projectile.owner, (int)projectile.ai[0])); @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Summon // Each body slot is actually 0.5 slots. Kill two segments to lose 1 "true" slot. for (int i = 0; i < 2; ++i) { - if (ahead.type != ModContent.ProjectileType()) + if (ahead.type != ModContent.ProjectileType()) projectile.localAI[1] = ahead.localAI[1]; // Inherit the ahead segment index of the ahead segment (basically attaching to the segment that's two indices ahead). @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Summon projectile.extraUpdates = head.extraUpdates; projectile.localNPCHitCooldown = head.localNPCHitCooldown; - MechwormHead headModProj = head.ModProjectile(); + VoidEaterMarionetteHead headModProj = head.ModProjectile(); if (headModProj.EndRiftGateUUID == -1) { // Very rapidly fade-in. @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Summon } else if (projectile.Hitbox.Intersects(Main.projectile[headModProj.EndRiftGateUUID].Hitbox)) { - // Disappear if touching the mechworm portal. + // Disappear if touching the portal. // It will look like it's teleporting, when in reality, it's // just an invisible, uninteractable projectile for the time being. projectile.alpha = 255; @@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Summon if (segmentAhead.rotation != projectile.rotation) { float offsetAngle = MathHelper.WrapAngle(segmentAhead.rotation - projectile.rotation); - offsetToDestination = offsetToDestination.RotatedBy(offsetAngle * 0.08f); + offsetToDestination = offsetToDestination.RotatedBy(offsetAngle * 0.25f); } projectile.rotation = offsetToDestination.ToRotation() + MathHelper.PiOver2; @@ -170,7 +170,7 @@ namespace CalamityMod.Projectiles.Summon public static Projectile LocateHead(Projectile projectile) { - int headType = ModContent.ProjectileType(); + int headType = ModContent.ProjectileType(); foreach (Projectile p in Main.ActiveProjectiles) { if (p.type != headType || p.owner != projectile.owner) diff --git a/Projectiles/Summon/MechwormBody.png b/Projectiles/Summon/VoidEaterMarionetteBody.png similarity index 100% rename from Projectiles/Summon/MechwormBody.png rename to Projectiles/Summon/VoidEaterMarionetteBody.png diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/VoidEaterMarionetteHead.cs similarity index 95% rename from Projectiles/Summon/MechwormHead.cs rename to Projectiles/Summon/VoidEaterMarionetteHead.cs index 235414b8c6..9d24c33a5e 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/VoidEaterMarionetteHead.cs @@ -16,7 +16,7 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class MechwormHead : ModProjectile, ILocalizedModType + public class VoidEaterMarionetteHead : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; internal enum AttackState : byte @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Summon internal ref float Time => ref Projectile.ai[1]; internal ref float TotalWormSegments => ref Projectile.localAI[0]; - // Helper functions because Mechworm does a lot of checking for either itself or its target being near the edge of the world. + // Helper functions because Void Eater Marionette does a lot of checking for either itself or its target being near the edge of the world. private static Vector2 WorldTopLeft(int tileDist = 15) => new Vector2(tileDist * 16f); private static Vector2 WorldBottomRight(int tileDist = 15) => new Vector2(Main.maxTilesX - tileDist, Main.maxTilesY - tileDist) * 16f; @@ -124,10 +124,10 @@ namespace CalamityMod.Projectiles.Summon CalamityPlayer modPlayer = owner.Calamity(); // Maintain or remove the Mechworm buff from the owner. - owner.AddBuff(ModContent.BuffType(), 3600); + owner.AddBuff(ModContent.BuffType(), 3600); if (owner.dead) - modPlayer.mWorm = false; - if (modPlayer.mWorm) + modPlayer.hasVoidEaterMarionette = false; + if (modPlayer.hasVoidEaterMarionette) Projectile.timeLeft = 2; Time++; @@ -320,6 +320,7 @@ namespace CalamityMod.Projectiles.Summon int chargeTime = (int)MathHelper.Min(36 + TotalWormSegments, 70); if (AttackStateTimer % chargeTime == 0) { + Projectile.ResetLocalNPCHitImmunity(); Vector2 offsetBounds = Vector2.Max(target.Size, new Vector2(425f + TotalWormSegments * 8f)); Vector2 offset = Main.rand.NextVector2CircularEdge(offsetBounds.X, offsetBounds.Y) * 0.65f; @@ -352,9 +353,9 @@ namespace CalamityMod.Projectiles.Summon SparkParticle spark = new SparkParticle(TeleportStartingPoint, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); GeneralParticleHandler.SpawnParticle(spark); } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), TeleportStartingPoint, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), TeleportStartingPoint, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner); } - int endGateIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), TeleportEndingPoint, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner); + int endGateIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), TeleportEndingPoint, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner); EndRiftGateUUID = Projectile.GetByUUID(Projectile.owner, endGateIndex); Main.projectile[EndRiftGateUUID].ai[0] = chargeTime; @@ -371,8 +372,9 @@ namespace CalamityMod.Projectiles.Summon if (otherProj.owner != Projectile.owner || otherProj.whoAmI == Projectile.whoAmI) continue; - if (otherProj.type == ModContent.ProjectileType() || otherProj.type == ModContent.ProjectileType()) + if (otherProj.type == ModContent.ProjectileType() || otherProj.type == ModContent.ProjectileType()) { + otherProj.ResetLocalNPCHitImmunity(); otherProj.alpha = 0; if (AttackStateTimer != 0) otherProj.Center = Projectile.Center; @@ -403,7 +405,7 @@ namespace CalamityMod.Projectiles.Summon private void CleanUpMechwormPortals() { - int portalType = ModContent.ProjectileType(); + int portalType = ModContent.ProjectileType(); foreach (Projectile proj in Main.ActiveProjectiles) { if (proj.type != portalType || proj.owner != Projectile.owner) @@ -435,7 +437,7 @@ namespace CalamityMod.Projectiles.Summon return; Vector2 origin = new Vector2(21f, 25f); - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Summon/MechwormHeadGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Summon/VoidEaterMarionetteHeadGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); } public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) diff --git a/Projectiles/Summon/MechwormHead.png b/Projectiles/Summon/VoidEaterMarionetteHead.png similarity index 100% rename from Projectiles/Summon/MechwormHead.png rename to Projectiles/Summon/VoidEaterMarionetteHead.png diff --git a/Projectiles/Summon/MechwormHeadGlow.png b/Projectiles/Summon/VoidEaterMarionetteHeadGlow.png similarity index 100% rename from Projectiles/Summon/MechwormHeadGlow.png rename to Projectiles/Summon/VoidEaterMarionetteHeadGlow.png diff --git a/Projectiles/Summon/MechwormTail.cs b/Projectiles/Summon/VoidEaterMarionetteTail.cs similarity index 94% rename from Projectiles/Summon/MechwormTail.cs rename to Projectiles/Summon/VoidEaterMarionetteTail.cs index 3e4257fb5f..104a0f45dc 100644 --- a/Projectiles/Summon/MechwormTail.cs +++ b/Projectiles/Summon/VoidEaterMarionetteTail.cs @@ -8,7 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class MechwormTail : ModProjectile, ILocalizedModType + public class VoidEaterMarionetteTail : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; private int playerMinionSlots = 0; @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.localAI[0] = 0f; - MechwormBody.SegmentAI(Projectile, 16, ref playerMinionSlots); + VoidEaterMarionetteBody.SegmentAI(Projectile, 16, ref playerMinionSlots); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 90); diff --git a/Projectiles/Summon/MechwormTail.png b/Projectiles/Summon/VoidEaterMarionetteTail.png similarity index 100% rename from Projectiles/Summon/MechwormTail.png rename to Projectiles/Summon/VoidEaterMarionetteTail.png diff --git a/UI/CalamitasEnchantments/EnchantmentManager.cs b/UI/CalamitasEnchantments/EnchantmentManager.cs index 391c334539..21fa902136 100644 --- a/UI/CalamitasEnchantments/EnchantmentManager.cs +++ b/UI/CalamitasEnchantments/EnchantmentManager.cs @@ -319,7 +319,7 @@ namespace CalamityMod.UI.CalamitasEnchants { [ModContent.ItemType()] = ModContent.ItemType(), [ModContent.ItemType()] = ModContent.ItemType(), - [ModContent.ItemType()] = ModContent.ItemType(), + [ModContent.ItemType()] = ModContent.ItemType(), [ModContent.ItemType()] = ModContent.ItemType(), [ModContent.ItemType()] = ModContent.ItemType() };