From 8a222ff37017cd9d1ba5771764ba2f3b059f6d7f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 08:42:02 +0700 Subject: [PATCH] Art Attack & Gruesome Eminence --- Items/Weapons/Magic/ArtAttack.cs | 10 +++++++++- Items/Weapons/Magic/GruesomeEminence.cs | 2 +- Projectiles/Magic/ArtAttackHoldout.cs | 4 ++-- Projectiles/Magic/SpiritCongregation.cs | 10 ++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/ArtAttack.cs b/Items/Weapons/Magic/ArtAttack.cs index b16f045350..fddf40f2ab 100644 --- a/Items/Weapons/Magic/ArtAttack.cs +++ b/Items/Weapons/Magic/ArtAttack.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using Terraria; using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -18,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 70; Item.damage = 80; Item.DamageType = DamageClass.Magic; - Item.mana = 20; + Item.mana = 100; Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; @@ -34,6 +35,13 @@ namespace CalamityMod.Items.Weapons.Magic Item.Calamity().donorItem = true; } + // Cancels out the mana used to summon the holdout + public override void OnConsumeMana(Player player, int manaConsumed) + { + if (player.ownedProjectileCounts[Item.shoot] <= 0) + player.statMana += manaConsumed; + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Magic/GruesomeEminence.cs b/Items/Weapons/Magic/GruesomeEminence.cs index 2e56c3fd15..c69d389d19 100644 --- a/Items/Weapons/Magic/GruesomeEminence.cs +++ b/Items/Weapons/Magic/GruesomeEminence.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.DamageType = DamageClass.Magic; Item.noUseGraphic = true; Item.channel = true; - Item.mana = 400; + Item.mana = 30; Item.useTime = 27; Item.useAnimation = 27; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Projectiles/Magic/ArtAttackHoldout.cs b/Projectiles/Magic/ArtAttackHoldout.cs index 88b9ed5af2..ca54e8abe0 100644 --- a/Projectiles/Magic/ArtAttackHoldout.cs +++ b/Projectiles/Magic/ArtAttackHoldout.cs @@ -41,12 +41,12 @@ namespace CalamityMod.Projectiles.Magic int attackType = ModContent.ProjectileType(); if (Owner.ownedProjectileCounts[attackType] == 0) { - if (Projectile.ai[0] >= 0f && Owner.CheckMana(Owner.HeldItem, -1, true, false)) + if (Projectile.ai[0] >= 1f && Owner.CheckMana(Owner.HeldItem, -1, true, false)) { SoundEngine.PlaySound(ArtAttack.UseSound, Owner.Center); Vector2 initialStarVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 15f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.ClampedMouseWorld(), initialStarVelocity, attackType, Projectile.damage, Projectile.knockBack, Projectile.owner); - Projectile.ai[0] = -24f; + Projectile.ai[0] -= Owner.HeldItem.useAnimation; } else Projectile.ai[0]++; diff --git a/Projectiles/Magic/SpiritCongregation.cs b/Projectiles/Magic/SpiritCongregation.cs index 2858155357..caf48208a1 100644 --- a/Projectiles/Magic/SpiritCongregation.cs +++ b/Projectiles/Magic/SpiritCongregation.cs @@ -133,6 +133,16 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.FinalExtraUpdate()) Time++; + if (Time % 12f == 11f) + { + if (!Owner.CheckMana(Owner.HeldItem, -1, true)) + { + DeathCounter = 1f; + Projectile.netUpdate = true; + return; + } + } + // Set the hover offset to a zero vector after enough time has passed and the projectile is powerful/tame enough. bool tame = CurrentPower > 0.97f; if (tame)