Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Terraria;
- using System;
- using Microsoft.Xna.Framework;
- using Terraria.ID;
- using Terraria.ModLoader;
- namespace reclaimermod.Items.Weapons.Magic
- {
- public class MoonFracture : ModItem
- {
- public override void SetStaticDefaults()
- {
- DisplayName.SetDefault("Moon Fracture");
- Tooltip.SetDefault("The Moon falls beneath this weapon.");
- Item.staff[item.type] = true;
- }
- public override void SetDefaults()
- {
- item.damage = 145;
- item.magic = true;
- item.mana = 3;
- item.useAnimation = 3;
- item.useTime = 3;
- item.reuseDelay = item.useAnimation;
- item.useStyle = 5;
- item.noMelee = true;
- item.crit = 12;
- item.knockBack = 4;
- item.useTurn = false;
- item.value = Terraria.Item.sellPrice(0, 50, 0, 0);
- item.rare = 10;
- item.UseSound = SoundID.Item88;
- item.autoReuse = true;
- item.shoot = 645;
- item.shootSpeed = 17f;
- }
- public override void AddRecipes()
- {
- ModRecipe recipe = new ModRecipe(mod);
- recipe.AddIngredient(mod, ("TerraFracture"));
- recipe.AddIngredient(ItemID.LunarBar, 15);
- recipe.AddTile(TileID.LunarCraftingStation);
- recipe.SetResult(this);
- recipe.AddRecipe();
- }
- public override bool Shoot(Player player, ref Vector2 position, ref float velo, ref int shoot, ref int damage, ref float knockBack)
- {
- for (int i = 0; i < 2; i++)
- {
- float f = Main.rand.NextFloat() * ((float)Math.PI * 2f);
- Vector2 vector19 = position + f.ToRotationVector2() * MathHelper.Lerp(20f, 60f, Main.rand.NextFloat());
- Vector2 velo = Main.MouseWorld - vector19;
- velo.Normalize();
- Projectile.NewProjectile(vector19.X, vector19.Y, velo, shoot, damage, knockBack, player.whoAmI, 0f, 0f);
- }
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement