Advertisement
Guest User

hastebin being an idiot smh

a guest
Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. using Microsoft.Xna.Framework;
  2. using Terraria;
  3. using Terraria.DataStructures;
  4. using Terraria.ID;
  5. using Terraria.ModLoader;
  6.  
  7. namespace GurrenLaggan.Items
  8. {
  9. public class SpiralPower : ModItem
  10. {
  11. public override void SetStaticDefaults()
  12. {
  13. DisplayName.SetDefault("Spiral Power");
  14. Tooltip.SetDefault("'The Willpower of most life'");
  15. // ticksperframe, frameCount
  16. Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 4));
  17. ItemID.Sets.AnimatesAsSoul[item.type] = true;
  18. ItemID.Sets.ItemIconPulse[item.type] = true;
  19. ItemID.Sets.ItemNoGravity[item.type] = true;
  20. }
  21.  
  22. // TODO -- Velocity Y smaller, post NewItem?
  23. public override void SetDefaults()
  24. {
  25. Item refItem = new Item();
  26. refItem.SetDefaults(ItemID.SoulofSight);
  27. item.width = refItem.width;
  28. item.height = refItem.height;
  29. item.maxStack = 999;
  30. item.value = 1000;
  31. item.rare = 3;
  32. }
  33.  
  34. public override void PostUpdate()
  35. {
  36. Lighting.AddLight(item.Center, Color.WhiteSmoke.ToVector3() * 0.55f * Main.essScale);
  37. }
  38. }
  39.  
  40. public override void NPCLoot(NPC npc)
  41. if (npc.lifeMax > 5 && npc.value > 0f)
  42. {
  43. Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Spiral Power"));
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement