diff --git a/Buffs/DamageOverTime/VulnerabilityHex.cs b/Buffs/DamageOverTime/VulnerabilityHex.cs index 493bfdc6c2..cf7e065837 100644 --- a/Buffs/DamageOverTime/VulnerabilityHex.cs +++ b/Buffs/DamageOverTime/VulnerabilityHex.cs @@ -11,6 +11,9 @@ namespace CalamityMod.Buffs.DamageOverTime // This is the exact DPS dealt by Vulnerability Hex to NPCs. public const int DPS = TickNumber * 5; // 3330 DPS + + public const int CalamityDuration = 24; + public const int AflameDuration = 120; public override void SetDefaults() { @@ -27,10 +30,20 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - if (npc.Calamity().vulnerabilityHex < npc.buffTime[buffIndex]) - npc.Calamity().vulnerabilityHex = npc.buffTime[buffIndex]; - if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().vulnerabilityHex; + CalamityGlobalNPC cgn = npc.Calamity(); + if (cgn.vulnerabilityHex < npc.buffTime[buffIndex]) + { + cgn.vulnerabilityHex = npc.buffTime[buffIndex]; + // Set the remaining time of the fire drawer to be exactly right. + if (cgn.VulnerabilityHexFireDrawer != null) + cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + cgn.vulnerabilityHex; + } + + // Apply immunity timer. + if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0) + cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.vulnerabilityHex; + + // Destroy the vanilla buff, we don't use it. npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatBuffs/RageMode.cs b/Buffs/StatBuffs/RageMode.cs index 9c2a245ac4..3aac5ffebd 100644 --- a/Buffs/StatBuffs/RageMode.cs +++ b/Buffs/StatBuffs/RageMode.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Buffs.StatBuffs // Otherwise, Rage Mode ends instantly. else { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/RageEnd"), player.position); player.DelBuff(buffIndex--); // TML documentation requires you to decrement buffIndex if deleting the buff during Update. mp.rageModeActive = false; mp.rage = 0f; diff --git a/Buffs/Summon/SepulcherMinionBuff.png b/Buffs/Summon/SepulcherMinionBuff.png index 5eeae4fa2b..fafd662242 100644 Binary files a/Buffs/Summon/SepulcherMinionBuff.png and b/Buffs/Summon/SepulcherMinionBuff.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index d7273b0e05..6d8bc74bc4 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1208,7 +1208,13 @@ namespace CalamityMod.CalPlayer boost.AddWithCondition("GivenBrimstoneLocus", GivenBrimstoneLocus); // Calculate the new total time of all sessions at the instant of this player save. - TimeSpan newSessionTotal = previousSessionTotal.Add(CalamityMod.SpeedrunTimer.Elapsed); + TimeSpan newSessionTotal; + long totalTicks = 0L; + if (previousSessionTotal != null) + { + newSessionTotal = previousSessionTotal.Add(CalamityMod.SpeedrunTimer.Elapsed); + totalTicks = newSessionTotal.Ticks; + } return new TagCompound { @@ -1237,7 +1243,7 @@ namespace CalamityMod.CalPlayer { "moveSpeedStat", moveSpeedStat }, { "defenseDamage", defenseDamage }, { "disableAllDodges", disableAllDodges }, - { "totalSpeedrunTicks", newSessionTotal.Ticks }, + { "totalSpeedrunTicks", totalTicks }, { "lastSplitType", lastSplitType }, { "lastSplitTicks", lastSplit.Ticks }, }; @@ -3153,8 +3159,8 @@ namespace CalamityMod.CalPlayer // Rage duration isn't calculated here because the buff keeps itself alive automatically as long as the player has Rage left. player.AddBuff(ModContent.BuffType(), 2); - // Moon Lord deathray sound. Should probably be replaced some day - Main.PlaySound(SoundID.Zombie, (int)player.position.X, (int)player.position.Y, 104); + // Play Rage Activation sound + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/RageActivate"), player.position); // TODO -- improve Rage activation visuals for (int num502 = 0; num502 < 64; num502++) @@ -3184,8 +3190,8 @@ namespace CalamityMod.CalPlayer { player.AddBuff(ModContent.BuffType(), AdrenalineDuration); - // Moon Lord deathray sound. Should probably be replaced some day - Main.PlaySound(SoundID.Zombie, (int)player.position.X, (int)player.position.Y, 104); + // Play Adrenaline Activation sound + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AdrenalineActivate"), player.position); // TODO -- improve Adrenaline activation visuals for (int num502 = 0; num502 < 64; num502++) @@ -4816,7 +4822,7 @@ namespace CalamityMod.CalPlayer witheringDamageDone += (int)(damage * (crit ? 2D : 1D)); if (flamingItemEnchant) - target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), VulnerabilityHex.AflameDuration); switch (item.type) { @@ -7064,8 +7070,11 @@ namespace CalamityMod.CalPlayer bool falling = player.gravDir == -1 ? player.velocity.Y < 0.05f : player.velocity.Y > 0.05f; if (player.controlJump && falling) { - player.velocity.Y *= 0.9f; - player.wingFrame = 3; + if (!player.mount.Active) + { + player.velocity.Y *= 0.9f; + player.wingFrame = 3; + } player.noFallDmg = true; player.fallStart = (int)(player.position.Y / 16f); } @@ -10523,9 +10532,8 @@ namespace CalamityMod.CalPlayer // Enabling the config while a player is loaded will show the timer immediately. // But it won't start running until you save and quit and re-enter a world. - CalamityMod.SpeedrunTimer = new Stopwatch(); if (CalamityConfig.Instance.SpeedrunTimer) - CalamityMod.SpeedrunTimer.Start(); + CalamityMod.SpeedrunTimer.Restart(); } /// diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c6c8f1b967..879617fc87 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -150,9 +150,12 @@ namespace CalamityMod.CalPlayer } } - // After everything, reset ranged crit if necessary. + // After everything else, if Daawnlight Spirit Origin is equipped, set ranged crit to the base 4%. + // Store all the crit so it can be used in damage calculations. if (modPlayer.spiritOrigin) { + // player.rangedCrit already contains the crit stat of the held item, no need to grab it separately. + // Don't store the base 4% because you're not removing it. modPlayer.spiritOriginConvertedCrit = player.rangedCrit - 4; player.rangedCrit = 4; } @@ -442,7 +445,7 @@ namespace CalamityMod.CalPlayer Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ModContent.ProjectileType(), sigilDamage, 0f, player.whoAmI, i); // Incinerate the target with Vulnerability Hex. - target.AddBuff(ModContent.BuffType(), 20); + target.AddBuff(ModContent.BuffType(), VulnerabilityHex.CalamityDuration); // Make some fancy dust to indicate damage is being done. for (int j = 0; j < 12; j++) diff --git a/CalamityMod.cs b/CalamityMod.cs index db9301bb9c..4ef70ff73d 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -119,7 +119,7 @@ namespace CalamityMod public const int lifeStealCap = 10; // Speedrun timer - internal static Stopwatch SpeedrunTimer = null; + internal static Stopwatch SpeedrunTimer = new Stopwatch(); // Debuff immunities, these are used in the NPCDebuffs file public static int[] slimeEnemyImmunities = new int[1] { BuffID.Poisoned }; @@ -983,6 +983,13 @@ namespace CalamityMod return true; }, InterfaceScaleType.None)); + // Enchantment meters + layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Enchantment Meters", () => + { + EnchantmentMetersUI.Draw(Main.spriteBatch, Main.LocalPlayer); + return true; + }, InterfaceScaleType.None)); + // Calamitas Enchantment UI layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Calamitas Enchantment", () => { diff --git a/ExtraTextures/UI/AdrenalineBar.png b/ExtraTextures/UI/AdrenalineBar.png index 876465e609..5b4ab74a72 100644 Binary files a/ExtraTextures/UI/AdrenalineBar.png and b/ExtraTextures/UI/AdrenalineBar.png differ diff --git a/ExtraTextures/UI/AdrenalineBarBorder.png b/ExtraTextures/UI/AdrenalineBarBorder.png index 4c6aa5cfd4..86c2adea06 100644 Binary files a/ExtraTextures/UI/AdrenalineBarBorder.png and b/ExtraTextures/UI/AdrenalineBarBorder.png differ diff --git a/ExtraTextures/UI/AdrenalineBarBorderFull.png b/ExtraTextures/UI/AdrenalineBarBorderFull.png new file mode 100644 index 0000000000..d02d5c5dc2 Binary files /dev/null and b/ExtraTextures/UI/AdrenalineBarBorderFull.png differ diff --git a/ExtraTextures/UI/AdrenalineFullAnimation.png b/ExtraTextures/UI/AdrenalineFullAnimation.png index 85255a0028..d1e14daf39 100644 Binary files a/ExtraTextures/UI/AdrenalineFullAnimation.png and b/ExtraTextures/UI/AdrenalineFullAnimation.png differ diff --git a/ExtraTextures/UI/EphemeralBar.png b/ExtraTextures/UI/EphemeralBar.png new file mode 100644 index 0000000000..b8d84ab1e7 Binary files /dev/null and b/ExtraTextures/UI/EphemeralBar.png differ diff --git a/ExtraTextures/UI/EphemeralBarBorder.png b/ExtraTextures/UI/EphemeralBarBorder.png new file mode 100644 index 0000000000..3fa5e557dd Binary files /dev/null and b/ExtraTextures/UI/EphemeralBarBorder.png differ diff --git a/ExtraTextures/UI/RageBar.png b/ExtraTextures/UI/RageBar.png index 7587abeb27..758149b99b 100644 Binary files a/ExtraTextures/UI/RageBar.png and b/ExtraTextures/UI/RageBar.png differ diff --git a/ExtraTextures/UI/RageBarBorder.png b/ExtraTextures/UI/RageBarBorder.png index 2960594a62..21d6f7a986 100644 Binary files a/ExtraTextures/UI/RageBarBorder.png and b/ExtraTextures/UI/RageBarBorder.png differ diff --git a/ExtraTextures/UI/RageFullAnimation.png b/ExtraTextures/UI/RageFullAnimation.png index 894b8403cc..cd6f66daac 100644 Binary files a/ExtraTextures/UI/RageFullAnimation.png and b/ExtraTextures/UI/RageFullAnimation.png differ diff --git a/Items/Accessories/DaawnlightSpiritOrigin.cs b/Items/Accessories/DaawnlightSpiritOrigin.cs index 42afa3a510..d13926caf2 100644 --- a/Items/Accessories/DaawnlightSpiritOrigin.cs +++ b/Items/Accessories/DaawnlightSpiritOrigin.cs @@ -21,6 +21,10 @@ namespace CalamityMod.Items.Accessories private const float MaxSlowBonusUseTime = 72f; private const float MaxSlowWeaponBonus = 0.33f; // Up to +33% more damage to crits for slower weapons. + // These were very carefully calculated, please don't change them. + internal const float RegularEnemyBullseyeRadius = 8f; + internal const float BossBullseyeRadius = 18f; + internal static float GetDamageMultiplier(Player p, CalamityPlayer mp, bool hitBullseye) { float baseCritMult = 2f; // In vanilla Terraria, crits do +100% damage. diff --git a/Items/Accessories/GiantShell.cs b/Items/Accessories/GiantShell.cs index 6fa7e98690..0360c6a50c 100644 --- a/Items/Accessories/GiantShell.cs +++ b/Items/Accessories/GiantShell.cs @@ -5,6 +5,7 @@ using Terraria.ID; namespace CalamityMod.Items.Accessories { + [AutoloadEquip(EquipType.Back)] public class GiantShell : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/GiantShell_Back.png b/Items/Accessories/GiantShell_Back.png new file mode 100644 index 0000000000..5398592a12 Binary files /dev/null and b/Items/Accessories/GiantShell_Back.png differ diff --git a/Items/Accessories/SamuraiBadge.cs b/Items/Accessories/SamuraiBadge.cs index 2fa867eade..6afa2e4658 100644 --- a/Items/Accessories/SamuraiBadge.cs +++ b/Items/Accessories/SamuraiBadge.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { + [AutoloadEquip(EquipType.Balloon)] public class SamuraiBadge : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/SamuraiBadge_Balloon.png b/Items/Accessories/SamuraiBadge_Balloon.png new file mode 100644 index 0000000000..3b294f9394 Binary files /dev/null and b/Items/Accessories/SamuraiBadge_Balloon.png differ diff --git a/Items/Placeables/Furniture/CraftingStations/StaticRefiner.png b/Items/Placeables/Furniture/CraftingStations/StaticRefiner.png index 4d7e82cc00..c285167fc0 100644 Binary files a/Items/Placeables/Furniture/CraftingStations/StaticRefiner.png and b/Items/Placeables/Furniture/CraftingStations/StaticRefiner.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelBath.png b/Items/Placeables/FurnitureStatigel/StatigelBath.png index bdc5ea4b9b..bc41c82524 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelBath.png and b/Items/Placeables/FurnitureStatigel/StatigelBath.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelBed.png b/Items/Placeables/FurnitureStatigel/StatigelBed.png index 48370915a4..51201d89d2 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelBed.png and b/Items/Placeables/FurnitureStatigel/StatigelBed.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelBookcase.png b/Items/Placeables/FurnitureStatigel/StatigelBookcase.png index b8837ea8c7..0a34cb1170 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelBookcase.png and b/Items/Placeables/FurnitureStatigel/StatigelBookcase.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelCandelabra.png b/Items/Placeables/FurnitureStatigel/StatigelCandelabra.png index b895c5f96a..bbbeba65a0 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelCandelabra.png and b/Items/Placeables/FurnitureStatigel/StatigelCandelabra.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelCandle.png b/Items/Placeables/FurnitureStatigel/StatigelCandle.png index ce32043c36..6ed4dec060 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelCandle.png and b/Items/Placeables/FurnitureStatigel/StatigelCandle.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelChair.png b/Items/Placeables/FurnitureStatigel/StatigelChair.png index 6be1038cd2..a72729c207 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelChair.png and b/Items/Placeables/FurnitureStatigel/StatigelChair.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelChandelier.png b/Items/Placeables/FurnitureStatigel/StatigelChandelier.png index c83bf0544a..64777af5eb 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelChandelier.png and b/Items/Placeables/FurnitureStatigel/StatigelChandelier.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelChest.png b/Items/Placeables/FurnitureStatigel/StatigelChest.png index a54eec82ba..58ce7f00a4 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelChest.png and b/Items/Placeables/FurnitureStatigel/StatigelChest.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelClock.cs b/Items/Placeables/FurnitureStatigel/StatigelClock.cs index 5f989b5f7c..8915eeb183 100644 --- a/Items/Placeables/FurnitureStatigel/StatigelClock.cs +++ b/Items/Placeables/FurnitureStatigel/StatigelClock.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Items.Placeables.FurnitureStatigel public override void SetDefaults() { - item.width = 26; - item.height = 22; + item.width = 18; + item.height = 46; item.maxStack = 99; item.useTurn = true; item.autoReuse = true; diff --git a/Items/Placeables/FurnitureStatigel/StatigelClock.png b/Items/Placeables/FurnitureStatigel/StatigelClock.png index 8ac2c4e253..4931c7d88c 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelClock.png and b/Items/Placeables/FurnitureStatigel/StatigelClock.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelDoor.png b/Items/Placeables/FurnitureStatigel/StatigelDoor.png index 96cbbabe23..b00b5f9a12 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelDoor.png and b/Items/Placeables/FurnitureStatigel/StatigelDoor.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelDresser.png b/Items/Placeables/FurnitureStatigel/StatigelDresser.png index 68159bf502..fb597a9220 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelDresser.png and b/Items/Placeables/FurnitureStatigel/StatigelDresser.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelLamp.png b/Items/Placeables/FurnitureStatigel/StatigelLamp.png index 6c1f78be7d..dcafd403cb 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelLamp.png and b/Items/Placeables/FurnitureStatigel/StatigelLamp.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelLantern.png b/Items/Placeables/FurnitureStatigel/StatigelLantern.png index 6eca920694..ea7e0e171f 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelLantern.png and b/Items/Placeables/FurnitureStatigel/StatigelLantern.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelPiano.png b/Items/Placeables/FurnitureStatigel/StatigelPiano.png index 3ae9122d37..56cbe935a3 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelPiano.png and b/Items/Placeables/FurnitureStatigel/StatigelPiano.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelPlatform.png b/Items/Placeables/FurnitureStatigel/StatigelPlatform.png index 6f17f78e08..b9d762d6c7 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelPlatform.png and b/Items/Placeables/FurnitureStatigel/StatigelPlatform.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelSink.png b/Items/Placeables/FurnitureStatigel/StatigelSink.png index dc0aef798d..8216a6f87f 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelSink.png and b/Items/Placeables/FurnitureStatigel/StatigelSink.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelSofa.png b/Items/Placeables/FurnitureStatigel/StatigelSofa.png index 85d2e07d00..db22ab53c9 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelSofa.png and b/Items/Placeables/FurnitureStatigel/StatigelSofa.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelTable.png b/Items/Placeables/FurnitureStatigel/StatigelTable.png index e12c16472f..cac9c0384f 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelTable.png and b/Items/Placeables/FurnitureStatigel/StatigelTable.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelWorkbench.png b/Items/Placeables/FurnitureStatigel/StatigelWorkbench.png index 7570010fab..3c65d5e29b 100644 Binary files a/Items/Placeables/FurnitureStatigel/StatigelWorkbench.png and b/Items/Placeables/FurnitureStatigel/StatigelWorkbench.png differ diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 5ad79941d5..0b3976a8f8 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -24,11 +24,11 @@ namespace CalamityMod.Items.Weapons.Magic item.width = 112; item.height = 112; item.magic = true; - item.damage = 2838; + item.damage = 2727; item.knockBack = 9.5f; item.mana = 26; - item.useAnimation = 37; - item.useTime = 37; + item.useAnimation = 40; + item.useTime = 40; item.autoReuse = true; item.noMelee = true; diff --git a/Items/Weapons/Magic/T1000.cs b/Items/Weapons/Magic/T1000.cs index 516320beff..9b75fcc018 100644 --- a/Items/Weapons/Magic/T1000.cs +++ b/Items/Weapons/Magic/T1000.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 171; + item.damage = 247; item.magic = true; item.mana = 8; item.width = 94; diff --git a/Items/Weapons/Summon/CindersOfLament.cs b/Items/Weapons/Summon/CindersOfLament.cs index f59aa46c9a..55b1f1e203 100644 --- a/Items/Weapons/Summon/CindersOfLament.cs +++ b/Items/Weapons/Summon/CindersOfLament.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Summon item.mana = 10; item.damage = 1666; item.useStyle = ItemUseStyleID.SwingThrow; - item.width = 58; - item.height = 64; + item.width = 86; + item.height = 92; item.useTime = item.useAnimation = 30; // 29 because of useStyle 1 item.autoReuse = true; item.noMelee = true; diff --git a/Items/Weapons/Summon/CindersOfLament.png b/Items/Weapons/Summon/CindersOfLament.png index 96d3b0caf3..7f3e9466ad 100644 Binary files a/Items/Weapons/Summon/CindersOfLament.png and b/Items/Weapons/Summon/CindersOfLament.png differ diff --git a/Items/Weapons/Summon/Metastasis.cs b/Items/Weapons/Summon/Metastasis.cs index a589d739f2..08fdd78d02 100644 --- a/Items/Weapons/Summon/Metastasis.cs +++ b/Items/Weapons/Summon/Metastasis.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Summon { item.damage = 666; item.mana = 10; - item.width = 58; - item.height = 58; + item.width = 66; + item.height = 78; item.useTime = item.useAnimation = 10; // 9 because of useStyle 1 item.useStyle = ItemUseStyleID.SwingThrow; item.noMelee = true; diff --git a/Items/Weapons/Summon/Metastasis.png b/Items/Weapons/Summon/Metastasis.png index ffcc7066c0..e4e807326d 100644 Binary files a/Items/Weapons/Summon/Metastasis.png and b/Items/Weapons/Summon/Metastasis.png differ diff --git a/Items/Weapons/Summon/PrototypeAndromechaRing.cs b/Items/Weapons/Summon/PrototypeAndromechaRing.cs index 7a525aa51b..fd418e71dd 100644 --- a/Items/Weapons/Summon/PrototypeAndromechaRing.cs +++ b/Items/Weapons/Summon/PrototypeAndromechaRing.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Items.Weapons.Summon { player.Calamity().andromedaCripple = CrippleTime; player.AddBuff(ModContent.BuffType(), player.Calamity().andromedaCripple); - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AdrenalineBurnout1"), position); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AndromedaCripple"), position); } return false; } diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 41713e15ed..3fa219f077 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -256,7 +256,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("DesertScourge", out float order); List segments = new List() { NPCType(), NPCType(), NPCType() }; int summon = ItemType(); - List loot = new List() { ItemType(), ItemID.SandBlock, ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List loot = new List() { ItemType(), ItemID.SandBlock, ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}] in the Desert Biome"; string despawn = CalamityUtils.ColorMessage("The scourge of the desert delved back into the sand.", new Color(0xEE, 0xE8, 0xAA)); @@ -279,7 +279,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Crabulon", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemID.GlowingMushroom, ItemID.MushroomGrassSeeds, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List loot = new List() { ItemType(), ItemID.GlowingMushroom, ItemID.MushroomGrassSeeds, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}] in the Mushroom Biome"; string despawn = CalamityUtils.ColorMessage("The mycleium crab has lost interest.", new Color(0x64, 0x95, 0xED)); @@ -291,7 +291,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("HiveMind", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemID.DemoniteBar, ItemID.RottenChunk, ItemID.CursedFlame, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemID.DemoniteBar, ItemID.RottenChunk, ItemID.CursedFlame, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Kill a Cyst in the Corruption or use a [i:{summon}] in the Corruption"; string despawn = CalamityUtils.ColorMessage("The corrupted colony began searching for a new breeding ground.", new Color(0x94, 0x00, 0xD3)); @@ -303,7 +303,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Perforators", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemID.CrimtaneBar, ItemID.Vertebrae, ItemID.Ichor, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemID.CrimtaneBar, ItemID.Vertebrae, ItemID.Ichor, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Kill a Cyst in the Crimson or use a [i:{summon}] in the Crimson"; string despawn = CalamityUtils.ColorMessage("The parasitic hive began searching for a new host.", new Color(0xDC, 0x14, 0x3C)); @@ -327,7 +327,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Cryogen", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemID.FrostCore, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}] in the Snow Biome"; string despawn = CalamityUtils.ColorMessage("Cryogen drifts away, carried on a freezing wind.", new Color(0x00, 0xFF, 0xFF)); @@ -340,7 +340,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("AquaticScourge", out float order); List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; List collection = new List() { 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 Aquatic Scourge swam back into the open ocean.", new Color(0xF0, 0xE6, 0x8C)); @@ -353,7 +353,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("BrimstoneElemental", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}] in the Brimstone Crag"; string despawn = CalamityUtils.ColorMessage("Brimstone Elemental withdraws to the ruins of her shrine.", new Color(0xDC, 0x14, 0x3C)); @@ -365,7 +365,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Calamitas", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.BrokenHeroSword, ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.BrokenHeroSword, ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Use an [i:{summon}] at Night"; string despawn = CalamityUtils.ColorMessage("If you wanted a fight, you should've came more prepared.", new Color(0xFF, 0xA5, 0x00)); @@ -427,7 +427,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Ravager", out float order); List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType() }; int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}]"; string despawn = CalamityUtils.ColorMessage("The automaton of misshapen victims went looking for the true perpetrator.", new Color(0xB2, 0x22, 0x22)); @@ -443,7 +443,7 @@ namespace CalamityMod int summon2 = ItemType(); int altar = ItemType(); List summons = new List() { summon1, summon2 }; - List loot = new List() { ItemType(), ItemType(), ItemID.FallenStar, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemID.FallenStar, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemID.GreaterHealingPotion }; List collection = new List() { 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)); @@ -531,7 +531,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Polterghast", out float order); List bosses = new List() { NPCType(), NPCType() }; int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Kill 30 phantom spirits or use a [i:{summon}] in the Dungeon"; string despawn = CalamityUtils.ColorMessage("The volatile spirits disperse throughout the depths of the dungeon.", new Color(0xB0, 0xE0, 0xE6)); @@ -543,7 +543,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("OldDuke", out float order); List bosses = new List() { NPCType() }; int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { 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 disappears amidst the acidic downpour.", new Color(0xF0, 0xE6, 0x8C)); @@ -597,7 +597,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("SupremeCalamitas", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Use an [i:{summon}]"; string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00)); @@ -609,7 +609,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("AdultEidolonWyrm", out float order); int type = NPCType(); int summon = ItemID.RodofDiscord; - List loot = new List() { ItemType(), ItemType(), ItemID.Ectoplasm, ItemType(), ItemType(), ItemType() }; + List loot = new List() { ItemType(), ItemType(), ItemID.Ectoplasm, ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { }; string instructions = $"While in the Abyss, use an item that inflicts Chaos State"; string despawn = CalamityUtils.ColorMessage("...", new Color(0x7F, 0xFF, 0xD4)); @@ -692,7 +692,7 @@ namespace CalamityMod // Queen Bee AddLoot(bossChecklist, "QueenBee", - new List() { ItemType(), ItemID.Stinger }, + new List() { ItemType(), ItemID.Stinger, ItemType() }, new List() { ItemType() } ); @@ -704,13 +704,13 @@ namespace CalamityMod // Wall of Flesh AddLoot(bossChecklist, "WallofFlesh", - new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey }, + new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey }, new List() { ItemType(), ItemType(), ItemType() } ); // The Twins AddLoot(bossChecklist, "TheTwins", - null, + new List() { ItemType() }, new List() { ItemType(), ItemType() } ); @@ -722,20 +722,20 @@ namespace CalamityMod // Skeletron Prime AddLoot(bossChecklist, "SkeletronPrime", - null, + new List() { ItemType(), ItemType() }, new List() { ItemType(), ItemType() } ); // Plantera AddLoot(bossChecklist, "Plantera", - new List() { ItemType(), ItemType(), ItemType(), ItemID.JungleKey }, + new List() { ItemType(), ItemType(), ItemType(), ItemID.JungleKey, ItemType() }, new List() { ItemType() } ); AddSummons(bossChecklist, "Plantera", new List() { ItemType() }); // Golem AddLoot(bossChecklist, "Golem", - new List() { ItemType(), ItemType() }, + new List() { ItemType(), ItemType(), ItemType() }, new List() { ItemType() } ); AddSummons(bossChecklist, "Golem", new List() { ItemType() }); @@ -749,12 +749,12 @@ namespace CalamityMod // Betsy AddLoot(bossChecklist, "DD2Betsy", null, - new List() { ItemType() } + null ); // Lunatic Cultist AddLoot(bossChecklist, "CultistBoss", - new List() { ItemType(), ItemType() }, + new List() { ItemType(), ItemType() }, new List() { ItemType(), ItemType() } ); AddSummons(bossChecklist, "CultistBoss", new List() { ItemType() }); @@ -770,7 +770,7 @@ namespace CalamityMod { // Blood Moon AddLoot(bossChecklist, "Blood Moon", - new List() { ItemType(), ItemType(), ItemType() }, + new List() { ItemType(), ItemType() }, null ); AddSummons(bossChecklist, "Blood Moon", new List() { ItemType() }); @@ -783,7 +783,7 @@ namespace CalamityMod // Pirates AddLoot(bossChecklist, "Pirate Invasion", - new List() { ItemType(), ItemType(), ItemType() }, + new List() { ItemType(), ItemType() }, null ); @@ -825,7 +825,7 @@ namespace CalamityMod // Lunar Events AddLoot(bossChecklist, "Lunar Event", - new List() { ItemType(), ItemType() }, + new List() { ItemType() }, null ); } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 454a788854..9fa1177e91 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3411,8 +3411,12 @@ namespace CalamityMod.NPCs if (Main.projectile[i].type != bullseyeType || !Main.projectile[i].active || Main.projectile[i].owner != player.whoAmI) continue; - bullseye = Main.projectile[i]; - break; + // Only choose a bullseye if it is attached to the NPC that is being hit. + if (npc.whoAmI == (int)Main.projectile[i].ai[0]) + { + bullseye = Main.projectile[i]; + break; + } } // Don't allow large hitbox projectiles or explosions to "snipe" enemies. @@ -3421,37 +3425,33 @@ namespace CalamityMod.NPCs { if (bullseye != null) { - // Bullseyes are visually larger on bosses, so account for that. - float baseBullseyeRadius = npc.IsABoss() ? 116f : 54f; - bool hasCollidedWithBullseye; + // Bullseyes are visually different on bosses and thus have larger hitboxes. + float bullseyeRadius = npc.IsABoss() ? DaawnlightSpiritOrigin.BossBullseyeRadius : DaawnlightSpiritOrigin.RegularEnemyBullseyeRadius; - // Custom math to determine if a direction would hit a target if the hitbox would not delete the projectile before it can. - // This can be visualized as using the NPC center as an anchor point, determining the direction to the bullseye from that anchor point, - // calculating the maximum amount of angular error there can be before a hit would not happen, and checking if the projectile's direction - // to the bullseye is within that margin of error. - if (projectile.penetrate <= 1 && projectile.penetrate != -1) - { - // Directions to the bullseye relative to the NPC's center and the projectile that hit the NPC. - Vector2 directionToBullseye = projectile.SafeDirectionTo(bullseye.Center, Vector2.UnitY); - Vector2 bullseyeCenterOffsetDirection = npc.SafeDirectionTo(bullseye.Center); + // Do some geometry + trig to determine if the projectile WOULD hit the bullseye, even if it's about to be deleted on-hit. + // This is the equivalent of drawing a laser sight from the projectile along its velocity vector and seeing if it crosses the bullseye's hitbox. + // To do this more reliably, we back the projectile up quite a distance. + Vector2 normVelocity = projectile.velocity.SafeNormalize(Vector2.UnitY); + Vector2 backedUpPosition = projectile.Center - 160f * normVelocity; + Vector2 directionToBullseyeCenter = (bullseye.Center - backedUpPosition).SafeNormalize(Vector2.UnitY); + Vector2 perp = directionToBullseyeCenter.RotatedBy(MathHelper.PiOver2); + // Double the radius is given so that the cosine break-even point is right at the edge of the hitbox. + Vector2 comparisonPointOne = bullseye.Center + perp * 2f * bullseyeRadius; + Vector2 comparisonPointTwo = bullseye.Center - perp * 2f * bullseyeRadius; + Vector2 dirToPointOne = (comparisonPointOne - backedUpPosition).SafeNormalize(-Vector2.UnitX); + Vector2 dirToPointTwo = (comparisonPointTwo - backedUpPosition).SafeNormalize(Vector2.UnitX); - // Use SOH-CAH-TOA to compute the angle which is needed to reach the edge of the bullseye from the center of the NPC. - // The length of the hypotenuse is the distance from the center of the NPC to the bullseye while the opposite side length is - // the circular hitbox radius of the bullseye. These are sufficient to calculate the angular margin of error. - // If an NPC has a tiny hitbox the arcsine will fail and return NaN, meaning any hit at all will cause a bullseye to be hit. - // In these cases, simply set the "limit" to an extremely large value. - float angularOffsetToEdgeOfBullseye = (float)Math.Asin(baseBullseyeRadius / npc.Distance(bullseye.Center)); - if (float.IsNaN(angularOffsetToEdgeOfBullseye)) - angularOffsetToEdgeOfBullseye = 1000f; - float orthogonalityToBullseye = directionToBullseye.AngleBetween(bullseyeCenterOffsetDirection); + // Law of cosines: (A dot B) = |A| * |B| * cos(theta) + // where theta is the angle between the two vectors A and B. + // cos(theta) approaches one as the angle approaches zero, so an angle is smaller if the cos is bigger. + // If the angle to the bullseye's center is smaller than the angle to both the comparison points, it's a hit. + float dotCenter = Vector2.Dot(normVelocity, directionToBullseyeCenter); + float dotOne = Vector2.Dot(normVelocity, dirToPointOne); + float dotTwo = Vector2.Dot(normVelocity, dirToPointTwo); + bool willStrikeBullseye = dotCenter > dotOne && dotCenter > dotTwo; - hasCollidedWithBullseye = orthogonalityToBullseye < angularOffsetToEdgeOfBullseye; - } - else - hasCollidedWithBullseye = projectile.WithinRange(bullseye.Center, bullseye.scale * baseBullseyeRadius); - - // Do a very high amount of damage if hitting a bullseye. - if (hasCollidedWithBullseye && bullseye.ai[1] == 0f) + // If a bullseye is triggered, set it as hit. + if (willStrikeBullseye && bullseye.ai[1] == 0f) { crit = true; hitBullseye = true; diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 03a7a39fa5..7e78460347 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -126,6 +126,7 @@ namespace CalamityMod.NPCs private static readonly string[] StylistNames = { "Amber", // <@!114677116473180169> (Mishiro Usui#1295) + "Faith", // <@!509050283871961123> (Toasty#1007) }; private const int TavernkeepVanillaNames = 16; private static readonly string[] TavernkeepNames = diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 94d78d3434..29cb9b4799 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; bossBag = ModContent.ItemType(); } diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index b3c16837ea..7afe9e8177 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -140,7 +140,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; bossBag = ModContent.ItemType(); } diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index fdae8f2dbd..87173aafdd 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.netAlways = true; npc.boss = true; npc.hide = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 1414f584eb..0f2bfbbf2d 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.netAlways = true; npc.boss = true; npc.hide = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 5ac57e49d5..2680ba1557 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.netAlways = true; npc.boss = true; npc.hide = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index 0c638f5d01..4f47e82c2b 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.netAlways = true; npc.boss = true; npc.hide = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; } public override void SendExtraAI(BinaryWriter writer) diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index d16d399f72..45b89e84a8 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -153,7 +153,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis npc.DeathSound = SoundID.NPCDeath14; npc.netAlways = true; npc.boss = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; } public override void BossHeadSlot(ref int index) diff --git a/NPCs/ExoMechs/Draedon.cs b/NPCs/ExoMechs/Draedon.cs index 07c7fe4b17..2ebc53deb9 100644 --- a/NPCs/ExoMechs/Draedon.cs +++ b/NPCs/ExoMechs/Draedon.cs @@ -361,7 +361,7 @@ namespace CalamityMod.NPCs.ExoMechs if (!ExoMechIsPresent && DefeatTimer <= 0f) music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/DraedonAmbience"); if (ExoMechIsPresent) - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; TalkTimer++; } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index 09f7887588..4fd21740e7 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.dontCountMe = true; npc.chaseable = false; npc.boss = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; } public override void BossHeadSlot(ref int index) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 2868cceb2c..2a3dd7f159 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.dontCountMe = true; npc.chaseable = false; npc.boss = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; } public override void BossHeadSlot(ref int index) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 94145a7194..dbaeb6487b 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -138,7 +138,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.netAlways = true; npc.boss = true; npc.chaseable = false; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; bossBag = ModContent.ItemType(); } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 62995b60ac..1343439cbc 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.dontCountMe = true; npc.chaseable = false; npc.boss = true; - music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3; } public override void BossHeadSlot(ref int index) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index ed41352cf0..7cb2756fbf 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2280,7 +2280,7 @@ namespace CalamityMod.Projectiles } if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj) - target.AddBuff(BuffType(), 120); + target.AddBuff(BuffType(), VulnerabilityHex.AflameDuration); if (modPlayer.farProximityRewardEnchant) { diff --git a/Projectiles/Typeless/SpiritOriginBullseye.cs b/Projectiles/Typeless/SpiritOriginBullseye.cs index 2eadfc9abf..88820da8a7 100644 --- a/Projectiles/Typeless/SpiritOriginBullseye.cs +++ b/Projectiles/Typeless/SpiritOriginBullseye.cs @@ -1,3 +1,4 @@ +using CalamityMod.Items.Accessories; using CalamityMod.Tiles.AstralDesert; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -22,7 +23,7 @@ namespace CalamityMod.Projectiles.Typeless public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetDefaults() { - projectile.width = projectile.height = 2; + projectile.width = projectile.height = (int)(2 * DaawnlightSpiritOrigin.RegularEnemyBullseyeRadius); projectile.aiStyle = -1; projectile.friendly = false; projectile.hostile = false; @@ -85,6 +86,8 @@ namespace CalamityMod.Projectiles.Typeless bullseyeTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/DaawnlightSpiritOriginBossBullseye"); frame = bullseyeTexture.Frame(1, 4, 0, (int)(Main.GlobalTime * 7f) % 4); rotation = 0f; + drawPosition.Y -= 17; + drawPosition.X -= 1; } spriteBatch.Draw(bullseyeTexture, drawPosition, frame, Color.White * projectile.Opacity, rotation, frame.Size() * 0.5f, scale, SpriteEffects.None, 0f); diff --git a/Sounds/Custom/AdrenalineBurnout2.cs b/Sounds/Custom/AdrenalineActivate.cs similarity index 90% rename from Sounds/Custom/AdrenalineBurnout2.cs rename to Sounds/Custom/AdrenalineActivate.cs index a5c0654c83..552c962755 100644 --- a/Sounds/Custom/AdrenalineBurnout2.cs +++ b/Sounds/Custom/AdrenalineActivate.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Sounds.Custom { - public class AdrenalineBurnout2 : ModSound + public class AdrenalineActivate : ModSound { public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) { diff --git a/Sounds/Custom/AdrenalineActivate.ogg b/Sounds/Custom/AdrenalineActivate.ogg new file mode 100644 index 0000000000..fb363b27dc Binary files /dev/null and b/Sounds/Custom/AdrenalineActivate.ogg differ diff --git a/Sounds/Custom/AdrenalineBurnout2.ogg b/Sounds/Custom/AdrenalineBurnout2.ogg deleted file mode 100644 index a75cfc7e25..0000000000 Binary files a/Sounds/Custom/AdrenalineBurnout2.ogg and /dev/null differ diff --git a/Sounds/Custom/AdrenalineBurnout1.cs b/Sounds/Custom/AndromedaCripple.cs similarity index 91% rename from Sounds/Custom/AdrenalineBurnout1.cs rename to Sounds/Custom/AndromedaCripple.cs index a4f25f8309..961d0831de 100644 --- a/Sounds/Custom/AdrenalineBurnout1.cs +++ b/Sounds/Custom/AndromedaCripple.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Sounds.Custom { - public class AdrenalineBurnout1 : ModSound + public class AndromedaCripple : ModSound { public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) { diff --git a/Sounds/Custom/AdrenalineBurnout1.ogg b/Sounds/Custom/AndromedaCripple.ogg similarity index 100% rename from Sounds/Custom/AdrenalineBurnout1.ogg rename to Sounds/Custom/AndromedaCripple.ogg diff --git a/Sounds/Custom/RageActivate.cs b/Sounds/Custom/RageActivate.cs new file mode 100644 index 0000000000..6455eceb57 --- /dev/null +++ b/Sounds/Custom/RageActivate.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class RageActivate : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} diff --git a/Sounds/Custom/RageActivate.ogg b/Sounds/Custom/RageActivate.ogg new file mode 100644 index 0000000000..cf7386ef4c Binary files /dev/null and b/Sounds/Custom/RageActivate.ogg differ diff --git a/Sounds/Custom/RageEnd.cs b/Sounds/Custom/RageEnd.cs new file mode 100644 index 0000000000..a441f4a359 --- /dev/null +++ b/Sounds/Custom/RageEnd.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class RageEnd : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} diff --git a/Sounds/Custom/RageEnd.ogg b/Sounds/Custom/RageEnd.ogg new file mode 100644 index 0000000000..d5bf3bbd6b Binary files /dev/null and b/Sounds/Custom/RageEnd.ogg differ diff --git a/Tiles/Furniture/CraftingStations/StaticRefiner.png b/Tiles/Furniture/CraftingStations/StaticRefiner.png index 9ec5321fe8..ca38d64f45 100644 Binary files a/Tiles/Furniture/CraftingStations/StaticRefiner.png and b/Tiles/Furniture/CraftingStations/StaticRefiner.png differ diff --git a/Tiles/FurnitureStatigel/StatigelBath.png b/Tiles/FurnitureStatigel/StatigelBath.png index 0a48f85cbc..3bd19ca39c 100644 Binary files a/Tiles/FurnitureStatigel/StatigelBath.png and b/Tiles/FurnitureStatigel/StatigelBath.png differ diff --git a/Tiles/FurnitureStatigel/StatigelBed.png b/Tiles/FurnitureStatigel/StatigelBed.png index f335592e84..5e94ee9bf0 100644 Binary files a/Tiles/FurnitureStatigel/StatigelBed.png and b/Tiles/FurnitureStatigel/StatigelBed.png differ diff --git a/Tiles/FurnitureStatigel/StatigelBed_Highlight.png b/Tiles/FurnitureStatigel/StatigelBed_Highlight.png index 6958e21ed4..1c3a303dcd 100644 Binary files a/Tiles/FurnitureStatigel/StatigelBed_Highlight.png and b/Tiles/FurnitureStatigel/StatigelBed_Highlight.png differ diff --git a/Tiles/FurnitureStatigel/StatigelBookcase.png b/Tiles/FurnitureStatigel/StatigelBookcase.png index a5c6ff2402..570cf89f25 100644 Binary files a/Tiles/FurnitureStatigel/StatigelBookcase.png and b/Tiles/FurnitureStatigel/StatigelBookcase.png differ diff --git a/Tiles/FurnitureStatigel/StatigelCandelabra.png b/Tiles/FurnitureStatigel/StatigelCandelabra.png index 7ff4a37262..4d7d87e732 100644 Binary files a/Tiles/FurnitureStatigel/StatigelCandelabra.png and b/Tiles/FurnitureStatigel/StatigelCandelabra.png differ diff --git a/Tiles/FurnitureStatigel/StatigelCandelabraFlame.png b/Tiles/FurnitureStatigel/StatigelCandelabraFlame.png index 612fedc4e3..cd667d4d2b 100644 Binary files a/Tiles/FurnitureStatigel/StatigelCandelabraFlame.png and b/Tiles/FurnitureStatigel/StatigelCandelabraFlame.png differ diff --git a/Tiles/FurnitureStatigel/StatigelCandle.png b/Tiles/FurnitureStatigel/StatigelCandle.png index 214626910b..1d46960e0e 100644 Binary files a/Tiles/FurnitureStatigel/StatigelCandle.png and b/Tiles/FurnitureStatigel/StatigelCandle.png differ diff --git a/Tiles/FurnitureStatigel/StatigelCandleFlame.png b/Tiles/FurnitureStatigel/StatigelCandleFlame.png index d64911b892..4aaef19dac 100644 Binary files a/Tiles/FurnitureStatigel/StatigelCandleFlame.png and b/Tiles/FurnitureStatigel/StatigelCandleFlame.png differ diff --git a/Tiles/FurnitureStatigel/StatigelChair.png b/Tiles/FurnitureStatigel/StatigelChair.png index 59e0bd277a..acbaeafb12 100644 Binary files a/Tiles/FurnitureStatigel/StatigelChair.png and b/Tiles/FurnitureStatigel/StatigelChair.png differ diff --git a/Tiles/FurnitureStatigel/StatigelChandelier.png b/Tiles/FurnitureStatigel/StatigelChandelier.png index 08aa30f6d8..20798e93e8 100644 Binary files a/Tiles/FurnitureStatigel/StatigelChandelier.png and b/Tiles/FurnitureStatigel/StatigelChandelier.png differ diff --git a/Tiles/FurnitureStatigel/StatigelChandelierFlame.png b/Tiles/FurnitureStatigel/StatigelChandelierFlame.png index 7af684cbd4..6903589832 100644 Binary files a/Tiles/FurnitureStatigel/StatigelChandelierFlame.png and b/Tiles/FurnitureStatigel/StatigelChandelierFlame.png differ diff --git a/Tiles/FurnitureStatigel/StatigelChest.png b/Tiles/FurnitureStatigel/StatigelChest.png index e17cc238dc..ad9162647c 100644 Binary files a/Tiles/FurnitureStatigel/StatigelChest.png and b/Tiles/FurnitureStatigel/StatigelChest.png differ diff --git a/Tiles/FurnitureStatigel/StatigelChest_Highlight.png b/Tiles/FurnitureStatigel/StatigelChest_Highlight.png index 49df01543c..116677238b 100644 Binary files a/Tiles/FurnitureStatigel/StatigelChest_Highlight.png and b/Tiles/FurnitureStatigel/StatigelChest_Highlight.png differ diff --git a/Tiles/FurnitureStatigel/StatigelClock.png b/Tiles/FurnitureStatigel/StatigelClock.png index eb3e2581f0..f3ba7b223c 100644 Binary files a/Tiles/FurnitureStatigel/StatigelClock.png and b/Tiles/FurnitureStatigel/StatigelClock.png differ diff --git a/Tiles/FurnitureStatigel/StatigelClock_Highlight.png b/Tiles/FurnitureStatigel/StatigelClock_Highlight.png index 25f77f1b15..0101bf23d0 100644 Binary files a/Tiles/FurnitureStatigel/StatigelClock_Highlight.png and b/Tiles/FurnitureStatigel/StatigelClock_Highlight.png differ diff --git a/Tiles/FurnitureStatigel/StatigelDoorClosed.png b/Tiles/FurnitureStatigel/StatigelDoorClosed.png index 2d4648767d..e4cc94242a 100644 Binary files a/Tiles/FurnitureStatigel/StatigelDoorClosed.png and b/Tiles/FurnitureStatigel/StatigelDoorClosed.png differ diff --git a/Tiles/FurnitureStatigel/StatigelDoorClosed_Highlight.png b/Tiles/FurnitureStatigel/StatigelDoorClosed_Highlight.png index 903d1bd0f8..39776f813c 100644 Binary files a/Tiles/FurnitureStatigel/StatigelDoorClosed_Highlight.png and b/Tiles/FurnitureStatigel/StatigelDoorClosed_Highlight.png differ diff --git a/Tiles/FurnitureStatigel/StatigelDoorOpen.png b/Tiles/FurnitureStatigel/StatigelDoorOpen.png index 1e7fdd50d1..f0712a8a59 100644 Binary files a/Tiles/FurnitureStatigel/StatigelDoorOpen.png and b/Tiles/FurnitureStatigel/StatigelDoorOpen.png differ diff --git a/Tiles/FurnitureStatigel/StatigelDoorOpen_Highlight.png b/Tiles/FurnitureStatigel/StatigelDoorOpen_Highlight.png index 0dedd6241a..f4867de6a2 100644 Binary files a/Tiles/FurnitureStatigel/StatigelDoorOpen_Highlight.png and b/Tiles/FurnitureStatigel/StatigelDoorOpen_Highlight.png differ diff --git a/Tiles/FurnitureStatigel/StatigelDresser.png b/Tiles/FurnitureStatigel/StatigelDresser.png index 9ede7f6a85..dc95b48eac 100644 Binary files a/Tiles/FurnitureStatigel/StatigelDresser.png and b/Tiles/FurnitureStatigel/StatigelDresser.png differ diff --git a/Tiles/FurnitureStatigel/StatigelDresser_Highlight.png b/Tiles/FurnitureStatigel/StatigelDresser_Highlight.png index d6989d3203..84d89863e5 100644 Binary files a/Tiles/FurnitureStatigel/StatigelDresser_Highlight.png and b/Tiles/FurnitureStatigel/StatigelDresser_Highlight.png differ diff --git a/Tiles/FurnitureStatigel/StatigelLamp.png b/Tiles/FurnitureStatigel/StatigelLamp.png index 73143c2856..3ef5f1c890 100644 Binary files a/Tiles/FurnitureStatigel/StatigelLamp.png and b/Tiles/FurnitureStatigel/StatigelLamp.png differ diff --git a/Tiles/FurnitureStatigel/StatigelLampFlame.png b/Tiles/FurnitureStatigel/StatigelLampFlame.png index d49ade5acc..d4849f1557 100644 Binary files a/Tiles/FurnitureStatigel/StatigelLampFlame.png and b/Tiles/FurnitureStatigel/StatigelLampFlame.png differ diff --git a/Tiles/FurnitureStatigel/StatigelLantern.png b/Tiles/FurnitureStatigel/StatigelLantern.png index b3981fc7be..d8f57ed012 100644 Binary files a/Tiles/FurnitureStatigel/StatigelLantern.png and b/Tiles/FurnitureStatigel/StatigelLantern.png differ diff --git a/Tiles/FurnitureStatigel/StatigelLanternFlame.png b/Tiles/FurnitureStatigel/StatigelLanternFlame.png index 61fbea39e6..abb72cb19e 100644 Binary files a/Tiles/FurnitureStatigel/StatigelLanternFlame.png and b/Tiles/FurnitureStatigel/StatigelLanternFlame.png differ diff --git a/Tiles/FurnitureStatigel/StatigelPiano.png b/Tiles/FurnitureStatigel/StatigelPiano.png index f2f6160af6..69884802b2 100644 Binary files a/Tiles/FurnitureStatigel/StatigelPiano.png and b/Tiles/FurnitureStatigel/StatigelPiano.png differ diff --git a/Tiles/FurnitureStatigel/StatigelPlatform.png b/Tiles/FurnitureStatigel/StatigelPlatform.png index 12613c1eca..718db39ac5 100644 Binary files a/Tiles/FurnitureStatigel/StatigelPlatform.png and b/Tiles/FurnitureStatigel/StatigelPlatform.png differ diff --git a/Tiles/FurnitureStatigel/StatigelSink.png b/Tiles/FurnitureStatigel/StatigelSink.png index e2bf973b1f..ff2f6806d2 100644 Binary files a/Tiles/FurnitureStatigel/StatigelSink.png and b/Tiles/FurnitureStatigel/StatigelSink.png differ diff --git a/Tiles/FurnitureStatigel/StatigelSofa.png b/Tiles/FurnitureStatigel/StatigelSofa.png index da275c4a96..8cd1d17e65 100644 Binary files a/Tiles/FurnitureStatigel/StatigelSofa.png and b/Tiles/FurnitureStatigel/StatigelSofa.png differ diff --git a/Tiles/FurnitureStatigel/StatigelTable.png b/Tiles/FurnitureStatigel/StatigelTable.png index ee328bd86d..36eee03285 100644 Binary files a/Tiles/FurnitureStatigel/StatigelTable.png and b/Tiles/FurnitureStatigel/StatigelTable.png differ diff --git a/Tiles/FurnitureStatigel/StatigelWorkbench.png b/Tiles/FurnitureStatigel/StatigelWorkbench.png index 36fa265b25..125204fd7e 100644 Binary files a/Tiles/FurnitureStatigel/StatigelWorkbench.png and b/Tiles/FurnitureStatigel/StatigelWorkbench.png differ diff --git a/UI/EnchantmentMetersUI.cs b/UI/EnchantmentMetersUI.cs new file mode 100644 index 0000000000..9765104707 --- /dev/null +++ b/UI/EnchantmentMetersUI.cs @@ -0,0 +1,37 @@ +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.UI +{ + public class EnchantmentMetersUI + { + public static Vector2 DrawPosition => Main.LocalPlayer.Center; + public static void Draw(SpriteBatch spriteBatch, Player player) + { + Item heldItem = player.ActiveItem(); + + // Do not draw if the player has an empty item. Precise item checks for modded content will fail. + if (heldItem is null || heldItem.IsAir) + return; + + // Draw a bar above the player that displays the discharge of an item if the enchant is used. + if (player.Calamity().dischargingItemEnchant) + { + float dischargeFactor = heldItem.Calamity().DischargeExhaustionRatio; + Texture2D barBorderTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/EphemeralBarBorder"); + Texture2D barTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/EphemeralBar"); + + int barCutoff = (int)(barTexture.Height * (1f - dischargeFactor)); + Rectangle barFrame = new Rectangle(0, barCutoff, barTexture.Width, barTexture.Height - barCutoff); + Vector2 barDrawPosition = player.Top - Vector2.UnitY * (barTexture.Height * 0.5f + 40f) + Vector2.UnitY * player.gfxOffY - Main.screenPosition; + Color barColor = Color.White * 0.6f; + + spriteBatch.Draw(barBorderTexture, barDrawPosition, null, barColor, 0f, barBorderTexture.Size() * 0.5f, 1f, SpriteEffects.None, 0f); + spriteBatch.Draw(barTexture, barDrawPosition, barFrame, barColor, 0f, barTexture.Size() * 0.5f, 1f, SpriteEffects.FlipVertically, 0f); + } + } + } +} diff --git a/UI/RipperUI.cs b/UI/RipperUI.cs index b60b16b398..bb92e8aaf3 100644 --- a/UI/RipperUI.cs +++ b/UI/RipperUI.cs @@ -18,9 +18,9 @@ namespace CalamityMod.UI public const float DefaultAdrenPosY = 30f; private const int RageAnimFrameDelay = 6; - private const int RageAnimFrames = 9; + private const int RageAnimFrames = 10; private const int AdrenAnimFrameDelay = 5; - private const int AdrenAnimFrames = 9; + private const int AdrenAnimFrames = 10; public static Vector2 rageDrawPos = new Vector2(DefaultRagePosX, DefaultRagePosY); public static Vector2 adrenDrawPos = new Vector2(DefaultAdrenPosX, DefaultAdrenPosY); @@ -39,7 +39,7 @@ namespace CalamityMod.UI private static Texture2D rageBarTex, rageBorderTex, rageAnimTex; private static Texture2D mushroomPlasmaTex, infernalBloodTex, redLightningTex; - private static Texture2D adrenBarTex, adrenBorderTex, adrenAnimTex; + private static Texture2D adrenBarTex, adrenBorderTex, adrenBorderTexFull, adrenAnimTex; private static Texture2D electrolyteGelTex, starlightFuelTex, ectoheartTex; internal static void Load() @@ -50,6 +50,7 @@ namespace CalamityMod.UI adrenBarTex = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/AdrenalineBar"); adrenBorderTex = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/AdrenalineBarBorder"); + adrenBorderTexFull = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/AdrenalineBarBorderFull"); adrenAnimTex = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/AdrenalineFullAnimation"); mushroomPlasmaTex = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/RageDisplay_MushroomPlasmaRoot"); @@ -72,7 +73,7 @@ namespace CalamityMod.UI Reset(); rageBarTex = rageBorderTex = rageAnimTex = null; - adrenBarTex = adrenBorderTex = adrenAnimTex = null; + adrenBarTex = adrenBorderTex = adrenBorderTexFull = adrenAnimTex = null; mushroomPlasmaTex = infernalBloodTex = redLightningTex = null; electrolyteGelTex = starlightFuelTex = ectoheartTex = null; pearlOffsetLeft = pearlOffsetCenter = pearlOffsetRight = Vector2.Zero; @@ -207,6 +208,9 @@ namespace CalamityMod.UI // Draw the border of the Adrenaline Bar first spriteBatch.Draw(adrenBorderTex, adrenDrawPos + shakeOffset, null, Color.White, 0f, adrenBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); + // Use a slightly different texture if Adrenaline is full or active + if (modPlayer.adrenaline >= modPlayer.adrenalineMax || modPlayer.adrenalineModeActive) + spriteBatch.Draw(adrenBorderTexFull, adrenDrawPos + shakeOffset, null, Color.White, 0f, adrenBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); // The amount of the bar to draw depends on the player's current Adrenaline level // 7 pixels of dead space, 90 pixels of bar, 7 pixels of dead space. @@ -232,9 +236,10 @@ namespace CalamityMod.UI // If the animation is active, draw the animation on top of both the border and the bar. if (animationActive) { + float animOffset = 5f; float xOffset = (adrenBorderTex.Width - adrenAnimTex.Width) / 2f; int frameHeight = (adrenAnimTex.Height / AdrenAnimFrames) - 1; - float yOffset = (adrenBorderTex.Height - frameHeight) / 2f; + float yOffset = (adrenBorderTex.Height - frameHeight) / 2f + animOffset; Vector2 sizeDiffOffset = new Vector2(xOffset, yOffset); Rectangle animCropRect = new Rectangle(0, (frameHeight + 1) * adrenAnimFrame, adrenAnimTex.Width, frameHeight); spriteBatch.Draw(adrenAnimTex, adrenDrawPos + shakeOffset + sizeDiffOffset, animCropRect, Color.White, 0f, adrenBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); diff --git a/Utilities/FurnitureSetupUtils.cs b/Utilities/FurnitureSetupUtils.cs index 39c2d8a640..c6b5de2ffd 100644 --- a/Utilities/FurnitureSetupUtils.cs +++ b/Utilities/FurnitureSetupUtils.cs @@ -939,8 +939,10 @@ namespace CalamityMod /// /// The ModTile which is being initialized. /// Whether this tile is supposed to be immune to lava. Defaults to false. - internal static void SetUpPiano(this ModTile mt, bool lavaImmune = false) + /// 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.tileSolidTop[mt.Type] = solidTop; Main.tileLighted[mt.Type] = true; Main.tileFrameImportant[mt.Type] = true; Main.tileLavaDeath[mt.Type] = !lavaImmune;