Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.Xna.Framework;
- using Terraria;
- using Terraria.DataStructures;
- using Terraria.ID;
- using Terraria.ModLoader;
- namespace GurrenLaggan.Items
- {
- public class SpiralPower : ModItem
- {
- public override void SetStaticDefaults()
- {
- DisplayName.SetDefault("Spiral Power");
- Tooltip.SetDefault("'The Willpower of most life'");
- // ticksperframe, frameCount
- Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 4));
- ItemID.Sets.AnimatesAsSoul[item.type] = true;
- ItemID.Sets.ItemIconPulse[item.type] = true;
- ItemID.Sets.ItemNoGravity[item.type] = true;
- }
- // TODO -- Velocity Y smaller, post NewItem?
- public override void SetDefaults()
- {
- Item refItem = new Item();
- refItem.SetDefaults(ItemID.SoulofSight);
- item.width = refItem.width;
- item.height = refItem.height;
- item.maxStack = 999;
- item.value = 1000;
- item.rare = 3;
- }
- public override void PostUpdate()
- {
- Lighting.AddLight(item.Center, Color.WhiteSmoke.ToVector3() * 0.55f * Main.essScale);
- }
- }
- public override void NPCLoot(NPC npc)
- if (npc.lifeMax > 5 && npc.value > 0f)
- {
- Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Spiral Power"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement