Deus gores
Also made it not fire projectiles during phase 2 transition
No files matched your search
|
After Width: | Height: | Size: 1001 B |
|
After Width: | Height: | Size: 387 B |
|
After Width: | Height: | Size: 625 B |
|
After Width: | Height: | Size: 679 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 630 B |
|
After Width: | Height: | Size: 768 B |
|
After Width: | Height: | Size: 946 B |
|
After Width: | Height: | Size: 680 B |
@@ -194,6 +194,20 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
Main.dust[astralDust].velocity *= 2f;
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
float randomSpread = Main.rand.Next(-200, 201) / 100f;
|
||||
if (NPC.localAI[3] == 1f)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusAltBody1").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusAltBody2").Type, 1f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusBody1").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusBody2").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -228,6 +228,13 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
Main.dust[astralDust].velocity *= 2f;
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
float randomSpread = Main.rand.Next(-200, 201) / 100f;
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusHead1").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusHead2").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusHead3").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,6 +165,12 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
Main.dust[astralDust].velocity *= 2f;
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
float randomSpread = Main.rand.Next(-200, 201) / 100f;
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusTail1").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find<ModGore>("AstrumDeusTail2").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -774,98 +774,102 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
float shootProjectile = (doubleWormPhase && expertMode) ? 200 : 400;
|
||||
float timer = npc.ai[0] + 15f;
|
||||
float divisor = timer + shootProjectile;
|
||||
bool canFireProjectiles = npc.Opacity >= 1f;
|
||||
bool shootGodRays = phase2 || deathModeEnragePhase_BodyAndTail;
|
||||
|
||||
if (!flyAtTarget || deathModeEnragePhase_BodyAndTail)
|
||||
if (canFireProjectiles)
|
||||
{
|
||||
float laserDivisor = (phase2 && !deathModeEnragePhase_BodyAndTail) ? 4f : 2f;
|
||||
if (npc.localAI[0] % divisor == 0f && npc.ai[0] % laserDivisor == 0f)
|
||||
if (!flyAtTarget || deathModeEnragePhase_BodyAndTail)
|
||||
{
|
||||
npc.TargetClosest();
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
float laserDivisor = (phase2 && !deathModeEnragePhase_BodyAndTail) ? 4f : 2f;
|
||||
if (npc.localAI[0] % divisor == 0f && npc.ai[0] % laserDivisor == 0f)
|
||||
{
|
||||
if (deathModeEnragePhase_BodyAndTail)
|
||||
{
|
||||
Vector2 velocity = Vector2.Zero;
|
||||
if (movingMines)
|
||||
{
|
||||
Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
randomMineMovement.Normalize();
|
||||
randomMineMovement *= Main.rand.Next(90, 121) * 0.01f;
|
||||
velocity = randomMineMovement;
|
||||
}
|
||||
npc.TargetClosest();
|
||||
|
||||
int type = ModContent.ProjectileType<DeusMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f;
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (Vector2.Distance(player.Center, npc.Center) > 80f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float deusLaserSpeed = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f;
|
||||
|
||||
Vector2 deusLaserCenter = npc.Center;
|
||||
float deusLaserTargetX = player.Center.X - deusLaserCenter.X;
|
||||
float deusLaserTargetY = player.Center.Y - deusLaserCenter.Y;
|
||||
float deusLaserTargetDist = (float)Math.Sqrt(deusLaserTargetX * deusLaserTargetX + deusLaserTargetY * deusLaserTargetY);
|
||||
deusLaserTargetDist = deusLaserSpeed / deusLaserTargetDist;
|
||||
deusLaserTargetX *= deusLaserTargetDist;
|
||||
deusLaserTargetY *= deusLaserTargetDist;
|
||||
deusLaserCenter.X += deusLaserTargetX * 5f;
|
||||
deusLaserCenter.Y += deusLaserTargetY * 5f;
|
||||
|
||||
Vector2 shootDirection = new Vector2(deusLaserTargetX, deusLaserTargetY).SafeNormalize(Vector2.UnitY);
|
||||
Vector2 laserVelocity = shootDirection * deusLaserSpeed;
|
||||
|
||||
int type = shootGodRays ? ModContent.ProjectileType<AstralGodRay>() : ModContent.ProjectileType<AstralShot2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (shootGodRays)
|
||||
if (deathModeEnragePhase_BodyAndTail)
|
||||
{
|
||||
SoundEngine.PlaySound(AstrumDeusHead.GodRaySound, npc.Center);
|
||||
// Waving beams need to start offset so they cross each other neatly.
|
||||
float waveSideOffset = Main.rand.NextFloat(9f, 14f);
|
||||
Vector2 perp = shootDirection.RotatedBy(-MathHelper.PiOver2) * waveSideOffset;
|
||||
|
||||
for (int i = -1; i <= 1; i += 2)
|
||||
Vector2 velocity = Vector2.Zero;
|
||||
if (movingMines)
|
||||
{
|
||||
Vector2 laserStartPos = deusLaserCenter + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f);
|
||||
Projectile godRay = Projectile.NewProjectileDirect(npc.GetSource_FromAI(), laserStartPos, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
|
||||
// Tell this Phased God Ray exactly which way it should be waving.
|
||||
godRay.localAI[1] = i * 0.5f;
|
||||
Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
randomMineMovement.Normalize();
|
||||
randomMineMovement *= Main.rand.Next(90, 121) * 0.01f;
|
||||
velocity = randomMineMovement;
|
||||
}
|
||||
|
||||
int type = ModContent.ProjectileType<DeusMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f;
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f);
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if (Vector2.Distance(player.Center, npc.Center) > 80f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
SoundEngine.PlaySound(AstrumDeusHead.LaserSound, npc.Center);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), deusLaserCenter, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
float deusLaserSpeed = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f;
|
||||
|
||||
Vector2 deusLaserCenter = npc.Center;
|
||||
float deusLaserTargetX = player.Center.X - deusLaserCenter.X;
|
||||
float deusLaserTargetY = player.Center.Y - deusLaserCenter.Y;
|
||||
float deusLaserTargetDist = (float)Math.Sqrt(deusLaserTargetX * deusLaserTargetX + deusLaserTargetY * deusLaserTargetY);
|
||||
deusLaserTargetDist = deusLaserSpeed / deusLaserTargetDist;
|
||||
deusLaserTargetX *= deusLaserTargetDist;
|
||||
deusLaserTargetY *= deusLaserTargetDist;
|
||||
deusLaserCenter.X += deusLaserTargetX * 5f;
|
||||
deusLaserCenter.Y += deusLaserTargetY * 5f;
|
||||
|
||||
Vector2 shootDirection = new Vector2(deusLaserTargetX, deusLaserTargetY).SafeNormalize(Vector2.UnitY);
|
||||
Vector2 laserVelocity = shootDirection * deusLaserSpeed;
|
||||
|
||||
int type = shootGodRays ? ModContent.ProjectileType<AstralGodRay>() : ModContent.ProjectileType<AstralShot2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (shootGodRays)
|
||||
{
|
||||
SoundEngine.PlaySound(AstrumDeusHead.GodRaySound, npc.Center);
|
||||
// Waving beams need to start offset so they cross each other neatly.
|
||||
float waveSideOffset = Main.rand.NextFloat(9f, 14f);
|
||||
Vector2 perp = shootDirection.RotatedBy(-MathHelper.PiOver2) * waveSideOffset;
|
||||
|
||||
for (int i = -1; i <= 1; i += 2)
|
||||
{
|
||||
Vector2 laserStartPos = deusLaserCenter + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f);
|
||||
Projectile godRay = Projectile.NewProjectileDirect(npc.GetSource_FromAI(), laserStartPos, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
|
||||
// Tell this Phased God Ray exactly which way it should be waving.
|
||||
godRay.localAI[1] = i * 0.5f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SoundEngine.PlaySound(AstrumDeusHead.LaserSound, npc.Center);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), deusLaserCenter, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.localAI[0] % divisor == 0f && npc.ai[0] % 2f == 0f)
|
||||
else
|
||||
{
|
||||
Vector2 velocity = Vector2.Zero;
|
||||
if (movingMines)
|
||||
if (npc.localAI[0] % divisor == 0f && npc.ai[0] % 2f == 0f)
|
||||
{
|
||||
Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
randomMineMovement.Normalize();
|
||||
randomMineMovement *= Main.rand.Next(30, 121) * 0.01f;
|
||||
velocity = randomMineMovement;
|
||||
}
|
||||
Vector2 velocity = Vector2.Zero;
|
||||
if (movingMines)
|
||||
{
|
||||
Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
randomMineMovement.Normalize();
|
||||
randomMineMovement *= Main.rand.Next(30, 121) * 0.01f;
|
||||
velocity = randomMineMovement;
|
||||
}
|
||||
|
||||
int type = ModContent.ProjectileType<DeusMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f;
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f);
|
||||
int type = ModContent.ProjectileType<DeusMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f;
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||