1 - Enemy aggro-reducing effects are disabled during singleplayer boss fights.
2 - DoG phase 2 now teleports at the start of final phase to avoid cheap hits, hopefully. 3 - Old Duke Tooth Balls are no longer behind tiles. 4 - Replaced planetoid Queen Bee larvae with Honey Chests.
This commit is contained in:
1 parent
1f05d02751
commit
af26462407
5 files changed
+107
-12
No files matched your search
@@ -3780,6 +3780,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.wingTimeMax < 50000)
|
||||
player.wingTimeMax = 50000;
|
||||
}
|
||||
|
||||
// Do not apply reduced aggro if there are any bosses alive and it's singleplayer
|
||||
if (CalamityPlayer.areThereAnyDamnBosses && Main.netMode == NetmodeID.SinglePlayer)
|
||||
{
|
||||
if (player.aggro < 0)
|
||||
player.aggro = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -228,6 +228,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
if (!halfLife)
|
||||
{
|
||||
Teleport(player);
|
||||
|
||||
string key = "Mods.CalamityMod.EdgyBossText11";
|
||||
Color messageColor = Color.Cyan;
|
||||
if (Main.netMode == NetmodeID.SinglePlayer)
|
||||
|
||||
@@ -42,7 +42,6 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
npc.DeathSound = SoundID.NPCDeath11;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.behindTiles = true;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
|
||||
@@ -229,7 +229,6 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (npc.localAI[1] >= 600f)
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
npc.TargetClosest(true);
|
||||
if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height))
|
||||
{
|
||||
float velocity = CalamityWorld.bossRushActive ? 10f : 7f;
|
||||
@@ -548,7 +547,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.TargetClosest(true);
|
||||
npc.TargetClosest(true);
|
||||
|
||||
// Fall through
|
||||
if (!player.dead && expertMode)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
|
||||
using CalamityMod.Items.Potions;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Generation;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.World.Generation;
|
||||
|
||||
namespace CalamityMod.World.Planets
|
||||
@@ -47,7 +49,7 @@ namespace CalamityMod.World.Planets
|
||||
{
|
||||
int x = _random.Next(origin.X - radius + 3, origin.X + radius - 2);
|
||||
int y = _random.Next(origin.Y - radius + 3, origin.Y + radius - 2);
|
||||
WorldGen.TileRunner(x, y, (double)_random.NextFloat(5f, 9f), _random.Next(5, 15), TileID.Stone);
|
||||
WorldGen.TileRunner(x, y, _random.NextFloat(5f, 9f), _random.Next(5, 15), TileID.Stone);
|
||||
}
|
||||
|
||||
//Place grass, remove wall and occasionally smooth
|
||||
@@ -102,11 +104,11 @@ namespace CalamityMod.World.Planets
|
||||
new Modifiers.Conditions(new CustomConditions.RandomChance(7)),
|
||||
new Actions.SetLiquid(2, 255)
|
||||
}));
|
||||
bool placedSpawner = false;
|
||||
while (!placedSpawner)
|
||||
bool placedChest = false;
|
||||
while (!placedChest)
|
||||
{
|
||||
int testX = origin.X + _random.Next(-(int)radius, (int)radius);
|
||||
int testY = origin.Y + _random.Next(-(int)radius, (int)radius);
|
||||
int testX = origin.X + _random.Next(-radius, radius);
|
||||
int testY = origin.Y + _random.Next(-radius, radius);
|
||||
if (WorldGen.EmptyTileCheck(testX - 1, testX + 1, testY - 1, testY + 1) && _tiles[testX, testY].wall == WallID.HiveUnsafe)
|
||||
{
|
||||
for (int floorX = testX - 1; floorX <= testX + 1; floorX++)
|
||||
@@ -115,9 +117,10 @@ namespace CalamityMod.World.Planets
|
||||
_tiles[floorX, testY + 2].type = TileID.Hive;
|
||||
WorldGen.SquareTileFrame(floorX, testY + 2);
|
||||
}
|
||||
bool placed = WorldGen.PlaceTile(testX, testY + 1, TileID.Larva, true, false);
|
||||
if (placed)
|
||||
placedSpawner = true;
|
||||
//Place chest
|
||||
int chestID = WorldGen.PlaceChest(testX, testY + 1, 21, false, 29);
|
||||
FillHoneyChest(chestID);
|
||||
placedChest = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,5 +273,90 @@ namespace CalamityMod.World.Planets
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------
|
||||
//HONEY CHEST STUFF
|
||||
//---------------------
|
||||
|
||||
private int[] FocusLootHoney = new int[]
|
||||
{
|
||||
ItemID.NaturesGift,
|
||||
ItemID.Bezoar,
|
||||
ItemID.SharpeningStation
|
||||
};
|
||||
|
||||
private int[] PotionLootHoney = new int[]
|
||||
{
|
||||
ItemID.LifeforcePotion,
|
||||
ItemID.RegenerationPotion,
|
||||
ItemID.ManaRegenerationPotion,
|
||||
ItemID.HeartreachPotion,
|
||||
ModContent.ItemType<PhotosynthesisPotion>(),
|
||||
ModContent.ItemType<CadencePotion>()
|
||||
};
|
||||
|
||||
private int[] BarLootHoney = new int[]
|
||||
{
|
||||
WorldGen.SilverTierOre == TileID.Silver ? ItemID.SilverBar : ItemID.TungstenBar,
|
||||
WorldGen.GoldTierOre == TileID.Gold ? ItemID.GoldBar : ItemID.PlatinumBar
|
||||
};
|
||||
|
||||
private void FillHoneyChest(int id)
|
||||
{
|
||||
Chest chest = Main.chest[id];
|
||||
int index = 0;
|
||||
|
||||
//Focus loot
|
||||
chest.item[index++].SetDefaults(_random.Next(FocusLootHoney));
|
||||
|
||||
//Bars
|
||||
if (_random.Next(3) <= 1)
|
||||
{
|
||||
chest.item[index].SetDefaults(_random.Next(BarLootHoney));
|
||||
chest.item[index].SetDefaults(_random.Next(7, 15));
|
||||
}
|
||||
else
|
||||
{
|
||||
chest.item[index].SetDefaults(ItemID.GoldCoin);
|
||||
chest.item[index++].stack = _random.Next(3, 5); // 3 or 4 gold coins
|
||||
}
|
||||
|
||||
//Potion loot
|
||||
if (_random.Next(2) == 0)
|
||||
{
|
||||
chest.item[index].SetDefaults(_random.Next(PotionLootHoney));
|
||||
chest.item[index++].stack = _random.Next(1, 4);
|
||||
}
|
||||
else //Healing potion
|
||||
{
|
||||
chest.item[index].SetDefaults(ItemID.BottledHoney);
|
||||
chest.item[index++].stack = _random.Next(3, 7);
|
||||
}
|
||||
|
||||
//Weaponry
|
||||
if (_random.Next(2) == 0)
|
||||
{
|
||||
chest.item[index].SetDefaults(ItemID.Stinger);
|
||||
chest.item[index++].stack = _random.Next(4, 6);
|
||||
}
|
||||
else
|
||||
{
|
||||
chest.item[index].SetDefaults(ItemID.JungleSpores);
|
||||
chest.item[index++].stack = _random.Next(3, 5);
|
||||
}
|
||||
|
||||
//Recall potion
|
||||
if (_random.Next(2) == 0)
|
||||
{
|
||||
chest.item[index].SetDefaults(ItemID.RecallPotion);
|
||||
chest.item[index++].stack = _random.Next(1, 4);
|
||||
}
|
||||
else //glowsticks
|
||||
{
|
||||
chest.item[index].SetDefaults(ItemID.YellowTorch);
|
||||
chest.item[index++].stack = _random.Next(18, 36);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user