Files
CalamityModPublic/Items/SummonItems/ProfanedCore.cs
T
Andrew Marheine 724bf08f4a 1 - Added boss contact damage scaling with boss velocity.
2 - Nightwither added to Calamity Dust enum.
3 - Providence night variant and spawn animation added.
4 - A lot of new grey textures for the Prov night variant.
5 - Removed some useless casts in various files.
6 - Profaned Cores can now be used during nighttime and changed the tooltips to be ambiguous.
7 - Bobbit Worm lunge speed buffed.
8 - Buffed several abyss enemy HP and damage.
9 - Fixed Cuttlefish and some other abyss enemies not properly utilizing abyss stealth mechanics.
10 - Fixed several flying worm enemies that were meant to be passive until attacked that weren't passive at all, most notably the Sea Serpent.
11 - Removed some unnecessary code in several worm NPC files.
12 - Mirage Jellies should teleport more sensibly now.
13 - Edited Providence's AI a lot to account for the new nighttime AI and spawn animation.
14 - Yharon AI completely reworked, mostly phase 1. HAS NOT BEEN TESTED BY ME YET.
15 - Brimstone Monsters spread out speed cut in half.
16 - Rev+ Plantera spawns an extra set of tentacles when below 10% HP, however, her defense only scales up to 99 in this phase, not 9999.
17 - Death Mode ocean sharknadoes and cthulhunadoes no longer spawn sharkrons.
18 - Added new method for Tenebris to spread and Lumenyl/Sea Prism Crystals to spawn, in CalamityWorld.
19 - Added GetLerpValue method from Terraria 1.4 to CalamityUtils, can be removed when necessary.
2020-05-29 08:08:38 -05:00

47 lines
1.5 KiB
C#

using CalamityMod.NPCs.Providence;
using CalamityMod.World;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.SummonItems
{
public class ProfanedCore : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Profaned Core");
Tooltip.SetDefault("The core of the unholy flame\n" +
"Summons Providence\n" +
"Should be used during daytime");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.maxStack = 20;
item.useAnimation = 45;
item.useTime = 45;
item.useStyle = 4;
item.consumable = true;
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override bool CanUseItem(Player player)
{
return !NPC.AnyNPCs(ModContent.NPCType<Providence>()) && (player.ZoneHoly || player.ZoneUnderworldHeight) && CalamityWorld.downedBossAny;
}
public override bool UseItem(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
NPC.NewNPC((int)(player.position.X + Main.rand.Next(-500, 501)), (int)(player.position.Y - 250f), ModContent.NPCType<Providence>(), 0, 0f, 0f, 0f, 0f, 255);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ProvidenceSpawn"), (int)player.position.X, (int)player.position.Y);
}
return true;
}
}
}