From d40e3c0096e62de948197676beada01cdfebfa5f Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 18 Aug 2021 16:05:23 -0500 Subject: [PATCH] 1 - Fixed some issues with my last commit. --- Buffs/CalamityGlobalBuff.cs | 11 +++++------ CalPlayer/CalamityPlayerMiscEffects.cs | 3 --- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 179849f6eb..2a9e74d96e 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -11,12 +11,11 @@ namespace CalamityMod.Buffs { public override void Update(int type, Player player, ref int buffIndex) { - /*if (type == BuffID.HornetMinion || type == BuffID.ImpMinion || type == BuffID.SpiderMinion || type == BuffID.TwinEyesMinion || - type == BuffID.PirateMinion || type == BuffID.SharknadoMinion || type == BuffID.UFOMinion || type == BuffID.StardustMinion || - type == BuffID.StardustGuardianMinion || type == BuffID.StardustDragonMinion) - Main.persistentBuff[type] = true;*/ - - if (type == BuffID.SugarRush) + if (type == BuffID.Panic) + { + player.moveSpeed -= 0.5f; + } + else if (type == BuffID.SugarRush) { player.moveSpeed -= 0.1f; } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f75cc89b0c..df7e46a6e9 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2927,9 +2927,6 @@ namespace CalamityMod.CalPlayer player.calmed = true; } - if (player.HasBuff(BuffID.Panic)) - player.moveSpeed -= 0.5f; - if (player.wellFed) player.moveSpeed -= 0.1f; diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index d8e70b2e70..576c98057c 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -238,7 +238,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.rotation = npc.rotation.AngleTowards(rotation, rateOfRotation); // Direction - int direction = Math.Sign(player.Center.X - npc.Center.X); + int direction = Math.Sign((AIState == (int)Phase.Deathray && !horizontalLaserSweep ? lookAt.X : player.Center.X) - npc.Center.X); if (direction != 0) { npc.direction = direction;