1 - More fixes.

This commit is contained in:
mountaindrew10 committed 2022-04-03 18:12:15 -05:00
1 parent c77a030391
commit cb7834d904
21 files changed
+149 -149

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Projectiles.Enemy;
@@ -125,7 +125,7 @@ namespace CalamityMod.NPCs.Abyss
{
int damageBoom = 45;
int projectileType = ModContent.ProjectileType<PufferExplosion>();
int boom = Projectile.NewProjectile(NPC.Center.X, NPC.Center.Y, 0, 0, projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f);
int boom = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center.X, NPC.Center.Y, 0, 0, projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f);
}
NPC.netUpdate = true;
}
+2 -2
View File
@@ -1,4 +1,4 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Banners;
@@ -393,7 +393,7 @@ namespace CalamityMod.NPCs.Abyss
damage = 55;
}
SoundEngine.PlaySound(SoundID.Item, (int)NPC.position.X, (int)NPC.position.Y, 111);
Projectile.NewProjectile(NPC.Center.X, NPC.Center.Y + 60, 0f, 2f, ModContent.ProjectileType<InkBombHostile>(), damage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center.X, NPC.Center.Y + 60, 0f, 2f, ModContent.ProjectileType<InkBombHostile>(), damage, 0f, Main.myPlayer, 0f, 0f);
}
NPC.rotation = NPC.velocity.X * 0.05f;
NPC.velocity *= 0.975f;
+2 -2
View File
@@ -162,13 +162,13 @@ namespace CalamityMod.NPCs.Abyss
int random = Main.rand.Next(randomAmt);
if (random == 0)
{
Projectile.NewProjectile(vector2, Vector2.Zero, ProjectileID.CultistBossLightningOrb, damage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), vector2, Vector2.Zero, ProjectileID.CultistBossLightningOrb, damage, 0f, Main.myPlayer, 0f, 0f);
}
else if (random == 1)
{
Vector2 vec = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitX * NPC.direction);
Vector2 vector4 = vec * (adultWyrmAlive ? 6f : 4f);
Projectile.NewProjectile(vector2, vector4, ProjectileID.CultistBossIceMist, damage, 0f, Main.myPlayer, 0f, 1f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), vector2, vector4, ProjectileID.CultistBossIceMist, damage, 0f, Main.myPlayer, 0f, 1f);
}
else
{
+3 -3
View File
@@ -1,4 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Projectiles.Enemy;
using CalamityMod.World;
@@ -89,8 +89,8 @@ namespace CalamityMod.NPCs.Abyss
{
int projectileType = ModContent.ProjectileType<ToxicMinnowCloud>();
offsetAngleBoom = startAngleBoom + deltaAngleBoom * (iBoom + iBoom * iBoom) / 2f + 32f * iBoom;
int boom1 = Projectile.NewProjectile(valueBoom.X, valueBoom.Y, (float)(Math.Sin(offsetAngleBoom) * 6f), (float)(Math.Cos(offsetAngleBoom) * 6f), projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f);
int boom2 = Projectile.NewProjectile(valueBoom.X, valueBoom.Y, (float)(-Math.Sin(offsetAngleBoom) * 6f), (float)(-Math.Cos(offsetAngleBoom) * 6f), projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f);
int boom1 = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), valueBoom.X, valueBoom.Y, (float)(Math.Sin(offsetAngleBoom) * 6f), (float)(Math.Cos(offsetAngleBoom) * 6f), projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f);
int boom2 = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), valueBoom.X, valueBoom.Y, (float)(-Math.Sin(offsetAngleBoom) * 6f), (float)(-Math.Cos(offsetAngleBoom) * 6f), projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f);
}
}
NPC.netUpdate = true;
+3 -3
View File
@@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.Crabulon
num350 *= num351;
vector34.X += num349;
vector34.Y += num350;
Projectile.NewProjectile(vector34.X, vector34.Y, num349, num350 - 5f, type, NPC.GetProjectileDamage(type), 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), vector34.X, vector34.Y, num349, num350 - 5f, type, NPC.GetProjectileDamage(type), 0f, Main.myPlayer, 0f, 0f);
}
}
}
@@ -459,7 +459,7 @@ namespace CalamityMod.NPCs.Crabulon
for (int x = 0; x < totalMushrooms; x++)
{
Projectile.NewProjectile(NPC.Center.X + shotSpacing, NPC.Center.Y - 1000f, velocityX, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center.X + shotSpacing, NPC.Center.Y - 1000f, velocityX, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
shotSpacing -= shotSpacingDecrement;
}
@@ -475,7 +475,7 @@ namespace CalamityMod.NPCs.Crabulon
{
for (int x = 0; x < 20; x++)
{
Projectile.NewProjectile(NPC.Center.X + shotSpacing, NPC.Center.Y - 1000f, 0f, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center.X + shotSpacing, NPC.Center.Y - 1000f, 0f, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
shotSpacing -= 100;
}
shotSpacing = 1000;
+5 -5
View File
@@ -1,4 +1,4 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Banners;
@@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Crags
public override void SetDefaults()
{
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.npcSlots = 1f;
NPC.damage = 30;
NPC.width = 60;
@@ -44,8 +44,8 @@ namespace CalamityMod.NPCs.Crags
NPC.defense = 45;
NPC.lifeMax = 2000;
}
banner = NPC.type;
bannerItem = ModContent.ItemType<SoulSlurperBanner>();
Banner = NPC.type;
BannerItem = ModContent.ItemType<SoulSlurperBanner>();
NPC.Calamity().VulnerableToHeat = false;
NPC.Calamity().VulnerableToCold = true;
NPC.Calamity().VulnerableToWater = true;
@@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.Crags
dmg = 22;
}
int projType = ModContent.ProjectileType<BrimstoneBarrage>();
Projectile.NewProjectile(source.X, source.Y, num4, num5, projType, dmg + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), source.X, source.Y, num4, num5, projType, dmg + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f);
}
}
int num10 = (int)NPC.Center.X;
+10 -10
View File
@@ -230,7 +230,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, NPC.ai[0] * 0.5f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, NPC.ai[0] * 0.5f);
}
}
}
@@ -258,7 +258,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer);
}
}
}
@@ -313,7 +313,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer);
}
}
}
@@ -406,7 +406,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, velocity);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, velocity);
}
}
}
@@ -470,7 +470,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer);
}
}
}
@@ -530,7 +530,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, velocity);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, velocity);
}
}
}
@@ -594,7 +594,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer);
}
}
}
@@ -706,7 +706,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, velocity);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, velocity);
}
}
}
@@ -788,7 +788,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, velocity);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, velocity);
}
}
}
@@ -882,7 +882,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 1f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 1f);
}
}
+3 -3
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.Projectiles.Boss;
using CalamityMod.World;
using Microsoft.Xna.Framework;
@@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.Cryogen
{
NPC.Calamity().canBreakPlayerDefense = true;
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.canGhostHeal = false;
NPC.noTileCollide = true;
NPC.GetNPCDamage();
@@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.Cryogen
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
int proj = Projectile.NewProjectile(NPC.Center, vector255, type, damage2, 0f, Main.myPlayer);
int proj = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, vector255, type, damage2, 0f, Main.myPlayer);
Main.projectile[proj].timeLeft = 300;
}
}
+4 -4
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.Projectiles.Boss;
using CalamityMod.World;
using Microsoft.Xna.Framework;
@@ -27,11 +27,11 @@ namespace CalamityMod.NPCs.DesertScourge
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.knockBackResist = 0f;
NPC.alpha = 255;
NPC.boss = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("DesertScourge") ?? MusicID.Boss1;
Music = CalamityMod.Instance.GetMusicFromMusicMod("DesertScourge") ?? MusicID.Boss1;
NPC.behindTiles = true;
NPC.noGravity = true;
NPC.noTileCollide = true;
@@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.DesertScourge
vector104.Y += num943 * 5f;
if (Main.rand.NextBool(2) || malice)
{
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, projectileType, NPC.GetProjectileDamage(projectileType), 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), vector104.X, vector104.Y, num942, num943, projectileType, NPC.GetProjectileDamage(projectileType), 0f, Main.myPlayer, 0f, 0f);
}
NPC.netUpdate = true;
}
+44 -44
View File
@@ -508,7 +508,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (Main.netMode != NetmodeID.MultiplayerClient && !hasCreatedPhase1Portal)
{
Vector2 portalSpawnPosition = NPC.Center + NPC.velocity.SafeNormalize(-Vector2.UnitY) * 1000f;
PortalIndex = Projectile.NewProjectile(portalSpawnPosition, Vector2.Zero, ModContent.ProjectileType<DoGP1EndPortal>(), 0, 0f);
PortalIndex = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), portalSpawnPosition, Vector2.Zero, ModContent.ProjectileType<DoGP1EndPortal>(), 0, 0f);
hasCreatedPhase1Portal = true;
NPC.netUpdate = true;
@@ -674,7 +674,7 @@ namespace CalamityMod.NPCs.DevourerofGods
int type = ModContent.ProjectileType<DoGFire>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(vector44.X, vector44.Y, num427, num428, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), vector44.X, vector44.Y, num427, num428, type, damage, 0f, Main.myPlayer);
}
}
else if (distanceFromTarget < 250f)
@@ -705,15 +705,15 @@ namespace CalamityMod.NPCs.DevourerofGods
for (int x = 0; x < totalShots_Phase2; x++)
{
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[0], -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[0], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[0], -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[0], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
shotSpacing_Phase2[0] -= spacingVar_Phase2;
}
if (expertMode)
{
Projectile.NewProjectile(player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
}
break;
@@ -723,15 +723,15 @@ namespace CalamityMod.NPCs.DevourerofGods
targetPosY += 50f;
for (int x = 0; x < totalShots_Phase2; x++)
{
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[0], -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[0], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[0], -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[0], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
shotSpacing_Phase2[0] -= spacingVar_Phase2;
}
if (expertMode)
{
Projectile.NewProjectile(player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
}
break;
@@ -743,17 +743,17 @@ namespace CalamityMod.NPCs.DevourerofGods
start = new Vector2(player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[0]);
aim.Y += laserWallSpacingOffset * (x - halfTotalDiagonalShots);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
start = new Vector2(player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[0]);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
shotSpacing_Phase2[0] -= diagonalSpacingVar;
}
Projectile.NewProjectile(player.Center.X, targetPosY + spawnOffset, 0f, -laserVelocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.Center.X, targetPosY - spawnOffset, 0f, laserVelocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.Center.X, targetPosY + spawnOffset, 0f, -laserVelocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.Center.X, targetPosY - spawnOffset, 0f, laserVelocity, type, damage, 0f, Main.myPlayer);
break;
@@ -761,21 +761,21 @@ namespace CalamityMod.NPCs.DevourerofGods
for (int x = 0; x < totalShots_Phase2; x++)
{
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[0], -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[0], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[0], -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[0], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
shotSpacing_Phase2[0] -= spacingVar_Phase2;
}
int totalBonusLasers = totalShots_Phase2 / 2;
for (int x = 0; x < totalBonusLasers; x++)
{
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[3], -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[3], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, targetPosY + shotSpacing_Phase2[3], -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[3], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
shotSpacing_Phase2[3] -= Main.rand.NextBool(2) ? 180 : 200;
}
Projectile.NewProjectile(player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
break;
@@ -786,17 +786,17 @@ namespace CalamityMod.NPCs.DevourerofGods
start = new Vector2(player.position.X + shotSpacing_Phase2[0], targetPosY + spawnOffset);
aim.X += laserWallSpacingOffset * (x - halfTotalDiagonalShots);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
start = new Vector2(player.position.X + shotSpacing_Phase2[0], targetPosY - spawnOffset);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
shotSpacing_Phase2[0] -= diagonalSpacingVar;
}
Projectile.NewProjectile(player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
break;
}
@@ -816,14 +816,14 @@ namespace CalamityMod.NPCs.DevourerofGods
// Lower wall
for (int x = 0; x < totalShots_Phase2; x++)
{
Projectile.NewProjectile(player.position.X + shotSpacing_Phase2[1], player.position.Y + spawnOffset, 0f, -laserVelocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + shotSpacing_Phase2[1], player.position.Y + spawnOffset, 0f, -laserVelocity, type, damage, 0f, Main.myPlayer);
shotSpacing_Phase2[1] -= spacingVar_Phase2;
}
// Upper wall
for (int x = 0; x < totalShots_Phase2; x++)
{
Projectile.NewProjectile(player.position.X + shotSpacing_Phase2[2], player.position.Y - spawnOffset, 0f, laserVelocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + shotSpacing_Phase2[2], player.position.Y - spawnOffset, 0f, laserVelocity, type, damage, 0f, Main.myPlayer);
shotSpacing_Phase2[2] -= spacingVar_Phase2;
}
@@ -1420,13 +1420,13 @@ namespace CalamityMod.NPCs.DevourerofGods
start = new Vector2(player.position.X + spawnOffset, player.position.Y + shotSpacing);
aim.Y += laserWallSpacingOffset * (x - 3);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
shotSpacing -= spacingVar;
}
if (expertMode)
Projectile.NewProjectile(player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
break;
@@ -1437,13 +1437,13 @@ namespace CalamityMod.NPCs.DevourerofGods
start = new Vector2(player.position.X - spawnOffset, player.position.Y + shotSpacing);
aim.Y += laserWallSpacingOffset * (x - 3);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
shotSpacing -= spacingVar;
}
if (expertMode)
Projectile.NewProjectile(player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
break;
@@ -1454,19 +1454,19 @@ namespace CalamityMod.NPCs.DevourerofGods
start = new Vector2(player.position.X + spawnOffset, player.position.Y + shotSpacing);
aim.Y += laserWallSpacingOffset * (x - 3);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
start = new Vector2(player.position.X - spawnOffset, player.position.Y + shotSpacing);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
shotSpacing -= spacingVar;
}
if (expertMode)
{
Projectile.NewProjectile(player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
}
break;
@@ -1481,20 +1481,20 @@ namespace CalamityMod.NPCs.DevourerofGods
start = new Vector2(player.position.X + spawnOffset, player.position.Y + shotSpacing);
aim.Y += laserWallSpacingOffset * (x - 3);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
start = new Vector2(player.position.X - spawnOffset, player.position.Y + shotSpacing);
velocity = Vector2.Normalize(aim - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
start = new Vector2(player.position.X + shotSpacing, player.position.Y + spawnOffset);
aimClone.X += laserWallSpacingOffset * (x - 3);
velocity = Vector2.Normalize(aimClone - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
start = new Vector2(player.position.X + shotSpacing, player.position.Y - spawnOffset);
velocity = Vector2.Normalize(aimClone - start) * laserVelocity;
Projectile.NewProjectile(start, velocity, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), start, velocity, type, damage, 0f, Main.myPlayer);
}
shotSpacing -= spacingVar;
@@ -1502,8 +1502,8 @@ namespace CalamityMod.NPCs.DevourerofGods
if (expertMode)
{
Projectile.NewProjectile(player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X + spawnOffset, player.Center.Y, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), player.position.X - spawnOffset, player.Center.Y, laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
}
break;
@@ -1980,7 +1980,7 @@ namespace CalamityMod.NPCs.DevourerofGods
float distance = 640f;
Vector2 targetVector = player.Center + player.velocity.SafeNormalize(Vector2.UnitX) * distance + new Vector2(Main.rand.Next(-randomRange, randomRange + 1), Main.rand.Next(-randomRange, randomRange + 1));
SoundEngine.PlaySound(SoundID.Item109, player.Center);
Projectile.NewProjectile(targetVector, Vector2.Zero, ModContent.ProjectileType<DoGTeleportRift>(), 0, 0f, Main.myPlayer, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), targetVector, Vector2.Zero, ModContent.ProjectileType<DoGTeleportRift>(), 0, 0f, Main.myPlayer, NPC.whoAmI);
}
}
@@ -1991,7 +1991,7 @@ namespace CalamityMod.NPCs.DevourerofGods
int randomRange = 48;
float distance = 1080f;
Vector2 targetVector = player.Center + player.velocity.SafeNormalize(Vector2.UnitX) * distance + new Vector2(Main.rand.Next(-randomRange, randomRange + 1), Main.rand.Next(-randomRange, randomRange + 1));
Projectile.NewProjectile(targetVector, Vector2.Zero, ModContent.ProjectileType<DoGTeleportRift>(), 0, 0f, Main.myPlayer, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), targetVector, Vector2.Zero, ModContent.ProjectileType<DoGTeleportRift>(), 0, 0f, Main.myPlayer, NPC.whoAmI);
}
Vector2 newPosition = GetRiftLocation(true);
@@ -2022,7 +2022,7 @@ namespace CalamityMod.NPCs.DevourerofGods
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(newPosition, vector255, type, damage, 0f, Main.myPlayer, velocityMult, finalVelocity - finalVelocityReduction);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), newPosition, vector255, type, damage, 0f, Main.myPlayer, velocityMult, finalVelocity - finalVelocityReduction);
}
}
}
@@ -2122,7 +2122,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (DeathAnimationTimer == 452f)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
Projectile.NewProjectile(NPC.Center, Vector2.Zero, ModContent.ProjectileType<DoGDeathBoom>(), 0, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, Vector2.Zero, ModContent.ProjectileType<DoGDeathBoom>(), 0, 0f);
if (Main.netMode != NetmodeID.Server)
{
+8 -8
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.Items.Potions;
using CalamityMod.Items.TreasureBags;
using CalamityMod.NPCs.ExoMechs.Ares;
@@ -138,7 +138,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.Opacity = 0f;
NPC.knockBackResist = 0f;
NPC.value = Item.buyPrice(15, 0, 0, 0);
@@ -148,7 +148,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
NPC.DeathSound = SoundID.NPCDeath14;
NPC.netAlways = true;
NPC.boss = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
bossBag = ModContent.ItemType<DraedonTreasureBag>();
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
@@ -984,7 +984,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
SoundEngine.PlaySound(Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaCasterFire"), NPC.Center);
Vector2 plasmaVelocity = Vector2.Normalize(aimedVector) * projectileVelocity;
Vector2 offset = Vector2.Normalize(plasmaVelocity) * 70f;
Projectile.NewProjectile(NPC.Center + offset, plasmaVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, plasmaVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
}
}
}
@@ -1040,7 +1040,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
SoundEngine.PlaySound(SoundID.Item36, NPC.Center);
Vector2 rocketVelocity = Vector2.Normalize(aimedVector) * projectileVelocity * 1.2f;
Vector2 offset = Vector2.Normalize(rocketVelocity) * 70f;
Projectile.NewProjectile(NPC.Center + offset, rocketVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, rocketVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y);
}
}
@@ -1098,7 +1098,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
// Draw telegraph beams
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int telegraph = Projectile.NewProjectile(chargeLocations[0], Vector2.Zero, type, 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
int telegraph = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), chargeLocations[0], Vector2.Zero, type, 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
if (Main.projectile.IndexInRange(telegraph))
{
Main.projectile[telegraph].ModProjectile<ApolloChargeTelegraph>().ChargePositions = chargeLocations;
@@ -1156,7 +1156,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 velocity2 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(NPC.Center, velocity2, type, damage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, velocity2, type, damage, 0f, Main.myPlayer);
}
}
@@ -1269,7 +1269,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
Vector2 offset = lensDirection * 70f;
if (Main.netMode != NetmodeID.MultiplayerClient)
Projectile.NewProjectile(NPC.Center + offset, lensDirection * 24f, ModContent.ProjectileType<BrokenApolloLens>(), 0, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, lensDirection * 24f, ModContent.ProjectileType<BrokenApolloLens>(), 0, 0f);
}
// Reset phase and variables
+5 -5
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Armor.Vanity;
using CalamityMod.Items.LoreItems;
@@ -149,7 +149,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.Opacity = 0f;
NPC.knockBackResist = 0f;
NPC.value = Item.buyPrice(15, 0, 0, 0);
@@ -159,7 +159,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
NPC.DeathSound = SoundID.NPCDeath14;
NPC.netAlways = true;
NPC.boss = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
bossBag = ModContent.ItemType<DraedonTreasureBag>();
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
@@ -783,7 +783,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 laserVelocity = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(spawnPoint + Vector2.Normalize(laserVelocity) * 17f, laserVelocity, type, 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), spawnPoint + Vector2.Normalize(laserVelocity) * 17f, laserVelocity, type, 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
@@ -802,7 +802,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 laserVelocity = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(spawnPoint + Vector2.Normalize(laserVelocity) * 35f, laserVelocity, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), spawnPoint + Vector2.Normalize(laserVelocity) * 35f, laserVelocity, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
+4 -4
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Boss;
@@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.Opacity = 0f;
NPC.knockBackResist = 0f;
NPC.canGhostHeal = false;
@@ -88,7 +88,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
NPC.netAlways = true;
NPC.boss = true;
NPC.hide = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
}
@@ -405,7 +405,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
int type = ModContent.ProjectileType<AresGaussNukeProjectile>();
int damage = NPC.GetProjectileDamage(type);
float offset = 40f;
Projectile.NewProjectile(NPC.Center + Vector2.Normalize(gaussNukeVelocity) * offset, gaussNukeVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + Vector2.Normalize(gaussNukeVelocity) * offset, gaussNukeVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y);
// Recoil
NPC.velocity -= gaussNukeVelocity;
+5 -5
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Boss;
@@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.Opacity = 0f;
NPC.knockBackResist = 0f;
NPC.canGhostHeal = false;
@@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
NPC.netAlways = true;
NPC.boss = true;
NPC.hide = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
}
@@ -438,7 +438,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
SoundEngine.PlaySound(Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), NPC.Center);
Vector2 laserVelocity = Vector2.Normalize(player.Center - NPC.Center);
Vector2 offset = laserVelocity * 70f + Vector2.UnitY * 16f;
Projectile.NewProjectile(NPC.Center + offset, player.Center, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, player.Center, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
@@ -474,7 +474,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
if (laserVelocity.HasNaNs())
laserVelocity = -Vector2.UnitY;
Projectile.NewProjectile(source, laserVelocity, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), source, laserVelocity, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
+5 -5
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Boss;
@@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.Opacity = 0f;
NPC.knockBackResist = 0f;
NPC.canGhostHeal = false;
@@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
NPC.netAlways = true;
NPC.boss = true;
NPC.hide = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
}
@@ -432,9 +432,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Vector2 offset = Vector2.Normalize(plasmaBoltVelocity) * 40f + Vector2.UnitY * 16f;
if (boltsSplitLess)
Projectile.NewProjectile(NPC.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, -1f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, -1f);
else
Projectile.NewProjectile(NPC.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
}
}
}
+4 -4
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Boss;
@@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.Opacity = 0f;
NPC.knockBackResist = 0f;
NPC.canGhostHeal = false;
@@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
NPC.netAlways = true;
NPC.boss = true;
NPC.hide = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
}
@@ -427,7 +427,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
int damage = NPC.GetProjectileDamage(type);
Vector2 offset = Vector2.Normalize(teslaOrbVelocity) * 40f + Vector2.UnitY * 8f;
float identity = fireMoreOrbs ? -2f : calamityGlobalNPC.newAI[3] + (calamityGlobalNPC.newAI[2] - teslaOrbTelegraphDuration) / divisor;
Projectile.NewProjectile(NPC.Center + offset, teslaOrbVelocity, type, damage, 0f, Main.myPlayer, identity);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, teslaOrbVelocity, type, damage, 0f, Main.myPlayer, identity);
}
}
}
+10 -10
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.NPCs.ExoMechs.Ares;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.Projectiles.Boss;
@@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.Opacity = 0f;
NPC.knockBackResist = 0f;
NPC.noGravity = true;
@@ -159,7 +159,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
NPC.DeathSound = SoundID.NPCDeath14;
NPC.netAlways = true;
NPC.boss = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
}
@@ -696,7 +696,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
Vector2 projectileDestination = player.Center + predictionVector;
Vector2 offset = laserVelocity * 70f;
float setVelocityInAI = 6.5f;
Projectile.NewProjectile(NPC.Center + offset, projectileDestination, type, damage, 0f, Main.myPlayer, setVelocityInAI, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, projectileDestination, type, damage, 0f, Main.myPlayer, setVelocityInAI, NPC.whoAmI);
}
}
}
@@ -731,7 +731,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
SoundEngine.PlaySound(Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), NPC.Center);
Vector2 laserVelocity = Vector2.Normalize(aimedVector);
Vector2 offset = laserVelocity * 50f;
Projectile.NewProjectile(NPC.Center + offset, laserVelocity, type, 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, laserVelocity, type, 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
@@ -757,7 +757,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
Vector2 offset = normalizedPerturbedSpeed * 70f;
Vector2 newCenter = NPC.Center + offset;
Projectile.NewProjectile(newCenter, newCenter + normalizedPerturbedSpeed * distanceFromTarget, type, damage, 0f, Main.myPlayer, setVelocityInAI, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), newCenter, newCenter + normalizedPerturbedSpeed * distanceFromTarget, type, damage, 0f, Main.myPlayer, setVelocityInAI, NPC.whoAmI);
}
}
}
@@ -850,7 +850,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
Vector2 offset = normalizedPerturbedSpeed * 70f;
Vector2 newCenter = NPC.Center + offset;
Projectile.NewProjectile(newCenter, newCenter + normalizedPerturbedSpeed * distanceFromTarget, type, damage, 0f, Main.myPlayer, setVelocityInAI, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), newCenter, newCenter + normalizedPerturbedSpeed * distanceFromTarget, type, damage, 0f, Main.myPlayer, setVelocityInAI, NPC.whoAmI);
}
}
}
@@ -912,7 +912,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
SoundEngine.PlaySound(Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), NPC.Center);
Vector2 laserVelocity = Vector2.Normalize(spinningPoint - NPC.Center);
Vector2 offset = laserVelocity * 70f;
Projectile.NewProjectile(NPC.Center + offset, laserVelocity, type, 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, laserVelocity, type, 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
NPC.netUpdate = true;
@@ -979,7 +979,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
int type = ModContent.ProjectileType<ArtemisLaserBeamStart>();
SoundEngine.PlaySound(29, (int)NPC.Center.X, (int)NPC.Center.Y, 104);
int damage = NPC.GetProjectileDamage(type);
int laser = Projectile.NewProjectile(NPC.Center, Vector2.Zero, type, damage, 0f, Main.myPlayer, NPC.whoAmI);
int laser = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, Vector2.Zero, type, damage, 0f, Main.myPlayer, NPC.whoAmI);
if (Main.projectile.IndexInRange(laser))
{
Main.projectile[laser].ai[0] = NPC.whoAmI;
@@ -1072,7 +1072,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
Vector2 offset = lensDirection * 70f;
if (Main.netMode != NetmodeID.MultiplayerClient)
Projectile.NewProjectile(NPC.Center + offset, lensDirection * 24f, ModContent.ProjectileType<BrokenArtemisLens>(), 0, 0f);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center + offset, lensDirection * 24f, ModContent.ProjectileType<BrokenArtemisLens>(), 0, 0f);
}
// Reset phase and variables
+8 -8
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Boss;
using CalamityMod.World;
@@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.knockBackResist = 0f;
NPC.Opacity = 0f;
NPC.canGhostHeal = false;
@@ -78,7 +78,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
NPC.dontCountMe = true;
NPC.chaseable = false;
NPC.boss = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
}
@@ -309,7 +309,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
// Normal laser
int type = ModContent.ProjectileType<ThanatosLaser>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
@@ -379,21 +379,21 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive)
{
// Normal laser
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
else
{
// Normal laser
if (shouldGetBuffedByBerserkPhase && NPC.ai[0] % 3f == 0f)
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
// Predictive laser
Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt;
Projectile.NewProjectile(NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
// Opposite laser
projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt;
Projectile.NewProjectile(NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
+8 -8
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Boss;
using CalamityMod.World;
@@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.knockBackResist = 0f;
NPC.Opacity = 0f;
NPC.canGhostHeal = false;
@@ -78,7 +78,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
NPC.dontCountMe = true;
NPC.chaseable = false;
NPC.boss = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
}
@@ -309,7 +309,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
// Normal laser
int type = ModContent.ProjectileType<ThanatosLaser>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
@@ -379,21 +379,21 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive)
{
// Normal laser
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
else
{
// Normal laser
if (shouldGetBuffedByBerserkPhase && NPC.ai[0] % 3f == 0f)
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
// Predictive laser
Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt;
Projectile.NewProjectile(NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
// Opposite laser
projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt;
Projectile.NewProjectile(NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
+6 -6
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.Items.Potions;
using CalamityMod.Items.TreasureBags;
using CalamityMod.NPCs.ExoMechs.Ares;
@@ -128,7 +128,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.Opacity = 0f;
NPC.knockBackResist = 0f;
NPC.value = Item.buyPrice(15, 0, 0, 0);
@@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
NPC.netAlways = true;
NPC.boss = true;
NPC.chaseable = false;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
bossBag = ModContent.ItemType<DraedonTreasureBag>();
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
@@ -843,7 +843,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
int type = ModContent.ProjectileType<ThanatosBeamTelegraph>();
for (int b = 0; b < 6; b++)
{
int beam = Projectile.NewProjectile(NPC.Center, Vector2.Zero, type, 0, 0f, 255, NPC.whoAmI);
int beam = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, Vector2.Zero, type, 0, 0f, 255, NPC.whoAmI);
// Determine the initial offset angle of telegraph. It will be smoothened to give a "stretch" effect.
if (Main.projectile.IndexInRange(beam))
@@ -854,7 +854,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
Main.projectile[beam].ai[1] = MathHelper.Lerp(-0.74f, 0.74f, smoothenedRatio);
}
}
int beam2 = Projectile.NewProjectile(NPC.Center, Vector2.Zero, type, 0, 0f, 255, NPC.whoAmI);
int beam2 = Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, Vector2.Zero, type, 0, 0f, 255, NPC.whoAmI);
if (Main.projectile.IndexInRange(beam2))
Main.projectile[beam2].ai[0] = NPC.whoAmI;
}
@@ -869,7 +869,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
{
int type = ModContent.ProjectileType<ThanatosBeamStart>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.Center, Vector2.Zero, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, Vector2.Zero, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
+8 -8
View File
@@ -1,4 +1,4 @@
using CalamityMod.Events;
using CalamityMod.Events;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Boss;
using CalamityMod.World;
@@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
NPC.aiStyle = -1;
aiType = -1;
AIType = -1;
NPC.knockBackResist = 0f;
NPC.Opacity = 0f;
NPC.canGhostHeal = false;
@@ -78,7 +78,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
NPC.dontCountMe = true;
NPC.chaseable = false;
NPC.boss = true;
music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
}
@@ -309,7 +309,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
// Normal laser
int type = ModContent.ProjectileType<ThanatosLaser>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}
@@ -379,21 +379,21 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive)
{
// Normal laser
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
else
{
// Normal laser
if (shouldGetBuffedByBerserkPhase && NPC.ai[0] % 3f == 0f)
Projectile.NewProjectile(NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
// Predictive laser
Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt;
Projectile.NewProjectile(NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
// Opposite laser
projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt;
Projectile.NewProjectile(NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
}
}
}