Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
c19a113cc3
4 files changed
+37
-2
No files matched your search
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
@@ -108,6 +109,20 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
dust.velocity = Vector2.Normalize(destination - dust.position) * 3f;
|
||||
dust.scale = scale;
|
||||
dust.noGravity = true;
|
||||
if (npc.ai[3] <= 540f)
|
||||
{
|
||||
float length = MathHelper.Lerp(20f, 550f, (npc.ai[3] - 480f) / 60f);
|
||||
float outwardness = MathHelper.Lerp(1f, 0f, (npc.ai[3] - 480f) / 60f);
|
||||
for (float i = npc.Top.Y + 4f; i >= npc.Top.Y + 4f - length; i -= 8f)
|
||||
{
|
||||
float angle = i / 24f;
|
||||
Vector2 spawnPosition = new Vector2(npc.Center.X, i);
|
||||
dust = Dust.NewDustPerfect(spawnPosition, (int)CalamityDusts.SulfurousSeaAcid);
|
||||
dust.scale = 1.5f;
|
||||
dust.velocity = Vector2.UnitX * (float)Math.Cos(angle) * 4f * outwardness;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Release laser
|
||||
if (npc.ai[3] == 480f)
|
||||
@@ -162,5 +177,14 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Color drawColor)
|
||||
{
|
||||
if (npc.ai[3] >= 480f && npc.ai[3] <= 540f)
|
||||
{
|
||||
float length = MathHelper.Lerp(20f, 550f, (npc.ai[3] - 480f) / 60f);
|
||||
float opacity = MathHelper.Lerp(0.3f, 0.9f, (npc.ai[3] - 480f) / 60f);
|
||||
Utils.DrawLine(spriteBatch, npc.Top + new Vector2(0f, 4f), npc.Top + new Vector2(0f, 4f) - Vector2.UnitY * length, Color.Lerp(Color.Lime, Color.Transparent, opacity));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,6 +103,8 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
}
|
||||
determinedLength /= samples.Length;
|
||||
|
||||
determinedLength = MathHelper.Clamp(determinedLength, maximumLength * 0.5f, maximumLength);
|
||||
|
||||
float lerpDelta = 0.5f;
|
||||
projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], determinedLength, lerpDelta);
|
||||
Vector2 beamEndPosiiton = projectile.Center + projectile.velocity * (projectile.localAI[1] - 6f);
|
||||
|
||||
@@ -31,7 +31,9 @@ namespace CalamityMod.Tiles.Abyss
|
||||
}
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(60))
|
||||
bool noTilesBetweenPlayer = Collision.CanHit(new Vector2(i, j) * 16, 1, 1, new Vector2(i * 16f, Main.LocalPlayer.Center.Y), 1, 1);
|
||||
|
||||
if (WorldGen.genRand.NextBool(60) && !Main.gamePaused && noTilesBetweenPlayer)
|
||||
{
|
||||
if (Math.Abs(Main.LocalPlayer.Center.X - i * 16) < 80 &&
|
||||
Main.LocalPlayer.Bottom.Y < j * 16 &&
|
||||
|
||||
+8
-1
@@ -525,7 +525,14 @@ namespace CalamityMod.World
|
||||
{
|
||||
Main.tile[trueX, y].slope(0);
|
||||
Main.tile[trueX, y].halfBrick(false);
|
||||
Tile.SmoothSlope(trueX, y);
|
||||
try
|
||||
{
|
||||
Tile.SmoothSlope(trueX, y);
|
||||
}
|
||||
catch
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user