From ec11af90affb86646d6c7022c79ded355cb05795 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 9 Feb 2021 18:23:44 -0500 Subject: [PATCH] Reworked Apoctosis Array mana scaling. No idea if it's balanced --- Items/Weapons/Magic/ApoctosisArray.cs | 29 +++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Items/Weapons/Magic/ApoctosisArray.cs b/Items/Weapons/Magic/ApoctosisArray.cs index f0a6e5cae9..296a691688 100644 --- a/Items/Weapons/Magic/ApoctosisArray.cs +++ b/Items/Weapons/Magic/ApoctosisArray.cs @@ -12,14 +12,15 @@ namespace CalamityMod.Items.Weapons.Magic { DisplayName.SetDefault("Apoctosis Array"); Tooltip.SetDefault("Fires ion blasts that speed up and then explode\n" + - "The higher your mana the more damage they will do\n" + - "Astral steroids can inhibit the potential of this weapon"); + "Damage scales with how full your mana is\n" + + "Using Astral Injection reduces the effectiveness of the mana boost"); } public override void SetDefaults() { + item.damage = 113; item.width = 98; - item.damage = 49; + item.height = 34; item.magic = true; item.mana = 12; item.useAnimation = 7; @@ -29,25 +30,27 @@ namespace CalamityMod.Items.Weapons.Magic item.UseSound = SoundID.Item91; item.autoReuse = true; item.noMelee = true; - item.height = 34; item.value = CalamityGlobalItem.Rarity11BuyPrice; item.rare = ItemRarityID.Purple; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 8f; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-25, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-25, 0); public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - float manaAmount = (float)player.statMana * 0.01f; - float damageMult = manaAmount; - float injectionNerf = player.Calamity().astralInjection ? 0.6f : 1f; - int projectile = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * damageMult * injectionNerf), knockBack, player.whoAmI); - Main.projectile[projectile].scale = manaAmount * 0.375f; + float manaRatio = (float)player.statMana / player.statManaMax2; + bool injectionNerf = player.Calamity().astralInjection; + if (injectionNerf) + manaRatio = MathHelper.Min(manaRatio, 0.65f); + + // 20% to 220% damage. Astral Injection caps it at 150% damage. + float damageRatio = 0.2f + 2f * manaRatio; + int finalDamage = (int)(damage * damageRatio); + + Projectile proj = Projectile.NewProjectileDirect(position, new Vector2(speedX, speedY), type, finalDamage, knockBack, player.whoAmI); + proj.scale = 0.75f + 0.75f * manaRatio; return false; }