diff --git a/Content/Abilities/ForbiddenWinds/GatheringWinds.cs b/Content/Abilities/ForbiddenWinds/GatheringWinds.cs index 59f6d6717..03460ab4a 100644 --- a/Content/Abilities/ForbiddenWinds/GatheringWinds.cs +++ b/Content/Abilities/ForbiddenWinds/GatheringWinds.cs @@ -71,12 +71,12 @@ public override void UpdateActive() Player.maxFallSpeed = Math.Max(Player.maxFallSpeed, 12 + charge / 6f); // NPC Collision to break defense - var box = Player.Hitbox; + Rectangle box = Player.Hitbox; box.Inflate(32, 32); - foreach(NPC npc in Main.ActiveNPCs) + foreach (NPC npc in Main.ActiveNPCs) { if (box.Intersects(npc.Hitbox) && !npc.dontTakeDamage && !npc.immortal) - { + { Player.immune = true; Player.immuneTime = 10; Player.velocity *= -0.5f; @@ -154,7 +154,7 @@ public override void UpdateActiveEffects() Terraria.Audio.SoundEngine.PlaySound(SoundID.Item45.WithPitchOffset(-1f + charge / 300f), Player.Center); Terraria.Audio.SoundEngine.PlaySound(SoundID.Item104.WithPitchOffset(-1f + charge / 300f), Player.Center); } - } + } else if (charge > 30) { if (Time % 2 == 0) @@ -287,7 +287,6 @@ public override void AI() Projectile.timeLeft = 20; else if (Projectile.timeLeft > 10) Projectile.timeLeft = 10; - if (!Main.dedServ) { @@ -394,4 +393,4 @@ public override void AddRecipes() recipe.Register(); } } -} +} \ No newline at end of file diff --git a/Content/Abilities/Hint/Wellspring.cs b/Content/Abilities/Hint/Wellspring.cs index 104d0afe5..7c872c3ef 100644 --- a/Content/Abilities/Hint/Wellspring.cs +++ b/Content/Abilities/Hint/Wellspring.cs @@ -22,12 +22,12 @@ internal class Wellspring : HintAbility { public override bool OnHint(Vector2 pos, bool defaultHint) { - var tile = Framing.GetTileSafely(pos / 16); + Tile tile = Framing.GetTileSafely(pos / 16); if (defaultHint && !tile.HasTile && Player.GetHandler().Stamina > 2f) { Player.GetHandler().Stamina -= 1.75f; - foreach(Projectile proj in Main.ActiveProjectiles) + foreach (Projectile proj in Main.ActiveProjectiles) { if (proj.type == ModContent.ProjectileType() && proj.owner == Player.whoAmI && proj.timeLeft > 20) proj.timeLeft = 20; @@ -56,11 +56,11 @@ public override void Load() private void DrawWellspringMaps(SpriteBatch sb) { - foreach(Projectile proj in Main.ActiveProjectiles) + foreach (Projectile proj in Main.ActiveProjectiles) { if (proj.type == Type) { - var glow = Assets.Keys.GlowAlpha.Value; + Texture2D glow = Assets.Keys.GlowAlpha.Value; float alpha = 1f; @@ -90,7 +90,7 @@ private void DrawWellsprings(GameTime gameTime, ScreenTarget starsMap, ScreenTar private bool AnyWellsprings() { - var value = anySprings > 0; + bool value = anySprings > 0; anySprings--; return value; } @@ -119,7 +119,7 @@ public override void AI() Projectile.velocity *= 0.9f; - foreach(Player player in Main.ActivePlayers) + foreach (Player player in Main.ActivePlayers) { if (Projectile.timeLeft % 30 == 0 && Vector2.Distance(player.Center, Projectile.Center) < 256) { @@ -131,7 +131,7 @@ public override void AI() if (Main.rand.NextBool(10)) { - var d = Dust.NewDust(Projectile.position, 32, 32, ModContent.DustType(), 0, -1, 0, new Color(200, 220, 255), 1); + int d = Dust.NewDust(Projectile.position, 32, 32, ModContent.DustType(), 0, -1, 0, new Color(200, 220, 255), 1); Main.dust[d].customData = Main.rand.NextFloat(0.3f, 0.6f); } } @@ -140,17 +140,17 @@ public override bool PreDraw(ref Color lightColor) { foreach (Player player in Main.ActivePlayers) { - var dist = Vector2.Distance(player.Center, Projectile.Center); + float dist = Vector2.Distance(player.Center, Projectile.Center); if (dist < 256) { DrawLine(Main.spriteBatch, player.Center); } } - var tex = Assets.Abilities.HintCursor.Value; - var glow = Assets.Keys.GlowAlpha.Value; - var star = Assets.StarTexture.Value; - var ring = Assets.Misc.GlowRing.Value; + Texture2D tex = Assets.Abilities.HintCursor.Value; + Texture2D glow = Assets.Keys.GlowAlpha.Value; + Texture2D star = Assets.StarTexture.Value; + Texture2D ring = Assets.Misc.GlowRing.Value; var frame = new Rectangle(0, 120, 50, 30); float alpha = 1f; @@ -275,4 +275,4 @@ public override void AddRecipes() recipe.Register(); } } -} +} \ No newline at end of file