Files
CalamityModPublic/Items/Tools/ClimateChange/Cosmolight.cs
T
Andrew Marheine 49b36fb579 1 - Boss Zen buff changed to Boss Effects.
2 - Adjusted Hallowed Rune, Spirit Glyph and Phantomic Artifact buffs to be less insane.
3 - Reduced Camper regen.
4 - Boss Effects is now applied by the boss to each player within 6400 units of it.
5 - Angel Treads improve wing flight time by 10% instead of 20%.
6 - Adjusted several tooltips to state that they don't work during boss fights or have reduced effect during boss fights.
7 - Reworked Arbalest, Skullmasher and Pearl God. Skullmasher is not done yet though.
8 - Fixed Golden Eagle spread.
9 - Normality Relocator states that it gives portal gun fall speed for 30 frames after a teleport.
10 - Gael's Greatsword drops from Malice Mode SCal.
11 - Perforator Hive doesn't deal contact damage for 3 seconds after spawning.
2021-04-21 18:57:16 -05:00

66 lines
1.9 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Tools.ClimateChange
{
public class Cosmolight : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Cosmolight");
Tooltip.SetDefault("Changes night to day and vice versa\n" +
"Does not work while a boss is alive");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.rare = ItemRarityID.Pink;
item.useAnimation = 20;
item.useTime = 20;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item60;
item.consumable = false;
}
public override bool CanUseItem(Player player)
{
return !CalamityPlayer.areThereAnyDamnBosses;
}
public override bool UseItem(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Main.time = 0.0;
Main.dayTime = !Main.dayTime;
if (Main.dayTime)
{
if (++Main.moonPhase >= 8)
{
Main.moonPhase = 0;
}
}
CalamityNetcode.SyncWorld();
}
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SoulofLight, 7);
recipe.AddIngredient(ItemID.SoulofNight, 7);
recipe.AddIngredient(ItemID.HellstoneBar, 5);
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>(), 5);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}