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
@@ -0,0 +1,81 @@
using FabusMod.Projectiles.Shortsword;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Shortswords;
public class CarbonDagger : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Carbon Dagger");
Tooltip.SetDefault("[c/B6FF00:Autoswings, dyeable]\nThrows a medium-ranged Carbon Knife that deals more damage the closer you are to the target \nShortsword hits inflict [c/007700:Poison] debuff for 8 seconds\n[c/FF0000:Shortsword hits steal a small amount of life] \nShortsword hits grant the [c/FC3A3A:Rage] buff for 8 seconds");
}
public override void SetDefaults()
{
Item.damage = 62;
Item.width = 30;
Item.height = 30;
Item.useTime = 11;
Item.useAnimation = 11;
Item.useStyle = ItemUseStyleID.Thrust;
Item.knockBack = 6f;
Item.value = Item.sellPrice(0, 5, 22, 0);
Item.rare = ItemRarityID.LightRed;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<CarbonKnife>();
Item.shootSpeed = 10f;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust2>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
int healingAmount = damage / 18;
player.statLife += healingAmount;
player.HealEffect(healingAmount, true);
target.AddBuff(20, 480, false);
player.AddBuff(115, 480, true);
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 45f;
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
{
position += muzzleOffset;
}
return true;
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<Wakizashi>());
val.AddRecipeGroup("FabusMod:OrichalcumBar", 6);
val.AddIngredient(ItemID.Sapphire, 2);
val.AddTile(TileID.MythrilAnvil);
val.Register();
Recipe val2 = CreateRecipe();
val2.AddIngredient(ModContent.ItemType<CarbonDaggerNihon>());
val2.AddIngredient(ItemID.BlueDye, 1);
val2.AddTile(TileID.DyeVat);
val2.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

@@ -0,0 +1,73 @@
using FabusMod.Projectiles.Shortsword;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Shortswords;
public class CarbonDaggerNihon : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Carbon Dagger - Nihon");
Tooltip.SetDefault("[c/B6FF00:Autoswings]\nThrows a medium-ranged Carbon Knife that deals more damage the closer you are to the target \nShortsword hits inflict [c/007700:Poison] debuff for 8 seconds\n[c/FF0000:Shortsword hits steal a small amount of life] \nShortsword hits grant the [c/FC3A3A:Rage] buff for 8 seconds");
}
public override void SetDefaults()
{
Item.damage = 62;
Item.width = 30;
Item.height = 30;
Item.useTime = 11;
Item.useAnimation = 11;
Item.useStyle = ItemUseStyleID.Thrust;
Item.knockBack = 6f;
Item.value = Item.sellPrice(0, 5, 22, 0);
Item.rare = ItemRarityID.LightRed;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<CarbonKnifeNihon>();
Item.shootSpeed = 10f;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.OniDust>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
int healingAmount = damage / 16;
player.statLife += healingAmount;
player.HealEffect(healingAmount, true);
target.AddBuff(20, 480, false);
player.AddBuff(115, 480, true);
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 45f;
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) {
position += muzzleOffset;
}
return true;
}
public override void AddRecipes()
{
Recipe recipe = Recipe.Create(Type);
recipe.AddIngredient(ModContent.ItemType<CarbonDagger>());
recipe.AddIngredient(ItemID.BlueDye, 1);
recipe.AddTile(TileID.DyeVat);
recipe.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

@@ -0,0 +1,84 @@
using FabusMod.Projectiles.Shortsword;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Shortswords;
public class GoldenDagger : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Golden Dagger");
Tooltip.SetDefault("[c/B6FF00:Autoswings]\nThrows two short-ranged golden knives in any direction, as well as one very fast dagger \nShortsword hits steal a small amount of life, and inflict the [c/007700:Poison] debuff for 10 seconds \nGolden knives do not steal life \nGrants the [c/FC3A3A:Rage] buff for 8 seconds upon hitting an enemy with the Shortsword \nGrants the [c/FC8719:Inferno] buff for 6 seconds upon hitting an enemy with the Shortsword");
}
public override void SetDefaults()
{
Item.damage = 95;
Item.width = 40;
Item.height = 40;
Item.useTime = 12;
Item.useAnimation = 12;
Item.useStyle = ItemUseStyleID.Thrust;
Item.knockBack = 6f;
Item.value = Item.sellPrice(0, 54, 96, 0);
Item.rare = ItemRarityID.Yellow;
Item.shoot = ModContent.ProjectileType<GoldenKnife>();
Item.shootSpeed = 50f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float numberProjectiles = 2f;
float rotation = MathHelper.ToRadians(4f);
position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 6f;
for (int i = 0; i < numberProjectiles; i++)
{
Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f;
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 55f;
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
{
position += muzzleOffset;
}
}
return true;
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
int healingAmount = damage / 17;
player.statLife += healingAmount;
player.HealEffect(healingAmount, true);
target.AddBuff(20, 600, false);
player.AddBuff(115, 480, true);
player.AddBuff(116, 360, true);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<OniDagger>());
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
val.AddTile(TileID.AdamantiteForge);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

@@ -0,0 +1,76 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Shortswords;
public class OniDagger : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Demon's Dagger");
Tooltip.SetDefault("[c/B6FF00:Autoswings]\nThrows a vampire knife that deals more damage the closer you are to the target \nInflicts the [c/007700:Poison] debuff for 10 seconds on hit \n[c/FF0000:Steals a small amount of life] \nGrants the [c/FC3A3A:Rage] buff for 8 seconds upon hitting an enemy \nGrants the [c/FC8719:Inferno] buff for 6 seconds upon hitting an enemy");
}
public override void SetDefaults()
{
Item.damage = 92;
Item.width = 40;
Item.height = 40;
Item.useTime = 11;
Item.useAnimation = 11;
Item.useStyle = ItemUseStyleID.Thrust;
Item.knockBack = 6f;
Item.value = Item.sellPrice(0, 18, 54, 0);
Item.rare = ItemRarityID.Pink;
Item.shoot = ProjectileID.VampireKnife;
Item.shootSpeed = 16f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust3>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
int healingAmount = damage / 18;
player.statLife += healingAmount;
player.HealEffect(healingAmount, true);
target.AddBuff(20, 600, false);
player.AddBuff(115, 480, true);
player.AddBuff(116, 360, true);
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 55f;
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
{
position += muzzleOffset;
}
return true;
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddRecipeGroup("FabusMod:CarbonDagger", 1);
val.AddRecipeGroup("FabusMod:AdamantiteBar", 6);
val.AddIngredient(ItemID.SoulofNight, 4);
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 2);
val.AddTile(TileID.MythrilAnvil);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

@@ -0,0 +1,37 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Shortswords;
public class StonePlatedShortsword : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Stone-Plated Shortsword");
}
public override void SetDefaults()
{
Item.damage = 9;
Item.width = 30;
Item.height = 30;
Item.useTime = 13;
Item.useAnimation = 13;
Item.useStyle = ItemUseStyleID.Thrust;
Item.knockBack = 5f;
Item.value = Item.sellPrice(0, 0, 0, 40);
Item.rare = ItemRarityID.White;
Item.UseSound = SoundID.Item1;
Item.autoReuse = false;
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<Items.WeaponParts.UntreatedShortswordPart>());
val.AddIngredient(ItemID.StoneBlock, 6);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.ReinforcedWorkBench>());
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

@@ -0,0 +1,92 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Shortswords;
public class TheRainbowsCurse : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("The Rainbow's Curse");
Tooltip.SetDefault("[c/B6FF00:Autoswings]\nThrows three medium-ranged rainbow knives in any direction, as well as one very fast dagger \nShortsword hits steal a small amount of life, and inflict the [c/007700:Poison] debuff for 12 seconds\nRainbow knives do not steal life \nGrants the [c/FC3A3A:Rage] buff for 10 seconds, and the [c/FC8719:Inferno] buff for 8 seconds upon hitting an enemy with the Shortsword");
}
public override void SetDefaults()
{
Item.damage = 154;
Item.width = 48;
Item.height = 48;
Item.useTime = 8;
Item.useAnimation = 8;
Item.useStyle = ItemUseStyleID.Thrust;
Item.knockBack = 6f;
Item.value = Item.sellPrice(2, 20, 0, 0);
Item.expert = true;
Item.shoot = ModContent.ProjectileType<Projectiles.Shortsword.RainbowKnife>();
Item.shootSpeed = 65f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust>());
int num2 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust2>());
int num3 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust3>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
Main.dust[num2].scale = 1f;
Main.dust[num2].velocity.Y = 0f;
Main.dust[num2].velocity.X = 0.5f;
Main.dust[num2].noGravity = true;
Main.dust[num3].scale = 1f;
Main.dust[num3].velocity.Y = 0f;
Main.dust[num3].velocity.X = 0.5f;
Main.dust[num3].noGravity = true;
}
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float numberProjectiles = 3f;
float rotation = MathHelper.ToRadians(6f);
position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 6f;
for (int i = 0; i < numberProjectiles; i++)
{
Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f;
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 60f;
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
{
position += muzzleOffset;
}
}
return true;
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
int healingAmount = damage / 16;
player.statLife += healingAmount;
player.HealEffect(healingAmount, true);
target.AddBuff(20, 720, false);
player.AddBuff(115, 600, true);
player.AddBuff(116, 480, true);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<GoldenDagger>());
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

@@ -0,0 +1,57 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Shortswords;
public class Wakizashi : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Wakizashi");
Tooltip.SetDefault("Inflicts [c/007700:Poison] debuff for 5 seconds on hit");
}
public override void SetDefaults()
{
Item.damage = 15;
Item.width = 30;
Item.height = 30;
Item.useTime = 13;
Item.useAnimation = 13;
Item.useStyle = ItemUseStyleID.Thrust;
Item.knockBack = 5f;
Item.value = Item.sellPrice(0, 0, 50, 0);
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item1;
Item.autoReuse = false;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(20, 300, false);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<StonePlatedShortsword>());
val.AddRecipeGroup("IronBar", 6);
val.AddIngredient(ItemID.Emerald, 2);
val.AddTile(TileID.Anvils);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

@@ -0,0 +1,63 @@
using FabusMod.Projectiles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords;
public class GoldenSlasher : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Golden Slasher");
Tooltip.SetDefault("[c/B6FF00:Autoswings] \nShoots two homing golden orbs in a medium-sized spread on swing");
}
public override void SetDefaults()
{
Item.damage = 110;
Item.width = 64;
Item.height = 72;
Item.useTime = 15;
Item.useAnimation = 15;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 3f;
Item.value = Item.sellPrice(0, 40, 0, 0);
Item.rare = ItemRarityID.Yellow;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<GoldenOrb>();
Item.shootSpeed = 15f;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(4))
{
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.MeatDust>());
}
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 14);
val.AddTile(TileID.AdamantiteForge);
val.Register();
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float numberProjectiles = 2f;
float rotation = MathHelper.ToRadians(25f);
position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 45f;
for (int i = 0; i < numberProjectiles; i++)
{
Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f;
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
}
return false;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

@@ -0,0 +1,65 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords;
public class RainbowClaymore : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("The Spectrum");
Tooltip.SetDefault("[c/B6FF00:Autoswings] \nShoots three homing rainbow orbs in a large spread on swing");
}
public override void SetDefaults()
{
Item.damage = 185;
Item.width = 60;
Item.height = 68;
Item.useTime = 12;
Item.useAnimation = 12;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 3f;
Item.value = Item.sellPrice(3, 20, 0, 0);
Item.expert = true;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<Projectiles.RainbowOrb>();
Item.shootSpeed = 20f;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust>());
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust2>());
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust3>());
}
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<GoldenSlasher>());
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 14);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
val.Register();
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float numberProjectiles = 3f;
float rotation = MathHelper.ToRadians(45f);
position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 45f;
for (int i = 0; i < numberProjectiles; i++)
{
Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f;
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
}
return false;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

@@ -0,0 +1,78 @@
using FabusMod.Projectiles.Shimada;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords;
public class CarbonSword : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Carbon Sword");
Tooltip.SetDefault("[c/B6FF00:Autoswings, dyeable]\nFires a stream of particles that deals damage three times\nInflicts [c/7B2D2F:Advanced Blood Loss] for 10 seconds when hit with the blade, dealing damage over time");
}
public override void SetDefaults()
{
Item.damage = 74;
Item.crit = 8;
Item.width = 54;
Item.height = 68;
Item.useTime = 22;
Item.useAnimation = 22;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 2f;
Item.value = Item.sellPrice(0, 6, 0, 0);
Item.rare = ItemRarityID.LightRed;
Item.shoot = ModContent.ProjectileType<ShimadaWave>();
Item.shootSpeed = 10f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int numberProjectiles = 3;
for (int i = 0; i < numberProjectiles; i++)
{
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(0f));
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
}
return false;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust2>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.AdvancedBloodLoss>(), 600, false);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<ShimadaSword>());
val.AddRecipeGroup("FabusMod:OrichalcumBar", 10);
val.AddTile(TileID.DemonAltar);
val.Register();
Recipe val2 = CreateRecipe();
val2.AddIngredient(ModContent.ItemType<CarbonSwordNihon>());
val2.AddIngredient(ItemID.BlueDye, 1);
val2.AddTile(TileID.DyeVat);
val2.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

@@ -0,0 +1,72 @@
using FabusMod.Projectiles.Shimada;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords;
public class CarbonSwordNihon : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Carbon Sword - Nihon");
Tooltip.SetDefault("[c/B6FF00:Autoswings, dyeable]\nFires a stream of particles that deals damage three times\nInflicts [c/7B2D2F:Advanced Blood Loss] for 10 seconds when hit with the blade, dealing damage over time");
}
public override void SetDefaults()
{
Item.damage = 74;
Item.crit = 8;
Item.width = 54;
Item.height = 68;
Item.useTime = 22;
Item.useAnimation = 22;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 2f;
Item.value = Item.sellPrice(0, 6, 0, 0);
Item.rare = ItemRarityID.LightRed;
Item.shoot = ModContent.ProjectileType<ShimadaWaveNihon>();
Item.shootSpeed = 10f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int numberProjectiles = 3;
for (int i = 0; i < numberProjectiles; i++)
{
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(0f));
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
}
return false;
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.AdvancedBloodLoss>(), 600, false);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.NightsAxeSparkle>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<CarbonSword>());
val.AddIngredient(ItemID.SilverDye, 1);
val.AddTile(TileID.DyeVat);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

@@ -0,0 +1,99 @@
using FabusMod.Projectiles.Shimada;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords;
public class DemonsFury : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Demon's Fury");
Tooltip.SetDefault("[c/B6FF00:Autoswings]\nFires a beam of particles that ignores immunity frames, pierces 5 times, and regenerates 1 Mana with every hit\nInflicts [c/7B2D2F:Advanced Blood Loss] for 14 seconds when hit with the blade, dealing damage over time\n<right> uses 40 Mana to bring up spikes from the ground, dealing damage with a 2% chance of granting a [c/EC566E:Souleater] stack\nHas an 8% chance to fire soul-absorbing shards, granting a stack of [c/EC566E:Souleater] when hit\nHaving 6 stacks of [c/EC566E:Souleater] restores 75 HP and Mana");
}
public override void SetDefaults()
{
Item.damage = 80;
Item.crit = 8;
Item.width = 63;
Item.height = 76;
Item.useTime = 22;
Item.useAnimation = 22;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 2f;
Item.value = Item.sellPrice(0, 23, 25, 0);
Item.rare = ItemRarityID.Pink;
Item.mana = 0;
Item.shootSpeed = 10f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.AdvancedBloodLoss>(), 840, false);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust3>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2 && player.velocity.Y == 0f && player.statMana >= 40)
{
Item.damage = 50;
Item.useTime = 60;
Item.useAnimation = 60;
Item.shootSpeed = 0f;
Item.mana = 40;
Item.shoot = ModContent.ProjectileType<DemonProjRMB>();
Item.UseSound = SoundID.Item88;
}
else
{
Item.damage = 80;
Item.useAnimation = 22;
Item.useTime = 22;
Item.shootSpeed = 10f;
Item.mana = 0;
if (Utils.NextFloat(Main.rand) < 0.08f)
{
Item.shoot = ModContent.ProjectileType<DemonProjTwo>();
}
else
{
Item.shoot = ModContent.ProjectileType<DemonWave>();
}
Item.UseSound = SoundID.Item1;
}
return CanUseItem(player);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddRecipeGroup("FabusMod:CarbonSword", 1);
val.AddRecipeGroup("FabusMod:AdamantiteBar", 10);
val.AddIngredient(ItemID.SoulofNight, 8);
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
val.AddTile(TileID.DemonAltar);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

@@ -0,0 +1,98 @@
using FabusMod.Projectiles.Shimada;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords;
public class GoldenFury : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Golden Fury");
Tooltip.SetDefault("[c/B6FF00:Autoswings]\nFires a beam of particles that ignores immunity frames, pierces 6 times, and regenerates 1 Mana with every hit\nInflicts [c/7B2D2F:Advanced Blood Loss] for 14 seconds when hit with the blade, dealing damage over time\n<right> uses 40 Mana to bring up [c/C4AB37:Midas]-inducing spikes from the ground, dealing damage with a 2% chance of granting an [c/D2D25A:Enrichment] stack\nHas a 10% chance to fire soul-absorbing shards, granting a stack of [c/D2D25A:Enrichment] when hit\nHaving 6 stacks of [c/D2D25A:Enrichment] restores 75 HP and Mana");
}
public override void SetDefaults()
{
Item.damage = 100;
Item.crit = 8;
Item.width = 63;
Item.height = 76;
Item.useTime = 20;
Item.useAnimation = 20;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 2f;
Item.value = Item.sellPrice(0, 23, 25, 0);
Item.rare = ItemRarityID.Pink;
Item.mana = 0;
Item.shootSpeed = 10f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.AdvancedBloodLoss>(), 840, false);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default(Color), 1f);
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2 && player.velocity.Y == 0f && player.statMana >= 40)
{
Item.damage = 70;
Item.useTime = 60;
Item.useAnimation = 60;
Item.shootSpeed = 0f;
Item.mana = 40;
Item.shoot = ModContent.ProjectileType<GoldenFuryProjRMB>();
Item.UseSound = SoundID.Item88;
}
else
{
Item.damage = 100;
Item.useAnimation = 20;
Item.useTime = 20;
Item.shootSpeed = 10f;
Item.mana = 0;
if (Utils.NextFloat(Main.rand) < 0.1f)
{
Item.shoot = ModContent.ProjectileType<GoldenFuryProjTwo>();
}
else
{
Item.shoot = ModContent.ProjectileType<GoldenFuryWave>();
}
Item.UseSound = SoundID.Item1;
}
return this.CanUseItem(player);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<DemonsFury>());
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 10);
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
val.AddTile(TileID.DemonAltar);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

@@ -0,0 +1,58 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords;
public class ShimadaSword : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Shimada Sword");
Tooltip.SetDefault("Inflicts [c/7B2D2F:Blood Loss] for 3 seconds on hit, dealing damage over time");
}
public override void SetDefaults()
{
Item.damage = 18;
Item.crit = 8;
Item.width = 54;
Item.height = 68;
Item.useTime = 22;
Item.useAnimation = 22;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 2f;
Item.value = Item.sellPrice(0, 1, 80, 0);
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item1;
Item.autoReuse = false;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.BloodLoss>(), 180, false);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<StonePlatedKatana>());
val.AddRecipeGroup("FabusMod:LightsBane");
val.AddIngredient(ItemID.Emerald, 10);
val.AddTile(TileID.Anvils);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

@@ -0,0 +1,38 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords;
public class StonePlatedKatana : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Stone-Plated Katana");
}
public override void SetDefaults()
{
Item.damage = 8;
Item.crit = 8;
Item.width = 56;
Item.height = 66;
Item.useTime = 22;
Item.useAnimation = 22;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 2f;
Item.value = Item.sellPrice(0, 0, 0, 40);
Item.rare = ItemRarityID.White;
Item.UseSound = SoundID.Item1;
Item.autoReuse = false;
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<Items.WeaponParts.UntreatedSwordParts>());
val.AddIngredient(ItemID.StoneBlock, 12);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.ReinforcedWorkBench>());
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

@@ -0,0 +1,107 @@
using FabusMod.Projectiles.Shimada;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords;
public class TheRainbowsHonor : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Dream Catcher");
Tooltip.SetDefault("[c/B6FF00:Autoswings]\nFires a beam of particles that ignores immunity frames, pierces 8 times, and regenerates 1 Mana with every hit\nInflicts [c/806580:Bad Dream] for 16 seconds when hit with the blade, dealing damage over time\n<right> uses 40 Mana to bring up [c/C4AB37:Midas]-inducing spikes from the ground, dealing damage with a 2% chance of granting a [c/FF52DC:Dream] stack\nHas a 10% chance to fire homing, soul-absorbing shards, healing for 20 HP and granting a stack of [c/FF52DC:Dream] when hit\nHaving 6 stacks of [c/FF52DC:Dream] restores 85 HP and Mana and puts you into an enraged state for 8 seconds, increasing melee damage dealt");
}
public override void SetDefaults()
{
Item.damage = 195;
Item.crit = 8;
Item.width = 56;
Item.height = 76;
Item.useTime = 10;
Item.useAnimation = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 2f;
Item.value = Item.sellPrice(2, 75, 0, 0);
Item.expert = true;
Item.shoot = ModContent.ProjectileType<DreamCatcherWave>();
Item.shootSpeed = 60f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.BadDream>(), 960, false);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default(Color), 1f);
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
int num2 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default(Color), 1f);
Main.dust[num2].scale = 1f;
Main.dust[num2].velocity.Y = 0f;
Main.dust[num2].velocity.X = 0.5f;
Main.dust[num2].noGravity = true;
int num3 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default(Color), 1f);
Main.dust[num3].scale = 1f;
Main.dust[num3].velocity.Y = 0f;
Main.dust[num3].velocity.X = 0.5f;
Main.dust[num3].noGravity = true;
}
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2 && player.velocity.Y == 0f)
{
Item.damage = 135;
Item.useTime = 60;
Item.useAnimation = 60;
Item.shootSpeed = 0f;
Item.mana = 40;
Item.shoot = ModContent.ProjectileType<DreamCatcherProjRMB>();
Item.UseSound = SoundID.Item88;
}
else
{
Item.damage = 195;
Item.useAnimation = 18;
Item.useTime = 18;
Item.shootSpeed = 10f;
Item.mana = 0;
if (Utils.NextFloat(Main.rand) < 0.1f)
{
Item.shoot = ModContent.ProjectileType<DreamCatcherProjTwo>();
}
else
{
Item.shoot = ModContent.ProjectileType<DreamCatcherWave>();
}
Item.UseSound = SoundID.Item1;
}
return this.CanUseItem(player);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<GoldenFury>());
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10);
val.AddTile(null, "RainbowStation");
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

+100
View File
@@ -0,0 +1,100 @@
using FabusMod.Projectiles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Melee.Waraxes;
public class RainbowAxe : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Spectral Shredder");
Tooltip.SetDefault("[c/B6FF00:Autoswings] \nPressing <right> fires a long-ranged Rainbow-Axe wall");
}
public override void SetDefaults()
{
Item.damage = 280;
Item.width = 54;
Item.height = 58;
Item.useTime = 20;
Item.useAnimation = 20;
Item.useStyle = ItemUseStyleID.Swing;
Item.axe = 40;
Item.tileBoost = 6;
Item.knockBack = 8f;
Item.value = Item.sellPrice(3, 20, 0, 0);
Item.expert = true;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shootSpeed = 80f;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust>());
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust2>());
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust3>());
}
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 20;
Item.useAnimation = 20;
Item.damage = 280;
Item.axe = 38;
Item.tileBoost = 6;
Item.shoot = ModContent.ProjectileType<RainbowAxeBeam>();
}
else
{
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 20;
Item.useAnimation = 20;
Item.damage = 280;
Item.axe = 38;
Item.tileBoost = 6;
Item.shoot = ProjectileID.None;
}
return this.CanUseItem(player);
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float numberProjectiles = 16f;
float rotation = MathHelper.ToRadians(35f);
position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 80f;
for (int i = 0; i < numberProjectiles; i++)
{
Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f;
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
}
return false;
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ItemID.LunarHamaxeSolar);
val.AddIngredient(ItemID.LunarHamaxeVortex);
val.AddIngredient(ItemID.LunarHamaxeNebula);
val.AddIngredient(ItemID.LunarHamaxeStardust);
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 14);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B