diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1a52fead07..c75b42d102 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1067,6 +1067,8 @@ namespace CalamityMod.CalPlayer /// Calamity's Silver armor set bonus; taking over 20 damage heals 10 health if the player avoids damage for 2 seconds. public bool silverMedkit = false; public int silverMedkitTimer = 0; + /// Calamity's Tungsten armor set bonus; makes grappling hooks fly and retract faster. + public bool tungstenArmorHookBoost = false; /// Calamity's Gold armor set bonus; makes enemies drop Gold Coins. public bool goldArmorGoldDrops = false; /// Calamity's Mining armor set bonus; gives a chance for extra items to drop when mining ores. @@ -2366,6 +2368,7 @@ namespace CalamityMod.CalPlayer forbiddenCirclet = false; silverMedkit = false; + tungstenArmorHookBoost = false; goldArmorGoldDrops = false; miningSet = false; @@ -3079,6 +3082,7 @@ namespace CalamityMod.CalPlayer #region Armor Set Bonuses silverMedkit = false; silverMedkitTimer = 0; + tungstenArmorHookBoost = false; goldArmorGoldDrops = false; miningSet = false; miningSetCooldown = 0; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 86a5ce0a88..481b952bbc 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1374,7 +1374,7 @@ namespace CalamityMod.CalPlayer } else if (proj.type == ProjectileID.ThornBall) { - Player.AddBuff(BuffID.Poisoned, 420); + Player.AddBuff(BuffID.Venom, 120); } else if (proj.type == ProjectileID.CultistBossFireBall) { @@ -2550,13 +2550,13 @@ namespace CalamityMod.CalPlayer if (!canTriggerHitEffects) return; - if (aeroSet && hurtInfo.Damage > 25) + if (aeroSet && hurtInfo.Damage > AerospecBreastplate.SetBonusHurtDamageThreshold) { // https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list var source = Player.GetSource_OnHurt(hurtInfo.DamageSource, AerospecBreastplate.FeatherEntitySourceContext); for (int n = 0; n < 4; n++) { - int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(30); + int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(AerospecBreastplate.SetBonusFeatherDamage); CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType(), featherDamage, 1f, Player.whoAmI); } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4332608084..31a15b92db 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -17,6 +17,7 @@ using CalamityMod.ExtraTextures; using CalamityMod.Items; using CalamityMod.Items.Accessories; using CalamityMod.Items.Ammo; +using CalamityMod.Items.Armor.Aerospec; using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.Brimflame; using CalamityMod.Items.Armor.DesertProwler; @@ -1293,7 +1294,7 @@ namespace CalamityMod.CalPlayer if (!Player.wet) { if (aeroSet) - Player.maxFallSpeed = 15f; + Player.maxFallSpeed = AerospecBreastplate.SetBonusFallSpeed; if (Player.PortalPhysicsEnabled) Player.maxFallSpeed = 20f; } @@ -4409,7 +4410,7 @@ namespace CalamityMod.CalPlayer break; case BuffID.Confused: Player.confused = false; - Player.statDefense += 10; + Player.statDefense += 15; break; case BuffID.Cursed: Player.cursed = false; diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 50d1ea2d39..8b9662f7ff 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -45,18 +45,6 @@ namespace CalamityMod } } - #region Multi-Threading Settings - [Header("Multithreading")] - - [BackgroundColor(192, 54, 64, 192)] - [SliderColor(224, 165, 56, 128)] - [Range(0f, 2f)] - [DefaultValue(0f)] - [Increment(1f)] - [DrawTicks] - public float SunkenSeaMultiThreading { get; set; } - #endregion - #region Graphics Changes [Header("Graphics")] diff --git a/ExtraJumps/SulphurJump.cs b/ExtraJumps/SulphurJump.cs index eef2cbb6c1..db5dd0bd9f 100644 --- a/ExtraJumps/SulphurJump.cs +++ b/ExtraJumps/SulphurJump.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.Items.Armor.Sulphurous; using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Particles; using CalamityMod.Projectiles.Typeless; @@ -46,7 +47,7 @@ namespace CalamityMod.ExtraJumps if (modPlayer.sulphurBubbleCooldown <= 0) { var source = player.GetSource_Misc("0"); - int damage = (int)player.GetTotalDamage().ApplyTo(20); + int damage = (int)player.GetTotalDamage().ApplyTo(SulphurousHelmet.BubbleDamage); int bubble = Projectile.NewProjectile(source, new Vector2(player.position.X, player.position.Y + (player.gravDir == -1f ? 20 : -20)), Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI, 1f, 0f); if (bubble.WithinBounds(Main.maxProjectiles)) diff --git a/Items/Armor/Aerospec/AerospecBreastplate.cs b/Items/Armor/Aerospec/AerospecBreastplate.cs index c4601b3ca1..acd1344852 100644 --- a/Items/Armor/Aerospec/AerospecBreastplate.cs +++ b/Items/Armor/Aerospec/AerospecBreastplate.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec @@ -11,6 +12,15 @@ namespace CalamityMod.Items.Armor.Aerospec public new string LocalizationCategory => "Items.Armor.PreHardmode"; internal static string FeatherEntitySourceContext => "SetBonus_Calamity_Aerospec"; + public static float DamageBoost = 0.03f; + public static int CritBoost = 3; // NOTE: Tooltip shares this number with damage % as they're equal + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent()); + + // Common Set Bonus + public static int SetBonusHurtDamageThreshold = 25; + public static int SetBonusFeatherDamage = 30; + public static float SetBonusFallSpeed = 15f; + public override void SetDefaults() { Item.width = 18; @@ -22,8 +32,8 @@ namespace CalamityMod.Items.Armor.Aerospec public override void UpdateEquip(Player player) { - player.GetDamage() += 0.03f; - player.GetCritChance() += 3; + player.GetDamage() += DamageBoost; + player.GetCritChance() += CritBoost; } public override void AddRecipes() diff --git a/Items/Armor/Aerospec/AerospecHeadMagic.cs b/Items/Armor/Aerospec/AerospecHeadMagic.cs index 084d548d20..8c1be03252 100644 --- a/Items/Armor/Aerospec/AerospecHeadMagic.cs +++ b/Items/Armor/Aerospec/AerospecHeadMagic.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec @@ -11,6 +12,16 @@ namespace CalamityMod.Items.Armor.Aerospec public class AerospecHeadMagic : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MagicDamageBoost = 0.1f; + public static int MaxManaBoost = 30; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MagicDamageBoost.ToPercent(), MaxManaBoost); + + // Set Bonus + public static float SetBonusManaCostReduction = 0.08f; + public static float SetBonusMoveSpeedBoost = 0.05f; + public static int SetBonusMagicCritBoost = 5; // NOTE: Tooltip shares this number with move speed % as they're equal + public override void SetDefaults() { Item.width = 18; @@ -32,19 +43,20 @@ namespace CalamityMod.Items.Armor.Aerospec public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusManaCostReduction.ToPercent(), SetBonusMoveSpeedBoost.ToPercent()) + + "\n" + CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold); var modPlayer = player.Calamity(); modPlayer.aeroSet = true; player.noFallDmg = true; - player.moveSpeed += 0.05f; - player.manaCost -= 0.08f; - player.GetCritChance() += 5; + player.moveSpeed += SetBonusMoveSpeedBoost; + player.manaCost -= SetBonusManaCostReduction; + player.GetCritChance() += SetBonusMagicCritBoost; } public override void UpdateEquip(Player player) { - player.GetDamage() += 0.1f; - player.statManaMax2 += 30; + player.GetDamage() += MagicDamageBoost; + player.statManaMax2 += MaxManaBoost; } public override void AddRecipes() diff --git a/Items/Armor/Aerospec/AerospecHeadMelee.cs b/Items/Armor/Aerospec/AerospecHeadMelee.cs index 1d7b21e058..070471a1d6 100644 --- a/Items/Armor/Aerospec/AerospecHeadMelee.cs +++ b/Items/Armor/Aerospec/AerospecHeadMelee.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec @@ -11,6 +12,15 @@ namespace CalamityMod.Items.Armor.Aerospec public class AerospecHeadMelee : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MeleeDamageBoost = 0.1f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MeleeDamageBoost.ToPercent()); + + // Set Bonus + public static float SetBonusMoveSpeedBoost = 0.05f; + public static int SetBonusMeleeCritBoost = 5; // NOTE: Tooltip shares this number with move speed % as they're equal + public static int SetBonusAggroBoost = 300; + public override void SetDefaults() { Item.width = 18; @@ -32,19 +42,17 @@ namespace CalamityMod.Items.Armor.Aerospec public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMoveSpeedBoost.ToPercent()) + + "\n" + CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold); var modPlayer = player.Calamity(); modPlayer.aeroSet = true; player.noFallDmg = true; - player.moveSpeed += 0.05f; - player.GetCritChance() += 5; - player.aggro += 300; + player.moveSpeed += SetBonusMoveSpeedBoost; + player.GetCritChance() += SetBonusMeleeCritBoost; + player.aggro += SetBonusAggroBoost; } - public override void UpdateEquip(Player player) - { - player.GetDamage() += 0.1f; - } + public override void UpdateEquip(Player player) => player.GetDamage() += MeleeDamageBoost; public override void AddRecipes() { diff --git a/Items/Armor/Aerospec/AerospecHeadRanged.cs b/Items/Armor/Aerospec/AerospecHeadRanged.cs index 01fc45869d..7953422862 100644 --- a/Items/Armor/Aerospec/AerospecHeadRanged.cs +++ b/Items/Armor/Aerospec/AerospecHeadRanged.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec @@ -11,6 +12,14 @@ namespace CalamityMod.Items.Armor.Aerospec public class AerospecHeadRanged : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float RangedDamageBoost = 0.1f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent()); + + // Set Bonus + public static float SetBonusMoveSpeedBoost = 0.05f; + public static int SetBonusRangedCritBoost = 5; // NOTE: Tooltip shares this number with move speed % as they're equal + public override void SetDefaults() { Item.width = 18; @@ -32,18 +41,16 @@ namespace CalamityMod.Items.Armor.Aerospec public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMoveSpeedBoost.ToPercent()) + + "\n" + CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold); var modPlayer = player.Calamity(); modPlayer.aeroSet = true; player.noFallDmg = true; - player.moveSpeed += 0.05f; - player.GetCritChance() += 5; + player.moveSpeed += SetBonusMoveSpeedBoost; + player.GetCritChance() += SetBonusRangedCritBoost; } - public override void UpdateEquip(Player player) - { - player.GetDamage() += 0.1f; - } + public override void UpdateEquip(Player player) => player.GetDamage() += RangedDamageBoost; public override void AddRecipes() { diff --git a/Items/Armor/Aerospec/AerospecHeadRogue.cs b/Items/Armor/Aerospec/AerospecHeadRogue.cs index be4a49a3d4..6cd947827a 100644 --- a/Items/Armor/Aerospec/AerospecHeadRogue.cs +++ b/Items/Armor/Aerospec/AerospecHeadRogue.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec @@ -11,6 +12,16 @@ namespace CalamityMod.Items.Armor.Aerospec public class AerospecHeadRogue : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float RogueDamageBoost = 0.1f; + public static float MoveSpeedBoost = 0.05f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), MoveSpeedBoost.ToPercent()); + + // Set Bonus + public static float SetBonusMoveSpeedBoost = 0.05f; + public static int SetBonusRogueCritBoost = 5; // NOTE: Tooltip shares this number with move speed % as they're equal + public static float SetBonusRogueStealth = 0.8f; + public override void SetStaticDefaults() { if (!Main.dedServ) @@ -38,20 +49,21 @@ namespace CalamityMod.Items.Armor.Aerospec public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMoveSpeedBoost.ToPercent(), SetBonusRogueStealth.ToStealth()) + + "\n" + CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold); var modPlayer = player.Calamity(); modPlayer.aeroSet = true; - modPlayer.rogueStealthMax += 0.8f; + modPlayer.rogueStealthMax += SetBonusRogueStealth; player.noFallDmg = true; - player.moveSpeed += 0.05f; - player.GetCritChance() += 5; + player.moveSpeed += SetBonusMoveSpeedBoost; + player.GetCritChance() += SetBonusRogueCritBoost; player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { - player.GetDamage() += 0.1f; - player.moveSpeed += 0.05f; + player.GetDamage() += RogueDamageBoost; + player.moveSpeed += MoveSpeedBoost; } public override void AddRecipes() diff --git a/Items/Armor/Aerospec/AerospecHeadSummon.cs b/Items/Armor/Aerospec/AerospecHeadSummon.cs index b54a722b93..54722a5d38 100644 --- a/Items/Armor/Aerospec/AerospecHeadSummon.cs +++ b/Items/Armor/Aerospec/AerospecHeadSummon.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Projectiles.Summon; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec @@ -14,6 +15,14 @@ namespace CalamityMod.Items.Armor.Aerospec public class AerospecHeadSummon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float SummonDamageBoost = 0.1f; + public static float MoveSpeedBoost = 0.05f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(SummonDamageBoost.ToPercent(), MoveSpeedBoost.ToPercent()); + + // Set Bonus + public static float SetBonusSummonDamageBoost = 0.11f; + public static int SetBonusMinionSlotBoost = 1; public static int ValkyrieDamage = 20; public override void SetDefaults() @@ -37,7 +46,8 @@ namespace CalamityMod.Items.Armor.Aerospec public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusSummonDamageBoost.ToPercent(), SetBonusMinionSlotBoost) + + "\n" + CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold); var modPlayer = player.Calamity(); modPlayer.valkyrie = true; modPlayer.aeroSet = true; @@ -58,14 +68,14 @@ namespace CalamityMod.Items.Armor.Aerospec Main.projectile[p].originalDamage = ValkyrieDamage; } } - player.GetDamage() += 0.11f; - player.maxMinions++; + player.GetDamage() += SetBonusSummonDamageBoost; + player.maxMinions += SetBonusMinionSlotBoost; } public override void UpdateEquip(Player player) { - player.moveSpeed += 0.05f; - player.GetDamage() += 0.1f; + player.moveSpeed += MoveSpeedBoost; + player.GetDamage() += SummonDamageBoost; } public override void AddRecipes() diff --git a/Items/Armor/Aerospec/AerospecLeggings.cs b/Items/Armor/Aerospec/AerospecLeggings.cs index e28d5c8641..f035355c2f 100644 --- a/Items/Armor/Aerospec/AerospecLeggings.cs +++ b/Items/Armor/Aerospec/AerospecLeggings.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec @@ -9,6 +10,10 @@ namespace CalamityMod.Items.Armor.Aerospec public class AerospecLeggings : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MoveSpeedBoost = 0.12f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent()); + public override void SetDefaults() { Item.width = 18; @@ -18,10 +23,7 @@ namespace CalamityMod.Items.Armor.Aerospec Item.defense = 6; } - public override void UpdateEquip(Player player) - { - player.moveSpeed += 0.12f; - } + public override void UpdateEquip(Player player) => player.moveSpeed += MoveSpeedBoost; public override void AddRecipes() { diff --git a/Items/Armor/DesertProwler/DesertProwlerSet.cs b/Items/Armor/DesertProwler/DesertProwlerSet.cs index b361e9b684..220715407a 100644 --- a/Items/Armor/DesertProwler/DesertProwlerSet.cs +++ b/Items/Armor/DesertProwler/DesertProwlerSet.cs @@ -27,6 +27,12 @@ namespace CalamityMod.Items.Armor.DesertProwler public static readonly SoundStyle SmokeBombEndSound = new("CalamityMod/Sounds/Custom/AbilitySounds/DesertProwlerSmokeBombEnd"); public static readonly SoundStyle CDResetSound = new("CalamityMod/Sounds/Custom/AbilitySounds/DesertProwlerCDReset"); + public static int RogueCritBoost = 4; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueCritBoost); + + // Set Bonus + public static float SetBonusRogueDamageBoost = 0.05f; + public static float SetBonusRogueStealth = 0.5f; public static int SmokeCooldown = 25 * 60; public static int SmokeDuration = 5 * 60; public static int LightsOutReset = (int)(1.5f * 60); @@ -77,10 +83,10 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalization("SetBonus").Format(); //More gets edited in elsewhere + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueDamageBoost.ToPercent(), SetBonusRogueStealth.ToStealth()); //More gets edited in elsewhere player.Calamity().wearingRogueArmor = true; - player.Calamity().rogueStealthMax += 0.5f; - player.GetDamage() += 0.05f; + player.Calamity().rogueStealthMax += SetBonusRogueStealth; + player.GetDamage() += SetBonusRogueDamageBoost; DesertProwlerPlayer armorPlayer = player.GetModPlayer(); armorPlayer.desertProwlerSet = true; @@ -182,10 +188,7 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void ModifyTooltips(List tooltips) => ModifySetTooltips(this, tooltips); - public override void UpdateEquip(Player player) - { - player.GetCritChance() += 4; - } + public override void UpdateEquip(Player player) => player.GetCritChance() += RogueCritBoost; public override void AddRecipes() { @@ -203,6 +206,9 @@ namespace CalamityMod.Items.Armor.DesertProwler public new string LocalizationCategory => "Items.Armor.PreHardmode"; public string BulkTexture => "CalamityMod/Items/Armor/DesertProwler/DesertProwlerShirt_Bulk"; + public static int RogueCritBoost = 5; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueCritBoost); + public override void SetStaticDefaults() { if (Main.dedServ) @@ -225,10 +231,7 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void ModifyTooltips(List tooltips) => DesertProwlerHat.ModifySetTooltips(this, tooltips); - public override void UpdateEquip(Player player) - { - player.GetCritChance() += 5; - } + public override void UpdateEquip(Player player) => player.GetCritChance() += RogueCritBoost; public override void AddRecipes() { @@ -245,6 +248,10 @@ namespace CalamityMod.Items.Armor.DesertProwler public class DesertProwlerPants : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MoveSpeedBoost = 0.1f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent()); + public override void SetDefaults() { Item.width = 18; @@ -253,11 +260,13 @@ namespace CalamityMod.Items.Armor.DesertProwler Item.rare = ItemRarityID.Blue; Item.defense = 2; } + public override void ModifyTooltips(List tooltips) => DesertProwlerHat.ModifySetTooltips(this, tooltips); + public override void UpdateEquip(Player player) { player.buffImmune[BuffID.WindPushed] = true; - player.moveSpeed += 0.1f; + player.moveSpeed += MoveSpeedBoost; } public override void AddRecipes() diff --git a/Items/Armor/MarniteArchitect/MarniteArchitectSet.cs b/Items/Armor/MarniteArchitect/MarniteArchitectSet.cs index f67aa39d0f..1715969c84 100644 --- a/Items/Armor/MarniteArchitect/MarniteArchitectSet.cs +++ b/Items/Armor/MarniteArchitect/MarniteArchitectSet.cs @@ -16,6 +16,7 @@ using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameInput; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; using static Microsoft.Xna.Framework.Input.Keys; using static Terraria.ModLoader.ModContent; @@ -32,6 +33,10 @@ namespace CalamityMod.Items.Armor.MarniteArchitect public static readonly SoundStyle LiftGoAwaySound = new("CalamityMod/Sounds/Item/MarniteLiftUnsummon"); public static readonly SoundStyle LiftHummSound = new("CalamityMod/Sounds/Item/MarniteLiftHumm") { IsLooped = true }; + public static int TileRangeBoost = 5; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(TileRangeBoost); + + // Set Bonus public static float LiftRaiseSpeed = 2f; public static float MaxLiftHeight = 138f; @@ -95,8 +100,8 @@ namespace CalamityMod.Items.Armor.MarniteArchitect //Tile range is a static variable did you know that? That's quite funny. I assume it's just because its not like other players would need to know about the players reach if (Main.myPlayer == player.whoAmI) { - Player.tileRangeX += 5; - Player.tileRangeY += 5; //Extendo grip also increases vertical tile range by one less than horizontal <-- This is silly lmao + Player.tileRangeX += TileRangeBoost; + Player.tileRangeY += TileRangeBoost; //Extendo grip also increases vertical tile range by one less than horizontal <-- This is silly lmao } } @@ -136,6 +141,10 @@ namespace CalamityMod.Items.Armor.MarniteArchitect public class MarniteArchitectToga : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float PlacementSpeedBoost = 0.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(PlacementSpeedBoost.ToPercent()); + public override void Load() { if (Main.dedServ) @@ -160,8 +169,8 @@ namespace CalamityMod.Items.Armor.MarniteArchitect public override void UpdateEquip(Player player) { - player.tileSpeed += 0.5f; - player.wallSpeed += 0.5f; + player.tileSpeed += PlacementSpeedBoost; + player.wallSpeed += PlacementSpeedBoost; } public override void ModifyTooltips(List tooltips) => MarniteArchitectHeadgear.ModifySetTooltips(this, tooltips); diff --git a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs index 67aa4cc310..eb8c2b383c 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.SnowRuffian @@ -8,6 +9,10 @@ namespace CalamityMod.Items.Armor.SnowRuffian public class SnowRuffianChestplate : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static int RangedCritBoost = 4; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedCritBoost); + public override void Load() { if (Main.dedServ) @@ -19,7 +24,6 @@ namespace CalamityMod.Items.Armor.SnowRuffian public override void SetStaticDefaults() { - if (Main.dedServ) return; @@ -38,10 +42,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian Item.defense = 5; //12 } - public override void UpdateEquip(Player player) - { - player.GetCritChance() += 4; - } + public override void UpdateEquip(Player player) => player.GetCritChance() += RangedCritBoost; public override void AddRecipes() { diff --git a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs index d400b91e37..c60b5ea5f6 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.SnowRuffian @@ -8,6 +9,10 @@ namespace CalamityMod.Items.Armor.SnowRuffian public class SnowRuffianGreaves : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MoveSpeedBoost = 0.1f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent()); + public override void SetDefaults() { Item.width = 18; @@ -17,10 +22,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian Item.defense = 4; //12 } - public override void UpdateEquip(Player player) - { - player.moveSpeed += 0.1f; - } + public override void UpdateEquip(Player player) => player.moveSpeed += MoveSpeedBoost; public override void AddRecipes() { diff --git a/Items/Armor/SnowRuffian/SnowRuffianMask.cs b/Items/Armor/SnowRuffian/SnowRuffianMask.cs index b3365ce50c..c4fb0c3726 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianMask.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianMask.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.SnowRuffian @@ -11,6 +12,11 @@ namespace CalamityMod.Items.Armor.SnowRuffian public new string LocalizationCategory => "Items.Armor.PreHardmode"; private bool shouldBoost = false; + public static float RangedDamageBoost = 0.02f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent()); + + public static float SetBonusRangedDamageBoost = 0.04f; + public static int SetBonusRangedCritBoost = 4; // NOTE: Tooltip shares this number with damage % as they're equal public override void Load() { @@ -38,9 +44,9 @@ namespace CalamityMod.Items.Armor.SnowRuffian { var modPlayer = player.Calamity(); modPlayer.snowRuffianSet = true; - player.GetCritChance() += 4; - player.GetDamage() += 0.04f; - player.setBonus = this.GetLocalizedValue("SetBonus"); + player.GetCritChance() += SetBonusRangedCritBoost; + player.GetDamage() += SetBonusRangedDamageBoost; + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRangedDamageBoost.ToPercent()); if (player.controlJump) { @@ -59,10 +65,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian } } - public override void UpdateEquip(Player player) - { - player.GetDamage() += 0.02f; - } + public override void UpdateEquip(Player player) => player.GetDamage() += RangedDamageBoost; public override void AddRecipes() { diff --git a/Items/Armor/Statigel/StatigelArmor.cs b/Items/Armor/Statigel/StatigelArmor.cs index 0ff1c28e1f..594d897ccd 100644 --- a/Items/Armor/Statigel/StatigelArmor.cs +++ b/Items/Armor/Statigel/StatigelArmor.cs @@ -2,6 +2,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Statigel @@ -10,9 +11,18 @@ namespace CalamityMod.Items.Armor.Statigel public class StatigelArmor : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static int CritBoost = 5; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritBoost); + + // Common Set Bonus + public static int SetBonusHurtDamageThreshold = 100; + public static int SetBonusIFrameExtension = 30; + public static float SetBonusJumpSpeedBoost = 0.6f; + public static float SetBonusJumpHeightPercentBoost = 0.3334f; + public override void SetStaticDefaults() { - if (Main.dedServ) return; @@ -31,7 +41,7 @@ namespace CalamityMod.Items.Armor.Statigel Item.defense = 10; } - public override void UpdateEquip(Player player) => player.GetCritChance() += 5; + public override void UpdateEquip(Player player) => player.GetCritChance() += CritBoost; public override void AddRecipes() { diff --git a/Items/Armor/Statigel/StatigelGreaves.cs b/Items/Armor/Statigel/StatigelGreaves.cs index ce2b1d9665..cfca4680e2 100644 --- a/Items/Armor/Statigel/StatigelGreaves.cs +++ b/Items/Armor/Statigel/StatigelGreaves.cs @@ -2,6 +2,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Statigel @@ -10,6 +11,11 @@ namespace CalamityMod.Items.Armor.Statigel public class StatigelGreaves : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float DamageBoost = 0.05f; + public static float MoveSpeedBoost = 0.05f; // NOTE: Tooltip shares this number with damage % as they're equal + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent()); + public override void SetDefaults() { Item.width = 18; @@ -21,8 +27,8 @@ namespace CalamityMod.Items.Armor.Statigel public override void UpdateEquip(Player player) { - player.GetDamage() += 0.05f; - player.moveSpeed += 0.05f; + player.GetDamage() += DamageBoost; + player.moveSpeed += MoveSpeedBoost; } public override void AddRecipes() diff --git a/Items/Armor/Statigel/StatigelHeadMagic.cs b/Items/Armor/Statigel/StatigelHeadMagic.cs index e4c60df6fc..d2bbac73e6 100644 --- a/Items/Armor/Statigel/StatigelHeadMagic.cs +++ b/Items/Armor/Statigel/StatigelHeadMagic.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Statigel @@ -12,6 +13,13 @@ namespace CalamityMod.Items.Armor.Statigel public class StatigelHeadMagic : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MagicDamageBoost = 0.1f; + public static float ManaCostReduction = 0.1f; + public static int MagicCritBoost = 7; + public static int MaxManaBoost = 40; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MagicDamageBoost.ToPercent(), ManaCostReduction.ToPercent(), MagicCritBoost, MaxManaBoost); + public override void SetDefaults() { Item.width = 18; @@ -28,20 +36,20 @@ namespace CalamityMod.Items.Armor.Statigel public override void UpdateArmorSet(Player player) { - player.setBonus = CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(StatigelArmor.SetBonusHurtDamageThreshold, StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent()); var modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.GetJumpState().Enable(); - Player.jumpHeight += 5; - player.jumpSpeedBoost += 0.6f; + Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15); + player.jumpSpeedBoost += StatigelArmor.SetBonusJumpSpeedBoost; } public override void UpdateEquip(Player player) { - player.GetDamage() += 0.1f; - player.GetCritChance() += 7; - player.manaCost *= 0.9f; - player.statManaMax2 += 40; + player.GetDamage() += MagicDamageBoost; + player.GetCritChance() += MagicCritBoost; + player.manaCost -= ManaCostReduction; + player.statManaMax2 += MaxManaBoost; } public override void AddRecipes() diff --git a/Items/Armor/Statigel/StatigelHeadMelee.cs b/Items/Armor/Statigel/StatigelHeadMelee.cs index 078d4805df..00a259ecdb 100644 --- a/Items/Armor/Statigel/StatigelHeadMelee.cs +++ b/Items/Armor/Statigel/StatigelHeadMelee.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Statigel @@ -12,6 +13,15 @@ namespace CalamityMod.Items.Armor.Statigel public class StatigelHeadMelee : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MeleeDamageBoost = 0.1f; + public static float MeleeSpeedBoost = 0.1f; // NOTE: Tooltip shares this number with damage % as they're equal + public static int MeleeCritBoost = 7; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MeleeDamageBoost.ToPercent(), MeleeCritBoost); + + // Set Bonus + public static int SetBonusAggroBoost = 400; + public override void SetDefaults() { Item.width = 18; @@ -28,20 +38,21 @@ namespace CalamityMod.Items.Armor.Statigel public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = this.GetLocalizedValue("SetBonus") + + "\n" + CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(StatigelArmor.SetBonusHurtDamageThreshold, StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent()); var modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.GetJumpState().Enable(); - Player.jumpHeight += 5; - player.jumpSpeedBoost += 0.6f; - player.aggro += 400; + Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15); + player.jumpSpeedBoost += StatigelArmor.SetBonusJumpSpeedBoost; + player.aggro += SetBonusAggroBoost; } public override void UpdateEquip(Player player) { - player.GetDamage() += 0.1f; - player.GetCritChance() += 7; - player.GetAttackSpeed() += 0.1f; + player.GetDamage() += MeleeDamageBoost; + player.GetCritChance() += MeleeCritBoost; + player.GetAttackSpeed() += MeleeSpeedBoost; } public override void AddRecipes() diff --git a/Items/Armor/Statigel/StatigelHeadRanged.cs b/Items/Armor/Statigel/StatigelHeadRanged.cs index 25820004c8..d3fccc6ec9 100644 --- a/Items/Armor/Statigel/StatigelHeadRanged.cs +++ b/Items/Armor/Statigel/StatigelHeadRanged.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Statigel @@ -12,6 +13,11 @@ namespace CalamityMod.Items.Armor.Statigel public class StatigelHeadRanged : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float RangedDamageBoost = 0.1f; + public static int RangedCritBoost = 7; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost); + public override void SetDefaults() { Item.width = 18; @@ -28,18 +34,18 @@ namespace CalamityMod.Items.Armor.Statigel public override void UpdateArmorSet(Player player) { - player.setBonus = CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(StatigelArmor.SetBonusHurtDamageThreshold, StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent()); var modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.GetJumpState().Enable(); - Player.jumpHeight += 5; - player.jumpSpeedBoost += 0.6f; + Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15); + player.jumpSpeedBoost += StatigelArmor.SetBonusJumpSpeedBoost; } public override void UpdateEquip(Player player) { - player.GetDamage() += 0.1f; - player.GetCritChance() += 7; + player.GetDamage() += RangedDamageBoost; + player.GetCritChance() += RangedCritBoost; } public override void AddRecipes() diff --git a/Items/Armor/Statigel/StatigelHeadRogue.cs b/Items/Armor/Statigel/StatigelHeadRogue.cs index fab0c20533..5823f004f8 100644 --- a/Items/Armor/Statigel/StatigelHeadRogue.cs +++ b/Items/Armor/Statigel/StatigelHeadRogue.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Statigel @@ -12,6 +13,15 @@ namespace CalamityMod.Items.Armor.Statigel public class StatigelHeadRogue : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float RogueDamageBoost = 0.1f; + public static int RogueCritBoost = 7; + public static float MoveSpeedBoost = 0.05f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, MoveSpeedBoost.ToPercent()); + + // Set Bonus + public static float SetBonusRogueStealth = 0.9f; + public override void SetDefaults() { Item.width = 18; @@ -28,21 +38,22 @@ namespace CalamityMod.Items.Armor.Statigel public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth()) + + "\n" + CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(StatigelArmor.SetBonusHurtDamageThreshold, StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent()); var modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.GetJumpState().Enable(); - modPlayer.rogueStealthMax += 0.9f; + modPlayer.rogueStealthMax += SetBonusRogueStealth; modPlayer.wearingRogueArmor = true; - Player.jumpHeight += 5; - player.jumpSpeedBoost += 0.6f; + Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15); + player.jumpSpeedBoost += StatigelArmor.SetBonusJumpSpeedBoost; } public override void UpdateEquip(Player player) { - player.GetDamage() += 0.1f; - player.GetCritChance() += 7; - player.moveSpeed += 0.05f; + player.GetDamage() += RogueDamageBoost; + player.GetCritChance() += RogueCritBoost; + player.moveSpeed += MoveSpeedBoost; } public override void AddRecipes() diff --git a/Items/Armor/Statigel/StatigelHeadSummon.cs b/Items/Armor/Statigel/StatigelHeadSummon.cs index 44b9d4b2f4..c61d6237cb 100644 --- a/Items/Armor/Statigel/StatigelHeadSummon.cs +++ b/Items/Armor/Statigel/StatigelHeadSummon.cs @@ -16,6 +16,12 @@ namespace CalamityMod.Items.Armor.Statigel public class StatigelHeadSummon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float SummonKBBoost = 1.5f; + + // Set Bonus + public static float SetBonusSummonDamageBoost = 0.18f; + public static int SetBonusMinionSlotBoost = 1; public static int SlimeDamage = 18; public override void SetDefaults() @@ -34,15 +40,16 @@ namespace CalamityMod.Items.Armor.Statigel public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem("CommonSetBonus"); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusSummonDamageBoost.ToPercent(), SetBonusMinionSlotBoost) + + "\n" + CalamityUtils.GetTextFromModItem("CommonSetBonus").Format(StatigelArmor.SetBonusHurtDamageThreshold, StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent()); var modPlayer = player.Calamity(); modPlayer.statigelSet = true; modPlayer.slimeGod = true; player.GetJumpState().Enable(); - Player.jumpHeight += 5; - player.jumpSpeedBoost += 0.6f; - player.GetDamage() += 0.18f; - player.maxMinions++; + Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15); + player.jumpSpeedBoost += StatigelArmor.SetBonusJumpSpeedBoost; + player.GetDamage() += SetBonusSummonDamageBoost; + player.maxMinions += SetBonusMinionSlotBoost; if (player.whoAmI == Main.myPlayer) { var source = player.GetSource_Accessory(Item); @@ -64,10 +71,7 @@ namespace CalamityMod.Items.Armor.Statigel } } - public override void UpdateEquip(Player player) - { - player.GetKnockback() += 1.5f; - } + public override void UpdateEquip(Player player) => player.GetKnockback() += SummonKBBoost; public override void AddRecipes() { diff --git a/Items/Armor/Sulphurous/SulphurousBreastplate.cs b/Items/Armor/Sulphurous/SulphurousBreastplate.cs index bf6118be31..4ea81c11f6 100644 --- a/Items/Armor/Sulphurous/SulphurousBreastplate.cs +++ b/Items/Armor/Sulphurous/SulphurousBreastplate.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Placeables.Abyss; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Sulphurous @@ -11,6 +12,11 @@ namespace CalamityMod.Items.Armor.Sulphurous public class SulphurousBreastplate : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float RogueDamageBoost = 0.06f; + public static int RogueCritBoost = 4; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost); + public override void SetDefaults() { Item.width = 24; @@ -22,8 +28,8 @@ namespace CalamityMod.Items.Armor.Sulphurous public override void UpdateEquip(Player player) { - player.GetDamage() += 0.06f; - player.GetCritChance() += 4; + player.GetDamage() += RogueDamageBoost; + player.GetCritChance() += RogueCritBoost; } public override void AddRecipes() diff --git a/Items/Armor/Sulphurous/SulphurousHelmet.cs b/Items/Armor/Sulphurous/SulphurousHelmet.cs index 5f7dfb45c1..b51341ccb6 100644 --- a/Items/Armor/Sulphurous/SulphurousHelmet.cs +++ b/Items/Armor/Sulphurous/SulphurousHelmet.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Abyss; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Sulphurous @@ -13,6 +14,15 @@ namespace CalamityMod.Items.Armor.Sulphurous public class SulphurousHelmet : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float RogueDamageBoost = 0.04f; + public static int RogueCritBoost = 2; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost); + + // Set Bonus + public static float SetBonusRogueStealth = 0.65f; + public static int BubbleDamage = 20; + public override void SetDefaults() { Item.width = 26; @@ -29,19 +39,19 @@ namespace CalamityMod.Items.Armor.Sulphurous public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalizedValue("SetBonus"); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth()); var modPlayer = player.Calamity(); modPlayer.sulphurSet = true; player.GetJumpState().Enable(); - modPlayer.rogueStealthMax += 0.65f; + modPlayer.rogueStealthMax += SetBonusRogueStealth; modPlayer.wearingRogueArmor = true; player.ignoreWater = true; } public override void UpdateEquip(Player player) { - player.GetDamage() += 0.04f; - player.GetCritChance() += 2; + player.GetDamage() += RogueDamageBoost; + player.GetCritChance() += RogueCritBoost; if (player.Calamity().countsAsAnyWet) player.gills = true; } diff --git a/Items/Armor/Sulphurous/SulphurousLeggings.cs b/Items/Armor/Sulphurous/SulphurousLeggings.cs index ebca7b0c38..3ecac0ae25 100644 --- a/Items/Armor/Sulphurous/SulphurousLeggings.cs +++ b/Items/Armor/Sulphurous/SulphurousLeggings.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Placeables.Abyss; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Sulphurous @@ -11,6 +12,11 @@ namespace CalamityMod.Items.Armor.Sulphurous public class SulphurousLeggings : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MoveSpeedBoost = 0.1f; + public static float SubmergedMoveSpeedBoostBuff = 0.25f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent(), SubmergedMoveSpeedBoostBuff.ToPercent()); + public override void SetDefaults() { Item.width = 22; @@ -20,10 +26,7 @@ namespace CalamityMod.Items.Armor.Sulphurous Item.rare = ItemRarityID.Green; } - public override void UpdateEquip(Player player) - { - player.moveSpeed += player.Calamity().countsAsAnyWet ? 0.35f : 0.1f; - } + public override void UpdateEquip(Player player) => player.moveSpeed += MoveSpeedBoost + (player.Calamity().countsAsAnyWet ? SubmergedMoveSpeedBoostBuff : 0f); public override void AddRecipes() { diff --git a/Items/Armor/Wulfrum/WulfrumSet.cs b/Items/Armor/Wulfrum/WulfrumSet.cs index e2b18a90f5..37234b5ce7 100644 --- a/Items/Armor/Wulfrum/WulfrumSet.cs +++ b/Items/Armor/Wulfrum/WulfrumSet.cs @@ -35,7 +35,13 @@ namespace CalamityMod.Items.Armor.Wulfrum public static readonly SoundStyle SetBreakSound = new("CalamityMod/Sounds/Custom/AbilitySounds/WulfrumBastionBreak"); public static readonly SoundStyle SetBreakSoundSafe = new("CalamityMod/Sounds/Custom/AbilitySounds/WulfrumBastionBreakSafely"); - public static int MinionSlotBoost = 1; + public static float SummonDamageBoost = 0.05f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(SummonDamageBoost.ToPercent()); + + // Set Bonus + public static int SetBonusMinionSlotBoost = 1; + public static int BastionDefenseBoost = 13; + public static float BastionDRBoost = 0.1f; public static int BastionBuildTime = (int)(0.55f * 60); public static int BastionTime = 30 * 60; public static int TimeLostPerHit = 2 * 60; @@ -132,8 +138,8 @@ namespace CalamityMod.Items.Armor.Wulfrum armorPlayer.wulfrumSet = true; - player.setBonus = this.GetLocalization("SetBonus").Format(MinionSlotBoost); //The cooler part of the set bonus happens in modifytooltips because I can't recolor it otherwise. Madge - player.maxMinions += MinionSlotBoost; + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost); //The cooler part of the set bonus happens in modifytooltips because I can't recolor it otherwise. Madge + player.maxMinions += SetBonusMinionSlotBoost; if (PowerModeEngaged(player, out var cd)) { if (cd.timeLeft == BastionCooldown + BastionTime) @@ -142,8 +148,8 @@ namespace CalamityMod.Items.Armor.Wulfrum } //Stats - player.statDefense += 13; - player.endurance += 0.1f; + player.statDefense += BastionDefenseBoost; + player.endurance += BastionDRBoost; //Can't account for previous fullbody transformations but at this point, whatever bool transformed = player.Transformation().Type == ItemType(); @@ -253,10 +259,7 @@ namespace CalamityMod.Items.Armor.Wulfrum } public override void ModifyTooltips(List tooltips) => ModifySetTooltips(this, tooltips); - public override void UpdateEquip(Player player) - { - player.GetDamage() += 0.05f; - } + public override void UpdateEquip(Player player) => player.GetDamage() += SummonDamageBoost; public override void AddRecipes() { @@ -273,6 +276,10 @@ namespace CalamityMod.Items.Armor.Wulfrum public class WulfrumJacket : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float SummonDamageBoost = 0.05f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(SummonDamageBoost.ToPercent()); + public override void SetStaticDefaults() { if (!Main.dedServ) @@ -294,10 +301,7 @@ namespace CalamityMod.Items.Armor.Wulfrum public override void ModifyTooltips(List tooltips) => WulfrumHat.ModifySetTooltips(this, tooltips); - public override void UpdateEquip(Player player) - { - player.GetDamage() += 0.05f; - } + public override void UpdateEquip(Player player) => player.GetDamage() += SummonDamageBoost; public override void AddRecipes() { @@ -314,6 +318,10 @@ namespace CalamityMod.Items.Armor.Wulfrum public class WulfrumOveralls : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; + + public static float MoveSpeedBoost = 0.05f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent()); + public override void SetDefaults() { Item.width = 18; @@ -329,10 +337,8 @@ namespace CalamityMod.Items.Armor.Wulfrum } } public override void ModifyTooltips(List tooltips) => WulfrumHat.ModifySetTooltips(this, tooltips); - public override void UpdateEquip(Player player) - { - player.moveSpeed += 0.05f; - } + + public override void UpdateEquip(Player player) => player.moveSpeed += MoveSpeedBoost; public override void AddRecipes() { @@ -347,10 +353,6 @@ namespace CalamityMod.Items.Armor.Wulfrum public class WulfrumArmorPlayer : ModPlayer { - public static int BastionShootDamage = 10; - public static float BastionShootSpeed = 18f; - public static int BastionShootTime = 10; - public bool wulfrumSet = false; public override void ResetEffects() diff --git a/Items/BaseItems/TransformationAccessory.cs b/Items/BaseItems/TransformationAccessory.cs index 01af6d62e9..f929462815 100644 --- a/Items/BaseItems/TransformationAccessory.cs +++ b/Items/BaseItems/TransformationAccessory.cs @@ -84,11 +84,13 @@ namespace CalamityMod.Items.BaseItems { public override void Load() { + On_Player.ResetVisibleAccessories += ResetTransformation; On_Player.UpdateVisibleAccessory += SetTransformationItem; } internal TransformationAccessory currentTransformation = null; - int prevSlot = -1; + int previousHighest = -1; + int currentHighest = -1; public int Type { @@ -107,20 +109,36 @@ namespace CalamityMod.Items.BaseItems } } + private void ResetTransformation(On_Player.orig_ResetVisibleAccessories orig, Player self) + { + orig(self); + + Reset(self); + } + + private void Reset(Player p) + { + previousHighest = currentHighest; + currentHighest = -1; + + if (p.Transformation().currentTransformation != null && !p.Transformation().currentTransformation.IsForced) + p.Transformation().currentTransformation = null; + } + private void SetTransformationItem(On_Player.orig_UpdateVisibleAccessory orig, Player self, int itemSlot, Item item, bool modded) { orig(self, itemSlot, item, modded); if (self.Transformation().currentTransformation == null || !self.Transformation().currentTransformation.IsForced) { - if (self.Transformation().prevSlot > itemSlot) //determines if we're on the first visible slot (as this isnt called on non-visible slots) - self.Transformation().currentTransformation = null; - if (item.ModItem is TransformationAccessory transformation && transformation.ShouldTransform.Invoke(self) && (currentTransformation == null || transformation.Priority >= currentTransformation.Priority)) self.Transformation().currentTransformation = transformation; } - if (self.Transformation().currentTransformation != null && itemSlot == 19) // last item slot, can set equip slots to our transformation if one is equipped + if (currentHighest < itemSlot) + currentHighest = itemSlot; + + if (self.Transformation().currentTransformation != null && itemSlot == previousHighest) // last item slot, can set equip slots to our transformation if one is equipped { TransformationAccessory trans = self.Transformation().currentTransformation; bool[] list = new bool[15]; @@ -133,11 +151,9 @@ namespace CalamityMod.Items.BaseItems list[(int)Type] = true; } } - if(trans.ShouldHideAccessories) + if (trans.ShouldHideAccessories) self.HideAccessories(); } - - self.Transformation().prevSlot = itemSlot; } public override void UpdateAutopause() @@ -151,6 +167,8 @@ namespace CalamityMod.Items.BaseItems SetEquipSlot(Player, EquipType.Head, Mod, name); } } + + Reset(Player); } public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 12e734b8d4..431433dbde 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -716,41 +716,6 @@ namespace CalamityMod.Items { return false; } - if (player.ActiveItem().type == ModContent.ItemType()) - { - bool hasBlades = false; - foreach (Projectile p in Main.ActiveProjectiles) - { - if (p.type == ModContent.ProjectileType() && p.owner == player.whoAmI && p.localAI[1] == 0f) - { - hasBlades = true; - break; - } - } - if (hasBlades) - { - foreach (Projectile p in Main.ActiveProjectiles) - { - if (p.ModProjectile is IgneousBlade) - { - if (p.ModProjectile().Firing) - continue; - } - if (p.type == ModContent.ProjectileType() && p.owner == player.whoAmI && p.localAI[1] == 0f) - { - p.rotation = MathHelper.PiOver2 + MathHelper.PiOver4; - // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction - p.velocity = p.SafeDirectionTo(Main.MouseWorld, Vector2.UnitY) * 22f; - p.rotation += p.velocity.ToRotation(); - p.ai[0] = 180f; - p.ModProjectile().Firing = true; - p.tileCollide = true; - p.netUpdate = true; - } - } - } - return false; - } if (player.ActiveItem().type == ModContent.ItemType() && player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) { foreach (Projectile p in Main.ActiveProjectiles) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 0456e7c775..1ac0abc245 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -980,64 +980,8 @@ namespace CalamityMod.Items EditTooltipByNum(1, (line) => line.Text = EditedTooltip("Gi")); #endregion - // Pre-Hardmode ore armor tooltip edits - #region Pre-Hardmode Ore Armor - // Copper - if (item.type == ItemID.CopperHelmet) - AddTooltip("CopperHelmet"); - if (item.type == ItemID.CopperChainmail) - AddTooltip("CopperChainmail"); - if (item.type == ItemID.CopperGreaves) - AddTooltip("CopperGreaves"); - - // Tin - if (item.type == ItemID.TinHelmet) - AddTooltip("TinHelmet"); - if (item.type == ItemID.TinChainmail) - AddTooltip("TinChainmail"); - if (item.type == ItemID.TinGreaves) - AddTooltip("TinGreaves"); - - // Iron - if (item.type == ItemID.IronHelmet || item.type == ItemID.AncientIronHelmet || item.type == ItemID.IronChainmail || item.type == ItemID.IronGreaves) - AddTooltip("IronPieces"); - - // Lead - if (item.type == ItemID.LeadHelmet || item.type == ItemID.LeadChainmail || item.type == ItemID.LeadGreaves) - AddTooltip("LeadPieces"); - - // Silver - if (item.type == ItemID.SilverHelmet) - AddTooltip("SilverHelmet"); - if (item.type == ItemID.SilverChainmail) - AddTooltip("SilverChainmail"); - if (item.type == ItemID.SilverGreaves) - AddTooltip("SilverGreaves"); - - // Tungsten - if (item.type == ItemID.TungstenHelmet) - AddTooltip("TungstenHelmet"); - if (item.type == ItemID.TungstenChainmail) - AddTooltip("TungstenChainmail"); - if (item.type == ItemID.TungstenGreaves) - AddTooltip("TungstenGreaves"); - - // Gold - if (item.type == ItemID.GoldHelmet || item.type == ItemID.AncientGoldHelmet) - AddTooltip("GoldHelmet"); - if (item.type == ItemID.GoldChainmail) - AddTooltip("GoldChainmail"); - if (item.type == ItemID.GoldGreaves) - AddTooltip("GoldGreaves"); - - // Platinum - if (item.type == ItemID.PlatinumHelmet) - AddTooltip("PlatinumHelmet"); - if (item.type == ItemID.PlatinumChainmail) - AddTooltip("PlatinumChainmail"); - if (item.type == ItemID.PlatinumGreaves) - AddTooltip("PlatinumGreaves"); - + // Pre-Hardmode armor tooltip edits + #region Pre-Hardmode Armor // Jungle if (item.type == ItemID.JungleHat || item.type == ItemID.AncientCobaltHelmet) { @@ -1065,7 +1009,7 @@ namespace CalamityMod.Items #endregion // Hardmode armor tooltip edits - #region Hardmode Ore Armor + #region Hardmode Armor // Cobalt if (item.type == ItemID.CobaltHat) EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("40", $"{CobaltArmorSetChange.MaxManaBoost + 40}")); diff --git a/Items/Placeables/FurnitureDriftwood/DriftwoodToilet.cs b/Items/Placeables/FurnitureDriftwood/DriftwoodToilet.cs new file mode 100644 index 0000000000..5b5863386e --- /dev/null +++ b/Items/Placeables/FurnitureDriftwood/DriftwoodToilet.cs @@ -0,0 +1,25 @@ +using CalamityMod.Items.Placeables.SunkenSea; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureDriftwood +{ + public class DriftwoodToilet : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 30); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.Sawmill). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureDriftwood/DriftwoodToilet.png b/Items/Placeables/FurnitureDriftwood/DriftwoodToilet.png new file mode 100644 index 0000000000..65321ca8fb Binary files /dev/null and b/Items/Placeables/FurnitureDriftwood/DriftwoodToilet.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.cs new file mode 100644 index 0000000000..64be4794f6 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumBathtub : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 60); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(14). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.png new file mode 100644 index 0000000000..c8ab44889a Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.cs new file mode 100644 index 0000000000..ed8a99ea65 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.cs @@ -0,0 +1,27 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumBookcase : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 60); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(20). + AddIngredient(ItemID.Book, 10). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.png new file mode 100644 index 0000000000..57cf58bd96 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.cs new file mode 100644 index 0000000000..d04b562a4e --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumChair : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 30); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.png new file mode 100644 index 0000000000..649e6f9e82 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.cs new file mode 100644 index 0000000000..eb2fb6771d --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.cs @@ -0,0 +1,27 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumChandelier : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(silver: 1); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Torch, 4). + AddIngredient(ItemID.Chain). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.png new file mode 100644 index 0000000000..94b71006d0 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.cs new file mode 100644 index 0000000000..c1c7bb64ee --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumChest : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(silver: 1); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(8). + AddRecipeGroup("IronBar", 2). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.png new file mode 100644 index 0000000000..44df951fe5 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock.png new file mode 100644 index 0000000000..7cb80254aa Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.cs new file mode 100644 index 0000000000..8c7552f15a --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumDeskLight : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 60); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Torch). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.png new file mode 100644 index 0000000000..fad6a339c0 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoor.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoor.cs new file mode 100644 index 0000000000..ce83c9ec11 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoor.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumDoor : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 40); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(6). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoor.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoor.png new file mode 100644 index 0000000000..dd4f7de09c Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoor.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.cs new file mode 100644 index 0000000000..c82c096651 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumDresser : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(silver: 1); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(16). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.png new file mode 100644 index 0000000000..b0f8cc58c4 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.cs new file mode 100644 index 0000000000..6f56e7c777 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.cs @@ -0,0 +1,25 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumJukebox : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 60); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(15). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.png new file mode 100644 index 0000000000..672db05d5a Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.cs new file mode 100644 index 0000000000..1ddefb27c5 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumLamp : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(silver: 1); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.Torch). + AddIngredient(3). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.png new file mode 100644 index 0000000000..a19882f1b3 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.cs new file mode 100644 index 0000000000..8f6b1827e4 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumLantern : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 30); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(6). + AddIngredient(ItemID.Torch). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.png new file mode 100644 index 0000000000..8e530f9b95 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.cs new file mode 100644 index 0000000000..2d648a7bb2 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumSink : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 60); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(6). + AddIngredient(ItemID.WaterBucket). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.png new file mode 100644 index 0000000000..c96f440a2b Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.cs new file mode 100644 index 0000000000..8997e8eb42 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumSleepingPod : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(silver: 4); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(15). + AddIngredient(ItemID.Silk, 5). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.png new file mode 100644 index 0000000000..b438294241 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.cs new file mode 100644 index 0000000000..f528d0b28a --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumSofa : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 60); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Silk, 2). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.png new file mode 100644 index 0000000000..c848b79b7c Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.cs new file mode 100644 index 0000000000..9e8d8a9930 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.cs @@ -0,0 +1,25 @@ + +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumTable : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 60); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(8). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.png new file mode 100644 index 0000000000..b24d120326 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.cs new file mode 100644 index 0000000000..dab6cf1138 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.cs @@ -0,0 +1,26 @@ + +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumToilet : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 30); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.png new file mode 100644 index 0000000000..5483bcf85a Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.png differ diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.cs b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.cs new file mode 100644 index 0000000000..89f6c53624 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.SunkenSea; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumWorkBench : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.value = Item.sellPrice(copper: 30); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(10). + AddTile(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.png b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.png new file mode 100644 index 0000000000..b066974f66 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.png differ diff --git a/Items/Placeables/Walls/AncientSmoothNavystoneWall .cs b/Items/Placeables/Walls/AncientSmoothNavystoneWall .cs new file mode 100644 index 0000000000..7de0d88898 --- /dev/null +++ b/Items/Placeables/Walls/AncientSmoothNavystoneWall .cs @@ -0,0 +1,25 @@ +using CalamityMod.Items.Placeables.FurnitureEutrophic; +using Terraria.ID; +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; +namespace CalamityMod.Items.Placeables.Walls +{ + public class AncientSmoothNavystoneWall : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 400; + } + + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + + public override void AddRecipes() + { + CreateRecipe(4). + AddIngredient(). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/Walls/AncientSmoothNavystoneWall.png b/Items/Placeables/Walls/AncientSmoothNavystoneWall.png new file mode 100644 index 0000000000..d867a30eb6 Binary files /dev/null and b/Items/Placeables/Walls/AncientSmoothNavystoneWall.png differ diff --git a/Items/Placeables/Walls/SmoothNavystoneWall.png b/Items/Placeables/Walls/SmoothNavystoneWall.png index d867a30eb6..d58aa5330c 100644 Binary files a/Items/Placeables/Walls/SmoothNavystoneWall.png and b/Items/Placeables/Walls/SmoothNavystoneWall.png differ diff --git a/Items/VanillaArmorChanges/CopperArmorSetChange.cs b/Items/VanillaArmorChanges/CopperArmorSetChange.cs index fbf35b1549..6f4d3ea46a 100644 --- a/Items/VanillaArmorChanges/CopperArmorSetChange.cs +++ b/Items/VanillaArmorChanges/CopperArmorSetChange.cs @@ -1,5 +1,4 @@ -using System.Text; -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,20 +14,11 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Copper"; - public const float HeadDamage = 0.05f; - public const float ChestCrit = 3f; - public const float LegsMoveSpeed = 0.05f; public const float SetBonusFlatDamage = 2.0f; - public override void ApplyHeadPieceEffect(Player player) => player.GetDamage() += HeadDamage; - - public override void ApplyBodyPieceEffect(Player player) => player.GetCritChance() += ChestCrit; - - public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed; - public override void UpdateSetBonusText(ref string setBonusText) { - setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusFlatDamage.ToString("N0"))}"; } public override void ApplyArmorSetBonus(Player player) diff --git a/Items/VanillaArmorChanges/GoldArmorSetChange.cs b/Items/VanillaArmorChanges/GoldArmorSetChange.cs index fbb7771b69..9b34eb9fc9 100644 --- a/Items/VanillaArmorChanges/GoldArmorSetChange.cs +++ b/Items/VanillaArmorChanges/GoldArmorSetChange.cs @@ -17,23 +17,14 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Gold"; - public const float HeadDamage = 0.05f; - public const float ChestDR = 0.05f; - public const float LegsMoveSpeed = 0.1f; public const float GoldDropChanceFromEnemies = 0.02f; public const int GoldFromBosses = 3; - public const float SetBonusCritPerGoldCoin = 0.1f; // 10 gold coins = +1% crit chance - public const float MaximumCritBonus = 7f; - - public override void ApplyHeadPieceEffect(Player player) => player.GetDamage() += HeadDamage; - - public override void ApplyBodyPieceEffect(Player player) => player.endurance += ChestDR; - - public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed; + public const float SetBonusCritPerGoldCoin = 0.2f; // 5 gold coins = +1% crit chance + public const float MaximumCritBonus = 5f; public override void UpdateSetBonusText(ref string setBonusText) { - setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(GoldDropChanceFromEnemies.ToPercent(), GoldFromBosses, SetBonusCritPerGoldCoin, MaximumCritBonus)}"; } public override void ApplyArmorSetBonus(Player player) diff --git a/Items/VanillaArmorChanges/IronArmorSetChange.cs b/Items/VanillaArmorChanges/IronArmorSetChange.cs index ea739abcf5..3906498ffb 100644 --- a/Items/VanillaArmorChanges/IronArmorSetChange.cs +++ b/Items/VanillaArmorChanges/IronArmorSetChange.cs @@ -1,6 +1,6 @@ -using System.Text; -using Terraria; +using Terraria; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.VanillaArmorChanges { @@ -16,25 +16,16 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Iron"; - public const float ArmorPieceDR = 0.03f; - public const float SetBonusDR = 0.06f; - public const int SetBonusLifeRegen = 2; - - public override void ApplyHeadPieceEffect(Player player) => player.endurance += ArmorPieceDR; - - public override void ApplyBodyPieceEffect(Player player) => player.endurance += ArmorPieceDR; - - public override void ApplyLegPieceEffect(Player player) => player.endurance += ArmorPieceDR; + public const float KnockbackMultiplier = 1.5f; public override void UpdateSetBonusText(ref string setBonusText) { - setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(KnockbackMultiplier)}"; } public override void ApplyArmorSetBonus(Player player) { - player.endurance += SetBonusDR; - player.lifeRegen += SetBonusLifeRegen; + player.GetKnockback() *= KnockbackMultiplier; } } } diff --git a/Items/VanillaArmorChanges/LeadArmorSetChange.cs b/Items/VanillaArmorChanges/LeadArmorSetChange.cs index 4fc7541f41..07dfe7c7e6 100644 --- a/Items/VanillaArmorChanges/LeadArmorSetChange.cs +++ b/Items/VanillaArmorChanges/LeadArmorSetChange.cs @@ -13,16 +13,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Lead"; - public const float ArmorPieceDR = 0.02f; - public const float SetBonusDR = 0.04f; - public const int SetBonusLifeRegen = 1; - - public override void ApplyHeadPieceEffect(Player player) => player.endurance += ArmorPieceDR; - - public override void ApplyBodyPieceEffect(Player player) => player.endurance += ArmorPieceDR; - - public override void ApplyLegPieceEffect(Player player) => player.endurance += ArmorPieceDR; - public override void UpdateSetBonusText(ref string setBonusText) { setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; @@ -30,8 +20,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyArmorSetBonus(Player player) { - player.endurance += SetBonusDR; - player.lifeRegen += SetBonusLifeRegen; player.noKnockback = true; } } diff --git a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs index 18fee450a0..ace816e610 100644 --- a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs +++ b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs @@ -1,7 +1,5 @@ -using System; -using Terraria; +using Terraria; using Terraria.ID; -using Terraria.ModLoader; namespace CalamityMod.Items.VanillaArmorChanges { @@ -15,34 +13,16 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Platinum"; - public const float HeadDamage = 0.06f; - public const float ChestCrit = 3f; - public const float LegsMoveSpeed = 0.1f; - public const float SetBonusDamagePerDefense = 0.1f; // 10 defense = +1% damage, this gets divided by 100 - public const int SetBonusDefenseCap = 50; - - public override void ApplyHeadPieceEffect(Player player) => player.GetDamage() += HeadDamage; - - public override void ApplyBodyPieceEffect(Player player) => player.GetCritChance() += ChestCrit; - - public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed; + public const float SetBonusDR = 0.1f; public override void UpdateSetBonusText(ref string setBonusText) { - setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusDR.ToPercent())}"; } public override void ApplyArmorSetBonus(Player player) { - // 07MAY2024: Ozzatron: Platinum armor doesn't count its own defense for its set bonus - // CIT 1MAR2025: Platinum armor should not count its set bonus defense here, because it hasn't been applied yet - int defenseBesidesThisArmor = player.statDefense - (5 + 6 + 5); - if (defenseBesidesThisArmor <= 0) - return; - - if (defenseBesidesThisArmor > SetBonusDefenseCap) - defenseBesidesThisArmor = SetBonusDefenseCap; - player.GetDamage() += (float)Math.Floor(defenseBesidesThisArmor * SetBonusDamagePerDefense) * 0.01f; + player.endurance += SetBonusDR; } } } diff --git a/Items/VanillaArmorChanges/SilverArmorSetChange.cs b/Items/VanillaArmorChanges/SilverArmorSetChange.cs index 9c9bc580e9..05372ca492 100644 --- a/Items/VanillaArmorChanges/SilverArmorSetChange.cs +++ b/Items/VanillaArmorChanges/SilverArmorSetChange.cs @@ -16,29 +16,17 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Silver"; - public const float HeadCrit = 5f; - public const int ChestLifeRegen = 2; - public const float LegsMoveSpeed = 0.08f; - public const int SetBonusLifeRegen = 1; - public const double SetBonusMinimumDamageToHeal = 20.0; public const int SetBonusHealTime = 120; public const int SetBonusHealAmount = 10; - public override void ApplyHeadPieceEffect(Player player) => player.GetCritChance() += HeadCrit; - - public override void ApplyBodyPieceEffect(Player player) => player.lifeRegen += ChestLifeRegen; - - public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed; - public override void UpdateSetBonusText(ref string setBonusText) { - setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusHealTime.FramesToSeconds(), SetBonusMinimumDamageToHeal.ToString("N0"), SetBonusHealAmount)}"; } public override void ApplyArmorSetBonus(Player player) { - player.lifeRegen += SetBonusLifeRegen; player.Calamity().silverMedkit = true; } diff --git a/Items/VanillaArmorChanges/TinArmorSetChange.cs b/Items/VanillaArmorChanges/TinArmorSetChange.cs index 12a2c7f88e..a46b8b9f21 100644 --- a/Items/VanillaArmorChanges/TinArmorSetChange.cs +++ b/Items/VanillaArmorChanges/TinArmorSetChange.cs @@ -1,5 +1,4 @@ -using System.Text; -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,25 +14,16 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Tin"; - public const float HeadCrit = 4f; - public const int ChestLifeRegen = 1; - public const float LegsMoveSpeed = 0.05f; - public const float SetBonusArmorPen = 5.0f; - - public override void ApplyHeadPieceEffect(Player player) => player.GetCritChance() += HeadCrit; - - public override void ApplyBodyPieceEffect(Player player) => player.lifeRegen += ChestLifeRegen; - - public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed; + public const float SetBonusCrit = 10f; public override void UpdateSetBonusText(ref string setBonusText) { - setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusCrit)}"; } public override void ApplyArmorSetBonus(Player player) { - player.GetArmorPenetration() += SetBonusArmorPen; + player.GetCritChance() += SetBonusCrit; } } } diff --git a/Items/VanillaArmorChanges/TungstenArmorSetChange.cs b/Items/VanillaArmorChanges/TungstenArmorSetChange.cs index 50c4be4121..fc4a333b7e 100644 --- a/Items/VanillaArmorChanges/TungstenArmorSetChange.cs +++ b/Items/VanillaArmorChanges/TungstenArmorSetChange.cs @@ -1,6 +1,4 @@ -using System.Text; -using Microsoft.Xna.Framework; -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -16,37 +14,16 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Tungsten"; - public const float HeadDamage = 0.07f; - public const int ChestLifeRegen = 1; - public const float LegsMoveSpeed = 0.08f; - public const float KnockbackMultiplier = 1.33f; - public const float MaxKnockbackCritConversion = 10f; - - public override void ApplyHeadPieceEffect(Player player) => player.GetDamage() += HeadDamage; - - public override void ApplyBodyPieceEffect(Player player) => player.lifeRegen += ChestLifeRegen; - - public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed; + public const float HookBoost = 0.5f; public override void UpdateSetBonusText(ref string setBonusText) { - Player player = Main.LocalPlayer; - float kb = player.GetWeaponKnockback(player.ActiveItem()); - float bonus = MathHelper.Clamp(kb, 0f, MaxKnockbackCritConversion); - - string bonusText = bonus.ToString("n2"); - string kbText = kb.ToString("n2"); - setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(bonusText, kbText)}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(HookBoost.ToPercent())}"; } public override void ApplyArmorSetBonus(Player player) { - // Apply the 33% knockback boost first, so it applies to the following crit boost - player.GetKnockback() *= KnockbackMultiplier; - - // Give the player crit chance equal to the (now boosted) knockback of their held weapon. - float kbToUse = player.GetWeaponKnockback(player.ActiveItem()); - player.GetCritChance() += MathHelper.Clamp(kbToUse, 0f, MaxKnockbackCritConversion); + player.Calamity().tungstenArmorHookBoost = true; } } } diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs index 1fb197c03a..e91c75a2c7 100644 --- a/Items/Weapons/Summon/IgneousExaltation.cs +++ b/Items/Weapons/Summon/IgneousExaltation.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -10,10 +11,32 @@ namespace CalamityMod.Items.Weapons.Summon { public class IgneousExaltation : ModItem, ILocalizedModType { + public static int ChargeDuration = 30; + public static int ChargeCooldown = 120; public new string LocalizationCategory => "Items.Weapons.Summon"; + private static Texture2D BladeOutline = null; + public static Texture2D GetBladeOutlineTex() + { + if (BladeOutline == null) + { + var texture = ModContent.Request("CalamityMod/Projectiles/Summon/IgneousBlade").Value; + BladeOutline = new Texture2D(Main.graphics.GraphicsDevice, texture.Width, texture.Height); + + var BaseArray = new Color[BladeOutline.Width * BladeOutline.Height]; + var ColorArray = new Color[BladeOutline.Width * BladeOutline.Height]; + texture.GetData(BaseArray); + for (var i = 0; i < BaseArray.Length; i++) + { + ColorArray[i] = new Color(255, 255, 255) * (((float)BaseArray[i].A) / 255f); + } + BladeOutline.SetData(ColorArray); + } + return BladeOutline; + } public override void SetStaticDefaults() { Item.staff[Type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() @@ -34,54 +57,42 @@ namespace CalamityMod.Items.Weapons.Summon Item.shootSpeed = 10f; Item.DamageType = DamageClass.Summon; } + + public override bool AltFunctionUse(Player player) + { + return player.ownedProjectileCounts[Item.shoot] > 0; + } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float totalMinionSlots = 0f; - foreach (Projectile pro in Main.ActiveProjectiles) + if (player.altFunctionUse == 2) { - if (pro.minion && pro.owner == player.whoAmI) + foreach (Projectile pro in Main.ActiveProjectiles) { - totalMinionSlots += pro.minionSlots; + if (pro.type == type && pro.owner == player.whoAmI && pro.ai[1] >= 0 && pro.ai[0] == 0) + { + pro.ModProjectile().CurrentState = IgneousBlade.AIState.TransitionToLaunch; + pro.netUpdate = true; + } } } - if (player.altFunctionUse != 2 && totalMinionSlots < player.maxMinions) + else { - position = player.ClampedMouseWorld(); - int p = Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI); + + int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f); if (Main.projectile.IndexInRange(p)) + { Main.projectile[p].originalDamage = Item.damage; - int swordCount = 0; + } + + int bladeIndex = 0; foreach (Projectile pro in Main.ActiveProjectiles) { if (pro.type == type && pro.owner == player.whoAmI) { - if ((pro.ModProjectile as IgneousBlade).Firing) - continue; - swordCount++; - for (int j = 0; j < 22; j++) - { - Dust dust = Dust.NewDustDirect(pro.position, pro.width, pro.height, DustID.Torch); - dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt(); - dust.noGravity = true; - } - } - } - float angleVariance = MathHelper.TwoPi / swordCount; - float angle = 0f; - foreach (Projectile pro in Main.ActiveProjectiles) - { - if (pro.type == type && pro.owner == player.whoAmI && pro.localAI[1] == 0f) - { - if ((pro.ModProjectile as IgneousBlade).Firing) - continue; - pro.ai[0] = angle; - angle += angleVariance; - for (int j = 0; j < 22; j++) - { - Dust dust = Dust.NewDustDirect(pro.position, pro.width, pro.height, DustID.Torch); - dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt(); - dust.noGravity = true; - } + pro.ModProjectile().BladeIndex = bladeIndex++; + pro.ModProjectile().AITimer = -ChargeCooldown; + pro.ModProjectile().CurrentState = IgneousBlade.AIState.CircleOwner; + pro.netUpdate = true; } } } @@ -91,6 +102,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { CreateRecipe(). + AddIngredient(). AddIngredient(10). AddIngredient(5). AddTile(TileID.MythrilAnvil). diff --git a/Localization/en-US/Mods.CalamityMod.Configs.hjson b/Localization/en-US/Mods.CalamityMod.Configs.hjson index f1558562c2..4e198237fe 100644 --- a/Localization/en-US/Mods.CalamityMod.Configs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Configs.hjson @@ -7,7 +7,6 @@ CalamityClientConfig: { UI: UI Changes MeterPositions: Meter Positions MusicToggles: Music Toggles - Multithreading: Multi-Threading } AbyssLayer3Alt: { @@ -389,21 +388,6 @@ CalamityClientConfig: { Label: "[i:Book] Wiki Status Message" Tooltip: Enable or disable the status message promoting the Official Calamity Wiki that plays on world entry. } - - MultiThreadingType: { - Label: Sunken Sea Multi-Threading Option - Tooltip: - ''' - Option 0 will disable worldgen multi-threading. - Option 1 will enable ReLogic's multi-threading. - Option 2 will enable custom multi-threading. - ''' - } - - SunkenSeaMultiThreading: { - Label: Sunken Sea Multi Threading - Tooltip: "" - } } CalamityServerConfig: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson index 89ec3d8455..d10843bc0f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson @@ -1,71 +1,71 @@ AerospecBreastplate: { DisplayName: Aerospec Breastplate - Tooltip: 3% increased damage and critical strike chance + Tooltip: "{0}% increased damage and critical strike chance" CommonSetBonus: ''' - Taking over 25 damage in one hit will cause a spread of homing feathers to fall + Taking over {0} damage in one hit will cause a spread of homing feathers to fall Allows you to fall more quickly and disables fall damage ''' } AerospecHeadMagic: { DisplayName: Aerospec Hat - Tooltip: 10% increased magic damage and +30 max mana + Tooltip: "{0}% increased magic damage and +{1} max mana" SetBonus: ''' - 8% reduced mana cost - 5% increased movement speed and magic critical strike chance + {0}% reduced mana cost + {1}% increased movement speed and magic critical strike chance ''' } AerospecHeadRogue: { DisplayName: Aerospec Headgear - Tooltip: 10% increased rogue damage and 5% increased movement speed + Tooltip: "{0}% increased rogue damage and {1}% increased movement speed" SetBonus: ''' - 5% increased movement speed and rogue critical strike chance - +80 maximum stealth + {0}% increased movement speed and rogue critical strike chance + +{1} maximum stealth ''' } AerospecHeadMelee: { DisplayName: Aerospec Helm - Tooltip: 10% increased melee damage + Tooltip: "{0}% increased melee damage" SetBonus: ''' - 5% increased movement speed and melee critical strike chance + {0}% increased movement speed and melee critical strike chance Enemies are more likely to target you ''' } AerospecHeadSummon: { DisplayName: Aerospec Helmet - Tooltip: 10% increased summon damage and 5% increased movement speed + Tooltip: "{0}% increased summon damage and {1}% increased movement speed" SetBonus: ''' - 11% increased summon damage and +1 max minion + {0}% increased summon damage and +{1} max minion Summons a valkyrie to protect you ''' } AerospecHeadRanged: { DisplayName: Aerospec Hood - Tooltip: 10% increased ranged damage - SetBonus: 5% increased movement speed and ranged critical strike chance + Tooltip: "{0}% increased ranged damage" + SetBonus: "{0}% increased movement speed and ranged critical strike chance" } AerospecLeggings: { DisplayName: Aerospec Leggings - Tooltip: 12% increased movement speed + Tooltip: "{0}% increased movement speed" } DesertProwlerHat: { DisplayName: Desert Prowler Hat - Tooltip: 4% increased rogue critical strike chance + Tooltip: "{0}% increased rogue critical strike chance" SetBonus: ''' - 5% increased rogue damage - +50 maximum stealth + {0}% increased rogue damage + +{1} maximum stealth ''' AbilityBrief: Sandsmoke Bomb - Double tap {0} to shroud yourself in a small cloud of sand AbilityDescription: @@ -79,17 +79,17 @@ DesertProwlerHat: { DesertProwlerPants: { DisplayName: Desert Prowler Pants - Tooltip: 10% increased movement speed and immunity to the Mighty Wind debuff + Tooltip: "{0}% increased movement speed and immunity to the Mighty Wind debuff" } DesertProwlerShirt: { DisplayName: Desert Prowler Shirt - Tooltip: 5% increased rogue critical strike chance + Tooltip: "{0}% increased rogue critical strike chance" } MarniteArchitectHeadgear: { DisplayName: Marnite Architect Headgear - Tooltip: Increases block placement & tool range by 5 + Tooltip: Increases block placement & tool range by {0} AbilityBrief: Marnite Lift - You can summon a lift under your feet to reach higher up AbilityDescription: ''' @@ -100,25 +100,25 @@ MarniteArchitectHeadgear: { MarniteArchitectToga: { DisplayName: Marnite Architect Toga - Tooltip: Increases block & wall placement speed by 50% + Tooltip: Increases block & wall placement speed by {0}% } SnowRuffianChestplate: { DisplayName: Snow Ruffian Chestplate - Tooltip: 4% increased ranged critical strike chance + Tooltip: "{0}% increased ranged critical strike chance" } SnowRuffianGreaves: { DisplayName: Snow Ruffian Greaves - Tooltip: 10% increased movement speed + Tooltip: "{0}% increased movement speed" } SnowRuffianMask: { DisplayName: Snow Ruffian Mask - Tooltip: 2% increased ranged damage + Tooltip: "{0}% increased ranged damage" SetBonus: ''' - 4% increased ranged damage and critical strike chance + {0}% increased ranged damage and critical strike chance You can glide to negate fall damage Ranged critical strikes frostburn enemies ''' @@ -126,26 +126,26 @@ SnowRuffianMask: { StatigelArmor: { DisplayName: Statigel Armor - Tooltip: 5% increased critical strike chance + Tooltip: "{0}% increased critical strike chance" CommonSetBonus: ''' - When you take over 100 damage in one hit you become immune to damage for an extended period of time + When you take over {0} damage in one hit you become immune to damage for an extended period of time Grants an extra jump and increased jump height - 12% increased jump speed + {1}% increased jump speed ''' } StatigelGreaves: { DisplayName: Statigel Greaves - Tooltip: 5% increased damage and movement speed + Tooltip: "{0}% increased damage and movement speed" } StatigelHeadMagic: { DisplayName: Statigel Cap Tooltip: ''' - 10% increased magic damage and 10% reduced mana cost - 7% increased magic critical strike chance and +40 max mana + {0}% increased magic damage and {1}% reduced mana cost + {2}% increased magic critical strike chance and +{3} max mana ''' } @@ -153,8 +153,8 @@ StatigelHeadMelee: { DisplayName: Statigel Helm Tooltip: ''' - 10% increased melee damage and melee speed - 7% increased melee critical strike chance + {0}% increased melee damage and melee speed + {1}% increased melee critical strike chance ''' SetBonus: Enemies are more likely to target you } @@ -163,8 +163,8 @@ StatigelHeadRanged: { DisplayName: Statigel Headgear Tooltip: ''' - 10% increased ranged damage - 7% increased ranged critical strike chance + {0}% increased ranged damage + {1}% increased ranged critical strike chance ''' } @@ -172,10 +172,10 @@ StatigelHeadRogue: { DisplayName: Statigel Mask Tooltip: ''' - 10% increased rogue damage - 7% increased rogue critical strike chance and 5% increased movement speed + {0}% increased rogue damage + {1}% increased rogue critical strike chance and {2}% increased movement speed ''' - SetBonus: +90 maximum stealth + SetBonus: +{0} maximum stealth } StatigelHeadSummon: { @@ -183,27 +183,27 @@ StatigelHeadSummon: { Tooltip: Increased minion knockback SetBonus: ''' - 18% increased summon damage and +1 max minion + {0}% increased summon damage and +{1} max minion Summons a mini paladin to fight for you, the type depends on what world evil you have ''' } SulphurousBreastplate: { DisplayName: Sulphurous Breastplate - Tooltip: 6% increased rogue damage and 4% increased rogue critical strike chance + Tooltip: "{0}% increased rogue damage and {1}% increased rogue critical strike chance" } SulphurousHelmet: { DisplayName: Sulphurous Helmet Tooltip: ''' - 4% increased rogue damage - 2% increased rogue critical strike chance + {0}% increased rogue damage + {1}% increased rogue critical strike chance Grants underwater breathing ''' SetBonus: ''' - +65 maximum stealth + +{0} maximum stealth Attacking and being attacked by enemies inflicts poison Grants an additional jump that summons a sulphurous bubble Provides increased underwater mobility and reduces the severity of the sulphuric waters @@ -214,8 +214,8 @@ SulphurousLeggings: { DisplayName: Sulphurous Leggings Tooltip: ''' - Movement speed increased by 10% - Movement speed increased an additional 25% while submerged in liquid + Movement speed increased by {0}% + Movement speed increased an additional {1}% while submerged in liquid ''' } @@ -292,10 +292,10 @@ WulfrumHat: { DisplayName: Wulfrum Hat & Goggles Tooltip: ''' - 5% increased summon damage + {0}% increased summon damage Comes equipped with hair extensions ''' - SetBonus: +1 max minion + SetBonus: +{0} max minion AbilityBrief: Wulfrum Bastion - Double tap {0} while dismounted to equip wulfrum power armor AbilityDescription: ''' @@ -307,10 +307,10 @@ WulfrumHat: { WulfrumJacket: { DisplayName: Wulfrum Jacket - Tooltip: 5% increased summon damage + Tooltip: "{0}% increased summon damage" } WulfrumOveralls: { DisplayName: Wulfrum Overalls - Tooltip: Movement speed increased by 5% + Tooltip: "{0}% increased movement speed" } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index c62fea1db5..d2bbb5520a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -82,6 +82,7 @@ PlaguebringerBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" PlagueChargerBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" PlagueshellBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" PrismBackBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" +ProbesnoutBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" ProfanedEnergyBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" RadiatorBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" ReaperSharkBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" @@ -96,6 +97,7 @@ ScryllarBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" SeaFloatyBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" SeaMinnowBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" SeaSerpentBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" +SharkoonBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" ShockstormShuttleBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" ShroombleBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" SightseerColliderBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}" @@ -892,6 +894,11 @@ KelpTorch: { Tooltip: Can be placed in water } +OldDukeMonolith: { + DisplayName: Elden Diorama + Tooltip: "" +} + OtonilouStatue: { DisplayName: Otonilou Memorial Tooltip: "" @@ -1888,6 +1895,106 @@ CosmiliteWorkBench: { Tooltip: "" } +DriftwoodBaroqueCello: { + DisplayName: Driftwood Baroque Cello + Tooltip: "" +} + +DriftwoodBathtub: { + DisplayName: Driftwood Bathtub + Tooltip: "" +} + +DriftwoodBed: { + DisplayName: Driftwood Bed + Tooltip: "" +} + +DriftwoodBookcase: { + DisplayName: Driftwood Bookcase + Tooltip: "" +} + +DriftwoodCandelabra: { + DisplayName: Driftwood Candelabra + Tooltip: "" +} + +DriftwoodCandle: { + DisplayName: Driftwood Candle + Tooltip: "" +} + +DriftwoodChair: { + DisplayName: Driftwood Chair + Tooltip: "" +} + +DriftwoodChandelier: { + DisplayName: Driftwood Chandelier + Tooltip: "" +} + +DriftwoodChest: { + DisplayName: Driftwood Chest + Tooltip: "" +} + +DriftwoodDoor: { + DisplayName: Driftwood Door + Tooltip: "" +} + +DriftwoodDresser: { + DisplayName: Driftwood Dresser + Tooltip: "" +} + +DriftwoodLamp: { + DisplayName: Driftwood Lamp + Tooltip: "" +} + +DriftwoodLantern: { + DisplayName: Driftwood Lantern + Tooltip: "" +} + +DriftwoodPlatform: { + DisplayName: Driftwood Platform + Tooltip: "" +} + +DriftwoodSink: { + DisplayName: Driftwood Sink + Tooltip: Counts as a water source +} + +DriftwoodSofa: { + DisplayName: Driftwood Sofa + Tooltip: "" +} + +DriftwoodSundial: { + DisplayName: Driftwood Sundial + Tooltip: "" +} + +DriftwoodTable: { + DisplayName: Driftwood Table + Tooltip: "" +} + +DriftwoodToilet: { + DisplayName: Driftwood Toilet + Tooltip: "" +} + +DriftwoodWorkBench: { + DisplayName: Driftwood Work Bench + Tooltip: "" +} + AncientSmoothNavystone: { DisplayName: Ancient Smooth Navystone Tooltip: "" @@ -3202,6 +3309,16 @@ VoidWorkBench: { Tooltip: "" } +ChargedWulfrumEnergyBarrier: { + DisplayName: Charged Wulfrum Energy Barrier + Tooltip: "" +} + +ChargedWulfrumWallMountedBulb: { + DisplayName: Charged Wulfrum Wall Mounted Bulb + Tooltip: "" +} + WulfrumBathtub: { DisplayName: Wulfrum Bathtub Tooltip: "" @@ -3247,6 +3364,11 @@ WulfrumDresser: { Tooltip: "" } +WulfrumEnergyBarrier: { + DisplayName: Wulfrum Energy Barrier + Tooltip: "" +} + WulfrumLamp: { DisplayName: Wulfrum Lamp Tooltip: "" @@ -3257,19 +3379,39 @@ WulfrumLantern: { Tooltip: "" } +WulfrumPanels: { + DisplayName: Wulfrum Panels + Tooltip: "" +} + WulfrumPiano: { DisplayName: Wulfrum Piano Tooltip: "" } +WulfrumPlatform: { + DisplayName: Wulfrum Platform + Tooltip: "" +} + WulfrumPlating: { DisplayName: Wulfrum Plating Tooltip: "" } +WulfrumSheets: { + DisplayName: Wulfrum Sheets + Tooltip: "" +} + +WulfrumSiding: { + DisplayName: Wulfrum Siding + Tooltip: "" +} + WulfrumSink: { DisplayName: Wulfrum Sink - Tooltip: "" + Tooltip: Counts as a water source } WulfrumSofa: { @@ -3287,11 +3429,121 @@ WulfrumToilet: { Tooltip: "" } +WulfrumWallMountedBulb: { + DisplayName: Wulfrum Wall Mounted Bulb + Tooltip: "" +} + WulfrumWorkBench: { DisplayName: Wulfrum Work Bench Tooltip: "" } +AnodizedWulfrumBathtub: { + DisplayName: Anodized Wulfrum Bathtub + Tooltip: "" +} + +AnodizedWulfrumBookcase: { + DisplayName: Anodized Wulfrum Bookcase + Tooltip: "" +} + +AnodizedWulfrumChair: { + DisplayName: Anodized Wulfrum Chair + Tooltip: "" +} + +AnodizedWulfrumChandelier: { + DisplayName: Anodized Wulfrum Chandelier + Tooltip: "" +} + +AnodizedWulfrumChest: { + DisplayName: Anodized Wulfrum Chest + Tooltip: "" +} + +AnodizedWulfrumDeskLight: { + DisplayName: Anodized Wulfrum Desk Light + Tooltip: "" +} + +AnodizedWulfrumDoor: { + DisplayName: Anodized Wulfrum Door + Tooltip: "" +} + +AnodizedWulfrumDresser: { + DisplayName: Anodized Wulfrum Dresser + Tooltip: "" +} + +AnodizedWulfrumJukebox: { + DisplayName: Anodized Wulfrum Jukebox + Tooltip: "" +} + +AnodizedWulfrumLamp: { + DisplayName: Anodized Wulfrum Lamp + Tooltip: "" +} + +AnodizedWulfrumLantern: { + DisplayName: Anodized Wulfrum Lantern + Tooltip: "" +} + +AnodizedWulfrumPanels: { + DisplayName: Anodized Wulfrum Panels + Tooltip: "" +} + +AnodizedWulfrumPlatform: { + DisplayName: Anodized Wulfrum Platform + Tooltip: "" +} + +AnodizedWulfrumSink: { + DisplayName: Anodized Wulfrum Sink + Tooltip: Counts as a water source +} + +AnodizedWulfrumSleepingPod: { + DisplayName: Anodized Wulfrum Sleeping Pod + Tooltip: "" +} + +AnodizedWulfrumSofa: { + DisplayName: Anodized Wulfrum Sofa + Tooltip: "" +} + +AnodizedWulfrumTable: { + DisplayName: Anodized Wulfrum Table + Tooltip: "" +} + +AnodizedWulfrumTrim: { + DisplayName: Anodized Wulfrum Trim + Tooltip: "" +} + +AnodizedWulfrumToilet: { + DisplayName: Anodized Wulfrum Toilet + Tooltip: "" +} + +AnodizedWulfrumWorkBench: { + DisplayName: Anodized Wulfrum Work Bench + Tooltip: "" +} + +RoundedAnodizedWulfrumPanels: { + DisplayName: Rounded Anodized Wulfrum Panels + Tooltip: "" +} + HardenedAstralSand: { DisplayName: Hardened Astral Sand Tooltip: "" @@ -3511,6 +3763,11 @@ Driftwood: { Tooltip: "" } +Dunesand: { + DisplayName: Dunesand + Tooltip: "" +} + Navystone: { DisplayName: Navystone Tooltip: "" @@ -3598,6 +3855,11 @@ VolcanicSand: { // End of Sunken Sea +Dreadstone: { + DisplayName: Dreadstone + Tooltip: "" +} + UelibloomBrick: { DisplayName: Uelibloom Brick Tooltip: "" @@ -3628,6 +3890,11 @@ AerialiteBrickWall: { Tooltip: "" } +AncientSmoothNavystoneWall: { + DisplayName: Ancient Smooth Navystone Wall + Tooltip: "" +} + AshenSlabWall: { DisplayName: Ashen Slab Wall Tooltip: "" @@ -3747,6 +4014,16 @@ RustedPlatingWall: { // End of Draedon +AnodizedWulfrumTrimWall: { + DisplayName: Anodized Wulfrum Trim Wall + Tooltip: "" +} + +ChargedWulfrumEnergyBarrierWall: { + DisplayName: Charged Wulfrum Energy Barrier Wall + Tooltip: "" +} + DriftwoodWall: { DisplayName: Driftwood Wall Tooltip: "" @@ -3757,6 +4034,11 @@ ElumplateWall: { Tooltip: "" } +EutrophicGlassWall: { + DisplayName: Eutrophic Glass Wall + Tooltip: "" +} + EutrophicSandWall: { DisplayName: Unsafe Eutrophic Sand Wall Tooltip: "" @@ -3797,6 +4079,11 @@ HavocplateWall: { Tooltip: "" } +LimestoneWall: { + DisplayName: Limestone Wall + Tooltip: "" +} + NavyplateWall: { DisplayName: Navyplate Wall Tooltip: "" @@ -3862,6 +4149,16 @@ PyreMantleWall: { Tooltip: "" } +RoundedAnodizedWulfrumPanelWall: { + DisplayName: Rounded Anodized Wulfrum Panel Wall + Tooltip: "" +} + +RunestoneWall: { + DisplayName: Runestone Wall + Tooltip: "" +} + RunicProfanedBrickWall: { DisplayName: Runic Profaned Brick Wall Tooltip: "" @@ -3952,11 +4249,41 @@ VoidstoneWall: { Tooltip: "" } +WulfrumComplexPanelWall: { + DisplayName: Wulfrum Complex Panel Wall + Tooltip: "" +} + +WulfrumEnergyBarrierWall: { + DisplayName: Wulfrum Energy Barrier Wall + Tooltip: "" +} + +WulfrumPanelWall: { + DisplayName: Wulfrum Panel Wall + Tooltip: "" +} + +WulfrumPillar: { + DisplayName: Wulfrum Pillar + Tooltip: "" +} + WulfrumPlatingWall: { DisplayName: Wulfrum Plating Wall Tooltip: "" } +WulfrumSheetWall: { + DisplayName: Wulfrum Sheet Wall + Tooltip: "" +} + +WulfrumSidingWall: { + DisplayName: Wulfrum Siding Wall + Tooltip: "" +} + FireTurret: { DisplayName: Fire Turret Tooltip: @@ -4196,141 +4523,3 @@ MiniAgedFloodlightItem: { DisplayName: Mini Aged Floodlight Tooltip: "" } - -ProbesnoutBanner.DisplayName: Probesnout Banner -SharkoonBanner.DisplayName: Sharkoon Banner - -LimestoneWall: { - DisplayName: Limestone Wall - Tooltip: "" -} - -RunestoneWall: { - DisplayName: Runestone Wall - Tooltip: "" -} - -WulfrumEnergyBarrier: { - DisplayName: Wulfrum Energy Barrier - Tooltip: "" -} - -WulfrumPanels: { - DisplayName: Wulfrum Panels - Tooltip: "" -} - -ChargedWulfrumEnergyBarrier: { - DisplayName: Charged Wulfrum Energy Barrier - Tooltip: "" -} - -WulfrumEnergyBarrierWall: { - DisplayName: Wulfrum Energy Barrier Wall - Tooltip: "" -} - -ChargedWulfrumEnergyBarrierWall: { - DisplayName: Charged Wulfrum Energy Barrier Wall - Tooltip: "" -} - -WulfrumPlatform: { - DisplayName: Wulfrum Platform - Tooltip: "" -} - -WulfrumSheets: { - DisplayName: Wulfrum Sheets - Tooltip: "" -} - -WulfrumSiding: { - DisplayName: Wulfrum Siding - Tooltip: "" -} - -WulfrumPillar: { - DisplayName: Wulfrum Pillar - Tooltip: "" -} - -WulfrumComplexPanelWall: { - DisplayName: Wulfrum Complex Panel Wall - Tooltip: "" -} - -AnodizedWulfrumPlatform: { - DisplayName: Anodized Wulfrum Platform - Tooltip: "" -} - -AnodizedWulfrumTrim: { - DisplayName: Anodized Wulfrum Trim - Tooltip: "" -} - -RoundedAnodizedWulfrumPanels: { - DisplayName: Rounded Anodized Wulfrum Panels - Tooltip: "" -} - -AnodizedWulfrumTrimWall: { - DisplayName: Anodized Wulfrum Trim Wall - Tooltip: "" -} - -RoundedAnodizedWulfrumPanelWall: { - DisplayName: Rounded Anodized Wulfrum Panel Wall - Tooltip: "" -} - -AnodizedWulfrumPanels: { - DisplayName: Anodized Wulfrum Panels - Tooltip: "" -} - -WulfrumPanelWall: { - DisplayName: Wulfrum Panel Wall - Tooltip: "" -} - -ChargedWulfrumWallMountedBulb: { - DisplayName: Charged Wulfrum Wall Mounted Bulb - Tooltip: "" -} - -WulfrumWallMountedBulb: { - DisplayName: Wulfrum Wall Mounted Bulb - Tooltip: "" -} - -WulfrumSheetWall: { - DisplayName: Wulfrum Sheet Wall - Tooltip: "" -} - -WulfrumSidingWall: { - DisplayName: Wulfrum Siding Wall - Tooltip: "" -} - -Dunesand: { - DisplayName: Dunesand - Tooltip: "" -} - -EutrophicGlassWall: { - DisplayName: Eutrophic Glass Wall - Tooltip: "" -} - -Dreadstone: { - DisplayName: Dreadstone - Tooltip: "" -} - -OldDukeMonolith: { - DisplayName: Elden Diorama - Tooltip: "" -} diff --git a/Localization/en-US/Mods.CalamityMod.Tiles.hjson b/Localization/en-US/Mods.CalamityMod.Tiles.hjson index 32316202fc..a88b068345 100644 --- a/Localization/en-US/Mods.CalamityMod.Tiles.hjson +++ b/Localization/en-US/Mods.CalamityMod.Tiles.hjson @@ -9,6 +9,8 @@ PirateCrate: Abandoned Crate // Basic Calamity Furniture Basin: Basin LavaFountain: Lava Fountain +BaroqueCello: Baroque Cello +Jukebox: Jukebox PipeOrgan: Pipe Organ Sconce: Sconce // Draedon Lab Furniture diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index 70f143bf9a..355cc01366 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -28,7 +28,7 @@ SetBonus: { Melee: 10% increased melee damage } - Copper: Increases all damage by 2 + Copper: Increases all damage by {0} Crimson: ''' Greatly increased natural life regen @@ -65,21 +65,13 @@ SetBonus: { ''' Gold: ''' - All enemies have a 2% chance to drop 1 gold; bosses killed drop 3 gold - You gain 1% critical strike chance for every 10 gold in your inventory, capped at 7% - ''' - Iron: - ''' - Increases damage reduction by 6% - +1 HP/s life regen + All enemies have a {0}% chance to drop 1 extra gold + All bosses drop {1} extra gold + You gain {2}% critical strike chance for every gold in your inventory, capped at {3}% ''' + Iron: Multiplies all player-inflicted knockback by {0}x Jungle: 10% reduced mana costs - Lead: - ''' - Increases damage reduction by 4% - +0.5 HP/s life regen - Grants immunity to knockback - ''' + Lead: Grants immunity to knockback Meteor: All magic guns cost 33% mana Mining: Mining ore will sometimes have additional yield Molten: @@ -125,27 +117,14 @@ SetBonus: { Grants +2 HP/s life regeneration after striking an enemy This life regeneration bypasses negative life regeneration ''' - PlatinumChainmail: 3% increased critical strike chance - Platinum: - ''' - Every 10 extra defense gives you 1% increased damage - The 20 defense from the Platinum Armor itself does not contribute to this effect - Bonus damage caps at 50 extra defense - ''' + Platinum: Increases damage reduction by {0}% Silver: ''' - +0.5 HP/s life regen - Two seconds after getting hit for 20 or more damage, you heal for 10 + {0} seconds after getting hit for {1} or more damage, you heal for {2} Getting hit again resets the timer, delaying the heal ''' - Tin: Increases armor penetration by 5 - Tungsten: - ''' - Increases your critical strike chance by 100% of the knockback of your held weapon - This effect caps at Insane knockback, which gives 10% increased critical strike chance - Increases all knockback by 33%, this counts for the above boost - Current bonus: {0}% critical strike chance from {1} knockback - ''' + Tin: "{0}% increased critical strike chance" + Tungsten: Grappling hooks pull and retract {0}% faster MagicHat: Increases maximum mana by 40 Wizard: 4% increased magic critical strike chance CrystalAssassin: diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 1fd56d4db0..4bf03df40e 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -59,29 +59,6 @@ AddedTooltip: { YoyoGlove: Secondary yoyos will do 50% less damage DefensePrefix: +{0}% damage reduction LuckyPrefix: +0.05 luck - /* - Armor - */ - CopperHelmet: 5% increased damage - CopperChainmail: 3% increased critical strike chance - CopperGreaves: 5% increased movement speed - TinHelmet: 3% increased critical strike chance - TinChainmail: +0.5 HP/s life regen - TinGreaves: 5% increased movement speed - IronPieces: Increases damage reduction by 3% - LeadPieces: Increases damage reduction by 2% - SilverHelmet: 5% increased critical strike chance - SilverChainmail: +1 HP/s life regen - SilverGreaves: 8% increased movement speed - TungstenHelmet: 7% increased damage - TungstenChainmail: +0.5 HP/s life regen - TungstenGreaves: 8% increased movement speed - GoldHelmet: 5% increased damage - GoldChainmail: Increases damage reduction by 5% - GoldGreaves: 10% increased movement speed - PlatinumHelmet: 6% increased damage - PlatinumChainmail: 3% increased critical strike chance - PlatinumGreaves: 10% increased movement speed CrimsonBreastplate: +1 HP/s life regen CrimsonOtherPieces: +0.5 HP/s life regen Picksaw: Can mine Scoria Ore located in the Abyss diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index e985444bac..f1a458519a 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -27,11 +27,12 @@ namespace CalamityMod.NPCs.AquaticScourge this.HideFromBestiary(); } - public static int ToothDamage = 23; // 92 + public static int ToothDamage = 25; // 100 public override void SetDefaults() { NPC.damage = 52; // 104 + NPC.Calamity().canBreakPlayerDefense = true; NPC.width = 32; NPC.height = 32; NPC.defense = 20; diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 7527eadeb1..340f384947 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -30,6 +30,7 @@ namespace CalamityMod.NPCs.AquaticScourge public override void SetDefaults() { NPC.damage = 48; // 96 + NPC.Calamity().canBreakPlayerDefense = true; NPC.width = 32; NPC.height = 32; NPC.defense = 15; diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index e0b2b61f7b..e7664d27cd 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -54,13 +54,12 @@ namespace CalamityMod.NPCs.AquaticScourge NPCID.Sets.MPAllowedEnemies[Type] = true; } - public static int MistDamage = 23; // 92 - public static int SandCloudDamage = 28; // 112 - public static int ToxicCloudDamage = 32; // 128 + public static int MistDamage = 25; // 100 + public static int CloudDamage = 28; // 112; applies to both Sand and Toxic public override void SetDefaults() { - NPC.damage = 80; // 160 + NPC.damage = 90; // 180 NPC.Calamity().canBreakPlayerDefense = true; NPC.width = 90; NPC.height = 90; @@ -252,7 +251,7 @@ namespace CalamityMod.NPCs.AquaticScourge for (int k = 0; k < totalProjectiles; k++) { Vector2 vector255 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, ToxicCloudDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, CloudDamage, 0f, Main.myPlayer); } } } @@ -366,7 +365,7 @@ namespace CalamityMod.NPCs.AquaticScourge if (expertMode) velocity *= 1f + (maximumVelocityMult * (0.5f - lifeRatio)); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + velocity.SafeNormalize(Vector2.UnitY) * 5f, velocity, type, SandCloudDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + velocity.SafeNormalize(Vector2.UnitY) * 5f, velocity, type, CloudDamage, 0f, Main.myPlayer); } } } diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 98ccd53ce6..c4373b88ef 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -355,7 +355,7 @@ namespace CalamityMod.NPCs.AquaticScourge public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) { if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), 180, true); + target.AddBuff(ModContent.BuffType(), 300, true); } } } diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 968dda7bda..23a420108b 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -66,15 +66,16 @@ namespace CalamityMod.NPCs.BrimstoneElemental } // These values are all applied alongside their respective GFB attacks (too many to list) - public static int DartDamage = 21; // 84 - public static int HellblastDamage = 25; // 100 - public static int HellfireballDamage = 25; // 100 + public static int DartDamage = 19; // 76 + public static int HellblastDamage = 22; // 88 + public static int HellfireballDamage = 22; // 88 public static int RayDamage = 35; // 140 public override void SetDefaults() { NPC.npcSlots = 64f; NPC.damage = 52; // 104 + NPC.Calamity().canBreakPlayerDefense = true; NPC.width = 100; NPC.height = 150; NPC.defense = 15; @@ -839,7 +840,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) { - target.AddBuff(ModContent.BuffType(), 360); + target.AddBuff(ModContent.BuffType(), 240); } public override void FindFrame(int frameHeight) // 9 total frames diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 021a8c990e..39cb2d3b99 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -61,9 +61,9 @@ namespace CalamityMod.NPCs.CalClone } } - public static int DartDamage = 23; // 92 - public static int HellblastDamage = 27; // 108 - public static int HellfireballDamage = 27; // 108 + public static int DartDamage = 22; // 88 + public static int HellblastDamage = 25; // 100 + public static int HellfireballDamage = 25; // 100 public static int FireblastDamage = 35; // 140; Also applies to GFB Gigablasts public override void SetDefaults() @@ -1008,7 +1008,7 @@ namespace CalamityMod.NPCs.CalClone public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) { if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), 360); + target.AddBuff(ModContent.BuffType(), 240); } } } diff --git a/NPCs/CalClone/Cataclysm.cs b/NPCs/CalClone/Cataclysm.cs index a010422f10..fbbb1a72b2 100644 --- a/NPCs/CalClone/Cataclysm.cs +++ b/NPCs/CalClone/Cataclysm.cs @@ -552,7 +552,7 @@ namespace CalamityMod.NPCs.CalClone public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) { if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), 240); + target.AddBuff(ModContent.BuffType(), 120); } } } diff --git a/NPCs/CalClone/Catastrophe.cs b/NPCs/CalClone/Catastrophe.cs index 3853a09347..a11b491bf1 100644 --- a/NPCs/CalClone/Catastrophe.cs +++ b/NPCs/CalClone/Catastrophe.cs @@ -43,13 +43,13 @@ namespace CalamityMod.NPCs.CalClone } } - public static int BallDamage = 27; // 108 + public static int BallDamage = 22; // 88 public override void SetDefaults() { NPC.BossBar = Main.BigBossProgressBar.NeverValid; NPC.Calamity().canBreakPlayerDefense = true; - NPC.damage = 50; // 100 + NPC.damage = 45; // 90 NPC.npcSlots = 5f; NPC.width = 120; NPC.height = 120; @@ -542,7 +542,7 @@ namespace CalamityMod.NPCs.CalClone public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) { if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), 240); + target.AddBuff(ModContent.BuffType(), 120); } } } diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 1c27253fff..1d3e80c398 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -248,6 +248,7 @@ namespace CalamityMod.NPCs "Stan Pines", "Intergaze", // <@!923504188615450654> (intergaze) "Borgus", // <@!539127427482255376> (therealmeepman) + "Postman Hiss", // <@!454638106122125312> (karinthefairy) }; private static readonly string[] TruffleNames = { diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index bb6198de1e..53fa4fd862 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -89,8 +89,8 @@ namespace CalamityMod.NPCs.Cryogen } } - public static int IceBlastDamage = 22; // 88; Also applies to GFB darts - public static int IceRainDamage = 22; // 88; Also applies to GFB darts + public static int IceBlastDamage = 23; // 92; Also applies to GFB darts + public static int IceRainDamage = 23; // 92; Also applies to GFB darts public static int IceBombDamage = 30; // 120; Also applies to GFB fireblasts public override void SetDefaults() diff --git a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs index 950a290c46..0ab71a7709 100644 --- a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs +++ b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs @@ -28,10 +28,9 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetDefaults() { - NPC.Calamity().canBreakPlayerDefense = true; + NPC.damage = 60; NPC.aiStyle = -1; AIType = -1; - NPC.damage = 60; NPC.width = 24; NPC.height = 24; NPC.defense = 20; @@ -188,12 +187,6 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.damage = (int)(NPC.damage * 1.15f); } - public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) - { - if (hurtInfo.Damage > 0) - target.AddBuff(BuffID.Poisoned, 180); - } - public override void HitEffect(NPC.HitInfo hit) { if (NPC.life > 0) diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 1d87e5597c..9b67caa5b7 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -18,6 +18,7 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Particles; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -43,13 +44,24 @@ namespace CalamityMod.NPCs.Perforator public static readonly SoundStyle DeathSound = new("CalamityMod/Sounds/NPCKilled/PerfHiveDeath"); public static Asset GlowTexture; + // Squash n' stretch won't affect actual hitbox size + private const int Width = 110; + private const int Height = 100; + private int biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax; - private bool small = false; - private bool medium = false; - private bool large = false; + private bool smallSpawned = false; + private bool mediumSpawned = false; + private bool largeSpawned = false; private int wormsAlive = 0; + private float squash; + private float addedStretch; + private int squashTimer = 0; // Tracks current progress in scaling animation + private const int squashInterval = 24; + private const float maxSquash = 0.3f; // Upper intensity + private float wormSpawnStateTimer = 0f; // For managing worm spawn animation + public override void SetStaticDefaults() { Main.npcFrameCount[Type] = 10; @@ -72,8 +84,8 @@ namespace CalamityMod.NPCs.Perforator NPC.Calamity().canBreakPlayerDefense = true; NPC.npcSlots = 18f; NPC.damage = 30; // 48 (1.6x expert scaling) - NPC.width = 110; - NPC.height = 100; + NPC.width = Width; + NPC.height = Height; NPC.defense = 4; NPC.LifeMaxNERB(4800, 5750, 270000); NPC.aiStyle = -1; @@ -112,20 +124,22 @@ namespace CalamityMod.NPCs.Perforator { writer.Write(biomeEnrageTimer); writer.Write(wormsAlive); - writer.Write(small); - writer.Write(medium); - writer.Write(large); + writer.Write(smallSpawned); + writer.Write(mediumSpawned); + writer.Write(largeSpawned); writer.Write(NPC.localAI[2]); + writer.Write(wormSpawnStateTimer); } public override void ReceiveExtraAI(BinaryReader reader) { biomeEnrageTimer = reader.ReadInt32(); wormsAlive = reader.ReadInt32(); - small = reader.ReadBoolean(); - medium = reader.ReadBoolean(); - large = reader.ReadBoolean(); + smallSpawned = reader.ReadBoolean(); + mediumSpawned = reader.ReadBoolean(); + largeSpawned = reader.ReadBoolean(); NPC.localAI[2] = reader.ReadSingle(); + wormSpawnStateTimer = reader.ReadSingle(); } public override void AI() @@ -156,6 +170,10 @@ namespace CalamityMod.NPCs.Perforator // Phases based on life percentage bool phase2 = lifeRatio < 0.7f; + bool spawnSmall = CalamityWorld.LegendaryMode ? lifeRatio < 0.85f : lifeRatio < 0.75f; + bool spawnMedium = CalamityWorld.LegendaryMode ? lifeRatio < 0.60f : lifeRatio < 0.50f; + bool spawnLarge = CalamityWorld.LegendaryMode ? lifeRatio < 0.45f : lifeRatio < 0.25f; + // Enrage if ((!player.ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive) { @@ -199,6 +217,8 @@ namespace CalamityMod.NPCs.Perforator return; } } + + // Natural despawn prevention else if (NPC.timeLeft < 1800) NPC.timeLeft = 1800; @@ -243,72 +263,139 @@ namespace CalamityMod.NPCs.Perforator NPC.Calamity().DR = wormsAlive * 0.3f; - if (NPC.ai[3] == 0f && NPC.life > 0) - NPC.ai[3] = NPC.lifeMax; - - bool canSpawnWorms = !small || !medium || !large || CalamityWorld.LegendaryMode; - if (NPC.life > 0 && canSpawnWorms) + if (Main.netMode != NetmodeID.MultiplayerClient && wormSpawnStateTimer == 0f) { - if (Main.netMode != NetmodeID.MultiplayerClient) + if ((!smallSpawned && spawnSmall) || + (!mediumSpawned && spawnMedium) || + (!largeSpawned && spawnLarge)) { - int wormSpawnGateValue = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.15 : 0.25)); - if ((NPC.life + wormSpawnGateValue) < NPC.ai[3]) + wormSpawnStateTimer = 1f; // Start slowing down to spawn a worm + NPC.netUpdate = true; + } + } + + if (wormSpawnStateTimer > 0f) + { + + NPC.velocity *= 0.94f; // Slow down + NPC.rotation = NPC.velocity.X * 0.04f; // Update rotation to match velocity + + NPC.damage = 0; + + wormSpawnStateTimer++; + + int slowDownDuration = 20; + int waitBeforeSpawnDuration = 40; + int totalStateDuration = slowDownDuration + waitBeforeSpawnDuration; + + if (wormSpawnStateTimer >= slowDownDuration && wormSpawnStateTimer < totalStateDuration) + { + if (Main.rand.NextBool(7)) { - NPC.ai[3] = NPC.life; - int wormType = ModContent.NPCType(); - if (!small) - { - small = true; - } - else if (!medium) - { - medium = true; - wormType = ModContent.NPCType(); - } - else if (!large) - { - large = true; - wormType = ModContent.NPCType(); - } + int bloodLifetime = Main.rand.Next(20, 45); + float bloodScale = Main.rand.NextFloat(0.5f, 1f); + Color bloodColor = Color.Lerp(Color.Yellow, Color.DarkRed, Main.rand.NextFloat(0.7f)); + float randomSpeedMultiplier = Main.rand.NextFloat(0.8f, 1.6f); + Vector2 bloodVelocity = Main.rand.NextVector2Unit(5) * 1.5f * randomSpeedMultiplier; + bloodVelocity.Y -= 8f; - if (CalamityWorld.LegendaryMode && lifeRatio < 0.5f) - { - if (lifeRatio > 0.35f) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); - else if (lifeRatio > 0.2f) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); - else if (lifeRatio > 0.05f) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); - } - else - { - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), wormType, 1); + Vector2 randomOffset = Main.rand.NextVector2Unit() * Main.rand.NextFloat(25f, 50f); + Vector2 spawnPosition = NPC.Center + randomOffset; - // Spawn two small worms in Death - if (death) - { - if (wormType == ModContent.NPCType()) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), wormType, 1); - } - } - - NPC.TargetClosest(); - - SoundEngine.PlaySound(WormSpawn, NPC.Center); - - for (int i = 0; i < 16; i++) - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor); - - for (int j = 0; j < 32; j++) - { - int bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood); - Main.dust[bloodDust].noGravity = true; - Main.dust[bloodDust].scale = 3f; - bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood); - Main.dust[bloodDust].scale = 2f; - } + BloodParticle blood = new BloodParticle(spawnPosition, bloodVelocity, bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); } } + + else if (wormSpawnStateTimer >= totalStateDuration) + { + // Blood vars change based on worm spawned + Color bloodColor = Color.Lerp(Color.Crimson, Color.DarkRed, Main.rand.NextFloat(0.9f)); + int bloodAmt = 0; + float minScale = 1f; + float maxScale = 1.8f; + int wormType = -1; + + if (!smallSpawned) + { + + smallSpawned = true; + wormType = ModContent.NPCType(); + + bloodAmt = 12; + } + else if (!mediumSpawned && spawnMedium) + { + mediumSpawned = true; + wormType = ModContent.NPCType(); + + bloodColor = Color.Lerp(Color.Yellow, Color.Orange, Main.rand.NextFloat(0.9f)); + bloodAmt = 12; + minScale = 1.5f; + maxScale = 2.4f; + } + else if (!largeSpawned && spawnLarge) + { + largeSpawned = true; + wormType = ModContent.NPCType(); + + bloodAmt = 18; + minScale = 1.4f; + maxScale = 2.2f; + } + + for (int i = 0; i < bloodAmt; ++i) + { + int bloodLifetime = Main.rand.Next(80, 140); + float bloodScale = Main.rand.NextFloat(minScale, maxScale); + + float randomSpeedMultiplier = Main.rand.NextFloat(1.4f, 2.2f); + Vector2 bloodVelocity = Main.rand.NextVector2Unit() * 4 * randomSpeedMultiplier; + bloodVelocity.Y -= 5f; + BloodParticle blood = new BloodParticle(NPC.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } + + + if (CalamityWorld.LegendaryMode && lifeRatio < 0.5f) + { + if (lifeRatio > 0.35f) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); + else if (lifeRatio > 0.2f) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); + else if (lifeRatio > 0.05f) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); + } + if (wormType != -1) + { + squashTimer = squashInterval; // Start scaling animation + + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), wormType, 1); + + // Spawn two small worms in Death + if (death) + { + if (wormType == ModContent.NPCType()) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), wormType, 1); + } + } + + NPC.TargetClosest(); + SoundEngine.PlaySound(WormSpawn, NPC.Center); + wormSpawnStateTimer = 0f; // Resets for next time its called + NPC.netUpdate = true; + } + return; // Don't progress in the AI loop until a worm has finished spawning + } + + if (squashTimer > 0) + { + squashTimer--; + addedStretch = MathHelper.Lerp(0f, maxSquash, (float) squashTimer / squashInterval); + } + else + { + addedStretch = 0f; } if (Math.Abs(NPC.Center.X - player.Center.X) > 10f) @@ -323,7 +410,7 @@ namespace CalamityMod.NPCs.Perforator // Emit ichor blobs if (phase2) { - if (wormsAlive == 0 || large || floatAboveToFireBlobs || CalamityWorld.LegendaryMode) + if (wormsAlive == 0 || largeSpawned || floatAboveToFireBlobs || CalamityWorld.LegendaryMode) { NPC.ai[2] += 1f; if (NPC.ai[2] >= blobPhaseGateValue) @@ -334,7 +421,27 @@ namespace CalamityMod.NPCs.Perforator NPC.velocity *= 0.96f; else NPC.ai[2] = blobPhaseGateValue + 300f; + } + + if (NPC.ai[2] < blobPhaseGateValue + 180f) + { + if (Main.rand.NextBool(4)) + { + int bloodLifetime = Main.rand.Next(25, 35); + float bloodScale = Main.rand.NextFloat(0.6f, 0.95f); + Color bloodColor = Color.Lerp(Color.Yellow, Color.Orange, Main.rand.NextFloat(0.8f)); + float randomSpeedMultiplier = Main.rand.NextFloat(1.5f, 2.5f); + Vector2 bloodVelocity = Main.rand.NextVector2Unit() * randomSpeedMultiplier; + + Vector2 spawnPosition = NPC.Center; + spawnPosition.Y += 42; + + BloodParticle blood = new BloodParticle(spawnPosition, bloodVelocity, bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } + } + else { NPC.ai[2] = 0f; @@ -352,7 +459,7 @@ namespace CalamityMod.NPCs.Perforator Main.dust[ichorDust].scale = 0.5f; } - bool ichorBlobBigWormPhase = wormsAlive > 0 && large; + bool ichorBlobBigWormPhase = wormsAlive > 0 && largeSpawned; int numBlobs = expertMode ? (ichorBlobBigWormPhase ? 4 : 6) : (ichorBlobBigWormPhase ? 2 : 4); if (CalamityWorld.LegendaryMode) numBlobs *= 2; @@ -467,11 +574,11 @@ namespace CalamityMod.NPCs.Perforator // Set damage NPC.damage = NPC.defDamage; - if (large || death) + if (largeSpawned || death) Movement(player, 13f + velocityEnrageIncrease, death ? 0.115f : 0.1f, 20f); - else if (medium) + else if (mediumSpawned) Movement(player, 12f + velocityEnrageIncrease, death ? 0.11f : 0.095f, 30f); - else if (small) + else if (smallSpawned) Movement(player, 11f + velocityEnrageIncrease, death ? 0.105f : 0.09f, 40f); else Movement(player, 10f + velocityEnrageIncrease, death ? 0.1f : 0.085f, 50f); @@ -532,22 +639,19 @@ namespace CalamityMod.NPCs.Perforator public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; + SpriteEffects spriteEffects = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Texture2D texture = TextureAssets.Npc[Type].Value; + Color drawColorAlpha = NPC.GetAlpha(drawColor); - Texture2D texture2D15 = TextureAssets.Npc[Type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); + Vector2 scaleStretch = new Vector2(1f - addedStretch, 1f + addedStretch) * NPC.scale; + float yOffset = addedStretch * 0.5f * NPC.height; // offset from stretching - Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; - drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - texture2D15 = GlowTexture.Value; + spriteBatch.Draw(texture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY - yOffset), NPC.frame, drawColorAlpha, NPC.rotation, NPC.frame.Size() * 0.5f, scaleStretch, spriteEffects, 0f); + texture = GlowTexture.Value; Color glowmaskColor = Color.Lerp(Color.White, Color.Yellow, 0.5f); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, glowmaskColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + // done again to fix glowmask not matching sprite + spriteBatch.Draw(texture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY - yOffset), NPC.frame, glowmaskColor, NPC.rotation, NPC.frame.Size() * 0.5f, scaleStretch, spriteEffects, 0f); return false; } @@ -654,7 +758,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 100; NPC.position.X = NPC.position.X - (float)(NPC.width / 2); NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); - for (int i = 0; i < 40; i++) + for (int i = 0; i < 12; i++) { int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[ichorDust].velocity *= 3f; @@ -664,7 +768,7 @@ namespace CalamityMod.NPCs.Perforator Main.dust[ichorDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int j = 0; j < 70; j++) + for (int j = 0; j < 20; j++) { int bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f); Main.dust[bloodDust].noGravity = true; @@ -672,6 +776,19 @@ namespace CalamityMod.NPCs.Perforator bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[bloodDust].velocity *= 2f; } + // Blood burst + for (int i = 0; i < 24; ++i) + { + int bloodLifetime = Main.rand.Next(120, 200); + float bloodScale = Main.rand.NextFloat(1.3f, 2.6f); + Color bloodColor = Color.Lerp(Color.Crimson, Color.DarkRed, Main.rand.NextFloat(0.9f)); + float randomSpeedMultiplier = Main.rand.NextFloat(4.5f, 9f); + Vector2 bloodVelocity = Main.rand.NextVector2Unit(6) * 2.5f * randomSpeedMultiplier; + bloodVelocity.Y -= 14f; + + BloodParticle blood = new BloodParticle(NPC.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } } } } diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs index d83d57355d..3ab24ea7db 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs @@ -18,11 +18,15 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses public static int EverlastingRainbowDamage = 30; // 120 public static int EtherealLanceDamage = 30; // 120 public static int SunDanceDamage = 35; // 140 + public static int Phase2PrismaticBoltDamage = 35; // 140 + public static int Phase2EverlastingRainbowDamage = 35; // 140 + public static int Phase2EtherealLanceDamage = 35; // 140 + public static int Phase2SunDanceDamage = 40; // 160 // Vanilla sets her defDamage to 184 (80 * 2 * 1.15) in Expert Mode // However, some weird contraption in her Expert AI that knocks her base contact damage to the intended value of 110 // This hasn't been found anywhere so our solution for now is avoid using defDamage altogether - public static int ContactDamageCorrection = 110; + public static int ContactDamageCorrection = Main.masterMode ? 248 : 110; public static int CalculateDamageForEnrage(this int damage) => NPC.ShouldEmpressBeEnraged() ? damage * 2 : damage; @@ -47,6 +51,11 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool phase2 = npc.AI_120_HallowBoss_IsInPhase2(); bool phase3 = lifeRatio <= phase3LifeRatio; + int boltDamage = (phase2 ? Phase2PrismaticBoltDamage : PrismaticBoltDamage).CalculateDamageForEnrage(); + int rainbowDamage = (phase2 ? Phase2EverlastingRainbowDamage : EverlastingRainbowDamage).CalculateDamageForEnrage(); + int lanceDamage = (phase2 ? Phase2EtherealLanceDamage : EtherealLanceDamage).CalculateDamageForEnrage(); + int sunDanceDamage = (phase2 ? Phase2SunDanceDamage : SunDanceDamage).CalculateDamageForEnrage(); + bool shouldBeInPhase2ButIsStillInPhase1 = lifeRatio <= phase2LifeRatio && !phase2; if (shouldBeInPhase2ButIsStillInPhase1) calamityGlobalNPC.DR = 0.99f; @@ -417,7 +426,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if ((int)npc.ai[1] % streakSpawnFrequency == 0 && npc.ai[1] < 60f) { int projectileType = ProjectileID.HallowBossRainbowStreak; - int projectileDamage = PrismaticBoltDamage.CalculateDamageForEnrage(); + int projectileDamage = boltDamage; float ai3 = npc.ai[1] / 60f; Vector2 rainbowStreakVelocity = new Vector2(0f, death ? -10f : -8f).RotatedBy(MathHelper.PiOver2 * Main.rand.NextFloatDirection()); @@ -551,7 +560,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } int projectileType = ProjectileID.FairyQueenLance; - int projectileDamage = EtherealLanceDamage.CalculateDamageForEnrage(); + int projectileDamage = lanceDamage; Vector2 v3 = targetHoverPos - spawnLocation; if (Main.netMode != NetmodeID.MultiplayerClient) @@ -631,9 +640,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses for (float i = 0f; i < 1f; i += 1f / totalProjectiles) { int projectileType = ProjectileID.HallowBossLastingRainbow; - int projectileDamage = EverlastingRainbowDamage.CalculateDamageForEnrage(); + int projectileDamage = rainbowDamage; int projectileType2 = ProjectileID.HallowBossRainbowStreak; - int projectileDamage2 = PrismaticBoltDamage.CalculateDamageForEnrage(); + int projectileDamage2 = boltDamage; float projRotationMultiplier = i; Vector2 spinningpoint = Vector2.UnitY.RotatedBy(MathHelper.PiOver2 + MathHelper.TwoPi * projRotationMultiplier + projRotation); @@ -704,7 +713,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (npc.ai[1] % sunDanceGateValue == 0f && npc.ai[1] < totalSunDancePhaseTime) { int projectileType = ProjectileID.FairyQueenSunDance; - int projectileDamage = SunDanceDamage.CalculateDamageForEnrage(); + int projectileDamage = sunDanceDamage; int sunDanceExtension = (int)(npc.ai[1] / sunDanceGateValue); int targetFloatDirection = (targetData2.Center.X > npc.Center.X) ? 1 : 0; @@ -824,7 +833,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } int projectileType = ProjectileID.FairyQueenLance; - int projectileDamage = EtherealLanceDamage.CalculateDamageForEnrage(); + int projectileDamage = lanceDamage; for (float i = 0f; i <= 1f; i += 1f / totalProjectiles) { @@ -906,7 +915,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if ((npc.ai[1] - 1f) % rainbowStreakGateValue == 0f) { int projectileType = ProjectileID.HallowBossRainbowStreak; - int projectileDamage = PrismaticBoltDamage.CalculateDamageForEnrage(); + int projectileDamage = boltDamage; float ai3 = (npc.ai[1] - chargeGateValue - 1f) / chargeDuration; Vector2 rainbowStreakVelocity = new Vector2(0f, death ? -5f : -4f).RotatedBy(MathHelper.PiOver2 * Main.rand.NextFloatDirection()); @@ -1077,7 +1086,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } int projectileType = ProjectileID.FairyQueenLance; - int projectileDamage = EtherealLanceDamage.CalculateDamageForEnrage(); + int projectileDamage = lanceDamage; Vector2 v = straightLanceSpawnPredict - straightLanceSpawnDirection; if (Main.netMode != NetmodeID.MultiplayerClient) @@ -1154,7 +1163,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if ((int)npc.ai[1] % stationaryStreakSpawnFrequency == 0 && shouldSpawnStreaks) { int projectileType = ProjectileID.HallowBossRainbowStreak; - int projectileDamage = PrismaticBoltDamage.CalculateDamageForEnrage(); + int projectileDamage = boltDamage; Vector2 vector = new Vector2(0f, (death ? -24f : -22f) - (phase3 ? ((death ? 6f : 4f) * streakHomeTime) : 0f)).RotatedBy(MathHelper.TwoPi * streakHomeTime); if (Main.netMode != NetmodeID.MultiplayerClient) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs index 6a643fd94b..196ddcf11e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs @@ -32,12 +32,16 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses public static int PinkSeedDamage = 19; // 76 public static int PoisonSeedDamage = 24; // 96 public static int ThornBallDamage = 27; // 108 - public static int ThornBallSpikeDamage = 22; // 88 + + // Expert AI has uses a magic number which we have to correct for + public static int ContactDamageCorrection = 100; // Rev+ exclusive + public static int ThornBallSpikeDamage = 22; // 88 public static int GasBulbDamage = 27; // 108 public static int PinkCloudDamage = 22; // 88 public static int GreenCloudDamage = 24; // 96 + public static float DashDamageMult = 1.25f; // 175 public static bool BuffedPlanteraAI(NPC npc, Mod mod) { @@ -62,8 +66,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool vomitFreeTentacles = lifeRatio < 0.25f && death; bool phase4 = lifeRatio < 0.2f; - if (phase2) - npc.damage = (int)Math.Round(npc.defDamage * Phase2ContactDamageMult); + npc.damage = (int)Math.Round(ContactDamageCorrection * (phase2 ? Phase2ContactDamageMult : 1f)); // Variables and target bool enrage = false; @@ -433,6 +436,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Emit spore gas in phase 3 else if (npc.ai[3] <= BeginChargeGateValue) { + npc.damage = (int)Math.Round(ContactDamageCorrection * Phase2ContactDamageMult * DashDamageMult); float sporeGasDashGateValue = death ? 6f : 9f; if (phase3 && npc.ai[3] % sporeGasDashGateValue == 0f) { diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs index e93ba283b7..c16a8274e0 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs @@ -13,8 +13,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses public static class QueenSlimeAI { // Vanilla values - public static int SmallGelDamage = 15; // 60 - public static int SpikeDamage = 15; // 60 + public static int SmallGelDamage = Main.masterMode ? 20 : 17; // 68 + public static int SpikeDamage = Main.masterMode ? 20 : 17; // 68 public static int LargeGelDamage = 30; // 120 public static int SlamDamage = 40; // 160 diff --git a/Projectiles/Boss/BrimstoneBall.cs b/Projectiles/Boss/BrimstoneBall.cs index 8009e83729..a171fbf0b7 100644 --- a/Projectiles/Boss/BrimstoneBall.cs +++ b/Projectiles/Boss/BrimstoneBall.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Boss if (info.Damage <= 0) return; - target.AddBuff(ModContent.BuffType(), 90); + target.AddBuff(ModContent.BuffType(), 120); } } } diff --git a/Projectiles/Boss/BrimstoneBarrage.cs b/Projectiles/Boss/BrimstoneBarrage.cs index 9758d7eedb..59e57349d3 100644 --- a/Projectiles/Boss/BrimstoneBarrage.cs +++ b/Projectiles/Boss/BrimstoneBarrage.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.ai[0] == 0f || Main.zenithWorld) target.AddBuff(ModContent.BuffType(), 180); else - target.AddBuff(ModContent.BuffType(), 90); + target.AddBuff(ModContent.BuffType(), 120); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Boss/BrimstoneFire.cs b/Projectiles/Boss/BrimstoneFire.cs index 2fb7384d2e..52038731eb 100644 --- a/Projectiles/Boss/BrimstoneFire.cs +++ b/Projectiles/Boss/BrimstoneFire.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Boss if (info.Damage <= 0) return; - target.AddBuff(ModContent.BuffType(), 150); + target.AddBuff(ModContent.BuffType(), 240); // Cook you up (still scales with player size in case it's manipulated) int smokeCount = 4 + (int)MathHelper.Clamp(target.width * 0.1f, 0f, 20f); diff --git a/Projectiles/Boss/BrimstoneHellblast.cs b/Projectiles/Boss/BrimstoneHellblast.cs index 2b2c2d18c1..dee61c274d 100644 --- a/Projectiles/Boss/BrimstoneHellblast.cs +++ b/Projectiles/Boss/BrimstoneHellblast.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.ai[0] == 0f || Main.zenithWorld) target.AddBuff(ModContent.BuffType(), 180); else - target.AddBuff(ModContent.BuffType(), 90); + target.AddBuff(ModContent.BuffType(), 120); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Boss/BrimstoneHellblast2.cs b/Projectiles/Boss/BrimstoneHellblast2.cs index 92cded34d9..36f5a082d3 100644 --- a/Projectiles/Boss/BrimstoneHellblast2.cs +++ b/Projectiles/Boss/BrimstoneHellblast2.cs @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.ai[0] == 0f || Main.zenithWorld) target.AddBuff(ModContent.BuffType(), 180); else - target.AddBuff(ModContent.BuffType(), 90); + target.AddBuff(ModContent.BuffType(), 120); } } } diff --git a/Projectiles/Boss/BrimstoneHellfireball.cs b/Projectiles/Boss/BrimstoneHellfireball.cs index c35f3e1f66..ce7f33d38b 100644 --- a/Projectiles/Boss/BrimstoneHellfireball.cs +++ b/Projectiles/Boss/BrimstoneHellfireball.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles.Boss public override void SetDefaults() { - Projectile.Calamity().DealsDefenseDamage = true; Projectile.width = 34; Projectile.height = 34; Projectile.hostile = true; @@ -83,7 +82,7 @@ namespace CalamityMod.Projectiles.Boss if (info.Damage <= 0) return; - target.AddBuff(ModContent.BuffType(), 150); + target.AddBuff(ModContent.BuffType(), 240); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Boss/BrimstoneRay.cs b/Projectiles/Boss/BrimstoneRay.cs index 2b3d547aa0..de5275700d 100644 --- a/Projectiles/Boss/BrimstoneRay.cs +++ b/Projectiles/Boss/BrimstoneRay.cs @@ -233,7 +233,7 @@ namespace CalamityMod.Projectiles.Boss if (info.Damage <= 0) return; - target.AddBuff(ModContent.BuffType(), 150); + target.AddBuff(ModContent.BuffType(), 240); } public override bool CanHitPlayer(Player target) => Projectile.scale >= 0.5f; diff --git a/Projectiles/Boss/SandPoisonCloud.cs b/Projectiles/Boss/SandPoisonCloud.cs index 6db2345c81..2b5d10c0b6 100644 --- a/Projectiles/Boss/SandPoisonCloud.cs +++ b/Projectiles/Boss/SandPoisonCloud.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Boss if (info.Damage <= 0) return; - target.AddBuff(ModContent.BuffType(), 240, true); + target.AddBuff(BuffID.Venom, 180); } } } diff --git a/Projectiles/Boss/SporeGasPlantera.cs b/Projectiles/Boss/SporeGasPlantera.cs index f1527b37fd..37da7212b3 100644 --- a/Projectiles/Boss/SporeGasPlantera.cs +++ b/Projectiles/Boss/SporeGasPlantera.cs @@ -28,7 +28,6 @@ namespace CalamityMod.Projectiles.Boss public override void SetDefaults() { - Projectile.Calamity().DealsDefenseDamage = true; Projectile.width = 32; Projectile.height = 32; Projectile.hostile = true; diff --git a/Projectiles/Boss/ThornBallSpike.cs b/Projectiles/Boss/ThornBallSpike.cs index 790a4288bb..e60fdf23eb 100644 --- a/Projectiles/Boss/ThornBallSpike.cs +++ b/Projectiles/Boss/ThornBallSpike.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Boss 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.Venom, 90); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Venom, 120); public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, Projectile.alpha); diff --git a/Projectiles/Boss/ToxicCloud.cs b/Projectiles/Boss/ToxicCloud.cs index 8b54687e48..f0286ca08f 100644 --- a/Projectiles/Boss/ToxicCloud.cs +++ b/Projectiles/Boss/ToxicCloud.cs @@ -87,9 +87,7 @@ namespace CalamityMod.Projectiles.Boss if (info.Damage <= 0) return; - target.AddBuff(BuffID.Poisoned, 240); - target.AddBuff(BuffID.Venom, 240); - target.AddBuff(ModContent.BuffType(), 240); + target.AddBuff(ModContent.BuffType(), 480); } } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index aaadbd554a..a211a8a134 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -14,6 +14,7 @@ using CalamityMod.ExtraTextures; using CalamityMod.Items.Accessories; using CalamityMod.Items.Ammo; using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.Items.VanillaArmorChanges; using CalamityMod.NPCs; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.PlagueEnemies; @@ -3975,6 +3976,8 @@ namespace CalamityMod.Projectiles float mult = 1f; if (player.Calamity().reaverSpeed) mult += 0.5f; + if (player.Calamity().tungstenArmorHookBoost) + mult += TungstenArmorSetChange.HookBoost; if (player.Calamity().bloomStone) mult += 0.5f; speed *= mult; @@ -3992,6 +3995,8 @@ namespace CalamityMod.Projectiles float mult = 1f; if (player.Calamity().reaverSpeed) mult += 0.5f; + if (player.Calamity().tungstenArmorHookBoost) + mult += TungstenArmorSetChange.HookBoost; if (player.Calamity().bloomStone) mult += 0.5f; speed *= mult; diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index c0ea3af4d8..13374f4ac5 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -313,7 +313,6 @@ namespace CalamityMod.Projectiles { ProjectileID.PhantasmalDeathray, defenseDamage }, { ProjectileID.PhantasmalSphere, defenseDamage }, { ProjectileID.Present, defenseDamage }, // Falling present bombs in Frost Moon - { ProjectileID.QueenSlimeSmash, defenseDamage }, { ProjectileID.RockGolemRock, defenseDamage }, { ProjectileID.RuneBlast, defenseDamage }, // Rune Wizard shots { ProjectileID.SaucerDeathray, defenseDamage }, diff --git a/Projectiles/Enemy/SulphuricAcidMist.cs b/Projectiles/Enemy/SulphuricAcidMist.cs index f1f5d6b825..2ad2cea566 100644 --- a/Projectiles/Enemy/SulphuricAcidMist.cs +++ b/Projectiles/Enemy/SulphuricAcidMist.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Enemy return; if (Projectile.Opacity >= 0.9f) - target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 300); } } } diff --git a/Projectiles/Summon/EXPLODINGFROG.cs b/Projectiles/Summon/EXPLODINGFROG.cs index a54e7caea0..dc5e5ecb1f 100644 --- a/Projectiles/Summon/EXPLODINGFROG.cs +++ b/Projectiles/Summon/EXPLODINGFROG.cs @@ -1,6 +1,10 @@ -using CalamityMod.Buffs.DamageOverTime; +using System; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.Summon; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -11,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public class EXPLODINGFROG : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - public const float MinExplodeDistance = 120f; - public const float ExplodeWaitTime = 45f; + public const float MinExplodeDistance = 96f; + public const float ExplodeWaitTime = 120f; public const float ExplosionAngleVariance = 0.8f; public override void SetStaticDefaults() { @@ -35,6 +39,11 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { + if (Projectile.ai[1] == 0) + { + Projectile.ai[0] = 75; + Projectile.ai[1] = 1; + } if (Projectile.frameCounter++ > 5) { Projectile.frame++; @@ -46,39 +55,56 @@ namespace CalamityMod.Projectiles.Summon } Player player = Main.player[Projectile.owner]; bool canExplode = Projectile.Center.ClosestNPCAt(MinExplodeDistance) != null; - if (player.HasMinionAttackTargetNPC) + if (player.HasMinionAttackTargetNPC && !canExplode) { canExplode = Main.npc[player.MinionAttackTargetNPC].Distance(Projectile.Center) < MinExplodeDistance; } - if (canExplode) + if (Projectile.ai[0] < ExplodeWaitTime) Projectile.ai[0]++; if (Projectile.ai[0] >= ExplodeWaitTime) { - if (Main.myPlayer == Projectile.owner) + if (canExplode) { - // Goop projectiles - for (int i = 0; i < 3; i++) + if (Main.myPlayer == Projectile.owner) { + Vector2 rotOffset = -Vector2.UnitY; + if (player.HasMinionAttackTargetNPC && Main.npc[player.MinionAttackTargetNPC].Distance(Projectile.Center) < MinExplodeDistance + Math.Max(Main.npc[player.MinionAttackTargetNPC].width * 0.5f, Main.npc[player.MinionAttackTargetNPC].height * 0.5f)) + rotOffset = (Projectile.DirectionTo(Main.npc[player.MinionAttackTargetNPC].Center)); + else + { + var tar = Projectile.Center.ClosestNPCAt(MinExplodeDistance); + if (tar != null) + rotOffset = (Projectile.DirectionTo(tar.Center)); + } + // Goop projectiles + Vector2 direction = Vector2.Lerp(-Vector2.UnitY, rotOffset, 0.25f).SafeNormalize(-Vector2.UnitY); + for (int i = 0; i < 3; i++) + { + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, + (direction * Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, + (direction * Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + } Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, - new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), - ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + (direction * Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, - new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), - ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + (direction * Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, + (direction * Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, - new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), - ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, - new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), - ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, - new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), - ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + // WoF vomit sound. + SoundEngine.PlaySound(SoundID.NPCDeath13, Projectile.Center); + Projectile.ai[0] = 0; + + //do a little hop + if (Projectile.velocity.Length() < 0.1f) + Projectile.velocity.Y -= 5; } - // WoF vomit sound. - SoundEngine.PlaySound(SoundID.NPCDeath13, Projectile.Center); - Projectile.Kill(); } Projectile.velocity.Y += 0.5f; @@ -91,12 +117,55 @@ namespace CalamityMod.Projectiles.Summon public override bool? CanDamage() => false; // Don't die on tile collision - public override bool OnTileCollide(Vector2 oldVelocity) => false; + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile.velocity *= 0.8f; + return false; + } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { fallThrough = false; return true; } + private static Texture2D GlowOutline = null; + public static Texture2D GetGlowOutline() + { + if (GlowOutline == null) + { + var texture = ModContent.Request("CalamityMod/Projectiles/Summon/EXPLODINGFROG").Value; + GlowOutline = new Texture2D(Main.graphics.GraphicsDevice, texture.Width, texture.Height); + + var BaseArray = new Color[GlowOutline.Width * GlowOutline.Height]; + var ColorArray = new Color[GlowOutline.Width * GlowOutline.Height]; + texture.GetData(BaseArray); + for (var i = 0; i < BaseArray.Length; i++) + { + ColorArray[i] = new Color(255, 255, 255) * (((float)BaseArray[i].A) / 255f); + } + GlowOutline.SetData(ColorArray); + } + return GlowOutline; + } + + public void ApplyGlowOutline(Texture2D tex, Rectangle? frame = null, float rotationOffset = 0, float borderPixels = 1, float opacity = 1) + { + Color color = Color.GreenYellow; + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + new Vector2(2, 0) * borderPixels, frame, color * opacity, Projectile.rotation - rotationOffset, new Vector2(frame.Value.Width,frame.Value.Height) *0.5f, Projectile.scale, (Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None), 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + new Vector2(0, 2) * borderPixels, frame, color * opacity, Projectile.rotation - rotationOffset, new Vector2(frame.Value.Width, frame.Value.Height) * 0.5f, Projectile.scale, (Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None), 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + new Vector2(-2, 0) * borderPixels, frame, color * opacity, Projectile.rotation - rotationOffset, new Vector2(frame.Value.Width, frame.Value.Height) * 0.5f, Projectile.scale, (Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None), 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + new Vector2(0, -2) * borderPixels, frame, color * opacity, Projectile.rotation - rotationOffset, new Vector2(frame.Value.Width, frame.Value.Height) * 0.5f, Projectile.scale, (Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None), 0); + } + public override bool PreDraw(ref Color lightColor) + { + var tex = GetGlowOutline(); + var frame = tex.Frame(1, 5, 0, Projectile.frame); + ApplyGlowOutline(tex, frame, 0, MathF.Pow(Math.Clamp((Projectile.ai[0]-90)/(ExplodeWaitTime-90), 0, 1), 2),1); + + Lighting.AddLight(Projectile.Center, Color.GreenYellow.ToVector3()*(MathF.Pow(Math.Clamp((Projectile.ai[0] - 90) / (ExplodeWaitTime - 90), 0, 1), 2))); + tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor * Projectile.Opacity, Projectile.rotation, new Vector2(frame.Width, frame.Height) * 0.5f, Projectile.scale, (Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None), 0); + return false; + } } } diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index ce02852948..cb17cbe72a 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -1,108 +1,194 @@ -using System.IO; +using System; +using System.IO; 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.Graphics; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { + //Based off Virid Vanguard projectile code for circling and drawing logic public class IgneousBlade : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - public bool Firing = false; + public enum AIState + { + CircleOwner, + TransitionToLaunch, + LaunchAtPos + } + + public int BladeIndex; + + public VertexStrip TrailDrawer; + + public Vector2 ChargeStartingPosition; + + public float BladeHoverOffsetAngle + { + get + { + float projectileCounts = Owner.ownedProjectileCounts[Type]; + if (projectileCounts <= 1f) + projectileCounts = 1f; + + return MathHelper.TwoPi * BladeIndex / projectileCounts + AITimer / 10f; + } + } + + public AIState CurrentState + { + get => (AIState)Projectile.ai[0]; + set => Projectile.ai[0] = (int)value; + } + + public Player Owner => Main.player[Projectile.owner]; + + public ref float AITimer => ref Projectile.ai[1]; + + public ref float BladeGleamInterpolant => ref Projectile.localAI[0]; + + public Vector2 ChargeTargetPos = Vector2.Zero; + public Vector2 ChargeStartPos = Vector2.Zero; + public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Type] = 0; - ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 45; } public override void SetDefaults() { - Projectile.width = 52; - Projectile.height = 86; + + Projectile.width = 84; + Projectile.height = 84; Projectile.netImportant = true; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.minionSlots = 1f; - Projectile.timeLeft = 18000; + Projectile.timeLeft = 90000; Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 7; Projectile.tileCollide = false; - Projectile.timeLeft *= 5; Projectile.minion = true; + Projectile.minionSlots = 1f; Projectile.DamageType = DamageClass.Summon; + Projectile.stopsDealingDamageAfterPenetrateHits = true; } + public override void SendExtraAI(BinaryWriter writer) { - writer.Write(Firing); + writer.Write(BladeIndex); + writer.WriteVector2(ChargeStartingPosition); } + public override void ReceiveExtraAI(BinaryReader reader) { - Firing = reader.ReadBoolean(); + BladeIndex = reader.ReadInt32(); + ChargeStartingPosition = reader.ReadVector2(); } + + public override void AI() { - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - bool isProperProjectile = Projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); - if (isProperProjectile) + // Decide whether the minion should still exist. + HandleMinionBools(); + + // Reset extra updates. + Projectile.MaxUpdates = 1; + + // Have the gleam interpolant dissipate. + BladeGleamInterpolant = MathHelper.Lerp(BladeGleamInterpolant, 0f, 0.1f); + if (BladeGleamInterpolant <= 0.02f) + BladeGleamInterpolant = 0f; + + NPC potentialTarget = Projectile.Center.MinionHoming(ViridVanguard.MaxTargetingDistance, Owner); + switch (CurrentState) { - if (player.dead) - { - modPlayer.igneousExaltation = false; - } - if (modPlayer.igneousExaltation) - { + case AIState.CircleOwner: + CircleOwner(); + break; + case AIState.TransitionToLaunch: + ChargeTargetPos = Owner.Calamity().mouseWorld; + ChargeStartPos = Owner.Center; + CurrentState = AIState.LaunchAtPos; + AITimer = 0; + Projectile.penetrate = 50; + LaunchAtTargetPos(); + break; + case AIState.LaunchAtPos: + LaunchAtTargetPos(); + break; + } + + AITimer++; + } + + public void CircleOwner() + { + Vector2 hoverDestination = Owner.Center + BladeHoverOffsetAngle.ToRotationVector2() * (AITimer < 0 ? MathHelper.Lerp(200, 100, 1 - (-AITimer) / IgneousExaltation.ChargeCooldown) : 100f); + Projectile.Center = Vector2.Lerp(Projectile.Center, hoverDestination, 0.04f).MoveTowards(hoverDestination, 20f); + Projectile.velocity *= 0.8f; + + // Teleport to the owner if sufficiently far away. + if (!Projectile.WithinRange(Owner.Center, 3200f)) + { + Projectile.Center = hoverDestination; + Projectile.netUpdate = true; + } + + // Aim away from the target. + Projectile.rotation = Projectile.AngleFrom(Owner.Center) + MathHelper.PiOver2; + } + + public void LaunchAtTargetPos() + { + Projectile.damage = Projectile.originalDamage; + if (Projectile.penetrate > 40) //First 10 hits do 2x damage + Projectile.damage *= 2; + int chargeTime = IgneousExaltation.ChargeDuration * 2; + int chargeLength = 2000; + float circleWidth = Math.Min(75, Owner.ownedProjectileCounts[Type] * 4); + var CurrentPlace = Vector2.Lerp(ChargeStartPos, ChargeStartPos + ChargeStartPos.DirectionTo(ChargeTargetPos) * chargeLength, MathF.Pow(AITimer / chargeTime, 3)); + Projectile.Center = CurrentPlace + BladeHoverOffsetAngle.ToRotationVector2() * Math.Max(MathHelper.Lerp(100f, 25f, AITimer / 10f), circleWidth); + Projectile.rotation = Projectile.AngleFrom(CurrentPlace) + MathHelper.PiOver2; + if (AITimer >= chargeTime) + { + Projectile.damage = Projectile.originalDamage; + AITimer = -IgneousExaltation.ChargeCooldown; + CurrentState = AIState.CircleOwner; + Projectile.penetrate = -1; + } + } + + public void HandleMinionBools() + { + Owner.AddBuff(ModContent.BuffType(), 3600); + if (Projectile.type == ModContent.ProjectileType()) + { + if (Owner.dead) + Owner.Calamity().igneousExaltation = false; + + if (Owner.Calamity().igneousExaltation) Projectile.timeLeft = 2; - } - } - - // Orbiting. 1 = Shooting - if (!Firing) - { - const float outwardPosition = 180f; - Projectile.Center = player.Center + Projectile.ai[0].ToRotationVector2() * outwardPosition + Vector2.UnitY * player.gfxOffY; - Projectile.rotation = Projectile.ai[0] + MathHelper.PiOver2 + MathHelper.PiOver4; - Projectile.ai[0] -= MathHelper.ToRadians(4f); - } - else - { - if (Projectile.penetrate == -1) //limit penetration for worm memes - Projectile.penetrate = 3; - - Projectile.ai[0]--; - if (Projectile.ai[0] == 1) - Projectile.Kill(); - - if (Projectile.ai[0] % 10f == 9f) - { - for (int i = 0; i < 20; i++) - { - float angle = MathHelper.TwoPi / 20f * i; - Dust dust = Dust.NewDustPerfect(Projectile.position + angle.ToRotationVector2().RotatedBy(Projectile.rotation) * new Vector2(14f, 21f), 6); - dust.velocity = angle.ToRotationVector2().RotatedBy(Projectile.rotation) * 2f; - dust.noGravity = true; - } - } } } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (Firing) - { + if (Projectile.penetrate >= 40 && CurrentState != AIState.CircleOwner) //The first 10 hits per launch can spawn blades if (Main.myPlayer == Projectile.owner) { - Projectile.ai[0] = 50; - for (int i = 0; i < 3; i++) + for (int i = 0; i < 1; i++) { - Vector2 spawnPosition = target.Center - new Vector2(0f, 550f).RotatedByRandom(MathHelper.ToRadians(8f)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, Vector2.Normalize(target.Center - spawnPosition) * 24f, ModContent.ProjectileType(), + Vector2 spawnPosition = Projectile.Center - new Vector2(0f, 550f).RotatedByRandom(MathHelper.TwoPi); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, Vector2.Normalize(Projectile.Center - spawnPosition) * 24f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } for (int i = 0; i < Main.rand.Next(28, 41); i++) @@ -114,44 +200,65 @@ namespace CalamityMod.Projectiles.Summon } Projectile.netUpdate = true; } - } + base.OnHitNPC(target, hit, damageDone); } - public override void OnKill(int timeLeft) + public Color TrailColorFunction(float completionRatio) { - for (int j = 0; j < 40; j++) - { - Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.Torch); - dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt(); - dust.noGravity = true; - } + float opacity = (float)Math.Pow(Utils.GetLerpValue(1f, 0.45f, completionRatio, true), 4D) * Projectile.Opacity * 0.48f; + var redColor = new Color(166, 46, 61); + return Color.Lerp(redColor, new(64, 51, 66), MathHelper.Clamp(completionRatio * 1.4f, 0f, 1f)) * opacity; } + + public float TrailWidthFunction(float completionRatio) => Projectile.height * (1f - completionRatio) * 0.3f; + public override bool PreDraw(ref Color lightColor) { - if (Firing) + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + + // Draw the afterimage trail. + TrailDrawer ??= new(); + GameShaders.Misc["EmpressBlade"].UseImage0("Images/Extra_201"); + GameShaders.Misc["EmpressBlade"].UseImage1("Images/Extra_193"); + GameShaders.Misc["EmpressBlade"].UseShaderSpecificData(new Vector4(1f, 0f, 0f, 0.6f)); + GameShaders.Misc["EmpressBlade"].Apply(null); + TrailDrawer.PrepareStrip(Projectile.oldPos, Projectile.oldRot, TrailColorFunction, TrailWidthFunction, Projectile.Size * 0.5f - Main.screenPosition, Projectile.oldPos.Length, true); + TrailDrawer.DrawTrail(); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + + // Draw the blade. + float outlineOpacity = 1; + float outlineWidth = 1; + if ((CurrentState == AIState.CircleOwner && AITimer < 0)) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Summon/IgneousBlade").Value; - - Rectangle rectangle = new Rectangle(0, 0, texture.Width, texture.Height); - - if (Lighting.NotRetro) - { - for (int i = 0; i < Projectile.oldPos.Length; i++) - { - Vector2 drawPos = Projectile.oldPos[i] + Projectile.Size / 2f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - Color color = Color.Lerp(Color.White, Color.Red, i / (float)Projectile.oldPos.Length) * - ((Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); - float scale = MathHelper.Lerp(Projectile.scale * 1.35f, Projectile.scale * 0.6f, i / (float)Projectile.oldPos.Length); - Main.EntitySpriteDraw(texture, drawPos, new Rectangle?(rectangle), color, - Projectile.rotation, - rectangle.Size() / 2f, scale, SpriteEffects.None, 0); - } - } - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle?(rectangle), Color.White, - Projectile.rotation, - rectangle.Size() / 2f, 1.35f, SpriteEffects.None, 0); - return false; + outlineWidth = Math.Clamp(MathF.Pow(1 - (AITimer) / -IgneousExaltation.ChargeCooldown, 3), 0, 100); + outlineOpacity = 0.75f; } - return true; + var outlineTex = IgneousExaltation.GetBladeOutlineTex(); + Main.EntitySpriteDraw(outlineTex, drawPosition + new Vector2(2, 0) * outlineWidth, frame, new Color(166, 46, 61) * outlineOpacity, Projectile.rotation - MathHelper.PiOver4, origin, Projectile.scale, direction, 0); + Main.EntitySpriteDraw(outlineTex, drawPosition + new Vector2(0, 2) * outlineWidth, frame, new Color(166, 46, 61) * outlineOpacity, Projectile.rotation - MathHelper.PiOver4, origin, Projectile.scale, direction, 0); + Main.EntitySpriteDraw(outlineTex, drawPosition + new Vector2(-2, 0) * outlineWidth, frame, new Color(166, 46, 61) * outlineOpacity, Projectile.rotation - MathHelper.PiOver4, origin, Projectile.scale, direction, 0); + Main.EntitySpriteDraw(outlineTex, drawPosition + new Vector2(0, -2) * outlineWidth, frame, new Color(166, 46, 61) * outlineOpacity, Projectile.rotation - MathHelper.PiOver4, origin, Projectile.scale, direction, 0); + Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation - MathHelper.PiOver4, origin, Projectile.scale, direction, 0); + + // Draw the gleam at the tip of the blade. + Texture2D shineTex = ModContent.Request("CalamityMod/Particles/HalfStar").Value; + Vector2 shineScale = new Vector2(1.67f, 3f) * Projectile.scale; + shineScale *= MathHelper.Lerp(0.9f, 1.1f, (float)Math.Cos(Main.GlobalTimeWrappedHourly * 7.4f + Projectile.identity) * 0.5f + 0.5f); + + Vector2 lensFlareWorldPosition = Projectile.Center + (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * Projectile.width * Projectile.scale * 0.88f; + Color lensFlareColor = Color.Lerp(Color.LimeGreen, Color.Yellow, 0.23f) with { A = 0 } * BladeGleamInterpolant; + Main.EntitySpriteDraw(shineTex, lensFlareWorldPosition - Main.screenPosition, null, lensFlareColor, 0f, shineTex.Size() * 0.5f, shineScale * 0.6f, 0, 0); + Main.EntitySpriteDraw(shineTex, lensFlareWorldPosition - Main.screenPosition, null, lensFlareColor, MathHelper.PiOver2, shineTex.Size() * 0.5f, shineScale, 0, 0); + + // Reset textures for shaders, since they're only defined once at load-time in vanilla. + GameShaders.Misc["EmpressBlade"].UseImage0("Images/Extra_209"); + GameShaders.Misc["EmpressBlade"].UseImage1("Images/Extra_210"); + return false; } } } diff --git a/Projectiles/Summon/IgneousBladeStrike.cs b/Projectiles/Summon/IgneousBladeStrike.cs index 6762bec590..56459f6c93 100644 --- a/Projectiles/Summon/IgneousBladeStrike.cs +++ b/Projectiles/Summon/IgneousBladeStrike.cs @@ -1,6 +1,10 @@ -using Microsoft.Xna.Framework; +using System; +using CalamityMod.Items.Weapons.Summon; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon @@ -18,8 +22,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetDefaults() { Projectile.friendly = true; - Projectile.width = 86; - Projectile.height = 36; + Projectile.width = 50; + Projectile.height = 50; Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; @@ -27,6 +31,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.timeLeft = 360; Projectile.alpha = 127; Projectile.DamageType = DamageClass.Summon; + Projectile.penetrate = 1; + Projectile.extraUpdates = 1; } public override void AI() @@ -44,5 +50,18 @@ namespace CalamityMod.Projectiles.Summon } SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); } + + public override bool PreDraw(ref Color lightColor) + { + + var AllWhiteTexture = IgneousExaltation.GetBladeOutlineTex(); + Main.spriteBatch.Draw(AllWhiteTexture, Projectile.Center + new Vector2(0,2) - Main.screenPosition, null, new Color(166, 46, 61), Projectile.rotation, AllWhiteTexture.Size()*0.5f, Projectile.scale * 1f, SpriteEffects.None, 1f); + Main.spriteBatch.Draw(AllWhiteTexture, Projectile.Center + new Vector2(2, 0) - Main.screenPosition, null, new Color(166, 46, 61), Projectile.rotation, AllWhiteTexture.Size() * 0.5f, Projectile.scale * 1f, SpriteEffects.None, 1f); + Main.spriteBatch.Draw(AllWhiteTexture, Projectile.Center + new Vector2(0, -2) - Main.screenPosition, null, new Color(166, 46, 61), Projectile.rotation, AllWhiteTexture.Size() * 0.5f, Projectile.scale * 1f, SpriteEffects.None, 1f); + Main.spriteBatch.Draw(AllWhiteTexture, Projectile.Center + new Vector2(-2, 0) - Main.screenPosition, null, new Color(166, 46, 61), Projectile.rotation, AllWhiteTexture.Size() * 0.5f, Projectile.scale * 1f, SpriteEffects.None, 1f); + var tex = TextureAssets.Projectile[Type].Value; + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale * 1f, SpriteEffects.None, 1f); + return false; + } } } diff --git a/Systems/Collections/DonatorsNameList.cs b/Systems/Collections/DonatorsNameList.cs index 9ae253c576..258a4fbd64 100644 --- a/Systems/Collections/DonatorsNameList.cs +++ b/Systems/Collections/DonatorsNameList.cs @@ -615,6 +615,7 @@ namespace CalamityMod.Systems.Collections "Scribbles", "Scrumlet", "Seanツ", + "Sevenfold", // previously "Woah" "Shadoku", "SharZz", "Shaun", @@ -719,7 +720,6 @@ namespace CalamityMod.Systems.Collections "William", "WillyDilly", "WinterTire", - "Woah", "Wodernet", "Wolfmaw", "WrathOfOlympus", diff --git a/Systems/World/WorldgenManagementSystem.cs b/Systems/World/WorldgenManagementSystem.cs index be629644b2..4afdf26048 100644 --- a/Systems/World/WorldgenManagementSystem.cs +++ b/Systems/World/WorldgenManagementSystem.cs @@ -224,13 +224,6 @@ namespace CalamityMod.Systems int sunkenSeaX = (GenVars.UndergroundDesertLocation.Left + GenVars.UndergroundDesertLocation.Right) / 2; int sunkenSeaY = Main.maxTilesY / 2; - SunkenSea.ForLoop = CalamityClientConfig.Instance.SunkenSeaMultiThreading switch - { - 2 => SunkenSea.CSharpParallelFor, - 1 => SunkenSea.ReLogicParallelFor, - _ => SunkenSea.NormalForLoop, - }; - // place each piece of the sunken sea based on the above positons // messages intentionally in the "incorrect" order for the player's experience. diff --git a/Tiles/Abyss/AbyssAmbient/PirateCrate.cs b/Tiles/Abyss/AbyssAmbient/PirateCrate.cs index 4aa4856eb8..935afa9232 100644 --- a/Tiles/Abyss/AbyssAmbient/PirateCrate.cs +++ b/Tiles/Abyss/AbyssAmbient/PirateCrate.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient //explode when broken (troll!) //also instakill players in for the worthy Vector2 spawnPosition = new(i * 16f + 24f, j * 16f - 4f); - // NOTE: The damage of ProjectileID.Explosives is reduced in CalamityPlayerHitHurt, this actually deals 52 / 67 / 101 damage. + // NOTE: The damage of ProjectileID.Explosives is reduced in CalamityPlayerHitHurt, this actually deals 105 / 210 / 315 damage. int blastDamage = (Main.getGoodWorld ? 99999 : 150) * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1); Projectile.NewProjectile(new EntitySource_WorldEvent(), spawnPosition.X, spawnPosition.Y, 0, 0, ProjectileID.Explosives, blastDamage, 0f); diff --git a/Tiles/FurnitureDriftwood/DriftwoodBaroqueCello.cs b/Tiles/FurnitureDriftwood/DriftwoodBaroqueCello.cs index 0ae0da97c8..d2474ec746 100644 --- a/Tiles/FurnitureDriftwood/DriftwoodBaroqueCello.cs +++ b/Tiles/FurnitureDriftwood/DriftwoodBaroqueCello.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Tiles.FurnitureDriftwood TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); //This Cello has bookcase dimensions TileObjectData.newTile.LavaDeath = false; TileObjectData.addTile(Type); - AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetText("Tiles.PipeOrgan")); + AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetText("Tiles.BaroqueCello")); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureDriftwood/DriftwoodToilet.cs b/Tiles/FurnitureDriftwood/DriftwoodToilet.cs new file mode 100644 index 0000000000..d92e67baee --- /dev/null +++ b/Tiles/FurnitureDriftwood/DriftwoodToilet.cs @@ -0,0 +1,79 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FurnitureDriftwood +{ + public class DriftwoodToilet : ModTile + { + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileWaterDeath[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 }; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(Type); + + // Toilets count as Chairs + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); + AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Toilet")); + TileID.Sets.CanBeSatOnForNPCs[Type] = true; + TileID.Sets.CanBeSatOnForPlayers[Type] = true; + TileID.Sets.HasOutlines[Type] = true; + AdjTiles = new int[] { TileID.Chairs }; + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info, shitter: true); + + public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j); + + public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType()); + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) + { + return settings.player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance); + } + + public override void HitWire(int i, int j) // I hate this please make it stop. - Merkalto + { + Tile tile = Main.tile[i, j]; + + int spawnX = i; + int spawnY = j - tile.TileFrameY / 18; + + Wiring.SkipWire(spawnX, spawnY); + Wiring.SkipWire(spawnX, spawnY + 1); + + if (Wiring.CheckMech(spawnX, spawnY, 60)) + { + Projectile.NewProjectile(Wiring.GetProjectileSource(spawnX, spawnY), spawnX * 16 + 8, spawnY * 16 + 12, 0f, 0f, ProjectileID.ToiletEffect, 0, 0f, Main.myPlayer); + } + } + } +} diff --git a/Tiles/FurnitureDriftwood/DriftwoodToilet.png b/Tiles/FurnitureDriftwood/DriftwoodToilet.png new file mode 100644 index 0000000000..cb478a2214 Binary files /dev/null and b/Tiles/FurnitureDriftwood/DriftwoodToilet.png differ diff --git a/Tiles/FurnitureDriftwood/DriftwoodToilet_Highlight.png b/Tiles/FurnitureDriftwood/DriftwoodToilet_Highlight.png new file mode 100644 index 0000000000..784cd7f73c Binary files /dev/null and b/Tiles/FurnitureDriftwood/DriftwoodToilet_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/ChargedWulfrumWallMountedBulb.cs b/Tiles/FurnitureWulfrum/ChargedWulfrumWallMountedBulb.cs index 8d0a4d96ff..406f8a0d69 100644 --- a/Tiles/FurnitureWulfrum/ChargedWulfrumWallMountedBulb.cs +++ b/Tiles/FurnitureWulfrum/ChargedWulfrumWallMountedBulb.cs @@ -98,22 +98,12 @@ namespace CalamityMod.Tiles.FurnitureWulfrum if (Main.tile[i, j].IsTileActuallyInvisible()) return; - float brightness = MathHelper.Clamp(0.2f - (j / 680), 0f, 0.2f); - - float time = Main.GameUpdateCount; - float waveScale1 = time * 0.094f; - int scalar = i - (j / 2); - float wave1 = waveScale1 * -50 + scalar * 12; - float wave1angle = 0.30f + 0.25f * MathF.Sin(MathHelper.ToRadians(wave1)); - - float transparency = 0.05f + wave1angle; - Texture2D tex = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/ChargedWulfrumWallMountedBulb_Glow").Value; Tile tile = Main.tile[i, j]; Rectangle frame = new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16); - TileFramingSystem.SlopedGlowmask(in tile, i, j, tex, frame, CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, Color.White * transparency, false), default); + TileFramingSystem.SlopedGlowmask(in tile, i, j, tex, frame, CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, Color.White, false), default); } public override void KillMultiTile(int i, int j, int frameX, int frameY) { diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.cs new file mode 100644 index 0000000000..34ed84e662 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumBathtub : ModTile + { + public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType()); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.png new file mode 100644 index 0000000000..552c86a3e5 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBathtub.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.cs new file mode 100644 index 0000000000..fd1e3426de --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumBookcase : ModTile + { + public override void SetStaticDefaults() => this.SetUpBookcase(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.png new file mode 100644 index 0000000000..93e13605b4 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumBookcase.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.cs new file mode 100644 index 0000000000..7ca49b489d --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.cs @@ -0,0 +1,37 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumChair : ModTile + { + public override void SetStaticDefaults() => this.SetUpChair(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info); + + public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j); + + public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType()); + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) + { + return settings.player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.png new file mode 100644 index 0000000000..6ee3ada599 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair_Highlight.png new file mode 100644 index 0000000000..b59a4f5245 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChair_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.cs new file mode 100644 index 0000000000..025b515bc4 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.cs @@ -0,0 +1,67 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.GameContent.Drawing; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumChandelier : ModTile + { + + public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType(), true); + + public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 201f / 255f; + g = 226f / 255f; + b = 122f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 3, 3); + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y - 2) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.png new file mode 100644 index 0000000000..bc974929bc Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier_Glow.png new file mode 100644 index 0000000000..6b8c2c9cf1 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChandelier_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.cs new file mode 100644 index 0000000000..6b0de18f35 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.cs @@ -0,0 +1,50 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumChest : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpChest(ModContent.ItemType()); + AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName(), CalamityUtils.GetMapChestName); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + + public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName(); + public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver(i, j); + public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar(i, j); + public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j); + public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j); + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.png new file mode 100644 index 0000000000..b34000a603 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest_Glow.png new file mode 100644 index 0000000000..a415184891 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest_Highlight.png new file mode 100644 index 0000000000..c0d1530a5b Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumChest_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock.png new file mode 100644 index 0000000000..d2fd41cb59 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock_Glow.png new file mode 100644 index 0000000000..8c0bf62db6 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock_Highlight.png new file mode 100644 index 0000000000..3d82b19c24 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumClock_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.cs new file mode 100644 index 0000000000..f7d2e1aca5 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.cs @@ -0,0 +1,76 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumDeskLight : ModTile + { + public override void SetStaticDefaults() => this.SetUpCandle(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 201f / 255f; + g = 226f / 255f; + b = 122f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, 1, j, 1, 1); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); + } + + public override bool RightClick(int i, int j) + { + CalamityUtils.RightClickBreak(i, j); + return true; + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y - 5) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.png new file mode 100644 index 0000000000..3acbbd1bee Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight_Glow.png new file mode 100644 index 0000000000..9089acfd02 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDeskLight_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed.cs new file mode 100644 index 0000000000..cd6f07a065 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed.cs @@ -0,0 +1,38 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumDoorClosed : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpDoorClosed(ModContent.ItemType(), true); + TileID.Sets.OpenDoorID[Type] = ModContent.TileType(); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed.png new file mode 100644 index 0000000000..90a41c9aca Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed_Highlight.png new file mode 100644 index 0000000000..e0758984f1 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorClosed_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen.cs new file mode 100644 index 0000000000..5df9264a7a --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen.cs @@ -0,0 +1,39 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum.FurnitureAnodizedWulfrum; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumDoorOpen : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpDoorOpen(ModContent.ItemType(), true); + TileID.Sets.CloseDoorID[Type] = ModContent.TileType(); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen.png new file mode 100644 index 0000000000..98e854a8cc Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen_Highlight.png new file mode 100644 index 0000000000..ca767aed7b Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDoorOpen_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.cs new file mode 100644 index 0000000000..6d78abbe7c --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.cs @@ -0,0 +1,51 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumDresser : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpDresser(ModContent.ItemType()); + AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName(), CalamityUtils.GetMapChestName); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + + public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName(); + public override void MouseOver(int i, int j) => CalamityUtils.DresserMouseOver(); + public override void MouseOverFar(int i, int j) => CalamityUtils.DresserMouseFar(); + public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j); + public override bool RightClick(int i, int j) => CalamityUtils.DresserRightClick(); + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.png new file mode 100644 index 0000000000..d37893dd8d Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser_Glow.png new file mode 100644 index 0000000000..26cee14f42 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser_Highlight.png new file mode 100644 index 0000000000..6e31954740 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumDresser_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.cs new file mode 100644 index 0000000000..d181d7d589 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.cs @@ -0,0 +1,55 @@ +using CalamityMod.Items.Placeables.FurnitureDriftwood; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumJukebox : ModTile + { + public override void SetStaticDefaults() + { + Main.tileLighted[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileLavaDeath[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); //This Jukebox has bookcase dimensions + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(Type); + AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetText("Tiles.Jukebox")); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.png new file mode 100644 index 0000000000..02f87edf42 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox_Glow.png new file mode 100644 index 0000000000..3b011f3b84 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumJukebox_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.cs new file mode 100644 index 0000000000..9818d57552 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumLamp : ModTile + { + public override void SetStaticDefaults() => this.SetUpLamp(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 201f / 255f; + g = 226f / 255f; + b = 122f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 1, 3); + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.png new file mode 100644 index 0000000000..0d0d621ae0 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp_Glow.png new file mode 100644 index 0000000000..b1d96c1638 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLamp_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.cs new file mode 100644 index 0000000000..ef14085edf --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.cs @@ -0,0 +1,66 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.GameContent.Drawing; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumLantern : ModTile + { + public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType(), true); + public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 201f / 255f; + g = 226f / 255f; + b = 122f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y - 4) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 1, 2); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.png new file mode 100644 index 0000000000..99ca6f27d1 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern_Glow.png new file mode 100644 index 0000000000..cb80de710c Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumLantern_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.cs new file mode 100644 index 0000000000..ae6d74a64a --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumSink : ModTile + { + public override void SetStaticDefaults() => this.SetUpSink(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.png new file mode 100644 index 0000000000..ea91bbf73b Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSink.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.cs new file mode 100644 index 0000000000..ea86bba509 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumSleepingPod : ModTile + { + public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override bool RightClick(int i, int j) => CalamityUtils.BedRightClick(i, j); + + public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType()); + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.png new file mode 100644 index 0000000000..76a7a63f3e Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPodActive.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPodActive.png new file mode 100644 index 0000000000..2f42aefcdd Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPodActive.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPodActive_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPodActive_Glow.png new file mode 100644 index 0000000000..285c7fb955 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPodActive_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod_Glow.png new file mode 100644 index 0000000000..22a6ed63e9 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod_Highlight.png new file mode 100644 index 0000000000..514de2d0d8 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSleepingPod_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.cs new file mode 100644 index 0000000000..b63d062ebf --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.cs @@ -0,0 +1,55 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumSofa : ModTile + { + public override void SetStaticDefaults() => this.SetUpSofa(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.BenchSitInfo(i, j, ref info); + + public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j); + + public override void MouseOver(int i, int j) => CalamityUtils.BenchMouseOver(i, j, ModContent.ItemType()); + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) + { + return settings.player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance); + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.png new file mode 100644 index 0000000000..136844ea32 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa_Glow.png new file mode 100644 index 0000000000..ea27a6db33 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa_Highlight.png new file mode 100644 index 0000000000..ee7b74d4f0 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumSofa_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.cs new file mode 100644 index 0000000000..f1cb1bd42e --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.cs @@ -0,0 +1,41 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumTable : ModTile + { + public override void SetStaticDefaults() => this.SetUpTable(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return; + + int xFrameOffset = Main.tile[i, j].TileFrameX; + int yFrameOffset = Main.tile[i, j].TileFrameY; + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable_Glow").Value; + Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; + Color drawColour = Color.White; + Tile trackTile = Main.tile[i, j]; + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) + spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.IsHalfBlock) + spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.png new file mode 100644 index 0000000000..6cd3908340 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable_Glow.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable_Glow.png new file mode 100644 index 0000000000..39b2d14fc7 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumTable_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.cs new file mode 100644 index 0000000000..3dd8ae69af --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.cs @@ -0,0 +1,79 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumToilet : ModTile + { + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileWaterDeath[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 }; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(Type); + + // Toilets count as Chairs + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); + AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Toilet")); + TileID.Sets.CanBeSatOnForNPCs[Type] = true; + TileID.Sets.CanBeSatOnForPlayers[Type] = true; + TileID.Sets.HasOutlines[Type] = true; + AdjTiles = new int[] { TileID.Chairs }; + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info, shitter: true); + + public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j); + + public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType()); + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) + { + return settings.player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance); + } + + public override void HitWire(int i, int j) // I hate this please make it stop. - Merkalto + { + Tile tile = Main.tile[i, j]; + + int spawnX = i; + int spawnY = j - tile.TileFrameY / 18; + + Wiring.SkipWire(spawnX, spawnY); + Wiring.SkipWire(spawnX, spawnY + 1); + + if (Wiring.CheckMech(spawnX, spawnY, 60)) + { + Projectile.NewProjectile(Wiring.GetProjectileSource(spawnX, spawnY), spawnX * 16 + 8, spawnY * 16 + 12, 0f, 0f, ProjectileID.ToiletEffect, 0, 0f, Main.myPlayer); + } + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.png new file mode 100644 index 0000000000..890177b446 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet_Highlight.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet_Highlight.png new file mode 100644 index 0000000000..5c2fc8b88a Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumToilet_Highlight.png differ diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.cs b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.cs new file mode 100644 index 0000000000..8281656683 --- /dev/null +++ b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum.FurnitureAnodizedWulfrum +{ + public class AnodizedWulfrumWorkBench : ModTile + { + public override void SetStaticDefaults() => this.SetUpWorkBench(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Tungsten, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.png b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.png new file mode 100644 index 0000000000..94cbc92609 Binary files /dev/null and b/Tiles/FurnitureWulfrum/FurnitureAnodizedWulfrum/AnodizedWulfrumWorkBench.png differ diff --git a/Tiles/FurnitureWulfrum/WulfrumWallMountedBulb.cs b/Tiles/FurnitureWulfrum/WulfrumWallMountedBulb.cs index b13c236cc4..384d860146 100644 --- a/Tiles/FurnitureWulfrum/WulfrumWallMountedBulb.cs +++ b/Tiles/FurnitureWulfrum/WulfrumWallMountedBulb.cs @@ -98,22 +98,12 @@ namespace CalamityMod.Tiles.FurnitureWulfrum if (Main.tile[i, j].IsTileActuallyInvisible()) return; - float brightness = MathHelper.Clamp(0.2f - (j / 680), 0f, 0.2f); - - float time = Main.GameUpdateCount; - float waveScale1 = time * 0.094f; - int scalar = i - (j / 2); - float wave1 = waveScale1 * -50 + scalar * 12; - float wave1angle = 0.30f + 0.25f * MathF.Sin(MathHelper.ToRadians(wave1)); - - float transparency = 0.05f + wave1angle; - Texture2D tex = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/WulfrumWallMountedBulb_Glow").Value; Tile tile = Main.tile[i, j]; Rectangle frame = new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16); - TileFramingSystem.SlopedGlowmask(in tile, i, j, tex, frame, CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, Color.White * transparency, false), default); + TileFramingSystem.SlopedGlowmask(in tile, i, j, tex, frame, CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, Color.White, false), default); } public override void KillMultiTile(int i, int j, int frameX, int frameY) { diff --git a/Utilities/LocalizationUtils.cs b/Utilities/LocalizationUtils.cs index 07d6a8c75f..3c579363a5 100644 --- a/Utilities/LocalizationUtils.cs +++ b/Utilities/LocalizationUtils.cs @@ -89,6 +89,7 @@ namespace CalamityMod public static string ToRegenPerSecond(this int regen) => Round(regen * 0.5f, "N2"); public static string ToJumpSpeedPercent(this float boost) => Round(boost * 20f, "N2"); + public static string ToStealth(this float stealth) => Round(stealth * 100f, "N0"); public static string ToPercent(this float percent, string precision = "N1") => Round(percent * 100f, precision); public static string ToPercent(this double percent, string precision = "N1") => Round(percent * 100D, precision); diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs index 3940899517..d65a255a8d 100644 --- a/Utilities/PlayerUtils.cs +++ b/Utilities/PlayerUtils.cs @@ -9,6 +9,7 @@ using CalamityMod.Enums; using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor; +using CalamityMod.Items.Armor.Statigel; using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Systems.Collections; using CalamityMod.World; @@ -438,8 +439,8 @@ namespace CalamityMod int extraIFrames = 0; if (modPlayer.godSlayerThrowing && hurtInfo.Damage > 80) extraIFrames += 30; - if (modPlayer.statigelSet && hurtInfo.Damage > 100) - extraIFrames += 30; + if (modPlayer.statigelSet && hurtInfo.Damage > StatigelArmor.SetBonusHurtDamageThreshold) + extraIFrames += StatigelArmor.SetBonusIFrameExtension; // Deific Amulet provides 10 to 40 bonus immunity frames when you get hit which scale with your missing health. // If you only take 1 damage, you get 5 iframes. diff --git a/Walls/AncientSmoothNavystoneWall.cs b/Walls/AncientSmoothNavystoneWall.cs new file mode 100644 index 0000000000..ec71f2f560 --- /dev/null +++ b/Walls/AncientSmoothNavystoneWall.cs @@ -0,0 +1,27 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class AncientSmoothNavystoneWall : ModWall, IVisibleThroughWater + { + int IVisibleThroughWater.WaterMapEntry { get; set; } + + public override void SetStaticDefaults() + { + Main.wallHouse[Type] = true; + + this.AddMapEntryWithWaterVisibility(new Color(27, 35, 36)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.SnowBlock, 0f, 0f, 1, new Color(54, 69, 72), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + } +} diff --git a/Walls/AncientSmoothNavystoneWall.png b/Walls/AncientSmoothNavystoneWall.png new file mode 100644 index 0000000000..585d059bc8 Binary files /dev/null and b/Walls/AncientSmoothNavystoneWall.png differ diff --git a/Walls/SmoothNavystoneWall.png b/Walls/SmoothNavystoneWall.png index 585d059bc8..09aa9344ea 100644 Binary files a/Walls/SmoothNavystoneWall.png and b/Walls/SmoothNavystoneWall.png differ diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 31de2c97fe..bfd794e460 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -45,35 +45,6 @@ namespace CalamityMod.World action.Invoke(i); } - public static void ReLogicParallelFor(int fromInclusive, int toExclusive, int step, Action action) - { - FastParallel.For(fromInclusive, toExclusive, (start, end, _) => - { - for (int i = start; i < end; i += step) - action.Invoke(i); - }); - } - - public static void CSharpParallelFor(int fromInclusive, int toExclusive, int step, Action action) - { - var partitioner = Partitioner.Create(fromInclusive, toExclusive, step); - Parallel.ForEach(partitioner, (range, _) => - { - for (int i = range.Item1; i < range.Item2; i += step) - action.Invoke(i); - }); - } - - /// - /// The delegate that describes the method of a type of for loop. - /// - public delegate void ForLoopMethod(int fromInclusive, int toExclusive, int step, Action action); - - /// - /// The current type of for loop used to generate the Sunken Sea. - /// - public static ForLoopMethod ForLoop; - public static void PlaceTimelessShores(int startPosX, int startPosY) { int biomeSize = 250 + (Main.maxTilesX / 180); @@ -91,7 +62,7 @@ namespace CalamityMod.World else return -steepness * x + steepness; } - ForLoop.Invoke(startPosX - biomeSize - 5, startPosX + biomeSize + 20, 15, (X) => + for (int X = startPosX - biomeSize - 5; X < startPosX + biomeSize + 20; X += 15) { float height = MathHelper.Lerp(startPosY + 35, startPosY - 15, trapezoidLateralSteep(Utils.GetLerpValue(startPosX - biomeSize - 20, startPosX + biomeSize + 20, X))); for (int Y = startPosY + 25; Y >= height; Y -= 10) @@ -104,13 +75,13 @@ namespace CalamityMod.World })); WorldUtils.Gen(new Point(X, Y), new ModShapes.All(circle), new Actions.SetTile((ushort)ModContent.TileType())); } - }); + } // // Makes the bottom borders of the Timeless Shores curved downwards. // const int totalCuveDepth = 90; - ForLoop.Invoke(startPosX - biomeSize - 10, startPosX - biomeSize + 200, 10, (x) => + for (int x = startPosX - biomeSize - 10; x < startPosX - biomeSize + 200; x += 10) { int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 17, startPosX - biomeSize + 200, x, true))); for (int y = startPosY + 50; y <= startPosY + 70 + curveDepth; y += 5) @@ -123,8 +94,9 @@ namespace CalamityMod.World })); WorldUtils.Gen(new Point(x, y), new ModShapes.All(circle), new Actions.SetTile((ushort)ModContent.TileType())); } - }); - ForLoop.Invoke(startPosX + biomeSize - 200, startPosX + biomeSize + 10, 5, (x) => + } + + for (int x = startPosX + biomeSize - 200; x < startPosX + biomeSize + 10; x += 5) { int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 20, startPosX + biomeSize - 200, x, true))); for (int y = startPosY + 50; y <= startPosY + 70 + curveDepth; y += 5) @@ -137,11 +109,11 @@ namespace CalamityMod.World })); WorldUtils.Gen(new Point(x, y), new ModShapes.All(circle), new Actions.SetTile((ushort)ModContent.TileType())); } - }); + } // Clear a smaller square out of the center where the biomes stuff will be // Added curves to the top of the biome via curve depth -hpu 02/19/25 - ForLoop.Invoke(startPosX - biomeSize + 10, startPosX + biomeSize - 10, 1, (X) => + for (int X = startPosX - biomeSize + 10; X < startPosX + biomeSize - 10; X += 1) { int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 20, startPosX + biomeSize - 200, X, true))); int curveDepth2 = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 17, startPosX - biomeSize + 200, X, true))); @@ -161,12 +133,12 @@ namespace CalamityMod.World new Actions.Clear() })); } - }); + } // // Places slopes at the sides of the shores to actually make shores. // - ForLoop.Invoke(startPosX - biomeSize - 15, startPosX - biomeSize + 200, 20, (moundX) => + for (int moundX = startPosX - biomeSize - 15; moundX < startPosX - biomeSize + 200; moundX += 20) { int RandomX = Main.rand.Next(15, 20); ShapeData mound = new(); @@ -177,8 +149,9 @@ namespace CalamityMod.World WorldUtils.Gen(new Point(moundX, moundY), new Shapes.Mound(30, moundHeight), blotchMod); WorldUtils.Gen(new Point(moundX, moundY), new ModShapes.All(mound), new Actions.SetTile((ushort)ModContent.TileType())); WorldUtils.Gen(new Point(moundX, moundY), new ModShapes.All(mound), new Actions.PlaceWall((ushort)ModContent.WallType())); - }); - ForLoop.Invoke(startPosX + biomeSize - 200, startPosX + biomeSize - 15, 20, (moundX) => + } + + for (int moundX = startPosX + biomeSize - 200; moundX < startPosX + biomeSize - 15; moundX += 20) { ShapeData mound = new(); GenAction blotchMod = new Modifiers.Blotches().Output(mound); @@ -187,8 +160,7 @@ namespace CalamityMod.World WorldUtils.Gen(new Point(moundX, moundY), new Shapes.Mound(30, moundHeight), blotchMod); WorldUtils.Gen(new Point(moundX, moundY), new ModShapes.All(mound), new Actions.SetTile((ushort)ModContent.TileType())); - }); - + } // // Makes a large platform in the middle of the Timeless Shores. @@ -196,7 +168,7 @@ namespace CalamityMod.World const int platformSize = 130; const int platformHeight = 35; // Remember that because of Terraria's coordinate system, making it lower actually makes it higher. const int platformDepth = 35; // How deep it goes. Like above, the higher it is, the lower it goes. - ForLoop.Invoke(startPosX - platformSize / 2, startPosX + platformSize / 2, 5, (platformX) => + for (int platformX = startPosX - platformSize / 2; platformX < startPosX + platformSize / 2; platformX += 5) { // This makes the "stem" of the platform be thinner towards the base and then expand on the top. int thickness = (int)(MathF.Pow(CalamityUtils.Convert01To010(Utils.GetLerpValue(startPosX - platformSize / 2, startPosX + platformSize / 2, platformX)), 3f) * platformDepth) + platformHeight; @@ -209,16 +181,16 @@ namespace CalamityMod.World new Actions.PlaceTile((ushort)ModContent.TileType()) })); } - }); - ForLoop.Invoke(startPosX - platformSize / 2, startPosX + platformSize / 2, 1, (x) => + } + for (int x = startPosX - platformSize / 2; x < startPosX + platformSize / 2; x += 1) { float interpolator = CalamityUtils.Convert01To010(Utils.GetLerpValue(startPosX - platformSize / 2, startPosX + platformSize / 2, x, true)); int elevation = (int)MathHelper.Lerp(4f, 1f, interpolator); WorldUtils.Gen(new Point(x, startPosY + platformHeight - 7), new Shapes.Circle(elevation), Actions.Chain(new GenAction[] { new Actions.Clear(), })); - }); + } // Plateau - ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 100, (wallPillarX) => + for (int wallPillarX = startPosX - biomeSize; wallPillarX < startPosX + biomeSize; wallPillarX += 100) { int randomDisplacement = WorldGen.genRand.Next(-27, 46); int RandomX = Main.rand.Next(15, 20); @@ -246,23 +218,23 @@ namespace CalamityMod.World ; } - }); + } //place water below the clear barrier for the islands so that theres water inbetween them - ForLoop.Invoke(startPosX - biomeSize + 35, startPosX + biomeSize - 35, 1, (WaterX) => + for (int WaterX = startPosX - biomeSize + 35; WaterX < startPosX + biomeSize - 35; WaterX += 1) { for (int WaterY = startPosY + 37; WaterY <= startPosY + 60; WaterY++) { Main.tile[WaterX, WaterY].Get().LiquidType = LiquidID.Water; Main.tile[WaterX, WaterY].LiquidAmount = byte.MaxValue; } - }); + } // // Generates pillars made out of walls at random points in the Timeless Shores. // const int furthestDistanceFromCenter = 100; - ForLoop.Invoke(startPosX - (biomeSize / 2) - furthestDistanceFromCenter, startPosX + (biomeSize / 2) + furthestDistanceFromCenter, 100, (wallPillarX) => + for (int wallPillarX = startPosX - (biomeSize / 2) - furthestDistanceFromCenter; wallPillarX < startPosX + (biomeSize / 2) + furthestDistanceFromCenter; wallPillarX += 100) { int randomDisplacementX = WorldGen.genRand.Next(-10, 10); int RandomX = Main.rand.Next(3, 6); @@ -288,13 +260,13 @@ namespace CalamityMod.World })) ; } - }); + } // // Makes the transition area to the Timeless Shores. // Replaces tiles, walls, and places some water spots. // - ForLoop.Invoke(startPosX - biomeSize - 30, startPosX + biomeSize + 30, 20, (x) => + for (int x = startPosX - biomeSize - 30; x < startPosX + biomeSize + 30; x += 20) { int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 30, startPosX + biomeSize - 200, x, true))); int curveDepth2 = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 30, startPosX - biomeSize + 200, x, true))); @@ -360,7 +332,7 @@ namespace CalamityMod.World } // Place layer of sand on valid runestone blocks. - ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 1, (X) => + for (int X = startPosX - biomeSize; X < startPosX + biomeSize; X += 1) { for (int Y = startPosY - 100; Y <= startPosY + 100; Y++) { @@ -409,16 +381,16 @@ namespace CalamityMod.World //} } - }); + } // Slope tiles - ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 1, (X) => + for (int X = startPosX - biomeSize; X < startPosX + biomeSize; X += 1) { for (int Y = startPosY - 300; Y <= startPosY + 200; Y++) Tile.SmoothSlope(X, Y); - }); - }); + } + } } // Sides of the sunken sea (radiant reefs) @@ -506,7 +478,7 @@ namespace CalamityMod.World } // Cleanup - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -526,10 +498,10 @@ namespace CalamityMod.World WorldGen.KillTile(X, Y); } } - }); + } // Place layer of sand blocks on valid surfaces - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -546,10 +518,10 @@ namespace CalamityMod.World PlaceSand(X, Y, 5, ModContent.TileType()); } } - }); + } // Cleanup again - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -578,7 +550,7 @@ namespace CalamityMod.World Tile.SmoothSlope(X, Y); } } - }); + } } // Middle of the sunken sea (polyp forest) @@ -682,7 +654,7 @@ namespace CalamityMod.World } //cleanup - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -706,10 +678,10 @@ namespace CalamityMod.World } } } - }); + } //place extra tiles - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 20; Y <= origin.Y + verticalRadius + 20; Y++) { @@ -731,8 +703,8 @@ namespace CalamityMod.World } } - }); - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + } + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 20; Y <= origin.Y + verticalRadius + 20; Y++) { @@ -753,11 +725,11 @@ namespace CalamityMod.World } } } - }); + } //cleanup again - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -790,7 +762,7 @@ namespace CalamityMod.World Tile.SmoothSlope(X, Y); } } - }); + } } //bottom of the biome (gleaming burrows) public static void PlaceGleamingBurrows(int startPosX, int startPosY) @@ -816,7 +788,7 @@ namespace CalamityMod.World Vector2 bottomFoci = center + fociOffset; //place another barrier so the gleaming burrows doesnt just burst into the gully - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 10, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 10) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y += 2) { @@ -845,7 +817,7 @@ namespace CalamityMod.World } } } - }); + } @@ -927,7 +899,7 @@ namespace CalamityMod.World //cleanup the perlin caves - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -951,11 +923,11 @@ namespace CalamityMod.World } } } - }); + } //place extra tiles - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -975,7 +947,7 @@ namespace CalamityMod.World } } } - }); + } //cleanup again, also place geodes for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X++) @@ -1103,7 +1075,7 @@ namespace CalamityMod.World //cleanup the perlin caves - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -1127,11 +1099,11 @@ namespace CalamityMod.World } } } - }); + } //place extra tiles - ForLoop.Invoke(origin.X - biomeSize - 3, origin.X + biomeSize + 3, 1, (X) => + for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { @@ -1151,7 +1123,7 @@ namespace CalamityMod.World } } } - }); + } //cleanup again for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X++) @@ -1198,7 +1170,7 @@ namespace CalamityMod.World int XLeft = GenVars.UndergroundDesertLocation.Left + 40; int XRight = GenVars.UndergroundDesertLocation.Right - 70; //place blocks of basalt all the way down to hell, here it just places one block and wall so it doesnt hurt preformance - ForLoop.Invoke(startPosX - biomeSize - 60, startPosX + biomeSize + 60, 1, (X) => + for (int X = startPosX - biomeSize - 60; X < startPosX + biomeSize + 60; X += 1) { //const int totalCuveDepth = -120; //const int totalCuveDepth2 = 120; @@ -1229,7 +1201,7 @@ namespace CalamityMod.World WorldGen.PlaceTile(X, Y, (ushort)ModContent.TileType()); WorldGen.PlaceWall(X, Y, ModContent.WallType()); } - }); + } //place caverns and lava for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X <= startPosX + biomeSize + (Main.maxTilesX / 25); X++) @@ -1256,7 +1228,7 @@ namespace CalamityMod.World } //place sand blocks - ForLoop.Invoke(startPosX - biomeSize - (Main.maxTilesX / 25), startPosX + biomeSize + (Main.maxTilesX / 25), 1, (X) => + for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X < startPosX + biomeSize + (Main.maxTilesX / 25); X += 1) { for (int Y = startPosY; Y <= Main.maxTilesY - 210; Y++) { @@ -1273,10 +1245,10 @@ namespace CalamityMod.World PlaceSand(X, Y, 3, ModContent.TileType()); } } - }); + } //cleanup - ForLoop.Invoke(startPosX - biomeSize - (Main.maxTilesX / 25), startPosX + biomeSize + (Main.maxTilesX / 25), 1, (X) => + for(int X = startPosX - biomeSize - (Main.maxTilesX / 25); X < startPosX + biomeSize + (Main.maxTilesX / 25); X += 1) { for (int Y = startPosY; Y <= Main.maxTilesY - 210; Y++) { @@ -1305,7 +1277,7 @@ namespace CalamityMod.World } Tile.SmoothSlope(X, Y); } - }); + } } //cleanup is done separately because for whatever reason it keeps placing water inside of the gully if the cleanup is done before it @@ -1902,7 +1874,7 @@ namespace CalamityMod.World getAttachedPoints(x, y - 1, points); } - ForLoop.Invoke(20, Main.maxTilesX - 20, 1, (x) => + for (int x = 20; x < Main.maxTilesX - 20; x += 1) { for (int y = 20; y < Main.maxTilesY - 20; y++) { @@ -1922,7 +1894,7 @@ namespace CalamityMod.World } } } - }); + } }