1 - Speedrun Timer.
2 - Draedon lines in exo mech AIs, currently commented out because the text doesn't exist yet.
This commit is contained in:
1 parent
4757049f1c
commit
4b1fe79f88
36 files changed
+671
-56
No files matched your search
+38
-12
@@ -141,10 +141,16 @@ namespace CalamityMod.CalPlayer
|
||||
public DoGCartSegment[] DoGCartSegments = new DoGCartSegment[DoGCartMount.SegmentCount];
|
||||
public float SmoothenedMinecartRotation;
|
||||
public float MusicMuffleFactor;
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Tile Entity Trackers
|
||||
public int CurrentlyViewedFactoryID = -1;
|
||||
#region Speedrun Timer
|
||||
public int speedrunTimer = 0;
|
||||
public int bossTypeJustDowned = -1;
|
||||
public int bossTypeJustDownedTime = 0;
|
||||
#endregion
|
||||
|
||||
#region Tile Entity Trackers
|
||||
public int CurrentlyViewedFactoryID = -1;
|
||||
public int CurrentlyViewedChargerID = -1;
|
||||
public int CurrentlyViewedHologramID = -1;
|
||||
public string CurrentlyViewedHologramText;
|
||||
@@ -1098,7 +1104,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#endregion
|
||||
|
||||
#region SavingAndLoading
|
||||
#region Saving And Loading
|
||||
public override void Initialize()
|
||||
{
|
||||
extraAccessoryML = false;
|
||||
@@ -1220,8 +1226,11 @@ namespace CalamityMod.CalPlayer
|
||||
{ "itemTypeLastReforged", itemTypeLastReforged },
|
||||
{ "reforgeTierSafety", reforgeTierSafety },
|
||||
{ "moveSpeedStat", moveSpeedStat },
|
||||
{ "defenseDamage", defenseDamage }
|
||||
};
|
||||
{ "defenseDamage", defenseDamage },
|
||||
{ "speedrunTimer", speedrunTimer },
|
||||
{ "bossTypeJustDowned", bossTypeJustDowned },
|
||||
{ "bossTypeJustDownedTime", bossTypeJustDownedTime }
|
||||
};
|
||||
}
|
||||
|
||||
public override void Load(TagCompound tag)
|
||||
@@ -1312,7 +1321,11 @@ namespace CalamityMod.CalPlayer
|
||||
moveSpeedStat = tag.GetInt("moveSpeedStat");
|
||||
|
||||
defenseDamage = tag.GetInt("defenseDamage");
|
||||
}
|
||||
|
||||
speedrunTimer = tag.GetInt("speedrunTimer");
|
||||
bossTypeJustDowned = tag.GetInt("bossTypeJustDowned");
|
||||
bossTypeJustDownedTime = tag.GetInt("bossTypeJustDownedTime");
|
||||
}
|
||||
|
||||
public override void LoadLegacy(BinaryReader reader)
|
||||
{
|
||||
@@ -1351,7 +1364,11 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
defenseDamage = reader.ReadInt32();
|
||||
|
||||
if (loadVersion == 0)
|
||||
speedrunTimer = reader.ReadInt32();
|
||||
bossTypeJustDowned = reader.ReadInt32();
|
||||
bossTypeJustDownedTime = reader.ReadInt32();
|
||||
|
||||
if (loadVersion == 0)
|
||||
{
|
||||
BitsByte flags = reader.ReadByte();
|
||||
extraAccessoryML = flags[0];
|
||||
@@ -3888,10 +3905,17 @@ namespace CalamityMod.CalPlayer
|
||||
player.AddBuff(ModContent.BuffType<ProfanedCrystalBuff>(), 60, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region PreUpdate
|
||||
public override void PreUpdate()
|
||||
#region Update Autopause
|
||||
public override void UpdateAutopause()
|
||||
{
|
||||
speedrunTimer++;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PreUpdate
|
||||
public override void PreUpdate()
|
||||
{
|
||||
tailFrameUp++;
|
||||
if (tailFrameUp == 8)
|
||||
@@ -3927,7 +3951,9 @@ namespace CalamityMod.CalPlayer
|
||||
GameShaders.Armor.GetSecondaryShader(player.dye[i].dye, player)?.UseColor(CalamityPlayerDrawEffects.GetCurrentMoonlightDyeColor());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
speedrunTimer++;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PreUpdateBuffs
|
||||
|
||||
@@ -5,7 +5,33 @@ using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.Abyss;
|
||||
using CalamityMod.NPCs.AquaticScourge;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using CalamityMod.NPCs.AstrumDeus;
|
||||
using CalamityMod.NPCs.BrimstoneElemental;
|
||||
using CalamityMod.NPCs.Bumblebirb;
|
||||
using CalamityMod.NPCs.Calamitas;
|
||||
using CalamityMod.NPCs.CeaselessVoid;
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.Cryogen;
|
||||
using CalamityMod.NPCs.DesertScourge;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.NPCs.ExoMechs.Ares;
|
||||
using CalamityMod.NPCs.HiveMind;
|
||||
using CalamityMod.NPCs.Leviathan;
|
||||
using CalamityMod.NPCs.OldDuke;
|
||||
using CalamityMod.NPCs.Perforator;
|
||||
using CalamityMod.NPCs.PlaguebringerGoliath;
|
||||
using CalamityMod.NPCs.Polterghast;
|
||||
using CalamityMod.NPCs.ProfanedGuardians;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.Ravager;
|
||||
using CalamityMod.NPCs.Signus;
|
||||
using CalamityMod.NPCs.SlimeGod;
|
||||
using CalamityMod.NPCs.StormWeaver;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -18,8 +44,6 @@ using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
using ProvidenceBoss = CalamityMod.NPCs.Providence.Providence;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
public class CalamityPlayerDrawEffects : ModPlayer
|
||||
@@ -723,8 +747,269 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
CalamityPlayer calamityPlayer = player.Calamity();
|
||||
|
||||
// Dust modifications while high.
|
||||
if (calamityPlayer.trippy)
|
||||
if (Main.myPlayer == player.whoAmI && !Main.gameMenu)
|
||||
{
|
||||
if (CalamityConfig.Instance.SpeedrunTimer)
|
||||
{
|
||||
double fractionsOfSeconds = calamityPlayer.speedrunTimer / 60D;
|
||||
fractionsOfSeconds -= Math.Truncate(fractionsOfSeconds);
|
||||
fractionsOfSeconds *= 1000D;
|
||||
int milliseconds = (int)Math.Truncate(fractionsOfSeconds);
|
||||
int seconds = calamityPlayer.speedrunTimer / 60;
|
||||
int minutes = calamityPlayer.speedrunTimer / 3600;
|
||||
int hours = calamityPlayer.speedrunTimer / 216000;
|
||||
|
||||
seconds -= minutes * 60;
|
||||
minutes -= hours * 60;
|
||||
|
||||
if (hours > 99)
|
||||
{
|
||||
seconds = minutes = 59;
|
||||
hours = 99;
|
||||
}
|
||||
|
||||
string fractionsOfSecondsText = milliseconds > 99 ? milliseconds.ToString() : "0" + milliseconds.ToString();
|
||||
string secondsText = seconds > 9 ? seconds.ToString() : "0" + seconds.ToString();
|
||||
string minutesText = minutes > 9 ? minutes.ToString() : "0" + minutes.ToString();
|
||||
string hoursText = hours > 9 ? hours.ToString() : "0" + hours.ToString();
|
||||
|
||||
string text = hoursText + ":" + minutesText + ":" + secondsText + "." + fractionsOfSecondsText;
|
||||
float scale = 2f;
|
||||
float xOffset = CalamityConfig.Instance.SpeedrunTimerPosX;
|
||||
float yOffset = CalamityConfig.Instance.SpeedrunTimerPosY;
|
||||
|
||||
Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, text, Main.screenWidth / 2f - xOffset, yOffset, Color.White, Color.Black, default, scale);
|
||||
|
||||
if (calamityPlayer.bossTypeJustDowned > -1)
|
||||
{
|
||||
fractionsOfSeconds = calamityPlayer.bossTypeJustDownedTime / 60D;
|
||||
fractionsOfSeconds -= Math.Truncate(fractionsOfSeconds);
|
||||
fractionsOfSeconds *= 1000D;
|
||||
milliseconds = (int)Math.Truncate(fractionsOfSeconds);
|
||||
seconds = calamityPlayer.bossTypeJustDownedTime / 60;
|
||||
minutes = calamityPlayer.bossTypeJustDownedTime / 3600;
|
||||
hours = calamityPlayer.bossTypeJustDownedTime / 216000;
|
||||
|
||||
seconds -= minutes * 60;
|
||||
minutes -= hours * 60;
|
||||
|
||||
if (hours > 99)
|
||||
{
|
||||
seconds = minutes = 59;
|
||||
hours = 99;
|
||||
}
|
||||
|
||||
fractionsOfSecondsText = milliseconds > 99 ? milliseconds.ToString() : "0" + milliseconds.ToString();
|
||||
secondsText = seconds > 9 ? seconds.ToString() : "0" + seconds.ToString();
|
||||
minutesText = minutes > 9 ? minutes.ToString() : "0" + minutes.ToString();
|
||||
hoursText = hours > 9 ? hours.ToString() : "0" + hours.ToString();
|
||||
|
||||
text = hoursText + ":" + minutesText + ":" + secondsText + "." + fractionsOfSecondsText;
|
||||
scale = 1f;
|
||||
yOffset += 44f;
|
||||
|
||||
Texture2D texture = null;
|
||||
switch (calamityPlayer.bossTypeJustDowned)
|
||||
{
|
||||
// King Slime
|
||||
case 1:
|
||||
texture = Main.npcHeadBossTexture[7];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<DesertScourgeHead>()]];
|
||||
break;
|
||||
|
||||
// Eye of Cthulhu
|
||||
case 3:
|
||||
texture = Main.npcHeadBossTexture[1];
|
||||
break;
|
||||
|
||||
case 4:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<CrabulonIdle>()]];
|
||||
break;
|
||||
|
||||
// Eater of Worlds
|
||||
case 5:
|
||||
texture = Main.npcHeadBossTexture[2];
|
||||
break;
|
||||
|
||||
// Brain of Cthulhu
|
||||
case 6:
|
||||
texture = Main.npcHeadBossTexture[23];
|
||||
break;
|
||||
|
||||
case 7:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<HiveMindP2>()]];
|
||||
break;
|
||||
|
||||
case 8:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<PerforatorHive>()]];
|
||||
break;
|
||||
|
||||
// Queen Bee
|
||||
case 9:
|
||||
texture = Main.npcHeadBossTexture[14];
|
||||
break;
|
||||
|
||||
// Skeletron
|
||||
case 10:
|
||||
texture = Main.npcHeadBossTexture[19];
|
||||
break;
|
||||
|
||||
case 11:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<SlimeGodCore>()]];
|
||||
break;
|
||||
|
||||
// Wall of Flesh
|
||||
case 12:
|
||||
texture = Main.npcHeadBossTexture[22];
|
||||
break;
|
||||
|
||||
case 13:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Cryogen>()]];
|
||||
break;
|
||||
|
||||
// The Twins
|
||||
case 14:
|
||||
texture = Main.npcHeadBossTexture[21];
|
||||
break;
|
||||
|
||||
case 15:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<AquaticScourgeHead>()]];
|
||||
break;
|
||||
|
||||
// The Destroyer
|
||||
case 16:
|
||||
texture = Main.npcHeadBossTexture[25];
|
||||
break;
|
||||
|
||||
case 17:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<BrimstoneElemental>()]];
|
||||
break;
|
||||
|
||||
// Skeletron Prime
|
||||
case 18:
|
||||
texture = Main.npcHeadBossTexture[18];
|
||||
break;
|
||||
|
||||
case 19:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<CalamitasRun3>()]];
|
||||
break;
|
||||
|
||||
// Plantera
|
||||
case 20:
|
||||
texture = Main.npcHeadBossTexture[12];
|
||||
break;
|
||||
|
||||
case 21:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Leviathan>()]];
|
||||
break;
|
||||
|
||||
case 22:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<AstrumAureus>()]];
|
||||
break;
|
||||
|
||||
// Golem
|
||||
case 23:
|
||||
texture = Main.npcHeadBossTexture[5];
|
||||
break;
|
||||
|
||||
case 24:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<PlaguebringerGoliath>()]];
|
||||
break;
|
||||
|
||||
// Duke Fishron
|
||||
case 25:
|
||||
texture = Main.npcHeadBossTexture[4];
|
||||
break;
|
||||
|
||||
case 26:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<RavagerBody>()]];
|
||||
break;
|
||||
|
||||
// Lunatic Cultist
|
||||
case 27:
|
||||
texture = Main.npcHeadBossTexture[31];
|
||||
break;
|
||||
|
||||
case 28:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<AstrumDeusHeadSpectral>()]];
|
||||
break;
|
||||
|
||||
// Moon Lord
|
||||
case 29:
|
||||
texture = Main.npcHeadBossTexture[8];
|
||||
break;
|
||||
|
||||
case 30:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<ProfanedGuardianBoss>()]];
|
||||
break;
|
||||
|
||||
case 31:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Bumblefuck>()]];
|
||||
break;
|
||||
|
||||
case 32:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Providence>()]];
|
||||
break;
|
||||
|
||||
case 33:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<CeaselessVoid>()]];
|
||||
break;
|
||||
|
||||
case 34:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<StormWeaverHeadNaked>()]];
|
||||
break;
|
||||
|
||||
case 35:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Signus>()]];
|
||||
break;
|
||||
|
||||
case 36:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Polterghast>()]];
|
||||
break;
|
||||
|
||||
case 37:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<OldDuke>()]];
|
||||
break;
|
||||
|
||||
case 38:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<DevourerofGodsHeadS>()]];
|
||||
break;
|
||||
|
||||
case 39:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Yharon>()]];
|
||||
break;
|
||||
|
||||
case 40:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<SupremeCalamitas>()]];
|
||||
break;
|
||||
|
||||
case 41:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<AresBody>()]];
|
||||
break;
|
||||
|
||||
case 42:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<EidolonWyrmHeadHuge>()]];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
xOffset -= 58f;
|
||||
|
||||
if (texture != null)
|
||||
Main.spriteBatch.Draw(texture, new Vector2(Main.screenWidth / 2f - xOffset - texture.Width - 4f, yOffset), null, Color.White, 0f, default, 1f, SpriteEffects.None, 0f);
|
||||
|
||||
Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, text, Main.screenWidth / 2f - xOffset, yOffset, Color.White, Color.Black, default, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dust modifications while high.
|
||||
if (calamityPlayer.trippy)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
|
||||
@@ -118,6 +118,28 @@ namespace CalamityMod
|
||||
[Tooltip("The Y position of the Charge Meter.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.")]
|
||||
public float ChargeMeterPosY { get; set; }
|
||||
|
||||
[Label("Speedrun Timer")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
[Tooltip("Enables a Speedrun Timer.")]
|
||||
public bool SpeedrunTimer { get; set; }
|
||||
|
||||
[Label("Speedrun Timer X Position")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(-800f, 800f)]
|
||||
[DefaultValue(68f)]
|
||||
[Tooltip("The X position of the Speedrun Timer.")]
|
||||
public float SpeedrunTimerPosX { get; set; }
|
||||
|
||||
[Label("Speedrun Timer Y Position")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(16f, 1000f)]
|
||||
[DefaultValue(16f)]
|
||||
[Tooltip("The Y position of the Speedrun Timer.")]
|
||||
public float SpeedrunTimerPosY { get; set; }
|
||||
|
||||
[Header("General Gameplay Changes")]
|
||||
|
||||
[Label("Early Hardmode Progression Rework")]
|
||||
|
||||
@@ -37,7 +37,9 @@ using CalamityMod.NPCs.Crags;
|
||||
using CalamityMod.NPCs.Cryogen;
|
||||
using CalamityMod.NPCs.DesertScourge;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.NPCs.ExoMechs.Apollo;
|
||||
using CalamityMod.NPCs.ExoMechs.Ares;
|
||||
using CalamityMod.NPCs.ExoMechs.Artemis;
|
||||
using CalamityMod.NPCs.ExoMechs.Thanatos;
|
||||
using CalamityMod.NPCs.GreatSandShark;
|
||||
using CalamityMod.NPCs.HiveMind;
|
||||
@@ -47,6 +49,8 @@ using CalamityMod.NPCs.OldDuke;
|
||||
using CalamityMod.NPCs.Perforator;
|
||||
using CalamityMod.NPCs.PlaguebringerGoliath;
|
||||
using CalamityMod.NPCs.PlagueEnemies;
|
||||
using CalamityMod.NPCs.Polterghast;
|
||||
using CalamityMod.NPCs.ProfanedGuardians;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.Ravager;
|
||||
using CalamityMod.NPCs.Signus;
|
||||
@@ -154,6 +158,8 @@ namespace CalamityMod
|
||||
public static List<int> pierceResistList;
|
||||
public static List<int> pierceResistExceptionList;
|
||||
|
||||
public static SortedDictionary<int, int> bossTypes;
|
||||
|
||||
public static List<int> legOverrideList;
|
||||
|
||||
public static List<int> kamiDebuffColorImmuneList;
|
||||
@@ -2768,6 +2774,61 @@ namespace CalamityMod
|
||||
ProjectileType<EyeOfNightCell>()
|
||||
};
|
||||
|
||||
bossTypes = new SortedDictionary<int, int>()
|
||||
{
|
||||
{ NPCID.KingSlime, 1 },
|
||||
{ NPCType<DesertScourgeHead>(), 2 },
|
||||
{ NPCID.EyeofCthulhu, 3 },
|
||||
{ NPCType<CrabulonIdle>(), 4 },
|
||||
{ NPCID.EaterofWorldsHead, 5 },
|
||||
{ NPCID.EaterofWorldsBody, 5 },
|
||||
{ NPCID.EaterofWorldsTail, 5 },
|
||||
{ NPCID.BrainofCthulhu, 6 },
|
||||
{ NPCType<HiveMindP2>(), 7 },
|
||||
{ NPCType<PerforatorHive>(), 8 },
|
||||
{ NPCID.QueenBee, 9 },
|
||||
{ NPCID.SkeletronHead, 10 },
|
||||
{ NPCType<SlimeGodCore>(), 11 },
|
||||
{ NPCType<SlimeGodSplit>(), 11 },
|
||||
{ NPCType<SlimeGodRunSplit>(), 11 },
|
||||
{ NPCID.WallofFlesh, 12 },
|
||||
{ NPCType<Cryogen>(), 13 },
|
||||
{ NPCID.Retinazer, 14 },
|
||||
{ NPCID.Spazmatism, 14 },
|
||||
{ NPCType<AquaticScourgeHead>(), 15 },
|
||||
{ NPCID.TheDestroyer, 16 },
|
||||
{ NPCType<BrimstoneElemental>(), 17 },
|
||||
{ NPCID.SkeletronPrime, 18 },
|
||||
{ NPCType<CalamitasRun3>(), 19 },
|
||||
{ NPCID.Plantera, 20 },
|
||||
{ NPCType<Leviathan>(), 21 },
|
||||
{ NPCType<Siren>(), 21 },
|
||||
{ NPCType<AstrumAureus>(), 22 },
|
||||
{ NPCID.Golem, 23 },
|
||||
{ NPCType<PlaguebringerGoliath>(), 24 },
|
||||
{ NPCID.DukeFishron, 25 },
|
||||
{ NPCType<RavagerBody>(), 26 },
|
||||
{ NPCID.CultistBoss, 27 },
|
||||
{ NPCType<AstrumDeusHeadSpectral>(), 28 },
|
||||
{ NPCID.MoonLordCore, 29 },
|
||||
{ NPCType<ProfanedGuardianBoss>(), 30 },
|
||||
{ NPCType<Bumblefuck>(), 31 },
|
||||
{ NPCType<Providence>(), 32 },
|
||||
{ NPCType<CeaselessVoid>(), 33 },
|
||||
{ NPCType<StormWeaverHeadNaked>(), 34 },
|
||||
{ NPCType<Signus>(), 35 },
|
||||
{ NPCType<Polterghast>(), 36 },
|
||||
{ NPCType<OldDuke>(), 37 },
|
||||
{ NPCType<DevourerofGodsHeadS>(), 38 },
|
||||
{ NPCType<Yharon>(), 39 },
|
||||
{ NPCType<SupremeCalamitas>(), 40 },
|
||||
{ NPCType<AresBody>(), 41 },
|
||||
{ NPCType<ThanatosHead>(), 41 },
|
||||
{ NPCType<Artemis>(), 41 },
|
||||
{ NPCType<Apollo>(), 41 },
|
||||
{ NPCType<EidolonWyrmHeadHuge>(), 42 }
|
||||
};
|
||||
|
||||
bossMinionList = new List<int>()
|
||||
{
|
||||
NPCType<DesertNuisanceHead>(),
|
||||
@@ -2998,6 +3059,9 @@ namespace CalamityMod
|
||||
pierceResistList = null;
|
||||
pierceResistExceptionList = null;
|
||||
|
||||
bossTypes?.Clear();
|
||||
bossTypes = null;
|
||||
|
||||
legOverrideList = null;
|
||||
|
||||
kamiDebuffColorImmuneList = null;
|
||||
|
||||
+1
-1
@@ -400,5 +400,5 @@ namespace CalamityMod
|
||||
// Reforge syncs
|
||||
ItemTypeLastReforgedSync, // TODO -- there has to be a better way to do this, but I don't know what it is
|
||||
ReforgeTierSafetySync
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,7 +172,9 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drops for Aquatic Scourge
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<SeasSearing>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -319,7 +319,9 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Astrum Aureus
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<LeonidProgenitor>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -229,7 +229,9 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
otherWormHead.checkDead();
|
||||
otherWormHead.netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
|
||||
@@ -146,7 +146,9 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Brimstone Elemental
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Hellborn>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -407,7 +407,9 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Dragonfolly
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Swordsplosion>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -151,7 +151,9 @@ namespace CalamityMod.NPCs.Calamitas
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Cal Clone
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Regenator>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -5095,6 +5095,26 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Speedrun Display
|
||||
public static void SetNewBossJustDowned(NPC npc)
|
||||
{
|
||||
if (!GetDownedBossVariable(npc.type))
|
||||
{
|
||||
CalamityLists.bossTypes.TryGetValue(npc.type, out int newBossTypeJustDowned);
|
||||
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (!player.active)
|
||||
continue;
|
||||
|
||||
player.Calamity().bossTypeJustDowned = newBossTypeJustDowned;
|
||||
player.Calamity().bossTypeJustDownedTime = player.Calamity().speedrunTimer;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Player Counts
|
||||
public static bool AnyLivingPlayers()
|
||||
{
|
||||
|
||||
@@ -96,6 +96,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeKingSlime>(), true, !NPC.downedSlimeKing);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Dryad }, NPC.downedSlimeKing);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
}
|
||||
else if (npc.type == NPCID.EyeofCthulhu)
|
||||
{
|
||||
@@ -105,6 +106,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeEyeofCthulhu>(), true, !NPC.downedBoss1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad }, NPC.downedBoss1);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
}
|
||||
else if ((npc.boss && (npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsBody || npc.type == NPCID.EaterofWorldsTail)) || npc.type == NPCID.BrainofCthulhu)
|
||||
{
|
||||
@@ -113,6 +115,7 @@ namespace CalamityMod.NPCs
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeCrimson>(), true, WorldGen.crimson && !NPC.downedBoss2);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeBrainofCthulhu>(), true, WorldGen.crimson && !NPC.downedBoss2);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.ArmsDealer, NPCID.Dryad }, NPC.downedBoss2);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
}
|
||||
else if (npc.type == NPCID.QueenBee)
|
||||
{
|
||||
@@ -137,6 +140,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeQueenBee>(), true, !NPC.downedQueenBee);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.ArmsDealer, NPCID.Dryad }, NPC.downedQueenBee);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
}
|
||||
else if (npc.type == NPCID.SkeletronHead)
|
||||
{
|
||||
@@ -147,6 +151,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeSkeletron>(), true, !NPC.downedBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad }, NPC.downedBoss3);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
}
|
||||
else if (npc.type == NPCID.WallofFlesh)
|
||||
{
|
||||
@@ -193,6 +198,7 @@ namespace CalamityMod.NPCs
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeUnderworld>(), true, !Main.hardMode);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeWallofFlesh>(), true, !Main.hardMode);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.ArmsDealer, NPCID.Dryad, NPCID.Painter, NPCID.WitchDoctor, NPCID.Stylist, NPCID.DyeTrader, NPCID.Demolitionist, NPCID.PartyGirl, NPCID.Clothier, NPCID.SkeletonMerchant, ModContent.NPCType<THIEF>() }, Main.hardMode);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
// First kill text (this is not a loot function)
|
||||
if (!Main.hardMode)
|
||||
@@ -231,6 +237,7 @@ namespace CalamityMod.NPCs
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, !NPC.downedMechBoss1 || NPC.downedMechBoss2 || !NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss2 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
if (!NPC.downedMechBoss2 && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
SpawnMechBossHardmodeOres();
|
||||
@@ -251,6 +258,7 @@ namespace CalamityMod.NPCs
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss1 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
if (!NPC.downedMechBoss1 && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
SpawnMechBossHardmodeOres();
|
||||
@@ -272,6 +280,7 @@ namespace CalamityMod.NPCs
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, !NPC.downedMechBoss1 || !NPC.downedMechBoss2 || NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss3 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
if (!NPC.downedMechBoss3 && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
SpawnMechBossHardmodeOres();
|
||||
@@ -308,6 +317,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgePlantera>(), true, !NPC.downedPlantBoss);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.WitchDoctor, NPCID.Truffle, ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedPlantBoss);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
// Spawn Perennial Ore if Plantera has never been killed
|
||||
if (!NPC.downedPlantBoss)
|
||||
@@ -374,6 +384,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeGolem>(), true, !NPC.downedGolemBoss);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.ArmsDealer, NPCID.Cyborg, NPCID.Steampunker, NPCID.Wizard, NPCID.WitchDoctor, NPCID.DD2Bartender, ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedGolemBoss);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
// If Golem has never been killed, send a message about the Plague.
|
||||
if (!NPC.downedGolemBoss)
|
||||
@@ -427,6 +438,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeDukeFishron>(), true, !NPC.downedFishron);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<SEAHOE>() }, NPC.downedFishron || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
}
|
||||
else if (npc.type == NPCID.CultistBoss)
|
||||
{
|
||||
@@ -436,6 +448,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeLunaticCultist>(), true, !NPC.downedAncientCultist);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeBloodMoon>(), true, Main.bloodMoon);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
// Deus text (this is not a loot function)
|
||||
if (!NPC.downedAncientCultist)
|
||||
@@ -482,6 +495,7 @@ namespace CalamityMod.NPCs
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeMoonLord>(), true, !NPC.downedMoonlord);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<THIEF>() }, NPC.downedMoonlord);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Wizard }, NPC.downedMoonlord || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
string key = "Mods.CalamityMod.MoonBossText";
|
||||
Color messageColor = Color.Orange;
|
||||
@@ -1359,6 +1373,6 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -159,6 +159,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
bool fullStrength = !CalamityWorld.downedSentinel1 || CalamityWorld.DoGSecondStageCountdown <= 0;
|
||||
if (fullStrength)
|
||||
{
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Ceaseless Void
|
||||
|
||||
@@ -665,7 +665,9 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Crabulon
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<TheTransformer>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -1089,7 +1089,9 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drops for Cryogen
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<ColdDivinity>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -555,7 +555,9 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Desert Scourge
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<DuneHopper>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -1214,7 +1214,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
// Stop the countdown -- if you kill DoG in less than 60 frames, this will stop another one from spawning.
|
||||
CalamityWorld.DoGSecondStageCountdown = 0;
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drops for DoG
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<CosmicDischarge>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -63,6 +63,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
set => npc.Calamity().newAI[1] = value;
|
||||
}
|
||||
|
||||
// Used for Draedon's text
|
||||
public static readonly Color TextColor = new Color(155, 255, 255);
|
||||
|
||||
// Number of frames on the X and Y axis
|
||||
private const int maxFramesX = 10;
|
||||
private const int maxFramesY = 9;
|
||||
@@ -558,6 +561,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 2
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase2Text1", TextColor);
|
||||
|
||||
// Spawn the fuckers
|
||||
NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType<ThanatosHead>());
|
||||
NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType<AresBody>());
|
||||
@@ -599,6 +605,13 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
chargeLocations[i] = default;
|
||||
|
||||
npc.TargetClosest();
|
||||
|
||||
// Phase 6, when 1 mech goes berserk and the other one leaves
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 6
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase6Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -642,6 +655,16 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
|
||||
// Never be passive if berserk
|
||||
SecondaryAIState = (float)SecondaryPhase.Nothing;
|
||||
|
||||
// Phase 4, when 1 mech goes berserk and the other 2 leave
|
||||
if (exoWormAlive && exoPrimeAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 4
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase4Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -667,6 +690,16 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
chargeLocations[i] = default;
|
||||
|
||||
npc.TargetClosest();
|
||||
|
||||
// Phase 3, when all 3 mechs attack at the same time
|
||||
if (exoWormAlive && exoPrimeAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 3
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase3Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (berserk)
|
||||
@@ -1382,19 +1415,30 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
public override void NPCLoot()
|
||||
{
|
||||
// Check if the other exo mechs are alive
|
||||
bool otherExoMechsAlive = false;
|
||||
bool exoWormAlive = false;
|
||||
bool exoPrimeAlive = false;
|
||||
if (CalamityGlobalNPC.draedonExoMechWorm != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.draedonExoMechWorm].active)
|
||||
otherExoMechsAlive = true;
|
||||
exoWormAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.draedonExoMechPrime != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active)
|
||||
otherExoMechsAlive = true;
|
||||
exoPrimeAlive = true;
|
||||
}
|
||||
|
||||
if (!otherExoMechsAlive)
|
||||
// Phase 5, when 1 mech dies and the other 2 return to fight
|
||||
if (exoWormAlive && exoPrimeAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 5
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase5Text1", TextColor);
|
||||
}
|
||||
}
|
||||
|
||||
if (!exoWormAlive && !exoPrimeAlive)
|
||||
AresBody.DropExoMechLoot(npc, (int)AresBody.MechType.ArtemisAndApollo);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
set => npc.localAI[1] = value;
|
||||
}
|
||||
|
||||
// Used for Draedon's text
|
||||
public static readonly Color TextColor = new Color(155, 255, 255);
|
||||
|
||||
public ThanatosSmokeParticleSet SmokeDrawer = new ThanatosSmokeParticleSet(-1, 3, 0f, 16f, 1.5f);
|
||||
|
||||
// Spawn rate for enrage steam
|
||||
@@ -454,6 +457,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 2
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase2Text1", TextColor);
|
||||
|
||||
// Spawn the fuckers
|
||||
NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType<ThanatosHead>());
|
||||
NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType<Artemis.Artemis>());
|
||||
@@ -480,6 +486,13 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
// Reset everything
|
||||
SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune;
|
||||
npc.TargetClosest();
|
||||
|
||||
// Phase 6, when 1 mech goes berserk and the other one leaves
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 6
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase6Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,6 +517,16 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
|
||||
// Never be passive if berserk
|
||||
SecondaryAIState = (float)SecondaryPhase.Nothing;
|
||||
|
||||
// Phase 4, when 1 mech goes berserk and the other 2 leave
|
||||
if (exoWormAlive && exoTwinsAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 4
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase4Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -518,6 +541,16 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
// Return to normal phases if one or more mechs have been downed
|
||||
SecondaryAIState = totalOtherExoMechLifeRatio > 5f ? (float)SecondaryPhase.Nothing : (float)SecondaryPhase.Passive;
|
||||
npc.TargetClosest();
|
||||
|
||||
// Phase 3, when all 3 mechs attack at the same time
|
||||
if (exoWormAlive && exoTwinsAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 3
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase3Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (berserk)
|
||||
@@ -798,20 +831,31 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
public override void NPCLoot()
|
||||
{
|
||||
// Check if the other exo mechs are alive
|
||||
bool otherExoMechsAlive = false;
|
||||
bool exoWormAlive = false;
|
||||
bool exoTwinsAlive = false;
|
||||
if (CalamityGlobalNPC.draedonExoMechWorm != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.draedonExoMechWorm].active)
|
||||
otherExoMechsAlive = true;
|
||||
exoWormAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active)
|
||||
otherExoMechsAlive = true;
|
||||
exoTwinsAlive = true;
|
||||
}
|
||||
|
||||
// Phase 5, when 1 mech dies and the other 2 return to fight
|
||||
if (exoWormAlive && exoTwinsAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 5
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase5Text1", TextColor);
|
||||
}
|
||||
}
|
||||
|
||||
// Mark Exo Mechs as dead
|
||||
if (!otherExoMechsAlive)
|
||||
if (!exoWormAlive && !exoTwinsAlive)
|
||||
DropExoMechLoot(npc, (int)MechType.Ares);
|
||||
}
|
||||
|
||||
@@ -854,6 +898,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
break;
|
||||
}
|
||||
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// All other drops are contained in the bag, so they only drop directly on Normal
|
||||
|
||||
@@ -60,6 +60,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
set => npc.Calamity().newAI[1] = value;
|
||||
}
|
||||
|
||||
// Used for Draedon's text
|
||||
public static readonly Color TextColor = new Color(155, 255, 255);
|
||||
|
||||
public ThanatosSmokeParticleSet SmokeDrawer = new ThanatosSmokeParticleSet(-1, 3, 0f, 16f, 1.5f);
|
||||
|
||||
// Timer to prevent Thanatos from dealing contact damage for a bit
|
||||
@@ -501,6 +504,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 2
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase2Text1", TextColor);
|
||||
|
||||
// Spawn the fuckers
|
||||
NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType<AresBody>());
|
||||
NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType<Artemis.Artemis>());
|
||||
@@ -537,6 +543,13 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
calamityGlobalNPC.newAI[3] = 0f;
|
||||
chargeVelocityScalar = 0f;
|
||||
npc.TargetClosest();
|
||||
|
||||
// Phase 6, when 1 mech goes berserk and the other one leaves
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 6
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase6Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,6 +588,16 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
|
||||
// Never be passive if berserk
|
||||
SecondaryAIState = (float)SecondaryPhase.Nothing;
|
||||
|
||||
// Phase 4, when 1 mech goes berserk and the other 2 leave
|
||||
if (exoTwinsAlive && exoPrimeAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 4
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase4Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -597,6 +620,16 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
calamityGlobalNPC.newAI[3] = 0f;
|
||||
chargeVelocityScalar = 0f;
|
||||
npc.TargetClosest();
|
||||
|
||||
// Phase 3, when all 3 mechs attack at the same time
|
||||
if (exoPrimeAlive && exoTwinsAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 3
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase3Text1", TextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (berserk)
|
||||
@@ -1067,19 +1100,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
public override void NPCLoot()
|
||||
{
|
||||
// Check if the other exo mechs are alive
|
||||
bool otherExoMechsAlive = false;
|
||||
bool exoTwinsAlive = false;
|
||||
bool exoPrimeAlive = false;
|
||||
if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active)
|
||||
otherExoMechsAlive = true;
|
||||
exoTwinsAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.draedonExoMechPrime != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active)
|
||||
otherExoMechsAlive = true;
|
||||
exoPrimeAlive = true;
|
||||
}
|
||||
|
||||
if (!otherExoMechsAlive)
|
||||
// Phase 5, when 1 mech dies and the other 2 return to fight
|
||||
if (exoTwinsAlive && exoPrimeAlive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Draedon text for the start of phase 5
|
||||
//CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonExoPhase5Text1", TextColor);
|
||||
}
|
||||
}
|
||||
|
||||
if (!exoTwinsAlive && !exoPrimeAlive)
|
||||
AresBody.DropExoMechLoot(npc, (int)AresBody.MechType.Thanatos);
|
||||
}
|
||||
|
||||
|
||||
@@ -759,7 +759,9 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Evil boss tier 2
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Carnage>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -726,7 +726,9 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
// This loot code is shared with Anahita.
|
||||
public static void DropSirenLeviLoot(NPC npc)
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Leviathan and Anahita
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<TheCommunity>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -370,7 +370,9 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Old Duke
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<TheReaper>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -450,7 +450,9 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Evil boss tier 2
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Carnage>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -1215,7 +1215,9 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for PBG
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Malachite>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -975,7 +975,9 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Polterghast
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<PearlGod>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -435,8 +435,10 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
// Profaned Guardians have no actual drops and no treasure bag
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<ProfanedGuardianMask>(), 7);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
// Profaned Guardians have no actual drops and no treasure bag
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<ProfanedGuardianMask>(), 7);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<ProfanedGuardianTrophy>(), 10);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<RelicOfDeliverance>(), 4);
|
||||
DropHelper.DropItem(npc, ModContent.ItemType<ProfanedCoreUnlimited>());
|
||||
|
||||
@@ -1339,7 +1339,9 @@ namespace CalamityMod.NPCs.Providence
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Providence
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<PristineFury>(), true, CalamityWorld.malice || !hasTakenDaytimeDamage);
|
||||
|
||||
@@ -701,7 +701,9 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Ravager
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Vesuvius>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -765,6 +765,8 @@ namespace CalamityMod.NPCs.Signus
|
||||
bool fullStrength = !CalamityWorld.downedSentinel3 || CalamityWorld.DoGSecondStageCountdown <= 0;
|
||||
if (fullStrength)
|
||||
{
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Signus
|
||||
|
||||
@@ -657,7 +657,9 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
// This loot code is shared with every other Slime God component.
|
||||
public static void DropSlimeGodLoot(NPC npc)
|
||||
{
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<SlimeGodTrophy>(), 10);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeSlimeGod>(), true, !CalamityWorld.downedSlimeGod);
|
||||
|
||||
@@ -687,6 +687,8 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
bool fullStrength = !CalamityWorld.downedSentinel2 || CalamityWorld.DoGSecondStageCountdown <= 0;
|
||||
if (fullStrength)
|
||||
{
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for Storm Weaver
|
||||
|
||||
@@ -2734,7 +2734,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
Dust.QuickDustLine(npc.Center, initialRitualPosition, 500f, Color.Red);
|
||||
npc.Center = initialRitualPosition;
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
// Legendary drop for SCal
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<GaelsGreatsword>(), true, CalamityWorld.malice);
|
||||
|
||||
@@ -2876,6 +2876,8 @@ namespace CalamityMod.NPCs.Yharon
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<THIEF>() }, CalamityWorld.downedYharon);
|
||||
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(npc);
|
||||
|
||||
// Bags occur in either phase 1 or 2, as they don't contain phase 2 only drops
|
||||
DropHelper.DropBags(npc);
|
||||
|
||||
|
||||
@@ -666,7 +666,7 @@ namespace CalamityMod.World
|
||||
Reforges = reader.ReadInt32();
|
||||
MoneyStolenByBandit = reader.ReadInt32();
|
||||
|
||||
if (loadVersion == 0)
|
||||
if (loadVersion == 0)
|
||||
{
|
||||
BitsByte flags = reader.ReadByte();
|
||||
downedDesertScourge = flags[0];
|
||||
@@ -1046,7 +1046,7 @@ namespace CalamityMod.World
|
||||
acidRainPoints = reader.ReadInt32();
|
||||
Reforges = reader.ReadInt32();
|
||||
MoneyStolenByBandit = reader.ReadInt32();
|
||||
DraedonSummonCountdown = reader.ReadInt32();
|
||||
DraedonSummonCountdown = reader.ReadInt32();
|
||||
DraedonMechToSummon = (ExoMech)reader.ReadInt32();
|
||||
DraedonSummonPosition = reader.ReadVector2();
|
||||
SunkenSeaLabCenter = reader.ReadVector2();
|
||||
|
||||
Reference in new issue
Block a user