Commit of decompiled and "updated" code.
@@ -0,0 +1,72 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows;
|
||||
|
||||
public class LunarBow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Lunar Bow");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo]\nGrants the [c/13A2DA:Shattered Moon's Grace] buff when shooting, reducing fall speed\nUsing <right> while under max HP grants the [c/5EDF85:Shattered Moon's Blessing] buff, which has the following effects:\n - Heals the player rapidly for 2 seconds, but disables the use of items\n - Grants [c/9CE53B:Shattered Moon's Rejuvenation] after 2 seconds, healing 100 HP over 10 seconds\n[c/5EDF85:Shattered Moon's Blessing] has a cooldown of [c/CA4646:50 seconds] once the effect ends");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 240;
|
||||
Item.width = 27;
|
||||
Item.height = 69;
|
||||
Item.useTime = 9;
|
||||
Item.useAnimation = 9;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 15, 60, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 50f;
|
||||
Item.shoot = ModContent.ProjectileType<LunarBolt>();
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsCurse>()) && player.statLife < player.statLifeMax2)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsBlessing>(), 140, true);
|
||||
}
|
||||
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsGrace>(), 10, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsGrace>(), 10, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(4f, 0f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ItemID.LifeFruit, 5);
|
||||
val.AddIngredient(ItemID.LifeCrystal, 5);
|
||||
val.AddIngredient(ItemID.FragmentVortex, 14);
|
||||
val.AddTile(TileID.LunarCraftingStation);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,71 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows;
|
||||
|
||||
public class LunarRainBow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Lunar Rain-Bow");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo]\nGrants the [c/E6A6CF:Spectral Moon's Grace] buff when shooting, reducing fall speed and nullifying knockback \nUsing <right> while under max HP grants the [c/82E8E8:Spectral Moonlight] buff, which has the following effects:\n - Heals the player rapidly for 2 seconds and grants immunity, but disables the use of items\n - Grants [c/6DE5D8:Spectral Moon's Rejuvenation] after 2 seconds, healing 200 HP over 10 seconds and increasing ranged crit rate by 60\n[c/82E8E8:Spectral Moonlight] has a cooldown of [c/BF5E3B:50 seconds] once the effect ends");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 320;
|
||||
Item.width = 27;
|
||||
Item.height = 69;
|
||||
Item.useTime = 7;
|
||||
Item.useAnimation = 7;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(2, 70, 0, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 50f;
|
||||
Item.shoot = ModContent.ProjectileType<SpectralMoonBolt>();
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonsCurse>()) && player.statLife < player.statLifeMax2)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonlight>(), 140, true);
|
||||
}
|
||||
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonsGrace>(), 10, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonsGrace>(), 10, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(4f, 0f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<LunarBow>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 14);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,60 @@
|
||||
using FabusMod.Projectiles.Arrows;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows;
|
||||
|
||||
public class PiercingBow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Piercing Bow");
|
||||
Tooltip.SetDefault("Converts Wooden Arrows into Piercing Arrows");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 10;
|
||||
Item.width = 18;
|
||||
Item.height = 32;
|
||||
Item.useTime = 27;
|
||||
Item.useAnimation = 27;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 2f;
|
||||
Item.value = Item.sellPrice(0, 0, 15, 0);
|
||||
Item.rare = ItemRarityID.White;
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = false;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 7f;
|
||||
Item.useAmmo = AmmoID.Arrow;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (type == 1)
|
||||
{
|
||||
type = ModContent.ProjectileType<PiercingArrow>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ItemID.WoodenBow, 1);
|
||||
val.AddIngredient(ItemID.IronBow, 1);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ItemID.WoodenBow, 1);
|
||||
val2.AddIngredient(ItemID.LeadBow, 1);
|
||||
val2.AddTile(TileID.Anvils);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 480 B |
@@ -0,0 +1,70 @@
|
||||
using FabusMod.Projectiles.Arrows;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
|
||||
|
||||
public class DemonsBow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Demon's Bow");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Hellfire Arrows (except with <right>) \nPressing <right> fires 6 demonic arrows in quick succession, but it has lower damage and a 2 second cooldown");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 34;
|
||||
Item.width = 18;
|
||||
Item.height = 38;
|
||||
Item.useTime = 16;
|
||||
Item.useAnimation = 16;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 3f;
|
||||
Item.value = Item.sellPrice(0, 3, 0, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 16f;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 4;
|
||||
Item.useAnimation = 24;
|
||||
Item.damage = 30;
|
||||
Item.reuseDelay = 60;
|
||||
Item.shoot = ModContent.ProjectileType<DemonArrow>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.reuseDelay = 0;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 16;
|
||||
Item.useAnimation = 16;
|
||||
Item.damage = 34;
|
||||
Item.shoot = ProjectileID.HellfireArrow;
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<StormBow>());
|
||||
val.AddIngredient(ModContent.ItemType<StonePlatedBow>());
|
||||
val.AddIngredient(ItemID.HellstoneBar, 6);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 489 B |
@@ -0,0 +1,69 @@
|
||||
using FabusMod.Projectiles.Arrows;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
|
||||
|
||||
public class GoldenKabuki : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Golden Kabuki");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Holy Arrows (except with <right>) \nPressing <right> fires 16 spiritual, golden arrows in quick succession, but it has lower damage and a 1 second cooldown");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 58;
|
||||
Item.width = 18;
|
||||
Item.height = 38;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 3f;
|
||||
Item.value = Item.sellPrice(0, 22, 0, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 18f;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 32;
|
||||
Item.damage = 54;
|
||||
Item.reuseDelay = 30;
|
||||
Item.shoot = ModContent.ProjectileType<GoldenSpiritArrow>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.reuseDelay = 0;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.damage = 58;
|
||||
Item.shoot = ProjectileID.HolyArrow;
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<Kabuki>());
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 609 B |
@@ -0,0 +1,69 @@
|
||||
using FabusMod.Projectiles.Arrows;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
|
||||
|
||||
public class Kabuki : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Kabuki");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Hellfire Arrows (except with <right>) \nPressing <right> fires 8 demonic arrows in quick succession, but it has lower damage and a 1.2 second cooldown");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 42;
|
||||
Item.width = 18;
|
||||
Item.height = 38;
|
||||
Item.useTime = 14;
|
||||
Item.useAnimation = 14;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 3f;
|
||||
Item.value = Item.sellPrice(0, 5, 40, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 18f;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 3;
|
||||
Item.useAnimation = 24;
|
||||
Item.damage = 38;
|
||||
Item.reuseDelay = 36;
|
||||
Item.shoot = ModContent.ProjectileType<DemonArrow>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.reuseDelay = 0;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 14;
|
||||
Item.useAnimation = 14;
|
||||
Item.damage = 42;
|
||||
Item.shoot = ProjectileID.HellfireArrow;
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<DemonsBow>());
|
||||
val.AddIngredient(ItemID.HallowedBar, 6);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 605 B |
@@ -0,0 +1,69 @@
|
||||
using FabusMod.Projectiles.Arrows;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
|
||||
|
||||
public class RainBow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Rain-Bow");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots two Rainbow Arrows in quick succession (except with <right>) \nPressing <right> fires 18 Holy Arrows in quick succession, but it has lower damage and a 1 second cooldown");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 90;
|
||||
Item.width = 30;
|
||||
Item.height = 50;
|
||||
Item.useTime = 3;
|
||||
Item.useAnimation = 6;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 3f;
|
||||
Item.value = Item.sellPrice(1, 50, 0, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 20f;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 40;
|
||||
Item.damage = 84;
|
||||
Item.reuseDelay = 30;
|
||||
Item.shoot = ProjectileID.HolyArrow;
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.reuseDelay = 0;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 3;
|
||||
Item.useAnimation = 6;
|
||||
Item.damage = 90;
|
||||
Item.shoot = ModContent.ProjectileType<RainbowArrow>();
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<GoldenKabuki>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 614 B |
@@ -0,0 +1,41 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
|
||||
|
||||
public class StonePlatedBow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Stone-Plated Bow");
|
||||
Tooltip.SetDefault("Doesn't use ammo\nAlways shoots Wooden Arrows");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 5;
|
||||
Item.width = 18;
|
||||
Item.height = 38;
|
||||
Item.useTime = 32;
|
||||
Item.useAnimation = 32;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 0, 5, 60);
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = false;
|
||||
Item.shootSpeed = 9f;
|
||||
Item.shoot = ProjectileID.WoodenArrowFriendly;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<Items.WeaponParts.UntreatedBowPart>(), 2);
|
||||
val.AddIngredient(ItemID.StoneBlock, 4);
|
||||
val.AddIngredient(ItemID.FallenStar, 1);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.ReinforcedWorkBench>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 518 B |
@@ -0,0 +1,60 @@
|
||||
using FabusMod.Projectiles.Arrows;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
|
||||
|
||||
public class StormBow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Storm Bow");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Wooden Arrows (except with <right>) \nPressing <right> fires 6 Storm Arrows in quick succession, but it has lower damage and a 3 second cooldown");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 24;
|
||||
Item.width = 18;
|
||||
Item.height = 38;
|
||||
Item.useTime = 18;
|
||||
Item.useAnimation = 18;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 2f;
|
||||
Item.value = Item.sellPrice(0, 0, 60, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 16f;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 4;
|
||||
Item.useAnimation = 24;
|
||||
Item.damage = 24;
|
||||
Item.reuseDelay = 90;
|
||||
Item.shoot = ModContent.ProjectileType<StormArrow>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.reuseDelay = 0;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 18;
|
||||
Item.useAnimation = 18;
|
||||
Item.damage = 28;
|
||||
Item.shoot = ProjectileID.WoodenArrowFriendly;
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 513 B |
@@ -0,0 +1,103 @@
|
||||
using FabusMod.Projectiles.FoxPistol;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FoxPistols;
|
||||
|
||||
public class FoxPistol : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Fox Pistol");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo, dyeable]\nGrants the [c/D78624:Fox Mending] buff for 5 seconds, which regenerates HP and increases speed, but lowers damage by 12% \nUsing <right> increases damage and reduces use time, as well as: \n - Grants the [c/9E9E9E:Fox Break] debuff for 1 second, reducing movement speed \n - Grants the [c/732C73:Fox Wither] debuff for 1.3 seconds on self, and 4 seconds on hit enemies \n - [c/732C73:Fox Wither] debuff deals damage over time and nullifies the [c/D78624:Fox Mending] buff's regeneration");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 22;
|
||||
Item.width = 36;
|
||||
Item.height = 21;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 3, 80, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 7f;
|
||||
Item.expert = true;
|
||||
Item.shoot = ModContent.ProjectileType<OrangeBolt>();
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(0f, -2f);
|
||||
}
|
||||
|
||||
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)) * 32f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxBreak>(), 60, true);
|
||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxWither>(), 78, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxMending>(), 300, true);
|
||||
}
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 10;
|
||||
Item.useAnimation = 10;
|
||||
Item.damage = 28;
|
||||
Item.shoot = ModContent.ProjectileType<OrangeBoltRMB>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.damage = 22;
|
||||
Item.shoot = ModContent.ProjectileType<OrangeBolt>();
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>());
|
||||
val.AddRecipeGroup("FabusMod:GoldBar", 10);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<FoxPistolBlue>());
|
||||
val2.AddIngredient(ItemID.OrangeDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 639 B |
@@ -0,0 +1,103 @@
|
||||
using FabusMod.Projectiles.FoxPistol;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FoxPistols;
|
||||
|
||||
public class FoxPistolBlue : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Fox Pistol - Blue");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo, dyeable]\nGrants the [c/37C8AB:Fox Mending] buff for 5 seconds, which regenerates HP and increases speed, but lowers damage by 12% \nUsing <right> increases damage and reduces use time, as well as: \n - Grants the [c/9E9E9E:Fox Break] debuff for 1 second, reducing movement speed \n - Grants the [c/732C73:Fox Wither] debuff for 1.3 seconds on self, and 4 seconds on hit enemies \n - [c/732C73:Fox Wither] debuff deals damage over time and nullifies the [c/37C8AB:Fox Mending] buff's regeneration");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 22;
|
||||
Item.width = 36;
|
||||
Item.height = 21;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 3, 80, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 7f;
|
||||
Item.expert = true;
|
||||
Item.shoot = ModContent.ProjectileType<BlueBolt>();
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(0f, -2f);
|
||||
}
|
||||
|
||||
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)) * 32f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxBreak>(), 60, true);
|
||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxWither>(), 78, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxMendingBlue>(), 300, true);
|
||||
}
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 10;
|
||||
Item.useAnimation = 10;
|
||||
Item.damage = 28;
|
||||
Item.shoot = ModContent.ProjectileType<BlueBoltRMB>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.damage = 22;
|
||||
Item.shoot = ModContent.ProjectileType<BlueBolt>();
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>());
|
||||
val.AddRecipeGroup("FabusMod:GoldBar", 10);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<FoxPistol>(), 1);
|
||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 635 B |
@@ -0,0 +1,97 @@
|
||||
using FabusMod.Projectiles.FoxPistol;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FoxPistols;
|
||||
|
||||
public class SpectralHowler : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Spectral Howler");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo]\nGrants the [c/AB2C2C:S][c/F3821B:p][c/E6AF31:e][c/63B465:c][c/82E8E8:t][c/9EF3EF:r][c/2BA0B5:a][c/734679:l ][c/AB2C2C:M][c/F3821B:e][c/E6AF31:n][c/63B465:d][c/82E8E8:i][c/9EF3EF:n][c/2BA0B5:g] buff for 7 seconds, which has the following effects:\n - Increases max HP by 200, regenerates HP, and increases movement speed, but lowers damage by 7% \nUsing <right> increases damage and reduces use time, as well as: \n - Grants the [c/8F77AF:Spectral Wither] debuff for 0.4 seconds, dealing damage over time and nullifying [c/AB2C2C:S][c/F3821B:p][c/E6AF31:e][c/63B465:c][c/82E8E8:t][c/9EF3EF:r][c/2BA0B5:a][c/734679:l ][c/AB2C2C:M][c/F3821B:e][c/E6AF31:n][c/63B465:d][c/82E8E8:i][c/9EF3EF:n][c/2BA0B5:g]'s regeneration\n - Inflicts the [c/AB2C2C:R][c/F3821B:a][c/E6AF31:i][c/63B465:n][c/82E8E8:b][c/9EF3EF:o][c/2BA0B5:w][c/734679:'s ][c/AB2C2C:W][c/F3821B:r][c/E6AF31:a][c/63B465:t][c/82E8E8:h] debuff on hit enemies for 8 seconds, dealing damage over time");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 260;
|
||||
Item.width = 36;
|
||||
Item.height = 21;
|
||||
Item.useTime = 6;
|
||||
Item.useAnimation = 6;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 97, 60, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 8f;
|
||||
Item.expert = true;
|
||||
Item.shoot = ModContent.ProjectileType<RainbowBolt>();
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-6f, -2f);
|
||||
}
|
||||
|
||||
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)) * 32f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.SpectralWither>(), 24, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.SpectralMending>(), 420, true);
|
||||
}
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 4;
|
||||
Item.useAnimation = 4;
|
||||
Item.damage = 270;
|
||||
Item.shoot = ModContent.ProjectileType<RainbowBoltRMB>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 6;
|
||||
Item.useAnimation = 6;
|
||||
Item.damage = 260;
|
||||
Item.shoot = ModContent.ProjectileType<RainbowBolt>();
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:FoxPistol", 1);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.RainbowToken>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 4);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 989 B |
@@ -0,0 +1,54 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FusionDrivers;
|
||||
|
||||
public class DynasticFuser : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Dynastic Fusion");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n30% chance to not consume ammo");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 14;
|
||||
Item.width = 72;
|
||||
Item.height = 32;
|
||||
Item.useTime = 7;
|
||||
Item.useAnimation = 7;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 6, 66, 0);
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 30f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, 2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.3f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<FusionDriver>());
|
||||
val.AddIngredient(ItemID.HellstoneBar, 12);
|
||||
val.AddIngredient(ItemID.Sapphire, 8);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,53 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FusionDrivers;
|
||||
|
||||
public class DynasticFuserGolden : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Golden Fusion");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n55% chance to not consume ammo");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 72;
|
||||
Item.width = 70;
|
||||
Item.height = 32;
|
||||
Item.useTime = 4;
|
||||
Item.useAnimation = 4;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 30, 0, 0);
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, 2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.55f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:ProtectionFuser", 1);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8);
|
||||
val.AddTile(TileID.AdamantiteForge);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,64 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FusionDrivers;
|
||||
|
||||
public class FusedRainbow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Cosmic Fusion");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nConverts Musket Balls into homing rainbow bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 85;
|
||||
Item.width = 70;
|
||||
Item.height = 32;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(2, 80, 0, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.expert = true;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, 2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<RainbowBullet>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<DynasticFuserGolden>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 12);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 908 B |
@@ -0,0 +1,48 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FusionDrivers;
|
||||
|
||||
public class FusionDriver : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Fusion Driver");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots]");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 5;
|
||||
Item.width = 72;
|
||||
Item.height = 32;
|
||||
Item.useTime = 8;
|
||||
Item.useAnimation = 8;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 0, 96, 0);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 30f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, 2f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("IronBar", 12);
|
||||
val.AddIngredient(ItemID.Emerald, 4);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,59 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FusionDrivers;
|
||||
|
||||
public class ProtectionFuser : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Protective Fusion");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \n42% chance to not consume ammo");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 36;
|
||||
Item.width = 72;
|
||||
Item.height = 32;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 5;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 15, 66, 0);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 20f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, 2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.42f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<DynasticFuser>());
|
||||
val.AddRecipeGroup("FabusMod:AdamantiteBar", 12);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<ProtectionFuserCarbonFiber>());
|
||||
val2.AddIngredient(ItemID.SilverDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 861 B |
@@ -0,0 +1,53 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.FusionDrivers;
|
||||
|
||||
public class ProtectionFuserCarbonFiber : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Protective Fusion - Carbon Fiber");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n42% chance to not consume ammo");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 36;
|
||||
Item.width = 72;
|
||||
Item.height = 32;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 5;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 15, 66, 0);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 20f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, 2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.42f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<ProtectionFuser>());
|
||||
val.AddIngredient(ItemID.BlackDye, 1);
|
||||
val.AddTile(TileID.DyeVat);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 866 B |
@@ -0,0 +1,54 @@
|
||||
using FabusMod.Projectiles.LightBlasts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.LightGuns;
|
||||
|
||||
public class GoldenStinger : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Golden Stinger");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nDoesn't require ammo\nShoots golden light blasts");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 68;
|
||||
Item.width = 32;
|
||||
Item.height = 38;
|
||||
Item.useTime = 3;
|
||||
Item.useAnimation = 3;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 30, 35, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<GoldenLightBlast>();
|
||||
Item.shootSpeed = 10f;
|
||||
Item.rare = 12;
|
||||
}
|
||||
|
||||
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)) * 32f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:TheStinger", 1);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
|
||||
val.AddTile(TileID.LunarCraftingStation);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 608 B |
@@ -0,0 +1,55 @@
|
||||
using FabusMod.Projectiles.LightBlasts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.LightGuns;
|
||||
|
||||
public class LightGun : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Light Gun");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't require ammo \nShoots little light blasts");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 14;
|
||||
Item.width = 32;
|
||||
Item.height = 38;
|
||||
Item.useTime = 7;
|
||||
Item.useAnimation = 7;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 5, 0, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<LightBlast>();
|
||||
Item.shootSpeed = 7f;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
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)) * 32f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:GoldBar", 20);
|
||||
val.AddIngredient(ItemID.Diamond, 4);
|
||||
val.AddIngredient(ItemID.Amethyst, 6);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 585 B |
@@ -0,0 +1,54 @@
|
||||
using FabusMod.Projectiles.LightBlasts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.LightGuns;
|
||||
|
||||
public class SpectralBlaster : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Spectral Blaster");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nDoesn't require ammo\nShoots rainbow blasts");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 100;
|
||||
Item.width = 32;
|
||||
Item.height = 38;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(1, 55, 0, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<RainbowLightBlast>();
|
||||
Item.shootSpeed = 10f;
|
||||
Item.expert = 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)) * 32f;
|
||||
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<GoldenStinger>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 674 B |
@@ -0,0 +1,55 @@
|
||||
using FabusMod.Projectiles.LightBlasts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.LightGuns;
|
||||
|
||||
public class Taegeukgi : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Taegeukgi");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nDoesn't require ammo\nShoots little light blasts");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 40;
|
||||
Item.width = 32;
|
||||
Item.height = 38;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 5;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 8, 25, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<LightBlast>();
|
||||
Item.shootSpeed = 6f;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
}
|
||||
|
||||
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)) * 32f;
|
||||
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<LightGun>());
|
||||
val.AddRecipeGroup("FabusMod:OrichalcumBar", 6);
|
||||
val.AddIngredient(ItemID.Sapphire, 6);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 669 B |
@@ -0,0 +1,60 @@
|
||||
using FabusMod.Projectiles.LightBlasts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.LightGuns;
|
||||
|
||||
public class TheStinger : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Stinger");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable]\nDoesn't require ammo\nShoots little light blasts");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 66;
|
||||
Item.width = 32;
|
||||
Item.height = 38;
|
||||
Item.useTime = 4;
|
||||
Item.useAnimation = 4;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 13, 85, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<LightBlast>();
|
||||
Item.shootSpeed = 5f;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
}
|
||||
|
||||
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)) * 32f;
|
||||
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<Taegeukgi>());
|
||||
val.AddIngredient(ItemID.HallowedBar, 14);
|
||||
val.AddTile(TileID.AdamantiteForge);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<TheStingerBlackCat>());
|
||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 572 B |
@@ -0,0 +1,54 @@
|
||||
using FabusMod.Projectiles.LightBlasts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.LightGuns;
|
||||
|
||||
public class TheStingerBlackCat : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Stinger - Black Cat");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nDoesn't require ammo\nShoots little light blasts");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 66;
|
||||
Item.width = 32;
|
||||
Item.height = 38;
|
||||
Item.useTime = 4;
|
||||
Item.useAnimation = 4;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 13, 85, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<LightBlast>();
|
||||
Item.shootSpeed = 5f;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
}
|
||||
|
||||
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)) * 32f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(null, "TheStinger", 1);
|
||||
val.AddIngredient(ItemID.BlackDye, 1);
|
||||
val.AddTile(TileID.DyeVat);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 604 B |
@@ -0,0 +1,62 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.MachinePistols;
|
||||
|
||||
public class AugmentedUzi : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Augmented Uzi");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n70% chance to not consume ammo \nShoots incredibly fast");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 32;
|
||||
Item.width = 48;
|
||||
Item.height = 38;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 8, 20, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-12f, -8f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.7f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(6f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<MachinePistol>());
|
||||
val.AddIngredient(ItemID.Uzi, 1);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 777 B |
@@ -0,0 +1,67 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.MachinePistols;
|
||||
|
||||
public class CosmicHacker : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Cosmic Uzi");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n90% chance to not consume ammo \nConverts Musket Balls into homing Rainbow Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 82;
|
||||
Item.width = 48;
|
||||
Item.height = 36;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(2, 30, 0, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.expert = true;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-8f, -8f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.9f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<RainbowBullet>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<MachinePistolGolden>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 638 B |
@@ -0,0 +1,62 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.MachinePistols;
|
||||
|
||||
public class MachinePistol : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Machine Pistol");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nShoots incredibly fast ");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 10;
|
||||
Item.width = 50;
|
||||
Item.height = 38;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 7, 20, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-12f, -8f);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(6f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:OrichalcumBar", 16);
|
||||
val.AddIngredient(ItemID.Amethyst, 5);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,62 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.MachinePistols;
|
||||
|
||||
public class MachinePistolGolden : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Golden Machine Pistol");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nShoots incredibly fast");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 66;
|
||||
Item.width = 50;
|
||||
Item.height = 38;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 16, 50, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = 12;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-12f, -8f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:Verano", 1);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
|
||||
val.AddTile(TileID.LunarCraftingStation);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 665 B |
@@ -0,0 +1,68 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.MachinePistols;
|
||||
|
||||
public class Verano : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Verano");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \n80% chance to not consume ammo \nShoots incredibly fast");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 60;
|
||||
Item.width = 48;
|
||||
Item.height = 36;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 10, 60, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-12f, -8f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<AugmentedUzi>());
|
||||
val.AddIngredient(ItemID.FragmentVortex, 12);
|
||||
val.AddTile(TileID.LunarCraftingStation);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<VeranoRime>());
|
||||
val2.AddIngredient(ItemID.GreenDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 710 B |
@@ -0,0 +1,62 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.MachinePistols;
|
||||
|
||||
public class VeranoRime : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Verano - Rime");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nShoots incredibly fast");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 60;
|
||||
Item.width = 56;
|
||||
Item.height = 36;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 10, 60, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-16f, 0f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<Verano>());
|
||||
val.AddIngredient(ItemID.BlueDye, 1);
|
||||
val.AddTile(TileID.DyeVat);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 660 B |
@@ -0,0 +1,70 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Peacekeeper;
|
||||
|
||||
public class GoddessRevolver : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Goddess' Revolver");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots 6 bullets in quick succession \n50% chance to not consume ammo \nConverts Musket Balls into High Velocity Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 86;
|
||||
Item.width = 50;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 58, 20, 0);
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 40f;
|
||||
Item.reuseDelay = 12;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.5f;
|
||||
}
|
||||
|
||||
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)) * 35f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
if (type == 14)
|
||||
{
|
||||
type = 242;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:Peaceforcer", 1);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 6);
|
||||
val.AddTile(TileID.AdamantiteForge);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 524 B |
@@ -0,0 +1,77 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Peacekeeper;
|
||||
|
||||
public class Peaceforcer : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Silencer");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \nShoots 6 bullets in quick succession \n50% chance to not consume ammo \nConverts Musket Balls into High Velocity Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 48;
|
||||
Item.width = 50;
|
||||
Item.height = 30;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 21, 80, 0);
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 40f;
|
||||
Item.reuseDelay = 12;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.5f;
|
||||
}
|
||||
|
||||
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)) * 35f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
if (type == 14)
|
||||
{
|
||||
type = 242;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:Peacegunner", 1);
|
||||
val.AddRecipeGroup("FabusMod:AdamantiteBar", 8);
|
||||
val.AddIngredient(ItemID.SoulofNight, 6);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<PeaceforcerVanHelsing>(), 1);
|
||||
val2.AddIngredient(ItemID.SilverDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 547 B |
@@ -0,0 +1,69 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Peacekeeper;
|
||||
|
||||
public class PeaceforcerVanHelsing : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Silencer - Van Helsing");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots 6 bullets in quick succession \n50% chance to not consume ammo \nConverts Musket Balls into High Velocity Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 48;
|
||||
Item.width = 50;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 10, 0, 0);
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 40f;
|
||||
Item.reuseDelay = 12;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.5f;
|
||||
}
|
||||
|
||||
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)) * 35f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
if (type == 14)
|
||||
{
|
||||
type = 242;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<Peaceforcer>());
|
||||
val.AddIngredient(ItemID.BrownDye, 1);
|
||||
val.AddTile(TileID.DyeVat);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 532 B |
@@ -0,0 +1,65 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Peacekeeper;
|
||||
|
||||
public class Peacegunner : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Solitude");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable]");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 32;
|
||||
Item.width = 50;
|
||||
Item.height = 28;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 4, 60, 0);
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 40f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -2f);
|
||||
}
|
||||
|
||||
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)) * 35f;
|
||||
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<Peacekeeper>());
|
||||
val.AddIngredient(ItemID.HellstoneBar, 10);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<PeacegunnerAmerican>());
|
||||
val2.AddIngredient(ItemID.SilverDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 501 B |
@@ -0,0 +1,60 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Peacekeeper;
|
||||
|
||||
public class PeacegunnerAmerican : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Solitude - American");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots]");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 32;
|
||||
Item.width = 50;
|
||||
Item.height = 28;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 4, 60, 0);
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 40f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -2f);
|
||||
}
|
||||
|
||||
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)) * 35f;
|
||||
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<Peacegunner>());
|
||||
val.AddIngredient(ItemID.BlueDye, 1);
|
||||
val.AddIngredient(ItemID.RedDye, 1);
|
||||
val.AddTile(TileID.DyeVat);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 573 B |
@@ -0,0 +1,59 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Peacekeeper;
|
||||
|
||||
public class Peacekeeper : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Peacekeeper");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots]");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 12;
|
||||
Item.width = 50;
|
||||
Item.height = 26;
|
||||
Item.useTime = 15;
|
||||
Item.useAnimation = 15;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 0, 60, 0);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 40f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -2f);
|
||||
}
|
||||
|
||||
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)) * 35f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("IronBar", 10);
|
||||
val.AddIngredient(ItemID.Sapphire, 2);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 428 B |
@@ -0,0 +1,70 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Peacekeeper;
|
||||
|
||||
public class Unity : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Unity");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots 6 bullets in quick succession \n60% chance to not consume ammo \nConverts Musket Balls into homing rainbow bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 150;
|
||||
Item.width = 38;
|
||||
Item.height = 24;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(2, 26, 0, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 100f;
|
||||
Item.reuseDelay = 12;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -2f);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.6f;
|
||||
}
|
||||
|
||||
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)) * 35f;
|
||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||
{
|
||||
position += muzzleOffset;
|
||||
}
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<RainbowBullet>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<GoddessRevolver>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 8);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 478 B |
@@ -0,0 +1,67 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.PulsePistols;
|
||||
|
||||
public class GoldenPulse : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Golden Pulse");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n90% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into golden Pulse Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 66;
|
||||
Item.width = 40;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 15, 70, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.VilethornTip;
|
||||
Item.shootSpeed = 25f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = 12;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.9f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(1f, -2f);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<PulseBulletGolden>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:PulseSprayer", 1);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 2);
|
||||
val.AddTile(TileID.LunarCraftingStation);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 609 B |
@@ -0,0 +1,67 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.PulsePistols;
|
||||
|
||||
public class Graffiti : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Graffiti");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n90% chance to not consume ammo \nConverts Musket Balls into homing Rainbow Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 80;
|
||||
Item.width = 40;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(2, 25, 0, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 40f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.expert = true;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.9f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(1f, -2f);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<RainbowBullet>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<GoldenPulse>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 688 B |
@@ -0,0 +1,68 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.PulsePistols;
|
||||
|
||||
public class PulsePistol : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Pulse Pistol");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n70% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into Pulse Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 10;
|
||||
Item.width = 40;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 5, 32, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 25f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.7f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<PulseBullet>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(1f, -2f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:AdamantiteBar", 6);
|
||||
val.AddIngredient(ItemID.Diamond, 2);
|
||||
val.AddIngredient(ItemID.Sapphire, 2);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 623 B |
@@ -0,0 +1,73 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.PulsePistols;
|
||||
|
||||
public class PulseSprayer : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Pulse Sprayer");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \n80% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into dark blue Pulse Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 54;
|
||||
Item.width = 40;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 10, 20, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 25f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(1f, -2f);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<PulseBulletBlue>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:PunksPulse", 1);
|
||||
val.AddIngredient(ItemID.FragmentVortex, 8);
|
||||
val.AddTile(TileID.LunarCraftingStation);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<PulseSprayerCadet>());
|
||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 670 B |
@@ -0,0 +1,67 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.PulsePistols;
|
||||
|
||||
public class PulseSprayerCadet : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Pulse Sprayer - Cadet");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into Pulse Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 54;
|
||||
Item.width = 40;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 10, 20, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 25f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(1f, -2f);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<PulseBullet>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<PulseSprayer>());
|
||||
val.AddIngredient(ItemID.SilverDye, 1);
|
||||
val.AddTile(TileID.DyeVat);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 600 B |
@@ -0,0 +1,74 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.PulsePistols;
|
||||
|
||||
public class PunksPulse : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Punk's Pulse");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \n70% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into Pulse Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 25;
|
||||
Item.width = 40;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 8, 64, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 25f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.7f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(1f, -2f);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<PulseBullet>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<PulsePistol>());
|
||||
val.AddIngredient(ItemID.HallowedBar, 8);
|
||||
val.AddIngredient(ItemID.SoulofNight, 6);
|
||||
val.AddTile(TileID.AdamantiteForge);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<PunksPulseUltraviolet>());
|
||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 632 B |
@@ -0,0 +1,67 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.PulsePistols;
|
||||
|
||||
public class PunksPulseUltraviolet : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Punk's Pulse - Ultraviolet");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n70% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into pink Pulse Bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 25;
|
||||
Item.width = 40;
|
||||
Item.height = 28;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 0f;
|
||||
Item.value = Item.sellPrice(0, 8, 64, 0);
|
||||
Item.UseSound = SoundID.Item11;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 25f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return Utils.NextFloat(Main.rand) >= 0.7f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(1f, -2f);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
velocity.X = perturbedSpeed.X;
|
||||
velocity.Y = perturbedSpeed.Y;
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<PulseBulletPink>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<PunksPulse>());
|
||||
val.AddIngredient(ItemID.PinkDye, 1);
|
||||
val.AddTile(TileID.DyeVat);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 632 B |
@@ -0,0 +1,94 @@
|
||||
using FabusMod.Projectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Shotguns;
|
||||
|
||||
public class Depriver : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Color Splash");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nFires a spread of 8 bullets \nUsing <right> grants the [c/8A8A8A:Ultracharging] buff, which has the following effects:\n - After 2 seconds of not being able to use items, grants the [c/AB2C2C:U][c/F3821B:l][c/E6AF31:t][c/63B465:r][c/82E8E8:a][c/9EF3EF:c][c/2BA0B5:h][c/734679:a][c/AB2C2C:r][c/F3821B:g][c/E6AF31:e] buff\n - [c/AB2C2C:U][c/F3821B:l][c/E6AF31:t][c/63B465:r][c/82E8E8:a][c/9EF3EF:c][c/2BA0B5:h][c/734679:a][c/AB2C2C:r][c/F3821B:g][c/E6AF31:e] increases damage dealt by Color Splasher by 12%, and reduces Color Splasher's use time by 20% \n[c/AB2C2C:U][c/F3821B:l][c/E6AF31:t][c/63B465:r][c/82E8E8:a][c/9EF3EF:c][c/2BA0B5:h][c/734679:a][c/AB2C2C:r][c/F3821B:g][c/E6AF31:e] has a cooldown of [c/CA4646:40 seconds] once the effect ends\nConverts Musket Balls into homing Rainbow Bullets \nOnly uses one Bullet per use");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 120;
|
||||
Item.width = 70;
|
||||
Item.height = 36;
|
||||
Item.useTime = 18;
|
||||
Item.useAnimation = 18;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(2, 14, 0, 0);
|
||||
Item.expert = true;
|
||||
Item.UseSound = SoundID.Item38;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 35f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (type == 14)
|
||||
{
|
||||
type = ModContent.ProjectileType<RainbowBullet>();
|
||||
}
|
||||
int numberProjectiles = 8;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<Buffs.Shotgun.UltrachargeCooldown>()) && !player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Ultracharge>()) && !player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Ultracharging>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.Shotgun.Ultracharging>(), 140, true);
|
||||
}
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Ultracharge>()))
|
||||
{
|
||||
Item.damage = 134;
|
||||
Item.useTime = 16;
|
||||
Item.useAnimation = 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.damage = 120;
|
||||
Item.useTime = 20;
|
||||
Item.useAnimation = 20;
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -5f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<GoldenShotgun>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 8);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 885 B |
@@ -0,0 +1,90 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Shotguns;
|
||||
|
||||
public class GoldenShotgun : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Golden Shotgun");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nFires a spread of 7 bullets \nUsing <right> grants the [c/8A8A8A:Hypercharging] buff, which has the following effects:\n - After 2 seconds of not being able to use items, grants the [c/FF9300:Hypercharge] buff\n - [c/FF9300:Hypercharge] increases damage dealt by Golden Shotgun by 12%, and reduces Golden Shotgun's use time by 20% \n[c/FF9300:Hypercharge] has a cooldown of [c/CA4646:40 seconds] once the effect ends\nOnly uses one Bullet per use");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 52;
|
||||
Item.width = 80;
|
||||
Item.height = 34;
|
||||
Item.useTime = 25;
|
||||
Item.useAnimation = 25;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 46, 0, 0);
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
Item.UseSound = SoundID.Item38;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 35f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int numberProjectiles = 7;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<Buffs.Shotgun.HyperchargeCooldown>()) && !player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharge>()) && !player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharging>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharging>(), 140, true);
|
||||
}
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharge>()))
|
||||
{
|
||||
Item.damage = 58;
|
||||
Item.useTime = 20;
|
||||
Item.useAnimation = 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.damage = 52;
|
||||
Item.useTime = 25;
|
||||
Item.useAnimation = 25;
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -5f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:HellkinShotgun", 1);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
||||
val.AddTile(TileID.AdamantiteForge);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,60 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Shotguns;
|
||||
|
||||
public class HellfireShotgun : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Hellfire Shotgun");
|
||||
Tooltip.SetDefault("Fires a spread of 5 bullets \nOnly uses one Bullet per use");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 21;
|
||||
Item.width = 78;
|
||||
Item.height = 28;
|
||||
Item.useTime = 45;
|
||||
Item.useAnimation = 45;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 2, 0, 0);
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.UseSound = SoundID.Item36;
|
||||
Item.autoReuse = false;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 35f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int numberProjectiles = 5;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(12f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -5f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ItemID.Obsidian, 16);
|
||||
val.AddIngredient(ItemID.HellstoneBar, 4);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 615 B |
@@ -0,0 +1,96 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Shotguns;
|
||||
|
||||
public class HellkinShotgun : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Hellraiser");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \nFires a spread of 6 bullets \nUsing <right> grants the [c/8A8A8A:Hypercharging] buff, which has the following effects:\n - After 2 seconds of not being able to use items, grants the [c/FF9300:Hypercharge] buff\n - [c/FF9300:Hypercharge] increases damage dealt by Hellraiser by 12%, and reduces Hellraiser's use time by 20% \n[c/FF9300:Hypercharge] has a cooldown of [c/CA4646:40 seconds] once the effect ends\nOnly uses one Bullet per use");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 46;
|
||||
Item.width = 80;
|
||||
Item.height = 34;
|
||||
Item.useTime = 28;
|
||||
Item.useAnimation = 28;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 14, 20, 0);
|
||||
Item.rare = ItemRarityID.LightPurple;
|
||||
Item.UseSound = SoundID.Item38;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 35f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int numberProjectiles = 6;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<Buffs.Shotgun.HyperchargeCooldown>()) && !player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharge>()) && !player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharging>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharging>(), 140, true);
|
||||
}
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharge>()))
|
||||
{
|
||||
Item.damage = 52;
|
||||
Item.useTime = 25;
|
||||
Item.useAnimation = 25;
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.damage = 46;
|
||||
Item.useTime = 28;
|
||||
Item.useAnimation = 28;
|
||||
}
|
||||
return CanUseItem(player);
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -5f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:HellshiverGun");
|
||||
val.AddIngredient(ItemID.HallowedBar, 6);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<HellkinShotgunDracula>());
|
||||
val2.AddIngredient(ItemID.OrangeDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 927 B |
@@ -0,0 +1,89 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Shotguns;
|
||||
|
||||
public class HellkinShotgunDracula : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Hellraiser - Dracula");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nFires a spread of 6 bullets \nUsing <right> grants the [c/8A8A8A:Hypercharging] buff, which has the following effects:\n - After 2 seconds of not being able to use items, grants the [c/FF9300:Hypercharge] buff\n - [c/FF9300:Hypercharge] increases damage dealt by Hellraiser by 12%, and reduces Hellraiser's use time by 20% \n[c/FF9300:Hypercharge] has a cooldown of [c/CA4646:40 seconds] once the effect ends\nOnly uses one Bullet per use");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 46;
|
||||
Item.width = 78;
|
||||
Item.height = 30;
|
||||
Item.useTime = 28;
|
||||
Item.useAnimation = 28;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 14, 20, 0);
|
||||
Item.rare = ItemRarityID.LightPurple;
|
||||
Item.UseSound = SoundID.Item38;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 35f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int numberProjectiles = 6;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<Buffs.Shotgun.HyperchargeCooldown>()) && !player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharge>()) && !player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharging>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharging>(), 140, true);
|
||||
}
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.Shotgun.Hypercharge>()))
|
||||
{
|
||||
Item.damage = 52;
|
||||
Item.useTime = 25;
|
||||
Item.useAnimation = 25;
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.damage = 46;
|
||||
Item.useTime = 28;
|
||||
Item.useAnimation = 28;
|
||||
}
|
||||
return this.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -5f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<HellkinShotgun>());
|
||||
val.AddIngredient(ItemID.RedDye, 1);
|
||||
val.AddTile(TileID.DyeVat);
|
||||
val.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 825 B |
@@ -0,0 +1,67 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Ranged.Shotguns;
|
||||
|
||||
public class HellshiverGun : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shivering Shotgun");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \nFires a spread of 6 bullets \nOnly uses one Bullet per use");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 30;
|
||||
Item.width = 78;
|
||||
Item.height = 28;
|
||||
Item.useTime = 35;
|
||||
Item.useAnimation = 35;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
Item.value = Item.sellPrice(0, 4, 64, 0);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.UseSound = SoundID.Item36;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 35f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int numberProjectiles = 6;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-2f, -5f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<HellfireShotgun>());
|
||||
val.AddRecipeGroup("FabusMod:OrichalcumBar", 6);
|
||||
val.AddIngredient(ItemID.IceBlock, 20);
|
||||
val.AddTile(TileID.MythrilAnvil);
|
||||
val.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<HellshiverGunHellfire>());
|
||||
val2.AddIngredient(ItemID.BlueFlameDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 686 B |