Perf Lore tooltip changed, Boss Rush Mod.Call support, Polterghast DR boosted by 15%, Slime God Core AI changes, Moon Lord rev+ AI changes, whoAmI variable reset changes, Polter Clone removed from boss HP bar list.
This commit is contained in:
1 parent
4d5d5ca390
commit
355eb3ee0b
7 files changed
+97
-67
No files matched your search
@@ -10,7 +10,6 @@ namespace CalamityMod.Items.LoreItems
|
||||
{
|
||||
DisplayName.SetDefault("The Perforators and their Hive");
|
||||
Tooltip.SetDefault("An abomination of comingled flesh, bone, and organ, infested primarily by blood-slurping worms.\n" +
|
||||
"The chunks left over from the brain must have been absorbed by the crimson and reconstituted into it.\n" +
|
||||
"Place in your inventory for all of your projectiles to inflict ichor when in the crimson.\n" +
|
||||
"However, enemy spawn rates will be greatly increased while in the crimson due to your body excreting a sweet-smelling pus.");
|
||||
}
|
||||
|
||||
+16
-2
@@ -334,7 +334,14 @@ namespace CalamityMod
|
||||
case "death mode":
|
||||
return CalamityWorld.death;
|
||||
|
||||
case "defiled":
|
||||
case "br":
|
||||
case "bossrush":
|
||||
case "boss rush":
|
||||
case "bossrushactive":
|
||||
case "boss rush active":
|
||||
return CalamityWorld.bossRushActive;
|
||||
|
||||
case "defiled":
|
||||
case "defiledrune":
|
||||
case "defiled rune":
|
||||
case "defiledmode":
|
||||
@@ -383,7 +390,14 @@ namespace CalamityMod
|
||||
case "death mode":
|
||||
return CalamityWorld.death = enabled;
|
||||
|
||||
case "defiled":
|
||||
case "br":
|
||||
case "bossrush":
|
||||
case "boss rush":
|
||||
case "bossrushactive":
|
||||
case "boss rush active":
|
||||
return CalamityWorld.bossRushActive = enabled;
|
||||
|
||||
case "defiled":
|
||||
case "defiledrune":
|
||||
case "defiled rune":
|
||||
case "defiledmode":
|
||||
|
||||
+11
-12
@@ -12694,13 +12694,13 @@ namespace CalamityMod.NPCs
|
||||
case 4:
|
||||
break;
|
||||
case 3:
|
||||
rotation += 60f;
|
||||
break;
|
||||
case 2:
|
||||
rotation += 120f;
|
||||
break;
|
||||
case 2:
|
||||
rotation += 240f;
|
||||
break;
|
||||
case 1:
|
||||
rotation += 180f;
|
||||
rotation += 360f;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -13544,22 +13544,21 @@ namespace CalamityMod.NPCs
|
||||
|
||||
float velocity = CalamityWorld.bossRushActive ? 38f : 30f;
|
||||
Vector2 center23 = npc.Center;
|
||||
Vector2 center24 = Main.player[npc.target].Center;
|
||||
Vector2 center24 = Main.npc[(int)Main.npc[(int)npc.ai[3]].localAI[2]].Center;
|
||||
Vector2 value24 = center24 - center23;
|
||||
Vector2 vector213 = value24 - Vector2.UnitY * 200f;
|
||||
vector213 = Vector2.Normalize(vector213) * velocity;
|
||||
value24 = Vector2.Normalize(value24) * velocity;
|
||||
|
||||
int num1246 = 30;
|
||||
npc.velocity.X = (npc.velocity.X * (float)(num1246 - 1) + vector213.X) / (float)num1246;
|
||||
npc.velocity.Y = (npc.velocity.Y * (float)(num1246 - 1) + vector213.Y) / (float)num1246;
|
||||
npc.velocity.X = (npc.velocity.X * (float)(num1246 - 1) + value24.X) / (float)num1246;
|
||||
npc.velocity.Y = (npc.velocity.Y * (float)(num1246 - 1) + value24.Y) / (float)num1246;
|
||||
|
||||
// Fly towards Moon Lord Head and stay away from other True Eyes
|
||||
float num1247 = 0.6f;
|
||||
float num1247 = 0.5f;
|
||||
for (int num1248 = 0; num1248 < Main.maxNPCs; num1248++)
|
||||
{
|
||||
if (Main.npc[num1248].active)
|
||||
{
|
||||
if (Main.npc[num1248].type == NPCID.MoonLordHead && Vector2.Distance(npc.Center, Main.npc[num1248].Center) > 480f)
|
||||
if (Main.npc[num1248].type == NPCID.MoonLordHead && Vector2.Distance(npc.Center, Main.npc[num1248].Center) > 600f)
|
||||
{
|
||||
if (npc.position.X < Main.npc[num1248].position.X)
|
||||
npc.velocity.X = npc.velocity.X - num1247;
|
||||
@@ -13696,7 +13695,7 @@ namespace CalamityMod.NPCs
|
||||
if (vector217.HasNaNs())
|
||||
vector217 = Vector2.UnitY * -1f;
|
||||
|
||||
vector217 *= 16f;
|
||||
vector217 *= 4f;
|
||||
Projectile.NewProjectile(npc.Center.X + vector216.X, npc.Center.Y + vector216.Y, vector217.X, vector217.Y, ProjectileID.PhantasmalSphere, 0, 0f, Main.myPlayer, 30f, (float)npc.whoAmI);
|
||||
}
|
||||
}
|
||||
|
||||
+62
-45
@@ -306,51 +306,64 @@ namespace CalamityMod.NPCs
|
||||
#region Reset Effects
|
||||
public override void ResetEffects(NPC npc)
|
||||
{
|
||||
void ResetSavedIndex(ref int type)
|
||||
void ResetSavedIndex(ref int type, int type1, int type2 = -1)
|
||||
{
|
||||
if (type >= 0 && !Main.npc[type].active)
|
||||
if (type >= 0)
|
||||
{
|
||||
type = -1;
|
||||
if (!Main.npc[type].active)
|
||||
{
|
||||
type = -1;
|
||||
}
|
||||
else if (type2 == -1)
|
||||
{
|
||||
if (Main.npc[type].type != type1)
|
||||
type = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Main.npc[type].type != type1 && Main.npc[type].type != type2)
|
||||
type = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < bobbitWormBottom.Length; i++)
|
||||
ResetSavedIndex(ref bobbitWormBottom[i]);
|
||||
ResetSavedIndex(ref bobbitWormBottom[i], ModContent.NPCType<BobbitWormSegment>());
|
||||
|
||||
ResetSavedIndex(ref hiveMind);
|
||||
ResetSavedIndex(ref perfHive);
|
||||
ResetSavedIndex(ref slimeGodPurple);
|
||||
ResetSavedIndex(ref slimeGodRed);
|
||||
ResetSavedIndex(ref slimeGod);
|
||||
ResetSavedIndex(ref laserEye);
|
||||
ResetSavedIndex(ref fireEye);
|
||||
ResetSavedIndex(ref primeLaser);
|
||||
ResetSavedIndex(ref primeCannon);
|
||||
ResetSavedIndex(ref primeVice);
|
||||
ResetSavedIndex(ref primeSaw);
|
||||
ResetSavedIndex(ref brimstoneElemental);
|
||||
ResetSavedIndex(ref cataclysm);
|
||||
ResetSavedIndex(ref catastrophe);
|
||||
ResetSavedIndex(ref calamitas);
|
||||
ResetSavedIndex(ref leviathan);
|
||||
ResetSavedIndex(ref siren);
|
||||
ResetSavedIndex(ref scavenger);
|
||||
ResetSavedIndex(ref astrumDeusHeadMain);
|
||||
ResetSavedIndex(ref energyFlame);
|
||||
ResetSavedIndex(ref doughnutBoss);
|
||||
ResetSavedIndex(ref holyBossAttacker);
|
||||
ResetSavedIndex(ref holyBossDefender);
|
||||
ResetSavedIndex(ref holyBossHealer);
|
||||
ResetSavedIndex(ref holyBoss);
|
||||
ResetSavedIndex(ref voidBoss);
|
||||
ResetSavedIndex(ref signus);
|
||||
ResetSavedIndex(ref ghostBossClone);
|
||||
ResetSavedIndex(ref ghostBoss);
|
||||
ResetSavedIndex(ref DoGHead);
|
||||
ResetSavedIndex(ref SCalCataclysm);
|
||||
ResetSavedIndex(ref SCalCatastrophe);
|
||||
ResetSavedIndex(ref SCal);
|
||||
ResetSavedIndex(ref SCalWorm);
|
||||
ResetSavedIndex(ref hiveMind, ModContent.NPCType<HiveMind.HiveMind>(), ModContent.NPCType<HiveMindP2>());
|
||||
ResetSavedIndex(ref perfHive, ModContent.NPCType<PerforatorHive>());
|
||||
ResetSavedIndex(ref slimeGodPurple, ModContent.NPCType<SlimeGod.SlimeGod>(), ModContent.NPCType<SlimeGodSplit>());
|
||||
ResetSavedIndex(ref slimeGodRed, ModContent.NPCType<SlimeGodRun>(), ModContent.NPCType<SlimeGodRunSplit>());
|
||||
ResetSavedIndex(ref slimeGod, ModContent.NPCType<SlimeGodCore>());
|
||||
ResetSavedIndex(ref laserEye, NPCID.Retinazer);
|
||||
ResetSavedIndex(ref fireEye, NPCID.Spazmatism);
|
||||
ResetSavedIndex(ref primeLaser, NPCID.PrimeLaser);
|
||||
ResetSavedIndex(ref primeCannon, NPCID.PrimeCannon);
|
||||
ResetSavedIndex(ref primeVice, NPCID.PrimeVice);
|
||||
ResetSavedIndex(ref primeSaw, NPCID.PrimeSaw);
|
||||
ResetSavedIndex(ref brimstoneElemental, ModContent.NPCType<BrimstoneElemental.BrimstoneElemental>());
|
||||
ResetSavedIndex(ref cataclysm, ModContent.NPCType<CalamitasRun>());
|
||||
ResetSavedIndex(ref catastrophe, ModContent.NPCType<CalamitasRun2>());
|
||||
ResetSavedIndex(ref calamitas, ModContent.NPCType<CalamitasRun3>());
|
||||
ResetSavedIndex(ref leviathan, ModContent.NPCType<Leviathan.Leviathan>());
|
||||
ResetSavedIndex(ref siren, ModContent.NPCType<Siren>());
|
||||
ResetSavedIndex(ref scavenger, ModContent.NPCType<RavagerBody>());
|
||||
ResetSavedIndex(ref astrumDeusHeadMain, ModContent.NPCType<AstrumDeusHeadSpectral>());
|
||||
ResetSavedIndex(ref energyFlame, ModContent.NPCType<ProfanedEnergyBody>());
|
||||
ResetSavedIndex(ref doughnutBoss, ModContent.NPCType<ProfanedGuardianBoss>());
|
||||
ResetSavedIndex(ref holyBossAttacker, ModContent.NPCType<ProvSpawnOffense>());
|
||||
ResetSavedIndex(ref holyBossDefender, ModContent.NPCType<ProvSpawnDefense>());
|
||||
ResetSavedIndex(ref holyBossHealer, ModContent.NPCType<ProvSpawnHealer>());
|
||||
ResetSavedIndex(ref holyBoss, ModContent.NPCType<Providence.Providence>());
|
||||
ResetSavedIndex(ref voidBoss, ModContent.NPCType<CeaselessVoid.CeaselessVoid>());
|
||||
ResetSavedIndex(ref signus, ModContent.NPCType<Signus.Signus>());
|
||||
ResetSavedIndex(ref ghostBossClone, ModContent.NPCType<PolterPhantom>());
|
||||
ResetSavedIndex(ref ghostBoss, ModContent.NPCType<Polterghast.Polterghast>());
|
||||
ResetSavedIndex(ref DoGHead, ModContent.NPCType<DevourerofGodsHead>(), ModContent.NPCType<DevourerofGodsHeadS>());
|
||||
ResetSavedIndex(ref SCalCataclysm, ModContent.NPCType<SupremeCataclysm>());
|
||||
ResetSavedIndex(ref SCalCatastrophe, ModContent.NPCType<SupremeCatastrophe>());
|
||||
ResetSavedIndex(ref SCal, ModContent.NPCType<SupremeCalamitas.SupremeCalamitas>());
|
||||
ResetSavedIndex(ref SCalWorm, ModContent.NPCType<SCalWormHead>());
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1248,13 +1261,17 @@ namespace CalamityMod.NPCs
|
||||
#region Strike NPC
|
||||
public override bool StrikeNPC(NPC npc, ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
|
||||
{
|
||||
if (DestroyerIDs.Contains(npc.type))
|
||||
{
|
||||
if ((newAI[1] < 480f || newAI[2] > 0f) && (CalamityWorld.revenge || CalamityWorld.bossRushActive))
|
||||
{
|
||||
damage *= 0.01;
|
||||
}
|
||||
}
|
||||
Mod chaos = ModLoader.GetMod("ChaosMod");
|
||||
if ((CalamityWorld.revenge && chaos == null) || CalamityWorld.bossRushActive)
|
||||
{
|
||||
if (DestroyerIDs.Contains(npc.type))
|
||||
{
|
||||
if (newAI[1] < 480f || newAI[2] > 0f)
|
||||
{
|
||||
damage *= 0.01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Override hand/head eye 'death' code and use custom 'death' code instead, this is here just in case the AI code fails
|
||||
if (CalamityWorld.revenge || CalamityWorld.bossRushActive)
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
private bool spawnGhost = false;
|
||||
public static float phase1DR = 0.1f;
|
||||
public static float phase2DR = 0.15f;
|
||||
public static float phase3DR = 0.2f;
|
||||
public static float phase3DR = 0.35f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.width = 44;
|
||||
npc.height = 44;
|
||||
npc.defense = 6;
|
||||
npc.LifeMaxNERB(5000, 6250, 2500000);
|
||||
npc.LifeMaxNERB(4000, 5000, 2500000);
|
||||
double HPBoost = CalamityMod.CalamityConfig.BossHealthPercentageBoost * 0.01;
|
||||
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
|
||||
NPCID.Sets.TrailCacheLength[npc.type] = 8;
|
||||
@@ -199,7 +199,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
else if (npc.timeLeft < 1800)
|
||||
npc.timeLeft = 1800;
|
||||
|
||||
float ai1 = hyperMode ? 210f : 300f;
|
||||
float ai1 = hyperMode ? 270f : 360f;
|
||||
|
||||
// Hide inside large slime
|
||||
if (!hyperMode && npc.ai[1] < ai1)
|
||||
@@ -236,8 +236,10 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
Vector2 purpleSlimeVector = new Vector2(npc.Calamity().newAI[0], npc.Calamity().newAI[1]);
|
||||
Vector2 redSlimeVector = new Vector2(npc.localAI[2], npc.localAI[3]);
|
||||
Vector2 goToPosition = (buffedSlime == 1 ? purpleSlimeVector : redSlimeVector) - vectorCenter;
|
||||
npc.velocity = Vector2.Normalize(goToPosition) * 12f;
|
||||
Vector2 goToVector = buffedSlime == 1 ? purpleSlimeVector : redSlimeVector;
|
||||
|
||||
Vector2 goToPosition = goToVector - vectorCenter;
|
||||
npc.velocity = Vector2.Normalize(goToPosition) * (CalamityWorld.bossRushActive ? 24f : 16f);
|
||||
|
||||
npc.ai[2] += 1f;
|
||||
if (npc.ai[2] >= 600f)
|
||||
|
||||
@@ -259,8 +259,7 @@ namespace CalamityMod.UI
|
||||
ModContent.NPCType<SupremeCatastrophe>(),
|
||||
ModContent.NPCType<ProvSpawnDefense>(),
|
||||
ModContent.NPCType<ProvSpawnOffense>(),
|
||||
ModContent.NPCType<ProvSpawnHealer>(),
|
||||
ModContent.NPCType<PolterPhantom>()
|
||||
ModContent.NPCType<ProvSpawnHealer>()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user