final fixes @ cleanup
This commit is contained in:
1 parent
06469f38d6
commit
c3699d083e
4 files changed
+15
-17
No files matched your search
@@ -120,7 +120,7 @@ namespace CalamityMod.CalPlayer
|
||||
calamityPlayer.trippyLevel = 1;
|
||||
|
||||
// Mana Burn VFX disabled when hih
|
||||
if (Player.statMana < 0)
|
||||
if (Player.statMana < 0)
|
||||
{
|
||||
float compactness = Player.width * 0.6f;
|
||||
if (compactness < 10f)
|
||||
@@ -130,7 +130,7 @@ namespace CalamityMod.CalPlayer
|
||||
power = 2.75f;
|
||||
var color = Color.Blue;
|
||||
if (ManaBurnFireDrawer is null || ManaBurnFireDrawer.LocalTimer >= ManaBurnFireDrawer.SetLifetime)
|
||||
ManaBurnFireDrawer = new FireParticleSet(60-(Player.statMana / 4), 1, color * 1.25f, color, compactness, power);
|
||||
ManaBurnFireDrawer = new FireParticleSet(60 - (Player.statMana / 4), 1, color * 1.25f, color, compactness, power);
|
||||
else
|
||||
ManaBurnFireDrawer.DrawSet(Player.Bottom - Vector2.UnitY * (12f - Player.gfxOffY));
|
||||
}
|
||||
|
||||
@@ -973,12 +973,12 @@ namespace CalamityMod.CalPlayer
|
||||
private void MiscEffects()
|
||||
{
|
||||
//Mana Burn update
|
||||
if (ManaBurnFireDrawer != null) {
|
||||
if (ManaBurnFireDrawer != null)
|
||||
{
|
||||
ManaBurnFireDrawer.LocalTimer = 0;
|
||||
ManaBurnFireDrawer.RelativePower = MathHelper.Lerp(0.25f,0.5f,-Player.statMana / (float)Player.statManaMax2);
|
||||
ManaBurnFireDrawer.RelativePower = MathHelper.Lerp(0.25f, 0.5f, -Player.statMana / (float)Player.statManaMax2);
|
||||
ManaBurnFireDrawer.Update();
|
||||
}
|
||||
|
||||
|
||||
// Update textures
|
||||
if (!Main.dedServ && Player.whoAmI == Main.myPlayer)
|
||||
|
||||
@@ -1051,14 +1051,14 @@ namespace CalamityMod.NPCs
|
||||
manaBurnPeak *= 0.999f;
|
||||
}
|
||||
manaBurnPeak = Math.Max(manaBurnPeak, manaBurn);
|
||||
int burnPerSecond = (int)MathF.Ceiling(manaBurn*0.5f);
|
||||
int burnPerSecond = (int)MathF.Ceiling(manaBurn * 0.5f);
|
||||
manaBurn -= burnPerSecond / 60f;
|
||||
|
||||
if (npc.lifeRegen > 0)
|
||||
npc.lifeRegen = 0;
|
||||
|
||||
npc.lifeRegen -= burnPerSecond*2;
|
||||
damage += (int)(burnPerSecond * 0.5f);
|
||||
npc.lifeRegen -= burnPerSecond * 2;
|
||||
damage += (int)(burnPerSecond * 0.5f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2921,13 +2921,14 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (VulnerabilityHexFireDrawer != null)
|
||||
VulnerabilityHexFireDrawer.Update();
|
||||
|
||||
if (ManaBurnFireDrawer != null) {
|
||||
|
||||
if (ManaBurnFireDrawer != null)
|
||||
{
|
||||
ManaBurnFireDrawer.LocalTimer = 0;
|
||||
float power = npc.height / 100f;
|
||||
if (power > 2.75f)
|
||||
power = 2.75f;
|
||||
ManaBurnFireDrawer.RelativePower = power*MathHelper.Lerp(0.5f,1.5f, MathHelper.Clamp(manaBurn/manaBurnPeak,0,1))*playerManaBurnIntensity;
|
||||
float power = npc.height / 100f;
|
||||
if (power > 2.75f)
|
||||
power = 2.75f;
|
||||
ManaBurnFireDrawer.RelativePower = power * MathHelper.Lerp(0.5f, 1.5f, MathHelper.Clamp(manaBurn / manaBurnPeak, 0, 1)) * playerManaBurnIntensity;
|
||||
ManaBurnFireDrawer.Update();
|
||||
}
|
||||
|
||||
|
||||
@@ -94,9 +94,6 @@ namespace CalamityMod.UI.ResourceSets
|
||||
// dozezoze - this method is where Chalice's bleed overlay is drawn. This can almost certainly be optimized, but it shouldn't cause problems.
|
||||
public override void PostDrawResourceDisplay(PlayerStatsSnapshot snapshot, IPlayerResourcesDisplaySet displaySet, bool drawingLife, Color textColor, bool drawText)
|
||||
{
|
||||
if (!Systems.Collections.DebuffsList.Includes(ModContent.BuffType<Buffs.DamageOverTime.ManaBurn>()))
|
||||
Systems.Collections.DebuffsList.List.Add(ModContent.BuffType<Buffs.DamageOverTime.ManaBurn>());
|
||||
|
||||
var Player = Main.LocalPlayer;
|
||||
var CalPlayer = Player.Calamity();
|
||||
|
||||
|
||||
Reference in new issue
Block a user