Legendary Rev+ GFB introduces the true Murderswarm.

Added GFB drops to Bumblefuck and Guardians.
This commit is contained in:
mountaindrew10 committed 2023-06-07 17:56:41 -05:00
1 parent 4bb740fa64
commit c8b29393ac
3 files changed
+21 -3

No files matched your search

+5
View File
@@ -25,6 +25,8 @@ using Terraria.GameContent.ItemDropRules;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items.Pets;
using CalamityMod.Items.Potions;
namespace CalamityMod.NPCs.Bumblebirb
{
@@ -449,6 +451,9 @@ namespace CalamityMod.NPCs.Bumblebirb
// Relic
npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType<DragonfollyRelic>());
// GFB Omega Healing Potion drop
npcLoot.DefineConditionalDropSet(DropHelper.GFB).Add(ModContent.ItemType<OmegaHealingPotion>(), 1, 50, 100);
// Lore
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDragonfolly, ModContent.ItemType<LoreDragonfolly>(), desc: DropHelper.FirstKillText);
}
+8 -3
View File
@@ -5039,7 +5039,7 @@ namespace CalamityMod.NPCs
}
// Max spawn amount
int maxBirbs = revenge ? 3 : 2;
int maxBirbs = (CalamityWorld.getFixedBoi && CalamityWorld.LegendaryMode && revenge) ? 12 : revenge ? 3 : 2;
// Variable for charging
float chargeDistance = 600f;
@@ -5334,13 +5334,16 @@ namespace CalamityMod.NPCs
float velocity = 8f + (enrageScale - 1f) * 2f;
float scaleFactor17 = velocity + npc.ai[2] + value53.Length() / 120f;
if (CalamityWorld.getFixedBoi && CalamityWorld.LegendaryMode && revenge)
scaleFactor17 *= 2f;
float num1309 = 20f;
value53.Normalize();
value53 *= scaleFactor17;
npc.velocity = (npc.velocity * (num1309 - 1f) + value53) / num1309;
npc.ai[1] += 1f;
if (npc.ai[1] >= 120f || !Collision.CanHit(npc.Center, 1, 1, player.Center, 1, 1))
if (npc.ai[1] >= ((CalamityWorld.getFixedBoi && CalamityWorld.LegendaryMode && revenge) ? 60f : 120f) || !Collision.CanHit(npc.Center, 1, 1, player.Center, 1, 1))
{
npc.TargetClosest();
npc.ai[0] = 0f;
@@ -5516,12 +5519,14 @@ namespace CalamityMod.NPCs
if (Main.netMode != NetmodeID.MultiplayerClient)
{
bool spawnFlag = NPC.CountNPCS(ModContent.NPCType<Bumblefuck2>()) < maxBirbs && (npc.ai[1] == 140f || (revenge && npc.ai[1] == 155f) || npc.ai[1] == 170f);
bool gfbSpawnFlag = CalamityWorld.getFixedBoi && CalamityWorld.LegendaryMode && revenge && (npc.ai[1] == 145f || npc.ai[1] == 150f || npc.ai[1] == 160f || npc.ai[1] == 165f);
bool spawnFlag = NPC.CountNPCS(ModContent.NPCType<Bumblefuck2>()) < maxBirbs && (npc.ai[1] == 140f || (revenge && npc.ai[1] == 155f) || npc.ai[1] == 170f || gfbSpawnFlag);
if (spawnFlag)
{
Vector2 vector7 = npc.Center + (MathHelper.TwoPi * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 50f * (0.6f + Main.rand.NextFloat() * 0.4f);
if (Vector2.Distance(vector7, player.Center) > 150f)
NPC.NewNPC(npc.GetSource_FromAI(), (int)vector7.X, (int)vector7.Y, ModContent.NPCType<Bumblefuck2>(), npc.whoAmI);
npc.netUpdate = true;
}
}
@@ -21,6 +21,7 @@ using CalamityMod.Items.Placeables.Furniture.DevPaintings;
using CalamityMod.Items.Placeables.Furniture.Trophies;
using CalamityMod.Events;
using Terraria.Audio;
using CalamityMod.Items.Materials;
namespace CalamityMod.NPCs.ProfanedGuardians
{
@@ -1166,6 +1167,13 @@ namespace CalamityMod.NPCs.ProfanedGuardians
// Relic
npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType<ProfanedGuardiansRelic>());
// GFB Chicken Nugget and Divine Geode drops
var GFBOnly = npcLoot.DefineConditionalDropSet(DropHelper.GFB);
{
GFBOnly.Add(ItemID.ChickenNugget, 1, 1, 9999);
GFBOnly.Add(ModContent.ItemType<DivineGeode>(), 1, 25, 30);
}
// Lore
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedGuardians, ModContent.ItemType<LoreProfanedGuardians>(), desc: DropHelper.FirstKillText);
}