Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
ScalarVector1 committed Jun 2, 2024
1 parent df2a907 commit 1316a93
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
11 changes: 5 additions & 6 deletions Content/Abilities/ForbiddenWinds/GatheringWinds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -287,7 +287,6 @@ public override void AI()
Projectile.timeLeft = 20;
else if (Projectile.timeLeft > 10)
Projectile.timeLeft = 10;


if (!Main.dedServ)
{
Expand Down Expand Up @@ -394,4 +393,4 @@ public override void AddRecipes()
recipe.Register();
}
}
}
}
26 changes: 13 additions & 13 deletions Content/Abilities/Hint/Wellspring.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<WellspringProjectile>() && proj.owner == Player.whoAmI && proj.timeLeft > 20)
proj.timeLeft = 20;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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)
{
Expand All @@ -131,7 +131,7 @@ public override void AI()

if (Main.rand.NextBool(10))
{
var d = Dust.NewDust(Projectile.position, 32, 32, ModContent.DustType<Dusts.Aurora>(), 0, -1, 0, new Color(200, 220, 255), 1);
int d = Dust.NewDust(Projectile.position, 32, 32, ModContent.DustType<Dusts.Aurora>(), 0, -1, 0, new Color(200, 220, 255), 1);
Main.dust[d].customData = Main.rand.NextFloat(0.3f, 0.6f);
}
}
Expand All @@ -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;
Expand Down Expand Up @@ -275,4 +275,4 @@ public override void AddRecipes()
recipe.Register();
}
}
}
}

0 comments on commit 1316a93

Please sign in to comment.