Fixed crashes for ranged weapons.
Optimized code.
This commit is contained in:
@@ -18,6 +18,7 @@ public class LunarBow : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 240;
|
Item.damage = 240;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 27;
|
Item.width = 27;
|
||||||
Item.height = 69;
|
Item.height = 69;
|
||||||
Item.useTime = 9;
|
Item.useTime = 9;
|
||||||
@@ -33,8 +34,8 @@ public class LunarBow : ModItem
|
|||||||
Item.shoot = ModContent.ProjectileType<LunarBolt>();
|
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)
|
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.altFunctionUse == 2)
|
||||||
{
|
{
|
||||||
if (!player.HasBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsCurse>()) && player.statLife < player.statLifeMax2)
|
if (!player.HasBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsCurse>()) && player.statLife < player.statLifeMax2)
|
||||||
@@ -62,11 +63,11 @@ public class LunarBow : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ItemID.LifeFruit, 5);
|
.AddIngredient(ItemID.LifeFruit, 5)
|
||||||
val.AddIngredient(ItemID.LifeCrystal, 5);
|
.AddIngredient(ItemID.LifeCrystal, 5)
|
||||||
val.AddIngredient(ItemID.FragmentVortex, 14);
|
.AddIngredient(ItemID.FragmentVortex, 14)
|
||||||
val.AddTile(TileID.LunarCraftingStation);
|
.AddTile(TileID.LunarCraftingStation)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class LunarRainBow : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 320;
|
Item.damage = 320;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 27;
|
Item.width = 27;
|
||||||
Item.height = 69;
|
Item.height = 69;
|
||||||
Item.useTime = 7;
|
Item.useTime = 7;
|
||||||
@@ -33,8 +34,8 @@ public class LunarRainBow : ModItem
|
|||||||
Item.shoot = ModContent.ProjectileType<SpectralMoonBolt>();
|
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)
|
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.altFunctionUse == 2)
|
||||||
{
|
{
|
||||||
if (!player.HasBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonsCurse>()) && player.statLife < player.statLifeMax2)
|
if (!player.HasBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonsCurse>()) && player.statLife < player.statLifeMax2)
|
||||||
@@ -62,10 +63,10 @@ public class LunarRainBow : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<LunarBow>());
|
.AddIngredient(ModContent.ItemType<LunarBow>())
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 14);
|
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 14)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class PiercingBow : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 10;
|
Item.damage = 10;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 18;
|
Item.width = 18;
|
||||||
Item.height = 32;
|
Item.height = 32;
|
||||||
Item.useTime = 27;
|
Item.useTime = 27;
|
||||||
@@ -34,7 +35,7 @@ public class PiercingBow : ModItem
|
|||||||
Item.useAmmo = AmmoID.Arrow;
|
Item.useAmmo = AmmoID.Arrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
@@ -45,16 +46,16 @@ public class PiercingBow : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ItemID.WoodenBow, 1);
|
.AddIngredient(ItemID.WoodenBow)
|
||||||
val.AddIngredient(ItemID.IronBow, 1);
|
.AddIngredient(ItemID.IronBow)
|
||||||
val.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ItemID.WoodenBow, 1);
|
.AddIngredient(ItemID.WoodenBow)
|
||||||
val2.AddIngredient(ItemID.LeadBow, 1);
|
.AddIngredient(ItemID.LeadBow)
|
||||||
val2.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class DemonsBow : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 34;
|
Item.damage = 34;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 18;
|
Item.width = 18;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 16;
|
Item.useTime = 16;
|
||||||
@@ -55,16 +56,16 @@ public class DemonsBow : ModItem
|
|||||||
Item.damage = 34;
|
Item.damage = 34;
|
||||||
Item.shoot = ProjectileID.HellfireArrow;
|
Item.shoot = ProjectileID.HellfireArrow;
|
||||||
}
|
}
|
||||||
return CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<StormBow>());
|
.AddIngredient(ModContent.ItemType<StormBow>())
|
||||||
val.AddIngredient(ModContent.ItemType<StonePlatedBow>());
|
.AddIngredient(ModContent.ItemType<StonePlatedBow>())
|
||||||
val.AddIngredient(ItemID.HellstoneBar, 6);
|
.AddIngredient(ItemID.HellstoneBar, 6)
|
||||||
val.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class GoldenKabuki : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 58;
|
Item.damage = 58;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 18;
|
Item.width = 18;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 12;
|
Item.useTime = 12;
|
||||||
@@ -55,15 +56,15 @@ public class GoldenKabuki : ModItem
|
|||||||
Item.damage = 58;
|
Item.damage = 58;
|
||||||
Item.shoot = ProjectileID.HolyArrow;
|
Item.shoot = ProjectileID.HolyArrow;
|
||||||
}
|
}
|
||||||
return CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<Kabuki>());
|
.AddIngredient(ModContent.ItemType<Kabuki>())
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class Kabuki : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 42;
|
Item.damage = 42;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 18;
|
Item.width = 18;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 14;
|
Item.useTime = 14;
|
||||||
@@ -55,15 +56,15 @@ public class Kabuki : ModItem
|
|||||||
Item.damage = 42;
|
Item.damage = 42;
|
||||||
Item.shoot = ProjectileID.HellfireArrow;
|
Item.shoot = ProjectileID.HellfireArrow;
|
||||||
}
|
}
|
||||||
return CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<DemonsBow>());
|
.AddIngredient(ModContent.ItemType<DemonsBow>())
|
||||||
val.AddIngredient(ItemID.HallowedBar, 6);
|
.AddIngredient(ItemID.HallowedBar, 6)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class RainBow : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 90;
|
Item.damage = 90;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 30;
|
Item.width = 30;
|
||||||
Item.height = 50;
|
Item.height = 50;
|
||||||
Item.useTime = 3;
|
Item.useTime = 3;
|
||||||
@@ -55,15 +56,15 @@ public class RainBow : ModItem
|
|||||||
Item.damage = 90;
|
Item.damage = 90;
|
||||||
Item.shoot = ModContent.ProjectileType<RainbowArrow>();
|
Item.shoot = ModContent.ProjectileType<RainbowArrow>();
|
||||||
}
|
}
|
||||||
return CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<GoldenKabuki>());
|
.AddIngredient(ModContent.ItemType<GoldenKabuki>())
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6);
|
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class StonePlatedBow : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 5;
|
Item.damage = 5;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 18;
|
Item.width = 18;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 32;
|
Item.useTime = 32;
|
||||||
@@ -31,11 +32,11 @@ public class StonePlatedBow : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<Items.WeaponParts.UntreatedBowPart>(), 2);
|
.AddIngredient(ModContent.ItemType<Items.WeaponParts.UntreatedBowPart>(), 2)
|
||||||
val.AddIngredient(ItemID.StoneBlock, 4);
|
.AddIngredient(ItemID.StoneBlock, 4)
|
||||||
val.AddIngredient(ItemID.FallenStar, 1);
|
.AddIngredient(ItemID.FallenStar)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.ReinforcedWorkBench>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.ReinforcedWorkBench>())
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class StormBow : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 24;
|
Item.damage = 24;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 18;
|
Item.width = 18;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 18;
|
Item.useTime = 18;
|
||||||
@@ -43,7 +44,7 @@ public class StormBow : ModItem
|
|||||||
Item.useTime = 4;
|
Item.useTime = 4;
|
||||||
Item.useAnimation = 24;
|
Item.useAnimation = 24;
|
||||||
Item.damage = 24;
|
Item.damage = 24;
|
||||||
Item.reuseDelay = 90;
|
Item.reuseDelay = 90;
|
||||||
Item.shoot = ModContent.ProjectileType<StormArrow>();
|
Item.shoot = ModContent.ProjectileType<StormArrow>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -55,6 +56,6 @@ public class StormBow : ModItem
|
|||||||
Item.damage = 28;
|
Item.damage = 28;
|
||||||
Item.shoot = ProjectileID.WoodenArrowFriendly;
|
Item.shoot = ProjectileID.WoodenArrowFriendly;
|
||||||
}
|
}
|
||||||
return CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class FoxPistol : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 22;
|
Item.damage = 22;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 36;
|
Item.width = 36;
|
||||||
Item.height = 21;
|
Item.height = 21;
|
||||||
Item.useTime = 12;
|
Item.useTime = 12;
|
||||||
@@ -38,9 +39,9 @@ public class FoxPistol : ModItem
|
|||||||
return new Vector2(0f, -2f);
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -54,9 +55,7 @@ public class FoxPistol : ModItem
|
|||||||
{
|
{
|
||||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxMending>(), 300, true);
|
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxMending>(), 300, true);
|
||||||
}
|
}
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f));
|
velocity = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(3f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,16 +87,16 @@ public class FoxPistol : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>());
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>())
|
||||||
val.AddRecipeGroup("FabusMod:GoldBar", 10);
|
.AddRecipeGroup("FabusMod:GoldBar", 10)
|
||||||
val.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<FoxPistolBlue>());
|
.AddIngredient(ModContent.ItemType<FoxPistolBlue>())
|
||||||
val2.AddIngredient(ItemID.OrangeDye, 1);
|
.AddIngredient(ItemID.OrangeDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class FoxPistolBlue : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 22;
|
Item.damage = 22;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 36;
|
Item.width = 36;
|
||||||
Item.height = 21;
|
Item.height = 21;
|
||||||
Item.useTime = 12;
|
Item.useTime = 12;
|
||||||
@@ -38,9 +39,9 @@ public class FoxPistolBlue : ModItem
|
|||||||
return new Vector2(0f, -2f);
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -54,9 +55,7 @@ public class FoxPistolBlue : ModItem
|
|||||||
{
|
{
|
||||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxMendingBlue>(), 300, true);
|
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.FoxMendingBlue>(), 300, true);
|
||||||
}
|
}
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f));
|
velocity = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(3f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,16 +87,16 @@ public class FoxPistolBlue : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>());
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>())
|
||||||
val.AddRecipeGroup("FabusMod:GoldBar", 10);
|
.AddRecipeGroup("FabusMod:GoldBar", 10)
|
||||||
val.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<FoxPistol>(), 1);
|
.AddIngredient(ModContent.ItemType<FoxPistol>())
|
||||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
.AddIngredient(ItemID.BlueDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class SpectralHowler : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 260;
|
Item.damage = 260;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 36;
|
Item.width = 36;
|
||||||
Item.height = 21;
|
Item.height = 21;
|
||||||
Item.useTime = 6;
|
Item.useTime = 6;
|
||||||
@@ -38,9 +39,9 @@ public class SpectralHowler : ModItem
|
|||||||
return new Vector2(-6f, -2f);
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -53,9 +54,7 @@ public class SpectralHowler : ModItem
|
|||||||
{
|
{
|
||||||
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.SpectralMending>(), 420, true);
|
player.AddBuff(ModContent.BuffType<Buffs.FoxPistol.SpectralMending>(), 420, true);
|
||||||
}
|
}
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f));
|
velocity = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(3f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,11 +86,11 @@ public class SpectralHowler : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:FoxPistol", 1);
|
.AddRecipeGroup("FabusMod:FoxPistol")
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.RainbowToken>());
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.RainbowToken>())
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 4);
|
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 4)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class DynasticFuser : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 14;
|
Item.damage = 14;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 72;
|
Item.width = 72;
|
||||||
Item.height = 32;
|
Item.height = 32;
|
||||||
Item.useTime = 7;
|
Item.useTime = 7;
|
||||||
@@ -37,18 +38,18 @@ public class DynasticFuser : ModItem
|
|||||||
return new Vector2(-2f, 2f);
|
return new Vector2(-2f, 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.3f;
|
return Utils.NextFloat(Main.rand) >= 0.3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<FusionDriver>());
|
.AddIngredient(ModContent.ItemType<FusionDriver>())
|
||||||
val.AddIngredient(ItemID.HellstoneBar, 12);
|
.AddIngredient(ItemID.HellstoneBar, 12)
|
||||||
val.AddIngredient(ItemID.Sapphire, 8);
|
.AddIngredient(ItemID.Sapphire, 8)
|
||||||
val.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class DynasticFuserGolden : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 72;
|
Item.damage = 72;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 70;
|
Item.width = 70;
|
||||||
Item.height = 32;
|
Item.height = 32;
|
||||||
Item.useTime = 4;
|
Item.useTime = 4;
|
||||||
@@ -37,17 +38,17 @@ public class DynasticFuserGolden : ModItem
|
|||||||
return new Vector2(-2f, 2f);
|
return new Vector2(-2f, 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.55f;
|
return Utils.NextFloat(Main.rand) >= 0.55f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:ProtectionFuser", 1);
|
.AddRecipeGroup("FabusMod:ProtectionFuser")
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8)
|
||||||
val.AddTile(TileID.AdamantiteForge);
|
.AddTile(TileID.AdamantiteForge)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class FusedRainbow : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 85;
|
Item.damage = 85;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 70;
|
Item.width = 70;
|
||||||
Item.height = 32;
|
Item.height = 32;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -39,13 +40,13 @@ public class FusedRainbow : ModItem
|
|||||||
return new Vector2(-2f, 2f);
|
return new Vector2(-2f, 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
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)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<RainbowBullet>();
|
type = ModContent.ProjectileType<RainbowBullet>();
|
||||||
@@ -55,10 +56,10 @@ public class FusedRainbow : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<DynasticFuserGolden>());
|
.AddIngredient(ModContent.ItemType<DynasticFuserGolden>())
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 12);
|
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 12)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class FusionDriver : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 5;
|
Item.damage = 5;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 72;
|
Item.width = 72;
|
||||||
Item.height = 32;
|
Item.height = 32;
|
||||||
Item.useTime = 8;
|
Item.useTime = 8;
|
||||||
@@ -39,10 +40,10 @@ public class FusionDriver : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("IronBar", 12);
|
.AddRecipeGroup("IronBar", 12)
|
||||||
val.AddIngredient(ItemID.Emerald, 4);
|
.AddIngredient(ItemID.Emerald, 4)
|
||||||
val.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class ProtectionFuser : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 36;
|
Item.damage = 36;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 72;
|
Item.width = 72;
|
||||||
Item.height = 32;
|
Item.height = 32;
|
||||||
Item.useTime = 5;
|
Item.useTime = 5;
|
||||||
@@ -37,23 +38,23 @@ public class ProtectionFuser : ModItem
|
|||||||
return new Vector2(-2f, 2f);
|
return new Vector2(-2f, 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.42f;
|
return Utils.NextFloat(Main.rand) >= 0.42f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<DynasticFuser>());
|
.AddIngredient(ModContent.ItemType<DynasticFuser>())
|
||||||
val.AddRecipeGroup("FabusMod:AdamantiteBar", 12);
|
.AddRecipeGroup("FabusMod:AdamantiteBar", 12)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<ProtectionFuserCarbonFiber>());
|
.AddIngredient(ModContent.ItemType<ProtectionFuserCarbonFiber>())
|
||||||
val2.AddIngredient(ItemID.SilverDye, 1);
|
.AddIngredient(ItemID.SilverDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class ProtectionFuserCarbonFiber : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 36;
|
Item.damage = 36;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 72;
|
Item.width = 72;
|
||||||
Item.height = 32;
|
Item.height = 32;
|
||||||
Item.useTime = 5;
|
Item.useTime = 5;
|
||||||
@@ -37,17 +38,17 @@ public class ProtectionFuserCarbonFiber : ModItem
|
|||||||
return new Vector2(-2f, 2f);
|
return new Vector2(-2f, 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.42f;
|
return Utils.NextFloat(Main.rand) >= 0.42f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<ProtectionFuser>());
|
.AddIngredient(ModContent.ItemType<ProtectionFuser>())
|
||||||
val.AddIngredient(ItemID.BlackDye, 1);
|
.AddIngredient(ItemID.BlackDye)
|
||||||
val.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using FabusMod.Projectiles.LightBlasts;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
@@ -18,6 +17,7 @@ public class GoldenStinger : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 68;
|
Item.damage = 68;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 32;
|
Item.width = 32;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 3;
|
Item.useTime = 3;
|
||||||
@@ -28,14 +28,14 @@ public class GoldenStinger : ModItem
|
|||||||
Item.value = Item.sellPrice(0, 30, 35, 0);
|
Item.value = Item.sellPrice(0, 30, 35, 0);
|
||||||
Item.UseSound = SoundID.Item11;
|
Item.UseSound = SoundID.Item11;
|
||||||
Item.autoReuse = true;
|
Item.autoReuse = true;
|
||||||
Item.shoot = ModContent.ProjectileType<GoldenLightBlast>();
|
Item.shoot = ModContent.ProjectileType<Projectiles.LightBlasts.GoldenLightBlast>();
|
||||||
Item.shootSpeed = 10f;
|
Item.shootSpeed = 10f;
|
||||||
Item.rare = 12;
|
Item.rare = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -45,10 +45,10 @@ public class GoldenStinger : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:TheStinger", 1);
|
.AddRecipeGroup("FabusMod:TheStinger")
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6)
|
||||||
val.AddTile(TileID.LunarCraftingStation);
|
.AddTile(TileID.LunarCraftingStation)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using FabusMod.Projectiles.LightBlasts;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
@@ -18,6 +17,7 @@ public class LightGun : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 14;
|
Item.damage = 14;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 32;
|
Item.width = 32;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 7;
|
Item.useTime = 7;
|
||||||
@@ -28,14 +28,14 @@ public class LightGun : ModItem
|
|||||||
Item.value = Item.sellPrice(0, 5, 0, 0);
|
Item.value = Item.sellPrice(0, 5, 0, 0);
|
||||||
Item.UseSound = SoundID.Item11;
|
Item.UseSound = SoundID.Item11;
|
||||||
Item.autoReuse = true;
|
Item.autoReuse = true;
|
||||||
Item.shoot = ModContent.ProjectileType<LightBlast>();
|
Item.shoot = ModContent.ProjectileType<Projectiles.LightBlasts.LightBlast>();
|
||||||
Item.shootSpeed = 7f;
|
Item.shootSpeed = 7f;
|
||||||
Item.rare = ItemRarityID.Green;
|
Item.rare = ItemRarityID.Green;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -45,11 +45,11 @@ public class LightGun : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:GoldBar", 20);
|
.AddRecipeGroup("FabusMod:GoldBar", 20)
|
||||||
val.AddIngredient(ItemID.Diamond, 4);
|
.AddIngredient(ItemID.Diamond, 4)
|
||||||
val.AddIngredient(ItemID.Amethyst, 6);
|
.AddIngredient(ItemID.Amethyst, 6)
|
||||||
val.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using FabusMod.Projectiles.LightBlasts;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
@@ -18,6 +17,7 @@ public class SpectralBlaster : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 100;
|
Item.damage = 100;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 32;
|
Item.width = 32;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -28,14 +28,14 @@ public class SpectralBlaster : ModItem
|
|||||||
Item.value = Item.sellPrice(1, 55, 0, 0);
|
Item.value = Item.sellPrice(1, 55, 0, 0);
|
||||||
Item.UseSound = SoundID.Item11;
|
Item.UseSound = SoundID.Item11;
|
||||||
Item.autoReuse = true;
|
Item.autoReuse = true;
|
||||||
Item.shoot = ModContent.ProjectileType<RainbowLightBlast>();
|
Item.shoot = ModContent.ProjectileType<Projectiles.LightBlasts.RainbowLightBlast>();
|
||||||
Item.shootSpeed = 10f;
|
Item.shootSpeed = 10f;
|
||||||
Item.expert = true;
|
Item.expert = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -45,10 +45,10 @@ public class SpectralBlaster : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
Recipe recipe = CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<GoldenStinger>());
|
.AddIngredient(ModContent.ItemType<GoldenStinger>())
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6);
|
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using FabusMod.Projectiles.LightBlasts;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
@@ -18,6 +17,7 @@ public class Taegeukgi : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 40;
|
Item.damage = 40;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 32;
|
Item.width = 32;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 5;
|
Item.useTime = 5;
|
||||||
@@ -28,14 +28,14 @@ public class Taegeukgi : ModItem
|
|||||||
Item.value = Item.sellPrice(0, 8, 25, 0);
|
Item.value = Item.sellPrice(0, 8, 25, 0);
|
||||||
Item.UseSound = SoundID.Item11;
|
Item.UseSound = SoundID.Item11;
|
||||||
Item.autoReuse = true;
|
Item.autoReuse = true;
|
||||||
Item.shoot = ModContent.ProjectileType<LightBlast>();
|
Item.shoot = ModContent.ProjectileType<Projectiles.LightBlasts.LightBlast>();
|
||||||
Item.shootSpeed = 6f;
|
Item.shootSpeed = 6f;
|
||||||
Item.rare = ItemRarityID.LightRed;
|
Item.rare = ItemRarityID.LightRed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -45,11 +45,11 @@ public class Taegeukgi : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<LightGun>());
|
.AddIngredient(ModContent.ItemType<LightGun>())
|
||||||
val.AddRecipeGroup("FabusMod:OrichalcumBar", 6);
|
.AddRecipeGroup("FabusMod:OrichalcumBar", 6)
|
||||||
val.AddIngredient(ItemID.Sapphire, 6);
|
.AddIngredient(ItemID.Sapphire, 6)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using FabusMod.Projectiles.LightBlasts;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
@@ -18,6 +17,7 @@ public class TheStinger : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 66;
|
Item.damage = 66;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 32;
|
Item.width = 32;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 4;
|
Item.useTime = 4;
|
||||||
@@ -28,14 +28,14 @@ public class TheStinger : ModItem
|
|||||||
Item.value = Item.sellPrice(0, 13, 85, 0);
|
Item.value = Item.sellPrice(0, 13, 85, 0);
|
||||||
Item.UseSound = SoundID.Item11;
|
Item.UseSound = SoundID.Item11;
|
||||||
Item.autoReuse = true;
|
Item.autoReuse = true;
|
||||||
Item.shoot = ModContent.ProjectileType<LightBlast>();
|
Item.shoot = ModContent.ProjectileType<Projectiles.LightBlasts.LightBlast>();
|
||||||
Item.shootSpeed = 5f;
|
Item.shootSpeed = 5f;
|
||||||
Item.rare = ItemRarityID.Pink;
|
Item.rare = ItemRarityID.Pink;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -45,16 +45,16 @@ public class TheStinger : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<Taegeukgi>());
|
.AddIngredient(ModContent.ItemType<Taegeukgi>())
|
||||||
val.AddIngredient(ItemID.HallowedBar, 14);
|
.AddIngredient(ItemID.HallowedBar, 14)
|
||||||
val.AddTile(TileID.AdamantiteForge);
|
.AddTile(TileID.AdamantiteForge)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<TheStingerBlackCat>());
|
.AddIngredient(ModContent.ItemType<TheStingerBlackCat>())
|
||||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
.AddIngredient(ItemID.BlueDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using FabusMod.Projectiles.LightBlasts;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
@@ -18,6 +17,7 @@ public class TheStingerBlackCat : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 66;
|
Item.damage = 66;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 32;
|
Item.width = 32;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 4;
|
Item.useTime = 4;
|
||||||
@@ -28,14 +28,14 @@ public class TheStingerBlackCat : ModItem
|
|||||||
Item.value = Item.sellPrice(0, 13, 85, 0);
|
Item.value = Item.sellPrice(0, 13, 85, 0);
|
||||||
Item.UseSound = SoundID.Item11;
|
Item.UseSound = SoundID.Item11;
|
||||||
Item.autoReuse = true;
|
Item.autoReuse = true;
|
||||||
Item.shoot = ModContent.ProjectileType<LightBlast>();
|
Item.shoot = ModContent.ProjectileType<Projectiles.LightBlasts.LightBlast>();
|
||||||
Item.shootSpeed = 5f;
|
Item.shootSpeed = 5f;
|
||||||
Item.rare = ItemRarityID.Pink;
|
Item.rare = ItemRarityID.Pink;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 32f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -45,10 +45,10 @@ public class TheStingerBlackCat : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(null, "TheStinger", 1);
|
.AddIngredient(null, "TheStinger")
|
||||||
val.AddIngredient(ItemID.BlackDye, 1);
|
.AddIngredient(ItemID.BlackDye)
|
||||||
val.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class AugmentedUzi : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 32;
|
Item.damage = 32;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 48;
|
Item.width = 48;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -38,25 +39,23 @@ public class AugmentedUzi : ModItem
|
|||||||
return new Vector2(-12f, -8f);
|
return new Vector2(-12f, -8f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.7f;
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(6f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<MachinePistol>());
|
.AddIngredient(ModContent.ItemType<MachinePistol>())
|
||||||
val.AddIngredient(ItemID.Uzi, 1);
|
.AddIngredient(ItemID.Uzi)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using FabusMod.Projectiles;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
@@ -18,6 +17,7 @@ public class CosmicHacker : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 82;
|
Item.damage = 82;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 48;
|
Item.width = 48;
|
||||||
Item.height = 36;
|
Item.height = 36;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -39,29 +39,27 @@ public class CosmicHacker : ModItem
|
|||||||
return new Vector2(-8f, -8f);
|
return new Vector2(-8f, -8f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.9f;
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(5f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<RainbowBullet>();
|
type = ModContent.ProjectileType<Projectiles.RainbowBullet>();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<MachinePistolGolden>());
|
.AddIngredient(ModContent.ItemType<MachinePistolGolden>())
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10);
|
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class MachinePistol : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 10;
|
Item.damage = 10;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 50;
|
Item.width = 50;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -33,7 +34,7 @@ public class MachinePistol : ModItem
|
|||||||
Item.rare = ItemRarityID.LightRed;
|
Item.rare = ItemRarityID.LightRed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||||
}
|
}
|
||||||
@@ -43,20 +44,18 @@ public class MachinePistol : ModItem
|
|||||||
return new Vector2(-12f, -8f);
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(6f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:OrichalcumBar", 16);
|
.AddRecipeGroup("FabusMod:OrichalcumBar", 16)
|
||||||
val.AddIngredient(ItemID.Amethyst, 5);
|
.AddIngredient(ItemID.Amethyst, 5)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class MachinePistolGolden : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 66;
|
Item.damage = 66;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 50;
|
Item.width = 50;
|
||||||
Item.height = 38;
|
Item.height = 38;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -38,25 +39,23 @@ public class MachinePistolGolden : ModItem
|
|||||||
return new Vector2(-12f, -8f);
|
return new Vector2(-12f, -8f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(5f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:Verano", 1);
|
.AddRecipeGroup("FabusMod:Verano")
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6)
|
||||||
val.AddTile(TileID.LunarCraftingStation);
|
.AddTile(TileID.LunarCraftingStation)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class Verano : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 60;
|
Item.damage = 60;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 48;
|
Item.width = 48;
|
||||||
Item.height = 36;
|
Item.height = 36;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -38,31 +39,29 @@ public class Verano : ModItem
|
|||||||
return new Vector2(-12f, -8f);
|
return new Vector2(-12f, -8f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(5f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<AugmentedUzi>());
|
.AddIngredient(ModContent.ItemType<AugmentedUzi>())
|
||||||
val.AddIngredient(ItemID.FragmentVortex, 12);
|
.AddIngredient(ItemID.FragmentVortex, 12)
|
||||||
val.AddTile(TileID.LunarCraftingStation);
|
.AddTile(TileID.LunarCraftingStation)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<VeranoRime>());
|
.AddIngredient(ModContent.ItemType<VeranoRime>())
|
||||||
val2.AddIngredient(ItemID.GreenDye, 1);
|
.AddIngredient(ItemID.GreenDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class VeranoRime : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 60;
|
Item.damage = 60;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 56;
|
Item.width = 56;
|
||||||
Item.height = 36;
|
Item.height = 36;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -38,25 +39,23 @@ public class VeranoRime : ModItem
|
|||||||
return new Vector2(-16f, 0f);
|
return new Vector2(-16f, 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(5f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<Verano>());
|
.AddIngredient(ModContent.ItemType<Verano>())
|
||||||
val.AddIngredient(ItemID.BlueDye, 1);
|
.AddIngredient(ItemID.BlueDye)
|
||||||
val.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class GoddessRevolver : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 86;
|
Item.damage = 86;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 50;
|
Item.width = 50;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -39,14 +40,14 @@ public class GoddessRevolver : ModItem
|
|||||||
return new Vector2(-2f, -2f);
|
return new Vector2(-2f, -2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.5f;
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 35f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -60,11 +61,11 @@ public class GoddessRevolver : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:Peaceforcer", 1);
|
.AddRecipeGroup("FabusMod:Peaceforcer")
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8)
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 6);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 6)
|
||||||
val.AddTile(TileID.AdamantiteForge);
|
.AddTile(TileID.AdamantiteForge)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class Peaceforcer : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 48;
|
Item.damage = 48;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 50;
|
Item.width = 50;
|
||||||
Item.height = 30;
|
Item.height = 30;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -39,14 +40,14 @@ public class Peaceforcer : ModItem
|
|||||||
return new Vector2(-2f, -2f);
|
return new Vector2(-2f, -2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.5f;
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 35f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -60,18 +61,18 @@ public class Peaceforcer : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:Peacegunner", 1);
|
.AddRecipeGroup("FabusMod:Peacegunner")
|
||||||
val.AddRecipeGroup("FabusMod:AdamantiteBar", 8);
|
.AddRecipeGroup("FabusMod:AdamantiteBar", 8)
|
||||||
val.AddIngredient(ItemID.SoulofNight, 6);
|
.AddIngredient(ItemID.SoulofNight, 6)
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<PeaceforcerVanHelsing>(), 1);
|
.AddIngredient(ModContent.ItemType<PeaceforcerVanHelsing>())
|
||||||
val2.AddIngredient(ItemID.SilverDye, 1);
|
.AddIngredient(ItemID.SilverDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class PeaceforcerVanHelsing : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 48;
|
Item.damage = 48;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 50;
|
Item.width = 50;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -39,14 +40,14 @@ public class PeaceforcerVanHelsing : ModItem
|
|||||||
return new Vector2(-2f, -2f);
|
return new Vector2(-2f, -2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.5f;
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 35f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -62,7 +63,7 @@ public class PeaceforcerVanHelsing : ModItem
|
|||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
Recipe val = CreateRecipe();
|
||||||
val.AddIngredient(ModContent.ItemType<Peaceforcer>());
|
val.AddIngredient(ModContent.ItemType<Peaceforcer>());
|
||||||
val.AddIngredient(ItemID.BrownDye, 1);
|
val.AddIngredient(ItemID.BrownDye);
|
||||||
val.AddTile(TileID.DyeVat);
|
val.AddTile(TileID.DyeVat);
|
||||||
val.Register();
|
val.Register();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class Peacegunner : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 32;
|
Item.damage = 32;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 50;
|
Item.width = 50;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 12;
|
Item.useTime = 12;
|
||||||
@@ -38,9 +39,9 @@ public class Peacegunner : ModItem
|
|||||||
return new Vector2(-2f, -2f);
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 35f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -50,16 +51,16 @@ public class Peacegunner : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
Recipe recipe1 = CreateRecipe();
|
||||||
val.AddIngredient(ModContent.ItemType<Peacekeeper>());
|
recipe1.AddIngredient(ModContent.ItemType<Peacekeeper>());
|
||||||
val.AddIngredient(ItemID.HellstoneBar, 10);
|
recipe1.AddIngredient(ItemID.HellstoneBar, 10);
|
||||||
val.AddTile(TileID.Anvils);
|
recipe1.AddTile(TileID.Anvils);
|
||||||
val.Register();
|
recipe1.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
Recipe recipe2 = CreateRecipe();
|
||||||
val2.AddIngredient(ModContent.ItemType<PeacegunnerAmerican>());
|
recipe2.AddIngredient(ModContent.ItemType<PeacegunnerAmerican>());
|
||||||
val2.AddIngredient(ItemID.SilverDye, 1);
|
recipe2.AddIngredient(ItemID.SilverDye);
|
||||||
val2.AddTile(TileID.DyeVat);
|
recipe2.AddTile(TileID.DyeVat);
|
||||||
val2.Register();
|
recipe2.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class PeacegunnerAmerican : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 32;
|
Item.damage = 32;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 50;
|
Item.width = 50;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 12;
|
Item.useTime = 12;
|
||||||
@@ -38,9 +39,9 @@ public class PeacegunnerAmerican : ModItem
|
|||||||
return new Vector2(-2f, -2f);
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 35f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -50,11 +51,11 @@ public class PeacegunnerAmerican : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
Recipe recipe = CreateRecipe();
|
||||||
val.AddIngredient(ModContent.ItemType<Peacegunner>());
|
recipe.AddIngredient(ModContent.ItemType<Peacegunner>());
|
||||||
val.AddIngredient(ItemID.BlueDye, 1);
|
recipe.AddIngredient(ItemID.BlueDye);
|
||||||
val.AddIngredient(ItemID.RedDye, 1);
|
recipe.AddIngredient(ItemID.RedDye);
|
||||||
val.AddTile(TileID.DyeVat);
|
recipe.AddTile(TileID.DyeVat);
|
||||||
val.Register();
|
recipe.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class Peacekeeper : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 12;
|
Item.damage = 12;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 50;
|
Item.width = 50;
|
||||||
Item.height = 26;
|
Item.height = 26;
|
||||||
Item.useTime = 15;
|
Item.useTime = 15;
|
||||||
@@ -38,9 +39,9 @@ public class Peacekeeper : ModItem
|
|||||||
return new Vector2(-2f, -2f);
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 35f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -50,10 +51,10 @@ public class Peacekeeper : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
Recipe recipe = CreateRecipe();
|
||||||
val.AddRecipeGroup("IronBar", 10);
|
recipe.AddRecipeGroup("IronBar", 10);
|
||||||
val.AddIngredient(ItemID.Sapphire, 2);
|
recipe.AddIngredient(ItemID.Sapphire, 2);
|
||||||
val.AddTile(TileID.Anvils);
|
recipe.AddTile(TileID.Anvils);
|
||||||
val.Register();
|
recipe.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class Unity : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 150;
|
Item.damage = 150;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 38;
|
Item.width = 38;
|
||||||
Item.height = 24;
|
Item.height = 24;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -40,14 +41,14 @@ public class Unity : ModItem
|
|||||||
return new Vector2(-2f, -2f);
|
return new Vector2(-2f, -2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.6f;
|
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)
|
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;
|
Vector2 muzzleOffset = Vector2.Normalize(velocity) * 35f;
|
||||||
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0))
|
||||||
{
|
{
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
@@ -61,10 +62,10 @@ public class Unity : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
Recipe recipe = CreateRecipe();
|
||||||
val.AddIngredient(ModContent.ItemType<GoddessRevolver>());
|
recipe.AddIngredient(ModContent.ItemType<GoddessRevolver>());
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 8);
|
recipe.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 8);
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
recipe.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||||
val.Register();
|
recipe.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class GoldenPulse : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 66;
|
Item.damage = 66;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 40;
|
Item.width = 40;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -34,7 +35,7 @@ public class GoldenPulse : ModItem
|
|||||||
Item.rare = 12;
|
Item.rare = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.9f;
|
return Utils.NextFloat(Main.rand) >= 0.9f;
|
||||||
}
|
}
|
||||||
@@ -44,11 +45,9 @@ public class GoldenPulse : ModItem
|
|||||||
return new Vector2(1f, -2f);
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<PulseBulletGolden>();
|
type = ModContent.ProjectileType<PulseBulletGolden>();
|
||||||
@@ -58,10 +57,10 @@ public class GoldenPulse : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:PulseSprayer", 1);
|
.AddRecipeGroup("FabusMod:PulseSprayer")
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 2);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 2)
|
||||||
val.AddTile(TileID.LunarCraftingStation);
|
.AddTile(TileID.LunarCraftingStation)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class Graffiti : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 80;
|
Item.damage = 80;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 40;
|
Item.width = 40;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -34,7 +35,7 @@ public class Graffiti : ModItem
|
|||||||
Item.expert = true;
|
Item.expert = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.9f;
|
return Utils.NextFloat(Main.rand) >= 0.9f;
|
||||||
}
|
}
|
||||||
@@ -44,11 +45,9 @@ public class Graffiti : ModItem
|
|||||||
return new Vector2(1f, -2f);
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<RainbowBullet>();
|
type = ModContent.ProjectileType<RainbowBullet>();
|
||||||
@@ -58,10 +57,10 @@ public class Graffiti : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<GoldenPulse>());
|
.AddIngredient(ModContent.ItemType<GoldenPulse>())
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10);
|
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class PulsePistol : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 10;
|
Item.damage = 10;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 40;
|
Item.width = 40;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -34,16 +35,14 @@ public class PulsePistol : ModItem
|
|||||||
Item.rare = ItemRarityID.LightRed;
|
Item.rare = ItemRarityID.LightRed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.7f;
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<PulseBullet>();
|
type = ModContent.ProjectileType<PulseBullet>();
|
||||||
@@ -58,11 +57,11 @@ public class PulsePistol : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:AdamantiteBar", 6);
|
.AddRecipeGroup("FabusMod:AdamantiteBar", 6)
|
||||||
val.AddIngredient(ItemID.Diamond, 2);
|
.AddIngredient(ItemID.Diamond, 2)
|
||||||
val.AddIngredient(ItemID.Sapphire, 2);
|
.AddIngredient(ItemID.Sapphire, 2)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class PulseSprayer : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 54;
|
Item.damage = 54;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 40;
|
Item.width = 40;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -34,7 +35,7 @@ public class PulseSprayer : ModItem
|
|||||||
Item.rare = ItemRarityID.Red;
|
Item.rare = ItemRarityID.Red;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||||
}
|
}
|
||||||
@@ -44,11 +45,9 @@ public class PulseSprayer : ModItem
|
|||||||
return new Vector2(1f, -2f);
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<PulseBulletBlue>();
|
type = ModContent.ProjectileType<PulseBulletBlue>();
|
||||||
@@ -58,16 +57,16 @@ public class PulseSprayer : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:PunksPulse", 1);
|
.AddRecipeGroup("FabusMod:PunksPulse")
|
||||||
val.AddIngredient(ItemID.FragmentVortex, 8);
|
.AddIngredient(ItemID.FragmentVortex, 8)
|
||||||
val.AddTile(TileID.LunarCraftingStation);
|
.AddTile(TileID.LunarCraftingStation)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<PulseSprayerCadet>());
|
.AddIngredient(ModContent.ItemType<PulseSprayerCadet>())
|
||||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
.AddIngredient(ItemID.BlueDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class PulseSprayerCadet : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 54;
|
Item.damage = 54;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 40;
|
Item.width = 40;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -34,7 +35,7 @@ public class PulseSprayerCadet : ModItem
|
|||||||
Item.rare = ItemRarityID.Red;
|
Item.rare = ItemRarityID.Red;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.8f;
|
return Utils.NextFloat(Main.rand) >= 0.8f;
|
||||||
}
|
}
|
||||||
@@ -44,11 +45,9 @@ public class PulseSprayerCadet : ModItem
|
|||||||
return new Vector2(1f, -2f);
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<PulseBullet>();
|
type = ModContent.ProjectileType<PulseBullet>();
|
||||||
@@ -58,10 +57,10 @@ public class PulseSprayerCadet : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<PulseSprayer>());
|
.AddIngredient(ModContent.ItemType<PulseSprayer>())
|
||||||
val.AddIngredient(ItemID.SilverDye, 1);
|
.AddIngredient(ItemID.SilverDye)
|
||||||
val.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class PunksPulse : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 25;
|
Item.damage = 25;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 40;
|
Item.width = 40;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -34,7 +35,7 @@ public class PunksPulse : ModItem
|
|||||||
Item.rare = ItemRarityID.Pink;
|
Item.rare = ItemRarityID.Pink;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.7f;
|
return Utils.NextFloat(Main.rand) >= 0.7f;
|
||||||
}
|
}
|
||||||
@@ -44,11 +45,9 @@ public class PunksPulse : ModItem
|
|||||||
return new Vector2(1f, -2f);
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<PulseBullet>();
|
type = ModContent.ProjectileType<PulseBullet>();
|
||||||
@@ -58,17 +57,17 @@ public class PunksPulse : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<PulsePistol>());
|
.AddIngredient(ModContent.ItemType<PulsePistol>())
|
||||||
val.AddIngredient(ItemID.HallowedBar, 8);
|
.AddIngredient(ItemID.HallowedBar, 8)
|
||||||
val.AddIngredient(ItemID.SoulofNight, 6);
|
.AddIngredient(ItemID.SoulofNight, 6)
|
||||||
val.AddTile(TileID.AdamantiteForge);
|
.AddTile(TileID.AdamantiteForge)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<PunksPulseUltraviolet>());
|
.AddIngredient(ModContent.ItemType<PunksPulseUltraviolet>())
|
||||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
.AddIngredient(ItemID.BlueDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class PunksPulseUltraviolet : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 25;
|
Item.damage = 25;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 40;
|
Item.width = 40;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 2;
|
Item.useTime = 2;
|
||||||
@@ -34,7 +35,7 @@ public class PunksPulseUltraviolet : ModItem
|
|||||||
Item.rare = ItemRarityID.Pink;
|
Item.rare = ItemRarityID.Pink;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||||
{
|
{
|
||||||
return Utils.NextFloat(Main.rand) >= 0.7f;
|
return Utils.NextFloat(Main.rand) >= 0.7f;
|
||||||
}
|
}
|
||||||
@@ -44,11 +45,9 @@ public class PunksPulseUltraviolet : ModItem
|
|||||||
return new Vector2(1f, -2f);
|
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)
|
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 = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
velocity.X = perturbedSpeed.X;
|
|
||||||
velocity.Y = perturbedSpeed.Y;
|
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
type = ModContent.ProjectileType<PulseBulletPink>();
|
type = ModContent.ProjectileType<PulseBulletPink>();
|
||||||
@@ -58,10 +57,10 @@ public class PunksPulseUltraviolet : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<PunksPulse>());
|
.AddIngredient(ModContent.ItemType<PunksPulse>())
|
||||||
val.AddIngredient(ItemID.PinkDye, 1);
|
.AddIngredient(ItemID.PinkDye)
|
||||||
val.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class Depriver : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 120;
|
Item.damage = 120;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 70;
|
Item.width = 70;
|
||||||
Item.height = 36;
|
Item.height = 36;
|
||||||
Item.useTime = 18;
|
Item.useTime = 18;
|
||||||
@@ -34,7 +35,7 @@ public class Depriver : ModItem
|
|||||||
Item.useAmmo = AmmoID.Bullet;
|
Item.useAmmo = AmmoID.Bullet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
if (type == 14)
|
if (type == 14)
|
||||||
{
|
{
|
||||||
@@ -43,8 +44,8 @@ public class Depriver : ModItem
|
|||||||
int numberProjectiles = 8;
|
int numberProjectiles = 8;
|
||||||
for (int i = 0; i < numberProjectiles; i++)
|
for (int i = 0; i < numberProjectiles; i++)
|
||||||
{
|
{
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(10f));
|
||||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -75,7 +76,7 @@ public class Depriver : ModItem
|
|||||||
Item.useTime = 20;
|
Item.useTime = 20;
|
||||||
Item.useAnimation = 20;
|
Item.useAnimation = 20;
|
||||||
}
|
}
|
||||||
return CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Vector2? HoldoutOffset()
|
public override Vector2? HoldoutOffset()
|
||||||
@@ -85,10 +86,10 @@ public class Depriver : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<GoldenShotgun>());
|
.AddIngredient(ModContent.ItemType<GoldenShotgun>())
|
||||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 8);
|
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 8)
|
||||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class GoldenShotgun : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 52;
|
Item.damage = 52;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 80;
|
Item.width = 80;
|
||||||
Item.height = 34;
|
Item.height = 34;
|
||||||
Item.useTime = 25;
|
Item.useTime = 25;
|
||||||
@@ -33,13 +34,13 @@ public class GoldenShotgun : ModItem
|
|||||||
Item.useAmmo = AmmoID.Bullet;
|
Item.useAmmo = AmmoID.Bullet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
int numberProjectiles = 7;
|
int numberProjectiles = 7;
|
||||||
for (int i = 0; i < numberProjectiles; i++)
|
for (int i = 0; i < numberProjectiles; i++)
|
||||||
{
|
{
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(10f));
|
||||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -70,7 +71,7 @@ public class GoldenShotgun : ModItem
|
|||||||
Item.useTime = 25;
|
Item.useTime = 25;
|
||||||
Item.useAnimation = 25;
|
Item.useAnimation = 25;
|
||||||
}
|
}
|
||||||
return CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Vector2? HoldoutOffset()
|
public override Vector2? HoldoutOffset()
|
||||||
@@ -80,11 +81,11 @@ public class GoldenShotgun : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:HellkinShotgun", 1);
|
.AddRecipeGroup("FabusMod:HellkinShotgun")
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 8)
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4)
|
||||||
val.AddTile(TileID.AdamantiteForge);
|
.AddTile(TileID.AdamantiteForge)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class HellfireShotgun : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 21;
|
Item.damage = 21;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 78;
|
Item.width = 78;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 45;
|
Item.useTime = 45;
|
||||||
@@ -33,13 +34,13 @@ public class HellfireShotgun : ModItem
|
|||||||
Item.useAmmo = AmmoID.Bullet;
|
Item.useAmmo = AmmoID.Bullet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
int numberProjectiles = 5;
|
int numberProjectiles = 5;
|
||||||
for (int i = 0; i < numberProjectiles; i++)
|
for (int i = 0; i < numberProjectiles; i++)
|
||||||
{
|
{
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(12f));
|
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(12f));
|
||||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -51,10 +52,10 @@ public class HellfireShotgun : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ItemID.Obsidian, 16);
|
.AddIngredient(ItemID.Obsidian, 16)
|
||||||
val.AddIngredient(ItemID.HellstoneBar, 4);
|
.AddIngredient(ItemID.HellstoneBar, 4)
|
||||||
val.AddTile(TileID.Anvils);
|
.AddTile(TileID.Anvils)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class HellkinShotgun : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 46;
|
Item.damage = 46;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 80;
|
Item.width = 80;
|
||||||
Item.height = 34;
|
Item.height = 34;
|
||||||
Item.useTime = 28;
|
Item.useTime = 28;
|
||||||
@@ -33,13 +34,13 @@ public class HellkinShotgun : ModItem
|
|||||||
Item.useAmmo = AmmoID.Bullet;
|
Item.useAmmo = AmmoID.Bullet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
int numberProjectiles = 6;
|
int numberProjectiles = 6;
|
||||||
for (int i = 0; i < numberProjectiles; i++)
|
for (int i = 0; i < numberProjectiles; i++)
|
||||||
{
|
{
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -70,7 +71,7 @@ public class HellkinShotgun : ModItem
|
|||||||
Item.useTime = 28;
|
Item.useTime = 28;
|
||||||
Item.useAnimation = 28;
|
Item.useAnimation = 28;
|
||||||
}
|
}
|
||||||
return CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Vector2? HoldoutOffset()
|
public override Vector2? HoldoutOffset()
|
||||||
@@ -80,17 +81,17 @@ public class HellkinShotgun : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddRecipeGroup("FabusMod:HellshiverGun");
|
.AddRecipeGroup("FabusMod:HellshiverGun")
|
||||||
val.AddIngredient(ItemID.HallowedBar, 6);
|
.AddIngredient(ItemID.HallowedBar, 6)
|
||||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<HellkinShotgunDracula>());
|
.AddIngredient(ModContent.ItemType<HellkinShotgunDracula>())
|
||||||
val2.AddIngredient(ItemID.OrangeDye, 1);
|
.AddIngredient(ItemID.OrangeDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class HellkinShotgunDracula : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 46;
|
Item.damage = 46;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 78;
|
Item.width = 78;
|
||||||
Item.height = 30;
|
Item.height = 30;
|
||||||
Item.useTime = 28;
|
Item.useTime = 28;
|
||||||
@@ -33,13 +34,13 @@ public class HellkinShotgunDracula : ModItem
|
|||||||
Item.useAmmo = AmmoID.Bullet;
|
Item.useAmmo = AmmoID.Bullet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
int numberProjectiles = 6;
|
int numberProjectiles = 6;
|
||||||
for (int i = 0; i < numberProjectiles; i++)
|
for (int i = 0; i < numberProjectiles; i++)
|
||||||
{
|
{
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f));
|
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(8f));
|
||||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -70,7 +71,7 @@ public class HellkinShotgunDracula : ModItem
|
|||||||
Item.useTime = 28;
|
Item.useTime = 28;
|
||||||
Item.useAnimation = 28;
|
Item.useAnimation = 28;
|
||||||
}
|
}
|
||||||
return this.CanUseItem(player);
|
return base.CanUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Vector2? HoldoutOffset()
|
public override Vector2? HoldoutOffset()
|
||||||
@@ -80,10 +81,10 @@ public class HellkinShotgunDracula : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<HellkinShotgun>());
|
.AddIngredient(ModContent.ItemType<HellkinShotgun>())
|
||||||
val.AddIngredient(ItemID.RedDye, 1);
|
.AddIngredient(ItemID.RedDye)
|
||||||
val.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class HellshiverGun : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 30;
|
Item.damage = 30;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 78;
|
Item.width = 78;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 35;
|
Item.useTime = 35;
|
||||||
@@ -33,13 +34,13 @@ public class HellshiverGun : ModItem
|
|||||||
Item.useAmmo = AmmoID.Bullet;
|
Item.useAmmo = AmmoID.Bullet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
int numberProjectiles = 6;
|
int numberProjectiles = 6;
|
||||||
for (int i = 0; i < numberProjectiles; i++)
|
for (int i = 0; i < numberProjectiles; i++)
|
||||||
{
|
{
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(10f));
|
||||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -51,17 +52,17 @@ public class HellshiverGun : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<HellfireShotgun>());
|
.AddIngredient(ModContent.ItemType<HellfireShotgun>())
|
||||||
val.AddRecipeGroup("FabusMod:OrichalcumBar", 6);
|
.AddRecipeGroup("FabusMod:OrichalcumBar", 6)
|
||||||
val.AddIngredient(ItemID.IceBlock, 20);
|
.AddIngredient(ItemID.IceBlock, 20)
|
||||||
val.AddTile(TileID.MythrilAnvil);
|
.AddTile(TileID.MythrilAnvil)
|
||||||
val.Register();
|
.Register();
|
||||||
|
|
||||||
Recipe val2 = CreateRecipe();
|
CreateRecipe()
|
||||||
val2.AddIngredient(ModContent.ItemType<HellshiverGunHellfire>());
|
.AddIngredient(ModContent.ItemType<HellshiverGunHellfire>())
|
||||||
val2.AddIngredient(ItemID.BlueFlameDye, 1);
|
.AddIngredient(ItemID.BlueFlameDye)
|
||||||
val2.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val2.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class HellshiverGunHellfire : ModItem
|
|||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 30;
|
Item.damage = 30;
|
||||||
|
Item.DamageType = DamageClass.Ranged;
|
||||||
Item.width = 78;
|
Item.width = 78;
|
||||||
Item.height = 28;
|
Item.height = 28;
|
||||||
Item.useTime = 35;
|
Item.useTime = 35;
|
||||||
@@ -33,13 +34,13 @@ public class HellshiverGunHellfire : ModItem
|
|||||||
Item.useAmmo = AmmoID.Bullet;
|
Item.useAmmo = AmmoID.Bullet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||||
{
|
{
|
||||||
int numberProjectiles = 6;
|
int numberProjectiles = 6;
|
||||||
for (int i = 0; i < numberProjectiles; i++)
|
for (int i = 0; i < numberProjectiles; i++)
|
||||||
{
|
{
|
||||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(10f));
|
||||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
|
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -51,10 +52,10 @@ public class HellshiverGunHellfire : ModItem
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe val = CreateRecipe();
|
CreateRecipe()
|
||||||
val.AddIngredient(ModContent.ItemType<HellshiverGun>());
|
.AddIngredient(ModContent.ItemType<HellshiverGun>())
|
||||||
val.AddIngredient(ItemID.FlameDye, 1);
|
.AddIngredient(ItemID.FlameDye)
|
||||||
val.AddTile(TileID.DyeVat);
|
.AddTile(TileID.DyeVat)
|
||||||
val.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user