SHARE
TWEET

Untitled

a guest Mar 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using Terraria;
  2. using System;
  3. using Microsoft.Xna.Framework;
  4. using Terraria.ID;
  5. using Terraria.ModLoader;
  6.  
  7. namespace reclaimermod.Items.Weapons.Magic
  8. {
  9.     public class MoonFracture : ModItem
  10.     {
  11.         public override void SetStaticDefaults()
  12.         {
  13.             DisplayName.SetDefault("Moon Fracture");
  14.             Tooltip.SetDefault("The Moon falls beneath this weapon.");
  15.             Item.staff[item.type] = true;
  16.         }
  17.  
  18.  
  19.         public override void SetDefaults()
  20.         {
  21.             item.damage = 145;
  22.             item.magic = true;
  23.             item.mana = 3;
  24.             item.useAnimation = 3;
  25.             item.useTime = 3;
  26.             item.reuseDelay = item.useAnimation;
  27.             item.useStyle = 5;
  28.             item.noMelee = true;
  29.             item.crit = 12;
  30.             item.knockBack = 4;
  31.             item.useTurn = false;
  32.             item.value = Terraria.Item.sellPrice(0, 50, 0, 0);
  33.             item.rare = 10;
  34.             item.UseSound = SoundID.Item88;
  35.             item.autoReuse = true;
  36.             item.shoot = 645;
  37.             item.shootSpeed = 17f;
  38.         }
  39.  
  40.         public override void AddRecipes()
  41.         {
  42.             ModRecipe recipe = new ModRecipe(mod);
  43.             recipe.AddIngredient(mod, ("TerraFracture"));
  44.             recipe.AddIngredient(ItemID.LunarBar, 15);
  45.             recipe.AddTile(TileID.LunarCraftingStation);
  46.             recipe.SetResult(this);
  47.             recipe.AddRecipe();
  48.         }
  49.         public override bool Shoot(Player player, ref Vector2 position, ref float velo, ref int shoot, ref int damage, ref float knockBack)
  50.         {
  51.            
  52.             for (int i = 0; i < 2; i++)
  53.             {
  54.                 float f = Main.rand.NextFloat() * ((float)Math.PI * 2f);
  55.                 Vector2 vector19 = position + f.ToRotationVector2() * MathHelper.Lerp(20f, 60f, Main.rand.NextFloat());
  56.                 Vector2 velo = Main.MouseWorld - vector19;
  57.                 velo.Normalize();
  58.                 Projectile.NewProjectile(vector19.X, vector19.Y, velo, shoot, damage, knockBack, player.whoAmI, 0f, 0f);                
  59.             }
  60.             return false;
  61.            
  62.         }
  63.  
  64.        
  65.     }
  66. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top