Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
acc970220f
6 files changed
+34
-14
No files matched your search
+10
-7
@@ -2735,7 +2735,7 @@ namespace CalamityMod.NPCs
|
||||
for (int i = 0; i < maxProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1)));
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, walkingProjectileVelocity * 2f);
|
||||
}
|
||||
|
||||
if (phase3)
|
||||
@@ -2773,7 +2773,7 @@ namespace CalamityMod.NPCs
|
||||
if (i != lasersToNotFire[0] && i != lasersToNotFire[1] && i != lasersToNotFire[2] && i != lasersToNotFire[3] && i != lasersToNotFire[4] && i != lasersToNotFire[5])
|
||||
{
|
||||
Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1)));
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, walkingProjectileVelocity * 2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3109,7 +3109,7 @@ namespace CalamityMod.NPCs
|
||||
if (i != lasersToNotFire[0] && i != lasersToNotFire[1] && i != lasersToNotFire[2] && i != lasersToNotFire[3])
|
||||
{
|
||||
Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1)));
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, laserVelocity * 2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4074,9 +4074,11 @@ namespace CalamityMod.NPCs
|
||||
float shootProjectile = 400 / shootTime;
|
||||
float timer = npc.ai[0] + 15f;
|
||||
float divisor = timer + shootProjectile;
|
||||
bool shootGodRays = phase2 || deathModeEnragePhase_BodyAndTail;
|
||||
if (!flyAtTarget || deathModeEnragePhase_BodyAndTail)
|
||||
{
|
||||
if (npc.localAI[0] % divisor == 0f && npc.ai[0] % 2f == 0f)
|
||||
float laserDivisor = (phase2 && !deathModeEnragePhase_BodyAndTail) ? 4f : 2f;
|
||||
if (npc.localAI[0] % divisor == 0f && npc.ai[0] % laserDivisor == 0f)
|
||||
{
|
||||
npc.TargetClosest();
|
||||
|
||||
@@ -4090,6 +4092,7 @@ namespace CalamityMod.NPCs
|
||||
vector15 *= Main.rand.Next(90, 121) * 0.01f;
|
||||
velocity = vector15;
|
||||
}
|
||||
|
||||
int type = ModContent.ProjectileType<DeusMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f;
|
||||
@@ -4098,7 +4101,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (Vector2.Distance(player.Center, npc.Center) > 80f)
|
||||
{
|
||||
SoundEngine.PlaySound((phase2 || deathModeEnragePhase_BodyAndTail) ? SoundID.Item91 : SoundID.Item12, npc.Center);
|
||||
SoundEngine.PlaySound(shootGodRays ? SoundID.Item91 : SoundID.Item12, npc.Center);
|
||||
float num941 = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f;
|
||||
Vector2 vector104 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + (npc.height / 2));
|
||||
float num942 = player.position.X + player.width * 0.5f - vector104.X;
|
||||
@@ -4111,9 +4114,9 @@ namespace CalamityMod.NPCs
|
||||
vector104.Y += num943 * 5f;
|
||||
Vector2 shootDirection = new Vector2(num942, num943).SafeNormalize(Vector2.UnitY);
|
||||
Vector2 laserVelocity = shootDirection * num941;
|
||||
int type = (phase2 || deathModeEnragePhase_BodyAndTail) ? ModContent.ProjectileType<AstralGodRay>() : ModContent.ProjectileType<AstralShot2>();
|
||||
int type = shootGodRays ? ModContent.ProjectileType<AstralGodRay>() : ModContent.ProjectileType<AstralShot2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (phase2 || deathModeEnragePhase_BodyAndTail)
|
||||
if (shootGodRays)
|
||||
{
|
||||
// Waving beams need to start offset so they cross each other neatly.
|
||||
float waveSideOffset = Main.rand.NextFloat(9f, 14f);
|
||||
|
||||
@@ -94,8 +94,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
}
|
||||
else if (Projectile.velocity.Length() < 12f)
|
||||
Projectile.velocity *= 1.01f;
|
||||
else if (Projectile.velocity.Length() < (death ? 15f : 12f))
|
||||
Projectile.velocity *= death ? 1.015f : 1.01f;
|
||||
|
||||
Projectile.ai[1] += 1f;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public class AstralLaser : ModProjectile
|
||||
@@ -25,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 720;
|
||||
Projectile.timeLeft = 1200;
|
||||
Projectile.extraUpdates = 1;
|
||||
}
|
||||
|
||||
@@ -40,6 +41,20 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.frame > 2)
|
||||
Projectile.frame = 0;
|
||||
|
||||
// Speed up after some time
|
||||
if (Projectile.timeLeft < 600 && Main.expertMode)
|
||||
{
|
||||
if (Projectile.velocity.Length() < Projectile.ai[1])
|
||||
{
|
||||
Projectile.velocity *= 1.005f;
|
||||
if (Projectile.velocity.Length() > Projectile.ai[1])
|
||||
{
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= Projectile.ai[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Projectile.velocity.X < 0f)
|
||||
{
|
||||
Projectile.spriteDirection = -1;
|
||||
|
||||
@@ -14,10 +14,11 @@ namespace CalamityMod.Tiles.Abyss
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2);
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(29, 37, 58));
|
||||
ModTranslation name = CreateMapEntryName();
|
||||
name.SetDefault("Abyss Shell Fossil");
|
||||
AddMapEntry(new Color(29, 37, 58), name);
|
||||
DustType = 33;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
TileID.Sets.IsATreeTrunk[Type] = true;
|
||||
TileObjectData.newTile.Width = 5;
|
||||
TileObjectData.newTile.Height = 5;
|
||||
TileObjectData.newTile.Origin = new Point16(2, 4);
|
||||
|
||||
@@ -125,10 +125,10 @@ namespace CalamityMod.World
|
||||
float worldEdgeMargin = (float)Main.maxTilesX * 0.08f;
|
||||
int xLimit = Main.maxTilesX / 2;
|
||||
|
||||
int realX = Abyss.AtLeftSideOfWorld ? rand.Next(SulphurousSea.BiomeWidth + 300, xLimit - 400) : rand.Next(xLimit + 400, Main.maxTilesX - SulphurousSea.BiomeWidth - 300);
|
||||
int realX = Abyss.AtLeftSideOfWorld ? rand.Next(SulphurousSea.BiomeWidth + 400, xLimit - 400) : rand.Next(xLimit + 400, Main.maxTilesX - SulphurousSea.BiomeWidth - 400);
|
||||
|
||||
//clamp so it doesnt crash hopefully
|
||||
int x = Utils.Clamp(realX, SulphurousSea.BiomeWidth + 300, Main.maxTilesX - SulphurousSea.BiomeWidth - 300);
|
||||
int x = Utils.Clamp(realX, SulphurousSea.BiomeWidth + 400, Main.maxTilesX - SulphurousSea.BiomeWidth - 400);
|
||||
|
||||
//world surface = 920 large 740 medium 560 small
|
||||
int y = (int)(Main.worldSurface * 0.5); //Large = 522, Medium = 444, Small = 336
|
||||
|
||||
Reference in new issue
Block a user