Files
CalamityModPublic/Items/Accessories/CheatTestThing.cs
T
Ozzatron c7116a17eb 1 - Removed ItemSpecific rarity, it was useless.
2 - Removed int wrapper for CalamityRarity enum.
3 - Fixed a mistake in The Pack code, it wasn't labeled as a donor item.
2021-01-31 18:03:07 -05:00

39 lines
1.2 KiB
C#

using CalamityMod.CalPlayer;
using Terraria;
using Terraria.DataStructures;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class CheatTestThing : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("lul");
}
public override void SetDefaults()
{
item.width = 26;
item.height = 26;
item.value = 0; // lul intentionally has zero value
item.Calamity().customRarity = CalamityRarity.HotPink;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
bool canUse = (player.name == "Fabsol" || player.name == "Totalbiscuit" || player.name == "TotalBiscuit" || player.name == "Total Biscuit" || player.name == "Total biscuit") && player.townNPCs <= 1;
if (canUse)
{
modPlayer.lol = true;
}
else if (!player.immune)
{
player.KillMe(PlayerDeathReason.ByCustomReason(player.name + " isn't worthy."), 1000.0, 0, false);
}
}
}
}