2 - Ravager Rock Pillars create gores when killed. 3 - Adjusted Chlorophyte spawn rate and spawn limits to make it a bit more common. 4 - Increased Terra Arrow damage slightly. 5 - Nerfed Vanquisher arrows. 6 - Charred Idol now requires an Adamantite Forge, 3 souls of night (used to be 5) and an Unholy Core. 7 - Cryo Key requires less ice blocks. 8 - Polterghast sticks to a charge location once it finds one and waits 15 frames before charging. 9 - Brimstone Elemental can no longer fire projectiles the moment her cocoon starts again. 10 - Retinazer and Rev+ Skeletron Prime slow down more while using true melee. 11 - DoG resists Dark Spark by 15%. 12 - Skeletron drops bones. 13 - Nerfed Elysian Arrows. 14 - Charred Ore can be mined post-1 mech with mythril or orichalcum pickaxe.
60 lines
1.8 KiB
C#
60 lines
1.8 KiB
C#
using CalamityMod.Events;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.NPCs.Cryogen;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.SummonItems
|
|
{
|
|
public class CryoKey : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Cryo Key");
|
|
Tooltip.SetDefault("Summons Cryogen\n" +
|
|
"The boss enrages outside of the snowy tundra");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 28;
|
|
item.height = 18;
|
|
item.maxStack = 20;
|
|
item.rare = ItemRarityID.Pink;
|
|
item.useAnimation = 45;
|
|
item.useTime = 45;
|
|
item.useStyle = ItemUseStyleID.HoldingUp;
|
|
item.consumable = true;
|
|
}
|
|
|
|
public override bool CanUseItem(Player player)
|
|
{
|
|
return player.ZoneSnow && !NPC.AnyNPCs(ModContent.NPCType<Cryogen>()) && !BossRushEvent.BossRushActive;
|
|
}
|
|
|
|
public override bool UseItem(Player player)
|
|
{
|
|
Main.PlaySound(SoundID.Roar, player.position, 0);
|
|
if (Main.netMode != NetmodeID.MultiplayerClient)
|
|
NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType<Cryogen>());
|
|
else
|
|
NetMessage.SendData(MessageID.SpawnBoss, -1, -1, null, player.whoAmI, ModContent.NPCType<Cryogen>());
|
|
|
|
return true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddRecipeGroup("AnyIceBlock", 25);
|
|
recipe.AddIngredient(ItemID.SoulofNight, 3);
|
|
recipe.AddIngredient(ItemID.SoulofLight, 3);
|
|
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 5);
|
|
recipe.AddTile(TileID.Anvils);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|