Cal Clone and Leviathan/Anahita Legendary Rev+ meme changes.

This commit is contained in:
mountaindrew10 committed 2023-04-20 04:07:12 -05:00
1 parent 64e17caeeb
commit 5430e07059
4 files changed
+99 -37

No files matched your search

+6 -3
View File
@@ -1811,9 +1811,12 @@ namespace CalamityMod.NPCs
projectileVelocity += 3f * enrageScale;
int type = ModContent.ProjectileType<BrimstoneHellfireball>();
int damage = npc.GetProjectileDamage(type);
Vector2 fireballVelocity = Vector2.Normalize(player.Center - npc.Center) * projectileVelocity;
bool shootPredictiveShot = CalamityWorld.LegendaryMode && CalamityWorld.revenge && Main.rand.NextBool();
Vector2 predictionVector = shootPredictiveShot ? player.velocity * 20f : Vector2.Zero;
Vector2 fireballVelocity = Vector2.Normalize(player.Center + predictionVector - npc.Center) * projectileVelocity;
Vector2 offset = Vector2.Normalize(fireballVelocity) * 40f;
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y);
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y);
Main.projectile[proj].netUpdate = true;
}
}
}
@@ -1910,7 +1913,7 @@ namespace CalamityMod.NPCs
{
int type = ModContent.ProjectileType<BrimstoneHellblast>();
int damage = npc.GetProjectileDamage(type);
Vector2 fireballVelocity = npc.velocity * 0.01f;
Vector2 fireballVelocity = CalamityWorld.LegendaryMode ? Main.rand.NextVector2CircularEdge(0.02f, 0.02f) : npc.velocity * 0.01f;
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, fireballVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f);
}
}
+83 -29
View File
@@ -178,6 +178,8 @@ namespace CalamityMod.NPCs.Leviathan
bubbleVelocity += 2f * (1f - lifeRatio);
if (Main.getGoodWorld)
bubbleVelocity *= 1.15f;
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
bubbleVelocity *= 2f;
NPC.damage = NPC.defDamage;
@@ -616,38 +618,74 @@ namespace CalamityMod.NPCs.Leviathan
int totalProjectiles = 8;
int projectileDistance = 600;
int type = ModContent.ProjectileType<WaterSpear>();
switch ((int)NPC.localAI[3])
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
{
case 0:
SoundEngine.PlaySound(SoundID.Item21, player.Center);
break;
case 1:
totalProjectiles = 3;
type = ModContent.ProjectileType<FrostMist>();
SoundEngine.PlaySound(SoundID.Item30, player.Center);
break;
case 2:
totalProjectiles = 6;
type = ModContent.ProjectileType<SirenSong>();
float soundPitch = (Main.rand.NextFloat() - 0.5f) * 0.5f;
Main.musicPitch = soundPitch;
SoundEngine.PlaySound(SoundID.Item26, player.Center);
break;
float radians = MathHelper.TwoPi / totalProjectiles;
int damage = NPC.GetProjectileDamage(type);
for (int i = 0; i < totalProjectiles; i++)
{
switch (Main.rand.Next(3))
{
case 0:
SoundEngine.PlaySound(SoundID.Item21, player.Center);
break;
case 1:
type = ModContent.ProjectileType<FrostMist>();
SoundEngine.PlaySound(SoundID.Item30, player.Center);
break;
case 2:
type = ModContent.ProjectileType<SirenSong>();
float soundPitch = (Main.rand.NextFloat() - 0.5f) * 0.5f;
Main.musicPitch = soundPitch;
SoundEngine.PlaySound(SoundID.Item26, player.Center);
break;
}
Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -projectileVelocity).RotatedBy(radians * i)) * projectileDistance;
Vector2 projVelocity = Vector2.Normalize(player.Center - spawnVector) * projectileVelocity;
int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, projVelocity, type, damage, 0f, Main.myPlayer);
Main.projectile[proj].netUpdate = true;
}
}
NPC.localAI[3] += 1f;
if (NPC.localAI[3] > 2f)
NPC.localAI[3] = 0f;
if ((phase2 && !leviAlive) || phase4)
totalProjectiles += totalProjectiles / 2;
float radians = MathHelper.TwoPi / totalProjectiles;
int damage = NPC.GetProjectileDamage(type);
for (int i = 0; i < totalProjectiles; i++)
else
{
Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -projectileVelocity).RotatedBy(radians * i)) * projectileDistance;
Vector2 projVelocity = Vector2.Normalize(player.Center - spawnVector) * projectileVelocity;
Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, projVelocity, type, damage, 0f, Main.myPlayer);
switch ((int)NPC.localAI[3])
{
case 0:
SoundEngine.PlaySound(SoundID.Item21, player.Center);
break;
case 1:
totalProjectiles = 3;
type = ModContent.ProjectileType<FrostMist>();
SoundEngine.PlaySound(SoundID.Item30, player.Center);
break;
case 2:
totalProjectiles = 6;
type = ModContent.ProjectileType<SirenSong>();
float soundPitch = (Main.rand.NextFloat() - 0.5f) * 0.5f;
Main.musicPitch = soundPitch;
SoundEngine.PlaySound(SoundID.Item26, player.Center);
break;
}
NPC.localAI[3] += 1f;
if (NPC.localAI[3] > 2f)
NPC.localAI[3] = 0f;
if ((phase2 && !leviAlive) || phase4)
totalProjectiles += totalProjectiles / 2;
float radians = MathHelper.TwoPi / totalProjectiles;
int damage = NPC.GetProjectileDamage(type);
for (int i = 0; i < totalProjectiles; i++)
{
Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -projectileVelocity).RotatedBy(radians * i)) * projectileDistance;
Vector2 projVelocity = Vector2.Normalize(player.Center - spawnVector) * projectileVelocity;
Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, projVelocity, type, damage, 0f, Main.myPlayer);
}
}
}
@@ -719,6 +757,22 @@ namespace CalamityMod.NPCs.Leviathan
NPC.Calamity().canBreakPlayerDefense = true;
NPC.damage = (int)(NPC.defDamage * 1.5);
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge && NPC.ai[1] % 5f == 0f)
{
SoundEngine.PlaySound(SoundID.Item85, NPC.Center);
Vector2 vector119 = new Vector2(NPC.position.X + (NPC.width / 2) + (15 * NPC.direction * NPC.scale), NPC.position.Y + 30 * NPC.scale);
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int spawn = NPC.NewNPC(NPC.GetSource_FromAI(), (int)vector119.X, (int)vector119.Y, NPCID.DetonatingBubble);
Main.npc[spawn].target = NPC.target;
Main.npc[spawn].velocity = player.Center - vector119;
Main.npc[spawn].velocity.Normalize();
Main.npc[spawn].velocity *= bubbleVelocity;
Main.npc[spawn].netUpdate = true;
Main.npc[spawn].ai[3] = Main.rand.Next(80, 121) / 100f;
}
}
// Spawn dust
int num24 = 7;
for (int j = 0; j < num24; j++)
+9 -4
View File
@@ -391,13 +391,18 @@ namespace CalamityMod.NPCs.Leviathan
num416 *= num417;
vector40.X += num415 * 4f;
vector40.Y += num416 * 4f;
if (CalamityWorld.getFixedBoi)
{
type = ProjectileID.Boulder;
type = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? ProjectileID.BouncyBoulder : ProjectileID.Boulder;
vector40.Y -= 5; //Shoot a bit more up since boulders are affected by gravity
damage *= 2;
}
Projectile.NewProjectile(NPC.GetSource_FromAI(), vector40.X, vector40.Y, num415, num416, type, damage, 0f, Main.myPlayer);
int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), vector40.X, vector40.Y, num415, num416, type, damage, 0f, Main.myPlayer);
if (CalamityWorld.getFixedBoi)
Main.projectile[proj].scale *= 5f;
if (soundDelay <= 0)
{
soundDelay = 120;
@@ -425,7 +430,7 @@ namespace CalamityMod.NPCs.Leviathan
NPC.ai[1] += num638 / 2;
bool flag103 = false;
float num640 = (!sirenAlive || phase4) ? 60f : 40f;
float num640 = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 20f : (!sirenAlive || phase4) ? 60f : 40f;
if (NPC.ai[1] > num640)
{
NPC.ai[1] = 0f;
@@ -433,7 +438,7 @@ namespace CalamityMod.NPCs.Leviathan
flag103 = true;
}
int spawnLimit = (sirenAlive && !phase4) ? 1 : (death ? 2 : 3);
int spawnLimit = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 10 : (sirenAlive && !phase4) ? 1 : (death ? 2 : 3);
if (flag103 && NPC.CountNPCS(ModContent.NPCType<AquaticAberration>()) < spawnLimit)
{
SoundEngine.PlaySound(soundChoice with { Pitch = soundChoice.Pitch + extrapitch }, vector);
+1 -1
View File
@@ -2357,7 +2357,7 @@ namespace CalamityMod.NPCs.Providence
bool allowedClass = projectile.CountsAsClass<SummonDamageClass>() || (!projectile.CountsAsClass<MeleeDamageClass>() && !projectile.CountsAsClass<RangedDamageClass>() &&
!projectile.CountsAsClass<MagicDamageClass>() && !projectile.CountsAsClass<ThrowingDamageClass>() && !projectile.CountsAsClass<SummonMeleeSpeedDamageClass>());
bool allowedDamage = allowedClass && damage <= 75; //Flat 75 regardless of difficulty.
bool allowedDamage = allowedClass && hit.Damage <= 75; //Flat 75 regardless of difficulty.
//Absorber on-hit effects likely won't proc this but Deific Amulet and Astral Bulwark stars will proc this.
bool allowedBabs = Main.player[projectile.owner].Calamity().pArtifact && !Main.player[projectile.owner].Calamity().profanedCrystalBuffs;