Reworked Apoctosis Array mana scaling. No idea if it's balanced

This commit is contained in:
Ozzatron committed 2021-02-09 18:23:44 -05:00
1 parent 0806b043e1
commit ec11af90af
1 file changed
+16 -13
+16 -13
View File
@@ -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<IonBlast>();
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;
}