From 31a7ca693860651b440f4d640d96dbcc03ed7ba2 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 9 Nov 2024 17:29:00 -0800 Subject: [PATCH] Goodbye Sun of Hell --- Balancing/BalancingChangesManager.cs | 3 - CalPlayer/CalamityPlayerHitHurt.cs | 3 +- CalamityLists.cs | 1 - .../Rogue => ExtraTextures}/ExplosiveSun.png | Bin .../Rogue => ExtraTextures}/ExplosiveSun2.png | Bin .../Rogue => ExtraTextures}/ExplosiveSun3.png | Bin Items/Weapons/Rogue/HellsSun.cs | 85 ---------------- Items/Weapons/Rogue/HellsSun.png | Bin 499 -> 0 bytes Items/Weapons/Rogue/ProfanedPartisan.cs | 5 +- .../en-US/Mods.CalamityMod.Items.Misc.hjson | 9 +- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 12 --- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 2 - Projectiles/Rogue/ExplosiveSun.cs | 94 ------------------ Projectiles/Rogue/HellsSunProj.cs | 89 ----------------- .../Typeless/ArtifactOfResilienceShards.cs | 1 + .../Typeless/RelicOfDeliveranceSpear.cs | 1 + 16 files changed, 11 insertions(+), 294 deletions(-) rename {Projectiles/Rogue => ExtraTextures}/ExplosiveSun.png (100%) rename {Projectiles/Rogue => ExtraTextures}/ExplosiveSun2.png (100%) rename {Projectiles/Rogue => ExtraTextures}/ExplosiveSun3.png (100%) delete mode 100644 Items/Weapons/Rogue/HellsSun.cs delete mode 100644 Items/Weapons/Rogue/HellsSun.png delete mode 100644 Projectiles/Rogue/ExplosiveSun.cs delete mode 100644 Projectiles/Rogue/HellsSunProj.cs diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 2dab25e824..cb8d599aaa 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -296,9 +296,6 @@ namespace CalamityMod.Balancing #endregion #region Providence - // 80% resist to Hell's Sun. - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.2f, ProjectileType()))); - // 35% resist to Vanishing Point. This thing desperately needs a rework. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.65f, ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType()))); #endregion diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index b4c1b2f941..d32f9ada46 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1515,7 +1515,8 @@ namespace CalamityMod.CalPlayer theBeeCooldown = TheBee.CooldownLength; } - if (rOfResilienceCooldown == 0 && rOfResilienceEffect > 0) + // TODO: If possible, find a way to make it so parries don't activate the hit + if (rOfResilienceCooldown == 0 && rOfResilienceEffect > 0 && hurtInfo.Damage > 1) { int cooldownTime = (Player.Calamity().profanedSoulRelicBuff ? 300 : 600); rOfResilienceCooldown = cooldownTime; diff --git a/CalamityLists.cs b/CalamityLists.cs index 4b96b0df81..50a7bce5a9 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -2724,7 +2724,6 @@ namespace CalamityMod ItemType(), ItemType(), ItemType(), - ItemType(), ItemType(), ItemType(), ItemType(), diff --git a/Projectiles/Rogue/ExplosiveSun.png b/ExtraTextures/ExplosiveSun.png similarity index 100% rename from Projectiles/Rogue/ExplosiveSun.png rename to ExtraTextures/ExplosiveSun.png diff --git a/Projectiles/Rogue/ExplosiveSun2.png b/ExtraTextures/ExplosiveSun2.png similarity index 100% rename from Projectiles/Rogue/ExplosiveSun2.png rename to ExtraTextures/ExplosiveSun2.png diff --git a/Projectiles/Rogue/ExplosiveSun3.png b/ExtraTextures/ExplosiveSun3.png similarity index 100% rename from Projectiles/Rogue/ExplosiveSun3.png rename to ExtraTextures/ExplosiveSun3.png diff --git a/Items/Weapons/Rogue/HellsSun.cs b/Items/Weapons/Rogue/HellsSun.cs deleted file mode 100644 index 9d23b85f76..0000000000 --- a/Items/Weapons/Rogue/HellsSun.cs +++ /dev/null @@ -1,85 +0,0 @@ -using CalamityMod.CalPlayer; -using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.Rogue; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.DataStructures; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.Rogue -{ - public class HellsSun : RogueWeapon - { - public override void SetDefaults() - { - Item.width = 22; - Item.height = 18; - Item.damage = 200; - Item.DamageType = RogueDamageClass.Instance; - Item.noMelee = true; - Item.noUseGraphic = true; - Item.useTime = 15; - Item.useAnimation = 15; - Item.useStyle = ItemUseStyleID.Swing; - Item.knockBack = 5; - Item.value = CalamityGlobalItem.RarityPurpleBuyPrice; - Item.rare = ItemRarityID.Purple; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; - - Item.shootSpeed = 5f; - Item.shoot = ModContent.ProjectileType(); - } - - public override bool CanUseItem(Player player) - { - if (player.altFunctionUse == 2) - { - Item.shoot = ProjectileID.None; - return player.ownedProjectileCounts[ModContent.ProjectileType()] > 0; - } - else - { - Item.shoot = ModContent.ProjectileType(); - return player.ownedProjectileCounts[ModContent.ProjectileType()] < 10; - } - } - - public override float StealthDamageMultiplier => 0.10f; - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.killSpikyBalls = false; - if (modPlayer.StealthStrikeAvailable()) //setting the stealth strike - { - int stealth = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - if (stealth.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[stealth].Calamity().stealthStrike = true; - Main.projectile[stealth].penetrate = -1; - Main.projectile[stealth].timeLeft = 2400; - } - return false; - } - return true; - } - - public override bool AltFunctionUse(Player player) - { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.killSpikyBalls = true; - return true; - } - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(ItemID.LunarBar, 10). - AddIngredient(20). - AddTile(TileID.LunarCraftingStation). - Register(); - } - } -} diff --git a/Items/Weapons/Rogue/HellsSun.png b/Items/Weapons/Rogue/HellsSun.png deleted file mode 100644 index 130f9037b446c667d8c3d5e085dfe16440aec27b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 499 zcmV4ugq_e;|QlEhfulD06PJ4Ma64LGYfVP$`br?ruQot?whNj^Lu{(^_~N;tBzU`4z|5OFU~KLw zn7DB{+VE;IkdD=V1mgKyV0tvn?=*%h_W1tP1n6wlBCnTT2ag}U4Cy#KatdU7=_u8{ z8UKsY>*_r2Y}L@uVSBb)(9h|Y?;Ggnxm20wUu$7*=H6)Zy*iJ}m$K!?({O{8Zm)n3 ztIN@b0UZLSPiOy`_+Rp}pMUS}fLaKR?)J}tece2EBB9@sl@b31b2D(NBz&yE0000I pbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLkV1j)o=e_^{ diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 1a0b20520d..c6d2aec7aa 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 56; Item.height = 56; - Item.damage = 322; + Item.damage = 222; Item.knockBack = 8f; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; @@ -51,8 +51,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(500). - AddIngredient(4). + AddIngredient(). AddIngredient(25). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index b06f27b629..89da597926 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -433,9 +433,10 @@ RelicOfResilience: { DisplayName: Relic Of Resilience Tooltip: ''' - 1... - 2... - 30... - rocks hmmmmmmm + While holding the item, rock shards surround you, dealing rapid damage to enemies they contact + While the shards are around you, your minimum defense is set to 150 and minimum dr to 10% + Nearby players gain this same bonus while you hold the item + Taking a hit or pressing will pull in the shards, then blast them outward, inflicting a Profaned Weakness + This effect has a 10 second cooldown after you are hit ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index b4f0989524..75d492f2e4 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -538,18 +538,6 @@ HeavenfallenStardisk: { ''' } -HellsSun: { - DisplayName: Hell's Sun - Tooltip: - ''' - Hurls up to 10 gravity-defying spiky balls - Once stationary, periodically emit small suns that explode on hit - Stealth strikes emit suns at a faster rate and last for a longer amount of time - Press to delete all existing spiky balls - 'The Subterranean Sun in the palm of your hand' - ''' -} - Hypothermia: { DisplayName: Hypothermia Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index d31641e95d..2b3e97fb94 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -99,7 +99,6 @@ ExecutionersBladeStealthProj.DisplayName: Executioner's Blade ExorcismProj.DisplayName: Exorcism ExorcismShockwave.DisplayName: Exorcism Shockwave ExorcismStar.DisplayName: Exorcism Star -ExplosiveSun.DisplayName: Explosive Sun FantasyTalismanProj.DisplayName: Talisman FantasyTalismanStealth.DisplayName: Talisman FeatherKnifeProjectile.DisplayName: Feather Knife @@ -132,7 +131,6 @@ GrimreaverBat.DisplayName: Grim Bat GrimreaverSkull.DisplayName: Grim Skull HeavenfallenEnergy.DisplayName: Heavenfallen Energy HeavenfallenStardiskBoomerang.DisplayName: Heavenfallen Stardisk -HellsSunProj.DisplayName: Hell's Sun Honeycomb.DisplayName: Honeycomb HoneycombFragment.DisplayName: Honeycomb Fragment HypothermiaChunk.DisplayName: Ice Chunk diff --git a/Projectiles/Rogue/ExplosiveSun.cs b/Projectiles/Rogue/ExplosiveSun.cs deleted file mode 100644 index ca0e3f46ed..0000000000 --- a/Projectiles/Rogue/ExplosiveSun.cs +++ /dev/null @@ -1,94 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class ExplosiveSun : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetDefaults() - { - Projectile.width = 22; - Projectile.height = 22; - //Projectile.aiStyle = ProjAIStyleID.TerrarianBeam; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = 1; - Projectile.light = 0.5f; - Projectile.alpha = 50; - Projectile.scale = 1.2f; - Projectile.timeLeft = 60; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - } - - public override void AI() - { - Projectile.velocity.X *= 0.985f; - Projectile.velocity.Y *= 0.985f; - } - - public override bool PreDraw(ref Color lightColor) - { - //Changes the texture of the projectile - if (Projectile.ai[0] == 1f) - { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/ExplosiveSun2").Value; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); - return false; - } - if (Projectile.ai[0] == 2f) - { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/ExplosiveSun3").Value; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); - return false; - } - return true; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); - - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); - - public override void OnKill(int timeLeft) - { - Projectile.position = Projectile.Center; - Projectile.width = Projectile.height = 192; - Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); - Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - Projectile.maxPenetrate = -1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.damage /= 2; - Projectile.Damage(); - if (Main.rand.NextBool(3)) - { - SoundEngine.PlaySound(SoundID.Item14 with { Volume = SoundID.Item14.Volume * 0.5f }, Projectile.Center); - } - for (int i = 0; i < 5; i++) - { - int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); - Main.dust[dust].velocity *= 3f; - if (Main.rand.NextBool()) - { - Main.dust[dust].scale = 0.5f; - Main.dust[dust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int j = 0; j < 10; j++) - { - int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f); - Main.dust[dust2].noGravity = true; - Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f); - Main.dust[dust2].velocity *= 2f; - } - } - } -} diff --git a/Projectiles/Rogue/HellsSunProj.cs b/Projectiles/Rogue/HellsSunProj.cs deleted file mode 100644 index b160d689a3..0000000000 --- a/Projectiles/Rogue/HellsSunProj.cs +++ /dev/null @@ -1,89 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.CalPlayer; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class HellsSunProj : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/HellsSun"; - - public override void SetDefaults() - { - Projectile.width = 15; - Projectile.height = 15; - Projectile.friendly = true; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.penetrate = 20; - Projectile.timeLeft = 1200; - - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 40; - } - - public override void AI() - { - Projectile.ai[0] += 1f; - - if (Projectile.ai[0] >= 70f) - { - Projectile.velocity.X *= 0.96f; - Projectile.velocity.Y *= 0.96f; - Projectile.localAI[1]++; - if (Projectile.Calamity().stealthStrike) - { - if (Projectile.localAI[1] >= 30f) - { - Vector2 velocity = Projectile.velocity; - Vector2 vector2_1 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - vector2_1.Normalize(); - Vector2 vector2_2 = vector2_1 * ((float)Main.rand.Next(10, 41) * 0.1f); - if (Main.rand.NextBool(3)) - vector2_2 *= 2f; - Vector2 vector2_3 = velocity * 0.25f + vector2_2; - Vector2 vector2_5 = vector2_3 * 0.8f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f); - Projectile.localAI[1] = 0.0f; - } - } - else - { - if (Projectile.localAI[1] >= 60f) - { - Vector2 velocity = Projectile.velocity; - Vector2 vector2_1 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - vector2_1.Normalize(); - Vector2 vector2_2 = vector2_1 * ((float)Main.rand.Next(10, 41) * 0.1f); - if (Main.rand.NextBool(3)) - vector2_2 *= 2f; - Vector2 vector2_3 = velocity * 0.25f + vector2_2; - Vector2 vector2_5 = vector2_3 * 0.8f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f); - Projectile.localAI[1] = 0.0f; - } - } - } - else - { - Projectile.rotation += 0.3f * (float)Projectile.direction; - } - - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - if (modPlayer.killSpikyBalls == true) - { - Projectile.active = false; - Projectile.netUpdate = true; - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); - - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 180); - } -} diff --git a/Projectiles/Typeless/ArtifactOfResilienceShards.cs b/Projectiles/Typeless/ArtifactOfResilienceShards.cs index a0287416af..4ae6804e7f 100644 --- a/Projectiles/Typeless/ArtifactOfResilienceShards.cs +++ b/Projectiles/Typeless/ArtifactOfResilienceShards.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.timeLeft = 230; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 30 * Projectile.MaxUpdates; + Projectile.ContinuouslyUpdateDamageStats = true; } public override void AI() { diff --git a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs index 124b788486..d4d0134b4b 100644 --- a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs +++ b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs @@ -76,6 +76,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 50 * Projectile.MaxUpdates; Projectile.extraUpdates = 3; + Projectile.ContinuouslyUpdateDamageStats = true; } public override void AI() {