diff --git a/Buffs/Summon/KalandraMirrorBuff.cs b/Buffs/Summon/KalandraMirrorBuff.cs new file mode 100644 index 0000000000..6882b77d11 --- /dev/null +++ b/Buffs/Summon/KalandraMirrorBuff.cs @@ -0,0 +1,35 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class KalandraMirrorBuff : ModBuff + { + public override void SetStaticDefaults() + { + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + //Main.persistentBuff[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.KalandraMirror = true; + } + if (!modPlayer.KalandraMirror) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/KalandraMirrorBuff.png b/Buffs/Summon/KalandraMirrorBuff.png new file mode 100644 index 0000000000..5c96dedec4 Binary files /dev/null and b/Buffs/Summon/KalandraMirrorBuff.png differ diff --git a/Buffs/Summon/StellarTorusBuff.cs b/Buffs/Summon/StellarTorusBuff.cs new file mode 100644 index 0000000000..76014bda39 --- /dev/null +++ b/Buffs/Summon/StellarTorusBuff.cs @@ -0,0 +1,35 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class StellarTorusBuff : ModBuff + { + public override void SetStaticDefaults() + { + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + //Main.persistentBuff[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.StellarTorus = true; + } + if (!modPlayer.StellarTorus) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/StellarTorusBuff.png b/Buffs/Summon/StellarTorusBuff.png new file mode 100644 index 0000000000..3fe4646b6c Binary files /dev/null and b/Buffs/Summon/StellarTorusBuff.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3a50125ece..eea01f0c49 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -265,6 +265,7 @@ namespace CalamityMod.CalPlayer public static readonly SoundStyle IjiDeathSound = new("CalamityMod/Sounds/Custom/IjiDies"); public static readonly SoundStyle DrownSound = new("CalamityMod/Sounds/Custom/AbyssDrown"); + public static readonly SoundStyle LeonDeathNoiseRE4_ForGFB = new("CalamityMod/Sounds/Custom/GFB/LeonDeathNoiseRE4"); #endregion #region Rogue @@ -979,6 +980,8 @@ namespace CalamityMod.CalPlayer public bool MoonFist = false; public bool AresCannons = false; public bool celestialDragons = false; + public bool KalandraMirror = false; + public bool StellarTorus = false; public List PendingProjectilesToRespawn = new List(); @@ -1412,13 +1415,7 @@ namespace CalamityMod.CalPlayer percentMaxLifeIncrease += 10; if (community) - { - float BoostAtZeroBosses = 0.05f; - float BoostPostYharon = 0.2f; - float floatTypeBoost = MathHelper.Lerp(BoostAtZeroBosses, BoostPostYharon, TheCommunity.CalculatePower()); - int integerTypeBoost = (int)(floatTypeBoost * 50f); - percentMaxLifeIncrease += integerTypeBoost; - } + percentMaxLifeIncrease += (int)(TheCommunity.CalculatePower() * TheCommunity.HealthMultiplier); // Shattered Community gives the same max health boost as normal full-power Community (10%) if (shatteredCommunity) @@ -2016,6 +2013,8 @@ namespace CalamityMod.CalPlayer MoonFist = false; AresCannons = false; celestialDragons = false; + KalandraMirror = false; + StellarTorus = false; disableVoodooSpawns = false; disablePerfCystSpawns = false; @@ -2707,7 +2706,7 @@ namespace CalamityMod.CalPlayer SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center); for (int d = 0; d < 64; d++) { - int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f); + int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); Main.dust[dust].velocity *= 3f; Main.dust[dust].scale *= 1.15f; } @@ -2717,7 +2716,7 @@ namespace CalamityMod.CalPlayer Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f; source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center; Vector2 dustVel = source - Player.Center; - int phanto = Dust.NewDust(source + dustVel, 0, 0, (int)CalamityDusts.Phantoplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f); + int phanto = Dust.NewDust(source + dustVel, 0, 0, (int)CalamityDusts.Polterplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f); Main.dust[phanto].noGravity = true; Main.dust[phanto].noLight = true; Main.dust[phanto].velocity = dustVel; @@ -4004,6 +4003,10 @@ namespace CalamityMod.CalPlayer damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ProfanedSoulCrystal").Format(Player.name)); } + // Leon Death Noise RE4 + if (Main.zenithWorld) + SoundEngine.PlaySound(LeonDeathNoiseRE4_ForGFB, Player.Center); + if (NPC.AnyNPCs(ModContent.NPCType())) { if (sCalDeathCount < 51) @@ -5545,6 +5548,14 @@ namespace CalamityMod.CalPlayer } #endregion + public override bool ConsumableDodge(Player.HurtInfo info) + { + if (HandleDodges()) + return true; + + return base.ConsumableDodge(info); + } + #region Pre Hurt public override void ModifyHurt(ref Player.HurtModifiers modifiers)/* tModPorter Override ImmuneTo, FreeDodge or ConsumableDodge instead to prevent taking damage */ { @@ -5552,14 +5563,6 @@ namespace CalamityMod.CalPlayer Player.HurtInfo hurtInfo = new Player.HurtInfo(); #region Ignore Incoming Hits - // If any dodges are active which could dodge this hit, the hurting event is canceled (and the dodge is used). - if (HandleDodges()) - { - justHitByDefenseDamage = false; - defenseDamageToTake = 0; - return; - } - // If Armageddon is active, instantly kill the player. if (CalamityWorld.armageddon && areThereAnyDamnBosses) KillPlayer(); @@ -5615,7 +5618,7 @@ namespace CalamityMod.CalPlayer int numParticles = Main.rand.Next(2, 6); for (int i = 0; i < numParticles; i++) { - Vector2 velocity = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(3, 14); + Vector2 velocity = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(3, 7); velocity.X += 5f * hurtInfo.HitDirection; GeneralParticleHandler.SpawnParticle(new TechyHoloysquareParticle(Player.Center, velocity, Main.rand.NextFloat(2.5f, 3f), Main.rand.NextBool() ? new Color(99, 255, 229) : new Color(25, 132, 247), 25)); } @@ -5743,7 +5746,6 @@ namespace CalamityMod.CalPlayer #endregion #region Hurt - public override void OnHurt(Player.HurtInfo hurtInfo) { #region Defense Damage @@ -6052,7 +6054,6 @@ namespace CalamityMod.CalPlayer #endregion #region Post Hurt - public override void PostHurt(Player.HurtInfo hurtInfo) { if (pArtifact && !profanedCrystal) @@ -6470,6 +6471,7 @@ namespace CalamityMod.CalPlayer { damageSource = PlayerDeathReason.ByCustomReason(Player.name + " failed the challenge at hand."); } + NetworkText deathText = damageSource.GetDeathText(Player.name); if (Main.netMode == NetmodeID.MultiplayerClient && Player.whoAmI == Main.myPlayer) { @@ -7010,7 +7012,7 @@ namespace CalamityMod.CalPlayer double ratioToUse = DefenseDamageRatio; if (draedonsHeart) - ratioToUse *= 0.5; + ratioToUse *= DraedonsHeart.DefenseDamageMultiplier; // Calculate the defense damage taken from this hit. int defenseDamageTaken = (int)(damage * ratioToUse); diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 029ff4babb..b281824a10 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -740,18 +740,12 @@ namespace CalamityMod.CalPlayer if (community) { - float BoostAtZeroBosses = 0.05f; - float BoostPostYharon = 0.2f; - float floatTypeBoost = MathHelper.Lerp(BoostAtZeroBosses, BoostPostYharon, TheCommunity.CalculatePower()); - int integerTypeBoost = (int)(floatTypeBoost * 50f); - int regenBoost = 1 + (integerTypeBoost / 5); + int regenBoost = 1 + (int)(TheCommunity.CalculatePower() * TheCommunity.RegenMultiplier); bool lesserEffect = false; for (int l = 0; l < Player.MaxBuffs; l++) { int hasBuff = Player.buffType[l]; - bool shouldAffect = CalamityLists.alcoholList.Contains(hasBuff); - if (shouldAffect) - lesserEffect = true; + lesserEffect = CalamityLists.alcoholList.Contains(hasBuff); } if (Player.lifeRegen < 0) Player.lifeRegen += lesserEffect ? 1 : regenBoost; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index aaf5aad52f..cebddae12d 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2658,22 +2658,15 @@ namespace CalamityMod.CalPlayer if (blueCandle) Player.moveSpeed += 0.1f; - // TODO -- crit is a float now, and knockback can be boosted for all classes if (community) { - float BoostAtZeroBosses = 0.05f; - float BoostPostYharon = 0.2f; - float floatTypeBoost = MathHelper.Lerp(BoostAtZeroBosses, BoostPostYharon, TheCommunity.CalculatePower()); - int integerTypeBoost = (int)(floatTypeBoost * 50f); - int critBoost = integerTypeBoost / 2; - float damageBoost = floatTypeBoost * 0.5f; - Player.endurance += floatTypeBoost * 0.25f; - Player.statDefense += integerTypeBoost; - Player.GetDamage() += damageBoost; - Player.GetCritChance() += critBoost; - Player.GetKnockback() += floatTypeBoost; - Player.moveSpeed += floatTypeBoost * 0.5f; - flightTimeMult += floatTypeBoost; + float baseBoost = TheCommunity.CalculatePower(); + Player.endurance += baseBoost * TheCommunity.DRMultiplier; + Player.statDefense += (int)(baseBoost * TheCommunity.DefenseMultiplier); + Player.GetDamage() += baseBoost * TheCommunity.DamageMultiplier; + Player.GetCritChance() += baseBoost * TheCommunity.CritMultiplier; + Player.moveSpeed += baseBoost * TheCommunity.SpeedMultiplier; + flightTimeMult += baseBoost * TheCommunity.FlightMultiplier; } // Shattered Community gives the same wing time boost as normal Community if (shatteredCommunity) @@ -2910,7 +2903,7 @@ namespace CalamityMod.CalPlayer if (yInsignia) { - Player.GetDamage() += 0.1f; + Player.GetDamage() += 0.15f; if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) Player.GetDamage() += 0.1f; } @@ -3766,7 +3759,7 @@ namespace CalamityMod.CalPlayer if (Player.tipsy) { if (Player.statDefense > 0) - Player.statDefense -= (int)(Player.statDefense * 0.1); + Player.statDefense -= (int)(Player.statDefense * 0.05); } if (DesertProwlerHat.ShroudedInSmoke(Player, out _)) @@ -3908,7 +3901,7 @@ namespace CalamityMod.CalPlayer if (npc is null || !npc.active) return; - bool holdingsol = ((Player.HeldItem.type >= ItemID.GreenSolution && Player.HeldItem.type <= ItemID.RedSolution) || Player.HeldItem.type == ModContent.ItemType()); + bool holdingsol = ((Player.HeldItem.type >= ItemID.GreenSolution && Player.HeldItem.type <= ItemID.RedSolution) || (Player.HeldItem.type >= ItemID.SandSolution && Player.HeldItem.type <= ItemID.DirtSolution) || Player.HeldItem.type == ModContent.ItemType()); if (npc.Hitbox.Contains(Main.MouseWorld.ToPoint()) && holdingsol && Player.Distance(npc.Center) < 450) { Player.cursorItemIconEnabled = true; @@ -3923,7 +3916,7 @@ namespace CalamityMod.CalPlayer int soltype = 0; if (Player.HeldItem.type == ModContent.ItemType()) { - soltype = 5; + soltype = 8; } else { @@ -3944,6 +3937,15 @@ namespace CalamityMod.CalPlayer case ItemID.RedSolution: soltype = 4; break; + case ItemID.SandSolution: + soltype = 5; + break; + case ItemID.SnowSolution: + soltype = 6; + break; + case ItemID.DirtSolution: + soltype = 7; + break; } } if (npc.ai[3] != soltype || npc.ai[0] == 0) diff --git a/CalamityLists.cs b/CalamityLists.cs index 7aee1bc24b..6f1df24cfd 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -779,6 +779,7 @@ namespace CalamityMod ProjectileType(), ProjectileType(), ProjectileType(), + ProjectileType(), ProjectileType(), ProjectileType(), @@ -875,6 +876,7 @@ namespace CalamityMod NPCID.PrimeVice, NPCID.Plantera, NPCID.PlanterasTentacle, + NPCType(), NPCID.HallowBoss, NPCID.Everscream, NPCID.SantaNK1, @@ -1462,6 +1464,7 @@ namespace CalamityMod NPCID.Sharkron, NPCID.Sharkron2, NPCID.PlanterasTentacle, + NPCType(), NPCID.Spore, NPCID.TheHungryII, NPCID.LeechHead, @@ -2634,6 +2637,7 @@ namespace CalamityMod NPCType(), NPCType(), NPCID.PlanterasTentacle, + NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/CalamityMod.cs b/CalamityMod.cs index ce2c1d1071..c3429432f6 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -74,6 +74,7 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.Config; using Terraria.DataStructures; +using CalamityMod.NPCs.NormalNPCs; [assembly: InternalsVisibleTo("CalTestHelpers")] [assembly: InternalsVisibleTo("InfernumMode")] @@ -151,7 +152,6 @@ namespace CalamityMod internal Mod ancientsAwakened = null; internal Mod bossChecklist = null; - internal Mod census = null; internal Mod crouchMod = null; internal Mod dialogueTweak = null; internal Mod fargos = null; @@ -175,9 +175,6 @@ namespace CalamityMod carpetOriginal = TextureAssets.FlyingCarpet; - // Apply IL edits as soon as possible. - ILChanges.Load(); - // If any of these mods aren't loaded, it will simply keep them as null. musicMod = null; ModLoader.TryGetMod("CalamityModMusic", out musicMod); @@ -185,8 +182,6 @@ namespace CalamityMod ModLoader.TryGetMod("AAMod", out ancientsAwakened); bossChecklist = null; ModLoader.TryGetMod("BossChecklist", out bossChecklist); - census = null; - ModLoader.TryGetMod("Census", out census); crouchMod = null; ModLoader.TryGetMod("CrouchMod", out crouchMod); dialogueTweak = null; @@ -425,7 +420,6 @@ namespace CalamityMod ancientsAwakened = null; bossChecklist = null; - census = null; crouchMod = null; dialogueTweak = null; fargos = null; @@ -510,7 +504,6 @@ namespace CalamityMod loadCache = null; */ - ILChanges.Unload(); Instance = null; base.Unload(); } @@ -789,6 +782,7 @@ namespace CalamityMod { NPCID.PrimeVice, velocityScaleMin }, { NPCID.Plantera, velocityScaleMin }, // Increases in phase 2 { NPCID.PlanterasTentacle, bitingEnemeyVelocityScale }, + { ModContent.NPCType(), bitingEnemeyVelocityScale }, { NPCID.HallowBoss, velocityScaleMin }, { NPCID.Golem, velocityScaleMin }, { NPCID.GolemFistLeft, velocityScaleMin }, diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index c3c99b5821..438858fb20 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -226,6 +226,7 @@ namespace CalamityMod { NPCID.Plantera, 1.15 }, { NPCID.PlanterasTentacle, 1.15 }, + { ModContent.NPCType(), 1.15 }, { NPCID.HallowBoss, 0.6875 }, @@ -425,6 +426,7 @@ namespace CalamityMod 161, // 225 in phase 2 207 } }, // Vanilla: Is retarded, so plantera does 150 in phase 1 and 210 in phase 2; Rev and Death: 289 in phase 2 { NPCID.PlanterasTentacle, new int[] { 60, 138, 161, 207, 276 } }, + { ModContent.NPCType(), new int[] { 60, 138, 161, 207, 276 } }, { NPCID.Spore, new int[] { 70, 140, 160, 170, 210 } }, { NPCID.HallowBoss, new int[] { 80, // 120 during charge @@ -654,6 +656,7 @@ namespace CalamityMod { new Tuple(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 54, 96, 136, 152, 210 } }, // 144 in non-rev master mode { new Tuple(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 62, 108, 160, 176, 234 } }, // 162 in non-rev master mode { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 176, 234 } }, + { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 176, 234 } }, { new Tuple(NPCID.HallowBoss, ProjectileID.HallowBossRainbowStreak), new int[] { 90, 120, 160, 176, 234 } }, { new Tuple(NPCID.HallowBoss, ProjectileID.FairyQueenSunDance), new int[] { 100, 140, 184, 200, 270 } }, diff --git a/Dusts/CalamityDusts.cs b/Dusts/CalamityDusts.cs index f894ef9f72..702f83fc3c 100644 --- a/Dusts/CalamityDusts.cs +++ b/Dusts/CalamityDusts.cs @@ -9,7 +9,7 @@ SulfurousSeaAcid = 75, Brimstone = 235, Ectoplasm = 180, - Phantoplasm = 60, + Polterplasm = 60, Plague = 46, ProfanedFire = 244, Nightwither = 185, diff --git a/Effects/Dyes/PhantoplasmDyeShader.fx b/Effects/Dyes/PolterplasmDyeShader.fx similarity index 100% rename from Effects/Dyes/PhantoplasmDyeShader.fx rename to Effects/Dyes/PolterplasmDyeShader.fx diff --git a/Effects/Dyes/PhantoplasmDyeShader.xnb b/Effects/Dyes/PolterplasmDyeShader.xnb similarity index 100% rename from Effects/Dyes/PhantoplasmDyeShader.xnb rename to Effects/Dyes/PolterplasmDyeShader.xnb diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index 7a0b9c401f..75550542fe 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -216,7 +216,7 @@ namespace CalamityMod.Events new Boss(ModContent.NPCType(), TimeChangeContext.Night, dimnessFactor: 0.6f, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), - new Boss(NPCID.Plantera, TimeChangeContext.Day, permittedNPCs: new int[] { NPCID.PlanterasTentacle, NPCID.PlanterasHook, NPCID.Spore }), + new Boss(NPCID.Plantera, TimeChangeContext.Day, permittedNPCs: new int[] { NPCID.PlanterasTentacle, ModContent.NPCType(), NPCID.PlanterasHook, NPCID.Spore }), new Boss(ModContent.NPCType(), specialSpawnCountdown: 120, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), NPCID.DetonatingBubble}), diff --git a/ExtraTextures/Lasers/StellarTorusBeamEnd.png b/ExtraTextures/Lasers/StellarTorusBeamEnd.png new file mode 100644 index 0000000000..86cf285cf1 Binary files /dev/null and b/ExtraTextures/Lasers/StellarTorusBeamEnd.png differ diff --git a/ExtraTextures/Lasers/StellarTorusBeamMiddle.png b/ExtraTextures/Lasers/StellarTorusBeamMiddle.png new file mode 100644 index 0000000000..85ebe67bb1 Binary files /dev/null and b/ExtraTextures/Lasers/StellarTorusBeamMiddle.png differ diff --git a/ExtraTextures/Lasers/StellarTorusBeamStart.png b/ExtraTextures/Lasers/StellarTorusBeamStart.png new file mode 100644 index 0000000000..4d95583cf1 Binary files /dev/null and b/ExtraTextures/Lasers/StellarTorusBeamStart.png differ diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 2e77102ae5..5b9c0bd473 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -9,6 +9,20 @@ namespace CalamityMod.ILEditing { public partial class ILChanges { + #region Rod of Harmony Changes + + private static bool ChangeRodOfHarmonyShimmerRequirement(On_Item.orig_CanShimmer orig, Item item) + { + //Rod of Harmony requires Draedong and SCal dead instead of Moon Lord. + if (item.type == ItemID.RodofDiscord) + { + return DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs; + } + return orig(item); + } + + #endregion + #region Soaring Insignia Changes private static void RemoveSoaringInsigniaInfiniteWingTime(ILContext il) { diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 1477d1b090..1ed0654dfc 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -1,19 +1,24 @@ -using CalamityMod.Tiles.DraedonStructures; -using CalamityMod.Tiles.FurnitureExo; -using System; +using System; using System.Reflection; +using CalamityMod.Tiles.DraedonStructures; +using CalamityMod.Tiles.FurnitureExo; using Terraria; +using Terraria.GameContent.Drawing; +using Terraria.GameContent.Events; +using Terraria.GameContent.ItemDropRules; +using Terraria.GameContent.Liquid; +using Terraria.GameContent.UI.States; +using Terraria.Graphics.Light; using Terraria.ModLoader; namespace CalamityMod.ILEditing { - // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. - public partial class ILChanges + public partial class ILChanges : ModSystem { /// /// Loads all IL Editing changes in the mod. /// - internal static void Load() + public override void OnModLoad() { // Wrap the vanilla town NPC spawning function in a delegate so that it can be tossed around and called at will. var updateTime = typeof(Main).GetMethod("UpdateTime_SpawnTownNPCs", BindingFlags.Static | BindingFlags.NonPublic); @@ -28,106 +33,104 @@ namespace CalamityMod.ILEditing exoDoorClosed = ModContent.TileType(); // Graphics - Terraria.IL_Main.DoDraw += AdditiveDrawing; - Terraria.On_Main.DrawGore += DrawForegroundStuff; - Terraria.On_Main.DrawCursor += UseCoolFireCursorEffect; - Terraria.On_Main.SetDisplayMode += ResetRenderTargetSizes; - Terraria.On_Main.SortDrawCacheWorms += DrawFusableParticles; - Terraria.On_Main.DrawInfernoRings += DrawForegroundParticles; - Terraria.GameContent.Drawing.On_TileDrawing.DrawPartialLiquid += DrawCustomLava; - Terraria.On_WaterfallManager.DrawWaterfall_int_int_int_float_Vector2_Rectangle_Color_SpriteEffects += DrawCustomLavafalls; - Terraria.GameContent.Liquid.IL_LiquidRenderer.DrawNormalLiquids += ChangeWaterQuadColors; - Terraria.IL_Main.oldDrawWater += DrawCustomLava3; - Terraria.Graphics.Light.On_TileLightScanner.GetTileLight += MakeSulphSeaWaterBetter; - Terraria.GameContent.Drawing.On_TileDrawing.PreDrawTiles += ClearForegroundStuff; - Terraria.GameContent.Drawing.On_TileDrawing.Draw += ClearTilePings; - Terraria.GameContent.ItemDropRules.On_CommonCode.ModifyItemDropFromNPC += ColorBlightedGel; + IL_Main.DoDraw += AdditiveDrawing; + On_Main.DrawGore += DrawForegroundStuff; + On_Main.DrawCursor += UseCoolFireCursorEffect; + On_Main.SetDisplayMode += ResetRenderTargetSizes; + On_Main.SortDrawCacheWorms += DrawFusableParticles; + On_Main.DrawInfernoRings += DrawForegroundParticles; + On_TileDrawing.DrawPartialLiquid += DrawCustomLava; + On_WaterfallManager.DrawWaterfall_int_int_int_float_Vector2_Rectangle_Color_SpriteEffects += DrawCustomLavafalls; + IL_LiquidRenderer.DrawNormalLiquids += ChangeWaterQuadColors; + IL_Main.oldDrawWater += DrawCustomLava3; + On_TileLightScanner.GetTileLight += MakeSulphSeaWaterBetter; + On_TileDrawing.PreDrawTiles += ClearForegroundStuff; + On_TileDrawing.Draw += ClearTilePings; + On_CommonCode.ModifyItemDropFromNPC += ColorBlightedGel; // NPC behavior - Terraria.IL_Main.UpdateTime += PermitNighttimeTownNPCSpawning; - Terraria.On_Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate; - Terraria.On_NPC.ShouldEmpressBeEnraged += AllowEmpressToEnrageInBossRush; - Terraria.IL_Player.CollectTaxes += MakeTaxCollectorUseful; - Terraria.IL_Projectile.Damage += RemoveLunaticCultistHomingResist; + IL_Main.UpdateTime += PermitNighttimeTownNPCSpawning; + On_Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate; + On_NPC.ShouldEmpressBeEnraged += AllowEmpressToEnrageInBossRush; + IL_Player.CollectTaxes += MakeTaxCollectorUseful; + IL_Projectile.Damage += RemoveLunaticCultistHomingResist; // Mechanics / features - Terraria.On_NPC.ApplyTileCollision += AllowTriggeredFallthrough; - Terraria.IL_Player.ApplyEquipFunctional += ScopesRequireVisibilityToZoom; - Terraria.On_Player.Hurt_PlayerDeathReason_int_int_bool_bool_int_bool_float_float_float += RemoveRNGFromDodges; - Terraria.IL_Player.DashMovement += FixAllDashMechanics; - Terraria.On_Player.DoCommonDashHandle += ApplyDashKeybind; - Terraria.IL_Player.GiveImmuneTimeForCollisionAttack += MakeShieldSlamIFramesConsistent; - Terraria.IL_Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety; - Terraria.On_WorldGen.OpenDoor += OpenDoor_LabDoorOverride; - Terraria.On_WorldGen.CloseDoor += CloseDoor_LabDoorOverride; - Terraria.On_Item.AffixName += IncorporateEnchantmentInAffix; - Terraria.On_Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float += IncorporateMinionExplodingCountdown; + On_NPC.ApplyTileCollision += AllowTriggeredFallthrough; + IL_Player.ApplyEquipFunctional += ScopesRequireVisibilityToZoom; + On_Player.Hurt_PlayerDeathReason_int_int_bool_bool_int_bool_float_float_float += RemoveRNGFromDodges; + IL_Player.DashMovement += FixAllDashMechanics; + On_Player.DoCommonDashHandle += ApplyDashKeybind; + IL_Player.GiveImmuneTimeForCollisionAttack += MakeShieldSlamIFramesConsistent; + IL_Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety; + On_WorldGen.OpenDoor += OpenDoor_LabDoorOverride; + On_WorldGen.CloseDoor += CloseDoor_LabDoorOverride; + On_Item.AffixName += IncorporateEnchantmentInAffix; + On_Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float += IncorporateMinionExplodingCountdown; // TODO -- This should be unnecessary. There is now a TML hook for platform collision for ModNPCs. - Terraria.On_NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision; - Terraria.IL_Wiring.HitWireSingle += AddTwinklersToStatue; - Terraria.On_Player.UpdateItemDye += FindCalamityItemDyeShader; + On_NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision; + IL_Wiring.HitWireSingle += AddTwinklersToStatue; + On_Player.UpdateItemDye += FindCalamityItemDyeShader; // Mana Burn - Terraria.IL_Player.ApplyLifeAndOrMana += ConditionallyReplaceManaSickness; + IL_Player.ApplyLifeAndOrMana += ConditionallyReplaceManaSickness; // Custom grappling - Terraria.On_Player.GrappleMovement += CustomGrappleMovementCheck; - Terraria.On_Player.UpdatePettingAnimal += CustomGrapplePreDefaultMovement; - Terraria.On_Player.PlayerFrame += CustomGrapplePostFrame; - Terraria.On_Player.SlopeDownMovement += CustomGrapplePreStepUp; + On_Player.GrappleMovement += CustomGrappleMovementCheck; + On_Player.UpdatePettingAnimal += CustomGrapplePreDefaultMovement; + On_Player.PlayerFrame += CustomGrapplePostFrame; + On_Player.SlopeDownMovement += CustomGrapplePreStepUp; // Damage and health balance - Terraria.On_Main.DamageVar_float_int_float += AdjustDamageVariance; - Terraria.IL_Projectile.Damage += MakeTagDamageMultiplicative; - Terraria.IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling; - Terraria.IL_Projectile.AI_001 += AdjustChlorophyteBullets; - Terraria.IL_Player.UpdateBuffs += NerfSharpeningStation; + On_Main.DamageVar_float_int_float += AdjustDamageVariance; + IL_Projectile.Damage += MakeTagDamageMultiplicative; + IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling; + IL_Projectile.AI_001 += AdjustChlorophyteBullets; + IL_Player.UpdateBuffs += NerfSharpeningStation; // Movement speed balance - Terraria.IL_Player.UpdateJumpHeight += FixJumpHeightBoosts; - Terraria.IL_Player.Update += BaseJumpHeightAdjustment; - Terraria.IL_Player.Update += RunSpeedAdjustments; - Terraria.IL_Player.Update += NerfMagiluminescence; - Terraria.IL_Player.Update += NerfSoaringInsigniaRunAcceleration; - Terraria.IL_Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime; + IL_Player.UpdateJumpHeight += FixJumpHeightBoosts; + IL_Player.Update += BaseJumpHeightAdjustment; + IL_Player.Update += RunSpeedAdjustments; + IL_Player.Update += NerfMagiluminescence; + IL_Player.Update += NerfSoaringInsigniaRunAcceleration; + IL_Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime; // Life regen balance - Terraria.IL_Player.UpdateLifeRegen += PreventWellFedFromBeingRequiredInExpertModeForFullLifeRegen; + IL_Player.UpdateLifeRegen += PreventWellFedFromBeingRequiredInExpertModeForFullLifeRegen; // Mana regen balance - Terraria.IL_Player.Update += ManaRegenDelayAdjustment; - Terraria.IL_Player.UpdateManaRegen += ManaRegenAdjustment; + IL_Player.Update += ManaRegenDelayAdjustment; + IL_Player.UpdateManaRegen += ManaRegenAdjustment; // World generation - Terraria.IL_WorldGen.Pyramid += ReplacePharaohSetInPyramids; - Terraria.IL_WorldGen.GrowLivingTree += BlockLivingTreesNearOcean; - Terraria.On_WorldGen.SmashAltar += PreventSmashAltarCode; - Terraria.IL_WorldGen.hardUpdateWorld += AdjustChlorophyteSpawnRate; - Terraria.IL_WorldGen.Chlorophyte += AdjustChlorophyteSpawnLimits; - Terraria.GameContent.UI.States.IL_UIWorldCreation.SetDefaultOptions += ChangeDefaultWorldSize; - Terraria.GameContent.UI.States.IL_UIWorldCreation.AddWorldSizeOptions += SwapSmallDescriptionKey; + IL_WorldGen.Pyramid += ReplacePharaohSetInPyramids; + IL_WorldGen.GrowLivingTree += BlockLivingTreesNearOcean; + On_WorldGen.SmashAltar += PreventSmashAltarCode; + IL_WorldGen.hardUpdateWorld += AdjustChlorophyteSpawnRate; + IL_WorldGen.Chlorophyte += AdjustChlorophyteSpawnLimits; + IL_UIWorldCreation.SetDefaultOptions += ChangeDefaultWorldSize; + IL_UIWorldCreation.AddWorldSizeOptions += SwapSmallDescriptionKey; Terraria.IO.On_WorldFile.ClearTempTiles += ClearModdedTempTiles; // Removal of vanilla stupidity - Terraria.IL_Player.UpdateBuffs += RemoveFeralBiteRandomDebuffs; - Terraria.GameContent.Events.IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement; - Terraria.IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements; - Terraria.On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; - - // ERROR - //Terraria.IL_NPC.SpawnNPC += MakeVoodooDemonDollWork; - + IL_Player.UpdateBuffs += RemoveFeralBiteRandomDebuffs; + IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement; + IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements; + On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; + On_Item.CanShimmer += ChangeRodOfHarmonyShimmerRequirement; + // TODO -- Beat Lava Slimes once and for all // IL.Terraria.NPC.VanillaHitEffect += RemoveLavaDropsFromExpertLavaSlimes; - Terraria.IL_Projectile.CanExplodeTile += MakeMeteoriteExplodable; - Terraria.IL_Main.UpdateWindyDayState += MakeWindyDayMusicPlayLessOften; - Terraria.IL_Main.UpdateTime_StartNight += BloodMoonsRequire200MaxLife; - Terraria.IL_WorldGen.AttemptFossilShattering += PreventFossilShattering; - Terraria.On_Player.GetPickaxeDamage += RemoveHellforgePickaxeRequirement; - Terraria.On_Player.GetAnglerReward += ImproveAnglerRewards; + IL_Projectile.CanExplodeTile += MakeMeteoriteExplodable; + IL_Main.UpdateWindyDayState += MakeWindyDayMusicPlayLessOften; + IL_Main.UpdateTime_StartNight += BloodMoonsRequire200MaxLife; + IL_WorldGen.AttemptFossilShattering += PreventFossilShattering; + On_Player.GetPickaxeDamage += RemoveHellforgePickaxeRequirement; + On_Player.GetAnglerReward += ImproveAnglerRewards; // Fix vanilla bugs exposed by Calamity mechanics - Terraria.IL_NPC.NPCLoot += FixSplittingWormBannerDrops; + IL_NPC.NPCLoot += FixSplittingWormBannerDrops; //Additional detours that are in their own item files given they are only relevant to these specific items: //Rover drive detours on Player.DrawInfernoRings to draw its shield @@ -138,10 +141,11 @@ namespace CalamityMod.ILEditing /// /// Unloads all IL Editing changes in the mod. /// - internal static void Unload() + public override void OnModUnload() { VanillaSpawnTownNPCs = null; labDoorOpen = labDoorClosed = aLabDoorOpen = aLabDoorClosed = exoDoorClosed = exoDoorOpen = -1; + On_Item.CanShimmer -= ChangeRodOfHarmonyShimmerRequirement; } } } diff --git a/ILEditing/ILHelperMethods.cs b/ILEditing/ILHelperMethods.cs index 8065c7551b..86408ea30e 100644 --- a/ILEditing/ILHelperMethods.cs +++ b/ILEditing/ILHelperMethods.cs @@ -91,7 +91,7 @@ namespace CalamityMod.ILEditing return initialTexture; } - private static VertexColors SelectLavaQuadColor(Texture2D initialTexture, VertexColors initialColor, bool forceTrue = false) + private static VertexColors SelectLavaQuadColor(Texture2D initialTexture, ref VertexColors initialColor, bool forceTrue = false) { initialColor.TopLeftColor = SelectLavaColor(initialTexture, initialColor.TopLeftColor, forceTrue); initialColor.TopRightColor = SelectLavaColor(initialTexture, initialColor.TopRightColor, forceTrue); diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index f0aa4de51c..b14fe2c9b9 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -689,47 +689,6 @@ namespace CalamityMod.ILEditing #region Custom Lava Visuals private static void DrawCustomLava(Terraria.GameContent.Drawing.On_TileDrawing.orig_DrawPartialLiquid orig, TileDrawing self, bool behindBlocks, Tile tileCache, ref Vector2 position, ref Rectangle liquidSize, int liquidType, ref VertexColors colors) { - //liquidType = CustomLavaManagement.SelectLavafallStyle(liquidType); - //orig(self, behindBlocks, tileCache, ref position, ref liquidSize, liquidType, ref colors); - - /*if (liquidType != 1) - { - orig(self, tileCache, position, liquidSize, liquidType, aColor); - return; - } - - Texture2D initialTexture = TextureAssets.LiquidSlope[liquidType].Value; - Texture2D slopeTexture = SelectLavaTexture(liquidType == 1 ? CustomLavaManagement.LavaSlopeTexture : initialTexture, LiquidTileType.Slope); - aColor = SelectLavaColor(initialTexture, aColor, liquidType == 1); - - int slope = (int)tileCache.Slope; - if (!TileID.Sets.BlocksWaterDrawingBehindSelf[tileCache.TileType] || slope == 0) - { - Texture2D liquidTexture = SelectLavaTexture(liquidType == 1 ? CustomLavaManagement.LavaBlockTexture : TextureAssets.Liquid[liquidType].Value, LiquidTileType.Block); - Main.spriteBatch.Draw(liquidTexture, position, liquidSize, aColor, 0f, default, 1f, 0, 0f); - return; - } - liquidSize.X += 18 * (slope - 1); - if (tileCache.Slope == SlopeType.SlopeDownLeft) - { - Main.spriteBatch.Draw(slopeTexture, position, liquidSize, aColor, 0f, Vector2.Zero, 1f, 0, 0f); - return; - } - if (tileCache.Slope == SlopeType.SlopeDownRight) - { - Main.spriteBatch.Draw(slopeTexture, position, liquidSize, aColor, 0f, Vector2.Zero, 1f, 0, 0f); - return; - } - if (tileCache.Slope == SlopeType.SlopeUpLeft) - { - Main.spriteBatch.Draw(slopeTexture, position, liquidSize, aColor, 0f, Vector2.Zero, 1f, 0, 0f); - return; - } - if (tileCache.Slope == SlopeType.SlopeUpRight) - { - Main.spriteBatch.Draw(slopeTexture, position, liquidSize, aColor, 0f, Vector2.Zero, 1f, 0, 0f); - }*/ - if (liquidType != 1) { orig(self, behindBlocks, tileCache, ref position, ref liquidSize, liquidType, ref colors); @@ -737,7 +696,7 @@ namespace CalamityMod.ILEditing } int slope = (int)tileCache.Slope; - colors = SelectLavaQuadColor(TextureAssets.LiquidSlope[liquidType].Value, colors, liquidType == 1); + colors = SelectLavaQuadColor(TextureAssets.LiquidSlope[liquidType].Value, ref colors, liquidType == 1); if (!TileID.Sets.BlocksWaterDrawingBehindSelf[tileCache.TileType] || behindBlocks || slope == 0) { Texture2D liquidTexture = SelectLavaTexture(liquidType == 1 ? CustomLavaManagement.LavaBlockTexture : TextureAssets.Liquid[liquidType].Value, LiquidTileType.Block); @@ -800,7 +759,7 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.Ldloc, 4); cursor.EmitDelegate>((initialColor, initialTexture, liquidType, x, y) => { - initialColor = SelectLavaQuadColor(initialTexture, initialColor, liquidType == 1); + initialColor = SelectLavaQuadColor(initialTexture, ref initialColor, liquidType == 1); if (liquidType == ModContent.Find("CalamityMod/SunkenSeaWater").Slot || liquidType == ModContent.Find("CalamityMod/SulphuricWater").Slot || diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index b2c78ef3d6..41ca19f79f 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -117,33 +117,6 @@ namespace CalamityMod.ILEditing } #endregion Prevention of Slime Rain Spawns When Near Bosses - #region Voodoo Demon Doll Spawn Manipulations - // This may seem absolutely obscene, but vanilla spawn behavior does not occur within the spawn pool that TML provides, only modded - // spawns do. Pretty much everything else is simply a fuckton of manual conditional NPC.NewNPC calls. As such, the only way to bypass - // vanilla spawn behaviors is the IL edit them out of existence. Here, simply replacing the voodoo demon ID with an empty one is performed. - // Something cleaner could probably be done, such as getting rid of the entire NPC.NewNPC call, but this is the easiest solution I can come up with. - private static void MakeVoodooDemonDollWork(ILContext il) - { - var cursor = new ILCursor(il); - - if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcI4(NPCID.VoodooDemon))) - { - LogFailure("Voodoo Demon Doll Mechanic", "Could not locate the Voodoo Demon ID."); - return; - } - - cursor.Remove(); - cursor.Emit(OpCodes.Ldloc, 10); - cursor.EmitDelegate>(spawnPlayerIndex => - { - if (Main.player[spawnPlayerIndex].active && Main.player[spawnPlayerIndex].Calamity().disableVoodooSpawns) - return NPCID.None; - - return NPCID.VoodooDemon; - }); - } - #endregion Voodoo Demon Doll Spawn Manipulations - #region Remove Feral Bite Random Debuffs private static void RemoveFeralBiteRandomDebuffs(ILContext il) { diff --git a/Items/Accessories/AngelicAlliance.cs b/Items/Accessories/AngelicAlliance.cs index 6f9cc997b7..a4817de3e4 100644 --- a/Items/Accessories/AngelicAlliance.cs +++ b/Items/Accessories/AngelicAlliance.cs @@ -3,7 +3,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using System.Collections.Generic; -using System.Linq; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -27,15 +26,7 @@ namespace CalamityMod.Items.Accessories Item.Calamity().devItem = true; } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.AngelicAllianceHotKey.TooltipHotkeyString(); - - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4"); - - if (line != null) - line.Text = "Press " + hotkey + " to grace yourself in divinity for 15 seconds"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.AngelicAllianceHotKey); public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index 4eaaf6b997..cbfea5be52 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -5,7 +5,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using System.Collections.Generic; -using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -28,14 +27,7 @@ namespace CalamityMod.Items.Accessories Item.rare = ModContent.RarityType(); } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.AegisHotKey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip5"); - - if (line != null) - line.Text = "Press " + hotkey + " to activate buffs to all damage, crit chance, and defense"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.AegisHotKey); public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/AstralArcanum.cs b/Items/Accessories/AstralArcanum.cs index fe1cb3df6b..c5b266e111 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -3,7 +3,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using System.Collections.Generic; -using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -23,14 +22,7 @@ namespace CalamityMod.Items.Accessories Item.rare = ModContent.RarityType(); } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.AstralArcanumUIHotkey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3"); - - if (line != null) - line.Text = "Press " + hotkey + " to toggle teleportation UI while no bosses are alive"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.AstralArcanumUIHotkey); public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/BlunderBooster.cs b/Items/Accessories/BlunderBooster.cs index 84f83b2e3a..8f7caa4dbd 100644 --- a/Items/Accessories/BlunderBooster.cs +++ b/Items/Accessories/BlunderBooster.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; namespace CalamityMod.Items.Accessories { @@ -32,14 +31,7 @@ namespace CalamityMod.Items.Accessories player.Calamity().stealthGenMoving += 0.1f; } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.PlaguePackHotKey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3"); - - if (line != null) - line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of lightning bolts"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.PlaguePackHotKey); public override void AddRecipes() { diff --git a/Items/Accessories/CelestialJewel.cs b/Items/Accessories/CelestialJewel.cs index 910d2730a3..565496846d 100644 --- a/Items/Accessories/CelestialJewel.cs +++ b/Items/Accessories/CelestialJewel.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; namespace CalamityMod.Items.Accessories { @@ -22,14 +21,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.AstralTeleportHotKey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2"); - - if (line != null) - line.Text = "Press " + hotkey + " to teleport to a random location while no bosses are alive"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.AstralTeleportHotKey); public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 02e08a8f20..52a6af9b54 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -3,10 +3,10 @@ using CalamityMod.CalPlayer; using CalamityMod.Rarities; using CalamityMod.World; using System.Collections.Generic; -using System.Linq; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; private const double ContactDamageReduction = 0.15D; + public const double DefenseDamageMultiplier = 0.5D; // Duration of Nanomachines in frames. internal static readonly int NanomachinesDuration = 120; @@ -23,17 +24,17 @@ namespace CalamityMod.Items.Accessories // Duration of time where Nanomachines won't accumulate after taking damage, in frames. internal static readonly int NanomachinePauseAfterDamage = 60; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs( + (ContactDamageReduction * 100).ToString("N0"), + (100 - (DefenseDamageMultiplier * 100)).ToString("N0"), + NanomachinesHealPerFrame * NanomachinesDuration, + NanomachinesDuration / 60); + public override void SetStaticDefaults() { Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 11)); ItemID.Sets.AnimatesAsSoul[Type] = true; - - string seconds = NanomachinePauseAfterDamage == 60 ? "second" : "seconds"; - string pauseDurationTooltip = $"{NanomachinePauseAfterDamage / 60} {seconds}"; - string totalHealTooltip = $"{NanomachinesHealPerFrame * NanomachinesDuration}"; - string healDurationTooltip = $"{NanomachinesDuration / 60}"; - - } + } public override void SetDefaults() { @@ -62,35 +63,16 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { - // The 3rd tooltip line "Replaces Adrenaline..." is replaced on Normal or Expert - TooltipLine nanomachineMeterLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2"); - if (nanomachineMeterLine != null && !CalamityWorld.revenge) - nanomachineMeterLine.Text = "Adds the Nanomachines meter"; + // Add the hotkey + list.IntegrateHotkey(CalamityKeybinds.AdrenalineHotKey); - // The 4th tooltip line "Unlike Adrenaline..." is replaced on Normal or Expert - TooltipLine doesntStopOnDamageLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3"); - if (doesntStopOnDamageLine != null && !CalamityWorld.revenge) - doesntStopOnDamageLine.Text = "Nanomachines accumulate over time while fighting bosses\n" + - $"Taking damage stops the accumulation for {NanomachinePauseAfterDamage / 60} seconds"; + // Add the proper description which changes depending on world difficulty + string desc = this.GetLocalization(CalamityWorld.revenge ? "NanomachinesReplace" : "NanomachinesAdd").Format(NanomachinePauseAfterDamage / 60); + list.FindAndReplace("[NANODESC]", desc); - // The 5th tooltip line "With full Nanomachines" has the & replaced with the hotkey. - string adrenKey = CalamityKeybinds.AdrenalineHotKey.TooltipHotkeyString(); - TooltipLine hotkeyLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4"); - if (hotkeyLine != null) - { - string tooltipWithHotkey = hotkeyLine.Text.Replace("&", adrenKey); - hotkeyLine.Text = tooltipWithHotkey; - } - - // The 6th tooltip line "While healing..." has the @ replaced with full adrenaline DR. - // For whatever reason this method overrides the entire line instead of replacing the character as intended, so we duplicate the line. + // Add the proper DR value string fullAdrenDRString = (100f * BalancingConstants.FullAdrenalineDR).ToString("N0"); - TooltipLine healingDRLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip5"); - if (healingDRLine != null) - { - string tooltipWithDR = fullAdrenDRString.Replace("@", fullAdrenDRString); - healingDRLine.Text = "While healing, you take " + tooltipWithDR + "% less damage"; - } + list.FindAndReplace("[DR]", fullAdrenDRString); } } } diff --git a/Items/Accessories/EldritchSoulArtifact.cs b/Items/Accessories/EldritchSoulArtifact.cs index c0d4c05fdd..6ce853aca8 100644 --- a/Items/Accessories/EldritchSoulArtifact.cs +++ b/Items/Accessories/EldritchSoulArtifact.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(25). AddIngredient(25). - AddIngredient(5). + AddIngredient(5). AddTile(TileID.DemonAltar). Register(); } diff --git a/Items/Accessories/ElysianAegis.cs b/Items/Accessories/ElysianAegis.cs index 0b368c56d8..83f40a72a0 100644 --- a/Items/Accessories/ElysianAegis.cs +++ b/Items/Accessories/ElysianAegis.cs @@ -3,7 +3,6 @@ using CalamityMod.CalPlayer; using CalamityMod.CalPlayer.Dashes; using CalamityMod.Rarities; using System.Collections.Generic; -using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,14 +25,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.AegisHotKey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip5"); - - if (line != null) - line.Text = "Press " + hotkey + " to activate buffs to all damage, crit chance and defense"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.AegisHotKey); public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/PlaguedFuelPack.cs b/Items/Accessories/PlaguedFuelPack.cs index 28b53e1399..e79f53f15a 100644 --- a/Items/Accessories/PlaguedFuelPack.cs +++ b/Items/Accessories/PlaguedFuelPack.cs @@ -2,7 +2,6 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; -using System.Linq; namespace CalamityMod.Items.Accessories { @@ -31,13 +30,6 @@ namespace CalamityMod.Items.Accessories player.Calamity().stealthGenMoving += 0.1f; } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.PlaguePackHotKey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2"); - - if (line != null) - line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of plagued clouds"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.PlaguePackHotKey); } } diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index 8e73812169..558a71a377 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { - Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4)); + Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4)); ItemID.Sets.AnimatesAsSoul[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); @@ -79,66 +79,18 @@ namespace CalamityMod.Items.Accessories bool draedon = DownedBossSystem.downedExoMechs; if (!scal || !draedon) { - string rejectionReason = (!draedon) ? "The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations" : "The soul within this crystal has been defiled by the powerful magic of a supreme witch"; //there might be a better way to word the draedon line, not sure - - TooltipLine lineLock = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - if (lineLock != null) - { - lineLock.Text = rejectionReason; - lineLock.OverrideColor = new Color(240, 90, 90); - } - int insertIndex = tooltips.FindIndex(x => x.Name == "Tooltip1" && x.Mod == "Terraria"); - if (insertIndex != -1) - { - TooltipLine rejectLine = new TooltipLine(this.Mod, "CalamityMod:RejectLine", "Merchants will reject a defiled soul such as this."); - tooltips.Insert(insertIndex + 1, rejectLine); - } + string reject = this.GetLocalizedValue(!draedon ? "ExoMechsLock" : "CalamitasLock") + "\n" + this.GetLocalizedValue("Reject"); + tooltips.FindAndReplace("[STATUS]", reject); TooltipLine linePrice = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Sell price"); if (linePrice != null) linePrice.Text = ""; - } - else { - TooltipLine line = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - int manaCost = (int)(100 * Main.player[Main.myPlayer].manaCost); - - if (line != null) - line.Text = "Requires 10 minion slots to use in order to grant the following effects\n" + - "All non-summon weapons are converted into powerful summon variations\n" + - "Falling below 50% life will empower these attacks"; - - int insertIndex = tooltips.FindIndex(x => x.Name == "Tooltip1" && x.Mod == "Terraria"); - if (insertIndex != -1) - { - TooltipLine meleeAttack = new TooltipLine(this.Mod, "CalamityMod:MeleeAttack", "Transforms Melee attacks into a barrage of spears"); - meleeAttack.OverrideColor = new Color(240, 90, 90); - tooltips.Insert(insertIndex + 1, meleeAttack); - - TooltipLine mageAttack = new TooltipLine(this.Mod, "CalamityMod:MageAttack", $"Transforms Magic attacks into a powerful splitting fireball for {manaCost} mana per cast"); - mageAttack.OverrideColor = new Color(58, 131, 228); - tooltips.Insert(insertIndex + 2, mageAttack); - - TooltipLine rangedAttack = new TooltipLine(this.Mod, "CalamityMod:RangedAttack", "Transforms Ranged attacks into a flurry of fireballs and meteors"); - rangedAttack.OverrideColor = new Color(133, 224, 146); - tooltips.Insert(insertIndex + 3, rangedAttack); - - TooltipLine rogueAttack = new TooltipLine(this.Mod, "CalamityMod:RogueAttack", "Transforms Rogue attacks into a deadly crystalline spiral"); - rogueAttack.OverrideColor = new Color(233, 116, 81); - tooltips.Insert(insertIndex + 4, rogueAttack); - - TooltipLine remainingTip = new TooltipLine(this.Mod, "CalamityMod:RemainingTip", "Summons and empowers the profaned babs to fight alongside you\n" + - "You are no longer affected by burn out when hit\n" + - "Provides buffs depending on the time of day\n" + - "Thinking back, it was a boring life"); - tooltips.Insert(insertIndex + 5, remainingTip); - - TooltipLine purityTip = new TooltipLine(this.Mod, "CalamityMod:PurityTip", "And so we burn it all in the name of purity"); - purityTip.OverrideColor = new Color(255, 191, 73); - tooltips.Insert(insertIndex + 6, purityTip); - } + string manaCost = (100 * Main.player[Main.myPlayer].manaCost).ToString("N0"); + string full = this.GetLocalization("FullTooltip").Format(manaCost); + tooltips.FindAndReplace("[STATUS]", full); } } diff --git a/Items/Accessories/SandCloak.cs b/Items/Accessories/SandCloak.cs index 113a88dc28..5cf41613f3 100644 --- a/Items/Accessories/SandCloak.cs +++ b/Items/Accessories/SandCloak.cs @@ -2,7 +2,6 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; -using System.Linq; namespace CalamityMod.Items.Accessories { @@ -19,14 +18,7 @@ namespace CalamityMod.Items.Accessories Item.defense = 2; } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.SandCloakHotkey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - - if (line != null) - line.Text = "Press " + hotkey + " to consume 10% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SandCloakHotkey); public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/ShatteredCommunity.cs b/Items/Accessories/ShatteredCommunity.cs index 1cca709bd7..f9e25adc93 100644 --- a/Items/Accessories/ShatteredCommunity.cs +++ b/Items/Accessories/ShatteredCommunity.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { - Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 5)); + Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 5)); ItemID.Sets.AnimatesAsSoul[Type] = true; } @@ -102,42 +102,32 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List tooltips) { - // Stat tooltips are added dynamically. - StringBuilder sb = new StringBuilder(256); + // Add the proper description which changes depending on world difficulty + string desc = CalamityWorld.revenge ? this.GetLocalizedValue("RageModified") : this.GetLocalization("RageAdd").Format(CalamityKeybinds.RageHotKey.TooltipHotkeyString()); + tooltips.FindAndReplace("[RAGEDESC]", desc); - // Line 5: If not on Rev+, note that the accessory enables Rage. - TooltipLine rageOverTimeLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4"); - if (rageOverTimeLine != null && !CalamityWorld.revenge) - rageOverTimeLine.Text = "Adds the Rage meter\n" + rageOverTimeLine.Text; + // Add the current level + tooltips.FindAndReplace("[LEVEL]", level.ToString()); - // Line 9: Current level - sb.Append("Current level: "); - sb.Append(level); - sb.Append(" (+"); - sb.Append(level); - sb.Append("% Rage Mode damage)"); - tooltips.Add(new TooltipLine(Mod, "Tooltip8", sb.ToString())); - sb.Clear(); - - if (level < MaxLevel) + // Add the progress + string progressKey = "[PROGRESS]"; + TooltipLine progressLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Text.Contains(progressKey)); + if (progressLine != null) { - long progressToNextLevel = totalRageDamage - CumulativeLevelCost(level); - long totalToNextLevel = LevelCost(level + 1); - double ratio = (double)progressToNextLevel / totalToNextLevel; - string percent = (100D * ratio).ToString("0.00"); - - // Line 10: Progress to next level - sb.Append("Progress to next level: "); - sb.Append(percent); - sb.Append('%'); - tooltips.Add(new TooltipLine(Mod, "Tooltip9", sb.ToString())); - sb.Clear(); + if (level < MaxLevel) + { + long progressToNextLevel = totalRageDamage - CumulativeLevelCost(level); + long totalToNextLevel = LevelCost(level + 1); + double ratio = (double)progressToNextLevel / totalToNextLevel; + string percent = (100D * ratio).ToString("0.00"); + progressLine.Text = progressLine.Text.Replace(progressKey, percent); + } + else + progressLine.Text = string.Empty; } - // Line 11: Total damage dealt - sb.Append("Total Rage Mode damage: "); - sb.Append(totalRageDamage); - tooltips.Add(new TooltipLine(Mod, "Tooltip10", sb.ToString())); + // Add the current cumulative damage + tooltips.FindAndReplace("[DAMAGE]", totalRageDamage.ToString()); } public override void SaveData(TagCompound tag) @@ -228,7 +218,7 @@ namespace CalamityMod.Items.Accessories // Display a level up text notification. Rectangle textArea = new Rectangle((int)Player.Center.X, (int)Player.Center.Y, 1, 1); Color textColor = new Color(236, 209, 236); - CombatText.NewText(textArea, textColor, "The Community cracks...", false, false); + CombatText.NewText(textArea, textColor, CalamityUtils.GetTextValueFromModItem("LevelUpText"), false, false); } } } diff --git a/Items/Accessories/SpectralVeil.cs b/Items/Accessories/SpectralVeil.cs index 930ddd4ba7..f0fd52a994 100644 --- a/Items/Accessories/SpectralVeil.cs +++ b/Items/Accessories/SpectralVeil.cs @@ -1,6 +1,5 @@ using CalamityMod.Rarities; using System.Collections.Generic; -using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -20,14 +19,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.SpectralVeilHotKey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - - if (line != null) - line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a mid-range teleport and render you momentarily invulnerable"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SpectralVeilHotKey); public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs index 09a5dd3b4a..9ee9263334 100644 --- a/Items/Accessories/StatMeter.cs +++ b/Items/Accessories/StatMeter.cs @@ -13,13 +13,13 @@ namespace CalamityMod.Items.Accessories public class StatMeter : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public override void SetStaticDefaults() - { - // TODO -- On April 1st, rename this item to "Pasta Strainer" - } public override void SetDefaults() { + // Pasta Strainer + if (Main.zenithWorld) + Item.SetNameOverride(this.GetLocalizedValue("FoolsName")); + Item.width = 26; Item.height = 26; Item.value = CalamityGlobalItem.Rarity3BuyPrice; @@ -37,266 +37,190 @@ namespace CalamityMod.Items.Accessories Item heldItem = null; if (player.selectedItem >= 0 && player.selectedItem < Main.InventorySlotsTotal) heldItem = player.ActiveItem(); - - // Replace the vanilla tooltip with a full stat readout - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - - if (line != null) - line.Text = CreateStatMeterTooltip(player, modPlayer, heldItem); - - // To save screen space, favorited tooltips do not exist for the Stat Meter - list.RemoveAll(l => l.Mod == "Terraria" && (l.Name == "Favorite" || l.Name == "FavoriteDesc")); - } - - private static string CreateStatMeterTooltip(Player player, CalamityPlayer modPlayer, Item heldItem) - { + static string OnePlace(float f) => f.ToString("n1"); static string TwoPlaces(float f) => f.ToString("n2"); - - // - // RAW STATS (as obtained from the game engine, not yet modified for display) - // - - // Defense - int defense = player.GetCurrentDefense(false); - float DR = player.endurance; - int lifeRegen = player.lifeRegen; // Normally we'd divide this by 2 in Expert without Well Fed, but we disable that shit - // Mobility + // Positive boosts need a + prefix, negative will have its own - sign automatically. + // There's a "clever" way to do this with formatting but it's harder. + static string Sign(float f) => (f >= 0 ? "+" : string.Empty); + + int numRageBoosters = (modPlayer.rageBoostOne ? 1 : 0) + (modPlayer.rageBoostTwo ? 1 : 0) + (modPlayer.rageBoostThree ? 1 : 0); + int rageDuration = BalancingConstants.DefaultRageDuration + numRageBoosters * BalancingConstants.RageDurationPerBooster; + int numAdrenBoosters = (modPlayer.adrenalineBoostOne ? 1 : 0) + (modPlayer.adrenalineBoostTwo ? 1 : 0) + (modPlayer.adrenalineBoostThree ? 1 : 0); + float adrenalineDR = BalancingConstants.FullAdrenalineDR + numAdrenBoosters * BalancingConstants.AdrenalineDRPerBooster; + // Only append rippers stats in Rev+ + string stats1 = !CalamityWorld.revenge ? string.Empty : "\n" + this.GetLocalization("RevStats").Format( + OnePlace(100f * modPlayer.RageDamageBoost), + rageDuration / 60, + OnePlace(100f * modPlayer.GetAdrenalineDamage()), + OnePlace(100f * adrenalineDR)); + list.FindAndReplace("[REV]", stats1); + + // Append item stats only if the held item isn't null, and base it off of the item's damage type. + string stats2 = string.Empty; + if (heldItem != null && !heldItem.IsAir) + { + // If block/wall, add respective placement stats, and ignore all combat stats + if (heldItem.createWall >= 0 || heldItem.createTile >= 0) + { + int extraBlockRangeX = player.blockRange + Player.tileRangeX - 5; + int extraBlockRangeY = player.blockRange + Player.tileRangeY - 4; + stats2 += "\n" + this.GetLocalization("PlacementRange").Format(Sign(extraBlockRangeX) + extraBlockRangeX, Sign(extraBlockRangeY) + extraBlockRangeY); + + if (heldItem.createTile >= 0 && player.tileSpeed != 0f) + { + float tileSpeed = (1f / player.tileSpeed) - 1f; + stats2 += this.GetLocalization("TileSpeed").Format(Sign(tileSpeed) + OnePlace(100f * tileSpeed)); + } + else if (heldItem.createWall >= 0 && player.wallSpeed != 0f) + { + float wallSpeed = (1f / player.wallSpeed) - 1f; + stats2 += this.GetLocalization("WallSpeed").Format(Sign(wallSpeed) + OnePlace(100f * wallSpeed)); + } + } + else if (heldItem.damage >= 0) + { + DamageClass dc = heldItem.DamageType; + bool displayCrit = true; + bool displayAttackSpeed = true; + if (dc == DamageClass.Summon) + { + displayCrit = false; + displayAttackSpeed = false; // Minions specifically don't display attack speed. Whips do. + } + else if (dc == DamageClass.SummonMeleeSpeed) + { + displayCrit = false; + } + + // Uses GetTotalDamage instead of GetDamage. GetTotalDamage adds all inherited stats as well. + // This also applies to GetTotalCritChance, GetTotalAttackSpeed, and GetTotalArmorPenetration. + var currentStats = player.GetTotalDamage(dc); + string damageStatLine = string.Empty; + + float baseFlatDamage = currentStats.Base; // flat increases to the base damage of the weapon. boosted by % damage and multiplicative damage + if (baseFlatDamage != 0f) + damageStatLine += this.GetLocalization("DamageBase").Format(Sign(baseFlatDamage) + OnePlace(baseFlatDamage)); + + float normalDamage = currentStats.Additive - 1f; // 1f = +0%, 2f = +100% + damageStatLine += this.GetLocalization("DamageNormal").Format(TwoPlaces(100f * normalDamage)); + + float multDamage = currentStats.Multiplicative; // direct multiplier. 1f = 1x, 2f = 2x, applies after standard boosts + if (multDamage != 1f) + damageStatLine += this.GetLocalization("DamageMult").Format(TwoPlaces(multDamage)); + + float flatDamage = currentStats.Flat; // direct flat addition, applies after multiplication + if (flatDamage != 0f) + damageStatLine += this.GetLocalization("DamageFlat").Format(Sign(flatDamage) + OnePlace(flatDamage)); + + stats2 += "\n" + this.GetLocalization("DamageStats").Format( + dc.DisplayName.ToString(), + damageStatLine, + OnePlace(player.GetTotalArmorPenetration(dc))); + + // Newline between damage and crit + if (displayCrit) + stats2 += "\n" + this.GetLocalization("Crit").Format(TwoPlaces(player.GetTotalCritChance(dc))); + + if (displayAttackSpeed) + { + // Newline between crit and attack speed + float attackSpeed = player.GetTotalAttackSpeed(dc) - 1f; // starts at 1f, 2f = +100% = DOUBLE attack speed, HALF animation time + stats2 += "\n" + this.GetLocalization("AttackSpeed").Format(Sign(attackSpeed) + TwoPlaces(100f * attackSpeed)); + + // For whips specifically, also display melee attack speed on the same line. + // Only display MELEE-SPECIFIC attack speed, not the total inheritance of attack speed for melee, + // because classless attack speed will already affect the whip. + if (dc == DamageClass.SummonMeleeSpeed) + { + float meleeSpeed = player.GetAttackSpeed() - 1f; + stats2 += this.GetLocalization("WhipMeleeInheritance").Format(Sign(meleeSpeed) + TwoPlaces(100f * meleeSpeed)); + } + } + + // If ranged, or any direct subclass thereof, display ranged ammo consumption + if (dc == DamageClass.Ranged || dc.GetModifierInheritance(DamageClass.Ranged).Equals(StatInheritanceData.Full)) + stats2 += "\n" + this.GetLocalization("RangedStats").Format(TwoPlaces(100f * player.GetRangedAmmoCostReduction())); + + // If magic, or any direct subclass thereof, display mana stats + if (dc == DamageClass.Magic || dc == DamageClass.MagicSummonHybrid || dc.GetModifierInheritance(DamageClass.Magic).Equals(StatInheritanceData.Full)) + stats2 += "\n" + this.GetLocalization("MagicStats").Format(TwoPlaces(100f * player.manaCost), player.manaRegen); + + // If summon, or any direct subclass thereof, AND NOT A WHIP, display minion/sentry slots + if (dc != DamageClass.SummonMeleeSpeed && (dc == DamageClass.Summon || dc.GetModifierInheritance(DamageClass.Summon).Equals(StatInheritanceData.Full))) + stats2 += "\n" + this.GetLocalization("SummonStats").Format(player.maxMinions, player.maxTurrets); + + // If whip, show whip range + float whipRange = player.whipRangeMultiplier - 1f; + if (dc == DamageClass.SummonMeleeSpeed || dc.GetModifierInheritance(DamageClass.SummonMeleeSpeed).Equals(StatInheritanceData.Full)) + stats2 += "\n" + this.GetLocalization("WhipStats").Format(Sign(whipRange) + TwoPlaces(100f * whipRange)); + + // If throwing or rogue, display rogue stats. + float rogueVelocity = modPlayer.rogueVelocity - 1f; + if (dc == DamageClass.Throwing || dc.GetModifierInheritance(DamageClass.Throwing).Equals(StatInheritanceData.Full)) + { + stats2 += "\n" + this.GetLocalization("RogueStats").Format( + (int)(100f * modPlayer.rogueStealthMax), + TwoPlaces(60f * player.GetStandingStealthRegen()), + TwoPlaces(60f * player.GetMovingStealthRegen()), + Sign(rogueVelocity) + TwoPlaces(100f * rogueVelocity)); + + // Rogue consumable chance + if (heldItem.consumable) + stats2 += this.GetLocalization("RogueConsumption").Format(100f * modPlayer.rogueAmmoCost); + } + + // If tool, add tool range + if (heldItem.pick > 0 || heldItem.axe > 0 || heldItem.hammer > 0) + { + int extraToolRangeX = Player.tileRangeX - 5; + int extraToolRangeY = Player.tileRangeY - 4; + stats2 += "\n" + this.GetLocalization("ToolRange").Format(Sign(extraToolRangeX) + extraToolRangeX, Sign(extraToolRangeY) + extraToolRangeY); + + // Pickaxe speed specifically + if (heldItem.pick > 0) + { + float pickSpeed = 1f - player.pickSpeed; + stats2 += this.GetLocalization("MiningSpeed").Format(Sign(pickSpeed) + OnePlace(100f * pickSpeed)); + } + } + } + } + list.FindAndReplace("[ITEMS]", stats2); + float moveSpeedBoost = player.moveSpeed - 1f; - float jumpBoost = player.GetJumpBoost(); float wingFlightTime = player.wingTimeMax; - - // Luck // Does not use NormalizedLuck. Presents the player's luck exactly as it is used by the game engine. // NormalizedLuck is only used in one place: the Wizard's luck report. Which is entirely obsoleted by this Meter. float luck = player.luck; - // No melee-specific stats anymore, because True Melee is its own class - - // Ranged - float rangedAmmoConsumption = player.GetRangedAmmoCostReduction(); - - // Magic - float manaCost = player.manaCost; - int manaRegen = player.manaRegen; - - // Summon - int minionSlots = player.maxMinions; - - // Rogue - float rogueStealth = modPlayer.rogueStealthMax; - float standingRegen = player.GetStandingStealthRegen(); - float movingRegen = player.GetMovingStealthRegen(); - float rogueVelocity = modPlayer.rogueVelocity - 1f; - float rogueAmmoConsumption = modPlayer.rogueAmmoCost; - - // Rippers - float rageDamage = modPlayer.RageDamageBoost; - float adrenalineDamage = modPlayer.GetAdrenalineDamage(); - int numAdrenBoosters = (modPlayer.adrenalineBoostOne ? 1 : 0) + (modPlayer.adrenalineBoostTwo ? 1 : 0) + (modPlayer.adrenalineBoostThree ? 1 : 0); - float adrenalineDR = BalancingConstants.FullAdrenalineDR + numAdrenBoosters * BalancingConstants.AdrenalineDRPerBooster; - - // Abyss - int lightLevel = player.GetCurrentAbyssLightLevel(); - float breathLoss = modPlayer.abyssBreathLossStat; - float breathLossRate = modPlayer.abyssBreathLossRateStat; - int lifeLostAtZeroBreath = modPlayer.abyssLifeLostAtZeroBreathStat; - int abyssDefenseLoss = modPlayer.abyssDefenseLossStat; - - // The notice about held item mattering is always displayed first. - StringBuilder sb = new StringBuilder("Displays almost all player stats\nOffensive stats displayed vary with held item", 1024); - - // Only append rippers stats in Rev+ - if (CalamityWorld.revenge) - { - string rageDamageDisplay = TwoPlaces(100f * rageDamage); - string adrenalineDamageDisplay = TwoPlaces(100f * adrenalineDamage); - string adrenalineDRDisplay = TwoPlaces(100f * adrenalineDR); - sb.Append("\n\nRage Damage Boost: ").Append(rageDamageDisplay).Append("%\n"); - sb.Append("Adrenaline Damage Boost: ").Append(adrenalineDamageDisplay) - .Append("% | Adrenaline DR Boost: ").Append(adrenalineDRDisplay).Append("%"); - } - - // Append item stats only if the held item isn't null, and base it off of the item's damage type. - if (heldItem != null && !heldItem.IsAir) - { - DamageClass dc = heldItem.DamageType; - bool displayCrit = true; - bool displayAttackSpeed = true; - - string damageClassName = "Unsupported"; - if (dc == DamageClass.Default) - damageClassName = "True (No Scaling)"; - else if (dc == DamageClass.Generic) - damageClassName = "Classless"; - else if (dc == AverageDamageClass.Instance) - damageClassName = "Averaged"; - else if (dc == TrueMeleeDamageClass.Instance || dc == TrueMeleeNoSpeedDamageClass.Instance) - damageClassName = "True Melee"; - else if (dc == DamageClass.Melee || dc == DamageClass.MeleeNoSpeed) - damageClassName = "Melee"; - else if (dc == DamageClass.Ranged) - damageClassName = "Ranged"; - else if (dc == DamageClass.Magic) - damageClassName = "Magic"; - else if (dc == DamageClass.MagicSummonHybrid) - damageClassName = "Magic+Summon"; - else if (dc == DamageClass.Summon) - { - damageClassName = "Minion"; - displayCrit = false; - displayAttackSpeed = false; // Minions specifically don't display attack speed. Whips do. - } - else if (dc == DamageClass.SummonMeleeSpeed) - { - damageClassName = "Whip"; - displayCrit = false; - } - else if (dc == RogueDamageClass.Instance) - damageClassName = "Rogue"; - else if (dc == DamageClass.Throwing) - damageClassName = "Throwing"; - - // Uses GetTotalDamage instead of GetDamage. GetTotalDamage adds all inherited stats as well. - // This also applies to GetTotalCritChance, GetTotalAttackSpeed, and GetTotalArmorPenetration. - var currentStats = player.GetTotalDamage(dc); - - float baseFlatDamage = currentStats.Base; // flat increases to the base damage of the weapon. boosted by % damage and multiplicative damage - float normalDamage = currentStats.Additive - 1f; // 1f = +0%, 2f = +100% - float multDamage = currentStats.Multiplicative; // direct multiplier. 1f = 1x, 2f = 2x, applies after standard boosts - float flatDamage = currentStats.Flat; // direct flat addition, applies after multiplication - float totalCrit = player.GetTotalCritChance(dc); // exact crit, stored as a float. meaning with no gear it's 4f = 4% UNLESS summoner - float attackSpeed = player.GetTotalAttackSpeed(dc); // starts at 1f, 2f = +100% = DOUBLE attack speed, HALF animation time - float armorPen = player.GetTotalArmorPenetration(dc); // starts at 0f = +0 armor pen - - // Attack damage tooltip. The boosts are displayed in exactly the order they are applied - sb.Append("\n\n").Append(damageClassName).Append(" Damage: "); - - // Flat base damage additions are extremely rare and only appear when relevant - if (baseFlatDamage != 0f) - { - char sign = baseFlatDamage < 0f ? '-' : '+'; - sb.Append('[').Append(sign).Append(OnePlace(baseFlatDamage)).Append(" base] "); - sb.Append('+'); // Place this because otherwise the regular additive damage will look weird - } - - // Additive damage is the vast majority of damage boosts - sb.Append(TwoPlaces(100f * normalDamage)).Append('%'); - - // Multiplicative damage is rare and only appears when relevant - if (multDamage != 1f) - sb.Append(" x").Append(TwoPlaces(multDamage)); - - // Flat damage is rare and only appears when relevant - if (flatDamage != 0f) - { - char sign = flatDamage < 0f ? '-' : '+'; - sb.Append(' ').Append(sign).Append(OnePlace(flatDamage)).Append(" flat"); - } - - // Newline between damage and crit - if (displayCrit) - { - sb.Append('\n').Append(damageClassName).Append(" Crit Chance: "); - sb.Append(TwoPlaces(totalCrit)).Append('%'); - } - - if (displayAttackSpeed) - { - // Newline between crit and attack speed - sb.Append('\n').Append(damageClassName).Append(" Attack Speed: "); - - // Positive boosts need a + prefix, negative will have its own - sign automatically. - // There's a "clever" way to do this with formatting but it's harder. - if (attackSpeed >= 1f) - sb.Append('+'); - sb.Append(TwoPlaces(100f * (attackSpeed - 1f))).Append('%'); - - // For whips specifically, also display melee attack speed on the same line. - // Only display MELEE-SPECIFIC attack speed, not the total inheritance of attack speed for melee, - // because classless attack speed will already affect the whip. - if (dc == DamageClass.SummonMeleeSpeed) - { - float meleeSpeed = player.GetAttackSpeed(); - sb.Append('['); - - // Positive boosts need a + prefix, negative will have its own - sign automatically. - // There's a "clever" way to do this with formatting but it's harder. - if (attackSpeed >= 1f) - sb.Append('+'); - sb.Append(TwoPlaces(100f * (meleeSpeed - 1f))).Append("% from melee]"); - } - } - - // Newline between attack speed and armor penetration - sb.Append('\n').Append(damageClassName).Append(" Armor Penetration: "); - sb.Append(OnePlace(armorPen)); - - // If ranged, or any direct subclass thereof, display ranged ammo consumption - if (dc == DamageClass.Ranged || dc.GetModifierInheritance(DamageClass.Ranged).Equals(StatInheritanceData.Full)) - sb.Append("\nAmmo Consumption Chance: ").Append(TwoPlaces(100f * rangedAmmoConsumption)); - - // If magic, or any direct subclass thereof, display mana stats - if (dc == DamageClass.Magic || dc == DamageClass.MagicSummonHybrid || dc.GetModifierInheritance(DamageClass.Magic).Equals(StatInheritanceData.Full)) - { - sb.Append("\nMana Usage: ").Append(TwoPlaces(100f * manaCost)); - sb.Append("\nMana Regen: ").Append(manaRegen); - } - - // If summon, or any direct subclass thereof, AND NOT A WHIP, display minion slots - if (dc != DamageClass.SummonMeleeSpeed && (dc == DamageClass.Summon || dc.GetModifierInheritance(DamageClass.Summon).Equals(StatInheritanceData.Full))) - sb.Append("\nMinion Slots: ").Append(minionSlots); - - // If throwing or rogue, display rogue stats. - if (dc == DamageClass.Throwing || dc.GetModifierInheritance(DamageClass.Throwing).Equals(StatInheritanceData.Full)) - { - sb.Append("\nRogue Velocity Boost: +").Append(TwoPlaces(100f * rogueVelocity)); - sb.Append("% | Rogue Weapon Consumption Chance: ").Append(TwoPlaces(100f * rogueAmmoConsumption)); - sb.Append("%\nMax Stealth: ").Append((int)(100f * rogueStealth)); - sb.Append(" | Standing Regen: ").Append(TwoPlaces(60f * standingRegen)).Append(" / sec"); - sb.Append(" | Moving Regen: ").Append(TwoPlaces(60f * movingRegen)).Append(" / sec"); - } - } - - // Newline break between offensive and defensive stats - sb.Append("\n\n"); - // Generic stats always render. - sb.Append("Defense: ").Append(defense); - sb.Append(" | DR: ").Append(TwoPlaces(100f * DR)).Append('%'); - sb.Append(" | Life Regen: ").Append(lifeRegen); - - sb.Append("\nMove Speed: "); - // Positive boosts need a + prefix, negative will have its own - sign automatically. - // There's a "clever" way to do this with formatting but it's harder. - if (moveSpeedBoost >= 0f) - sb.Append('+'); - sb.Append(TwoPlaces(100f * moveSpeedBoost)).Append('%'); - sb.Append(" | Jump Boost: ").Append(TwoPlaces(20f * jumpBoost)).Append('%'); - sb.Append(" | Wing Flight Time: ").Append(TwoPlaces(wingFlightTime / 60f)).Append(" seconds\n"); - - sb.Append("Luck: "); - // Positive boosts need a + prefix, negative will have its own - sign automatically. - // There's a "clever" way to do this with formatting but it's harder. - if (luck >= 0f) - sb.Append('+'); - sb.Append(TwoPlaces(100f * luck)).Append("%\n\n"); + string stats3 = "\n" + this.GetLocalization("GenericStats").Format( + player.GetCurrentDefense(false), + TwoPlaces(100f * player.endurance), + player.lifeRegen, // Normally we'd divide this by 2 in Expert without Well Fed, but we disable that shit + Sign(moveSpeedBoost) + TwoPlaces(100f * moveSpeedBoost), + TwoPlaces(20f * player.GetJumpBoost())); + // Show wing stats only if over 0 flight time + if (wingFlightTime > 0f) + stats3 += this.GetLocalization("FlightTime").Format(TwoPlaces(wingFlightTime / 60f)); + stats3 += "\n" + this.GetLocalization("MiscStats").Format( + player.aggro, + Sign(luck) + TwoPlaces(100f * luck)); + list.FindAndReplace("[GENERIC]", stats3); // Detailed Abyss stats only render if the player is in the Abyss. - sb.Append("Abyss Light Strength: ").Append(lightLevel).Append('\n'); - if (modPlayer.ZoneAbyss) - { - sb.Append("Other Abyss Stats:"); - sb.Append("\nBreath Lost Per Tick: ").Append(TwoPlaces(breathLoss)); - sb.Append(" | Breath Loss Rate: ").Append(TwoPlaces(breathLossRate)); - sb.Append("\nLife Lost Per Tick at Zero Breath: ").Append(lifeLostAtZeroBreath); - sb.Append("\nDefense Lost From Pressure: ").Append(abyssDefenseLoss); - } - else - sb.Append("Other Abyss stats are only displayed while in the Abyss"); + string stats4 = "\n" + (!modPlayer.ZoneAbyss ? this.GetLocalizedValue("AbyssStatsHidden") : this.GetLocalization("AbyssStats").Format( + player.GetCurrentAbyssLightLevel(), + TwoPlaces(modPlayer.abyssBreathLossStat), + TwoPlaces(modPlayer.abyssBreathLossRateStat), + modPlayer.abyssLifeLostAtZeroBreathStat, + modPlayer.abyssDefenseLossStat)); + list.FindAndReplace("[ABYSS]", stats4); - return sb.ToString(); + // To save screen space, favorited tooltips do not exist for the Stat Meter + list.RemoveAll(l => l.Mod == "Terraria" && (l.Name == "Favorite" || l.Name == "FavoriteDesc")); } } } diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs index 4bc9f40c24..e6999438a6 100644 --- a/Items/Accessories/StatisNinjaBelt.cs +++ b/Items/Accessories/StatisNinjaBelt.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories AddIngredient(ItemID.MasterNinjaGear). AddIngredient(ItemID.FrogGear). AddIngredient(50). - AddIngredient(5). + AddIngredient(5). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Accessories/TheCommunity.cs b/Items/Accessories/TheCommunity.cs index 7a1a8dd6e0..ccd0f1b00a 100644 --- a/Items/Accessories/TheCommunity.cs +++ b/Items/Accessories/TheCommunity.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public override void SetStaticDefaults() { - Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 10)); + Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 10)); ItemID.Sets.AnimatesAsSoul[Type] = true; } @@ -39,9 +39,10 @@ namespace CalamityMod.Items.Accessories // Community and Shattered Community are mutually exclusive public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().shatteredCommunity; - // Returns the total power of the Community, from 0.0 to 1.0 (0% to 100%), based on bosses defeated in the world. + // Returns the total power of the Community, from 0.05 to 0.2, scaling based on bosses defeated in the world. + // Returns the percentage of bosses killed (from 0.0 to 1.0) instead if killsOnly is true private static readonly int TotalCountedBosses = 42; - internal static float CalculatePower() + internal static float CalculatePower(bool killsOnly = false) { int numBosses = 0; numBosses += NPC.downedSlimeKing.ToInt(); @@ -86,35 +87,40 @@ namespace CalamityMod.Items.Accessories numBosses += DownedBossSystem.downedYharon.ToInt(); // 40 numBosses += DownedBossSystem.downedExoMechs.ToInt(); numBosses += DownedBossSystem.downedCalamitas.ToInt(); - return numBosses / (float)TotalCountedBosses; + float bossDownedRatio = numBosses / (float)TotalCountedBosses; + return killsOnly ? bossDownedRatio : MathHelper.Lerp(0.05f, 0.2f, bossDownedRatio); } + // Damage stat boosts + public const float DamageMultiplier = 0.5f; // 2.5% to 10% (x100) + public const float CritMultiplier = 25f; // 1.25% to 5% + + // Defensive stat boosts + public const float HealthMultiplier = 50f; // 2% to 10% (rounded down) + public const float DRMultiplier = 0.25f; // 1.25% to 5% (x100) + public const float DefenseMultiplier = 50f; // 2 to 10 (rounded down) + + // Only while affected by DoT + public const float RegenMultiplier = 10f; // 0 to 2 (rounded down), +1 added independently of the multiplier + + // Mobility stat boosts + public const float SpeedMultiplier = 0.5f; // 2.5% to 10% (x100) + public const float FlightMultiplier = 1f; // 5% to 20% (x100) + public override void ModifyTooltips(List list) { - float communityPower = CalculatePower(); - float maxHealthIncrease = MathHelper.Lerp(0.025f, 0.1f, communityPower); - int lifeRegenIncrease = (int)(MathHelper.Lerp(0.005f, 0.02f, communityPower)*100); - float critChanceIncrease = MathHelper.Lerp(0.0125f, 0.05f, communityPower); - float damageIncrease = MathHelper.Lerp(0.025f, 0.1f, communityPower); - float damageReductionIncrease = MathHelper.Lerp(0.0125f, 0.05f, communityPower); - int defenseIncrease = (int)(MathHelper.Lerp(0.025f, 0.1f, communityPower)*100); - float summonKnockbackIncrease = MathHelper.Lerp(0.05f, 0.2f, communityPower); - float moveSpeedIncrease = MathHelper.Lerp(0.025f, 0.1f, communityPower); - float flightTimeIncrease = MathHelper.Lerp(0.05f, 0.2f, communityPower); - - TooltipLine line = list.LastOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4"); - - if (line != null) - line.Text += - "\nMax health increased by " + (maxHealthIncrease*100).ToString("n1") + "%\n" + - "Life regeneration increased by " + (1+lifeRegenIncrease) + "\n" + - "Critical strike chance increased by " + (critChanceIncrease*100).ToString("n1") + "%\n" + - "Damage increased by " + (damageIncrease*100).ToString("n1") + "%\n" + - "Damage reduction increased by " + (damageReductionIncrease*100).ToString("n1") + "%\n" + - "Defense increased by " + defenseIncrease + "\n" + - "Minion knockback increased by " + (summonKnockbackIncrease*100).ToString("n1") + "%\n" + - "Movement speed increased by " + (moveSpeedIncrease*100).ToString("n1") + "%\n" + - "Flight time increased by " + (flightTimeIncrease*100).ToString("n1") + "%"; + float power = CalculatePower(); + string statList = this.GetLocalization("StatsList").Format( + (DamageMultiplier * power * 100).ToString("N1"), + (CritMultiplier * power).ToString("N0"), + (int)(HealthMultiplier * power), + (DRMultiplier * power * 100).ToString("N2"), + (int)(DefenseMultiplier * power), + 1 + (int)(RegenMultiplier * power), + (SpeedMultiplier * power * 100).ToString("N1"), + (FlightMultiplier * power * 100).ToString("N1"), + (CalculatePower(true) * 100).ToString("N0")); + list.FindAndReplace("[STATS]", statList); } public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) diff --git a/Items/Accessories/Wings/HadarianWings.cs b/Items/Accessories/Wings/HadarianWings.cs index 49a709374b..4e907b1f30 100644 --- a/Items/Accessories/Wings/HadarianWings.cs +++ b/Items/Accessories/Wings/HadarianWings.cs @@ -28,17 +28,6 @@ namespace CalamityMod.Items.Accessories.Wings Item.rare = ItemRarityID.Lime; Item.accessory = true; } - public override void ModifyTooltips(List tooltips) - { - string down = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "Down"); - string jump = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "Jump"); - string up = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "Up"); - string hoverText = Player.Settings.HoverControl == Player.Settings.HoverControlMode.Hold ? "Hold " + down + " and " + jump + " to hover" : "Press " + down + " to toggle hover\nPress " + up + " to deactivate hover"; - - TooltipLine hover = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - if (hover != null) - hover.Text = hoverText; - } public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index c29601bcca..ed57a5b00b 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -23,8 +23,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.yInsignia = true; - player.GetAttackSpeed() += 0.1f; - player.GetDamage() += 0.1f; + player.GetDamage() += 0.15f; } public override void AddRecipes() diff --git a/Items/Armor/Auric/AuricTeslaBodyArmor.cs b/Items/Armor/Auric/AuricTeslaBodyArmor.cs index dfef3831b6..6bdf9b5265 100644 --- a/Items/Armor/Auric/AuricTeslaBodyArmor.cs +++ b/Items/Armor/Auric/AuricTeslaBodyArmor.cs @@ -1,5 +1,4 @@ using CalamityMod.CalPlayer; -using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; @@ -39,7 +38,6 @@ namespace CalamityMod.Items.Armor.Auric public override void UpdateEquip(Player player) { var modPlayer = player.Calamity(); - modPlayer.fBarrier = true; player.statLifeMax2 += 100; player.GetDamage() += 0.08f; player.GetCritChance() += 5; @@ -51,7 +49,6 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(). AddIngredient(18). AddTile(). Register(); @@ -60,7 +57,6 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(). AddIngredient(18). AddTile(). Register(); diff --git a/Items/Armor/DesertProwler/DesertProwlerSet.cs b/Items/Armor/DesertProwler/DesertProwlerSet.cs index a4c3538f4e..812e6effd7 100644 --- a/Items/Armor/DesertProwler/DesertProwlerSet.cs +++ b/Items/Armor/DesertProwler/DesertProwlerSet.cs @@ -83,6 +83,7 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void UpdateArmorSet(Player player) { player.setBonus = this.GetLocalization("SetBonus").Format(FlatDamageBonus); //More gets edited in elsewhere + player.GetDamage().Flat += FlatDamageBonus; DesertProwlerPlayer armorPlayer = player.GetModPlayer(); armorPlayer.desertProwlerSet = true; @@ -192,7 +193,7 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void AddRecipes() { CreateRecipe(). - AddIngredient(2). + AddIngredient(2). AddIngredient(ItemID.Silk, 8). AddTile(TileID.Loom). Register(); @@ -235,7 +236,7 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void AddRecipes() { CreateRecipe(). - AddIngredient(3). + AddIngredient(3). AddIngredient(ItemID.Silk, 10). AddTile(TileID.Loom). Register(); @@ -264,7 +265,7 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(). AddIngredient(ItemID.Silk, 5). AddTile(TileID.Loom). Register(); @@ -291,12 +292,6 @@ namespace CalamityMod.Items.Armor.DesertProwler desertProwlerSet = false; } - public override void ModifyWeaponDamage(Item item, ref StatModifier damage) - { - if (desertProwlerSet && item.CountsAsClass() && item.ammo == AmmoID.None) - damage.Flat += DesertProwlerHat.FlatDamageBonus; - } - public override void PostUpdate() { if (Player.Calamity().cooldowns.TryGetValue(SandsmokeBomb.ID, out var cd)) diff --git a/Items/Armor/LunicCorps/LunicCorpsBoots.cs b/Items/Armor/LunicCorps/LunicCorpsBoots.cs index fc4efc065f..c51008b5fe 100644 --- a/Items/Armor/LunicCorps/LunicCorpsBoots.cs +++ b/Items/Armor/LunicCorps/LunicCorpsBoots.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Items.Armor.LunicCorps public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.ChlorophyteBar, 8). AddIngredient(8). + AddIngredient(ItemID.ChlorophyteBar, 8). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Armor/LunicCorps/LunicCorpsHelmet.cs b/Items/Armor/LunicCorps/LunicCorpsHelmet.cs index 8af73b7b36..a5584887f4 100644 --- a/Items/Armor/LunicCorps/LunicCorpsHelmet.cs +++ b/Items/Armor/LunicCorps/LunicCorpsHelmet.cs @@ -140,10 +140,10 @@ namespace CalamityMod.Items.Armor.LunicCorps public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.ChlorophyteBar, 6). - AddIngredient(6). - AddIngredient(ItemID.Glass, 20). AddIngredient(ItemID.NightVisionHelmet). + AddIngredient(6). + AddIngredient(ItemID.ChlorophyteBar, 6). + AddIngredient(ItemID.Glass, 20). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Armor/LunicCorps/LunicCorpsVest.cs b/Items/Armor/LunicCorps/LunicCorpsVest.cs index 1dcd4de647..44875bc88f 100644 --- a/Items/Armor/LunicCorps/LunicCorpsVest.cs +++ b/Items/Armor/LunicCorps/LunicCorpsVest.cs @@ -31,9 +31,9 @@ namespace CalamityMod.Items.Armor.LunicCorps public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.ChlorophyteBar, 11). - AddIngredient(11). AddIngredient(). + AddIngredient(11). + AddIngredient(ItemID.ChlorophyteBar, 11). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Armor/Wulfrum/WulfrumFusionCannon.cs b/Items/Armor/Wulfrum/WulfrumFusionCannon.cs index 76251edb4a..a8fb341f8b 100644 --- a/Items/Armor/Wulfrum/WulfrumFusionCannon.cs +++ b/Items/Armor/Wulfrum/WulfrumFusionCannon.cs @@ -40,9 +40,10 @@ namespace CalamityMod.Items.Armor.Wulfrum Item.shootSpeed = 18f; Item.holdStyle = 16; //Custom hold style - Item.useAnimation = 10; Item.useTime = 4; + Item.useAnimation = 10; Item.reuseDelay = 17; + Item.useLimitPerAnimation = 3; Item.noUseGraphic = false; } diff --git a/Items/CalamityGlobalItemLoot.cs b/Items/CalamityGlobalItemLoot.cs index 9aa685845c..43a2861c81 100644 --- a/Items/CalamityGlobalItemLoot.cs +++ b/Items/CalamityGlobalItemLoot.cs @@ -309,7 +309,7 @@ namespace CalamityMod.Items case ItemID.DungeonFishingCrate: case ItemID.DungeonFishingCrateHard: loot.AddIf(() => NPC.downedPlantBoss, ItemID.Ectoplasm, 10, 1, 5); // 10% 1-5 Ectoplasm - loot.AddIf(() => DownedBossSystem.downedPolterghast, ModContent.ItemType(), 10, 1, 5); // 10% 1-5 Phantoplasm + loot.AddIf(() => DownedBossSystem.downedPolterghast, ModContent.ItemType(), 10, 1, 5); // 10% 1-5 Polterplasm break; case ItemID.JungleFishingCrate: diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 85713d6aa6..e4ca0c12b3 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -55,6 +55,12 @@ namespace CalamityMod.Items // tooltip list. EnchantmentTooltips(item, tooltips); + // Replace rogue with rouge in gfb + if (Main.zenithWorld) + { + tooltips.FindAndReplace("Rogue", "Rouge"); + tooltips.FindAndReplace("rogue", "rouge"); + } // Everything below this line can only apply to modded items. If the item is vanilla, stop here for efficiency. if (item.type < ItemID.Count) return; @@ -578,7 +584,7 @@ namespace CalamityMod.Items // Ale and Sake rebalance. if (item.type == ItemID.Ale || item.type == ItemID.Sake) - EditTooltipByNum(0, (line) => line.Text = "Increases melee damage by 10% and reduces defense by 10%"); + EditTooltipByNum(0, (line) => line.Text = "Increases melee damage by 10% and reduces defense by 5%"); // Hellfire Treads buff. if (item.type == ItemID.HellfireTreads) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 217ab5bc44..e378a9a9ac 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -473,8 +473,8 @@ namespace CalamityMod.Items { ItemID.SoulDrain, Do(DamageRatio(1.1f)) }, // Life Drain { ItemID.SpaceGun, Do(DamageExact(25)) }, { ItemID.Spear, Do(AutoReuse, TrueMelee, DamageRatio(2f)) }, - { ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), UseTimeExact(8), TileBoostExact(+4)) }, - { ItemID.SpectrePickaxe, Do(PickPower(200), UseTimeExact(8), TileBoostExact(+4)) }, + { ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), TileBoostExact(+4)) }, + { ItemID.SpectrePickaxe, Do(PickPower(200), TileBoostExact(+4)) }, { ItemID.SpectreStaff, Do(DamageRatio(1.2f)) }, { ItemID.SpicyPepper, Do(Value(Item.buyPrice(silver: 2))) }, { ItemID.SpiderStaff, Do(AutoReuse, UseExact(25)) }, diff --git a/Items/Dyes/PhantoplasmDye.cs b/Items/Dyes/PolterplasmDye.cs similarity index 84% rename from Items/Dyes/PhantoplasmDye.cs rename to Items/Dyes/PolterplasmDye.cs index 1749b0a840..3841428464 100644 --- a/Items/Dyes/PhantoplasmDye.cs +++ b/Items/Dyes/PolterplasmDye.cs @@ -9,10 +9,12 @@ using ReLogic.Content; namespace CalamityMod.Items.Dyes { - public class PhantoplasmDye : BaseDye + [LegacyName("PhantoplasmDye")] + public class PolterplasmDye : BaseDye { - public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/PhantoplasmDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). + public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref(Mod.Assets.Request("Effects/Dyes/PolterplasmDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass"). UseColor(new Color(245, 143, 182)).UseSecondaryColor(new Color(119, 238, 255)).UseImage("Images/Misc/Perlin"); + public override void SafeSetStaticDefaults() { Item.ResearchUnlockCount = 3; @@ -28,7 +30,7 @@ namespace CalamityMod.Items.Dyes { CreateRecipe(2). AddIngredient(ItemID.BottledWater, 2). - AddIngredient(3). + AddIngredient(3). AddTile(TileID.DyeVat). Register(); } diff --git a/Items/Dyes/PhantoplasmDye.png b/Items/Dyes/PolterplasmDye.png similarity index 100% rename from Items/Dyes/PhantoplasmDye.png rename to Items/Dyes/PolterplasmDye.png diff --git a/Items/Materials/AscendantSpiritEssence.cs b/Items/Materials/AscendantSpiritEssence.cs index f39e8348e0..db0a2a70ed 100644 --- a/Items/Materials/AscendantSpiritEssence.cs +++ b/Items/Materials/AscendantSpiritEssence.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { CreateRecipe(). - AddIngredient(2). + AddIngredient(2). AddIngredient(5). AddIngredient(5). AddIngredient(2). diff --git a/Items/Materials/BloodstoneCore.cs b/Items/Materials/BloodstoneCore.cs index 2957a696ad..1c74a7bd0d 100644 --- a/Items/Materials/BloodstoneCore.cs +++ b/Items/Materials/BloodstoneCore.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Materials CreateRecipe(2). AddIngredient(5). AddIngredient(). - AddIngredient(). + AddIngredient(). AddTile(TileID.AdamantiteForge). Register(); } diff --git a/Items/Materials/DesertFeather.cs b/Items/Materials/DesertFeather.cs deleted file mode 100644 index 23e3b74c13..0000000000 --- a/Items/Materials/DesertFeather.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Terraria; -using Terraria.ModLoader; -using Terraria.ID; - -namespace CalamityMod.Items.Materials -{ - public class DesertFeather : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Materials"; - public override void SetStaticDefaults() - { - Item.ResearchUnlockCount = 5; - } - - public override void SetDefaults() - { - Item.width = 24; - Item.height = 24; - Item.maxStack = 9999; - Item.value = Item.sellPrice(copper: 20); - Item.rare = ItemRarityID.Blue; - } - } -} diff --git a/Items/Materials/DesertFeather.png b/Items/Materials/DesertFeather.png deleted file mode 100644 index df02cc3ea1..0000000000 Binary files a/Items/Materials/DesertFeather.png and /dev/null differ diff --git a/Items/Materials/Phantoplasm.cs b/Items/Materials/Polterplasm.cs similarity index 90% rename from Items/Materials/Phantoplasm.cs rename to Items/Materials/Polterplasm.cs index 1a3e43ebbf..b976bece02 100644 --- a/Items/Materials/Phantoplasm.cs +++ b/Items/Materials/Polterplasm.cs @@ -6,9 +6,11 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Materials { - public class Phantoplasm : ModItem, ILocalizedModType + [LegacyName("Phantoplasm")] + public class Polterplasm : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Materials"; + public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; diff --git a/Items/Materials/Phantoplasm.png b/Items/Materials/Polterplasm.png similarity index 100% rename from Items/Materials/Phantoplasm.png rename to Items/Materials/Polterplasm.png diff --git a/Items/Mounts/ExoThrone.cs b/Items/Mounts/ExoThrone.cs index 57cb522535..28cae8a07d 100644 --- a/Items/Mounts/ExoThrone.cs +++ b/Items/Mounts/ExoThrone.cs @@ -1,6 +1,5 @@ using CalamityMod.Rarities; using System.Collections.Generic; -using System.Linq; using Terraria.ID; using Terraria.ModLoader; @@ -23,14 +22,6 @@ namespace CalamityMod.Items.Mounts Item.rare = ModContent.RarityType(); } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.ExoChairSlowdownHotkey.TooltipHotkeyString(); - - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - - if (line != null) - line.Text = $"Hold {hotkey} while sitting in the throne to move slower for more precision"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.ExoChairSlowdownHotkey); } } diff --git a/Items/NormalityRelocator.cs b/Items/NormalityRelocator.cs index 70850bbaf5..d6b3a81e34 100644 --- a/Items/NormalityRelocator.cs +++ b/Items/NormalityRelocator.cs @@ -6,7 +6,6 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; namespace CalamityMod.Items { @@ -28,14 +27,7 @@ namespace CalamityMod.Items Item.Calamity().donorItem = true; } - public override void ModifyTooltips(List list) - { - string hotkey = CalamityKeybinds.NormalityRelocatorHotKey.TooltipHotkeyString(); - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - - if (line != null) - line.Text = "Press " + hotkey + " to teleport to the position of the mouse"; - } + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.NormalityRelocatorHotKey); public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) { diff --git a/Items/PermanentBoosters/PhantomHeart.cs b/Items/PermanentBoosters/PhantomHeart.cs index e28300c69e..92c959f711 100644 --- a/Items/PermanentBoosters/PhantomHeart.cs +++ b/Items/PermanentBoosters/PhantomHeart.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Items.PermanentBoosters { CreateRecipe(). AddIngredient(5). - AddIngredient(25). + AddIngredient(25). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Placeables/Banners/SunskaterBanner.png b/Items/Placeables/Banners/SunskaterBanner.png index cc4981f8e3..108ccac0d6 100644 Binary files a/Items/Placeables/Banners/SunskaterBanner.png and b/Items/Placeables/Banners/SunskaterBanner.png differ diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs index d266b6737e..640bd9d4dc 100644 --- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs @@ -65,7 +65,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "AquaSG", "Atalya", "Ben-TK", - "Blastitle", "Cei", "Cooper", "CrabBar", @@ -108,6 +107,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "Amadis", "AstroKnight", "Blast", + "Blastitle", "Blockaroz", "Boffin", "Bravioli", diff --git a/Items/Potions/SupremeManaPotion.cs b/Items/Potions/SupremeManaPotion.cs index 249e2ffc51..581ee3f289 100644 --- a/Items/Potions/SupremeManaPotion.cs +++ b/Items/Potions/SupremeManaPotion.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Potions { CreateRecipe(15). AddIngredient(ItemID.SuperManaPotion, 15). - AddIngredient(). + AddIngredient(). AddTile(TileID.Bottles). Register() .DisableDecraft(); diff --git a/Items/RelicOfConvergence.cs b/Items/RelicOfConvergence.cs index aab55d0c67..7308778fc9 100644 --- a/Items/RelicOfConvergence.cs +++ b/Items/RelicOfConvergence.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Items Item.width = 32; Item.height = 46; Item.useTime = Item.useAnimation = 25; - Item.reuseDelay = 15; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = SoundID.DD2_DarkMageCastHeal; Item.noMelee = true; diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index 21df78b0d2..879f20c269 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Items.SummonItems CreateRecipe(). AddIngredient(ItemID.LunarBar, 40). AddIngredient(10). - AddIngredient(40). + AddIngredient(40). AddTile(TileID.LunarCraftingStation). Register() .DisableDecraft(); diff --git a/Items/SummonItems/NecroplasmicBeacon.cs b/Items/SummonItems/NecroplasmicBeacon.cs index e21a1d73b6..70b6bfdf97 100644 --- a/Items/SummonItems/NecroplasmicBeacon.cs +++ b/Items/SummonItems/NecroplasmicBeacon.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.SummonItems { CreateRecipe(). AddRecipeGroup("Wood", 25). - AddIngredient(50). + AddIngredient(50). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/SummonItems/ProfanedShard.cs b/Items/SummonItems/ProfanedShard.cs index 50f850a1af..3e602021d8 100644 --- a/Items/SummonItems/ProfanedShard.cs +++ b/Items/SummonItems/ProfanedShard.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.SummonItems public override bool CanUseItem(Player player) { - return !NPC.AnyNPCs(ModContent.NPCType()) && (Main.dayTime || Main.zenithWorld) && (player.ZoneHallow || player.ZoneUnderworldHeight) && !BossRushEvent.BossRushActive; + return !NPC.AnyNPCs(ModContent.NPCType()) && (Main.dayTime || Main.remixWorld) && (player.ZoneHallow || player.ZoneUnderworldHeight) && !BossRushEvent.BossRushActive; } public override bool? UseItem(Player player) @@ -53,15 +53,15 @@ namespace CalamityMod.Items.SummonItems public override void ModifyTooltips(List list) { Player player = Main.LocalPlayer; - TooltipLine line1 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); + TooltipLine line0 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - if (Main.zenithWorld) + if (Main.remixWorld) { - line1.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld"; + line0.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld"; } else { - line1.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld during daytime"; + line0.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld during daytime"; } } diff --git a/Items/TreasureBags/AstrumDeusBag.cs b/Items/TreasureBags/AstrumDeusBag.cs index 3af374c75c..667f6e64f9 100644 --- a/Items/TreasureBags/AstrumDeusBag.cs +++ b/Items/TreasureBags/AstrumDeusBag.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Items.TreasureBags { ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType() })); diff --git a/Items/TreasureBags/PolterghastBag.cs b/Items/TreasureBags/PolterghastBag.cs index 6aa96b6805..c8dc0e1ae3 100644 --- a/Items/TreasureBags/PolterghastBag.cs +++ b/Items/TreasureBags/PolterghastBag.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Items.TreasureBags // Materials itemLoot.Add(ModContent.ItemType(), 1, 10, 20); - itemLoot.Add(ModContent.ItemType(), 1, 40, 50); + itemLoot.Add(ModContent.ItemType(), 1, 40, 50); // Weapons itemLoot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, new int[] diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index 04dd60d2d3..2be133a986 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Items Item.rare = ItemRarityID.Blue; } - public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) - { - itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; - } + public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) + { + itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; + } public override void UpdateInventory(Player player) { diff --git a/Items/Weapons/Magic/AuguroftheElements.cs b/Items/Weapons/Magic/AuguroftheElements.cs index b1cd98fb82..0adc311c50 100644 --- a/Items/Weapons/Magic/AuguroftheElements.cs +++ b/Items/Weapons/Magic/AuguroftheElements.cs @@ -19,8 +19,9 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = 28; Item.height = 30; Item.useTime = 2; - Item.reuseDelay = 5; Item.useAnimation = 10; + Item.reuseDelay = 5; + Item.useLimitPerAnimation = 5; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; diff --git a/Items/Weapons/Magic/DarkSpark.cs b/Items/Weapons/Magic/DarkSpark.cs index 12622d3e64..ba600904a5 100644 --- a/Items/Weapons/Magic/DarkSpark.cs +++ b/Items/Weapons/Magic/DarkSpark.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 16; Item.useTime = 10; Item.useAnimation = 10; - Item.reuseDelay = 5; Item.useStyle = ItemUseStyleID.HoldUp; Item.UseSound = SoundID.Item13; Item.noMelee = true; diff --git a/Items/Weapons/Magic/EidolicWail.cs b/Items/Weapons/Magic/EidolicWail.cs index b20f6b7bb3..f50b908aac 100644 --- a/Items/Weapons/Magic/EidolicWail.cs +++ b/Items/Weapons/Magic/EidolicWail.cs @@ -19,8 +19,9 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = 60; Item.height = 60; Item.useTime = 12; - Item.reuseDelay = 30; Item.useAnimation = 36; + Item.reuseDelay = 30; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1f; diff --git a/Items/Weapons/Magic/ElementalRay.cs b/Items/Weapons/Magic/ElementalRay.cs index 563aadd6aa..e70dffd0d3 100644 --- a/Items/Weapons/Magic/ElementalRay.cs +++ b/Items/Weapons/Magic/ElementalRay.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Item.type] = true; } public override void SetDefaults() @@ -26,6 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useTime = 4; Item.useAnimation = 16; Item.reuseDelay = 14; + Item.useLimitPerAnimation = 4; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; diff --git a/Items/Weapons/Magic/EventHorizon.cs b/Items/Weapons/Magic/EventHorizon.cs index 3be4086bc6..7aa74a1c95 100644 --- a/Items/Weapons/Magic/EventHorizon.cs +++ b/Items/Weapons/Magic/EventHorizon.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(). AddIngredient(). AddIngredient(). AddIngredient(8). diff --git a/Items/Weapons/Magic/Fabstaff.cs b/Items/Weapons/Magic/Fabstaff.cs index 685efc196c..518c973d80 100644 --- a/Items/Weapons/Magic/Fabstaff.cs +++ b/Items/Weapons/Magic/Fabstaff.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.RainbowRod). - AddIngredient(10). + AddIngredient(10). AddIngredient(5). AddTile(). Register(); diff --git a/Items/Weapons/Magic/Heresy.cs b/Items/Weapons/Magic/Heresy.cs index 83b5206ef5..198faa78e5 100644 --- a/Items/Weapons/Magic/Heresy.cs +++ b/Items/Weapons/Magic/Heresy.cs @@ -12,13 +12,13 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6)); + Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6)); ItemID.Sets.AnimatesAsSoul[Type] = true; } public override void SetDefaults() { - Item.damage = 888; + Item.damage = 990; Item.DamageType = DamageClass.Magic; Item.mana = 10; Item.width = 38; diff --git a/Items/Weapons/Magic/IceBarrage.cs b/Items/Weapons/Magic/IceBarrage.cs index dec1bd31aa..bb6737bed0 100644 --- a/Items/Weapons/Magic/IceBarrage.cs +++ b/Items/Weapons/Magic/IceBarrage.cs @@ -32,9 +32,9 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 2250; Item.knockBack = 6f; - Item.useTime = 300; - Item.useAnimation = 300; + Item.useTime = Item.useAnimation = 300; Item.reuseDelay = 60; + Item.useLimitPerAnimation = 1; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 2f; Item.useAmmo = ModContent.ItemType(); diff --git a/Items/Weapons/Magic/InfernalRift.cs b/Items/Weapons/Magic/InfernalRift.cs index 4ff86add70..9131f0cc1c 100644 --- a/Items/Weapons/Magic/InfernalRift.cs +++ b/Items/Weapons/Magic/InfernalRift.cs @@ -23,9 +23,10 @@ namespace CalamityMod.Items.Weapons.Magic Item.mana = 15; Item.width = 16; Item.height = 16; - Item.useAnimation = 30; Item.useTime = 2; + Item.useAnimation = 30; Item.reuseDelay = Item.useAnimation + 6; + Item.useLimitPerAnimation = 15; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7f; diff --git a/Items/Weapons/Magic/StaffofBlushie.cs b/Items/Weapons/Magic/StaffofBlushie.cs index d57fae231d..16dbfa42f5 100644 --- a/Items/Weapons/Magic/StaffofBlushie.cs +++ b/Items/Weapons/Magic/StaffofBlushie.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.SapphireStaff). - AddIngredient(10). + AddIngredient(10). AddIngredient(5). AddTile(). Register(); diff --git a/Items/Weapons/Magic/Starfall.cs b/Items/Weapons/Magic/StarShower.cs similarity index 96% rename from Items/Weapons/Magic/Starfall.cs rename to Items/Weapons/Magic/StarShower.cs index 33125f5d59..942cd99b4c 100644 --- a/Items/Weapons/Magic/Starfall.cs +++ b/Items/Weapons/Magic/StarShower.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Magic { - public class Starfall : ModItem, ILocalizedModType + [LegacyName("Starfall")] + public class StarShower : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetDefaults() diff --git a/Items/Weapons/Magic/Starfall.png b/Items/Weapons/Magic/StarShower.png similarity index 100% rename from Items/Weapons/Magic/Starfall.png rename to Items/Weapons/Magic/StarShower.png diff --git a/Items/Weapons/Magic/TheDanceofLight.cs b/Items/Weapons/Magic/TheDanceofLight.cs index 7c3937d327..0eff5f4e12 100644 --- a/Items/Weapons/Magic/TheDanceofLight.cs +++ b/Items/Weapons/Magic/TheDanceofLight.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useTime = 2; Item.useAnimation = 8; Item.reuseDelay = 5; + Item.useLimitPerAnimation = 4; Item.UseSound = SoundID.Item105; Item.autoReuse = true; Item.noMelee = true; diff --git a/Items/Weapons/Magic/UltraLiquidator.cs b/Items/Weapons/Magic/UltraLiquidator.cs index db033b0491..e10dbf1090 100644 --- a/Items/Weapons/Magic/UltraLiquidator.cs +++ b/Items/Weapons/Magic/UltraLiquidator.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Item.type] = true; } public override void SetDefaults() @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 5f; Item.useTime = 3; Item.reuseDelay = Item.useAnimation = 15; + Item.useLimitPerAnimation = 5; Item.mana = 25; Item.DamageType = DamageClass.Magic; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/VeeringWind.cs b/Items/Weapons/Magic/VeeringWind.cs index 03dc148b67..5e666556f9 100644 --- a/Items/Weapons/Magic/VeeringWind.cs +++ b/Items/Weapons/Magic/VeeringWind.cs @@ -21,10 +21,10 @@ namespace CalamityMod.Items.Weapons.Magic { Item.damage = 15; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 20; Item.width = 28; Item.height = 32; - Item.useTime = Item.useAnimation = 25; + Item.useTime = Item.useAnimation = 36; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 10f; @@ -34,50 +34,37 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = SoundID.Item66; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 12f; + Item.shootSpeed = 6f; } public override bool AltFunctionUse(Player player) => true; public override bool CanUseItem(Player player) + { + Item.UseSound = player.altFunctionUse == 2 ? SoundID.Item43 : SoundID.Item66; + return base.CanUseItem(player); + } + + public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? 0.5f : 1f; + + public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) { if (player.altFunctionUse == 2) { - Item.useTime = Item.useAnimation = 50; - Item.knockBack = 2f; - Item.UseSound = SoundID.Item43; - Item.shootSpeed = 6f; + type = ModContent.ProjectileType(); + knockback *= 0.2f; + velocity *= 0.5f; } - else - { - Item.useTime = Item.useAnimation = 25; - Item.knockBack = 10f; - Item.UseSound = SoundID.Item66; - Item.shootSpeed = 12f; - } - return base.CanUseItem(player); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int totalProjectiles = 24; - if (player.altFunctionUse == 2) + for (int i = 0; i < totalProjectiles; i++) { - for (int i = 0; i < totalProjectiles; i++) - { - Vector2 waveVelocity = ((MathHelper.TwoPi * i / (float)totalProjectiles) + velocity.ToRotation()).ToRotationVector2() * velocity.Length() * 0.5f; - Projectile.NewProjectile(source, position, waveVelocity, ModContent.ProjectileType(), damage, knockback, Main.myPlayer); - } + Vector2 waveVelocity = ((MathHelper.TwoPi * i / (float)totalProjectiles) + velocity.ToRotation()).ToRotationVector2() * velocity.Length(); + Projectile.NewProjectile(source, position, waveVelocity, type, damage, knockback, Main.myPlayer); } - else - { - for (int i = 0; i < totalProjectiles; i++) - { - Vector2 waveVelocity = ((MathHelper.TwoPi * i / (float)totalProjectiles) + velocity.ToRotation()).ToRotationVector2() * velocity.Length() * 0.5f; - Projectile.NewProjectile(source, position, waveVelocity, type, damage, knockback, Main.myPlayer); - } - } - return false; } diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index 260fd73650..1c93df551c 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -4,6 +4,7 @@ using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -13,9 +14,12 @@ namespace CalamityMod.Items.Weapons.Magic public class VividClarity : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; + + public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/VividClarityShoot"); + public static readonly SoundStyle BeamSound = new("CalamityMod/Sounds/Item/VividClarityBeamAppear"); public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Item.type] = true; } public override void SetDefaults() @@ -25,14 +29,15 @@ namespace CalamityMod.Items.Weapons.Magic Item.mana = 42; Item.width = 90; Item.height = 112; - Item.useAnimation = 20; Item.useTime = 4; + Item.useAnimation = 20; Item.reuseDelay = Item.useAnimation; + Item.useLimitPerAnimation = 5; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.UseSound = SoundID.Item60; + Item.UseSound = UseSound; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; diff --git a/Items/Weapons/Magic/YharimsCrystal.cs b/Items/Weapons/Magic/YharimsCrystal.cs index ed9d8d6515..5df9bd829e 100644 --- a/Items/Weapons/Magic/YharimsCrystal.cs +++ b/Items/Weapons/Magic/YharimsCrystal.cs @@ -23,7 +23,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 16; Item.useTime = 10; Item.useAnimation = 10; - Item.reuseDelay = 5; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = SoundID.Item13; Item.noMelee = true; diff --git a/Items/Weapons/Melee/ElementalExcalibur.cs b/Items/Weapons/Melee/IridescentExcalibur.cs similarity index 94% rename from Items/Weapons/Melee/ElementalExcalibur.cs rename to Items/Weapons/Melee/IridescentExcalibur.cs index 5930d2cfca..ed6fd22ea4 100644 --- a/Items/Weapons/Melee/ElementalExcalibur.cs +++ b/Items/Weapons/Melee/IridescentExcalibur.cs @@ -11,7 +11,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { - public class ElementalExcalibur : ModItem, ILocalizedModType + [LegacyName("ElementalExcalibur")] + public class IridescentExcalibur : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; private static int BaseDamage = 2000; @@ -20,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; } public override void SetDefaults() @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 112; Item.height = 112; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; Item.rare = ModContent.RarityType(); } @@ -67,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Melee } else { - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; } @@ -164,7 +165,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(). AddIngredient(ItemID.TrueExcalibur). AddIngredient(5). AddIngredient(5). diff --git a/Items/Weapons/Melee/ElementalExcalibur.png b/Items/Weapons/Melee/IridescentExcalibur.png similarity index 100% rename from Items/Weapons/Melee/ElementalExcalibur.png rename to Items/Weapons/Melee/IridescentExcalibur.png diff --git a/Items/Weapons/Melee/GreatswordofBlah.cs b/Items/Weapons/Melee/Orderbringer.cs similarity index 88% rename from Items/Weapons/Melee/GreatswordofBlah.cs rename to Items/Weapons/Melee/Orderbringer.cs index b565046310..bb02bdb6a9 100644 --- a/Items/Weapons/Melee/GreatswordofBlah.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -7,9 +7,11 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { - public class GreatswordofBlah : ModItem, ILocalizedModType + [LegacyName("GreatswordofBlah")] + public class Orderbringer : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; + public override void SetDefaults() { Item.width = Item.height = 108; @@ -24,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.rare = ModContent.RarityType(); - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; } diff --git a/Items/Weapons/Melee/GreatswordofBlah.png b/Items/Weapons/Melee/Orderbringer.png similarity index 100% rename from Items/Weapons/Melee/GreatswordofBlah.png rename to Items/Weapons/Melee/Orderbringer.png diff --git a/Items/Weapons/Melee/RedSun.cs b/Items/Weapons/Melee/RedSun.cs index 1112b9249c..37d2bb4282 100644 --- a/Items/Weapons/Melee/RedSun.cs +++ b/Items/Weapons/Melee/RedSun.cs @@ -22,8 +22,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.damage = 500; Item.DamageType = DamageClass.Melee; Item.useTime = 5; - Item.reuseDelay = 20; Item.useAnimation = 30; + Item.reuseDelay = 20; + Item.useLimitPerAnimation = 6; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 4; diff --git a/Items/Weapons/Ranged/AcesHigh.cs b/Items/Weapons/Ranged/AcesHigh.cs index d0ccadf8f4..c9e4c955ab 100644 --- a/Items/Weapons/Ranged/AcesHigh.cs +++ b/Items/Weapons/Ranged/AcesHigh.cs @@ -21,8 +21,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 48; Item.height = 30; Item.useTime = 3; - Item.reuseDelay = 8; Item.useAnimation = 12; + Item.reuseDelay = 8; + Item.useLimitPerAnimation = 4; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; diff --git a/Items/Weapons/Ranged/Animosity.cs b/Items/Weapons/Ranged/Animosity.cs index b94390e7a6..4df13fc791 100644 --- a/Items/Weapons/Ranged/Animosity.cs +++ b/Items/Weapons/Ranged/Animosity.cs @@ -21,8 +21,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 70; Item.height = 18; Item.useTime = 4; - Item.reuseDelay = 15; Item.useAnimation = 12; + Item.reuseDelay = 15; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; diff --git a/Items/Weapons/Ranged/Arbalest.cs b/Items/Weapons/Ranged/Arbalest.cs index f74e53f80e..9b4541c76e 100644 --- a/Items/Weapons/Ranged/Arbalest.cs +++ b/Items/Weapons/Ranged/Arbalest.cs @@ -20,8 +20,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 82; Item.height = 34; Item.useTime = 7; - Item.reuseDelay = 30; Item.useAnimation = 28; + Item.reuseDelay = 30; + Item.useLimitPerAnimation = 4; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index a73cbab7ff..c7284e7030 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -20,8 +20,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 44; Item.height = 100; Item.useTime = 3; - Item.reuseDelay = 10; Item.useAnimation = 15; + Item.reuseDelay = 10; + Item.useLimitPerAnimation = 5; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4.25f; diff --git a/Items/Weapons/Ranged/AstralRepeater.cs b/Items/Weapons/Ranged/AstralRepeater.cs index 9efae4856f..5047220b67 100644 --- a/Items/Weapons/Ranged/AstralRepeater.cs +++ b/Items/Weapons/Ranged/AstralRepeater.cs @@ -15,8 +15,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 38; Item.height = 78; Item.useTime = 5; - Item.reuseDelay = 15; Item.useAnimation = 15; + Item.reuseDelay = 15; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; diff --git a/Items/Weapons/Ranged/Barinautical.cs b/Items/Weapons/Ranged/Barinautical.cs index c87e6dba4b..b9fc2ea6c5 100644 --- a/Items/Weapons/Ranged/Barinautical.cs +++ b/Items/Weapons/Ranged/Barinautical.cs @@ -17,8 +17,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 30; Item.height = 42; Item.useTime = 4; - Item.reuseDelay = 20; Item.useAnimation = 12; + Item.reuseDelay = 20; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; diff --git a/Items/Weapons/Ranged/ChickenCannon.cs b/Items/Weapons/Ranged/ChickenCannon.cs index 0ef314c3d4..d87044c85b 100644 --- a/Items/Weapons/Ranged/ChickenCannon.cs +++ b/Items/Weapons/Ranged/ChickenCannon.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 416; + Item.damage = 290; Item.DamageType = DamageClass.Ranged; Item.width = 126; Item.height = 42; diff --git a/Items/Weapons/Ranged/ClaretCannon.cs b/Items/Weapons/Ranged/ClaretCannon.cs index b8baee0c12..e1f8ea16e4 100644 --- a/Items/Weapons/Ranged/ClaretCannon.cs +++ b/Items/Weapons/Ranged/ClaretCannon.cs @@ -19,8 +19,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 48; Item.height = 30; Item.useTime = 3; - Item.reuseDelay = 10; Item.useAnimation = 9; + Item.reuseDelay = 10; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; diff --git a/Items/Weapons/Ranged/ClockGatlignum.cs b/Items/Weapons/Ranged/ClockGatlignum.cs index 7d2bc43c06..065f0b734f 100644 --- a/Items/Weapons/Ranged/ClockGatlignum.cs +++ b/Items/Weapons/Ranged/ClockGatlignum.cs @@ -17,8 +17,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 66; Item.height = 34; Item.useTime = 3; - Item.reuseDelay = 12; Item.useAnimation = 9; + Item.reuseDelay = 12; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.75f; diff --git a/Items/Weapons/Ranged/CrackshotColt.cs b/Items/Weapons/Ranged/CrackshotColt.cs index ec879cf294..b5e0010331 100644 --- a/Items/Weapons/Ranged/CrackshotColt.cs +++ b/Items/Weapons/Ranged/CrackshotColt.cs @@ -143,7 +143,7 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddRecipeGroup("AnyGoldBar", 8). - AddIngredient(ModContent.ItemType()). + AddIngredient(ModContent.ItemType()). AddIngredient(ModContent.ItemType()). AddIngredient(ItemID.CopperCoin, 4). AddTile(TileID.Anvils). diff --git a/Items/Weapons/Ranged/DeepcoreGK2.cs b/Items/Weapons/Ranged/DeepcoreGK2.cs index ab7b26c421..5057d9dc03 100644 --- a/Items/Weapons/Ranged/DeepcoreGK2.cs +++ b/Items/Weapons/Ranged/DeepcoreGK2.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.width = 142; Item.height = 64; - Item.useTime = Item.useAnimation = 16; + Item.useTime = Item.useAnimation = 14; Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 7f; Item.value = CalamityGlobalItem.Rarity5BuyPrice; diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index 462232a1ab..d412ddaefb 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 198; + Item.damage = 130; Item.DamageType = DamageClass.Ranged; Item.width = 124; Item.height = 78; @@ -34,6 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTime = 9; Item.useAnimation = 18; Item.reuseDelay = BetweenShotsPause; + Item.useLimitPerAnimation = 2; Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Shoot; @@ -62,8 +63,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? FullAutoFireRateMult : 1f; - public override bool AllowPrefix(int pre) => pre != PrefixID.Murderous; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { SoundEngine.PlaySound(SoundID.Item38, position); diff --git a/Items/Weapons/Ranged/Drataliornus.cs b/Items/Weapons/Ranged/Drataliornus.cs index e17dbd6883..f455891ab1 100644 --- a/Items/Weapons/Ranged/Drataliornus.cs +++ b/Items/Weapons/Ranged/Drataliornus.cs @@ -26,9 +26,10 @@ namespace CalamityMod.Items.Weapons.Ranged Item.knockBack = 1f; Item.shootSpeed = 18f; Item.useStyle = ItemUseStyleID.Shoot; - Item.useAnimation = 24; Item.useTime = 12; + Item.useAnimation = 24; Item.reuseDelay = 48; + Item.useLimitPerAnimation = 2; Item.width = 64; Item.height = 84; Item.UseSound = SoundID.Item5; diff --git a/Items/Weapons/Ranged/FrostbiteBlaster.cs b/Items/Weapons/Ranged/FrostbiteBlaster.cs index 21a2016e7f..1d52ab8e5e 100644 --- a/Items/Weapons/Ranged/FrostbiteBlaster.cs +++ b/Items/Weapons/Ranged/FrostbiteBlaster.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTime = 7; Item.useAnimation = 21; Item.reuseDelay = 54; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.useTurn = false; Item.noMelee = true; diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs index 8c1f28d60b..5449ef6159 100644 --- a/Items/Weapons/Ranged/Infinity.cs +++ b/Items/Weapons/Ranged/Infinity.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged internal bool limit = true; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; } public override void SetDefaults() @@ -27,8 +27,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 56; Item.height = 24; Item.useTime = 2; - Item.reuseDelay = 6; Item.useAnimation = 18; + Item.reuseDelay = 6; + Item.useLimitPerAnimation = 9; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1f; diff --git a/Items/Weapons/Ranged/MagnaStriker.cs b/Items/Weapons/Ranged/MagnaStriker.cs index d94d905a81..816a45b9ba 100644 --- a/Items/Weapons/Ranged/MagnaStriker.cs +++ b/Items/Weapons/Ranged/MagnaStriker.cs @@ -18,8 +18,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 72; Item.height = 38; Item.useTime = 5; - Item.reuseDelay = 6; Item.useAnimation = 20; + Item.reuseDelay = 6; + Item.useLimitPerAnimation = 4; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.25f; diff --git a/Items/Weapons/Ranged/Norfleet.cs b/Items/Weapons/Ranged/Norfleet.cs index cbbf268191..6023f05a72 100644 --- a/Items/Weapons/Ranged/Norfleet.cs +++ b/Items/Weapons/Ranged/Norfleet.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.useAnimation = 75; Item.useTime = 75; - Item.reuseDelay = 0; Item.width = 140; Item.height = 42; Item.UseSound = SoundID.Item92; diff --git a/Items/Weapons/Ranged/OpalStriker.cs b/Items/Weapons/Ranged/OpalStriker.cs index be75b94d09..404c3240c1 100644 --- a/Items/Weapons/Ranged/OpalStriker.cs +++ b/Items/Weapons/Ranged/OpalStriker.cs @@ -20,8 +20,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 46; Item.height = 30; Item.useTime = 5; - Item.reuseDelay = 25; Item.useAnimation = 20; + Item.reuseDelay = 25; + Item.useLimitPerAnimation = 4; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 0f; diff --git a/Items/Weapons/Ranged/Phangasm.cs b/Items/Weapons/Ranged/Phangasm.cs index f8a09f23db..0f2a7cd606 100644 --- a/Items/Weapons/Ranged/Phangasm.cs +++ b/Items/Weapons/Ranged/Phangasm.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Ranged CreateRecipe(). AddIngredient(ItemID.Phantasm). AddIngredient(8). - AddIngredient(20). + AddIngredient(20). AddIngredient(20). AddTile(). Register(); diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 36f683487c..8067539b54 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -18,12 +18,12 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; } public override void SetDefaults() { - Item.damage = 230; + Item.damage = 130; Item.DamageType = DamageClass.Ranged; Item.width = 84; Item.height = 30; @@ -76,7 +76,6 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - // Left click: Exo Fire, with a chance of Exo Light Bombs. for (int i = 0; i < 2; i++) { diff --git a/Items/Weapons/Ranged/PlagueTaintedSMG.cs b/Items/Weapons/Ranged/PlagueTaintedSMG.cs index f6a13ab6f0..86bb183c37 100644 --- a/Items/Weapons/Ranged/PlagueTaintedSMG.cs +++ b/Items/Weapons/Ranged/PlagueTaintedSMG.cs @@ -28,8 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 98; Item.height = 50; - Item.useTime = 10; - Item.useAnimation = 10; + Item.useTime = Item.useAnimation = 10; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; @@ -51,21 +50,12 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool CanUseItem(Player player) { - if (player.altFunctionUse == 2) - { - Item.useTime = 60; - Item.useAnimation = 60; - Item.UseSound = SoundID.Item61; - } - else - { - Item.useTime = 10; - Item.useAnimation = 10; - Item.UseSound = SoundID.Item11; - } + Item.UseSound = player.altFunctionUse == 2 ? SoundID.Item61 : SoundID.Item11; return base.CanUseItem(player); } + public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? (1f / 6f) : 1f; + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 barrelPosition = position + Vector2.Normalize(velocity) * 70f; diff --git a/Items/Weapons/Ranged/ScorchedEarth.cs b/Items/Weapons/Ranged/ScorchedEarth.cs index cf5602672f..a7fad3a57b 100644 --- a/Items/Weapons/Ranged/ScorchedEarth.cs +++ b/Items/Weapons/Ranged/ScorchedEarth.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTime = 8; Item.useAnimation = 32; // 4 shots in just over half a second Item.reuseDelay = 60; // 1 second recharge + Item.useLimitPerAnimation = 4; Item.width = 104; Item.height = 44; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Ranged/Seadragon.cs b/Items/Weapons/Ranged/Seadragon.cs index d607ff61a1..5e382de81d 100644 --- a/Items/Weapons/Ranged/Seadragon.cs +++ b/Items/Weapons/Ranged/Seadragon.cs @@ -102,7 +102,7 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddIngredient(). - AddIngredient(9). + AddIngredient(9). AddIngredient(3). AddIngredient(10). AddTile(TileID.LunarCraftingStation). diff --git a/Items/Weapons/Ranged/SeasSearing.cs b/Items/Weapons/Ranged/SeasSearing.cs index 72ef5eabdb..e78e08752e 100644 --- a/Items/Weapons/Ranged/SeasSearing.cs +++ b/Items/Weapons/Ranged/SeasSearing.cs @@ -26,6 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTime = 5; Item.useAnimation = 15; Item.reuseDelay = 20; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; diff --git a/Items/Weapons/Ranged/Shredder.cs b/Items/Weapons/Ranged/Shredder.cs index 9012777045..5ce8c27cb6 100644 --- a/Items/Weapons/Ranged/Shredder.cs +++ b/Items/Weapons/Ranged/Shredder.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; } public override void SetDefaults() @@ -23,8 +23,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 56; Item.height = 24; Item.useTime = 4; - Item.reuseDelay = 12; Item.useAnimation = 32; + Item.reuseDelay = 12; + Item.useLimitPerAnimation = 8; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; diff --git a/Items/Weapons/Ranged/SpeedBlaster.cs b/Items/Weapons/Ranged/SpeedBlaster.cs index e05d53be50..7f8a6836bc 100644 --- a/Items/Weapons/Ranged/SpeedBlaster.cs +++ b/Items/Weapons/Ranged/SpeedBlaster.cs @@ -17,9 +17,10 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 54; Item.height = 26; + Item.useTime = 4; Item.useAnimation = 24; Item.reuseDelay = 9; - Item.useTime = 4; + Item.useLimitPerAnimation = 6; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.25f; diff --git a/Items/Weapons/Ranged/StarSputter.cs b/Items/Weapons/Ranged/StarSputter.cs index 60df8f7378..40951ef250 100644 --- a/Items/Weapons/Ranged/StarSputter.cs +++ b/Items/Weapons/Ranged/StarSputter.cs @@ -19,8 +19,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 80; Item.height = 26; Item.useTime = 8; - Item.reuseDelay = 15; Item.useAnimation = 24; + Item.reuseDelay = 15; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 15f; diff --git a/Items/Weapons/Ranged/Starfleet.cs b/Items/Weapons/Ranged/Starfleet.cs index 31c4540158..16d43056eb 100644 --- a/Items/Weapons/Ranged/Starfleet.cs +++ b/Items/Weapons/Ranged/Starfleet.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = velocity.X + Main.rand.Next(-40, 41) * 0.05f; float SpeedY = velocity.Y + Main.rand.Next(-40, 41) * 0.05f; - Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI); } return false; } diff --git a/Items/Weapons/Ranged/Starmada.cs b/Items/Weapons/Ranged/Starmada.cs index 50bcf826fe..0acc74bb9f 100644 --- a/Items/Weapons/Ranged/Starmada.cs +++ b/Items/Weapons/Ranged/Starmada.cs @@ -21,9 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.knockBack = 15f; Item.shootSpeed = 16f; Item.useStyle = ItemUseStyleID.Shoot; - Item.useAnimation = 27; - Item.useTime = 27; - Item.reuseDelay = 0; + Item.useTime = Item.useAnimation = 27; Item.width = 122; Item.height = 50; Item.UseSound = SoundID.Item92; diff --git a/Items/Weapons/Ranged/Starmageddon.cs b/Items/Weapons/Ranged/Starmageddon.cs new file mode 100644 index 0000000000..07cf6bbe9a --- /dev/null +++ b/Items/Weapons/Ranged/Starmageddon.cs @@ -0,0 +1,69 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Ranged +{ + public class Starmageddon : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public override void SetDefaults() + { + Item.damage = 90; + Item.knockBack = 4f; + Item.shootSpeed = 16f; + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = Item.useAnimation = 30; + Item.width = 166; + Item.height = 62; + Item.UseSound = null; + Item.shoot = ModContent.ProjectileType(); + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; + Item.noMelee = true; + Item.noUseGraphic = true; + Item.DamageType = DamageClass.Ranged; + Item.channel = true; + Item.useTurn = false; + Item.autoReuse = true; + Item.rare = ModContent.RarityType(); + Item.Calamity().donorItem = true; + } + + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + + 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/StarmageddonGlow").Value); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), 0, 0f, player.whoAmI); + return false; + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddIngredient(10). + AddIngredient(10). + AddIngredient(15). + AddTile(ModContent.TileType()). + Register(); + } + } +} diff --git a/Items/Weapons/Ranged/StormDragoon.cs b/Items/Weapons/Ranged/StormDragoon.cs index 9d6b86a8b3..82f8822c18 100644 --- a/Items/Weapons/Ranged/StormDragoon.cs +++ b/Items/Weapons/Ranged/StormDragoon.cs @@ -17,8 +17,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 74; Item.height = 34; Item.useTime = 2; - Item.reuseDelay = 10; Item.useAnimation = 20; + Item.reuseDelay = 10; + Item.useLimitPerAnimation = 10; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; diff --git a/Items/Weapons/Ranged/SurgeDriver.cs b/Items/Weapons/Ranged/SurgeDriver.cs index 14e86bb33b..d111a9a39f 100644 --- a/Items/Weapons/Ranged/SurgeDriver.cs +++ b/Items/Weapons/Ranged/SurgeDriver.cs @@ -13,13 +13,12 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; } public override void SetDefaults() { - Item.damage = 156; + Item.damage = 140; Item.DamageType = DamageClass.Ranged; Item.width = 164; Item.height = 58; @@ -45,17 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged if (Main.myPlayer == player.whoAmI) player.Calamity().rightClickListener = true; - - if (player.Calamity().mouseRight && player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) - { - Item.noUseGraphic = false; - Item.reuseDelay = 0; - } - else - { - Item.noUseGraphic = true; - Item.reuseDelay = 28; - } + Item.noUseGraphic = !player.Calamity().mouseRight && player.ownedProjectileCounts[ModContent.ProjectileType()] > 0; } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; @@ -79,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Vector2 newShootVelocity = shootVelocity * Main.rand.NextFloat(1f, 1.45f); newShootVelocity = newShootVelocity.RotatedByRandom(0.15f); - Projectile.NewProjectile(source, gunTip, newShootVelocity, Item.shoot, (int)(damage * 1.08), knockback, player.whoAmI); + Projectile.NewProjectile(source, gunTip, newShootVelocity, Item.shoot, damage, knockback, player.whoAmI); } } diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index a8dfc5bff0..72e2affe92 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -18,10 +18,11 @@ namespace CalamityMod.Items.Weapons.Ranged Item.damage = 150; Item.DamageType = DamageClass.Ranged; Item.width = 60; - Item.height = 26; + Item.height = 26; + Item.useTime = 2; Item.useAnimation = 24; Item.reuseDelay = 10; - Item.useTime = 2; + Item.useLimitPerAnimation = 12; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; diff --git a/Items/Weapons/Ranged/TelluricGlare.cs b/Items/Weapons/Ranged/TelluricGlare.cs index b2d7b7a690..3ae39fc31a 100644 --- a/Items/Weapons/Ranged/TelluricGlare.cs +++ b/Items/Weapons/Ranged/TelluricGlare.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTime = 5; Item.useAnimation = 20; Item.reuseDelay = 23; + Item.useLimitPerAnimation = 4; Item.knockBack = 7.5f; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Ranged/TheJailor.cs b/Items/Weapons/Ranged/TheJailor.cs index cf7e185c9e..341c75b789 100644 --- a/Items/Weapons/Ranged/TheJailor.cs +++ b/Items/Weapons/Ranged/TheJailor.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 360; + Item.damage = 300; Item.DamageType = DamageClass.Ranged; Item.width = 102; Item.height = 70; diff --git a/Items/Weapons/Ranged/TheSevensStriker.cs b/Items/Weapons/Ranged/TheSevensStriker.cs index 36d62168c3..c26ff7af8f 100644 --- a/Items/Weapons/Ranged/TheSevensStriker.cs +++ b/Items/Weapons/Ranged/TheSevensStriker.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; } public override void SetDefaults() @@ -52,7 +52,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.useAmmo = AmmoID.Coin; Item.shootSpeed = 24f; - Item.reuseDelay = 0; Item.shoot = ProjectileID.PlatinumCoin; Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.rare = ModContent.RarityType(); diff --git a/Items/Weapons/Rogue/CosmicKunai.cs b/Items/Weapons/Rogue/CosmicKunai.cs index 0920366471..cf554062ce 100644 --- a/Items/Weapons/Rogue/CosmicKunai.cs +++ b/Items/Weapons/Rogue/CosmicKunai.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useTime = 2; Item.useAnimation = 10; Item.reuseDelay = 1; + Item.useLimitPerAnimation = 5; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 5f; Item.UseSound = SoundID.Item109; diff --git a/Items/Weapons/Rogue/ExecutionersBlade.cs b/Items/Weapons/Rogue/ExecutionersBlade.cs index 31f157a19a..3ace052a76 100644 --- a/Items/Weapons/Rogue/ExecutionersBlade.cs +++ b/Items/Weapons/Rogue/ExecutionersBlade.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useTime = 3; Item.useAnimation = 9; Item.reuseDelay = 1; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 6.75f; Item.UseSound = SoundID.Item73; diff --git a/Items/Weapons/Rogue/GhoulishGouger.cs b/Items/Weapons/Rogue/GhoulishGouger.cs index 031e6de707..3aa60549dd 100644 --- a/Items/Weapons/Rogue/GhoulishGouger.cs +++ b/Items/Weapons/Rogue/GhoulishGouger.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useTime = 6; Item.useAnimation = 24; Item.reuseDelay = 11; + Item.useLimitPerAnimation = 4; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 7.5f; Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index 4deb4b92ce..31200643a1 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -27,9 +27,10 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.damage = 200; - Item.useAnimation = 21; Item.useTime = 3; + Item.useAnimation = 21; Item.reuseDelay = 1; + Item.useLimitPerAnimation = 7; Item.knockBack = 3f; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; diff --git a/Items/Weapons/Rogue/PhantasmalRuin.cs b/Items/Weapons/Rogue/PhantasmalRuin.cs index 42033568a3..14c4a67902 100644 --- a/Items/Weapons/Rogue/PhantasmalRuin.cs +++ b/Items/Weapons/Rogue/PhantasmalRuin.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Rogue AddIngredient(). AddIngredient(500). AddIngredient(4). - AddIngredient(20). + AddIngredient(20). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Rogue/SearedPan.cs b/Items/Weapons/Rogue/SearedPan.cs index 1bf58509b0..4e2d6e41d0 100644 --- a/Items/Weapons/Rogue/SearedPan.cs +++ b/Items/Weapons/Rogue/SearedPan.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useStyle = ItemUseStyleID.Swing; Item.useTime = Item.useAnimation = 25; Item.reuseDelay = 1; + Item.useLimitPerAnimation = 1; Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity15BuyPrice; diff --git a/Items/Weapons/Rogue/TimeBolt.cs b/Items/Weapons/Rogue/TimeBolt.cs index bba3f2ba4f..3f5ac89429 100644 --- a/Items/Weapons/Rogue/TimeBolt.cs +++ b/Items/Weapons/Rogue/TimeBolt.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Rogue AddIngredient(). AddIngredient(ItemID.FastClock). AddIngredient(5). - AddIngredient(20). + AddIngredient(20). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index 874cbf2a5c..1ace51a26d 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -22,8 +22,9 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noUseGraphic = true; Item.useStyle = ItemUseStyleID.Swing; Item.useTime = 15; - Item.reuseDelay = 15; Item.useAnimation = 45; + Item.reuseDelay = 15; + Item.useLimitPerAnimation = 3; Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity10BuyPrice; diff --git a/Items/Weapons/Rogue/WulfrumKnife.cs b/Items/Weapons/Rogue/WulfrumKnife.cs index f426781a8d..1d6e7cf3a5 100644 --- a/Items/Weapons/Rogue/WulfrumKnife.cs +++ b/Items/Weapons/Rogue/WulfrumKnife.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { - Item.ResearchUnlockCount = 99; + Item.ResearchUnlockCount = 99; } public int shootCount = 0; @@ -34,9 +34,10 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noUseGraphic = true; Item.useStyle = ItemUseStyleID.Swing; //Clockwork burst - Item.useAnimation = 10; Item.useTime = 4; + Item.useAnimation = 10; Item.reuseDelay = 24; + Item.useLimitPerAnimation = 3; Item.knockBack = 1f; Item.UseSound = Throw3Sound; diff --git a/Items/Weapons/Summon/AncientIceChunk.cs b/Items/Weapons/Summon/AncientIceChunk.cs index 746906a0d5..f89c10f34a 100644 --- a/Items/Weapons/Summon/AncientIceChunk.cs +++ b/Items/Weapons/Summon/AncientIceChunk.cs @@ -24,6 +24,12 @@ namespace CalamityMod.Items.Weapons.Summon public new string LocalizationCategory => "Items.Weapons.Summon"; + public override void SetStaticDefaults() + { + Main.RegisterItemAnimation(Type, new DrawAnimationVertical(6, 6)); + ItemID.Sets.AnimatesAsSoul[Type] = true; + } + public override void SetDefaults() { Item.damage = 25; diff --git a/Items/Weapons/Summon/AncientIceChunk.png b/Items/Weapons/Summon/AncientIceChunk.png index 2538db82fc..a3c719f6b7 100644 Binary files a/Items/Weapons/Summon/AncientIceChunk.png and b/Items/Weapons/Summon/AncientIceChunk.png differ diff --git a/Items/Weapons/Summon/FlamsteedRing.cs b/Items/Weapons/Summon/FlamsteedRing.cs index 3d2df47ba3..e3b102d464 100644 --- a/Items/Weapons/Summon/FlamsteedRing.cs +++ b/Items/Weapons/Summon/FlamsteedRing.cs @@ -95,11 +95,11 @@ namespace CalamityMod.Items.Weapons.Summon if (!sufficientSpace) { Rectangle displayZone = player.Hitbox; - CombatText.NewText(displayZone, new Color(203, 157, 255), "Insufficient space!", true); + CombatText.NewText(displayZone, new Color(203, 157, 255), CalamityUtils.GetTextValueFromModItem("NoSpaceTextBottom"), true); displayZone.Y -= 30; - CombatText.NewText(displayZone, new Color(59, 194, 255), "Cannot Deploy", true); + CombatText.NewText(displayZone, new Color(59, 194, 255), CalamityUtils.GetTextValueFromModItem("NoSpaceTextTop"), true); return false; } diff --git a/Items/Weapons/Summon/MirrorofKalandra.cs b/Items/Weapons/Summon/MirrorofKalandra.cs new file mode 100644 index 0000000000..099f3e0211 --- /dev/null +++ b/Items/Weapons/Summon/MirrorofKalandra.cs @@ -0,0 +1,100 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class MirrorofKalandra : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Weapons.Summon"; + + public static float TargetDistanceDetection = 2500f; + public static float IdleDistanceFromPlayer = 250f; + public static float OscillationSpeed = .025f; + public static float OscillationRange = 8; // The bigger the number, the smaller the range is. + + public static float Axe_MinRamSpeed = 30f; + public static float Axe_MaxRamSpeed = 50f; + public static int Axe_IFrames = 15; + public static float Axe_SpinSpeed = 25f; // In degrees per frame. + + public static float Purple_MinRamSpeed = 40f; + public static float Purple_MaxRamSpeed = 60f; + public static int Purple_IFrames = 15; + public static float Purple_BlastDMGModifier = 3f; + public static float Purple_BlastFireRate = 180f; // In frames. + public static int Purple_BlastSize = 300; + public static int Purple_BlastChargeTime = 10; + public static float Purple_SpinSpeed = 25f; // In degrees per frame. + + public static int Scimitar_IFrames = 15; + + public static int Wind_BowChargeTime = 5; // Therefore, the higher the time, the slower the fire rate will be, and viceversa. + public static float Wind_ArrowSpeed = 50f; + + public static int Vile_BowChargeTime = 8; + public static float Vile_ArrowSpeed = 50f; + public static float Vile_SplitDMGMultiplier = .33f; + public static int Vile_SplitIFrames = 30; + public static int Vile_SplitSpreadAngle = 8; // In degrees. + + public override void SetDefaults() + { + Item.damage = 380; + Item.useTime = Item.useAnimation = 30; + Item.knockBack = 4f; + Item.mana = 10; + Item.shoot = ModContent.ProjectileType(); + + Item.width = 58; + Item.height = 50; + Item.autoReuse = true; + Item.noMelee = true; + Item.Calamity().donorItem = true; + Item.DamageType = DamageClass.Summon; + Item.useStyle = ItemUseStyleID.Shoot; + Item.UseSound = SoundID.Item4; + Item.rare = ModContent.RarityType(); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; + } + + public override Vector2? HoldoutOffset() => new Vector2(-15, 0); + + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] != 1; + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + if (player.ownedProjectileCounts[ModContent.ProjectileType()] == 1) + { + type = ModContent.ProjectileType(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] != 1) + type = ModContent.ProjectileType(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] != 1) + type = ModContent.ProjectileType(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] != 1) + type = ModContent.ProjectileType(); + } + + int minion = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI); + if (Main.projectile.IndexInRange(minion)) + Main.projectile[minion].rotation = -MathHelper.PiOver2; + + return false; + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.MagicMirror). + AddIngredient(10). + AddIngredient(10). + AddCondition(Condition.NearShimmer). + Register(); + } + } +} diff --git a/Items/Weapons/Summon/MirrorofKalandra.png b/Items/Weapons/Summon/MirrorofKalandra.png new file mode 100644 index 0000000000..292b4534c8 Binary files /dev/null and b/Items/Weapons/Summon/MirrorofKalandra.png differ diff --git a/Items/Weapons/Summon/StellarTorusStaff.cs b/Items/Weapons/Summon/StellarTorusStaff.cs new file mode 100644 index 0000000000..0ed006cb56 --- /dev/null +++ b/Items/Weapons/Summon/StellarTorusStaff.cs @@ -0,0 +1,64 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class StellarTorusStaff : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Weapons.Summon"; + + public static float EnemyDetectionDistance = 1200f; + public static int IFrames = 10; + + // In frames. + public static float TimeBeforeCharging = 45f; + public static float TimeCharging = 60f; + public static float TimeShooting = 120f; + + public override void SetDefaults() + { + Item.damage = 185; + Item.useTime = Item.useAnimation = 30; + Item.knockBack = 4f; + Item.mana = 10; + Item.shoot = ModContent.ProjectileType(); + + Item.width = 42; + Item.height = 42; + Item.noMelee = true; + Item.autoReuse = true; + Item.Calamity().donorItem = true; + Item.DamageType = DamageClass.Summon; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item15; + Item.rare = ModContent.RarityType(); + Item.value = CalamityGlobalItem.Rarity12BuyPrice; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int minion = Projectile.NewProjectile(source, Main.MouseWorld, Main.rand.NextVector2Circular(2f, 2f), ModContent.ProjectileType(), damage, knockback, player.whoAmI); + + if (Main.projectile.IndexInRange(minion)) + Main.projectile[minion].originalDamage = Item.OriginalDamage; + + return false; + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.XenoStaff). + AddIngredient(3). + AddIngredient(ItemID.FragmentStardust, 6). + AddTile(TileID.LunarCraftingStation). + Register(); + } + } +} diff --git a/Items/Weapons/Summon/StellarTorusStaff.png b/Items/Weapons/Summon/StellarTorusStaff.png new file mode 100644 index 0000000000..0898fc0cca Binary files /dev/null and b/Items/Weapons/Summon/StellarTorusStaff.png differ diff --git a/Items/Weapons/Summon/SunSpiritStaff.cs b/Items/Weapons/Summon/SunSpiritStaff.cs index 5b17bdcd77..ed948dcaee 100644 --- a/Items/Weapons/Summon/SunSpiritStaff.cs +++ b/Items/Weapons/Summon/SunSpiritStaff.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Summon { CreateRecipe(). AddIngredient(ItemID.SandstoneBrick, 20). - AddIngredient(2). + AddIngredient(2). AddTile(TileID.Anvils). Register(); } diff --git a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson new file mode 100644 index 0000000000..a92b95cd70 --- /dev/null +++ b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson @@ -0,0 +1,208 @@ +//Abyss Enemies +Bloatfish: Heavy, large fish which can easily resist the crushing pressure of the depths and any weapon which might attempt to pierce its tough skin. +BobbitWorm: An immense threat for those who dare venture into the depths. Nearly imperceptible when they choose to be, and lightning-fast when they attack, their jaws can cut through iron plates over half a foot thick. +BoxJellyfish: These seemingly inept masses of gelatin are anything but harmless. Let even one of their trailing tentacles brush you, and you will be heavily envenomed. +ChaoticPuffer: Anarchistic little devils, they swallow large amounts of water to inflate their bristling bodies. The water within them boils and bursts out in a scalding rush when they are killed. +ColossalSquid: With crushing tentacles that stretch out to over twice the length of a grown man, and toxic black ink, these are formidable predators indeed. +Cuttlefish: Should you feel something brush your legs in the depths of the abyss, it is likely that this is the culprit, tasting the waters for potential prey. +DevilFish: A sturdy fish, which has spent a long time seething in the Abyss. Males are easily identified by their forward-facing horns. +DevilFishAlt: A sturdy fish, which has spent a long time seething in the Abyss. Females are easily identified by their curled horns. +EidolonWyrm: Among any creature ever witnessed, it is these that stray furthest from our understanding. Such grand might, such mystery... +GiantSquid: A massive squid, having gained its size from the abundance of prey and little competition in its habitat. Its eyes are specially adapted to seeking out prey in the darkness. +GulperEel: Massive in length and in breadth, this eel resides in the deeper caverns of the abyss. Its jaws have the curious ability to hyperextend and swallow nearly any prey it sets its eyes upon. +Laserfish: Its eyes are blinded by bacteria that gather in large sacs on its head. As it swims through the waters, relying on primitive echolocation, the bacteria are able to release concussive blasts to clear its path. +LuminousCorvina: This fish has a peculiar defense mechanism. When a threat such as yourself enters its field of view, it releases a shrill pulse alerting others to not its presence— but yours. +MirageJelly: In the encapsulating darkness of the abyss, a drifting purple light that seems to ignore all physical boundaries is likely one of these. Many even doubt their existence and blame it on the rapture of the deep. +MorayEel: Their eyes gleam with hunger, and they inhabit the rocks of underwater structures when at rest, only occasionally roaming the open waters. +Oarfish: A peculiar bony fish many have only ever seen as corpses washed up on a beach, but in their natural habitat, their red fins stream behind them, as they drift in the water column. +ReaperShark: Evolution is a strange mistress, especially in the depths of the abyss. To some, she grants a straightforward path to life, and to others, she grants arms. +ToxicMinnow: It spends much of its time finding the most repulsive and disagreeable vegetation for animals to feast upon. Their bellies glow green as they process the chemicals to use in self-defense. +Viperfish: A typically docile animal, it spends much of its time meandering about the rocky outcrops of the abyss. When approached it can become quite aggressive. + +//Acid Rain Enemies +AcidEel: Along its spine runs an undulating dorsal fin which they can put to great use for their streamlined form, as they rush at prey underwater. +BabyFlakCrab: Curiously, these seem to be intelligent enough to imprint a sort of parent figure if captured at a young enough age. They will stick with you forever! +Bloodworm: A ripe-looking worm large enough to curl around your arm. A fish would have to be either mad enough or wise enough, to go after one of these. +CragmawMire: Within its calcified shell which has formed against all logic in the sulphurous sea, a gelatinous body stirs. It is also host to a long grappling creature, which helps it grab prey in exchange for protection. +FlakCrab: A normal crab by all means, except for its shell. It has learned to gather the water around it to expel forcefully through its funnel after treatment. It is a dangerous concoction. +GammaSlime: As the toxins in the water of the sulphurous sea worsen, and the clouds which draw from it grow more hazardous, the slimes become ever more potent. +IrradiatedSlime: Encrusted with gunk that evaporates slowly from the sulphurous sea, these slimes actually form in the upper atmosphere's acidic rain, before falling back to the earth. +Mauler: Sharks are perhaps one of the most resilient and well-adapted species in our planet's history. It is no surprise that one of these apex predators has come to thrive in these seas. +NuclearTerror: Perhaps it was once just a simple crab or perhaps there are plenty of others like it, lurking in the depths. Any answer is sure to make you want to never set foot in the sulphurous sea again. +NuclearToad: When threatened underwater they rapidly inflate and bob to the surface. As a last resort, they forcefully burst themselves. Their selfless goal is the prolonged survival of their kin. +Orthocera: Within the muck of the sulphurous sea, it is not uncommon to find creatures from ages past, their bodies entirely preserved. It seems that not all simply passed away. +Radiator: Like many other sea slugs, it ingests toxins from its environments and displays them along its back in a flashy display. The toxins in the sulphurous sea however, are a bit more potent than others. +Skyfin: Their fins are highly adapted to both water and air, and should one of their reckless charges leave them briefly stranded on land, within a few moments, they will take to the air. +SulphurousSkater: From below, the tips of their legs barely penetrate the surface of the water, and it is hard to distinguish their movements from the rain on the water's surface. +Trilobite: Their shell is of notable hardness, and it carries the same weight as stone. It speaks of their strength, for them to be able to fling themselves about the way they do. + +//Astral Enemies +Aries: Biologically, the creature suffers terribly. Its legs do not allow it to rest, constantly hopping across the infected landscape. It does not care as its mind is far gone. It continues this until death. +Astralachnea: An arachnid taken over by the infection, it has lost its ability to spin webs and hosts a myriad of astral growths on its abdomen. +AstralProbe: A small animal devoured by the astral infection. The virus retains and shares its experience with itself of devouring other, similar creatures and so, all form identical shells. +AstralSlime: It does not show behavior different from any of its gelatinous folk, so this adaptive creature may have been the only one to fight the infection in its own way. +Atlas: In its uncontrolled growth, one appendage wrested nutrients and materials from the other and brought it to the extremes of muscular strength. One blow is enough to pulverize a monolith. +FusionFeeder: A sand shark that has been taken by the astral infection. Unfamiliar with the origins of the virus, its mind is flooded with information gathered throughout the cosmos, and it thirsts for the plasma of distant stars. +Hadarian: The membrane of their wings is particularly tough, for material so thin. It has been known to guard them against burns and projectiles as they mercilessly tear at their foes. +HiveEnemy: These seem to erupt from the caverns of the astral itself. The flesh of their hosts twists into a spiral and countless bodies make up the pulsing flesh of the hive. +Hiveling: A small creature, one entirely original to the astral infection, save for a tiny core of organic material it takes from the host Hive. They are easily squashed but swarm if endangered. +Mantis: A nimble mutation of the astral infection, its many legs allow it to quickly traverse nearly any terrain the infection devours. By swinging its front claws at high speeds, it releases harmful blades of energy. +Nova: The process of forced biological mutation is potent with the astral virus, and the byproducts are volatile. Most creatures discharge this chemical gradually and lose that liability— but a Nova stores it. +SightseerCollider: Within their shells, the virus brews a potent chemical. When the seer approaches a foe, it spits this chemical out of its mandibles, hoping to melt the intruder's flesh. +SightseerSpitter: Within their shells, the virus brews a potent chemical. When the seer approaches a foe, it spits this chemical out of its mandibles, hoping to melt the intruder's flesh. +StellarCulex: Many pincers line the face of this mutation. It will attempt to attach itself to other organic creatures, and lower its mouth to their flesh to feed. +Twinkler: A rare case of the astral infection creating a harmless creature. They flicker rather prettily, and you're not going to be the only one who thinks so. They make useful bait. + +//Brimstone Crags Enemies +CalamityEye: Though these enemies are only a little more threatening than a demon eye, some say that they originally burst from the sockets of those who used to inhabit the capital, when their souls were cursed by the red flames. +CharredSlime: Lava slimes are the only ones that manage to survive in the heat of hell, having replaced their moisture with liquid rock. That said, their mannerisms are the same, and they seek out and devour anything they can. +DespairStone: A condensed, volatile stone of brimstone slag. It is said that the souls of many, fighting to get out from within, are what cause it to tear across the ground. +HeatSpirit: A human spirit, its mind lost to the blazing orange fires of its dwelling. It seeks out and attempts to eliminate any source of moisture it can detect entering the hellscape. +RenegadeWarlock: A devotee, their mind lost to the raging, hating fires of the brimstone flames. None have ever seen under their hood, and none ever should. +Scryllar: Twisted detritus of those who once came to harvest the remains of the crags. The whispers got to them. +SoulSlurper: The remnants of a soul which has feasted, been feasted upon, and torn into the souls of others. No one knows how the cycle begins, but you don't want to find out yourself. + +//Draedon Lab Critters +Androomba: Slowly moving back and forth, these contraptions operate endlessly with the fruitless goal of cleaning the now long abandoned labs. +Nanodroid: Not every creation has to be large and flashy to be a success, sometimes it's good to take a step back and appreciate how much that smaller things such as these devices contribute. +RepairUnitCritter: Thanks to these little machines, the dusty labs still stand. It appears they're unable to deal with rust, though. + +//Normal Uncategorized Enemies +AeroSlime: Slimes take on the qualities of their environments and after feasting on aerialite ore, this slime has grown wings. +ArmoredDigger: These automated mechanical worms used to dig out the caverns so labs could be built. Thankfully, they are long past their once efficient state, and have not received maintenance in decades. +AuroraSpirit: The souls of those who passed on in the heart of a blizzard. They now seek out others to freeze to death, to die as they did. +BloomSlime: With the solar energy released from the profaned goddess' destruction, uelibloom has sprouted in the jungle's mud, and in the slimes which inhabit the biome. +Bohldohr: A distant relative to the gem-covered lizards found within the caverns. This species instead covers itself with the smooth bricks of the Temple and curls into a ball for locomotion. +Cnidrion: A confusing beast. They share qualities with many of the other desert creatures, yet seem to be able to store vast amounts of water in their bodies. +GemCrawler: A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs. +BlightSlime: Seemingly, these are slimes which have been given the blessing of a higher being, They seek out and devour but not for themselves, which is a rarity among slimes. +Cryon: Within the octahedron, one can find ancient runes engraved into ice that does not melt. Who could have created these? +CryoSlime: When the release of Cryogen's magic slightly thawed the frozen metal which rested underground, the resulting meltwater formed these. Remnants of the ore still reside within them. +Eidolist: Highly skilled in the art of spellcasting, these mysterious creatures seem to stand guard like sentinels in watch over something. Approach one close enough and you may be able to make out garbled whispers. +FearlessGoldfishWarrior: With its tin hat upon its head and a dagger that gleams as gold as it does, it marches out into the rain, ready for battle. +Frogfish: Ambush predators that lay in wait for their prey. They are not particularly strong, and if you come across one, are dispatched with ease. +Horse: It is civilization's goal to wrest nature under its control. This is the result of one such conquest, an artificial elemental, run by clockwork gears. +IceClasper: An enemy which knows no bounds in hunting its prey. In blizzards where visibility is low, they have been known to glaciate and capture travelers. What happens to the victims is unknown. +ImpiousImmolator: A burning spirit, with no regard or acknowledgment for its surroundings. Anyone who intrudes upon the Profaned Goddess' holy grounds will be turned to ash. +MantisShrimp: Should it land a blow with its rounded front claws, it will tear your flesh and shatter your bones. Needless to say, avoid this at all costs. +OverloadedSoldier: Phantoplasm bulges through the corroded armor in the place of rotting flesh, as this creature reanimated by vengeful spirits treks the caverns of the world. +PerennialSlime: Slimes, from their time spent wobbling about the undergrowth, are full of nutrients, which would well support plant life. Many accept these growths and have been seen to carry blossoms. +PhantomSpirit: Spirits which turned upon one another, cannibalizing others in their mindless frustrated frenzies. There is precedent in the past, for spirits which have devoured enough of others, to grow astoundingly in power. +Piggy: Pigs are greedy little beasts. If they come across anything they could barely fathom as food, they will scarf it down in a blink. +ProfanedEnergyBody: A living altar, close to the heart of the Profaned Goddess. From the crystal in its stand, flames lash out into the world, to burn the unfaithful. +Rimehound: A large and bulky hound, its fur is frosted to the point of forming near-icicles. Being tackled by one is a painful experience. +Rotdog: Malicious animals, which attack with tough claws and strong jaws. Any wound from these will bleed heavily. Address the cut quickly. +ScornEater: The brute force of the Profaned Goddess' creations and devotees. Their jaws are filled to the brim with razor-sharp crystals and scorching holy flames. +SeaUrchin: A spiny animal that flings itself about in defense of its territory. If they fling themselves onto land—though relatively helpless—they can make their way back to the ocean. +ShockstormShuttle: Proof of life in the stars, these were likely once weapons of war, now primitive to their original civilization. They continue to scour the cosmos for hospitable planets, which they attack. +Stormlion: What these appear to feed on are the electric storms that brew over deserts. When the skies darken, they reach upwards with their mandibles that act as lightning rods. +Sunskater: Some creatures which skirt the edges of our atmosphere tend to absorb and channel the sun's rays better than others. At any rate, this is a passive creature that means you no harm. You should return the favor. +ThiccWaifu: Once, outposts were created in the sky, for ease of worship towards the forces that occupied the clouds in order to please them. Now they lay abandoned and their deity angered. +WildBumblefuck: Though these creatures may look adorable, they are a vicious invasive species. If not dealt with quickly, they may drive the nearby fauna to extinction. +WulfrumAmplifier: A stationary foe, though its function is far from harmless. Within its influence, other wulfrum creations become notably empowered, the curious energy within them, overflowing. +WulfrumDrone: Rotating their small frames, they swoop at potential intruders into a predefined territory that no longer exists. They wander without purpose. +WulfrumGyrator: An orb of wulfrum metal. How it travels is a mystery, though it likely has something to do with its gyroscopic spinning. They fling their bodies at enemies to attack. +WulfrumHovercraft: Traveling with propulsion that carries them over the ground with ease, they seek out trespassers, though their analysis likely has grown imperceptive with age. +WulfrumRover: An aged automaton of unknown origins. With an incessant sense of duty and worn frame, they scour the land. Their lamps shine with curious energy. + +//Plague Enemies +Melter: Its face is warped and softened by the corrosive effects of the plague nanobots, and it seeks to share that uncomfortable fate with others under both its own will, and the plague's. +PestilentSlime: A slime infested by the nanobots of the plague. With no directive the plague can naturally apply to it, it simply continues its life, corroding anything which approaches. +PlaguebringerMiniboss: Queen Bees are reared upon royal honey, raising them into the matriarchs they are. If during the process, their growth is hijacked by the plague, they are left as only a pathetic reminder of what they could have been. +PlagueCharger: While hornets on their own are known for aggressive defense of their territory, once they have been warped by the plague, their sense of their dominion reaches ever further. +Plagueshell: In truth, once a jungle tortoise has been touched by the plague, its original shell disintegrates, and the thorny shield it now wields is constructed entirely of reinforced nanobots. +Viruling: Overtaken by the plague, derplings immediately lose their legs, as they are seen as only a hindrance. No longer will they gaily spring about. + +//Sulphur Sea Enemies +AnthozoanCrab: A crab that has placed upon its back, a sturdy structure of stone. It is quite strong and displays this extraordinary strength by hurling boulders at those who encroach on its territory. +AquaticUrchin: A relative of its brethren in the far ocean, this one's spines have been hardened by the sulphuric waters. They drip with the venom they inhabit, so it's better to not be struck by them. +BelchingCoral: A rare species of coral, one which is able to process and draw nutrients from the waters of the sulphurous sea. During this process, a large amount of volatile gas is formed. +Gnasher: A turtle that has had its shell encrusted by the filth of the sulphurous sea. For an animal of its size, its jaws have a nearly unmatched biting strength. +Sulflounder: These creatures do not seek out their food, but rather wait for their meals to come to them. Watch your step if you venture down into the sulphurous sea. +Toxicatfish: An animal which adapted to the toxic waters quite naturally. It uses its whiskers to find its way, and its prey in the murky depths. +Trasher: A huge alligator adapted to a life of scavenging in the sulphurous sea. They scrape morsels of food from the bottom with their massive jaws. But do not be mistaken. They will also prey on weak and feeble creatures. + +//Sunken Sea Enemies +BabyGhostBell: Like their adult counterparts, they shimmer gently, and would make great sources of light if the prisms around them didn't already do so. Maybe if there was a way to bring one with you. +BlindedAngler: A species of angler which has lost any distinguishing feature on its head. Using primitive electroreception similar to sharks, it slowly and methodically hunts its prey. +Clam: Sluggish mollusks filter what they can from the brackish water. Their shells are as hard as stone but contain delicate, succulent flesh. +EutrophicRay: A stingray that spends much of its time docile on the rocky floors of the sunken sea's pools. It stores its energy, and when endangered, can release it in short bursts of speed. +GhostBell: Ethereal jellyfish that drift in the still water of the sunken sea. Their bodies are curiously charged with an electric current. +GiantClam: This oversized clam is large enough to entrap a person or two whole. Thankfully, it has only taken turf in the lowest regions of the sunken sea. +PrismBack: Rather slow swimmers, they are one of the few creatures that need to breach. They periodically swim to the upper layer of their habitat to lay their eggs. +SeaFloaty: Strange but mesmerizing creatures, they hide immediately at the sight of any predator. They do not seem to be fully developed. +SeaMinnow: While they are at the bottom of the food chain, they also make up eighty percent of the biomass in this sea. They nibble away at corpses that fall from the underground desert above. +SeaSerpent: These eels are largely passive and drift languidly through the still waters of the sunken sea. Should you provoke them, they can be stubborn attackers. + +//Town NPCs +AndroombaFriendly: Easily reversed engineered, these robots can be made to spread whatever you put into them, giving them a new purpose. +DILF: His face shows great age, but also great wisdom. The Archmage once served the Godslayer, but abandoned him later into the war. He sells various frosty wares, but keeps his most powerful spells to himself. +FAP: No one knows where she came from, but no one minds her either. She's a good person to share a drink with, given you don't make her mad. +SEAHOE: The Sea King of an ancient civilization long lost to the sands of time— and the desert. He is able to give useful advice on the world around you, having lived for so long. +THIEF: A kleptomaniac who is a bit of a coward when it comes to face-to-face fights. She's rather good at getting herself both into and out of dicey situations. +WITCH: A most surprising sight to see this powerful foe live along friendly faces. Will history repeat itself or has she finally managed to free herself from the Tyrant's grasp? + +//Boss Minions +Brimling: Fragments of the brimstone elemental which made their way into shells of slag, their eyes stare mindlessly into the distance, for targets to burn. +SoulSeeker: Guardians were brought together by the clone to shield its body from blows. It is possible that they are soul slurpers empowered and enslaved by a different brand of magic than brimstone. +DarkEnergy: One of the many rifts created in the fabric of space by the Ceaseless Void. Some say you could even see a glimpse of another world if you gaze into it. +CrabShroom: Mushrooms that grow only on Crabulon's shell, feasting off the nutrients in the husk. By jolting its body, it flings these off in defense. +DesertNuisance: The starved spawn of the Desert Scourge. Like piranhas of the desert, they can swarm and tear apart smaller animals within seconds. +CosmicGuardian: An interdimensional creation of the Devourer brought from its home dimension to aid it in battle. Nowhere near the strength of its sentinels. +DankCreeper: Though their core is the same as a hive blob, their armored shell of shadow scale prevents them from dying quite as easily. They also carry a noxious gas within them. +DarkHeart: It pulses with stagnant, stinking waters of corruption, and leaks as it flies overhead. Wherever those drops land, any organic matter nearby slowly corrodes. +HiveBlob: A ball of flesh and rotting matter, it is flung out by the hive mind towards its enemies as fodder, to wear down any who stand in their way. +HiveTumor: The blemish of a colonial superorganism, the mass of organic matter pulses like a heart. The growth is the result of the corruption's beings forming together. +AquaticAberration: All head and stomach, they will gorge and guzzle upon vast schools of fish on their own. +LeviathanStart: It seems to call out in an alluring voice, and tugs on comforting memories of the sea you never actually had. +SulphurousSharkron: Rotting, corpselike offspring of the Old Duke. In the Sulphurous Seas, even from birth, their appearances are wizened and decrepit. +PerforatorCyst: A pulsing patch of anarchistic eyes and teeth. It is the culmination of the crimson's flesh and should be avoided at all costs. +CosmicLantern: These lanterns allow their user to see through any darkness. They are not typically used for combat. +CorruptSlimeSpawn: They rapidly flap their wings, created from membranes of gel and spines of hardened slime. They will incessantly hunt you down. +CrimsonSlimeSpawn: Irritant globs of gel, which can rob you of your vision if they get on your eyes. Avoid these at all costs, as they can spell death against the Slime God. +CrimsonSlimeSpawn2: Embedded in these slime's bodies are shards of crimulan stone, which drip with a toxin meant to impair your vision. +Sepulcher: This might just be the vilest undead abomination in this realm. The Sepulcher itself is completely immune to physical damage, and can only be killed by destroying its many suspended organs. +SoulSeekerSupreme: Incomplete, ghoulish skulls, their forms are limited but their devotion boundless. It's likely each yearns for a soul of their own to be complete, whether it's given by Calamitas or ripped from the foe they kill. + +//Bosses +AdultEidolonWyrm: Traces of them appear even in records as far back as the early Draconic Era... They may very well be a glimpse into the full potential of nature. +AquaticScourge: A species of scourge which has had its exoskeleton hardened and tempered by years of diving through sulphuric waters for prey. Its own jaws are now imbued with the venom of those seas. +AstrumAureus: A multi-legged mechanical beast, its very existence speaks of the extent of control the astral virus has over the non-sapient. Not even machinery can stand against it. +AstrumDeus: Revered as a God of the stars, it has been infected by the starborne illness. However, it has now been broken free from the infection's control and roams the stars once more, consuming dying stars and birthing them anew. +BrimstoneElemental: Roused from her deep slumber in relatively recent years, her awakening acted as the catalyst for Azafure’s downfall. Little is known of her nature, other than what may be assumed of any other elemental. +Bumblefuck: Known across the land for the swarms that have gathered in the jungle, they are nearly feared above all else in it. Although they may not be quite as dangerous as other forces, they have no master. +Calamitas: A mysterious burning form which only appears at night, wreathed in brimstone fire. It has a twisted mind and misplaced pride in its abilities. +Cataclysm: A shade of itself, the only actions it seems to know are to burn and kill. +Catastrophe: A violent, mindless construct. No good can come from raising the dead. +CeaselessVoid: A mysterious entity that acts as a portal to elsewhere. Little is known about its origins, other than that it was sealed away by the cultists. +Crabulon: In the bulbous growths of the fungal caverns it is not uncommon to find molted shells.They are far too large for any of the usual decapods of the mushrooms. +Cryogen: A prismatic living ice crystal. Though typically glimpsed only through the harsh sleet of blizzards, on the rare days where it is seen during a sunny day, its body gleams a deadly, beautiful blue. +DesertScourge: If ever before you have peered out into the desert and seen entire dunes rise and fall like the waves of the sea, it is not unlikely that this is the culprit, as it bore through the sands below. +DevourerofGods: Its otherworldly ego is known as well as its overwhelming power across the land, as in battle it boasts constantly. Admittedly it is one of the few able to back up its claims. +Draedon: The esteemed scientist himself. His AI is uploaded into a database, far from harm, and thus destroying his recon bodies achieves nothing. +Apollo: Within it, burns chemicals with the fury of Greek fire. Highly refined from the design of the eye-like twins before, it is now capable of outstanding mid-air movement. +Ares: While it is the most flamboyant of Draedon's machines, it appears to be lacking some finish, though this trait does not compromise its killing potential whatsoever. +Artemis: The Exo Twins are the ultimate recon units. Capable of detecting various wavelengths of light unknown to us, nothing can hide. +Thanatos: Under every armored plate on this machine lies an advanced weapon. This sacrifices the machine's durability, but it makes it a very effective mass murderer. +HiveMind: In the deep trenches of the corruption, infected creatures gather to manifest their own deity. Unlike other cases where smaller beings gather for protection, this is an entirely offensive maneuver. +Anahita: Boasting flawless manipulation of water, this elemental was known for almost limitless strength in her home turf. However, those days are long gone. +Leviathan: A gargantuan marine reptile that lurks the ocean depths along with the Water Elemental, Anahita. It is unknown if she is the last of her kind, or was simply manifested into existence like her master. +GreatSandShark: One wonders if there is a limit to the persistence of sharks in their quest to survive. In the very opposite of their usual climate, they have conquered too. It is a miracle that none yet have grown wings. +OldDuke: One of the first descendants of the Dragons, its reign as the apex sea monster has been long forgotten. However, its power is still immense due to its heritage. +Perforator: Each equipped with a deadly mouthpiece, the different ones are suited for different tasks. One to pierce, one to tear, and another, simply to devour. +PerforatorHive: Though birthed by the crimson, it is unknown whether they fully serve that creator. The worms of the hive frequently carve huge tunnels in the crimson's flesh. +PlaguebringerGoliath: Machinery and nanobots have nearly entirely eaten away at the form of this Queen Bee. One wonders if it would simply be more efficient to create one from the ground up. +Polterghast: Screaming and crying, a cacophony of spirits in anguish tear through the narrow hallways of the dungeon, searching for more—alive or dead—to add to their numbers. +ProfanedGuardianCommander: When it turns its burning spear towards anything, its simple mind has a clear goal. To entirely eradicate the enemy. +ProfanedGuardianDefender: The body it has formed boasts of a stone shell hallowed and tempered by the flames of the sun. Very little can fully shatter its defense. +ProfanedGuardianHealer: Its crystal which is displayed prominently on its body is able to restore damage done to its kin, and it draws that damage into flares which steal your life. +Providence: A deity of stone and fire. Her flame burns for one reason alone— to cleanse the world of life, so that all may suffer no longer. +Ravager: Flames roar from what almost appear to be the parapets of a rotting fortress. You will know when it is approaching downwind, from the smell alone. +Signus: A figure draped in dark robes and even darker history. No one knows the true form of this creature, though many rumors have been spread. +SlimeGodPaladin: Flanking their creator and serving as its body, these are concentrated, swirling masses of the world's evils, each utilizing the rot and corrosion to eat away and assimilate those who oppose it. +SlimeGodCore: This God is rather evasive and relies on tricky and strategic retreats due to its relatively minor strength among the Gods. It prefers to be protected rather than be in combat fighting. +StormWeaver: It resides high up in the stratosphere, feasting on wyverns and storm swimmers alike, which give it powerful electrokinesis. +SupremeCalamitas: The Brimstone Witch's harsh life can be seen in the magic she casts. Volatile and powerful, yet just barely refined. Her temper is said to be fiery enough to burn down a kingdom. +SupremeCataclysm: Despite retaining a humanoid form, it is not capable of any higher thoughts. It only knows violence. +SupremeCatastrophe: Calamitas' necromancy is outmatched by no one, but no one can truly bring the departed back from the dead. +Yharon: The loyal companion of the God-Hunter, they possess immense power compared to the Dragons of the past. This is likely partly due to fighting and training by their master's side. diff --git a/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson b/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson new file mode 100644 index 0000000000..91c3126c8d --- /dev/null +++ b/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson @@ -0,0 +1,19 @@ +AcidRainT1: { + EntryName: Acid Rain + SpawnInfo: Use a [i:CalamityMod/CausticTear] or wait for the invasion to occur naturally after the Eye of Cthulhu is defeated. +} + +AcidRainT2: { + EntryName: Acid Rain (Tier 2) + SpawnInfo: Use a [i:CalamityMod/CausticTear] or wait for the invasion to occur naturally after the Aquatic Scourge is defeated +} + +AcidRainT3: { + EntryName: Acid Rain (Tier 3) + SpawnInfo: Use a [i:CalamityMod/CausticTear] or wait for the invasion to occur naturally after the Polterghast is defeated +} + +BossRush: { + EntryName: Boss Rush + SpawnInfo: Use a [i:CalamityMod/Terminus] found at the bottom of the Abyss +} \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index ca2c699258..06447a2126 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1435,4 +1435,14 @@ WitherBlossomsBuff: { WulfrumDroidBuff: { DisplayName: Wulfrum Droid Description: The wulfrum droid will protect you +} + +KalandraMirrorBuff: { + DisplayName: Mirror of Kalandra + Description: Five ancient weapons will annihilate your enemies +} + +StellarTorusBuff: { + DisplayName: Astral Vengeance Buff + Description: Summons a Torus Orbital that fries your foes } \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson index 7ef3b1e914..0a4f46d36a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson @@ -98,11 +98,11 @@ HadarianWings: { DisplayName: Hadarian Wings Tooltip: ''' - This line gets modified below Horizontal speed: 9.00 Acceleration multiplier: 1.75 Good vertical speed Flight time: 90 + {$CommonItemTooltip.PressDownToHover} Powered by the Astral Infection ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 384af055c9..f09290b35a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -153,7 +153,7 @@ AngelicAlliance: { Courage, Enlightenment, Bliss. United in Judgement +2 max minions, 15% increased summon damage, and 8% increased damage to all other classes Life regeneration is boosted while jumping - This line is modified in the code below. If you can read this, someone probably did something wrong (It was Ben) + Press [KEY] to grace yourself in divinity for 15 seconds While under the effects of Divine Bless, for every minion you have, an archangel shall be summoned to aid you in combat Each spawned angel will instantly heal you for two health All minion attacks inflict Banishing Fire and you are granted a flat health boost of four health per second @@ -221,7 +221,7 @@ AsgardianAegis: { +40 max life and increased life regeneration Grants a supreme god slayer flame dash Can be used to ram enemies - TOOLTIP LINE HERE + Press [KEY] to activate buffs to all damage, crit chance, and defense Activating this buff will reduce your movement speed and increase enemy aggro +20 defense while submerged in liquid ''' @@ -246,7 +246,7 @@ AstralArcanum: { Provides immunity to the astral infection debuff Boosts life regen even while under the effects of a damaging debuff While under the effects of a damaging debuff you will gain 15 defense - TOOLTIP LINE HERE + Press [KEY] to toggle teleportation UI while no bosses are alive ''' } @@ -330,7 +330,7 @@ BlunderBooster: { 12% increased rogue damage and 15% increased rogue projectile velocity Stealth generates 10% faster Summons a red lightning aura to surround the player and electrify nearby enemies - TOOLTIP LINE HERE + Press [KEY] to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of lightning bolts This effect has a 1 second cooldown before it can be used again ''' } @@ -352,7 +352,7 @@ CelestialJewel: { ''' Boosts life regen even while under the effects of a damaging debuff While under the effects of a damaging debuff you will gain 11 defense - TOOLTIP LINE HERE + Press [KEY] to teleport to a random location while no bosses are alive ''' } @@ -541,14 +541,24 @@ DraedonsHeart: { DisplayName: Draedon's Heart Tooltip: ''' - 15% reduced contact damage from enemies - Reduces defense damage taken by 50% - Replaces Adrenaline with the Nanomachines meter - Unlike Adrenaline, you lose no Nanomachines when you take damage, but they stop accumulating for 1 second - With full Nanomachines, press & to heal 360 health over 2 seconds - While healing, you gain 50% damage reduction + {0}% reduced contact damage from enemies + Reduces defense damage taken by {1}% + [NANODESC] + With full Nanomachines, press [KEY] to heal {2} health over {3} {^3:second;seconds} + While healing, you take [DR]% less damage 'Nanomachines, son' ''' + NanomachinesAdd: + ''' + Adds the Nanomachines meter + Nanomachines accumulate over time while fighting bosses + Taking damage stops the accumulation for {0} {^0:second;seconds} + ''' + NanomachinesReplace: + ''' + Replaces Adrenaline with the Nanomachines meter + Unlike Adrenaline, you lose no Nanomachines when you take damage, but they stop accumulating for {0} {^0:second;seconds} + ''' } DragonScales: { @@ -616,7 +626,6 @@ ElementalGauntlet: { Melee attacks and projectiles inflict Hellfire 15% increased melee speed, damage, and 5% increased melee critical strike chance 20% increased true melee damage - Temporary immunity to lava Increased melee knockback Enables auto swing for melee weapons Increases the size of melee weapons @@ -641,7 +650,7 @@ ElysianAegis: { +30 max life Grants a supreme holy flame dash Can be used to ram enemies - TOOLTIP LINE HERE + Press [KEY] to activate buffs to all damage, crit chance and defense Activating this buff will reduce your movement speed and increase enemy aggro Blessed by the Profaned Flame ''' @@ -712,8 +721,7 @@ FlameLickedShell: { 35% decreased movement speed Enemies take damage when they hit you You move faster and lose 18 defense for 3 seconds if you take damage - Temporary immunity to lava - Grants immunity to Armor Crunch + Grants immunity to lava and Armor Crunch ''' } @@ -1217,7 +1225,7 @@ PlaguedFuelPack: { ''' 8% increased rogue damage and 15% increased rogue projectile velocity Stealth generates 10% faster - TOOLTIP LINE HERE + Press [KEY] to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of plagued clouds This effect has a 1 second cooldown before it can be used again ''' } @@ -1249,7 +1257,24 @@ ProfanedSoulCrystal: { Tooltip: ''' Transforms you into an emissary of the profaned goddess - This tooltip gets modified + [STATUS] + ''' + ExoMechsLock: "[c/F05A5A:The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations]" + CalamitasLock: "[c/F05A5A:The soul within this crystal has been defiled by the powerful magic of a supreme witch]" + Reject: Merchants will reject a defiled soul such as this. + FullTooltip: + ''' + Requires 10 minion slots to use in order to grant the following effects + All non-summon weapons are converted into powerful summon variations + Falling below 50% life will empower these attacks + [c/F05A5A:Transforms Melee attacks into a barrage of spears] + [c/3A83E4:Transforms Magic attacks into a powerful splitting fireball for {0} mana per cast] + [c/85E092:Transforms Ranged attacks into a flurry of fireballs and meteors] + [c/E94571:Transforms Rogue attacks into a deadly crystalline spiral] + Summons and empowers the profaned babs to fight alongside you + Provides buffs depending on the time of day + Thinking back, it was a boring life + [c/FFBF49:And so we burn it all in the name of purity] ''' } @@ -1373,7 +1398,7 @@ SandCloak: { Tooltip: ''' 5% increased movement speed - TOOLTIP LINE HERE + Press [KEY] to consume 10% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen This effect has a 30 second cooldown before it can be used again ''' } @@ -1404,11 +1429,21 @@ ShatteredCommunity: { Increases damage by 10% and critical strike chance by 5% Increases max health by 10%, damage reduction by 5%, defense by 10 and life regen by 2 Increases movement speed by 10% and flight time by 20% - You generate rage over time and rage does not fade away out of combat + [RAGEDESC] Taking damage gives rage, this effect is not hindered by your defensive stats While Rage Mode is active, taking damage gives only half as much rage Deal damage with Rage Mode to further empower your wrath + Current level: [LEVEL] (+[LEVEL]% Rage Mode damage) + Progress to next level: [PROGRESS]% + Total Rage Mode damage: [DAMAGE] ''' + RageAdd: + ''' + Adds the Rage meter, which generates over time + Rage generates faster when in proximity of enemies + When Rage is maxed, press {0} for a temporary damage boost + ''' + RageModified: You generate rage over time and rage does not fade out of combat } ShieldoftheHighRuler: { @@ -1453,7 +1488,7 @@ SpectralVeil: { DisplayName: Spectral Veil Tooltip: ''' - TOOLTIP LINE HERE + Press [KEY] to consume 25% of your maximum stealth to perform a mid-range teleport and render you momentarily invulnerable If you dodge something while invulnerable, you instantly gain full stealth Teleportation is disabled while Chaos State is active Stealth generates 15% faster @@ -1543,9 +1578,70 @@ StatisVoidSash: { ''' } +// Be warned translators, this thing fucking sucks StatMeter: { DisplayName: Stat Meter - Tooltip: Displays almost all player stats + FoolsName: Pasta Strainer + Tooltip: + ''' + Displays almost all player stats + Offensive/utility stats displayed vary with held item + [REV] + [ITEMS] + [GENERIC] + [ABYSS] + ''' + RevStats: + ''' + Rage Damage Boost: {0}% | Rage Mode Duration: {1} seconds + Adrenaline Damage Boost: {2}% | Adrenaline DR Boost: {3}% + ''' + DamageStats: + ''' + Class: {0} + Damage: {1} + Armor Penetration: {2} + ''' + DamageBase: "[{0} base] +" + DamageNormal: "{0}%" + DamageMult: " x{0}" + DamageFlat: " {0} flat" + Crit: Crit Chance: {0}% + AttackSpeed: Attack Speed: {0}% + WhipMeleeInheritance: " [{0}% from melee]" + // Class stats + RangedStats: Ammo Consumption Chance: {0} + MagicStats: Mana Usage: {0}% | Mana Regen: {1} + SummonStats: Minion Slots: {0} | Sentry Slots: {1} + WhipStats: Whip Range: {0} + RogueStats: + ''' + Max Stealth: {0} | Standing Regen: {1} / sec | Moving Regen: {2} / sec + Rogue Velocity Boost: {3}% + ''' + RogueConsumption: " | Rogue Weapon Consumption Chance: {0}%" + // Utility stats + ToolRange: Tool Range: ({0}, {1}) + MiningSpeed: " | Mining Speed: {0}%" + PlacementRange: Placement Range: ({0}, {1}) + TileSpeed: " | Block Placement Speed: {0}%" + WallSpeed: " | Wall Placement Speed: {0}%" + // Other stats + GenericStats: + ''' + Defense: {0} | DR: {1}% | Life Regen: {2} + Move Speed: {3}% | Jump Boost: {4}% + ''' + FlightTime: " | Wing Flight Time: {0} seconds" + MiscStats: Aggro: {0} | Luck: {1}% + AbyssStats: + ''' + Abyss Light Strength: {0} + Breath Lost Per Tick: {1} | Breath Loss Rate: {2} + Life Lost Per Tick at Zero Breath: {3} + Defense Lost From Pressure: {4} + ''' + AbyssStatsHidden: Abyss stats are only displayed while in the Abyss } StressPills: { @@ -1627,12 +1723,18 @@ TheCommunity: { DisplayName: The Community Tooltip: ''' - Starts off with weak buffs to all of your stats - The stat buffs become more powerful as you defeat bosses - Reduces the DoT effects of harmful debuffs inflicted on you + [STATS] 'The heart of (most of) the Terraria community' [c/b00ba5:Thank you to all of my supporters who made this mod a reality!] ''' + StatsList: + ''' + Increases damage by {0}% and critical strike chance by {1}% + Increases max health by {2}%, damage reduction by {3}%, and defense by {4} + Increases life regen by {5} while under damage over time effects + Increases movement speed by {6}% and flight time by {7}% + Become more powerful as you defeat bosses ({8}% Power) + ''' } TheEvolution: { @@ -1773,8 +1875,7 @@ VoidofExtinction: { 12% increase to all damage All attacks inflict Brimstone Flames Brimstone fire rains down after getting hit - Reduces damage from touching lava - Grants immunity to Burning, On Fire!, Brimstone Flames and Searing Lava + Grants immunity to lava, Burning, On Fire!, Brimstone Flames and Searing Lava ''' } @@ -1849,10 +1950,8 @@ YharimsInsignia: { Tooltip: ''' 10% increased damage when under 50% life - 10% increased melee speed - 10% increased melee and true melee damage - Melee attacks and melee projectiles inflict holy fire - Temporary immunity to lava + 15% increased melee and true melee damage + All melee attacks inflict Holy Flames Increased melee knockback ''' } \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index be99bb1301..5d7bf3715a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -39,11 +39,7 @@ BrimflameBoots: { BrimflameRobes: { DisplayName: Brimflame Robes - Tooltip: - ''' - 5% increased magic damage and critical strike chance - Reduces damage from touching lava - ''' + Tooltip: 5% increased magic damage and critical strike chance } BrimflameScowl: { @@ -229,7 +225,7 @@ HydrothermicHeadMagic: { Tooltip: ''' 12% increased magic damage, +100 max mana, and 10% increased magic critical strike chance - Temporary immunity to lava, and immunity to fire damage + Grants immunity to fire and lava ''' SetBonus: ''' @@ -244,7 +240,7 @@ HydrothermicHeadMelee: { ''' 17% increased melee damage and 10% increased melee critical strike chance Melee attacks and melee projectiles inflict on fire - Temporary immunity to lava and immunity to fire damage + Grants immunity to fire and lava ''' SetBonus: ''' @@ -259,7 +255,8 @@ HydrothermicHeadRanged: { Tooltip: ''' 12% increased ranged damage and 10% increased ranged critical strike chance - Reduces ammo usage by 25%, temporary immunity to lava, and immunity to fire damage + Reduces ammo usage by 25% + Grants immunity to fire and lava ''' SetBonus: ''' @@ -274,7 +271,7 @@ HydrothermicHeadRogue: { ''' 12% increased rogue damage and 10% increased rogue critical strike chance 50% chance to not consume rogue items and 5% increased movement speed - Temporary immunity to lava and immunity to fire damage + Grants immunity to fire and lava ''' SetBonus: ''' @@ -289,7 +286,7 @@ HydrothermicHeadSummon: { Tooltip: ''' 5% increased minion damage and increased minion knockback - Temporary immunity to lava and immunity to fire damage + Grants immunity to fire and lava ''' SetBonus: ''' @@ -459,7 +456,7 @@ ReaverHeadExplore: { Tooltip: ''' 20% increased mining speed and block/wall placement speed - Temporary immunity to lava and can move freely through liquids + Grants immunity to lava and can move freely through liquids ''' SetBonus: ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index f0ac8b36d6..af5cceaa09 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -4,7 +4,6 @@ AuricTeslaBodyArmor: { ''' +100 max life 8% increased damage and 5% increased critical strike chance - You will freeze enemies near you when you are struck ''' } @@ -96,11 +95,7 @@ BloodflareCuisses: { BloodflareHeadMagic: { DisplayName: Bloodflare Hydra Hood - Tooltip: - ''' - You can move freely through liquids and have temporary immunity to lava - 20% increased magic damage, 10% increased magic critical strike chance, +100 max mana and 17% reduced mana usage - ''' + Tooltip: 20% increased magic damage, 10% increased magic critical strike chance, +100 max mana and 17% reduced mana usage SetBonus: ''' Magic weapons fire ghostly bolts every 1.67 seconds @@ -110,11 +105,7 @@ BloodflareHeadMagic: { BloodflareHeadMelee: { DisplayName: Bloodflare Ram Mask - Tooltip: - ''' - You can move freely through liquids and have temporary immunity to lava - 10% increased melee damage - ''' + Tooltip: 10% increased melee damage SetBonus: ''' 18% increased melee speed @@ -128,11 +119,7 @@ BloodflareHeadMelee: { BloodflareHeadRanged: { DisplayName: Bloodflare Horned Helm - Tooltip: - ''' - You can move freely through liquids and have temporary immunity to lava - 10% increased ranged damage and critical strike chance - ''' + Tooltip: 10% increased ranged damage and critical strike chance SetBonus: ''' Press {0} to unleash the lost souls of polterghast to destroy your enemies @@ -145,7 +132,6 @@ BloodflareHeadRogue: { DisplayName: Bloodflare Imp Mask Tooltip: ''' - You can move freely through liquids and have temporary immunity to lava 10% increased rogue damage and critical strike chance 5% increased movement speed ''' @@ -160,11 +146,7 @@ BloodflareHeadRogue: { BloodflareHeadSummon: { DisplayName: Bloodflare Wyvern Helm - Tooltip: - ''' - You can move freely through liquids and have temporary immunity to lava - 5% increased minion damage - ''' + Tooltip: 5% increased minion damage SetBonus: ''' 50% increased minion damage and +3 max minions @@ -227,8 +209,7 @@ EmpyreanMask: { Tooltip: ''' 11% increased rogue damage and critical strike chance - 5% increased movement speed - Temporary immunity to lava + 5% increased movement speed ''' SetBonus: ''' @@ -525,13 +506,11 @@ TarragonHeadMagic: { DisplayName: Tarragon Mask Tooltip: ''' - Can move freely through liquids 20% increased magic damage and 10% increased magic critical strike chance 5% increased damage reduction, +100 max mana, and 15% reduced mana usage ''' SetBonus: ''' - 15% increased melee speed 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 @@ -542,7 +521,6 @@ TarragonHeadMelee: { DisplayName: Tarragon Helm Tooltip: ''' - Can move freely through liquids 10% increased melee damage 5% increased melee critical strike chance 5% increased damage reduction @@ -561,7 +539,6 @@ TarragonHeadRanged: { DisplayName: Tarragon Visage Tooltip: ''' - Can move freely through liquids 10% increased ranged damage and critical strike chance 5% increased damage reduction ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Dyes.hjson b/Localization/en-US/Mods.CalamityMod.Items.Dyes.hjson index c854749001..92ee611144 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Dyes.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Dyes.hjson @@ -118,8 +118,8 @@ NightmareDye: { Tooltip: "" } -PhantoplasmDye: { - DisplayName: Phantoplasm Dye +PolterplasmDye: { + DisplayName: Polterplasm Dye Tooltip: "" } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson b/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson index 9534d80f06..915209eafd 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson @@ -118,11 +118,6 @@ DepthCells: { Tooltip: The cells of abyssal creatures } -DesertFeather: { - DisplayName: Desert Feather - Tooltip: "" -} - DivineGeode: { DisplayName: Divine Geode Tooltip: A chunk of crystallized holy energy @@ -247,8 +242,8 @@ PerennialBar: { Tooltip: "" } -Phantoplasm: { - DisplayName: Phantoplasm +Polterplasm: { + DisplayName: Polterplasm Tooltip: It churns and seethes with ghastly malice } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index 9ecc2f0a00..8d3d2fc4a2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -255,7 +255,7 @@ NormalityRelocator: { DisplayName: Normality Relocator Tooltip: ''' - This line is modified below + Press [KEY] to teleport to the position of the mouse Fall speed is doubled for 30 frames after teleporting Teleportation is disabled while Chaos State is active Works while in the inventory diff --git a/Localization/en-US/Mods.CalamityMod.Items.Mounts.hjson b/Localization/en-US/Mods.CalamityMod.Items.Mounts.hjson index 7a1d03b70f..7d16630028 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Mounts.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Mounts.hjson @@ -8,7 +8,7 @@ ExoThrone: { Tooltip: ''' Materializes a quite cozy and extremely nimble flying Exo throne - Replaced + Hold [KEY] while sitting in the throne to move slower for more precision 'A comfortable gamer is a dangerous gamer' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index afc04856fd..52efe0f823 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -712,8 +712,8 @@ StaffofBlushie: { Tooltip: Hold your mouse, wait, wait, wait, and put your trust in the power of blue magic } -Starfall: { - DisplayName: Starfall +StarShower: { + DisplayName: Star Shower Tooltip: Casts a spread of astral stars at the mouse cursor } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index aebf84a9a3..b0e2e7cd0f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -369,16 +369,6 @@ EarthenPike: { ''' } -ElementalExcalibur: { - DisplayName: Elemental Excalibur - Tooltip: - ''' - Freezes enemies and heals the player on hit - Fires rainbow beams that change their behavior based on their color - Press for true melee - ''' -} - ElementalLance: { DisplayName: Elemental Lance Tooltip: @@ -588,8 +578,8 @@ GrandGuardian: { ''' } -GreatswordofBlah: { - DisplayName: Greatsword of Blah +Orderbringer: { + DisplayName: Orderbringer Tooltip: ''' Fires a rainbow blade that emits rainbow rain on death for a time @@ -655,6 +645,16 @@ InsidiousImpaler: { Tooltip: Fires a harpoon that sticks to enemies and explodes } +IridescentExcalibur: { + DisplayName: Iridescent Excalibur + Tooltip: + ''' + Freezes enemies and heals the player on hit + Fires rainbow beams that change their behavior based on their color + Press for true melee + ''' +} + Lacerator: { DisplayName: Lacerator Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 474a3356b2..fa6619c6f5 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -1081,6 +1081,11 @@ Starmada: { ''' } +Starmageddon: { + DisplayName: Starmageddon + Tooltip: Projects the finality of cosmic annihilation with Darksun power +} + StarSputter: { DisplayName: Star Sputter Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index a491b3bd51..3d8ff28097 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -145,18 +145,6 @@ Cnidarian: { ''' } -GlacialEmbrace: { - DisplayName: Glacial Embrace - Tooltip: - ''' - Summons the power of the ancient ice castle - For each minion slot used, you will gain an additional orbiting shield spike - These spikes accelerate rapidly towards a nearby enemy to inflict heavy damage - They take some time to regenerate after launching themselves at the target, however - On right click, summons a duplicate ring around the targeted enemy, which slowly converges before exploding - ''' -} - CorroslimeStaff: { DisplayName: Corroslime Staff Tooltip: Summons a corro slime to fight for you @@ -334,6 +322,8 @@ EyeOfNight: { FlamsteedRing: { DisplayName: Flamsteed Ring + NoSpaceTextTop: Cannot Deploy + NoSpaceTextBottom: Insufficient space! Tooltip: ''' Summons a colossal controllable mech @@ -400,6 +390,18 @@ GastricBelcherStaff: { ''' } +GlacialEmbrace: { + DisplayName: Glacial Embrace + Tooltip: + ''' + Summons the power of the ancient ice castle + For each minion slot used, you will gain an additional orbiting shield spike + These spikes accelerate rapidly towards a nearby enemy to inflict heavy damage + They take some time to regenerate after launching themselves at the target, however + On right click, summons a duplicate ring around the targeted enemy, which slowly converges before exploding + ''' +} + GodspawnHelixStaff: { DisplayName: Godspawn Helix Staff Tooltip: Summons astral probes to protect you @@ -770,4 +772,24 @@ YharonsKindleStaff: { Summons a fiery draconid to fight for you Requires 5 minion slots to use ''' +} + +MirrorofKalandra: { + DisplayName: Mirror of Kalandra + Tooltip: + ''' + Summons five ancient weapons to annihilate your enemies + There can only be one of each individual weapon + [c/BD7F59:Atziri's Disfavor brutally cleaves through enemies] + [c/E7A7FF:Starforge rips through foes and occasionally induces cosmic explosions] + [c/868B8F:Paradoxica teleports to enemies and blitzes through them at high speed] + [c/EBC3A5:Wind Ripper unleashes a single high-speed, powerful arrow at enemies] + [c/9B6856:Hope Shredder shoots arrows that split into three and pierce enemies twice] + 'Ultimate, Immeasurable, Indescribable' + ''' +} + +StellarTorusStaff: { + DisplayName: Stellar Torus Staff + Tooltip: Summons a Torus Orbital that fries foes with a telescoping light beam } \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index 94604d30ab..5eb601d4b4 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -35,9 +35,20 @@ PlanetoidSchematicRecipeCondition: Place a schematic from the lab in the large p JungleSchematicRecipeCondition: Place a schematic from the lab deep within the jungle in your inventory at least once UnderworldSchematicRecipeCondition: Place a schematic from the lab near the edges of the underworld in your inventory at least once IceSchematicRecipeCondition: Place a schematic from the lab within the frozen caverns in your inventory at least once -// Item Messages +// Other CombatText uses and Item Messages ShiftToExpand: Hold SHIFT to see an expanded description LearnedSchematic: You learned how to create new things! +CragmawVibeCheck: Vibe check. +AutocannonHot: OUCH! HOT! +NoComputer: No decryption computer installed +ArkParry: Parry! +ClockworkTick: Tick +ClockworkTock: Tock +SevensJackpot: Jackpot!!! +SevensBust: Bust! +SevensDoubles: Doubles! +SevensTriples: Triples! +StylishHammerHit: Stylish! ThirdSageBlessingText: You have been blessed by the Third Sage! ThirdSageBlessingText2: The Third Sage has rescinded its blessing... GenericConsumedText: "[c/8a8a8a:You have already consumed this item]" diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index cacdb6d50f..6764537043 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -21,12 +21,50 @@ Viperfish.DisplayName: Viperfish AcidEel.DisplayName: Acid Eel BabyFlakCrab.DisplayName: Baby Flak Crab BloodwormNormal.DisplayName: Bloodworm -CragmawMire.DisplayName: Cragmaw Mire + +CragmawMire: { + DisplayName: Cragmaw Mire + + BossChecklistIntegration: { + SpawnInfo: + ''' + Spawns during Acid Rain after the Aquatic Scourge has been defeated. + Start Acid Rain with a [i:CalamityMod/CausticTear] + ''' + DespawnMessage: "[c/f0e68c:The Cragmaw Mire buries itself within the sand.]" + } +} + FlakCrab.DisplayName: Flak Crab GammaSlime.DisplayName: Gamma Slime IrradiatedSlime.DisplayName: Irradiated Slime -Mauler.DisplayName: Mauler -NuclearTerror.DisplayName: Nuclear Terror + +Mauler: { + DisplayName: Mauler + + BossChecklistIntegration: { + SpawnInfo: + ''' + Spawns during Acid Rain after Polterghast has been defeated. + Start Acid Rain with a [i:CalamityMod/CausticTear] + ''' + DespawnMessage: "[c/f0e68c:The brutish shark looks elsewhere to turn its aggression.]" + } +} + +NuclearTerror: { + DisplayName: Nuclear Terror + + BossChecklistIntegration: { + SpawnInfo: + ''' + Spawns during Acid Rain after Polterghast has been defeated. + Start Acid Rain with a [i:CalamityMod/CausticTear] + ''' + DespawnMessage: "[c/f0e68c:The radioactive aberration fades away in a sickly light.]" + } +} + NuclearToad.DisplayName: Nuclear Toad Orthocera.DisplayName: Orthocera Radiator.DisplayName: Radiator @@ -35,7 +73,17 @@ SulphurousSkater.DisplayName: Sulphurous Skater Trilobite.DisplayName: Trilobite AdultEidolonWyrmHead.DisplayName: Adult Eidolon Wyrm Jared: Jared -AquaticScourgeHead.DisplayName: Aquatic Scourge + +AquaticScourgeHead: { + DisplayName: Aquatic Scourge + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/Seafood] in the Sulphuric Sea or wait for it to spawn in the Sulphuric Sea + DespawnMessage: "[c/f0e68c:The poisoned scourge swims back to the tranquil, open ocean.]" + EntryName: Aquatic Scourge + } +} + Aries.DisplayName: Aries AstralachneaGround.DisplayName: Astralachnea AstralProbe.DisplayName: Astral Probe @@ -52,22 +100,89 @@ SightseerCollider.DisplayName: Sightseer Collider SightseerSpitter.DisplayName: Sightseer Spitter StellarCulex.DisplayName: Stellar Culex Twinkler.DisplayName: Twinkler -AstrumAureus.DisplayName: Astrum Aureus + +AstrumAureus: { + DisplayName: Astrum Aureus + + BossChecklistIntegration: { + SpawnInfo: Use an [i:CalamityMod/AstralChunk] at Night in the Astral Biome + DespawnMessage: "[c/ffd700:Aureus has neutralized all threats. Resume prior reconnaissance.]" + } +} + AureusSpawn.DisplayName: Aureus Spawn -AstrumDeusHead.DisplayName: Astrum Deus + +AstrumDeusHead: { + DisplayName: Astrum Deus + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/TitanHeart] or [i:CalamityMod/Starcore] as offering at an [i:CalamityMod/AstralBeaconItem] + DespawnMessage: "[c/ffd700:The infected deity retreats to the heavens.]" + EntryName: Astrum Deus + } +} + Brimling.DisplayName: Brimling -BrimstoneElemental.DisplayName: Brimstone Elemental + +BrimstoneElemental: { + DisplayName: Brimstone Elemental + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/CharredIdol] in the Brimstone Crag + DespawnMessage: "[c/dc143c:The elemental ever maintains her somber vigil over Azafure…]" + } +} + Bumblebirb: Bumblebirb -Bumblefuck.DisplayName: The Dragonfolly + +Bumblefuck: { + DisplayName: The Dragonfolly + + BossChecklistIntegration: { + EntryName: Dragonfolly + SpawnInfo: Use [i:CalamityMod/ExoticPheromones] in the Jungle Biome + DespawnMessage: "[c/ffd700:The folly returns to its secluded roost.]" + } +} + Bumblefuck2.DisplayName: Draconic Swarmer -CalamitasClone.DisplayName: Calamitas Clone + +CalamitasClone: { + DisplayName: Calamitas Clone + + BossChecklistIntegration: { + EntryName: The Calamitas Clone + SpawnInfo: Use an [i:CalamityMod/EyeofDesolation] at Night + DespawnMessage: "[c/ffa500:The clone spits a bit of blood in disappointment and vanishes.]" + } +} + Cataclysm.DisplayName: Cataclysm Catastrophe.DisplayName: Catastrophe SoulSeeker.DisplayName: Soul Seeker -CeaselessVoid.DisplayName: Ceaseless Void + +CeaselessVoid: { + DisplayName: Ceaseless Void + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/RuneofKos] in the Dungeon + DespawnMessage: "[c/4b0082:The ancient spatial rift slips away to places unknown.]" + EntryName: Ceaseless Void + } +} + DarkEnergy.DisplayName: Dark Energy CrabShroom.DisplayName: Crab Shroom -Crabulon.DisplayName: Crabulon + +Crabulon: { + DisplayName: Crabulon + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/DecapoditaSprout] in the Mushroom Biome + DespawnMessage: "[c/6495ed:The monstrous mycelial crab shuffles away…]" + } +} + CalamityEye.DisplayName: Calamity Eye CharredSlime.DisplayName: Charred Slime RenegadeWarlock.DisplayName: Renegade Warlock @@ -76,14 +191,43 @@ HeatSpirit.DisplayName: Heat Spirit Scryllar.DisplayName: Scryllar ScryllarRage.DisplayName: Scryllar SoulSlurper.DisplayName: Soul Slurper -Cryogen.DisplayName: Cryogen + +Cryogen: { + DisplayName: Cryogen + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/CryoKey] in the Snow Biome + DespawnMessage: "[c/00ffff:Cryogen disappears amidst the biting winds of the blizzard.]" + } +} + Pyrogen: Pyrogen CryogenShield.DisplayName: Cryogen's Shield PyrogenShield: Pyrogen's Shield DesertNuisanceHead.DisplayName: A Desert Nuisance -DesertScourgeHead.DisplayName: Desert Scourge + +DesertScourgeHead: { + DisplayName: Desert Scourge + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/DesertMedallion] in the Desert Biome + DespawnMessage: "[c/eee8aa:The scourge of the desert delves back into the sand.]" + EntryName: Desert Scourge + } +} + CosmicGuardianHead.DisplayName: Cosmic Guardian -DevourerofGodsHead.DisplayName: The Devourer of Gods + +DevourerofGodsHead: { + DisplayName: The Devourer of Gods + + BossChecklistIntegration: { + EntryName: Devourer of Gods + SpawnInfo: Use a [i:CalamityMod/CosmicWorm] + DespawnMessage: "[c/00ffff:The Devourer of Gods haughtily returns to the depths of the Distortion.]" + } +} + Androomba.DisplayName: Androomba Nanodroid.DisplayName: Nanodroid RepairUnitCritter.DisplayName: Repair Unit @@ -91,6 +235,12 @@ RepairUnitCritter.DisplayName: Repair Unit Apollo: { DisplayName: XS-03 Apollo HekateName: Corrosive Eye of XB-∞ Hekate + + BossChecklistIntegration: { + EntryName: Exo Mechs + SpawnInfo: By using a high-tech computer + DespawnMessage: "[c/7fffd4:An imperfection after all… what a shame.]" + } } AresBody: { @@ -130,16 +280,43 @@ ThanatosHead: { HekateName: Spine of XB-∞ Hekate } -GreatSandShark.DisplayName: Great Sand Shark +GreatSandShark: { + DisplayName: Great Sand Shark + + BossChecklistIntegration: { + SpawnInfo: Kill 10 sand sharks after defeating Plantera or use a [i:CalamityMod/SandstormsCore] in the Desert Biome + DespawnMessage: "[c/daa520:The apex predator of the sands disappears between the dunes.]" + } +} + DankCreeper.DisplayName: Dank Creeper DarkHeart.DisplayName: Dark Heart HiveBlob.DisplayName: Hive Blob -HiveMind.DisplayName: The Hive Mind + +HiveMind: { + DisplayName: The Hive Mind + + BossChecklistIntegration: { + SpawnInfo: Kill a Tumor in the Corruption or use a [i:CalamityMod/Teratoma] in the Corruption + DespawnMessage: "[c/9400d3:The Hive Mind flits away to brood elsewhere.]" + } +} + HiveTumor.DisplayName: Hive Tumor Anahita.DisplayName: Anahita AnahitasIceShield.DisplayName: Ice Shield AquaticAberration.DisplayName: Aquatic Aberration -Leviathan.DisplayName: The Leviathan + +Leviathan: { + DisplayName: The Leviathan + + BossChecklistIntegration: { + EntryName: Leviathan + SpawnInfo: By killing an unknown entity in the Ocean Biome + DespawnMessage: "[c/7fffd4:The aquatic outcasts return to their lonesome company.]" + } +} + LeviathanStart.DisplayName: ??? AeroSlime.DisplayName: Aero Slime ArmoredDiggerHead.DisplayName: Armored Digger @@ -172,6 +349,7 @@ OverloadedSoldier.DisplayName: Overloaded Soldier PerennialSlime.DisplayName: Perennial Slime PhantomSpirit.DisplayName: Phantom Spirit Piggy.DisplayName: Piggy +PlanterasFreeTentacle.DisplayName: Planteras Tentacle ProfanedEnergyBody.DisplayName: Profaned Energy Rimehound.DisplayName: Rimehound Rotdog.DisplayName: Rotdog @@ -188,7 +366,17 @@ WulfrumDrone.DisplayName: Wulfrum Drone WulfrumGyrator.DisplayName: Wulfrum Gyrator WulfrumHovercraft.DisplayName: Wulfrum Hovercraft WulfrumRover.DisplayName: Wulfrum Rover -OldDuke.DisplayName: The Old Duke + +OldDuke: { + DisplayName: The Old Duke + + BossChecklistIntegration: { + EntryName: Old Duke + SpawnInfo: Defeat the Acid Rain event post-Polterghast or fish using a [i:CalamityMod/BloodwormItem] in the Sulphurous Sea + DespawnMessage: "[c/f0e68c:The old duke retreats further into the acidic downpour.]" + } +} + BoomerDuke: The Boomer Duke OldDukeToothBall.DisplayName: Tooth Ball SulphurousSharkron.DisplayName: Sulphurous Sharkron @@ -200,8 +388,27 @@ PerforatorCyst.DisplayName: Perforator Cyst PerforatorHeadLarge.DisplayName: The Perforator PerforatorHeadMedium.DisplayName: The Perforator PerforatorHeadSmall.DisplayName: The Perforator -PerforatorHive.DisplayName: The Perforator Hive -PlaguebringerGoliath.DisplayName: The Plaguebringer Goliath + +PerforatorHive: { + DisplayName: The Perforator Hive + + BossChecklistIntegration: { + EntryName: The Perforators + SpawnInfo: Kill a Cyst in the Crimson or use a [i:CalamityMod/BloodyWormFood] in the Crimson + DespawnMessage: "[c/dc143c:The Perforators search for more hosts to gorge themselves on.]" + } +} + +PlaguebringerGoliath: { + DisplayName: The Plaguebringer Goliath + + BossChecklistIntegration: { + EntryName: Plaguebringer Goliath + SpawnInfo: Use an [i:CalamityMod/Abombination] in the Jungle Biome + DespawnMessage: "[c/00ff00:SPECIMENS EUTHANIZED. EXITING COMBAT PROTOCOL.]" + } +} + PlagueHomingMissile.DisplayName: Plague Homing Missile PlagueMine.DisplayName: Plague Mine Melter.DisplayName: Melter @@ -211,34 +418,104 @@ PlagueCharger.DisplayName: Plague Charger Plagueshell.DisplayName: Plagueshell Viruling.DisplayName: Viruling PhantomFuckYou.DisplayName: Phantom -Polterghast.DisplayName: Polterghast + +Polterghast: { + DisplayName: Polterghast + + BossChecklistIntegration: { + SpawnInfo: Kill 30 phantom spirits or use a [i:CalamityMod/NecroplasmicBeacon] in the Dungeon + DespawnMessage: "[c/b0e0e6:The volatile phantasm disperses in an echoing wail.]" + EntryName: Polterghast + } +} + Necroghast: Necroghast Necroplasm: Necroplasm Polterplasm: Polterplasm PolterghastHook.DisplayName: Polterghast Hook PolterPhantom.DisplayName: Polterghast -ProfanedGuardianCommander.DisplayName: Guardian Commander + +ProfanedGuardianCommander: { + DisplayName: Guardian Commander + + BossChecklistIntegration: { + EntryName: Profaned Guardians + SpawnInfo: Use a [i:CalamityMod/ProfanedShard] in the Hallow or Underworld Biomes + DespawnMessage: "[c/ffa500:The Guardians are recalled to their Goddess' side.]" + } +} + ProfanedGuardianDefender.DisplayName: Guardian Defender ProfanedGuardianHealer.DisplayName: Guardian Healer ProfanedRocks.DisplayName: Profaned Rocks -Providence.DisplayName: Providence, the Profaned Goddess + +Providence: { + DisplayName: Providence, the Profaned Goddess + + BossChecklistIntegration: { + EntryName: Providence + SpawnInfo: Use [i:CalamityMod/ProfanedCore] in the Hallow or Underworld Biomes + DespawnMessage: "[c/ffa500:The Profaned Goddess veils herself in purifying flame, leaving only ashes behind…]" + } +} + ProvSpawnDefense.DisplayName: Providence Defender ProvSpawnHealer.DisplayName: Providence Healer ProvSpawnOffense.DisplayName: Providence Offense FlamePillar.DisplayName: Flame Pillar -RavagerBody.DisplayName: Ravager + +RavagerBody: { + DisplayName: Ravager + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/DeathWhistle] + DespawnMessage: "[c/b22222:The Ravager resumes its aimless, horrific rampage.]" + EntryName: Ravager + } +} + RockPillar.DisplayName: Rock Pillar CosmicLantern.DisplayName: Cosmic Lantern CosmicMine.DisplayName: Cosmic Mine -Signus.DisplayName: Signus, Envoy of the Devourer + +Signus: { + DisplayName: Signus, Envoy of the Devourer + + BossChecklistIntegration: { + EntryName: Signus + SpawnInfo: Use a [i:CalamityMod/RuneofKos] in the Underworld + DespawnMessage: "[c/ba55d3:Signus inexplicably ceases to be where he once was.]" + } +} + CorruptSlimeSpawn.DisplayName: Corrupt Slime Spawn CrimsonSlimeSpawn.DisplayName: Crimson Slime Spawn CrimulanPaladin.DisplayName: Crimulan Paladin EbonianPaladin.DisplayName: Ebonian Paladin -SlimeGodCore.DisplayName: The Slime God + +SlimeGodCore: { + DisplayName: The Slime God + + BossChecklistIntegration: { + EntryName: Slime God + SpawnInfo: Use an [i:CalamityMod/OverloadedSludge] + DespawnMessage: "[c/ba5533:The grimy, gelatinous God hops away, its vengeance achieved.]" + } +} + SplitCrimulanPaladin.DisplayName: Crimulan Paladin SplitEbonianPaladin.DisplayName: Ebonian Paladin -StormWeaverHead.DisplayName: Storm Weaver + +StormWeaverHead: { + DisplayName: Storm Weaver + + BossChecklistIntegration: { + SpawnInfo: Use a [i:CalamityMod/RuneofKos] in Space + DespawnMessage: "[c/ee82ee:Storm Weaver hides itself within the fierce anvilhead clouds.]" + EntryName: Storm Weaver + } +} + AnthozoanCrab.DisplayName: Anthozoan Crab AquaticUrchin.DisplayName: Aquatic Urchin BelchingCoral.DisplayName: Belching Coral @@ -252,7 +529,16 @@ BlindedAngler.DisplayName: Blinded Angler Clam.DisplayName: Clam EutrophicRay.DisplayName: Eutrophic Ray GhostBell.DisplayName: Ghost Bell -GiantClam.DisplayName: Giant Clam + +GiantClam: { + DisplayName: Giant Clam + + BossChecklistIntegration: { + SpawnInfo: Can spawn naturally in the Sunken Sea + DespawnMessage: "[c/7fffd4:The Giant Clam returns into hiding in its grotto.]" + } +} + Clamitas: Clamitas SupremeClamitas: Supreme Clamitas PrismBack.DisplayName: Prism-Back @@ -262,16 +548,36 @@ SeaSerpent1.DisplayName: Sea Serpent BrimstoneHeart.DisplayName: Brimstone Heart SepulcherHead.DisplayName: Sepulcher SoulSeekerSupreme.DisplayName: Soul Seeker -SupremeCalamitas.DisplayName: Supreme Witch, Calamitas + +SupremeCalamitas: { + DisplayName: Supreme Witch, Calamitas + + BossChecklistIntegration: { + SpawnInfo: Use [i:CalamityMod/AshesofCalamity] or a [i:CalamityMod/CeremonialUrn] as offering at an [i:CalamityMod/AltarOfTheAccursedItem] + DespawnMessage: "[c/ffa500:Please don't waste my time.]" + } +} + SupremeCataclysm.DisplayName: Cataclysm SupremeCatastrophe.DisplayName: Catastrophe -Yharon.DisplayName: Yharon, Dragon of Rebirth + +Yharon: { + DisplayName: Yharon, Dragon of Rebirth + + BossChecklistIntegration: { + EntryName: Yharon + SpawnInfo: Use a [i:CalamityMod/YharonEgg] + DespawnMessage: "[c/ffa500:Yharon soars out of sight, his task fulfilled.]" + } +} + YharonPhase2: Yharon, Resplendent Phoenix // Town NPCs, Pets, etc AndroombaFriendly.DisplayName: Androomba Pal DILF: { DisplayName: Archmage + Census.SpawnCondition: Defeat Cryogen Name.Permafrost: Permafrost Chat: { @@ -310,6 +616,7 @@ DILF: { FAP: { DisplayName: Drunk Princess + Census.SpawnCondition: Have {$Mods.CalamityMod.Items.Potions.FabsolsVodka.DisplayName} [i:CalamityMod/FabsolsVodka] in your inventory in Hardmode Name.Cirrus: Cirrus Chat: { @@ -324,7 +631,7 @@ FAP: { Normal2: Drink something that turns you into a magical flying unicorn so you can be just like me. Normal3: Deals so good I'll [$$!$] myself! ...Sorry, just had a minor stroke! Normal4: Did anyone ever tell you that large assets cause back pain? Well, they were right. - Archmage: I never realized how well-endowed {0} was. It had to be the largest icicle I'd ever seen. + Archmage: "{0} can share a drink with me any time! ...Or maybe not, I'm not sure his old heart could take it." BrimstoneWitch: The abuse {0} went through is something I can hardly comprehend. I'd offer her a drink, but I don't think she'd enjoy it. Tavernkeep1: My booze will always be better than {0}'s, and nobody can convince me otherwise. Tavernkeep2: Tell {0} to stop calling me. He's not wanted. @@ -350,7 +657,7 @@ FAP: { AcidRain: I'm melting! Put a stop to this inclement weather this instant before it ruins my hair! Martians: You should probably deal with those ayy lmaos before anything else, but whatever. CryogenDefeated: God I can't wait to smash some ice again! ...For drinks, of course. - LeviathanDefeated: How could you murder such a beautiful creature!? ...The blue sexy one, not the obese cucumber. + LeviathanDefeated: How could you murder such a beautiful creature!? ...The blue one, not the obese cucumber. MoonLordDefeated: Ever wondered why the Moon Lord needed so many tentacles? Uh... on second thought, I won't answer that. PolterghastDefeated: I saw a ghost down by the old train tracks back at my homeland once, flailing wildly at the lily pads... frightening times those were. DoGDefeated: I hear it's amazing when the famous Devourer of Gods out in flap-jaw space, with the tuning fork, does a raw blink on Hara-kiri rock. I need scissors! 61! @@ -384,12 +691,12 @@ FAP: { LoveBiome: Other unicorns? Never thought I'd see the day! This place is incredible! LikeBiome: A good breeze to cool some heads, that's the way to deal with customers who've had a few too many drinks! DislikeBiome: This dry air and heat isn't good for my hair, or my drinks. - HateBiome: This place is awful! The musty air spoils the taste and aroma of everything I'm selling! + HateBiome: You think I can fix this mess with a magical friendship rainbow? That's not how it works, dumbass! Get me out of here already! LoveNPC_Stylist: "{NPCName} works wonders for my hair... among other things, hehe." LoveNPC_BestiaryGirl: "{NPCName} is so fluffy and squishy! She also says my alicorn form is 'mega rad'." LikeNPC_Truffle: "{NPCName} makes me so hungry... I wonder how great of a trip he'd give..." LikeNPC_PartyGirl: "{NPCName} would make for a great bartender some day. She really knows how to liven the mood!" - DislikeNPC_DD2Bartender: "{NPCName} is so bald. Maybe if he'd stop trying to date me he'd finally grow some hair." + DislikeNPC_DD2Bartender: "{NPCName} is so bald." DislikeNPC_TaxCollector: "{NPCName} had best keep his distance... he wouldn't want to wake up one morning with a pipe bomb in his mailbox." HateNPC_GoblinTinkerer: "{NPCName} was so terrible that I had to FORCE him to have a better reforge system. Why would you house me next to him? Do you enjoy watching me relive the stress he gave me!?" HateNPC_Angler: "{NPCName} never stops blabbering about his inane fishing quests. Get me away from him before I stomp him into the ground!" @@ -404,6 +711,7 @@ FAP: { SEAHOE: { DisplayName: Sea King + Census.SpawnCondition: Defeat a Giant Clam after defeating the Desert Scourge Name.Amidias: Amidias Chat: { @@ -488,6 +796,7 @@ SEAHOE: { THIEF: { DisplayName: Bandit + Census.SpawnCondition: Have a {$ItemName.PlatinumCoin} [i:PlatinumCoin] in your inventory after defeating Skeletron Name: { Laura: Laura @@ -568,6 +877,7 @@ THIEF: { WITCH: { DisplayName: Brimstone Witch + Census.SpawnCondition: Defeat Supreme Witch, Calamitas Name.Calamitas: Calamitas Chat: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 01e95cce7f..799683ec95 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -72,6 +72,8 @@ HolyFire2.DisplayName: Holy Fire HolyFlare.DisplayName: Holy Flare HolyLight.DisplayName: Holy Light HolySpear.DisplayName: Holy Spear +HomingGasBulb.DisplayName: Homing Gas Bulb +HomingGasBulbSporeGas.DisplayName: Homing Gas Bulb Spore Gas IceBlast.DisplayName: Ice Blast IceBomb.DisplayName: Ice Bomb IceRain.DisplayName: Ice Rain @@ -138,6 +140,7 @@ SwirlingFire.DisplayName: Fire ThanatosBeamStart.DisplayName: T Hanos Beam ThanatosBeamTelegraph.DisplayName: Gamma Disintegration Beam Telegraph ThanatosLaser.DisplayName: Exo Pulse Laser +ThornBallSpike.DisplayName: Thorn Ball Spike ToxicCloud.DisplayName: Toxic Cloud UnstableCrimulanGlob.DisplayName: Unstable Crimulan Glob UnstableEbonianGlob.DisplayName: Unstable Ebonian Glob diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index c394ac5971..49c344a1d0 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -98,7 +98,6 @@ Earth2.DisplayName: Earth Earth3.DisplayName: Earth Earth4.DisplayName: Earth EarthProj.DisplayName: Earth -ElementalExcaliburBeam.DisplayName: Beam ElementalGlassStar.DisplayName: Glass Star ElementBall.DisplayName: Ball ElementBallShiv.DisplayName: Shiv @@ -140,6 +139,7 @@ GalaxySmasherHammer.DisplayName: Galaxy Smasher GalaxyStar.DisplayName: Star GalileosMoon.DisplayName: Crescent Moon GalileosPlanet.DisplayName: Planet +GayBeam.DisplayName: Beam GelWave.DisplayName: Wave GemTechYellowShard.DisplayName: Trireme's Yellow Gem GestureForTheDrowned.DisplayName: Biome Blade @@ -158,7 +158,6 @@ HyperBlade.DisplayName: Blade IceBombFriendly.DisplayName: Ice Bomb IllustriousKnife.DisplayName: Illustrious Knife InsidiousHarpoon.DisplayName: Harpoon -JudgementBlah.DisplayName: Blah Beam JudgementProj.DisplayName: Judgement LamentationsOfTheChained.DisplayName: Lamentations of the Chained LaserFountain.DisplayName: Fountain @@ -187,6 +186,10 @@ OathswordFlame.DisplayName: Flame OldLordClaymoreProj.DisplayName: Old Lord Claymore OmnibladeSwing.DisplayName: Omniblade Orbacle.DisplayName: Auric Orb +OrderbringerAura.DisplayName: Aura +OrderbringerBeam.DisplayName: Orderbringer Beam +OrderbringerRain.DisplayName: Rain +OrderbringerWhiteOrb.DisplayName: Orb PhoenixsPride.DisplayName: Phoenix's Pride PhosphorescentGauntletPunches.DisplayName: Punch PhotonRipperProjectile.DisplayName: Extraordinarily Cost-Inefficient Chainsaw @@ -323,11 +326,8 @@ VolcanicFireball.DisplayName: Volcanic Fireball VolcanicFireballLarge.DisplayName: Volcanic Fireball Waterfall.DisplayName: Beam WhiteBoltAura.DisplayName: Aura -WhiteBoltAuraBlah.DisplayName: Aura WhiteOrb.DisplayName: Orb -WhiteOrbBlah.DisplayName: Orb Whiterain.DisplayName: Rain -WhiterainBlah.DisplayName: Rain WulfrumScrew.DisplayName: Screw WulfrumScrewdriverProj.DisplayName: Screwdriver YateveoBloomProj.DisplayName: Yateveo Bloom diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 7d70fddbfb..d81a3a58cb 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -212,6 +212,10 @@ SputterComet.DisplayName: Comet SputterCometBig.DisplayName: Comet SpykerProj.DisplayName: Spyker StarfleetMK2Gun.DisplayName: Starmada +StarmageddonBinaryStarCenter.DisplayName: Starmageddon Binary Star Center +StarmageddonHeld.DisplayName: Starmageddon +StarmageddonStar.DisplayName: Starmageddon Star +StarmageddonStar2.DisplayName: Starmageddon Star StormSurgeTornado.DisplayName: Surge SulphuricBlast.DisplayName: Sulphuric Blast SuperballBulletProj.DisplayName: Superball Bullet diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 37168b1091..6f9a4694fb 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -297,4 +297,15 @@ WulfrumEnergyBurst.DisplayName: Bolt WulfrumFusionBolt.DisplayName: Fusion Bolt YharonMinionFireball.DisplayName: Dragon Fireball YoungDuke.DisplayName: Young Old Duke -IceClasperSummonProjectile.DisplayName: Ice Shard \ No newline at end of file +IceClasperSummonProjectile.DisplayName: Ice Shard +AtzirisDisfavor.DisplayName: Atziri's Disfavor +Starforge.DisplayName: Starforge +Paradoxica.DisplayName: Paradoxica +StarforgeBlast.DisplayName: Starforge Blast +WindRipper.DisplayName: Wind Ripper +WindRipperArrow.DisplayName: Wind Ripper Arrow +HopeShredder.DisplayName: Hope Shredder +HopeShredderArrow.DisplayName: Hope Shredder Arrow +HopeShredderArrowSplit.DisplayName: Hope Shredder Split Arrow +StellarTorusSummon.DisplayName: Stellar Torus Summon +StellarTorusBeam.DisplayName: Stellar Torus Beam \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.Status.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Status.Boss.hjson index 13a3d6ef6a..52f9015e80 100644 --- a/Localization/en-US/Mods.CalamityMod.Status.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Status.Boss.hjson @@ -5,7 +5,7 @@ CryogenBossText: Cryogen is derping out! PyrogenBossText: Pyrogen is derping out! /* Calamitas Clone */ CalamitasBossText: You underestimate my power... -CalamitasBossText2: The brothers have been reborn! +CalamitasBossText2: Rise again, my siblings. CalamitasBossText3: Impressive child, most impressive... /* Great Sand Shark */ SandSharkText: Something stirs in the warm desert sands... diff --git a/Localization/en-US/Mods.CalamityMod.Tiles.hjson b/Localization/en-US/Mods.CalamityMod.Tiles.hjson index 37c5e1cea6..a6610b23ae 100644 --- a/Localization/en-US/Mods.CalamityMod.Tiles.hjson +++ b/Localization/en-US/Mods.CalamityMod.Tiles.hjson @@ -20,9 +20,9 @@ Server: Server Terminal: Terminal // Individual entries // Sulphurous Sea & Abyss -SteamGeyser1.MapEntry: Geyser -AbyssVent1.MapEntry: Steam Vent -ThermalVent1.MapEntry: Thermal Vent +SteamGeyser.MapEntry: Geyser +AbyssVent.MapEntry: Steam Vent +ThermalVent.MapEntry: Thermal Vent // Brimstone Crag SpineSapling.MapEntry: Spine Sapling SpineTree.MapEntry: Giant Spine @@ -46,19 +46,13 @@ UelibloomOre.MapEntry: Uelibloom ArenaTile.MapEntry: Arena AshenChest: { - MapEntry0: "{$ItemName.AshenChest}" - MapEntry1: Locked Ashen Chest + MapEntry0: "{$Mods.CalamityMod.Items.Placeables.AshenChest.DisplayName}" + MapEntry1: Locked {$Mods.CalamityMod.Items.Placeables.AshenChest.DisplayName} } AstralChestLocked: { - MapEntry0: "{$ItemName.AstralChest}" - MapEntry1: Locked Astral Chest + MapEntry0: "{$Mods.CalamityMod.Items.Placeables.AstralChest.DisplayName}" + MapEntry1: Locked {$Mods.CalamityMod.Items.Placeables.AstralChest.DisplayName} } -PlaguedPlateBed.MapEntry: "'Bed'" -SteamGeyser3.MapEntry: Steam Geyser3 -SteamGeyser2.MapEntry: Steam Geyser2 -ThermalVent3.MapEntry: Thermal Vent3 -ThermalVent2.MapEntry: Thermal Vent2 -AbyssVent3.MapEntry: Abyss Vent3 -AbyssVent2.MapEntry: Abyss Vent2 \ No newline at end of file +PlaguedPlateBed.MapEntry: "'Bed'" \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index d77b02dd95..496cb28f5a 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -88,6 +88,8 @@ Cooldowns: { InkBomb: Ink Bomb Cooldown LifeSteal: Life Steal Cooldown LionHeartShield: Energy Shell Cooldown + MasterChefShieldDurability: Energy Shield Durability + MasterChefShieldRecharge: Energy Shield Recharge NebulousCore: Nebulous Core Cooldown OmegaBlueActive: Abyssal Madness OmegaBlueCooldown: Abyssal Madness Cooldown diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 34921ff0f1..168e97d359 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -12,6 +12,7 @@ using CalamityMod.Items.PermanentBoosters; using CalamityMod.Items.Pets; using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.CraftingStations; using CalamityMod.Items.Placeables.Furniture.DevPaintings; using CalamityMod.Items.Placeables.Furniture.Trophies; @@ -150,16 +151,18 @@ namespace CalamityMod /// 17.0 = Lunatic Cultist
/// 18.0 = Moon Lord /// - private static readonly Dictionary BossDifficulty = new Dictionary + private static readonly Dictionary ModProgression = new Dictionary { { "DesertScourge", 1.6f }, { "GiantClam", 1.61f }, + { "AcidRainT1", 2.67f }, { "Crabulon", 2.7f }, { "HiveMind", 3.98f }, { "Perforators", 3.99f }, { "SlimeGod", 6.7f }, // Thorium Granite Energy Storm is 6.4f, Buried Champion is 6.5f, and Star Scouter is 6.9f { "Cryogen", 8.5f }, { "AquaticScourge", 9.5f }, + { "AcidRainT2", 9.51f }, { "CragmawMire", 9.52f }, { "BrimstoneElemental", 10.5f }, { "CalamitasClone", 11.7f }, // Thorium Lich is 11.6f @@ -176,32 +179,25 @@ namespace CalamityMod { "StormWeaver", 19.61f }, { "Signus", 19.62f }, { "Polterghast", 20f }, + { "AcidRainT3", 20.49f }, { "Mauler", 20.491f }, { "NuclearTerror", 20.492f }, { "OldDuke", 20.5f }, - { "DevourerOfGods", 21f }, + { "DevourerofGods", 21f }, { "Yharon", 22f }, { "ExoMechs", 22.99f }, { "Calamitas", 23f }, - { "AdultEidolonWyrm", 23.5f }, + // { "AdultEidolonWyrm", 23.5f }, + { "BossRush", 25.99f }, // { "Yharim", 24f }, // { "Noxus", 25f }, // { "Xeroc", 26f }, }; - private static readonly Dictionary InvasionDifficulty = new Dictionary - { - { "Acid Rain Initial", 2.67f }, - { "Acid Rain Aquatic Scourge", 9.51f }, - { "Acid Rain Polterghast", 20.49f }, - { "Boss Rush", 25.99f } - }; - public static void Setup() { BossChecklistSupport(); FargosSupport(); - CensusSupport(); DialogueTweakSupport(); SummonersAssociationSupport(); } @@ -306,53 +302,6 @@ namespace CalamityMod EnemyRedirect(ModContent.NPCType(), "%3F%3F%3F"); } - // Wrapper function to add bosses to Boss Checklist. - private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, object summon, - List collection, string instructions, string despawn, Func available, Action portrait = null, string bossHeadTex = null) - { - bossChecklist.Call("AddBoss", hostMod, name, npcType, difficulty, downed, available, collection, summon ?? null, instructions, despawn, portrait, bossHeadTex); - } - - // Wrapper function to add bosses with multiple segments or phases to Boss Checklist. - private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, List npcTypes, Func downed, object summon, - List collection, string instructions, string despawn, Func available, Action portrait = null, string bossHeadTex = null) - { - bossChecklist.Call("AddBoss", hostMod, name, npcTypes, difficulty, downed, available, collection, summon ?? null, instructions, despawn, portrait, bossHeadTex); - } - - // Wrapper function to add minibosses to Boss Checklist. - private static void AddMiniBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, object summon, - List collection, string instructions, string despawn, Func available, Action portrait = null, string bossHeadTex = null) - { - bossChecklist.Call("AddMiniBoss", hostMod, name, npcType, difficulty, downed, available, collection, summon ?? null, instructions, despawn, portrait, bossHeadTex); - } - - // Wrapper function to add events to Boss Checklist. - private static void AddInvasion(Mod bossChecklist, Mod hostMod, string name, float difficulty, List npcTypes, Func downed, object summon, - List collection, string instructions, Func available, Action portrait = null, string bossHeadTex = null) - { - bossChecklist.Call("AddEvent", hostMod, name, npcTypes, difficulty, downed, available, collection, summon ?? null, instructions, portrait, bossHeadTex); - } - - // Wrapper function to add loot and collection items to vanilla bosses for Boss Checklist. - private static void AddLoot(Mod bossChecklist, string bossName, List loot = null, List collection = null) - => AddLoot(bossChecklist, "Terraria", bossName, loot, collection); - - // Wrapper function to add loot and collection items to other mods' bosses for Boss Checklist. - private static void AddLoot(Mod bossChecklist, string mod, string bossName, List loot = null, List collection = null) - { - if (loot != null) - bossChecklist.Call("AddToBossLoot", mod, bossName, loot); - if (collection != null) - bossChecklist.Call("AddToBossCollection", mod, bossName, collection); - } - - // Wrapper function to add summon items to vanilla bosses for Boss Checklist. - private static void AddSummons(Mod bossChecklist, string bossName, List summons) => AddSummons(bossChecklist, "Terraria", bossName, summons); - - // Wrapper function to add summon items to other mods' bosses for Boss Checklist. - private static void AddSummons(Mod bossChecklist, string mod, string bossName, List summons) => bossChecklist.Call("AddToBossSpawnItems", mod, bossName, summons); - // Wrapper function to detect if a subworld is in use for Subworld Library. internal static bool InAnySubworld() { @@ -371,6 +320,18 @@ namespace CalamityMod return false; } + // Wrapper function to add bosses to Boss Checklist. + private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, object npcTypes, Func downed, Dictionary extraInfo) + => bossChecklist.Call("LogBoss", hostMod, name, difficulty, downed, npcTypes, extraInfo); + + // Wrapper function to add minibosses to Boss Checklist. + private static void AddMiniBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, Dictionary extraInfo) + => bossChecklist.Call("LogMiniBoss", hostMod, name, difficulty, downed, npcType, extraInfo); + + // Wrapper function to add events to Boss Checklist. + private static void AddInvasion(Mod bossChecklist, Mod hostMod, string name, float difficulty, List npcTypes, Func downed, Dictionary extraInfo) + => bossChecklist.Call("LogEvent", hostMod, name, difficulty, downed, npcTypes, extraInfo); + private static void BossChecklistSupport() { CalamityMod calamity = GetInstance(); @@ -384,398 +345,456 @@ namespace CalamityMod // Adds every single Calamity invasion to the Boss Checklist's Invasion Log. AddCalamityInvasions(bossChecklist, calamity); - // Loot which Calamity adds to vanilla bosses and events is also added to Boss Checklist's Boss Log. - AddCalamityBossLoot(bossChecklist); - AddCalamityEventLoot(bossChecklist); + // Registers Calamity's special loot (ie. Lore items) and alternate spawn items to Boss Checklist's Boss Log. + RegisterCalamityExtraInfo(bossChecklist, calamity); } private static void AddCalamityBosses(Mod bossChecklist, Mod calamity) { // Desert Scourge { - BossDifficulty.TryGetValue("DesertScourge", out float order); + string entryName = "DesertScourge"; + ModProgression.TryGetValue(entryName, out float order); List segments = new List() { NPCType(), NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Desert Biome"; - string despawn = CalamityUtils.ColorMessage("The scourge of the desert delves back into the sand.", new Color(0xEE, 0xE8, 0xAA)); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/DesertScourge/DesertScourge_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - string bossHeadTex = "CalamityMod/NPCs/DesertScourge/DesertScourgeHead_Head_Boss"; - AddBoss(bossChecklist, calamity, "Desert Scourge", order, segments, DownedDesertScourge, summon, collection, instructions, despawn, () => true, portrait, bossHeadTex); + AddBoss(bossChecklist, calamity, entryName, order, segments, DownedDesertScourge, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Giant Clam { - BossDifficulty.TryGetValue("GiantClam", out float order); + string entryName = "GiantClam"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - string instructions = "Can spawn naturally in the Sunken Sea"; - string despawn = CalamityUtils.ColorMessage("The Giant Clam returns into hiding in its grotto.", new Color(0x7F, 0xFF, 0xD4)); - AddMiniBoss(bossChecklist, calamity, "Giant Clam", order, type, DownedGiantClam, null, null, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType() }; + AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedGiantClam, new Dictionary() + { + ["collectibles"] = collection + }); } // Crabulon { - BossDifficulty.TryGetValue("Crabulon", out float order); + string entryName = "Crabulon"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Mushroom Biome"; - string despawn = CalamityUtils.ColorMessage("The monstrous mycelial crab shuffles away…", new Color(0x64, 0x95, 0xED)); - AddBoss(bossChecklist, calamity, "Crabulon", order, type, DownedCrabulon, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedCrabulon, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Hive Mind { - BossDifficulty.TryGetValue("HiveMind", out float order); + string entryName = "HiveMind"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Kill a Tumor in the Corruption or use a [i:{summon}] in the Corruption"; - string despawn = CalamityUtils.ColorMessage("The Hive Mind flits away to brood elsewhere.", new Color(0x94, 0x00, 0xD3)); - string bossHeadTex = "CalamityMod/NPCs/HiveMind/HiveMindP2_Head_Boss"; - AddBoss(bossChecklist, calamity, "The Hive Mind", order, type, DownedHiveMind, summon, collection, instructions, despawn, () => true, null, bossHeadTex); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedHiveMind, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["overrideHeadTextures"] = "CalamityMod/NPCs/HiveMind/HiveMindP2_Head_Boss" + }); } // Perforators { - BossDifficulty.TryGetValue("Perforators", out float order); + string entryName = "Perforators"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Kill a Cyst in the Crimson or use a [i:{summon}] in the Crimson"; - string despawn = CalamityUtils.ColorMessage("The Perforators search for more hosts to gorge themselves on.", new Color(0xDC, 0x14, 0x3C)); - AddBoss(bossChecklist, calamity, "The Perforators", order, type, DownedPerfs, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedPerfs, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Slime God { - BossDifficulty.TryGetValue("SlimeGod", out float order); + string entryName = "SlimeGod"; + ModProgression.TryGetValue(entryName, out float order); List bosses = new List() { NPCType(), NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use an [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The grimy, gelatinous God hops away, its vengeance achieved.", new Color(0xBA, 0x55, 0x33)); - AddBoss(bossChecklist, calamity, "Slime God", order, bosses, DownedSlimeGod, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedSlimeGod, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Cryogen { - BossDifficulty.TryGetValue("Cryogen", out float order); + string entryName = "Cryogen"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Snow Biome"; - string despawn = CalamityUtils.ColorMessage("Cryogen disappears amidst the biting winds of the blizzard.", new Color(0x00, 0xFF, 0xFF)); - string bossLogTex = "CalamityMod/NPCs/Cryogen/Cryogen_Phase1_Head_Boss"; - AddBoss(bossChecklist, calamity, "Cryogen", order, type, DownedCryogen, summon, collection, instructions, despawn, () => true, null, bossLogTex); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedCryogen, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["overrideHeadTextures"] = "CalamityMod/NPCs/Cryogen/Cryogen_Phase1_Head_Boss" + }); } // Aquatic Scourge { - BossDifficulty.TryGetValue("AquaticScourge", out float order); + string entryName = "AquaticScourge"; + ModProgression.TryGetValue(entryName, out float order); List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Sulphuric Sea or wait for it to spawn in the Sulphuric Sea"; - string despawn = CalamityUtils.ColorMessage("The poisoned scourge swims back to the tranquil, open ocean.", new Color(0xF0, 0xE6, 0x8C)); - string bossLogTex = "CalamityMod/NPCs/AquaticScourge/AquaticScourgeHead_Head_Boss"; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/AquaticScourge/AquaticScourge_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - AddBoss(bossChecklist, calamity, "Aquatic Scourge", order, segments, DownedAquaticScourge, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, segments, DownedAquaticScourge, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Cragmaw Mire { - BossDifficulty.TryGetValue("CragmawMire", out float order); + string entryName = "CragmawMire"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - string instructions = $"Spawns during Acid Rain after the Aquatic Scourge has been defeated.\nStart Acid Rain with a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The Cragmaw Mire buries itself within the sand.", new Color(0xF0, 0xE6, 0x8C)); - AddMiniBoss(bossChecklist, calamity, "Cragmaw Mire", order, type, DownedCragmawMire, null, null, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType() }; + AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedCragmawMire, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["availability"] = DownedAcidRainInitial + }); } // Brimstone Elemental { - BossDifficulty.TryGetValue("BrimstoneElemental", out float order); + string entryName = "BrimstoneElemental"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Brimstone Crag"; - string despawn = CalamityUtils.ColorMessage("The elemental ever maintains her somber vigil over Azafure…", new Color(0xDC, 0x14, 0x3C)); - AddBoss(bossChecklist, calamity, "Brimstone Elemental", order, type, DownedBrimstoneElemental, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedBrimstoneElemental, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Calamitas Clone { - BossDifficulty.TryGetValue("CalamitasClone", out float order); + string entryName = "CalamitasClone"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use an [i:{summon}] at Night"; - string despawn = CalamityUtils.ColorMessage("The clone spits a bit of blood in disappointment and vanishes.", new Color(0xFF, 0xA5, 0x00)); - AddBoss(bossChecklist, calamity, "The Calamitas Clone", order, type, DownedCalClone, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedCalClone, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Great Sand Shark { - BossDifficulty.TryGetValue("GreatSandShark", out float order); + string entryName = "GreatSandShark"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemID.MusicBoxSandstorm }; - string instructions = $"Kill 10 sand sharks after defeating Plantera or use a [i:{summon}] in the Desert Biome"; - string despawn = CalamityUtils.ColorMessage("The apex predator of the sands disappears between the dunes.", new Color(0xDA, 0xA5, 0x20)); - AddMiniBoss(bossChecklist, calamity, "Great Sand Shark", order, type, DownedGSS, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemID.MusicBoxSandstorm }; + AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedGSS, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Anahita and Leviathan { - BossDifficulty.TryGetValue("Leviathan", out float order); + string entryName = "Leviathan"; + ModProgression.TryGetValue(entryName, out float order); List bosses = new List() { NPCType(), NPCType() }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = "By killing an unknown entity in the Ocean Biome"; - string despawn = CalamityUtils.ColorMessage("The aquatic outcasts return to their lonesome company.", new Color(0x7F, 0xFF, 0xD4)); - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/Leviathan/AnahitaLevi_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - AddBoss(bossChecklist, calamity, "Leviathan", order, bosses, DownedLeviathan, null, collection, instructions, despawn, () => true, portrait); + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedLeviathan, new Dictionary() + { + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Astrum Aureus { - BossDifficulty.TryGetValue("AstrumAureus", out float order); + string entryName = "AstrumAureus"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use an [i:{summon}] at Night in the Astral Biome"; - string despawn = CalamityUtils.ColorMessage("Aureus has neutralized all threats. Resume prior reconnaissance.", new Color(0xFF, 0xD7, 0x00)); - string bossLogTex = "CalamityMod/NPCs/AstrumAureus/AstrumAureus_Head_Boss"; - AddBoss(bossChecklist, calamity, "Astrum Aureus", order, type, DownedAureus, summon, collection, instructions, despawn, () => true, null, bossLogTex); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedAureus, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Plaguebringer Goliath { - BossDifficulty.TryGetValue("PlaguebringerGoliath", out float order); + string entryName = "PlaguebringerGoliath"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use an [i:{summon}] in the Jungle Biome"; - string despawn = CalamityUtils.ColorMessage("SPECIMENS EUTHANIZED. EXITING COMBAT PROTOCOL.", new Color(0x00, 0xFF, 0x00)); - string bossLogTex = "CalamityMod/NPCs/PlaguebringerGoliath/PlaguebringerGoliath_Head_Boss"; - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/PlaguebringerGoliath/PlaguebringerGoliath_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - AddBoss(bossChecklist, calamity, "Plaguebringer Goliath", order, type, DownedPBG, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, type, DownedPBG, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Ravager { - BossDifficulty.TryGetValue("Ravager", out float order); + string entryName = "Ravager"; + ModProgression.TryGetValue(entryName, out float order); List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The Ravager resumes its aimless, horrific rampage.", new Color(0xB2, 0x22, 0x22)); - string bossLogTex = "CalamityMod/NPCs/Ravager/RavagerBody_Head_Boss"; - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/Ravager/Ravager_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - AddBoss(bossChecklist, calamity, "Ravager", order, segments, DownedRavager, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, segments, DownedRavager, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Astrum Deus { - BossDifficulty.TryGetValue("AstrumDeus", out float order); + string entryName = "AstrumDeus"; + ModProgression.TryGetValue(entryName, out float order); List segments = new List() { NPCType(), NPCType(), NPCType() }; - int summon1 = ItemType(); - int summon2 = ItemType(); - int altar = ItemType(); - List summons = new List() { summon1, summon2 }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon1}] or [i:{summon2}] as offering at an [i:{altar}]"; - string despawn = CalamityUtils.ColorMessage("The infected deity retreats to the heavens.", new Color(0xFF, 0xD7, 0x00)); - string bossLogTex = "CalamityMod/NPCs/AstrumDeus/AstrumDeusHead_Head_Boss"; - + List summons = new List() { ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/AstrumDeus/AstrumDeus_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - AddBoss(bossChecklist, calamity, "Astrum Deus", order, segments, DownedDeus, summons, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, segments, DownedDeus, new Dictionary() + { + ["spawnItems"] = summons, + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Profaned Guardians { - BossDifficulty.TryGetValue("ProfanedGuardians", out float order); + string entryName = "ProfanedGuardians"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Hallow or Underworld Biomes"; - string despawn = CalamityUtils.ColorMessage("The Guardians are recalled to their Goddess' side.", new Color(0xFF, 0xA5, 0x00)); - string bossLogTex = "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianCommander_Head_Boss"; - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardians_BossChecklist").Value; float scale = 0.7f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddBoss(bossChecklist, calamity, "Profaned Guardians", order, type, DownedGuardians, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, type, DownedGuardians, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianCommander_Head_Boss" + }); } // Dragonfolly { - BossDifficulty.TryGetValue("Dragonfolly", out float order); + string entryName = "Dragonfolly"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use [i:{summon}] in the Jungle Biome"; - string despawn = CalamityUtils.ColorMessage("The folly returns to its secluded roost.", new Color(0xFF, 0xD7, 0x00)); - AddBoss(bossChecklist, calamity, "Dragonfolly", order, type, DownedBirb, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedBirb, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Providence { - BossDifficulty.TryGetValue("Providence", out float order); + string entryName = "Providence"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use [i:{summon}] in the Hallow or Underworld Biomes"; - string despawn = CalamityUtils.ColorMessage("The Profaned Goddess veils herself in purifying flame, leaving only ashes behind…", new Color(0xFF, 0xA5, 0x00)); - string bossLogTex = "CalamityMod/NPCs/Providence/Providence_Head_Boss"; - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/Providence/Providence_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - AddBoss(bossChecklist, calamity, "Providence", order, type, DownedProvidence, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, type, DownedProvidence, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Ceaseless Void { - BossDifficulty.TryGetValue("CeaselessVoid", out float order); + string entryName = "CeaselessVoid"; + ModProgression.TryGetValue(entryName, out float order); List bosses = new List() { NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Dungeon"; - string despawn = CalamityUtils.ColorMessage("The ancient spatial rift slips away to places unknown.", new Color(0x4B, 0x00, 0x82)); - AddBoss(bossChecklist, calamity, "Ceaseless Void", order, bosses, DownedCeaselessVoid, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedCeaselessVoid, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Storm Weaver { - BossDifficulty.TryGetValue("StormWeaver", out float order); + string entryName = "StormWeaver"; + ModProgression.TryGetValue(entryName, out float order); List segments = new List() { NPCType(), NPCType(), NPCType() }; - int summon = ItemType(); List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in Space"; - string despawn = CalamityUtils.ColorMessage("Storm Weaver hides itself within the fierce anvilhead clouds.", new Color(0xEE, 0x82, 0xEE)); - string bossLogTex = "CalamityMod/NPCs/StormWeaver/StormWeaverHead_Head_Boss"; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/StormWeaver/StormWeaver_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - AddBoss(bossChecklist, calamity, "Storm Weaver", order, segments, DownedStormWeaver, summon, collection, instructions, despawn, () => true, portrait, bossLogTex); + AddBoss(bossChecklist, calamity, entryName, order, segments, DownedStormWeaver, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/NPCs/StormWeaver/StormWeaverHead_Head_Boss" + }); } // Signus { - BossDifficulty.TryGetValue("Signus", out float order); + string entryName = "Signus"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}] in the Underworld"; - string despawn = CalamityUtils.ColorMessage("Signus inexplicably ceases to be where he once was.", new Color(0xBA, 0x55, 0xD3)); - AddBoss(bossChecklist, calamity, "Signus", order, type, DownedSignus, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedSignus, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Polterghast { - BossDifficulty.TryGetValue("Polterghast", out float order); + string entryName = "Polterghast"; + ModProgression.TryGetValue(entryName, out float order); List bosses = new List() { NPCType(), NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Kill 30 phantom spirits or use a [i:{summon}] in the Dungeon"; - string despawn = CalamityUtils.ColorMessage("The volatile phantasm disperses in an echoing wail.", new Color(0xB0, 0xE0, 0xE6)); - AddBoss(bossChecklist, calamity, "Polterghast", order, bosses, DownedPolterghast, summon, collection, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedPolterghast, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Mauler { - BossDifficulty.TryGetValue("Mauler", out float order); + string entryName = "Mauler"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - string instructions = $"Spawns during Acid Rain after Polterghast has been defeated.\nStart Acid Rain with a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The brutish shark looks elsewhere to turn its aggression.", new Color(0xF0, 0xE6, 0x8C)); - AddMiniBoss(bossChecklist, calamity, "Mauler", order, type, DownedMauler, null, null, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType() }; + AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedMauler, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["availability"] = DownedAcidRainHardmode + }); } // Nuclear Terror { - BossDifficulty.TryGetValue("NuclearTerror", out float order); + string entryName = "NuclearTerror"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - string instructions = $"Spawns during Acid Rain after Polterghast has been defeated.\nStart Acid Rain with a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The radioactive aberration fades away in a sickly light.", new Color(0xF0, 0xE6, 0x8C)); - AddMiniBoss(bossChecklist, calamity, "Nuclear Terror", order, type, DownedNuclearTerror, null, null, instructions, despawn, () => true); + List collection = new List() { ItemType(), ItemType() }; + AddMiniBoss(bossChecklist, calamity, entryName, order, type, DownedNuclearTerror, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["availability"] = DownedAcidRainHardmode + }); } // Old Duke { - BossDifficulty.TryGetValue("OldDuke", out float order); - List bosses = new List() { NPCType() }; - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Defeat the Acid Rain event post-Polterghast or fish using a [i:{summon}] in the Sulphurous Sea"; - string despawn = CalamityUtils.ColorMessage("The old duke retreats further into the acidic downpour.", new Color(0xF0, 0xE6, 0x8C)); - AddBoss(bossChecklist, calamity, "Old Duke", order, bosses, DownedBoomerDuke, summon, collection, instructions, despawn, () => true); + string entryName = "OldDuke"; + ModProgression.TryGetValue(entryName, out float order); + int type = NPCType(); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedBoomerDuke, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Devourer of Gods { - BossDifficulty.TryGetValue("DevourerOfGods", out float order); + string entryName = "DevourerofGods"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The Devourer of Gods haughtily returns to the depths of the Distortion.", new Color(0x00, 0xFF, 0xFF)); - string bossHeadTex = "CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead_Head_Boss"; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGods_BossChecklist").Value; Vector2 centered = new Vector2(rect.Center.X - (texture.Width / 2), rect.Center.Y - (texture.Height / 2)); sb.Draw(texture, centered, color); }; - AddBoss(bossChecklist, calamity, "Devourer of Gods", order, type, DownedDoG, summon, collection, instructions, despawn, () => true, portrait, bossHeadTex); + AddBoss(bossChecklist, calamity, entryName, order, type, DownedDoG, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead_Head_Boss" + }); } // Yharon { - BossDifficulty.TryGetValue("Yharon", out float order); + string entryName = "Yharon"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon = ItemType(); - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use a [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("Yharon soars out of sight, his task fulfilled.", new Color(0xFF, 0xA5, 0x00)); - string bossLogTex = "CalamityMod/NPCs/Yharon/Yharon_Head_Boss"; - AddBoss(bossChecklist, calamity, "Yharon", order, type, DownedYharon, summon, collection, instructions, despawn, () => true, null, bossLogTex); + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedYharon, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection + }); } // Exo Mechs @@ -783,12 +802,10 @@ namespace CalamityMod // Instructions require edits // Despawn requires edits { - BossDifficulty.TryGetValue("ExoMechs", out float order); + string entryName = "ExoMechs"; + ModProgression.TryGetValue(entryName, out float order); List bosses = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = "By using a high-tech computer"; - string despawn = CalamityUtils.ColorMessage("An imperfection after all… what a shame.", new Color(0x7F, 0xFF, 0xD4)); - + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = Request("CalamityMod/NPCs/ExoMechs/ExoMechs_BossChecklist").Value; float scale = 0.7f; @@ -796,22 +813,26 @@ namespace CalamityMod sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddBoss(bossChecklist, calamity, "Exo Mechs", order, bosses, DownedExoMechs, null, collection, instructions, despawn, () => true, portrait); + AddBoss(bossChecklist, calamity, entryName, order, bosses, DownedExoMechs, new Dictionary() + { + ["collectibles"] = collection, + ["customPortrait"] = portrait + }); } // Calamitas { - BossDifficulty.TryGetValue("Calamitas", out float order); + string entryName = "Calamitas"; + ModProgression.TryGetValue(entryName, out float order); int type = NPCType(); - int summon1 = ItemType(); - int summon2 = ItemType(); - int altar = ItemType(); - List summons = new List() { summon1, summon2 }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; - string instructions = $"Use [i:{summon1}] or a [i:{summon2}] as offering at an [i:{altar}]"; - string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00)); - string bossHeadTex = "CalamityMod/NPCs/SupremeCalamitas/HoodedHeadIcon"; - AddBoss(bossChecklist, calamity, "Supreme Witch, Calamitas", order, type, DownedSCal, summons, collection, instructions, despawn, () => true, null, bossHeadTex); + List summons = new List() { ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + AddBoss(bossChecklist, calamity, entryName, order, type, DownedSCal, new Dictionary() + { + ["spawnItems"] = summons, + ["collectibles"] = collection, + ["overrideHeadTextures"] = "CalamityMod/NPCs/SupremeCalamitas/HoodedHeadIcon" + }); } } @@ -819,241 +840,118 @@ namespace CalamityMod { // Initial Acid Rain { - InvasionDifficulty.TryGetValue("Acid Rain Initial", out float order); + string entryName = "AcidRainT1"; + ModProgression.TryGetValue(entryName, out float order); List enemies = AcidRainEvent.PossibleEnemiesPreHM.Select(enemy => enemy.Key).ToList(); - int summon = ItemType(); - List collection = new List() { ItemType() }; - string instructions = $"Use a [i:{summon}] or wait for the invasion to occur naturally after the Eye of Cthulhu is defeated."; - string iconTexture = "CalamityMod/UI/MiscTextures/AcidRainIcon"; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/Events/AcidRainT1_BossChecklist").Value; - float scale = 1.3f; + float scale = 1f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddInvasion(bossChecklist, calamity, "Acid Rain", order, enemies, DownedAcidRainInitial, summon, collection, instructions, () => true, portrait, iconTexture); + AddInvasion(bossChecklist, calamity, entryName, order, enemies, DownedAcidRainInitial, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = ItemType(), + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/UI/MiscTextures/AcidRainIcon" + }); } // Post-Aquatic Scourge Acid Rain { - InvasionDifficulty.TryGetValue("Acid Rain Aquatic Scourge", out float order); + string entryName = "AcidRainT2"; + ModProgression.TryGetValue(entryName, out float order); List enemies = AcidRainEvent.PossibleEnemiesAS.Select(enemy => enemy.Key).ToList(); enemies.Add(ModContent.NPCType()); enemies.AddRange(AcidRainEvent.PossibleMinibossesAS.Select(miniboss => miniboss.Key)); - List summons = new List() { ItemType() }; - List collection = new List() { ItemType() }; - string instructions = $"Use a [i:{ItemType()}] or wait for the invasion to occur naturally after the Aquatic Scourge is defeated"; - string iconTexture = "CalamityMod/UI/MiscTextures/AcidRainIcon"; + List collection = new List() { ItemType(), ItemType(), ItemType()}; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/Events/AcidRainT2_BossChecklist").Value; float scale = 0.9f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddInvasion(bossChecklist, calamity, "Acid Rain (Post-AS)", order, enemies, DownedAcidRainHardmode, summons, collection, instructions, () => true, portrait, iconTexture); + AddInvasion(bossChecklist, calamity, entryName, order, enemies, DownedAcidRainHardmode, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/UI/MiscTextures/AcidRainIcon", + ["availability"] = DownedAcidRainInitial + }); } // Post-Polterghast Acid Rain { - InvasionDifficulty.TryGetValue("Acid Rain Polterghast", out float order); + string entryName = "AcidRainT3"; + ModProgression.TryGetValue(entryName, out float order); List enemies = AcidRainEvent.PossibleEnemiesPolter.Select(enemy => enemy.Key).ToList(); enemies.AddRange(AcidRainEvent.PossibleMinibossesPolter.Select(miniboss => miniboss.Key)); - List summons = new List() { ItemType() }; - List collection = new List() { ItemType() }; - string instructions = $"Use a [i:{ItemType()}] or wait for the invasion to occur naturally after the Polterghast is defeated"; - string iconTexture = "CalamityMod/UI/MiscTextures/AcidRainIcon"; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType()}; Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/Events/AcidRainT3_BossChecklist").Value; float scale = 0.9f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddInvasion(bossChecklist, calamity, "Acid Rain (Post-Polter)", order, enemies, DownedBoomerDuke, summons, collection, instructions, () => true, portrait, iconTexture); + AddInvasion(bossChecklist, calamity, entryName, order, enemies, DownedBoomerDuke, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = collection, + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/UI/MiscTextures/AcidRainIcon", + ["availability"] = DownedAcidRainHardmode + }); } // Boss Rush { - InvasionDifficulty.TryGetValue("Boss Rush", out float order); - List enemies = new List() { 0 }; // This is for loot purposes, which no bosses give during the event - List summons = new List() { ItemType() }; - List collection = new List() { ItemType() }; - string instructions = $"Use a [i:{ItemType()}] found at the bottom of the Abyss"; - string iconTexture = "CalamityMod/UI/MiscTextures/BossRushIcon"; + string entryName = "BossRush"; + ModProgression.TryGetValue(entryName, out float order); + List enemies = new List() { NPCID.None }; // This is for loot purposes, which no bosses give during the event Action portrait = (SpriteBatch sb, Rectangle rect, Color color) => { Texture2D texture = ModContent.Request("CalamityMod/Skies/XerocEye").Value; float scale = 0.5f; Vector2 centered = new Vector2(rect.Center.X - texture.Width * scale / 2, rect.Center.Y - texture.Height * scale / 2); sb.Draw(texture, centered, null, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); }; - AddInvasion(bossChecklist, calamity, "Boss Rush", order, enemies, DownedBossRush, summons, collection, instructions, () => true, portrait, iconTexture); + AddInvasion(bossChecklist, calamity, entryName, order, enemies, DownedBossRush, new Dictionary() + { + ["spawnItems"] = ItemType(), + ["collectibles"] = ItemType(), + ["customPortrait"] = portrait, + ["overrideHeadTextures"] = "CalamityMod/UI/MiscTextures/BossRushIcon" + }); } } - private static void AddCalamityBossLoot(Mod bossChecklist) + private static void RegisterCalamityExtraInfo(Mod bossChecklist, Mod calamity) { - // King Slime - AddLoot(bossChecklist, "KingSlime", - new List() { ItemType() }, - new List() { ItemType(), ItemType() } - ); + bossChecklist.Call("SubmitEntrySpawnItems", calamity, new Dictionary() + { + { "Terraria Plantera", ItemType() }, + { "Terraria Golem", ItemType() }, + { "Terraria CultistBoss", ItemType() } + }); - // Eye of Cthulhu - AddLoot(bossChecklist, "EyeofCthulhu", - new List() { ItemType(), ItemType() }, - new List() { ItemType(), ItemType() } - ); - - // Eater of Worlds - AddLoot(bossChecklist, "EaterofWorldsHead", - null, - new List() { ItemType(), ItemType(), ItemType() } - ); - - // Brain of Cthulhu - AddLoot(bossChecklist, "BrainofCthulhu", - null, - new List() { ItemType(), ItemType(), ItemType() } - ); - - // Queen Bee - AddLoot(bossChecklist, "QueenBee", - new List() { ItemType(), ItemID.Stinger, ItemType() }, - new List() { ItemType(), ItemType() } - ); - - // Skeletron - AddLoot(bossChecklist, "SkeletronHead", - null, - new List() { ItemType(), ItemType() } - ); - - // Wall of Flesh - AddLoot(bossChecklist, "WallofFlesh", - new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey }, - new List() { ItemType(), ItemType(), ItemType(), ItemType() } - ); - - // Queen Slime - AddLoot(bossChecklist, "QueenSlime", - new List() { ItemID.HallowedKey }, - new List() { ItemType(), ItemType() } - ); - - // The Twins - AddLoot(bossChecklist, "TheTwins", - new List() { ItemType() }, - new List() { ItemType(), ItemType(), ItemType() } - ); - - // The Destroyer - AddLoot(bossChecklist, "TheDestroyer", - new List() { ItemType(), ItemType(), ItemType() } - ); - - // Skeletron Prime - AddLoot(bossChecklist, "SkeletronPrime", - null, - new List() { ItemType(), ItemType(), ItemType() } - ); - - // Plantera - AddLoot(bossChecklist, "Plantera", - new List() { ItemType(), ItemType(), ItemType(), ItemID.JungleKey }, - new List() { ItemType(), ItemType() } - ); - AddSummons(bossChecklist, "Plantera", new List() { ItemType() }); - - // Golem - AddLoot(bossChecklist, "Golem", - new List() { ItemType(), ItemType() }, - new List() { ItemType(), ItemType() } - ); - AddSummons(bossChecklist, "Golem", new List() { ItemType() }); - - // Empress of Light - AddLoot(bossChecklist, "HallowBoss", - null, - new List() { ItemType(), ItemType() } - ); - - // Duke Fishron - AddLoot(bossChecklist, "DukeFishron", - new List() { ItemType(), ItemType() }, - new List() { ItemType(), ItemType() } - ); - - // Betsy - AddLoot(bossChecklist, "DD2Betsy", - null, - null - ); - - // Lunatic Cultist - AddLoot(bossChecklist, "CultistBoss", - null, - new List() { ItemType(), ItemType() } - ); - AddSummons(bossChecklist, "CultistBoss", new List() { ItemType() }); - - // Moon Lord - AddLoot(bossChecklist, "MoonLord", - new List() { ItemType(), ItemType() }, - new List() { ItemType(), ItemType() } - ); - } - - private static void AddCalamityEventLoot(Mod bossChecklist) - { - // Blood Moon - AddLoot(bossChecklist, "Blood Moon", - new List() { ItemType(), ItemType() }, - null - ); - - // Goblin Army - AddLoot(bossChecklist, "Goblin Army", - new List() { ItemType(), ItemType(), ItemType() }, - null - ); - - // Solar Eclipse - AddLoot(bossChecklist, "Solar Eclipse", - new List() { ItemType(), ItemType(), ItemType() }, - null - ); - - // Pumpkin Moon - AddLoot(bossChecklist, "Pumpkin Moon", - new List() { ItemType() }, - null - ); - AddLoot(bossChecklist, "Pumpking", - new List() { ItemType() }, - null - ); - - // Frost Moon - AddLoot(bossChecklist, "Frost Moon", - new List() { ItemType() }, - null - ); - AddLoot(bossChecklist, "Ice Queen", - new List() { ItemType() }, - null - ); - - // Martian Madness - AddLoot(bossChecklist, "Martian Madness", - new List() { ItemType(), ItemType(), ItemType() }, - null - ); - AddLoot(bossChecklist, "Martian Saucer", - new List() { ItemType() }, - null - ); - - // Lunar Events - AddLoot(bossChecklist, "Lunar Event", - new List() { ItemType() }, - null - ); + bossChecklist.Call("SubmitEntryCollectibles", calamity, new Dictionary() + { + { "Terraria KingSlime", new List() { ItemType(), ItemType() } }, + { "Terraria EyeofCthulhu", new List() { ItemType(), ItemType() } }, + { "Terraria EaterofWorldsHead", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria BrainofCthulhu", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria QueenBee", new List() { ItemType(), ItemType() } }, + { "Terraria SkeletronHead", new List() { ItemType(), ItemType() } }, + { "Terraria WallofFlesh", new List() { ItemType(), ItemType(), ItemType(), ItemType() } }, + { "Terraria QueenSlimeBoss", new List() { ItemType(), ItemType() } }, + { "Terraria TheTwins", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria TheDestroyer", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria SkeletronPrime", new List() { ItemType(), ItemType(), ItemType() } }, + { "Terraria Plantera", new List() { ItemType(), ItemType() } }, + { "Terraria Golem", new List() { ItemType(), ItemType() } }, + { "Terraria HallowBoss", new List() { ItemType(), ItemType() } }, + { "Terraria DukeFishron", new List() { ItemType(), ItemType() } }, + { "Terraria CultistBoss", new List() { ItemType(), ItemType() } }, + { "Terraria MoonLord", new List() { ItemType(), ItemType() } } + }); } private static void FargosSupport() @@ -1064,7 +962,7 @@ namespace CalamityMod void AddToMutantShop(string bossName, string summonItemName, Func downed, int price) { - BossDifficulty.TryGetValue(bossName, out float order); + ModProgression.TryGetValue(bossName, out float order); fargos.Call("AddSummon", order, "CalamityMod", summonItemName, downed, price); } @@ -1073,19 +971,6 @@ namespace CalamityMod AddToMutantShop("OldDuke", "BloodwormItem", DownedBoomerDuke, Item.buyPrice(platinum: 2)); } - private static void CensusSupport() - { - Mod censusMod = GetInstance().census; - if (censusMod != null) - { - censusMod.Call("TownNPCCondition", NPCType(), "Defeat a Giant Clam after defeating the Desert Scourge"); - censusMod.Call("TownNPCCondition", NPCType(), "Have a [i:" + ItemID.PlatinumCoin + "] in your inventory after defeating Skeletron"); - censusMod.Call("TownNPCCondition", NPCType(), "Have [i:" + ItemType() + "] in your inventory in Hardmode"); - censusMod.Call("TownNPCCondition", NPCType(), "Defeat Cryogen"); - censusMod.Call("TownNPCCondition", NPCType(), "Defeat Supreme Witch, Calamitas"); - } - } - private static void DialogueTweakSupport() { Mod dialogueMod = GetInstance().dialogueTweak; diff --git a/NPCs/Abyss/Bloatfish.cs b/NPCs/Abyss/Bloatfish.cs index f045165f51..f05e826e48 100644 --- a/NPCs/Abyss/Bloatfish.cs +++ b/NPCs/Abyss/Bloatfish.cs @@ -46,10 +46,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Heavy, large fish which can easily resist the crushing pressure of the depths and any weapon which might attempt to pierce its tough skin.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Bloatfish") }); } diff --git a/NPCs/Abyss/BobbitWormHead.cs b/NPCs/Abyss/BobbitWormHead.cs index 4b5e9d31cf..4271037e73 100644 --- a/NPCs/Abyss/BobbitWormHead.cs +++ b/NPCs/Abyss/BobbitWormHead.cs @@ -55,10 +55,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("An immense threat for those who dare venture into the depths. Nearly imperceptible when they choose to be, and lightning-fast when they attack, their jaws can cut through iron plates over half a foot thick.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BobbitWorm") }); } diff --git a/NPCs/Abyss/BoxJellyfish.cs b/NPCs/Abyss/BoxJellyfish.cs index 9539ab8b5f..157eba50ad 100644 --- a/NPCs/Abyss/BoxJellyfish.cs +++ b/NPCs/Abyss/BoxJellyfish.cs @@ -48,11 +48,10 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("These seemingly inept masses of gelatin are anything but harmless. Let even one of their trailing tentacles brush you, and you will be heavily envenomed.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BoxJellyfish") }); } diff --git a/NPCs/Abyss/ChaoticPuffer.cs b/NPCs/Abyss/ChaoticPuffer.cs index b9d5c1cf61..8f9c50ddca 100644 --- a/NPCs/Abyss/ChaoticPuffer.cs +++ b/NPCs/Abyss/ChaoticPuffer.cs @@ -56,7 +56,7 @@ namespace CalamityMod.NPCs.Abyss bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Anarchistic little devils, they swallow large amounts of water to inflate their bristling bodies. The water within them boils and bursts out in a scalding rush when they are killed.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ChaoticPuffer") }); } diff --git a/NPCs/Abyss/ColossalSquid.cs b/NPCs/Abyss/ColossalSquid.cs index 6cbd44064a..d2a2909f1d 100644 --- a/NPCs/Abyss/ColossalSquid.cs +++ b/NPCs/Abyss/ColossalSquid.cs @@ -60,10 +60,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("With crushing tentacles that stretch out to over twice the length of a grown man, and toxic black ink, these are formidable predators indeed.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ColossalSquid") }); } diff --git a/NPCs/Abyss/Cuttlefish.cs b/NPCs/Abyss/Cuttlefish.cs index 81b13c798a..6827b05362 100644 --- a/NPCs/Abyss/Cuttlefish.cs +++ b/NPCs/Abyss/Cuttlefish.cs @@ -49,10 +49,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Should you feel something brush your legs in the depths of the abyss, it is likely that this is the culprit, tasting the waters for potential prey.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Cuttlefish") }); } diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index 9e18615393..648d6e913e 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -63,10 +63,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A sturdy fish, which has spent a long time seething in the Abyss. Males are easily identified by their forward-facing horns.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DevilFish") }); } diff --git a/NPCs/Abyss/DevilFishAlt.cs b/NPCs/Abyss/DevilFishAlt.cs index fe7bd345fe..2fbacb3349 100644 --- a/NPCs/Abyss/DevilFishAlt.cs +++ b/NPCs/Abyss/DevilFishAlt.cs @@ -58,10 +58,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A sturdy fish, which has spent a long time seething in the Abyss. Females are easily identified by their curled horns.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DevilFishAlt") }); } diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 00257390a3..25eab27538 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -77,10 +77,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Among any creature ever witnessed, it is these that stray furthest from our understanding. Such grand might, such mystery…") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.EidolonWyrm") }); } diff --git a/NPCs/Abyss/GiantSquid.cs b/NPCs/Abyss/GiantSquid.cs index 9d250b2f64..5edb35afd8 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -49,10 +49,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A massive squid, having gained its size from the abundance of prey and little competition in its habitat. Its eyes are specially adapted to seeking out prey in the darkness.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.GiantSquid") }); } diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index d165f5e34c..a11ee77ed5 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -68,10 +68,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Massive in length and in breadth, this eel resides in the deeper caverns of the abyss. Its jaws have the curious ability to hyperextend and swallow nearly any prey it sets its eyes upon.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.GulperEel") }); } diff --git a/NPCs/Abyss/Laserfish.cs b/NPCs/Abyss/Laserfish.cs index 1ecf601404..d9b8ef7d6c 100644 --- a/NPCs/Abyss/Laserfish.cs +++ b/NPCs/Abyss/Laserfish.cs @@ -46,10 +46,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Its eyes are blinded by bacteria that gather in large sacs on its head. As it swims through the waters, relying on primitive echolocation, the bacteria are able to release concussive blasts to clear its path.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Laserfish") }); } diff --git a/NPCs/Abyss/LuminousCorvina.cs b/NPCs/Abyss/LuminousCorvina.cs index d00b8241fd..d9f0601f21 100644 --- a/NPCs/Abyss/LuminousCorvina.cs +++ b/NPCs/Abyss/LuminousCorvina.cs @@ -56,10 +56,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("This fish has a peculiar defense mechanism. When a threat such as yourself enters its field of view, it releases a shrill pulse alerting others to not its presence— but yours.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.LuminousCorvina") }); } diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index 04acaa8d51..dd2b8e65d5 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -59,10 +59,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("In the encapsulating darkness of the abyss, a drifting purple light that seems to ignore all physical boundaries is likely one of these. Many even doubt their existence and blame it on the rapture of the deep.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.MirageJelly") }); } diff --git a/NPCs/Abyss/MorayEel.cs b/NPCs/Abyss/MorayEel.cs index c58ecbc9c1..68155b0c9c 100644 --- a/NPCs/Abyss/MorayEel.cs +++ b/NPCs/Abyss/MorayEel.cs @@ -52,10 +52,10 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Their eyes gleam with hunger, and they inhabit the rocks of underwater structures when at rest, only occasionally roaming the open waters.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.MorayEel") }); } diff --git a/NPCs/Abyss/OarfishHead.cs b/NPCs/Abyss/OarfishHead.cs index c0e391c0aa..628b1ae35f 100644 --- a/NPCs/Abyss/OarfishHead.cs +++ b/NPCs/Abyss/OarfishHead.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Abyss bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A peculiar bony fish many have only ever seen as corpses washed up on a beach, but in their natural habitat, their red fins stream behind them, as they drift in the water column.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Oarfish") }); } diff --git a/NPCs/Abyss/ReaperShark.cs b/NPCs/Abyss/ReaperShark.cs index 60496871b6..bc6c51a736 100644 --- a/NPCs/Abyss/ReaperShark.cs +++ b/NPCs/Abyss/ReaperShark.cs @@ -9,8 +9,11 @@ using CalamityMod.Items.Potions; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.Audio; +using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.ID; using Terraria.ModLoader; @@ -58,14 +61,17 @@ namespace CalamityMod.NPCs.Abyss NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + if (Main.zenithWorld) // legg + { + NPC.height = (int)(NPC.height * 1.5f); + } } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Evolution is a strange mistress, especially in the depths of the abyss. To some, she grants a straightforward path to life, and to others, she grants arms.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ReaperShark") }); } @@ -630,6 +636,7 @@ namespace CalamityMod.NPCs.Abyss public override void FindFrame(int frameHeight) { + int newFrameHeight = (int)(frameHeight * (Main.zenithWorld ? 1.5f : 1f)); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0) { Scale = 0.3f, @@ -643,7 +650,27 @@ namespace CalamityMod.NPCs.Abyss NPC.frameCounter += hasBeenHit || NPC.IsABestiaryIconDummy ? 0.15f : 0.075f; NPC.frameCounter %= Main.npcFrameCount[NPC.type]; int frame = (int)NPC.frameCounter; - NPC.frame.Y = frame * frameHeight; + NPC.frame.Y = frame * newFrameHeight; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + if (NPC.IsABestiaryIconDummy) + return true; + + SpriteEffects spriteEffects = SpriteEffects.None; + if (NPC.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + Asset npcTexture = Main.zenithWorld ? ModContent.Request("CalamityMod/NPCs/Abyss/ReaperSharkMan") : TextureAssets.Npc[NPC.type]; + Rectangle nframe = npcTexture.Frame(1, 4, 0, (int)NPC.frameCounter); + Vector2 origin = new Vector2((float)(npcTexture.Value.Width / 2), (float)(npcTexture.Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 npcOffset = NPC.Center - screenPos; + npcOffset -= new Vector2((float)npcTexture.Value.Width, (float)(npcTexture.Value.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + npcOffset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); + + spriteBatch.Draw(npcTexture.Value, npcOffset, nframe, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + + return false; } public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) diff --git a/NPCs/Abyss/ReaperSharkMan.png b/NPCs/Abyss/ReaperSharkMan.png new file mode 100644 index 0000000000..0748ac83ee Binary files /dev/null and b/NPCs/Abyss/ReaperSharkMan.png differ diff --git a/NPCs/Abyss/ToxicMinnow.cs b/NPCs/Abyss/ToxicMinnow.cs index 8d75c8998c..dc6308bd63 100644 --- a/NPCs/Abyss/ToxicMinnow.cs +++ b/NPCs/Abyss/ToxicMinnow.cs @@ -54,10 +54,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("It spends much of its time finding the most repulsive and disagreeable vegetation for animals to feast upon. Their bellies glow green as they process the chemicals to use in self-defense.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ToxicMinnow") }); } diff --git a/NPCs/Abyss/Viperfish.cs b/NPCs/Abyss/Viperfish.cs index 8e48f18c8a..43e88471c6 100644 --- a/NPCs/Abyss/Viperfish.cs +++ b/NPCs/Abyss/Viperfish.cs @@ -53,10 +53,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A typically docile animal, it spends much of its time meandering about the rocky outcrops of the abyss. When approached it can become quite aggressive.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Viperfish") }); } diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index ce38a5adf9..b49de944d5 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -79,10 +79,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Along its spine runs an undulating dorsal fin which they can put to great use for their streamlined form, as they rush at prey underwater.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AcidEel") }); } diff --git a/NPCs/AcidRain/BabyFlakCrab.cs b/NPCs/AcidRain/BabyFlakCrab.cs index 2a62b57b3d..5a1e53a9c6 100644 --- a/NPCs/AcidRain/BabyFlakCrab.cs +++ b/NPCs/AcidRain/BabyFlakCrab.cs @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.AcidRain bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Curiously, these seem to be intelligent enough to imprint a sort of parent figure if captured at a young enough age. They will stick with you forever!") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BabyFlakCrab") }); } diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index 849d678bde..ec06f3f5ae 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -81,10 +81,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A ripe-looking worm large enough to curl around your arm. A fish would have to be either mad enough or wise enough, to go after one of these.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Bloodworm") }); } diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index a977c3bbfa..8efc886612 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -94,10 +94,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Within its calcified shell which has formed against all logic in the sulphurous sea, a gelatinous body stirs. It is also host to a long grappling creature, which helps it grab prey in exchange for protection.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CragmawMire") }); } diff --git a/NPCs/AcidRain/FlakCrab.cs b/NPCs/AcidRain/FlakCrab.cs index edb9994353..6cf8ecc655 100644 --- a/NPCs/AcidRain/FlakCrab.cs +++ b/NPCs/AcidRain/FlakCrab.cs @@ -64,10 +64,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A normal crab by all means, except for its shell. It has learned to gather the water around it to expel forcefully through its funnel after treatment. It is a dangerous concoction.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.FlakCrab") }); } diff --git a/NPCs/AcidRain/GammaSlime.cs b/NPCs/AcidRain/GammaSlime.cs index d0832680df..55f22ea971 100644 --- a/NPCs/AcidRain/GammaSlime.cs +++ b/NPCs/AcidRain/GammaSlime.cs @@ -62,10 +62,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("As the toxins in the water of the sulphurous sea worsen, and the clouds which draw from it grow more hazardous, the slimes become ever more potent.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.GammaSlime") }); } diff --git a/NPCs/AcidRain/IrradiatedSlime.cs b/NPCs/AcidRain/IrradiatedSlime.cs index ef44a5f91c..67a63231d4 100644 --- a/NPCs/AcidRain/IrradiatedSlime.cs +++ b/NPCs/AcidRain/IrradiatedSlime.cs @@ -53,10 +53,9 @@ namespace CalamityMod.NPCs.AcidRain int associatedNPCType = ModContent.NPCType(); //This exists so you're not locked out of getting an entry for Irradiated Slime if you skip the second tier bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Encrusted with gunk that evaporates slowly from the sulphurous sea, these slimes actually form in the upper atmosphere's acidic rain, before falling back to the earth.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.IrradiatedSlime") }); } diff --git a/NPCs/AcidRain/Mauler.cs b/NPCs/AcidRain/Mauler.cs index aa1cb9206f..d51eba85b6 100644 --- a/NPCs/AcidRain/Mauler.cs +++ b/NPCs/AcidRain/Mauler.cs @@ -86,10 +86,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Sharks are perhaps one of the most resilient and well-adapted species in our planet's history. It is no surprise that one of these apex predators has come to thrive in these seas.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Mauler") }); } diff --git a/NPCs/AcidRain/NuclearTerror.cs b/NPCs/AcidRain/NuclearTerror.cs index a6dace01e6..4787e9bd43 100644 --- a/NPCs/AcidRain/NuclearTerror.cs +++ b/NPCs/AcidRain/NuclearTerror.cs @@ -125,10 +125,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Perhaps it was once just a simple crab or perhaps there are plenty of others like it, lurking in the depths. Any answer is sure to make you want to never set foot in the sulphurous sea again.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.NuclearTerror") }); } diff --git a/NPCs/AcidRain/NuclearToad.cs b/NPCs/AcidRain/NuclearToad.cs index d4b6ae77cc..b26e44e5c5 100644 --- a/NPCs/AcidRain/NuclearToad.cs +++ b/NPCs/AcidRain/NuclearToad.cs @@ -87,10 +87,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("When threatened underwater they rapidly inflate and bob to the surface. As a last resort, they forcefully burst themselves. Their selfless goal is the prolonged survival of their kin.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.NuclearToad") }); } diff --git a/NPCs/AcidRain/Orthocera.cs b/NPCs/AcidRain/Orthocera.cs index b58099ebf3..48db750c06 100644 --- a/NPCs/AcidRain/Orthocera.cs +++ b/NPCs/AcidRain/Orthocera.cs @@ -76,10 +76,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Within the muck of the sulphurous sea, it is not uncommon to find creatures from ages past, their bodies entirely preserved. It seems that not all simply passed away.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Orthocera") }); } diff --git a/NPCs/AcidRain/Radiator.cs b/NPCs/AcidRain/Radiator.cs index 91650179fa..85758d0ca3 100644 --- a/NPCs/AcidRain/Radiator.cs +++ b/NPCs/AcidRain/Radiator.cs @@ -60,10 +60,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Like many other sea slugs, it ingests toxins from its environments and displays them along its back in a flashy display. The toxins in the sulphurous sea however, are a bit more potent than others.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Radiator") }); } diff --git a/NPCs/AcidRain/Skyfin.cs b/NPCs/AcidRain/Skyfin.cs index 4d79f2c167..fafbc88638 100644 --- a/NPCs/AcidRain/Skyfin.cs +++ b/NPCs/AcidRain/Skyfin.cs @@ -73,10 +73,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Their fins are highly adapted to both water and air, and should one of their reckless charges leave them briefly stranded on land, within a few moments, they will take to the air.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Skyfin") }); } diff --git a/NPCs/AcidRain/SulphurousSkater.cs b/NPCs/AcidRain/SulphurousSkater.cs index e11b17acad..d5502e57d5 100644 --- a/NPCs/AcidRain/SulphurousSkater.cs +++ b/NPCs/AcidRain/SulphurousSkater.cs @@ -74,10 +74,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("From below, the tips of their legs barely penetrate the surface of the water, and it is hard to distinguish their movements from the rain on the water's surface.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SulphurousSkater") }); } diff --git a/NPCs/AcidRain/Trilobite.cs b/NPCs/AcidRain/Trilobite.cs index 172d3f8f05..a4c4684b84 100644 --- a/NPCs/AcidRain/Trilobite.cs +++ b/NPCs/AcidRain/Trilobite.cs @@ -66,10 +66,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Their shell is of notable hardness, and it carries the same weight as stone. It speaks of their strength, for them to be able to fling themselves about the way they do.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Trilobite") }); } diff --git a/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.cs b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.cs index 38537eb792..775e129437 100644 --- a/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.cs +++ b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.cs @@ -136,12 +136,12 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - // AAAAAAAAAAAAH Scary abyss superboss guy so he gets pitch black bg and no biome source. + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + //AAAAAAAAAAAAH Scary abyss superboss guy so he gets pitch black bg and no biome source. + //eidolon wyrm comment jumpscare!!!!!! new MoonLordPortraitBackgroundProviderBestiaryInfoElement(), - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Traces of them appear even in records as far back as the early Draconic Era... They may very well be a glimpse into the full potential of nature.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AdultEidolonWyrm") }); } diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 09d22fef31..1d45dc00f5 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -96,10 +96,9 @@ namespace CalamityMod.NPCs.AquaticScourge public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A species of scourge which has had its exoskeleton hardened and tempered by years of diving through sulphuric waters for prey. Its own jaws are now imbued with the venom of those seas.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AquaticScourge") }); } diff --git a/NPCs/Astral/Aries.cs b/NPCs/Astral/Aries.cs index 476c4142c7..e717aa6412 100644 --- a/NPCs/Astral/Aries.cs +++ b/NPCs/Astral/Aries.cs @@ -55,10 +55,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Biologically, the creature suffers terribly. Its legs do not allow it to rest, constantly hopping across the infected landscape. It does not care as its mind is far gone. It continues this until death.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Aries") }); } diff --git a/NPCs/Astral/AstralProbe.cs b/NPCs/Astral/AstralProbe.cs index 2e46b1c28d..24a1ae49c2 100644 --- a/NPCs/Astral/AstralProbe.cs +++ b/NPCs/Astral/AstralProbe.cs @@ -50,10 +50,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A small animal devoured by the astral infection. The virus retains and shares its experience with itself of devouring other, similar creatures and so, all form identical shells.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AstralProbe") }); } diff --git a/NPCs/Astral/AstralSlime.cs b/NPCs/Astral/AstralSlime.cs index bd3ec1acfe..68916ddc14 100644 --- a/NPCs/Astral/AstralSlime.cs +++ b/NPCs/Astral/AstralSlime.cs @@ -49,10 +49,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("It does not show behavior different from any of its gelatinous folk, so this adaptive creature may have been the only one to fight the infection in its own way.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AstralSlime") }); } diff --git a/NPCs/Astral/AstralachneaGround.cs b/NPCs/Astral/AstralachneaGround.cs index ef456b837f..e4143fb7a5 100644 --- a/NPCs/Astral/AstralachneaGround.cs +++ b/NPCs/Astral/AstralachneaGround.cs @@ -62,10 +62,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("An arachnid taken over by the infection, it has lost its ability to spin webs and hosts a myriad of astral growths on its abdomen.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Astralachnea") }); } diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index 82267fff17..9eefafa0e5 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -158,10 +158,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("In its uncontrolled growth, one appendage wrested nutrients and materials from the other and brought it to the extremes of muscular strength. One blow is enough to pulverize a monolith.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Atlas") }); } diff --git a/NPCs/Astral/FusionFeeder.cs b/NPCs/Astral/FusionFeeder.cs index 4489cc4f47..b3a7efeaa9 100644 --- a/NPCs/Astral/FusionFeeder.cs +++ b/NPCs/Astral/FusionFeeder.cs @@ -231,10 +231,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A sand shark that has been taken by the astral infection. Unfamiliar with the origins of the virus, its mind is flooded with information gathered throughout the cosmos, and it thirsts for the plasma of distant stars.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.FusionFeeder") }); } diff --git a/NPCs/Astral/Hadarian.cs b/NPCs/Astral/Hadarian.cs index e9d6305ad9..2cca84a1db 100644 --- a/NPCs/Astral/Hadarian.cs +++ b/NPCs/Astral/Hadarian.cs @@ -63,9 +63,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The membrane of their wings is particularly tough, for material so thin. It has been known to guard them against burns and projectiles as they mercilessly tear at their foes.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Hadarian") }); } diff --git a/NPCs/Astral/HiveEnemy.cs b/NPCs/Astral/HiveEnemy.cs index b5d83c43b1..c26ebf9fb2 100644 --- a/NPCs/Astral/HiveEnemy.cs +++ b/NPCs/Astral/HiveEnemy.cs @@ -59,10 +59,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("These seem to erupt from the caverns of the astral itself. The flesh of their hosts twists into a spiral and countless bodies make up the pulsing flesh of the hive.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.HiveEnemy") }); } diff --git a/NPCs/Astral/Hiveling.cs b/NPCs/Astral/Hiveling.cs index f62e62a4f6..7132d7f064 100644 --- a/NPCs/Astral/Hiveling.cs +++ b/NPCs/Astral/Hiveling.cs @@ -55,10 +55,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A small creature, one entirely original to the astral infection, save for a tiny core of organic material it takes from the host Hive. They are easily squashed but swarm if endangered.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Hiveling") }); } diff --git a/NPCs/Astral/Mantis.cs b/NPCs/Astral/Mantis.cs index 5c77b5601d..046fe67aca 100644 --- a/NPCs/Astral/Mantis.cs +++ b/NPCs/Astral/Mantis.cs @@ -65,10 +65,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A nimble mutation of the astral infection, its many legs allow it to quickly traverse nearly any terrain the infection devours. By swinging its front claws at high speeds, it releases harmful blades of energy.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Mantis") }); } diff --git a/NPCs/Astral/Nova.cs b/NPCs/Astral/Nova.cs index 26f60bc80b..fbf8eeed46 100644 --- a/NPCs/Astral/Nova.cs +++ b/NPCs/Astral/Nova.cs @@ -86,10 +86,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The process of forced biological mutation is potent with the astral virus, and the byproducts are volatile. Most creatures discharge this chemical gradually and lose that liability— but a Nova stores it.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Nova") }); } diff --git a/NPCs/Astral/SightseerCollider.cs b/NPCs/Astral/SightseerCollider.cs index 28ce36d255..b6300acc46 100644 --- a/NPCs/Astral/SightseerCollider.cs +++ b/NPCs/Astral/SightseerCollider.cs @@ -64,10 +64,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Within their shells, the virus brews a potent chemical. When the seer approaches a foe, it spits this chemical out of its mandibles, hoping to melt the intruder's flesh.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SightseerCollider") }); } diff --git a/NPCs/Astral/SightseerSpitter.cs b/NPCs/Astral/SightseerSpitter.cs index d751bca757..9c77cf919c 100644 --- a/NPCs/Astral/SightseerSpitter.cs +++ b/NPCs/Astral/SightseerSpitter.cs @@ -66,10 +66,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Within their shells, the virus brews a potent chemical. When the seer approaches a foe, it spits this chemical out of its mandibles, hoping to melt the intruder's flesh.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SightseerSpitter") }); } diff --git a/NPCs/Astral/StellarCulex.cs b/NPCs/Astral/StellarCulex.cs index e76a4ffcb5..8802844f40 100644 --- a/NPCs/Astral/StellarCulex.cs +++ b/NPCs/Astral/StellarCulex.cs @@ -64,10 +64,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Many pincers line the face of this mutation. It will attempt to attach itself to other organic creatures, and lower its mouth to their flesh to feed.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.StellarCulex") }); } diff --git a/NPCs/Astral/Twinkler.cs b/NPCs/Astral/Twinkler.cs index fcd5d64c99..84fe1953db 100644 --- a/NPCs/Astral/Twinkler.cs +++ b/NPCs/Astral/Twinkler.cs @@ -31,10 +31,9 @@ namespace CalamityMod.NPCs.Astral public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A rare case of the astral infection creating a harmless creature. They flicker rather prettily, and you're not going to be the only one who thinks so. They make useful bait.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Twinkler") }); } diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 85847f8051..9e7f96fa6c 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -90,11 +90,10 @@ namespace CalamityMod.NPCs.AstrumAureus public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A multi-legged mechanical beast, its very existence speaks of the extent of control the astral virus has over the non-sapient. Not even machinery can stand against it.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AstrumAureus") }); } diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 7c94d45e9e..f1bba491c1 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -104,11 +104,10 @@ namespace CalamityMod.NPCs.AstrumDeus public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Revered as a God of the stars, it has been infected by the starborne illness. However, it has now been broken free from the infection's control and roams the stars once more, consuming dying stars and birthing them anew.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AstrumDeus") }); } @@ -316,7 +315,7 @@ namespace CalamityMod.NPCs.AstrumDeus { ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), }; diff --git a/NPCs/BrimstoneElemental/Brimling.cs b/NPCs/BrimstoneElemental/Brimling.cs index 228d8a576b..72442d0b62 100644 --- a/NPCs/BrimstoneElemental/Brimling.cs +++ b/NPCs/BrimstoneElemental/Brimling.cs @@ -30,12 +30,12 @@ namespace CalamityMod.NPCs.BrimstoneElemental { NPC.aiStyle = -1; AIType = -1; - NPC.damage = 0; + NPC.damage = 50; NPC.width = 60; NPC.height = 60; NPC.defense = 0; NPC.DR_NERD(normalDR); - NPC.lifeMax = 2000; + NPC.lifeMax = 1000; NPC.knockBackResist = 0f; NPC.noGravity = true; NPC.noTileCollide = true; @@ -60,10 +60,9 @@ namespace CalamityMod.NPCs.BrimstoneElemental int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Fragments of the brimstone elemental which made their way into shells of slag, their eyes stare mindlessly into the distance, for targets to burn.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Brimling") }); } @@ -81,6 +80,9 @@ namespace CalamityMod.NPCs.BrimstoneElemental public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 1f, 0f, 0f); // Despawn if Brim doesn't exist diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 08783dd3f1..a4082a556f 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -86,10 +86,9 @@ namespace CalamityMod.NPCs.BrimstoneElemental public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Roused from her deep slumber in relatively recent years, her awakening acted as the catalyst for Azafure’s downfall. Little is known of her nature, other than what may be assumed of any other elemental.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BrimstoneElemental") }); } diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index 9adde4d48f..39952c773c 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -82,11 +82,10 @@ namespace CalamityMod.NPCs.Bumblebirb public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Known across the land for the swarms that have gathered in the jungle, they are nearly feared above all else in it. Although they may not be quite as dangerous as other forces, they have no master.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Bumblefuck") }); } diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 768d992b2b..adbf818111 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -79,12 +79,11 @@ namespace CalamityMod.NPCs.CalClone public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A mysterious burning form which only appears at night, wreathed in brimstone fire. It has a twisted mind and misplaced pride in its abilities.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Calamitas") }); } diff --git a/NPCs/CalClone/Cataclysm.cs b/NPCs/CalClone/Cataclysm.cs index 6390c984ac..405aac1747 100644 --- a/NPCs/CalClone/Cataclysm.cs +++ b/NPCs/CalClone/Cataclysm.cs @@ -66,12 +66,11 @@ namespace CalamityMod.NPCs.CalClone int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A shade of itself, the only actions it seems to know are to burn and kill.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Cataclysm") }); } diff --git a/NPCs/CalClone/Catastrophe.cs b/NPCs/CalClone/Catastrophe.cs index b6ea4033c4..b665e86158 100644 --- a/NPCs/CalClone/Catastrophe.cs +++ b/NPCs/CalClone/Catastrophe.cs @@ -66,12 +66,11 @@ namespace CalamityMod.NPCs.CalClone int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A violent, mindless construct. No good can come from raising the dead.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Catastrophe") }); } diff --git a/NPCs/CalClone/SoulSeeker.cs b/NPCs/CalClone/SoulSeeker.cs index f6381baf22..8296e6dfb2 100644 --- a/NPCs/CalClone/SoulSeeker.cs +++ b/NPCs/CalClone/SoulSeeker.cs @@ -54,12 +54,11 @@ namespace CalamityMod.NPCs.CalClone int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Guardians were brought together by the clone to shield its body from blows. It is possible that they are soul slurpers empowered and enslaved by a different brand of magic than brimstone.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SoulSeeker") }); } diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 9055cce30c..cccac1cd7e 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -1979,11 +1979,11 @@ namespace CalamityMod.NPCs // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; + CalamityGlobalNPC.cataclysm = npc.whoAmI; + // Emit light Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1f, 0f, 0f); - CalamityGlobalNPC.cataclysm = npc.whoAmI; - bool bossRush = BossRushEvent.BossRushActive; bool death = CalamityWorld.death || bossRush; bool revenge = CalamityWorld.revenge || bossRush; @@ -2286,11 +2286,11 @@ namespace CalamityMod.NPCs // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; + CalamityGlobalNPC.catastrophe = npc.whoAmI; + // Emit light Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1f, 0f, 0f); - CalamityGlobalNPC.catastrophe = npc.whoAmI; - bool bossRush = BossRushEvent.BossRushActive; bool death = CalamityWorld.death || bossRush; bool revenge = CalamityWorld.revenge || bossRush; @@ -3757,10 +3757,6 @@ namespace CalamityMod.NPCs if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; - // Emit light - if (!Main.zenithWorld) - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); - // Dust and alpha effects if ((head || Main.npc[(int)npc.ai[1]].alpha < 128) && !npc.dontTakeDamage) { diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 77f0a9f8a6..cf541fb50c 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -9406,6 +9406,9 @@ namespace CalamityMod.NPCs #region Spore AI public static bool BuffedSporeAI(NPC npc, Mod mod) { + if (npc.type == NPCID.Spore) + Lighting.AddLight(npc.Center, 0.2f, 0.1f, 0.2f); + if (npc.timeLeft > 5) npc.timeLeft = 5; @@ -11252,194 +11255,5 @@ namespace CalamityMod.NPCs #endregion #endregion - - #region DD2 Event AIs - public static int DD2EventEnemySpawnRate - { - get - { - int enemySpawnRateSpeedup = 0; - if (Main.npc.IndexInRange(CalamityGlobalNPC.DD2CrystalIndex) && Main.npc[CalamityGlobalNPC.DD2CrystalIndex].active) - enemySpawnRateSpeedup = (int)Main.npc[CalamityGlobalNPC.DD2CrystalIndex].ai[2]; - return Utils.Clamp(DD2Event.LaneSpawnRate - enemySpawnRateSpeedup, 15, DD2Event.LaneSpawnRate); - } - } - - public static void DD2PortalAI(NPC npc) - { - // Idly emit light if the portal has completely faded in. - if (npc.alpha == 0) - Lighting.AddLight(npc.Center, 0.5f, 0.1f, 0.3f); - - ref float enemySpawnTimer = ref npc.ai[0]; - ref float fadeOutTimer = ref npc.ai[2]; - ref float fadeInTimer = ref npc.localAI[0]; - ref float idlePlaySoundId = ref npc.localAI[3]; - if (npc.ai[1] == 0f) - { - // Play the portal opening sound at the moment of the portal's creation. - if (fadeInTimer == 0f) - { - SoundEngine.PlaySound(SoundID.DD2_EtherianPortalOpen, npc.Center); - idlePlaySoundId = SlotId.Invalid.ToFloat(); - } - - ActiveSound soundOut; - if (fadeInTimer > 150f && !SoundEngine.TryGetActiveSound(SlotId.FromFloat(idlePlaySoundId), out soundOut)) - idlePlaySoundId = SoundEngine.PlaySound(SoundID.DD2_EtherianPortalIdleLoop, npc.Center).ToFloat(); - - if (!DD2Event.EnemySpawningIsOnHold) - enemySpawnTimer++; - - if (enemySpawnTimer >= DD2EventEnemySpawnRate) - { - if (enemySpawnTimer >= DD2EventEnemySpawnRate * 3) - enemySpawnTimer = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient && (int)enemySpawnTimer % DD2EventEnemySpawnRate == 0) - { - DD2Event.SpawnMonsterFromGate(npc.Bottom); - - // If enemy spawning is on hold, add 1 to the spawn timer to ensure that the above - // modulo doesn't get activated every single frame due to no other change above. - if (DD2Event.EnemySpawningIsOnHold) - enemySpawnTimer++; - } - npc.netUpdate = true; - } - - fadeInTimer++; - - // Begin to fade out of existence if the crystal is gone and the portal is done doing fade-in effects. - if (Main.netMode != NetmodeID.MultiplayerClient && !NPC.AnyNPCs(NPCID.DD2EterniaCrystal) && fadeInTimer >= 180f) - { - npc.ai[1] = 1f; - enemySpawnTimer = 0f; - npc.dontTakeDamage = true; - npc.netUpdate = true; - } - } - - // Fade-out effects. - else if (npc.ai[1] == 1f) - { - fadeOutTimer++; - npc.scale = MathHelper.Lerp(1f, 0.05f, Utils.GetLerpValue(500f, 600f, fadeOutTimer, true)); - - // Reset the idle play sound if it didn't get activated before for some reason. - ActiveSound result; - if (!SoundEngine.TryGetActiveSound(SlotId.FromFloat(idlePlaySoundId), out result)) - idlePlaySoundId = SoundEngine.PlaySound(SoundID.DD2_EtherianPortalIdleLoop, npc.Center).ToFloat(); - - ActiveSound activeSound; - if (SoundEngine.TryGetActiveSound(SlotId.FromFloat(idlePlaySoundId), out activeSound)) - activeSound.Volume = npc.scale; - - // Kill the portal after enough time has passed. - if (fadeOutTimer >= 550f) - { - npc.dontTakeDamage = false; - npc.life = 0; - npc.checkDead(); - npc.netUpdate = true; - if (activeSound != null) - { - activeSound.Stop(); - return; - } - } - } - } - - public static void DD2CrystalExtraAI(NPC npc) - { - CalamityGlobalNPC.DD2CrystalIndex = npc.whoAmI; - - ref float initialClickDelay = ref npc.localAI[3]; - ref float enemySpawnRateSpeedup = ref npc.ai[2]; - ref float animationCountdown = ref npc.ai[3]; - - if (animationCountdown > 0f) - animationCountdown--; - - // This is done to ensure that the initial click on the pedestal is not registered as a click to the crystal itself. - initialClickDelay++; - - bool clickingOnCrystal = Main.mouseRight && Main.mouseRightRelease && CalamityUtils.MouseHitbox.Intersects(npc.Hitbox) && initialClickDelay > 25f; - - // Reset the spawn rate speed-up after the wave is over. - if (Main.netMode != NetmodeID.MultiplayerClient && DD2Event.TimeLeftBetweenWaves > 1 && enemySpawnRateSpeedup != 0f) - { - enemySpawnRateSpeedup = 0f; - npc.netUpdate = true; - } - - if (clickingOnCrystal && npc.WithinRange(Main.LocalPlayer.Center, 285f)) - { - bool changeOccured = false; - - // If the event is waiting for time to pass and a player clicks on the crystal skip the wait. - if (DD2Event.TimeLeftBetweenWaves > 1) - { - DD2Event.TimeLeftBetweenWaves = 1; - if (Main.netMode == NetmodeID.Server) - NetMessage.SendData(MessageID.CrystalInvasionSendWaitTime, -1, -1, null, DD2Event.TimeLeftBetweenWaves); - changeOccured = true; - } - - // Otherwise speed up the portal spawn rate for this wave. - else - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int oldSpawnRate = DD2EventEnemySpawnRate; - enemySpawnRateSpeedup += 8f; - - // Release a circle of dust if a change was made to show that changes are indeed being done - // since the animation might be ongoing when this action is performed. - if (!Main.dedServ && oldSpawnRate != DD2EventEnemySpawnRate) - { - for (int i = 0; i < 55; i++) - { - for (float speed = 6f; speed < 13f; speed += 4f) - { - Vector2 shootDirection = (MathHelper.TwoPi * i / 55f).ToRotationVector2() * new Vector2(1f, 0.6f); - Dust etherealLight = Dust.NewDustPerfect(npc.Center - Vector2.UnitY * 20f + shootDirection * 12f, 264); - etherealLight.velocity = shootDirection * speed; - etherealLight.fadeIn = 0f; - etherealLight.scale = 2.3f; - etherealLight.noGravity = true; - etherealLight.noLight = true; - } - } - changeOccured = true; - } - npc.netUpdate = true; - } - } - - // Play an animation to accompany the change. - if (changeOccured) - { - if (animationCountdown <= 0f) - animationCountdown = 120f; - SoundEngine.PlaySound(SoundID.DD2_DarkMageHealImpact); - } - - // As well as some indicator text. - if (changeOccured) - { - bool dramaticText = DD2EventEnemySpawnRate <= 25; - Color textColor = dramaticText ? Color.DeepPink : Color.Pink; - string[] potentialTexts = new string[] - { - "The invasion hastens!", - "The ethereal invaders march ever-faster!" - }; - CombatText.NewText(npc.Hitbox, textColor, Main.rand.Next(potentialTexts), dramaticText); - } - } - } - #endregion DD2 Event AIs } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 85583861ca..c31105fd6a 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -255,7 +255,6 @@ namespace CalamityMod.NPCs // whoAmI Variables public static int[] bobbitWormBottom = new int[5]; - public static int DD2CrystalIndex = -1; public static int hiveMind = -1; public static int perfHive = -1; public static int slimeGodPurple = -1; @@ -498,7 +497,6 @@ namespace CalamityMod.NPCs for (int i = 0; i < bobbitWormBottom.Length; i++) ResetSavedIndex(ref bobbitWormBottom[i], NPCType()); - ResetSavedIndex(ref DD2CrystalIndex, NPCID.DD2EterniaCrystal); ResetSavedIndex(ref hiveMind, NPCType()); ResetSavedIndex(ref perfHive, NPCType()); ResetSavedIndex(ref slimeGodPurple, NPCType(), NPCType()); @@ -1416,10 +1414,14 @@ namespace CalamityMod.NPCs if (Main.getGoodWorld) npc.lifeMax = (int)(npc.lifeMax * 1.5); } - else if (npc.type == NPCID.Wraith || npc.type == NPCID.Mimic || npc.type == NPCID.Reaper || npc.type == NPCID.PresentMimic || npc.type == NPCID.SandElemental) + else if ((npc.type == NPCID.Wraith || npc.type == NPCID.Mimic || npc.type == NPCID.Reaper || npc.type == NPCID.PresentMimic || npc.type == NPCID.SandElemental || npc.type == NPCID.Ghost) && CalamityWorld.LegendaryMode) { npc.knockBackResist = 0f; } + else if (npc.type == NPCID.Spore) + { + npc.dontTakeDamage = true; + } if (CalamityLists.revengeanceLifeStealExceptionList.Contains(npc.type)) { @@ -3784,12 +3786,6 @@ namespace CalamityMod.NPCs } } - if (npc.type == NPCID.DD2LanePortal) - { - CalamityGlobalAI.DD2PortalAI(npc); - return false; - } - return true; } #endregion @@ -4310,9 +4306,6 @@ namespace CalamityMod.NPCs if (pearlAura > 0) npc.velocity *= 0.9f; } - - if (npc.type == NPCID.DD2EterniaCrystal) - CalamityGlobalAI.DD2CrystalExtraAI(npc); } #endregion @@ -4695,6 +4688,14 @@ namespace CalamityMod.NPCs { switch (npc.type) { + case NPCID.PlanterasTentacle: + if (npc.life <= 0) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), ModContent.NPCType()); + } + break; + case NPCID.MotherSlime: if (npc.life <= 0) { @@ -5040,13 +5041,14 @@ namespace CalamityMod.NPCs } } + // 12JUL2023: Ozzatron: what does this do if (calamityBiomeZone) { pool[0] = 0f; } // Add Enchanted Nightcrawlers as a critter to the Astral Infection - if (!CalamityGlobalNPC.AnyEvents(spawnInfo.Player) && spawnInfo.Player.InAstral()) + if (!AnyEvents(spawnInfo.Player) && spawnInfo.Player.InAstral()) { pool[NPCID.EnchantedNightcrawler] = SpawnCondition.TownCritter.Chance; } @@ -5127,14 +5129,48 @@ namespace CalamityMod.NPCs if (spawnInfo.PlayerSafe) return; - if (!Main.hardMode && spawnInfo.Player.ZoneUnderworldHeight && !calamityBiomeZone) - { - if (!NPC.AnyNPCs(NPCID.VoodooDemon)) - pool[NPCID.VoodooDemon] = SpawnCondition.Underworld.Chance * 0.75f; - } + // Voodoo Demon changes (including partial Voodoo Demon Voodoo Doll implementation) + bool voodooDemonDollActive = spawnInfo.Player.Calamity().disableVoodooSpawns; - if (spawnInfo.Player.Calamity().disableVoodooSpawns && pool.ContainsKey(NPCID.VoodooDemon)) + // If the doll is active, Voodoo Demons cannot spawn (via modded means). + if (voodooDemonDollActive) pool.Remove(NPCID.VoodooDemon); + // Otherwise, if it's pre-Hardmode, provide a modded spawn entry that makes them much more common. + else if (!Main.hardMode && spawnInfo.Player.ZoneUnderworldHeight && !calamityBiomeZone) + { + pool[NPCID.VoodooDemon] = SpawnCondition.Underworld.Chance * 0.15f; + } + } + #endregion + + #region On Spawn + public override void OnSpawn(NPC npc, IEntitySource source) + { + if (npc.type != NPCID.VoodooDemon) + return; + + // This entity source does not provide a player. So we have to find out if anyone close enough has a doll. + if (source is EntitySource_SpawnNPC) + { + bool voodooDemonDollActive = false; + Vector2 v = npc.Center; + for (int i = 0; i < Main.maxPlayers; ++i) + { + Player p = Main.player[i]; + if (p is null || !p.active) + continue; + if (p.DistanceSQ(v) < 4000000f && p.Calamity().disableVoodooSpawns) // 2000 pixel radius + { + voodooDemonDollActive = true; + break; + } + } + if (!voodooDemonDollActive) + return; + + npc.Transform(NPCID.Demon); + npc.netUpdate = true; + } } #endregion @@ -5496,6 +5532,23 @@ namespace CalamityMod.NPCs if (Main.LocalPlayer.Calamity().trippy || (npc.type == NPCID.KingSlime && CalamityWorld.LegendaryMode && CalamityWorld.revenge)) return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, npc.alpha); + // Spore Gas vomit color telegraph + if (npc.type == NPCID.Plantera && (CalamityWorld.revenge || BossRushEvent.BossRushActive)) + { + float lifeRatio = npc.life / (float)npc.lifeMax; + if (lifeRatio > 0.5f && lifeRatio < 0.75f) + { + bool startChangingColor = npc.ai[1] > PlanteraAI.SeedGatlingColorChangeGateValue; + if (startChangingColor) + { + float colorChangeAmount = npc.ai[1] - PlanteraAI.SeedGatlingColorChangeGateValue; + Color initialColor = npc.GetAlpha(drawColor); + Color finalColor = Color.Green; + return Color.Lerp(initialColor, finalColor, colorChangeAmount / PlanteraAI.SeedGatlingColorChangeDuration); + } + } + } + if (npc.type == NPCID.QueenBee && Main.zenithWorld) { if (npc.life / (float)npc.lifeMax < 0.5f) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 6f3fc0aae4..c82f196dde 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -179,12 +179,6 @@ namespace CalamityMod.NPCs #endregion #region Desert - // Vulture - // 1-2 Desert Feather @ 100% - case NPCID.Vulture: - npcLoot.Add(ModContent.ItemType(), 1, 1, 2); - break; - // Tomb Crawler // Burnt Sienna @ 4% Normal, 6.67% Expert+ case NPCID.TombCrawlerHead: @@ -1964,7 +1958,7 @@ namespace CalamityMod.NPCs CalamityNetcode.SyncWorld(); } - // Spawn Exodium planetoids and send messages about Providence, Bloodstone, Phantoplasm, etc. if ML has not been killed yet + // Spawn Exodium planetoids and send messages about Providence, Bloodstone, Polterplasm, etc. if ML has not been killed yet if (!NPC.downedMoonlord) { CalamityUtils.DisplayLocalizedText(key5, messageColor5); diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 88b131a82c..a565cd890b 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -60,10 +60,11 @@ namespace CalamityMod.NPCs public static int TaxesToCollectLimit => (int)(Item.buyPrice(0, 50, 0, 0) * TaxYieldFactor); // TODO -- Update all Discord tags here to new Discord usernames. - #region Town NPC Patreon Name Sets + #region Town NPC Patreon Name Sets private static readonly string[] AnglerNames = { "Dazren", + "Johnny Test", // <@!589966747977777197> (konorango) }; private static readonly string[] ArmsDealerNames = { @@ -75,7 +76,7 @@ namespace CalamityMod.NPCs "XiaoEn0426", // <@!440448864772816896> (XiaoEn0426#9157) "Jeffred", // <@!295362230038560768> (Knight Solaire#0873) "The Cooler Arthur", // <@!568263512523014154> (better artilery#0001) - "Markie", // <@!291141964039061504> (Markie#6969) + "Markie", // <@!291141964039061504> (Markie#6969) }; private static readonly string[] ClothierNames = { @@ -95,7 +96,7 @@ namespace CalamityMod.NPCs "Izuna", "Jasmine", // <@!430532867479699456> (phantasmagoria#6777) "Cybil", // <@!486507232666845185> (Captain Doofus#????) - "Ruth", // <@!1001307586068492388> (Briny_Coffee#4393) + "Ruth", // <@!1001307586068492388> (Briny_Coffee#4393) }; private static readonly string[] DyeTraderNames = null; private static readonly string[] GoblinTinkererNames = @@ -125,8 +126,8 @@ namespace CalamityMod.NPCs "Danmaku", // <@!756259562268524555> (Danmaku#2659) "Grylken", // <@!299970404435361802> (Grylken#1569) "Outlaw", // <@!918311619480657922> (TheChosenOutlaw#8746) - "Alfred Rend", // <@!606301806481375255> (Deadsqurp300#0907) - "Leeman", // <@!281999243168841728> (Tweee#5831) + "Alfred Rend", // <@!606301806481375255> (Deadsqurp300#0907) + "Leeman", // <@!281999243168841728> (Tweee#5831) }; private static readonly string[] MechanicNames = { @@ -143,7 +144,7 @@ namespace CalamityMod.NPCs { "Farsni", "Fanny", // <@!799749125720637460> (zombiewolf511#4581) - "Mausi", // <@!194156349347594241> (Sadouken | Daniel#3996) + "Mausi", // <@!194156349347594241> (Sadouken | Daniel#3996) }; private static readonly string[] PainterNames = { @@ -166,7 +167,7 @@ namespace CalamityMod.NPCs "Nyapano", // <@!120976656826368003> (Emi - Nyapano She/Her#4040) "Jade", // <@!187395834625785869> (VeryMasterNinja#7728) "Nyavi Aceso", // <@!270260920888852480> (Navigator#8739) - "Octo", // <@!796112889353994281> (OctolingGrimm#8888) + "Octo", // <@!796112889353994281> (OctolingGrimm#8888) }; private static readonly string[] SkeletonMerchantNames = { @@ -227,7 +228,7 @@ namespace CalamityMod.NPCs private static readonly string[] ZoologistNames = { "Kiriku", // <@!395312478160027668> (rulosss#6814) - "Lacuna", // <@!790746689211203604> (Lacuna#8629) + "Lacuna", // <@!790746689211203604> (Lacuna#8629) }; // The following sets are for the 1.4 Town Pets: Town Dogs, Cats and Bunnies. @@ -245,13 +246,13 @@ namespace CalamityMod.NPCs "Ozymandias", // <@!146333264871686145> (Ozzatron#0001) }; private static readonly string[] TownDogLabradorNames = - { - "Riley", // <@!260875558592708619> (potion pal#9979) - }; + { + "Riley", // <@!260875558592708619> (potion pal#9979) + }; private static readonly string[] TownDogPitBullNames = - { - "Splinter", // <@!320320801213775873> (Kaimonick#1738) - }; + { + "Splinter", // <@!320320801213775873> (Kaimonick#1738) + }; private static readonly string[] TownDogBeagleNames = { "Kendra", // <@!237247188005158912> (LordMetarex#6407) @@ -274,8 +275,8 @@ namespace CalamityMod.NPCs "Smoogle", // <@!709968379334623274> (smoogle#5672) "The Meowurer of Gods", // <@!385949114271268864> (GP#7876) "Katsafaros", // <@!190595401328492544> (NavyGuy#2650) - "Lucerne", // <@!271954788676141066> (lord_lucerne) - "Milo", // <@!401849201597874179> (maskedmilo) + "Lucerne", // <@!271954788676141066> (lord_lucerne) + "Milo", // <@!401849201597874179> (maskedmilo) }; private static readonly string[] TownCatSiameseNames = null; private static readonly string[] TownCatBlackNames = diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 421649dd9d..43433125a2 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -74,11 +74,10 @@ namespace CalamityMod.NPCs.CeaselessVoid public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A mysterious entity that acts as a portal to elsewhere. Little is known about its origins, other than that it was sealed away by the cultists.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CeaselessVoid") }); } diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index 3db158de3a..754d971bd2 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -61,11 +61,10 @@ namespace CalamityMod.NPCs.CeaselessVoid int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("One of the many rifts created in the fabric of space by the Ceaseless Void. Some say you could even see a glimpse of another world if you gaze into it.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DarkEnergy") }); } diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index acfa3e5db0..e746c8ee8e 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -50,11 +50,10 @@ namespace CalamityMod.NPCs.Crabulon int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Mushrooms that grow only on Crabulon's shell, feasting off the nutrients in the husk. By jolting its body, it flings these off in defense.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CrabShroom") }); } diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index 7e2e370881..dcb02eba48 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -83,11 +83,10 @@ namespace CalamityMod.NPCs.Crabulon public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("In the bulbous growths of the fungal caverns it is not uncommon to find molted shells.They are far too large for any of the usual decapods of the mushrooms.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Crabulon") }); } diff --git a/NPCs/Crags/CalamityEye.cs b/NPCs/Crags/CalamityEye.cs index a78af22ce6..ed8e01ae34 100644 --- a/NPCs/Crags/CalamityEye.cs +++ b/NPCs/Crags/CalamityEye.cs @@ -51,10 +51,9 @@ namespace CalamityMod.NPCs.Crags public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Though these enemies are only a little more threatening than a demon eye, some say that they originally burst from the sockets of those who used to inhabit the capital, when their souls were cursed by the red flames.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CalamityEye") }); } diff --git a/NPCs/Crags/CharredSlime.cs b/NPCs/Crags/CharredSlime.cs index d2c531871a..b729ab7dea 100644 --- a/NPCs/Crags/CharredSlime.cs +++ b/NPCs/Crags/CharredSlime.cs @@ -52,10 +52,9 @@ namespace CalamityMod.NPCs.Crags public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Lava slimes are the only ones that manage to survive in the heat of hell, having replaced their moisture with liquid rock. That said, their mannerisms are the same, and they seek out and devour anything they can.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CharredSlime") }); } diff --git a/NPCs/Crags/DespairStone.cs b/NPCs/Crags/DespairStone.cs index 8461ad7b12..6c678769e7 100644 --- a/NPCs/Crags/DespairStone.cs +++ b/NPCs/Crags/DespairStone.cs @@ -58,10 +58,9 @@ namespace CalamityMod.NPCs.Crags public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A condensed, volatile stone of brimstone slag. It is said that the souls of many, fighting to get out from within, are what cause it to tear across the ground.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DespairStone") }); } diff --git a/NPCs/Crags/HeatSpirit.cs b/NPCs/Crags/HeatSpirit.cs index 524f57eb95..3bba5d2cc3 100644 --- a/NPCs/Crags/HeatSpirit.cs +++ b/NPCs/Crags/HeatSpirit.cs @@ -48,10 +48,9 @@ namespace CalamityMod.NPCs.Crags public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A human spirit, its mind lost to the blazing orange fires of its dwelling. It seeks out and attempts to eliminate any source of moisture it can detect entering the hellscape.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.HeatSpirit") }); } diff --git a/NPCs/Crags/RenegadeWarlock.cs b/NPCs/Crags/RenegadeWarlock.cs index edfaf92d92..e5ceb6fd3f 100644 --- a/NPCs/Crags/RenegadeWarlock.cs +++ b/NPCs/Crags/RenegadeWarlock.cs @@ -49,11 +49,10 @@ namespace CalamityMod.NPCs.Crags public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A devotee, their mind lost to the raging, hating fires of the brimstone flames. None have ever seen under their hood, and none ever should.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.RenegadeWarlock") }); } diff --git a/NPCs/Crags/Scryllar.cs b/NPCs/Crags/Scryllar.cs index 4ad986c995..2919ee2718 100644 --- a/NPCs/Crags/Scryllar.cs +++ b/NPCs/Crags/Scryllar.cs @@ -57,10 +57,9 @@ namespace CalamityMod.NPCs.Crags public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Twisted detritus of those who once came to harvest the remains of the crags. The whispers got to them.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Scryllar") }); } diff --git a/NPCs/Crags/SoulSlurper.cs b/NPCs/Crags/SoulSlurper.cs index 8ebec6e4e4..22f049bafd 100644 --- a/NPCs/Crags/SoulSlurper.cs +++ b/NPCs/Crags/SoulSlurper.cs @@ -56,10 +56,9 @@ namespace CalamityMod.NPCs.Crags public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The remnants of a soul which has feasted, been feasted upon, and torn into the souls of others. No one knows how the cycle begins, but you don't want to find out yourself.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SoulSlurper") }); } diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 677556c7c9..b1849ed247 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -127,11 +127,10 @@ namespace CalamityMod.NPCs.Cryogen public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A prismatic living ice crystal. Though typically glimpsed only through the harsh sleet of blizzards, on the rare days where it is seen during a sunny day, its body gleams a deadly, beautiful blue.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Cryogen") }); } diff --git a/NPCs/DesertScourge/DesertNuisanceHead.cs b/NPCs/DesertScourge/DesertNuisanceHead.cs index 9afb460426..5afa9cd334 100644 --- a/NPCs/DesertScourge/DesertNuisanceHead.cs +++ b/NPCs/DesertScourge/DesertNuisanceHead.cs @@ -72,11 +72,10 @@ namespace CalamityMod.NPCs.DesertScourge int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The starved spawn of the Desert Scourge. Like piranhas of the desert, they can swarm and tear apart smaller animals within seconds.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DesertNuisance") }); } diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 999509a5a1..a3fe1e9b0e 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -107,11 +107,10 @@ namespace CalamityMod.NPCs.DesertScourge public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("If ever before you have peered out into the desert and seen entire dunes rise and fall like the waves of the sea, it is not unlikely that this is the culprit, as it bore through the sands below.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DesertScourge") }); } @@ -281,6 +280,9 @@ namespace CalamityMod.NPCs.DesertScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) perturbedSpeed *= Main.rand.NextFloat() + 0.5f; + for (int k = 0; k < 10; k++) + Dust.NewDust(NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, 10, 10, 85, perturbedSpeed.X, perturbedSpeed.Y); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer); if (Main.zenithWorld) Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(perturbedSpeed) * 3f, perturbedSpeed, type2, damage, 0f, Main.myPlayer); @@ -444,6 +446,10 @@ namespace CalamityMod.NPCs.DesertScourge for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); + + for (int k = 0; k < 10; k++) + Dust.NewDust(NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, 10, 10, 85, perturbedSpeed.X, perturbedSpeed.Y); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer); } } diff --git a/NPCs/DevourerofGods/CosmicGuardianBody.cs b/NPCs/DevourerofGods/CosmicGuardianBody.cs index c32401861e..6873663b5f 100644 --- a/NPCs/DevourerofGods/CosmicGuardianBody.cs +++ b/NPCs/DevourerofGods/CosmicGuardianBody.cs @@ -62,8 +62,6 @@ namespace CalamityMod.NPCs.DevourerofGods public override void AI() { - Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); - if (invinceTime > 0) { invinceTime--; diff --git a/NPCs/DevourerofGods/CosmicGuardianHead.cs b/NPCs/DevourerofGods/CosmicGuardianHead.cs index dc926efb9e..df3bdd4de1 100644 --- a/NPCs/DevourerofGods/CosmicGuardianHead.cs +++ b/NPCs/DevourerofGods/CosmicGuardianHead.cs @@ -63,11 +63,9 @@ namespace CalamityMod.NPCs.DevourerofGods int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //Custom background probably?, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("An interdimensional creation of the Devourer brought from its home dimension to aid it in battle. Nowhere near the strength of its sentinels.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CosmicGuardian") }); } @@ -99,8 +97,6 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector = NPC.Center; - Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); - if (NPC.ai[2] > 0f) NPC.realLife = (int)NPC.ai[2]; diff --git a/NPCs/DevourerofGods/CosmicGuardianTail.cs b/NPCs/DevourerofGods/CosmicGuardianTail.cs index 43cca06873..8e34875aae 100644 --- a/NPCs/DevourerofGods/CosmicGuardianTail.cs +++ b/NPCs/DevourerofGods/CosmicGuardianTail.cs @@ -59,8 +59,6 @@ namespace CalamityMod.NPCs.DevourerofGods public override void AI() { - Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); - if (invinceTime > 0) { invinceTime--; diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 8c15f48e28..1b5340764d 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -174,8 +174,6 @@ namespace CalamityMod.NPCs.DevourerofGods } } - Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); - if (invinceTime > 0) { invinceTime--; diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 4f7b62713c..6bf4192c0a 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -172,11 +172,9 @@ namespace CalamityMod.NPCs.DevourerofGods public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //Custom background probably?, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Its otherworldly ego is known as well as its overwhelming power across the land, as in battle it boasts constantly. Admittedly it is one of the few able to back up its claims.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DevourerofGods") }); } @@ -440,9 +438,6 @@ namespace CalamityMod.NPCs.DevourerofGods // Continuously reset certain things. AttemptingToEnterPortal = false; - // Light - Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); - // Worm variable if (NPC.ai[2] > 0f) NPC.realLife = (int)NPC.ai[2]; @@ -745,14 +740,14 @@ namespace CalamityMod.NPCs.DevourerofGods if (NPC.Opacity >= 1f && (distanceFromTarget > 480f || (CalamityWorld.LegendaryMode && CalamityWorld.revenge)) && NPC.SafeDirectionTo(player.Center).AngleBetween((NPC.rotation - MathHelper.PiOver2).ToRotationVector2()) < MathHelper.ToRadians(18f)) { calamityGlobalNPC.newAI[0] += 1f; - if (calamityGlobalNPC.newAI[0] >= ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 50f : 150f) && calamityGlobalNPC.newAI[0] % (phase7 ? 30f : 60f) == 0f) + if (calamityGlobalNPC.newAI[0] >= ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 30f : 150f) && calamityGlobalNPC.newAI[0] % ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 30f : phase7 ? 30f : 60f) == 0f) { float fireballSpeed = 8f; Vector2 fireballVelocity = Vector2.Normalize(player.Center - NPC.Center) * fireballSpeed + NPC.velocity * 0.5f; Vector2 dustVelocity = fireballVelocity * 2f; for (int k = 0; k < 50; k++) - Dust.NewDust(NPC.Center, 52, 52, (int)CalamityDusts.PurpleCosmilite, dustVelocity.X, dustVelocity.Y, 0, default, 1f); + Dust.NewDust(NPC.Center, 52, 52, (int)CalamityDusts.PurpleCosmilite, dustVelocity.X, dustVelocity.Y); int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); @@ -2614,9 +2609,6 @@ namespace CalamityMod.NPCs.DevourerofGods // Trophy (always directly from boss, never in bag) npcLoot.Add(ModContent.ItemType(), 10); - // GFB Auric Bar drop - npcLoot.DefineConditionalDropSet(DropHelper.GFB).Add(ModContent.ItemType(), 1, 1, 5); - // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDoG, ModContent.ItemType(), desc: DropHelper.FirstKillText); } diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 6b60f0ff0e..a98d0d2ec6 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -173,8 +173,6 @@ namespace CalamityMod.NPCs.DevourerofGods } } - Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); - if (invinceTime > 0) { invinceTime--; diff --git a/NPCs/DraedonLabThings/Androomba.cs b/NPCs/DraedonLabThings/Androomba.cs index 9b4b701f88..5cfec8a4c8 100644 --- a/NPCs/DraedonLabThings/Androomba.cs +++ b/NPCs/DraedonLabThings/Androomba.cs @@ -51,10 +51,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Slowly moving back and forth, these contraptions operate endlessly with the fruitless goal of cleaning the now long abandoned labs.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Androomba") }); } diff --git a/NPCs/DraedonLabThings/Nanodroid.cs b/NPCs/DraedonLabThings/Nanodroid.cs index 778e350c0c..1f876cd9bd 100644 --- a/NPCs/DraedonLabThings/Nanodroid.cs +++ b/NPCs/DraedonLabThings/Nanodroid.cs @@ -32,10 +32,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Not every creation has to be large and flashy to be a success, sometimes it's good to take a step back and appreciate how much that smaller things such as these devices contribute.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Nanodroid") }); } diff --git a/NPCs/DraedonLabThings/RepairUnitCritter.cs b/NPCs/DraedonLabThings/RepairUnitCritter.cs index 43e9149566..bea4d4e741 100644 --- a/NPCs/DraedonLabThings/RepairUnitCritter.cs +++ b/NPCs/DraedonLabThings/RepairUnitCritter.cs @@ -85,10 +85,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Thanks to these little machines, the dusty labs still stand. It appears they're unable to deal with rust, though.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.RepairUnitCritter") }); } diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 6a020d25c7..bdb844e177 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -172,12 +172,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background for Exos like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Exo, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Within it, burns chemicals with the fury of Greek fire. Highly refined from the design of the eye-like twins before, it is now capable of outstanding mid-air movement.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Apollo") }); } @@ -551,9 +548,6 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo if (rateOfRotation != 0f) NPC.rotation = NPC.rotation.AngleTowards((float)Math.Atan2(rotateTowards.Y, rotateTowards.X) + MathHelper.PiOver2, rateOfRotation); - // Light - Lighting.AddLight(NPC.Center, 0.05f * NPC.Opacity, 0.25f * NPC.Opacity, 0.15f * NPC.Opacity); - // Despawn if target is dead if (player.dead) { @@ -641,8 +635,17 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) { - projectile.Kill(); - projectile.owner = Main.maxPlayers; + // Prevent splitting and spawn death dust + if (projectile.type == ModContent.ProjectileType()) + { + SpawnApolloFireballKillDust(projectile); + projectile.active = false; + } + else + { + projectile.Kill(); + projectile.owner = Main.maxPlayers; + } } } } @@ -746,8 +749,17 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) { - projectile.Kill(); - projectile.owner = Main.maxPlayers; + // Prevent splitting + if (projectile.type == ModContent.ProjectileType()) + { + SpawnApolloFireballKillDust(projectile); + projectile.active = false; + } + else + { + projectile.Kill(); + projectile.owner = Main.maxPlayers; + } } } } @@ -816,8 +828,17 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) { - projectile.Kill(); - projectile.owner = Main.maxPlayers; + // Prevent splitting + if (projectile.type == ModContent.ProjectileType()) + { + SpawnApolloFireballKillDust(projectile); + projectile.active = false; + } + else + { + projectile.Kill(); + projectile.owner = Main.maxPlayers; + } } } } @@ -1383,6 +1404,65 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo } } + private void SpawnApolloFireballKillDust(Projectile projectile) + { + int height = 90; + projectile.position = projectile.Center; + projectile.width = projectile.height = height; + projectile.Center = projectile.position; + + SoundEngine.PlaySound(CommonCalamitySounds.ExoPlasmaExplosionSound, projectile.Center); + + for (int i = 0; i < 200; i++) + { + float dustSpeed = 16f; + if (i < 150) + dustSpeed = 12f; + if (i < 100) + dustSpeed = 8f; + if (i < 50) + dustSpeed = 4f; + + int dust = Dust.NewDust(projectile.Center, 6, 6, Main.rand.NextBool(2) ? 107 : 110, 0f, 0f, 100, default, 1f); + float dustVelocityX = Main.dust[dust].velocity.X; + float dustVelocityY = Main.dust[dust].velocity.Y; + + if (dustVelocityX == 0f && dustVelocityY == 0f) + dustVelocityX = 1f; + + float dustVelocity = (float)Math.Sqrt(dustVelocityX * dustVelocityX + dustVelocityY * dustVelocityY); + dustVelocity = dustSpeed / dustVelocity; + dustVelocityX *= dustVelocity; + dustVelocityY *= dustVelocity; + + float scale = 1f; + switch ((int)dustSpeed) + { + case 4: + scale = 1.2f; + break; + case 8: + scale = 1.1f; + break; + case 12: + scale = 1f; + break; + case 16: + scale = 0.9f; + break; + default: + break; + } + + Dust dust2 = Main.dust[dust]; + dust2.velocity *= 0.5f; + dust2.velocity.X = dust2.velocity.X + dustVelocityX; + dust2.velocity.Y = dust2.velocity.Y + dustVelocityY; + dust2.scale = scale; + dust2.noGravity = true; + } + } + // Plays the targeting sound from both Exo Twins, indicating that they're syncing up. public static void PlayTargetingSound() { diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index d75e3a8467..e31b0a1ebe 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -199,12 +199,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background for Exos like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Exo, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("While it is the most flamboyant of Draedon's machines, it appears to be lacking some finish, though this trait does not compromise its killing potential whatsoever.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Ares") }); } @@ -508,17 +505,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Rotation NPC.rotation = NPC.velocity.X * 0.003f; - // Light and enrage check + // Enrage check if (EnragedState == (float)Enraged.Yes) - { - Lighting.AddLight(NPC.Center, 0.5f * NPC.Opacity, 0f, 0f); NPC.Calamity().CurrentlyEnraged = true; - } - else - { - float lightScale = 510f; - Lighting.AddLight(NPC.Center, Main.DiscoR / lightScale * NPC.Opacity, Main.DiscoG / lightScale * NPC.Opacity, Main.DiscoB / lightScale * NPC.Opacity); - } // Despawn if target is dead if (player.dead) diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index 4ba11a2ab5..df32c7f2b8 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -265,12 +265,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.spriteDirection = -NPC.direction; } - // Light - if (enraged) - Lighting.AddLight(NPC.Center, 0.5f * NPC.Opacity, 0f, 0f); - else - Lighting.AddLight(NPC.Center, 0.2f * NPC.Opacity, 0.25f * NPC.Opacity, 0.05f * NPC.Opacity); - // Despawn if target is dead if (player.dead) { diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 0446c6e228..25c2cc80e8 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -283,12 +283,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.spriteDirection = -NPC.direction; } - // Light - if (enraged) - Lighting.AddLight(NPC.Center, 0.5f * NPC.Opacity, 0f, 0f); - else - Lighting.AddLight(NPC.Center, 0.25f * NPC.Opacity, 0.1f * NPC.Opacity, 0.1f * NPC.Opacity); - // Despawn if target is dead if (player.dead) { diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index e8519ac64b..f8a2a7bcf5 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -264,12 +264,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.spriteDirection = -NPC.direction; } - // Light - if (enraged) - Lighting.AddLight(NPC.Center, 0.5f * NPC.Opacity, 0f, 0f); - else - Lighting.AddLight(NPC.Center, 0.1f * NPC.Opacity, 0.25f * NPC.Opacity, 0.05f * NPC.Opacity); - // Gate values bool fireMoreBolts = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays; float plasmaBoltPhaseGateValue = fireMoreBolts ? 120f : 270f; diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index afc7911451..c2dc869544 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -266,12 +266,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.spriteDirection = -NPC.direction; } - // Light - if (enraged) - Lighting.AddLight(NPC.Center, 0.5f * NPC.Opacity, 0f, 0f); - else - Lighting.AddLight(NPC.Center, 0.1f * NPC.Opacity, 0.25f * NPC.Opacity, 0.25f * NPC.Opacity); - // Gate values float teslaOrbPhaseGateValue = fireMoreOrbs ? 120f : 270f; if (enraged) diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index f092ec1d93..6f135e4f1c 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -204,12 +204,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - // We'll probably want a custom background for Exos like ML has. - // BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Exo, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The Exo Twins are the ultimate recon units. Capable of detecting various wavelengths of light unknown to us, nothing can hide.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Artemis") }); } @@ -628,9 +625,6 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis NPC.rotation = NPC.rotation.AngleTowards((float)Math.Atan2(rotateTowards.Y, rotateTowards.X) + MathHelper.PiOver2, rateOfRotation); } - // Light - Lighting.AddLight(NPC.Center, 0.25f * NPC.Opacity, 0.15f * NPC.Opacity, 0.05f * NPC.Opacity); - // Despawn if target is dead if (player.dead) { diff --git a/NPCs/ExoMechs/Draedon.cs b/NPCs/ExoMechs/Draedon.cs index 3860fb2fb4..f468bc498d 100644 --- a/NPCs/ExoMechs/Draedon.cs +++ b/NPCs/ExoMechs/Draedon.cs @@ -115,12 +115,9 @@ namespace CalamityMod.NPCs.ExoMechs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background for Exos like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Exo, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The esteemed scientist himself. His AI is uploaded into a database, far from harm, and thus destroying his recon bodies achieves nothing.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Draedon") }); } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index 1461e1f799..1dd286842e 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -448,9 +448,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos SmokeDrawer.ParticleSpawnRate = 9999999; if (vulnerable) { - // Light - Lighting.AddLight(NPC.Center, 0.35f * NPC.Opacity, 0.05f * NPC.Opacity, 0.05f * NPC.Opacity); - // Noise float volume = calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge ? 0.1f : 1f; if (NPC.localAI[0] == 0f) @@ -468,12 +465,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } else - { - // Light - Lighting.AddLight(NPC.Center, 0.05f * NPC.Opacity, 0.2f * NPC.Opacity, 0.2f * NPC.Opacity); - NPC.localAI[0] = 0f; - } SmokeDrawer.Update(); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 9e6bcbbea2..d935e46c16 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -448,9 +448,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos SmokeDrawer.ParticleSpawnRate = 9999999; if (vulnerable) { - // Light - Lighting.AddLight(NPC.Center, 0.35f * NPC.Opacity, 0.05f * NPC.Opacity, 0.05f * NPC.Opacity); - // Noise float volume = calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge ? 0.1f : 1f; if (NPC.localAI[0] == 0f) @@ -468,12 +465,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } else - { - // Light - Lighting.AddLight(NPC.Center, 0.05f * NPC.Opacity, 0.2f * NPC.Opacity, 0.2f * NPC.Opacity); - NPC.localAI[0] = 0f; - } SmokeDrawer.Update(); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 44bf264ad4..8f423bf283 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -92,7 +92,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public const float ventDuration = 180f; // Spawn rate for vent clouds - public const int ventCloudSpawnRate = 5; + public const int ventCloudSpawnRate = 10; // Default life ratio for the other mechs private const float defaultLifeRatio = 5f; @@ -173,12 +173,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background for Exos like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Exo, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Under every armored plate on this machine lies an advanced weapon. This sacrifices the machine's durability, but it makes it a very effective mass murderer.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Thanatos") }); } @@ -954,9 +951,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos SmokeDrawer.ParticleSpawnRate = 9999999; if (vulnerable) { - // Light - Lighting.AddLight(NPC.Center, 0.35f * NPC.Opacity, 0.05f * NPC.Opacity, 0.05f * NPC.Opacity); - // Noise if (NPC.localAI[1] == 0f) SoundEngine.PlaySound(VentSound, NPC.Center); @@ -970,12 +964,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } else - { - // Light - Lighting.AddLight(NPC.Center, 0.05f * NPC.Opacity, 0.2f * NPC.Opacity, 0.2f * NPC.Opacity); - NPC.localAI[1] = 0f; - } SmokeDrawer.Update(); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 1660fedf6b..9cd480a97f 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -448,15 +448,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos SmokeDrawer.ParticleSpawnRate = 9999999; if (vulnerable) { - // Light - Lighting.AddLight(NPC.Center, 0.35f * NPC.Opacity, 0.05f * NPC.Opacity, 0.05f * NPC.Opacity); - // Noise float volume = calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge ? 0.1f : 1f; if (NPC.localAI[0] == 0f) - { SoundEngine.PlaySound(ThanatosHead.VentSound with { Volume = volume * ThanatosHead.VentSound.Volume }, NPC.Center); - } // Steam NPC.localAI[0] += 1f; @@ -468,12 +463,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } else - { - // Light - Lighting.AddLight(NPC.Center, 0.05f * NPC.Opacity, 0.2f * NPC.Opacity, 0.2f * NPC.Opacity); - NPC.localAI[0] = 0f; - } SmokeDrawer.Update(); diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index bf6ee60e87..d466c300df 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -78,12 +78,11 @@ namespace CalamityMod.NPCs.GreatSandShark public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("One wonders if there is a limit to the persistence of sharks in their quest to survive. In the very opposite of their usual climate, they have conquered too. It is a miracle that none yet have grown wings.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.GreatSandShark") }); } diff --git a/NPCs/HiveMind/DankCreeper.cs b/NPCs/HiveMind/DankCreeper.cs index 3e9b97a033..a8d670b13a 100644 --- a/NPCs/HiveMind/DankCreeper.cs +++ b/NPCs/HiveMind/DankCreeper.cs @@ -55,12 +55,11 @@ namespace CalamityMod.NPCs.HiveMind int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Though their core is the same as a hive blob, their armored shell of shadow scale prevents them from dying quite as easily. They also carry a noxious gas within them.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DankCreeper") }); } diff --git a/NPCs/HiveMind/DarkHeart.cs b/NPCs/HiveMind/DarkHeart.cs index 608f2fa776..5e5a68401e 100644 --- a/NPCs/HiveMind/DarkHeart.cs +++ b/NPCs/HiveMind/DarkHeart.cs @@ -20,12 +20,12 @@ namespace CalamityMod.NPCs.HiveMind public override void SetDefaults() { - NPC.damage = 0; + NPC.damage = 20; NPC.width = 32; NPC.height = 32; NPC.defense = 2; - NPC.lifeMax = 150; + NPC.lifeMax = 75; if (BossRushEvent.BossRushActive) NPC.lifeMax = 1800; if (Main.getGoodWorld) @@ -49,12 +49,11 @@ namespace CalamityMod.NPCs.HiveMind int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("It pulses with stagnant, stinking waters of corruption, and leaks as it flies overhead. Wherever those drops land, any organic matter nearby slowly corrodes.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DarkHeart") }); } @@ -68,6 +67,9 @@ namespace CalamityMod.NPCs.HiveMind public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; NPC.TargetClosest(); float num1164 = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 8f : revenge ? 4.5f : 4f; diff --git a/NPCs/HiveMind/HiveBlob.cs b/NPCs/HiveMind/HiveBlob.cs index 731fb249ba..3f02d32159 100644 --- a/NPCs/HiveMind/HiveBlob.cs +++ b/NPCs/HiveMind/HiveBlob.cs @@ -24,11 +24,11 @@ namespace CalamityMod.NPCs.HiveMind { NPC.npcSlots = 0.1f; NPC.aiStyle = -1; - NPC.damage = 0; + NPC.damage = 10; NPC.width = 25; NPC.height = 25; - NPC.lifeMax = 100; + NPC.lifeMax = 50; if (BossRushEvent.BossRushActive) NPC.lifeMax = 1300; if (Main.getGoodWorld) @@ -52,17 +52,19 @@ namespace CalamityMod.NPCs.HiveMind int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A ball of flesh and rotting matter, it is flung out by the hive mind towards its enemies as fodder, to wear down any who stand in their way.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.HiveBlob") }); } public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; diff --git a/NPCs/HiveMind/HiveBlob2.cs b/NPCs/HiveMind/HiveBlob2.cs index fc37d69184..0ea6f4aee3 100644 --- a/NPCs/HiveMind/HiveBlob2.cs +++ b/NPCs/HiveMind/HiveBlob2.cs @@ -22,11 +22,11 @@ namespace CalamityMod.NPCs.HiveMind { NPC.npcSlots = 0.1f; NPC.aiStyle = -1; - NPC.damage = 0; + NPC.damage = 10; NPC.width = 25; NPC.height = 25; - NPC.lifeMax = 150; + NPC.lifeMax = 75; if (BossRushEvent.BossRushActive) NPC.lifeMax = 1300; if (Main.getGoodWorld) @@ -47,6 +47,9 @@ namespace CalamityMod.NPCs.HiveMind public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index de50a0e82e..fb223f4812 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -173,12 +173,11 @@ namespace CalamityMod.NPCs.HiveMind public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("In the deep trenches of the corruption, infected creatures gather to manifest their own deity. Unlike other cases where smaller beings gather for protection, this is an entirely offensive maneuver.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.HiveMind") }); } diff --git a/NPCs/HiveMind/HiveTumor.cs b/NPCs/HiveMind/HiveTumor.cs index dc61d39f11..d3b9da8ef5 100644 --- a/NPCs/HiveMind/HiveTumor.cs +++ b/NPCs/HiveMind/HiveTumor.cs @@ -38,12 +38,11 @@ namespace CalamityMod.NPCs.HiveMind public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The blemish of a colonial superorganism, the mass of organic matter pulses like a heart. The growth is the result of the corruption's beings forming together.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.HiveTumor") }); } diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index c430494c9e..0ee2477cf4 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -83,11 +83,10 @@ namespace CalamityMod.NPCs.Leviathan public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Boasting flawless manipulation of water, this elemental was known for almost limitless strength in her home turf. However, those days are long gone.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Anahita") }); } @@ -196,7 +195,7 @@ namespace CalamityMod.NPCs.Leviathan // Spawn Leviathan and change music if (phase3 || death) { - if (!HasBegunSummoningLeviathan) + if (!HasBegunSummoningLeviathan && !Main.zenithWorld) { // Use charging frames. NPC.ai[0] = 3f; @@ -292,7 +291,7 @@ namespace CalamityMod.NPCs.Leviathan } // Hover near the target, invisible if the Leviathan is present and not sufficiently injured. - if ((phase3 || death) && WaitingForLeviathan) + if ((phase3 || death) && WaitingForLeviathan && !Main.zenithWorld) { ChargeRotation(player, vector); ChargeLocation(player, vector, false, true); diff --git a/NPCs/Leviathan/AquaticAberration.cs b/NPCs/Leviathan/AquaticAberration.cs index 51a647a232..098289b76e 100644 --- a/NPCs/Leviathan/AquaticAberration.cs +++ b/NPCs/Leviathan/AquaticAberration.cs @@ -56,11 +56,10 @@ namespace CalamityMod.NPCs.Leviathan int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("All head and stomach, they will gorge and guzzle upon vast schools of fish on their own.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AquaticAberration") }); } diff --git a/NPCs/Leviathan/LevScreenShaderData.cs b/NPCs/Leviathan/LevScreenShaderData.cs index c2276b95fb..2cd7258460 100644 --- a/NPCs/Leviathan/LevScreenShaderData.cs +++ b/NPCs/Leviathan/LevScreenShaderData.cs @@ -18,7 +18,7 @@ namespace CalamityMod.NPCs.Leviathan private void UpdateLIndex() { - int LevType = ModContent.NPCType(); + int LevType = Main.zenithWorld ? ModContent.NPCType() : ModContent.NPCType(); if (LevIndex >= 0 && Main.npc[LevIndex].active && Main.npc[LevIndex].type == LevType) { return; diff --git a/NPCs/Leviathan/LevSky.cs b/NPCs/Leviathan/LevSky.cs index 1a7348a73f..5ee402bbb5 100644 --- a/NPCs/Leviathan/LevSky.cs +++ b/NPCs/Leviathan/LevSky.cs @@ -61,7 +61,7 @@ namespace CalamityMod.NPCs.Leviathan private bool UpdateLIndex() { - int LevType = ModContent.NPCType(); + int LevType = Main.zenithWorld ? ModContent.NPCType() : ModContent.NPCType(); if (LevIndex >= 0 && Main.npc[LevIndex].active && Main.npc[LevIndex].type == LevType) { return true; diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index e9b65e17e9..3d41996c34 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -37,6 +37,7 @@ namespace CalamityMod.NPCs.Leviathan private int biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax; private int counter = 0; private bool initialised = false; + private bool gfbAnaSummoned = false; private int soundDelay = 0; private float extrapitch = 0; public static Texture2D AttackTexture = null; @@ -92,11 +93,10 @@ namespace CalamityMod.NPCs.Leviathan public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A gargantuan marine reptile that lurks the ocean depths along with the Water Elemental, Anahita. It is unknown if she is the last of her kind, or was simply manifested into existence like her master.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Leviathan") }); } @@ -106,6 +106,7 @@ namespace CalamityMod.NPCs.Leviathan writer.Write(NPC.dontTakeDamage); writer.Write(soundDelay); writer.Write(NPC.Calamity().newAI[3]); + writer.Write(gfbAnaSummoned); } public override void ReceiveExtraAI(BinaryReader reader) @@ -114,6 +115,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.dontTakeDamage = reader.ReadBoolean(); soundDelay = reader.ReadInt32(); NPC.Calamity().newAI[3] = reader.ReadSingle(); + gfbAnaSummoned = reader.ReadBoolean(); } public override void AI() @@ -162,6 +164,16 @@ namespace CalamityMod.NPCs.Leviathan } } + if (phase2 && !sirenAlive && Main.zenithWorld && !gfbAnaSummoned) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int siren = NPC.NewNPC(NPC.GetSource_Death(), (int)NPC.Center.X, (int)NPC.position.Y + NPC.height - 1000, ModContent.NPCType(), NPC.whoAmI); + CalamityUtils.BossAwakenMessage(siren); + gfbAnaSummoned = true; + } + } + SoundStyle soundChoiceRage = SoundID.Zombie92; SoundStyle soundChoice = Utils.SelectRandom(Main.rand, new SoundStyle[] { diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index 22d092cd1c..31c29f67cf 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -56,11 +56,10 @@ namespace CalamityMod.NPCs.Leviathan public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("It seems to call out in an alluring voice, and tugs on comforting memories of the sea you never actually had.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.LeviathanStart") }); } @@ -117,17 +116,30 @@ namespace CalamityMod.NPCs.Leviathan if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D drawTex = TextureAssets.Npc[NPC.type].Value; + Texture2D drawTex = Main.zenithWorld ? ModContent.Request("CalamityMod/NPCs/Leviathan/Leviathan").Value : TextureAssets.Npc[NPC.type].Value; + Rectangle frame = Main.zenithWorld ? drawTex.Frame(2, 3, 0, 0) : NPC.frame; Vector2 origin = new Vector2(drawTex.Width / 2, drawTex.Height / 2); Vector2 drawPos = NPC.Center - screenPos; - drawPos -= new Vector2(drawTex.Width, drawTex.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; - drawPos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(drawTex, drawPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + if (Main.zenithWorld) + { + drawPos += new Vector2(200, 200); + } + else + { + drawPos -= new Vector2(drawTex.Width, drawTex.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); + } + Color color = Main.zenithWorld ? Color.Purple : drawColor; + float size = Main.zenithWorld ? 0.39f : NPC.scale; + spriteBatch.Draw(drawTex, drawPos, frame, NPC.GetAlpha(color), NPC.rotation, origin, size, spriteEffects, 0f); - drawTex = ModContent.Request("CalamityMod/NPCs/Leviathan/LeviathanStartGlow").Value; + if (!Main.zenithWorld) + { + drawTex = ModContent.Request("CalamityMod/NPCs/Leviathan/LeviathanStartGlow").Value; - spriteBatch.Draw(drawTex, drawPos, NPC.frame, Color.White, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(drawTex, drawPos, frame, Color.White, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + } return false; } @@ -173,7 +185,8 @@ namespace CalamityMod.NPCs.Leviathan } else if (Main.netMode != NetmodeID.MultiplayerClient) { - int siren = NPC.NewNPC(NPC.GetSource_Death(), (int)NPC.Center.X, (int)NPC.position.Y + NPC.height, ModContent.NPCType(), NPC.whoAmI); + int NPCType = Main.zenithWorld ? ModContent.NPCType() : ModContent.NPCType(); + int siren = NPC.NewNPC(NPC.GetSource_Death(), (int)NPC.Center.X, (int)NPC.position.Y + NPC.height, NPCType, NPC.whoAmI); CalamityUtils.BossAwakenMessage(siren); } } diff --git a/NPCs/NormalNPCs/AeroSlime.cs b/NPCs/NormalNPCs/AeroSlime.cs index 42cfd3a448..ad824856cd 100644 --- a/NPCs/NormalNPCs/AeroSlime.cs +++ b/NPCs/NormalNPCs/AeroSlime.cs @@ -45,11 +45,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Slimes take on the qualities of their environments and after feasting on aerialite ore, this slime has grown wings.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AeroSlime") }); } diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index 00ecff1d81..c9edca6759 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -58,11 +58,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("These automated mechanical worms used to dig out the caverns so labs could be built. Thankfully, they are long past their once efficient state, and have not received maintenance in decades.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ArmoredDigger") }); } diff --git a/NPCs/NormalNPCs/AuroraSpirit.cs b/NPCs/NormalNPCs/AuroraSpirit.cs index 1e19d8501b..a09381ee88 100644 --- a/NPCs/NormalNPCs/AuroraSpirit.cs +++ b/NPCs/NormalNPCs/AuroraSpirit.cs @@ -44,11 +44,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The souls of those who passed on in the heart of a blizzard. They now seek out others to freeze to death, to die as they did.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AuroraSpirit") }); } diff --git a/NPCs/NormalNPCs/BloomSlime.cs b/NPCs/NormalNPCs/BloomSlime.cs index 67621f6702..34d67f308f 100644 --- a/NPCs/NormalNPCs/BloomSlime.cs +++ b/NPCs/NormalNPCs/BloomSlime.cs @@ -41,11 +41,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("With the solar energy released from the profaned goddess' destruction, uelibloom has sprouted in the jungle's mud, and in the slimes which inhabit the biome.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BloomSlime") }); } diff --git a/NPCs/NormalNPCs/Bohldohr.cs b/NPCs/NormalNPCs/Bohldohr.cs index c911350447..259c90eda0 100644 --- a/NPCs/NormalNPCs/Bohldohr.cs +++ b/NPCs/NormalNPCs/Bohldohr.cs @@ -32,11 +32,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A distant relative to the gem-covered lizards found within the caverns. This species instead covers itself with the smooth bricks of the Temple and curls into a ball for locomotion.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Bohldohr") }); } diff --git a/NPCs/NormalNPCs/Cnidrion.cs b/NPCs/NormalNPCs/Cnidrion.cs index 17ddd744a7..3190e270c1 100644 --- a/NPCs/NormalNPCs/Cnidrion.cs +++ b/NPCs/NormalNPCs/Cnidrion.cs @@ -51,11 +51,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A confusing beast. They share qualities with many of the other desert creatures, yet seem to be able to store vast amounts of water in their bodies.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Cnidrion") }); } diff --git a/NPCs/NormalNPCs/CrawlerAmber.cs b/NPCs/NormalNPCs/CrawlerAmber.cs index 479f6f73bf..a078c638a6 100644 --- a/NPCs/NormalNPCs/CrawlerAmber.cs +++ b/NPCs/NormalNPCs/CrawlerAmber.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Besitary.GemCrawler") }); } diff --git a/NPCs/NormalNPCs/CrawlerAmethyst.cs b/NPCs/NormalNPCs/CrawlerAmethyst.cs index 92b36d0556..8059ebfee1 100644 --- a/NPCs/NormalNPCs/CrawlerAmethyst.cs +++ b/NPCs/NormalNPCs/CrawlerAmethyst.cs @@ -40,11 +40,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs.") }); + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Besitary.GemCrawler") + }); } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/NormalNPCs/CrawlerCrystal.cs b/NPCs/NormalNPCs/CrawlerCrystal.cs index 487da04895..715ec23fb4 100644 --- a/NPCs/NormalNPCs/CrawlerCrystal.cs +++ b/NPCs/NormalNPCs/CrawlerCrystal.cs @@ -41,11 +41,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundHallow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs.") }); + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Besitary.GemCrawler") + }); } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/NormalNPCs/CrawlerDiamond.cs b/NPCs/NormalNPCs/CrawlerDiamond.cs index 4ccd74f7b5..298831aed5 100644 --- a/NPCs/NormalNPCs/CrawlerDiamond.cs +++ b/NPCs/NormalNPCs/CrawlerDiamond.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Besitary.GemCrawler") }); } diff --git a/NPCs/NormalNPCs/CrawlerEmerald.cs b/NPCs/NormalNPCs/CrawlerEmerald.cs index 0109588ed5..56d6479f30 100644 --- a/NPCs/NormalNPCs/CrawlerEmerald.cs +++ b/NPCs/NormalNPCs/CrawlerEmerald.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Besitary.GemCrawler") }); } diff --git a/NPCs/NormalNPCs/CrawlerRuby.cs b/NPCs/NormalNPCs/CrawlerRuby.cs index 38fd896242..aa7ccee09c 100644 --- a/NPCs/NormalNPCs/CrawlerRuby.cs +++ b/NPCs/NormalNPCs/CrawlerRuby.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Besitary.GemCrawler") }); } diff --git a/NPCs/NormalNPCs/CrawlerSapphire.cs b/NPCs/NormalNPCs/CrawlerSapphire.cs index 5cefe38b27..ea21869eb0 100644 --- a/NPCs/NormalNPCs/CrawlerSapphire.cs +++ b/NPCs/NormalNPCs/CrawlerSapphire.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Besitary.GemCrawler") }); } diff --git a/NPCs/NormalNPCs/CrawlerTopaz.cs b/NPCs/NormalNPCs/CrawlerTopaz.cs index 1d3e6b0c63..e45b6c52c3 100644 --- a/NPCs/NormalNPCs/CrawlerTopaz.cs +++ b/NPCs/NormalNPCs/CrawlerTopaz.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A lizard, its back inundated with crystals. These provide protection, but they are easily spooked and can be harvested for the rare gems upon their backs.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Besitary.GemCrawler") }); } diff --git a/NPCs/NormalNPCs/CrimulanBlightSlime.cs b/NPCs/NormalNPCs/CrimulanBlightSlime.cs index dcab3cbbd7..9d1fb5c8bd 100644 --- a/NPCs/NormalNPCs/CrimulanBlightSlime.cs +++ b/NPCs/NormalNPCs/CrimulanBlightSlime.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Seemingly, these are slimes which have been given the blessing of a higher being, They seek out and devour but not for themselves, which is a rarity among slimes.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BlightSlime") }); } diff --git a/NPCs/NormalNPCs/CryoSlime.cs b/NPCs/NormalNPCs/CryoSlime.cs index cdec9b10ad..3354afd5b7 100644 --- a/NPCs/NormalNPCs/CryoSlime.cs +++ b/NPCs/NormalNPCs/CryoSlime.cs @@ -42,11 +42,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("When the release of Cryogen's magic slightly thawed the frozen metal which rested underground, the resulting meltwater formed these. Remnants of the ore still reside within them.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CryoSlime") }); } diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index 761b67f634..587e56d2b6 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -40,12 +40,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Within the octahedron, one can find ancient runes engraved into ice that does not melt. Who could have created these?") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Cryon") }); } diff --git a/NPCs/NormalNPCs/EbonianBlightSlime.cs b/NPCs/NormalNPCs/EbonianBlightSlime.cs index 0928df0a56..0d9718bde1 100644 --- a/NPCs/NormalNPCs/EbonianBlightSlime.cs +++ b/NPCs/NormalNPCs/EbonianBlightSlime.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Seemingly, these are slimes which have been given the blessing of a higher being, They seek out and devour but not for themselves, which is a rarity among slimes.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BlightSlime") }); } diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index e4921e7c15..16bc409e91 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -37,10 +37,10 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.aiStyle = -1; AIType = -1; - NPC.damage = 0; + NPC.damage = 50; NPC.width = 60; NPC.height = 80; - NPC.lifeMax = 10000; + NPC.lifeMax = 5000; NPC.knockBackResist = 0f; NPC.value = Item.buyPrice(0, 1, 0, 0); NPC.Opacity = 0f; @@ -60,10 +60,9 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Highly skilled in the art of spellcasting, these mysterious creatures seem to stand guard like sentinels in watch over something. Approach one close enough and you may be able to make out garbled whispers.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Eidolist") }); } @@ -81,6 +80,9 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + bool adultWyrmAlive = false; if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) { diff --git a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs index 9ee8b4bd6e..b4fa74c3b0 100644 --- a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs +++ b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs @@ -42,12 +42,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("With its tin hat upon its head and a dagger that gleams as gold as it does, it marches out into the rain, ready for battle.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.FearlessGoldfishWarrior") }); } diff --git a/NPCs/NormalNPCs/Frogfish.cs b/NPCs/NormalNPCs/Frogfish.cs index e7bdf63def..7cf3e785b1 100644 --- a/NPCs/NormalNPCs/Frogfish.cs +++ b/NPCs/NormalNPCs/Frogfish.cs @@ -41,11 +41,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Ambush predators that lay in wait for their prey. They are not particularly strong, and if you come across one, are dispatched with ease.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Frogfish") }); } diff --git a/NPCs/NormalNPCs/Horse.cs b/NPCs/NormalNPCs/Horse.cs index 1c56f06b40..e685b6d206 100644 --- a/NPCs/NormalNPCs/Horse.cs +++ b/NPCs/NormalNPCs/Horse.cs @@ -59,11 +59,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("It is civilization's goal to wrest nature under its control. This is the result of one such conquest, an artificial elemental, run by clockwork gears.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Horse") }); } diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index d2194ecbea..404cdd5601 100644 --- a/NPCs/NormalNPCs/IceClasper.cs +++ b/NPCs/NormalNPCs/IceClasper.cs @@ -102,12 +102,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("An enemy which knows no bounds in hunting its prey. In blizzards where visibility is low, they have been known to glaciate and capture travelers. What happens to the victims is unknown.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.IceClasper") }); } diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index 35b17959f3..ce2b86ec15 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -28,11 +28,11 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.noGravity = true; NPC.lavaImmune = true; - NPC.damage = 0; + NPC.damage = 50; NPC.width = 60; NPC.height = 60; NPC.defense = 30; - NPC.lifeMax = 5775; + NPC.lifeMax = 3000; NPC.aiStyle = -1; AIType = -1; NPC.value = Item.buyPrice(0, 0, 50, 0); @@ -49,12 +49,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A burning spirit, with no regard or acknowledgment for its surroundings. Anyone who intrudes upon the Profaned Goddess' holy grounds will be turned to ash.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ImpiousImmolator") }); } @@ -72,6 +71,9 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; NPC.noGravity = true; if (NPC.direction == 0) diff --git a/NPCs/NormalNPCs/KingSlimeJewel.cs b/NPCs/NormalNPCs/KingSlimeJewel.cs index 87316fd1d4..893b89f955 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel.cs +++ b/NPCs/NormalNPCs/KingSlimeJewel.cs @@ -11,6 +11,11 @@ namespace CalamityMod.NPCs.NormalNPCs { public class KingSlimeJewel : ModNPC { + private const int BoltShootGateValue = 75; + private const int BoltShootGateValue_Death = 60; + private const int BoltShootGateValue_BossRush = 45; + private const float LightTelegraphDuration = 45f; + public override void SetStaticDefaults() { NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers(0) { Hide = true }; @@ -21,12 +26,12 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.aiStyle = -1; AIType = -1; - NPC.damage = 0; + NPC.damage = 10; NPC.width = 22; NPC.height = 22; NPC.defense = 10; NPC.DR_NERD(0.1f); - NPC.lifeMax = 280; + NPC.lifeMax = 140; NPC.knockBackResist = 0f; NPC.noGravity = true; NPC.noTileCollide = true; @@ -38,8 +43,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { - // Red light - Lighting.AddLight((int)((NPC.position.X + (float)(NPC.width / 2)) / 16f), (int)((NPC.position.Y + (float)(NPC.height / 2)) / 16f), 1f, 0f, 0f); + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; // Despawn if (!NPC.AnyNPCs(NPCID.KingSlime)) @@ -102,13 +107,12 @@ namespace CalamityMod.NPCs.NormalNPCs } // Fire projectiles + NPC.ai[0] += 1f; if (Main.netMode != NetmodeID.MultiplayerClient) { - // Fire bolt every 1.5 seconds - NPC.localAI[0] += 1f; - if (NPC.localAI[0] >= (BossRushEvent.BossRushActive ? 45f : CalamityWorld.death ? 60f : 75f)) + if (NPC.ai[0] >= (BossRushEvent.BossRushActive ? BoltShootGateValue_BossRush : CalamityWorld.death ? BoltShootGateValue_Death : BoltShootGateValue)) { - NPC.localAI[0] = 0f; + NPC.ai[0] = 0f; Vector2 npcPos = new Vector2(NPC.Center.X, NPC.Center.Y); float xDist = Main.player[NPC.target].Center.X - npcPos.X; @@ -148,20 +152,30 @@ namespace CalamityMod.NPCs.NormalNPCs for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = projVector.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(NPC.GetSource_FromAI(), npcPos, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), npcPos, perturbedSpeed, type, damage, 0f, Main.myPlayer); } } else - Projectile.NewProjectile(NPC.GetSource_FromAI(), npcPos, projVector, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), npcPos, projVector, type, damage, 0f, Main.myPlayer); } } } - public override bool CheckActive() + public override Color? GetAlpha(Color drawColor) { - return false; + Color initialColor = Color.DarkRed; + Color newColor = initialColor; + Color finalColor = Color.White; + float colorTelegraphGateValue = (BossRushEvent.BossRushActive ? BoltShootGateValue_BossRush : CalamityWorld.death ? BoltShootGateValue_Death : BoltShootGateValue) - LightTelegraphDuration; + if (NPC.ai[0] > colorTelegraphGateValue) + newColor = Color.Lerp(initialColor, finalColor, (NPC.ai[0] - colorTelegraphGateValue) / LightTelegraphDuration); + newColor.A = (byte)(255 * NPC.Opacity); + + return newColor; } + public override bool CheckActive() => false; + public override void HitEffect(NPC.HitInfo hit) { Dust.NewDust(NPC.position, NPC.width, NPC.height, 90, hit.HitDirection, -1f, 0, default, 1f); diff --git a/NPCs/NormalNPCs/MantisShrimp.cs b/NPCs/NormalNPCs/MantisShrimp.cs index d24b244bb7..792a20229f 100644 --- a/NPCs/NormalNPCs/MantisShrimp.cs +++ b/NPCs/NormalNPCs/MantisShrimp.cs @@ -45,11 +45,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Should it land a blow with its rounded front claws, it will tear your flesh and shatter your bones. Needless to say, avoid this at all costs.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.MantisShrimp") }); } diff --git a/NPCs/NormalNPCs/OverloadedSoldier.cs b/NPCs/NormalNPCs/OverloadedSoldier.cs index 272b058f9b..c809377f28 100644 --- a/NPCs/NormalNPCs/OverloadedSoldier.cs +++ b/NPCs/NormalNPCs/OverloadedSoldier.cs @@ -43,11 +43,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Phantoplasm bulges through the corroded armor in the place of rotting flesh, as this creature reanimated by vengeful spirits treks the caverns of the world.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.OverloadedSoldier") }); } @@ -391,13 +390,13 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int k = 0; k < 3; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, hit.HitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, hit.HitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { for (int k = 0; k < 15; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, hit.HitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, hit.HitDirection, -1f, 0, default, 1f); } } } @@ -406,7 +405,7 @@ namespace CalamityMod.NPCs.NormalNPCs { npcLoot.Add(ModContent.ItemType()); LeadingConditionRule postML = npcLoot.DefineConditionalDropSet(DropHelper.PostML()); - postML.Add(ModContent.ItemType()); + postML.Add(ModContent.ItemType()); } } } diff --git a/NPCs/NormalNPCs/PerennialSlime.cs b/NPCs/NormalNPCs/PerennialSlime.cs index eeea01dc74..29e0c3a09c 100644 --- a/NPCs/NormalNPCs/PerennialSlime.cs +++ b/NPCs/NormalNPCs/PerennialSlime.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Slimes, from their time spent wobbling about the undergrowth, are full of nutrients, which would well support plant life. Many accept these growths and have been seen to carry blossoms.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PerennialSlime") }); } diff --git a/NPCs/NormalNPCs/PhantomSpirit.cs b/NPCs/NormalNPCs/PhantomSpirit.cs index 1117de3290..10dd45904b 100644 --- a/NPCs/NormalNPCs/PhantomSpirit.cs +++ b/NPCs/NormalNPCs/PhantomSpirit.cs @@ -39,11 +39,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Spirits which turned upon one another, cannibalizing others in their mindless frustrated frenzies. There is precedent in the past, for spirits which have devoured enough of others, to grow astoundingly in power.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PhantomSpirit") }); } @@ -51,7 +50,7 @@ namespace CalamityMod.NPCs.NormalNPCs { float speed = CalamityWorld.death ? 22f : CalamityWorld.revenge ? 19.5f : 17f; CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2); - int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f); + int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); Dust dust = Main.dust[num822]; dust.velocity *= 0.1f; dust.scale = 1.3f; @@ -62,13 +61,13 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int k = 0; k < 5; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, hit.HitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, hit.HitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { for (int num288 = 0; num288 < 50; num288++) { - int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); + int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); Dust dust = Main.dust[num289]; dust.velocity *= 2f; dust.noGravity = true; @@ -79,6 +78,6 @@ namespace CalamityMod.NPCs.NormalNPCs public override Color? GetAlpha(Color drawColor) => new Color(200, 200, 200, 0); - public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType()); + public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType()); } } diff --git a/NPCs/NormalNPCs/PhantomSpiritL.cs b/NPCs/NormalNPCs/PhantomSpiritL.cs index a762d53292..686af1f815 100644 --- a/NPCs/NormalNPCs/PhantomSpiritL.cs +++ b/NPCs/NormalNPCs/PhantomSpiritL.cs @@ -45,11 +45,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Spirits which turned upon one another, cannibalizing others in their mindless frustrated frenzies. There is precedent in the past, for spirits which have devoured enough of others, to grow astoundingly in power.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PhantomSpirit") }); } @@ -65,7 +64,7 @@ namespace CalamityMod.NPCs.NormalNPCs { float speed = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 16f : CalamityWorld.revenge ? 14f : 12f; CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2); - int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f); + int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); Dust dust = Main.dust[num822]; dust.velocity *= 0.1f; dust.scale = 1.3f; @@ -96,13 +95,13 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int k = 0; k < 5; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, hit.HitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, hit.HitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { for (int num288 = 0; num288 < 50; num288++) { - int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); + int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); Dust dust = Main.dust[num289]; dust.velocity *= 2f; dust.noGravity = true; @@ -113,6 +112,6 @@ namespace CalamityMod.NPCs.NormalNPCs public override Color? GetAlpha(Color drawColor) => new Color(200, 200, 200, 0); - public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 2, 4); + public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 2, 4); } } diff --git a/NPCs/NormalNPCs/PhantomSpiritM.cs b/NPCs/NormalNPCs/PhantomSpiritM.cs index 68f58ef132..d77ab006b9 100644 --- a/NPCs/NormalNPCs/PhantomSpiritM.cs +++ b/NPCs/NormalNPCs/PhantomSpiritM.cs @@ -41,11 +41,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Spirits which turned upon one another, cannibalizing others in their mindless frustrated frenzies. There is precedent in the past, for spirits which have devoured enough of others, to grow astoundingly in power.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PhantomSpirit") }); } @@ -61,7 +60,7 @@ namespace CalamityMod.NPCs.NormalNPCs { float speed = CalamityWorld.death ? 18f : CalamityWorld.revenge ? 15.75f : 13.5f; CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2); - int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f); + int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); Dust dust = Main.dust[num822]; dust.velocity *= 0.1f; dust.scale = 1.3f; @@ -73,13 +72,13 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int k = 0; k < 5; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, hit.HitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, hit.HitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { for (int num288 = 0; num288 < 50; num288++) { - int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); + int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); Dust dust = Main.dust[num289]; dust.velocity *= 2f; dust.noGravity = true; @@ -90,6 +89,6 @@ namespace CalamityMod.NPCs.NormalNPCs public override Color? GetAlpha(Color drawColor) => new Color(200, 200, 200, 0); - public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 1, 3); + public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 1, 3); } } diff --git a/NPCs/NormalNPCs/PhantomSpiritS.cs b/NPCs/NormalNPCs/PhantomSpiritS.cs index 2960a9a704..4397bae9ae 100644 --- a/NPCs/NormalNPCs/PhantomSpiritS.cs +++ b/NPCs/NormalNPCs/PhantomSpiritS.cs @@ -40,11 +40,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Spirits which turned upon one another, cannibalizing others in their mindless frustrated frenzies. There is precedent in the past, for spirits which have devoured enough of others, to grow astoundingly in power.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PhantomSpirit") }); } @@ -60,7 +59,7 @@ namespace CalamityMod.NPCs.NormalNPCs { float speed = CalamityWorld.death ? 20f : CalamityWorld.revenge ? 17.5f : 15f; CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2); - int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f); + int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); Dust dust = Main.dust[num822]; dust.velocity *= 0.1f; dust.scale = 1.3f; @@ -71,13 +70,13 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int k = 0; k < 5; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, hit.HitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, hit.HitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { for (int num288 = 0; num288 < 50; num288++) { - int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); + int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); Dust dust = Main.dust[num289]; dust.velocity *= 2f; dust.noGravity = true; @@ -88,6 +87,6 @@ namespace CalamityMod.NPCs.NormalNPCs public override Color? GetAlpha(Color drawColor) => new Color(200, 200, 200, 0); - public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 1, 2); + public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 1, 2); } } diff --git a/NPCs/NormalNPCs/Piggy.cs b/NPCs/NormalNPCs/Piggy.cs index b4f21bd8c5..0b37b5a1ba 100644 --- a/NPCs/NormalNPCs/Piggy.cs +++ b/NPCs/NormalNPCs/Piggy.cs @@ -65,12 +65,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Pigs are greedy little beasts. If they come across anything they could barely fathom as food, they will scarf it down in a blink.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Piggy") }); } diff --git a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs new file mode 100644 index 0000000000..06088da076 --- /dev/null +++ b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs @@ -0,0 +1,226 @@ +using System; +using System.IO; +using CalamityMod.DataStructures; +using CalamityMod.Events; +using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Items.Placeables.Ores; +using CalamityMod.NPCs.TownNPCs; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.Bestiary; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ModLoader.Utilities; + +namespace CalamityMod.NPCs.NormalNPCs +{ + public class PlanterasFreeTentacle : ModNPC + { + public override void SetStaticDefaults() + { + Main.npcFrameCount[NPC.type] = 4; + NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers(0) { Hide = true }; + NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); + } + + public override void SetDefaults() + { + NPC.Calamity().canBreakPlayerDefense = true; + NPC.aiStyle = -1; + AIType = -1; + NPC.GetNPCDamage(); + NPC.DR_NERD(0.1f); + NPC.width = 24; + NPC.height = 24; + NPC.defense = 20; + NPC.lifeMax = 1000; + NPC.knockBackResist = 0.4f; + NPC.noGravity = true; + NPC.noTileCollide = true; + NPC.HitSound = SoundID.NPCHit1; + NPC.DeathSound = SoundID.NPCDeath1; + NPC.Calamity().VulnerableToCold = true; + NPC.Calamity().VulnerableToHeat = true; + NPC.Calamity().VulnerableToSickness = true; + } + + public override void FindFrame(int frameHeight) + { + NPC.frameCounter += 1.0; + if (NPC.frameCounter >= 6.0) + { + NPC.frame.Y += frameHeight; + NPC.frameCounter = 0.0; + } + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + NPC.frame.Y = 0; + } + + public override void AI() + { + NPC.TargetClosest(); + + // Spore dust + if (Main.rand.NextBool(10)) + { + Dust dust = Dust.NewDustDirect(NPC.position, NPC.width, NPC.height, 44, 0f, 0f, 250, default, 0.2f); + dust.fadeIn = 0.7f; + } + + bool death = CalamityWorld.death || BossRushEvent.BossRushActive; + + if (Main.getGoodWorld) + { + if (Main.rand.NextBool(5)) + NPC.reflectsProjectiles = true; + else + NPC.reflectsProjectiles = false; + } + + // Die if Plantera is gone + if (NPC.plantBoss < 0) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + NPC.StrikeInstantKill(); + + return; + } + + // Velocity and acceleration + Vector2 idealVelocity = new Vector2(death ? 12f : 9f, death ? 5f : 3.5f); + float accelerationX = death ? 0.2f : 0.15f; + float accelerationY = death ? 0.15f : 0.12f; + + if (Main.getGoodWorld) + { + idealVelocity *= 1.5f; + accelerationX *= 2f; + accelerationY *= 2f; + } + + if (NPC.direction == -1 && NPC.velocity.X > -idealVelocity.X) + { + NPC.velocity.X -= accelerationX; + if (NPC.velocity.X > idealVelocity.X) + NPC.velocity.X -= accelerationX; + else if (NPC.velocity.X > 0f) + NPC.velocity.X -= accelerationX * 2f; + + if (NPC.velocity.X < -idealVelocity.X) + NPC.velocity.X = -idealVelocity.X; + } + else if (NPC.direction == 1 && NPC.velocity.X < idealVelocity.X) + { + NPC.velocity.X += accelerationX; + if (NPC.velocity.X < -idealVelocity.X) + NPC.velocity.X += accelerationX; + else if (NPC.velocity.X < 0f) + NPC.velocity.X += accelerationX * 2f; + + if (NPC.velocity.X > idealVelocity.X) + NPC.velocity.X = idealVelocity.X; + } + + if (NPC.directionY == -1 && (double)NPC.velocity.Y > -idealVelocity.Y) + { + NPC.velocity.Y -= accelerationY - 0.02f; + if ((double)NPC.velocity.Y > idealVelocity.Y) + NPC.velocity.Y -= accelerationY; + else if (NPC.velocity.Y > 0f) + NPC.velocity.Y -= accelerationY * 2.5f; + + if ((double)NPC.velocity.Y < -idealVelocity.Y) + NPC.velocity.Y = -idealVelocity.Y; + } + else if (NPC.directionY == 1 && (double)NPC.velocity.Y < idealVelocity.Y * 0.6f) + { + NPC.velocity.Y += accelerationY - 0.02f; + if ((double)NPC.velocity.Y < -idealVelocity.Y) + NPC.velocity.Y += accelerationY; + else if (NPC.velocity.Y < 0f) + NPC.velocity.Y += accelerationY * 2.5f; + + if ((double)NPC.velocity.Y > idealVelocity.Y) + NPC.velocity.Y = idealVelocity.Y; + } + + if (NPC.wet) + { + if (NPC.velocity.Y > 0f) + NPC.velocity.Y *= 0.95f; + + NPC.velocity.Y -= 0.5f; + if (NPC.velocity.Y < -4f) + NPC.velocity.Y = -4f; + + NPC.TargetClosest(); + } + + float pushVelocity = 0.5f; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active) + { + if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + { + if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 40f * NPC.scale) + { + if (NPC.position.X < Main.npc[i].position.X) + NPC.velocity.X -= pushVelocity; + else + NPC.velocity.X += pushVelocity; + + if (NPC.position.Y < Main.npc[i].position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; + } + } + } + } + + if (NPC.velocity.X > 0f) + { + NPC.spriteDirection = 1; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + } + if (NPC.velocity.X < 0f) + { + NPC.spriteDirection = -1; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.Pi; + } + } + + public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) + { + NPC.damage = (int)(NPC.damage * NPC.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) + { + if (hurtInfo.Damage > 0) + target.AddBuff(BuffID.Poisoned, 300); + } + + public override void HitEffect(NPC.HitInfo hit) + { + if (NPC.life > 0) + { + for (int i = 0; (double)i < hit.Damage / (double)NPC.lifeMax * 100.0; i++) + Dust.NewDust(NPC.position, NPC.width, NPC.height, 167, hit.HitDirection, -1f); + + return; + } + + for (int i = 0; i < 150; i++) + Dust.NewDust(NPC.position, NPC.width, NPC.height, 167, 2 * hit.HitDirection, -2f); + + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), new Vector2(NPC.position.X + (float)Main.rand.Next(NPC.width), NPC.position.Y + (float)Main.rand.Next(NPC.height)), NPC.velocity, 388, NPC.scale); + Gore.NewGore(NPC.GetSource_Death(), new Vector2(NPC.position.X + (float)Main.rand.Next(NPC.width), NPC.position.Y + (float)Main.rand.Next(NPC.height)), NPC.velocity, 389, NPC.scale); + } + } + } +} diff --git a/NPCs/NormalNPCs/PlanterasFreeTentacle.png b/NPCs/NormalNPCs/PlanterasFreeTentacle.png new file mode 100644 index 0000000000..a1fd119194 Binary files /dev/null and b/NPCs/NormalNPCs/PlanterasFreeTentacle.png differ diff --git a/NPCs/NormalNPCs/ProfanedEnergyBody.cs b/NPCs/NormalNPCs/ProfanedEnergyBody.cs index 399976d0cc..84de22502d 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyBody.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyBody.cs @@ -25,13 +25,13 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetDefaults() { NPC.aiStyle = -1; - NPC.damage = 0; + NPC.damage = 50; NPC.npcSlots = 3f; NPC.width = 72; NPC.height = 36; NPC.defense = 50; NPC.DR_NERD(0.1f); - NPC.lifeMax = 4500; + NPC.lifeMax = 2500; NPC.knockBackResist = 0f; AIType = -1; NPC.value = Item.buyPrice(0, 0, 50, 0); @@ -49,17 +49,19 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A living altar, close to the heart of the Profaned Goddess. From the crystal in its stand, flames lash out into the world, to burn the unfaithful.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ProfanedEnergyBody") }); } public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + CalamityGlobalNPC.energyFlame = NPC.whoAmI; if (Main.netMode != NetmodeID.MultiplayerClient) { diff --git a/NPCs/NormalNPCs/Rimehound.cs b/NPCs/NormalNPCs/Rimehound.cs index d4b8a4d949..610fa51baa 100644 --- a/NPCs/NormalNPCs/Rimehound.cs +++ b/NPCs/NormalNPCs/Rimehound.cs @@ -59,12 +59,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A large and bulky hound, its fur is frosted to the point of forming near-icicles. Being tackled by one is a painful experience.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Rimehound") }); } diff --git a/NPCs/NormalNPCs/Rotdog.cs b/NPCs/NormalNPCs/Rotdog.cs index d7e2b9f0b0..464b705b78 100644 --- a/NPCs/NormalNPCs/Rotdog.cs +++ b/NPCs/NormalNPCs/Rotdog.cs @@ -37,14 +37,14 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Malicious animals, which attack with tough claws and strong jaws. Any wound from these will bleed heavily. Address the cut quickly.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Rotdog") }); } + public override void FindFrame(int frameHeight) { if (NPC.IsABestiaryIconDummy) diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index f4b9c69033..bc222a2637 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -57,12 +57,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The brute force of the Profaned Goddess' creations and devotees. Their jaws are filled to the brim with razor-sharp crystals and scorching holy flames.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ScornEater") }); } diff --git a/NPCs/NormalNPCs/SeaUrchin.cs b/NPCs/NormalNPCs/SeaUrchin.cs index 63128f04d0..7cd73a0129 100644 --- a/NPCs/NormalNPCs/SeaUrchin.cs +++ b/NPCs/NormalNPCs/SeaUrchin.cs @@ -39,11 +39,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A spiny animal that flings itself about in defense of its territory. If they fling themselves onto land—though relatively helpless—they can make their way back to the ocean.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SeaUrchin") }); } diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index 7244a0e04e..849490a8d2 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -45,11 +45,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Proof of life in the stars, these were likely once weapons of war, now primitive to their original civilization. They continue to scour the cosmos for hospitable planets, which they attack.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ShockstormShuttle") }); } diff --git a/NPCs/NormalNPCs/Stormlion.cs b/NPCs/NormalNPCs/Stormlion.cs index 081d3d3bfa..6e89077e0a 100644 --- a/NPCs/NormalNPCs/Stormlion.cs +++ b/NPCs/NormalNPCs/Stormlion.cs @@ -39,11 +39,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("What these appear to feed on are the electric storms that brew over deserts. When the skies darken, they reach upwards with their mandibles that act as lightning rods.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Stormlion") }); } diff --git a/NPCs/NormalNPCs/Sunskater.cs b/NPCs/NormalNPCs/Sunskater.cs index 973d5872b0..2d3a46b02a 100644 --- a/NPCs/NormalNPCs/Sunskater.cs +++ b/NPCs/NormalNPCs/Sunskater.cs @@ -52,11 +52,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Some creatures which skirt the edges of our atmosphere tend to absorb and channel the sun's rays better than others. At any rate, this is a passive creature that means you no harm. You should return the favor.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Sunskater") }); } diff --git a/NPCs/NormalNPCs/ThiccWaifu.cs b/NPCs/NormalNPCs/ThiccWaifu.cs index c21e32a343..5ee6035625 100644 --- a/NPCs/NormalNPCs/ThiccWaifu.cs +++ b/NPCs/NormalNPCs/ThiccWaifu.cs @@ -85,12 +85,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Once, outposts were created in the sky, for ease of worship towards the forces that occupied the clouds in order to please them. Now they lay abandoned and their deity angered.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ThiccWaifu") }); } diff --git a/NPCs/NormalNPCs/WildBumblefuck.cs b/NPCs/NormalNPCs/WildBumblefuck.cs index 255964bd69..a444b445a2 100644 --- a/NPCs/NormalNPCs/WildBumblefuck.cs +++ b/NPCs/NormalNPCs/WildBumblefuck.cs @@ -53,11 +53,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Though these creatures may look adorable, they are a vicious invasive species. If not dealt with quickly, they may drive the nearby fauna to extinction.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WildBumblefuck") }); } diff --git a/NPCs/NormalNPCs/WulfrumAmplifier.cs b/NPCs/NormalNPCs/WulfrumAmplifier.cs index f973cca849..7fd33ea673 100644 --- a/NPCs/NormalNPCs/WulfrumAmplifier.cs +++ b/NPCs/NormalNPCs/WulfrumAmplifier.cs @@ -42,11 +42,11 @@ namespace CalamityMod.NPCs.NormalNPCs { AIType = -1; NPC.aiStyle = -1; - NPC.damage = 0; + NPC.damage = 10; NPC.width = 44; NPC.height = 44; NPC.defense = 4; - NPC.lifeMax = 92; + NPC.lifeMax = 46; NPC.knockBackResist = 0f; NPC.value = Item.buyPrice(0, 0, 1, 50); NPC.noGravity = false; @@ -61,17 +61,19 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A stationary foe, though its function is far from harmless. Within its influence, other wulfrum creations become notably empowered, the curious energy within them, overflowing.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WulfrumAmplifier") }); } public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + List SuperchargableEnemies = new List() { ModContent.NPCType(), diff --git a/NPCs/NormalNPCs/WulfrumDrone.cs b/NPCs/NormalNPCs/WulfrumDrone.cs index 35f432aa6f..4bd440faec 100644 --- a/NPCs/NormalNPCs/WulfrumDrone.cs +++ b/NPCs/NormalNPCs/WulfrumDrone.cs @@ -81,12 +81,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Rotating their small frames, they swoop at potential intruders into a predefined territory that no longer exists. They wander without purpose.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WulfrumDrone") }); } diff --git a/NPCs/NormalNPCs/WulfrumGyrator.cs b/NPCs/NormalNPCs/WulfrumGyrator.cs index bde7dbfffc..f454ef5cbd 100644 --- a/NPCs/NormalNPCs/WulfrumGyrator.cs +++ b/NPCs/NormalNPCs/WulfrumGyrator.cs @@ -67,12 +67,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("An orb of wulfrum metal. How it travels is a mystery, though it likely has something to do with its gyroscopic spinning. They fling their bodies at enemies to attack.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WulfrumGyrator") }); } diff --git a/NPCs/NormalNPCs/WulfrumHovercraft.cs b/NPCs/NormalNPCs/WulfrumHovercraft.cs index 6c17b6655a..1b85d28dea 100644 --- a/NPCs/NormalNPCs/WulfrumHovercraft.cs +++ b/NPCs/NormalNPCs/WulfrumHovercraft.cs @@ -88,12 +88,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Traveling with propulsion that carries them over the ground with ease, they seek out trespassers, though their analysis likely has grown imperceptive with age.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WulfrumHovercraft") }); } diff --git a/NPCs/NormalNPCs/WulfrumRover.cs b/NPCs/NormalNPCs/WulfrumRover.cs index ebf3c1a110..a673a71f33 100644 --- a/NPCs/NormalNPCs/WulfrumRover.cs +++ b/NPCs/NormalNPCs/WulfrumRover.cs @@ -66,12 +66,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("An aged automaton of unknown origins. With an incessant sense of duty and worn frame, they scour the land. Their lamps shine with curious energy.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WulfrumRover") }); } diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index e2335a17e5..d6d6767691 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -86,10 +86,9 @@ namespace CalamityMod.NPCs.OldDuke public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("One of the first descendants of the Dragons, its reign as the apex sea monster has been long forgotten. However, its power is still immense due to its heritage.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.OldDuke") }); } diff --git a/NPCs/OldDuke/SulphurousSharkron.cs b/NPCs/OldDuke/SulphurousSharkron.cs index 93ccc50ef4..bd8ce42cb1 100644 --- a/NPCs/OldDuke/SulphurousSharkron.cs +++ b/NPCs/OldDuke/SulphurousSharkron.cs @@ -63,10 +63,9 @@ namespace CalamityMod.NPCs.OldDuke int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Rotting, corpselike offspring of the Old Duke. In the Sulphurous Seas, even from birth, their appearances are wizened and decrepit.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SulphurousSharkron") }); } diff --git a/NPCs/Perforator/PerforatorCyst.cs b/NPCs/Perforator/PerforatorCyst.cs index ea2d63f2d1..e6c6361ba4 100644 --- a/NPCs/Perforator/PerforatorCyst.cs +++ b/NPCs/Perforator/PerforatorCyst.cs @@ -41,12 +41,11 @@ namespace CalamityMod.NPCs.Perforator public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A pulsing patch of anarchistic eyes and teeth. It is the culmination of the crimson's flesh and should be avoided at all costs.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PerforatorCyst") }); } diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index cef5bfc68c..349fef41ef 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -79,12 +79,11 @@ namespace CalamityMod.NPCs.Perforator int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Each equipped with a deadly mouthpiece, the different ones are suited for different tasks. One to pierce, one to tear, and another, simply to devour.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Perforator") }); } diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index f50b597cc8..8c384d396d 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -77,12 +77,11 @@ namespace CalamityMod.NPCs.Perforator int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Each equipped with a deadly mouthpiece, the different ones are suited for different tasks. One to pierce, one to tear, and another, simply to devour.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Perforator") }); } diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 2ab3602615..f49d716dfd 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -78,12 +78,11 @@ namespace CalamityMod.NPCs.Perforator int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Each equipped with a deadly mouthpiece, the different ones are suited for different tasks. One to pierce, one to tear, and another, simply to devour.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Perforator") }); } diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 7ae9aa4c4d..33c7751f91 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -78,12 +78,11 @@ namespace CalamityMod.NPCs.Perforator public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Though birthed by the crimson, it is unknown whether they fully serve that creator. The worms of the hive frequently carve huge tunnels in the crimson's flesh.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PerforatorHive") }); } diff --git a/NPCs/PlagueEnemies/Melter.cs b/NPCs/PlagueEnemies/Melter.cs index 8adae91998..b513caf129 100644 --- a/NPCs/PlagueEnemies/Melter.cs +++ b/NPCs/PlagueEnemies/Melter.cs @@ -45,12 +45,11 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Its face is warped and softened by the corrosive effects of the plague nanobots, and it seeks to share that uncomfortable fate with others under both its own will, and the plague's.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Melter") }); } diff --git a/NPCs/PlagueEnemies/PestilentSlime.cs b/NPCs/PlagueEnemies/PestilentSlime.cs index 6af3823305..0741665086 100644 --- a/NPCs/PlagueEnemies/PestilentSlime.cs +++ b/NPCs/PlagueEnemies/PestilentSlime.cs @@ -50,12 +50,11 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A slime infested by the nanobots of the plague. With no directive the plague can naturally apply to it, it simply continues its life, corroding anything which approaches.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PestilentSlime") }); } diff --git a/NPCs/PlagueEnemies/PlagueCharger.cs b/NPCs/PlagueEnemies/PlagueCharger.cs index 0e05617a16..05b0d92ce7 100644 --- a/NPCs/PlagueEnemies/PlagueCharger.cs +++ b/NPCs/PlagueEnemies/PlagueCharger.cs @@ -49,12 +49,11 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("While hornets on their own are known for aggressive defense of their territory, once they have been warped by the plague, their sense of their dominion reaches ever further.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PlagueCharger") }); } diff --git a/NPCs/PlagueEnemies/PlagueChargerLarge.cs b/NPCs/PlagueEnemies/PlagueChargerLarge.cs index 5debf54d44..546f2bc4cb 100644 --- a/NPCs/PlagueEnemies/PlagueChargerLarge.cs +++ b/NPCs/PlagueEnemies/PlagueChargerLarge.cs @@ -51,12 +51,11 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("While hornets on their own are known for aggressive defense of their territory, once they have been warped by the plague, their sense of their dominion reaches ever further.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PlagueCharger") }); } diff --git a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs index b01897a951..e6d974eb42 100644 --- a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs +++ b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs @@ -65,12 +65,11 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Queen Bees are reared upon royal honey, raising them into the matriarchs they are. If during the process, their growth is hijacked by the plague, they are left as only a pathetic reminder of what they could have been.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PlaguebringerMiniboss") }); } diff --git a/NPCs/PlagueEnemies/Plagueshell.cs b/NPCs/PlagueEnemies/Plagueshell.cs index 147161ceb3..45d26fb279 100644 --- a/NPCs/PlagueEnemies/Plagueshell.cs +++ b/NPCs/PlagueEnemies/Plagueshell.cs @@ -43,12 +43,11 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, - // wow reading these entries remind me of how cool it would be if the plague dynamically infected stuff - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("In truth, once a jungle tortoise has been touched by the plague, its original shell disintegrates, and the thorny shield it now wields is constructed entirely of reinforced nanobots.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Plagueshell") }); } diff --git a/NPCs/PlagueEnemies/Viruling.cs b/NPCs/PlagueEnemies/Viruling.cs index 9c488cd341..29e9c89e0c 100644 --- a/NPCs/PlagueEnemies/Viruling.cs +++ b/NPCs/PlagueEnemies/Viruling.cs @@ -45,12 +45,11 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Overtaken by the plague, derplings immediately lose their legs, as they are seen as only a hindrance. No longer will they gaily spring about.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Viruling") }); } diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 2b59ff4262..1dedecd67e 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -97,12 +97,11 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Machinery and nanobots have nearly entirely eaten away at the form of this Queen Bee. One wonders if it would simply be more efficient to create one from the ground up.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PlaguebringerGoliath") }); } diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index 5b025c96e1..13114f31d9 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -33,8 +33,8 @@ namespace CalamityMod.NPCs.Polterghast NPC.noGravity = true; NPC.noTileCollide = true; NPC.canGhostHeal = false; - NPC.damage = 0; - NPC.LifeMaxNERB(Main.expertMode ? 22500 : 17500, 37500, 30000); + NPC.damage = 50; + NPC.lifeMax = 20000; NPC.HitSound = SoundID.NPCHit36; NPC.DeathSound = SoundID.NPCDeath39; NPC.Calamity().VulnerableToSickness = false; @@ -54,8 +54,11 @@ namespace CalamityMod.NPCs.Polterghast start = reader.ReadBoolean(); } - public override bool PreAI() + public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + if (start) { start = false; @@ -75,7 +78,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.HitEffect(); NPC.active = false; NPC.netUpdate = true; - return false; + return; } float chargePhaseGateValue = 480f; @@ -130,8 +133,6 @@ namespace CalamityMod.NPCs.Polterghast SPEEN = 0f; NPC.ai[1] += (Main.getGoodWorld ? 1.5f : 0.5f) + SPEEN; - - return false; } public override Color? GetAlpha(Color drawColor) => new Color(200, 200, 200, 0); @@ -189,7 +190,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int num621 = 0; num621 < 2; num621++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 100, default, 2f); + int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool(2)) { diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 83c2c8dd06..9a05d34a14 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -549,7 +549,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int num621 = 0; num621 < 10; num621++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 100, default, 2f); + int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool(2)) { diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 99f2b09206..5a0cec958d 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -122,11 +122,10 @@ namespace CalamityMod.NPCs.Polterghast public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Screaming and crying, a cacophony of spirits in anguish tear through the narrow hallways of the dungeon, searching for more—alive or dead—to add to their numbers.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Polterghast") }); } @@ -826,7 +825,7 @@ namespace CalamityMod.NPCs.Polterghast for (int num621 = 0; num621 < 10; num621++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 100, default, 2f); + int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; Main.dust[num622].noGravity = true; if (Main.rand.NextBool(2)) @@ -980,7 +979,7 @@ namespace CalamityMod.NPCs.Polterghast for (int num621 = 0; num621 < 10; num621++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 100, default, 2f); + int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; Main.dust[num622].noGravity = true; if (Main.rand.NextBool(2)) @@ -1137,7 +1136,7 @@ namespace CalamityMod.NPCs.Polterghast // Materials normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType(), 1, 7, 15)); - normalOnly.Add(ModContent.ItemType(), 1, 30, 40); + normalOnly.Add(ModContent.ItemType(), 1, 30, 40); // Vanity normalOnly.Add(ModContent.ItemType(), 7); @@ -1367,7 +1366,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int num621 = 0; num621 < 10; num621++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 100, default, 2f); + int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool(2)) { diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs index 771029062b..d00c4c6401 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs @@ -82,12 +82,11 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("When it turns its burning spear towards anything, its simple mind has a clear goal. To entirely eradicate the enemy.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ProfanedGuardianCommander") }); } @@ -287,11 +286,11 @@ namespace CalamityMod.NPCs.ProfanedGuardians Player player = Main.player[NPC.target]; - if ((!Main.dayTime && !Main.zenithWorld) || !player.active || player.dead || Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) + if ((!Main.dayTime && !Main.remixWorld) || !player.active || player.dead || Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) { NPC.TargetClosest(false); player = Main.player[NPC.target]; - if ((!Main.dayTime && !Main.zenithWorld) || !player.active || player.dead || Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) + if ((!Main.dayTime && !Main.remixWorld) || !player.active || player.dead || Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) { if (NPC.velocity.Y > 3f) NPC.velocity.Y = 3f; @@ -1024,7 +1023,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianCommanderGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); - if (Main.zenithWorld) + if (Main.remixWorld) { texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianCommanderGlowNight").Value; color37 = Color.Cyan; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs index 3ec2e7bb77..1937bbd5e6 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs @@ -75,12 +75,11 @@ namespace CalamityMod.NPCs.ProfanedGuardians int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The body it has formed boasts of a stone shell hallowed and tempered by the flames of the sun. Very little can fully shatter its defense.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ProfanedGuardianDefender") }); } @@ -387,23 +386,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians } } - // This causes bugs due to the return - /*if (Main.zenithWorld) - { - if (Math.Abs(NPC.Center.X - player.Center.X) > 10f) - { - float playerLocation = NPC.Center.X - player.Center.X; - NPC.direction = playerLocation < 0f ? 1 : -1; - NPC.spriteDirection = NPC.direction; - } - // Block the main guardian - Vector2 guardPos = Main.npc[CalamityGlobalNPC.doughnutBoss].Center; - Vector2 playerPos = player.Center; - Vector2 midPoint = ((guardPos - playerPos) / 1.25f) + playerPos; - NPC.position = midPoint; - return; - }*/ - float moveVelocity = (bossRush || biomeEnraged) ? 24f : death ? 22f : revenge ? 21f : expertMode ? 20f : 18f; if (Main.getGoodWorld) moveVelocity *= 1.25f; @@ -703,6 +685,22 @@ namespace CalamityMod.NPCs.ProfanedGuardians NPC.velocity *= 0.97f; } + + if (Main.zenithWorld) + { + if (Math.Abs(NPC.Center.X - player.Center.X) > 10f) + { + float playerLocation = NPC.Center.X - player.Center.X; + NPC.direction = playerLocation < 0f ? 1 : -1; + NPC.spriteDirection = NPC.direction; + } + // Block the main guardian + Vector2 guardPos = Main.npc[CalamityGlobalNPC.doughnutBoss].Center; + Vector2 playerPos = player.Center; + Vector2 midPoint = ((guardPos - playerPos) / 1.25f) + playerPos; + NPC.position = midPoint; + return; + } } public override bool CheckActive() => false; @@ -749,7 +747,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianDefenderGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); - if (Main.zenithWorld) + if (Main.remixWorld) { texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianDefenderGlowNight").Value; color37 = Color.Cyan; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs index 01507dffef..de4247d78f 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs @@ -88,12 +88,11 @@ namespace CalamityMod.NPCs.ProfanedGuardians int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Its crystal which is displayed prominently on its body is able to restore damage done to its kin, and it draws that damage into flares which steal your life.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ProfanedGuardianHealer") }); } @@ -464,7 +463,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianHealerGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); - if (Main.zenithWorld) + if (Main.remixWorld) { texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianHealerGlowNight").Value; color37 = Color.Cyan; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 942d852cd2..37bebfdc46 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -160,12 +160,11 @@ namespace CalamityMod.NPCs.Providence public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A deity of stone and fire. Her flame burns for one reason alone— to cleanse the world of life, so that all may suffer no longer.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Providence") }); } @@ -535,10 +534,10 @@ namespace CalamityMod.NPCs.Providence DoDeathAnimation(); return; } - // Trigger the death animation - else if (NPC.life == 1) + else if (NPC.life <= 1) { + NPC.life = 1; DespawnSpecificProjectiles(true); Dying = true; NPC.dontTakeDamage = true; @@ -1844,7 +1843,10 @@ namespace CalamityMod.NPCs.Providence { return false; } - + public override bool CheckDead() + { + return false; + } public override void OnKill() { CalamityGlobalNPC.SetNewBossJustDowned(NPC); diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 76843becb1..7c305cb896 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -97,11 +97,10 @@ namespace CalamityMod.NPCs.Ravager public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Flames roar from what almost appear to be the parapets of a rotting fortress. You will know when it is approaching downwind, from the smell alone.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Ravager") }); } diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index 6635f9dfd6..2161745455 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -45,11 +45,10 @@ namespace CalamityMod.NPCs.Signus int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("These lanterns allow their user to see through any darkness. They are not typically used for combat.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CosmicLantern") }); } diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 00f8b7956d..1a9a83dea1 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -80,11 +80,10 @@ namespace CalamityMod.NPCs.Signus public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A figure draped in dark robes and even darker history. No one knows the true form of this creature, though many rumors have been spread.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Signus") }); } diff --git a/NPCs/SlimeGod/CorruptSlimeSpawn.cs b/NPCs/SlimeGod/CorruptSlimeSpawn.cs index ffc7f29428..1fba9f9cbd 100644 --- a/NPCs/SlimeGod/CorruptSlimeSpawn.cs +++ b/NPCs/SlimeGod/CorruptSlimeSpawn.cs @@ -49,12 +49,11 @@ namespace CalamityMod.NPCs.SlimeGod int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("They rapidly flap their wings, created from membranes of gel and spines of hardened slime. They will incessantly hunt you down.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CorruptSlimeSpawn") }); } diff --git a/NPCs/SlimeGod/CrimsonSlimeSpawn.cs b/NPCs/SlimeGod/CrimsonSlimeSpawn.cs index 351ea65828..49f13ea50d 100644 --- a/NPCs/SlimeGod/CrimsonSlimeSpawn.cs +++ b/NPCs/SlimeGod/CrimsonSlimeSpawn.cs @@ -47,12 +47,11 @@ namespace CalamityMod.NPCs.SlimeGod int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Irritant globs of gel, which can rob you of your vision if they get on your eyes. Avoid these at all costs, as they can spell death against the Slime God.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CrimsonSlimeSpawn") }); } diff --git a/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs b/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs index 2bd490b8b9..ff66fb1220 100644 --- a/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs +++ b/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs @@ -51,12 +51,11 @@ namespace CalamityMod.NPCs.SlimeGod int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Embedded in these slime's bodies are shards of crimulan stone, which drip with a toxin meant to impair your vision.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CrimsonSlimeSpawn2") }); } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index c00ca9ea6f..017f4582e6 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -83,12 +83,11 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("This God is rather evasive and relies on tricky and strategic retreats due to its relatively minor strength among the Gods. It prefers to be protected rather than be in combat fighting.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SlimeGodCore") }); } diff --git a/NPCs/SlimeGod/SplitCrimulanPaladin.cs b/NPCs/SlimeGod/SplitCrimulanPaladin.cs index befd1923d0..e7f442c334 100644 --- a/NPCs/SlimeGod/SplitCrimulanPaladin.cs +++ b/NPCs/SlimeGod/SplitCrimulanPaladin.cs @@ -61,12 +61,11 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Flanking their creator and serving as its body, these are concentrated, swirling masses of the world's evils, each utilizing the rot and corrosion to eat away and assimilate those who oppose it.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SlimeGodPaladin") }); } diff --git a/NPCs/SlimeGod/SplitEbonianPaladin.cs b/NPCs/SlimeGod/SplitEbonianPaladin.cs index 44ea43863f..6f72cf4ebe 100644 --- a/NPCs/SlimeGod/SplitEbonianPaladin.cs +++ b/NPCs/SlimeGod/SplitEbonianPaladin.cs @@ -61,12 +61,11 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Flanking their creator and serving as its body, these are concentrated, swirling masses of the world's evils, each utilizing the rot and corrosion to eat away and assimilate those who oppose it.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SlimeGodPaladin") }); } diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index e6f0f69857..308329c153 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -122,11 +122,10 @@ namespace CalamityMod.NPCs.StormWeaver public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("It resides high up in the stratosphere, feasting on wyverns and storm swimmers alike, which give it powerful electrokinesis.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.StormWeaver") }); } diff --git a/NPCs/SulphurousSea/AnthozoanCrab.cs b/NPCs/SulphurousSea/AnthozoanCrab.cs index a370ae93df..9d2cc53e40 100644 --- a/NPCs/SulphurousSea/AnthozoanCrab.cs +++ b/NPCs/SulphurousSea/AnthozoanCrab.cs @@ -53,10 +53,9 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A crab that has placed upon its back, a sturdy structure of stone. It is quite strong and displays this extraordinary strength by hurling boulders at those who encroach on its territory.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AnthozoanCrab") }); } diff --git a/NPCs/SulphurousSea/AquaticUrchin.cs b/NPCs/SulphurousSea/AquaticUrchin.cs index 46692d51c6..5bc86e4812 100644 --- a/NPCs/SulphurousSea/AquaticUrchin.cs +++ b/NPCs/SulphurousSea/AquaticUrchin.cs @@ -50,10 +50,9 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A relative of its brethren in the far ocean, this one's spines have been hardened by the sulphuric waters. They drip with the venom they inhabit, so it's better to not be struck by them.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AquaticUrchin") }); } diff --git a/NPCs/SulphurousSea/BelchingCoral.cs b/NPCs/SulphurousSea/BelchingCoral.cs index 89cbaddd58..16b7ee7f24 100644 --- a/NPCs/SulphurousSea/BelchingCoral.cs +++ b/NPCs/SulphurousSea/BelchingCoral.cs @@ -49,10 +49,9 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A rare species of coral, one which is able to process and draw nutrients from the waters of the sulphurous sea. During this process, a large amount of volatile gas is formed.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BelchingCoral") }); } diff --git a/NPCs/SulphurousSea/Gnasher.cs b/NPCs/SulphurousSea/Gnasher.cs index 72f8b75e12..7b7fad8f42 100644 --- a/NPCs/SulphurousSea/Gnasher.cs +++ b/NPCs/SulphurousSea/Gnasher.cs @@ -47,10 +47,9 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A turtle that has had its shell encrusted by the filth of the sulphurous sea. For an animal of its size, its jaws have a nearly unmatched biting strength.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Gnasher") }); } diff --git a/NPCs/SulphurousSea/Sulflounder.cs b/NPCs/SulphurousSea/Sulflounder.cs index 574440ce40..91b8c82b15 100644 --- a/NPCs/SulphurousSea/Sulflounder.cs +++ b/NPCs/SulphurousSea/Sulflounder.cs @@ -47,10 +47,9 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("These creatures do not seek out their food, but rather wait for their meals to come to them. Watch your step if you venture down into the sulphurous sea.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Sulflounder") }); } diff --git a/NPCs/SulphurousSea/Toxicatfish.cs b/NPCs/SulphurousSea/Toxicatfish.cs index c9fd8cf386..b08d54b05e 100644 --- a/NPCs/SulphurousSea/Toxicatfish.cs +++ b/NPCs/SulphurousSea/Toxicatfish.cs @@ -46,10 +46,9 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("An animal which adapted to the toxic waters quite naturally. It uses its whiskers to find its way, and its prey in the murky depths.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Toxicatfish") }); } diff --git a/NPCs/SulphurousSea/Trasher.cs b/NPCs/SulphurousSea/Trasher.cs index 01cab00388..36b0d49274 100644 --- a/NPCs/SulphurousSea/Trasher.cs +++ b/NPCs/SulphurousSea/Trasher.cs @@ -56,10 +56,9 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A huge alligator adapted to a life of scavenging in the sulphurous sea. They scrape morsels of food from the bottom with their massive jaws. But do not be mistaken. They will also prey on weak and feeble creatures.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Trasher") }); } diff --git a/NPCs/SunkenSea/BabyGhostBell.cs b/NPCs/SunkenSea/BabyGhostBell.cs index 793e3c49f3..cd835819c1 100644 --- a/NPCs/SunkenSea/BabyGhostBell.cs +++ b/NPCs/SunkenSea/BabyGhostBell.cs @@ -48,10 +48,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Like their adult counterparts, they shimmer gently, and would make great sources of light if the prisms around them didn't already do so. Maybe if there was a way to bring one with you.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BabyGhostBell") }); } diff --git a/NPCs/SunkenSea/BlindedAngler.cs b/NPCs/SunkenSea/BlindedAngler.cs index 3dae8fb9d7..804650ce5b 100644 --- a/NPCs/SunkenSea/BlindedAngler.cs +++ b/NPCs/SunkenSea/BlindedAngler.cs @@ -47,10 +47,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A species of angler which has lost any distinguishing feature on its head. Using primitive electroreception similar to sharks, it slowly and methodically hunts its prey.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.BlindedAngler") }); } diff --git a/NPCs/SunkenSea/Clam.cs b/NPCs/SunkenSea/Clam.cs index 1bc4adcf55..12e1ce4a1c 100644 --- a/NPCs/SunkenSea/Clam.cs +++ b/NPCs/SunkenSea/Clam.cs @@ -54,10 +54,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Sluggish mollusks filter what they can from the brackish water. Their shells are as hard as stone but contain delicate, succulent flesh.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Clam") }); } diff --git a/NPCs/SunkenSea/EutrophicRay.cs b/NPCs/SunkenSea/EutrophicRay.cs index 083a274770..00ecd57f2c 100644 --- a/NPCs/SunkenSea/EutrophicRay.cs +++ b/NPCs/SunkenSea/EutrophicRay.cs @@ -49,10 +49,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A stingray that spends much of its time docile on the rocky floors of the sunken sea's pools. It stores its energy, and when endangered, can release it in short bursts of speed.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.EutrophicRay") }); } diff --git a/NPCs/SunkenSea/GhostBell.cs b/NPCs/SunkenSea/GhostBell.cs index db01bb7150..857c2720b1 100644 --- a/NPCs/SunkenSea/GhostBell.cs +++ b/NPCs/SunkenSea/GhostBell.cs @@ -49,10 +49,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Ethereal jellyfish that drift in the still water of the sunken sea. Their bodies are curiously charged with an electric current.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.GhostBell") }); } diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index 31ca41d969..7c2c305046 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -76,10 +76,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("This oversized clam is large enough to entrap a person or two whole. Thankfully, it has only taken turf in the lowest regions of the sunken sea.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.GiantClam") }); } diff --git a/NPCs/SunkenSea/PrismBack.cs b/NPCs/SunkenSea/PrismBack.cs index 7ebdc145a3..3c80c68b70 100644 --- a/NPCs/SunkenSea/PrismBack.cs +++ b/NPCs/SunkenSea/PrismBack.cs @@ -54,10 +54,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Rather slow swimmers, they are one of the few creatures that need to breach. They periodically swim to the upper layer of their habitat to lay their eggs.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.PrismBack") }); } diff --git a/NPCs/SunkenSea/SeaFloaty.cs b/NPCs/SunkenSea/SeaFloaty.cs index c7adedd9c3..6f38094dd5 100644 --- a/NPCs/SunkenSea/SeaFloaty.cs +++ b/NPCs/SunkenSea/SeaFloaty.cs @@ -43,10 +43,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Strange but mesmerizing creatures, they hide immediately at the sight of any predator. They do not seem to be fully developed.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SeaFloaty") }); } diff --git a/NPCs/SunkenSea/SeaMinnow.cs b/NPCs/SunkenSea/SeaMinnow.cs index 35df0a3fd7..af2f8ea345 100644 --- a/NPCs/SunkenSea/SeaMinnow.cs +++ b/NPCs/SunkenSea/SeaMinnow.cs @@ -40,10 +40,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("While they are at the bottom of the food chain, they also make up eighty percent of the biomass in this sea. They nibble away at corpses that fall from the underground desert above.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SeaMinnow") }); } diff --git a/NPCs/SunkenSea/SeaSerpent1.cs b/NPCs/SunkenSea/SeaSerpent1.cs index 309b93697b..2cfe831e67 100644 --- a/NPCs/SunkenSea/SeaSerpent1.cs +++ b/NPCs/SunkenSea/SeaSerpent1.cs @@ -58,10 +58,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("These eels are largely passive and drift languidly through the still waters of the sunken sea. Should you provoke them, they can be stubborn attackers.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SeaSerpent") }); } diff --git a/NPCs/SupremeCalamitas/BrimstoneHeart.cs b/NPCs/SupremeCalamitas/BrimstoneHeart.cs index 672ce6e733..80e127235a 100644 --- a/NPCs/SupremeCalamitas/BrimstoneHeart.cs +++ b/NPCs/SupremeCalamitas/BrimstoneHeart.cs @@ -24,11 +24,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetDefaults() { - NPC.damage = 0; + NPC.damage = 50; NPC.width = 24; NPC.height = 24; NPC.defense = 0; - NPC.LifeMaxNERB(24550, 29440, 20000); + NPC.lifeMax = 15000; NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; @@ -60,6 +60,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + if (CalamityGlobalNPC.SCal < 0 || !Main.npc[CalamityGlobalNPC.SCal].active) { if (Main.netMode != NetmodeID.MultiplayerClient) diff --git a/NPCs/SupremeCalamitas/SepulcherHead.cs b/NPCs/SupremeCalamitas/SepulcherHead.cs index 04eaaf4713..b1beaf06a4 100644 --- a/NPCs/SupremeCalamitas/SepulcherHead.cs +++ b/NPCs/SupremeCalamitas/SepulcherHead.cs @@ -67,12 +67,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background SCal her like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SCal, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("This might just be the vilest undead abomination in this realm. The Sepulcher itself is completely immune to physical damage, and can only be killed by destroying its many suspended organs.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Sepulcher") }); } diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index c17b9aa217..8018ff674e 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -54,10 +54,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.noGravity = true; NPC.noTileCollide = true; NPC.canGhostHeal = false; - NPC.damage = 0; + NPC.damage = 50; NPC.defense = 60; NPC.DR_NERD(NormalDR); - NPC.LifeMaxNERB(Main.expertMode ? 24000 : 15000, 28000); + NPC.lifeMax = 14000; NPC.DeathSound = SoundID.DD2_SkeletonDeath; NPC.Calamity().VulnerableToHeat = false; NPC.Calamity().VulnerableToCold = true; @@ -68,12 +68,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background SCal her like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SCal, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Incomplete, ghoulish skulls, their forms are limited but their devotion boundless. It's likely each yearns for a soul of their own to be complete, whether it's given by Calamitas or ripped from the foe they kill.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SoulSeekerSupreme") }); } @@ -96,8 +93,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.frame.Y = 0; } - public override bool PreAI() + public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + // Die if SCal is no longer present. if (CalamityGlobalNPC.SCal < 0 || !SCal.active) { @@ -105,7 +105,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.HitEffect(); NPC.active = false; NPC.netUpdate = true; - return false; + return; } if (start) @@ -160,7 +160,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.position = SCal.Center - MathHelper.ToRadians(RotationalDegreeOffset).ToRotationVector2() * 300f - NPC.Size * 0.5f; RotationalDegreeOffset += 0.5f; - return false; } public override void OnKill() diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 0b076da6e2..af554911ef 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -17,6 +17,8 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; +using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.Providence; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Projectiles.Boss; using CalamityMod.World; @@ -34,6 +36,8 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; using Terraria.GameContent.ItemDropRules; +using CalamityMod.NPCs.Bumblebirb; +using CalamityMod.Buffs.Alcohol; namespace CalamityMod.NPCs.SupremeCalamitas { @@ -80,6 +84,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public bool spawnArena = false; public bool enteredBrothersPhase = false; public bool hasSummonedBrothers = false; + public bool cirrus = false; public int giveUpCounter = 1200; public int phaseChange = 0; @@ -154,8 +159,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas public static float enragedDR = 0.9999f; public static readonly Color textColor = Color.Orange; + public static readonly Color cirrusTextColor = Color.LightPink; public const int sepulcherSpawnCastTime = 75; public const int brothersSpawnCastTime = 150; + public const int MaxCirrusAlcohols = 20; + public const int MaxCirrusAlcoholDebuffDuration = 1500; // Sounds. public static readonly SoundStyle SpawnSound = new("CalamityMod/Sounds/Custom/SupremeCalamitasSpawn") { Volume = 1.2f }; @@ -227,12 +235,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background SCal her like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SCal, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The Brimstone Witch's harsh life can be seen in the magic she casts. Volatile and powerful, yet just barely refined. Her temper is said to be fiery enough to burn down a kingdom.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SupremeCalamitas") }); } @@ -270,6 +275,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas writer.Write(spawnArena); writer.Write(hasSummonedBrothers); writer.Write(enteredBrothersPhase); + writer.Write(cirrus); writer.Write(NPC.dontTakeDamage); writer.Write(NPC.chaseable); @@ -321,6 +327,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas spawnArena = reader.ReadBoolean(); hasSummonedBrothers = reader.ReadBoolean(); enteredBrothersPhase = reader.ReadBoolean(); + cirrus = reader.ReadBoolean(); NPC.dontTakeDamage = reader.ReadBoolean(); NPC.chaseable = reader.ReadBoolean(); @@ -465,7 +472,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.Size != hitboxSize) NPC.Size = hitboxSize; bool shouldNotUseShield = bulletHellCounter2 % 900 != 0 || attackCastDelay > 0 || - NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()) || + (cirrus ? NPC.AnyNPCs(ModContent.NPCType()) : (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()))) || NPC.ai[0] == 1f || NPC.ai[0] == 2f; // Make the shield and forcefield fade away in SCal's acceptance phase. @@ -501,7 +508,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas dust.position += (shieldRotation - MathHelper.PiOver2).ToRotationVector2() * (float)Math.Cos(NPC.velocity.ToRotation()) * -4f; dust.noGravity = true; dust.velocity = NPC.velocity; - dust.color = Color.Red; + dust.color = cirrus ? Color.Pink : Color.Red; dust.scale = MathHelper.Lerp(0.6f, 0.85f, 1f - num6 / 16f); } } @@ -644,12 +651,12 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (DownedBossSystem.downedCalamitas && !bossRush) { // Create a teleport line effect - Dust.QuickDustLine(NPC.Center, initialRitualPosition, 500f, Color.Red); + Dust.QuickDustLine(NPC.Center, initialRitualPosition, 500f, cirrus ? Color.Pink : Color.Red); NPC.Center = initialRitualPosition; // Make the town NPC spawn. if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y + 12, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y + 12, cirrus ? ModContent.NPCType() : ModContent.NPCType()); } NPC.active = false; @@ -659,7 +666,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 0; i < MathHelper.Lerp(2f, 6f, 1f - NPC.Opacity); i++) { Dust brimstoneFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-24f, 24f), DustID.Torch); - brimstoneFire.color = Color.Red; + brimstoneFire.color = cirrus ? Color.Pink : Color.Red; brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 3.25f); brimstoneFire.scale = Main.rand.NextFloat(0.95f, 1.15f); brimstoneFire.noGravity = true; @@ -687,7 +694,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas dustSpawnPosition.X += horizontalSpawnOffset; Dust magic = Dust.NewDustPerfect(dustSpawnPosition, 267); - magic.color = Color.Lerp(Color.Red, Color.Orange, Main.rand.NextFloat(0.8f)); + magic.color = Color.Lerp(cirrus ? Color.Pink : Color.Red, cirrus ? Color.Violet : Color.Orange, Main.rand.NextFloat(0.8f)); magic.noGravity = true; magic.velocity = Vector2.UnitY * -Main.rand.NextFloat(5f, 9f); magic.scale = 1f + NPC.velocity.Y * 0.35f; @@ -759,7 +766,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas attackCastDelay = sepulcherSpawnCastTime; for (int i = 0; i < 40; i++) { - Dust castFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-70f, 70f), (int)CalamityDusts.Brimstone); + Dust castFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-70f, 70f), cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone); castFire.velocity = Vector2.UnitY.RotatedByRandom(0.08f) * -Main.rand.NextFloat(3f, 4.45f); castFire.scale = Main.rand.NextFloat(1.35f, 1.6f); castFire.fadeIn = 1.25f; @@ -770,7 +777,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 0; i < 40; i++) { - Dust castFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-70f, 70f), (int)CalamityDusts.Brimstone); + Dust castFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-70f, 70f), cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone); castFire.velocity = Vector2.UnitY.RotatedByRandom(0.08f) * -Main.rand.NextFloat(3f, 4.45f); castFire.scale = Main.rand.NextFloat(1.35f, 1.6f); castFire.fadeIn = 1.25f; @@ -1068,7 +1075,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Teleport back to the arena on defeat if (giveUpCounter == 1200) { - Dust.QuickDustLine(NPC.Center, initialRitualPosition, 500f, Color.Red); + Dust.QuickDustLine(NPC.Center, initialRitualPosition, 500f, cirrus ? Color.Pink : Color.Red); NPC.Center = initialRitualPosition; } @@ -1082,7 +1089,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 0; i < 24; i++) { Dust brimstoneFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-24f, 24f), DustID.Torch); - brimstoneFire.color = Color.Red; + brimstoneFire.color = cirrus ? Color.Pink : Color.Red; brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 3.25f); brimstoneFire.scale = Main.rand.NextFloat(0.95f, 1.15f); brimstoneFire.fadeIn = 1.25f; @@ -1112,7 +1119,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 0; i < 24; i++) { Dust brimstoneFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-24f, 24f), DustID.Torch); - brimstoneFire.color = Color.Red; + brimstoneFire.color = cirrus ? Color.Pink : Color.Red; brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 3.25f); brimstoneFire.scale = Main.rand.NextFloat(0.95f, 1.15f); brimstoneFire.fadeIn = 1.25f; @@ -1192,7 +1199,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas attackCastDelay = sepulcherSpawnCastTime; for (int i = 0; i < 40; i++) { - Dust castFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-70f, 70f), (int)CalamityDusts.Brimstone); + Dust castFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-70f, 70f), cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone); castFire.velocity = Vector2.UnitY.RotatedByRandom(0.08f) * -Main.rand.NextFloat(3f, 4.45f); castFire.scale = Main.rand.NextFloat(1.35f, 1.6f); castFire.fadeIn = 1.25f; @@ -1203,7 +1210,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 0; i < 40; i++) { - Dust castFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-70f, 70f), (int)CalamityDusts.Brimstone); + Dust castFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-70f, 70f), cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone); castFire.velocity = Vector2.UnitY.RotatedByRandom(0.08f) * -Main.rand.NextFloat(3f, 4.45f); castFire.scale = Main.rand.NextFloat(1.35f, 1.6f); castFire.fadeIn = 1.25f; @@ -1267,17 +1274,64 @@ namespace CalamityMod.NPCs.SupremeCalamitas key += "Rematch"; CalamityUtils.DisplayLocalizedText(key, textColor); } + if (Main.netMode != NetmodeID.MultiplayerClient) { - SoundEngine.PlaySound(SoundID.Item74, NPC.Center); - for (int I = 0; I < 20; I++) + if (cirrus) { - int FireEye = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(vectorCenter.X + (Math.Sin(I * 18) * 300)), (int)(vectorCenter.Y + (Math.Cos(I * 18) * 300)), ModContent.NPCType(), NPC.whoAmI, 0, 0, 0, -1); - NPC Eye = Main.npc[FireEye]; - Eye.ai[0] = I * 18; - Eye.ai[3] = I * 18; + // Spawn 1 Providence, 2 Queen Slimes and 2 Empress of Lights + int maximumBullshit = 5; + int angleFromCirrus = 360 / maximumBullshit; + int distanceFromCirrus = 300; + for (int i = 0; i < maximumBullshit; i++) + { + switch (i) + { + case 0: + int npc = NPC.NewNPC(NPC.GetSource_FromAI(), + (int)(vectorCenter.X + (Math.Sin(i * angleFromCirrus) * distanceFromCirrus)), + (int)(vectorCenter.Y + (Math.Cos(i * angleFromCirrus) * distanceFromCirrus)), + ModContent.NPCType(), NPC.whoAmI); + Main.npc[npc].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(npc); + break; + + case 1: + case 2: + int npc2 = NPC.NewNPC(NPC.GetSource_FromAI(), + (int)(vectorCenter.X + (Math.Sin(i * angleFromCirrus) * distanceFromCirrus)), + (int)(vectorCenter.Y + (Math.Cos(i * angleFromCirrus) * distanceFromCirrus)), + NPCID.HallowBoss, NPC.whoAmI); + Main.npc[npc2].timeLeft *= 20; + break; + + case 3: + case 4: + int npc3 = NPC.NewNPC(NPC.GetSource_FromAI(), + (int)(vectorCenter.X + (Math.Sin(i * angleFromCirrus) * distanceFromCirrus)), + (int)(vectorCenter.Y + (Math.Cos(i * angleFromCirrus) * distanceFromCirrus)), + NPCID.QueenSlimeBoss, NPC.whoAmI); + Main.npc[npc3].timeLeft *= 20; + break; + + default: + break; + } + } + } + else + { + SoundEngine.PlaySound(SoundID.Item74, NPC.Center); + for (int i = 0; i < 20; i++) + { + int FireEye = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(vectorCenter.X + (Math.Sin(i * 18) * 300)), (int)(vectorCenter.Y + (Math.Cos(i * 18) * 300)), ModContent.NPCType(), NPC.whoAmI, 0, 0, 0, -1); + NPC Eye = Main.npc[FireEye]; + Eye.ai[0] = i * 18; + Eye.ai[3] = i * 18; + } } } + SoundEngine.PlaySound(SoundID.DD2_DarkMageHealImpact, player.Center); secondStage = true; } @@ -1482,7 +1536,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { Dust magic = Dust.NewDustPerfect(projectileSpawn, 264); magic.velocity = projectileVelocity.RotatedByRandom(0.36f) * Main.rand.NextFloat(0.9f, 1.1f); - magic.color = Color.OrangeRed; + magic.color = cirrus ? Color.BlueViolet : Color.OrangeRed; magic.scale = 1.2f; magic.fadeIn = 0.6f; magic.noLight = true; @@ -1503,9 +1557,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 0; i < 20; i++) { - Dust magic = Dust.NewDustPerfect(projectileSpawn, (int)CalamityDusts.Brimstone); + Dust magic = Dust.NewDustPerfect(projectileSpawn, cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone); magic.velocity = projectileVelocity.RotatedByRandom(0.36f) * Main.rand.NextFloat(0.9f, 1.1f) * 1.3f; - magic.color = Color.Red; + magic.color = cirrus ? Color.Pink : Color.Red; magic.scale = 1.425f; magic.fadeIn = 0.75f; magic.noLight = true; @@ -1534,7 +1588,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Dust magic = Dust.NewDustPerfect(projectileSpawn, 264); magic.velocity = magicDustVelocity; - magic.color = Color.Red; + magic.color = cirrus ? Color.Pink : Color.Red; magic.scale = MathHelper.Lerp(0.85f, 1.5f, i / 7f); magic.fadeIn = 0.67f; magic.noLight = true; @@ -1675,7 +1729,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas brimstoneMagic.velocity = NPC.DirectionTo(player.Center).RotatedByRandom(0.31f) * Main.rand.NextFloat(3f, 5f) + NPC.velocity; brimstoneMagic.scale = Main.rand.NextFloat(1.25f, 1.35f); brimstoneMagic.noGravity = true; - brimstoneMagic.color = Color.OrangeRed; + brimstoneMagic.color = cirrus ? Color.BlueViolet : Color.OrangeRed; brimstoneMagic.fadeIn = 1.5f; brimstoneMagic.noLight = true; } @@ -1752,7 +1806,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas brimstoneMagic.velocity = NPC.DirectionTo(player.Center).RotatedByRandom(0.24f) * Main.rand.NextFloat(5f, 7f) + NPC.velocity; brimstoneMagic.scale = Main.rand.NextFloat(1.25f, 1.35f); brimstoneMagic.noGravity = true; - brimstoneMagic.color = Color.OrangeRed; + brimstoneMagic.color = cirrus ? Color.BlueViolet : Color.OrangeRed; brimstoneMagic.fadeIn = 1.5f; brimstoneMagic.noLight = true; } @@ -1822,7 +1876,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas else { for (int num388 = 0; num388 < 50; num388++) - Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, Main.rand.Next(-30, 31) * 0.2f, Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone, Main.rand.Next(-30, 31) * 0.2f, Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f); SoundEngine.PlaySound(SpawnSound, NPC.Center); } @@ -1830,7 +1884,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 0; i < 4; i++) { - Dust brimstoneFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-24f, 24f), (int)CalamityDusts.Brimstone); + Dust brimstoneFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-24f, 24f), cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone); brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2.75f, 4.25f); brimstoneFire.noGravity = true; } @@ -1857,7 +1911,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } else { - if (NPC.AnyNPCs(ModContent.NPCType())) + if (cirrus ? NPC.AnyNPCs(ModContent.NPCType()) : NPC.AnyNPCs(ModContent.NPCType())) { NPC.dontTakeDamage = true; NPC.chaseable = false; @@ -2024,7 +2078,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { Dust magic = Dust.NewDustPerfect(projectileSpawn, 264); magic.velocity = projectileVelocity.RotatedByRandom(0.36f) * Main.rand.NextFloat(0.9f, 1.1f) * 1.2f; - magic.color = Color.OrangeRed; + magic.color = cirrus ? Color.BlueViolet : Color.OrangeRed; magic.scale = 1.3f; magic.fadeIn = 0.6f; magic.noLight = true; @@ -2045,9 +2099,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 0; i < 24; i++) { - Dust magic = Dust.NewDustPerfect(projectileSpawn, (int)CalamityDusts.Brimstone); + Dust magic = Dust.NewDustPerfect(projectileSpawn, cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone); magic.velocity = projectileVelocity.RotatedByRandom(0.36f) * Main.rand.NextFloat(0.9f, 1.1f) * 1.6f; - magic.color = Color.Red; + magic.color = cirrus ? Color.Pink : Color.Red; magic.scale = 1.5f; magic.fadeIn = 0.8f; magic.noLight = true; @@ -2076,7 +2130,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Dust magic = Dust.NewDustPerfect(projectileSpawn, 264); magic.velocity = magicDustVelocity; - magic.color = Color.Red; + magic.color = cirrus ? Color.Pink : Color.Red; magic.scale = MathHelper.Lerp(0.85f, 1.5f, i / 7f); magic.fadeIn = 0.67f; magic.noLight = true; @@ -2212,7 +2266,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas brimstoneMagic.velocity = NPC.DirectionTo(player.Center).RotatedByRandom(0.31f) * Main.rand.NextFloat(3f, 5f) + NPC.velocity; brimstoneMagic.scale = Main.rand.NextFloat(1.25f, 1.35f); brimstoneMagic.noGravity = true; - brimstoneMagic.color = Color.OrangeRed; + brimstoneMagic.color = cirrus ? Color.BlueViolet : Color.OrangeRed; brimstoneMagic.fadeIn = 1.5f; brimstoneMagic.noLight = true; } @@ -2293,7 +2347,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas brimstoneMagic.velocity = NPC.DirectionTo(player.Center).RotatedByRandom(0.24f) * Main.rand.NextFloat(5f, 7f) + NPC.velocity; brimstoneMagic.scale = Main.rand.NextFloat(1.25f, 1.35f); brimstoneMagic.noGravity = true; - brimstoneMagic.color = Color.OrangeRed; + brimstoneMagic.color = cirrus ? Color.BlueViolet : Color.OrangeRed; brimstoneMagic.fadeIn = 1.5f; brimstoneMagic.noLight = true; } @@ -2344,7 +2398,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Emit dust at the arm position as a sort of magic effect. Dust magic = Dust.NewDustPerfect(armPosition, 264); magic.velocity = Vector2.UnitY.RotatedByRandom(0.17f) * -Main.rand.NextFloat(2.7f, 4.1f); - magic.color = Color.OrangeRed; + magic.color = cirrus ? Color.BlueViolet : Color.OrangeRed; magic.noLight = true; magic.fadeIn = 0.6f; magic.noGravity = true; @@ -2357,7 +2411,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas castMagicDust.scale = 1.67f; castMagicDust.velocity = Main.rand.NextVector2CircularEdge(0.2f, 0.2f); castMagicDust.fadeIn = 0.67f; - castMagicDust.color = Color.Red; + castMagicDust.color = cirrus ? Color.Pink : Color.Red; castMagicDust.noGravity = true; } @@ -2376,9 +2430,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas foreach (Vector2 heartSpawnPosition in heartSpawnPositions) { // Make the hearts appear in a burst of flame. + // Spawn Dragonfollies if Cirrus exists. for (int i = 0; i < 20; i++) { - Dust castFire = Dust.NewDustPerfect(heartSpawnPosition + Main.rand.NextVector2Square(-30f, 30f), (int)CalamityDusts.Brimstone); + Dust castFire = Dust.NewDustPerfect(heartSpawnPosition + Main.rand.NextVector2Square(-30f, 30f), cirrus ? (int)CalamityDusts.Polterplasm : (int)CalamityDusts.Brimstone); castFire.velocity = Vector2.UnitY.RotatedByRandom(0.08f) * -Main.rand.NextFloat(3f, 4.45f); castFire.scale = Main.rand.NextFloat(1.35f, 1.6f); castFire.fadeIn = 1.25f; @@ -2392,25 +2447,44 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (Main.netMode != NetmodeID.MultiplayerClient) { - List hearts = new List(); - for (int x = 0; x < 5; x++) + if (cirrus) { - hearts.Add(NPC.NewNPC(NPC.GetSource_FromAI(), spawnX + 50, tempSpawnY, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255)); - spawnX += spawnXAdd; + for (int x = 0; x < 5; x++) + { + NPC.NewNPC(NPC.GetSource_FromAI(), spawnX + 50, tempSpawnY, ModContent.NPCType()); + spawnX += spawnXAdd; - hearts.Add(NPC.NewNPC(NPC.GetSource_FromAI(), spawnX2 - 50, tempSpawnY, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255)); - spawnX2 -= spawnXAdd; - tempSpawnY += spawnYAdd; + NPC.NewNPC(NPC.GetSource_FromAI(), spawnX2 - 50, tempSpawnY, ModContent.NPCType()); + spawnX2 -= spawnXAdd; + tempSpawnY += spawnYAdd; + } + + spawnX = spawnXReset; + spawnX2 = spawnXReset2; + spawnY = spawnYReset; } - - ConnectAllBrimstoneHearts(hearts); - - spawnX = spawnXReset; - spawnX2 = spawnXReset2; - spawnY = spawnYReset; - if (NPC.CountNPCS(ModContent.NPCType()) <= 0) // Check is here for the zenith seed + else { - NPC.SpawnOnPlayer(NPC.FindClosestPlayer(), ModContent.NPCType()); + List hearts = new List(); + for (int x = 0; x < 5; x++) + { + hearts.Add(NPC.NewNPC(NPC.GetSource_FromAI(), spawnX + 50, tempSpawnY, ModContent.NPCType())); + spawnX += spawnXAdd; + + hearts.Add(NPC.NewNPC(NPC.GetSource_FromAI(), spawnX2 - 50, tempSpawnY, ModContent.NPCType())); + spawnX2 -= spawnXAdd; + tempSpawnY += spawnYAdd; + } + + ConnectAllBrimstoneHearts(hearts); + + spawnX = spawnXReset; + spawnX2 = spawnXReset2; + spawnY = spawnYReset; + if (NPC.CountNPCS(ModContent.NPCType()) <= 0) // Check is here for the zenith seed + { + NPC.SpawnOnPlayer(NPC.FindClosestPlayer(), ModContent.NPCType()); + } } NPC.netUpdate = true; } @@ -2442,7 +2516,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Dust castMagicDust = Dust.NewDustPerfect(leftDustPosition, 267); castMagicDust.scale = 1.67f; castMagicDust.velocity = Main.rand.NextVector2CircularEdge(0.2f, 0.2f); - castMagicDust.color = Color.Red; + castMagicDust.color = cirrus ? Color.Pink : Color.Red; castMagicDust.noGravity = true; castMagicDust = Dust.CloneDust(castMagicDust); @@ -2467,7 +2541,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } fire.noGravity = true; fire.noLight = true; - fire.color = Color.OrangeRed; + fire.color = cirrus ? Color.BlueViolet : Color.OrangeRed; fire.scale = 1.4f + fire.velocity.Y * 0.16f; fire = Dust.NewDustPerfect(cataclysmSpawnPosition + Main.rand.NextVector2Circular(60f, 60f), 264); @@ -2479,7 +2553,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } fire.noGravity = true; fire.noLight = true; - fire.color = Color.OrangeRed; + fire.color = cirrus ? Color.BlueViolet : Color.OrangeRed; fire.scale = 1.4f + fire.velocity.Y * 0.16f; } } @@ -2496,8 +2570,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas } if (Main.netMode != NetmodeID.MultiplayerClient) { - CalamityUtils.SpawnBossBetter(catastropheSpawnPosition, ModContent.NPCType()); - CalamityUtils.SpawnBossBetter(cataclysmSpawnPosition, ModContent.NPCType()); + CalamityUtils.SpawnBossBetter(catastropheSpawnPosition, cirrus ? ModContent.NPCType() : ModContent.NPCType()); + CalamityUtils.SpawnBossBetter(cataclysmSpawnPosition, cirrus ? ModContent.NPCType() : ModContent.NPCType()); } SoundEngine.PlaySound(SoundID.DD2_DarkMageHealImpact, NPC.Center); hasSummonedBrothers = true; @@ -2588,7 +2662,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Spawn the SCal NPC directly where the boss was if (!BossRushEvent.BossRushActive) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y + 12, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y + 12, cirrus ? ModContent.NPCType() : ModContent.NPCType()); // Mark Calamitas as defeated DownedBossSystem.downedCalamitas = true; @@ -2737,6 +2811,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas Texture2D texture2D15 = DownedBossSystem.downedCalamitas && !BossRushEvent.BossRushActive ? TextureAssets.Npc[NPC.type].Value : ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SupremeCalamitasHooded").Value; + if (cirrus) + { + texture2D15 = ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SupremeCirrus").Value; + } + Vector2 vector11 = new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[NPC.type] / 2f); Color color36 = Color.White; float amount9 = 0.5f; @@ -2771,7 +2850,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas vector43 += Main.rand.NextVector2Circular(0.25f, 0.7f); // And gain a flaming aura. - Color auraColor = NPC.GetAlpha(Color.Red) * 0.4f; + Color auraColor = NPC.GetAlpha(cirrus ? Color.Pink : Color.Red) * 0.4f; for (int i = 0; i < 7; i++) { Vector2 rotationalDrawOffset = (MathHelper.TwoPi * i / 7f + Main.GlobalTimeWrappedHourly * 4f).ToRotationVector2(); @@ -2828,7 +2907,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas GameShaders.Misc["CalamityMod:SupremeShield"].UseImage1("Images/Misc/Perlin"); Color forcefieldColor = Color.DarkViolet; - Color secondaryForcefieldColor = Color.Red * 1.4f; + Color secondaryForcefieldColor = (cirrus ? Color.HotPink : Color.Red) * 1.4f; if (!NPC.dontTakeDamage && (willCharge || NPC.ai[1] == 2f)) { @@ -2898,7 +2977,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int k = 0; k < 5; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, hit.HitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone, hit.HitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { @@ -2910,7 +2989,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.position.Y = NPC.position.Y - (NPC.height / 2); for (int num621 = 0; num621 < 40; num621++) { - int num622 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + int num622 = Dust.NewDust(NPC.position, NPC.width, NPC.height, cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool(2)) { @@ -2920,10 +2999,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas } for (int num623 = 0; num623 < 70; num623++) { - int num624 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + int num624 = Dust.NewDust(NPC.position, NPC.width, NPC.height, cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + num624 = Dust.NewDust(NPC.position, NPC.width, NPC.height, cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); Main.dust[num624].velocity *= 2f; } } @@ -2938,7 +3017,80 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) { if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), 600, true); + { + target.AddBuff(ModContent.BuffType(), 600); + InflictCirrusDebuffs(target); + } + } + + public void InflictCirrusDebuffs(Player target) + { + if (cirrus) + { + switch (Main.rand.Next(MaxCirrusAlcohols)) + { + case 0: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 1: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 2: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 3: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 4: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 5: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 6: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 7: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 8: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 9: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 10: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 11: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 12: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 13: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 14: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 15: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 16: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 17: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 18: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + case 19: + target.AddBuff(ModContent.BuffType(), MaxCirrusAlcoholDebuffDuration); + break; + } + } } } } diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index 5b56920765..0b8321e09e 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -56,13 +56,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetDefaults() { NPC.BossBar = Main.BigBossProgressBar.NeverValid; - NPC.damage = 0; + NPC.damage = 50; NPC.npcSlots = 5f; NPC.width = 120; NPC.height = 120; NPC.defense = 80; NPC.DR_NERD(NormalBrothersDR); - NPC.LifeMaxNERB(230000, 276000, 200000); + NPC.lifeMax = 138000; double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; @@ -81,12 +81,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background SCal her like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SCal, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Despite retaining a humanoid form, it is not capable of any higher thoughts. It only knows violence.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SupremeCataclysm") }); } @@ -128,6 +125,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + // Set the whoAmI variable. CalamityGlobalNPC.SCalCataclysm = NPC.whoAmI; diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index b78a0228ca..0ab38a2510 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -48,13 +48,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetDefaults() { NPC.BossBar = Main.BigBossProgressBar.NeverValid; - NPC.damage = 0; + NPC.damage = 50; NPC.npcSlots = 5f; NPC.width = 120; NPC.height = 120; NPC.defense = 80; NPC.DR_NERD(SupremeCataclysm.NormalBrothersDR); - NPC.LifeMaxNERB(230000, 276000, 200000); + NPC.lifeMax = 138000; double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; @@ -73,12 +73,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas int associatedNPCType = ModContent.NPCType(); bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - //We'll probably want a custom background SCal her like ML has. - //BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SCal, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Calamitas' necromancy is outmatched by no one, but no one can truly bring the departed back from the dead.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SupremeCatastrophe") }); } @@ -121,6 +118,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void AI() { + // Setting this in SetDefaults will disable expert mode scaling, so put it here instead + NPC.damage = 0; + // Set the whoAmI variable. CalamityGlobalNPC.SCalCatastrophe = NPC.whoAmI; diff --git a/NPCs/SupremeCalamitas/SupremeCirrus.png b/NPCs/SupremeCalamitas/SupremeCirrus.png new file mode 100644 index 0000000000..dfd69ab6d3 Binary files /dev/null and b/NPCs/SupremeCalamitas/SupremeCirrus.png differ diff --git a/NPCs/TownNPCs/AndroombaFriendly.cs b/NPCs/TownNPCs/AndroombaFriendly.cs index 824285213d..521dabc60e 100644 --- a/NPCs/TownNPCs/AndroombaFriendly.cs +++ b/NPCs/TownNPCs/AndroombaFriendly.cs @@ -52,9 +52,9 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("Easily reversed engineered, these robots can be made to spread whatever you put into them, giving them a new purpose.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.AndroombaFriendly") }); } @@ -113,14 +113,11 @@ namespace CalamityMod.NPCs.TownNPCs { int x = (int)(NPC.Center.X / 16f); int y = (int)(NPC.Center.Y / 16f); - if (conversionType <= 4) + if (conversionType <= 7) { ConvertType type = ConvertType.Pure; switch (conversionType) { - case 0: - type = ConvertType.Pure; - break; case 1: type = ConvertType.Corrupt; break; @@ -260,6 +257,15 @@ namespace CalamityMod.NPCs.TownNPCs pathextenstion = "Crimson"; break; case 5: + pathextenstion = "Desert"; + break; + case 6: + pathextenstion = "Snow"; + break; + case 7: + pathextenstion = "Forest"; + break; + case 8: pathextenstion = "Astral"; break; } diff --git a/NPCs/TownNPCs/AndroombaFriendly_Desert.png b/NPCs/TownNPCs/AndroombaFriendly_Desert.png new file mode 100644 index 0000000000..f5e53f813e Binary files /dev/null and b/NPCs/TownNPCs/AndroombaFriendly_Desert.png differ diff --git a/NPCs/TownNPCs/AndroombaFriendly_Forest.png b/NPCs/TownNPCs/AndroombaFriendly_Forest.png new file mode 100644 index 0000000000..56e2bbfe7e Binary files /dev/null and b/NPCs/TownNPCs/AndroombaFriendly_Forest.png differ diff --git a/NPCs/TownNPCs/AndroombaFriendly_Snow.png b/NPCs/TownNPCs/AndroombaFriendly_Snow.png new file mode 100644 index 0000000000..8bad44a707 Binary files /dev/null and b/NPCs/TownNPCs/AndroombaFriendly_Snow.png differ diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index 2768d78a9c..c742f1ea89 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -63,12 +63,10 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("His face shows great age, but also great wisdom. The Archmage once served the Godslayer, but abandoned him later into the war. He sells various frosty wares, but keeps his most powerful spells to himself.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DILF") }); } diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 6829822888..c0c31c0b24 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -70,12 +70,10 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("No one knows where she came from, but no one minds her either. She's a good person to share a drink with, given you don't make her mad.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.FAP") }); } @@ -151,8 +149,8 @@ namespace CalamityMod.NPCs.TownNPCs } int permadong = NPC.FindFirstNPC(ModContent.NPCType()); - if (permadong != -1 && ChildSafety.Disabled) - dialogue.Add(this.GetLocalization("Chat.Archmage").Format(Main.npc[wife].GivenName)); + if (permadong != -1) + dialogue.Add(this.GetLocalization("Chat.Archmage").Format(Main.npc[permadong].GivenName)); int witch = NPC.FindFirstNPC(ModContent.NPCType()); if (witch != -1) diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index 2bfcf36d6d..f3dec07640 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -62,14 +62,10 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, - - //Change the info part in his entry when we do the critter barter - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The Sea King of an ancient civilization long lost to the sands of time— and the desert. He is able to give useful advice on the world around you, having lived for so long.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.SEAHOE") }); } diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index 18c93cb361..7475fd642b 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -61,12 +61,10 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A kleptomaniac who is a bit of a coward when it comes to face-to-face fights. She's rather good at getting herself both into and out of dicey situations.") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.THIEF") }); } diff --git a/NPCs/TownNPCs/WITCH.cs b/NPCs/TownNPCs/WITCH.cs index 55649f0a8b..9f512e328d 100644 --- a/NPCs/TownNPCs/WITCH.cs +++ b/NPCs/TownNPCs/WITCH.cs @@ -63,12 +63,10 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A most surprising sight to see this powerful foe live along friendly faces. Will history repeat itself or has she finally managed to free herself from the Tyrant's grasp?") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WITCH") }); } diff --git a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs index 8f60275452..5f45838578 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs @@ -330,14 +330,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Start flying if target is not within a certain distance if (!flag2) { - if (npc.type != NPCID.TheDestroyerBody || npc.ai[2] != 1f) - { - if (flyAtTarget) - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.1f, 0.3f, 0.05f); - else - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.3f, 0.1f, 0.05f); - } - npc.localAI[1] = 1f; if (npc.type == NPCID.TheDestroyer) @@ -852,12 +844,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } } - int num11 = (int)npc.Center.Y; - int i2 = (int)npc.Center.X / 16; - num11 /= 16; - if (!WorldGen.SolidTile(i2, num11)) - Lighting.AddLight((int)(npc.Center.X / 16f), (int)(npc.Center.Y / 16f), 0.3f, 0.1f, 0.05f); - if (num4 > 0f) { npc.spriteDirection = 1; diff --git a/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs b/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs index 74834ec311..9ba225d43b 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs @@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses hoverAcceleration += 0.05f; } - Vector2 hoverDestination = Main.player[npc.target].Center - Vector2.UnitY * 200f; + Vector2 hoverDestination = Main.player[npc.target].Center - Vector2.UnitY * 320f; Vector2 idealVelocity = npc.SafeDirectionTo(hoverDestination) * hoverSpeed; npc.SimpleFlyMovement(idealVelocity, hoverAcceleration); @@ -161,11 +161,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses Vector2 servantSpawnCenter = npc.Center + servantSpawnVelocity * 10f; if (Main.netMode != NetmodeID.MultiplayerClient && NPC.CountNPCS(NPCID.ServantofCthulhu) < 12) { - int num23 = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, NPCID.ServantofCthulhu, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num23].velocity = servantSpawnVelocity; + int eye = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, NPCID.ServantofCthulhu); + Main.npc[eye].velocity = servantSpawnVelocity; - if (Main.netMode == NetmodeID.Server && num23 < Main.maxNPCs) - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num23, 0f, 0f, 0f, 0, 0, 0); + if (Main.netMode == NetmodeID.Server && eye < Main.maxNPCs) + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, eye); } SoundEngine.PlaySound(SoundID.NPCHit1, servantSpawnCenter); @@ -182,7 +182,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses else if (npc.ai[1] == 1f) { npc.rotation = num8; - float chargeSpeed = 7.25f; + float chargeSpeed = 8f; chargeSpeed += 5f * enrageScale; if (death) chargeSpeed += 8.5f * (1f - lifeRatio); @@ -370,7 +370,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses hoverAcceleration += 0.04f * (0.75f - lifeRatio); } - Vector2 hoverDestination = Main.player[npc.target].Center - Vector2.UnitY * 120f; + Vector2 hoverDestination = Main.player[npc.target].Center - Vector2.UnitY * 160f; float distanceFromHoverDestination = npc.Distance(hoverDestination); if (distanceFromHoverDestination > 400f) @@ -649,12 +649,12 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses Vector2 servantSpawnCenter = npc.Center + servantSpawnVelocity * 10f; if (Main.netMode != NetmodeID.MultiplayerClient) { - int num34 = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, NPCID.ServantofCthulhu, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num34].velocity.X = servantSpawnVelocity.X; - Main.npc[num34].velocity.Y = servantSpawnVelocity.Y; + int eye = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, NPCID.ServantofCthulhu); + Main.npc[eye].velocity.X = servantSpawnVelocity.X; + Main.npc[eye].velocity.Y = servantSpawnVelocity.Y; - if (Main.netMode == NetmodeID.Server && num34 < Main.maxNPCs) - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num34, 0f, 0f, 0f, 0, 0, 0); + if (Main.netMode == NetmodeID.Server && eye < Main.maxNPCs) + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, eye); if (CalamityWorld.LegendaryMode) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs index 6731567983..5db403020a 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs @@ -1,5 +1,6 @@ using CalamityMod.Events; using CalamityMod.Projectiles.Boss; +using CalamityMod.NPCs.NormalNPCs; using CalamityMod.World; using Microsoft.Xna.Framework; using System; @@ -12,6 +13,19 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses { public static class PlanteraAI { + public const float SeedGatlingGateValue = 600f; + public const float SeedGatlingDuration = 300f; + public const float SeedGatlingColorChangeDuration = 180f; + public const float SeedGatlingStopValue = SeedGatlingGateValue + SeedGatlingDuration; + public const float SeedGatlingColorChangeGateValue = SeedGatlingStopValue - SeedGatlingColorChangeDuration; + public const float TentaclePhaseSlowDuration = 1200f; + public const float ChargePhaseGateValue = 900f; + public const float ReduceSpeedForChargeDistance = 600f; + public const float BeginChargeGateValue = -120f; + public const float BeginChargeSlowDownGateValue = BeginChargeGateValue - 60f; + public const float StopChargeGateValue = BeginChargeSlowDownGateValue - 30f; + public const float MovementVelocityMultiplierForSlowAttacks = 0.5f; + public static bool BuffedPlanteraAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); @@ -31,7 +45,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float lifeRatio = npc.life / (float)npc.lifeMax; // Phases based on HP - bool phase1phase2 = lifeRatio < 0.75f; + bool addThornBallsToGatlingAttack = lifeRatio < 0.85f; + bool addSporeGasBlastToGatlingAttack = lifeRatio < 0.75f; bool phase2 = lifeRatio <= 0.5f; bool phase3 = lifeRatio < 0.35f; bool phase4 = lifeRatio < 0.2f; @@ -70,53 +85,40 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (npc.localAI[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[0] = 1f; - int num729 = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasHook, npc.whoAmI); - num729 = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasHook, npc.whoAmI); - num729 = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasHook, npc.whoAmI); + NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasHook, npc.whoAmI); + NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasHook, npc.whoAmI); + NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasHook, npc.whoAmI); } // Find positions of hooks - int[] array2 = new int[3]; - float num730 = 0f; - float num731 = 0f; - int num732 = 0; - for (int num733 = 0; num733 < Main.maxNPCs; num733++) + int maxHooks = 3; + int[] tentacleArray = new int[maxHooks]; + float tentaclePositionX = 0f; + float tentaclePositionY = 0f; + int numHooksSpawned = 0; + for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[num733].active && Main.npc[num733].aiStyle == 52) + if (Main.npc[i].active && Main.npc[i].aiStyle == NPCAIStyleID.PlanteraHook) { - num730 += Main.npc[num733].Center.X; - num731 += Main.npc[num733].Center.Y; - array2[num732] = num733; + tentaclePositionX += Main.npc[i].Center.X; + tentaclePositionY += Main.npc[i].Center.Y; + tentacleArray[numHooksSpawned] = i; - num732++; - if (num732 > 2) + numHooksSpawned++; + if (numHooksSpawned >= maxHooks) break; } } - num730 /= num732; - num731 /= num732; + tentaclePositionX /= numHooksSpawned; + tentaclePositionY /= numHooksSpawned; // Velocity and acceleration - float velocity = 4f; - float acceleration = 0.04f; - if (phase3) - { - velocity = 6.5f; - acceleration = 0.06f; - if (phase4) - velocity = 7f; - } - else if (phase2) - { - velocity = 6f; - acceleration = 0.06f; - } - - if (bossRush) - { - velocity += 2f; - acceleration += 0.02f; - } + float velocity = bossRush ? 12f : phase4 ? 7f : phase3 ? 6.5f : phase2 ? 6f : 4f; + float acceleration = bossRush ? 0.12f : phase3 ? 0.06f : 0.04f; + float chargeLineUpVelocity = bossRush ? 20f : phase4 ? 12f : phase3 ? 10f : 8f; + float chargeLineUpAcceleration = bossRush ? 0.8f : phase4 ? 0.6f : phase3 ? 0.5f : 0.4f; + float chargeVelocity = bossRush ? 26f : phase4 ? 18f : phase3 ? 16f : 14f; + float chargeDeceleration = bossRush ? 0.85f : phase4 ? 0.92f : phase3 ? 0.95f : 0.96f; // Enrage if target is on the surface if (!bossRush && (surface || Main.player[npc.target].position.Y > ((Main.maxTilesY - 200) * 16))) @@ -128,48 +130,17 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.Calamity().CurrentlyEnraged = !bossRush && enrage; - // Detect active tiles around Plantera - int radius = 20; // 20 tile radius - int diameter = radius * 2; - int npcCenterX = (int)(npc.Center.X / 16f); - int npcCenterY = (int)(npc.Center.Y / 16f); - Rectangle area = new Rectangle(npcCenterX - radius, npcCenterY - radius, diameter, diameter); - int nearbyActiveTiles = 0; // 0 to 1600 - for (int x = area.Left; x < area.Right; x++) - { - for (int y = area.Top; y < area.Bottom; y++) - { - if (Main.tile[x, y] != null) - { - if (Main.tile[x, y].HasUnactuatedTile && Main.tileSolid[Main.tile[x, y].TileType] && !Main.tileSolidTop[Main.tile[x, y].TileType] && !TileID.Sets.Platforms[Main.tile[x, y].TileType]) - nearbyActiveTiles++; - } - } - } - - // Scale multiplier based on nearby active tiles - float tileEnrageMult = 1f; - if (nearbyActiveTiles < 800) - tileEnrageMult += (800 - nearbyActiveTiles) * 0.00075f; // Ranges from 1f to 1.6f - - if (bossRush) - tileEnrageMult = 1.6f; - - // Let hooks and tentacles know how enraged plantera is - npc.ai[3] = tileEnrageMult; - float tentacleEnrageMult = 1f - lifeRatio + (tileEnrageMult - 1f); - // Movement relative to the target and hook positions - Vector2 vector91 = new Vector2(num730, num731); - float num736 = Main.player[npc.target].Center.X - vector91.X; - float num737 = Main.player[npc.target].Center.Y - vector91.Y; + Vector2 npcCenterAccountingForTentacles = new Vector2(tentaclePositionX, tentaclePositionY); + float maxVelocityX = Main.player[npc.target].Center.X - npcCenterAccountingForTentacles.X; + float maxVelocityY = Main.player[npc.target].Center.Y - npcCenterAccountingForTentacles.Y; if (despawn) { - num737 *= -1f; - num736 *= -1f; + maxVelocityY *= -1f; + maxVelocityX *= -1f; velocity += 8f; } - float num738 = (float)Math.Sqrt(num736 * num736 + num737 * num737); + float distanceFromTarget = (float)Math.Sqrt(maxVelocityX * maxVelocityX + maxVelocityY * maxVelocityY); if (death) { @@ -177,107 +148,276 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses acceleration += acceleration * 0.25f * (1f - lifeRatio); } - // Increase speed based on nearby active tiles - velocity *= tileEnrageMult; - acceleration *= tileEnrageMult; - if (Main.getGoodWorld) { velocity *= 1.15f; acceleration *= 1.15f; } - // Velocity ranges from 4 to 7.2, Acceleration ranges from 0.04 to 0.072, non-enraged phase 1 - // Velocity ranges from 7 to 12.6, Acceleration ranges from 0.07 to 0.126, non-enraged phase 2 - // Velocity ranges from 9 to 16.2, Acceleration ranges from 0.07 to 0.126, non-enraged phase 3 - // Velocity ranges from 17 to 30.6, Acceleration ranges from 0.15 to 0.27, enraged phase 3 - - // Distance Plantera can travel from her hooks - float maxDistanceFromHooks = enrage ? 1000f : 600f; - if (phase3) - maxDistanceFromHooks += 150f; - if (death) - maxDistanceFromHooks += maxDistanceFromHooks * 0.2f * (1f - lifeRatio); - - if (num738 >= maxDistanceFromHooks) + // Slow down and fire a gatling of projectiles + // These projectiles are slower than normal + // Glow gradually more green the closer the gatling attack is to ending + bool usingSeedGatling = npc.ai[1] > SeedGatlingGateValue; + bool slowedDuringTentaclePhase = npc.ai[2] > 0f; + bool doneWithTentaclePhase = npc.ai[2] == -1f; + bool charging = npc.ai[3] <= -2f; + if (!phase2) { - num738 = maxDistanceFromHooks / num738; - num736 *= num738; - num737 *= num738; - } + npc.ai[1] += 1f; + if (usingSeedGatling) + { + float currentSeedGatlingTime = npc.ai[1] - SeedGatlingGateValue; - num730 += num736; - num731 += num737; - vector91 = new Vector2(npc.Center.X, npc.Center.Y); - num736 = num730 - vector91.X; - num737 = num731 - vector91.Y; - num738 = (float)Math.Sqrt(num736 * num736 + num737 * num737); + // Slow down more and more as gatling attack continues + velocity *= MathHelper.Lerp(MovementVelocityMultiplierForSlowAttacks, 1f, (float)Math.Pow(currentSeedGatlingTime / SeedGatlingDuration, 2D)); - if (num738 < velocity) - { - num736 = npc.velocity.X; - num737 = npc.velocity.Y; + // Shoot projectiles + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float shootProjectileGateValue = 30f; + if (currentSeedGatlingTime >= 240f) + shootProjectileGateValue = 3f; + else if (currentSeedGatlingTime >= 180f) + shootProjectileGateValue = 5f; + else if (currentSeedGatlingTime >= 120f) + shootProjectileGateValue = 9f; + else if (currentSeedGatlingTime >= 60f) + shootProjectileGateValue = 15f; + + if (npc.ai[1] % shootProjectileGateValue == 0f) + { + bool shootThornBall = npc.ai[1] % 90f == 0f && addThornBallsToGatlingAttack; + bool shootPoisonSeed = npc.ai[1] % 9f == 0f; + float projectileSpeed = 14f; + int projectileType = shootThornBall ? ProjectileID.ThornBall : shootPoisonSeed ? ProjectileID.PoisonSeedPlantera : ProjectileID.SeedPlantera; + int damage = npc.GetProjectileDamage(projectileType); + Vector2 projectileVelocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center); + int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity * 50f, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); + if (projectileType == ProjectileID.ThornBall && (Main.rand.NextBool(2) || !Main.zenithWorld)) + Main.projectile[proj].tileCollide = false; + } + } + } + + if (npc.ai[1] >= SeedGatlingStopValue) + { + // Vomit dense spread of spore gas at the end of the gatling attack + if (addSporeGasBlastToGatlingAttack) + { + SoundEngine.PlaySound(SoundID.Item74, npc.Center); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int totalProjectiles = 36; + float radians = MathHelper.TwoPi / totalProjectiles; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + for (int k = 0; k < totalProjectiles; k++) + { + float velocity2 = CalamityWorld.LegendaryMode ? Main.rand.NextFloat(8f, 12f) : Main.rand.NextFloat(4f, 6f); + Vector2 spinningPoint = new Vector2(0f, -velocity2); + Vector2 projectileVelocity = spinningPoint.RotatedBy(radians * k); + float ai0 = Main.rand.Next(3); + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(projectileVelocity) * 50f, projectileVelocity, type, damage, 0f, Main.myPlayer, ai0); + } + } + } + + npc.ai[1] = -SeedGatlingDuration; + } } else { - num738 = velocity / num738; - num736 *= num738; - num737 *= num738; + npc.ai[1] = 0f; + + // Slow down for a while after tentacles are spawned + if (slowedDuringTentaclePhase) + velocity *= MathHelper.Lerp(MovementVelocityMultiplierForSlowAttacks, 1f, (float)Math.Pow(1f - npc.ai[2] / TentaclePhaseSlowDuration, 2D)); + + // Prepare to charge + // More charges are used in a row at lower HP + if (doneWithTentaclePhase && !charging) + { + float timeToChargeIncrement = phase4 ? 2f : phase3 ? 1.5f : 1f; + npc.ai[3] += timeToChargeIncrement; + if (npc.ai[3] >= ChargePhaseGateValue) + npc.ai[3] = -2f; + } } - if (npc.velocity.X < num736) + // Move slowly for a bit after finishing gatling attack + bool slowedAfterGatlingAttack = npc.ai[1] < 0f && !phase2; + if (slowedAfterGatlingAttack) { - npc.velocity.X += acceleration; - if (npc.velocity.X < 0f && num736 > 0f) - npc.velocity.X += acceleration * 2f; - } - else if (npc.velocity.X > num736) - { - npc.velocity.X -= acceleration; - if (npc.velocity.X > 0f && num736 < 0f) - npc.velocity.X -= acceleration * 2f; - } - if (npc.velocity.Y < num737) - { - npc.velocity.Y += acceleration; - if (npc.velocity.Y < 0f && num737 > 0f) - npc.velocity.Y += acceleration * 2f; - } - else if (npc.velocity.Y > num737) - { - npc.velocity.Y -= acceleration; - if (npc.velocity.Y > 0f && num737 < 0f) - npc.velocity.Y -= acceleration * 2f; + float absValueOfTimer = Math.Abs(npc.ai[1]); + velocity *= MathHelper.Lerp(MovementVelocityMultiplierForSlowAttacks, 1f, (float)Math.Pow(absValueOfTimer / SeedGatlingDuration, 2D)); + + // Shoot homing pink bulb projectiles that leave behind lingering pink clouds + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float shootBulbGateValue = death ? 60f : 120f; + if (lifeRatio < 0.75f) + shootBulbGateValue *= 0.5f; + + if (absValueOfTimer % shootBulbGateValue == 0f) + { + float projectileSpeed = 9f; + int projectileType = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(projectileType); + Vector2 projectileVelocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center); + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity * 50f, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); + } + } } - // Slow down considerably if near player - if (!speedUp && nearbyActiveTiles > 800 && !Collision.SolidCollision(npc.position, npc.width, npc.height) && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + if (charging) { - if (npc.velocity.Length() > 4f) - npc.velocity *= 0.98f; - } + // Slow down and return to normal behavior + if (npc.ai[3] <= BeginChargeSlowDownGateValue) + { + npc.velocity *= chargeDeceleration; + float timeToDecelerateDecrement = bossRush ? 2f : phase4 ? 1.5f : 1f; + npc.ai[3] -= timeToDecelerateDecrement; + if (npc.ai[3] <= StopChargeGateValue) + npc.ai[3] = 0f; + } - // Rotation - float num740 = Main.player[npc.target].Center.X - npc.Center.X; - float num741 = Main.player[npc.target].Center.Y - npc.Center.Y; - npc.rotation = (float)Math.Atan2(num741, num740) + MathHelper.PiOver2; + // Maintain charge velocity + // Emit spore gas in phase 3 + else if (npc.ai[3] <= BeginChargeGateValue) + { + if (phase3 && npc.ai[3] % 10f == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int projectileType = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(projectileType); + Vector2 projectileVelocity = npc.velocity * Main.rand.NextVector2CircularEdge(0.1f, 0.1f); + float ai0 = Main.rand.Next(3); + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(projectileVelocity) * 30f, projectileVelocity, projectileType, damage, 0f, Main.myPlayer, ai0); + } + } + + npc.ai[3] -= 1f; + if (npc.ai[3] <= BeginChargeSlowDownGateValue) + npc.ai[3] = BeginChargeSlowDownGateValue; + } + + // Move a specified distance away from the target and charge once that distance is reached + else + { + // Line up before charging + if (npc.Calamity().newAI[0] == 0f) + npc.Calamity().newAI[0] = Math.Sign((npc.Center - Main.player[npc.target].Center).X); + + Vector2 destination = Main.player[npc.target].Center + new Vector2(npc.Calamity().newAI[0], 0); + Vector2 distanceFromDestination = destination - npc.Center; + Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * chargeLineUpVelocity; + + if (Vector2.Distance(npc.Center, destination) > ReduceSpeedForChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, chargeLineUpAcceleration); + else + npc.velocity *= 0.98f; + + float timeToLineUpChargeDecrement = phase4 ? 2f : 1f; + npc.ai[3] -= timeToLineUpChargeDecrement; + if (npc.ai[3] <= BeginChargeGateValue) + { + // Charge + npc.ai[3] = BeginChargeGateValue; + npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * chargeVelocity; + SoundEngine.PlaySound(SoundID.Item74, npc.Center); + + // Spore dust cloud + Vector2 dustVelocity = npc.velocity * -0.25f; + for (int k = 0; k < 50; k++) + { + Dust dust = Dust.NewDustDirect(npc.Center, npc.width, npc.height, 44, dustVelocity.X, dustVelocity.Y, 250, default, 0.8f); + dust.fadeIn = 0.7f; + } + } + + // Rotation + float rotationX = Main.player[npc.target].Center.X - npc.Center.X; + float rotationY = Main.player[npc.target].Center.Y - npc.Center.Y; + npc.rotation = (float)Math.Atan2(rotationY, rotationX) + MathHelper.PiOver2; + } + } + else + { + // Velocity ranges from 4 to 7.2, Acceleration ranges from 0.04 to 0.072, non-enraged phase 1 + // Velocity ranges from 7 to 12.6, Acceleration ranges from 0.07 to 0.126, non-enraged phase 2 + // Velocity ranges from 9 to 16.2, Acceleration ranges from 0.07 to 0.126, non-enraged phase 3 + // Velocity ranges from 17 to 30.6, Acceleration ranges from 0.15 to 0.27, enraged phase 3 + + // Distance Plantera can travel from her hooks + float maxDistanceFromHooks = enrage ? 1000f : 600f; + if (phase3) + maxDistanceFromHooks += 150f; + if (death) + maxDistanceFromHooks += maxDistanceFromHooks * 0.2f * (1f - lifeRatio); + + if (distanceFromTarget >= maxDistanceFromHooks) + { + distanceFromTarget = maxDistanceFromHooks / distanceFromTarget; + maxVelocityX *= distanceFromTarget; + maxVelocityY *= distanceFromTarget; + } + + tentaclePositionX += maxVelocityX; + tentaclePositionY += maxVelocityY; + npcCenterAccountingForTentacles = npc.Center; + maxVelocityX = tentaclePositionX - npcCenterAccountingForTentacles.X; + maxVelocityY = tentaclePositionY - npcCenterAccountingForTentacles.Y; + distanceFromTarget = (float)Math.Sqrt(maxVelocityX * maxVelocityX + maxVelocityY * maxVelocityY); + + if (distanceFromTarget < velocity) + { + maxVelocityX = npc.velocity.X; + maxVelocityY = npc.velocity.Y; + } + else + { + distanceFromTarget = velocity / distanceFromTarget; + maxVelocityX *= distanceFromTarget; + maxVelocityY *= distanceFromTarget; + } + + if (npc.velocity.X < maxVelocityX) + { + npc.velocity.X += acceleration; + if (npc.velocity.X < 0f && maxVelocityX > 0f) + npc.velocity.X += acceleration * 2f; + } + else if (npc.velocity.X > maxVelocityX) + { + npc.velocity.X -= acceleration; + if (npc.velocity.X > 0f && maxVelocityX < 0f) + npc.velocity.X -= acceleration * 2f; + } + if (npc.velocity.Y < maxVelocityY) + { + npc.velocity.Y += acceleration; + if (npc.velocity.Y < 0f && maxVelocityY > 0f) + npc.velocity.Y += acceleration * 2f; + } + else if (npc.velocity.Y > maxVelocityY) + { + npc.velocity.Y -= acceleration; + if (npc.velocity.Y > 0f && maxVelocityY < 0f) + npc.velocity.Y -= acceleration * 2f; + } + + // Rotation + float rotationX = Main.player[npc.target].Center.X - npc.Center.X; + float rotationY = Main.player[npc.target].Center.Y - npc.Center.Y; + npc.rotation = (float)Math.Atan2(rotationY, rotationX) + MathHelper.PiOver2; + } // Phase 1 if (!phase2) { - if (phase1phase2 && Main.netMode != NetmodeID.MultiplayerClient) - { - if (npc.localAI[0] == 1f) - { - npc.localAI[0] = 2f; - int baseTentacles = death ? 3 : 2; - int totalTentacles = (int)(baseTentacles * tileEnrageMult); - for (int i = 0; i < totalTentacles; i++) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI, 0f, 0f, tentacleEnrageMult); - } - } - } + // Emit light + Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.8f, 0.2f, 0.4f); // Adjust stats calamityGlobalNPC.DR = 0.15f; @@ -286,9 +426,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.damage = npc.defDamage; // Fire projectiles - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient && !usingSeedGatling && !slowedAfterGatlingAttack) { - float shootBoost = 8f * (1f - lifeRatio); + float shootBoost = 2f * (1f - lifeRatio); npc.localAI[1] += 1f + shootBoost; if (enrage) @@ -297,67 +437,16 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (Main.getGoodWorld) npc.localAI[1] += 1f; - // If hit, fire projectiles even if target is behind tiles - if (npc.justHit) - npc.localAI[3] = 1f; - - if (npc.localAI[1] >= 75f) + float shootProjectileGateValue = death ? 40f : 60f; + if (npc.localAI[1] >= shootProjectileGateValue) { npc.localAI[1] = 0f; - bool canHit = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); - if (npc.localAI[3] > 0f) - { - canHit = true; - npc.localAI[3] = 0f; - } - if (canHit) - { - npc.TargetClosest(); - int projectileType = ProjectileID.SeedPlantera; - float projectileVelocity = 17f; - if (Main.rand.NextBool(8)) - { - projectileType = ModContent.ProjectileType(); - projectileVelocity = 3f; - } - else if ((lifeRatio < 0.85f || CalamityWorld.LegendaryMode) && Main.rand.NextBool(4)) - { - npc.localAI[1] = CalamityWorld.LegendaryMode ? -15f : -30f; - projectileType = ProjectileID.PoisonSeedPlantera; - } - else if ((lifeRatio < 0.7f || CalamityWorld.LegendaryMode) && Main.rand.NextBool(2)) - { - int thornBallCount = 0; - int maxThornBalls = CalamityWorld.LegendaryMode ? 10 : 2; - for (int i = 0; i < Main.maxProjectiles; i++) - { - if (Main.projectile[i].active && Main.projectile[i].type == ProjectileID.ThornBall) - thornBallCount++; - - if (thornBallCount > maxThornBalls - 1) - break; - } - if (thornBallCount < maxThornBalls) - { - npc.localAI[1] = CalamityWorld.LegendaryMode ? -60f : -120f; - projectileType = ProjectileID.ThornBall; - } - } - - int damage = npc.GetProjectileDamage(projectileType); - - Vector2 vector93 = npc.Center; - float num743 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector93.X; - float num744 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector93.Y; - float num745 = (float)Math.Sqrt(num743 * num743 + num744 * num744); - num745 = projectileVelocity / num745; - num743 *= num745; - num744 *= num745; - - vector93.X += num743 * 3f; - vector93.Y += num744 * 3f; - Projectile.NewProjectile(npc.GetSource_FromAI(), vector93.X, vector93.Y, num743, num744, projectileType, damage, 0f, Main.myPlayer, 0f, projectileType == ProjectileID.ThornBall ? tileEnrageMult : 0f); - } + npc.TargetClosest(); + int projectileType = (CalamityWorld.LegendaryMode || Main.rand.NextBool(4)) ? ProjectileID.PoisonSeedPlantera : ProjectileID.SeedPlantera; + float projectileSpeed = 14f; + int damage = npc.GetProjectileDamage(projectileType); + Vector2 projectileVelocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center); + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity * 50f, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); } } } @@ -365,6 +454,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Phase 2 else { + // Spore dust + if (Main.rand.NextBool(10)) + { + Dust dust = Dust.NewDustDirect(npc.position, npc.width, npc.height, 44, 0f, 0f, 250, default, 0.6f); + dust.fadeIn = 0.7f; + } + // Adjust stats calamityGlobalNPC.DR = 0.15f; calamityGlobalNPC.unbreakableDR = false; @@ -374,27 +470,26 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Spawn tentacles if (Main.netMode != NetmodeID.MultiplayerClient) { - if (npc.localAI[0] == 2f) + if (npc.localAI[0] == 1f) { - npc.localAI[0] = 3f; - int baseTentacles = death ? 10 : 8; - int totalTentacles = (int)(baseTentacles * tileEnrageMult); + npc.localAI[0] = 2f; + int totalTentacles = death ? 10 : 8; if (Main.getGoodWorld) totalTentacles += 6; for (int i = 0; i < totalTentacles; i++) - NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI, 0f, 0f, tentacleEnrageMult); + NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI); if (Main.getGoodWorld) { for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && Main.npc[i].aiStyle == 52) + if (Main.npc[i].active && Main.npc[i].aiStyle == NPCAIStyleID.PlanteraHook) { for (int j = 0; j < totalTentacles / 2 - 1; j++) { - int num800 = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI, 0f, 0f, tentacleEnrageMult); - Main.npc[num800].ai[3] = i + 1; + int hookIndex = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI); + Main.npc[hookIndex].ai[3] = i + 1; } } } @@ -402,6 +497,22 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } } + // Slow down for 20 seconds after transitioning to phase 2 + // This gives players time to handle the tentacles before Plantera starts attack again + // Decrement the timer far faster if there aren't any tentacles alive + if (npc.ai[2] == 0f) + npc.ai[2] = TentaclePhaseSlowDuration; + + if (slowedDuringTentaclePhase) + { + bool noAttachedTentacles = !NPC.AnyNPCs(NPCID.PlanterasTentacle); + bool noFreeTentacles = !NPC.AnyNPCs(ModContent.NPCType()); + float tentacleIdleTimerDecrement = (noAttachedTentacles && noFreeTentacles) ? 4f : noAttachedTentacles ? 2f : 1f; + npc.ai[2] -= tentacleIdleTimerDecrement; + if (npc.ai[2] <= 0f) + npc.ai[2] = -1f; + } + // Spawn gore if (npc.localAI[2] == 0f) { @@ -414,170 +525,33 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.localAI[2] = 1f; } - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient && !charging) { - // Spawn spores - float spawnBoost = 8f * (0.5f - lifeRatio); - npc.localAI[1] += 1f + spawnBoost; - - // If hit, fire projectiles even if target is behind tiles - if (npc.justHit) - calamityGlobalNPC.newAI[2] = 1f; - - if (npc.localAI[1] >= 360f) - { - npc.localAI[1] = 0f; - bool canHit = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); - if (calamityGlobalNPC.newAI[2] > 0f) - { - canHit = true; - calamityGlobalNPC.newAI[2] = 0f; - } - if (canHit) - { - float num757 = 4f; - Vector2 vector94 = npc.Center; - float num758 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector94.X + Main.rand.Next(-10, 11); - float num759 = Math.Abs(num758 * 0.2f); - - float num760 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector94.Y + Main.rand.Next(-10, 11); - if (num760 > 0f) - num759 = 0f; - - num760 -= num759; - float num761 = (float)Math.Sqrt(num758 * num758 + num760 * num760); - num761 = num757 / num761; - num758 *= num761; - num760 *= num761; - - int num762 = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.Spore); - Main.npc[num762].velocity.X = num758; - Main.npc[num762].velocity.Y = num760; - Main.npc[num762].dontTakeDamage = bossRush; - Main.npc[num762].netUpdate = true; - } - } - // Fire spread of poison seeds - if (nearbyActiveTiles > 600) - npc.localAI[3] += 0.5f + (0.5f - lifeRatio) * 8f; - else - npc.localAI[3] += (nearbyActiveTiles > 300 ? 1f : 5f) + (0.5f - lifeRatio) * 8f; + npc.localAI[3] += 1f + (0.5f - lifeRatio) * 2f; - // If hit, fire projectiles even if target is behind tiles - if (npc.justHit) - calamityGlobalNPC.newAI[3] = 1f; - - if (npc.localAI[3] >= 360f) + float shootProjectileGateValue = slowedDuringTentaclePhase ? 120f : 90f; + if (npc.localAI[3] >= shootProjectileGateValue) { - bool canHit = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); - if (calamityGlobalNPC.newAI[3] > 0f) - { - canHit = true; - calamityGlobalNPC.newAI[3] = 0f; - } - if (canHit) - { - Vector2 vector93 = npc.Center; + float projectileSpeed = 10f + ((0.5f - lifeRatio) * 8f); // 10f to 14f + if (bossRush) + projectileSpeed += 4f; - float num742 = 8f + ((0.5f - lifeRatio) * 8f); // 8f to 12f - if (nearbyActiveTiles < 300) - num742 = 12f; - if (bossRush) - num742 += 4f; + Vector2 projectileVelocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center); - float num743 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector93.X; - float num744 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector93.Y; - float num745 = (float)Math.Sqrt(num743 * num743 + num744 * num744); - num745 = num742 / num745; - num743 *= num745; - num744 *= num745; - vector93.X += num743 * 3f; - vector93.Y += num744 * 3f; - - bool anyThornBalls = false; - for (int i = 0; i < Main.maxProjectiles; i++) - { - if (Main.projectile[i].active && Main.projectile[i].type == ProjectileID.ThornBall) - anyThornBalls = true; - - if (anyThornBalls) - break; - } - if (!anyThornBalls && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) - { - int type = ProjectileID.ThornBall; - int damage = npc.GetProjectileDamage(type); - - Projectile.NewProjectile(npc.GetSource_FromAI(), vector93.X, vector93.Y, num743, num744, type, damage, 0f, Main.myPlayer, 0f, tileEnrageMult); - - npc.localAI[3] = -240f; - } - else - { - int spread = 3 + (int)Math.Round((0.5f - lifeRatio) * 10f); // 3 to 8, wider spread is harder to avoid - if (nearbyActiveTiles < 300) - spread = Main.rand.Next(3, 7) + (int)Math.Round((0.5f - lifeRatio) * 8f); - - int numProj = spread / 2; - int type = ProjectileID.PoisonSeedPlantera; - int damage = npc.GetProjectileDamage(type); - - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = new Vector2(num743, num744).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(npc.GetSource_FromAI(), vector93, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, 0f); - } - - npc.localAI[3] = 0f; - } - } - } - - // Fire spread of spore clouds - float shootBoost = 2f * (0.5f - lifeRatio); - calamityGlobalNPC.newAI[0] += 1f + shootBoost; - - float sporeGasGateValue = CalamityWorld.LegendaryMode ? 150f : bossRush ? 300f : 600f; - if (calamityGlobalNPC.newAI[0] >= sporeGasGateValue) - { - npc.TargetClosest(); - SoundEngine.PlaySound(SoundID.Item20, npc.position); - - Vector2 vector93 = npc.Center; - float num742 = 3f; - float num743 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector93.X; - float num744 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector93.Y; - float num745 = (float)Math.Sqrt(num743 * num743 + num744 * num744); - num745 = num742 / num745; - num743 *= num745; - num744 *= num745; - vector93.X += num743 * 3f; - vector93.Y += num744 * 3f; - - int type = ModContent.ProjectileType(); + int spread = 3 + (int)Math.Round((0.5f - lifeRatio) * 10f); // 3 to 8, wider spread is harder to avoid + int numProj = spread / 2; + int type = ProjectileID.PoisonSeedPlantera; int damage = npc.GetProjectileDamage(type); - - int numProj = 4; - int spread = 30; - if (nearbyActiveTiles <= 300) - spread = Main.rand.NextBool(2) ? 45 : 60; - float rotation = MathHelper.ToRadians(spread); - float baseSpeed = (float)Math.Sqrt(num743 * num743 + num744 * num744); - double startAngle = Math.Atan2(num743, num744) - rotation / 2; - double deltaAngle = rotation / numProj; - double offsetAngle; for (int i = 0; i < numProj; i++) { - offsetAngle = startAngle + deltaAngle * i; - float ai0 = Main.rand.Next(3); - Projectile.NewProjectile(npc.GetSource_FromAI(), vector93.X, vector93.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), type, damage, 0f, Main.myPlayer, ai0, 0f); + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + perturbedSpeed * 50f, perturbedSpeed * projectileSpeed, type, damage, 0f, Main.myPlayer); } - calamityGlobalNPC.newAI[0] = 0f; + npc.localAI[3] = 0f; } } } @@ -628,13 +602,20 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses { if (Main.netMode != NetmodeID.MultiplayerClient) { - int healthInterval = death ? (int)(npc.lifeMax * 0.08) : (int)(npc.lifeMax * 0.1); + int healthInterval = death ? (int)(npc.lifeMax * 0.03) : (int)(npc.lifeMax * 0.05); if ((npc.life + healthInterval) < npc.ai[0]) { npc.ai[0] = npc.life; - if (NPC.CountNPCS(NPCID.PlanterasTentacle) < maxTentacles) - NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI, 0f, 0f, tentacleEnrageMult); + if (phase2) + { + int spore = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.Spore, npc.whoAmI); + float sporeSpeed = death ? 9f : 6f; + Vector2 sporeVelocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * sporeSpeed; + Main.npc[spore].velocity.X = sporeVelocity.X; + Main.npc[spore].velocity.Y = sporeVelocity.Y; + Main.npc[spore].netUpdate = true; + } } } } @@ -665,9 +646,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (Main.player[Main.npc[NPC.plantBoss].target].dead && !enrage) despawn = true; - // Tile enrage - float tileEnrageMult = Main.npc[NPC.plantBoss].ai[3]; - // Enrage if Plantera's target is on the surface if (!enrage && ((Main.player[Main.npc[NPC.plantBoss].target].position.Y < Main.worldSurface * 16.0 || Main.player[Main.npc[NPC.plantBoss].target].position.Y > ((Main.maxTilesY - 200) * 16)) | despawn)) { @@ -693,7 +671,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Timer dictating whether to pick a new location or not float moveBoost = death ? 4f * (1f - lifeRatio) : 2f * (1f - lifeRatio); - npc.localAI[0] -= (1f + moveBoost) * MathHelper.Lerp(1f, 3.6f, (tileEnrageMult - 1f) * 1.25f); + npc.localAI[0] -= 1f + moveBoost; if (enrage) npc.localAI[0] -= 6f; @@ -762,7 +740,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses { // Hook movement velocity float velocityBoost = death ? 6f * (1f - lifeRatio) : 3f * (1f - lifeRatio); - float velocity = (7f + velocityBoost) * tileEnrageMult; + float velocity = 7f + velocityBoost; if (enrage) velocity *= 2f; if (despawn) @@ -808,6 +786,16 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; + + // Spore dust + if (Main.rand.NextBool(10)) + { + Dust dust = Dust.NewDustDirect(npc.position, npc.width, npc.height, 44, 0f, 0f, 250, default, 0.4f); + dust.fadeIn = 0.7f; + } + bool death = CalamityWorld.death || BossRushEvent.BossRushActive; if (Main.getGoodWorld) @@ -818,7 +806,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.reflectsProjectiles = false; } - // Despawn if Plantera is gone + // Die if Plantera is gone if (NPC.plantBoss < 0) { if (Main.netMode != NetmodeID.MultiplayerClient) @@ -827,6 +815,18 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } + // Set Plantera to a variable + int plantBoss = NPC.plantBoss; + + // Become free if Plantera gets sick of your shit + if (Main.npc[plantBoss].ai[2] == -1f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + npc.StrikeInstantKill(); + + return false; + } + // 3 seconds of resistance and no damage to prevent spawn killing and unfair hits if (calamityGlobalNPC.newAI[1] < 90f) { @@ -836,10 +836,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses else npc.damage = npc.defDamage; - // Set Plantera to a variable - int num778 = NPC.plantBoss; - float tileEnrageMult = Main.npc[num778].ai[3]; - // Movement variables if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -852,23 +848,23 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } // Velocity and acceleration - float num779 = (death ? 2.4f : 1.6f) * tileEnrageMult; - float num781 = npc.ai[2]; - float num780 = 100f + (num781 * 150f); - float deceleration = (death ? 0.5f : 0.8f) / (1f + num781); + float num779 = death ? 2.4f : 1.6f; + float extendedDistanceFromPlantera = (1f - lifeRatio) * 2f; + float num780 = 100f + (extendedDistanceFromPlantera * 300f); + float deceleration = (death ? 0.5f : 0.8f) / (1f + extendedDistanceFromPlantera); if (Main.getGoodWorld) num779 += 4f; // Despawn if Plantera is gone - if (!Main.npc[num778].active || num778 < 0) + if (!Main.npc[plantBoss].active) { npc.active = false; return false; } // Movement - Vector2 planteraCenter = Main.npc[num778].Center; + Vector2 planteraCenter = Main.npc[plantBoss].Center; float num784 = planteraCenter.X + npc.ai[0]; float num785 = planteraCenter.Y + npc.ai[1]; float num786 = num784 - planteraCenter.X; @@ -877,6 +873,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses num788 = num780 / num788; num786 *= num788; num787 *= num788; + if (npc.position.X < planteraCenter.X + num786) { npc.velocity.X += num779; @@ -902,7 +899,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.velocity.Y *= deceleration; } - float velocityLimit = 12f + 6f * num781; + float velocityLimit = 12f + 6f * extendedDistanceFromPlantera; if (npc.velocity.X > velocityLimit) npc.velocity.X = velocityLimit; if (npc.velocity.X < -velocityLimit) @@ -923,6 +920,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.spriteDirection = -1; npc.rotation = (float)Math.Atan2(num787, num786) + MathHelper.Pi; } + return false; } } diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index f1ce20e581..133ee0ad55 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -118,11 +118,9 @@ namespace CalamityMod.NPCs.Yharon public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - - - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("The loyal companion of the God-Hunter, they possess immense power compared to the Dragons of the past. This is likely partly due to fighting and training by their master's side.") + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Yharon") }); } diff --git a/Particles/ManaDrainStreak.cs b/Particles/ManaDrainStreak.cs index 2a297a788a..559b16f958 100644 --- a/Particles/ManaDrainStreak.cs +++ b/Particles/ManaDrainStreak.cs @@ -18,8 +18,9 @@ namespace CalamityMod.Particles public float FinalDistanceFromPlayer; public Color StartColor; public Color EndColor; + public Vector2 OverridePosition; - public ManaDrainStreak(Player owner, float thickness, Vector2 startVector, float finalDistance, Color colorStart, Color colorEnd, int lifetime) + public ManaDrainStreak(Player owner, float thickness, Vector2 startVector, float finalDistance, Color colorStart, Color colorEnd, int lifetime, Vector2 overridePosition = default) { Owner = owner; Scale = thickness; @@ -31,6 +32,7 @@ namespace CalamityMod.Particles EndColor = colorEnd; Color = colorStart; Lifetime = lifetime; + OverridePosition = overridePosition; } public override void Update() @@ -38,7 +40,8 @@ namespace CalamityMod.Particles if (Owner == null || !Owner.active || Owner.dead) return; - Position = Owner.MountedCenter + Rotation.ToRotationVector2() * MathHelper.Lerp(StartDistanceFromPlayer, FinalDistanceFromPlayer, (float)Math.Pow(LifetimeCompletion, 2)); + Vector2 setPosition = OverridePosition != default ? OverridePosition : Owner.MountedCenter; + Position = setPosition + Rotation.ToRotationVector2() * MathHelper.Lerp(StartDistanceFromPlayer, FinalDistanceFromPlayer, (float)Math.Pow(LifetimeCompletion, 2)); Color = Color.Lerp(StartColor, EndColor, LifetimeCompletion); Lighting.AddLight(Position, Color.ToVector3() * 0.2f); } diff --git a/Particles/MediumMistParticle.cs b/Particles/MediumMistParticle.cs index dd97f2c2c1..d35f5330ca 100644 --- a/Particles/MediumMistParticle.cs +++ b/Particles/MediumMistParticle.cs @@ -31,7 +31,6 @@ namespace CalamityMod.Particles public override void Update() { - Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); Velocity *= 0.85f; @@ -46,10 +45,11 @@ namespace CalamityMod.Particles Scale *= 0.975f; Opacity -= 2; } + if (Opacity < 0) Kill(); - Color = Color.Lerp(ColorFire, ColorFade, MathHelper.Clamp((float)((255 -Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); + Color = Color.Lerp(ColorFire, ColorFade, MathHelper.Clamp((float)((255 - Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); } } diff --git a/Projectiles/Boss/BrimstoneBarrage.cs b/Projectiles/Boss/BrimstoneBarrage.cs index b94a636148..99bef8f5eb 100644 --- a/Projectiles/Boss/BrimstoneBarrage.cs +++ b/Projectiles/Boss/BrimstoneBarrage.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Events; +using CalamityMod.NPCs; using CalamityMod.NPCs.CalClone; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.World; @@ -105,6 +106,12 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { lightColor.R = (byte)(255 * Projectile.Opacity); + + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + lightColor.B = lightColor.B; + else + lightColor.B = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (byte)(255 * Projectile.Opacity) : lightColor.B; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/BrimstoneHellblast.cs b/Projectiles/Boss/BrimstoneHellblast.cs index 34023188f8..34de99c3ab 100644 --- a/Projectiles/Boss/BrimstoneHellblast.cs +++ b/Projectiles/Boss/BrimstoneHellblast.cs @@ -1,6 +1,8 @@ using System; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -73,6 +75,12 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { lightColor.R = (byte)(255 * Projectile.Opacity); + + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + lightColor.B = lightColor.B; + else + lightColor.B = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (byte)(255 * Projectile.Opacity) : lightColor.B; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/BrimstoneHellblast2.cs b/Projectiles/Boss/BrimstoneHellblast2.cs index 4f0fef6c60..2e2d98f32d 100644 --- a/Projectiles/Boss/BrimstoneHellblast2.cs +++ b/Projectiles/Boss/BrimstoneHellblast2.cs @@ -1,5 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Events; +using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -77,6 +79,12 @@ namespace CalamityMod.Projectiles.Boss int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int drawStart = frameHeight * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); + + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + lightColor.B = lightColor.B; + else + lightColor.B = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (byte)(255 * Projectile.Opacity) : lightColor.B; + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Boss/BrimstoneMonster.cs b/Projectiles/Boss/BrimstoneMonster.cs index 201f3aa2bf..3c2d7a6ca2 100644 --- a/Projectiles/Boss/BrimstoneMonster.cs +++ b/Projectiles/Boss/BrimstoneMonster.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; using CalamityMod.Events; +using CalamityMod.NPCs; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -167,6 +168,12 @@ namespace CalamityMod.Projectiles.Boss { Texture2D tex = ModContent.Request(Texture).Value; lightColor.R = (byte)(255 * Projectile.Opacity); + + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + lightColor.B = lightColor.B; + else + lightColor.B = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (byte)(255 * Projectile.Opacity) : lightColor.B; + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Boss/BrimstoneWave.cs b/Projectiles/Boss/BrimstoneWave.cs index 6621cc1b49..c18fc47bc9 100644 --- a/Projectiles/Boss/BrimstoneWave.cs +++ b/Projectiles/Boss/BrimstoneWave.cs @@ -1,4 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -75,6 +77,12 @@ namespace CalamityMod.Projectiles.Boss int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); + + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + lightColor.B = lightColor.B; + else + lightColor.B = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (byte)(255 * Projectile.Opacity) : lightColor.B; + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Boss/GreatSandBlast.cs b/Projectiles/Boss/GreatSandBlast.cs index ec5bff1866..13fd36fe28 100644 --- a/Projectiles/Boss/GreatSandBlast.cs +++ b/Projectiles/Boss/GreatSandBlast.cs @@ -91,6 +91,9 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { + lightColor.R = (byte)(255 * Projectile.Opacity); + lightColor.G = (byte)(255 * Projectile.Opacity); + lightColor.B = (byte)(255 * Projectile.Opacity); CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/HomingGasBulb.cs b/Projectiles/Boss/HomingGasBulb.cs new file mode 100644 index 0000000000..09a24d6a11 --- /dev/null +++ b/Projectiles/Boss/HomingGasBulb.cs @@ -0,0 +1,89 @@ +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Audio; +using System; +using CalamityMod.NPCs.TownNPCs; + +namespace CalamityMod.Projectiles.Boss +{ + public class HomingGasBulb : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Boss"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = 18; + Projectile.height = 18; + Projectile.hostile = true; + Projectile.tileCollide = false; + Projectile.penetrate = -1; + Projectile.timeLeft = 600; + } + + public override void AI() + { + if (Projectile.localAI[0] == 0f) + { + Projectile.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item17, Projectile.Center); + } + + Lighting.AddLight(Projectile.Center, 0.4f, 0f, 0.4f); + + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; + + int closestPlayer = (int)Player.FindClosest(Projectile.Center, 1, 1); + Vector2 velocity = Main.player[closestPlayer].Center - Projectile.Center; + Projectile.ai[0] += 1f; + if (Projectile.ai[0] >= 30f) + { + if (Projectile.ai[0] < 150f) + { + float scaleFactor2 = Projectile.velocity.Length(); + velocity.Normalize(); + velocity *= scaleFactor2; + Projectile.velocity = (Projectile.velocity * 24f + velocity) / 25f; + Projectile.velocity.Normalize(); + Projectile.velocity *= scaleFactor2; + } + else if (Projectile.velocity.Length() < 18f) + { + Projectile.tileCollide = true; + Projectile.velocity *= 1.02f; + } + } + + if (Projectile.ai[0] % 30f == 0f) + { + SoundEngine.PlaySound(SoundID.Item20, Projectile.Center); + if (Projectile.owner == Main.myPlayer) + { + int type = ModContent.ProjectileType(); + float ai0 = Main.rand.Next(3); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Normalize(Projectile.velocity) * 0.2f, type, (int)Math.Round(Projectile.damage * 0.8), 0f, Main.myPlayer, ai0); + } + } + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.NPCDeath1, Projectile.Center); + for (int i = 0; i < 15; i++) + { + if (Main.rand.Next(3) != 0) + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 166); + else + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 167); + } + } + } +} diff --git a/Projectiles/Boss/HomingGasBulb.png b/Projectiles/Boss/HomingGasBulb.png new file mode 100644 index 0000000000..6aac5f31d0 Binary files /dev/null and b/Projectiles/Boss/HomingGasBulb.png differ diff --git a/Projectiles/Boss/HomingGasBulbSporeGas.cs b/Projectiles/Boss/HomingGasBulbSporeGas.cs new file mode 100644 index 0000000000..8ceeafde71 --- /dev/null +++ b/Projectiles/Boss/HomingGasBulbSporeGas.cs @@ -0,0 +1,109 @@ +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class HomingGasBulbSporeGas : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Boss"; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = 20; + Projectile.height = 20; + Projectile.hostile = true; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(Projectile.localAI[0]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + Projectile.localAI[0] = reader.ReadSingle(); + } + + public override void AI() + { + Projectile.ai[1] += 1f; + if (Projectile.ai[1] > (CalamityWorld.LegendaryMode ? 600f : 1800f)) + { + Projectile.localAI[0] += 10f; + Projectile.damage = 0; + } + + if (Projectile.localAI[0] > 255f) + { + Projectile.Kill(); + Projectile.localAI[0] = 255f; + } + + float lightValues = (255 - Projectile.alpha) * 0.3f / 255f; + Lighting.AddLight(Projectile.Center, lightValues, 0f, lightValues); + + Projectile.alpha = (int)(100.0 + Projectile.localAI[0] * 0.7); + Projectile.rotation += Projectile.velocity.X * 0.02f; + Projectile.rotation += Projectile.direction * 0.002f; + + if (Projectile.velocity.Length() > (CalamityWorld.LegendaryMode ? 2f : 0.5f)) + Projectile.velocity *= 0.985f; + } + + public override bool CanHitPlayer(Player target) => Projectile.ai[1] <= (CalamityWorld.LegendaryMode ? 600f : 1800f) && Projectile.ai[1] > 120f; + + public override Color? GetAlpha(Color lightColor) + { + if (Projectile.ai[1] > (CalamityWorld.LegendaryMode ? 600f : 1800f)) + { + byte b2 = (byte)((26f - (Projectile.ai[1] - (CalamityWorld.LegendaryMode ? 600f : 1800f))) * 10f); + byte a2 = (byte)(Projectile.alpha * (b2 / 255f)); + return new Color(b2, b2, b2, a2); + } + return new Color(255, 255, 255, Projectile.alpha); + } + + public override bool PreDraw(ref Color lightColor) + { + // Changes the texture of the projectile + Texture2D texture = ModContent.Request(Texture).Value; + switch ((int)Projectile.ai[0]) + { + case 0: + break; + case 1: + texture = ModContent.Request("CalamityMod/Projectiles/Boss/HomingGasBulbSporeGas2").Value; + break; + case 2: + texture = ModContent.Request("CalamityMod/Projectiles/Boss/HomingGasBulbSporeGas3").Value; + break; + default: + break; + } + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, texture); + return false; + } + + public override void OnHitPlayer(Player target, Player.HurtInfo info) + { + if (info.Damage <= 0) + return; + + if (Projectile.ai[1] <= (CalamityWorld.LegendaryMode ? 600f : 1800f) && Projectile.ai[1] > 120f) + target.AddBuff(BuffID.Poisoned, 240); + } + } +} diff --git a/Projectiles/Boss/HomingGasBulbSporeGas.png b/Projectiles/Boss/HomingGasBulbSporeGas.png new file mode 100644 index 0000000000..3fb53db305 Binary files /dev/null and b/Projectiles/Boss/HomingGasBulbSporeGas.png differ diff --git a/Projectiles/Boss/HomingGasBulbSporeGas2.png b/Projectiles/Boss/HomingGasBulbSporeGas2.png new file mode 100644 index 0000000000..1cbbe626e1 Binary files /dev/null and b/Projectiles/Boss/HomingGasBulbSporeGas2.png differ diff --git a/Projectiles/Boss/HomingGasBulbSporeGas3.png b/Projectiles/Boss/HomingGasBulbSporeGas3.png new file mode 100644 index 0000000000..3e01bd6413 Binary files /dev/null and b/Projectiles/Boss/HomingGasBulbSporeGas3.png differ diff --git a/Projectiles/Boss/MushBomb.cs b/Projectiles/Boss/MushBomb.cs index 122910d135..7ef3a21af4 100644 --- a/Projectiles/Boss/MushBomb.cs +++ b/Projectiles/Boss/MushBomb.cs @@ -11,6 +11,7 @@ namespace CalamityMod.Projectiles.Boss public class MushBomb : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Boss"; + public override void SetStaticDefaults() { Main.projFrames[Projectile.type] = 4; @@ -22,6 +23,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.height = 14; Projectile.hostile = true; Projectile.tileCollide = false; + Projectile.Opacity = 0f; Projectile.penetrate = 1; Projectile.timeLeft = 600; Projectile.aiStyle = ProjAIStyleID.Arrow; @@ -30,6 +32,32 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + if (Projectile.velocity.Y > 0f) + { + if (Projectile.Opacity == 0f) + { + Projectile.Opacity = 1f; + SoundEngine.PlaySound(SoundID.Item44, Projectile.Center); + int dustAmount = 36; + for (int i = 0; i < dustAmount; i++) + { + Vector2 dustSpawnPosition = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.5f; + dustSpawnPosition = dustSpawnPosition.RotatedBy((double)((float)(i - (dustAmount / 2 - 1)) * MathHelper.TwoPi / (float)dustAmount), default) + Projectile.Center; + Vector2 dustVelocity = dustSpawnPosition - Projectile.Center; + int dust = Dust.NewDust(dustSpawnPosition + dustVelocity, 0, 0, 56, dustVelocity.X, dustVelocity.Y); + Main.dust[dust].noGravity = true; + Main.dust[dust].noLight = true; + Main.dust[dust].velocity = dustVelocity; + } + } + } + else + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 0.8f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 0f; + } + Projectile.frameCounter++; if (Projectile.frameCounter > 4) { @@ -47,6 +75,8 @@ namespace CalamityMod.Projectiles.Boss Projectile.velocity.X *= 0.995f; } + public override bool CanHitPlayer(Player target) => Projectile.Opacity == 1f; + public override Color? GetAlpha(Color drawColor) => Main.zenithWorld ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Projectile.alpha) : new Color(255, 255, 255, Projectile.alpha); public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Boss/MushBombFall.cs b/Projectiles/Boss/MushBombFall.cs index 727ced2331..bd394334b7 100644 --- a/Projectiles/Boss/MushBombFall.cs +++ b/Projectiles/Boss/MushBombFall.cs @@ -13,6 +13,7 @@ namespace CalamityMod.Projectiles.Boss public class MushBombFall : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Boss"; + public override void SetStaticDefaults() { Main.projFrames[Projectile.type] = 4; @@ -24,12 +25,39 @@ namespace CalamityMod.Projectiles.Boss Projectile.height = 14; Projectile.hostile = true; Projectile.tileCollide = false; + Projectile.Opacity = 0f; Projectile.penetrate = 1; Projectile.timeLeft = 600; } public override void AI() { + if (Projectile.velocity.Y > 0f) + { + if (Projectile.Opacity == 0f) + { + Projectile.Opacity = 1f; + SoundEngine.PlaySound(SoundID.Item44, Projectile.Center); + int dustAmount = 36; + for (int i = 0; i < dustAmount; i++) + { + Vector2 dustSpawnPosition = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.5f; + dustSpawnPosition = dustSpawnPosition.RotatedBy((double)((float)(i - (dustAmount / 2 - 1)) * MathHelper.TwoPi / (float)dustAmount), default) + Projectile.Center; + Vector2 dustVelocity = dustSpawnPosition - Projectile.Center; + int dust = Dust.NewDust(dustSpawnPosition + dustVelocity, 0, 0, 56, dustVelocity.X, dustVelocity.Y); + Main.dust[dust].noGravity = true; + Main.dust[dust].noLight = true; + Main.dust[dust].velocity = dustVelocity; + } + } + } + else + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 0.8f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 0f; + } + Projectile.frameCounter++; if (Projectile.frameCounter > 4) { @@ -55,7 +83,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.velocity.X *= 0.995f; } - public override bool CanHitPlayer(Player target) => Projectile.velocity.Y >= 0f; + public override bool CanHitPlayer(Player target) => Projectile.Opacity == 1f; public override Color? GetAlpha(Color drawColor) => Main.zenithWorld ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Projectile.alpha) : new Color(255, 255, 255, Projectile.alpha); diff --git a/Projectiles/Boss/SCalBrimstoneFireblast.cs b/Projectiles/Boss/SCalBrimstoneFireblast.cs index d79c6d3434..4e8b69c54e 100644 --- a/Projectiles/Boss/SCalBrimstoneFireblast.cs +++ b/Projectiles/Boss/SCalBrimstoneFireblast.cs @@ -9,6 +9,8 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using Terraria.Audio; +using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs; namespace CalamityMod.Projectiles.Boss { @@ -90,6 +92,12 @@ namespace CalamityMod.Projectiles.Boss int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int drawStart = frameHeight * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); + + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + lightColor.B = lightColor.B; + else + lightColor.B = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (byte)(255 * Projectile.Opacity) : lightColor.B; + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -131,13 +139,19 @@ namespace CalamityMod.Projectiles.Boss } } - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); + int dustType; + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + dustType = (int)CalamityDusts.Brimstone; + else + dustType = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone; + + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1f); for (int j = 0; j < 10; j++) { - int redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1.5f); + int redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1.5f); Main.dust[redFire].noGravity = true; Main.dust[redFire].velocity *= 3f; - redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); + redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1f); Main.dust[redFire].velocity *= 2f; Main.dust[redFire].noGravity = true; } diff --git a/Projectiles/Boss/SCalBrimstoneGigablast.cs b/Projectiles/Boss/SCalBrimstoneGigablast.cs index 486637cf6a..9a3356e6a2 100644 --- a/Projectiles/Boss/SCalBrimstoneGigablast.cs +++ b/Projectiles/Boss/SCalBrimstoneGigablast.cs @@ -9,6 +9,8 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using Terraria.Audio; +using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs; namespace CalamityMod.Projectiles.Boss { @@ -77,6 +79,12 @@ namespace CalamityMod.Projectiles.Boss int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int drawStart = frameHeight * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); + + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + lightColor.B = lightColor.B; + else + lightColor.B = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (byte)(255 * Projectile.Opacity) : lightColor.B; + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -118,16 +126,21 @@ namespace CalamityMod.Projectiles.Boss } } + int dustType; + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + dustType = (int)CalamityDusts.Brimstone; + else + dustType = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? (int)CalamityDusts.PurpleCosmilite : (int)CalamityDusts.Brimstone; + for (int j = 0; j < 2; j++) - { - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); - } + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1f); + for (int k = 0; k < 20; k++) { - int redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1.5f); + int redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1.5f); Main.dust[redFire].noGravity = true; Main.dust[redFire].velocity *= 3f; - redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); + redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1f); Main.dust[redFire].velocity *= 2f; Main.dust[redFire].noGravity = true; } diff --git a/Projectiles/Boss/SCalRitualDrama.cs b/Projectiles/Boss/SCalRitualDrama.cs index 0fa9ada6a0..74d8e31bb8 100644 --- a/Projectiles/Boss/SCalRitualDrama.cs +++ b/Projectiles/Boss/SCalRitualDrama.cs @@ -74,10 +74,17 @@ namespace CalamityMod.Projectiles.Boss // Summon SCal serverside. // All the other acoustic and visual effects can happen client-side. if (Main.netMode != NetmodeID.MultiplayerClient) - CalamityUtils.SpawnBossBetter(Projectile.Center - new Vector2(60f), ModContent.NPCType()); + { + NPC scal = CalamityUtils.SpawnBossBetter(Projectile.Center - new Vector2(60f), ModContent.NPCType()); + if (Projectile.ai[1] == 1) + { + scal.ModNPC().cirrus = true; + } + } // Make a laugh sound and create a burst of brimstone dust. - SoundEngine.PlaySound(SupremeCalamitas.SpawnSound, Projectile.Center); + SoundStyle SpawnSound = Projectile.ai[1] == 1 ? SoundID.Item107 : SupremeCalamitas.SpawnSound; + SoundEngine.PlaySound(SpawnSound, Projectile.Center); // Make a sudden screen shake. Main.LocalPlayer.Calamity().GeneralScreenShakePower = Utils.GetLerpValue(3400f, 1560f, Main.LocalPlayer.Distance(Projectile.Center), true) * 16f; @@ -90,7 +97,8 @@ namespace CalamityMod.Projectiles.Boss burstDirectionVariance += j * 2; for (int k = 0; k < 40; k++) { - Dust burstDust = Dust.NewDustPerfect(Projectile.Center, (int)CalamityDusts.Brimstone); + int type = Projectile.ai[1] == 1 ? 69 : (int)CalamityDusts.Brimstone; + Dust burstDust = Dust.NewDustPerfect(Projectile.Center, type); burstDust.scale = Main.rand.NextFloat(3.1f, 3.5f); burstDust.position += Main.rand.NextVector2Circular(10f, 10f); burstDust.velocity = Main.rand.NextVector2Square(-burstDirectionVariance, burstDirectionVariance).SafeNormalize(Vector2.UnitY) * burstSpeed; diff --git a/Projectiles/Boss/SandBlast.cs b/Projectiles/Boss/SandBlast.cs index abe8723dd1..0608774646 100644 --- a/Projectiles/Boss/SandBlast.cs +++ b/Projectiles/Boss/SandBlast.cs @@ -30,30 +30,15 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - if (Projectile.ai[1] == 0f) - { - for (int num621 = 0; num621 < 2; num621++) - { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 85, 0f, 0f, 100, default, 1f); - Main.dust[num622].velocity *= 3f; - if (Main.rand.NextBool(2)) - { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f; - } - } - Projectile.ai[1] = 1f; - } - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; Projectile.Opacity += 0.1f; if (Projectile.Opacity > 1f) Projectile.Opacity = 1f; - int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 85, 0f, 0f, 100, default, 0.8f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 85, 0f, 0f, 100, default, 0.8f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 0f; } public override void Kill(int timeLeft) diff --git a/Projectiles/Boss/SporeGasPlantera.cs b/Projectiles/Boss/SporeGasPlantera.cs index ee074cc430..ac97463113 100644 --- a/Projectiles/Boss/SporeGasPlantera.cs +++ b/Projectiles/Boss/SporeGasPlantera.cs @@ -53,14 +53,15 @@ namespace CalamityMod.Projectiles.Boss Projectile.localAI[0] = 255f; } - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.16f / 255f, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.04f / 255f); + float lightValues = (255 - Projectile.alpha) * 0.6f / 255f; + Lighting.AddLight(Projectile.Center, 0f, lightValues, 0f); Projectile.alpha = (int)(100.0 + Projectile.localAI[0] * 0.7); Projectile.rotation += Projectile.velocity.X * 0.02f; Projectile.rotation += Projectile.direction * 0.002f; - if (Projectile.velocity.Length() > (CalamityWorld.LegendaryMode ? 2f : 0.5f)) - Projectile.velocity *= 0.98f; + if (Projectile.velocity.Length() > (CalamityWorld.LegendaryMode ? 4f : 2f)) + Projectile.velocity *= 0.985f; } public override bool CanHitPlayer(Player target) => Projectile.ai[1] <= (CalamityWorld.LegendaryMode ? 600f : 1800f) && Projectile.ai[1] > 120f; diff --git a/Projectiles/Boss/ThornBallSpike.cs b/Projectiles/Boss/ThornBallSpike.cs new file mode 100644 index 0000000000..37a85835e3 --- /dev/null +++ b/Projectiles/Boss/ThornBallSpike.cs @@ -0,0 +1,56 @@ +using Microsoft.CodeAnalysis; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class ThornBallSpike : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Boss"; + private const float MaxVelocity = 12f; + private const int TimeLeft = 600; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = 12; + Projectile.height = 12; + Projectile.hostile = true; + Projectile.penetrate = 1; + Projectile.timeLeft = TimeLeft; + } + + public override void AI() + { + if (Projectile.velocity.Length() < MaxVelocity) + { + Projectile.velocity *= 1.05f; + if (Projectile.velocity.Length() > MaxVelocity) + { + Projectile.velocity.Normalize(); + Projectile.velocity *= MaxVelocity; + } + } + + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; + } + + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Poisoned, 90); + + public override bool PreDraw(ref Color lightColor) + { + lightColor = Color.White; + lightColor.A = (byte)Projectile.alpha; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + return false; + } + } +} diff --git a/Projectiles/Boss/ThornBallSpike.png b/Projectiles/Boss/ThornBallSpike.png new file mode 100644 index 0000000000..a1be17ccd9 Binary files /dev/null and b/Projectiles/Boss/ThornBallSpike.png differ diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 704aa0011b..8affcb8342 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -206,12 +206,29 @@ namespace CalamityMod.Projectiles // All secondary yoyos are spawned with ai[0] of 1 which tells then tell its AI to do secondary yoyo AI if (Main.player[projectile.owner].yoyoGlove && projectile.aiStyle == 99) { - if (projectile.ai[0] == 1f && projectile.localAI[0] == 0f) - projectile.damage = (int)(projectile.originalDamage * 0.5f); - // Reset damage if the yoyo count returns to 1 - // This is possible due to the horrendous yoyo spawning system for limited lifespan yoyos - else if (Main.player[projectile.owner].ownedProjectileCounts[projectile.type] == 1 && projectile.localAI[0] > 0f) - projectile.damage = projectile.originalDamage; + // Store damage on first frame + if (projectile.ai[2] == 0f) + projectile.ai[2] = projectile.damage; + + // Find the first yoyo projectile owned by the corresponding player + // Limited lifespan yoyos are horrendous so it had to be this way + // EDIT: ownedProjectileCounts does not work what the fuck + int MainYoyo = -1; + for (int x = 0; x < Main.maxProjectiles; x++) + { + Projectile proj = Main.projectile[x]; + if (proj.active && proj.type == projectile.type && proj.owner == projectile.owner) + { + MainYoyo = x; + break; + } + } + + // Halve damage if not the main yoyo + if (projectile.whoAmI != MainYoyo) + projectile.damage = (int)(projectile.ai[2] * 0.5f); + else + projectile.damage = (int)projectile.ai[2]; } // Chlorophyte Crystal AI rework. @@ -1247,7 +1264,7 @@ namespace CalamityMod.Projectiles return false; } - else if (projectile.type == ProjectileID.PoisonSeedPlantera) + else if (projectile.type == ProjectileID.SeedPlantera || projectile.type == ProjectileID.PoisonSeedPlantera) { projectile.frameCounter++; if (projectile.frameCounter > 1) @@ -1273,8 +1290,6 @@ namespace CalamityMod.Projectiles projectile.ai[0] += 1f; if (projectile.ai[0] >= 120f) { - projectile.ai[0] = 120f; - if (projectile.velocity.Length() < 18f) projectile.velocity *= 1.01f; } @@ -1284,12 +1299,12 @@ namespace CalamityMod.Projectiles if (projectile.timeLeft > 600) projectile.timeLeft = 600; - projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + 1.57f; + projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; return false; } - else if (projectile.type == ProjectileID.ThornBall) + else if (projectile.type == ProjectileID.ThornBall && !projectile.tileCollide) { if (projectile.alpha > 0) { @@ -1298,36 +1313,79 @@ namespace CalamityMod.Projectiles projectile.alpha = 0; } - int num147 = Player.FindClosest(projectile.Center, 1, 1); - float num146 = 7.5f * projectile.ai[1] + Vector2.Distance(Main.player[num147].Center, projectile.Center) * 0.01f; - Vector2 vector12 = Main.player[num147].Center - projectile.Center; - vector12.Normalize(); - vector12 *= num146; - int num148 = 200; - projectile.velocity.X = (projectile.velocity.X * (num148 - 1) + vector12.X) / num148; - - if (projectile.velocity.Length() > 16f) + Point point = projectile.Center.ToTileCoordinates(); + Tile tileSafely = Framing.GetTileSafely(point); + bool stickOnCollision = tileSafely.HasUnactuatedTile && Main.tileSolid[tileSafely.TileType]; + if (stickOnCollision) { - projectile.velocity.Normalize(); - projectile.velocity *= 16f; - } - - projectile.ai[0] += 1f; - if (projectile.ai[0] > 15f) - { - if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f) + projectile.velocity = Vector2.Zero; + projectile.ai[1] += 1f; + float explodeGateValue = 600f; + if (projectile.ai[1] >= explodeGateValue) { - projectile.velocity.X *= 0.97f; - if (projectile.velocity.X > -0.01f && projectile.velocity.X < 0.01f) - projectile.Kill(); + if (projectile.owner == Main.myPlayer) + { + int totalProjectiles = 8; + float radians = MathHelper.TwoPi / totalProjectiles; + int type = ModContent.ProjectileType(); + float velocity = 1f; + Vector2 spinningPoint = new Vector2(0f, -velocity); + for (int k = 0; k < totalProjectiles; k++) + { + Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center + Vector2.Normalize(velocity2) * 16f, velocity2, type, (int)Math.Round(projectile.damage * 0.8), 0f, Main.myPlayer); + } + } + + SoundEngine.PlaySound(SoundID.Item17, projectile.position); + + for (int i = 0; i < 8; i++) + { + int randomDustType = Main.rand.NextBool(2) ? 125 : 148; + int dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, randomDustType, 0f, 0f, 0, default, 2f); + Main.dust[dust].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[dust].scale = 0.5f; + Main.dust[dust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + } + } + for (int i = 0; i < 10; i++) + { + int randomDustType = Main.rand.NextBool(2) ? 125 : 148; + int dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, randomDustType, 0f, 0f, 0, default, 3f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 5f; + dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, randomDustType, 0f, 0f, 0, default, 2f); + Main.dust[dust].velocity *= 2f; + } + + projectile.Kill(); } - projectile.velocity.Y += 0.1f; } + else + { + int closestPlayer = Player.FindClosest(projectile.Center, 1, 1); + float homingSpeed = 7.5f + Vector2.Distance(Main.player[closestPlayer].Center, projectile.Center) * 0.01f; + Vector2 homingVelocity = Vector2.Normalize(Main.player[closestPlayer].Center - projectile.Center) * homingSpeed; + int inertia = 200; + projectile.velocity.X = (projectile.velocity.X * (inertia - 1) + homingVelocity.X) / inertia; - projectile.rotation += projectile.velocity.X * 0.05f; + if (projectile.velocity.Length() > 16f) + { + projectile.velocity.Normalize(); + projectile.velocity *= 16f; + } - if (projectile.velocity.Y > 16f) - projectile.velocity.Y = 16f; + projectile.ai[0] += 1f; + if (projectile.ai[0] > 15f) + projectile.velocity.Y += 0.1f; + + projectile.rotation += projectile.velocity.X * 0.05f; + + if (projectile.velocity.Y > 16f) + projectile.velocity.Y = 16f; + } return false; } @@ -2442,7 +2500,7 @@ namespace CalamityMod.Projectiles } #endregion - #region PostAI + #region Post AI public override void PostAI(Projectile projectile) { if (projectile.FinalExtraUpdate() && flatDRTimer > 0) @@ -2511,7 +2569,7 @@ namespace CalamityMod.Projectiles } #endregion - #region ModifyHitNPC + #region Modify Hit NPC public override void ModifyHitNPC(Projectile projectile, NPC target, ref NPC.HitModifiers modifiers) { Player player = Main.player[projectile.owner]; @@ -2581,14 +2639,14 @@ namespace CalamityMod.Projectiles } #endregion - #region ModifyHitPlayer + #region Modify Hit Player public override void ModifyHitPlayer(Projectile projectile, Player target, ref Player.HurtModifiers modifiers) { modifiers.FinalDamage.Flat -= flatDR; } #endregion - #region CanDamage + CanHit + #region Can Damage + Can Hit public override bool? CanDamage(Projectile projectile) { if (projectile.hostile && (projectile.damage - flatDR <= 0)) @@ -2639,9 +2697,7 @@ namespace CalamityMod.Projectiles if (Main.LocalPlayer.Calamity().omniscience && projectile.hostile && projectile.damage > 0 && projectile.alpha < 255) { if (projectile.ModProjectile is null || (projectile.ModProjectile != null && projectile.ModProjectile.CanHitPlayer(Main.LocalPlayer) && (projectile.ModProjectile.CanDamage() ?? true))) - { return Color.Coral; - } } if (projectile.type == ProjectileID.Stinger) @@ -2674,9 +2730,27 @@ namespace CalamityMod.Projectiles return new Color(200, 200, 200, projectile.alpha); } + if (projectile.type == ProjectileID.ThornBall) + { + float startTurningBrownGateValue = 420f; + float timeToReachFullBrown = 180f; + float timeToReachThornExplosion = startTurningBrownGateValue + timeToReachFullBrown; + Color initialColor = Color.White; + initialColor.A = (byte)projectile.alpha; + Color finalColor = Color.RosyBrown; + finalColor.A = (byte)projectile.alpha; + if (projectile.ai[1] > startTurningBrownGateValue) + { + float colorTransitionRatio = (projectile.ai[1] - startTurningBrownGateValue) / timeToReachFullBrown; + Color dehydratedColor = Color.Lerp(initialColor, finalColor, colorTransitionRatio); + return dehydratedColor; + } + else + return initialColor; + } + if (projectile.type == ProjectileID.SeedPlantera || projectile.type == ProjectileID.PoisonSeedPlantera || - projectile.type == ProjectileID.ThornBall || projectile.type == ProjectileID.CultistBossFireBallClone || - projectile.type == ProjectileID.AncientDoomProjectile) + projectile.type == ProjectileID.CultistBossFireBallClone || projectile.type == ProjectileID.AncientDoomProjectile) { if (projectile.timeLeft < 85) { diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 50938ebc53..44c6526055 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -355,6 +355,19 @@ namespace CalamityMod.Projectiles internal static IProjectileTweak IDStaticIFrames(int f) => new IDStaticIFrameRule(f); #endregion + #region Ignore Water + internal class IgnoreWaterRule : IProjectileTweak + { + internal readonly bool flag = true; + + public IgnoreWaterRule(bool iw) => flag = iw; + public bool AppliesTo(Projectile proj) => true; + public void ApplyTweak(Projectile proj) => proj.ignoreWater = flag; + } + internal static IProjectileTweak IgnoreWater => new IgnoreWaterRule(true); + internal static IProjectileTweak DontIgnoreWater => new IgnoreWaterRule(false); + #endregion + #region Local Immunity Frames internal class LocalIFrameRule : IProjectileTweak { @@ -480,19 +493,6 @@ namespace CalamityMod.Projectiles internal static IProjectileTweak NoTileCollide => new TileCollideRule(false); #endregion - #region Ignore Water - internal class IgnoreWaterRule : IProjectileTweak - { - internal readonly bool flag = true; - - public IgnoreWaterRule(bool iw) => flag = iw; - public bool AppliesTo(Projectile proj) => true; - public void ApplyTweak(Projectile proj) => proj.ignoreWater = flag; - } - internal static IProjectileTweak IgnoreWater => new IgnoreWaterRule(true); - internal static IProjectileTweak DontIgnoreWater => new IgnoreWaterRule(false); - #endregion - #region Time Left internal class TimeLeftDeltaRule : IProjectileTweak { diff --git a/Projectiles/Enemy/CragmawVibeCheckChain.cs b/Projectiles/Enemy/CragmawVibeCheckChain.cs index dca8f89914..4b931db4f5 100644 --- a/Projectiles/Enemy/CragmawVibeCheckChain.cs +++ b/Projectiles/Enemy/CragmawVibeCheckChain.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Enemy { if (Main.zenithWorld) { - CombatText.NewText(Main.player[toTarget].getRect(), Color.Red, "Vibe check.", true); + CombatText.NewText(Main.player[toTarget].getRect(), Color.Red, CalamityUtils.GetTextValue("Misc.CragmawVibeCheck"), true); } Projectile.localAI[0] = 1f; ReelingPlayer = true; diff --git a/Projectiles/Magic/SmallSpirit.cs b/Projectiles/Magic/SmallSpirit.cs index 98be9bb36a..42c160bcc6 100644 --- a/Projectiles/Magic/SmallSpirit.cs +++ b/Projectiles/Magic/SmallSpirit.cs @@ -118,11 +118,11 @@ namespace CalamityMod.Projectiles.Magic { for (int i = 0; i < 6; i++) { - Dust phantoplasm = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(12f, 12f), 261); - phantoplasm.color = Color.Lerp(Color.LightPink, Color.Red, Main.rand.NextFloat(0.67f)); - phantoplasm.scale = 1.2f; - phantoplasm.fadeIn = 0.55f; - phantoplasm.noGravity = true; + Dust polterplasm = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(12f, 12f), 261); + polterplasm.color = Color.Lerp(Color.LightPink, Color.Red, Main.rand.NextFloat(0.67f)); + polterplasm.scale = 1.2f; + polterplasm.fadeIn = 0.55f; + polterplasm.noGravity = true; } } } diff --git a/Projectiles/Magic/VeeringWindAirWave.cs b/Projectiles/Magic/VeeringWindAirWave.cs index 1d4001bc31..c247a336ef 100644 --- a/Projectiles/Magic/VeeringWindAirWave.cs +++ b/Projectiles/Magic/VeeringWindAirWave.cs @@ -27,6 +27,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.extraUpdates = 1; Projectile.timeLeft = 45; Projectile.DamageType = DamageClass.Magic; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/VeeringWindFrostWave.cs b/Projectiles/Magic/VeeringWindFrostWave.cs index 99984cef2e..63232c64ff 100644 --- a/Projectiles/Magic/VeeringWindFrostWave.cs +++ b/Projectiles/Magic/VeeringWindFrostWave.cs @@ -27,6 +27,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.timeLeft = 90; Projectile.DamageType = DamageClass.Magic; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 15; } public override void AI() @@ -68,8 +70,8 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(BuffID.Frostburn, 180); - target.AddBuff(ModContent.BuffType(), 90); + target.AddBuff(BuffID.Frostburn, 120); + target.AddBuff(ModContent.BuffType(), 30); } } } diff --git a/Projectiles/Magic/VividBeam.cs b/Projectiles/Magic/VividBeam.cs index 21bd6862ae..160a7d12a1 100644 --- a/Projectiles/Magic/VividBeam.cs +++ b/Projectiles/Magic/VividBeam.cs @@ -1,7 +1,9 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Magic; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.Audio; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic { @@ -27,6 +29,7 @@ namespace CalamityMod.Projectiles.Magic { if (!initialized) { + SoundEngine.PlaySound(VividClarity.BeamSound, Projectile.Center); initialized = true; float dustAmt = 16f; int d = 0; diff --git a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs index b1613daefd..0c71f4b17a 100644 --- a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs @@ -26,9 +26,6 @@ namespace CalamityMod.Projectiles.Melee public ref float AlreadyParried => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; @@ -57,7 +54,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); SoundEngine.PlaySound(SoundID.Item67); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), "Parry!", true); + CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); AlreadyParried = 1f; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs index 0a799138db..ca7aac86d1 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs @@ -30,9 +30,6 @@ namespace CalamityMod.Projectiles.Melee public ref float AlreadyParried => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; @@ -64,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); SoundEngine.PlaySound(CommonCalamitySounds.ScissorGuillotineSnapSound with { Volume = CommonCalamitySounds.ScissorGuillotineSnapSound.Volume * 1.3f }, Projectile.Center); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), "Parry!", true); + CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); for (int i = 0; i < 5; i ++) //Don't loose your way { diff --git a/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs index c1fed8d70a..09420a0796 100644 --- a/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs @@ -29,9 +29,6 @@ namespace CalamityMod.Projectiles.Melee public ref float AlreadyParried => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; @@ -62,7 +59,7 @@ namespace CalamityMod.Projectiles.Melee } SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); SoundEngine.PlaySound(CommonCalamitySounds.ScissorGuillotineSnapSound with { Volume = CommonCalamitySounds.ScissorGuillotineSnapSound.Volume * 1.3f }, Projectile.Center); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), "Parry!", true); + CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); for (int i = 0; i < 5; i ++) //Don't loose your way { diff --git a/Projectiles/Melee/GalacticaComet.cs b/Projectiles/Melee/GalacticaComet.cs index 8c2e539204..4cbad91841 100644 --- a/Projectiles/Melee/GalacticaComet.cs +++ b/Projectiles/Melee/GalacticaComet.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Melee public class GalacticaComet : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - private int noTileHitCounter = 120; + private int noTileHitCounter = 90; public override void SetStaticDefaults() { @@ -34,20 +34,17 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - int randomToSubtract = Main.rand.Next(1, 4); - noTileHitCounter -= randomToSubtract; + noTileHitCounter -= 1; if (noTileHitCounter == 0) - { Projectile.tileCollide = true; - } + if (Projectile.soundDelay == 0) { Projectile.soundDelay = 20 + Main.rand.Next(40); if (Main.rand.NextBool(5)) - { SoundEngine.PlaySound(SoundID.Item9, Projectile.position); - } } + Projectile.localAI[0] += 1f; if (Projectile.localAI[0] == 18f) { @@ -55,51 +52,47 @@ namespace CalamityMod.Projectiles.Melee for (int l = 0; l < 12; l++) { Vector2 vector3 = Vector2.UnitX * (float)-(float)Projectile.width / 2f; - vector3 += -Vector2.UnitY.RotatedBy((double)((float)l * 3.14159274f / 6f), default) * new Vector2(8f, 16f); - vector3 = vector3.RotatedBy((double)(Projectile.rotation - 1.57079637f), default); + vector3 += -Vector2.UnitY.RotatedBy((double)((float)l * MathHelper.Pi / 6f), default) * new Vector2(8f, 16f); + vector3 = vector3.RotatedBy((double)(Projectile.rotation - MathHelper.PiOver2), default); int num9 = Dust.NewDust(Projectile.Center, 0, 0, Main.rand.NextBool(2) ? 164 : 229, 0f, 0f, 160, default, 1f); - Main.dust[num9].scale = 1.1f; Main.dust[num9].noGravity = true; Main.dust[num9].position = Projectile.Center + vector3; Main.dust[num9].velocity = Projectile.velocity * 0.1f; Main.dust[num9].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[num9].position) * 1.25f; } } + Projectile.alpha -= 15; int num58 = 150; if (Projectile.Center.Y >= Projectile.ai[1]) - { num58 = 0; - } if (Projectile.alpha < num58) - { Projectile.alpha = num58; - } - Projectile.rotation = Projectile.velocity.ToRotation() - 1.57079637f; + + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; + if (Main.rand.NextBool(16)) { - Vector2 value3 = Vector2.UnitX.RotatedByRandom(1.5707963705062866).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int num59 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 164, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1.2f); + Vector2 value3 = Vector2.UnitX.RotatedByRandom(MathHelper.PiOver2).RotatedBy((double)Projectile.velocity.ToRotation(), default); + int num59 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 164, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1f); Main.dust[num59].velocity = value3 * 0.66f; Main.dust[num59].position = Projectile.Center + value3 * 12f; } + if (Main.rand.NextBool(48) && Main.netMode != NetmodeID.Server) { int num60 = Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.Center, new Vector2(Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f), 16, 1f); Main.gore[num60].velocity *= 0.66f; Main.gore[num60].velocity += Projectile.velocity * 0.3f; } + if (Projectile.ai[1] == 1f) { Projectile.light = 0.5f; if (Main.rand.NextBool(10)) - { - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 229, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1.2f); - } + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 229, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1f); if (Main.rand.NextBool(20) && Main.netMode != NetmodeID.Server) - { Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.position, new Vector2(Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f); - } } } @@ -119,9 +112,12 @@ namespace CalamityMod.Projectiles.Melee public override void Kill(int timeLeft) { + if (Projectile.ai[0] == 1f) + return; + SoundEngine.PlaySound(SoundID.Item10, Projectile.position); Projectile.position = Projectile.Center; - Projectile.width = Projectile.height = 144; + Projectile.width = Projectile.height = 68; Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int num193 = 0; num193 < 4; num193++) diff --git a/Projectiles/Melee/ElementalExcaliburBeam.cs b/Projectiles/Melee/GayBeam.cs similarity index 96% rename from Projectiles/Melee/ElementalExcaliburBeam.cs rename to Projectiles/Melee/GayBeam.cs index bae34f092b..90c68438cc 100644 --- a/Projectiles/Melee/ElementalExcaliburBeam.cs +++ b/Projectiles/Melee/GayBeam.cs @@ -9,7 +9,7 @@ using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles.Melee { - public class ElementalExcaliburBeam : ModProjectile, ILocalizedModType + public class GayBeam : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; private int alpha = 50; @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < numProj + 1; i++) { Vector2 perturbedSpeed = Projectile.velocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, perturbedSpeed * 0.5f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, perturbedSpeed * 0.5f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); } } Projectile.Kill(); @@ -224,7 +224,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.localAI[1] = 1f; if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + Projectile.velocity, Projectile.velocity, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 10f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + Projectile.velocity, Projectile.velocity, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 10f, 0f); } break; @@ -381,7 +381,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.owner == Main.myPlayer) { var source = Projectile.GetSource_FromThis(); - CalamityUtils.ProjectileBarrage(source, Projectile.Center, Projectile.Center, fromRight, 500f, 500f, 0f, 500f, 5f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.2), Projectile.knockBack * 0.2f, Projectile.owner, false, 0f).ai[0] = 5f; + CalamityUtils.ProjectileBarrage(source, Projectile.Center, Projectile.Center, fromRight, 500f, 500f, 0f, 500f, 5f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.2), Projectile.knockBack * 0.2f, Projectile.owner, false, 0f).ai[0] = 5f; } } diff --git a/Projectiles/Melee/ElementalExcaliburBeam.png b/Projectiles/Melee/GayBeam.png similarity index 100% rename from Projectiles/Melee/ElementalExcaliburBeam.png rename to Projectiles/Melee/GayBeam.png diff --git a/Projectiles/Melee/WhiteBoltAuraBlah.cs b/Projectiles/Melee/OrderbringerAura.cs similarity index 93% rename from Projectiles/Melee/WhiteBoltAuraBlah.cs rename to Projectiles/Melee/OrderbringerAura.cs index b68661dea5..efc1899506 100644 --- a/Projectiles/Melee/WhiteBoltAuraBlah.cs +++ b/Projectiles/Melee/OrderbringerAura.cs @@ -1,8 +1,9 @@ -using Terraria; +using Terraria; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Melee { - public class WhiteBoltAuraBlah : ModProjectile, ILocalizedModType + public class OrderbringerAura : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; @@ -39,7 +40,7 @@ namespace CalamityMod.Projectiles.Melee { int num414 = (int)(Projectile.position.X + 14f + (float)Main.rand.Next(Projectile.width - 28)); int num415 = (int)(Projectile.position.Y + (float)Projectile.height + 4f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)num414, (float)num415, 0f, 10f, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)num414, (float)num415, 0f, 10f, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Melee/JudgementBlah.cs b/Projectiles/Melee/OrderbringerBeam.cs similarity index 92% rename from Projectiles/Melee/JudgementBlah.cs rename to Projectiles/Melee/OrderbringerBeam.cs index 8a4c573220..5d0c413396 100644 --- a/Projectiles/Melee/JudgementBlah.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; @@ -7,7 +7,7 @@ using Terraria.Audio; namespace CalamityMod.Projectiles.Melee { - public class JudgementBlah : ModProjectile, ILocalizedModType + public class OrderbringerBeam : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; private int whiteLightTimer = 5; @@ -76,8 +76,8 @@ namespace CalamityMod.Projectiles.Melee for (i = 0; i < 1; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 0.6f), (float)(Math.Cos(offsetAngle) * 0.6f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 0.6f), (float)(-Math.Cos(offsetAngle) * 0.6f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 0.6f), (float)(Math.Cos(offsetAngle) * 0.6f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 0.6f), (float)(-Math.Cos(offsetAngle) * 0.6f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } } whiteLightTimer = 5; @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Melee } if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y - 100, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y - 100, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Melee/JudgementBlah.png b/Projectiles/Melee/OrderbringerBeam.png similarity index 100% rename from Projectiles/Melee/JudgementBlah.png rename to Projectiles/Melee/OrderbringerBeam.png diff --git a/Projectiles/Melee/WhiterainBlah.cs b/Projectiles/Melee/OrderbringerRain.cs similarity index 94% rename from Projectiles/Melee/WhiterainBlah.cs rename to Projectiles/Melee/OrderbringerRain.cs index 3dfac16097..b07864691c 100644 --- a/Projectiles/Melee/WhiterainBlah.cs +++ b/Projectiles/Melee/OrderbringerRain.cs @@ -1,11 +1,12 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; + namespace CalamityMod.Projectiles.Melee { - public class WhiterainBlah : ModProjectile, ILocalizedModType + public class OrderbringerRain : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; diff --git a/Projectiles/Melee/WhiteOrbBlah.cs b/Projectiles/Melee/OrderbringerWhiteOrb.cs similarity index 92% rename from Projectiles/Melee/WhiteOrbBlah.cs rename to Projectiles/Melee/OrderbringerWhiteOrb.cs index 341cbf1b20..8b57e374b8 100644 --- a/Projectiles/Melee/WhiteOrbBlah.cs +++ b/Projectiles/Melee/OrderbringerWhiteOrb.cs @@ -1,9 +1,10 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Melee { - public class WhiteOrbBlah : ModProjectile, ILocalizedModType + public class OrderbringerWhiteOrb : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; diff --git a/Projectiles/Melee/PwnagehammerProj.cs b/Projectiles/Melee/PwnagehammerProj.cs index 71eae478de..43e2484b52 100644 --- a/Projectiles/Melee/PwnagehammerProj.cs +++ b/Projectiles/Melee/PwnagehammerProj.cs @@ -12,9 +12,8 @@ namespace CalamityMod.Projectiles.Melee { public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Items/Weapons/Melee/Pwnagehammer"; - - public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/PwnagehammerSound") { Volume = 0.3f, PitchVariance = 0.3f }; - public static readonly SoundStyle HomingSound = new("CalamityMod/Sounds/Item/PwnagehammerHoming") { Volume = 0.4f }; + public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/PwnagehammerSound") { Volume = 0.8f, PitchVariance = 0.16f }; + public static readonly SoundStyle HomingSound = new("CalamityMod/Sounds/Item/PwnagehammerHoming"); public override void SetStaticDefaults() { diff --git a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs index 4df0d9d744..7c908cca5c 100644 --- a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs @@ -26,9 +26,6 @@ namespace CalamityMod.Projectiles.Melee public ref float AlreadyParried => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; @@ -56,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee sword.Charge = 10f; SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); SoundEngine.PlaySound(SoundID.Item67); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), "Parry!", true); + CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); AlreadyParried = 1f; } diff --git a/Projectiles/Pets/DaawnlightSpiritOriginMinion.png b/Projectiles/Pets/DaawnlightSpiritOriginMinion.png index cfbb514f9f..427e48ad54 100644 Binary files a/Projectiles/Pets/DaawnlightSpiritOriginMinion.png and b/Projectiles/Pets/DaawnlightSpiritOriginMinion.png differ diff --git a/Projectiles/Ranged/ClockworkBowHoldout.cs b/Projectiles/Ranged/ClockworkBowHoldout.cs index d0144325e4..3846715f27 100644 --- a/Projectiles/Ranged/ClockworkBowHoldout.cs +++ b/Projectiles/Ranged/ClockworkBowHoldout.cs @@ -94,9 +94,9 @@ namespace CalamityMod.Projectiles.Ranged ++LoadedBolts; if (LoadedBolts % 2 == 0) - CombatText.NewText(Owner.Hitbox, new Color(155, 255, 255), "Tock", true); + CombatText.NewText(Owner.Hitbox, new Color(155, 255, 255), CalamityUtils.GetTextValue("Misc.ClockworkTock"), true); else - CombatText.NewText(Owner.Hitbox, new Color(255, 200, 100), "Tick", true); + CombatText.NewText(Owner.Hitbox, new Color(255, 200, 100), CalamityUtils.GetTextValue("Misc.ClockworkTick"), true); FramesToLoadBolt *= 0.950f; diff --git a/Projectiles/Ranged/PlasmaBlast.cs b/Projectiles/Ranged/PlasmaBlast.cs index 776c2d8e89..a6001315ce 100644 --- a/Projectiles/Ranged/PlasmaBlast.cs +++ b/Projectiles/Ranged/PlasmaBlast.cs @@ -30,15 +30,12 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - if (Projectile.Center.Y > Projectile.ai[1]) - { - Projectile.tileCollide = true; - } if (Projectile.soundDelay == 0) { Projectile.soundDelay = 20 + Main.rand.Next(40); SoundEngine.PlaySound(SoundID.Item9, Projectile.position); } + Projectile.localAI[0] += 1f; if (Projectile.localAI[0] == 12f) { @@ -46,52 +43,49 @@ namespace CalamityMod.Projectiles.Ranged for (int l = 0; l < 12; l++) { Vector2 vector3 = Vector2.UnitX * (float)-(float)Projectile.width / 2f; - vector3 += -Vector2.UnitY.RotatedBy((double)((float)l * 3.14159274f / 6f), default) * new Vector2(8f, 16f); - vector3 = vector3.RotatedBy((double)(Projectile.rotation - 1.57079637f), default); + vector3 += -Vector2.UnitY.RotatedBy((double)((float)l * MathHelper.Pi / 6f), default) * new Vector2(8f, 16f); + vector3 = vector3.RotatedBy((double)(Projectile.rotation - MathHelper.PiOver2), default); int num9 = Dust.NewDust(Projectile.Center, 0, 0, 221, 0f, 0f, 160, default, 1f); - Main.dust[num9].scale = 1.1f; Main.dust[num9].noGravity = true; Main.dust[num9].position = Projectile.Center + vector3; Main.dust[num9].velocity = Projectile.velocity * 0.1f; Main.dust[num9].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[num9].position) * 1.25f; } } + Projectile.alpha -= 15; int num58 = 150; if (Projectile.Center.Y >= Projectile.ai[1]) - { num58 = 0; - } if (Projectile.alpha < num58) - { Projectile.alpha = num58; - } - Projectile.rotation = Projectile.velocity.ToRotation() - 1.57079637f; + + Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; + if (Main.rand.NextBool(16)) { - Vector2 value3 = Vector2.UnitX.RotatedByRandom(1.5707963705062866).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int num59 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 221, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1.2f); + Vector2 value3 = Vector2.UnitX.RotatedByRandom(MathHelper.PiOver2).RotatedBy((double)Projectile.velocity.ToRotation(), default); + int num59 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 221, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1f); Main.dust[num59].velocity = value3 * 0.66f; Main.dust[num59].position = Projectile.Center + value3 * 12f; } + if (Main.rand.NextBool(48) && Main.netMode != NetmodeID.Server) { int num60 = Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.Center, new Vector2(Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f), 16, 1f); Main.gore[num60].velocity *= 0.66f; Main.gore[num60].velocity += Projectile.velocity * 0.3f; } + if (Projectile.ai[1] == 1f) { Projectile.light = 0.9f; if (Main.rand.NextBool(10)) - { - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 221, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1.2f); - } + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 221, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1f); if (Main.rand.NextBool(20) && Main.netMode != NetmodeID.Server) - { Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.position, new Vector2(Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f); - } } + Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.1f / 255f, (255 - Projectile.alpha) * 0.7f / 255f, (255 - Projectile.alpha) * 0.15f / 255f); } @@ -103,15 +97,13 @@ namespace CalamityMod.Projectiles.Ranged public override void Kill(int timeLeft) { + if (Projectile.ai[0] == 1f) + return; + if (Projectile.owner == Main.myPlayer) - { Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); - } + SoundEngine.PlaySound(SoundID.Item10, Projectile.position); - for (int k = 0; k < 5; k++) - { - Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 221, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); - } } } } diff --git a/Projectiles/Ranged/PlasmaExplosion.cs b/Projectiles/Ranged/PlasmaExplosion.cs index bfce0b0d73..26dfc349c6 100644 --- a/Projectiles/Ranged/PlasmaExplosion.cs +++ b/Projectiles/Ranged/PlasmaExplosion.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; diff --git a/Projectiles/Ranged/SevensStrikerHoldout.cs b/Projectiles/Ranged/SevensStrikerHoldout.cs index 2a1ffa2198..081da2d4f0 100644 --- a/Projectiles/Ranged/SevensStrikerHoldout.cs +++ b/Projectiles/Ranged/SevensStrikerHoldout.cs @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Ranged if (shottimer == 1) { SoundEngine.PlaySound(TheSevensStriker.JackpotSound, Projectile.Center); - CombatText.NewText(player.getRect(), Color.Gold, "Jackpot!!!", true); + CombatText.NewText(player.getRect(), Color.Gold, CalamityUtils.GetTextValue("Misc.SevensJackpot"), true); } // Every 5 frames, shoot 7 coins. The first 5 frames are excluded for timing purposes if (shottimer % 5 == 0 && shottimer > 5) @@ -164,14 +164,14 @@ namespace CalamityMod.Projectiles.Ranged // A single brick with 100% damage case 1: Shoot(1, ModContent.ProjectileType(), weaponDamage, 0, 2f, 0); - CombatText.NewText(player.getRect(), Color.Gray, "Bust!", true); + CombatText.NewText(player.getRect(), Color.Gray, CalamityUtils.GetTextValue("Misc.SevensBust"), true); SoundEngine.PlaySound(TheSevensStriker.BustSound, Projectile.Center); break; // 7 exploding oranges with 200% damage case 2: int doublesDamage = (int)(weaponDamage * TheSevensStriker.DoublesMultiplier); Shoot(7, ModContent.ProjectileType(), doublesDamage, weaponKnockback, 2f, 0.1f); - CombatText.NewText(player.getRect(), Color.Orange, "Doubles!", true); + CombatText.NewText(player.getRect(), Color.Orange, CalamityUtils.GetTextValue("Misc.SevensDoubles"), true); SoundEngine.PlaySound(TheSevensStriker.DoublesSound, Projectile.Center); break; // 7 piercing grapes with X% damage @@ -181,7 +181,7 @@ namespace CalamityMod.Projectiles.Ranged int grapeDamage = (int)(weaponDamage * TheSevensStriker.TriplesGrapeMultiplier); Shoot(7, ModContent.ProjectileType(), cherryDamage, weaponKnockback, 1.5f, 0.1f); Shoot(7, ModContent.ProjectileType(), grapeDamage, weaponKnockback, 2f, 0.2f); - CombatText.NewText(player.getRect(), Color.Red, "Triples!", true); + CombatText.NewText(player.getRect(), Color.Red, CalamityUtils.GetTextValue("Misc.SevensTriples"), true); SoundEngine.PlaySound(TheSevensStriker.TriplesSound, Projectile.Center); break; } diff --git a/Projectiles/Ranged/StarmageddonBinaryStarCenter.cs b/Projectiles/Ranged/StarmageddonBinaryStarCenter.cs new file mode 100644 index 0000000000..9c443cdf87 --- /dev/null +++ b/Projectiles/Ranged/StarmageddonBinaryStarCenter.cs @@ -0,0 +1,212 @@ +using System; +using Microsoft.Xna.Framework; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.NPCs.CalClone; +using CalamityMod.Projectiles.Magic; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using System.IO; + +namespace CalamityMod.Projectiles.Ranged +{ + public class StarmageddonBinaryStarCenter : ModProjectile, ILocalizedModType + { + private const float TimeBeforeHoming = 30f; + private const float FlamethrowerSoundFrequency = 30f; + public const int StarDistanceFromCenter = 32; + public const float SuckedProjectileDistanceFromStars = 600f; + public const float SuckedProjectileSpawnRate = 15f; + public const float StarRotationRate = 2f; + public const float DustCloudSpawnRate = 16f; + public const float DustCloudVelocityMax = 8f; + public const float DustCloudSpreadMax = 2f; + public const int ParticleStreamsPerStar = 2; + public const float ParticleSpawnRate = 4f; + public const float ParticleSpawnOffset = 19f; + public const float ParticleVelocityMax = DustCloudVelocityMax * 4f; + public const float ParticleSpreadMax = DustCloudSpreadMax * 4f; + + public new string LocalizationCategory => "Projectiles.Ranged"; + + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 38; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + Projectile.tileCollide = false; + Projectile.alpha = 255; + Projectile.timeLeft = 3600; + Projectile.penetrate = -1; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(Projectile.localAI[0]); + writer.Write(Projectile.localAI[1]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + Projectile.localAI[0] = reader.ReadSingle(); + Projectile.localAI[1] = reader.ReadSingle(); + } + + public override void AI() + { + Projectile hostProjectile = Main.projectile[(int)Projectile.ai[0]]; + if (Projectile.type != ModContent.ProjectileType() || !hostProjectile.active || hostProjectile.type != ModContent.ProjectileType()) + { + Projectile.Kill(); + return; + } + + Player player = Main.player[Projectile.owner]; + + // Spawn the binary star system. + if (Projectile.localAI[0] == 0f && Main.myPlayer == Projectile.owner) + { + Projectile.localAI[0] = 1f; + int starAmount = 2; + int starSpread = 360 / starAmount; + int starDistance = StarDistanceFromCenter; + for (int i = 0; i < starAmount; i++) + { + Vector2 starSpawnPosition = new Vector2(Projectile.Center.X + (float)(Math.Sin(i * starSpread) * starDistance), Projectile.Center.Y + (float)(Math.Cos(i * starSpread) * starDistance)); + int projectileType = i == 0 ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int star = Projectile.NewProjectile(Projectile.GetSource_FromAI(), starSpawnPosition, Vector2.Zero, projectileType, Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.GetByUUID(Projectile.owner, Projectile.whoAmI)); + Main.projectile[star].ai[1] = i * starSpread; + } + } + + if (Projectile.ai[1] == 1f) + { + Projectile.localAI[1] += 1f; + if (Projectile.localAI[1] % FlamethrowerSoundFrequency == 0f) + SoundEngine.PlaySound(SoundID.Item34, Projectile.Center); + + int npcIndex = (int)Projectile.ai[2]; + NPC npc = Main.npc[npcIndex]; + bool findNewTarget = false; + + if (!npcIndex.WithinBounds(Main.maxNPCs)) + { + findNewTarget = true; + } + else if (npc.active && !npc.dontTakeDamage) + { + Projectile.Center = npc.Center - Projectile.velocity * 2f; + Projectile.gfxOffY = npc.gfxOffY; + } + else + findNewTarget = true; + + if (findNewTarget) + { + Projectile.ai[1] = 0f; + Projectile.ai[2] = 0f; + } + } + else + { + if (Projectile.localAI[1] < TimeBeforeHoming) + { + Projectile.localAI[1] += 1f; + } + else + { + NPC target = Projectile.FindTargetWithinRange(1600f); + if (target != null) + Projectile.velocity = Projectile.SuperhomeTowardsTarget(target, 24f, 12f); + } + } + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + Player player = Main.player[Projectile.owner]; + Rectangle myRect = Projectile.Hitbox; + + if (Projectile.owner == Main.myPlayer) + { + for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) + { + NPC npc = Main.npc[npcIndex]; + if (npc.active && !npc.dontTakeDamage && + ((Projectile.friendly && (!npc.friendly || (npc.type == NPCID.Guide && Projectile.owner < Main.maxPlayers && player.killGuide) || (npc.type == NPCID.Clothier && Projectile.owner < Main.maxPlayers && player.killClothier))) || + (Projectile.hostile && npc.friendly && !npc.dontTakeDamageFromHostiles)) && (Projectile.owner < 0 || npc.immune[Projectile.owner] == 0 || Projectile.maxPenetrate == 1)) + { + if (npc.noTileCollide || !Projectile.ownerHitCheck) + { + bool stickingToNPC; + if (npc.type == NPCID.SolarCrawltipedeTail) + { + Rectangle rect = npc.Hitbox; + int num5 = 8; + rect.X -= num5; + rect.Y -= num5; + rect.Width += num5 * 2; + rect.Height += num5 * 2; + stickingToNPC = Projectile.Colliding(myRect, rect); + } + else + stickingToNPC = Projectile.Colliding(myRect, npc.Hitbox); + + if (stickingToNPC) + { + if (npc.reflectsProjectiles && Projectile.CanBeReflected()) + { + npc.ReflectProjectile(Projectile); + return; + } + + Projectile.ai[1] = 1f; + Projectile.ai[2] = (float)npcIndex; + + Projectile.velocity = (npc.Center - Projectile.Center) * 0.75f; + + Projectile.netUpdate = true; + + Point[] array2 = new Point[5]; + int projCount = 0; + for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++) + { + Projectile proj = Main.projectile[projIndex]; + if (projIndex != Projectile.whoAmI && proj.active && proj.owner == Main.myPlayer && proj.type == Projectile.type && proj.ai[0] == 1f && proj.ai[1] == (float)npcIndex) + { + array2[projCount++] = new Point(projIndex, proj.timeLeft); + if (projCount >= array2.Length) + break; + } + } + + if (projCount >= array2.Length) + { + int num30 = 0; + for (int m = 1; m < array2.Length; m++) + { + if (array2[m].Y < array2[num30].Y) + num30 = m; + } + Main.projectile[array2[num30].X].Kill(); + } + } + } + } + } + } + } + } +} diff --git a/Projectiles/Ranged/StarmageddonHeld.cs b/Projectiles/Ranged/StarmageddonHeld.cs new file mode 100644 index 0000000000..d977fbe06d --- /dev/null +++ b/Projectiles/Ranged/StarmageddonHeld.cs @@ -0,0 +1,170 @@ +using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Audio; +using Microsoft.Xna.Framework.Graphics; +using System.IO; + +namespace CalamityMod.Projectiles.Ranged +{ + public class StarmageddonHeld : ModProjectile, ILocalizedModType + { + private bool starHasBeenFired = false; + + public new string LocalizationCategory => "Projectiles.Ranged"; + + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 8; + ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 166; + Projectile.height = 62; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(starHasBeenFired); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + starHasBeenFired = reader.ReadBoolean(); + } + + public override void AI() + { + Lighting.AddLight(Projectile.Center, 0.8f, 0.1f, 1f); + + Player player = Main.player[Projectile.owner]; + + int projectileType = ModContent.ProjectileType(); + bool noStars = player.ownedProjectileCounts[projectileType] == 0; + + if (noStars && starHasBeenFired) + { + Projectile.frame = 0; + starHasBeenFired = false; + } + + Projectile.frameCounter++; + if (Projectile.frameCounter > 4) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame >= Main.projFrames[Projectile.type]) + Projectile.frame = 7; + + bool timeToFire = noStars && Projectile.frame == 7; + bool canFire = player.channel && !player.noItems && !player.CCed; + if (!canFire) + Projectile.Kill(); + + Vector2 playerPosition = player.RotatedRelativePoint(player.MountedCenter, true); + if (timeToFire && Main.myPlayer == Projectile.owner) + { + if (canFire) + { + SoundEngine.PlaySound(SoundID.Item92, Projectile.Center); + + float shootSpeed = 12f; + int damage = player.GetWeaponDamage(player.ActiveItem()); + float knockBack = player.ActiveItem().knockBack; + + Projectile.velocity = Main.screenPosition - playerPosition; + Projectile.velocity.X += Main.mouseX; + Projectile.velocity.Y += Main.mouseY; + + if (player.gravDir == -1f) + Projectile.velocity.Y = Main.screenHeight - Main.mouseY + Main.screenPosition.Y - playerPosition.Y; + + Projectile.velocity.Normalize(); + Vector2 dustSpawnPosition = Projectile.Center + (Vector2.UnitY * -12f) + (Projectile.velocity * 40f); + Vector2 starSpawnPosition = Projectile.Center + (Vector2.UnitY * -12f) + (Projectile.velocity * 80f); + + // Create dust sprays above and below the barrel. + int dustPerSpray = 50; + for (int h = 0; h < 2; h++) + { + bool top = h == 0; + for (int i = 0; i < dustPerSpray; i++) + { + bool useAltDust = i % 2 == 0; + int dustID = top ? (useAltDust ? 31 : 6) : (useAltDust ? 160 : 229); + float dustSpeed = i * 0.2f; + float angle = top ? -0.12f : 0.12f; + Vector2 dustVel = new Vector2(dustSpeed, 0f).RotatedBy((Projectile.velocity * shootSpeed).ToRotation()); + dustVel = dustVel.RotatedBy(angle); + + // Pick a size for the particles. + float scale = 1.8f - (i * 0.01f); + + // Actually spawn the particles. + int idx = Dust.NewDust(dustSpawnPosition, 1, 1, dustID, dustVel.X, dustVel.Y, 0, default, scale); + Main.dust[idx].noGravity = true; + Main.dust[idx].position = dustSpawnPosition; + } + } + + Projectile.NewProjectile(Projectile.GetSource_FromThis(), starSpawnPosition, Projectile.velocity * shootSpeed, projectileType, damage, knockBack, Projectile.owner, Projectile.GetByUUID(Projectile.owner, Projectile.whoAmI)); + starHasBeenFired = true; + Projectile.netUpdate = true; + } + } + + if (starHasBeenFired) + { + Projectile.velocity = Main.screenPosition - playerPosition; + Projectile.velocity.X += Main.mouseX; + Projectile.velocity.Y += Main.mouseY; + + if (player.gravDir == -1f) + Projectile.velocity.Y = Main.screenHeight - Main.mouseY + Main.screenPosition.Y - playerPosition.Y; + + Projectile.velocity.Normalize(); + } + + Projectile.rotation = Projectile.velocity.ToRotation(); + Vector2 displayOffset = new Vector2(27f, -10f * Projectile.direction).RotatedBy(Projectile.rotation); + Projectile.Center = player.RotatedRelativePoint(player.MountedCenter, true) + displayOffset; + if (Projectile.spriteDirection == -1) + Projectile.rotation += MathHelper.Pi; + + Projectile.spriteDirection = Projectile.direction; + Projectile.timeLeft = 2; + player.ChangeDir(Projectile.direction); + player.heldProj = Projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * Projectile.direction, Projectile.velocity.X * Projectile.direction); + } + + public override void PostDraw(Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + int height = texture.Height / Main.projFrames[Projectile.type]; + int drawStart = height * Projectile.frame; + Vector2 origin = Projectile.Size / 2; + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Ranged/StarmageddonHeldGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0); + } + + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Ranged/StarmageddonStar.cs b/Projectiles/Ranged/StarmageddonStar.cs new file mode 100644 index 0000000000..819fbe3abc --- /dev/null +++ b/Projectiles/Ranged/StarmageddonStar.cs @@ -0,0 +1,234 @@ +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Audio; +using CalamityMod.Dusts; +using System; +using CalamityMod.NPCs.TownNPCs; +using Microsoft.Xna.Framework.Graphics; +using CalamityMod.Particles; +using System.IO; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Typeless; + +namespace CalamityMod.Projectiles.Ranged +{ + public class StarmageddonStar : ModProjectile, ILocalizedModType + { + private bool start = true; + + public new string LocalizationCategory => "Projectiles.Ranged"; + + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 4; + ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 38; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.timeLeft = 3600; + Projectile.DamageType = DamageClass.Ranged; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(Projectile.localAI[0]); + writer.Write(start); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + Projectile.localAI[0] = reader.ReadSingle(); + start = reader.ReadBoolean(); + } + + public override void AI() + { + Projectile hostProjectile = Main.projectile[(int)Projectile.ai[0]]; + if (Projectile.type != ModContent.ProjectileType() || !hostProjectile.active || hostProjectile.type != ModContent.ProjectileType()) + { + Projectile.Kill(); + return; + } + + Lighting.AddLight(Projectile.Center, 0.5f, 0.4f, 0.05f); + + bool hostProjectileAttachedToEnemy = hostProjectile.ai[1] == 1f; + + if (start) + { + Projectile.ai[2] = Projectile.ai[1]; + start = false; + } + + Projectile.frameCounter++; + if (Projectile.frameCounter > 6) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame >= Main.projFrames[Projectile.type]) + Projectile.frame = 0; + + double deg = Projectile.ai[2]; + double rad = deg * (Math.PI / 180); + double dist = StarmageddonBinaryStarCenter.StarDistanceFromCenter; + Projectile.position.X = hostProjectile.Center.X - (int)(Math.Cos(rad) * dist) - Projectile.width / 2; + Projectile.position.Y = hostProjectile.Center.Y - (int)(Math.Sin(rad) * dist) - Projectile.height / 2; + Projectile.ai[2] += StarmageddonBinaryStarCenter.StarRotationRate; + + if (hostProjectileAttachedToEnemy) + { + Projectile.localAI[0] += 1f; + for (int i = 0; i < StarmageddonBinaryStarCenter.ParticleStreamsPerStar; i++) + { + bool top = i == 0; + if (Projectile.localAI[0] % StarmageddonBinaryStarCenter.ParticleSpawnRate == 0f) + { + int numParticles = Main.rand.Next(2, 4); + for (int j = 0; j < numParticles; j++) + { + float dustVelocityX = Main.rand.NextFloat(-StarmageddonBinaryStarCenter.ParticleSpreadMax, StarmageddonBinaryStarCenter.ParticleSpreadMax); + float dustVelocityY = top ? -StarmageddonBinaryStarCenter.ParticleVelocityMax : StarmageddonBinaryStarCenter.ParticleVelocityMax; + Vector2 dustVelocity = new Vector2(dustVelocityX, dustVelocityY); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center + Vector2.Normalize(dustVelocity) * StarmageddonBinaryStarCenter.ParticleSpawnOffset, dustVelocity, false, 180, 1f, Color.Orange)); + } + } + + if (Projectile.localAI[0] % StarmageddonBinaryStarCenter.DustCloudSpawnRate == 0f) + { + float cloudVelocityX = Main.rand.NextFloat(-StarmageddonBinaryStarCenter.DustCloudSpreadMax, StarmageddonBinaryStarCenter.DustCloudSpreadMax); + float cloudVelocityY = top ? -StarmageddonBinaryStarCenter.DustCloudVelocityMax : StarmageddonBinaryStarCenter.DustCloudVelocityMax; + Vector2 cloudVelocity = new Vector2(cloudVelocityX, cloudVelocityY); + GeneralParticleHandler.SpawnParticle(new MediumMistParticle(Projectile.Center + Vector2.Normalize(cloudVelocity) * StarmageddonBinaryStarCenter.ParticleSpawnOffset, cloudVelocity, Color.Orange, Color.Red, 1f, 255)); + } + + if (Main.myPlayer == Projectile.owner) + { + if (Projectile.localAI[0] % StarmageddonBinaryStarCenter.SuckedProjectileSpawnRate == 0f) + { + float suckYDistanceMax = StarmageddonBinaryStarCenter.SuckedProjectileDistanceFromStars * 0.5f; + Vector2 position = Projectile.Center + new Vector2(StarmageddonBinaryStarCenter.SuckedProjectileDistanceFromStars * (top ? -1f : 1f), Main.rand.NextFloat(-suckYDistanceMax, suckYDistanceMax)); + Vector2 speed = Vector2.Normalize(Projectile.Center - position) * 12f; + + for (int l = 0; l < 12; l++) + { + Vector2 vector3 = Vector2.UnitX * (float)-(float)Projectile.width / 2f; + vector3 += -Vector2.UnitY.RotatedBy((double)((float)l * MathHelper.Pi / 6f), default) * new Vector2(8f, 16f); + vector3 = vector3.RotatedBy((double)(speed.ToRotation()), default); + int num9 = Dust.NewDust(position, 0, 0, 221, 0f, 0f, 0, default, 1f); + Main.dust[num9].noGravity = true; + Main.dust[num9].position = position + vector3; + Main.dust[num9].velocity = speed * 0.1f; + Main.dust[num9].velocity = Vector2.Normalize(position - speed * 3f - Main.dust[num9].position) * 1.25f; + } + + int type = Utils.SelectRandom(Main.rand, new int[] + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ProjectileID.StarCannonStar, + ProjectileID.Starfury + }); + + int star = Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, speed, type, Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner); + if (star.WithinBounds(Main.maxProjectiles)) + { + if (type == ModContent.ProjectileType() || type == ModContent.ProjectileType() || type == ModContent.ProjectileType()) + Main.projectile[star].ai[0] = 1f; + + Main.projectile[star].extraUpdates += 4; + Main.projectile[star].penetrate = 1; + Main.projectile[star].timeLeft = 300; + Main.projectile[star].DamageType = DamageClass.Ranged; + Main.projectile[star].tileCollide = false; + Main.projectile[star].netUpdate = true; + } + } + } + } + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + int height = texture.Height / Main.projFrames[Projectile.type]; + int drawStart = height * Projectile.frame; + Vector2 origin = Projectile.Size / 2; + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + public override void Kill(int timeLeft) + { + Projectile.ExpandHitboxBy(176); + Projectile.maxPenetrate = -1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + Projectile.Damage(); + SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); + + for (int i = 0; i < 4; i++) + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 31, 0f, 0f, 100, default(Color), 1.5f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; + } + + for (int i = 0; i < 30; i++) + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 6, 0f, 0f, 200, default(Color), 3.7f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; + Main.dust[dust].noGravity = true; + Dust dust2 = Main.dust[dust]; + dust2.velocity *= 3f; + dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 6, 0f, 0f, 100, default(Color), 1.5f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; + dust2 = Main.dust[dust]; + dust2.velocity *= 2f; + Main.dust[dust].noGravity = true; + Main.dust[dust].fadeIn = 2.5f; + } + + for (int i = 0; i < 10; i++) + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 6, 0f, 0f, 0, default(Color), 2.7f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; + Main.dust[dust].noGravity = true; + Dust dust2 = Main.dust[dust]; + dust2.velocity *= 3f; + } + + for (int i = 0; i < 10; i++) + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 31, 0f, 0f, 0, default(Color), 1.5f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; + Main.dust[dust].noGravity = true; + Dust dust2 = Main.dust[dust]; + dust2.velocity *= 3f; + } + + for (int i = 0; i < 2; i++) + { + int gore = Gore.NewGore(Projectile.GetSource_Death(), Projectile.position + new Vector2((float)(Projectile.width * Main.rand.Next(100)) / 100f, (float)(Projectile.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64)); + Main.gore[gore].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; + Gore gore2 = Main.gore[gore]; + gore2.velocity *= 0.3f; + Main.gore[gore].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f; + Main.gore[gore].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f; + } + } + } +} diff --git a/Projectiles/Ranged/StarmageddonStar2.cs b/Projectiles/Ranged/StarmageddonStar2.cs new file mode 100644 index 0000000000..8b1a138aaa --- /dev/null +++ b/Projectiles/Ranged/StarmageddonStar2.cs @@ -0,0 +1,234 @@ +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Audio; +using CalamityMod.Dusts; +using System; +using CalamityMod.NPCs.TownNPCs; +using Microsoft.Xna.Framework.Graphics; +using CalamityMod.Particles; +using System.IO; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Typeless; + +namespace CalamityMod.Projectiles.Ranged +{ + public class StarmageddonStar2 : ModProjectile, ILocalizedModType + { + private bool start = true; + + public new string LocalizationCategory => "Projectiles.Ranged"; + + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 4; + ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 38; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.timeLeft = 3600; + Projectile.DamageType = DamageClass.Ranged; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(Projectile.localAI[0]); + writer.Write(start); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + Projectile.localAI[0] = reader.ReadSingle(); + start = reader.ReadBoolean(); + } + + public override void AI() + { + Projectile hostProjectile = Main.projectile[(int)Projectile.ai[0]]; + if (Projectile.type != ModContent.ProjectileType() || !hostProjectile.active || hostProjectile.type != ModContent.ProjectileType()) + { + Projectile.Kill(); + return; + } + + Lighting.AddLight(Projectile.Center, 0.05f, 0.4f, 0.5f); + + bool hostProjectileAttachedToEnemy = hostProjectile.ai[1] == 1f; + + if (start) + { + Projectile.ai[2] = Projectile.ai[1]; + start = false; + } + + Projectile.frameCounter++; + if (Projectile.frameCounter > 6) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame >= Main.projFrames[Projectile.type]) + Projectile.frame = 0; + + double deg = Projectile.ai[2]; + double rad = deg * (Math.PI / 180); + double dist = StarmageddonBinaryStarCenter.StarDistanceFromCenter; + Projectile.position.X = hostProjectile.Center.X - (int)(Math.Cos(rad) * dist) - Projectile.width / 2; + Projectile.position.Y = hostProjectile.Center.Y - (int)(Math.Sin(rad) * dist) - Projectile.height / 2; + Projectile.ai[2] += StarmageddonBinaryStarCenter.StarRotationRate; + + if (hostProjectileAttachedToEnemy) + { + Projectile.localAI[0] += 1f; + for (int i = 0; i < StarmageddonBinaryStarCenter.ParticleStreamsPerStar; i++) + { + bool top = i == 0; + if (Projectile.localAI[0] % StarmageddonBinaryStarCenter.ParticleSpawnRate == 0f) + { + int numParticles = Main.rand.Next(2, 4); + for (int j = 0; j < numParticles; j++) + { + float dustVelocityX = Main.rand.NextFloat(-StarmageddonBinaryStarCenter.ParticleSpreadMax, StarmageddonBinaryStarCenter.ParticleSpreadMax); + float dustVelocityY = top ? -StarmageddonBinaryStarCenter.ParticleVelocityMax : StarmageddonBinaryStarCenter.ParticleVelocityMax; + Vector2 dustVelocity = new Vector2(dustVelocityX, dustVelocityY); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center + Vector2.Normalize(dustVelocity) * StarmageddonBinaryStarCenter.ParticleSpawnOffset, dustVelocity, false, 180, 1f, Color.Cyan)); + } + } + + if (Projectile.localAI[0] % StarmageddonBinaryStarCenter.DustCloudSpawnRate == 0f) + { + float cloudVelocityX = Main.rand.NextFloat(-StarmageddonBinaryStarCenter.DustCloudSpreadMax, StarmageddonBinaryStarCenter.DustCloudSpreadMax); + float cloudVelocityY = top ? -StarmageddonBinaryStarCenter.DustCloudVelocityMax : StarmageddonBinaryStarCenter.DustCloudVelocityMax; + Vector2 cloudVelocity = new Vector2(cloudVelocityX, cloudVelocityY); + GeneralParticleHandler.SpawnParticle(new MediumMistParticle(Projectile.Center + Vector2.Normalize(cloudVelocity) * StarmageddonBinaryStarCenter.ParticleSpawnOffset, cloudVelocity, Color.Cyan, Color.Blue, 1f, 255)); + } + + if (Main.myPlayer == Projectile.owner) + { + if (Projectile.localAI[0] % StarmageddonBinaryStarCenter.SuckedProjectileSpawnRate == 0f) + { + float suckYDistanceMax = StarmageddonBinaryStarCenter.SuckedProjectileDistanceFromStars * 0.5f; + Vector2 position = Projectile.Center + new Vector2(StarmageddonBinaryStarCenter.SuckedProjectileDistanceFromStars * (top ? -1f : 1f), Main.rand.NextFloat(-suckYDistanceMax, suckYDistanceMax)); + Vector2 speed = Vector2.Normalize(Projectile.Center - position) * 12f; + + for (int l = 0; l < 12; l++) + { + Vector2 vector3 = Vector2.UnitX * (float)-(float)Projectile.width / 2f; + vector3 += -Vector2.UnitY.RotatedBy((double)((float)l * MathHelper.Pi / 6f), default) * new Vector2(8f, 16f); + vector3 = vector3.RotatedBy((double)(speed.ToRotation()), default); + int num9 = Dust.NewDust(position, 0, 0, 221, 0f, 0f, 0, default, 1f); + Main.dust[num9].noGravity = true; + Main.dust[num9].position = position + vector3; + Main.dust[num9].velocity = speed * 0.1f; + Main.dust[num9].velocity = Vector2.Normalize(position - speed * 3f - Main.dust[num9].position) * 1.25f; + } + + int type = Utils.SelectRandom(Main.rand, new int[] + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ProjectileID.StarCannonStar, + ProjectileID.Starfury + }); + + int star = Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, speed, type, Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner); + if (star.WithinBounds(Main.maxProjectiles)) + { + if (type == ModContent.ProjectileType() || type == ModContent.ProjectileType() || type == ModContent.ProjectileType()) + Main.projectile[star].ai[0] = 1f; + + Main.projectile[star].extraUpdates += 4; + Main.projectile[star].penetrate = 1; + Main.projectile[star].timeLeft = 300; + Main.projectile[star].DamageType = DamageClass.Ranged; + Main.projectile[star].tileCollide = false; + Main.projectile[star].netUpdate = true; + } + } + } + } + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + int height = texture.Height / Main.projFrames[Projectile.type]; + int drawStart = height * Projectile.frame; + Vector2 origin = Projectile.Size / 2; + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + public override void Kill(int timeLeft) + { + Projectile.ExpandHitboxBy(176); + Projectile.maxPenetrate = -1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + Projectile.Damage(); + SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); + + for (int i = 0; i < 4; i++) + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 160, 0f, 0f, 100, default(Color), 1.5f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; + } + + for (int i = 0; i < 30; i++) + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 229, 0f, 0f, 200, default(Color), 3.7f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; + Main.dust[dust].noGravity = true; + Dust dust2 = Main.dust[dust]; + dust2.velocity *= 3f; + dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 229, 0f, 0f, 100, default(Color), 1.5f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; + dust2 = Main.dust[dust]; + dust2.velocity *= 2f; + Main.dust[dust].noGravity = true; + Main.dust[dust].fadeIn = 2.5f; + } + + for (int i = 0; i < 10; i++) + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 229, 0f, 0f, 0, default(Color), 2.7f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; + Main.dust[dust].noGravity = true; + Dust dust2 = Main.dust[dust]; + dust2.velocity *= 3f; + } + + for (int i = 0; i < 10; i++) + { + int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 160, 0f, 0f, 0, default(Color), 1.5f); + Main.dust[dust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f; + Main.dust[dust].noGravity = true; + Dust dust2 = Main.dust[dust]; + dust2.velocity *= 3f; + } + + for (int i = 0; i < 2; i++) + { + int gore = Gore.NewGore(Projectile.GetSource_Death(), Projectile.position + new Vector2((float)(Projectile.width * Main.rand.Next(100)) / 100f, (float)(Projectile.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64)); + Main.gore[gore].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; + Gore gore2 = Main.gore[gore]; + gore2.velocity *= 0.3f; + Main.gore[gore].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f; + Main.gore[gore].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f; + } + } + } +} diff --git a/Projectiles/Ranged/SurgeDriverHoldout.cs b/Projectiles/Ranged/SurgeDriverHoldout.cs index 38b38db342..e5a37f026a 100644 --- a/Projectiles/Ranged/SurgeDriverHoldout.cs +++ b/Projectiles/Ranged/SurgeDriverHoldout.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged Item heldItem = Owner.ActiveItem(); Owner.PickAmmo(heldItem, out int projectileType, out float shootSpeed, out int damage, out float knockback, out _); - damage *= 6; + damage *= 4; shootSpeed = heldItem.shootSpeed * Projectile.scale * 0.64f; projectileType = ModContent.ProjectileType(); diff --git a/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs b/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs index 08272e71ea..6f978ef544 100644 --- a/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs +++ b/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.velocity = new Vector2(Projectile.spriteDirection * 3f, -4f); Projectile.netUpdate = true; if (HeatInterpolant >= 1f) - CombatText.NewText(Owner.Hitbox, Color.OrangeRed, "OUCH! HOT!", true); + CombatText.NewText(Owner.Hitbox, Color.OrangeRed, CalamityUtils.GetTextValue("Misc.AutocannonHot"), true); return; } diff --git a/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.cs b/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.cs new file mode 100644 index 0000000000..305dd67380 --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.cs @@ -0,0 +1,133 @@ +using System; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Particles; +using CalamityMod.Sounds; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class AtzirisDisfavor : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public Player Owner => Main.player[Projectile.owner]; + public CalamityPlayer ModdedOwner => Owner.Calamity(); + public NPC Target => Projectile.Center.MinionHoming(MirrorofKalandra.TargetDistanceDetection, Owner); + public ref float DrawSpin => ref Projectile.ai[0]; + public ref float Oscillation => ref Projectile.ai[1]; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + } + + public override void SetDefaults() + { + Projectile.minionSlots = 1; + Projectile.localNPCHitCooldown = MirrorofKalandra.Axe_IFrames; + Projectile.penetrate = -1; + + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = 112; + Projectile.minion = true; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + } + + public override void AI() + { + CheckMinionExistence(); + + // Flavor visual dust effect. + if (Main.rand.NextBool(3)) + { + int flavorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 228, 0, 0, 0, default, 1.2f); + Main.dust[flavorDust].noGravity = true; + } + + if (Target is not null) + { + // The distance to the target plus a small number so it's not 0, it'd break calculations. + float distanceToTarget = Projectile.Distance(Target.Center) + .01f; + + // The minion will head towards it's rotation. + // If the target's close, the minion'll speed up, and viceversa, so it doesn't circle around the target doing nothing. + Projectile.velocity = Projectile.rotation.ToRotationVector2() * (MirrorofKalandra.Axe_MinRamSpeed + (12f / (distanceToTarget * .01f))); + Projectile.velocity = Vector2.Clamp(Projectile.velocity, Vector2.One * -MirrorofKalandra.Axe_MaxRamSpeed, Vector2.One * MirrorofKalandra.Axe_MaxRamSpeed); + Projectile.rotation = Projectile.rotation.AngleTowards(Projectile.AngleTo(Target.Center), .001f * distanceToTarget); + + // Swing effect. + SemiCircularSmearVFX swingTrail = new SemiCircularSmearVFX(Projectile.Center + (DrawSpin + MathHelper.Pi).ToRotationVector2() * 10f, // Weird vector calculation for better alignment. + Color.OrangeRed, + DrawSpin + MathHelper.PiOver2, + Projectile.scale * .8f, + Vector2.One); + GeneralParticleHandler.SpawnParticle(swingTrail); + + // Repeating swing sound. + if (Projectile.soundDelay <= 0) + { + SoundEngine.PlaySound(CommonCalamitySounds.LouderSwingWoosh with { Pitch = -.8f, PitchVariance = 1f, Volume = .6f }, Projectile.Center); + Projectile.soundDelay = 15; + Projectile.netUpdate = true; + } + } + else if (Target is null) + { + Projectile.Center = Vector2.Lerp(Projectile.Center, + Owner.Center + Projectile.rotation.ToRotationVector2() * (MirrorofKalandra.IdleDistanceFromPlayer + MirrorofKalandra.IdleDistanceFromPlayer * (MathF.Sin(Oscillation) / MirrorofKalandra.OscillationRange)), + .3f); + Projectile.velocity = Vector2.Zero; + Projectile.rotation = Projectile.rotation.AngleLerp(-MathHelper.PiOver2, .1f); + Oscillation += MirrorofKalandra.OscillationSpeed; + } + } + + public void CheckMinionExistence() + { + Owner.AddBuff(ModContent.BuffType(), 3600); + if (Projectile.type != ModContent.ProjectileType()) + return; + + if (Owner.dead) + ModdedOwner.KalandraMirror = false; + if (ModdedOwner.KalandraMirror) + Projectile.timeLeft = 2; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + ImpactParticle sparkHit = new ImpactParticle(Vector2.Lerp(Projectile.Center, target.Center, .8f), + Main.rand.NextBool().ToDirectionInt() * Main.rand.NextFloat(.08f, .12f), + 20, + 1f, + Color.Gold); + GeneralParticleHandler.SpawnParticle(sparkHit); + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + DrawSpin += MathHelper.ToRadians(MirrorofKalandra.Axe_SpinSpeed); + float rotation = (Target is not null) ? DrawSpin : Projectile.rotation + MathHelper.PiOver4; + + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), rotation, origin, Projectile.scale, SpriteEffects.None, 0); + + return false; + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.png b/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.png new file mode 100644 index 0000000000..16a6b03356 Binary files /dev/null and b/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.png differ diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.cs b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.cs new file mode 100644 index 0000000000..5d58ed9de3 --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.cs @@ -0,0 +1,124 @@ +using System; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Summon; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class HopeShredder : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public Player Owner => Main.player[Projectile.owner]; + public CalamityPlayer ModdedOwner => Owner.Calamity(); + public NPC Target => Projectile.Center.MinionHoming(MirrorofKalandra.TargetDistanceDetection, Owner); + public ref float Oscillation => ref Projectile.ai[0]; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + Main.projFrames[Type] = 7; + } + + public override void SetDefaults() + { + Projectile.penetrate = -1; + + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = 84; + Projectile.minion = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.friendly = true; + } + + public override void AI() + { + CheckMinionExistence(); + + Projectile.Center = Vector2.Lerp(Projectile.Center, Owner.Center + (-MathHelper.PiOver2 + MathHelper.PiOver4 * 1.5f).ToRotationVector2() * (MirrorofKalandra.IdleDistanceFromPlayer + MirrorofKalandra.IdleDistanceFromPlayer * (MathF.Sin(Oscillation) / MirrorofKalandra.OscillationRange)), .4f); + Projectile.velocity = Vector2.Zero; + Oscillation += MirrorofKalandra.OscillationSpeed; + + if (Target is not null) + { + DoAnimation(); + ShootTarget(); + + Projectile.rotation = Projectile.rotation.AngleTowards(CalamityUtils.CalculatePredictiveAimToTarget(Projectile.Center, Target, MirrorofKalandra.Vile_ArrowSpeed).ToRotation(), .2f); + } + else + { + Projectile.frame = 0; + Projectile.rotation = Projectile.rotation.AngleTowards(-MathHelper.PiOver2 + MathHelper.PiOver4 * 1.5f, .2f); + } + } + + public void DoAnimation() + { + Projectile.frameCounter++; + if (Projectile.frameCounter % MirrorofKalandra.Vile_BowChargeTime == 0) + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + } + + public void ShootTarget() + { + // On the first frame where the projectile is on the firing frame animation, fire an arrow. + if (Projectile.frame == 5 && Projectile.frameCounter % MirrorofKalandra.Vile_BowChargeTime == 0 && Main.myPlayer == Projectile.owner) + { + Vector2 spawnPosition = Projectile.Center + Projectile.rotation.ToRotationVector2() * (Projectile.width / 2); + int arrow = Projectile.NewProjectile(Projectile.GetSource_FromThis(), + spawnPosition, + CalamityUtils.CalculatePredictiveAimToTarget(spawnPosition, Target, MirrorofKalandra.Vile_ArrowSpeed), + ModContent.ProjectileType(), + (int)(Projectile.damage / MirrorofKalandra.Vile_SplitDMGMultiplier), + Projectile.knockBack, + Owner.whoAmI); + + if (Main.projectile.IndexInRange(arrow)) + Main.projectile[arrow].originalDamage = (int)(Projectile.originalDamage / MirrorofKalandra.Vile_SplitDMGMultiplier); + + SoundEngine.PlaySound(SoundID.Item5, Owner.Center); + + Projectile.netUpdate = true; + } + } + + public void CheckMinionExistence() + { + Owner.AddBuff(ModContent.BuffType(), 3600); + if (Projectile.type != ModContent.ProjectileType()) + return; + + if (Owner.dead) + ModdedOwner.KalandraMirror = false; + if (ModdedOwner.KalandraMirror) + Projectile.timeLeft = 2; + } + + public override bool? CanDamage() => false; + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + + // These two entity sprite draws are afterimages. + Main.EntitySpriteDraw(texture, drawPosition - Projectile.rotation.ToRotationVector2() * 5f, frame, Color.DarkBlue with { A = 100 }, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, drawPosition + Projectile.rotation.ToRotationVector2() * 5f, frame, Color.DarkBlue with { A = 100 }, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + + + return false; + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.png b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.png new file mode 100644 index 0000000000..3877a46430 Binary files /dev/null and b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.png differ diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs new file mode 100644 index 0000000000..798f3b56a3 --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs @@ -0,0 +1,79 @@ +using CalamityMod.Items.Weapons.Summon; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class HopeShredderArrow : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public Player Owner => Main.player[Projectile.owner]; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; + } + + public override void SetDefaults() + { + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = 22; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation(); + } + + public override void Kill(int timeLeft) + { + for (int i = -MirrorofKalandra.Vile_SplitSpreadAngle; i < MirrorofKalandra.Vile_SplitSpreadAngle * 2; i += MirrorofKalandra.Vile_SplitSpreadAngle) + { + int shard = Projectile.NewProjectile(Projectile.GetSource_FromThis(), + Projectile.Center, + Projectile.velocity.RotatedBy(MathHelper.ToRadians(i)), + ModContent.ProjectileType(), + Projectile.damage, + Projectile.knockBack, + Owner.whoAmI); + + if (Main.projectile.IndexInRange(shard)) + Main.projectile[shard].originalDamage = Projectile.originalDamage; + + Projectile.netUpdate = true; + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + + if (CalamityConfig.Instance.Afterimages) + { + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + Color afterimageDrawColor = Color.Gray with { A = 125 } * Projectile.Opacity * (1f - i / (float)Projectile.oldPos.Length); + Vector2 afterimageDrawPosition = Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition; + Main.EntitySpriteDraw(texture, afterimageDrawPosition, frame, afterimageDrawColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + } + } + + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + + return false; + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.png b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.png new file mode 100644 index 0000000000..164b16a9b8 Binary files /dev/null and b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.png differ diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrowSplit.cs b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrowSplit.cs new file mode 100644 index 0000000000..c79c9dd161 --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrowSplit.cs @@ -0,0 +1,32 @@ +using CalamityMod.Items.Weapons.Summon; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class HopeShredderArrowSplit : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Type] = true; + + public override void SetDefaults() + { + Projectile.localNPCHitCooldown = MirrorofKalandra.Vile_SplitIFrames; + Projectile.penetrate = 3; + + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = 18; + Projectile.usesLocalNPCImmunity = true; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation(); + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrowSplit.png b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrowSplit.png new file mode 100644 index 0000000000..b2d29cbadc Binary files /dev/null and b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrowSplit.png differ diff --git a/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs b/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs new file mode 100644 index 0000000000..aef3a50af8 --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs @@ -0,0 +1,207 @@ +using System; +using System.IO; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Particles; +using CalamityMod.Sounds; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class Paradoxica : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public Player Owner => Main.player[Projectile.owner]; + public CalamityPlayer ModdedOwner => Owner.Calamity(); + public NPC Target => Projectile.Center.MinionHoming(MirrorofKalandra.TargetDistanceDetection, Owner); + public ref float AITimer => ref Projectile.ai[0]; + public ref float Oscillation => ref Projectile.ai[1]; + public bool hasTeleported = false; + public Vector2 ChargeStartingPosition; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + } + + public override void SetDefaults() + { + Projectile.minionSlots = 1; + Projectile.localNPCHitCooldown = MirrorofKalandra.Scimitar_IFrames; + Projectile.penetrate = -1; + + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = 104; + Projectile.ignoreWater = true; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.minion = true; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(hasTeleported); + writer.WriteVector2(ChargeStartingPosition); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + hasTeleported = reader.ReadBoolean(); + ChargeStartingPosition = reader.ReadPackedVector2(); + } + + public override void AI() + { + CheckMinionExistence(); + + if (Main.rand.NextBool(30)) + { + GenericSparkle sparkle = new GenericSparkle(Projectile.Center + Main.rand.NextVector2Circular(Projectile.width / 4, Projectile.height / 4), + Vector2.Zero, + Color.Lerp(Color.White, Color.Gold, Main.rand.NextFloat(1f)), + Color.White, + Main.rand.NextFloat(.6f, 1f), + 20, + Main.rand.NextFloat(.08f, .12f), + Main.rand.NextFloat(.1f, .3f)); + GeneralParticleHandler.SpawnParticle(sparkle); + } + + if (Target is not null) + { + if (!hasTeleported) + { + int dustAmount = 60; + for (int dustIndex = 0; dustIndex < dustAmount; dustIndex++) + { + float angle = MathHelper.TwoPi / dustAmount * dustIndex; + Vector2 velocity = angle.ToRotationVector2() * Main.rand.NextFloat(5f, 15f); + Dust teleportDust = Dust.NewDustPerfect(Projectile.Center, 212, velocity, 0, default, 2f); + teleportDust.noGravity = true; + } + + Projectile.Center = Target.Center; + hasTeleported = true; + } + + // + // Code from Virid Vanguard @ DoBehaviour_RegularPierceSlashes(). + // + + int attackCycleTime = ViridVanguard.PierceChargeAttackCycleTime; + float upwardRiseTimeRatio = 0.4f; + float pierceTimeRatio = 0.14f; + + // Initialize the starting position on the first frame. + int localAITimer = (int)AITimer; + if (localAITimer % attackCycleTime == 1f) + { + ChargeStartingPosition = Projectile.Center + Main.rand.NextVector2Circular(80f, 80f); + Projectile.netUpdate = true; + } + + float attackCompletion = localAITimer / (float)attackCycleTime % 1f; + + // Reset the trail point array if aiming at the target. + if (attackCompletion < upwardRiseTimeRatio) + Projectile.oldPos = new Vector2[Projectile.oldPos.Length]; + + // Use extra updates to make the swords move faster than normal. + Projectile.MaxUpdates = 2; + + // This represents the entire attack cycle in a single interpolant via a bunch of GetLerpValues and vector math. The patterns is as follows: + // 1. Hover very quickly to the starting position. + // 2. Rise upward somewhat. + // 3. Lerp towards the target rapidly. + // 4. Lerp through the target rapidly. + // 5. Repeat. + float offsetDistanceFactor = MathHelper.Lerp(1.61f, 3f, 1f / 7f % 1f); + Vector2 startingPosition = ChargeStartingPosition + Vector2.UnitY * Utils.GetLerpValue(0f, upwardRiseTimeRatio, attackCompletion, true) * -200f; + Vector2 targetOffset = Target.Center - startingPosition; + Vector2 endingPosition = Target.Center + targetOffset.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(targetOffset.Length(), 60f, 240f) * offsetDistanceFactor; + float pierceCompletion = Utils.GetLerpValue(upwardRiseTimeRatio, upwardRiseTimeRatio + pierceTimeRatio, attackCompletion, true); + float throughTargetCompletion = Utils.GetLerpValue(upwardRiseTimeRatio + pierceTimeRatio, 1f, attackCompletion, true); + + // Update rotation and interpolate through the necessary positions. + Projectile.rotation = Projectile.rotation.AngleTowards(targetOffset.ToRotation() + MathHelper.PiOver2, MathHelper.Pi / 5f); + Projectile.Center = Vector2.Lerp(Projectile.Center, Vector2.Lerp(startingPosition, Target.Center, pierceCompletion), pierceCompletion * 0.5f); + if (throughTargetCompletion > 0f) + Projectile.Center = Vector2.Lerp(Target.Center, endingPosition, throughTargetCompletion); + Projectile.velocity = Vector2.Zero; + + // Play a slice sound once ready to charge. + if (localAITimer % attackCycleTime == (int)(attackCycleTime * upwardRiseTimeRatio)) + SoundEngine.PlaySound(CommonCalamitySounds.MeatySlashSound with { Pitch = 1.6f, Volume = 0.1f }, Projectile.Center); + + AITimer++; + } + else if (Target is null) + { + Projectile.Center = Vector2.Lerp(Projectile.Center, Owner.Center + Projectile.rotation.ToRotationVector2() * (MirrorofKalandra.IdleDistanceFromPlayer + MirrorofKalandra.IdleDistanceFromPlayer * (MathF.Sin(Oscillation) / MirrorofKalandra.OscillationRange)), .4f); + Projectile.velocity = Vector2.Zero; + Projectile.rotation = Projectile.rotation.AngleLerp(-MathHelper.PiOver2 + MathHelper.PiOver4 / 1.5f, .15f); + Oscillation += MirrorofKalandra.OscillationSpeed; + + hasTeleported = false; + Projectile.extraUpdates = 0; + AITimer = 0f; + } + } + + public void CheckMinionExistence() + { + Owner.AddBuff(ModContent.BuffType(), 3600); + if (Projectile.type != ModContent.ProjectileType()) + return; + + if (Owner.dead) + ModdedOwner.KalandraMirror = false; + if (ModdedOwner.KalandraMirror) + Projectile.timeLeft = 2; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + SparkParticle sparkOnHit = new SparkParticle(Vector2.Lerp(Projectile.Center, target.Center, .8f), + (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * .01f, // It'll rotate, but due to the multiplier it won't move. + false, + 20, + Main.rand.NextFloat(1.2f, 1.8f), + Color.White); + GeneralParticleHandler.SpawnParticle(sparkOnHit); + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + float rotation = (Target is not null) ? Projectile.rotation : Projectile.rotation + MathHelper.PiOver4; + + if (CalamityConfig.Instance.Afterimages && Target is not null) + { + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + Color afterimageDrawColor = Color.Gray with { A = 125 } * Projectile.Opacity * (1f - i / (float)Projectile.oldPos.Length); + Vector2 afterimageDrawPosition = Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition; + Main.EntitySpriteDraw(texture, afterimageDrawPosition, frame, afterimageDrawColor, rotation, origin, Projectile.scale, SpriteEffects.None, 0); + } + } + + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), rotation, origin, Projectile.scale, SpriteEffects.None, 0); + + return false; + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.png b/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.png new file mode 100644 index 0000000000..022bca20f0 Binary files /dev/null and b/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.png differ diff --git a/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs b/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs new file mode 100644 index 0000000000..8293f9ac03 --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs @@ -0,0 +1,155 @@ +using System; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Particles; +using CalamityMod.Sounds; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class Starforge : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public Player Owner => Main.player[Projectile.owner]; + public CalamityPlayer ModdedOwner => Owner.Calamity(); + public NPC Target => Projectile.Center.MinionHoming(MirrorofKalandra.TargetDistanceDetection, Owner); + public ref float TimerToBoom => ref Projectile.ai[0]; + public ref float DrawSpin => ref Projectile.ai[1]; + public ref float Oscillation => ref Projectile.ai[2]; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + } + + public override void SetDefaults() + { + Projectile.minionSlots = 1; + Projectile.localNPCHitCooldown = MirrorofKalandra.Purple_IFrames; + Projectile.penetrate = -1; + + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = 92; + Projectile.minion = true; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + } + + public override void AI() + { + CheckMinionExistence(); + + if (Main.rand.NextBool(3)) + { + MediumMistParticle mist = new MediumMistParticle(Projectile.Center + Main.rand.NextVector2Circular(Projectile.width / 2, Projectile.height / 2), + Main.rand.NextVector2Circular(4f, 4f), + Color.DarkMagenta, + Color.Magenta, + Main.rand.NextFloat(.9f, 1.1f), + Main.rand.NextFloat(140f, 150f)); + GeneralParticleHandler.SpawnParticle(mist); + + int flavorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 272, 0, 0, 0, default, .6f); + Main.dust[flavorDust].noGravity = true; + } + + if (Target is not null) + { + // The distance to the target plus a small number so it's not 0, it'd break calculations. + float distanceToTarget = Projectile.Distance(Target.Center) + .01f; + + // The minion will head towards it's rotation. + // If the target's close, the minion'll speed up, and viceversa, so it doesn't circle around the target doing nothing. + Projectile.velocity = Projectile.rotation.ToRotationVector2() * (MirrorofKalandra.Purple_MinRamSpeed + (12f / (distanceToTarget * .01f))); + Projectile.velocity = Vector2.Clamp(Projectile.velocity, Vector2.One * -MirrorofKalandra.Purple_MaxRamSpeed, Vector2.One * MirrorofKalandra.Purple_MaxRamSpeed); + Projectile.rotation = Projectile.rotation.AngleTowards(Projectile.AngleTo(Target.Center), .001f * distanceToTarget); + + TimerToBoom++; + } + else if (Target is null) + { + Projectile.Center = Vector2.Lerp(Projectile.Center, Owner.Center + Projectile.rotation.ToRotationVector2() * (MirrorofKalandra.IdleDistanceFromPlayer + MirrorofKalandra.IdleDistanceFromPlayer * (MathF.Sin(Oscillation) / MirrorofKalandra.OscillationRange)), .4f); + Projectile.velocity = Vector2.Zero; + Projectile.rotation = Projectile.rotation.AngleLerp(-MathHelper.PiOver2 - MathHelper.PiOver4 / 1.5f, .15f); + Oscillation += MirrorofKalandra.OscillationSpeed; + } + } + + public void CheckMinionExistence() + { + Owner.AddBuff(ModContent.BuffType(), 3600); + if (Projectile.type != ModContent.ProjectileType()) + return; + + if (Owner.dead) + ModdedOwner.KalandraMirror = false; + if (ModdedOwner.KalandraMirror) + Projectile.timeLeft = 2; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + // If enough time has passed and an enemy is hit, boom. + if (TimerToBoom >= MirrorofKalandra.Purple_BlastFireRate && Main.myPlayer == Projectile.owner) + { + int blast = Projectile.NewProjectile(Projectile.GetSource_FromThis(), + Projectile.Center, + Vector2.Zero, + ModContent.ProjectileType(), + (int)(Projectile.damage * MirrorofKalandra.Purple_BlastDMGModifier), + Projectile.knockBack, + Owner.whoAmI); + + if (Main.projectile.IndexInRange(blast)) + Main.projectile[blast].originalDamage = (int)(Projectile.originalDamage / MirrorofKalandra.Purple_BlastDMGModifier); + + TimerToBoom = 0f; + } + + SparkParticle sparkOnHit = new SparkParticle(Vector2.Lerp(Projectile.Center, target.Center, .8f), + -Projectile.velocity * .01f, + false, + 20, + Main.rand.NextFloat(1.2f, 1.8f), + Color.Purple); + GeneralParticleHandler.SpawnParticle(sparkOnHit); + + SoundEngine.PlaySound(CommonCalamitySounds.SwiftSliceSound with { PitchVariance = .5f } with { Volume = .2f }, Projectile.Center); + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + DrawSpin -= MathHelper.ToRadians(MirrorofKalandra.Purple_SpinSpeed); + float rotation = (Target is not null) ? DrawSpin : Projectile.rotation + MathHelper.Pi - MathHelper.PiOver4; + + if (CalamityConfig.Instance.Afterimages && Target is not null) + { + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + Color afterimageDrawColor = Color.Purple with { A = 125 } * Projectile.Opacity * (1f - i / (float)Projectile.oldPos.Length); + Vector2 afterimageDrawPosition = Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition; + Main.EntitySpriteDraw(texture, afterimageDrawPosition, frame, afterimageDrawColor, rotation, origin, Projectile.scale, SpriteEffects.FlipHorizontally, 0); + } + } + + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), rotation, origin, Projectile.scale, SpriteEffects.FlipHorizontally, 0); + + return false; + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/Starforge.png b/Projectiles/Summon/MirrorofKalandraMinions/Starforge.png new file mode 100644 index 0000000000..cb7a1a028a Binary files /dev/null and b/Projectiles/Summon/MirrorofKalandraMinions/Starforge.png differ diff --git a/Projectiles/Summon/MirrorofKalandraMinions/StarforgeBlast.cs b/Projectiles/Summon/MirrorofKalandraMinions/StarforgeBlast.cs new file mode 100644 index 0000000000..e23e84811f --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/StarforgeBlast.cs @@ -0,0 +1,63 @@ +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using System; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class StarforgeBlast : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; + } + + public override void SetDefaults() + { + Projectile.timeLeft = MirrorofKalandra.Purple_BlastChargeTime; + Projectile.localNPCHitCooldown = MirrorofKalandra.Purple_BlastChargeTime; + Projectile.penetrate = -1; + + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = MirrorofKalandra.Purple_BlastSize; + Projectile.ignoreWater = true; + Projectile.friendly = true; + Projectile.tileCollide = false; + } + + public override void AI() + { + GenericBloom boom = new GenericBloom(Projectile.Center, + Vector2.Zero, + Color.Lerp(Color.DarkMagenta, Color.White, MathF.Pow(Utils.GetLerpValue(MirrorofKalandra.Purple_BlastChargeTime, 0f, Projectile.timeLeft), 6)), // No Color Remap function, insert sad emote. + Utils.Remap(Projectile.timeLeft, MirrorofKalandra.Purple_BlastChargeTime, 5f, .5f, 4.2f), + MirrorofKalandra.Purple_BlastChargeTime); + GeneralParticleHandler.SpawnParticle(boom); + } + + public override void Kill(int timeLeft) + { + int dustAmount = 100; + for (int dustIndex = 0; dustIndex < dustAmount; dustIndex++) + { + float angle = MathHelper.TwoPi / dustAmount * dustIndex; + Vector2 velocity = angle.ToRotationVector2() * Main.rand.NextFloat(2f, 15f); + Dust boomDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(MirrorofKalandra.Purple_BlastSize / 2, MirrorofKalandra.Purple_BlastSize / 2), 272, velocity); + boomDust.noGravity = true; + boomDust.velocity *= .8f; + boomDust.scale = velocity.Length() * .08f; + } + + // Electric boom sound. + SoundEngine.PlaySound(SoundID.Item94, Projectile.Center); + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.cs b/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.cs new file mode 100644 index 0000000000..e93d8dbf6b --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.cs @@ -0,0 +1,119 @@ +using System; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Summon; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class WindRipper : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public Player Owner => Main.player[Projectile.owner]; + public CalamityPlayer ModdedOwner => Owner.Calamity(); + public NPC Target => Projectile.Center.MinionHoming(MirrorofKalandra.TargetDistanceDetection, Owner); + public ref float Oscillation => ref Projectile.ai[0]; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + Main.projFrames[Type] = 7; + } + + public override void SetDefaults() + { + Projectile.penetrate = -1; + + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = 84; + Projectile.minion = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.friendly = true; + } + + public override void AI() + { + CheckMinionExistence(); + + Projectile.Center = Vector2.Lerp(Projectile.Center, Owner.Center + (-MathHelper.PiOver2 - MathHelper.PiOver4 * 1.5f).ToRotationVector2() * (MirrorofKalandra.IdleDistanceFromPlayer + MirrorofKalandra.IdleDistanceFromPlayer * (MathF.Sin(Oscillation) / MirrorofKalandra.OscillationRange)), .4f); + Projectile.velocity = Vector2.Zero; + Oscillation += MirrorofKalandra.OscillationSpeed; + + if (Target is not null) + { + DoAnimation(); + ShootTarget(); + + Projectile.rotation = Projectile.rotation.AngleTowards(CalamityUtils.CalculatePredictiveAimToTarget(Projectile.Center, Target, MirrorofKalandra.Wind_ArrowSpeed).ToRotation(), .2f); + } + else + { + Projectile.frame = 0; + Projectile.rotation = Projectile.rotation.AngleTowards(-MathHelper.PiOver2 - MathHelper.PiOver4 * 1.5f, .2f); + } + } + + public void DoAnimation() + { + Projectile.frameCounter++; + if (Projectile.frameCounter % MirrorofKalandra.Wind_BowChargeTime == 0) + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + } + + public void ShootTarget() + { + // On the first frame where the projectile is on the firing frame animation, fire an arrow. + if (Projectile.frame == 5 && Projectile.frameCounter % MirrorofKalandra.Wind_BowChargeTime == 0 && Main.myPlayer == Projectile.owner) + { + Vector2 spawnPosition = Projectile.Center + Projectile.rotation.ToRotationVector2() * (Projectile.width / 2); + int arrow = Projectile.NewProjectile(Projectile.GetSource_FromThis(), + Projectile.Center, + CalamityUtils.CalculatePredictiveAimToTarget(Projectile.Center, Target, MirrorofKalandra.Wind_ArrowSpeed), + ModContent.ProjectileType(), + Projectile.damage, + Projectile.knockBack, + Owner.whoAmI); + + if (Main.projectile.IndexInRange(arrow)) + Main.projectile[arrow].originalDamage = Projectile.originalDamage; + + SoundEngine.PlaySound(SoundID.Item5, Owner.Center); + + Projectile.netUpdate = true; + } + } + + public void CheckMinionExistence() + { + Owner.AddBuff(ModContent.BuffType(), 3600); + if (Projectile.type != ModContent.ProjectileType()) + return; + + if (Owner.dead) + ModdedOwner.KalandraMirror = false; + if (ModdedOwner.KalandraMirror) + Projectile.timeLeft = 2; + } + + public override bool? CanDamage() => false; + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + + return false; + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.png b/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.png new file mode 100644 index 0000000000..4db4d9985b Binary files /dev/null and b/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.png differ diff --git a/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs b/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs new file mode 100644 index 0000000000..83a6846b81 --- /dev/null +++ b/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs @@ -0,0 +1,69 @@ +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using CalamityMod.Particles; + +namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions +{ + public class WindRipperArrow : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; + } + + public override void SetDefaults() + { + Projectile.DamageType = DamageClass.Summon; + Projectile.width = Projectile.height = 18; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation(); + + if (Main.rand.NextBool(5)) + { + SparkParticle windEffect = new SparkParticle(Projectile.Center + Main.rand.NextVector2Circular(25f, 25f), + Projectile.velocity, + false, + 60, + Main.rand.NextFloat(1f, 1.2f), + Color.White); + GeneralParticleHandler.SpawnParticle(windEffect); + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + + if (CalamityConfig.Instance.Afterimages) + { + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + Color afterimageDrawColor = Color.Gray with { A = 125 } * Projectile.Opacity * (1f - i / (float)Projectile.oldPos.Length); + Vector2 afterimageDrawPosition = Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition; + Main.EntitySpriteDraw(texture, afterimageDrawPosition, frame, afterimageDrawColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + } + } + + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + + return false; + } + } +} diff --git a/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.png b/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.png new file mode 100644 index 0000000000..5417c9d082 Binary files /dev/null and b/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.png differ diff --git a/Projectiles/Summon/StellarTorusBeam.cs b/Projectiles/Summon/StellarTorusBeam.cs new file mode 100644 index 0000000000..ff57d04eff --- /dev/null +++ b/Projectiles/Summon/StellarTorusBeam.cs @@ -0,0 +1,88 @@ +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class StellarTorusBeam : BaseLaserbeamProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/StellarTorusBeamStart", AssetRequestMode.ImmediateLoad).Value; + public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/StellarTorusBeamMiddle", AssetRequestMode.ImmediateLoad).Value; + public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/StellarTorusBeamEnd", AssetRequestMode.ImmediateLoad).Value; + + public override float Lifetime => StellarTorusStaff.TimeShooting; + public override float MaxLaserLength => StellarTorusStaff.EnemyDetectionDistance * 2f; + public override float MaxScale => 1f; + + public float Opacity = .33f; + public override Color LightCastColor => Color.White * Opacity; + public override Color LaserOverlayColor => Color.White * Opacity; + + public ref float MinionID => ref Projectile.ai[1]; + public Projectile Minion => Main.projectile[(int)MinionID]; + public ref float TargetID => ref Projectile.ai[2]; + public NPC Target => Main.npc[(int)TargetID]; + + public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Type] = true; + + public override void SetDefaults() + { + Projectile.localNPCHitCooldown = StellarTorusStaff.IFrames; + Projectile.timeLeft = (int)Lifetime; + Projectile.penetrate = -1; + + Projectile.width = Projectile.height = 20; + Projectile.alpha = 254; + Projectile.DamageType = DamageClass.Summon; + Projectile.usesLocalNPCImmunity = true; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + } + + public override void ExtraBehavior() + { + Projectile.velocity = Minion.rotation.ToRotationVector2(); + + if (Target is null) + Projectile.Kill(); + + if (Main.rand.NextBool(3)) + { + SparkParticle energyEffect = new SparkParticle(Projectile.Center + Vector2.Lerp(Projectile.velocity, Projectile.velocity * MaxLaserLength, Main.rand.NextFloat(1f)) + Main.rand.NextVector2Circular(30f, 30f), + Projectile.velocity * Main.rand.NextFloat(8f, 12f), + false, + 20, + Main.rand.NextFloat(1f, 1.5f), + Color.Cyan); + GeneralParticleHandler.SpawnParticle(energyEffect); + } + + GenericBloom bloomEnergyEffect = new GenericBloom(Projectile.Center, + Minion.velocity, + Color.Cyan with { A = 6 }, + 0.6f, + (int)(Lifetime / 4f)); + GeneralParticleHandler.SpawnParticle(bloomEnergyEffect); + } + + public override void AttachToSomething() + { + Projectile.Center = Minion.Center; + if (Minion is null) + { + Projectile.Kill(); + Projectile.netUpdate = true; + } + } + } +} diff --git a/Projectiles/Summon/StellarTorusSummon.cs b/Projectiles/Summon/StellarTorusSummon.cs new file mode 100644 index 0000000000..b129915a34 --- /dev/null +++ b/Projectiles/Summon/StellarTorusSummon.cs @@ -0,0 +1,276 @@ +using System; +using System.IO; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Particles; +using CalamityMod.Sounds; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class StellarTorusSummon : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + + public Player Owner => Main.player[Projectile.owner]; + public CalamityPlayer ModdedOwner => Owner.Calamity(); + public NPC Target => Projectile.Center.MinionHoming(StellarTorusStaff.EnemyDetectionDistance, Owner); + public ref float TimerToShoot => ref Projectile.ai[0]; + public ref float RotationInterpolant => ref Projectile.ai[1]; + public ref float AnimationSpeed => ref Projectile.ai[2]; + public int LaserSwingDirection = 0; + public bool DecidedSwingDirection = false; + public bool HasReachedSwingRotationStart = false; + public bool HasShotLaser = false; + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 4; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + } + + public override void SetDefaults() + { + Projectile.minionSlots = 1; + Projectile.penetrate = -1; + + Projectile.width = Projectile.height = 52; + Projectile.DamageType = DamageClass.Summon; + Projectile.friendly = true; + Projectile.minion = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(LaserSwingDirection); + writer.Write(DecidedSwingDirection); + writer.Write(HasReachedSwingRotationStart); + writer.Write(HasShotLaser); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + LaserSwingDirection = reader.ReadInt32(); + DecidedSwingDirection = reader.ReadBoolean(); + HasReachedSwingRotationStart = reader.ReadBoolean(); + HasShotLaser = reader.ReadBoolean(); + } + + public override void AI() + { + CheckMinionExistence(); + DoAnimation(); + Projectile.MinionAntiClump(.1f); + + if (Target is not null) + { + TimerToShoot++; + + // When the minion detects a target, before it starts charging it'll line up to the target. + if (TimerToShoot <= StellarTorusStaff.TimeBeforeCharging) + { + FollowPlayer(); + Projectile.rotation = Projectile.rotation.AngleTowards(Projectile.DirectionTo(Target.Center).ToRotation(), .05f); + AnimationSpeed = 5f; + + SoundStyle laserCharge = new SoundStyle("CalamityMod/Sounds/Custom/ExoMechs/AresLaserArmCharge") { Volume = .1f, Pitch = .8f, PitchVariance = .2f }; + SoundEngine.PlaySound(laserCharge, Projectile.Center); + } + + // When it lines up, the minion will stop following the owner and will stop in place. + // Now it'll start charging. + else if ((TimerToShoot > StellarTorusStaff.TimeBeforeCharging) && (TimerToShoot <= (StellarTorusStaff.TimeBeforeCharging + StellarTorusStaff.TimeCharging))) + { + Projectile.velocity *= .95f; + AnimationSpeed = Utils.Remap(TimerToShoot, StellarTorusStaff.TimeBeforeCharging, StellarTorusStaff.TimeBeforeCharging + StellarTorusStaff.TimeCharging, 5f, 2f); + + float scale = Projectile.width * Projectile.scale; + float relativeScale = scale / 72f; // The width of the projectile relative to the width of the particle. + GenericBloom bloomCharge = new GenericBloom(Projectile.Center, + Projectile.velocity, + Color.Cyan with { A = 10 }, + Utils.Remap(TimerToShoot, StellarTorusStaff.TimeBeforeCharging, StellarTorusStaff.TimeBeforeCharging + StellarTorusStaff.TimeCharging, relativeScale * 2f, relativeScale / 2f), + (int)StellarTorusStaff .TimeCharging); + GeneralParticleHandler.SpawnParticle(bloomCharge); + + Vector2 chargeDustSpawn = Projectile.Center + Main.rand.NextVector2Circular(scale * 1.2f, scale * 1.2f); + Dust chargeDust = Dust.NewDustPerfect(chargeDustSpawn, + 307, + chargeDustSpawn.DirectionTo(Projectile.Center) * Main.rand.NextFloat(5f, 8f)); + chargeDust.noGravity = true; + chargeDust.scale = chargeDust.velocity.Length() * .15f; + } + + // And the behaviour just before shooting and while shooting. + else + { + AnimationSpeed = 2f; + + // Randomly decided if the minion'll swing the laser "Left -> Right" or "Right -> Left". + // ...Or whatever perspective, you get me. + if (!DecidedSwingDirection) + { + LaserSwingDirection = Main.rand.NextBool().ToDirectionInt(); + DecidedSwingDirection = true; + Projectile.netUpdate = true; + } + + // The minion will now point at the direction it has decided. + float swingRotStart = Projectile.DirectionTo(Target.Center).ToRotation() + (MathHelper.PiOver4 / 2 * LaserSwingDirection); + if (!HasReachedSwingRotationStart) + { + Projectile.rotation = MathHelper.Lerp(Projectile.rotation, swingRotStart, RotationInterpolant); + RotationInterpolant += 1f / 30f; + if (RotationInterpolant < 1f) + return; + + HasReachedSwingRotationStart = true; + RotationInterpolant = 0f; + + int sparkAmount = 10; + for (int sparkIndex = 0; sparkIndex < sparkAmount; sparkIndex++) + { + float angle = MathHelper.TwoPi / sparkAmount * sparkIndex; + Vector2 velocity = angle.ToRotationVector2().RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(10f, 15f); + SparkParticle firingSparks = new SparkParticle(Projectile.Center, + velocity, + true, + 10, + velocity.Length() * .1f, + Color.Cyan); + GeneralParticleHandler.SpawnParticle(firingSparks); + } + + SoundEngine.PlaySound(CommonCalamitySounds.LaserCannonSound with { Volume = .3f, Pitch = .8f, PitchVariance = .2f }, Projectile.Center); + + Projectile.netUpdate = true; + } + + // And when it has reached the direction that was decided, + // the laser will be shot and the laser will be swong to the reverse rotation that was decided. + if (!HasReachedSwingRotationStart) + return; + + ShootLaser(); + Projectile.rotation = MathHelper.Lerp(swingRotStart, swingRotStart + (MathHelper.PiOver4 * -LaserSwingDirection), RotationInterpolant); + RotationInterpolant += 1f / StellarTorusStaff.TimeShooting; + + Dust shootDust = Dust.NewDustPerfect(Projectile.Center, 307, Main.rand.NextVector2Circular(Main.rand.NextFloat(10f, 15f), Main.rand.NextFloat(10f, 15f))); + shootDust.noGravity = true; + shootDust.scale = shootDust.velocity.Length() * .2f; + + // When it completes the full swing: repeat process and reset all targetting variables. + if (RotationInterpolant >= 1f) + ResetTargettingVariables(); + } + } + else + { + FollowPlayer(); + Projectile.rotation = (MathF.Sign(Projectile.velocity.X) == 1) ? 0f : MathHelper.Pi; + AnimationSpeed = 5f; + + ResetTargettingVariables(); + } + } + + public void CheckMinionExistence() + { + Owner.AddBuff(ModContent.BuffType(), 2); + if (Type != ModContent.ProjectileType()) + return; + + if (Owner.dead) + ModdedOwner.StellarTorus = false; + if (ModdedOwner.StellarTorus) + Projectile.timeLeft = 2; + } + + public void DoAnimation() + { + Projectile.frameCounter++; + if (Projectile.frameCounter % (1 + (int)AnimationSpeed) == 0) + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; + } + + public void FollowPlayer() + { + // If the minion starts to get far, force the minion to go to you. + if (Projectile.WithinRange(Owner.Center, StellarTorusStaff.EnemyDetectionDistance) && !Projectile.WithinRange(Owner.Center, StellarTorusStaff.EnemyDetectionDistance / 4)) + { + Projectile.velocity = (Owner.Center - Projectile.Center) / 30f; + Projectile.netUpdate = true; + } + + // The minion will change directions to you if it's going away from you, meaning it'll just hover around you. + else if (!Projectile.WithinRange(Owner.Center, StellarTorusStaff.EnemyDetectionDistance / 8)) + { + Projectile.velocity = (Projectile.velocity * 37f + Projectile.SafeDirectionTo(Owner.Center) * 17f) / 40f; + Projectile.netUpdate = true; + } + + // Teleport to the owner if sufficiently far away. + if (!Projectile.WithinRange(Owner.Center, StellarTorusStaff.EnemyDetectionDistance)) + { + Projectile.Center = Owner.Center; + Projectile.velocity *= 0.3f; + Projectile.netUpdate = true; + } + } + + public void ShootLaser() + { + if (!HasShotLaser && Main.myPlayer == Projectile.owner) + { + int laser = Projectile.NewProjectile(Projectile.GetSource_FromThis(), + Projectile.Center, + Projectile.rotation.ToRotationVector2(), + ModContent.ProjectileType(), + Projectile.damage, + Projectile.knockBack, + Owner.whoAmI, + 0f, Projectile.whoAmI, Target.whoAmI); + + if (Main.projectile.IndexInRange(laser)) + Main.projectile[laser].originalDamage = Projectile.originalDamage; + + HasShotLaser = true; + Projectile.netUpdate = true; + } + } + + public void ResetTargettingVariables() + { + TimerToShoot = 0f; + LaserSwingDirection = 0; + RotationInterpolant = 0f; + DecidedSwingDirection = false; + HasReachedSwingRotationStart = false; + HasShotLaser = false; + Projectile.netUpdate = true; + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + + return false; + } + + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Summon/StellarTorusSummon.png b/Projectiles/Summon/StellarTorusSummon.png new file mode 100644 index 0000000000..19b3d223d4 Binary files /dev/null and b/Projectiles/Summon/StellarTorusSummon.png differ diff --git a/Projectiles/Summon/Umbrella/MagicHammer.cs b/Projectiles/Summon/Umbrella/MagicHammer.cs index 9d2841e9d1..2f450e6cae 100644 --- a/Projectiles/Summon/Umbrella/MagicHammer.cs +++ b/Projectiles/Summon/Umbrella/MagicHammer.cs @@ -263,7 +263,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella if ((Behavior == 3f || Behavior == 4f) && Main.rand.NextBool(20) && Projectile.soundDelay <= 0) { Rectangle location = new Rectangle((int)target.position.X, (int)target.position.Y, target.width, target.height); - CombatText.NewText(location, new Color(239, 113, 152), "Stylish!", true); + CombatText.NewText(location, new Color(239, 113, 152), CalamityUtils.GetTextValue("Misc.StylishHammerHit"), true); SoundEngine.PlaySound(StylishSound with { Volume = 0.35f }, target.Center); Projectile.soundDelay = 60; for (int i = 0; i < 5; i++) diff --git a/Projectiles/Typeless/AstralStar.cs b/Projectiles/Typeless/AstralStar.cs index 1ee99f4039..c5e20a5d17 100644 --- a/Projectiles/Typeless/AstralStar.cs +++ b/Projectiles/Typeless/AstralStar.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Typeless public class AstralStar : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Typeless"; - private int noTileHitCounter = 120; + private int noTileHitCounter = 90; public override void SetStaticDefaults() { @@ -38,59 +38,51 @@ namespace CalamityMod.Projectiles.Typeless CalamityUtils.HomeInOnNPC(Projectile, true, 300f, 12f, 20); if (Projectile.ai[0] == 2f) - { Projectile.DamageType = RogueDamageClass.Instance; - } - int randomToSubtract = Main.rand.Next(1, 3); - noTileHitCounter -= randomToSubtract; + + noTileHitCounter -= 1; if (noTileHitCounter == 0) - { Projectile.tileCollide = true; - } + if (Projectile.soundDelay == 0) { Projectile.soundDelay = 20 + Main.rand.Next(40); if (Main.rand.NextBool(5)) - { SoundEngine.PlaySound(SoundID.Item9, Projectile.position); - } } + Projectile.alpha -= 15; int num58 = 150; if (Projectile.Center.Y >= Projectile.ai[1]) - { num58 = 0; - } if (Projectile.alpha < num58) - { Projectile.alpha = num58; - } + Projectile.localAI[0] += (Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) * 0.01f * (float)Projectile.direction; Projectile.rotation += (Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) * 0.01f * (float)Projectile.direction; + if (Main.rand.NextBool(16)) { Vector2 value3 = Vector2.UnitX.RotatedByRandom(1.5707963705062866).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int num59 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1.2f); + int num59 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1f); Main.dust[num59].velocity = value3 * 0.66f; Main.dust[num59].position = Projectile.Center + value3 * 12f; } + if (Main.rand.NextBool(48) && Main.netMode != NetmodeID.Server) { int num60 = Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.Center, new Vector2(Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f), 16, 1f); Main.gore[num60].velocity *= 0.66f; Main.gore[num60].velocity += Projectile.velocity * 0.3f; } + if (Projectile.ai[1] == 1f) { Projectile.light = 0.9f; if (Main.rand.NextBool(10)) - { - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1.2f); - } + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f, 150, default, 1f); if (Main.rand.NextBool(20) && Main.netMode != NetmodeID.Server) - { Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.position, new Vector2(Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f); - } } } @@ -110,10 +102,13 @@ namespace CalamityMod.Projectiles.Typeless public override void Kill(int timeLeft) { + if (Projectile.ai[0] == 1f) + return; + Projectile.position.X = Projectile.position.X + (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y + (float)(Projectile.height / 2); - Projectile.width = 50; - Projectile.height = 50; + Projectile.width = 36; + Projectile.height = 36; Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); for (int num621 = 0; num621 < 5; num621++) @@ -137,9 +132,7 @@ namespace CalamityMod.Projectiles.Typeless if (Main.netMode != NetmodeID.Server) { for (int num480 = 0; num480 < 3; num480++) - { Gore.NewGore(Projectile.GetSource_Death(), Projectile.position, new Vector2(Projectile.velocity.X * 0.05f, Projectile.velocity.Y * 0.05f), Main.rand.Next(16, 18), 1f); - } } } diff --git a/Projectiles/Typeless/SandBall.cs b/Projectiles/Typeless/SandBall.cs index ff191aa52a..44fc8e37e4 100644 --- a/Projectiles/Typeless/SandBall.cs +++ b/Projectiles/Typeless/SandBall.cs @@ -82,6 +82,14 @@ namespace CalamityMod.Projectiles.Typeless } if (proj.velocity.Y > 10f) proj.velocity.Y = 10f; + + Point p = proj.Center.ToTileCoordinates(); + // Don't check out of bounds + if (p.X < 0 || p.X >= Main.maxTilesX || p.Y < 0 || p.Y >= Main.maxTilesY) + return; + Tile placer = Main.tile[p.X, p.Y + 1]; + if (placer.HasTile && TileID.Sets.Platforms[placer.TileType] && proj.ai[1] >= 60f) + proj.Kill(); } public static void SpawnSand(this Projectile proj, int SandBlockID, int SandItemID) diff --git a/Scenes/BossBackgroundScenes/LeviathanBackgroundScene.cs b/Scenes/BossBackgroundScenes/LeviathanBackgroundScene.cs index d69900317f..eb6a2bca2b 100644 --- a/Scenes/BossBackgroundScenes/LeviathanBackgroundScene.cs +++ b/Scenes/BossBackgroundScenes/LeviathanBackgroundScene.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Systems { public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; - public override bool IsSceneEffectActive(Player player) => NPC.AnyNPCs(ModContent.NPCType()); + public override bool IsSceneEffectActive(Player player) => Main.zenithWorld ? NPC.AnyNPCs(ModContent.NPCType()) : NPC.AnyNPCs(ModContent.NPCType()); public override void SpecialVisuals(Player player, bool isActive) { diff --git a/Skies/SCalSky.cs b/Skies/SCalSky.cs index 31e806b64a..e169e91341 100644 --- a/Skies/SCalSky.cs +++ b/Skies/SCalSky.cs @@ -126,13 +126,14 @@ namespace CalamityMod.Skies return Color.Transparent; NPC scal = Main.npc[CalamityGlobalNPC.SCal]; + bool cirrus = scal.ModNPC().cirrus; float lifeRatio = scal.life / (float)scal.lifeMax; if (lifeRatio > 0.5f) - return Color.Lerp(Color.Red, Color.Orange, Main.rand.NextFloat(0.8f)); + return Color.Lerp(cirrus ? Color.Pink : Color.Red, cirrus ? Color.Violet : Color.Orange, Main.rand.NextFloat(0.8f)); else if (lifeRatio > 0.3f) - return Color.Lerp(Color.DarkRed, Color.Lerp(Color.Blue, Color.DarkBlue, Main.rand.NextFloat() * 0.65f), 0.45f); + return Color.Lerp(cirrus ? Color.HotPink : Color.DarkRed, Color.Lerp(cirrus ? Color.Cyan : Color.Blue, cirrus ? Color.DarkCyan : Color.DarkBlue, Main.rand.NextFloat() * 0.65f), 0.45f); else if (lifeRatio > 0.01f) - return Color.Lerp(Color.Red, Color.Yellow, Main.rand.NextFloat(0.2f, 0.9f)); + return Color.Lerp(cirrus ? Color.Pink : Color.Red, cirrus ? Color.Green : Color.Yellow, Main.rand.NextFloat(0.2f, 0.9f)); else return Color.Gray; } @@ -213,6 +214,12 @@ namespace CalamityMod.Skies spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth * 2, Main.screenHeight * 2), Color.Black * intensity); } + Color cinderColor; + if (!Main.npc.IndexInRange(CalamityGlobalNPC.SCal) || Main.npc[CalamityGlobalNPC.SCal].type != ModContent.NPCType()) + cinderColor = Color.Red; + else + cinderColor = Main.npc[CalamityGlobalNPC.SCal].ModNPC().cirrus ? Color.Pink : Color.Red; + // Draw cinders. Texture2D cinderTexture = ModContent.Request("CalamityMod/Skies/CalamitasCinder").Value; for (int i = 0; i < Cinders.Count; i++) @@ -221,7 +228,7 @@ namespace CalamityMod.Skies for (int j = 0; j < 3; j++) { Vector2 offsetDrawPosition = drawPosition + (MathHelper.TwoPi * j / 3f).ToRotationVector2() * 1.4f; - Color offsetDrawColor = Color.Red * 0.56f; + Color offsetDrawColor = cinderColor * 0.56f; offsetDrawColor.A = 0; spriteBatch.Draw(cinderTexture, offsetDrawPosition, null, offsetDrawColor, 0f, cinderTexture.Size() * 0.5f, Cinders[i].Scale * 1.5f, SpriteEffects.None, 0f); } diff --git a/Sounds/Custom/GFB/LeonDeathNoiseRE4.ogg b/Sounds/Custom/GFB/LeonDeathNoiseRE4.ogg new file mode 100644 index 0000000000..c319d9d66b Binary files /dev/null and b/Sounds/Custom/GFB/LeonDeathNoiseRE4.ogg differ diff --git a/Sounds/Item/PwnagehammerHoming.ogg b/Sounds/Item/PwnagehammerHoming.ogg index 808b8619cf..e7025c3d4d 100644 Binary files a/Sounds/Item/PwnagehammerHoming.ogg and b/Sounds/Item/PwnagehammerHoming.ogg differ diff --git a/Sounds/Item/PwnagehammerSound.ogg b/Sounds/Item/PwnagehammerSound.ogg index d27268a073..bfb887649d 100644 Binary files a/Sounds/Item/PwnagehammerSound.ogg and b/Sounds/Item/PwnagehammerSound.ogg differ diff --git a/Sounds/Item/VividClarityBeamAppear.ogg b/Sounds/Item/VividClarityBeamAppear.ogg new file mode 100644 index 0000000000..4cc1eae2fc Binary files /dev/null and b/Sounds/Item/VividClarityBeamAppear.ogg differ diff --git a/Sounds/Item/VividClarityShoot.ogg b/Sounds/Item/VividClarityShoot.ogg new file mode 100644 index 0000000000..29632e78a7 Binary files /dev/null and b/Sounds/Item/VividClarityShoot.ogg differ diff --git a/Tiles/Abyss/AbyssAmbient/AbyssVent.cs b/Tiles/Abyss/AbyssAmbient/AbyssVent.cs index 2c268d0b93..1f6eef7c60 100644 --- a/Tiles/Abyss/AbyssAmbient/AbyssVent.cs +++ b/Tiles/Abyss/AbyssAmbient/AbyssVent.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient Main.tileNoAttach[Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); TileObjectData.addTile(Type); - AddMapEntry(new Color(106, 80, 102), CreateMapEntryName()); + AddMapEntry(new Color(106, 80, 102), CalamityUtils.GetText($"{LocalizationCategory}.AbyssVent.MapEntry")); DustType = 33; base.SetStaticDefaults(); diff --git a/Tiles/Abyss/AbyssAmbient/ThermalVent.cs b/Tiles/Abyss/AbyssAmbient/ThermalVent.cs index c2bc6dfe05..14e185ff67 100644 --- a/Tiles/Abyss/AbyssAmbient/ThermalVent.cs +++ b/Tiles/Abyss/AbyssAmbient/ThermalVent.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient TileObjectData.newTile.LavaDeath = true; TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); - AddMapEntry(new Color(132, 56, 42), CreateMapEntryName()); + AddMapEntry(new Color(132, 56, 42), CalamityUtils.GetText($"{LocalizationCategory}.ThermalVent.MapEntry")); DustType = 162; base.SetStaticDefaults(); diff --git a/Tiles/Abyss/SteamGeyser.cs b/Tiles/Abyss/SteamGeyser.cs index 0baf1704d0..994a68b8a8 100644 --- a/Tiles/Abyss/SteamGeyser.cs +++ b/Tiles/Abyss/SteamGeyser.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Tiles.Abyss TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); TileObjectData.addTile(Type); - AddMapEntry(new Color(103, 65, 64), CreateMapEntryName()); + AddMapEntry(new Color(103, 65, 64), CalamityUtils.GetText($"{LocalizationCategory}.SteamGeyser.MapEntry")); DustType = (int)CalamityDusts.SulfurousSeaAcid; base.SetStaticDefaults(); diff --git a/Tiles/DraedonSummoner/CodebreakerTile.cs b/Tiles/DraedonSummoner/CodebreakerTile.cs index be256d1fa0..b716315fae 100644 --- a/Tiles/DraedonSummoner/CodebreakerTile.cs +++ b/Tiles/DraedonSummoner/CodebreakerTile.cs @@ -133,7 +133,7 @@ namespace CalamityMod.Tiles.DraedonSummoner { // Create a warning if someone attempts to click on a codebreaker without a computer with which to open the UI. if (!codebreakerTileEntity.ContainsDecryptionComputer) - CombatText.NewText(player.Hitbox, Color.Cyan, "No decryption computer installed"); + CombatText.NewText(player.Hitbox, Color.Cyan, CalamityUtils.GetTextValue("Misc.NoComputer")); CodebreakerUI.ViewedTileEntityID = -1; SoundEngine.PlaySound(SoundID.MenuClose); diff --git a/Tiles/Furniture/CraftingStations/SCalAltar.cs b/Tiles/Furniture/CraftingStations/SCalAltar.cs index 33c2e44dd9..057d759ede 100644 --- a/Tiles/Furniture/CraftingStations/SCalAltar.cs +++ b/Tiles/Furniture/CraftingStations/SCalAltar.cs @@ -1,9 +1,11 @@ using CalamityMod.Events; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.CraftingStations; +using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Items.SummonItems; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.Projectiles.Boss; +using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -63,10 +65,19 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations public static void HoverItemIcon() { - if (Main.LocalPlayer.HasItem(ModContent.ItemType())) + bool vodka = Main.LocalPlayer.HeldItem.type == ModContent.ItemType() && Main.zenithWorld; + if (vodka) + { + Main.LocalPlayer.cursorItemIconID = ModContent.ItemType(); + } + else if (Main.LocalPlayer.HasItem(ModContent.ItemType())) + { Main.LocalPlayer.cursorItemIconID = ModContent.ItemType(); + } else + { Main.LocalPlayer.cursorItemIconID = ModContent.ItemType(); + } Main.LocalPlayer.noThrow = 2; Main.LocalPlayer.cursorItemIconEnabled = true; @@ -80,11 +91,13 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations int top = j - tile.TileFrameY / 18; if (!Main.LocalPlayer.HasItem(ModContent.ItemType()) && - !Main.LocalPlayer.HasItem(ModContent.ItemType())) + !Main.LocalPlayer.HasItem(ModContent.ItemType()) && !(Main.LocalPlayer.HeldItem.type == ModContent.ItemType() && Main.zenithWorld)) { return true; } + bool vodka = Main.LocalPlayer.HeldItem.type == ModContent.ItemType() && Main.zenithWorld; + if (NPC.AnyNPCs(ModContent.NPCType()) || BossRushEvent.BossRushActive) return true; @@ -97,10 +110,16 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations ritualSpawnPosition += new Vector2(-10f, -24f); SoundEngine.PlaySound(SummonSound, ritualSpawnPosition); - Projectile.NewProjectile(new EntitySource_WorldEvent(), ritualSpawnPosition, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + Projectile.NewProjectile(new EntitySource_WorldEvent(), ritualSpawnPosition, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0, vodka.ToInt()); - if (!usingSpecialItem) + if (vodka) + { + Main.LocalPlayer.ConsumeItem(ModContent.ItemType(), true); + } + else if (!usingSpecialItem) + { Main.LocalPlayer.ConsumeItem(ModContent.ItemType(), true); + } return true; } } diff --git a/Tiles/MonsterBanner.png b/Tiles/MonsterBanner.png index 12ef143dbd..d3d73ba7c7 100644 Binary files a/Tiles/MonsterBanner.png and b/Tiles/MonsterBanner.png differ diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 2875e31158..f64b4ae6ed 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -1472,7 +1472,7 @@ namespace CalamityMod r = Recipe.Create(ItemID.SandstorminaBottle); r.AddIngredient(ItemID.Bottle); r.AddIngredient(ItemID.SandBlock, 70); - r.AddIngredient(ModContent.ItemType(), 10); + r.AddIngredient(ItemID.AntlionMandible, 5); r.AddIngredient(ItemID.Feather, 3); r.AddTile(TileID.Anvils); r.Register(); @@ -1486,7 +1486,7 @@ namespace CalamityMod // Flying Carpet r = Recipe.Create(ItemID.FlyingCarpet); r.AddIngredient(ItemID.Silk, 10); - r.AddIngredient(ModContent.ItemType(), 3); + r.AddIngredient(ItemID.AntlionMandible, 2); r.AddIngredient(ModContent.ItemType(), 5); r.AddTile(TileID.Anvils); r.Register().DisableDecraft(); diff --git a/Utilities/FurnitureSetupUtils.cs b/Utilities/FurnitureSetupUtils.cs index 5cd81bc636..16ff5ce0a5 100644 --- a/Utilities/FurnitureSetupUtils.cs +++ b/Utilities/FurnitureSetupUtils.cs @@ -1145,6 +1145,7 @@ namespace CalamityMod /// Whether this tile is supposed to have a solid top. Defaults to true. internal static void SetUpPiano(this ModTile mt, bool lavaImmune = false, bool solidTop = true) { + Main.tileTable[mt.Type] = solidTop; Main.tileSolidTop[mt.Type] = solidTop; Main.tileLighted[mt.Type] = true; Main.tileFrameImportant[mt.Type] = true; diff --git a/Utilities/ItemUtils.cs b/Utilities/ItemUtils.cs index e5a557fbaf..1b1b5c7cde 100644 --- a/Utilities/ItemUtils.cs +++ b/Utilities/ItemUtils.cs @@ -294,6 +294,34 @@ namespace CalamityMod } } + /// + /// Shortcut for finding a specific string in the tooltip and replacing it with a new string
+ /// Typically used for dynamic tooltip updating. Consider overriding Tooltip or using String.Format for applying constants. + ///
+ /// The tooltip list provided to a ModifyTooltips TML hook. + /// The key to be replaced. + /// The new key. + public static void FindAndReplace(this List tooltips, string replacedKey, string newKey) + { + TooltipLine line = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Text.Contains(replacedKey)); + if (line != null) + line.Text = line.Text.Replace(replacedKey, newKey); + } + + /// + /// Shortcut for automatically placing one keybind within a tooltip. Requires the "[KEY]" string to be replaced. + /// + /// The tooltip list provided to a ModifyTooltips TML hook. + /// The ModKeybind to integrate into the tooltip. + public static void IntegrateHotkey(this List tooltips, ModKeybind mhk) + { + if (Main.dedServ || mhk is null) + return; + + string finalKey = mhk.TooltipHotkeyString(); + tooltips.FindAndReplace("[KEY]", finalKey); + } + // Original code lifted from Iban's extended armor tooltips. /// /// Performs standard edits to a list of tooltip lines to add more if the Left SHIFT key is held down.
diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 440d9f1fcc..db7e300e44 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -122,6 +122,7 @@ namespace CalamityMod { NPCID.Plantera, new Tuple(false, new int[] { BuffID.Venom }) }, { NPCID.PlanterasTentacle, new Tuple(false, new int[] { BuffID.Venom }) }, + { ModContent.NPCType(), new Tuple(false, new int[] { BuffID.Venom }) }, { NPCID.HallowBoss, new Tuple(false, CalamityMod.holyEnemyImmunities) },