This commit is contained in:
Andrew Marheine committed 2020-02-22 02:57:29 -06:00
commit 530144148f
79 files changed
+279 -117

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 576 B

+2
View File
@@ -103,6 +103,8 @@ namespace CalamityMod.CalPlayer
public int abyssLifeLostAtZeroBreathStat = 0;
public int abyssDefenseLossStat = 0;
public int stealthStat = 0;
public float standingRegenStat = 0f;
public float movingRegenStat = 0f;
// Timer and Counter
public int bossRushImmunityFrameCurseTimer = 0;
+10 -2
View File
@@ -88,7 +88,7 @@ namespace CalamityMod.CalPlayer
EnduranceReductions(player, modPlayer);
// Stat Meter
StatMeter(player, modPlayer);
UpdateStatMeter(player, modPlayer);
// Rogue Mirrors
RogueMirrors(player, modPlayer);
@@ -3315,7 +3315,7 @@ namespace CalamityMod.CalPlayer
#endregion
#region Stat Meter
private static void StatMeter(Player player, CalamityPlayer modPlayer)
private static void UpdateStatMeter(Player player, CalamityPlayer modPlayer)
{
float allDamageStat = player.allDamage - 1f;
modPlayer.damageStats[0] = (int)((player.meleeDamage + allDamageStat - 1f) * 100f);
@@ -3341,7 +3341,15 @@ namespace CalamityMod.CalPlayer
modPlayer.meleeSpeedStat = (int)((1f - player.meleeSpeed) * (100f / player.meleeSpeed));
modPlayer.manaCostStat = (int)(player.manaCost * 100f);
modPlayer.rogueVelocityStat = (int)((modPlayer.throwingVelocity - 1f) * 100f);
// Max stealth 1f is actually "100 stealth", so multiply by 100 to get visual stealth number.
modPlayer.stealthStat = (int)(modPlayer.rogueStealthMax * 100f);
// Then divide by 3, because it takes 3 seconds to regen full stealth.
// Divide by 3 again for moving, because it recharges at 1/3 speed (so divide by 9 overall).
// Then multiply by stealthGen variables, which start at 1f and increase proportionally to your boosts.
modPlayer.standingRegenStat = (modPlayer.rogueStealthMax * 100f / 3f) * modPlayer.stealthGenStandstill;
modPlayer.movingRegenStat = (modPlayer.rogueStealthMax * 100f / 9f) * modPlayer.stealthGenMoving * modPlayer.stealthAcceleration;
modPlayer.minionSlotStat = player.maxMinions;
modPlayer.manaRegenStat = player.manaRegen;
modPlayer.armorPenetrationStat = player.armorPenetration;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 1.1 KiB

+28 -20
View File
@@ -1,11 +1,10 @@
using CalamityMod.CalPlayer;
using CalamityMod.World;
using System;
using System.Collections.Generic;
using System.Text;
using Terraria;
using Terraria.ModLoader;
using Terraria.ModLoader.Config;
using CalamityMod;
using System.Text;
namespace CalamityMod.Items.Accessories
{
@@ -14,8 +13,7 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Stat Meter");
Tooltip.SetDefault("Displays info about most of your stats\n" +
"Offensive stats displayed vary with held item");
Tooltip.SetDefault("Displays almost all player stats");
}
public override void SetDefaults()
@@ -34,12 +32,18 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
Item heldItem = null;
if (player.selectedItem >= 0 && player.selectedItem < player.inventory.Length)
if (player.selectedItem >= 0 && player.selectedItem < Main.maxInventory)
heldItem = player.inventory[player.selectedItem];
foreach (TooltipLine line2 in list)
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
line2.text = CreateStatMeterTooltip(player, modPlayer, heldItem);
// Replace the vanilla tooltip with a full stat readout
foreach (TooltipLine l in list)
{
if (l.mod == "Terraria" && l.Name == "Tooltip0")
l.text = CreateStatMeterTooltip(player, modPlayer, heldItem);
}
// To save screen space, favorited tooltips do not exist for the Stat Meter
list.RemoveAll(l => l.mod == "Terraria" && (l.Name == "Favorite" || l.Name == "FavoriteDesc"));
}
private string CreateStatMeterTooltip(Player player, CalamityPlayer modPlayer, Item heldItem)
@@ -53,6 +57,9 @@ namespace CalamityMod.Items.Accessories
int ammoConsumption = modPlayer.ammoReductionRanged;
int rogueConsumption = modPlayer.ammoReductionRogue;
int rogueStealth = modPlayer.stealthStat;
// Format the stealth regen statistics to be accurate to 2 decimal places.
string standingRegen = modPlayer.standingRegenStat.ToString("n2");
string movingRegen = modPlayer.movingRegenStat.ToString("n2");
int lifeRegen = modPlayer.lifeRegenStat;
int manaRegen = modPlayer.manaRegenStat;
int armorPenetration = modPlayer.armorPenetrationStat;
@@ -65,7 +72,7 @@ namespace CalamityMod.Items.Accessories
int defenseLoss = modPlayer.abyssDefenseLossStat;
// The notice about held item mattering is always displayed first.
StringBuilder sb = new StringBuilder("Offensive stats displayed vary with held item\n\n", 1024);
StringBuilder sb = new StringBuilder("Displays almost all player stats\nOffensive stats displayed vary with held item\n\n", 1024);
// Only append rippers stats in Rev+, if rippers are enabled.
if (CalamityWorld.revenge && CalamityMod.CalamityConfig.AdrenalineAndRage)
@@ -76,13 +83,13 @@ namespace CalamityMod.Items.Accessories
}
// Append item stats only if the held item isn't null, and base it off of the item's damage type.
if (heldItem != null)
if (heldItem != null && !heldItem.IsAir)
{
if (heldItem.melee)
{
sb.Append("Melee Damage: ").Append(modPlayer.damageStats[0])
.Append("% | Melee Crit Chance: ").Append(modPlayer.critStats[0])
.Append("%\nMeleeSpeed Boost: ").Append(meleeSpeed).Append("%\n\n");
.Append("%\nMelee Speed Boost: ").Append(meleeSpeed).Append("%\n\n");
}
else if (heldItem.ranged)
{
@@ -95,20 +102,23 @@ namespace CalamityMod.Items.Accessories
sb.Append("Magic Damage: ").Append(modPlayer.damageStats[2])
.Append("% | Magic Crit Chance: ").Append(modPlayer.critStats[2])
.Append("%\nMana Usage: ").Append(manaCost)
.Append("% | Mana Regen").Append(manaRegen).Append("\n\n");
.Append("% | Mana Regen: ").Append(manaRegen).Append("\n\n");
}
else if (heldItem.summon)
{
sb.Append("Minion Damage: ").Append(modPlayer.damageStats[3])
.Append("% | Minion Slots: ").Append(minionSlots).Append("\n\n");
}
else if (heldItem.Calamity().rogue)
else if (heldItem.Calamity()?.rogue ?? false)
{
sb.Append("Rogue Damage: ").Append(modPlayer.damageStats[4])
.Append("% | Rogue Crit Chance: ").Append(modPlayer.critStats[3])
.Append("%\nRogue Velocity Boost: ").Append(rogueVelocity)
.Append("% | Rogue Weapon Consumption Chance: ").Append(rogueConsumption)
.Append("%\nMax Stealth: ").Append(rogueStealth).Append("\n\n");
.Append("%\nMax Stealth: ").Append(rogueStealth)
.Append(" | Standing Regen: ").Append(standingRegen).Append(" / sec")
.Append(" | Moving Regen: ").Append(movingRegen).Append(" / sec")
.Append("\n\n");
}
}
@@ -121,19 +131,17 @@ namespace CalamityMod.Items.Accessories
sb.Append(" | Movement Speed Boost: ").Append(moveSpeed).Append("%\n\n");
sb.Append(CalamityWorld.death ? "Abyss/Cave Light Strength: " : "Abyss Light Strength: ").Append(lightLevel).Append("\n\n");
// Abyss stats always render.
sb.Append("Other Abyss Stats:").Append("\n");
// Abyss stats only render if the player is in the Abyss.
if (modPlayer.ZoneAbyss)
{
sb.Append("Other Abyss Stats:").Append("\n");
sb.Append("Breath Lost Per Tick: ").Append(breathLoss);
sb.Append(" | Breath Loss Rate: ").Append(breathLossRate).Append("\n");
sb.Append("Life Lost Per Tick at Zero Breath: ").Append(lifeLostAtZeroBreath).Append("\n");
sb.Append("Defense Lost: ").Append(defenseLoss);
}
else
{
sb.Append("Only displayed while in the Abyss");
}
sb.Append("Abyss stats only displayed while in the Abyss");
return sb.ToString();
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Armor
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bloodflare Helm");
DisplayName.SetDefault("Bloodflare Imp Mask");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"10% increased rogue damage and critical strike chance, 15% increased movement speed\n" +
"Provides heat protection in Death Mode");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Armor
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bloodflare Helmet");
DisplayName.SetDefault("Bloodflare Wyvern Helm");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"+3 max minions\n" +
"Provides heat protection in Death Mode");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Armor
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bloodflare Horned Mask");
DisplayName.SetDefault("Bloodflare Hydra Hood");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"10% increased magic damage and critical strike chance, +100 max mana, and 17% reduced mana usage\n" +
"Provides heat protection in Death Mode");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Armor
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bloodflare Mask");
DisplayName.SetDefault("Bloodflare Ram Mask");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"10% increased melee damage and critical strike chance\n" +
"Provides heat protection in Death Mode");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

+2 -1
View File
@@ -57,7 +57,8 @@ namespace CalamityMod.Items.Armor
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<Shellfish>()] < 2)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<Shellfish>(), (int)((double)1500 * (player.allDamage + player.minionDamage - 1f)), 0f, Main.myPlayer, 0f, 0f);
int shellfish = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<Shellfish>(), (int)((double)1500 * (player.allDamage + player.minionDamage - 1f)), 0f, Main.myPlayer, 0f, 0f);
Main.projectile[shellfish].Calamity().lineColor = 1;
}
}
player.Calamity().wearingRogueArmor = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 B

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

After

Width:  |  Height:  |  Size: 681 B

+14 -7
View File
@@ -2,6 +2,7 @@
using CalamityMod.Tiles;
using CalamityMod.Tiles.Abyss;
using CalamityMod.Tiles.Ores;
using CalamityMod.Tiles.SunkenSea;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System;
@@ -140,15 +141,21 @@ namespace CalamityMod.Items.Mounts
Tile tile = Framing.GetTileSafely(num824, num825);
if (num828 < (double)num814)
{
if (tile != null && tile.active() && tile.type != (ushort)ModContent.TileType<AbyssGravel>() &&
tile.type != (ushort)ModContent.TileType<Voidstone>() && (tile.type != TileID.Hellstone || Main.hardMode) &&
(tile.type != TileID.LihzahrdBrick || NPC.downedGolemBoss) && (tile.type != TileID.BlueDungeonBrick || NPC.downedBoss3) &&
(tile.type != TileID.GreenDungeonBrick || NPC.downedBoss3) && (tile.type != TileID.PinkDungeonBrick || NPC.downedBoss3) && tile.type != TileID.DemonAltar &&
if (tile != null && tile.active() &&
tile.type != (ushort)ModContent.TileType<AbyssGravel>() &&
tile.type != (ushort)ModContent.TileType<Voidstone>() &&
(tile.type != TileID.Hellstone || Main.hardMode) &&
(tile.type != TileID.LihzahrdBrick || NPC.downedGolemBoss) &&
(tile.type != (TileID.BlueDungeonBrick | TileID.GreenDungeonBrick | TileID.PinkDungeonBrick) || NPC.downedBoss3) &&
tile.type != TileID.DemonAltar &&
(tile.type != (ushort)ModContent.TileType<AstralOre>() || CalamityWorld.downedStarGod) &&
((tile.type != (ushort)ModContent.TileType<Tenebris>() && tile.type != (ushort)ModContent.TileType<PlantyMush>()) || NPC.downedPlantBoss || CalamityWorld.downedCalamitas) &&
(!player.Calamity().ZoneSunkenSea || CalamityWorld.downedDesertScourge) && tile.type != (ushort)ModContent.TileType<ArenaTile>() &&
(tile.type != ((ushort)ModContent.TileType<Tenebris>() | (ushort)ModContent.TileType<PlantyMush>()) || CalamityWorld.downedCalamitas) &&
(tile.type != ((ushort)ModContent.TileType<EutrophicSand>() | (ushort)ModContent.TileType<Navystone>() | (ushort)ModContent.TileType<SeaPrism>() | (ushort)ModContent.TileType<SeaPrismCrystals>()) || CalamityWorld.downedDesertScourge) &&
tile.type != (ushort)ModContent.TileType<ArenaTile>() &&
(Main.tileValue[tile.type] < tileValueLimit || tile.type == TileID.Heart || tile.type == TileID.LifeFruit) &&
!player.noBuilding && tile.type != TileID.ElderCrystalStand && tile.type != TileID.Containers)
!player.noBuilding &&
tile.type != TileID.ElderCrystalStand &&
tile.type != TileID.Containers)
{
WorldGen.KillTile(num824, num825, false, false, false);
if (!Main.tile[num824, num825].active() && Main.netMode != NetmodeID.SinglePlayer)
@@ -0,0 +1,26 @@
using CalamityMod.Tiles;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Banners
{
public class FearlessGoldfishWarriorBanner : ModItem
{
public override void SetDefaults()
{
item.width = 10;
item.height = 24;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.rare = 1;
item.Calamity().customRarity = CalamityRarity.Dedicated;
item.value = Item.buyPrice(0, 0, 10, 0);
item.createTile = ModContent.TileType<MonsterBanner>();
item.placeStyle = 109;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

+1
View File
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Placeables.Banners
item.useStyle = 1;
item.consumable = true;
item.rare = 1;
item.Calamity().customRarity = CalamityRarity.Dedicated;
item.value = Item.buyPrice(0, 0, 10, 0);
item.createTile = ModContent.TileType<MonsterBanner>();
item.placeStyle = 108;
@@ -0,0 +1,25 @@
using CalamityMod.Tiles;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Banners
{
public class RadiatorBanner : ModItem
{
public override void SetDefaults()
{
item.width = 10;
item.height = 24;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.rare = 1;
item.value = Item.buyPrice(0, 0, 10, 0);
item.createTile = ModContent.TileType<MonsterBanner>();
item.placeStyle = 110;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 1000 B

+2 -2
View File
@@ -21,7 +21,8 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 60;
item.width = 74;
item.height = 74;
item.damage = 110;
item.melee = true;
item.useAnimation = 26;
@@ -31,7 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee
item.knockBack = 8f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 60;
item.value = Item.buyPrice(0, 60, 0, 0);
item.rare = 7;
item.shoot = ModContent.ProjectileType<DepthOrb>();
Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 B

After

Width:  |  Height:  |  Size: 1.7 KiB

+4 -3
View File
@@ -10,14 +10,15 @@ namespace CalamityMod.Items.Weapons.Melee
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Depth Blade");
DisplayName.SetDefault("Depth Crusher");
Tooltip.SetDefault("Hitting enemies will inflict the crush depth debuff\n" +
"The lower the enemies' defense, the more damage they take from this debuff");
}
public override void SetDefaults()
{
item.width = 40;
item.width = 56;
item.height = 50;
item.damage = 22;
item.melee = true;
item.useAnimation = 22;
@@ -27,9 +28,9 @@ namespace CalamityMod.Items.Weapons.Melee
item.knockBack = 5.25f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 40;
item.value = Item.buyPrice(0, 2, 0, 0);
item.rare = 2;
item.hammer = 70;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 568 B

+2 -2
View File
@@ -21,7 +21,8 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 80;
item.width = 122;
item.height = 122;
item.damage = 380;
item.melee = true;
item.useAnimation = 22;
@@ -31,7 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee
item.knockBack = 9f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 80;
item.value = Item.buyPrice(1, 40, 0, 0);
item.rare = 10;
item.shoot = ModContent.ProjectileType<NeptuneOrb>();
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

+2 -2
View File
@@ -17,7 +17,8 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 80;
item.width = 90;
item.height = 90;
item.damage = 950;
item.melee = true;
item.useAnimation = 18;
@@ -27,7 +28,6 @@ namespace CalamityMod.Items.Weapons.Melee
item.knockBack = 8f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 80;
item.value = Item.buyPrice(1, 40, 0, 0);
item.rare = 10;
item.shootSpeed = 10f;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+2 -1
View File
@@ -213,7 +213,8 @@ namespace CalamityMod.NPCs.Abyss
public override void NPCLoot()
{
DropHelper.DropItemCondition(npc, ModContent.ItemType<AbyssShocker>(), NPC.downedBoss3, CalamityWorld.defiled ? 20 : Main.expertMode ? 40 : 50, 1, 1);
int abyssShockerChance = CalamityWorld.defiled ? 20 : Main.expertMode ? 40 : 50;
DropHelper.DropItemCondition(npc, ModContent.ItemType<AbyssShocker>(), NPC.downedBoss3, abyssShockerChance, 1, 1);
}
}
}
+3 -4
View File
@@ -1,5 +1,6 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -251,10 +252,8 @@ namespace CalamityMod.NPCs.Abyss
public override void NPCLoot()
{
if (Main.rand.NextBool(25))
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.Flipper);
}
DropHelper.DropItemChance(npc, ModContent.ItemType<DepthBlade>(), Main.expertMode ? 10 : 15);
DropHelper.DropItemChance(npc, ItemID.Flipper, 25);
}
public override void HitEffect(int hitDirection, double damage)
+2 -2
View File
@@ -40,8 +40,8 @@ namespace CalamityMod.NPCs.AcidRain
npc.DeathSound = SoundID.NPCDeath1;
aiType = NPCID.GlowingSnail;
//animationType = NPCID.GlowingSnail;
//banner = npc.type;
//bannerItem = ModContent.ItemType<RadiatorBanner>();
banner = npc.type;
bannerItem = ModContent.ItemType<RadiatorBanner>();
}
public override void AI()
-1
View File
@@ -1418,7 +1418,6 @@ namespace CalamityMod.NPCs
break;
case NPCID.Shark:
DropHelper.DropItemChance(npc, ModContent.ItemType<DepthBlade>(), Main.expertMode ? 10 : 15);
DropHelper.DropItemChance(npc, ItemID.SharkToothNecklace, Main.expertMode ? 20 : 30);
break;
+3 -2
View File
@@ -6,6 +6,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items.Placeables.Banners;
namespace CalamityMod.NPCs.NormalNPCs
{
@@ -30,8 +31,8 @@ namespace CalamityMod.NPCs.NormalNPCs
npc.value = Item.buyPrice(0, 0, 1, 0);
npc.HitSound = SoundID.NPCHit1;
npc.DeathSound = SoundID.NPCDeath1;
//banner = npc.type;
//bannerItem = ModContent.ItemType<Items.OverloadedSoldierBanner>();
banner = npc.type;
bannerItem = ModContent.ItemType<FearlessGoldfishWarriorBanner>();
}
public override void AI()
+4 -1
View File
@@ -37,7 +37,10 @@ namespace CalamityMod.Projectiles.Magic
double angle = (double)Main.rand.Next(360) * Math.PI / 180;
float offsetX = projectile.position.X + (float)Main.rand.Next((int)projectile.width);
float offsetY = projectile.position.Y + (float)Main.rand.Next((int)projectile.height);
Projectile.NewProjectile(offsetX, offsetY, 14 * (float)Math.Cos(angle), 14 * (float)Math.Sin(angle), ModContent.ProjectileType<ApothChloro>(), projectile.damage, projectile.knockBack / 2, Main.myPlayer);
if (projectile.owner == Main.myPlayer)
{
Projectile.NewProjectile(offsetX, offsetY, 14 * (float)Math.Cos(angle), 14 * (float)Math.Sin(angle), ModContent.ProjectileType<ApothChloro>(), projectile.damage, projectile.knockBack / 2, Main.myPlayer);
}
}
if (projectile.timeLeft < 30)
projectile.alpha = projectile.alpha + 6;
+9 -2
View File
@@ -44,11 +44,18 @@ namespace CalamityMod.Projectiles.Magic
double offsetRotation = Math.Atan2(-38, 48) + (double)projectile.rotation;
double offsetX = offsetHyp * Math.Cos(offsetRotation);
double offsetY = offsetHyp * Math.Sin(offsetRotation);
Projectile.NewProjectile(projectile.Center.X + (float)offsetX, projectile.Center.Y + (float)offsetY, projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType<ApothJaws>(), projectile.damage, projectile.knockBack, Main.myPlayer, projectile.rotation, 0f);
if (projectile.owner == Main.myPlayer)
{
Projectile.NewProjectile(projectile.Center.X + (float)offsetX, projectile.Center.Y + (float)offsetY, projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType<ApothJaws>(), projectile.damage, projectile.knockBack, Main.myPlayer, projectile.rotation, 0f);
}
offsetRotation = Math.Atan2(38, 48) + (double)projectile.rotation;
offsetX = offsetHyp * Math.Cos(offsetRotation);
offsetY = offsetHyp * Math.Sin(offsetRotation);
Projectile.NewProjectile(projectile.position.X + projectile.width / 2 + (float)offsetX, projectile.position.Y + projectile.height / 2 + (float)offsetY, projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType<ApothJaws>(), projectile.damage, projectile.knockBack, Main.myPlayer, projectile.rotation, 1f);
if (projectile.owner == Main.myPlayer)
{
Projectile.NewProjectile(projectile.position.X + projectile.width / 2 + (float)offsetX, projectile.position.Y + projectile.height / 2 + (float)offsetY, projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType<ApothJaws>(), projectile.damage, projectile.knockBack, Main.myPlayer, projectile.rotation, 1f);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 B

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

After

Width:  |  Height:  |  Size: 265 B

+1 -1
View File
@@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - MathHelper.ToRadians(90);
projectile.localAI[0] += 1f;
if (projectile.localAI[0] == 15f)
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+2 -1
View File
@@ -114,7 +114,8 @@ namespace CalamityMod.Projectiles.Summon
projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt();
if (flag25)
{
projectile.rotation = (vector46 - projectile.Center).ToRotation() + MathHelper.Pi;
projectile.rotation = (vector46 - projectile.Center).ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.ToRadians(180) * projectile.direction);
projectile.spriteDirection *= -1;
}
else
{
+3 -3
View File
@@ -86,9 +86,9 @@ namespace CalamityMod.Projectiles.Summon
{
projectile.frame = 0;
}
projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2) + Main.player[projectile.owner].gfxOffY - 60f;
if (Main.player[projectile.owner].gravDir == -1f)
projectile.position.X = player.Center.X - (float)(projectile.width / 2);
projectile.position.Y = player.Center.Y - (float)(projectile.height / 2) + player.gfxOffY - 60f;
if (player.gravDir == -1f)
{
projectile.position.Y = projectile.position.Y + 120f;
projectile.rotation = 3.14f;
+12 -1
View File
@@ -100,7 +100,18 @@ namespace CalamityMod.Projectiles.Summon
value68 = Main.projectile[chase].Center;
num1064 = Main.projectile[chase].rotation;
scaleFactor18 = MathHelper.Clamp(Main.projectile[chase].scale, 0f, 50f);
scaleFactor17 = 16f;
// Calculations have a safeguard against division by 0.
float speed = 0f;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && Main.projectile[i].type == ModContent.ProjectileType<MechwormHead>())
{
speed = Main.projectile[i].velocity.Length();
break;
}
}
scaleFactor17 = MechwormHead.ComputeDistance(16f, speed);
Main.projectile[chase].localAI[0] = projectile.localAI[0] + 1f;
}
else
+12 -2
View File
@@ -98,10 +98,20 @@ namespace CalamityMod.Projectiles.Summon
}
}
value68 = Main.projectile[chase].Center;
Vector2 arg_2DE6A_0 = Main.projectile[chase].velocity;
num1064 = Main.projectile[chase].rotation;
scaleFactor18 = MathHelper.Clamp(Main.projectile[chase].scale, 0f, 50f);
scaleFactor17 = 16f;
// Calculations have a safeguard against division by 0.
float speed = 0f;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && Main.projectile[i].type == ModContent.ProjectileType<MechwormHead>())
{
speed = Main.projectile[i].velocity.Length();
break;
}
}
scaleFactor17 = MechwormHead.ComputeDistance(16f, speed);
Main.projectile[chase].localAI[0] = projectile.localAI[0] + 1f;
}
else
+13 -1
View File
@@ -41,6 +41,7 @@ namespace CalamityMod.Projectiles.Summon
public override void AI()
{
Main.time = 120 * 120;
Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.15f, 0.01f, 0.15f);
Player player9 = Main.player[projectile.owner];
if (dust > 0)
@@ -220,11 +221,22 @@ namespace CalamityMod.Projectiles.Summon
spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f);
return false;
}
public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
{
Vector2 origin = new Vector2(21f, 25f);
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Summon/MechwormHeadGlow"), projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, origin, 1f, SpriteEffects.None, 0f);
}
/// <summary>
/// Determines the distance factor used in mechworm segments to make it adjust based on components of the head.
/// <para>However, eventually even this equation will falter in use. These conditions should never happen with the mechworm, however.</para>
/// </summary>
/// <param name="initialDistance">The original distance factor.</param>
/// <param name="speed">The speed of the mechworm's head.</param>
/// <param name="base">The base of the exponent used in the equation.</param>
/// <returns></returns>
public static float ComputeDistance(float initialDistance, float speed, float @base = 0.98f)
{
return initialDistance * (float)Math.Pow(@base, speed);
}
}
}
+12 -1
View File
@@ -85,7 +85,18 @@ namespace CalamityMod.Projectiles.Summon
value68 = Main.projectile[byUUID].Center;
num1064 = Main.projectile[byUUID].rotation;
float num1063 = MathHelper.Clamp(Main.projectile[byUUID].scale, 0f, 50f);
scaleFactor17 = 16f;
// Calculations have a safeguard against division by 0.
float speed = 0f;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && Main.projectile[i].type == ModContent.ProjectileType<MechwormHead>())
{
speed = Main.projectile[i].velocity.Length();
break;
}
}
scaleFactor17 = MechwormHead.ComputeDistance(16f, speed);
scaleFactor18 = num1063;
Main.projectile[byUUID].localAI[0] = projectile.localAI[0] + 1f;
if (Main.projectile[byUUID].type != ModContent.ProjectileType<MechwormHead>())
+1
View File
@@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Summon
projectile.penetrate = 1;
projectile.light = 1f;
projectile.timeLeft = 300;
projectile.minion = true;
}
public override void AI()
+3 -4
View File
@@ -239,8 +239,8 @@ namespace CalamityMod.Projectiles.Summon
}
if (num651 > 2000f)
{
projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2);
projectile.position.X = player.Center.X - (float)(projectile.width / 2);
projectile.position.Y = player.Center.Y - (float)(projectile.height / 2);
projectile.netUpdate = true;
}
if (num651 > 70f)
@@ -276,8 +276,7 @@ namespace CalamityMod.Projectiles.Summon
Vector2 value19 = vector46 - projectile.Center;
value19.Normalize();
value19 *= scaleFactor3;
int num659 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, Main.myPlayer, 0f, 0f);
Main.projectile[num659].timeLeft = 300;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, Main.myPlayer, 0f, 0f);
projectile.netUpdate = true;
}
}
+2 -3
View File
@@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles.Summon
projectile.timeLeft = 900;
projectile.ignoreWater = true;
projectile.alpha = 255;
projectile.minion = true;
projectile.penetrate = -1;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 30 -
@@ -132,9 +133,7 @@ namespace CalamityMod.Projectiles.Summon
projectile.localAI[1] += 1f;
if (projectile.localAI[1] == 60f && projectile.owner == Main.myPlayer)
{
int storm = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<SandTornado>(), projectile.damage, 2f, projectile.owner, 1f, 0f);
Main.projectile[storm].minion = true;
Main.projectile[storm].melee = false;
Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<SandTornado>(), projectile.damage, 2f, projectile.owner, 0f, 0f);
}
if (projectile.localAI[1] >= 120f)
{
+46 -31
View File
@@ -1,6 +1,7 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.Summon;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -46,10 +47,11 @@ namespace CalamityMod.Projectiles.Summon
{
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
CalamityGlobalProjectile modProj = projectile.Calamity();
if (spawnDust)
{
projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f);
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
modProj.spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f);
modProj.spawnedPlayerMinionProjectileDamageValue = projectile.damage;
int num501 = 20;
for (int num502 = 0; num502 < num501; num502++)
{
@@ -84,18 +86,16 @@ namespace CalamityMod.Projectiles.Summon
}
if (projectile.ai[0] == 0f)
{
projectile.damage = 70;
//lineColor == 1 means it is spawned from Mollusk Armor rather than the weapon
projectile.damage = (int)((modProj.lineColor == 1 ? 1500f : 70f) * (player.allDamage + player.minionDamage - 1f));
if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue)
{
int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue /
projectile.Calamity().spawnedPlayerMinionDamageValue *
int damage2 = (int)((float)modProj.spawnedPlayerMinionProjectileDamageValue /
modProj.spawnedPlayerMinionDamageValue *
(player.allDamage + player.minionDamage - 1f));
projectile.damage = damage2;
}
float[] var0 = projectile.ai;
int var1 = 1;
float num73 = var0[var1];
var0[var1] = num73 + 1f;
projectile.ai[1] += 1f;
Vector2 vector46 = projectile.position;
if (!fly)
{
@@ -125,21 +125,39 @@ namespace CalamityMod.Projectiles.Summon
float num633 = 1000f;
bool chaseNPC = false;
float npcPositionX = 0f;
for (int num645 = 0; num645 < 200; num645++)
{
NPC npcTarget = Main.npc[num645];
if (npcTarget.CanBeChasedBy(projectile, false))
{
float num646 = Vector2.Distance(npcTarget.Center, projectile.Center);
if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !chaseNPC)
{
num633 = num646;
vector46 = npcTarget.Center;
npcPositionX = npcTarget.position.X;
chaseNPC = true;
}
}
}
if (player.HasMinionAttackTargetNPC)
{
NPC npc = Main.npc[player.MinionAttackTargetNPC];
if (npc.CanBeChasedBy(projectile, false))
{
float num646 = Vector2.Distance(npc.Center, projectile.Center);
if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !chaseNPC)
{
num633 = num646;
vector46 = npc.Center;
npcPositionX = npc.position.X;
chaseNPC = true;
}
}
}
else
{
for (int num645 = 0; num645 < 200; num645++)
{
NPC npcTarget = Main.npc[num645];
if (npcTarget.CanBeChasedBy(projectile, false))
{
float num646 = Vector2.Distance(npcTarget.Center, projectile.Center);
if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !chaseNPC)
{
num633 = num646;
vector46 = npcTarget.Center;
npcPositionX = npcTarget.position.X;
chaseNPC = true;
}
}
}
}
if (chaseNPC)
{
if (npcPositionX - projectile.position.X > 0f)
@@ -295,8 +313,8 @@ namespace CalamityMod.Projectiles.Summon
projectile.rotation = projectile.velocity.X * 0.03f;
if (playerDistance > 1500f)
{
projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2);
projectile.position.X = player.Center.X - (float)(projectile.width / 2);
projectile.position.Y = player.Center.Y - (float)(projectile.height / 2);
projectile.netUpdate = true;
}
if (playerDistance < 100f)
@@ -335,10 +353,7 @@ namespace CalamityMod.Projectiles.Summon
int num988 = 10;
bool flag54 = false;
bool flag55 = false;
float[] var0 = projectile.localAI;
int var1 = 0;
float num73 = var0[var1];
var0[var1] = num73 + 1f;
projectile.localAI[0] += 1f;
if (projectile.localAI[0] % 30f == 0f)
{
flag55 = true;
@@ -418,7 +433,7 @@ namespace CalamityMod.Projectiles.Summon
int num28 = 10;
Point[] array2 = new Point[num28];
int num29 = 0;
for (int l = 0; l < 1000; l++)
for (int l = 0; l < Main.projectile.Length; l++)
{
if (l != projectile.whoAmI && Main.projectile[l].active && Main.projectile[l].owner == Main.myPlayer && Main.projectile[l].type == projectile.type && Main.projectile[l].ai[0] == 1f && Main.projectile[l].ai[1] == (float)i)
{
+12
View File
@@ -363,6 +363,12 @@ namespace CalamityMod.Tiles
case 108:
item = "PiggyBanner";
break;
case 109:
item = "FearlessGoldfishWarriorBanner";
break;
case 110:
item = "RadiatorBanner";
break;
default:
return;
}
@@ -708,6 +714,12 @@ namespace CalamityMod.Tiles
case 108:
type = "Piggy";
break;
case 109:
type = "FearlessGoldfishWarrior";
break;
case 110:
type = "Radiator";
break;
default:
return;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 65 KiB

+15 -13
View File
@@ -1270,8 +1270,10 @@ namespace CalamityMod.World
{
if (Main.rand.NextBool(50000))
{
if (!NPC.downedBoss1 && bossType == 0) // Only set countdown and boss type if conditions are met
if (!Main.dayTime && (player.ZoneOverworldHeight || player.ZoneSkyHeight))
// Only set countdown and boss type if conditions are met
// Night time bosses set message only before 11pm. Day time bosses only before 2pm.
if (!NPC.downedBoss1 && bossType == 0)
if (!Main.dayTime && (player.ZoneOverworldHeight || player.ZoneSkyHeight) && Main.time < 12600)
{
BossText();
bossType = NPCID.EyeofCthulhu;
@@ -1337,7 +1339,7 @@ namespace CalamityMod.World
if (Main.hardMode)
{
if (!NPC.downedMechBoss1 && bossType == 0)
if (!Main.dayTime && (player.ZoneOverworldHeight || player.ZoneSkyHeight))
if (!Main.dayTime && (player.ZoneOverworldHeight || player.ZoneSkyHeight) && Main.time < 12600)
{
BossText();
bossType = NPCID.TheDestroyer;
@@ -1345,7 +1347,7 @@ namespace CalamityMod.World
}
if (!NPC.downedMechBoss2 && bossType == 0)
if (!Main.dayTime && (player.ZoneOverworldHeight || player.ZoneSkyHeight))
if (!Main.dayTime && (player.ZoneOverworldHeight || player.ZoneSkyHeight) && Main.time < 12600)
{
BossText();
bossType = NPCID.Spazmatism;
@@ -1353,7 +1355,7 @@ namespace CalamityMod.World
}
if (!NPC.downedMechBoss3 && bossType == 0)
if (!Main.dayTime && (player.ZoneOverworldHeight || player.ZoneSkyHeight))
if (!Main.dayTime && (player.ZoneOverworldHeight || player.ZoneSkyHeight) && Main.time < 12600)
{
BossText();
bossType = NPCID.SkeletronPrime;
@@ -1385,7 +1387,7 @@ namespace CalamityMod.World
}
if (!downedCalamitas && bossType == 0)
if (!Main.dayTime && player.ZoneOverworldHeight)
if (!Main.dayTime && player.ZoneOverworldHeight && Main.time < 12600)
{
BossText();
bossType = ModContent.NPCType<Calamitas>();
@@ -1413,7 +1415,7 @@ namespace CalamityMod.World
{
if (!downedGuardians && bossType == 0)
if (Main.dayTime && (player.ZoneUnderworldHeight ||
(player.ZoneHoly && player.ZoneOverworldHeight)))
(player.ZoneHoly && player.ZoneOverworldHeight)) && Main.time < 34200) //only before 2pm
{
BossText();
bossType = ModContent.NPCType<ProfanedGuardianBoss>();
@@ -1462,7 +1464,7 @@ namespace CalamityMod.World
switch (bossType)
{
case NPCID.EyeofCthulhu:
if (Main.dayTime || (!player.ZoneOverworldHeight && !player.ZoneSkyHeight))
if (Main.dayTime || (!player.ZoneOverworldHeight && !player.ZoneSkyHeight) || Main.time > 16200)
canSpawn = false;
break;
case NPCID.EaterofWorldsHead:
@@ -1478,15 +1480,15 @@ namespace CalamityMod.World
canSpawn = false;
break;
case NPCID.TheDestroyer:
if (Main.dayTime || (!player.ZoneOverworldHeight && !player.ZoneSkyHeight))
if (Main.dayTime || (!player.ZoneOverworldHeight && !player.ZoneSkyHeight) || Main.time > 16200)
canSpawn = false;
break;
case NPCID.Spazmatism:
if (Main.dayTime || (!player.ZoneOverworldHeight && !player.ZoneSkyHeight))
if (Main.dayTime || (!player.ZoneOverworldHeight && !player.ZoneSkyHeight) || Main.time > 16200)
canSpawn = false;
break;
case NPCID.SkeletronPrime:
if (Main.dayTime || (!player.ZoneOverworldHeight && !player.ZoneSkyHeight))
if (Main.dayTime || (!player.ZoneOverworldHeight && !player.ZoneSkyHeight) || Main.time > 16200)
canSpawn = false;
break;
case NPCID.Plantera:
@@ -1526,7 +1528,7 @@ namespace CalamityMod.World
}
else if (bossType == ModContent.NPCType<Calamitas>())
{
if (Main.dayTime || !player.ZoneOverworldHeight)
if (Main.dayTime || !player.ZoneOverworldHeight || Main.time > 16200)
canSpawn = false;
}
else if (bossType == ModContent.NPCType<AstrumAureus>())
@@ -1543,7 +1545,7 @@ namespace CalamityMod.World
else if (bossType == ModContent.NPCType<ProfanedGuardianBoss>())
{
if (!Main.dayTime || (!player.ZoneUnderworldHeight &&
(!player.ZoneHoly || !player.ZoneOverworldHeight)))
(!player.ZoneHoly || !player.ZoneOverworldHeight)) || Main.time > 37800)
canSpawn = false;
}
else if (bossType == ModContent.NPCType<Bumblefuck>())