Merge pull request #1342 from CalamityTeam/HyperiusFix

Hyperius Bugfix and Balance
This commit is contained in:
CongratsIsTrash authored and GitHub committed 2026-03-20 12:47:32 -04:00
commit eaefa2912d
5 files changed
+14 -18

No files matched your search

+2 -1
View File
@@ -9,7 +9,8 @@ namespace CalamityMod.Items.Ammo
{
public class HyperiusBullet : ModItem, ILocalizedModType
{
public static float overflowEfficency = 1.2f; // Multiplier applied to overflow damage done by other damage sources
public static float overflowEfficency = 0.8f; // Multiplier applied to hyperius stacks taken when enemies are damaged by other sources
public static float overflowAppliedMult = 0.9f; // The amount of damage from a hit taken into account when dealing overflow damage
public static readonly SoundStyle hit = new("CalamityMod/Sounds/Item/HyperiusOverflow");
public new string LocalizationCategory => "Items.Ammo";
public override void SetStaticDefaults()
+5 -7
View File
@@ -900,15 +900,13 @@ namespace CalamityMod.Items
// Hyperius Overflow
if (target.Calamity().hyperiusMarked)
{
int damage = 0;
if (target.Calamity().hyperiusDamage < damageDone)
damage = damageDone - target.Calamity().hyperiusDamage;
else
damage = damageDone;
target.Calamity().hyperiusDamage -= damage;
int damageDealt = (int)(damageDone * HyperiusBullet.overflowAppliedMult);
int damage = (int)Math.Min(target.Calamity().hyperiusDamage / HyperiusBullet.overflowEfficency, damageDealt);
target.Calamity().hyperiusDamage -= (int)(damage * HyperiusBullet.overflowEfficency);
// Spawn overflow hit
Projectile overflow = Projectile.NewProjectileDirect(target.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType<HyperiusDamage>(), (int)(damage * HyperiusBullet.overflowEfficency), 0, player.whoAmI, target.whoAmI);
Projectile overflow = Projectile.NewProjectileDirect(target.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType<HyperiusDamage>(), damage, 0, player.whoAmI, target.whoAmI);
overflow.DamageType = item.DamageType;
overflow.ArmorPenetration = item.ArmorPenetration; // Takes the armor pen from what did the hit
@@ -110,7 +110,7 @@ HyperiusBullet: {
Damage that would be dealt from the bullets is instead stored on the target
As more damage is stored, it will begin to overflow, slowly releasing and damaging the enemy
Attacks from sources other than Hyperius Bullets will release some of the charge
Releasing charge in this way deals 20% more damage
Releasing charge in this way is 20% more efficent
'''
}
+2 -2
View File
@@ -334,8 +334,8 @@ namespace CalamityMod.NPCs
public int hyperiusDamage = 0;
public static int hyperiusOverflowTime = 100;
public int hyperiusOverflowTimer = hyperiusOverflowTime;
/// <summary> Constant variable representing the % of max health Hyperius Bullet's damage stacks must reach before they start to overflow. </summary>
public const float HyperiusLifePercentThreshold = 0.07f;
/// <summary> Constant variable representing the % of max health Hyperius Bullet's damage stacks must reach before they start to bleed. </summary>
public const float HyperiusLifePercentThreshold = 0.10f;
public int hyperiusFxTimer = 0;
public int glaiveShredTimer = 0;
+4 -7
View File
@@ -4763,16 +4763,13 @@ namespace CalamityMod.Projectiles
// Hyperius Overflow
if (projectile.type != ProjectileType<HyperiusBulletProj>() && projectile.type != ProjectileType<HyperiusSplit>() && projectile.type != ProjectileType<HyperiusDamage>() && projectile.type != ProjectileType<HyperiusBleed>() && target.Calamity().hyperiusMarked)
{
int damage = 0;
if (target.Calamity().hyperiusDamage < damageDone)
damage = damageDone - target.Calamity().hyperiusDamage;
else
damage = damageDone;
int damageDealt = (int)(damageDone * HyperiusBullet.overflowAppliedMult);
int damage = (int)MathF.Min(target.Calamity().hyperiusDamage / HyperiusBullet.overflowEfficency, damageDealt);
target.Calamity().hyperiusDamage -= damage;
target.Calamity().hyperiusDamage -= (int)(damage * HyperiusBullet.overflowEfficency);
// Spawn overflow hit
Projectile overflow = Projectile.NewProjectileDirect(target.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType<HyperiusDamage>(), (int)(damage * HyperiusBullet.overflowEfficency), 0, projectile.owner, target.whoAmI);
Projectile overflow = Projectile.NewProjectileDirect(target.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType<HyperiusDamage>(), damage, 0, projectile.owner, target.whoAmI);
overflow.DamageType = projectile.DamageType;
overflow.ArmorPenetration = projectile.ArmorPenetration; // Takes the armor pen from what did the hit