Commit of decompiled and "updated" code.

This commit is contained in:
Big Duckie
2022-07-03 14:13:26 -06:00
parent 3d34e53842
commit e1441e74a5
731 changed files with 18423 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.DataStructures;
namespace FabusMod.NPCs;
public class ModGlobalNPC : GlobalNPC
{
public override void OnKill(NPC npc)
{
if (npc.type == NPCID.SkeletronPrime && Utils.NextFloat(Main.rand) < 0.1f)
{
Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType<Items.Items.PetSummons.SuspiciousLookingScrew>(), 1, false, 0, false, false);
}
if (npc.type == NPCID.TheDestroyer && Utils.NextFloat(Main.rand) < 0.1f)
{
Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType<Items.Items.PetSummons.SuspiciousLookingScrew>(), 1, false, 0, false, false);
}
if (npc.type == NPCID.Retinazer && Utils.NextFloat(Main.rand) < 0.1f)
{
Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType<Items.Items.PetSummons.SuspiciousLookingScrew>(), 1, false, 0, false, false);
}
if (npc.type == NPCID.Spazmatism && Utils.NextFloat(Main.rand) < 0.1f)
{
Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType<Items.Items.PetSummons.SuspiciousLookingScrew>(), 1, false, 0, false, false);
}
if (npc.type == NPCID.Unicorn && Utils.NextFloat(Main.rand) < 0.3f && Main.expertMode)
{
Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType<Items.Items.CraftingIngredients.RainbowDust>(), Main.rand.Next(1, 5), false, 0, false, false);
}
}
}